diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php index 5f10bce4c8..a3222c1876 100644 --- a/wp-includes/assets/script-loader-packages.php +++ b/wp-includes/assets/script-loader-packages.php @@ -1 +1 @@ - array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'a38319d7ba46c6e60f7f9d4c371222c5'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'e103c345829d2b4da838b701a4dff236'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '63050163caffa6aac54e9ebf21fe0472'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '21d1d6c005241b908b592f52ad684a28'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87cf2365cd719a6954f1e2bb8bcc692a'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7cf0ebaf9ad71b48f8e259da09c04a96'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '1aaefec40aaf345b5e6e969304e78e07'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', '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-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'eaf9a7d8b936d26afead09af3f82b117'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '8ee151736a1e51db2bafbb61ddd60634'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '658a51e7220626e26a92a46af5c2e489'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '76c5a4c54d97b02824ed3d3b164c2811'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => 'e52c48958a19b766c6a9d28c02d53575'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '95df951bbac4c9f2fd2e6da80561595d'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-widgets'), 'version' => '498aa94909e53672986d64a11b67d88b'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '6c1ab5799c4b061254d313d2d8d9fb87'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '6a75067d86cf9ab901a4646595575446'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => 'e923a564a0407e0c2ffcbd348817ca86'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '96593d5d272d008fbcb6912fa0b86778'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '3c10edc1abf3fbbc79f17fd7d1d332eb'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd996b53411d1533a84951212ab6ac4ff'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '51ebcd5cd745a9866ab9a430d8318189'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport'), 'version' => '3497072223e20a22d15e7212dd6da2db'), 'edit-widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'd81f8f3ae104f6157df90b9c8d26cd39'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '5ed697cafca349e71af1c7f8842fcd44'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '3dfdc75a0abf30f057df44e9a39abe5b'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '00a5735837e9efe13da1d979f16a7105'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '98e32e5276b4b59e7b283addf7cdbd8c'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6d64f2cb8f5c6bb49caca37f8828ce3'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6385fb7cd9fdada1cf8892a545f8a26'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'ebee46757c6a411e38fd079a7ac71d94'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '649feec00389556f8015a6b97efc1cb1'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '37fdd241f3be3126e9248060e363e7c9'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '84a0e6bbcf0b9e1ea0184c3f2bf28022'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '2b04eb3e5628488fe2cb534f02806022'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ee812d25ec8504c5b419a1aa3cae974d'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'e44820c667bf205cacdfc48cbeb3c2e6'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '48ab41273bfd9022769c430fcd3c23cf'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => 'f885533aefb501e1eedcbd4a9d04ca70'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'a9b6f95c63bb642d0be7c3d1d208b302'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'cadf5cfaabdb15c8c8fc440547afe919'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'efad6460ae6b28406d39866cb10731e0'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '5156478c032ea85a2bbdceeb7a43b0c1'), 'reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7387bed6e19d1b3aec4b6fda683a0768'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'e7d57502b62ec4756783a0cd79238841'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '9aa1118308e1a7ca5fbe4b842b1ba63e'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'd6964e945049b6190adc8770cda168c4'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '4ebce6423dfff99d40033fd33ce52cc9'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '16385e4d69da65c7283790971de6b297'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '7ee74cd3ed0dfcfd22b233b8750d1025'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b9190af8fc6a3a48c580473c6f337b88'), 'widgets.js' => array('dependencies' => array('lodash', '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' => '80e98954519d1dad7a91a2248dbc2cc9'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'fb8056c75aa0a0569f7ea3ceae97fbc6')); \ No newline at end of file + array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => 'a38319d7ba46c6e60f7f9d4c371222c5'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'e103c345829d2b4da838b701a4dff236'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '63050163caffa6aac54e9ebf21fe0472'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '21d1d6c005241b908b592f52ad684a28'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '87cf2365cd719a6954f1e2bb8bcc692a'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7cf0ebaf9ad71b48f8e259da09c04a96'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '86a49d4ae118b35c9d45ac4b84635fd2'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', '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-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'eaf9a7d8b936d26afead09af3f82b117'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '8ee151736a1e51db2bafbb61ddd60634'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '9bd25387a02afaadaf750b5360b2ce52'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => 'dd97a56f29216e8c944cbaa4cb38cecb'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => 'e52c48958a19b766c6a9d28c02d53575'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '95df951bbac4c9f2fd2e6da80561595d'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-widgets'), 'version' => '498aa94909e53672986d64a11b67d88b'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'f00f0b446f3f24f5aac2f66ac3d32ce4'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '6a75067d86cf9ab901a4646595575446'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => 'e923a564a0407e0c2ffcbd348817ca86'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '96593d5d272d008fbcb6912fa0b86778'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '3c10edc1abf3fbbc79f17fd7d1d332eb'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd996b53411d1533a84951212ab6ac4ff'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '51ebcd5cd745a9866ab9a430d8318189'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport'), 'version' => '3497072223e20a22d15e7212dd6da2db'), 'edit-widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'd81f8f3ae104f6157df90b9c8d26cd39'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '5ed697cafca349e71af1c7f8842fcd44'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '3dfdc75a0abf30f057df44e9a39abe5b'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '00a5735837e9efe13da1d979f16a7105'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '98e32e5276b4b59e7b283addf7cdbd8c'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6d64f2cb8f5c6bb49caca37f8828ce3'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c6385fb7cd9fdada1cf8892a545f8a26'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'ebee46757c6a411e38fd079a7ac71d94'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '649feec00389556f8015a6b97efc1cb1'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '37fdd241f3be3126e9248060e363e7c9'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '84a0e6bbcf0b9e1ea0184c3f2bf28022'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '2b04eb3e5628488fe2cb534f02806022'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ee812d25ec8504c5b419a1aa3cae974d'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'e44820c667bf205cacdfc48cbeb3c2e6'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '48ab41273bfd9022769c430fcd3c23cf'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => 'f885533aefb501e1eedcbd4a9d04ca70'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'a9b6f95c63bb642d0be7c3d1d208b302'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'cadf5cfaabdb15c8c8fc440547afe919'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'efad6460ae6b28406d39866cb10731e0'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '2eb6a5f6aade771228f8b17b70260a17'), 'reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7387bed6e19d1b3aec4b6fda683a0768'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'e7d57502b62ec4756783a0cd79238841'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '7956386e7ad75455e21fce4c0a1ab99e'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'd6964e945049b6190adc8770cda168c4'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '4ebce6423dfff99d40033fd33ce52cc9'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '16385e4d69da65c7283790971de6b297'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '7ee74cd3ed0dfcfd22b233b8750d1025'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b9190af8fc6a3a48c580473c6f337b88'), 'widgets.js' => array('dependencies' => array('lodash', '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' => '80e98954519d1dad7a91a2248dbc2cc9'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'fb8056c75aa0a0569f7ea3ceae97fbc6')); \ No newline at end of file diff --git a/wp-includes/js/dist/block-editor.js b/wp-includes/js/dist/block-editor.js index 5f66bf83ff..ecc5b086c7 100644 --- a/wp-includes/js/dist/block-editor.js +++ b/wp-includes/js/dist/block-editor.js @@ -1,6 +1,637 @@ /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ 480: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(5304); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +var isArrayBuffer = __webpack_require__(4602); + +/** @type {import('.')} */ +module.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; +}; // in node < 0.11, byteLength is an own nonconfigurable property + + +/***/ }), + +/***/ 5304: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3803); + +var callBind = __webpack_require__(6427); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 6427: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7870); +var GetIntrinsic = __webpack_require__(3803); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 3303: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7870: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3303); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3803: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(8040)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7870); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8040: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(9063); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 9063: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + /***/ 6411: /***/ (function(module, exports) { @@ -386,6 +1017,70 @@ var computedStyle = function (el, prop, getComputedStyle) { module.exports = computedStyle; +/***/ }), + +/***/ 2656: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var gopd = __webpack_require__(3828); + +/** @type {import('.')} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + + /***/ }), /***/ 1198: @@ -1334,6 +2029,2229 @@ module.exports = _extends({ viewportHeight: 0 }, domUtils); +/***/ }), + +/***/ 8918: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(292); + +/** @type {import('.')} */ +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + + +/***/ }), + +/***/ 3592: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 5903: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3592); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 292: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(4482)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(5903); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 4482: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(7457); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 7457: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6788: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + + +/***/ }), + +/***/ 6716: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + + +/***/ }), + +/***/ 9204: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ 9908: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ 6724: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 1642: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 1451: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 7998: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +/** @type {import('./RequireObjectCoercible')} */ +module.exports = function RequireObjectCoercible(value) { + if (value == null) { + throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); + } + return value; +}; + + +/***/ }), + +/***/ 5249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = __webpack_require__(3777); +var isCallable = __webpack_require__(5443); +var isDate = __webpack_require__(8659); +var isSymbol = __webpack_require__(3082); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; + + +/***/ }), + +/***/ 3777: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ 4843: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isCallable = __webpack_require__(5443); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; + + +/***/ }), + +/***/ 9930: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 1930: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(9930); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3828: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(2473); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 8819: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8729: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(8819); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 2473: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5810)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8729); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5810: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1759); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1759: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 8198: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3010); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 3010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(1779)(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(1930); +var hasOwn = __webpack_require__(9284); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 1779: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(8030); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 8030: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 1856: +/***/ (function(module) { + +"use strict"; + + +var test = { + __proto__: null, + foo: {} +}; + +var $Object = Object; + +/** @type {import('.')} */ +module.exports = function hasProto() { + // @ts-expect-error: TS errors on an inherited property for some reason + return { __proto__: test }.foo === test.foo + && !(test instanceof $Object); +}; + + +/***/ }), + +/***/ 9905: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = __webpack_require__.g.Symbol; +var hasSymbolSham = __webpack_require__(5682); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 5682: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 81: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 4111: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = __webpack_require__(81); + +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 9284: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(1930); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + + +/***/ }), + +/***/ 9429: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __webpack_require__(766); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 2075: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 766: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(2075); + +module.exports = Function.prototype.bind || implementation; + + /***/ }), /***/ 8575: @@ -1368,6 +4286,832 @@ if (typeof Object.create === 'function') { } +/***/ }), + +/***/ 4602: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(4374); +var callBound = __webpack_require__(7442); +var GetIntrinsic = __webpack_require__(3767); + +var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true); +/** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */ +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); +var $toString = callBound('Object.prototype.toString'); + +// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method +var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; +var $abSlice = !!abSlice && callBind(abSlice); + +/** @type {import('.')} */ +module.exports = $byteLength || $abSlice + ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + if ($byteLength) { + // @ts-expect-error no idea why TS can't handle the overload + $byteLength(obj); + } else { + // @ts-expect-error TS chooses not to type-narrow inside a closure + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } + : $ArrayBuffer + // in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag + ? function isArrayBuffer(obj) { + return $toString(obj) === '[object ArrayBuffer]'; + } + : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; + + +/***/ }), + +/***/ 7442: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(3767); + +var callBind = __webpack_require__(4374); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 4374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7410); +var GetIntrinsic = __webpack_require__(3767); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 1818: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7410: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1818); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3767: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(6945)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7410); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 6945: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6992); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6992: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5443: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = reflectApply + ? function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value); + } + : function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + + +/***/ }), + +/***/ 8659: +/***/ (function(module) { + +"use strict"; + + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; + + +/***/ }), + +/***/ 3082: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; +var hasSymbols = __webpack_require__(9905)(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && 0; + }; +} + + +/***/ }), + +/***/ 2527: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var whichTypedArray = __webpack_require__(4010); + +/** @type {import('.')} */ +module.exports = function isTypedArray(value) { + return !!whichTypedArray(value); +}; + + /***/ }), /***/ 9894: @@ -2080,6 +5824,225 @@ normalizeWheel.getEventType = function() /*string*/ { module.exports = normalizeWheel; +/***/ }), + +/***/ 8383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = __webpack_require__(4418); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + + +/***/ }), + +/***/ 806: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var slice = Array.prototype.slice; +var isArgs = __webpack_require__(4418); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8383); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + + +/***/ }), + +/***/ 4418: +/***/ (function(module) { + +"use strict"; + + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + + +/***/ }), + +/***/ 131: +/***/ (function(module) { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; + + /***/ }), /***/ 5372: @@ -2341,322 +6304,6756 @@ exports.Z = TextareaAutosize_1.TextareaAutosize; /***/ }), -/***/ 3124: -/***/ (function(module) { +/***/ 3002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -var traverse = module.exports = function (obj) { - return new Traverse(obj); +"use strict"; + + +var GetIntrinsic = __webpack_require__(8024); +var $concat = GetIntrinsic('%Array.prototype.concat%'); + +var callBind = __webpack_require__(9386); + +var callBound = __webpack_require__(3315); +var $slice = callBound('Array.prototype.slice'); + +var hasSymbols = __webpack_require__(1489)(); +var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + +/** @type {never[]} */ var empty = []; +var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; + +// eslint-disable-next-line no-extra-parens +var isArray = isConcatSpreadable ? /** @type {(value: unknown) => value is unknown[]} */ (__webpack_require__(9277)) : null; + +/** @type {import('.')} */ +module.exports = isConcatSpreadable + // eslint-disable-next-line no-unused-vars + ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + /** @type {typeof item} */ var arg = arguments[i]; + // @ts-expect-error ts(2538) see https://github.com/microsoft/TypeScript/issues/9998#issuecomment-1890787975; works if `const` + if (arg && typeof arg === 'object' && typeof arg[isConcatSpreadable] === 'boolean') { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + if (!empty[isConcatSpreadable]) { + // @ts-expect-error ts(7015) TS doesn't yet support Symbol indexing + empty[isConcatSpreadable] = true; + } + // @ts-expect-error ts(2721) ts(18047) not sure why TS can't figure out this can't be null + var arr = isArray(arg) ? $slice(arg) : [arg]; + // @ts-expect-error ts(7015) TS can't handle expandos on an array + arr[isConcatSpreadable] = true; // shadow the property. TODO: use [[Define]] + arguments[i] = arr; + } + } + // @ts-expect-error ts(2345) https://github.com/microsoft/TypeScript/issues/57164 TS doesn't understand that apply can take an arguments object + return $concatApply(arguments); + } + : callBind($concat, empty); + + +/***/ }), + +/***/ 3315: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(8024); + +var callBind = __webpack_require__(9386); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; }; -function Traverse (obj) { - this.value = obj; + +/***/ }), + +/***/ 9386: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(5127); +var GetIntrinsic = __webpack_require__(8024); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; } -Traverse.prototype.get = function (ps) { - var node = this.value; - for (var i = 0; i < ps.length; i ++) { - var key = ps[i]; - if (!node || !hasOwnProperty.call(node, key)) { - node = undefined; - break; - } - node = node[key]; + +/***/ }), + +/***/ 6850: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; } - return node; + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; }; -Traverse.prototype.has = function (ps) { - var node = this.value; - for (var i = 0; i < ps.length; i ++) { - var key = ps[i]; - if (!node || !hasOwnProperty.call(node, key)) { - return false; - } - node = node[key]; +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; } - return true; + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 5127: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(6850); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 8024: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(330)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(5127); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 330: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1489); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1489: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 9277: +/***/ (function(module) { + +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; + + +/***/ }), + +/***/ 1312: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(2137); +var isRegex = __webpack_require__(6073); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = __webpack_require__(1642); + +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; + + +/***/ }), + +/***/ 2137: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(5273); + +var callBind = __webpack_require__(381); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 381: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(3331); +var GetIntrinsic = __webpack_require__(5273); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7780: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 3331: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7780); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 5273: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(6339)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(3331); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 6339: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6789); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6789: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(2137); +var hasToStringTag = __webpack_require__(4111)(); +var has; +var $exec; +var isRegexMarker; +var badStringifier; + +if (hasToStringTag) { + has = callBound('Object.prototype.hasOwnProperty'); + $exec = callBound('RegExp.prototype.exec'); + isRegexMarker = {}; + + var throwRegexMarker = function () { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + + if (typeof Symbol.toPrimitive === 'symbol') { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } +} + +var $toString = callBound('Object.prototype.toString'); +var gOPD = Object.getOwnPropertyDescriptor; +var regexClass = '[object RegExp]'; + +module.exports = hasToStringTag + // eslint-disable-next-line consistent-return + ? function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } + : function isRegex(value) { + // In older browsers, typeof regex incorrectly returns 'function' + if (!value || (typeof value !== 'object' && typeof value !== 'function')) { + return false; + } + + return $toString(value) === regexClass; + }; + + +/***/ }), + +/***/ 4521: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(1757); +var define = __webpack_require__(2656); +var hasDescriptors = __webpack_require__(8594)(); +var gOPD = __webpack_require__(3828); + +var $TypeError = __webpack_require__(1642); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @type {import('.')} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + + var loose = arguments.length > 2 && !!arguments[2]; + + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); + } else { + define(/** @type {Parameters[0]} */ (fn), 'length', length); + } + } + return fn; +}; + + +/***/ }), + +/***/ 5371: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 9015: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(5371); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 1757: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(1207)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(9015); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8594: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + return !!$defineProperty; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 1207: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(2326); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 2326: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 3124: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var whichTypedArray = __webpack_require__(4010); +var taSlice = __webpack_require__(1140); +var gopd = __webpack_require__(3828); + +// TODO: use call-bind, is-date, is-regex, is-string, is-boolean-object, is-number-object +function toS(obj) { return Object.prototype.toString.call(obj); } +function isDate(obj) { return toS(obj) === '[object Date]'; } +function isRegExp(obj) { return toS(obj) === '[object RegExp]'; } +function isError(obj) { return toS(obj) === '[object Error]'; } +function isBoolean(obj) { return toS(obj) === '[object Boolean]'; } +function isNumber(obj) { return toS(obj) === '[object Number]'; } +function isString(obj) { return toS(obj) === '[object String]'; } + +// TODO: use isarray +var isArray = Array.isArray || function isArray(xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +// TODO: use for-each? +function forEach(xs, fn) { + if (xs.forEach) { return xs.forEach(fn); } + for (var i = 0; i < xs.length; i++) { + fn(xs[i], i, xs); + } + return void undefined; +} + +// TODO: use object-keys +var objectKeys = Object.keys || function keys(obj) { + var res = []; + for (var key in obj) { res.push(key); } // eslint-disable-line no-restricted-syntax + return res; +}; + +var propertyIsEnumerable = Object.prototype.propertyIsEnumerable; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; // eslint-disable-line id-length + +// TODO: use reflect.ownkeys and filter out non-enumerables +function ownEnumerableKeys(obj) { + var res = objectKeys(obj); + + // Include enumerable symbol properties. + if (getOwnPropertySymbols) { + var symbols = getOwnPropertySymbols(obj); + for (var i = 0; i < symbols.length; i++) { + if (propertyIsEnumerable.call(obj, symbols[i])) { + res.push(symbols[i]); + } + } + } + return res; +} + +// TODO: use object.hasown +var hasOwnProperty = Object.prototype.hasOwnProperty || function (obj, key) { + return key in obj; +}; + +function isWritable(object, key) { + if (typeof gopd !== 'function') { + return true; + } + + return !gopd(object, key).writable; +} + +function copy(src, options) { + if (typeof src === 'object' && src !== null) { + var dst; + + if (isArray(src)) { + dst = []; + } else if (isDate(src)) { + dst = new Date(src.getTime ? src.getTime() : src); + } else if (isRegExp(src)) { + dst = new RegExp(src); + } else if (isError(src)) { + dst = { message: src.message }; + } else if (isBoolean(src) || isNumber(src) || isString(src)) { + dst = Object(src); + } else { + var ta = whichTypedArray(src); + if (ta) { + return taSlice(src); + } else if (Object.create && Object.getPrototypeOf) { + dst = Object.create(Object.getPrototypeOf(src)); + } else if (src.constructor === Object) { + dst = {}; + } else { + var proto = (src.constructor && src.constructor.prototype) + || src.__proto__ + || {}; + var T = function T() {}; // eslint-disable-line func-style, func-name-matching + T.prototype = proto; + dst = new T(); + } + } + + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function (key) { + dst[key] = src[key]; + }); + return dst; + } + return src; +} + +/** @type {TraverseOptions} */ +var emptyNull = { __proto__: null }; + +function walk(root, cb) { + var path = []; + var parents = []; + var alive = true; + var options = arguments.length > 2 ? arguments[2] : emptyNull; + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + var immutable = !!options.immutable; + + return (function walker(node_) { + var node = immutable ? copy(node_, options) : node_; + var modifiers = {}; + + var keepGoing = true; + + var state = { + node: node, + node_: node_, + path: [].concat(path), + parent: parents[parents.length - 1], + parents: parents, + key: path[path.length - 1], + isRoot: path.length === 0, + level: path.length, + circular: null, + update: function (x, stopHere) { + if (!state.isRoot) { + state.parent.node[state.key] = x; + } + state.node = x; + if (stopHere) { keepGoing = false; } + }, + delete: function (stopHere) { + delete state.parent.node[state.key]; + if (stopHere) { keepGoing = false; } + }, + remove: function (stopHere) { + if (isArray(state.parent.node)) { + state.parent.node.splice(state.key, 1); + } else { + delete state.parent.node[state.key]; + } + if (stopHere) { keepGoing = false; } + }, + keys: null, + before: function (f) { modifiers.before = f; }, + after: function (f) { modifiers.after = f; }, + pre: function (f) { modifiers.pre = f; }, + post: function (f) { modifiers.post = f; }, + stop: function () { alive = false; }, + block: function () { keepGoing = false; }, + }; + + if (!alive) { return state; } + + function updateState() { + if (typeof state.node === 'object' && state.node !== null) { + if (!state.keys || state.node_ !== state.node) { + state.keys = iteratorFunction(state.node); + } + + state.isLeaf = state.keys.length === 0; + + for (var i = 0; i < parents.length; i++) { + if (parents[i].node_ === node_) { + state.circular = parents[i]; + break; // eslint-disable-line no-restricted-syntax + } + } + } else { + state.isLeaf = true; + state.keys = null; + } + + state.notLeaf = !state.isLeaf; + state.notRoot = !state.isRoot; + } + + updateState(); + + // use return values to update if defined + var ret = cb.call(state, state.node); + if (ret !== undefined && state.update) { state.update(ret); } + + if (modifiers.before) { modifiers.before.call(state, state.node); } + + if (!keepGoing) { return state; } + + if ( + typeof state.node === 'object' + && state.node !== null + && !state.circular + ) { + parents.push(state); + + updateState(); + + forEach(state.keys, function (key, i) { + path.push(key); + + if (modifiers.pre) { modifiers.pre.call(state, state.node[key], key); } + + var child = walker(state.node[key]); + if ( + immutable + && hasOwnProperty.call(state.node, key) + && !isWritable(state.node, key) + ) { + state.node[key] = child.node; + } + + child.isLast = i === state.keys.length - 1; + child.isFirst = i === 0; + + if (modifiers.post) { modifiers.post.call(state, child); } + + path.pop(); + }); + parents.pop(); + } + + if (modifiers.after) { modifiers.after.call(state, state.node); } + + return state; + }(root)).node; +} + +/** @typedef {{ immutable?: boolean, includeSymbols?: boolean }} TraverseOptions */ + +/** + * A traverse constructor + * @param {object} obj - the object to traverse + * @param {TraverseOptions | undefined} [options] - options for the traverse + * @constructor + */ +function Traverse(obj) { + /** @type {TraverseOptions} */ + this.options = arguments.length > 1 ? arguments[1] : emptyNull; + this.value = obj; +} + +/** @type {(ps: PropertyKey[]) => Traverse['value']} */ +Traverse.prototype.get = function (ps) { + var node = this.value; + for (var i = 0; node && i < ps.length; i++) { + var key = ps[i]; + if ( + !hasOwnProperty.call(node, key) + || (!this.options.includeSymbols && typeof key === 'symbol') + ) { + return void undefined; + } + node = node[key]; + } + return node; +}; + +/** @type {(ps: PropertyKey[]) => boolean} */ +Traverse.prototype.has = function (ps) { + var node = this.value; + for (var i = 0; node && i < ps.length; i++) { + var key = ps[i]; + if (!hasOwnProperty.call(node, key) || (!this.options.includeSymbols && typeof key === 'symbol')) { + return false; + } + node = node[key]; + } + return true; }; Traverse.prototype.set = function (ps, value) { - var node = this.value; - for (var i = 0; i < ps.length - 1; i ++) { - var key = ps[i]; - if (!hasOwnProperty.call(node, key)) node[key] = {}; - node = node[key]; - } - node[ps[i]] = value; - return value; + var node = this.value; + for (var i = 0; i < ps.length - 1; i++) { + var key = ps[i]; + if (!hasOwnProperty.call(node, key)) { node[key] = {}; } + node = node[key]; + } + node[ps[i]] = value; + return value; }; Traverse.prototype.map = function (cb) { - return walk(this.value, cb, true); + return walk(this.value, cb, { __proto__: null, immutable: true, includeSymbols: !!this.options.includeSymbols }); }; Traverse.prototype.forEach = function (cb) { - this.value = walk(this.value, cb, false); - return this.value; + this.value = walk(this.value, cb, this.options); + return this.value; }; Traverse.prototype.reduce = function (cb, init) { - var skip = arguments.length === 1; - var acc = skip ? this.value : init; - this.forEach(function (x) { - if (!this.isRoot || !skip) { - acc = cb.call(this, acc, x); - } - }); - return acc; + var skip = arguments.length === 1; + var acc = skip ? this.value : init; + this.forEach(function (x) { + if (!this.isRoot || !skip) { + acc = cb.call(this, acc, x); + } + }); + return acc; }; Traverse.prototype.paths = function () { - var acc = []; - this.forEach(function (x) { - acc.push(this.path); - }); - return acc; + var acc = []; + this.forEach(function () { + acc.push(this.path); + }); + return acc; }; Traverse.prototype.nodes = function () { - var acc = []; - this.forEach(function (x) { - acc.push(this.node); - }); - return acc; + var acc = []; + this.forEach(function () { + acc.push(this.node); + }); + return acc; }; Traverse.prototype.clone = function () { - var parents = [], nodes = []; - - return (function clone (src) { - for (var i = 0; i < parents.length; i++) { - if (parents[i] === src) { - return nodes[i]; - } - } - - if (typeof src === 'object' && src !== null) { - var dst = copy(src); - - parents.push(src); - nodes.push(dst); - - forEach(objectKeys(src), function (key) { - dst[key] = clone(src[key]); - }); - - parents.pop(); - nodes.pop(); - return dst; - } - else { - return src; - } - })(this.value); + var parents = []; + var nodes = []; + var options = this.options; + + if (whichTypedArray(this.value)) { + return taSlice(this.value); + } + + return (function clone(src) { + for (var i = 0; i < parents.length; i++) { + if (parents[i] === src) { + return nodes[i]; + } + } + + if (typeof src === 'object' && src !== null) { + var dst = copy(src, options); + + parents.push(src); + nodes.push(dst); + + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function (key) { + dst[key] = clone(src[key]); + }); + + parents.pop(); + nodes.pop(); + return dst; + } + + return src; + + }(this.value)); }; -function walk (root, cb, immutable) { - var path = []; - var parents = []; - var alive = true; - - return (function walker (node_) { - var node = immutable ? copy(node_) : node_; - var modifiers = {}; - - var keepGoing = true; - - var state = { - node : node, - node_ : node_, - path : [].concat(path), - parent : parents[parents.length - 1], - parents : parents, - key : path.slice(-1)[0], - isRoot : path.length === 0, - level : path.length, - circular : null, - update : function (x, stopHere) { - if (!state.isRoot) { - state.parent.node[state.key] = x; - } - state.node = x; - if (stopHere) keepGoing = false; - }, - 'delete' : function (stopHere) { - delete state.parent.node[state.key]; - if (stopHere) keepGoing = false; - }, - remove : function (stopHere) { - if (isArray(state.parent.node)) { - state.parent.node.splice(state.key, 1); - } - else { - delete state.parent.node[state.key]; - } - if (stopHere) keepGoing = false; - }, - keys : null, - before : function (f) { modifiers.before = f }, - after : function (f) { modifiers.after = f }, - pre : function (f) { modifiers.pre = f }, - post : function (f) { modifiers.post = f }, - stop : function () { alive = false }, - block : function () { keepGoing = false } - }; - - if (!alive) return state; - - function updateState() { - if (typeof state.node === 'object' && state.node !== null) { - if (!state.keys || state.node_ !== state.node) { - state.keys = objectKeys(state.node) - } - - state.isLeaf = state.keys.length == 0; - - for (var i = 0; i < parents.length; i++) { - if (parents[i].node_ === node_) { - state.circular = parents[i]; - break; - } - } - } - else { - state.isLeaf = true; - state.keys = null; - } - - state.notLeaf = !state.isLeaf; - state.notRoot = !state.isRoot; - } - - updateState(); - - // use return values to update if defined - var ret = cb.call(state, state.node); - if (ret !== undefined && state.update) state.update(ret); - - if (modifiers.before) modifiers.before.call(state, state.node); - - if (!keepGoing) return state; - - if (typeof state.node == 'object' - && state.node !== null && !state.circular) { - parents.push(state); - - updateState(); - - forEach(state.keys, function (key, i) { - path.push(key); - - if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); - - var child = walker(state.node[key]); - if (immutable && hasOwnProperty.call(state.node, key)) { - state.node[key] = child.node; - } - - child.isLast = i == state.keys.length - 1; - child.isFirst = i == 0; - - if (modifiers.post) modifiers.post.call(state, child); - - path.pop(); - }); - parents.pop(); - } - - if (modifiers.after) modifiers.after.call(state, state.node); - - return state; - })(root).node; +/** @type {(obj: object, options?: TraverseOptions) => Traverse} */ +function traverse(obj) { + var options = arguments.length > 1 ? arguments[1] : emptyNull; + return new Traverse(obj, options); } -function copy (src) { - if (typeof src === 'object' && src !== null) { - var dst; - - if (isArray(src)) { - dst = []; - } - else if (isDate(src)) { - dst = new Date(src.getTime ? src.getTime() : src); - } - else if (isRegExp(src)) { - dst = new RegExp(src); - } - else if (isError(src)) { - dst = { message: src.message }; - } - else if (isBoolean(src)) { - dst = new Boolean(src); - } - else if (isNumber(src)) { - dst = new Number(src); - } - else if (isString(src)) { - dst = new String(src); - } - else if (Object.create && Object.getPrototypeOf) { - dst = Object.create(Object.getPrototypeOf(src)); - } - else if (src.constructor === Object) { - dst = {}; - } - else { - var proto = - (src.constructor && src.constructor.prototype) - || src.__proto__ - || {} - ; - var T = function () {}; - T.prototype = proto; - dst = new T; - } - - forEach(objectKeys(src), function (key) { - dst[key] = src[key]; - }); - return dst; - } - else return src; -} - -var objectKeys = Object.keys || function keys (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; -}; - -function toS (obj) { return Object.prototype.toString.call(obj) } -function isDate (obj) { return toS(obj) === '[object Date]' } -function isRegExp (obj) { return toS(obj) === '[object RegExp]' } -function isError (obj) { return toS(obj) === '[object Error]' } -function isBoolean (obj) { return toS(obj) === '[object Boolean]' } -function isNumber (obj) { return toS(obj) === '[object Number]' } -function isString (obj) { return toS(obj) === '[object String]' } - -var isArray = Array.isArray || function isArray (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -var forEach = function (xs, fn) { - if (xs.forEach) return xs.forEach(fn) - else for (var i = 0; i < xs.length; i++) { - fn(xs[i], i, xs); - } -}; - -forEach(objectKeys(Traverse.prototype), function (key) { - traverse[key] = function (obj) { - var args = [].slice.call(arguments, 1); - var t = new Traverse(obj); - return t[key].apply(t, args); - }; +// TODO: replace with object.assign? +forEach(ownEnumerableKeys(Traverse.prototype), function (key) { + traverse[key] = function (obj) { + var args = [].slice.call(arguments, 1); + var t = new Traverse(obj); + return t[key].apply(t, args); + }; }); -var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { - return key in obj; +module.exports = traverse; + + +/***/ }), + +/***/ 6740: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var callBound = __webpack_require__(6798); + +var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true); + +var isTypedArray = __webpack_require__(2527); + +/** @type {import('.')} */ +// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter +module.exports = $typedArrayBuffer || function typedArrayBuffer(x) { + if (!isTypedArray(x)) { + throw new $TypeError('Not a Typed Array'); + } + return x.buffer; +}; + + +/***/ }), + +/***/ 6798: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(1634); + +var callBind = __webpack_require__(8388); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 8388: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7715); +var GetIntrinsic = __webpack_require__(1634); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 9003: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7715: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(9003); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 1634: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(263)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7715); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 263: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(9184); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 9184: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 7046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4843); +var callBind = __webpack_require__(2526); + +var typedArrays = __webpack_require__(4343)(); + +/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array} TypedArray */ +/** @typedef {(x: TypedArray) => number} ByteOffsetGetter */ + +/** @type {Object.} */ +var getters = {}; +var hasProto = __webpack_require__(1856)(); + +var gOPD = __webpack_require__(3828); +var oDP = Object.defineProperty; +if (gOPD) { + /** @type {ByteOffsetGetter} */ + var getByteOffset = function (x) { + return x.byteOffset; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof __webpack_require__.g[typedArray] === 'function' || typeof __webpack_require__.g[typedArray] === 'object') { + var Proto = __webpack_require__.g[typedArray].prototype; + // @ts-expect-error TS can't guarantee the callback is invoked sync + var descriptor = gOPD(Proto, 'byteOffset'); + if (!descriptor && hasProto) { + // @ts-expect-error hush, TS, every object has a dunder proto + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(superProto, 'byteOffset'); + } + // Opera 12.16 has a magic byteOffset data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic byteOffset data property + var arr = new __webpack_require__.g[typedArray](2); + // @ts-expect-error TS can't guarantee the callback is invoked sync + descriptor = gOPD(arr, 'byteOffset'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteOffset; + } + } + } + }); +} + +/** @type {ByteOffsetGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundOffset; + forEach(getters, /** @type {(getter: ByteOffsetGetter) => void} */ function (getter) { + if (typeof foundOffset !== 'number') { + try { + var offset = getter(value); + if (typeof offset === 'number') { + foundOffset = offset; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the callback is invoked sync + return foundOffset; +}; + +var isTypedArray = __webpack_require__(2527); + +/** @type {import('.')} */ +module.exports = function typedArrayByteOffset(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 2526: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(1530); +var GetIntrinsic = __webpack_require__(3699); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 1609: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 1530: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(1609); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 3699: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5162)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(1530); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5162: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(3903); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 3903: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 8150: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// / + +var callBind = __webpack_require__(4888); +var forEach = __webpack_require__(4843); +var gOPD = __webpack_require__(3828); +var hasProto = __webpack_require__(1856)(); +var isTypedArray = __webpack_require__(2527); +var typedArrays = __webpack_require__(131); + +/** @typedef {(value: import('.').TypedArray) => number} TypedArrayLengthGetter */ +/** @typedef {{ [k in `$${import('.').TypedArrayName}` | '__proto__']: k extends '__proto__' ? null : TypedArrayLengthGetter }} Cache */ + +/** @type {Cache} */ +// @ts-expect-error TS doesn't seem to have a "will eventually satisfy" type +var getters = { __proto__: null }; +var oDP = Object.defineProperty; +if (gOPD) { + var getLength = /** @type {TypedArrayLengthGetter} */ function (x) { + return x.length; + }; + forEach(typedArrays, /** @type {(typedArray: import('.').TypedArrayName) => void} */ function (typedArray) { + var TA = __webpack_require__.g[typedArray]; + // In Safari 7, Typed Array constructors are typeof object + if (typeof TA === 'function' || typeof TA === 'object') { + var Proto = TA.prototype; + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + var descriptor = gOPD(Proto, 'length'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(superProto, 'length'); + } + // Opera 12.16 has a magic length data property on instances AND on Proto + if (descriptor && descriptor.get) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic length data property + var arr = new __webpack_require__.g[typedArray](2); + // @ts-expect-error TS doesn't narrow types inside callbacks, which is weird + descriptor = gOPD(arr, 'length'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + // eslint-disable-next-line no-extra-parens + getters[/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)] = getLength; + } + } + } + }); +} + +/** @type {TypedArrayLengthGetter} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {number} */ var foundLength; + // @ts-expect-error not sure why this won't work + forEach(getters, /** @type {(getter: TypedArrayLengthGetter) => void} */ function (getter) { + if (typeof foundLength !== 'number') { + try { + var length = getter(value); + if (typeof length === 'number') { + foundLength = length; + } + } catch (e) {} + } + }); + // @ts-expect-error TS can't guarantee the above callback is invoked sync + return foundLength; +}; + +/** @type {import('.')} */ +module.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 4888: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(3576); +var GetIntrinsic = __webpack_require__(8031); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7380: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 3576: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7380); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 8031: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(307)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(3576); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 307: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(1766); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1766: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 4073: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var Get = __webpack_require__(3675); +var GetValueFromBuffer = __webpack_require__(9661); +var IsDetachedBuffer = __webpack_require__(1320); +var max = __webpack_require__(1367); +var min = __webpack_require__(2967); +var Set = __webpack_require__(8055); +var SetValueInBuffer = __webpack_require__(3383); +var ToIntegerOrInfinity = __webpack_require__(2897); +var ToString = __webpack_require__(7249); +var TypedArrayElementSize = __webpack_require__(9149); +var TypedArrayElementType = __webpack_require__(1586); +var TypedArraySpeciesCreate = __webpack_require__(817); +var ValidateTypedArray = __webpack_require__(3842); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); + +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice + +module.exports = function slice(start, end) { + var O = this; // step 1 + + ValidateTypedArray(O, 'SEQ-CST'); // step 2 + + // 3. Let len be O.[[ArrayLength]]. + var len = O.length; // steps 3 + + var relativeStart = ToIntegerOrInfinity(start); // step 4 + + var k; + if (relativeStart === -Infinity) { + k = 0; // step 5 + } else if (relativeStart < 0) { + k = max(len + relativeStart, 0); // step 6 + } else { + k = min(relativeStart, len); // step 7 + } + + var relativeEnd = typeof end === 'undefined' ? len : ToIntegerOrInfinity(end); // step 8 + + var final; + if (relativeEnd === -Infinity) { + final = 0; // step 9 + } else if (relativeEnd < 0) { + final = max(len + relativeEnd, 0); // step 10 + } else { + final = min(relativeEnd, len); // step 11 + } + + var count = max(final - k, 0); // step 12 + + var A = TypedArraySpeciesCreate(O, [count]); // step 13 + + if (count > 0) { // step 14 + if (IsDetachedBuffer(typedArrayBuffer(O))) { + throw new $TypeError('Cannot use a Typed Array with an underlying ArrayBuffer that is detached'); // step 14.a + } + var srcType = TypedArrayElementType(O); // step 14.b + var targetType = TypedArrayElementType(A); // step 14.c + if (srcType === targetType) { // step 14.d + // 1. NOTE: The transfer must be performed in a manner that preserves the bit-level encoding of the source data. + var srcBuffer = typedArrayBuffer(O); // step 14.d.ii + var targetBuffer = typedArrayBuffer(A); // step 14.d.iii + var elementSize = TypedArrayElementSize(O); // step 14.d.iv + var srcByteOffset = typedArrayByteOffset(O); // step 14.d.v + var srcByteIndex = (k * elementSize) + srcByteOffset; // step 14.d.vi + var targetByteIndex = typedArrayByteOffset(A); // step 14.d.vii + var limit = targetByteIndex + (count * elementSize); // step 14.d.viii + while (targetByteIndex < limit) { // step 14.d.ix + var value = GetValueFromBuffer(srcBuffer, srcByteIndex, 'UINT8', true, 'UNORDERED'); // step 14.d.ix.1 + SetValueInBuffer(targetBuffer, targetByteIndex, 'UINT8', value, true, 'UNORDERED'); // step 14.d.ix.2 + srcByteIndex += 1; // step 14.d.ix.3 + targetByteIndex += 1; // step 14.d.ix.4 + } + } else { // step 14.e + var n = 0; // step 14.e.i + while (k < final) { // step 14.e.ii + var Pk = ToString(k); // step 14.e.ii.1 + var kValue = Get(O, Pk); // step 14.e.ii.2 + Set(A, ToString(n), kValue, true); // step 14.e.ii.3 + k += 1; // step 14.e.ii.4 + n += 1; // step 14.e.ii.5 + } + } + } + + return A; // step 15 +}; + + +/***/ }), + +/***/ 1140: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var callBind = __webpack_require__(8374); + +var implementation = __webpack_require__(4073); +var getPolyfill = __webpack_require__(5046); +var shim = __webpack_require__(8564); + +var bound = callBind(getPolyfill()); + +define(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; + + +/***/ }), + +/***/ 1154: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var callBind = __webpack_require__(8374); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 8374: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(8474); +var GetIntrinsic = __webpack_require__(682); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 6776: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__(806); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var defineDataProperty = __webpack_require__(2656); + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var supportsDescriptors = __webpack_require__(8198)(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ 6118: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $defineProperty = __webpack_require__(8918); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + return !!$defineProperty; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 2855: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8474: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(2855); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 682: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(5314)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8474); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 5314: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(6188); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 6188: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6841: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = reflectApply + ? function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } + : function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); + }; + + +/***/ }), + +/***/ 589: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(1154); + +var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +/** @type {import('.')} */ +module.exports = $byteLength + ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } + : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; + + +/***/ }), + +/***/ 5726: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = __webpack_require__(5794); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other + /* eslint-env browser */ + if (typeof window !== 'undefined' && obj === window) { + return '{ [object Window] }'; + } + if (obj === __webpack_require__.g) { + return '{ [object globalThis] }'; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + + +/***/ }), + +/***/ 3786: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var RequireObjectCoercible = __webpack_require__(7998); +var ToString = __webpack_require__(7249); +var callBound = __webpack_require__(1154); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var leftWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +var rightWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trim() { + var S = ToString(RequireObjectCoercible(this)); + return $replace($replace(S, leftWhitespace, ''), rightWhitespace, ''); +}; + + +/***/ }), + +/***/ 6368: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(8374); +var define = __webpack_require__(6776); +var RequireObjectCoercible = __webpack_require__(7998); + +var implementation = __webpack_require__(3786); +var getPolyfill = __webpack_require__(3040); +var shim = __webpack_require__(4695); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; + + +/***/ }), + +/***/ 3040: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3786); + +var zeroWidthSpace = '\u200b'; +var mongolianVowelSeparator = '\u180E'; + +module.exports = function getPolyfill() { + if ( + String.prototype.trim + && zeroWidthSpace.trim() === zeroWidthSpace + && mongolianVowelSeparator.trim() === mongolianVowelSeparator + && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator) + && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_') + ) { + return String.prototype.trim; + } + return implementation; +}; + + +/***/ }), + +/***/ 4695: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var getPolyfill = __webpack_require__(3040); + +module.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + define(String.prototype, { trim: polyfill }, { + trim: function testTrim() { + return String.prototype.trim !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ 5046: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(4073); + +module.exports = function getPolyfill() { + return (typeof Uint8Array === 'function' && Uint8Array.prototype.slice) || implementation; +}; + + +/***/ }), + +/***/ 8564: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(6776); +var getProto = __webpack_require__(9495); + +var getPolyfill = __webpack_require__(5046); + +module.exports = function shimTypedArraySlice() { + if (typeof Uint8Array === 'function') { + var polyfill = getPolyfill(); + var proto = getProto(Uint8Array.prototype); + define( + proto, + { slice: polyfill }, + { slice: function () { return proto.slice !== polyfill; } } + ); + } + + return polyfill; +}; + + +/***/ }), + +/***/ 4010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4843); +var availableTypedArrays = __webpack_require__(4343); +var callBind = __webpack_require__(4899); +var callBound = __webpack_require__(7120); +var gOPD = __webpack_require__(3828); + +/** @type {(O: object) => string} */ +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = __webpack_require__(2346)(); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; +var typedArrays = availableTypedArrays(); + +var $slice = callBound('String.prototype.slice'); +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); + +/** @type {(array: readonly T[], value: unknown) => number} */ +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; + +/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */ +/** @type {{ [k in `\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */ +var cache = { __proto__: null }; +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + // @ts-expect-error TS won't narrow inside a closure + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + // @ts-expect-error TS won't narrow inside a closure + descriptor = gOPD(superProto, Symbol.toStringTag); + } + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(descriptor.get); + } + }); +} else { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + // @ts-expect-error TODO: fix + cache['$' + typedArray] = callBind(fn); + } + }); +} + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var tryTypedArrays = function tryAllTypedArrays(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */ + function (getter, typedArray) { + if (!found) { + try { + // @ts-expect-error TODO: fix + if ('$' + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {(value: object) => false | import('.').TypedArrayName} */ +var trySlices = function tryAllSlices(value) { + /** @type {ReturnType} */ var found = false; + forEach( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache), + /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) { + if (!found) { + try { + // @ts-expect-error TODO: fix + getter(value); + found = $slice(name, 1); + } catch (e) { /**/ } + } + } + ); + return found; +}; + +/** @type {import('.')} */ +module.exports = function whichTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag) { + /** @type {string} */ + var tag = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag) > -1) { + return tag; + } + if (tag !== 'Object') { + return false; + } + // node < 0.6 hits here on real Typed Arrays + return trySlices(value); + } + if (!gOPD) { return null; } // unknown engine + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 7120: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(6883); + +var callBind = __webpack_require__(4899); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 4899: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(7961); +var GetIntrinsic = __webpack_require__(6883); +var setFunctionLength = __webpack_require__(4521); + +var $TypeError = __webpack_require__(1642); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = __webpack_require__(8918); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 7562: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7961: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7562); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 6883: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(6716); +var $EvalError = __webpack_require__(6788); +var $RangeError = __webpack_require__(9204); +var $ReferenceError = __webpack_require__(9908); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $URIError = __webpack_require__(1451); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(8861)(); +var hasProto = __webpack_require__(1856)(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(7961); +var hasOwn = __webpack_require__(9429); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 8861: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(704); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 704: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 2346: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = __webpack_require__(704); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; }; @@ -2668,6 +13065,2980 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) { "use strict"; module.exports = window["React"]; +/***/ }), + +/***/ 5794: +/***/ (function() { + +/* (ignored) */ + +/***/ }), + +/***/ 4343: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var possibleNames = __webpack_require__(131); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; + +/** @type {import('.')} */ +module.exports = function availableTypedArrays() { + var /** @type {ReturnType} */ out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === 'function') { + // @ts-expect-error + out[out.length] = possibleNames[i]; + } + } + return out; +}; + + +/***/ }), + +/***/ 2981: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +// https://tc39.es/ecma262/#sec-arraybufferbytelength + +var IsDetachedBuffer = __webpack_require__(1320); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(589); +var arrayBufferByteLength = __webpack_require__(480); + +var isGrowable = false; // TODO: support this + +module.exports = function ArrayBufferByteLength(arrayBuffer, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + // 1. If IsSharedArrayBuffer(arrayBuffer) is true and arrayBuffer has an [[ArrayBufferByteLengthData]] internal slot, then + // TODO: see if IsFixedLengthArrayBuffer can be used here in the spec instead + if (isSAB && isGrowable) { // step 1 + // a. Let bufferByteLengthBlock be arrayBuffer.[[ArrayBufferByteLengthData]]. + // b. Let rawLength be GetRawBytesFromSharedBlock(bufferByteLengthBlock, 0, BIGUINT64, true, order). + // c. Let isLittleEndian be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record. + // d. Return ℝ(RawBytesToNumeric(BIGUINT64, rawLength, isLittleEndian)). + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must not be detached'); // step 2 + } + + return arrayBufferByteLength(arrayBuffer); +}; + + +/***/ }), + +/***/ 6548: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = __webpack_require__(9204); +var $TypeError = __webpack_require__(1642); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (typeof n !== 'bigint' || typeof d !== 'bigint') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; + + +/***/ }), + +/***/ 9002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var isPropertyDescriptor = __webpack_require__(6862); +var DefineOwnProperty = __webpack_require__(208); + +var FromPropertyDescriptor = __webpack_require__(8367); +var IsDataDescriptor = __webpack_require__(4065); +var IsPropertyKey = __webpack_require__(9762); +var SameValue = __webpack_require__(3392); +var ToPropertyDescriptor = __webpack_require__(8110); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; + + +/***/ }), + +/***/ 8367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var isPropertyDescriptor = __webpack_require__(6862); +var fromPropertyDescriptor = __webpack_require__(2646); + +// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor'); + } + + return fromPropertyDescriptor(Desc); +}; + + +/***/ }), + +/***/ 3675: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var inspect = __webpack_require__(5726); + +var IsPropertyKey = __webpack_require__(9762); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; + + +/***/ }), + +/***/ 9661: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var callBound = __webpack_require__(1154); + +var $slice = callBound('Array.prototype.slice'); + +var isInteger = __webpack_require__(6156); + +var IsDetachedBuffer = __webpack_require__(1320); +var RawBytesToNumeric = __webpack_require__(9219); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(589); +var safeConcat = __webpack_require__(3002); + +var tableTAO = __webpack_require__(2170); + +var defaultEndianness = __webpack_require__(2142); + +// https://262.ecma-international.org/15.0/#sec-getvaluefrombuffer + +module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex)) { + throw new $TypeError('Assertion failed: `byteIndex` must be an integer'); + } + + if (typeof type !== 'string' || typeof tableTAO.size['$' + type] !== 'number') { + throw new $TypeError('Assertion failed: `type` must be a Typed Array element type'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`'); + } + + if (arguments.length > 5 && typeof arguments[5] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3 + } + + // 4. Let block be arrayBuffer.[[ArrayBufferData]]. + + var elementSize = tableTAO.size['$' + type]; // step 5 + if (!elementSize) { + throw new $TypeError('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"'); + } + + var rawValue; + if (isSAB) { // step 6 + /* + a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier(). + c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false. + d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values. + e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency. + f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }. + g. Append readEvent to eventList. + h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]]. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex]. + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6 + } + + // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation. + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8 + + var bytes = isLittleEndian + ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) + : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + + return RawBytesToNumeric(type, bytes, isLittleEndian); +}; + + +/***/ }), + +/***/ 5584: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var IsPropertyKey = __webpack_require__(9762); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return hasOwn(O, P); +}; + + +/***/ }), + +/***/ 2985: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// https://262.ecma-international.org/6.0/#sec-isarray +module.exports = __webpack_require__(692); + + +/***/ }), + +/***/ 4734: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BIGUINT64' || type === 'BIGINT64'; +}; + + +/***/ }), + +/***/ 3071: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = __webpack_require__(6841); + + +/***/ }), + +/***/ 7010: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(4342); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = __webpack_require__(9002); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://262.ecma-international.org/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} + + +/***/ }), + +/***/ 4065: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var isPropertyDescriptor = __webpack_require__(6862); + +// https://262.ecma-international.org/5.1/#sec-8.10.2 + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor'); + } + + if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; + + +/***/ }), + +/***/ 1320: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var $byteLength = __webpack_require__(480); +var availableTypedArrays = __webpack_require__(4343)(); +var callBound = __webpack_require__(1154); +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(589); + +var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +// https://262.ecma-international.org/8.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) { + try { + new __webpack_require__.g[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return !!error && error.name === 'TypeError'; + } + } + return false; +}; + + +/***/ }), + +/***/ 9442: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var callBound = __webpack_require__(1154); + +var $arrayBufferResizable = callBound('%ArrayBuffer.prototype.resizable%', true); +var $sharedArrayGrowable = callBound('%SharedArrayBuffer.prototype.growable%', true); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(589); + +// https://262.ecma-international.org/15.0/#sec-isfixedlengtharraybuffer + +module.exports = function IsFixedLengthArrayBuffer(arrayBuffer) { + var isAB = isArrayBuffer(arrayBuffer); + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isAB && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer'); + } + + if (isAB && $arrayBufferResizable) { + return !$arrayBufferResizable(arrayBuffer); // step 1 + } + if (isSAB && $sharedArrayGrowable) { + return !$sharedArrayGrowable(arrayBuffer); // step 1 + } + return true; // step 2 +}; + + +/***/ }), + +/***/ 9762: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; + + +/***/ }), + +/***/ 9954: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsDetachedBuffer = __webpack_require__(1320); +var TypedArrayElementSize = __webpack_require__(9149); + +var isTypedArrayWithBufferWitnessRecord = __webpack_require__(359); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); +var typedArrayLength = __webpack_require__(8150); + +// https://tc39.es/ecma262/#sec-istypedarrayoutofbounds + +module.exports = function IsTypedArrayOutOfBounds(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record'); + } + + var O = taRecord['[[Object]]']; // step 1 + + var bufferByteLength = taRecord['[[CachedBufferByteLength]]']; // step 2 + + if (IsDetachedBuffer(typedArrayBuffer(O)) && bufferByteLength !== 'DETACHED') { + throw new $TypeError('Assertion failed: typed array is detached only if the byte length is ~DETACHED~'); // step 3 + } + + if (bufferByteLength === 'DETACHED') { + return true; // step 4 + } + + var byteOffsetStart = typedArrayByteOffset(O); // step 5 + + var byteOffsetEnd; + var length = typedArrayLength(O); + // TODO: probably use package for array length + // seems to apply when TA is backed by a resizable/growable AB + if (length === 'AUTO') { // step 6 + byteOffsetEnd = bufferByteLength; // step 6.a + } else { + var elementSize = TypedArrayElementSize(O); // step 7.a + + byteOffsetEnd = byteOffsetStart + (length * elementSize); // step 7.b + } + + if (byteOffsetStart > bufferByteLength || byteOffsetEnd > bufferByteLength) { + return true; // step 8 + } + + // 9. NOTE: 0-length TypedArrays are not considered out-of-bounds. + + return false; // step 10 +}; + + +/***/ }), + +/***/ 7551: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'UINT8' + || type === 'UINT8C' + || type === 'UINT16' + || type === 'UINT32' + || type === 'BIGUINT64'; +}; + + +/***/ }), + +/***/ 6005: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var ArrayBufferByteLength = __webpack_require__(2981); +var IsDetachedBuffer = __webpack_require__(1320); + +var isTypedArray = __webpack_require__(2527); +var typedArrayBuffer = __webpack_require__(6740); + +// https://tc39.es/ecma262/#sec-maketypedarraywithbufferwitnessrecord + +module.exports = function MakeTypedArrayWithBufferWitnessRecord(obj, order) { + if (!isTypedArray(obj)) { + throw new $TypeError('Assertion failed: `obj` must be a Typed Array'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + var buffer = typedArrayBuffer(obj); // step 1 + + var byteLength = IsDetachedBuffer(buffer) ? 'DETACHED' : ArrayBufferByteLength(buffer, order); // steps 2 - 3 + + return { '[[Object]]': obj, '[[CachedBufferByteLength]]': byteLength }; // step 4 +}; + + +/***/ }), + +/***/ 4604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwnProperty = __webpack_require__(5584); +var ToBigInt64 = __webpack_require__(1242); +var ToBigUint64 = __webpack_require__(2947); +var ToInt16 = __webpack_require__(3181); +var ToInt32 = __webpack_require__(2587); +var ToInt8 = __webpack_require__(5562); +var ToUint16 = __webpack_require__(5465); +var ToUint32 = __webpack_require__(5964); +var ToUint8 = __webpack_require__(9496); +var ToUint8Clamp = __webpack_require__(6550); + +var valueToFloat32Bytes = __webpack_require__(3647); +var valueToFloat64Bytes = __webpack_require__(7511); +var integerToNBytes = __webpack_require__(1520); + +var keys = __webpack_require__(806); + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + INT8: 1, + UINT8: 1, + UINT8C: 1, + INT16: 2, + UINT16: 2, + INT32: 4, + UINT32: 4, + BIGINT64: 8, + BIGUINT64: 8, + FLOAT32: 4, + FLOAT64: 8 +}; + +var TypeToAO = { + __proto__: null, + INT8: ToInt8, + UINT8: ToUint8, + UINT8C: ToUint8Clamp, + INT16: ToInt16, + UINT16: ToUint16, + INT32: ToInt32, + UINT32: ToUint32, + BIGINT64: ToBigInt64, + BIGUINT64: ToBigUint64 +}; + +// https://262.ecma-international.org/15.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (typeof isLittleEndian !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + if (type === 'FLOAT32') { // step 1 + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === 'FLOAT64') { // step 2 + return valueToFloat64Bytes(value, isLittleEndian); + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4 +}; + + +/***/ }), + +/***/ 9219: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); +var callBound = __webpack_require__(1154); + +var $RangeError = __webpack_require__(9204); +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = __webpack_require__(5584); +var IsArray = __webpack_require__(2985); +var IsBigIntElementType = __webpack_require__(4734); +var IsUnsignedElementType = __webpack_require__(7551); + +var bytesAsFloat32 = __webpack_require__(8727); +var bytesAsFloat64 = __webpack_require__(7604); +var bytesAsInteger = __webpack_require__(2367); +var every = __webpack_require__(8172); +var isByteValue = __webpack_require__(1824); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = __webpack_require__(806); + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + INT8: 1, + UINT8: 1, + UINT8C: 1, + INT16: 2, + UINT16: 2, + INT32: 4, + UINT32: 4, + BIGINT64: 8, + BIGUINT64: 8, + FLOAT32: 4, + FLOAT64: 8 +}; + +// https://262.ecma-international.org/15.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (typeof isLittleEndian !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); // step 2 + } + + if (type === 'FLOAT32') { // step 3 + return bytesAsFloat32(rawBytes); + } + + if (type === 'FLOAT64') { // step 4 + return bytesAsFloat64(rawBytes); + } + + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); +}; + + +/***/ }), + +/***/ 3392: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = __webpack_require__(9404); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; + + +/***/ }), + +/***/ 8055: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsPropertyKey = __webpack_require__(9762); +var SameValue = __webpack_require__(3392); +var Type = __webpack_require__(9655); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (typeof Throw !== 'boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; + + +/***/ }), + +/***/ 3383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); + +var isInteger = __webpack_require__(6156); + +var IsBigIntElementType = __webpack_require__(4734); +var IsDetachedBuffer = __webpack_require__(1320); +var NumericToRawBytes = __webpack_require__(4604); + +var isArrayBuffer = __webpack_require__(4602); +var isSharedArrayBuffer = __webpack_require__(589); +var has = __webpack_require__(9429); + +var tableTAO = __webpack_require__(2170); + +var defaultEndianness = __webpack_require__(2142); +var forEach = __webpack_require__(9065); + +// https://262.ecma-international.org/15.0/#sec-setvalueinbuffer + +/* eslint max-params: 0 */ + +module.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer'); + } + + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError('Assertion failed: `byteIndex` must be a non-negative integer'); + } + + if (typeof type !== 'string' || !has(tableTAO.size, '$' + type)) { + throw new $TypeError('Assertion failed: `type` must be a Typed Array Element Type'); + } + + if (typeof value !== 'number' && typeof value !== 'bigint') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + + if (typeof isTypedArray !== 'boolean') { + throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean'); + } + if (order !== 'SEQ-CST' && order !== 'UNORDERED' && order !== 'INIT') { + throw new $TypeError('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`'); + } + + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present'); + } + + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: ArrayBuffer is detached'); // step 1 + } + + // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type. + + if (IsBigIntElementType(type) ? typeof value !== 'bigint' : typeof value !== 'number') { // step 3 + throw new $TypeError('Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number'); + } + + // 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot. + + var elementSize = tableTAO.size['$' + type]; // step 5 + + // 6. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the GetValueFromBuffer abstract operation. + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === 'little'; // step 6 + + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); // step 7 + + if (isSAB) { // step 8 + /* + Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record. + Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier(). + If isTypedArray is true and IsNoTearConfiguration(type, order) is true, let noTear be true; otherwise let noTear be false. + Append WriteSharedMemory { [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize, [[Payload]]: rawBytes } to eventList. + */ + throw new $SyntaxError('SharedArrayBuffer is not supported by this implementation'); + } else { + // 9. Store the individual bytes of rawBytes into block, in order, starting at block[byteIndex]. + var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function (rawByte, i) { + arr[i] = rawByte; + }); + } + + // 10. Return NormalCompletion(undefined). +}; + + +/***/ }), + +/***/ 5994: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = __webpack_require__(1642); + +var IsConstructor = __webpack_require__(7010); +var Type = __webpack_require__(9655); + +// https://262.ecma-international.org/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; + + +/***/ }), + +/***/ 907: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = __webpack_require__(1642); +var $SyntaxError = __webpack_require__(6724); + +// https://262.ecma-international.org/14.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return void undefined; + } +}; + + +/***/ }), + +/***/ 4967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $TypeError = __webpack_require__(1642); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = __webpack_require__(1154); +var regexTester = __webpack_require__(1312); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +var $trim = __webpack_require__(6368); + +// https://262.ecma-international.org/13.0/#sec-stringtonumber + +module.exports = function StringToNumber(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('Assertion failed: `argument` is not a String'); + } + if (isBinary(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 2)); + } + if (isOctal(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 8)); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return $Number(argument); +}; + + +/***/ }), + +/***/ 9752: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = __webpack_require__(1642); +var $SyntaxError = __webpack_require__(6724); + +var StringToBigInt = __webpack_require__(907); +var ToPrimitive = __webpack_require__(210); + +// https://262.ecma-international.org/13.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (prim == null) { + throw new $TypeError('Cannot convert null or undefined to a BigInt'); + } + + if (typeof prim === 'boolean') { + return prim ? $BigInt(1) : $BigInt(0); + } + + if (typeof prim === 'number') { + throw new $TypeError('Cannot convert a Number value to a BigInt'); + } + + if (typeof prim === 'string') { + var n = StringToBigInt(prim); + if (typeof n === 'undefined') { + throw new $TypeError('Failed to parse String to BigInt'); + } + return n; + } + + if (typeof prim === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a BigInt'); + } + + if (typeof prim !== 'bigint') { + throw new $SyntaxError('Assertion failed: unknown primitive type'); + } + + return prim; +}; + + +/***/ }), + +/***/ 1242: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = __webpack_require__(9752); +var BigIntRemainder = __webpack_require__(6548); + +var modBigInt = __webpack_require__(8626); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; + + +/***/ }), + +/***/ 2947: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = __webpack_require__(9752); +var BigIntRemainder = __webpack_require__(6548); + +var modBigInt = __webpack_require__(8626); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; + + +/***/ }), + +/***/ 6440: +/***/ (function(module) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; + + +/***/ }), + +/***/ 3181: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint16 + +var two16 = 0x10000; // Math.pow(2, 16); + +module.exports = function ToInt16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit >= 0x8000 ? int16bit - two16 : int16bit; +}; + + +/***/ }), + +/***/ 2587: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint32 + +var two31 = 0x80000000; // Math.pow(2, 31); +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToInt32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + var result = int32bit >= two31 ? int32bit - two32 : int32bit; + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 5562: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; + + +/***/ }), + +/***/ 2897: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var $isNaN = __webpack_require__(9404); +var $isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + return truncate(number); +}; + + +/***/ }), + +/***/ 3438: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $TypeError = __webpack_require__(1642); +var $Number = GetIntrinsic('%Number%'); +var isPrimitive = __webpack_require__(4968); + +var ToPrimitive = __webpack_require__(210); +var StringToNumber = __webpack_require__(4967); + +// https://262.ecma-international.org/13.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + return StringToNumber(value); + } + return $Number(value); +}; + + +/***/ }), + +/***/ 210: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toPrimitive = __webpack_require__(5249); + +// https://262.ecma-international.org/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; + + +/***/ }), + +/***/ 8110: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasOwn = __webpack_require__(9429); + +var $TypeError = __webpack_require__(1642); + +var Type = __webpack_require__(9655); +var ToBoolean = __webpack_require__(6440); +var IsCallable = __webpack_require__(3071); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (hasOwn(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (hasOwn(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (hasOwn(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((hasOwn(desc, '[[Get]]') || hasOwn(desc, '[[Set]]')) && (hasOwn(desc, '[[Value]]') || hasOwn(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; + + +/***/ }), + +/***/ 7249: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $String = GetIntrinsic('%String%'); +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; + + +/***/ }), + +/***/ 5465: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-touint16 + +var two16 = 0x10000; // Math.pow(2, 16) + +module.exports = function ToUint16(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit === 0 ? 0 : int16bit; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 5964: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +var isFinite = __webpack_require__(7991); + +// https://262.ecma-international.org/14.0/#sec-touint32 + +var two32 = 0x100000000; // Math.pow(2, 32); + +module.exports = function ToUint32(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + return int32bit === 0 ? 0 : int32bit; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 9496: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isFinite = __webpack_require__(7991); + +var modulo = __webpack_require__(8457); +var ToNumber = __webpack_require__(3438); +var truncate = __webpack_require__(736); + +// https://262.ecma-international.org/14.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if (!isFinite(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 0x100); + return int8bit; +}; + + +/***/ }), + +/***/ 6550: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var clamp = __webpack_require__(3832); + +var ToNumber = __webpack_require__(3438); +var floor = __webpack_require__(3473); + +var $isNaN = __webpack_require__(9404); + +// https://262.ecma-international.org/15.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); // step 1 + + if ($isNaN(number)) { return 0; } // step 2 + + var clamped = clamp(number, 0, 255); // step 4 + + var f = floor(clamped); // step 5 + + if (clamped < (f + 0.5)) { return f; } // step 6 + + if (clamped > (f + 0.5)) { return f + 1; } // step 7 + + return f % 2 === 0 ? f : f + 1; // step 8 +}; + + +/***/ }), + +/***/ 9655: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var ES5Type = __webpack_require__(1528); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; + + +/***/ }), + +/***/ 7265: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var IsArray = __webpack_require__(2985); +var IsConstructor = __webpack_require__(7010); +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var TypedArrayLength = __webpack_require__(8921); +var ValidateTypedArray = __webpack_require__(3842); + +var availableTypedArrays = __webpack_require__(4343)(); + +// https://262.ecma-international.org/15.0/#typedarraycreatefromconstructor + +module.exports = function TypedArrayCreateFromConstructor(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + // var newTypedArray = Construct(constructor, argumentList); // step 1 + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + + var taRecord = ValidateTypedArray(newTypedArray, 'SEQ-CST'); // step 2 + + if (argumentList.length === 1 && typeof argumentList[0] === 'number') { // step 3 + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('new Typed Array is out of bounds'); // step 3.a + } + var length = TypedArrayLength(taRecord); // step 3.b + if (length < argumentList[0]) { + throw new $TypeError('`argumentList[0]` must be <= `newTypedArray.length`'); // step 3.c + } + } + + return newTypedArray; // step 4 +}; + + +/***/ }), + +/***/ 9149: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var isInteger = __webpack_require__(6156); + +var whichTypedArray = __webpack_require__(4010); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize + +var tableTAO = __webpack_require__(2170); + +module.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var size = tableTAO.size['$' + tableTAO.name['$' + type]]; + if (!isInteger(size) || size < 0) { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return size; +}; + + +/***/ }), + +/***/ 1586: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var whichTypedArray = __webpack_require__(4010); + +// https://262.ecma-international.org/15.0/#sec-typedarrayelementtype + +var tableTAO = __webpack_require__(2170); + +module.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var result = tableTAO.name['$' + type]; + if (typeof result !== 'string') { + throw new $SyntaxError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return result; +}; + + +/***/ }), + +/***/ 8921: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var floor = __webpack_require__(3473); +var IsFixedLengthArrayBuffer = __webpack_require__(9442); +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var TypedArrayElementSize = __webpack_require__(9149); + +var isTypedArrayWithBufferWitnessRecord = __webpack_require__(359); + +var typedArrayBuffer = __webpack_require__(6740); +var typedArrayByteOffset = __webpack_require__(7046); +var typedArrayLength = __webpack_require__(8150); + +// http://www.ecma-international.org/ecma-262/15.0/#sec-typedarraylength + +module.exports = function TypedArrayLength(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record'); + } + + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('Assertion failed: `taRecord` is out of bounds'); // step 1 + } + + var O = taRecord['[[Object]]']; // step 2 + + var length = typedArrayLength(O); + if (length !== 'AUTO') { + return length; // step 3 + } + + if (IsFixedLengthArrayBuffer(typedArrayBuffer(O))) { + throw new $TypeError('Assertion failed: array buffer is not fixed length'); // step 4 + } + + var byteOffset = typedArrayByteOffset(O); // step 5 + + var elementSize = TypedArrayElementSize(O); // step 6 + + var byteLength = taRecord['[[CachedBufferByteLength]]']; // step 7 + + if (byteLength === 'DETACHED') { + throw new $TypeError('Assertion failed: typed array is detached'); // step 8 + } + + return floor((byteLength - byteOffset) / elementSize); // step 9 +}; + + +/***/ }), + +/***/ 817: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $SyntaxError = __webpack_require__(6724); +var $TypeError = __webpack_require__(1642); + +var whichTypedArray = __webpack_require__(4010); +var availableTypedArrays = __webpack_require__(4343)(); + +var IsArray = __webpack_require__(2985); +var SpeciesConstructor = __webpack_require__(5994); +var TypedArrayCreateFromConstructor = __webpack_require__(7265); + +var getConstructor = __webpack_require__(9660); + +// https://262.ecma-international.org/15.0/#typedarray-species-create + +module.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError('Assertion failed: Typed Arrays are not supported in this environment'); + } + + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError('Assertion failed: exemplar must be a TypedArray'); // step 1 + } + if (!IsArray(argumentList)) { + throw new $TypeError('Assertion failed: `argumentList` must be a List'); // step 1 + } + + var defaultConstructor = getConstructor(kind); // step 2 + if (typeof defaultConstructor !== 'function') { + throw new $SyntaxError('Assertion failed: `constructor` of `exemplar` (' + kind + ') must exist. Please report this!'); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); // step 3 + + return TypedArrayCreateFromConstructor(constructor, argumentList); // step 4 +}; + + +/***/ }), + +/***/ 3842: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var IsTypedArrayOutOfBounds = __webpack_require__(9954); +var MakeTypedArrayWithBufferWitnessRecord = __webpack_require__(6005); +var Type = __webpack_require__(9655); + +var isTypedArray = __webpack_require__(2527); + +// https://262.ecma-international.org/15.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O, order) { + if (order !== 'SEQ-CST' && order !== 'UNORDERED') { + throw new $TypeError('Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~'); + } + + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); // step 1 + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: `O` must be a Typed Array'); // steps 1 - 2 + } + + var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, order); // step 3 + + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError('`O` must be in-bounds and backed by a non-detached buffer'); // step 4 + } + + return taRecord; // step 5 +}; + + +/***/ }), + +/***/ 3832: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $TypeError = __webpack_require__(1642); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (typeof x !== 'number' || typeof lower !== 'number' || typeof upper !== 'number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; + + +/***/ }), + +/***/ 3473: +/***/ (function(module) { + +"use strict"; + + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (typeof x === 'bigint') { + return x; + } + return $floor(x); +}; + + +/***/ }), + +/***/ 1367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); + + +/***/ }), + +/***/ 2967: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); + + +/***/ }), + +/***/ 8457: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var mod = __webpack_require__(2076); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; + + +/***/ }), + +/***/ 2170: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/15.0/#table-the-typedarray-constructors + +module.exports = { + __proto__: null, + name: { + __proto__: null, + $Int8Array: 'INT8', + $Uint8Array: 'UINT8', + $Uint8ClampedArray: 'UINT8C', + $Int16Array: 'INT16', + $Uint16Array: 'UINT16', + $Int32Array: 'INT32', + $Uint32Array: 'UINT32', + $BigInt64Array: 'BIGINT64', + $BigUint64Array: 'BIGUINT64', + $Float32Array: 'FLOAT32', + $Float64Array: 'FLOAT64' + }, + size: { + __proto__: null, + $INT8: 1, + $UINT8: 1, + $UINT8C: 1, + $INT16: 2, + $UINT16: 2, + $INT32: 4, + $UINT32: 4, + $BIGINT64: 8, + $BIGUINT64: 8, + $FLOAT32: 4, + $FLOAT64: 8 + } +}; + + +/***/ }), + +/***/ 736: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var floor = __webpack_require__(3473); + +var $TypeError = __webpack_require__(1642); + +// https://262.ecma-international.org/14.0/#eqn-truncate + +module.exports = function truncate(x) { + if (typeof x !== 'number' && typeof x !== 'bigint') { + throw new $TypeError('argument must be a Number or a BigInt'); + } + var result = x < 0 ? -floor(-x) : floor(x); + return result === 0 ? 0 : result; // in the spec, these are math values, so we filter out -0 here +}; + + +/***/ }), + +/***/ 1528: +/***/ (function(module) { + +"use strict"; + + +// https://262.ecma-international.org/5.1/#sec-8 + +module.exports = function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } +}; + + +/***/ }), + +/***/ 4342: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// TODO: remove, semver-major + +module.exports = __webpack_require__(682); + + +/***/ }), + +/***/ 208: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasPropertyDescriptors = __webpack_require__(6118); + +var $defineProperty = __webpack_require__(8918); + +var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + +// eslint-disable-next-line global-require +var isArray = hasArrayLengthDefineBug && __webpack_require__(692); + +var callBound = __webpack_require__(1154); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +// eslint-disable-next-line max-params +module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) { + if (!$defineProperty) { + if (!IsDataDescriptor(desc)) { + // ES3 does not support getters/setters + return false; + } + if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) { + return false; + } + + // fallback for ES3 + if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) { + // a non-enumerable existing property + return false; + } + + // property does not exist at all, or exists but is enumerable + var V = desc['[[Value]]']; + // eslint-disable-next-line no-param-reassign + O[P] = V; // will use [[Define]] + return SameValue(O[P], V); + } + if ( + hasArrayLengthDefineBug + && P === 'length' + && '[[Value]]' in desc + && isArray(O) + && O.length !== desc['[[Value]]'] + ) { + // eslint-disable-next-line no-param-reassign + O.length = desc['[[Value]]']; + return O.length === desc['[[Value]]']; + } + + $defineProperty(O, P, FromPropertyDescriptor(desc)); + return true; +}; + + +/***/ }), + +/***/ 692: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Array = GetIntrinsic('%Array%'); + +// eslint-disable-next-line global-require +var toStr = !$Array.isArray && __webpack_require__(1154)('Object.prototype.toString'); + +module.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; +}; + + +/***/ }), + +/***/ 8727: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat32(rawBytes) { + // return new $Float32Array(new $Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[3] & 0x80 ? -1 : 1; // Check the sign bit + var exponent = ((rawBytes[3] & 0x7F) << 1) + | (rawBytes[2] >> 7); // Combine bits for exponent + var mantissa = ((rawBytes[2] & 0x7F) << 16) + | (rawBytes[1] << 8) + | rawBytes[0]; // Combine bits for mantissa + + if (exponent === 0 && mantissa === 0) { + return sign === 1 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 1 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + if (exponent === -127) { + return sign * mantissa * $pow(2, -126 - 23); + } + return sign * (1 + (mantissa * $pow(2, -23))) * $pow(2, exponent); +}; + + +/***/ }), + +/***/ 7604: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); + +module.exports = function bytesAsFloat64(rawBytes) { + // return new $Float64Array(new $Uint8Array(rawBytes).buffer)[0]; + + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + // Handle subnormal numbers + if (exponent === -1023) { + return sign * mantissa * 5e-324; // $pow(2, -1022 - 52) + } + + return sign * (1 + (mantissa / 0x10000000000000)) * $pow(2, exponent); +}; + + +/***/ }), + +/***/ 2367: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function bytesAsInteger(rawBytes, elementSize, isUnsigned, isBigInt) { + var Z = isBigInt ? $BigInt : $Number; + + // this is common to both branches + var intValue = Z(0); + for (var i = 0; i < rawBytes.length; i++) { + intValue += Z(rawBytes[i] * $pow(2, 8 * i)); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!isUnsigned) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + + if (rawBytes[elementSize - 1] & 0x80) { + intValue -= Z($pow(2, bitLength)); + } + } + + return intValue; // step 7 +}; + + +/***/ }), + +/***/ 2142: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Uint8Array = GetIntrinsic('%Uint8Array%', true); +var $Uint32Array = GetIntrinsic('%Uint32Array%', true); + +var typedArrayBuffer = __webpack_require__(6740); + +var uInt32 = $Uint32Array && new $Uint32Array([0x12345678]); +var uInt8 = uInt32 && new $Uint8Array(typedArrayBuffer(uInt32)); + +module.exports = uInt8 + ? uInt8[0] === 0x78 + ? 'little' + : uInt8[0] === 0x12 + ? 'big' + : uInt8[0] === 0x34 + ? 'mixed' // https://developer.mozilla.org/en-US/docs/Glossary/Endianness + : 'unknown' // ??? + : 'indeterminate'; // no way to know + + +/***/ }), + +/***/ 8172: +/***/ (function(module) { + +"use strict"; + + +module.exports = function every(array, predicate) { + for (var i = 0; i < array.length; i += 1) { + if (!predicate(array[i], i, array)) { + return false; + } + } + return true; +}; + + +/***/ }), + +/***/ 9065: +/***/ (function(module) { + +"use strict"; + + +module.exports = function forEach(array, callback) { + for (var i = 0; i < array.length; i += 1) { + callback(array[i], i, array); // eslint-disable-line callback-return + } +}; + + +/***/ }), + +/***/ 1211: +/***/ (function(module) { + +"use strict"; + + +var MAX_ITER = 1075; // 1023+52 (subnormals) => BIAS+NUM_SIGNFICAND_BITS-1 +var maxBits = 54; // only 53 bits for fraction + +module.exports = function fractionToBitString(x) { + var str = ''; + if (x === 0) { + return str; + } + var j = MAX_ITER; + + var y; + // Each time we multiply by 2 and find a ones digit, add a '1'; otherwise, add a '0'.. + for (var i = 0; i < MAX_ITER; i += 1) { + y = x * 2; + if (y >= 1) { + x = y - 1; // eslint-disable-line no-param-reassign + str += '1'; + if (j === MAX_ITER) { + j = i; // first 1 + } + } else { + x = y; // eslint-disable-line no-param-reassign + str += '0'; + } + // Stop when we have no more decimals to process or in the event we found a fraction which cannot be represented in a finite number of bits... + if (y === 1 || i - j > maxBits) { + return str; + } + } + return str; +}; + + +/***/ }), + +/***/ 2646: +/***/ (function(module) { + +"use strict"; + + +module.exports = function fromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + var obj = {}; + if ('[[Value]]' in Desc) { + obj.value = Desc['[[Value]]']; + } + if ('[[Writable]]' in Desc) { + obj.writable = !!Desc['[[Writable]]']; + } + if ('[[Get]]' in Desc) { + obj.get = Desc['[[Get]]']; + } + if ('[[Set]]' in Desc) { + obj.set = Desc['[[Set]]']; + } + if ('[[Enumerable]]' in Desc) { + obj.enumerable = !!Desc['[[Enumerable]]']; + } + if ('[[Configurable]]' in Desc) { + obj.configurable = !!Desc['[[Configurable]]']; + } + return obj; +}; + + +/***/ }), + +/***/ 9495: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var originalGetProto = GetIntrinsic('%Object.getPrototypeOf%', true); + +var hasProto = __webpack_require__(1856)(); + +module.exports = originalGetProto || ( + hasProto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + + +/***/ }), + +/***/ 20: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $floor = GetIntrinsic('%Math.floor%'); + +// https://runestone.academy/ns/books/published/pythonds/BasicDS/ConvertingDecimalNumberstoBinaryNumbers.html#:~:text=The%20Divide%20by%202%20algorithm,have%20a%20remainder%20of%200 + +module.exports = function intToBinaryString(x) { + var str = ''; + var y; + + while (x > 0) { + y = x / 2; + x = $floor(y); // eslint-disable-line no-param-reassign + if (y === x) { + str = '0' + str; + } else { + str = '1' + str; + } + } + return str; +}; + + +/***/ }), + +/***/ 1520: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $Number = GetIntrinsic('%Number%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +module.exports = function integerToNBytes(intValue, n, isLittleEndian) { + var Z = typeof intValue === 'bigint' ? $BigInt : $Number; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue >>>= 0; // eslint-disable-line no-param-reassign + } + + var rawBytes = []; + for (var i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & Z(0xFF)); + intValue >>= Z(8); // eslint-disable-line no-param-reassign + } + + return rawBytes; // step 4 +}; + + +/***/ }), + +/***/ 1824: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isByteValue(value) { + return typeof value === 'number' && value >= 0 && value <= 255 && (value | 0) === value; +}; + + +/***/ }), + +/***/ 7991: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = __webpack_require__(9404); + +module.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; + + +/***/ }), + +/***/ 6156: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var $isNaN = __webpack_require__(9404); +var $isFinite = __webpack_require__(7991); + +module.exports = function isInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; +}; + + + +/***/ }), + +/***/ 9404: +/***/ (function(module) { + +"use strict"; + + +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ 2745: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; +}; + + +/***/ }), + +/***/ 4968: +/***/ (function(module) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ 2076: +/***/ (function(module) { + +"use strict"; + + +var $floor = Math.floor; + +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); +}; + + +/***/ }), + +/***/ 8626: +/***/ (function(module) { + +"use strict"; + + +module.exports = function bigIntMod(BigIntRemainder, bigint, modulo) { + var remain = BigIntRemainder(bigint, modulo); + return remain >= 0 ? remain : remain + modulo; +}; + + +/***/ }), + +/***/ 6862: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var $TypeError = __webpack_require__(1642); + +var hasOwn = __webpack_require__(9429); + +var allowed = { + __proto__: null, + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true +}; + +// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type + +module.exports = function isPropertyDescriptor(Desc) { + if (!Desc || typeof Desc !== 'object') { + return false; + } + + for (var key in Desc) { // eslint-disable-line + if (hasOwn(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = hasOwn(Desc, '[[Value]]') || hasOwn(Desc, '[[Writable]]'); + var IsAccessor = hasOwn(Desc, '[[Get]]') || hasOwn(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; +}; + + +/***/ }), + +/***/ 359: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasOwn = __webpack_require__(9429); +var isTypedArray = __webpack_require__(2527); + +var isInteger = __webpack_require__(6156); + +module.exports = function isTypedArrayWithBufferWitnessRecord(value) { + return !!value + && typeof value === 'object' + && hasOwn(value, '[[Object]]') + && hasOwn(value, '[[CachedBufferByteLength]]') + && ( + (isInteger(value['[[CachedBufferByteLength]]']) && value['[[CachedBufferByteLength]]'] >= 0) + || value['[[CachedBufferByteLength]]'] === 'DETACHED' + ) + && isTypedArray(value['[[Object]]']); +}; + + +/***/ }), + +/***/ 9660: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var constructors = { + __proto__: null, + $Int8Array: GetIntrinsic('%Int8Array%', true), + $Uint8Array: GetIntrinsic('%Uint8Array%', true), + $Uint8ClampedArray: GetIntrinsic('%Uint8ClampedArray%', true), + $Int16Array: GetIntrinsic('%Int16Array%', true), + $Uint16Array: GetIntrinsic('%Uint16Array%', true), + $Int32Array: GetIntrinsic('%Int32Array%', true), + $Uint32Array: GetIntrinsic('%Uint32Array%', true), + $BigInt64Array: GetIntrinsic('%BigInt64Array%', true), + $BigUint64Array: GetIntrinsic('%BigUint64Array%', true), + $Float32Array: GetIntrinsic('%Float32Array%', true), + $Float64Array: GetIntrinsic('%Float64Array%', true) +}; + +module.exports = function getConstructor(kind) { + return constructors['$' + kind]; +}; + + +/***/ }), + +/***/ 3647: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); +var $pow = GetIntrinsic('%Math.pow%'); + +var isFinite = __webpack_require__(7991); +var isNaN = __webpack_require__(9404); +var isNegativeZero = __webpack_require__(2745); + +var maxFiniteFloat32 = 3.4028234663852886e+38; // roughly 2 ** 128 - 1 + +module.exports = function valueToFloat32Bytes(value, isLittleEndian) { + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = isNegativeZero(value) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if ($abs(value) > maxFiniteFloat32 || !isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = $abs(value); // eslint-disable-line no-param-reassign + + var exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23) + 0.5; + mantissa = $floor(mantissa); + + exponent += 127; + exponent <<= 23; + + var result = (sign << 31) + | exponent + | mantissa; + + var byte0 = result & 255; + result >>= 8; + var byte1 = result & 255; + result >>= 8; + var byte2 = result & 255; + result >>= 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; +}; + + +/***/ }), + +/***/ 7511: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(682); + +var $parseInt = GetIntrinsic('%parseInt%'); +var $abs = GetIntrinsic('%Math.abs%'); +var $floor = GetIntrinsic('%Math.floor%'); + +var callBound = __webpack_require__(1154); + +var $strIndexOf = callBound('String.prototype.indexOf'); +var $strSlice = callBound('String.prototype.slice'); + +var fractionToBitString = __webpack_require__(1211); +var intToBinString = __webpack_require__(20); +var isNegativeZero = __webpack_require__(2745); + +var float64bias = 1023; + +var elevenOnes = '11111111111'; +var elevenZeroes = '00000000000'; +var fiftyOneZeroes = elevenZeroes + elevenZeroes + elevenZeroes + elevenZeroes + '0000000'; + +// IEEE 754-1985 +module.exports = function valueToFloat64Bytes(value, isLittleEndian) { + var signBit = value < 0 || isNegativeZero(value) ? '1' : '0'; + var exponentBits; + var significandBits; + + if (isNaN(value)) { + exponentBits = elevenOnes; + significandBits = '1' + fiftyOneZeroes; + } else if (!isFinite(value)) { + exponentBits = elevenOnes; + significandBits = '0' + fiftyOneZeroes; + } else if (value === 0) { + exponentBits = elevenZeroes; + significandBits = '0' + fiftyOneZeroes; + } else { + value = $abs(value); // eslint-disable-line no-param-reassign + + // Isolate the integer part (digits before the decimal): + var integerPart = $floor(value); + + var intBinString = intToBinString(integerPart); // bit string for integer part + var fracBinString = fractionToBitString(value - integerPart); // bit string for fractional part + + var numberOfBits; + // find exponent needed to normalize integer+fractional parts + if (intBinString) { + exponentBits = intBinString.length - 1; // move the decimal to the left + } else { + var first1 = $strIndexOf(fracBinString, '1'); + if (first1 > -1) { + numberOfBits = first1 + 1; + } + exponentBits = -numberOfBits; // move the decimal to the right + } + + significandBits = intBinString + fracBinString; + if (exponentBits < 0) { + // subnormals + if (exponentBits <= -float64bias) { + numberOfBits = float64bias - 1; // limit number of removed bits + } + significandBits = $strSlice(significandBits, numberOfBits); // remove all leading 0s and the first 1 for normal values; for subnormals, remove up to `float64bias - 1` leading bits + } else { + significandBits = $strSlice(significandBits, 1); // remove the leading '1' (implicit/hidden bit) + } + exponentBits = $strSlice(elevenZeroes + intToBinString(exponentBits + float64bias), -11); // Convert the exponent to a bit string + + significandBits = $strSlice(significandBits + fiftyOneZeroes + '0', 0, 52); // fill in any trailing zeros and ensure we have only 52 fraction bits + } + + var bits = signBit + exponentBits + significandBits; + var rawBytes = []; + for (var i = 0; i < 8; i++) { + var targetIndex = isLittleEndian ? 8 - i - 1 : i; + rawBytes[targetIndex] = $parseInt($strSlice(bits, i * 8, (i + 1) * 8), 2); + } + + return rawBytes; +}; + + /***/ }) /******/ }); @@ -2721,6 +16092,18 @@ module.exports = window["React"]; /******/ }; /******/ }(); /******/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } @@ -13422,66 +26805,68 @@ function BlockHTML(_ref) { /* harmony default export */ var block_html = (BlockHTML); -;// CONCATENATED MODULE: ./node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js -let updateQueue = makeQueue(); -const raf = fn => schedule(fn, updateQueue); -let writeQueue = makeQueue(); +// EXTERNAL MODULE: external "React" +var external_React_ = __webpack_require__(9196); +var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); +;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; -raf.write = fn => schedule(fn, writeQueue); - -let onStartQueue = makeQueue(); - -raf.onStart = fn => schedule(fn, onStartQueue); - -let onFrameQueue = makeQueue(); - -raf.onFrame = fn => schedule(fn, onFrameQueue); - -let onFinishQueue = makeQueue(); - -raf.onFinish = fn => schedule(fn, onFinishQueue); - -let timeouts = []; +// src/globals.ts +var globals_exports = {}; +__export(globals_exports, { + assign: () => react_spring_shared_modern_assign, + colors: () => colors, + createStringInterpolator: () => createStringInterpolator, + skipAnimation: () => skipAnimation, + to: () => to, + willAdvance: () => willAdvance +}); +// ../rafz/dist/react-spring_rafz.modern.mjs +var updateQueue = makeQueue(); +var raf = (fn) => schedule(fn, updateQueue); +var writeQueue = makeQueue(); +raf.write = (fn) => schedule(fn, writeQueue); +var onStartQueue = makeQueue(); +raf.onStart = (fn) => schedule(fn, onStartQueue); +var onFrameQueue = makeQueue(); +raf.onFrame = (fn) => schedule(fn, onFrameQueue); +var onFinishQueue = makeQueue(); +raf.onFinish = (fn) => schedule(fn, onFinishQueue); +var timeouts = []; raf.setTimeout = (handler, ms) => { - let time = raf.now() + ms; - - let cancel = () => { - let i = timeouts.findIndex(t => t.cancel == cancel); - if (~i) timeouts.splice(i, 1); + const time = raf.now() + ms; + const cancel = () => { + const i = timeouts.findIndex((t) => t.cancel == cancel); + if (~i) + timeouts.splice(i, 1); pendingCount -= ~i ? 1 : 0; }; - - let timeout = { - time, - handler, - cancel - }; + const timeout = { time, handler, cancel }; timeouts.splice(findTimeout(time), 0, timeout); pendingCount += 1; start(); return timeout; }; - -let findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts.length); - -raf.cancel = fn => { +var findTimeout = (time) => ~(~timeouts.findIndex((t) => t.time > time) || ~timeouts.length); +raf.cancel = (fn) => { onStartQueue.delete(fn); onFrameQueue.delete(fn); onFinishQueue.delete(fn); updateQueue.delete(fn); writeQueue.delete(fn); }; - -raf.sync = fn => { +raf.sync = (fn) => { sync = true; raf.batchedUpdates(fn); sync = false; }; - -raf.throttle = fn => { +raf.throttle = (fn) => { let lastArgs; - function queuedFn() { try { fn(...lastArgs); @@ -13489,45 +26874,39 @@ raf.throttle = fn => { lastArgs = null; } } - function throttled(...args) { lastArgs = args; raf.onStart(queuedFn); } - throttled.handler = fn; - throttled.cancel = () => { onStartQueue.delete(queuedFn); lastArgs = null; }; - return throttled; }; - -let nativeRaf = typeof window != 'undefined' ? window.requestAnimationFrame : () => {}; - -raf.use = impl => nativeRaf = impl; - -raf.now = typeof performance != 'undefined' ? () => performance.now() : Date.now; - -raf.batchedUpdates = fn => fn(); - +var nativeRaf = typeof window != "undefined" ? window.requestAnimationFrame : ( + // eslint-disable-next-line @typescript-eslint/no-empty-function + () => { + } +); +raf.use = (impl) => nativeRaf = impl; +raf.now = typeof performance != "undefined" ? () => performance.now() : Date.now; +raf.batchedUpdates = (fn) => fn(); raf.catch = console.error; -raf.frameLoop = 'always'; - +raf.frameLoop = "always"; raf.advance = () => { - if (raf.frameLoop !== 'demand') { - console.warn('Cannot call the manual advancement of rafz whilst frameLoop is not set as demand'); + if (raf.frameLoop !== "demand") { + console.warn( + "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" + ); } else { update(); } }; - -let ts = -1; -let pendingCount = 0; -let sync = false; - +var ts = -1; +var pendingCount = 0; +var sync = false; function schedule(fn, queue) { if (sync) { queue.delete(fn); @@ -13537,209 +26916,160 @@ function schedule(fn, queue) { start(); } } - function start() { if (ts < 0) { ts = 0; - - if (raf.frameLoop !== 'demand') { + if (raf.frameLoop !== "demand") { nativeRaf(loop); } } } - function stop() { ts = -1; } - function loop() { if (~ts) { nativeRaf(loop); raf.batchedUpdates(update); } } - function update() { - let prevTs = ts; + const prevTs = ts; ts = raf.now(); - let count = findTimeout(ts); - + const count = findTimeout(ts); if (count) { - eachSafely(timeouts.splice(0, count), t => t.handler()); + eachSafely(timeouts.splice(0, count), (t) => t.handler()); pendingCount -= count; } - if (!pendingCount) { stop(); return; } - onStartQueue.flush(); updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667); onFrameQueue.flush(); writeQueue.flush(); onFinishQueue.flush(); } - function makeQueue() { - let next = new Set(); + let next = /* @__PURE__ */ new Set(); let current = next; return { add(fn) { pendingCount += current == next && !next.has(fn) ? 1 : 0; next.add(fn); }, - delete(fn) { pendingCount -= current == next && next.has(fn) ? 1 : 0; return next.delete(fn); }, - flush(arg) { if (current.size) { - next = new Set(); + next = /* @__PURE__ */ new Set(); pendingCount -= current.size; - eachSafely(current, fn => fn(arg) && next.add(fn)); + eachSafely(current, (fn) => fn(arg) && next.add(fn)); pendingCount += next.size; current = next; } } - }; } - -function eachSafely(values, each) { - values.forEach(value => { +function eachSafely(values, each2) { + values.forEach((value) => { try { - each(value); + each2(value); } catch (e) { raf.catch(e); } }); } -const __raf = { - count() { - return pendingCount; - }, - - isRunning() { - return ts >= 0; - }, - - clear() { - ts = -1; - timeouts = []; - onStartQueue = makeQueue(); - updateQueue = makeQueue(); - onFrameQueue = makeQueue(); - writeQueue = makeQueue(); - onFinishQueue = makeQueue(); - pendingCount = 0; - } - -}; - - - -// EXTERNAL MODULE: external "React" -var external_React_ = __webpack_require__(9196); -var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); -;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring-shared.esm.js - - - - -function noop() {} -const defineHidden = (obj, key, value) => Object.defineProperty(obj, key, { - value, - writable: true, - configurable: true -}); -const react_spring_shared_esm_is = { +// src/helpers.ts +function noop() { +} +var defineHidden = (obj, key, value) => Object.defineProperty(obj, key, { value, writable: true, configurable: true }); +var is = { arr: Array.isArray, - obj: a => !!a && a.constructor.name === 'Object', - fun: a => typeof a === 'function', - str: a => typeof a === 'string', - num: a => typeof a === 'number', - und: a => a === undefined + obj: (a) => !!a && a.constructor.name === "Object", + fun: (a) => typeof a === "function", + str: (a) => typeof a === "string", + num: (a) => typeof a === "number", + und: (a) => a === void 0 }; function isEqual(a, b) { - if (react_spring_shared_esm_is.arr(a)) { - if (!react_spring_shared_esm_is.arr(b) || a.length !== b.length) return false; - + if (is.arr(a)) { + if (!is.arr(b) || a.length !== b.length) + return false; for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; + if (a[i] !== b[i]) + return false; } - return true; } - return a === b; } -const react_spring_shared_esm_each = (obj, fn) => obj.forEach(fn); +var react_spring_shared_modern_each = (obj, fn) => obj.forEach(fn); function eachProp(obj, fn, ctx) { - if (react_spring_shared_esm_is.arr(obj)) { + if (is.arr(obj)) { for (let i = 0; i < obj.length; i++) { fn.call(ctx, obj[i], `${i}`); } - return; } - for (const key in obj) { if (obj.hasOwnProperty(key)) { fn.call(ctx, obj[key], key); } } } -const react_spring_shared_esm_toArray = a => react_spring_shared_esm_is.und(a) ? [] : react_spring_shared_esm_is.arr(a) ? a : [a]; +var toArray = (a) => is.und(a) ? [] : is.arr(a) ? a : [a]; function flush(queue, iterator) { if (queue.size) { const items = Array.from(queue); queue.clear(); - react_spring_shared_esm_each(items, iterator); + react_spring_shared_modern_each(items, iterator); } } -const flushCalls = (queue, ...args) => flush(queue, fn => fn(...args)); -const isSSR = () => typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent); +var flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args)); +var isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent); -let createStringInterpolator$1; -let to; -let colors$1 = null; -let skipAnimation = false; -let willAdvance = noop; -const react_spring_shared_esm_assign = globals => { - if (globals.to) to = globals.to; - if (globals.now) raf.now = globals.now; - if (globals.colors !== undefined) colors$1 = globals.colors; - if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation; - if (globals.createStringInterpolator) createStringInterpolator$1 = globals.createStringInterpolator; - if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame); - if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates; - if (globals.willAdvance) willAdvance = globals.willAdvance; - if (globals.frameLoop) raf.frameLoop = globals.frameLoop; +// src/globals.ts +var createStringInterpolator; +var to; +var colors = null; +var skipAnimation = false; +var willAdvance = noop; +var react_spring_shared_modern_assign = (globals) => { + if (globals.to) + to = globals.to; + if (globals.now) + raf.now = globals.now; + if (globals.colors !== void 0) + colors = globals.colors; + if (globals.skipAnimation != null) + skipAnimation = globals.skipAnimation; + if (globals.createStringInterpolator) + createStringInterpolator = globals.createStringInterpolator; + if (globals.requestAnimationFrame) + raf.use(globals.requestAnimationFrame); + if (globals.batchedUpdates) + raf.batchedUpdates = globals.batchedUpdates; + if (globals.willAdvance) + willAdvance = globals.willAdvance; + if (globals.frameLoop) + raf.frameLoop = globals.frameLoop; }; -var globals = /*#__PURE__*/Object.freeze({ - __proto__: null, - get createStringInterpolator () { return createStringInterpolator$1; }, - get to () { return to; }, - get colors () { return colors$1; }, - get skipAnimation () { return skipAnimation; }, - get willAdvance () { return willAdvance; }, - assign: react_spring_shared_esm_assign -}); - -const startQueue = new Set(); -let currentFrame = []; -let prevFrame = []; -let priority = 0; -const frameLoop = { +// src/FrameLoop.ts +var startQueue = /* @__PURE__ */ new Set(); +var currentFrame = []; +var prevFrame = []; +var priority = 0; +var frameLoop = { get idle() { return !startQueue.size && !currentFrame.length; }, - + /** Advance the given animation on every frame until idle. */ start(animation) { if (priority > animation.priority) { startQueue.add(animation); @@ -13749,292 +27079,328 @@ const frameLoop = { raf(advance); } }, - + /** Advance all animations by the given time. */ advance, - + /** Call this when an animation's priority changes. */ sort(animation) { if (priority) { raf.onFrame(() => frameLoop.sort(animation)); } else { const prevIndex = currentFrame.indexOf(animation); - if (~prevIndex) { currentFrame.splice(prevIndex, 1); startUnsafely(animation); } } }, - + /** + * Clear all animations. For testing purposes. + * + * ☠️ Never call this from within the frameloop. + */ clear() { currentFrame = []; startQueue.clear(); } - }; - function flushStartQueue() { startQueue.forEach(startSafely); startQueue.clear(); raf(advance); } - function startSafely(animation) { - if (!currentFrame.includes(animation)) startUnsafely(animation); + if (!currentFrame.includes(animation)) + startUnsafely(animation); } - function startUnsafely(animation) { - currentFrame.splice(findIndex(currentFrame, other => other.priority > animation.priority), 0, animation); + currentFrame.splice( + findIndex(currentFrame, (other) => other.priority > animation.priority), + 0, + animation + ); } - function advance(dt) { const nextFrame = prevFrame; - for (let i = 0; i < currentFrame.length; i++) { const animation = currentFrame[i]; priority = animation.priority; - if (!animation.idle) { willAdvance(animation); animation.advance(dt); - if (!animation.idle) { nextFrame.push(animation); } } } - priority = 0; prevFrame = currentFrame; prevFrame.length = 0; currentFrame = nextFrame; return currentFrame.length > 0; } - function findIndex(arr, test) { const index = arr.findIndex(test); return index < 0 ? arr.length : index; } -const colors = { - transparent: 0x00000000, - aliceblue: 0xf0f8ffff, - antiquewhite: 0xfaebd7ff, - aqua: 0x00ffffff, - aquamarine: 0x7fffd4ff, - azure: 0xf0ffffff, - beige: 0xf5f5dcff, - bisque: 0xffe4c4ff, - black: 0x000000ff, - blanchedalmond: 0xffebcdff, - blue: 0x0000ffff, - blueviolet: 0x8a2be2ff, - brown: 0xa52a2aff, - burlywood: 0xdeb887ff, - burntsienna: 0xea7e5dff, - cadetblue: 0x5f9ea0ff, - chartreuse: 0x7fff00ff, - chocolate: 0xd2691eff, - coral: 0xff7f50ff, - cornflowerblue: 0x6495edff, - cornsilk: 0xfff8dcff, - crimson: 0xdc143cff, - cyan: 0x00ffffff, - darkblue: 0x00008bff, - darkcyan: 0x008b8bff, - darkgoldenrod: 0xb8860bff, - darkgray: 0xa9a9a9ff, - darkgreen: 0x006400ff, - darkgrey: 0xa9a9a9ff, - darkkhaki: 0xbdb76bff, - darkmagenta: 0x8b008bff, - darkolivegreen: 0x556b2fff, - darkorange: 0xff8c00ff, - darkorchid: 0x9932ccff, - darkred: 0x8b0000ff, - darksalmon: 0xe9967aff, - darkseagreen: 0x8fbc8fff, - darkslateblue: 0x483d8bff, - darkslategray: 0x2f4f4fff, - darkslategrey: 0x2f4f4fff, - darkturquoise: 0x00ced1ff, - darkviolet: 0x9400d3ff, - deeppink: 0xff1493ff, - deepskyblue: 0x00bfffff, - dimgray: 0x696969ff, - dimgrey: 0x696969ff, - dodgerblue: 0x1e90ffff, - firebrick: 0xb22222ff, - floralwhite: 0xfffaf0ff, - forestgreen: 0x228b22ff, - fuchsia: 0xff00ffff, - gainsboro: 0xdcdcdcff, - ghostwhite: 0xf8f8ffff, - gold: 0xffd700ff, - goldenrod: 0xdaa520ff, - gray: 0x808080ff, - green: 0x008000ff, - greenyellow: 0xadff2fff, - grey: 0x808080ff, - honeydew: 0xf0fff0ff, - hotpink: 0xff69b4ff, - indianred: 0xcd5c5cff, - indigo: 0x4b0082ff, - ivory: 0xfffff0ff, - khaki: 0xf0e68cff, - lavender: 0xe6e6faff, - lavenderblush: 0xfff0f5ff, - lawngreen: 0x7cfc00ff, - lemonchiffon: 0xfffacdff, - lightblue: 0xadd8e6ff, - lightcoral: 0xf08080ff, - lightcyan: 0xe0ffffff, - lightgoldenrodyellow: 0xfafad2ff, - lightgray: 0xd3d3d3ff, - lightgreen: 0x90ee90ff, - lightgrey: 0xd3d3d3ff, - lightpink: 0xffb6c1ff, - lightsalmon: 0xffa07aff, - lightseagreen: 0x20b2aaff, - lightskyblue: 0x87cefaff, - lightslategray: 0x778899ff, - lightslategrey: 0x778899ff, - lightsteelblue: 0xb0c4deff, - lightyellow: 0xffffe0ff, - lime: 0x00ff00ff, - limegreen: 0x32cd32ff, - linen: 0xfaf0e6ff, - magenta: 0xff00ffff, - maroon: 0x800000ff, - mediumaquamarine: 0x66cdaaff, - mediumblue: 0x0000cdff, - mediumorchid: 0xba55d3ff, - mediumpurple: 0x9370dbff, - mediumseagreen: 0x3cb371ff, - mediumslateblue: 0x7b68eeff, - mediumspringgreen: 0x00fa9aff, - mediumturquoise: 0x48d1ccff, - mediumvioletred: 0xc71585ff, - midnightblue: 0x191970ff, - mintcream: 0xf5fffaff, - mistyrose: 0xffe4e1ff, - moccasin: 0xffe4b5ff, - navajowhite: 0xffdeadff, - navy: 0x000080ff, - oldlace: 0xfdf5e6ff, - olive: 0x808000ff, - olivedrab: 0x6b8e23ff, - orange: 0xffa500ff, - orangered: 0xff4500ff, - orchid: 0xda70d6ff, - palegoldenrod: 0xeee8aaff, - palegreen: 0x98fb98ff, - paleturquoise: 0xafeeeeff, - palevioletred: 0xdb7093ff, - papayawhip: 0xffefd5ff, - peachpuff: 0xffdab9ff, - peru: 0xcd853fff, - pink: 0xffc0cbff, - plum: 0xdda0ddff, - powderblue: 0xb0e0e6ff, - purple: 0x800080ff, - rebeccapurple: 0x663399ff, - red: 0xff0000ff, - rosybrown: 0xbc8f8fff, - royalblue: 0x4169e1ff, - saddlebrown: 0x8b4513ff, - salmon: 0xfa8072ff, - sandybrown: 0xf4a460ff, - seagreen: 0x2e8b57ff, - seashell: 0xfff5eeff, - sienna: 0xa0522dff, - silver: 0xc0c0c0ff, - skyblue: 0x87ceebff, - slateblue: 0x6a5acdff, - slategray: 0x708090ff, - slategrey: 0x708090ff, - snow: 0xfffafaff, - springgreen: 0x00ff7fff, - steelblue: 0x4682b4ff, - tan: 0xd2b48cff, - teal: 0x008080ff, - thistle: 0xd8bfd8ff, - tomato: 0xff6347ff, - turquoise: 0x40e0d0ff, - violet: 0xee82eeff, - wheat: 0xf5deb3ff, - white: 0xffffffff, - whitesmoke: 0xf5f5f5ff, - yellow: 0xffff00ff, - yellowgreen: 0x9acd32ff +// src/clamp.ts +var clamp = (min, max, v) => Math.min(Math.max(v, min), max); + +// src/colors.ts +var colors2 = { + transparent: 0, + aliceblue: 4042850303, + antiquewhite: 4209760255, + aqua: 16777215, + aquamarine: 2147472639, + azure: 4043309055, + beige: 4126530815, + bisque: 4293182719, + black: 255, + blanchedalmond: 4293643775, + blue: 65535, + blueviolet: 2318131967, + brown: 2771004159, + burlywood: 3736635391, + burntsienna: 3934150143, + cadetblue: 1604231423, + chartreuse: 2147418367, + chocolate: 3530104575, + coral: 4286533887, + cornflowerblue: 1687547391, + cornsilk: 4294499583, + crimson: 3692313855, + cyan: 16777215, + darkblue: 35839, + darkcyan: 9145343, + darkgoldenrod: 3095792639, + darkgray: 2846468607, + darkgreen: 6553855, + darkgrey: 2846468607, + darkkhaki: 3182914559, + darkmagenta: 2332068863, + darkolivegreen: 1433087999, + darkorange: 4287365375, + darkorchid: 2570243327, + darkred: 2332033279, + darksalmon: 3918953215, + darkseagreen: 2411499519, + darkslateblue: 1211993087, + darkslategray: 793726975, + darkslategrey: 793726975, + darkturquoise: 13554175, + darkviolet: 2483082239, + deeppink: 4279538687, + deepskyblue: 12582911, + dimgray: 1768516095, + dimgrey: 1768516095, + dodgerblue: 512819199, + firebrick: 2988581631, + floralwhite: 4294635775, + forestgreen: 579543807, + fuchsia: 4278255615, + gainsboro: 3705462015, + ghostwhite: 4177068031, + gold: 4292280575, + goldenrod: 3668254975, + gray: 2155905279, + green: 8388863, + greenyellow: 2919182335, + grey: 2155905279, + honeydew: 4043305215, + hotpink: 4285117695, + indianred: 3445382399, + indigo: 1258324735, + ivory: 4294963455, + khaki: 4041641215, + lavender: 3873897215, + lavenderblush: 4293981695, + lawngreen: 2096890111, + lemonchiffon: 4294626815, + lightblue: 2916673279, + lightcoral: 4034953471, + lightcyan: 3774873599, + lightgoldenrodyellow: 4210742015, + lightgray: 3553874943, + lightgreen: 2431553791, + lightgrey: 3553874943, + lightpink: 4290167295, + lightsalmon: 4288707327, + lightseagreen: 548580095, + lightskyblue: 2278488831, + lightslategray: 2005441023, + lightslategrey: 2005441023, + lightsteelblue: 2965692159, + lightyellow: 4294959359, + lime: 16711935, + limegreen: 852308735, + linen: 4210091775, + magenta: 4278255615, + maroon: 2147483903, + mediumaquamarine: 1724754687, + mediumblue: 52735, + mediumorchid: 3126187007, + mediumpurple: 2473647103, + mediumseagreen: 1018393087, + mediumslateblue: 2070474495, + mediumspringgreen: 16423679, + mediumturquoise: 1221709055, + mediumvioletred: 3340076543, + midnightblue: 421097727, + mintcream: 4127193855, + mistyrose: 4293190143, + moccasin: 4293178879, + navajowhite: 4292783615, + navy: 33023, + oldlace: 4260751103, + olive: 2155872511, + olivedrab: 1804477439, + orange: 4289003775, + orangered: 4282712319, + orchid: 3664828159, + palegoldenrod: 4008225535, + palegreen: 2566625535, + paleturquoise: 2951671551, + palevioletred: 3681588223, + papayawhip: 4293907967, + peachpuff: 4292524543, + peru: 3448061951, + pink: 4290825215, + plum: 3718307327, + powderblue: 2967529215, + purple: 2147516671, + rebeccapurple: 1714657791, + red: 4278190335, + rosybrown: 3163525119, + royalblue: 1097458175, + saddlebrown: 2336560127, + salmon: 4202722047, + sandybrown: 4104413439, + seagreen: 780883967, + seashell: 4294307583, + sienna: 2689740287, + silver: 3233857791, + skyblue: 2278484991, + slateblue: 1784335871, + slategray: 1887473919, + slategrey: 1887473919, + snow: 4294638335, + springgreen: 16744447, + steelblue: 1182971135, + tan: 3535047935, + teal: 8421631, + thistle: 3636451583, + tomato: 4284696575, + turquoise: 1088475391, + violet: 4001558271, + wheat: 4125012991, + white: 4294967295, + whitesmoke: 4126537215, + yellow: 4294902015, + yellowgreen: 2597139199 }; -const NUMBER = '[-+]?\\d*\\.?\\d+'; -const PERCENTAGE = NUMBER + '%'; - +// src/colorMatchers.ts +var NUMBER = "[-+]?\\d*\\.?\\d+"; +var PERCENTAGE = NUMBER + "%"; function call(...parts) { - return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)'; + return "\\(\\s*(" + parts.join(")\\s*,\\s*(") + ")\\s*\\)"; } +var rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER)); +var rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER)); +var hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE)); +var hsla = new RegExp( + "hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +); +var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; +var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; +var hex6 = /^#([0-9a-fA-F]{6})$/; +var hex8 = /^#([0-9a-fA-F]{8})$/; -const rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)); -const rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)); -const hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)); -const hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)); -const hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; -const hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/; -const hex6 = /^#([0-9a-fA-F]{6})$/; -const hex8 = /^#([0-9a-fA-F]{8})$/; - +// src/normalizeColor.ts function normalizeColor(color) { let match; - - if (typeof color === 'number') { - return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null; + if (typeof color === "number") { + return color >>> 0 === color && color >= 0 && color <= 4294967295 ? color : null; } - - if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0; - - if (colors$1 && colors$1[color] !== undefined) { - return colors$1[color]; + if (match = hex6.exec(color)) + return parseInt(match[1] + "ff", 16) >>> 0; + if (colors && colors[color] !== void 0) { + return colors[color]; } - if (match = rgb.exec(color)) { - return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0; + return (parse255(match[1]) << 24 | // r + parse255(match[2]) << 16 | // g + parse255(match[3]) << 8 | // b + 255) >>> // a + 0; } - if (match = rgba.exec(color)) { - return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0; + return (parse255(match[1]) << 24 | // r + parse255(match[2]) << 16 | // g + parse255(match[3]) << 8 | // b + parse1(match[4])) >>> // a + 0; } - if (match = hex3.exec(color)) { - return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + 'ff', 16) >>> 0; + return parseInt( + match[1] + match[1] + // r + match[2] + match[2] + // g + match[3] + match[3] + // b + "ff", + // a + 16 + ) >>> 0; } - - if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0; - + if (match = hex8.exec(color)) + return parseInt(match[1], 16) >>> 0; if (match = hex4.exec(color)) { - return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0; + return parseInt( + match[1] + match[1] + // r + match[2] + match[2] + // g + match[3] + match[3] + // b + match[4] + match[4], + // a + 16 + ) >>> 0; } - if (match = hsl.exec(color)) { - return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0; + return (hslToRgb( + parse360(match[1]), + // h + parsePercentage(match[2]), + // s + parsePercentage(match[3]) + // l + ) | 255) >>> // a + 0; } - if (match = hsla.exec(color)) { - return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0; + return (hslToRgb( + parse360(match[1]), + // h + parsePercentage(match[2]), + // s + parsePercentage(match[3]) + // l + ) | parse1(match[4])) >>> // a + 0; } - return null; } - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p + (q - p) * 6 * t; + if (t < 1 / 2) + return q; + if (t < 2 / 3) + return p + (q - p) * (2 / 3 - t) * 6; return p; } - function hslToRgb(h, s, l) { const q = l < 0.5 ? l * (1 + s) : l + s - l * s; const p = 2 * l - q; @@ -14043,227 +27409,270 @@ function hslToRgb(h, s, l) { const b = hue2rgb(p, q, h - 1 / 3); return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8; } - function parse255(str) { const int = parseInt(str, 10); - if (int < 0) return 0; - if (int > 255) return 255; + if (int < 0) + return 0; + if (int > 255) + return 255; return int; } - function parse360(str) { const int = parseFloat(str); return (int % 360 + 360) % 360 / 360; } - function parse1(str) { const num = parseFloat(str); - if (num < 0) return 0; - if (num > 1) return 255; + if (num < 0) + return 0; + if (num > 1) + return 255; return Math.round(num * 255); } - function parsePercentage(str) { const int = parseFloat(str); - if (int < 0) return 0; - if (int > 100) return 1; + if (int < 0) + return 0; + if (int > 100) + return 1; return int / 100; } +// src/colorToRgba.ts function colorToRgba(input) { let int32Color = normalizeColor(input); - if (int32Color === null) return input; + if (int32Color === null) + return input; int32Color = int32Color || 0; - let r = (int32Color & 0xff000000) >>> 24; - let g = (int32Color & 0x00ff0000) >>> 16; - let b = (int32Color & 0x0000ff00) >>> 8; - let a = (int32Color & 0x000000ff) / 255; + const r = (int32Color & 4278190080) >>> 24; + const g = (int32Color & 16711680) >>> 16; + const b = (int32Color & 65280) >>> 8; + const a = (int32Color & 255) / 255; return `rgba(${r}, ${g}, ${b}, ${a})`; } -const createInterpolator = (range, output, extrapolate) => { - if (react_spring_shared_esm_is.fun(range)) { +// src/createInterpolator.ts +var createInterpolator = (range, output, extrapolate) => { + if (is.fun(range)) { return range; } - - if (react_spring_shared_esm_is.arr(range)) { + if (is.arr(range)) { return createInterpolator({ range, - output: output, + output, extrapolate }); } - - if (react_spring_shared_esm_is.str(range.output[0])) { - return createStringInterpolator$1(range); + if (is.str(range.output[0])) { + return createStringInterpolator(range); } - const config = range; const outputRange = config.output; const inputRange = config.range || [0, 1]; - const extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend'; - const extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend'; - - const easing = config.easing || (t => t); - - return input => { - const range = findRange(input, inputRange); - return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map); + const extrapolateLeft = config.extrapolateLeft || config.extrapolate || "extend"; + const extrapolateRight = config.extrapolateRight || config.extrapolate || "extend"; + const easing = config.easing || ((t) => t); + return (input) => { + const range2 = findRange(input, inputRange); + return interpolate( + input, + inputRange[range2], + inputRange[range2 + 1], + outputRange[range2], + outputRange[range2 + 1], + easing, + extrapolateLeft, + extrapolateRight, + config.map + ); }; }; - function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) { let result = map ? map(input) : input; - if (result < inputMin) { - if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin; + if (extrapolateLeft === "identity") + return result; + else if (extrapolateLeft === "clamp") + result = inputMin; } - if (result > inputMax) { - if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax; + if (extrapolateRight === "identity") + return result; + else if (extrapolateRight === "clamp") + result = inputMax; } - - if (outputMin === outputMax) return outputMin; - if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; - if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); + if (outputMin === outputMax) + return outputMin; + if (inputMin === inputMax) + return input <= inputMin ? outputMin : outputMax; + if (inputMin === -Infinity) + result = -result; + else if (inputMax === Infinity) + result = result - inputMin; + else + result = (result - inputMin) / (inputMax - inputMin); result = easing(result); - if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin; + if (outputMin === -Infinity) + result = -result; + else if (outputMax === Infinity) + result = result + outputMin; + else + result = result * (outputMax - outputMin) + outputMin; return result; } - function findRange(input, inputRange) { - for (var i = 1; i < inputRange.length - 1; ++i) if (inputRange[i] >= input) break; - + for (var i = 1; i < inputRange.length - 1; ++i) + if (inputRange[i] >= input) + break; return i - 1; } -function react_spring_shared_esm_extends() { - react_spring_shared_esm_extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - - return react_spring_shared_esm_extends.apply(this, arguments); -} - -const $get = Symbol.for('FluidValue.get'); -const $observers = Symbol.for('FluidValue.observers'); - -const hasFluidValue = arg => Boolean(arg && arg[$get]); - -const getFluidValue = arg => arg && arg[$get] ? arg[$get]() : arg; - -const getFluidObservers = target => target[$observers] || null; - -function callFluidObserver(observer, event) { - if (observer.eventObserved) { - observer.eventObserved(event); +// src/easings.ts +var steps = (steps2, direction = "end") => (progress2) => { + progress2 = direction === "end" ? Math.min(progress2, 0.999) : Math.max(progress2, 1e-3); + const expanded = progress2 * steps2; + const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded); + return clamp(0, 1, rounded / steps2); +}; +var c1 = 1.70158; +var c2 = c1 * 1.525; +var c3 = c1 + 1; +var c4 = 2 * Math.PI / 3; +var c5 = 2 * Math.PI / 4.5; +var bounceOut = (x) => { + const n1 = 7.5625; + const d1 = 2.75; + if (x < 1 / d1) { + return n1 * x * x; + } else if (x < 2 / d1) { + return n1 * (x -= 1.5 / d1) * x + 0.75; + } else if (x < 2.5 / d1) { + return n1 * (x -= 2.25 / d1) * x + 0.9375; } else { - observer(event); + return n1 * (x -= 2.625 / d1) * x + 0.984375; + } +}; +var easings = { + linear: (x) => x, + easeInQuad: (x) => x * x, + easeOutQuad: (x) => 1 - (1 - x) * (1 - x), + easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2, + easeInCubic: (x) => x * x * x, + easeOutCubic: (x) => 1 - Math.pow(1 - x, 3), + easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2, + easeInQuart: (x) => x * x * x * x, + easeOutQuart: (x) => 1 - Math.pow(1 - x, 4), + easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2, + easeInQuint: (x) => x * x * x * x * x, + easeOutQuint: (x) => 1 - Math.pow(1 - x, 5), + easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2, + easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2), + easeOutSine: (x) => Math.sin(x * Math.PI / 2), + easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2, + easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10), + easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x), + easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2, + easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)), + easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)), + easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2, + easeInBack: (x) => c3 * x * x * x - c1 * x * x, + easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2), + easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2, + easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4), + easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1, + easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1, + easeInBounce: (x) => 1 - bounceOut(1 - x), + easeOutBounce: bounceOut, + easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2, + steps +}; + +// src/fluids.ts +var $get = Symbol.for("FluidValue.get"); +var $observers = Symbol.for("FluidValue.observers"); +var hasFluidValue = (arg) => Boolean(arg && arg[$get]); +var getFluidValue = (arg) => arg && arg[$get] ? arg[$get]() : arg; +var getFluidObservers = (target) => target[$observers] || null; +function callFluidObserver(observer2, event) { + if (observer2.eventObserved) { + observer2.eventObserved(event); + } else { + observer2(event); } } - function callFluidObservers(target, event) { - let observers = target[$observers]; - + const observers = target[$observers]; if (observers) { - observers.forEach(observer => { - callFluidObserver(observer, event); + observers.forEach((observer2) => { + callFluidObserver(observer2, event); }); } } - -class FluidValue { +var FluidValue = class { constructor(get) { - this[$get] = void 0; - this[$observers] = void 0; - if (!get && !(get = this.get)) { - throw Error('Unknown getter'); + throw Error("Unknown getter"); } - setFluidGetter(this, get); } - -} - -const setFluidGetter = (target, get) => setHidden(target, $get, get); - -function addFluidObserver(target, observer) { +}; +$get, $observers; +var setFluidGetter = (target, get) => setHidden(target, $get, get); +function addFluidObserver(target, observer2) { if (target[$get]) { let observers = target[$observers]; - if (!observers) { - setHidden(target, $observers, observers = new Set()); + setHidden(target, $observers, observers = /* @__PURE__ */ new Set()); } - - if (!observers.has(observer)) { - observers.add(observer); - + if (!observers.has(observer2)) { + observers.add(observer2); if (target.observerAdded) { - target.observerAdded(observers.size, observer); + target.observerAdded(observers.size, observer2); } } } - - return observer; + return observer2; } - -function removeFluidObserver(target, observer) { - let observers = target[$observers]; - - if (observers && observers.has(observer)) { +function removeFluidObserver(target, observer2) { + const observers = target[$observers]; + if (observers && observers.has(observer2)) { const count = observers.size - 1; - if (count) { - observers.delete(observer); + observers.delete(observer2); } else { target[$observers] = null; } - if (target.observerRemoved) { - target.observerRemoved(count, observer); + target.observerRemoved(count, observer2); } } } - -const setHidden = (target, key, value) => Object.defineProperty(target, key, { +var setHidden = (target, key, value) => Object.defineProperty(target, key, { value, writable: true, configurable: true }); -const numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; -const colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; -const unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, 'i'); -const rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi; -const cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; +// src/regexs.ts +var numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; +var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; +var unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i"); +var rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi; +var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/; -const variableToRgba = input => { +// src/variableToRgba.ts +var variableToRgba = (input) => { const [token, fallback] = parseCSSVariable(input); - if (!token || isSSR()) { return input; } - const value = window.getComputedStyle(document.documentElement).getPropertyValue(token); - if (value) { return value.trim(); - } else if (fallback && fallback.startsWith('--')) { - const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback); - - if (_value) { - return _value; + } else if (fallback && fallback.startsWith("--")) { + const value2 = window.getComputedStyle(document.documentElement).getPropertyValue(fallback); + if (value2) { + return value2; } else { return input; } @@ -14272,56 +27681,61 @@ const variableToRgba = input => { } else if (fallback) { return fallback; } - return input; }; - -const parseCSSVariable = current => { +var parseCSSVariable = (current) => { const match = cssVariableRegex.exec(current); - if (!match) return [,]; + if (!match) + return [,]; const [, token, fallback] = match; return [token, fallback]; }; -let namedColorRegex; - -const rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`; - -const createStringInterpolator = config => { - if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join('|')})(?!\\w)`, 'g') : /^\b$/; - const output = config.output.map(value => { +// src/stringInterpolation.ts +var namedColorRegex; +var rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`; +var createStringInterpolator2 = (config) => { + if (!namedColorRegex) + namedColorRegex = colors ? ( + // match color names, ignore partial matches + new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`, "g") + ) : ( + // never match + /^\b$/ + ); + const output = config.output.map((value) => { return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba); }); - const keyframes = output.map(value => value.match(numberRegex).map(Number)); - const outputRanges = keyframes[0].map((_, i) => keyframes.map(values => { - if (!(i in values)) { - throw Error('The arity of each "output" value must be equal'); - } - - return values[i]; - })); - const interpolators = outputRanges.map(output => createInterpolator(react_spring_shared_esm_extends({}, config, { - output - }))); - return input => { - var _output$find; - - const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find(value => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, '')); + const keyframes = output.map((value) => value.match(numberRegex).map(Number)); + const outputRanges = keyframes[0].map( + (_, i) => keyframes.map((values) => { + if (!(i in values)) { + throw Error('The arity of each "output" value must be equal'); + } + return values[i]; + }) + ); + const interpolators = outputRanges.map( + (output2) => createInterpolator({ ...config, output: output2 }) + ); + return (input) => { + const missingUnit = !unitRegex.test(output[0]) && output.find((value) => unitRegex.test(value))?.replace(numberRegex, ""); let i = 0; - return output[0].replace(numberRegex, () => `${interpolators[i++](input)}${missingUnit || ''}`).replace(rgbaRegex, rgbaRound); + return output[0].replace( + numberRegex, + () => `${interpolators[i++](input)}${missingUnit || ""}` + ).replace(rgbaRegex, rgbaRound); }; }; -const prefix = 'react-spring: '; - -const once = fn => { +// src/deprecations.ts +var prefix = "react-spring: "; +var once = (fn) => { const func = fn; let called = false; - - if (typeof func != 'function') { + if (typeof func != "function") { throw new TypeError(`${prefix}once requires a function parameter`); } - return (...args) => { if (!called) { func(...args); @@ -14329,25 +27743,216 @@ const once = fn => { } }; }; - -const warnInterpolate = once(console.warn); -function react_spring_shared_esm_deprecateInterpolate() { - warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`); +var warnInterpolate = once(console.warn); +function deprecateInterpolate() { + warnInterpolate( + `${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)` + ); } -const warnDirectCall = once(console.warn); +var warnDirectCall = once(console.warn); function deprecateDirectCall() { - warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`); + warnDirectCall( + `${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions` + ); } +// src/isAnimatedString.ts function isAnimatedString(value) { - return react_spring_shared_esm_is.str(value) && (value[0] == '#' || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {})); + return is.str(value) && (value[0] == "#" || /\d/.test(value) || // Do not identify a CSS variable as an AnimatedString if its SSR + !isSSR() && cssVariableRegex.test(value) || value in (colors || {})); } -const react_spring_shared_esm_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect; +// src/dom-events/resize/resizeElement.ts +var observer; +var resizeHandlers = /* @__PURE__ */ new WeakMap(); +var handleObservation = (entries) => entries.forEach(({ target, contentRect }) => { + return resizeHandlers.get(target)?.forEach((handler) => handler(contentRect)); +}); +function resizeElement(handler, target) { + if (!observer) { + if (typeof ResizeObserver !== "undefined") { + observer = new ResizeObserver(handleObservation); + } + } + let elementHandlers = resizeHandlers.get(target); + if (!elementHandlers) { + elementHandlers = /* @__PURE__ */ new Set(); + resizeHandlers.set(target, elementHandlers); + } + elementHandlers.add(handler); + if (observer) { + observer.observe(target); + } + return () => { + const elementHandlers2 = resizeHandlers.get(target); + if (!elementHandlers2) + return; + elementHandlers2.delete(handler); + if (!elementHandlers2.size && observer) { + observer.unobserve(target); + } + }; +} -const useIsMounted = () => { +// src/dom-events/resize/resizeWindow.ts +var listeners = /* @__PURE__ */ new Set(); +var cleanupWindowResizeHandler; +var createResizeHandler = () => { + const handleResize = () => { + listeners.forEach( + (callback) => callback({ + width: window.innerWidth, + height: window.innerHeight + }) + ); + }; + window.addEventListener("resize", handleResize); + return () => { + window.removeEventListener("resize", handleResize); + }; +}; +var resizeWindow = (callback) => { + listeners.add(callback); + if (!cleanupWindowResizeHandler) { + cleanupWindowResizeHandler = createResizeHandler(); + } + return () => { + listeners.delete(callback); + if (!listeners.size && cleanupWindowResizeHandler) { + cleanupWindowResizeHandler(); + cleanupWindowResizeHandler = void 0; + } + }; +}; + +// src/dom-events/resize/index.ts +var react_spring_shared_modern_onResize = (callback, { container = document.documentElement } = {}) => { + if (container === document.documentElement) { + return resizeWindow(callback); + } else { + return resizeElement(callback, container); + } +}; + +// src/progress.ts +var progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min); + +// src/dom-events/scroll/ScrollHandler.ts +var SCROLL_KEYS = { + x: { + length: "Width", + position: "Left" + }, + y: { + length: "Height", + position: "Top" + } +}; +var ScrollHandler = class { + constructor(callback, container) { + this.createAxis = () => ({ + current: 0, + progress: 0, + scrollLength: 0 + }); + this.updateAxis = (axisName) => { + const axis = this.info[axisName]; + const { length, position } = SCROLL_KEYS[axisName]; + axis.current = this.container[`scroll${position}`]; + axis.scrollLength = this.container["scroll" + length] - this.container["client" + length]; + axis.progress = progress(0, axis.scrollLength, axis.current); + }; + this.update = () => { + this.updateAxis("x"); + this.updateAxis("y"); + }; + this.sendEvent = () => { + this.callback(this.info); + }; + this.advance = () => { + this.update(); + this.sendEvent(); + }; + this.callback = callback; + this.container = container; + this.info = { + time: 0, + x: this.createAxis(), + y: this.createAxis() + }; + } +}; + +// src/dom-events/scroll/index.ts +var scrollListeners = /* @__PURE__ */ new WeakMap(); +var resizeListeners = /* @__PURE__ */ new WeakMap(); +var onScrollHandlers = /* @__PURE__ */ new WeakMap(); +var getTarget = (container) => container === document.documentElement ? window : container; +var react_spring_shared_modern_onScroll = (callback, { container = document.documentElement } = {}) => { + let containerHandlers = onScrollHandlers.get(container); + if (!containerHandlers) { + containerHandlers = /* @__PURE__ */ new Set(); + onScrollHandlers.set(container, containerHandlers); + } + const containerHandler = new ScrollHandler(callback, container); + containerHandlers.add(containerHandler); + if (!scrollListeners.has(container)) { + const listener = () => { + containerHandlers?.forEach((handler) => handler.advance()); + return true; + }; + scrollListeners.set(container, listener); + const target = getTarget(container); + window.addEventListener("resize", listener, { passive: true }); + if (container !== document.documentElement) { + resizeListeners.set(container, react_spring_shared_modern_onResize(listener, { container })); + } + target.addEventListener("scroll", listener, { passive: true }); + } + const animateScroll = scrollListeners.get(container); + raf(animateScroll); + return () => { + raf.cancel(animateScroll); + const containerHandlers2 = onScrollHandlers.get(container); + if (!containerHandlers2) + return; + containerHandlers2.delete(containerHandler); + if (containerHandlers2.size) + return; + const listener = scrollListeners.get(container); + scrollListeners.delete(container); + if (listener) { + getTarget(container).removeEventListener("scroll", listener); + window.removeEventListener("resize", listener); + resizeListeners.get(container)?.(); + } + }; +}; + +// src/hooks/useConstant.ts + +function react_spring_shared_modern_useConstant(init) { + const ref = useRef(null); + if (ref.current === null) { + ref.current = init(); + } + return ref.current; +} + +// src/hooks/useForceUpdate.ts + + +// src/hooks/useIsMounted.ts + + +// src/hooks/useIsomorphicLayoutEffect.ts + +var react_spring_shared_modern_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect; + +// src/hooks/useIsMounted.ts +var useIsMounted = () => { const isMounted = (0,external_React_.useRef)(false); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { isMounted.current = true; return () => { isMounted.current = false; @@ -14356,28 +27961,33 @@ const useIsMounted = () => { return isMounted; }; -function react_spring_shared_esm_useForceUpdate() { - const update = (0,external_React_.useState)()[1]; +// src/hooks/useForceUpdate.ts +function useForceUpdate() { + const update2 = (0,external_React_.useState)()[1]; const isMounted = useIsMounted(); return () => { if (isMounted.current) { - update(Math.random()); + update2(Math.random()); } }; } +// src/hooks/useMemoOne.ts + function useMemoOne(getResult, inputs) { - const [initial] = (0,external_React_.useState)(() => ({ - inputs, - result: getResult() - })); + const [initial] = (0,external_React_.useState)( + () => ({ + inputs, + result: getResult() + }) + ); const committed = (0,external_React_.useRef)(); const prevCache = committed.current; let cache = prevCache; - if (cache) { - const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs)); - + const useCache = Boolean( + inputs && cache.inputs && areInputsEqual(inputs, cache.inputs) + ); if (!useCache) { cache = { inputs, @@ -14387,35 +27997,34 @@ function useMemoOne(getResult, inputs) { } else { cache = initial; } - (0,external_React_.useEffect)(() => { committed.current = cache; - if (prevCache == initial) { - initial.inputs = initial.result = undefined; + initial.inputs = initial.result = void 0; } }, [cache]); return cache.result; } - function areInputsEqual(next, prev) { if (next.length !== prev.length) { return false; } - for (let i = 0; i < next.length; i++) { if (next[i] !== prev[i]) { return false; } } - return true; } -const react_spring_shared_esm_useOnce = effect => (0,external_React_.useEffect)(effect, emptyDeps); -const emptyDeps = []; +// src/hooks/useOnce.ts -function react_spring_shared_esm_usePrev(value) { +var useOnce = (effect) => (0,external_React_.useEffect)(effect, emptyDeps); +var emptyDeps = []; + +// src/hooks/usePrev.ts + +function usePrev(value) { const prevRef = (0,external_React_.useRef)(); (0,external_React_.useEffect)(() => { prevRef.current = value; @@ -14423,142 +28032,121 @@ function react_spring_shared_esm_usePrev(value) { return prevRef.current; } -const useReducedMotion = () => { - const [reducedMotion, setReducedMotion] = useState(null); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { - const mql = window.matchMedia('(prefers-reduced-motion)'); +// src/hooks/useReducedMotion.ts - const handleMediaChange = e => { +var useReducedMotion = () => { + const [reducedMotion, setReducedMotion] = useState3(null); + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { + const mql = window.matchMedia("(prefers-reduced-motion)"); + const handleMediaChange = (e) => { setReducedMotion(e.matches); - react_spring_shared_esm_assign({ + react_spring_shared_modern_assign({ skipAnimation: e.matches }); }; - handleMediaChange(mql); - mql.addEventListener('change', handleMediaChange); + mql.addEventListener("change", handleMediaChange); return () => { - mql.removeEventListener('change', handleMediaChange); + mql.removeEventListener("change", handleMediaChange); }; }, []); return reducedMotion; }; +//# sourceMappingURL=react-spring_shared.modern.mjs.map +;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs +// src/Animated.ts - -;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring-animated.esm.js - - - - -const $node = Symbol.for('Animated:node'); -const isAnimated = value => !!value && value[$node] === value; -const getAnimated = owner => owner && owner[$node]; -const setAnimated = (owner, node) => defineHidden(owner, $node, node); -const getPayload = owner => owner && owner[$node] && owner[$node].getPayload(); -class Animated { +var $node = Symbol.for("Animated:node"); +var isAnimated = (value) => !!value && value[$node] === value; +var getAnimated = (owner) => owner && owner[$node]; +var setAnimated = (owner, node) => defineHidden(owner, $node, node); +var getPayload = (owner) => owner && owner[$node] && owner[$node].getPayload(); +var Animated = class { constructor() { - this.payload = void 0; setAnimated(this, this); } - + /** Get every `AnimatedValue` used by this node. */ getPayload() { return this.payload || []; } +}; -} +// src/AnimatedValue.ts -class AnimatedValue extends Animated { +var AnimatedValue = class extends Animated { constructor(_value) { super(); - this.done = true; - this.elapsedTime = void 0; - this.lastPosition = void 0; - this.lastVelocity = void 0; - this.v0 = void 0; - this.durationProgress = 0; this._value = _value; - - if (react_spring_shared_esm_is.num(this._value)) { + this.done = true; + this.durationProgress = 0; + if (is.num(this._value)) { this.lastPosition = this._value; } } - + /** @internal */ static create(value) { return new AnimatedValue(value); } - getPayload() { return [this]; } - getValue() { return this._value; } - setValue(value, step) { - if (react_spring_shared_esm_is.num(value)) { + if (is.num(value)) { this.lastPosition = value; - if (step) { value = Math.round(value / step) * step; - if (this.done) { this.lastPosition = value; } } } - if (this._value === value) { return false; } - this._value = value; return true; } - reset() { - const { - done - } = this; + const { done } = this; this.done = false; - - if (react_spring_shared_esm_is.num(this._value)) { + if (is.num(this._value)) { this.elapsedTime = 0; this.durationProgress = 0; this.lastPosition = this._value; - if (done) this.lastVelocity = null; + if (done) + this.lastVelocity = null; this.v0 = null; } } +}; -} +// src/AnimatedString.ts -class AnimatedString extends AnimatedValue { +var AnimatedString = class extends AnimatedValue { constructor(value) { super(0); this._string = null; - this._toString = void 0; this._toString = createInterpolator({ output: [value, value] }); } - + /** @internal */ static create(value) { return new AnimatedString(value); } - getValue() { - let value = this._string; + const value = this._string; return value == null ? this._string = this._toString(this._value) : value; } - setValue(value) { - if (react_spring_shared_esm_is.str(value)) { + if (is.str(value)) { if (value == this._string) { return false; } - this._string = value; this._value = 1; } else if (super.setValue(value)) { @@ -14566,34 +28154,35 @@ class AnimatedString extends AnimatedValue { } else { return false; } - return true; } - reset(goal) { if (goal) { this._toString = createInterpolator({ output: [this.getValue(), goal] }); } - this._value = 0; super.reset(); } - -} - -const TreeContext = { - dependencies: null }; -class AnimatedObject extends Animated { +// src/AnimatedArray.ts + + +// src/AnimatedObject.ts + + +// src/context.ts +var TreeContext = { dependencies: null }; + +// src/AnimatedObject.ts +var AnimatedObject = class extends Animated { constructor(source) { super(); this.source = source; this.setValue(source); } - getValue(animated) { const values = {}; eachProp(this.source, (source, key) => { @@ -14607,274 +28196,233 @@ class AnimatedObject extends Animated { }); return values; } - + /** Replace the raw object data */ setValue(source) { this.source = source; this.payload = this._makePayload(source); } - reset() { if (this.payload) { - react_spring_shared_esm_each(this.payload, node => node.reset()); + react_spring_shared_modern_each(this.payload, (node) => node.reset()); } } - + /** Create a payload set. */ _makePayload(source) { if (source) { - const payload = new Set(); + const payload = /* @__PURE__ */ new Set(); eachProp(source, this._addToPayload, payload); return Array.from(payload); } } - + /** Add to a payload set. */ _addToPayload(source) { if (TreeContext.dependencies && hasFluidValue(source)) { TreeContext.dependencies.add(source); } - const payload = getPayload(source); - if (payload) { - react_spring_shared_esm_each(payload, node => this.add(node)); + react_spring_shared_modern_each(payload, (node) => this.add(node)); } } +}; -} - -class AnimatedArray extends AnimatedObject { +// src/AnimatedArray.ts +var AnimatedArray = class extends AnimatedObject { constructor(source) { super(source); } - + /** @internal */ static create(source) { return new AnimatedArray(source); } - getValue() { - return this.source.map(node => node.getValue()); + return this.source.map((node) => node.getValue()); } - setValue(source) { const payload = this.getPayload(); - if (source.length == payload.length) { return payload.map((node, i) => node.setValue(source[i])).some(Boolean); } - super.setValue(source.map(makeAnimated)); return true; } - -} - +}; function makeAnimated(value) { const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue; return nodeType.create(value); } +// src/getAnimatedType.ts + function getAnimatedType(value) { const parentNode = getAnimated(value); - return parentNode ? parentNode.constructor : react_spring_shared_esm_is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue; + return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue; } -function react_spring_animated_esm_extends() { - react_spring_animated_esm_extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; +// src/createHost.ts - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; +// src/withAnimated.tsx - return react_spring_animated_esm_extends.apply(this, arguments); -} -const withAnimated = (Component, host) => { - const hasInstance = !react_spring_shared_esm_is.fun(Component) || Component.prototype && Component.prototype.isReactComponent; + +var withAnimated = (Component, host) => { + const hasInstance = ( + // Function components must use "forwardRef" to avoid being + // re-rendered on every animation frame. + !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent + ); return (0,external_React_.forwardRef)((givenProps, givenRef) => { const instanceRef = (0,external_React_.useRef)(null); - const ref = hasInstance && (0,external_React_.useCallback)(value => { - instanceRef.current = updateRef(givenRef, value); - }, [givenRef]); + const ref = hasInstance && // eslint-disable-next-line react-hooks/rules-of-hooks + (0,external_React_.useCallback)( + (value) => { + instanceRef.current = updateRef(givenRef, value); + }, + [givenRef] + ); const [props, deps] = getAnimatedState(givenProps, host); - const forceUpdate = react_spring_shared_esm_useForceUpdate(); - + const forceUpdate = useForceUpdate(); const callback = () => { const instance = instanceRef.current; - if (hasInstance && !instance) { return; } - const didUpdate = instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false; - if (didUpdate === false) { forceUpdate(); } }; - const observer = new PropsObserver(callback, deps); const observerRef = (0,external_React_.useRef)(); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { observerRef.current = observer; - react_spring_shared_esm_each(deps, dep => addFluidObserver(dep, observer)); + react_spring_shared_modern_each(deps, (dep) => addFluidObserver(dep, observer)); return () => { if (observerRef.current) { - react_spring_shared_esm_each(observerRef.current.deps, dep => removeFluidObserver(dep, observerRef.current)); + react_spring_shared_modern_each( + observerRef.current.deps, + (dep) => removeFluidObserver(dep, observerRef.current) + ); raf.cancel(observerRef.current.update); } }; }); (0,external_React_.useEffect)(callback, []); - react_spring_shared_esm_useOnce(() => () => { - const observer = observerRef.current; - react_spring_shared_esm_each(observer.deps, dep => removeFluidObserver(dep, observer)); + useOnce(() => () => { + const observer2 = observerRef.current; + react_spring_shared_modern_each(observer2.deps, (dep) => removeFluidObserver(dep, observer2)); }); const usedProps = host.getComponentProps(props.getValue()); - return external_React_.createElement(Component, react_spring_animated_esm_extends({}, usedProps, { - ref: ref - })); + return /* @__PURE__ */ external_React_.createElement(Component, { ...usedProps, ref }); }); }; - -class PropsObserver { +var PropsObserver = class { constructor(update, deps) { this.update = update; this.deps = deps; } - eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { raf.write(this.update); } } - -} - +}; function getAnimatedState(props, host) { - const dependencies = new Set(); + const dependencies = /* @__PURE__ */ new Set(); TreeContext.dependencies = dependencies; - if (props.style) props = react_spring_animated_esm_extends({}, props, { - style: host.createAnimatedStyle(props.style) - }); + if (props.style) + props = { + ...props, + style: host.createAnimatedStyle(props.style) + }; props = new AnimatedObject(props); TreeContext.dependencies = null; return [props, dependencies]; } - function updateRef(ref, value) { if (ref) { - if (react_spring_shared_esm_is.fun(ref)) ref(value);else ref.current = value; + if (is.fun(ref)) + ref(value); + else + ref.current = value; } - return value; } -const cacheKey = Symbol.for('AnimatedComponent'); -const createHost = (components, { - applyAnimatedValues: _applyAnimatedValues = () => false, - createAnimatedStyle: _createAnimatedStyle = style => new AnimatedObject(style), - getComponentProps: _getComponentProps = props => props +// src/createHost.ts +var cacheKey = Symbol.for("AnimatedComponent"); +var createHost = (components, { + applyAnimatedValues = () => false, + createAnimatedStyle = (style) => new AnimatedObject(style), + getComponentProps = (props) => props } = {}) => { const hostConfig = { - applyAnimatedValues: _applyAnimatedValues, - createAnimatedStyle: _createAnimatedStyle, - getComponentProps: _getComponentProps + applyAnimatedValues, + createAnimatedStyle, + getComponentProps }; - - const animated = Component => { - const displayName = getDisplayName(Component) || 'Anonymous'; - - if (react_spring_shared_esm_is.str(Component)) { + const animated = (Component) => { + const displayName = getDisplayName(Component) || "Anonymous"; + if (is.str(Component)) { Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig)); } else { Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig)); } - Component.displayName = `Animated(${displayName})`; return Component; }; - eachProp(components, (Component, key) => { - if (react_spring_shared_esm_is.arr(components)) { + if (is.arr(components)) { key = getDisplayName(Component); } - animated[key] = animated(Component); }); return { animated }; }; +var getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null; -const getDisplayName = arg => react_spring_shared_esm_is.str(arg) ? arg : arg && react_spring_shared_esm_is.str(arg.displayName) ? arg.displayName : react_spring_shared_esm_is.fun(arg) && arg.name || null; +//# sourceMappingURL=react-spring_animated.modern.mjs.map +;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/react-spring_core.modern.mjs +// src/hooks/useChain.ts - -;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/react-spring-core.esm.js - - - - - - - - -function react_spring_core_esm_extends() { - react_spring_core_esm_extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - - return react_spring_core_esm_extends.apply(this, arguments); -} +// src/helpers.ts function callProp(value, ...args) { - return react_spring_shared_esm_is.fun(value) ? value(...args) : value; + return is.fun(value) ? value(...args) : value; } -const matchProp = (value, key) => value === true || !!(key && value && (react_spring_shared_esm_is.fun(value) ? value(key) : react_spring_shared_esm_toArray(value).includes(key))); -const resolveProp = (prop, key) => react_spring_shared_esm_is.obj(prop) ? key && prop[key] : prop; -const getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : undefined; - -const noopTransform = value => value; - -const getDefaultProps = (props, transform = noopTransform) => { +var matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key))); +var resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop; +var getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0; +var noopTransform = (value) => value; +var getDefaultProps = (props, transform = noopTransform) => { let keys = DEFAULT_PROPS; - if (props.default && props.default !== true) { props = props.default; keys = Object.keys(props); } - - const defaults = {}; - + const defaults2 = {}; for (const key of keys) { const value = transform(props[key], key); - - if (!react_spring_shared_esm_is.und(value)) { - defaults[key] = value; + if (!is.und(value)) { + defaults2[key] = value; } } - - return defaults; + return defaults2; }; -const DEFAULT_PROPS = ['config', 'onProps', 'onStart', 'onChange', 'onPause', 'onResume', 'onRest']; -const RESERVED_PROPS = { +var DEFAULT_PROPS = [ + "config", + "onProps", + "onStart", + "onChange", + "onPause", + "onResume", + "onRest" +]; +var RESERVED_PROPS = { config: 1, from: 1, to: 1, @@ -14894,6 +28442,7 @@ const RESERVED_PROPS = { onResume: 1, onRest: 1, onResolve: 1, + // Transition props items: 1, trail: 1, sort: 1, @@ -14904,11 +28453,11 @@ const RESERVED_PROPS = { leave: 1, children: 1, onDestroyed: 1, + // Internal props keys: 1, callId: 1, parentId: 1 }; - function getForwardProps(props) { const forward = {}; let count = 0; @@ -14918,71 +28467,63 @@ function getForwardProps(props) { count++; } }); - if (count) { return forward; } } - function inferTo(props) { - const to = getForwardProps(props); - - if (to) { - const out = { - to - }; - eachProp(props, (val, key) => key in to || (out[key] = val)); + const to2 = getForwardProps(props); + if (to2) { + const out = { to: to2 }; + eachProp(props, (val, key) => key in to2 || (out[key] = val)); return out; } - - return react_spring_core_esm_extends({}, props); + return { ...props }; } function computeGoal(value) { value = getFluidValue(value); - return react_spring_shared_esm_is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals.createStringInterpolator({ + return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? globals_exports.createStringInterpolator({ range: [0, 1], output: [value, value] })(1) : value; } function hasProps(props) { - for (const _ in props) return true; - + for (const _ in props) + return true; return false; } -function isAsyncTo(to) { - return react_spring_shared_esm_is.fun(to) || react_spring_shared_esm_is.arr(to) && react_spring_shared_esm_is.obj(to[0]); +function isAsyncTo(to2) { + return is.fun(to2) || is.arr(to2) && is.obj(to2[0]); } function detachRefs(ctrl, ref) { - var _ctrl$ref; - - (_ctrl$ref = ctrl.ref) == null ? void 0 : _ctrl$ref.delete(ctrl); - ref == null ? void 0 : ref.delete(ctrl); + ctrl.ref?.delete(ctrl); + ref?.delete(ctrl); } function replaceRef(ctrl, ref) { if (ref && ctrl.ref !== ref) { - var _ctrl$ref2; - - (_ctrl$ref2 = ctrl.ref) == null ? void 0 : _ctrl$ref2.delete(ctrl); + ctrl.ref?.delete(ctrl); ref.add(ctrl); ctrl.ref = ref; } } -function useChain(refs, timeSteps, timeFrame = 1000) { +// src/hooks/useChain.ts +function useChain(refs, timeSteps, timeFrame = 1e3) { useIsomorphicLayoutEffect(() => { if (timeSteps) { let prevDelay = 0; each(refs, (ref, i) => { const controllers = ref.current; - if (controllers.length) { let delay = timeFrame * timeSteps[i]; - if (isNaN(delay)) delay = prevDelay;else prevDelay = delay; - each(controllers, ctrl => { - each(ctrl.queue, props => { + if (isNaN(delay)) + delay = prevDelay; + else + prevDelay = delay; + each(controllers, (ctrl) => { + each(ctrl.queue, (props) => { const memoizedDelayProp = props.delay; - - props.delay = key => delay + callProp(memoizedDelayProp || 0, key); + props.delay = (key) => delay + callProp(memoizedDelayProp || 0, key); }); }); ref.start(); @@ -14990,17 +28531,19 @@ function useChain(refs, timeSteps, timeFrame = 1000) { }); } else { let p = Promise.resolve(); - each(refs, ref => { + each(refs, (ref) => { const controllers = ref.current; - if (controllers.length) { - const queues = controllers.map(ctrl => { + const queues = controllers.map((ctrl) => { const q = ctrl.queue; ctrl.queue = []; return q; }); p = p.then(() => { - each(controllers, (ctrl, i) => each(queues[i] || [], update => ctrl.queue.push(update))); + each( + controllers, + (ctrl, i) => each(queues[i] || [], (update2) => ctrl.queue.push(update2)) + ); return Promise.all(ref.start()); }); } @@ -15009,208 +28552,120 @@ function useChain(refs, timeSteps, timeFrame = 1000) { }); } -const config = { - default: { - tension: 170, - friction: 26 - }, - gentle: { - tension: 120, - friction: 14 - }, - wobbly: { - tension: 180, - friction: 12 - }, - stiff: { - tension: 210, - friction: 20 - }, - slow: { - tension: 280, - friction: 60 - }, - molasses: { - tension: 280, - friction: 120 - } -}; -const c1 = 1.70158; -const c2 = c1 * 1.525; -const c3 = c1 + 1; -const c4 = 2 * Math.PI / 3; -const c5 = 2 * Math.PI / 4.5; +// src/hooks/useSpring.ts -const bounceOut = x => { - const n1 = 7.5625; - const d1 = 2.75; - if (x < 1 / d1) { - return n1 * x * x; - } else if (x < 2 / d1) { - return n1 * (x -= 1.5 / d1) * x + 0.75; - } else if (x < 2.5 / d1) { - return n1 * (x -= 2.25 / d1) * x + 0.9375; - } else { - return n1 * (x -= 2.625 / d1) * x + 0.984375; - } +// src/hooks/useSprings.ts + + + +// src/SpringValue.ts + + + +// src/AnimationConfig.ts + + +// src/constants.ts +var config = { + default: { tension: 170, friction: 26 }, + gentle: { tension: 120, friction: 14 }, + wobbly: { tension: 180, friction: 12 }, + stiff: { tension: 210, friction: 20 }, + slow: { tension: 280, friction: 60 }, + molasses: { tension: 280, friction: 120 } }; -const easings = { - linear: x => x, - easeInQuad: x => x * x, - easeOutQuad: x => 1 - (1 - x) * (1 - x), - easeInOutQuad: x => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2, - easeInCubic: x => x * x * x, - easeOutCubic: x => 1 - Math.pow(1 - x, 3), - easeInOutCubic: x => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2, - easeInQuart: x => x * x * x * x, - easeOutQuart: x => 1 - Math.pow(1 - x, 4), - easeInOutQuart: x => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2, - easeInQuint: x => x * x * x * x * x, - easeOutQuint: x => 1 - Math.pow(1 - x, 5), - easeInOutQuint: x => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2, - easeInSine: x => 1 - Math.cos(x * Math.PI / 2), - easeOutSine: x => Math.sin(x * Math.PI / 2), - easeInOutSine: x => -(Math.cos(Math.PI * x) - 1) / 2, - easeInExpo: x => x === 0 ? 0 : Math.pow(2, 10 * x - 10), - easeOutExpo: x => x === 1 ? 1 : 1 - Math.pow(2, -10 * x), - easeInOutExpo: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2, - easeInCirc: x => 1 - Math.sqrt(1 - Math.pow(x, 2)), - easeOutCirc: x => Math.sqrt(1 - Math.pow(x - 1, 2)), - easeInOutCirc: x => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2, - easeInBack: x => c3 * x * x * x - c1 * x * x, - easeOutBack: x => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2), - easeInOutBack: x => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2, - easeInElastic: x => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4), - easeOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1, - easeInOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1, - easeInBounce: x => 1 - bounceOut(1 - x), - easeOutBounce: bounceOut, - easeInOutBounce: x => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2 -}; - -const defaults = react_spring_core_esm_extends({}, config.default, { +// src/AnimationConfig.ts +var defaults = { + ...config.default, mass: 1, damping: 1, easing: easings.linear, clamp: false -}); - -class AnimationConfig { +}; +var AnimationConfig = class { constructor() { - this.tension = void 0; - this.friction = void 0; - this.frequency = void 0; - this.damping = void 0; - this.mass = void 0; + /** + * The initial velocity of one or more values. + * + * @default 0 + */ this.velocity = 0; - this.restVelocity = void 0; - this.precision = void 0; - this.progress = void 0; - this.duration = void 0; - this.easing = void 0; - this.clamp = void 0; - this.bounce = void 0; - this.decay = void 0; - this.round = void 0; Object.assign(this, defaults); } - -} -function mergeConfig(config, newConfig, defaultConfig) { +}; +function mergeConfig(config2, newConfig, defaultConfig) { if (defaultConfig) { - defaultConfig = react_spring_core_esm_extends({}, defaultConfig); + defaultConfig = { ...defaultConfig }; sanitizeConfig(defaultConfig, newConfig); - newConfig = react_spring_core_esm_extends({}, defaultConfig, newConfig); + newConfig = { ...defaultConfig, ...newConfig }; } - - sanitizeConfig(config, newConfig); - Object.assign(config, newConfig); - + sanitizeConfig(config2, newConfig); + Object.assign(config2, newConfig); for (const key in defaults) { - if (config[key] == null) { - config[key] = defaults[key]; + if (config2[key] == null) { + config2[key] = defaults[key]; } } - - let { - mass, - frequency, - damping - } = config; - - if (!react_spring_shared_esm_is.und(frequency)) { - if (frequency < 0.01) frequency = 0.01; - if (damping < 0) damping = 0; - config.tension = Math.pow(2 * Math.PI / frequency, 2) * mass; - config.friction = 4 * Math.PI * damping * mass / frequency; + let { frequency, damping } = config2; + const { mass } = config2; + if (!is.und(frequency)) { + if (frequency < 0.01) + frequency = 0.01; + if (damping < 0) + damping = 0; + config2.tension = Math.pow(2 * Math.PI / frequency, 2) * mass; + config2.friction = 4 * Math.PI * damping * mass / frequency; } - - return config; + return config2; } - -function sanitizeConfig(config, props) { - if (!react_spring_shared_esm_is.und(props.decay)) { - config.duration = undefined; +function sanitizeConfig(config2, props) { + if (!is.und(props.decay)) { + config2.duration = void 0; } else { - const isTensionConfig = !react_spring_shared_esm_is.und(props.tension) || !react_spring_shared_esm_is.und(props.friction); - - if (isTensionConfig || !react_spring_shared_esm_is.und(props.frequency) || !react_spring_shared_esm_is.und(props.damping) || !react_spring_shared_esm_is.und(props.mass)) { - config.duration = undefined; - config.decay = undefined; + const isTensionConfig = !is.und(props.tension) || !is.und(props.friction); + if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) { + config2.duration = void 0; + config2.decay = void 0; } - if (isTensionConfig) { - config.frequency = undefined; + config2.frequency = void 0; } } } -const emptyArray = []; -class Animation { +// src/Animation.ts +var emptyArray = []; +var Animation = class { constructor() { this.changed = false; this.values = emptyArray; this.toValues = null; this.fromValues = emptyArray; - this.to = void 0; - this.from = void 0; this.config = new AnimationConfig(); this.immediate = false; } +}; -} +// src/scheduleProps.ts -function scheduleProps(callId, { - key, - props, - defaultProps, - state, - actions -}) { +function scheduleProps(callId, { key, props, defaultProps, state, actions }) { return new Promise((resolve, reject) => { - var _props$cancel; - let delay; let timeout; - let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key); - + let cancel = matchProp(props.cancel ?? defaultProps?.cancel, key); if (cancel) { onStart(); } else { - if (!react_spring_shared_esm_is.und(props.pause)) { + if (!is.und(props.pause)) { state.paused = matchProp(props.pause, key); } - - let pause = defaultProps == null ? void 0 : defaultProps.pause; - + let pause = defaultProps?.pause; if (pause !== true) { pause = state.paused || matchProp(pause, key); } - delay = callProp(props.delay || 0, key); - if (pause) { state.resumeQueue.add(onResume); actions.pause(); @@ -15219,16 +28674,14 @@ function scheduleProps(callId, { onResume(); } } - function onPause() { state.resumeQueue.add(onResume); state.timeouts.delete(timeout); timeout.cancel(); delay = timeout.time - raf.now(); } - function onResume() { - if (delay > 0 && !globals.skipAnimation) { + if (delay > 0 && !globals_exports.skipAnimation) { state.delayed = true; timeout = raf.setTimeout(onStart, delay); state.pauseQueue.add(onPause); @@ -15237,24 +28690,17 @@ function scheduleProps(callId, { onStart(); } } - function onStart() { if (state.delayed) { state.delayed = false; } - state.pauseQueue.delete(onPause); state.timeouts.delete(timeout); - if (callId <= (state.cancelId || 0)) { cancel = true; } - try { - actions.start(react_spring_core_esm_extends({}, props, { - callId, - cancel - }), resolve); + actions.start({ ...props, callId, cancel }, resolve); } catch (err) { reject(err); } @@ -15262,117 +28708,115 @@ function scheduleProps(callId, { }); } -const getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some(result => result.cancelled) ? getCancelledResult(target.get()) : results.every(result => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every(result => result.finished)); -const getNoopResult = value => ({ +// src/runAsync.ts + + +// src/AnimationResult.ts +var getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some((result) => result.cancelled) ? getCancelledResult(target.get()) : results.every((result) => result.noop) ? getNoopResult(target.get()) : getFinishedResult( + target.get(), + results.every((result) => result.finished) +); +var getNoopResult = (value) => ({ value, noop: true, finished: true, cancelled: false }); -const getFinishedResult = (value, finished, cancelled = false) => ({ +var getFinishedResult = (value, finished, cancelled = false) => ({ value, finished, cancelled }); -const getCancelledResult = value => ({ +var getCancelledResult = (value) => ({ value, cancelled: true, finished: false }); -function runAsync(to, props, state, target) { - const { - callId, - parentId, - onRest - } = props; - const { - asyncTo: prevTo, - promise: prevPromise - } = state; - - if (!parentId && to === prevTo && !props.reset) { +// src/runAsync.ts +function runAsync(to2, props, state, target) { + const { callId, parentId, onRest } = props; + const { asyncTo: prevTo, promise: prevPromise } = state; + if (!parentId && to2 === prevTo && !props.reset) { return prevPromise; } - return state.promise = (async () => { state.asyncId = callId; - state.asyncTo = to; - const defaultProps = getDefaultProps(props, (value, key) => key === 'onRest' ? undefined : value); + state.asyncTo = to2; + const defaultProps = getDefaultProps( + props, + (value, key) => ( + // The `onRest` prop is only called when the `runAsync` promise is resolved. + key === "onRest" ? void 0 : value + ) + ); let preventBail; let bail; - const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject)); - - const bailIfEnded = bailSignal => { - const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false); - + const bailPromise = new Promise( + (resolve, reject) => (preventBail = resolve, bail = reject) + ); + const bailIfEnded = (bailSignal) => { + const bailResult = ( + // The `cancel` prop or `stop` method was used. + callId <= (state.cancelId || 0) && getCancelledResult(target) || // The async `to` prop was replaced. + callId !== state.asyncId && getFinishedResult(target, false) + ); if (bailResult) { bailSignal.result = bailResult; bail(bailSignal); throw bailSignal; } }; - const animate = (arg1, arg2) => { const bailSignal = new BailSignal(); - const skipAnimationSignal = new SkipAniamtionSignal(); + const skipAnimationSignal = new SkipAnimationSignal(); return (async () => { - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { stopAsync(state); skipAnimationSignal.result = getFinishedResult(target, false); bail(skipAnimationSignal); throw skipAnimationSignal; } - bailIfEnded(bailSignal); - const props = react_spring_shared_esm_is.obj(arg1) ? react_spring_core_esm_extends({}, arg1) : react_spring_core_esm_extends({}, arg2, { - to: arg1 - }); - props.parentId = callId; + const props2 = is.obj(arg1) ? { ...arg1 } : { ...arg2, to: arg1 }; + props2.parentId = callId; eachProp(defaultProps, (value, key) => { - if (react_spring_shared_esm_is.und(props[key])) { - props[key] = value; + if (is.und(props2[key])) { + props2[key] = value; } }); - const result = await target.start(props); + const result2 = await target.start(props2); bailIfEnded(bailSignal); - if (state.paused) { - await new Promise(resume => { + await new Promise((resume) => { state.resumeQueue.add(resume); }); } - - return result; + return result2; })(); }; - let result; - - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { stopAsync(state); return getFinishedResult(target, false); } - try { let animating; - - if (react_spring_shared_esm_is.arr(to)) { - animating = (async queue => { - for (const props of queue) { - await animate(props); + if (is.arr(to2)) { + animating = (async (queue) => { + for (const props2 of queue) { + await animate(props2); } - })(to); + })(to2); } else { - animating = Promise.resolve(to(animate, target.stop.bind(target))); - } - + animating = Promise.resolve(to2(animate, target.stop.bind(target))); + } await Promise.all([animating.then(preventBail), bailPromise]); result = getFinishedResult(target.get(), true, false); } catch (err) { if (err instanceof BailSignal) { result = err.result; - } else if (err instanceof SkipAniamtionSignal) { + } else if (err instanceof SkipAnimationSignal) { result = err.result; } else { throw err; @@ -15380,478 +28824,438 @@ function runAsync(to, props, state, target) { } finally { if (callId == state.asyncId) { state.asyncId = parentId; - state.asyncTo = parentId ? prevTo : undefined; - state.promise = parentId ? prevPromise : undefined; + state.asyncTo = parentId ? prevTo : void 0; + state.promise = parentId ? prevPromise : void 0; } } - - if (react_spring_shared_esm_is.fun(onRest)) { + if (is.fun(onRest)) { raf.batchedUpdates(() => { onRest(result, target, target.item); }); } - return result; })(); } function stopAsync(state, cancelId) { - flush(state.timeouts, t => t.cancel()); + flush(state.timeouts, (t) => t.cancel()); state.pauseQueue.clear(); state.resumeQueue.clear(); - state.asyncId = state.asyncTo = state.promise = undefined; - if (cancelId) state.cancelId = cancelId; + state.asyncId = state.asyncTo = state.promise = void 0; + if (cancelId) + state.cancelId = cancelId; } -class BailSignal extends Error { +var BailSignal = class extends Error { constructor() { - super('An async animation has been interrupted. You see this error because you ' + 'forgot to use `await` or `.catch(...)` on its returned promise.'); - this.result = void 0; + super( + "An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise." + ); } - -} -class SkipAniamtionSignal extends Error { +}; +var SkipAnimationSignal = class extends Error { constructor() { - super('SkipAnimationSignal'); - this.result = void 0; + super("SkipAnimationSignal"); } +}; -} +// src/FrameValue.ts -const isFrameValue = value => value instanceof FrameValue; -let nextId$1 = 1; -class FrameValue extends FluidValue { - constructor(...args) { - super(...args); - this.id = nextId$1++; - this.key = void 0; + +var isFrameValue = (value) => value instanceof FrameValue; +var nextId = 1; +var FrameValue = class extends FluidValue { + constructor() { + super(...arguments); + this.id = nextId++; this._priority = 0; } - get priority() { return this._priority; } - set priority(priority) { if (this._priority != priority) { this._priority = priority; - this._onPriorityChange(priority); } } - + /** Get the current value */ get() { const node = getAnimated(this); return node && node.getValue(); } - + /** Create a spring that maps our value to another value */ to(...args) { - return globals.to(this, args); + return globals_exports.to(this, args); } - + /** @deprecated Use the `to` method instead. */ interpolate(...args) { - react_spring_shared_esm_deprecateInterpolate(); - return globals.to(this, args); + deprecateInterpolate(); + return globals_exports.to(this, args); } - toJSON() { return this.get(); } - observerAdded(count) { - if (count == 1) this._attach(); + if (count == 1) + this._attach(); } - observerRemoved(count) { - if (count == 0) this._detach(); + if (count == 0) + this._detach(); } - - _attach() {} - - _detach() {} - + /** Called when the first child is added. */ + _attach() { + } + /** Called when the last child is removed. */ + _detach() { + } + /** Tell our children about our new value */ _onChange(value, idle = false) { callFluidObservers(this, { - type: 'change', + type: "change", parent: this, value, idle }); } - + /** Tell our children about our new priority */ _onPriorityChange(priority) { if (!this.idle) { frameLoop.sort(this); } - callFluidObservers(this, { - type: 'priority', + type: "priority", parent: this, priority }); } +}; -} +// src/SpringPhase.ts +var $P = Symbol.for("SpringPhase"); +var HAS_ANIMATED = 1; +var IS_ANIMATING = 2; +var IS_PAUSED = 4; +var hasAnimated = (target) => (target[$P] & HAS_ANIMATED) > 0; +var isAnimating = (target) => (target[$P] & IS_ANIMATING) > 0; +var isPaused = (target) => (target[$P] & IS_PAUSED) > 0; +var setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING; +var setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED; -const $P = Symbol.for('SpringPhase'); -const HAS_ANIMATED = 1; -const IS_ANIMATING = 2; -const IS_PAUSED = 4; -const hasAnimated = target => (target[$P] & HAS_ANIMATED) > 0; -const isAnimating = target => (target[$P] & IS_ANIMATING) > 0; -const isPaused = target => (target[$P] & IS_PAUSED) > 0; -const setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING; -const setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED; - -class SpringValue extends FrameValue { +// src/SpringValue.ts +var SpringValue = class extends FrameValue { constructor(arg1, arg2) { super(); - this.key = void 0; + /** The animation state */ this.animation = new Animation(); - this.queue = void 0; + /** Some props have customizable default values */ this.defaultProps = {}; + /** The state for `runAsync` calls */ this._state = { paused: false, delayed: false, - pauseQueue: new Set(), - resumeQueue: new Set(), - timeouts: new Set() + pauseQueue: /* @__PURE__ */ new Set(), + resumeQueue: /* @__PURE__ */ new Set(), + timeouts: /* @__PURE__ */ new Set() }; - this._pendingCalls = new Set(); + /** The promise resolvers of pending `start` calls */ + this._pendingCalls = /* @__PURE__ */ new Set(); + /** The counter for tracking `scheduleProps` calls */ this._lastCallId = 0; + /** The last `scheduleProps` call that changed the `to` prop */ this._lastToId = 0; this._memoizedDuration = 0; - - if (!react_spring_shared_esm_is.und(arg1) || !react_spring_shared_esm_is.und(arg2)) { - const props = react_spring_shared_esm_is.obj(arg1) ? react_spring_core_esm_extends({}, arg1) : react_spring_core_esm_extends({}, arg2, { - from: arg1 - }); - - if (react_spring_shared_esm_is.und(props.default)) { + if (!is.und(arg1) || !is.und(arg2)) { + const props = is.obj(arg1) ? { ...arg1 } : { ...arg2, from: arg1 }; + if (is.und(props.default)) { props.default = true; } - this.start(props); } } - + /** Equals true when not advancing on each frame. */ get idle() { return !(isAnimating(this) || this._state.asyncTo) || isPaused(this); } - get goal() { return getFluidValue(this.animation.to); } - get velocity() { const node = getAnimated(this); - return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map(node => node.lastVelocity || 0); + return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map((node2) => node2.lastVelocity || 0); } - + /** + * When true, this value has been animated at least once. + */ get hasAnimated() { return hasAnimated(this); } - + /** + * When true, this value has an unfinished animation, + * which is either active or paused. + */ get isAnimating() { return isAnimating(this); } - + /** + * When true, all current and future animations are paused. + */ get isPaused() { return isPaused(this); } - + /** + * + * + */ get isDelayed() { return this._state.delayed; } - + /** Advance the current animation by a number of milliseconds */ advance(dt) { let idle = true; let changed = false; const anim = this.animation; - let { - config, - toValues - } = anim; + let { toValues } = anim; + const { config: config2 } = anim; const payload = getPayload(anim.to); - if (!payload && hasFluidValue(anim.to)) { - toValues = react_spring_shared_esm_toArray(getFluidValue(anim.to)); + toValues = toArray(getFluidValue(anim.to)); } - - anim.values.forEach((node, i) => { - if (node.done) return; - const to = node.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i]; + anim.values.forEach((node2, i) => { + if (node2.done) + return; + const to2 = ( + // Animated strings always go from 0 to 1. + node2.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i] + ); let finished = anim.immediate; - let position = to; - + let position = to2; if (!finished) { - position = node.lastPosition; - - if (config.tension <= 0) { - node.done = true; + position = node2.lastPosition; + if (config2.tension <= 0) { + node2.done = true; return; } - - let elapsed = node.elapsedTime += dt; + let elapsed = node2.elapsedTime += dt; const from = anim.fromValues[i]; - const v0 = node.v0 != null ? node.v0 : node.v0 = react_spring_shared_esm_is.arr(config.velocity) ? config.velocity[i] : config.velocity; + const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i] : config2.velocity; let velocity; - - if (!react_spring_shared_esm_is.und(config.duration)) { + const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3)); + if (!is.und(config2.duration)) { let p = 1; - - if (config.duration > 0) { - if (this._memoizedDuration !== config.duration) { - this._memoizedDuration = config.duration; - - if (node.durationProgress > 0) { - node.elapsedTime = config.duration * node.durationProgress; - elapsed = node.elapsedTime += dt; + if (config2.duration > 0) { + if (this._memoizedDuration !== config2.duration) { + this._memoizedDuration = config2.duration; + if (node2.durationProgress > 0) { + node2.elapsedTime = config2.duration * node2.durationProgress; + elapsed = node2.elapsedTime += dt; } } - - p = (config.progress || 0) + elapsed / this._memoizedDuration; + p = (config2.progress || 0) + elapsed / this._memoizedDuration; p = p > 1 ? 1 : p < 0 ? 0 : p; - node.durationProgress = p; + node2.durationProgress = p; } - - position = from + config.easing(p) * (to - from); - velocity = (position - node.lastPosition) / dt; + position = from + config2.easing(p) * (to2 - from); + velocity = (position - node2.lastPosition) / dt; finished = p == 1; - } else if (config.decay) { - const decay = config.decay === true ? 0.998 : config.decay; - const e = Math.exp(-(1 - decay) * elapsed); - position = from + v0 / (1 - decay) * (1 - e); - finished = Math.abs(node.lastPosition - position) < 0.1; - velocity = v0 * e; - } else { - velocity = node.lastVelocity == null ? v0 : node.lastVelocity; - const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001)); - const restVelocity = config.restVelocity || precision / 10; - const bounceFactor = config.clamp ? 0 : config.bounce; - const canBounce = !react_spring_shared_esm_is.und(bounceFactor); - const isGrowing = from == to ? node.v0 > 0 : from < to; - let isMoving; - let isBouncing = false; - const step = 1; - const numSteps = Math.ceil(dt / step); - - for (let n = 0; n < numSteps; ++n) { - isMoving = Math.abs(velocity) > restVelocity; - - if (!isMoving) { - finished = Math.abs(to - position) <= precision; - - if (finished) { - break; - } - } - - if (canBounce) { - isBouncing = position == to || position > to == isGrowing; - - if (isBouncing) { - velocity = -velocity * bounceFactor; - position = to; - } - } - - const springForce = -config.tension * 0.000001 * (position - to); - const dampingForce = -config.friction * 0.001 * velocity; - const acceleration = (springForce + dampingForce) / config.mass; - velocity = velocity + acceleration * step; - position = position + velocity * step; + } else if (config2.decay) { + const decay = config2.decay === true ? 0.998 : config2.decay; + const e = Math.exp(-(1 - decay) * elapsed); + position = from + v0 / (1 - decay) * (1 - e); + finished = Math.abs(node2.lastPosition - position) <= precision; + velocity = v0 * e; + } else { + velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity; + const restVelocity = config2.restVelocity || precision / 10; + const bounceFactor = config2.clamp ? 0 : config2.bounce; + const canBounce = !is.und(bounceFactor); + const isGrowing = from == to2 ? node2.v0 > 0 : from < to2; + let isMoving; + let isBouncing = false; + const step = 1; + const numSteps = Math.ceil(dt / step); + for (let n = 0; n < numSteps; ++n) { + isMoving = Math.abs(velocity) > restVelocity; + if (!isMoving) { + finished = Math.abs(to2 - position) <= precision; + if (finished) { + break; } } - - node.lastVelocity = velocity; - + if (canBounce) { + isBouncing = position == to2 || position > to2 == isGrowing; + if (isBouncing) { + velocity = -velocity * bounceFactor; + position = to2; + } + } + const springForce = -config2.tension * 1e-6 * (position - to2); + const dampingForce = -config2.friction * 1e-3 * velocity; + const acceleration = (springForce + dampingForce) / config2.mass; + velocity = velocity + acceleration * step; + position = position + velocity * step; + } + } + node2.lastVelocity = velocity; if (Number.isNaN(position)) { console.warn(`Got NaN while animating:`, this); finished = true; } } - if (payload && !payload[i].done) { finished = false; } - if (finished) { - node.done = true; + node2.done = true; } else { idle = false; } - - if (node.setValue(position, config.round)) { + if (node2.setValue(position, config2.round)) { changed = true; } }); const node = getAnimated(this); const currVal = node.getValue(); - if (idle) { const finalVal = getFluidValue(anim.to); - - if ((currVal !== finalVal || changed) && !config.decay) { + if ((currVal !== finalVal || changed) && !config2.decay) { node.setValue(finalVal); - this._onChange(finalVal); - } else if (changed && config.decay) { + } else if (changed && config2.decay) { this._onChange(currVal); } - this._stop(); } else if (changed) { this._onChange(currVal); } } - + /** Set the current value, while stopping the current animation */ set(value) { raf.batchedUpdates(() => { this._stop(); - this._focus(value); - this._set(value); }); return this; } - + /** + * Freeze the active animation in time, as well as any updates merged + * before `resume` is called. + */ pause() { - this._update({ - pause: true - }); + this._update({ pause: true }); } - + /** Resume the animation if paused. */ resume() { - this._update({ - pause: false - }); + this._update({ pause: false }); } - + /** Skip to the end of the current animation. */ finish() { if (isAnimating(this)) { - const { - to, - config - } = this.animation; + const { to: to2, config: config2 } = this.animation; raf.batchedUpdates(() => { this._onStart(); - - if (!config.decay) { - this._set(to, false); + if (!config2.decay) { + this._set(to2, false); } - this._stop(); }); } - return this; } - + /** Push props into the pending queue. */ update(props) { const queue = this.queue || (this.queue = []); queue.push(props); return this; } - - start(to, arg2) { + start(to2, arg2) { let queue; - - if (!react_spring_shared_esm_is.und(to)) { - queue = [react_spring_shared_esm_is.obj(to) ? to : react_spring_core_esm_extends({}, arg2, { - to - })]; + if (!is.und(to2)) { + queue = [is.obj(to2) ? to2 : { ...arg2, to: to2 }]; } else { queue = this.queue || []; this.queue = []; } - - return Promise.all(queue.map(props => { - const up = this._update(props); - - return up; - })).then(results => getCombinedResult(this, results)); + return Promise.all( + queue.map((props) => { + const up = this._update(props); + return up; + }) + ).then((results) => getCombinedResult(this, results)); } - + /** + * Stop the current animation, and cancel any delayed updates. + * + * Pass `true` to call `onRest` with `cancelled: true`. + */ stop(cancel) { - const { - to - } = this.animation; - + const { to: to2 } = this.animation; this._focus(this.get()); - stopAsync(this._state, cancel && this._lastCallId); - raf.batchedUpdates(() => this._stop(to, cancel)); + raf.batchedUpdates(() => this._stop(to2, cancel)); return this; } - + /** Restart the animation. */ reset() { - this._update({ - reset: true - }); + this._update({ reset: true }); } - + /** @internal */ eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { this._start(); - } else if (event.type == 'priority') { + } else if (event.type == "priority") { this.priority = event.priority + 1; } } - + /** + * Parse the `to` and `from` range from the given `props` object. + * + * This also ensures the initial value is available to animated components + * during the render phase. + */ _prepareNode(props) { - const key = this.key || ''; - let { - to, - from - } = props; - to = react_spring_shared_esm_is.obj(to) ? to[key] : to; - - if (to == null || isAsyncTo(to)) { - to = undefined; + const key = this.key || ""; + let { to: to2, from } = props; + to2 = is.obj(to2) ? to2[key] : to2; + if (to2 == null || isAsyncTo(to2)) { + to2 = void 0; } - - from = react_spring_shared_esm_is.obj(from) ? from[key] : from; - + from = is.obj(from) ? from[key] : from; if (from == null) { - from = undefined; + from = void 0; } - - const range = { - to, - from - }; - + const range = { to: to2, from }; if (!hasAnimated(this)) { - if (props.reverse) [to, from] = [from, to]; + if (props.reverse) + [to2, from] = [from, to2]; from = getFluidValue(from); - - if (!react_spring_shared_esm_is.und(from)) { + if (!is.und(from)) { this._set(from); } else if (!getAnimated(this)) { - this._set(to); - } + this._set(to2); + } } - return range; } - - _update(_ref, isLoop) { - let props = react_spring_core_esm_extends({}, _ref); - - const { - key, - defaultProps - } = this; - if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value)); - mergeActiveFn(this, props, 'onProps'); - sendEvent(this, 'onProps', props, this); - + /** Every update is processed by this method before merging. */ + _update({ ...props }, isLoop) { + const { key, defaultProps } = this; + if (props.default) + Object.assign( + defaultProps, + getDefaultProps( + props, + (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value + ) + ); + mergeActiveFn(this, props, "onProps"); + sendEvent(this, "onProps", props, this); const range = this._prepareNode(props); - if (Object.isFrozen(this)) { - throw Error('Cannot animate a `SpringValue` object that is frozen. ' + 'Did you forget to pass your component to `animated(...)` before animating its props?'); + throw Error( + "Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?" + ); } - const state = this._state; return scheduleProps(++this._lastCallId, { key, @@ -15863,45 +29267,49 @@ class SpringValue extends FrameValue { if (!isPaused(this)) { setPausedBit(this, true); flushCalls(state.pauseQueue); - sendEvent(this, 'onPause', getFinishedResult(this, checkFinished(this, this.animation.to)), this); + sendEvent( + this, + "onPause", + getFinishedResult(this, checkFinished(this, this.animation.to)), + this + ); } }, resume: () => { if (isPaused(this)) { setPausedBit(this, false); - if (isAnimating(this)) { this._resume(); } - flushCalls(state.resumeQueue); - sendEvent(this, 'onResume', getFinishedResult(this, checkFinished(this, this.animation.to)), this); + sendEvent( + this, + "onResume", + getFinishedResult(this, checkFinished(this, this.animation.to)), + this + ); } }, start: this._merge.bind(this, range) } - }).then(result => { + }).then((result) => { if (props.loop && result.finished && !(isLoop && result.noop)) { const nextProps = createLoopUpdate(props); - if (nextProps) { return this._update(nextProps, true); } } - return result; }); } - + /** Merge props into the current animation */ _merge(range, props, resolve) { if (props.cancel) { this.stop(true); return resolve(getCancelledResult(this)); } - - const hasToProp = !react_spring_shared_esm_is.und(range.to); - const hasFromProp = !react_spring_shared_esm_is.und(range.from); - + const hasToProp = !is.und(range.to); + const hasFromProp = !is.und(range.from); if (hasToProp || hasFromProp) { if (props.callId > this._lastToId) { this._lastToId = props.callId; @@ -15909,213 +29317,169 @@ class SpringValue extends FrameValue { return resolve(getCancelledResult(this)); } } - - const { - key, - defaultProps, - animation: anim - } = this; - const { - to: prevTo, - from: prevFrom - } = anim; - let { - to = prevTo, - from = prevFrom - } = range; - - if (hasFromProp && !hasToProp && (!props.default || react_spring_shared_esm_is.und(to))) { - to = from; + const { key, defaultProps, animation: anim } = this; + const { to: prevTo, from: prevFrom } = anim; + let { to: to2 = prevTo, from = prevFrom } = range; + if (hasFromProp && !hasToProp && (!props.default || is.und(to2))) { + to2 = from; } - - if (props.reverse) [to, from] = [from, to]; + if (props.reverse) + [to2, from] = [from, to2]; const hasFromChanged = !isEqual(from, prevFrom); - if (hasFromChanged) { anim.from = from; } - from = getFluidValue(from); - const hasToChanged = !isEqual(to, prevTo); - + const hasToChanged = !isEqual(to2, prevTo); if (hasToChanged) { - this._focus(to); + this._focus(to2); } - const hasAsyncTo = isAsyncTo(props.to); - const { - config - } = anim; - const { - decay, - velocity - } = config; - + const { config: config2 } = anim; + const { decay, velocity } = config2; if (hasToProp || hasFromProp) { - config.velocity = 0; + config2.velocity = 0; } - if (props.config && !hasAsyncTo) { - mergeConfig(config, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0); + mergeConfig( + config2, + callProp(props.config, key), + // Avoid calling the same "config" prop twice. + props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0 + ); } - let node = getAnimated(this); - - if (!node || react_spring_shared_esm_is.und(to)) { + if (!node || is.und(to2)) { return resolve(getFinishedResult(this, true)); } - - const reset = react_spring_shared_esm_is.und(props.reset) ? hasFromProp && !props.default : !react_spring_shared_esm_is.und(from) && matchProp(props.reset, key); + const reset = ( + // When `reset` is undefined, the `from` prop implies `reset: true`, + // except for declarative updates. When `reset` is defined, there + // must exist a value to animate from. + is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key) + ); const value = reset ? from : this.get(); - const goal = computeGoal(to); - const isAnimatable = react_spring_shared_esm_is.num(goal) || react_spring_shared_esm_is.arr(goal) || isAnimatedString(goal); + const goal = computeGoal(to2); + const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal); const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key)); - if (hasToChanged) { - const nodeType = getAnimatedType(to); - + const nodeType = getAnimatedType(to2); if (nodeType !== node.constructor) { if (immediate) { node = this._set(goal); - } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests`); + } else + throw Error( + `Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the "to" prop suggests` + ); } } - const goalType = node.constructor; - let started = hasFluidValue(to); + let started = hasFluidValue(to2); let finished = false; - if (!started) { const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged; - if (hasToChanged || hasValueChanged) { finished = isEqual(computeGoal(value), goal); started = !finished; } - - if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config.decay, decay) || !isEqual(config.velocity, velocity)) { + if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config2.decay, decay) || !isEqual(config2.velocity, velocity)) { started = true; } } - if (finished && isAnimating(this)) { if (anim.changed && !reset) { started = true; } else if (!started) { - this._stop(prevTo); - } + this._stop(prevTo); + } } - if (!hasAsyncTo) { if (started || hasFluidValue(prevTo)) { anim.values = node.getPayload(); - anim.toValues = hasFluidValue(to) ? null : goalType == AnimatedString ? [1] : react_spring_shared_esm_toArray(goal); + anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal); } - if (anim.immediate != immediate) { anim.immediate = immediate; - if (!immediate && !reset) { this._set(prevTo); } } - if (started) { - const { - onRest - } = anim; - react_spring_shared_esm_each(ACTIVE_EVENTS, type => mergeActiveFn(this, props, type)); + const { onRest } = anim; + react_spring_shared_modern_each(ACTIVE_EVENTS, (type) => mergeActiveFn(this, props, type)); const result = getFinishedResult(this, checkFinished(this, prevTo)); flushCalls(this._pendingCalls, result); - this._pendingCalls.add(resolve); - - if (anim.changed) raf.batchedUpdates(() => { - anim.changed = !reset; - onRest == null ? void 0 : onRest(result, this); - - if (reset) { - callProp(defaultProps.onRest, result); - } else { - anim.onStart == null ? void 0 : anim.onStart(result, this); + if (anim.changed) + raf.batchedUpdates(() => { + anim.changed = !reset; + onRest?.(result, this); + if (reset) { + callProp(defaultProps.onRest, result); + } else { + anim.onStart?.(result, this); } - }); + }); } } - if (reset) { this._set(value); } - if (hasAsyncTo) { resolve(runAsync(props.to, props, this._state, this)); } else if (started) { - this._start(); - } else if (isAnimating(this) && !hasToChanged) { - this._pendingCalls.add(resolve); - } else { - resolve(getNoopResult(value)); - } + this._start(); + } else if (isAnimating(this) && !hasToChanged) { + this._pendingCalls.add(resolve); + } else { + resolve(getNoopResult(value)); + } } - + /** Update the `animation.to` value, which might be a `FluidValue` */ _focus(value) { const anim = this.animation; - if (value !== anim.to) { if (getFluidObservers(this)) { this._detach(); } - anim.to = value; - if (getFluidObservers(this)) { this._attach(); } } } - _attach() { let priority = 0; - const { - to - } = this.animation; - - if (hasFluidValue(to)) { - addFluidObserver(to, this); - - if (isFrameValue(to)) { - priority = to.priority + 1; + const { to: to2 } = this.animation; + if (hasFluidValue(to2)) { + addFluidObserver(to2, this); + if (isFrameValue(to2)) { + priority = to2.priority + 1; } } - this.priority = priority; } - _detach() { - const { - to - } = this.animation; - - if (hasFluidValue(to)) { - removeFluidObserver(to, this); + const { to: to2 } = this.animation; + if (hasFluidValue(to2)) { + removeFluidObserver(to2, this); } } - + /** + * Update the current value from outside the frameloop, + * and return the `Animated` node. + */ _set(arg, idle = true) { const value = getFluidValue(arg); - - if (!react_spring_shared_esm_is.und(value)) { + if (!is.und(value)) { const oldNode = getAnimated(this); - if (!oldNode || !isEqual(value, oldNode.getValue())) { const nodeType = getAnimatedType(value); - if (!oldNode || oldNode.constructor != nodeType) { setAnimated(this, nodeType.create(value)); } else { oldNode.setValue(value); } - if (oldNode) { raf.batchedUpdates(() => { this._onChange(value, idle); @@ -16123,477 +29487,442 @@ class SpringValue extends FrameValue { } } } - return getAnimated(this); } - _onStart() { const anim = this.animation; - if (!anim.changed) { anim.changed = true; - sendEvent(this, 'onStart', getFinishedResult(this, checkFinished(this, anim.to)), this); + sendEvent( + this, + "onStart", + getFinishedResult(this, checkFinished(this, anim.to)), + this + ); } } - _onChange(value, idle) { if (!idle) { this._onStart(); - callProp(this.animation.onChange, value, this); } - callProp(this.defaultProps.onChange, value, this); - super._onChange(value, idle); } - + // This method resets the animation state (even if already animating) to + // ensure the latest from/to range is used, and it also ensures this spring + // is added to the frameloop. _start() { const anim = this.animation; getAnimated(this).reset(getFluidValue(anim.to)); - if (!anim.immediate) { - anim.fromValues = anim.values.map(node => node.lastPosition); + anim.fromValues = anim.values.map((node) => node.lastPosition); } - if (!isAnimating(this)) { setActiveBit(this, true); - if (!isPaused(this)) { this._resume(); } } } - _resume() { - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { this.finish(); } else { frameLoop.start(this); } } - + /** + * Exit the frameloop and notify `onRest` listeners. + * + * Always wrap `_stop` calls with `batchedUpdates`. + */ _stop(goal, cancel) { if (isAnimating(this)) { setActiveBit(this, false); const anim = this.animation; - react_spring_shared_esm_each(anim.values, node => { + react_spring_shared_modern_each(anim.values, (node) => { node.done = true; }); - if (anim.toValues) { - anim.onChange = anim.onPause = anim.onResume = undefined; + anim.onChange = anim.onPause = anim.onResume = void 0; } - callFluidObservers(this, { - type: 'idle', + type: "idle", parent: this }); - const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to)); + const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal ?? anim.to)); flushCalls(this._pendingCalls, result); - if (anim.changed) { anim.changed = false; - sendEvent(this, 'onRest', result, this); + sendEvent(this, "onRest", result, this); } } } - -} - -function checkFinished(target, to) { - const goal = computeGoal(to); +}; +function checkFinished(target, to2) { + const goal = computeGoal(to2); const value = computeGoal(target.get()); return isEqual(value, goal); } - -function createLoopUpdate(props, loop = props.loop, to = props.to) { - let loopRet = callProp(loop); - +function createLoopUpdate(props, loop = props.loop, to2 = props.to) { + const loopRet = callProp(loop); if (loopRet) { const overrides = loopRet !== true && inferTo(loopRet); const reverse = (overrides || props).reverse; const reset = !overrides || overrides.reset; - return createUpdate(react_spring_core_esm_extends({}, props, { + return createUpdate({ + ...props, loop, + // Avoid updating default props when looping. default: false, - pause: undefined, - to: !reverse || isAsyncTo(to) ? to : undefined, - from: reset ? props.from : undefined, - reset - }, overrides)); + // Never loop the `pause` prop. + pause: void 0, + // For the "reverse" prop to loop as expected, the "to" prop + // must be undefined. The "reverse" prop is ignored when the + // "to" prop is an array or function. + to: !reverse || isAsyncTo(to2) ? to2 : void 0, + // Ignore the "from" prop except on reset. + from: reset ? props.from : void 0, + reset, + // The "loop" prop can return a "useSpring" props object to + // override any of the original props. + ...overrides + }); } } function createUpdate(props) { - const { - to, - from - } = props = inferTo(props); - const keys = new Set(); - if (react_spring_shared_esm_is.obj(to)) findDefined(to, keys); - if (react_spring_shared_esm_is.obj(from)) findDefined(from, keys); + const { to: to2, from } = props = inferTo(props); + const keys = /* @__PURE__ */ new Set(); + if (is.obj(to2)) + findDefined(to2, keys); + if (is.obj(from)) + findDefined(from, keys); props.keys = keys.size ? Array.from(keys) : null; return props; } function declareUpdate(props) { - const update = createUpdate(props); - - if (react_spring_shared_esm_is.und(update.default)) { - update.default = getDefaultProps(update); + const update2 = createUpdate(props); + if (is.und(update2.default)) { + update2.default = getDefaultProps(update2); } - - return update; + return update2; } - function findDefined(values, keys) { eachProp(values, (value, key) => value != null && keys.add(key)); } - -const ACTIVE_EVENTS = ['onStart', 'onRest', 'onChange', 'onPause', 'onResume']; - +var ACTIVE_EVENTS = [ + "onStart", + "onRest", + "onChange", + "onPause", + "onResume" +]; function mergeActiveFn(target, props, type) { - target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : undefined; + target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : void 0; } - function sendEvent(target, type, ...args) { - var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps; - - (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args); - (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args); + target.animation[type]?.(...args); + target.defaultProps[type]?.(...args); } -const BATCHED_EVENTS = ['onStart', 'onChange', 'onRest']; -let nextId = 1; -class Controller { - constructor(props, flush) { - this.id = nextId++; +// src/Controller.ts + +var BATCHED_EVENTS = ["onStart", "onChange", "onRest"]; +var nextId2 = 1; +var Controller = class { + constructor(props, flush3) { + this.id = nextId2++; + /** The animated values */ this.springs = {}; + /** The queue of props passed to the `update` method. */ this.queue = []; - this.ref = void 0; - this._flush = void 0; - this._initialProps = void 0; + /** The counter for tracking `scheduleProps` calls */ this._lastAsyncId = 0; - this._active = new Set(); - this._changed = new Set(); + /** The values currently being animated */ + this._active = /* @__PURE__ */ new Set(); + /** The values that changed recently */ + this._changed = /* @__PURE__ */ new Set(); + /** Equals false when `onStart` listeners can be called */ this._started = false; - this._item = void 0; + /** State used by the `runAsync` function */ this._state = { paused: false, - pauseQueue: new Set(), - resumeQueue: new Set(), - timeouts: new Set() + pauseQueue: /* @__PURE__ */ new Set(), + resumeQueue: /* @__PURE__ */ new Set(), + timeouts: /* @__PURE__ */ new Set() }; + /** The event queues that are flushed once per frame maximum */ this._events = { - onStart: new Map(), - onChange: new Map(), - onRest: new Map() + onStart: /* @__PURE__ */ new Map(), + onChange: /* @__PURE__ */ new Map(), + onRest: /* @__PURE__ */ new Map() }; this._onFrame = this._onFrame.bind(this); - - if (flush) { - this._flush = flush; + if (flush3) { + this._flush = flush3; } - if (props) { - this.start(react_spring_core_esm_extends({ - default: true - }, props)); + this.start({ default: true, ...props }); } } - + /** + * Equals `true` when no spring values are in the frameloop, and + * no async animation is currently active. + */ get idle() { - return !this._state.asyncTo && Object.values(this.springs).every(spring => { + return !this._state.asyncTo && Object.values(this.springs).every((spring) => { return spring.idle && !spring.isDelayed && !spring.isPaused; }); } - get item() { return this._item; } - set item(item) { this._item = item; } - + /** Get the current values of our springs */ get() { const values = {}; this.each((spring, key) => values[key] = spring.get()); return values; } - + /** Set the current values without animating. */ set(values) { for (const key in values) { const value = values[key]; - - if (!react_spring_shared_esm_is.und(value)) { + if (!is.und(value)) { this.springs[key].set(value); } } } - + /** Push an update onto the queue of each value. */ update(props) { if (props) { this.queue.push(createUpdate(props)); } - return this; } - + /** + * Start the queued animations for every spring, and resolve the returned + * promise once all queued animations have finished or been cancelled. + * + * When you pass a queue (instead of nothing), that queue is used instead of + * the queued animations added with the `update` method, which are left alone. + */ start(props) { - let { - queue - } = this; - + let { queue } = this; if (props) { - queue = react_spring_shared_esm_toArray(props).map(createUpdate); + queue = toArray(props).map(createUpdate); } else { this.queue = []; } - if (this._flush) { return this._flush(this, queue); } - prepareKeys(this, queue); return flushUpdateQueue(this, queue); } - + /** @internal */ stop(arg, keys) { if (arg !== !!arg) { keys = arg; } - if (keys) { const springs = this.springs; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(keys), key => springs[key].stop(!!arg)); + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].stop(!!arg)); } else { stopAsync(this._state, this._lastAsyncId); - this.each(spring => spring.stop(!!arg)); + this.each((spring) => spring.stop(!!arg)); } - return this; } - + /** Freeze the active animation in time */ pause(keys) { - if (react_spring_shared_esm_is.und(keys)) { - this.start({ - pause: true - }); + if (is.und(keys)) { + this.start({ pause: true }); } else { const springs = this.springs; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(keys), key => springs[key].pause()); + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].pause()); } - return this; } - + /** Resume the animation if paused. */ resume(keys) { - if (react_spring_shared_esm_is.und(keys)) { - this.start({ - pause: false - }); + if (is.und(keys)) { + this.start({ pause: false }); } else { const springs = this.springs; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(keys), key => springs[key].resume()); + react_spring_shared_modern_each(toArray(keys), (key) => springs[key].resume()); } - return this; } - + /** Call a function once per spring value */ each(iterator) { eachProp(this.springs, iterator); } - + /** @internal Called at the end of every animation frame */ _onFrame() { - const { - onStart, - onChange, - onRest - } = this._events; + const { onStart, onChange, onRest } = this._events; const active = this._active.size > 0; const changed = this._changed.size > 0; - if (active && !this._started || changed && !this._started) { this._started = true; - flush(onStart, ([onStart, result]) => { + flush(onStart, ([onStart2, result]) => { result.value = this.get(); - onStart(result, this, this._item); + onStart2(result, this, this._item); }); } - const idle = !active && this._started; const values = changed || idle && onRest.size ? this.get() : null; - if (changed && onChange.size) { - flush(onChange, ([onChange, result]) => { + flush(onChange, ([onChange2, result]) => { result.value = values; - onChange(result, this, this._item); + onChange2(result, this, this._item); }); } - if (idle) { this._started = false; - flush(onRest, ([onRest, result]) => { + flush(onRest, ([onRest2, result]) => { result.value = values; - onRest(result, this, this._item); + onRest2(result, this, this._item); }); } } - + /** @internal */ eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { this._changed.add(event.parent); - if (!event.idle) { this._active.add(event.parent); } - } else if (event.type == 'idle') { + } else if (event.type == "idle") { this._active.delete(event.parent); - } else return; - + } else + return; raf.onFrame(this._onFrame); } - -} +}; function flushUpdateQueue(ctrl, queue) { - return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(results => getCombinedResult(ctrl, results)); + return Promise.all(queue.map((props) => flushUpdate(ctrl, props))).then( + (results) => getCombinedResult(ctrl, results) + ); } async function flushUpdate(ctrl, props, isLoop) { - const { - keys, - to, - from, - loop, - onRest, - onResolve - } = props; - const defaults = react_spring_shared_esm_is.obj(props.default) && props.default; - + const { keys, to: to2, from, loop, onRest, onResolve } = props; + const defaults2 = is.obj(props.default) && props.default; if (loop) { props.loop = false; } - - if (to === false) props.to = null; - if (from === false) props.from = null; - const asyncTo = react_spring_shared_esm_is.arr(to) || react_spring_shared_esm_is.fun(to) ? to : undefined; - + if (to2 === false) + props.to = null; + if (from === false) + props.from = null; + const asyncTo = is.arr(to2) || is.fun(to2) ? to2 : void 0; if (asyncTo) { - props.to = undefined; - props.onRest = undefined; - - if (defaults) { - defaults.onRest = undefined; + props.to = void 0; + props.onRest = void 0; + if (defaults2) { + defaults2.onRest = void 0; } } else { - react_spring_shared_esm_each(BATCHED_EVENTS, key => { - const handler = props[key]; - - if (react_spring_shared_esm_is.fun(handler)) { - const queue = ctrl['_events'][key]; - - props[key] = ({ - finished, - cancelled - }) => { - const result = queue.get(handler); - - if (result) { - if (!finished) result.finished = false; - if (cancelled) result.cancelled = true; - } else { - queue.set(handler, { - value: null, - finished: finished || false, - cancelled: cancelled || false - }); - } - }; - - if (defaults) { - defaults[key] = props[key]; + react_spring_shared_modern_each(BATCHED_EVENTS, (key) => { + const handler = props[key]; + if (is.fun(handler)) { + const queue = ctrl["_events"][key]; + props[key] = ({ finished, cancelled }) => { + const result2 = queue.get(handler); + if (result2) { + if (!finished) + result2.finished = false; + if (cancelled) + result2.cancelled = true; + } else { + queue.set(handler, { + value: null, + finished: finished || false, + cancelled: cancelled || false + }); } + }; + if (defaults2) { + defaults2[key] = props[key]; } - }); - } - - const state = ctrl['_state']; - + } + }); + } + const state = ctrl["_state"]; if (props.pause === !state.paused) { state.paused = props.pause; flushCalls(props.pause ? state.pauseQueue : state.resumeQueue); } else if (state.paused) { - props.pause = true; - } - - const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props)); - const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true; - + props.pause = true; + } + const promises = (keys || Object.keys(ctrl.springs)).map( + (key) => ctrl.springs[key].start(props) + ); + const cancel = props.cancel === true || getDefaultProp(props, "cancel") === true; if (asyncTo || cancel && state.asyncId) { - promises.push(scheduleProps(++ctrl['_lastAsyncId'], { - props, - state, - actions: { - pause: noop, - resume: noop, - - start(props, resolve) { - if (cancel) { - stopAsync(state, ctrl['_lastAsyncId']); - resolve(getCancelledResult(ctrl)); - } else { - props.onRest = onRest; - resolve(runAsync(asyncTo, props, state, ctrl)); + promises.push( + scheduleProps(++ctrl["_lastAsyncId"], { + props, + state, + actions: { + pause: noop, + resume: noop, + start(props2, resolve) { + if (cancel) { + stopAsync(state, ctrl["_lastAsyncId"]); + resolve(getCancelledResult(ctrl)); + } else { + props2.onRest = onRest; + resolve( + runAsync( + asyncTo, + props2, + state, + ctrl + ) + ); + } } } - - } - })); + }) + ); } - if (state.paused) { - await new Promise(resume => { + await new Promise((resume) => { state.resumeQueue.add(resume); }); } - const result = getCombinedResult(ctrl, await Promise.all(promises)); - if (loop && result.finished && !(isLoop && result.noop)) { - const nextProps = createLoopUpdate(props, loop, to); - + const nextProps = createLoopUpdate(props, loop, to2); if (nextProps) { prepareKeys(ctrl, [nextProps]); return flushUpdate(ctrl, nextProps, true); } } - if (onResolve) { raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item)); } - return result; } function getSprings(ctrl, props) { - const springs = react_spring_core_esm_extends({}, ctrl.springs); - + const springs = { ...ctrl.springs }; if (props) { - react_spring_shared_esm_each(react_spring_shared_esm_toArray(props), props => { - if (react_spring_shared_esm_is.und(props.keys)) { - props = createUpdate(props); + react_spring_shared_modern_each(toArray(props), (props2) => { + if (is.und(props2.keys)) { + props2 = createUpdate(props2); } - - if (!react_spring_shared_esm_is.obj(props.to)) { - props = react_spring_core_esm_extends({}, props, { - to: undefined - }); + if (!is.obj(props2.to)) { + props2 = { ...props2, to: void 0 }; } - - prepareSprings(springs, props, key => { + prepareSprings(springs, props2, (key) => { return createSpring(key); }); }); } - setSprings(ctrl, springs); return springs; } @@ -16605,75 +29934,47 @@ function setSprings(ctrl, springs) { } }); } - function createSpring(key, observer) { const spring = new SpringValue(); spring.key = key; - if (observer) { addFluidObserver(spring, observer); } - return spring; } - function prepareSprings(springs, props, create) { if (props.keys) { - react_spring_shared_esm_each(props.keys, key => { + react_spring_shared_modern_each(props.keys, (key) => { const spring = springs[key] || (springs[key] = create(key)); - spring['_prepareNode'](props); + spring["_prepareNode"](props); }); } } - function prepareKeys(ctrl, queue) { - react_spring_shared_esm_each(queue, props => { - prepareSprings(ctrl.springs, props, key => { + react_spring_shared_modern_each(queue, (props) => { + prepareSprings(ctrl.springs, props, (key) => { return createSpring(key, ctrl); }); }); } -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; +// src/SpringContext.tsx - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - return target; -} - -const _excluded$3 = ["children"]; -const SpringContext = _ref => { - let { - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded$3); +var SpringContext = ({ + children, + ...props +}) => { const inherited = (0,external_React_.useContext)(ctx); - const pause = props.pause || !!inherited.pause, - immediate = props.immediate || !!inherited.immediate; - props = useMemoOne(() => ({ - pause, - immediate - }), [pause, immediate]); - const { - Provider - } = ctx; - return external_React_.createElement(Provider, { - value: props - }, children); + const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate; + props = useMemoOne(() => ({ pause, immediate }), [pause, immediate]); + const { Provider } = ctx; + return /* @__PURE__ */ external_React_.createElement(Provider, { value: props }, children); }; -const ctx = makeContext(SpringContext, {}); +var ctx = makeContext(SpringContext, {}); SpringContext.Provider = ctx.Provider; SpringContext.Consumer = ctx.Consumer; - function makeContext(target, init) { Object.assign(target, external_React_.createContext(init)); target.Provider._context = target; @@ -16681,115 +29982,115 @@ function makeContext(target, init) { return target; } -const SpringRef = () => { - const current = []; +// src/SpringRef.ts - const SpringRef = function SpringRef(props) { +var SpringRef = () => { + const current = []; + const SpringRef2 = function(props) { deprecateDirectCall(); const results = []; - react_spring_shared_esm_each(current, (ctrl, i) => { - if (react_spring_shared_esm_is.und(props)) { + react_spring_shared_modern_each(current, (ctrl, i) => { + if (is.und(props)) { results.push(ctrl.start()); } else { - const update = _getProps(props, ctrl, i); - - if (update) { - results.push(ctrl.start(update)); + const update2 = _getProps(props, ctrl, i); + if (update2) { + results.push(ctrl.start(update2)); } } }); return results; }; - - SpringRef.current = current; - - SpringRef.add = function (ctrl) { + SpringRef2.current = current; + SpringRef2.add = function(ctrl) { if (!current.includes(ctrl)) { current.push(ctrl); } }; - - SpringRef.delete = function (ctrl) { + SpringRef2.delete = function(ctrl) { const i = current.indexOf(ctrl); - if (~i) current.splice(i, 1); + if (~i) + current.splice(i, 1); }; - - SpringRef.pause = function () { - react_spring_shared_esm_each(current, ctrl => ctrl.pause(...arguments)); + SpringRef2.pause = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.pause(...arguments)); return this; }; - - SpringRef.resume = function () { - react_spring_shared_esm_each(current, ctrl => ctrl.resume(...arguments)); + SpringRef2.resume = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.resume(...arguments)); return this; }; - - SpringRef.set = function (values) { - react_spring_shared_esm_each(current, ctrl => ctrl.set(values)); + SpringRef2.set = function(values) { + react_spring_shared_modern_each(current, (ctrl, i) => { + const update2 = is.fun(values) ? values(i, ctrl) : values; + if (update2) { + ctrl.set(update2); + } + }); }; - - SpringRef.start = function (props) { + SpringRef2.start = function(props) { const results = []; - react_spring_shared_esm_each(current, (ctrl, i) => { - if (react_spring_shared_esm_is.und(props)) { + react_spring_shared_modern_each(current, (ctrl, i) => { + if (is.und(props)) { results.push(ctrl.start()); } else { - const update = this._getProps(props, ctrl, i); - - if (update) { - results.push(ctrl.start(update)); + const update2 = this._getProps(props, ctrl, i); + if (update2) { + results.push(ctrl.start(update2)); } } }); return results; }; - - SpringRef.stop = function () { - react_spring_shared_esm_each(current, ctrl => ctrl.stop(...arguments)); + SpringRef2.stop = function() { + react_spring_shared_modern_each(current, (ctrl) => ctrl.stop(...arguments)); return this; }; - - SpringRef.update = function (props) { - react_spring_shared_esm_each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i))); + SpringRef2.update = function(props) { + react_spring_shared_modern_each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i))); return this; }; - - const _getProps = function _getProps(arg, ctrl, index) { - return react_spring_shared_esm_is.fun(arg) ? arg(index, ctrl) : arg; + const _getProps = function(arg, ctrl, index) { + return is.fun(arg) ? arg(index, ctrl) : arg; }; - - SpringRef._getProps = _getProps; - return SpringRef; + SpringRef2._getProps = _getProps; + return SpringRef2; }; +// src/hooks/useSprings.ts function useSprings(length, props, deps) { - const propsFn = react_spring_shared_esm_is.fun(props) && props; - if (propsFn && !deps) deps = []; - const ref = (0,external_React_.useMemo)(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []); + const propsFn = is.fun(props) && props; + if (propsFn && !deps) + deps = []; + const ref = (0,external_React_.useMemo)( + () => propsFn || arguments.length == 3 ? SpringRef() : void 0, + [] + ); const layoutId = (0,external_React_.useRef)(0); - const forceUpdate = react_spring_shared_esm_useForceUpdate(); - const state = (0,external_React_.useMemo)(() => ({ - ctrls: [], - queue: [], - - flush(ctrl, updates) { - const springs = getSprings(ctrl, updates); - const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs).some(key => !ctrl.springs[key]); - return canFlushSync ? flushUpdateQueue(ctrl, updates) : new Promise(resolve => { - setSprings(ctrl, springs); - state.queue.push(() => { - resolve(flushUpdateQueue(ctrl, updates)); + const forceUpdate = useForceUpdate(); + const state = (0,external_React_.useMemo)( + () => ({ + ctrls: [], + queue: [], + flush(ctrl, updates2) { + const springs2 = getSprings(ctrl, updates2); + const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs2).some((key) => !ctrl.springs[key]); + return canFlushSync ? flushUpdateQueue(ctrl, updates2) : new Promise((resolve) => { + setSprings(ctrl, springs2); + state.queue.push(() => { + resolve(flushUpdateQueue(ctrl, updates2)); + }); + forceUpdate(); }); - forceUpdate(); - }); - } - - }), []); + } + }), + [] + ); const ctrls = (0,external_React_.useRef)([...state.ctrls]); const updates = []; - const prevLength = react_spring_shared_esm_usePrev(length) || 0; + const prevLength = usePrev(length) || 0; (0,external_React_.useMemo)(() => { - react_spring_shared_esm_each(ctrls.current.slice(length, prevLength), ctrl => { + react_spring_shared_modern_each(ctrls.current.slice(length, prevLength), (ctrl) => { detachRefs(ctrl, ref); ctrl.stop(true); }); @@ -16799,146 +30100,135 @@ function useSprings(length, props, deps) { (0,external_React_.useMemo)(() => { declareUpdates(0, Math.min(prevLength, length)); }, deps); - function declareUpdates(startIndex, endIndex) { for (let i = startIndex; i < endIndex; i++) { const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush)); - const update = propsFn ? propsFn(i, ctrl) : props[i]; - - if (update) { - updates[i] = declareUpdate(update); + const update2 = propsFn ? propsFn(i, ctrl) : props[i]; + if (update2) { + updates[i] = declareUpdate(update2); } } } - const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i])); const context = (0,external_React_.useContext)(SpringContext); - const prevContext = react_spring_shared_esm_usePrev(context); + const prevContext = usePrev(context); const hasContext = context !== prevContext && hasProps(context); - react_spring_shared_esm_useIsomorphicLayoutEffect(() => { + react_spring_shared_modern_useIsomorphicLayoutEffect(() => { layoutId.current++; state.ctrls = ctrls.current; - const { - queue - } = state; - + const { queue } = state; if (queue.length) { state.queue = []; - react_spring_shared_esm_each(queue, cb => cb()); + react_spring_shared_modern_each(queue, (cb) => cb()); } - - react_spring_shared_esm_each(ctrls.current, (ctrl, i) => { - ref == null ? void 0 : ref.add(ctrl); - + react_spring_shared_modern_each(ctrls.current, (ctrl, i) => { + ref?.add(ctrl); if (hasContext) { - ctrl.start({ - default: context - }); + ctrl.start({ default: context }); } - - const update = updates[i]; - - if (update) { - replaceRef(ctrl, update.ref); - + const update2 = updates[i]; + if (update2) { + replaceRef(ctrl, update2.ref); if (ctrl.ref) { - ctrl.queue.push(update); + ctrl.queue.push(update2); } else { - ctrl.start(update); + ctrl.start(update2); } } }); }); - react_spring_shared_esm_useOnce(() => () => { - react_spring_shared_esm_each(state.ctrls, ctrl => ctrl.stop(true)); + useOnce(() => () => { + react_spring_shared_modern_each(state.ctrls, (ctrl) => ctrl.stop(true)); }); - const values = springs.map(x => react_spring_core_esm_extends({}, x)); + const values = springs.map((x) => ({ ...x })); return ref ? [values, ref] : values; } +// src/hooks/useSpring.ts function useSpring(props, deps) { - const isFn = react_spring_shared_esm_is.fun(props); - const [[values], ref] = useSprings(1, isFn ? props : [props], isFn ? deps || [] : deps); + const isFn = is.fun(props); + const [[values], ref] = useSprings( + 1, + isFn ? props : [props], + isFn ? deps || [] : deps + ); return isFn || arguments.length == 2 ? [values, ref] : values; } -const initSpringRef = () => SpringRef(); +// src/hooks/useSpringRef.ts -const useSpringRef = () => useState(initSpringRef)[0]; +var initSpringRef = () => SpringRef(); +var useSpringRef = () => useState(initSpringRef)[0]; + +// src/hooks/useSpringValue.ts + +var useSpringValue = (initial, props) => { + const springValue = useConstant(() => new SpringValue(initial, props)); + useOnce2(() => () => { + springValue.stop(); + }); + return springValue; +}; + +// src/hooks/useTrail.ts function useTrail(length, propsArg, deps) { - var _passedRef; - - const propsFn = is.fun(propsArg) && propsArg; - if (propsFn && !deps) deps = []; + const propsFn = is10.fun(propsArg) && propsArg; + if (propsFn && !deps) + deps = []; let reverse = true; - let passedRef = undefined; - const result = useSprings(length, (i, ctrl) => { - const props = propsFn ? propsFn(i, ctrl) : propsArg; - passedRef = props.ref; - reverse = reverse && props.reverse; - return props; - }, deps || [{}]); - const ref = (_passedRef = passedRef) != null ? _passedRef : result[1]; - useIsomorphicLayoutEffect(() => { - each(ref.current, (ctrl, i) => { - const parent = ref.current[i + (reverse ? 1 : -1)]; - + let passedRef = void 0; + const result = useSprings( + length, + (i, ctrl) => { + const props = propsFn ? propsFn(i, ctrl) : propsArg; + passedRef = props.ref; + reverse = reverse && props.reverse; + return props; + }, + // Ensure the props function is called when no deps exist. + // This works around the 3 argument rule. + deps || [{}] + ); + useIsomorphicLayoutEffect3(() => { + each6(result[1].current, (ctrl, i) => { + const parent = result[1].current[i + (reverse ? 1 : -1)]; + replaceRef(ctrl, passedRef); + if (ctrl.ref) { + if (parent) { + ctrl.update({ to: parent.springs }); + } + return; + } if (parent) { - ctrl.start({ - to: parent.springs - }); + ctrl.start({ to: parent.springs }); } else { ctrl.start(); } }); }, deps); - if (propsFn || arguments.length == 3) { - ref['_getProps'] = (propsArg, ctrl, i) => { - const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg; - + const ref = passedRef ?? result[1]; + ref["_getProps"] = (propsArg2, ctrl, i) => { + const props = is10.fun(propsArg2) ? propsArg2(i, ctrl) : propsArg2; if (props) { const parent = ref.current[i + (props.reverse ? 1 : -1)]; - if (parent) props.to = parent.springs; + if (parent) + props.to = parent.springs; return props; } }; - return result; } - - ref['start'] = propsArg => { - const results = []; - each(ref.current, (ctrl, i) => { - const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg; - const parent = ref.current[i + (reverse ? 1 : -1)]; - - if (parent) { - results.push(ctrl.start(react_spring_core_esm_extends({}, props, { - to: parent.springs - }))); - } else { - results.push(ctrl.start(react_spring_core_esm_extends({}, props))); - } - }); - return results; - }; - return result[0]; } -let TransitionPhase; +// src/hooks/useTransition.tsx + -(function (TransitionPhase) { - TransitionPhase["MOUNT"] = "mount"; - TransitionPhase["ENTER"] = "enter"; - TransitionPhase["UPDATE"] = "update"; - TransitionPhase["LEAVE"] = "leave"; -})(TransitionPhase || (TransitionPhase = {})); function useTransition(data, props, deps) { - const propsFn = is.fun(props) && props; + const propsFn = is11.fun(props) && props; const { reset, sort, @@ -16949,25 +30239,27 @@ function useTransition(data, props, deps) { ref: propsRef, config: propsConfig } = propsFn ? propsFn() : props; - const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []); - const items = toArray(data); + const ref = useMemo2( + () => propsFn || arguments.length == 3 ? SpringRef() : void 0, + [] + ); + const items = toArray4(data); const transitions = []; - const usedTransitions = useRef(null); + const usedTransitions = useRef2(null); const prevTransitions = reset ? null : usedTransitions.current; - useIsomorphicLayoutEffect(() => { + useIsomorphicLayoutEffect4(() => { usedTransitions.current = transitions; }); - useOnce(() => { - each(transitions, t => { - ref == null ? void 0 : ref.add(t.ctrl); + useOnce3(() => { + each7(transitions, (t) => { + ref?.add(t.ctrl); t.ctrl.ref = ref; }); return () => { - each(usedTransitions.current, t => { + each7(usedTransitions.current, (t) => { if (t.expired) { clearTimeout(t.expirationId); } - detachRefs(t.ctrl, ref); t.ctrl.stop(true); }); @@ -16975,345 +30267,431 @@ function useTransition(data, props, deps) { }); const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions); const expired = reset && usedTransitions.current || []; - useIsomorphicLayoutEffect(() => each(expired, ({ - ctrl, - item, - key - }) => { - detachRefs(ctrl, ref); - callProp(onDestroyed, item, key); - })); + useIsomorphicLayoutEffect4( + () => each7(expired, ({ ctrl, item, key }) => { + detachRefs(ctrl, ref); + callProp(onDestroyed, item, key); + }) + ); const reused = []; - if (prevTransitions) each(prevTransitions, (t, i) => { - if (t.expired) { - clearTimeout(t.expirationId); - expired.push(t); - } else { - i = reused[i] = keys.indexOf(t.key); - if (~i) transitions[i] = t; - } - }); - each(items, (item, i) => { + if (prevTransitions) + each7(prevTransitions, (t, i) => { + if (t.expired) { + clearTimeout(t.expirationId); + expired.push(t); + } else { + i = reused[i] = keys.indexOf(t.key); + if (~i) + transitions[i] = t; + } + }); + each7(items, (item, i) => { if (!transitions[i]) { transitions[i] = { key: keys[i], item, - phase: TransitionPhase.MOUNT, + phase: "mount" /* MOUNT */, ctrl: new Controller() }; transitions[i].ctrl.item = item; } }); - if (reused.length) { let i = -1; - const { - leave - } = propsFn ? propsFn() : props; - each(reused, (keyIndex, prevIndex) => { + const { leave } = propsFn ? propsFn() : props; + each7(reused, (keyIndex, prevIndex) => { const t = prevTransitions[prevIndex]; - if (~keyIndex) { i = transitions.indexOf(t); - transitions[i] = react_spring_core_esm_extends({}, t, { - item: items[keyIndex] - }); + transitions[i] = { ...t, item: items[keyIndex] }; } else if (leave) { transitions.splice(++i, 0, t); } }); } - - if (is.fun(sort)) { + if (is11.fun(sort)) { transitions.sort((a, b) => sort(a.item, b.item)); } - let delay = -trail; - const forceUpdate = useForceUpdate(); + const forceUpdate = useForceUpdate2(); const defaultProps = getDefaultProps(props); - const changes = new Map(); - const exitingTransitions = useRef(new Map()); - const forceChange = useRef(false); - each(transitions, (t, i) => { + const changes = /* @__PURE__ */ new Map(); + const exitingTransitions = useRef2(/* @__PURE__ */ new Map()); + const forceChange = useRef2(false); + each7(transitions, (t, i) => { const key = t.key; const prevPhase = t.phase; const p = propsFn ? propsFn() : props; - let to; + let to2; let phase; - let propsDelay = callProp(p.delay || 0, key); - - if (prevPhase == TransitionPhase.MOUNT) { - to = p.enter; - phase = TransitionPhase.ENTER; + const propsDelay = callProp(p.delay || 0, key); + if (prevPhase == "mount" /* MOUNT */) { + to2 = p.enter; + phase = "enter" /* ENTER */; } else { const isLeave = keys.indexOf(key) < 0; - - if (prevPhase != TransitionPhase.LEAVE) { + if (prevPhase != "leave" /* LEAVE */) { if (isLeave) { - to = p.leave; - phase = TransitionPhase.LEAVE; - } else if (to = p.update) { - phase = TransitionPhase.UPDATE; - } else return; + to2 = p.leave; + phase = "leave" /* LEAVE */; + } else if (to2 = p.update) { + phase = "update" /* UPDATE */; + } else + return; } else if (!isLeave) { - to = p.enter; - phase = TransitionPhase.ENTER; - } else return; + to2 = p.enter; + phase = "enter" /* ENTER */; + } else + return; } - - to = callProp(to, t.item, i); - to = is.obj(to) ? inferTo(to) : { - to - }; - - if (!to.config) { - const config = propsConfig || defaultProps.config; - to.config = callProp(config, t.item, i, phase); + to2 = callProp(to2, t.item, i); + to2 = is11.obj(to2) ? inferTo(to2) : { to: to2 }; + if (!to2.config) { + const config2 = propsConfig || defaultProps.config; + to2.config = callProp(config2, t.item, i, phase); } - delay += trail; - - const payload = react_spring_core_esm_extends({}, defaultProps, { + const payload = { + ...defaultProps, + // we need to add our props.delay value you here. delay: propsDelay + delay, ref: propsRef, immediate: p.immediate, - reset: false - }, to); - - if (phase == TransitionPhase.ENTER && is.und(payload.from)) { - const _p = propsFn ? propsFn() : props; - - const from = is.und(_p.initial) || prevTransitions ? _p.from : _p.initial; + // This prevents implied resets. + reset: false, + // Merge any phase-specific props. + ...to2 + }; + if (phase == "enter" /* ENTER */ && is11.und(payload.from)) { + const p2 = propsFn ? propsFn() : props; + const from = is11.und(p2.initial) || prevTransitions ? p2.from : p2.initial; payload.from = callProp(from, t.item, i); } - - const { - onResolve - } = payload; - - payload.onResolve = result => { + const { onResolve } = payload; + payload.onResolve = (result) => { callProp(onResolve, result); - const transitions = usedTransitions.current; - const t = transitions.find(t => t.key === key); - if (!t) return; - - if (result.cancelled && t.phase != TransitionPhase.UPDATE) { + const transitions2 = usedTransitions.current; + const t2 = transitions2.find((t3) => t3.key === key); + if (!t2) + return; + if (result.cancelled && t2.phase != "update" /* UPDATE */) { return; } - - if (t.ctrl.idle) { - const idle = transitions.every(t => t.ctrl.idle); - - if (t.phase == TransitionPhase.LEAVE) { - const expiry = callProp(expires, t.item); - + if (t2.ctrl.idle) { + const idle = transitions2.every((t3) => t3.ctrl.idle); + if (t2.phase == "leave" /* LEAVE */) { + const expiry = callProp(expires, t2.item); if (expiry !== false) { const expiryMs = expiry === true ? 0 : expiry; - t.expired = true; - + t2.expired = true; if (!idle && expiryMs > 0) { - if (expiryMs <= 0x7fffffff) t.expirationId = setTimeout(forceUpdate, expiryMs); + if (expiryMs <= 2147483647) + t2.expirationId = setTimeout(forceUpdate, expiryMs); return; } } } - - if (idle && transitions.some(t => t.expired)) { - exitingTransitions.current.delete(t); - + if (idle && transitions2.some((t3) => t3.expired)) { + exitingTransitions.current.delete(t2); if (exitBeforeEnter) { forceChange.current = true; } - forceUpdate(); } } }; - const springs = getSprings(t.ctrl, payload); - - if (phase === TransitionPhase.LEAVE && exitBeforeEnter) { - exitingTransitions.current.set(t, { - phase, - springs, - payload - }); + if (phase === "leave" /* LEAVE */ && exitBeforeEnter) { + exitingTransitions.current.set(t, { phase, springs, payload }); } else { - changes.set(t, { - phase, - springs, - payload - }); + changes.set(t, { phase, springs, payload }); } }); - const context = useContext(SpringContext); - const prevContext = usePrev(context); + const context = useContext3(SpringContext); + const prevContext = usePrev2(context); const hasContext = context !== prevContext && hasProps(context); - useIsomorphicLayoutEffect(() => { + useIsomorphicLayoutEffect4(() => { if (hasContext) { - each(transitions, t => { - t.ctrl.start({ - default: context - }); + each7(transitions, (t) => { + t.ctrl.start({ default: context }); }); } }, [context]); - each(changes, (_, t) => { + each7(changes, (_, t) => { if (exitingTransitions.current.size) { - const ind = transitions.findIndex(state => state.key === t.key); + const ind = transitions.findIndex((state) => state.key === t.key); transitions.splice(ind, 1); } }); - useIsomorphicLayoutEffect(() => { - each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({ - phase, - payload - }, t) => { - const { - ctrl - } = t; - t.phase = phase; - ref == null ? void 0 : ref.add(ctrl); - - if (hasContext && phase == TransitionPhase.ENTER) { - ctrl.start({ - default: context - }); - } - - if (payload) { - replaceRef(ctrl, payload.ref); - - if ((ctrl.ref || ref) && !forceChange.current) { - ctrl.update(payload); - } else { - ctrl.start(payload); - - if (forceChange.current) { - forceChange.current = false; + useIsomorphicLayoutEffect4( + () => { + each7( + exitingTransitions.current.size ? exitingTransitions.current : changes, + ({ phase, payload }, t) => { + const { ctrl } = t; + t.phase = phase; + ref?.add(ctrl); + if (hasContext && phase == "enter" /* ENTER */) { + ctrl.start({ default: context }); + } + if (payload) { + replaceRef(ctrl, payload.ref); + if ((ctrl.ref || ref) && !forceChange.current) { + ctrl.update(payload); + } else { + ctrl.start(payload); + if (forceChange.current) { + forceChange.current = false; + } + } } } + ); + }, + reset ? void 0 : deps + ); + const renderTransitions = (render) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, transitions.map((t, i) => { + const { springs } = changes.get(t) || t.ctrl; + const elem = render({ ...springs }, t.item, t, i); + return elem && elem.type ? /* @__PURE__ */ React2.createElement( + elem.type, + { + ...elem.props, + key: is11.str(t.key) || is11.num(t.key) ? t.key : t.ctrl.id, + ref: elem.ref } - }); - }, reset ? void 0 : deps); - - const renderTransitions = render => React.createElement(React.Fragment, null, transitions.map((t, i) => { - const { - springs - } = changes.get(t) || t.ctrl; - const elem = render(react_spring_core_esm_extends({}, springs), t.item, t, i); - return elem && elem.type ? React.createElement(elem.type, react_spring_core_esm_extends({}, elem.props, { - key: is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id, - ref: elem.ref - })) : elem; + ) : elem; })); - return ref ? [renderTransitions, ref] : renderTransitions; } -let nextKey = 1; - -function getKeys(items, { - key, - keys = key -}, prevTransitions) { +var nextKey = 1; +function getKeys(items, { key, keys = key }, prevTransitions) { if (keys === null) { - const reused = new Set(); - return items.map(item => { - const t = prevTransitions && prevTransitions.find(t => t.item === item && t.phase !== TransitionPhase.LEAVE && !reused.has(t)); - + const reused = /* @__PURE__ */ new Set(); + return items.map((item) => { + const t = prevTransitions && prevTransitions.find( + (t2) => t2.item === item && t2.phase !== "leave" /* LEAVE */ && !reused.has(t2) + ); if (t) { reused.add(t); return t.key; } - return nextKey++; }); } - - return is.und(keys) ? items : is.fun(keys) ? items.map(keys) : toArray(keys); + return is11.und(keys) ? items : is11.fun(keys) ? items.map(keys) : toArray4(keys); } -const _excluded$2 = (/* unused pure expression or super */ null && (["children"])); -function Spring(_ref) { - let { - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded$2); +// src/hooks/useScroll.ts +var useScroll = ({ + container, + ...springOptions +} = {}) => { + const [scrollValues, api] = useSpring( + () => ({ + scrollX: 0, + scrollY: 0, + scrollXProgress: 0, + scrollYProgress: 0, + ...springOptions + }), + [] + ); + useIsomorphicLayoutEffect5(() => { + const cleanupScroll = onScroll( + ({ x, y }) => { + api.start({ + scrollX: x.current, + scrollXProgress: x.progress, + scrollY: y.current, + scrollYProgress: y.progress + }); + }, + { container: container?.current || void 0 } + ); + return () => { + each8(Object.values(scrollValues), (value) => value.stop()); + cleanupScroll(); + }; + }, []); + return scrollValues; +}; + +// src/hooks/useResize.ts + +var useResize = ({ + container, + ...springOptions +}) => { + const [sizeValues, api] = useSpring( + () => ({ + width: 0, + height: 0, + ...springOptions + }), + [] + ); + useIsomorphicLayoutEffect6(() => { + const cleanupScroll = onResize( + ({ width, height }) => { + api.start({ + width, + height, + immediate: sizeValues.width.get() === 0 || sizeValues.height.get() === 0 + }); + }, + { container: container?.current || void 0 } + ); + return () => { + each9(Object.values(sizeValues), (value) => value.stop()); + cleanupScroll(); + }; + }, []); + return sizeValues; +}; + +// src/hooks/useInView.ts + + +var defaultThresholdOptions = { + any: 0, + all: 1 +}; +function useInView(props, args) { + const [isInView, setIsInView] = useState2(false); + const ref = useRef3(); + const propsFn = is12.fun(props) && props; + const springsProps = propsFn ? propsFn() : {}; + const { to: to2 = {}, from = {}, ...restSpringProps } = springsProps; + const intersectionArguments = propsFn ? args : props; + const [springs, api] = useSpring(() => ({ from, ...restSpringProps }), []); + useIsomorphicLayoutEffect7(() => { + const element = ref.current; + const { + root, + once, + amount = "any", + ...restArgs + } = intersectionArguments ?? {}; + if (!element || once && isInView || typeof IntersectionObserver === "undefined") + return; + const activeIntersections = /* @__PURE__ */ new WeakMap(); + const onEnter = () => { + if (to2) { + api.start(to2); + } + setIsInView(true); + const cleanup = () => { + if (from) { + api.start(from); + } + setIsInView(false); + }; + return once ? void 0 : cleanup; + }; + const handleIntersection = (entries) => { + entries.forEach((entry) => { + const onLeave = activeIntersections.get(entry.target); + if (entry.isIntersecting === Boolean(onLeave)) { + return; + } + if (entry.isIntersecting) { + const newOnLeave = onEnter(); + if (is12.fun(newOnLeave)) { + activeIntersections.set(entry.target, newOnLeave); + } else { + observer.unobserve(entry.target); + } + } else if (onLeave) { + onLeave(); + activeIntersections.delete(entry.target); + } + }); + }; + const observer = new IntersectionObserver(handleIntersection, { + root: root && root.current || void 0, + threshold: typeof amount === "number" || Array.isArray(amount) ? amount : defaultThresholdOptions[amount], + ...restArgs + }); + observer.observe(element); + return () => observer.unobserve(element); + }, [intersectionArguments]); + if (propsFn) { + return [ref, springs]; + } + return [ref, isInView]; +} + +// src/components/Spring.tsx +function Spring({ children, ...props }) { return children(useSpring(props)); } -const _excluded$1 = (/* unused pure expression or super */ null && (["items", "children"])); -function Trail(_ref) { - let { - items, - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded$1); +// src/components/Trail.tsx +function Trail({ + items, + children, + ...props +}) { const trails = useTrail(items.length, props); return items.map((item, index) => { const result = children(item, index); - return is.fun(result) ? result(trails[index]) : result; + return is13.fun(result) ? result(trails[index]) : result; }); } -const _excluded = (/* unused pure expression or super */ null && (["items", "children"])); -function Transition(_ref) { - let { - items, - children - } = _ref, - props = _objectWithoutPropertiesLoose(_ref, _excluded); - +// src/components/Transition.tsx +function Transition({ + items, + children, + ...props +}) { return useTransition(items, props)(children); } -class Interpolation extends FrameValue { +// src/interpolate.ts + + +// src/Interpolation.ts + + +var Interpolation = class extends FrameValue { constructor(source, args) { super(); - this.key = void 0; - this.idle = true; - this.calc = void 0; - this._active = new Set(); this.source = source; + /** Equals false when in the frameloop */ + this.idle = true; + /** The inputs which are currently animating */ + this._active = /* @__PURE__ */ new Set(); this.calc = createInterpolator(...args); - const value = this._get(); - const nodeType = getAnimatedType(value); setAnimated(this, nodeType.create(value)); } - advance(_dt) { const value = this._get(); - const oldValue = this.get(); - if (!isEqual(value, oldValue)) { getAnimated(this).setValue(value); - this._onChange(value, this.idle); } - if (!this.idle && checkIdle(this._active)) { becomeIdle(this); } } - _get() { - const inputs = react_spring_shared_esm_is.arr(this.source) ? this.source.map(getFluidValue) : react_spring_shared_esm_toArray(getFluidValue(this.source)); + const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source)); return this.calc(...inputs); } - _start() { if (this.idle && !checkIdle(this._active)) { this.idle = false; - react_spring_shared_esm_each(getPayload(this), node => { + react_spring_shared_modern_each(getPayload(this), (node) => { node.done = false; }); - - if (globals.skipAnimation) { + if (globals_exports.skipAnimation) { raf.batchedUpdates(() => this.advance()); becomeIdle(this); } else { @@ -17321,150 +30699,127 @@ class Interpolation extends FrameValue { } } } - + // Observe our sources only when we're observed. _attach() { let priority = 1; - react_spring_shared_esm_each(react_spring_shared_esm_toArray(this.source), source => { + react_spring_shared_modern_each(toArray(this.source), (source) => { if (hasFluidValue(source)) { addFluidObserver(source, this); } - if (isFrameValue(source)) { if (!source.idle) { this._active.add(source); } - priority = Math.max(priority, source.priority + 1); } }); this.priority = priority; - this._start(); } - + // Stop observing our sources once we have no observers. _detach() { - react_spring_shared_esm_each(react_spring_shared_esm_toArray(this.source), source => { + react_spring_shared_modern_each(toArray(this.source), (source) => { if (hasFluidValue(source)) { removeFluidObserver(source, this); } }); - this._active.clear(); - becomeIdle(this); } - + /** @internal */ eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { if (event.idle) { this.advance(); } else { this._active.add(event.parent); - this._start(); } - } else if (event.type == 'idle') { - this._active.delete(event.parent); - } else if (event.type == 'priority') { - this.priority = react_spring_shared_esm_toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0); - } + } else if (event.type == "idle") { + this._active.delete(event.parent); + } else if (event.type == "priority") { + this.priority = toArray(this.source).reduce( + (highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), + 0 + ); + } } - -} - +}; function isIdle(source) { return source.idle !== false; } - function checkIdle(active) { return !active.size || Array.from(active).every(isIdle); } - function becomeIdle(self) { if (!self.idle) { self.idle = true; - react_spring_shared_esm_each(getPayload(self), node => { + react_spring_shared_modern_each(getPayload(self), (node) => { node.done = true; }); callFluidObservers(self, { - type: 'idle', + type: "idle", parent: self }); } } -const react_spring_core_esm_to = (source, ...args) => new Interpolation(source, args); -const react_spring_core_esm_interpolate = (source, ...args) => (deprecateInterpolate(), new Interpolation(source, args)); +// src/interpolate.ts +var react_spring_core_modern_to = (source, ...args) => new Interpolation(source, args); +var react_spring_core_modern_interpolate = (source, ...args) => (deprecateInterpolate2(), new Interpolation(source, args)); -globals.assign({ - createStringInterpolator: createStringInterpolator, +// src/globals.ts + +globals_exports.assign({ + createStringInterpolator: createStringInterpolator2, to: (source, args) => new Interpolation(source, args) }); -const react_spring_core_esm_update = frameLoop.advance; +var react_spring_core_modern_update = frameLoop.advance; + +// src/index.ts +//# sourceMappingURL=react-spring_core.modern.mjs.map ;// CONCATENATED MODULE: external "ReactDOM" var external_ReactDOM_namespaceObject = window["ReactDOM"]; -;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/react-spring-web.esm.js +;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/react-spring_web.modern.mjs +// src/index.ts - -function react_spring_web_esm_objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -const react_spring_web_esm_excluded$2 = ["style", "children", "scrollTop", "scrollLeft"]; -const isCustomPropRE = /^--/; - +// src/applyAnimatedValues.ts +var isCustomPropRE = /^--/; function dangerousStyleValue(name, value) { - if (value == null || typeof value === 'boolean' || value === '') return ''; - if (typeof value === 'number' && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; - return ('' + value).trim(); + if (value == null || typeof value === "boolean" || value === "") + return ""; + if (typeof value === "number" && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) + return value + "px"; + return ("" + value).trim(); } - -const attributeCache = {}; +var attributeCache = {}; function applyAnimatedValues(instance, props) { if (!instance.nodeType || !instance.setAttribute) { return false; } - - const isFilterElement = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter'; - - const _ref = props, - { - style, - children, - scrollTop, - scrollLeft - } = _ref, - attributes = react_spring_web_esm_objectWithoutPropertiesLoose(_ref, react_spring_web_esm_excluded$2); - + const isFilterElement = instance.nodeName === "filter" || instance.parentNode && instance.parentNode.nodeName === "filter"; + const { style, children, scrollTop, scrollLeft, viewBox, ...attributes } = props; const values = Object.values(attributes); - const names = Object.keys(attributes).map(name => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, n => '-' + n.toLowerCase()))); - + const names = Object.keys(attributes).map( + (name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace( + /([A-Z])/g, + // Attributes are written in dash case + (n) => "-" + n.toLowerCase() + )) + ); if (children !== void 0) { instance.textContent = children; } - - for (let name in style) { + for (const name in style) { if (style.hasOwnProperty(name)) { const value = dangerousStyleValue(name, style[name]); - if (isCustomPropRE.test(name)) { instance.style.setProperty(name, value); } else { @@ -17472,20 +30827,20 @@ function applyAnimatedValues(instance, props) { } } } - names.forEach((name, i) => { instance.setAttribute(name, values[i]); }); - if (scrollTop !== void 0) { instance.scrollTop = scrollTop; } - if (scrollLeft !== void 0) { instance.scrollLeft = scrollLeft; } + if (viewBox !== void 0) { + instance.setAttribute("viewBox", viewBox); + } } -let isUnitlessNumber = { +var isUnitlessNumber = { animationIterationCount: true, borderImageOutset: true, borderImageSlice: true, @@ -17519,6 +30874,7 @@ let isUnitlessNumber = { widows: true, zIndex: true, zoom: true, + // SVG-related properties fillOpacity: true, floodOpacity: true, stopOpacity: true, @@ -17528,126 +30884,267 @@ let isUnitlessNumber = { strokeOpacity: true, strokeWidth: true }; - -const prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1); - -const prefixes = ['Webkit', 'Ms', 'Moz', 'O']; +var prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1); +var prefixes = ["Webkit", "Ms", "Moz", "O"]; isUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => { - prefixes.forEach(prefix => acc[prefixKey(prefix, prop)] = acc[prop]); + prefixes.forEach((prefix) => acc[prefixKey(prefix, prop)] = acc[prop]); return acc; }, isUnitlessNumber); -const react_spring_web_esm_excluded$1 = ["x", "y", "z"]; -const domTransforms = /^(matrix|translate|scale|rotate|skew)/; -const pxTransforms = /^(translate)/; -const degTransforms = /^(rotate|skew)/; +// src/AnimatedStyle.ts -const addUnit = (value, unit) => react_spring_shared_esm_is.num(value) && value !== 0 ? value + unit : value; - -const isValueIdentity = (value, id) => react_spring_shared_esm_is.arr(value) ? value.every(v => isValueIdentity(v, id)) : react_spring_shared_esm_is.num(value) ? value === id : parseFloat(value) === id; - -class AnimatedStyle extends AnimatedObject { - constructor(_ref) { - let { - x, - y, - z - } = _ref, - style = react_spring_web_esm_objectWithoutPropertiesLoose(_ref, react_spring_web_esm_excluded$1); +var domTransforms = /^(matrix|translate|scale|rotate|skew)/; +var pxTransforms = /^(translate)/; +var degTransforms = /^(rotate|skew)/; +var addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value; +var isValueIdentity = (value, id) => is.arr(value) ? value.every((v) => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id; +var AnimatedStyle = class extends AnimatedObject { + constructor({ x, y, z, ...style }) { const inputs = []; const transforms = []; - if (x || y || z) { inputs.push([x || 0, y || 0, z || 0]); - transforms.push(xyz => [`translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, isValueIdentity(xyz, 0)]); + transforms.push((xyz) => [ + `translate3d(${xyz.map((v) => addUnit(v, "px")).join(",")})`, + // prettier-ignore + isValueIdentity(xyz, 0) + ]); } - eachProp(style, (value, key) => { - if (key === 'transform') { - inputs.push([value || '']); - transforms.push(transform => [transform, transform === '']); + if (key === "transform") { + inputs.push([value || ""]); + transforms.push((transform) => [transform, transform === ""]); } else if (domTransforms.test(key)) { delete style[key]; - if (react_spring_shared_esm_is.und(value)) return; - const unit = pxTransforms.test(key) ? 'px' : degTransforms.test(key) ? 'deg' : ''; - inputs.push(react_spring_shared_esm_toArray(value)); - transforms.push(key === 'rotate3d' ? ([x, y, z, deg]) => [`rotate3d(${x},${y},${z},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : input => [`${key}(${input.map(v => addUnit(v, unit)).join(',')})`, isValueIdentity(input, key.startsWith('scale') ? 1 : 0)]); + if (is.und(value)) + return; + const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : ""; + inputs.push(toArray(value)); + transforms.push( + key === "rotate3d" ? ([x2, y2, z2, deg]) => [ + `rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, + isValueIdentity(deg, 0) + ] : (input) => [ + `${key}(${input.map((v) => addUnit(v, unit)).join(",")})`, + isValueIdentity(input, key.startsWith("scale") ? 1 : 0) + ] + ); } }); - if (inputs.length) { style.transform = new FluidTransform(inputs, transforms); } - super(style); } - -} - -class FluidTransform extends FluidValue { +}; +var FluidTransform = class extends FluidValue { constructor(inputs, transforms) { super(); - this._value = null; this.inputs = inputs; this.transforms = transforms; + this._value = null; } - get() { return this._value || (this._value = this._get()); } - _get() { - let transform = ''; + let transform = ""; let identity = true; - react_spring_shared_esm_each(this.inputs, (input, i) => { + react_spring_shared_modern_each(this.inputs, (input, i) => { const arg1 = getFluidValue(input[0]); - const [t, id] = this.transforms[i](react_spring_shared_esm_is.arr(arg1) ? arg1 : input.map(getFluidValue)); - transform += ' ' + t; + const [t, id] = this.transforms[i]( + is.arr(arg1) ? arg1 : input.map(getFluidValue) + ); + transform += " " + t; identity = identity && id; }); - return identity ? 'none' : transform; + return identity ? "none" : transform; } - + // Start observing our inputs once we have an observer. observerAdded(count) { - if (count == 1) react_spring_shared_esm_each(this.inputs, input => react_spring_shared_esm_each(input, value => hasFluidValue(value) && addFluidObserver(value, this))); + if (count == 1) + react_spring_shared_modern_each( + this.inputs, + (input) => react_spring_shared_modern_each( + input, + (value) => hasFluidValue(value) && addFluidObserver(value, this) + ) + ); } - + // Stop observing our inputs once we have no observers. observerRemoved(count) { - if (count == 0) react_spring_shared_esm_each(this.inputs, input => react_spring_shared_esm_each(input, value => hasFluidValue(value) && removeFluidObserver(value, this))); + if (count == 0) + react_spring_shared_modern_each( + this.inputs, + (input) => react_spring_shared_modern_each( + input, + (value) => hasFluidValue(value) && removeFluidObserver(value, this) + ) + ); } - eventObserved(event) { - if (event.type == 'change') { + if (event.type == "change") { this._value = null; } - callFluidObservers(this, event); } +}; -} +// src/primitives.ts +var primitives = [ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "big", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", + // SVG + "circle", + "clipPath", + "defs", + "ellipse", + "foreignObject", + "g", + "image", + "line", + "linearGradient", + "mask", + "path", + "pattern", + "polygon", + "polyline", + "radialGradient", + "rect", + "stop", + "svg", + "text", + "tspan" +]; -const primitives = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; +// src/index.ts -const react_spring_web_esm_excluded = ["scrollTop", "scrollLeft"]; -globals.assign({ +globals_exports.assign({ batchedUpdates: external_ReactDOM_namespaceObject.unstable_batchedUpdates, - createStringInterpolator: createStringInterpolator, - colors: colors + createStringInterpolator: createStringInterpolator2, + colors: colors2 }); -const host = createHost(primitives, { +var host = createHost(primitives, { applyAnimatedValues, - createAnimatedStyle: style => new AnimatedStyle(style), - getComponentProps: _ref => { - let props = react_spring_web_esm_objectWithoutPropertiesLoose(_ref, react_spring_web_esm_excluded); - - return props; - } + createAnimatedStyle: (style) => new AnimatedStyle(style), + // eslint-disable-next-line @typescript-eslint/no-unused-vars + getComponentProps: ({ scrollTop, scrollLeft, ...props }) => props }); -const animated = host.animated; - - +var animated = host.animated; +//# sourceMappingURL=react-spring_web.modern.mjs.map ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/use-moving-animation/index.js /** * External dependencies @@ -18462,7 +31959,7 @@ function useNavModeExit(clientId) { function useIntersectionObserver() { - const observer = (0,external_wp_element_namespaceObject.useContext)(IntersectionObserver); + const observer = (0,external_wp_element_namespaceObject.useContext)(block_list_IntersectionObserver); return (0,external_wp_compose_namespaceObject.useRefEffect)(node => { if (observer) { observer.observe(node); @@ -31553,7 +45050,7 @@ ForwardedInnerBlocks.Content = () => useInnerBlocksProps.save().children; const elementContext = (0,external_wp_element_namespaceObject.createContext)(); -const IntersectionObserver = (0,external_wp_element_namespaceObject.createContext)(); +const block_list_IntersectionObserver = (0,external_wp_element_namespaceObject.createContext)(); function Root(_ref) { let { @@ -31649,7 +45146,7 @@ function Items(_ref2) { }, [rootClientId]); return (0,external_wp_element_namespaceObject.createElement)(LayoutProvider, { value: layout - }, (0,external_wp_element_namespaceObject.createElement)(IntersectionObserver.Provider, { + }, (0,external_wp_element_namespaceObject.createElement)(block_list_IntersectionObserver.Provider, { value: intersectionObserver }, order.map(clientId => (0,external_wp_element_namespaceObject.createElement)(external_wp_data_namespaceObject.AsyncModeProvider, { key: clientId, diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js index 220c3e6b68..9740abb861 100644 --- a/wp-includes/js/dist/block-editor.min.js +++ b/wp-includes/js/dist/block-editor.min.js @@ -1,15 +1,15 @@ /*! This file is auto-generated */ -!function(){var e={6411:function(e,t){var n,o,r; +!function(){var e={480:function(e,t,n){"use strict";var r=n(5304)("ArrayBuffer.prototype.byteLength",!0),o=n(4602);e.exports=function(e){return o(e)?r?r(e):e.byteLength:NaN}},5304:function(e,t,n){"use strict";var r=n(3803),o=n(6427),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},6427:function(e,t,n){"use strict";var r=n(7870),o=n(3803),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},3303:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8040:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9063);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9063:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6411:function(e,t){var n,r,o; /*! autosize 4.0.4 license: MIT http://www.jacklmoore.com/autosize -*/o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:a,update:p}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function l(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,n=null,r=null,l=function(){e.clientWidth!==n&&d()},a=function(t){window.removeEventListener("resize",l,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",l,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),s()}function s(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),d()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function p(){if(0!==e.scrollHeight){var r=u(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){p();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),o="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(oe.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function a(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=s+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=s&&m+1>=c)return a([{value:this.join(t),count:t.length}]);function f(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],f=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var g=d&&d.newPos+1=s&&f+1>=c)return a(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();f()||e()}),0)}();else for(;u<=d;){var g=f();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,l=n.length,i=e.newPos,a=i-o,s=0;i+10?!0===i?o.scrollTop(t,k.top+_.top):!1===i?o.scrollTop(t,k.top+y.top):_.top<0?o.scrollTop(t,k.top+_.top):o.scrollTop(t,k.top+y.top):l||((i=void 0===i||!!i)?o.scrollTop(t,k.top+_.top):o.scrollTop(t,k.top+y.top)),r&&(_.left<0||y.left>0?!0===a?o.scrollLeft(t,k.left+_.left):!1===a?o.scrollLeft(t,k.left+y.left):_.left<0?o.scrollLeft(t,k.left+_.left):o.scrollLeft(t,k.left+y.left):l||((a=void 0===a||!!a)?o.scrollLeft(t,k.left+_.left):o.scrollLeft(t,k.left+y.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;tt},ie64:function(){return b.ie()&&d},firefox:function(){return v()||n},opera:function(){return v()||o},webkit:function(){return v()||r},safari:function(){return b.webkit()},chrome:function(){return v()||l},windows:function(){return v()||s},osx:function(){return v()||a},linux:function(){return v()||c},iphone:function(){return v()||p},mobile:function(){return v()||p||m||u||g},nativeApp:function(){return v()||f},android:function(){return v()||u},ipad:function(){return v()||m}};e.exports=b},7939:function(e,t,n){"use strict";var o,r=n(3110);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) +*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],p=!!l&&l(e,t);if(r)r(e,t,{configurable:null===c&&p?p.configurable:!c,enumerable:null===a&&p?p.enumerable:!a,value:n,writable:null===s&&p?p.writable:!s});else{if(!u&&(a||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1198:function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,l=t.length,a=0,s=0;ie.length?n:e})),c.value=e.join(p)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(s+=c.count)}}var d=t[l-1];return l>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[l-2].value+=d.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var l=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,p=s+c,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&f+1>=c)return a([{value:this.join(t),count:t.length}]);function y(){for(var n=-1*u;n<=u;n+=2){var i=void 0,p=d[n-1],f=d[n+1],y=(f?f.newPos:0)-n;p&&(d[n-1]=void 0);var m=p&&p.newPos+1=s&&y+1>=c)return a(r(l,i.components,t,e,l.useLongestToken));d[n]=i}else d[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>p)return i();y()||e()}),0)}();else for(;u<=p;){var m=y();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,l=e.newPos,a=l-r,s=0;l+10?!0===l?r.scrollTop(t,v.top+_.top):!1===l?r.scrollTop(t,v.top+k.top):_.top<0?r.scrollTop(t,v.top+_.top):r.scrollTop(t,v.top+k.top):i||((l=void 0===l||!!l)?r.scrollTop(t,v.top+_.top):r.scrollTop(t,v.top+k.top)),o&&(_.left<0||k.left>0?!0===a?r.scrollLeft(t,v.left+_.left):!1===a?r.scrollLeft(t,v.left+k.left):_.left<0?r.scrollLeft(t,v.left+_.left):r.scrollLeft(t,v.left+k.left):i||((a=void 0===a||!!a)?r.scrollLeft(t,v.left+_.left):r.scrollLeft(t,v.left+k.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},4482:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(7457);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7457:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6788:function(e){"use strict";e.exports=EvalError},6716:function(e){"use strict";e.exports=Error},9204:function(e){"use strict";e.exports=RangeError},9908:function(e){"use strict";e.exports=ReferenceError},6724:function(e){"use strict";e.exports=SyntaxError},1642:function(e){"use strict";e.exports=TypeError},1451:function(e){"use strict";e.exports=URIError},7998:function(e,t,n){"use strict";var r=n(1642);e.exports=function(e){if(null==e)throw new r(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},5249:function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(3777),i=n(5443),l=n(8659),a=n(3082),s=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,l,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(l=0;l1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=c(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(l(e)||a(e))&&(n="string"),s(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},4843:function(e,t,n){"use strict";var r=n(5443),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,l=function(e,t,n){for(var r=0,o=e.length;r=3&&(i=n),"[object Array]"===o.call(e)?l(e,t,i):"string"==typeof e?a(e,t,i):s(e,t,i)}},9930:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(t+i);for(var l,a=n.call(arguments,1),s=function(){if(this instanceof l){var t=i.apply(this,a.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,a.concat(n.call(arguments)))},c=Math.max(0,i.length-a.length),u=[],p=0;p1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5810:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1759);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1759:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8198:function(e,t,n){"use strict";var r=n(3010)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},3010:function(e,t,n){"use strict";var r,o=SyntaxError,i=Function,l=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var c=function(){throw new l},u=s?function(){try{return c}catch(e){try{return s(arguments,"callee").get}catch(e){return c}}}():c,p=n(1779)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},y="undefined"==typeof Uint8Array?r:d(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?d(d([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?d((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?d(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":y,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=d(o.prototype))}return m[t]=n,n},h={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(1930),v=n(9284),_=b.call(Function.call,Array.prototype.concat),k=b.call(Function.apply,Array.prototype.splice),E=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),w=b.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,I=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return E(e,A,(function(e,t,n,o){r[r.length]=n?E(o,C,"$1"):t||e})),r},x=function(e,t){var n,r=e;if(v(h,r)&&(r="%"+(n=h[r])[0]+"%"),v(m,r)){var i=m[r];if(i===f&&(i=g(r)),void 0===i&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===w(/^%?[^%]*%?$/g,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=I(e),r=n.length>0?n[0]:"",i=x("%"+r+"%",t),a=i.name,c=i.value,u=!1,p=i.alias;p&&(r=p[0],k(n,_([0,1],p)));for(var d=1,f=!0;d=n.length){var b=s(c,y);c=(f=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[y]}else f=v(c,y),c=c[y];f&&!u&&(m[a]=c)}}return c}},1779:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(8030);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},8030:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1856:function(e){"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9284:function(e,t,n){"use strict";var r=n(1930);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},9429:function(e,t,n){"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(766);e.exports=i.call(r,o)},2075:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r-1?o(n):n}},4374:function(e,t,n){"use strict";var r=n(7410),o=n(3767),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1818:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},6945:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6992);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6992:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},5443:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=o?function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)}:function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(l(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},8659:function(e){"use strict";var t=Date.prototype.getDay,n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(r?function(e){try{return t.call(e),!0}catch(e){return!1}}(e):"[object Date]"===n.call(e))}},3082:function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(9905)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},2527:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e){return!!r(e)}},9894:function(e,t,n){var r=n(4827);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,l=document.createElement(i);l.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&l.setAttribute("rows","1");var a=r(e,"font-size");l.style.fontSize=a,l.style.padding="0px",l.style.border="0px";var s=document.body;s.appendChild(l),n=l.offsetHeight,s.removeChild(l)}return n}},7970:function(e,t,n){e.exports=n(195)},3110:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},3812:function(e){var t,n,r,o,i,l,a,s,c,u,p,d,f,y,m,g=!1;function h(){if(!g){g=!0;var e=navigator.userAgent,h=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),f=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),y=/FBAN\/\w+;/i.exec(e),m=/Mobile/i.exec(e),p=!!/Win64/.exec(e),h){(t=h[1]?parseFloat(h[1]):h[5]?parseFloat(h[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var v=/(?:Trident\/(\d+.\d+))/.exec(e);l=v?parseFloat(v[1])+4:t,n=h[2]?parseFloat(h[2]):NaN,r=h[3]?parseFloat(h[3]):NaN,(o=h[4]?parseFloat(h[4]):NaN)?(h=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=h&&h[1]?parseFloat(h[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(b){if(b[1]){var _=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);a=!_||parseFloat(_[1].replace("_","."))}else a=!1;s=!!b[2],c=!!b[3]}else a=s=c=!1}}var b={ie:function(){return h()||t},ieCompatibilityMode:function(){return h()||l>t},ie64:function(){return b.ie()&&p},firefox:function(){return h()||n},opera:function(){return h()||r},webkit:function(){return h()||o},safari:function(){return b.webkit()},chrome:function(){return h()||i},windows:function(){return h()||s},osx:function(){return h()||a},linux:function(){return h()||c},iphone:function(){return h()||d},mobile:function(){return h()||d||f||u||m},nativeApp:function(){return h()||y},android:function(){return h()||u},ipad:function(){return h()||f}};e.exports=b},7939:function(e,t,n){"use strict";var r,o=n(3110);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) /** * Checks if an event is supported in the current execution environment. * @@ -23,4 +23,4 @@ * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT - */,e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},195:function(e,t,n){"use strict";var o=n(3812),r=n(7939);function l(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},5372:function(e,t,n){"use strict";var o=n(9567);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,_(r,o))})),n}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},y(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function C(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function w(e){return E(e,(e=>e.attributes))}function S(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)((0,u.keys)(e),(0,u.keys)(t))}(e.attributes,t.attributes)}function B(e,t){const n={},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[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function I(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const x=(0,u.flow)(m.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=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=B(o,n.blocks);o.tree=I(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=I(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=I(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=B(o,n.blocks);o.tree=I(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=I(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=I(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),o.tree=I(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=I(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,u.keys)((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=I(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},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[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:C(n.blocks),attributes:w(n.blocks),order:_(n.blocks),parents:y(n.blocks),controlledInnerBlocks:{}},o=B(e,n.blocks);return e.tree={...o,"":{innerBlocks:n.blocks.map((e=>o[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(a=null==o?void 0:o.isPersistentChange)||void 0===a||a;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!S(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...C(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...C(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=_(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=_(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:k(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=e[o];if(!l.length||r===(0,u.first)(l))return e;const i=l.indexOf(r);return{...e,[o]:k(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=(0,u.first)(n),l=(0,u.last)(n),i=e[o];if(!i.length||l===(0,u.last)(i))return e;const a=i.indexOf(r);return{...e,[o]:k(i,a,a+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=_(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...y(t.blocks)};case"INSERT_BLOCKS":return{...e,...y(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...y(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var N,P,M=(0,m.combineReducers)({blocks:x,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n,o;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;switch(l.type){case"SELECTION_CHANGE":return l.clientId?{selectionStart:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.startOffset},selectionEnd:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.endOffset}}:{selectionStart:l.start||r.selectionStart,selectionEnd:l.end||r.selectionEnd};case"RESET_SELECTION":const{selectionStart:i,selectionEnd:a}=l;return{selectionStart:i,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=l;return s===(null===(e=r.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=r.selectionEnd)||void 0===t?void 0:t.clientId)?r:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==r||null===(n=r.selectionStart)||void 0===n?void 0:n.clientId,d=null==r||null===(o=r.selectionEnd)||void 0===o?void 0:o.clientId;if(!u&&!d)return r;if(!l.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!l.blocks.some((e=>e.clientId===d)))return{...r,selectionEnd:r.selectionStart}}return{selectionStart:T(r.selectionStart,l),selectionEnd:T(r.selectionEnd,l)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,m.select)(r.store).getActiveBlockVariation(l,o);let a=null!=i&&i.name?`${l}/${i.name}`:l;const s={name:a};return"core/block"===l&&(s.ref=o.ref,a+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[a]:{time:t.time,count:e.insertUsage[a]?e.insertUsage[a].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(e,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 null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;return{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t}});function R(e){return[e]}function L(){var e={clear:function(){e.head=null}};return e}function A(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o{const n=e.blocks.byClientId[t];return n?{...n,attributes:W(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function K(e,t){var n;const o=t&&At(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||H}const q=D(((e,t)=>({clientId:t,innerBlocks:Y(e,t)})),(e=>[e.blocks.order])),Y=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Re(e,t),(t=>q(e,t)))}),(e=>[e.blocks.order])),Q=D(((e,t)=>{const n=[];for(const o of t)for(const t of Re(e,o))n.push(t,...Q(e,[t]));return n}),(e=>[e.blocks.order])),X=D((e=>{const t=[];for(const n of Re(e))t.push(n,...Q(e,[n]));return t}),(e=>[e.blocks.order])),Z=D(((e,t)=>{const n=X(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),J=D(((e,t)=>{if(!t)return H;const n=X(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:H}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=D(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>$(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function te(e,t){return Re(e,t).length}function ne(e){return e.selection.selectionStart}function oe(e){return e.selection.selectionEnd}function re(e){return e.selection.selectionStart.clientId}function le(e){return e.selection.selectionEnd.clientId}function ie(e){const t=_e(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ae(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function se(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ce(e){const t=se(e);return t?$(e,t):null}function ue(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const de=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),pe=D((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=de(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:G(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function me(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function fe(e,t){const n=se(e),o=[...de(e,t),t],r=[...de(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=se(e)),void 0===t&&(t=n<0?Ee(e):Ce(e)),!t)return null;const o=ue(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),a=i+1*n;return a<0||a===l.length?null:l[a]}function he(e,t){return ge(e,t,-1)}function ve(e,t){return ge(e,t,1)}function be(e){return e.initialPosition}const ke=D((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return H;if(t.clientId===n.clientId)return[t.clientId];const o=ue(e,t.clientId);if(null===o)return H;const r=Re(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function _e(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?H:ke(e)}const ye=D((e=>{const t=_e(e);return t.length?t.map((t=>$(e,t))):H}),(e=>[...ke.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ee(e){return(0,u.first)(_e(e))||null}function Ce(e){return(0,u.last)(_e(e))||null}function we(e,t){return Ee(e)===t}function Se(e,t){return-1!==_e(e).indexOf(t)}const Be=D(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=ue(e,n),o=Se(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ie(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Te(e){const t=ne(e),n=oe(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Ne(e){const t=ne(e),n=oe(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Pe(e,t){const n=ne(e),o=oe(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const l=ue(e,n.clientId);if(l!==ue(e,o.clientId))return!1;const i=Re(e,l);let a,s;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(a=o,s=n):(a=n,s=o);const c=t?s.clientId:a.clientId,u=t?a.clientId:s.clientId,d=$(e,c);if(!(0,r.getBlockType)(d.name).merge)return!1;const p=$(e,u);if(p.name===d.name)return!0;const m=(0,r.switchToBlockType)(p,d.name);return m&&m.length}const Me=e=>{const t=ne(e),n=oe(e);if(t.clientId===n.clientId)return H;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return H;const o=ue(e,t.clientId);if(o!==ue(e,n.clientId))return H;const l=Re(e,o),i=l.indexOf(t.clientId),a=l.indexOf(n.clientId),[s,c]=i>a?[n,t]:[t,n],u=$(e,s.clientId),d=(0,r.getBlockType)(u.name),p=$(e,c.clientId),m=(0,r.getBlockType)(p.name),f=u.attributes[s.attributeKey],g=p.attributes[c.attributeKey],h=d.attributes[s.attributeKey],v=m.attributes[c.attributeKey];let b=(0,z.create)({html:f,...V(h)}),k=(0,z.create)({html:g,...V(v)});return b=(0,z.remove)(b,0,s.offset),k=(0,z.remove)(k,c.offset,k.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,z.toHTMLString)({value:b,...V(h)})}},{...p,attributes:{...p.attributes,[c.attributeKey]:(0,z.toHTMLString)({value:k,...V(v)})}}]};function Re(e,t){return e.blocks.order[t||""]||H}function Le(e,t){return Re(e,ue(e,t)).indexOf(t)}function Ae(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function De(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Re(e,t),(t=>Ae(e,t)||Se(e,t)||n&&De(e,t,n)))}function Oe(e,t){if(!t)return!1;const n=_e(e),o=n.indexOf(t);return o>-1&&o$e(e,t)))}function Ke(e){return e.isCaretWithinFormattedText}function qe(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=ue(e,l)||void 0,n=Le(e,r.clientId)+1):n=Re(e).length,{rootClientId:t,index:n}}function Ye(e){return null!==e.insertionPoint}function Qe(e){return e.template.isValid}function Xe(e){return e.settings.template}function Ze(e,t){if(!t)return e.settings.templateLock;const n=Ct(e,t);return n?n.templateLock:null}const Je=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},et=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:i}=wt(e),a=Je(i,t,!0);if(!a)return!1;const s=!!Ze(e,o);if(s)return!1;const c=Ct(e,o);if(o&&void 0===c)return!1;const d=null==c?void 0:c.allowedBlocks,p=Je(d,t),m=n.parent,f=G(e,o),g=Je(m,f);let h=!0;const v=n.ancestor;if(v){const t=[o,...de(e,o)];h=(0,u.some)(t,(t=>Je(v,G(e,t))))}const b=h&&(null===p&&null===g||!0===p||!0===g);return b?(0,l.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,o,{getBlock:$.bind(null,e),getBlockParentsByBlockName:pe.bind(null,e)}):b},tt=D(et,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function nt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>tt(e,G(e,t),n)))}function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=W(e,t);if(null===o)return!0;const{lock:r}=o,l=!!Ze(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ot(e,t,n)))}function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=W(e,t);if(null===o)return;const{lock:r}=o,l="all"===Ze(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>lt(e,t,n)))}function at(e,t){var n;return!!(0,r.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function st(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const ct=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&et(e,t.name,n),ut=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=st(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:dt(r,l)}},dt=(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}},pt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(ee(e,X(e)),{name:t.name}));const{time:i,count:a=0}=st(e,o)||{},s={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:dt(i,a)};if("transform"===n)return s;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},mt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=pt(e,{buildScope:"inserter"}),o=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=F;if("web"===a.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:s=0}=st(e,l)||{},c=dt(i,s);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>ct(e,n,t))).map(n),s=et(e,"core/block",t)?Nt(e).map(l):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=ut(e,n);t.push(...o.map(r))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...s]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Nt(e),(0,r.getBlockTypes)()])),ft=D((function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const[l]=t,i=pt(e,{buildScope:"transform"}),a=(0,r.getBlockTypes)().filter((t=>ct(e,t,o))).map(i),s=(0,u.mapKeys)(a,(e=>{let{name:t}=e;return t}));s["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,g.__)("Unwrap"),icon:null===(n=s[l.name])||void 0===n?void 0:n.icon};const c=(0,r.getPossibleBlockTransformations)(t).reduce(((e,t)=>("*"===t?e.push(s["*"]):s[null==t?void 0:t.name]&&e.push(s[t.name]),e)),[]);return(0,u.orderBy)(c,(e=>s[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),gt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>ct(e,n,t)));if(n)return!0;const o=et(e,"core/block",t)&&Nt(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Nt(e),(0,r.getBlockTypes)()])),ht=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>ct(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),vt=D((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l($(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),bt=D(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),kt=D((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=wt(e),o=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return bt(e,n)})),r=o.filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!Je(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return r}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),_t=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=kt(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return tt(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),yt=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return H;const o=_t(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[..._t.getDependants(e,t)])),Et=D((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return H;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||At(e,n)})))return H;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return yt(e,o,n)}),((e,t)=>[...yt.getDependants(e,t)]));function Ct(e,t){return e.blockListSettings[t]}function wt(e){return e.settings}function St(e){return e.blocks.isPersistentChange}const Bt=D((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),It=D(((e,t)=>{var n;const o=(0,u.find)(Nt(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Nt(e)]));function xt(e){return e.blocks.isIgnoredChange}function Tt(e){return e.lastBlockAttributesChange}function Nt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:H}function Pt(e){return e.isNavigationMode}function Mt(e){return e.hasBlockMovingClientId}function Rt(e){return!!e.automaticChangeStatus}function Lt(e,t){return e.highlightedBlock===t}function At(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Dt=D(((e,t)=>{if(!t.length)return null;const n=se(e);if(t.includes(G(e,n)))return n;const o=_e(e),r=pe(e,n||o[0],t);return r?(0,u.last)(r):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Ot(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}var Ft=window.wp.a11y,zt=window.wp.deprecated,Vt=n.n(zt);const Ht=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Gt(e))},Gt=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),a=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(a!==n.isValidTemplate())return o.setTemplateValidity(a),a};function Ut(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Wt(e){return Vt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function $t(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function jt(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const qt=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},Yt=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function Qt(){return{type:"START_MULTI_SELECT"}}function Xt(){return{type:"STOP_MULTI_SELECT"}}const Zt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o=>{let{select:r,dispatch:l}=o;if(r.getBlockRootClientId(e)!==r.getBlockRootClientId(t))return;l({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=r.getSelectedBlockCount();(0,Ft.speak)((0,g.sprintf)((0,g._n)("%s block selected.","%s blocks selected.",i),i),"assertive")}};function Jt(){return{type:"CLEAR_SELECTED_BLOCK"}}function en(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function tn(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,a=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${a}`.trim()}}}))}const nn=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:a}=l;e=(0,u.castArray)(e),t=tn((0,u.castArray)(t),i.getSettings());const s=i.getBlockRootClientId((0,u.first)(e));for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function on(e,t){return nn(e,t)}const rn=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:(0,u.castArray)(t),rootClientId:n})},ln=rn("MOVE_BLOCKS_DOWN"),an=rn("MOVE_BLOCKS_UP"),sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function cn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return sn([e],t,n,o)}function un(e,t,n,o,r){return dn([e],t,n,o,0,r)}const dn=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:a,dispatch:s}=i;(0,u.isObject)(r)&&(l=r,r=0,Vt()("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=tn((0,u.castArray)(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function pn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function mn(){return{type:"HIDE_INSERTION_POINT"}}function fn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const gn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},hn=e=>t=>{let{registry:n,select:o,dispatch:l}=t;const i=o.getSelectionStart(),a=o.getSelectionEnd();if(i.clientId===a.clientId)return;if(!i.attributeKey||!a.attributeKey||void 0===i.offset||void 0===a.offset)return!1;const s=o.getBlockRootClientId(i.clientId);if(s!==o.getBlockRootClientId(a.clientId))return;const c=o.getBlockOrder(s);let d,p;c.indexOf(i.clientId)>c.indexOf(a.clientId)?(d=a,p=i):(d=i,p=a);const m=e?p:d,f=o.getBlock(m.clientId),g=(0,r.getBlockType)(f.name);if(!g.merge)return;const h=d,v=p,b=o.getBlock(h.clientId),k=(0,r.getBlockType)(b.name),_=o.getBlock(v.clientId),y=(0,r.getBlockType)(_.name),E=b.attributes[h.attributeKey],C=_.attributes[v.attributeKey],w=k.attributes[h.attributeKey],S=y.attributes[v.attributeKey];let B=(0,z.create)({html:E,...V(w)}),I=(0,z.create)({html:C,...V(S)});B=(0,z.remove)(B,h.offset,B.text.length),I=(0,z.insert)(I,"†",0,v.offset);const x=(0,r.cloneBlock)(b,{[h.attributeKey]:(0,z.toHTMLString)({value:B,...V(w)})}),T=(0,r.cloneBlock)(_,{[v.attributeKey]:(0,z.toHTMLString)({value:I,...V(S)})}),N=e?x:T,P=b.name===_.name?[N]:(0,r.switchToBlockType)(N,g.name);if(!P||!P.length)return;let M;if(e){const e=P.pop();M=g.merge(e.attributes,T.attributes)}else{const e=P.shift();M=g.merge(x.attributes,e.attributes)}const R=(0,u.findKey)(M,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),L=M[R],A=(0,z.create)({html:L,...V(g.attributes[R])}),D=A.text.indexOf("†"),O=(0,z.remove)(A,D,D+1),F=(0,z.toHTMLString)({value:O,...V(g.attributes[R])});M[R]=F;const H=o.getSelectedBlockClientIds(),G=[...e?P:[],{...f,attributes:{...f.attributes,...M}},...e?[]:P];n.batch((()=>{l.selectionChange(f.clientId,R,D,D),l.replaceBlocks(H,G,0,o.getSelectedBlocksInitialCaretPosition())}))},vn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),l=t.getSelectionEnd();if(o.clientId===l.clientId)return;if(!o.attributeKey||!l.attributeKey||void 0===o.offset||void 0===l.offset)return;const i=t.getBlockRootClientId(o.clientId);if(i!==t.getBlockRootClientId(l.clientId))return;const a=t.getBlockOrder(i);let s,c;a.indexOf(o.clientId)>a.indexOf(l.clientId)?(s=l,c=o):(s=o,c=l);const u=s,d=c,p=t.getBlock(u.clientId),m=(0,r.getBlockType)(p.name),f=t.getBlock(d.clientId),g=(0,r.getBlockType)(f.name),h=p.attributes[u.attributeKey],v=f.attributes[d.attributeKey],b=m.attributes[u.attributeKey],k=g.attributes[d.attributeKey];let _=(0,z.create)({html:h,...V(b)}),y=(0,z.create)({html:v,...V(k)});_=(0,z.remove)(_,u.offset,_.text.length),y=(0,z.remove)(y,0,d.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...p,attributes:{...p.attributes,[u.attributeKey]:(0,z.toHTMLString)({value:_,...V(b)})}},(0,r.createBlock)((0,r.getDefaultBlockName)()),{...f,attributes:{...f.attributes,[d.attributeKey]:(0,z.toHTMLString)({value:y,...V(k)})}}],1,t.getSelectedBlocksInitialCaretPosition())},bn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),r=t.getSelectionEnd();n.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},kn=(e,t)=>n=>{let{select:o,dispatch:l}=n;const i=[e,t];l({type:"MERGE_BLOCKS",blocks:i});const[a,s]=i,c=o.getBlock(a),d=(0,r.getBlockType)(c.name);if(d&&!d.merge)return void l.selectBlock(c.clientId);const p=o.getBlock(s),m=(0,r.getBlockType)(p.name),{clientId:f,attributeKey:g,offset:h}=o.getSelectionStart(),v=(f===a?d:m).attributes[g],b=(f===a||f===s)&&void 0!==g&&void 0!==h&&!!v;v||("number"==typeof g?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 g):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const k=(0,r.cloneBlock)(c),_=(0,r.cloneBlock)(p);if(b){const e=f===a?k:_,t=e.attributes[g],n=(0,z.insert)((0,z.create)({html:t,...V(v)}),"†",h,h);e.attributes[g]=(0,z.toHTMLString)({value:n,...V(v)})}const y=c.name===p.name?[_]:(0,r.switchToBlockType)(_,c.name);if(!y||!y.length)return;const E=d.merge(k.attributes,y[0].attributes);if(b){const e=(0,u.findKey)(E,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=E[e],n=(0,z.create)({html:t,...V(d.attributes[e])}),o=n.text.indexOf("†"),r=(0,z.remove)(n,o,o+1),i=(0,z.toHTMLString)({value:r,...V(d.attributes[e])});E[e]=i,l.selectionChange(c.clientId,e,o,o)}l.replaceBlocks([c.clientId,p.clientId],[{...c,attributes:{...c.attributes,...E}},...y.slice(1)],0)},_n=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=(0,u.castArray)(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function yn(e,t){return _n([e],t)}function En(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Cn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function wn(){return{type:"START_TYPING"}}function Sn(){return{type:"STOP_TYPING"}}function Bn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function In(){return{type:"STOP_DRAGGING_BLOCKS"}}function xn(){return{type:"ENTER_FORMATTED_TEXT"}}function Tn(){return{type:"EXIT_FORMATTED_TEXT"}}function Nn(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const Pn=(e,t,n)=>o=>{let{dispatch:l}=o;const i=(0,r.getDefaultBlockName)();if(!i)return;const a=(0,r.createBlock)(i,e);return l.insertBlock(a,n,t)};function Mn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Rn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Ln(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function An(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Dn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const On=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Fn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Ft.speak)((0,g.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Ft.speak)((0,g.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},zn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Ft.speak)((0,g.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Vn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if((0,u.some)(i,(e=>!e)))return;const a=i.map((e=>e.name));if(a.some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),c=o.getBlockIndex((0,u.last)((0,u.castArray)(e))),d=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(d,c+1,s,t),d.length>1&&t&&l.multiSelect((0,u.first)(d).clientId,(0,u.last)(d).clientId),d.map((e=>e.clientId))}},Hn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l)},Gn=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l+1)};function Un(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Wn=e=>async t=>{let{dispatch:n}=t;n(Un(e,!0)),await new Promise((e=>setTimeout(e,150))),n(Un(e,!1))};function $n(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const jn="core/block-editor",Kn={reducer:M,selectors:e,actions:t},qn=(0,m.createReduxStore)(jn,{...Kn,persist:["preferences"]});(0,m.registerStore)(jn,{...Kn,persist:["preferences"]});const Yn={name:"",isSelected:!1},Qn=(0,a.createContext)(Yn),{Provider:Xn}=Qn;function Zn(){return(0,a.useContext)(Qn)}function Jn(){const{isSelected:e,clientId:t,name:n}=Zn();return(0,m.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(qn);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function eo(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=Jn(),{clientId:o}=Zn(),l=(0,m.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(qn),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=f[e])||void 0===i?void 0:i.Fill:l?f.parent.Fill:null}(t,l);return i?(0,a.createElement)(p.__experimentalStyleProvider,{document:document},(0,a.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(p.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,a.createElement)(p.ToolbarGroup,{controls:n}),o)}))):null}function to(e){let{group:t="default",...n}=e;const o=(0,a.useContext)(p.__experimentalToolbarContext),r=f[t].Slot,l=(0,p.__experimentalUseSlot)(r.__unstableName);return Boolean(l.fills&&l.fills.length)?"default"===t?(0,a.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const no=eo;no.Slot=to;const oo=e=>(0,a.createElement)(eo,i({group:"inline"},e));oo.Slot=e=>(0,a.createElement)(to,i({group:"inline"},e));var ro=no;var lo=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var io=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var ao=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var so=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var co=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"}));var uo=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));var po=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var mo=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var fo=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var go=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var ho=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}));var vo=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const ko=(0,a.createContext)({refs:new Map,callbacks:new Map});function _o(e){let{children:t}=e;const n=(0,a.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,a.createElement)(ko.Provider,{value:n},t)}function yo(e){const{refs:t,callbacks:n}=(0,a.useContext)(ko),o=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Eo(e){const{refs:t}=(0,a.useContext)(ko),n=(0,a.useRef)();return n.current=e,(0,a.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Co(e){const{callbacks:t}=(0,a.useContext)(ko),n=Eo(e),[o,r]=(0,a.useState)(null);return(0,a.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}const wo=["color","border","typography","spacing"],So={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0: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=>void 0===e.fontSizes?void 0: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},Bo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function Io(e){const{name:t}=Zn(),n=(0,m.useSelect)((n=>{var o;if(wo.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");const l=n(qn).getSettings(),i=(e=>Bo[e]||e)(e),a=`__experimentalFeatures.${i}`,s=`__experimentalFeatures.blocks.${t}.${i}`,c=null!==(o=(0,u.get)(l,s))&&void 0!==o?o:(0,u.get)(l,a);var d,p;if(void 0!==c)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(d=null!==(p=c.custom)&&void 0!==p?p:c.theme)&&void 0!==d?d:c.default:c;const m=So[i]?So[i](l):void 0;return void 0!==m?m:"typography.dropCap"===i||void 0}),[t,e]);return n}window.wp.warning;var xo={default:(0,p.createSlotFill)("InspectorControls"),advanced:(0,p.createSlotFill)("InspectorAdvancedControls"),border:(0,p.createSlotFill)("InspectorControlsBorder"),color:(0,p.createSlotFill)("InspectorControlsColor"),dimensions:(0,p.createSlotFill)("InspectorControlsDimensions"),typography:(0,p.createSlotFill)("InspectorControlsTypography")};function To(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=Jn(),l=null===(t=xo[n])||void 0===t?void 0:t.Fill;return l?r?(0,a.createElement)(p.__experimentalStyleProvider,{document:document},(0,a.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(p.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const No=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,No),u.identity);return(0,u.isEmpty)(t)?void 0:t};function Po(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function Mo(e,t,n,o,r,l){var i;if((0,u.every)(e,(e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let a=null===(i=o[0])||void 0===i?void 0:i.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;var s;a=null===(s=o[r])||void 0===s?void 0:s.attributes}let c=n;return(0,u.forEach)(e,((e,n)=>{e&&t[n].forEach((e=>{const t=(0,u.get)(a,e);t&&(c={...c,attributes:Po(c.attributes,e,t)})}))})),c}function Ro(e,t,n){const o=(0,r.getBlockSupport)(e,t),l=null==o?void 0:o.__experimentalSkipSerialization;return Array.isArray(l)?l.includes(n):l}function Lo(e){let{children:t,group:n,label:o}=e;const{updateBlockAttributes:r}=(0,m.useDispatch)(qn),{getBlockAttributes:l,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:c}=(0,m.useSelect)(qn),u=s(),d=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?i():[u];n.forEach((n=>{const{style:o}=l(n);let r={style:o};e.forEach((e=>{r={...r,...e(r)}})),r={...r,style:No(r.style)},t[n]=r})),r(n,t,!0)}),[No,l,i,c,u,r]);return(0,a.createElement)(p.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:d,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function Ao(e){let{Slot:t,...n}=e;const o=(0,a.useContext)(p.__experimentalToolsPanelContext);return(0,a.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function Do(e){var t;let{__experimentalGroup:n="default",label:o,...r}=e;const l=null===(t=xo[n])||void 0===t?void 0:t.Slot,s=(0,p.__experimentalUseSlot)(null==l?void 0:l.__unstableName);if(!l||!s)return"undefined"!=typeof process&&process.env,null;return Boolean(s.fills&&s.fills.length)?o?(0,a.createElement)(Lo,{group:n,label:o},(0,a.createElement)(Ao,i({},r,{Slot:l}))):(0,a.createElement)(l,i({},r,{bubblesVirtually:!0})):null}const Oo=To;Oo.Slot=Do;const Fo=e=>(0,a.createElement)(To,i({},e,{__experimentalGroup:"advanced"}));Fo.Slot=e=>(0,a.createElement)(Do,i({},e,{__experimentalGroup:"advanced"})),Fo.slotName="InspectorAdvancedControls";var zo=Oo;function Vo(e){const t=(0,r.getBlockSupport)(e,jo);return!!(!0===t||null!=t&&t.margin)}function Ho(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Io("spacing.margin"),n=!Zo(e,"margin");return!Vo(e)||t||n}function Go(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"]}),i=Xo(n,"margin"),s=i&&i.some((e=>qo.includes(e)));if(Ho(e))return null;return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,margin:e}};r({style:No(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{margin:e}};r({style:No(t)})},label:(0,g.__)("Margin"),sides:i,units:l,allowReset:!1,splitOnAxis:s})),native:null})}function Uo(e){const t=(0,r.getBlockSupport)(e,jo);return!!(!0===t||null!=t&&t.padding)}function Wo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Io("spacing.padding"),n=!Zo(e,"padding");return!Uo(e)||t||n}function $o(e){var t;const{name:n,attributes:{style:o},setAttributes:r}=e,l=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"]}),i=Xo(n,"padding"),s=i&&i.some((e=>qo.includes(e)));if(Wo(e))return null;return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.__experimentalBoxControl,{values:null==o||null===(t=o.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...o,spacing:{...null==o?void 0:o.spacing,padding:e}};r({style:No(t)})},onChangeShowVisualizer:e=>{const t={...o,visualizers:{padding:e}};r({style:No(t)})},label:(0,g.__)("Padding"),sides:i,units:l,allowReset:!1,splitOnAxis:s})),native:null})}const jo="spacing",Ko=["top","right","bottom","left"],qo=["vertical","horizontal"];function Yo(e){const t=tr(e),n=Wo(e),o=Ho(e),l=Qo(e),i=function(e){if("web"!==a.Platform.OS)return!1;return Jo(e)||Uo(e)||Vo(e)}(e.name);if(l||!i)return null;const s=(0,r.getBlockSupport)(e.name,[jo,"__experimentalDefaultControls"]),c=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,a.createElement)(zo,{__experimentalGroup:"dimensions"},!n&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,g.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:c("padding"),isShownByDefault:null==s?void 0:s.padding,panelId:e.clientId},(0,a.createElement)($o,e)),!o&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,g.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:c("margin"),isShownByDefault:null==s?void 0:s.margin,panelId:e.clientId},(0,a.createElement)(Go,e)),!t&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,g.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:c("blockGap"),isShownByDefault:null==s?void 0:s.blockGap,panelId:e.clientId},(0,a.createElement)(nr,e)))}const Qo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=tr(e),n=Wo(e),o=Ho(e);return t&&n&&o};function Xo(e,t){var n;const o=(0,r.getBlockSupport)(e,jo);if(o&&"boolean"!=typeof o[t])return Array.isArray(o[t])?o[t]:null!==(n=o[t])&&void 0!==n&&n.sides?o[t].sides:void 0}function Zo(e,t){const n=Xo(e,t);return!(n&&n.some((e=>Ko.includes(e)))&&n.some((e=>qo.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function Jo(e){const t=(0,r.getBlockSupport)(e,jo);return!!(!0===t||null!=t&&t.blockGap)}function er(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function tr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Io("spacing.blockGap");return!Jo(e)||t}function nr(e){var t;const{clientId:n,attributes:{style:o},name:r,setAttributes:l}=e,i=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"]}),s=Xo(r,"blockGap"),c=Eo(n);if(tr(e))return null;const u=s&&s.some((e=>qo.includes(e))),d=e=>{var t;let n=e;e&&u&&(n={...er(e)});const r={...o,spacing:{...null==o?void 0:o.spacing,blockGap:n}};l({style:No(r)});const i=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;c.current&&i&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},m=er(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),f=u?{...m,right:null==m?void 0:m.left,bottom:null==m?void 0:m.top}:null==m?void 0:m.top;return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,u?(0,a.createElement)(p.__experimentalBoxControl,{label:(0,g.__)("Block spacing"),min:0,onChange:d,units:i,sides:s,values:f,allowReset:!1,splitOnAxis:u}):(0,a.createElement)(p.__experimentalUnitControl,{label:(0,g.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:d,units:i,value:f})),native:null})}const or=(0,a.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(p.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),rr=(0,a.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(p.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),lr={top:{icon:(0,a.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(p.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,g._x)("Align top","Block vertical alignment setting")},center:{icon:rr,title:(0,g._x)("Align middle","Block vertical alignment setting")},bottom:{icon:or,title:(0,g._x)("Align bottom","Block vertical alignment setting")}},ir=["top","center","bottom"],ar={isAlternate:!0};var sr=function(e){let{value:t,onChange:n,controls:o=ir,isCollapsed:r=!0,isToolbar:l}=e;const s=lr[t],c=lr.top,u=l?p.ToolbarGroup:p.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{};return(0,a.createElement)(u,i({popoverProps:ar,icon:s?s.icon:c.icon,label:(0,g._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...lr[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))};const cr=e=>(0,a.createElement)(sr,i({},e,{isToolbar:!1})),ur=e=>(0,a.createElement)(sr,i({},e,{isToolbar:!0})),dr={left:po,center:mo,right:fo,"space-between":go};var pr=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:s}=e;const c=e=>{o(e===r?void 0:e)},u=r?dr[r]:dr.left,d=[{name:"left",icon:po,title:(0,g.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:mo,title:(0,g.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:fo,title:(0,g.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:go,title:(0,g.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],m=s?p.ToolbarGroup:p.ToolbarDropdownMenu,f=s?{isCollapsed:n}:{};return(0,a.createElement)(m,i({icon:u,popoverProps:l,label:(0,g.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},f))};const mr=e=>(0,a.createElement)(pr,i({},e,{isToolbar:!1})),fr=e=>(0,a.createElement)(pr,i({},e,{isToolbar:!0})),gr={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},hr={left:"flex-start",right:"flex-end",center:"center"},vr={top:"flex-start",center:"center",bottom:"flex-end"},br=["wrap","nowrap"];var kr={name:"flex",label:(0,g.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o={}}=e;const{allowOrientation:r=!0}=o;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.Flex,null,(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(yr,{layout:t,onChange:n})),(0,a.createElement)(p.FlexItem,null,r&&(0,a.createElement)(Cr,{layout:t,onChange:n}))),(0,a.createElement)(Er,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;if(null!=o&&o.allowSwitching)return null;const{allowVerticalAlignment:r=!0}=o;return(0,a.createElement)(ro,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(yr,{layout:t,onChange:n,isToolbar:!0}),r&&"vertical"!==(null==t?void 0:t.orientation)&&(0,a.createElement)(_r,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){var t,n;let{selector:o,layout:l,style:i,blockName:s}=e;const{orientation:c="horizontal"}=l,u=Io("spacing.blockGap"),d=(0,r.getBlockSupport)(s,["spacing","blockGap","__experimentalDefault"])||"0.5em",p=null!==u,m=null!=i&&null!==(t=i.spacing)&&void 0!==t&&t.blockGap&&!Ro(s,"spacing","blockGap")?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=er(e);if(!n)return null;const o=(null==n?void 0:n.top)||t,r=(null==n?void 0:n.left)||t;return o===r?o:`${o} ${r}`}(null==i||null===(n=i.spacing)||void 0===n?void 0:n.blockGap,d):`var( --wp--style--block-gap, ${d} )`,f=gr[l.justifyContent]||gr.left,g=br.includes(l.flexWrap)?l.flexWrap:"wrap",h=`\n\t\tflex-direction: row;\n\t\talign-items: ${vr[l.verticalAlignment]||vr.center};\n\t\tjustify-content: ${f};\n\t\t`,v=`\n\t\tflex-direction: column;\n\t\talign-items: ${hr[l.justifyContent]||hr.left};\n\t\t`;return(0,a.createElement)("style",null,`\n\t\t\t\t${bo(o)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-wrap: ${g};\n\t\t\t\t\tgap: ${p?m:d};\n\t\t\t\t\t${"horizontal"===c?h:v}\n\t\t\t\t}\n\n\t\t\t\t${bo(o,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function _r(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{verticalAlignment:r=vr.center}=t,l=e=>{n({...t,verticalAlignment:e})};if(o)return(0,a.createElement)(cr,{onChange:l,value:r});const i=[{value:"flex-start",label:(0,g.__)("Align items top")},{value:"center",label:(0,g.__)("Align items center")},{value:"flex-end",label:(0,g.__)("Align items bottom")}];return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,a.createElement)("legend",null,(0,g.__)("Vertical alignment")),(0,a.createElement)("div",null,i.map(((e,t,n)=>(0,a.createElement)(p.Button,{key:e,label:n,icon:t,isPressed:r===e,onClick:()=>l(e)})))))}function yr(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},s=["left","center","right"];if("horizontal"===l&&s.push("space-between"),o)return(0,a.createElement)(mr,{allowedControls:s,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:po,label:(0,g.__)("Justify items left")},{value:"center",icon:mo,label:(0,g.__)("Justify items center")},{value:"right",icon:fo,label:(0,g.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:go,label:(0,g.__)("Space between items")}),(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,a.createElement)("legend",null,(0,g.__)("Justification")),(0,a.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,a.createElement)(p.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function Er(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,a.createElement)(p.ToggleControl,{label:(0,g.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function Cr(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,a.createElement)("legend",null,(0,g.__)("Orientation")),(0,a.createElement)(p.Button,{label:"horizontal",icon:ho,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,a.createElement)(p.Button,{label:"vertical",icon:vo,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}var wr=function(e){let{icon:t,size:n=24,...o}=e;return(0,a.cloneElement)(t,{width:n,height:n,...o})},Sr={name:"default",label:(0,g.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r}=t,l=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"]});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(p.__experimentalUnitControl,{label:(0,g.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:l}),(0,a.createElement)(wr,{icon:ao})),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(p.__experimentalUnitControl,{label:(0,g.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:l}),(0,a.createElement)(wr,{icon:co}))),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,a.createElement)(p.Button,{variant:"secondary",isSmall:!0,disabled:!r&&!o,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,g.__)("Reset"))),(0,a.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,g.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){var t;let{selector:n,layout:o={},style:r,blockName:l}=e;const{contentSize:i,wideSize:s}=o,c=null!==Io("spacing.blockGap"),u=er(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),d=null!=u&&u.top&&!Ro(l,"spacing","blockGap")?null==u?void 0:u.top:"var( --wp--style--block-gap )";let p=i||s?`\n\t\t\t\t\t${bo(n,"> :where(:not(.alignleft):not(.alignright))")} {\n\t\t\t\t\t\tmax-width: ${null!=i?i:s};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\t\t\t\t\t${bo(n,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:i};\n\t\t\t\t\t}\n\t\t\t\t\t${bo(n,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return p+=`\n\t\t\t${bo(n,"> .alignleft")} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-inline-start: 0;\n\t\t\t\tmargin-inline-end: 2em;\n\t\t\t}\n\t\t\t${bo(n,"> .alignright")} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-inline-start: 2em;\n\t\t\t\tmargin-inline-end: 0;\n\t\t\t}\n\n\t\t\t${bo(n,"> .aligncenter")} {\n\t\t\t\tmargin-left: auto !important;\n\t\t\t\tmargin-right: auto !important;\n\t\t\t}\n\t\t`,c&&(p+=`\n\t\t\t\t${bo(n,"> *")} {\n\t\t\t\t\tmargin-block-start: 0;\n\t\t\t\t\tmargin-block-end: 0;\n\t\t\t\t}\n\t\t\t\t${bo(n,"> * + *")} {\n\t\t\t\t\tmargin-block-start: ${d};\n\t\t\t\t}\n\t\t\t`),(0,a.createElement)("style",null,p)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;r.test(t)&&(o.none=(0,g.sprintf)((0,g.__)("Max %s wide"),t));r.test(n)&&(o.wide=(0,g.sprintf)((0,g.__)("Max %s wide"),n));return o}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const Br=[Sr,kr];function Ir(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Br.find((t=>t.name===e))}const xr={type:"default"},Tr=(0,a.createContext)(xr),Nr=Tr.Provider;function Pr(){return(0,a.useContext)(Tr)}function Mr(e){let{layout:t={},...n}=e;const o=Ir(t.type);return o?(0,a.createElement)(o.save,i({layout:t},n)):null}const Rr=["none","left","center","right","wide","full"],Lr=["wide","full"];function Ar(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rr;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=Pr(),r=Ir(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name)return[];const{alignments:i=Rr}=o,a=e.filter((e=>(o.alignments||t||!Lr.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===a.length&&"none"===a[0].name?[]:a}const Dr={none:{icon:lo,title:(0,g._x)("None","Alignment option")},left:{icon:io,title:(0,g.__)("Align left")},center:{icon:ao,title:(0,g.__)("Align center")},right:{icon:so,title:(0,g.__)("Align right")},wide:{icon:co,title:(0,g.__)("Wide width")},full:{icon:uo,title:(0,g.__)("Full width")}},Or={isAlternate:!0};var Fr=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const s=Ar(o);if(!!!s.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Dr[t],m=Dr.none,f=r?p.ToolbarGroup:p.ToolbarDropdownMenu,h={popoverProps:Or,icon:d?d.icon:m.icon,label:(0,g.__)("Align"),toggleProps:{describedBy:(0,g.__)("Change alignment")}},v=r||a.Platform.isNative?{isCollapsed:r?l:void 0,controls:s.map((e=>{let{name:n}=e;return{...Dr[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},s.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Dr[o],s=o===t||!t&&"none"===o;return(0,a.createElement)(p.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,a.createElement)(f,i({},h,v))};const zr=e=>(0,a.createElement)(Fr,i({},e,{isToolbar:!1})),Vr=e=>(0,a.createElement)(Fr,i({},e,{isToolbar:!0})),Hr=["left","center","right","wide","full"],Gr=["wide","full"];function Ur(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Hr.filter((t=>e.includes(t))):!0===e?[...Hr]:[],!o||!0===e&&!n?(0,u.without)(t,...Gr):t}const Wr=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t,o=Ar(Ur((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,a.createElement)(a.Fragment,null,!!o.length&&(0,a.createElement)(ro,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(zr,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:o})),(0,a.createElement)(e,t))}),"withToolbarControls"),$r=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,s=Ar(Ur((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,a.createElement)(e,t);let c=t.wrapperProps;return s.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,a.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,u.has)(e.attributes,["align","type"])||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Hr,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",$r),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Wr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Ur((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,u.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const jr=/[\s#]/g,Kr={type:"string",source:"attribute",attribute:"id",selector:"*"};const qr=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===a.Platform.OS,o=(0,a.createElement)(p.TextControl,{className:"html-anchor-control",label:(0,g.__)("HTML anchor"),help:(0,a.createElement)(a.Fragment,null,(0,g.__)("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,a.createElement)(p.ExternalLink,{href:(0,g.__)("https://wordpress.org/support/article/page-jumps/")},(0,g.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,g.__)("Add an anchor"),onChange:e=>{e=e.replace(jr,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(zo,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,a.createElement)(zo,null,(0,a.createElement)(p.PanelBody,{title:(0,g.__)("Heading settings")},o)))}return(0,a.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,u.has)(e.attributes,["anchor","type"])||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Kr}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",qr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Yr=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(zo,{__experimentalGroup:"advanced"},(0,a.createElement)(p.TextControl,{autoComplete:"off",label:(0,g.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,g.__)("Separate multiple classes with spaces.")}))):(0,a.createElement)(e,t)),"withInspectorControl");function Qr(e,t,n,o){const r=(0,u.get)(e,n);if(!r)return[];const l=[];if("string"==typeof r)l.push({selector:t.selector,key:o,value:r});else{const e=["top","right","bottom","left"].reduce(((e,n)=>{const l=(0,u.get)(r,[n]);return l&&e.push({selector:t.selector,key:`${o}${(0,u.upperFirst)(n)}`,value:l}),e}),[]);l.push(...e)}return l}(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Yr),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,r.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){var l;const o=null===(l=t[n])||void 0===l?void 0:l.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,u.uniq)([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));const Xr=[{name:"margin",generate:(e,t)=>Qr(e,t,["spacing","margin"],"margin")},{name:"padding",generate:(e,t)=>Qr(e,t,["spacing","padding"],"padding")}];function Zr(e,t){const n=[];return Xr.forEach((o=>{n.push(...o.generate(e,t))})),n}var Jr=window.wp.dom;const el=(0,a.createContext)({});function tl(e){let{value:t,children:n}=e;const o=(0,a.useContext)(el),r=(0,a.useMemo)((()=>({...o,...t})),[o,t]);return(0,a.createElement)(el.Provider,{value:r,children:n})}var nl=el;const ol={};var rl=(0,p.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,a.useContext)(nl),s=(0,a.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):ol),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,a.createElement)(d,i({},e,{context:s}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className);return(0,a.createElement)(d,i({},e,{context:s,className:m}))}));function ll(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,a.createElement)(Xn,{value:(0,a.useMemo)((()=>r),Object.values(r))},(0,a.createElement)(rl,e))}var il=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var al=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,a.createElement)("div",{style:{display:"contents",all:"initial"}},(0,a.createElement)("div",{className:c()(t,"block-editor-warning")},(0,a.createElement)("div",{className:"block-editor-warning__contents"},(0,a.createElement)("p",{className:"block-editor-warning__message"},o),(a.Children.count(n)>0||r)&&(0,a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,((e,t)=>(0,a.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,a.createElement)(p.DropdownMenu,{className:"block-editor-warning__secondary",icon:il,label:(0,g.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,a.createElement)(p.MenuGroup,null,r.map(((e,t)=>(0,a.createElement)(p.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},sl=n(1973);function cl(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,a.createElement)("div",{className:i},(0,a.createElement)("div",{className:"block-editor-block-compare__content"},(0,a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,a.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,a.createElement)(a.RawHTML,null,(0,Jr.safeHTML)(o)))),(0,a.createElement)("div",{className:"block-editor-block-compare__action"},(0,a.createElement)(p.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}var ul=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const s=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,f=s,(0,sl.Kx)(m,f).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,a.createElement)("span",{key:t,className:n},e.value)})));var m,f;return(0,a.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,a.createElement)(cl,{title:(0,g.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,g.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,a.createElement)(cl,{title:(0,g.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:s}))};const dl=e=>(0,r.rawHandler)({HTML:e.originalContent});var pl=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(qn).getBlock(n)}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(qn);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,dl(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const s=!!(0,r.getBlockType)("core/html"),[c,u]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>u(!0)),[]),m=(0,a.useCallback)((()=>u(!1)),[]),f=(0,a.useMemo)((()=>[{title:(0,g._x)("Resolve","imperative verb"),onClick:d},s&&{title:(0,g.__)("Convert to HTML"),onClick:t},{title:(0,g.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(al,{actions:[(0,a.createElement)(p.Button,{key:"recover",onClick:l,variant:"primary"},(0,g.__)("Attempt Block Recovery"))],secondaryActions:f},(0,g.__)("This block contains unexpected or invalid content.")),c&&(0,a.createElement)(p.Modal,{title:(0,g.__)("Resolve Block"),onRequestClose:m,className:"block-editor-block-compare"},(0,a.createElement)(ul,{block:i,onKeep:t,onConvert:n,convertor:dl,convertButtonText:(0,g.__)("Convert to Blocks")})))}));const ml=(0,a.createElement)(al,{className:"block-editor-block-list__block-crash-warning"},(0,g.__)("This block has encountered an error and cannot be previewed."));var fl=()=>ml;class gl extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var hl=gl,vl=n(773);var bl=function(e){let{clientId:t}=e;const[n,o]=(0,a.useState)(""),l=(0,m.useSelect)((e=>e(qn).getBlock(t)),[t]),{updateBlock:i}=(0,m.useDispatch)(qn);return(0,a.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,a.createElement)(vl.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const a=(0,r.getBlockAttributes)(e,n,l.attributes),s=n||(0,r.getSaveContent)(e,a),[c]=n?(0,r.validateBlock)({...l,attributes:a,originalContent:s}):[!0];i(t,{attributes:a,originalContent:s,isValid:c}),n||o({content:s})},onChange:e=>o(e.target.value)})};let kl=Al();const _l=e=>Pl(e,kl);let yl=Al();_l.write=e=>Pl(e,yl);let El=Al();_l.onStart=e=>Pl(e,El);let Cl=Al();_l.onFrame=e=>Pl(e,Cl);let wl=Al();_l.onFinish=e=>Pl(e,wl);let Sl=[];_l.setTimeout=(e,t)=>{let n=_l.now()+t,o=()=>{let e=Sl.findIndex((e=>e.cancel==o));~e&&Sl.splice(e,1),Tl-=~e?1:0},r={time:n,handler:e,cancel:o};return Sl.splice(Bl(n),0,r),Tl+=1,Ml(),r};let Bl=e=>~(~Sl.findIndex((t=>t.time>e))||~Sl.length);_l.cancel=e=>{El.delete(e),Cl.delete(e),wl.delete(e),kl.delete(e),yl.delete(e)},_l.sync=e=>{Nl=!0,_l.batchedUpdates(e),Nl=!1},_l.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,_l.onStart(n)}return o.handler=e,o.cancel=()=>{El.delete(n),t=null},o};let Il="undefined"!=typeof window?window.requestAnimationFrame:()=>{};_l.use=e=>Il=e,_l.now="undefined"!=typeof performance?()=>performance.now():Date.now,_l.batchedUpdates=e=>e(),_l.catch=console.error,_l.frameLoop="always",_l.advance=()=>{"demand"!==_l.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ll()};let xl=-1,Tl=0,Nl=!1;function Pl(e,t){Nl?(t.delete(e),e(0)):(t.add(e),Ml())}function Ml(){xl<0&&(xl=0,"demand"!==_l.frameLoop&&Il(Rl))}function Rl(){~xl&&(Il(Rl),_l.batchedUpdates(Ll))}function Ll(){let e=xl;xl=_l.now();let t=Bl(xl);t&&(Dl(Sl.splice(0,t),(e=>e.handler())),Tl-=t),Tl?(El.flush(),kl.flush(e?Math.min(64,xl-e):16.667),Cl.flush(),yl.flush(),wl.flush()):xl=-1}function Al(){let e=new Set,t=e;return{add(n){Tl+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Tl-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Tl-=t.size,Dl(t,(t=>t(n)&&e.add(t))),Tl+=e.size,t=e)}}}function Dl(e,t){e.forEach((e=>{try{t(e)}catch(e){_l.catch(e)}}))}var Ol=n(9196),Fl=n.n(Ol);function zl(){}const Vl={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 Hl(e,t){if(Vl.arr(e)){if(!Vl.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Ul(e,t,n){if(Vl.arr(e))for(let o=0;oVl.und(e)?[]:Vl.arr(e)?e:[e];function $l(e,t){if(e.size){const n=Array.from(e);e.clear(),Gl(n,t)}}const jl=(e,...t)=>$l(e,(e=>e(...t))),Kl=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let ql,Yl,Ql=null,Xl=!1,Zl=zl;const Jl=e=>{e.to&&(Yl=e.to),e.now&&(_l.now=e.now),void 0!==e.colors&&(Ql=e.colors),null!=e.skipAnimation&&(Xl=e.skipAnimation),e.createStringInterpolator&&(ql=e.createStringInterpolator),e.requestAnimationFrame&&_l.use(e.requestAnimationFrame),e.batchedUpdates&&(_l.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zl=e.willAdvance),e.frameLoop&&(_l.frameLoop=e.frameLoop)};var ei=Object.freeze({__proto__:null,get createStringInterpolator(){return ql},get to(){return Yl},get colors(){return Ql},get skipAnimation(){return Xl},get willAdvance(){return Zl},assign:Jl});const ti=new Set;let ni=[],oi=[],ri=0;const li={get idle(){return!ti.size&&!ni.length},start(e){ri>e.priority?(ti.add(e),_l.onStart(ii)):(ai(e),_l(ci))},advance:ci,sort(e){if(ri)_l.onFrame((()=>li.sort(e)));else{const t=ni.indexOf(e);~t&&(ni.splice(t,1),si(e))}},clear(){ni=[],ti.clear()}};function ii(){ti.forEach(ai),ti.clear(),_l(ci)}function ai(e){ni.includes(e)||si(e)}function si(e){ni.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(ni,(t=>t.priority>e.priority)),0,e)}function ci(e){const t=oi;for(let n=0;n0}const ui="[-+]?\\d*\\.?\\d+",di=ui+"%";function pi(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const mi=new RegExp("rgb"+pi(ui,ui,ui)),fi=new RegExp("rgba"+pi(ui,ui,ui,ui)),gi=new RegExp("hsl"+pi(ui,di,di)),hi=new RegExp("hsla"+pi(ui,di,di,ui)),vi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,bi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ki=/^#([0-9a-fA-F]{6})$/,_i=/^#([0-9a-fA-F]{8})$/;function yi(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 Ei(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=yi(r,o,e+1/3),i=yi(r,o,e),a=yi(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function Ci(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function wi(e){return(parseFloat(e)%360+360)%360/360}function Si(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Bi(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ii(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ki.exec(e))?parseInt(t[1]+"ff",16)>>>0:Ql&&void 0!==Ql[e]?Ql[e]:(t=mi.exec(e))?(Ci(t[1])<<24|Ci(t[2])<<16|Ci(t[3])<<8|255)>>>0:(t=fi.exec(e))?(Ci(t[1])<<24|Ci(t[2])<<16|Ci(t[3])<<8|Si(t[4]))>>>0:(t=vi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=_i.exec(e))?parseInt(t[1],16)>>>0:(t=bi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gi.exec(e))?(255|Ei(wi(t[1]),Bi(t[2]),Bi(t[3])))>>>0:(t=hi.exec(e))?(Ei(wi(t[1]),Bi(t[2]),Bi(t[3]))|Si(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})`)}const xi=(e,t,n)=>{if(Vl.fun(e))return e;if(Vl.arr(e))return xi({range:e,output:t,extrapolate:n});if(Vl.str(e.output[0]))return ql(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",a=o.extrapolateRight||o.extrapolate||"extend",s=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(o===r)return o;if(t===n)return e<=t?o:r;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o;return c}(e,l[t],l[t+1],r[t],r[t+1],s,i,a,o.map)}};function Ti(){return Ti=Object.assign||function(e){for(var t=1;tBoolean(e&&e[Ni]),Ri=e=>e&&e[Ni]?e[Ni]():e,Li=e=>e[Pi]||null;function Ai(e,t){let n=e[Pi];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Di{constructor(e){if(this[Ni]=void 0,this[Pi]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Oi(this,e)}}const Oi=(e,t)=>Vi(e,Ni,t);function Fi(e,t){if(e[Ni]){let n=e[Pi];n||Vi(e,Pi,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function zi(e,t){let n=e[Pi];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Pi]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Vi=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Hi=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Gi=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ui=new RegExp(`(${Hi.source})(%|[a-z]+)`,"i"),Wi=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,$i=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ji=e=>{const[t,n]=Ki(e);if(!t||Kl())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&$i.test(n)?ji(n):n||e},Ki=e=>{const t=$i.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]};let qi;const Yi=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Qi=e=>{qi||(qi=Ql?new RegExp(`(${Object.keys(Ql).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ri(e).replace($i,ji).replace(Gi,Ii).replace(qi,Ii))),n=t.map((e=>e.match(Hi).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]})))),r=o.map((t=>xi(Ti({},e,{output:t}))));return e=>{var n;const o=!Ui.test(t[0])&&(null==(n=t.find((e=>Ui.test(e))))?void 0:n.replace(Hi,""));let l=0;return t[0].replace(Hi,(()=>`${r[l++](e)}${o||""}`)).replace(Wi,Yi)}},Xi="react-spring: ",Zi=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Xi}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ji=Zi(console.warn);const ea=Zi(console.warn);function ta(e){return Vl.str(e)&&("#"==e[0]||/\d/.test(e)||!Kl()&&$i.test(e)||e in(Ql||{}))}const na=Kl()?Ol.useEffect:Ol.useLayoutEffect;function oa(){const e=(0,Ol.useState)()[1],t=(()=>{const e=(0,Ol.useRef)(!1);return na((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const ra=e=>(0,Ol.useEffect)(e,la),la=[];function ia(e){const t=(0,Ol.useRef)();return(0,Ol.useEffect)((()=>{t.current=e})),t.current}const aa=Symbol.for("Animated:node"),sa=e=>e&&e[aa],ca=(e,t)=>{return n=e,o=aa,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ua=e=>e&&e[aa]&&e[aa].getPayload();class da{constructor(){this.payload=void 0,ca(this,this)}getPayload(){return this.payload||[]}}class pa extends da{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Vl.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new pa(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Vl.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Vl.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class ma extends pa{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=xi({output:[e,e]})}static create(e){return new ma(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Vl.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=xi({output:[this.getValue(),e]})),this._value=0,super.reset()}}const fa={dependencies:null};class ga extends da{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ul(this.source,((n,o)=>{var r;(r=n)&&r[aa]===r?t[o]=n.getValue(e):Mi(n)?t[o]=Ri(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Gl(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ul(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fa.dependencies&&Mi(e)&&fa.dependencies.add(e);const t=ua(e);t&&Gl(t,(e=>this.add(e)))}}class ha extends ga{constructor(e){super(e)}static create(e){return new ha(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(va)),!0)}}function va(e){return(ta(e)?ma:pa).create(e)}function ba(e){const t=sa(e);return t?t.constructor:Vl.arr(e)?ha:ta(e)?ma:pa}function ka(){return ka=Object.assign||function(e){for(var t=1;t{const n=!Vl.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ol.forwardRef)(((o,r)=>{const l=(0,Ol.useRef)(null),i=n&&(0,Ol.useCallback)((e=>{l.current=function(e,t){e&&(Vl.fun(e)?e(t):e.current=t);return t}(r,e)}),[r]),[a,s]=function(e,t){const n=new Set;fa.dependencies=n,e.style&&(e=ka({},e,{style:t.createAnimatedStyle(e.style)}));return e=new ga(e),fa.dependencies=null,[e,n]}(o,t),c=oa(),u=()=>{const e=l.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},d=new ya(u,s),p=(0,Ol.useRef)();na((()=>(p.current=d,Gl(s,(e=>Fi(e,d))),()=>{p.current&&(Gl(p.current.deps,(e=>zi(e,p.current))),_l.cancel(p.current.update))}))),(0,Ol.useEffect)(u,[]),ra((()=>()=>{const e=p.current;Gl(e.deps,(t=>zi(t,e)))}));const m=t.getComponentProps(a.getValue());return Ol.createElement(e,ka({},m,{ref:i}))}))};class ya{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&_l.write(this.update)}}const Ea=Symbol.for("AnimatedComponent"),Ca=e=>Vl.str(e)?e:e&&Vl.str(e.displayName)?e.displayName:Vl.fun(e)&&e.name||null;function wa(){return wa=Object.assign||function(e){for(var t=1;t!0===e||!!(t&&e&&(Vl.fun(e)?e(t):Wl(e).includes(t))),Ia=(e,t)=>Vl.obj(e)?t&&e[t]:e,xa=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ta=e=>e,Na=(e,t=Ta)=>{let n=Pa;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);Vl.und(n)||(o[r]=n)}return o},Pa=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ma={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 Ra(e){const t=function(e){const t={};let n=0;if(Ul(e,((e,o)=>{Ma[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ul(e,((e,o)=>o in t||(n[o]=e))),n}return wa({},e)}function La(e){return e=Ri(e),Vl.arr(e)?e.map(La):ta(e)?ei.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Aa(e){for(const t in e)return!0;return!1}function Da(e){return Vl.fun(e)||Vl.arr(e)&&Vl.obj(e[0])}function Oa(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Fa(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const za=1.70158,Va=1.525*za,Ha=za+1,Ga=2*Math.PI/3,Ua=2*Math.PI/4.5,Wa=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},$a={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=>Ha*e*e*e-za*e*e,easeOutBack:e=>1+Ha*Math.pow(e-1,3)+za*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Va)/2:(Math.pow(2*e-2,2)*((Va+1)*(2*e-2)+Va)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Ga),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Ga)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ua)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ua)/2+1,easeInBounce:e=>1-Wa(1-e),easeOutBounce:Wa,easeInOutBounce:e=>e<.5?(1-Wa(1-2*e))/2:(1+Wa(2*e-1))/2},ja=wa({},{tension:170,friction:26},{mass:1,damping:1,easing:$a.linear,clamp:!1});class Ka{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,ja)}}function qa(e,t){if(Vl.und(t.decay)){const n=!Vl.und(t.tension)||!Vl.und(t.friction);!n&&Vl.und(t.frequency)&&Vl.und(t.damping)&&Vl.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Ya=[];class Qa{constructor(){this.changed=!1,this.values=Ya,this.toValues=null,this.fromValues=Ya,this.to=void 0,this.from=void 0,this.config=new Ka,this.immediate=!1}}function Xa(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,a)=>{var s;let c,u,d=Ba(null!=(s=n.cancel)?s:null==o?void 0:o.cancel,t);if(d)f();else{Vl.und(n.pause)||(r.paused=Ba(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||Ba(e,t)),c=Sa(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-_l.now()}function m(){c>0&&!ei.skipAnimation?(r.delayed=!0,u=_l.setTimeout(f,c),r.pauseQueue.add(p),r.timeouts.add(u)):f()}function f(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(wa({},n,{callId:e,cancel:d}),i)}catch(e){a(e)}}}))}const Za=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?ts(e.get()):t.every((e=>e.noop))?Ja(e.get()):es(e.get(),t.every((e=>e.finished))),Ja=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),es=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ts=e=>({value:e,cancelled:!0,finished:!1});function ns(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:a,promise:s}=n;return l||e!==a||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=Na(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&ts(o)||r!==n.asyncId&&es(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const l=new rs,i=new ls;return(async()=>{if(ei.skipAnimation)throw os(n),i.result=es(o,!1),d(i),i;m(l);const a=Vl.obj(e)?wa({},e):wa({},t,{to:e});a.parentId=r,Ul(c,((e,t)=>{Vl.und(a[t])&&(a[t]=e)}));const s=await o.start(a);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let g;if(ei.skipAnimation)return os(n),es(o,!1);try{let t;t=Vl.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(u),p]),g=es(o.get(),!0,!1)}catch(e){if(e instanceof rs)g=e.result;else{if(!(e instanceof ls))throw e;g=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?a:void 0,n.promise=l?s:void 0)}return Vl.fun(i)&&_l.batchedUpdates((()=>{i(g,o,o.item)})),g})():s}function os(e,t){$l(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class rs extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class ls extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const is=e=>e instanceof ss;let as=1;class ss extends Di{constructor(...e){super(...e),this.id=as++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=sa(this);return e&&e.getValue()}to(...e){return ei.to(this,e)}interpolate(...e){return Ji(`${Xi}The "interpolate" function is deprecated in v9 (use "to" instead)`),ei.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){Ai(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||li.sort(this),Ai(this,{type:"priority",parent:this,priority:e})}}const cs=Symbol.for("SpringPhase"),us=e=>(1&e[cs])>0,ds=e=>(2&e[cs])>0,ps=e=>(4&e[cs])>0,ms=(e,t)=>t?e[cs]|=3:e[cs]&=-3,fs=(e,t)=>t?e[cs]|=4:e[cs]&=-5;class gs extends ss{constructor(e,t){if(super(),this.key=void 0,this.animation=new Qa,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Vl.und(e)||!Vl.und(t)){const n=Vl.obj(e)?wa({},e):wa({},t,{from:e});Vl.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ds(this)||this._state.asyncTo)||ps(this)}get goal(){return Ri(this.animation.to)}get velocity(){const e=sa(this);return e instanceof pa?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return us(this)}get isAnimating(){return ds(this)}get isPaused(){return ps(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ua(o.to);!i&&Mi(o.to)&&(l=Wl(Ri(o.to))),o.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==ma?1:i?i[s].lastPosition:l[s];let u=o.immediate,d=c;if(!u){if(d=a.lastPosition,r.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=o.fromValues[s],l=null!=a.v0?a.v0:a.v0=Vl.arr(r.velocity)?r.velocity[s]:r.velocity;let i;if(Vl.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(a.lastPosition-d)<.1,i=l*o}else{i=null==a.lastVelocity?l:a.lastVelocity;const t=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),o=r.restVelocity||t/10,s=r.clamp?0:r.bounce,p=!Vl.und(s),m=n==c?a.v0>0:no,f||(u=Math.abs(c-d)<=t,!u));++e){p&&(g=d==c||d>c==m,g&&(i=-i*s,d=c));i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*h,d+=i*h}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,a.durationProgress>0&&(a.elapsedTime=r.duration*a.durationProgress,t=a.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,a.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-a.lastPosition)/e,u=1==o}a.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(d,r.round)&&(n=!0)}));const a=sa(this),s=a.getValue();if(t){const e=Ri(o.to);s===e&&!n||r.decay?n&&r.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return _l.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ds(this)){const{to:e,config:t}=this.animation;_l.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 Vl.und(e)?(n=this.queue||[],this.queue=[]):n=[Vl.obj(e)?e:wa({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Za(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),os(this._state,e&&this._lastCallId),_l.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Vl.obj(n)?n[t]:n,(null==n||Da(n))&&(n=void 0),o=Vl.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return us(this)||(e.reverse&&([n,o]=[o,n]),o=Ri(o),Vl.und(o)?sa(this)||this._set(n):this._set(o)),r}_update(e,t){let n=wa({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,Na(n,((e,t)=>/^on/.test(t)?Ia(e,o):e))),Es(this,n,"onProps"),Cs(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Xa(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{ps(this)||(fs(this,!0),jl(i.pauseQueue),Cs(this,"onPause",es(this,hs(this,this.animation.to)),this))},resume:()=>{ps(this)&&(fs(this,!1),ds(this)&&this._resume(),jl(i.resumeQueue),Cs(this,"onResume",es(this,hs(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=vs(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ts(this));const o=!Vl.und(e.to),r=!Vl.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(ts(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:d=c}=e;!r||o||t.default&&!Vl.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!Hl(d,c);p&&(a.from=d),d=Ri(d);const m=!Hl(u,s);m&&this._focus(u);const f=Da(t.to),{config:g}=a,{decay:h,velocity:v}=g;(o||r)&&(g.velocity=0),t.config&&!f&&function(e,t,n){n&&(qa(n=wa({},n),t),t=wa({},n,t)),qa(e,t),Object.assign(e,t);for(const t in ja)null==e[t]&&(e[t]=ja[t]);let{mass:o,frequency:r,damping:l}=e;Vl.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(g,Sa(t.config,l),t.config!==i.config?Sa(i.config,l):void 0);let b=sa(this);if(!b||Vl.und(u))return n(es(this,!0));const k=Vl.und(t.reset)?r&&!t.default:!Vl.und(d)&&Ba(t.reset,l),_=k?d:this.get(),y=La(u),E=Vl.num(y)||Vl.arr(y)||ta(y),C=!f&&(!E||Ba(i.immediate||t.immediate,l));if(m){const e=ba(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const w=b.constructor;let S=Mi(u),B=!1;if(!S){const e=k||!us(this)&&p;(m||e)&&(B=Hl(La(_),y),S=!B),(Hl(a.immediate,C)||C)&&Hl(g.decay,h)&&Hl(g.velocity,v)||(S=!0)}if(B&&ds(this)&&(a.changed&&!k?S=!0:S||this._stop(s)),!f&&((S||Mi(s))&&(a.values=b.getPayload(),a.toValues=Mi(u)?null:w==ma?[1]:Wl(y)),a.immediate!=C&&(a.immediate=C,C||k||this._set(s)),S)){const{onRest:e}=a;Gl(ys,(e=>Es(this,t,e)));const o=es(this,hs(this,s));jl(this._pendingCalls,o),this._pendingCalls.add(n),a.changed&&_l.batchedUpdates((()=>{a.changed=!k,null==e||e(o,this),k?Sa(i.onRest,o):null==a.onStart||a.onStart(o,this)}))}k&&this._set(_),f?n(ns(t.to,t,this._state,this)):S?this._start():ds(this)&&!m?this._pendingCalls.add(n):n(Ja(_))}_focus(e){const t=this.animation;e!==t.to&&(Li(this)&&this._detach(),t.to=e,Li(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Mi(t)&&(Fi(t,this),is(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Mi(e)&&zi(e,this)}_set(e,t=!0){const n=Ri(e);if(!Vl.und(n)){const e=sa(this);if(!e||!Hl(n,e.getValue())){const o=ba(n);e&&e.constructor==o?e.setValue(n):ca(this,o.create(n)),e&&_l.batchedUpdates((()=>{this._onChange(n,t)}))}}return sa(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Cs(this,"onStart",es(this,hs(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Sa(this.animation.onChange,e,this)),Sa(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;sa(this).reset(Ri(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),ds(this)||(ms(this,!0),ps(this)||this._resume())}_resume(){ei.skipAnimation?this.finish():li.start(this)}_stop(e,t){if(ds(this)){ms(this,!1);const n=this.animation;Gl(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ai(this,{type:"idle",parent:this});const o=t?ts(this.get()):es(this.get(),hs(this,null!=e?e:n.to));jl(this._pendingCalls,o),n.changed&&(n.changed=!1,Cs(this,"onRest",o,this))}}}function hs(e,t){const n=La(t);return Hl(La(e.get()),n)}function vs(e,t=e.loop,n=e.to){let o=Sa(t);if(o){const r=!0!==o&&Ra(o),l=(r||e).reverse,i=!r||r.reset;return bs(wa({},e,{loop:t,default:!1,pause:void 0,to:!l||Da(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function bs(e){const{to:t,from:n}=e=Ra(e),o=new Set;return Vl.obj(t)&&_s(t,o),Vl.obj(n)&&_s(n,o),e.keys=o.size?Array.from(o):null,e}function ks(e){const t=bs(e);return Vl.und(t.default)&&(t.default=Na(t)),t}function _s(e,t){Ul(e,((e,n)=>null!=e&&t.add(n)))}const ys=["onStart","onRest","onChange","onPause","onResume"];function Es(e,t,n){e.animation[n]=t[n]!==xa(t,n)?Ia(t[n],e.key):void 0}function Cs(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const ws=["onStart","onChange","onRest"];let Ss=1;class Bs{constructor(e,t){this.id=Ss++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(wa({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Vl.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(bs(e)),this}start(e){let{queue:t}=this;return e?t=Wl(e).map(bs):this.queue=[],this._flush?this._flush(this,t):(Rs(this,t),Is(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Gl(Wl(t),(t=>n[t].stop(!!e)))}else os(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Vl.und(e))this.start({pause:!0});else{const t=this.springs;Gl(Wl(e),(e=>t[e].pause()))}return this}resume(e){if(Vl.und(e))this.start({pause:!1});else{const t=this.springs;Gl(Wl(e),(e=>t[e].resume()))}return this}each(e){Ul(this.springs,e)}_onFrame(){const{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,$l(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&$l(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,$l(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}_l.onFrame(this._onFrame)}}function Is(e,t){return Promise.all(t.map((t=>xs(e,t)))).then((t=>Za(e,t)))}async function xs(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:a,onResolve:s}=t,c=Vl.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=Vl.arr(r)||Vl.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Gl(ws,(n=>{const o=t[n];if(Vl.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const 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])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,jl(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===xa(t,"cancel");(u||m&&d.asyncId)&&p.push(Xa(++e._lastAsyncId,{props:t,state:d,actions:{pause:zl,resume:zl,start(t,n){m?(os(d,e._lastAsyncId),n(ts(e))):(t.onRest=a,n(ns(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const f=Za(e,await Promise.all(p));if(i&&f.finished&&(!n||!f.noop)){const n=vs(t,i,r);if(n)return Rs(e,[n]),xs(e,n,!0)}return s&&_l.batchedUpdates((()=>s(f,e,e.item))),f}function Ts(e,t){const n=wa({},e.springs);return t&&Gl(Wl(t),(e=>{Vl.und(e.keys)&&(e=bs(e)),Vl.obj(e.to)||(e=wa({},e,{to:void 0})),Ms(n,e,(e=>Ps(e)))})),Ns(e,n),n}function Ns(e,t){Ul(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Fi(t,e))}))}function Ps(e,t){const n=new gs;return n.key=e,t&&Fi(n,t),n}function Ms(e,t,n){t.keys&&Gl(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Rs(e,t){Gl(t,(t=>{Ms(e.springs,t,(t=>Ps(t,e)))}))}function Ls(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}const As=["children"],Ds=e=>{let{children:t}=e,n=Ls(e,As);const o=(0,Ol.useContext)(Os),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,Ol.useState)((()=>({inputs:t,result:e()}))),o=(0,Ol.useRef)(),r=o.current;let l=r;if(l){const n=Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=Os;return Ol.createElement(i,{value:n},t)},Os=(Fs=Ds,zs={},Object.assign(Fs,Ol.createContext(zs)),Fs.Provider._context=Fs,Fs.Consumer._context=Fs,Fs);var Fs,zs;Ds.Provider=Os.Provider,Ds.Consumer=Os.Consumer;const Vs=()=>{const e=[],t=function(t){ea(`${Xi}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Gl(e,((e,r)=>{if(Vl.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Gl(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Gl(e,(e=>e.resume(...arguments))),this},t.set=function(t){Gl(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Gl(e,((e,o)=>{if(Vl.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return Gl(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Gl(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Vl.fun(e)?e(n,t):e};return t._getProps=n,t};function Hs(e,t,n){const o=Vl.fun(t)&&t;o&&!n&&(n=[]);const r=(0,Ol.useMemo)((()=>o||3==arguments.length?Vs():void 0),[]),l=(0,Ol.useRef)(0),i=oa(),a=(0,Ol.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=Ts(e,t);return l.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?Is(e,t):new Promise((o=>{Ns(e,n),a.queue.push((()=>{o(Is(e,t))})),i()}))}})),[]),s=(0,Ol.useRef)([...a.ctrls]),c=[],u=ia(e)||0;function d(e,n){for(let r=e;r{Gl(s.current.slice(e,u),(e=>{Oa(e,r),e.stop(!0)})),s.current.length=e,d(u,e)}),[e]),(0,Ol.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=s.current.map(((e,t)=>Ts(e,c[t]))),m=(0,Ol.useContext)(Ds),f=ia(m),g=m!==f&&Aa(m);na((()=>{l.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Gl(e,(e=>e()))),Gl(s.current,((e,t)=>{null==r||r.add(e),g&&e.start({default:m});const n=c[t];n&&(Fa(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),ra((()=>()=>{Gl(a.ctrls,(e=>e.stop(!0)))}));const h=p.map((e=>wa({},e)));return r?[h,r]:h}function Gs(e,t){const n=Vl.fun(e),[[o],r]=Hs(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[o,r]:o}let Us;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Us||(Us={}));class Ws extends ss{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=xi(...t);const n=this._get(),o=ba(n);ca(this,o.create(n))}advance(e){const t=this._get();Hl(t,this.get())||(sa(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&js(this._active)&&Ks(this)}_get(){const e=Vl.arr(this.source)?this.source.map(Ri):Wl(Ri(this.source));return this.calc(...e)}_start(){this.idle&&!js(this._active)&&(this.idle=!1,Gl(ua(this),(e=>{e.done=!1})),ei.skipAnimation?(_l.batchedUpdates((()=>this.advance())),Ks(this)):li.start(this))}_attach(){let e=1;Gl(Wl(this.source),(t=>{Mi(t)&&Fi(t,this),is(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Gl(Wl(this.source),(e=>{Mi(e)&&zi(e,this)})),this._active.clear(),Ks(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=Wl(this.source).reduce(((e,t)=>Math.max(e,(is(t)?t.priority:0)+1)),0))}}function $s(e){return!1!==e.idle}function js(e){return!e.size||Array.from(e).every($s)}function Ks(e){e.idle||(e.idle=!0,Gl(ua(e),(e=>{e.done=!0})),Ai(e,{type:"idle",parent:e}))}ei.assign({createStringInterpolator:Qi,to:(e,t)=>new Ws(e,t)});li.advance;var qs=window.ReactDOM;function Ys(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}const Qs=["style","children","scrollTop","scrollLeft"],Xs=/^--/;function Zs(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Xs.test(e)||ec.hasOwnProperty(e)&&ec[e]?(""+t).trim():t+"px"}const Js={};let ec={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};const tc=["Webkit","Ms","Moz","O"];ec=Object.keys(ec).reduce(((e,t)=>(tc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),ec);const nc=["x","y","z"],oc=/^(matrix|translate|scale|rotate|skew)/,rc=/^(translate)/,lc=/^(rotate|skew)/,ic=(e,t)=>Vl.num(e)&&0!==e?e+t:e,ac=(e,t)=>Vl.arr(e)?e.every((e=>ac(e,t))):Vl.num(e)?e===t:parseFloat(e)===t;class sc extends ga{constructor(e){let{x:t,y:n,z:o}=e,r=Ys(e,nc);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>ic(e,"px"))).join(",")})`,ac(e,0)]))),Ul(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if(oc.test(t)){if(delete r[t],Vl.und(e))return;const n=rc.test(t)?"px":lc.test(t)?"deg":"";l.push(Wl(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${ic(r,n)})`,ac(r,0)]:e=>[`${t}(${e.map((e=>ic(e,n))).join(",")})`,ac(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new cc(l,i)),super(r)}}class cc extends Di{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Gl(this.inputs,((n,o)=>{const r=Ri(n[0]),[l,i]=this.transforms[o](Vl.arr(r)?r:n.map(Ri));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Gl(this.inputs,(e=>Gl(e,(e=>Mi(e)&&Fi(e,this)))))}observerRemoved(e){0==e&&Gl(this.inputs,(e=>Gl(e,(e=>Mi(e)&&zi(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ai(this,e)}}const uc=["scrollTop","scrollLeft"];ei.assign({batchedUpdates:qs.unstable_batchedUpdates,createStringInterpolator:Qi,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}});const dc=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new ga(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=Ca(e)||"Anonymous";return(e=Vl.str(e)?l[e]||(l[e]=_a(e,r)):e[Ea]||(e[Ea]=_a(e,r))).displayName=`Animated(${t})`,e};return Ul(e,((t,n)=>{Vl.arr(e)&&(n=Ca(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:a}=o,s=Ys(o,Qs),c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Js[t]||(Js[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Zs(t,r[t]);Xs.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!==a&&(e.scrollLeft=a)},createAnimatedStyle:e=>new sc(e),getComponentProps:e=>Ys(e,uc)}),pc=dc.animated,mc=e=>e+1,fc=e=>({top:e.offsetTop,left:e.offsetLeft});var gc=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,a.useRef)(),i=(0,d.useReducedMotion)()||!o,[s,c]=(0,a.useReducer)(mc,0),[u,p]=(0,a.useReducer)(mc,0),[m,f]=(0,a.useState)({x:0,y:0}),g=(0,a.useMemo)((()=>l.current?fc(l.current):null),[r]),h=(0,a.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,Jr.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);function v(e){let{value:n}=e,{x:o,y:r}=n;o=Math.round(o),r=Math.round(r),o===v.x&&r===v.y||(!function(e){let{x:n,y:o}=e;if(!l.current)return;const r=0===n&&0===o;l.current.style.transformOrigin=r?"":"center",l.current.style.transform=r?"":`translate3d(${n}px,${o}px,0)`,l.current.style.zIndex=!t||r?"":"1",h()}({x:o,y:r}),v.x=o,v.y=r)}return(0,a.useLayoutEffect)((()=>{s&&p()}),[s]),(0,a.useLayoutEffect)((()=>{if(!g)return;if(i)return void h();l.current.style.transform="";const e=fc(l.current);c(),f({x:Math.round(g.left-e.left),y:Math.round(g.top-e.top)})}),[r]),v.x=0,v.y=0,Gs({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:s!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:v}),l};const hc=".block-editor-block-list__block",vc=".block-list-appender",bc=".block-editor-button-block-appender";function kc(e,t){return t.closest([hc,vc,bc].join(","))===e}function _c(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(hc);return t?t.id.slice("block-".length):void 0}function yc(e){const t=(0,a.useRef)(),n=function(e){return(0,m.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isNavigationMode:o,isBlockSelected:r}=t(qn);if(r(e)&&!o())return n()}),[e])}(e),{isBlockSelected:o,isMultiSelecting:r}=(0,m.useSelect)(qn);return(0,a.useEffect)((()=>{if(!o(e)||r())return;if(null==n)return;if(!t.current)return;const{ownerDocument:l}=t.current;if(t.current.contains(l.activeElement))return;const i=Jr.focus.tabbable.find(t.current).filter((e=>(0,Jr.isTextField)(e))),a=-1===n,s=(a?u.last:u.first)(i)||t.current;if(kc(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Jr.focus.tabbable.findNext(t.current);if(e&&kc(t.current,e)&&(0,Jr.isFormElement)(e))return void e.focus()}(0,Jr.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function Ec(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function Cc(){const e=(0,m.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(qn);return t()||n().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",Ec),t.addEventListener("mouseover",Ec),()=>{t.removeEventListener("mouseout",Ec),t.removeEventListener("mouseover",Ec),t.classList.remove("is-hovered")}}),[e])}function wc(e){return(0,m.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:a,getSettings:s,hasSelectedInnerBlock:u,isTyping:d,__experimentalGetActiveBlockIdByBlockNames:p}=t(qn),{__experimentalSpotlightEntityBlocks:m,outlineMode:f}=s(),g=n(e),h=l(e),v=a(e),b=u(e,!0),k=p(m);return c()({"is-selected":h,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":g,"has-child-selected":b,"has-active-entity":k,"is-active-entity":k===e,"remove-outline":h&&f&&d()})}),[e])}function Sc(e){return(0,m.useSelect)((t=>{const n=t(qn).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function Bc(e){return(0,m.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(qn),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function Ic(e){return(0,m.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(qn);if(!i(e))return;const a=n();return a?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(a),l(e))}):void 0}),[e])}function xc(e){const{isBlockSelected:t}=(0,m.useSelect)(qn),{selectBlock:n,selectionChange:o}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):kc(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}var Tc=window.wp.keycodes;function Nc(e){const t=(0,m.useSelect)((t=>t(qn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,m.useSelect)(qn),{insertDefaultBlock:r,removeBlock:l}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",a),i.addEventListener("dragstart",s),()=>{i.removeEventListener("keydown",a),i.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==Tc.ENTER&&a!==Tc.BACKSPACE&&a!==Tc.DELETE||s!==i||(0,Jr.isTextField)(s)||(t.preventDefault(),a===Tc.ENTER?r({},n(e),o(e)+1):l(e))}function s(e){e.preventDefault()}}),[e,t,n,o,r,l])}function Pc(e){const{isNavigationMode:t,isBlockSelected:n}=(0,m.useSelect)(qn),{setNavigationMode:o,selectBlock:r}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}function Mc(){const e=(0,a.useContext)(Gf);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Rc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,a.useContext)(Lc),{index:s,mode:u,name:p,blockApiVersion:f,blockTitle:h,isPartOfSelection:v,adjustScrolling:b,enableAnimation:k}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockMode:o,getBlockName:l,isTyping:i,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:d}=e(qn),p=s(n),m=c(n)||u(n),f=l(n),g=(0,r.getBlockType)(f);return{index:t(n),mode:o(n),name:f,blockApiVersion:(null==g?void 0:g.apiVersion)||1,blockTitle:null==g?void 0:g.title,isPartOfSelection:p||m,adjustScrolling:p||d(n),enableAnimation:!i()&&a()<=200}}),[n]),_=(0,g.sprintf)((0,g.__)("Block: %s"),h),y="html"!==u||t?"":"-visual",E=(0,d.useMergeRefs)([e.ref,yc(n),yo(n),xc(n),Nc(n),Pc(n),Cc(),Mc(),gc({isSelected:v,adjustScrolling:b,enableAnimation:k,triggerAnimationOnChange:s})]),C=Zn();return f<2&&n===C.clientId&&"undefined"!=typeof process&&process.env,{...l,...e,ref:E,id:`block-${n}${y}`,tabIndex:0,role:"document","aria-label":_,"data-block":n,"data-type":p,"data-title":h,className:c()(c()("block-editor-block-list__block",{"wp-block":!i}),o,e.className,l.className,wc(n),Sc(n),Bc(n),Ic(n)),style:{...l.style,...e.style}}}Rc.save=r.__unstableGetBlockProps;const Lc=(0,a.createContext)();function Ac(e){let{children:t,isHtml:n,...o}=e;return(0,a.createElement)("div",Rc(o,{__unstableIsHtml:n}),t)}const Dc=(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(qn),d=s(n),p=r(n),m=a(o),f=c(n,o),g=u(n,o),{name:h,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:f,canMove:g,block:d,name:h,attributes:v,isValid:b,isSelected:p}})),Oc=(0,m.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:l,insertBlocks:i,mergeBlocks:a,replaceBlocks:s,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(qn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(qn),r=n(),{clientId:i}=t,a=r.length?r:[i];l(a,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:r}=t,{getBlockIndex:l}=o(qn),a=l(n);i(e,a+1,r)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:r,getNextBlockClientId:l}=o(qn);if(e){const e=l(n);e&&a(n,e)}else{const e=r(n);e&&a(e,n)}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),s([t.clientId],e,n,o)},toggleSelection(e){c(e)}}}));var Fc=(0,d.compose)(d.pure,Dc,Oc,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,p.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:o,isLocked:l,canRemove:i,clientId:s,isSelected:d,isSelectionEnabled:p,className:f,name:g,isValid:h,attributes:v,wrapperProps:b,setAttributes:k,onReplace:_,onInsertBlocksAfter:y,onMerge:E,toggleSelection:C}=e;const w=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn);return t().supportsLayout}),[]),{removeBlock:S}=(0,m.useDispatch)(qn),B=(0,a.useCallback)((()=>S(s)),[s]);let I=(0,a.createElement)(ll,{name:g,isSelected:d,attributes:v,setAttributes:k,insertBlocksAfter:l?void 0:y,onReplace:i?_:void 0,onRemove:i?B:void 0,mergeBlocks:i?E:void 0,clientId:s,isSelectionEnabled:p,toggleSelection:C});const x=(0,r.getBlockType)(g);null!=x&&x.getEditWrapperProps&&(b=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=c()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(b,x.getEditWrapperProps(v)));const T=b&&!!b["data-align"]&&!w;let N;if(T&&(I=(0,a.createElement)("div",{className:"wp-block","data-align":b["data-align"]},I)),h)N="html"===o?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{display:"none"}},I),(0,a.createElement)(Ac,{isHtml:!0},(0,a.createElement)(bl,{clientId:s}))):(null==x?void 0:x.apiVersion)>1?I:(0,a.createElement)(Ac,b,I);else{const e=n?(0,r.serializeRawBlock)(n):(0,r.getSaveContent)(x,v);N=(0,a.createElement)(Ac,{className:"has-warning"},(0,a.createElement)(pl,{clientId:s}),(0,a.createElement)(a.RawHTML,null,(0,Jr.safeHTML)(e)))}const P={clientId:s,className:null!==(t=b)&&void 0!==t&&t["data-align"]&&w?c()(f,`align${b["data-align"]}`):f,wrapperProps:(0,u.omit)(b,["data-align"]),isAligned:T},M=(0,a.useMemo)((()=>P),Object.values(P));return(0,a.createElement)(Lc.Provider,{value:M},(0,a.createElement)(hl,{fallback:(0,a.createElement)(Ac,{className:"has-warning"},(0,a.createElement)(fl,null))},N))})),zc=window.wp.htmlEntities;var Vc=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Hc=[(0,a.createInterpolateElement)((0,g.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,g.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,g.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,g.__)("Drag files into the editor to automatically insert media blocks."),(0,g.__)("Change a block's type by pressing the block icon on the toolbar.")];var Gc=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Hc.length));return(0,a.createElement)(p.Tip,null,Hc[e])};var Uc=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));var Wc=(0,a.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Uc});const l=(0,a.createElement)(p.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,a.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)}));var $c=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(Vt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,a.createElement)("div",{className:"block-editor-block-card"},(0,a.createElement)(Wc,{icon:n,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-block-card__content"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,a.createElement)("span",{className:"block-editor-block-card__description"},o)))};function jc(e){let{clientId:t=null,value:n,selection:o,onChange:l=u.noop,onInput:i=u.noop}=e;const s=(0,m.useRegistry)(),{resetBlocks:c,resetSelection:d,replaceInnerBlocks:p,setHasControlledInnerBlocks:f,__unstableMarkNextChangeAsNotPersistent:g}=s.dispatch(qn),{getBlockName:h,getBlocks:v}=s.select(qn),b=(0,m.useSelect)((e=>!t||e(qn).areInnerBlocksControlled(t)),[t]),k=(0,a.useRef)({incoming:null,outgoing:[]}),_=(0,a.useRef)(!1),y=()=>{n&&(g(),t?s.batch((()=>{f(t,!0);const e=n.map((e=>(0,r.cloneBlock)(e)));_.current&&(k.current.incoming=e),g(),p(t,e)})):(_.current&&(k.current.incoming=n),c(n)))},E=(0,a.useRef)(i),C=(0,a.useRef)(l);(0,a.useEffect)((()=>{E.current=i,C.current=l}),[i,l]),(0,a.useEffect)((()=>{k.current.outgoing.includes(n)?(0,u.last)(k.current.outgoing)===n&&(k.current.outgoing=[]):v(t)!==n&&(k.current.outgoing=[],y(),o&&d(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,a.useEffect)((()=>{b||(k.current.outgoing=[],y())}),[b]),(0,a.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l,areInnerBlocksControlled:i}=s.select(qn);let a=v(t),c=r(),u=!1;_.current=!0;const d=s.subscribe((()=>{if(null!==t&&null===h(t))return;if(!(!t||i(t)))return;const s=r(),d=v(t),p=d!==a;if(a=d,p&&(k.current.incoming||l()))return k.current.incoming=null,void(c=s);if(p||u&&!p&&s&&!c){c=s,k.current.outgoing.push(a);(c?C.current:E.current)(a,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})}u=p}));return()=>d()}),[s,t])}var Kc=(0,d.createHigherOrderComponent)((e=>(0,m.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,a.createElement)(e,i({registry:o},r));const[l,s]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const e=(0,m.createRegistry)({},o);e.registerStore(jn,Kn),s(e)}),[o]),l?(0,a.createElement)(m.RegistryProvider,{value:l},(0,a.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,m.useDispatch)(qn);return(0,a.useEffect)((()=>{o(n)}),[n]),jc(e),(0,a.createElement)(_o,null,t)}));function qc(e){let{onClick:t}=e;return(0,a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,a.createElement)(p.Disabled,null,(0,a.createElement)(Wf,null)))}function Yc(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,m.useSelect)(qn),{clearSelectedBlock:n}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function Qc(e){return(0,a.createElement)("div",i({ref:Yc()},e))}function Xc(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(qn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function Zc(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,m.useSelect)(Xc,[]),i=Eo(r),a=Eo((0,u.first)(n)),s=Eo((0,u.last)(n));return(0,d.useRefEffect)((c=>{const{ownerDocument:u}=c,{defaultView:d}=u;if(null==e)return;if(!o||t){if(!r||t)return;const e=d.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=i.current,{startContainer:n,endContainer:o}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(o)||e.removeAllRanges()}return}const{length:p}=n;if(p<2)return;if(!l)return;if(c.contentEditable=!0,c.focus(),!a.current||!s.current)return;const m=d.getSelection(),f=u.createRange();f.setStartBefore(a.current),f.setEndAfter(s.current),m.removeAllRanges(),m.addRange(f)}),[o,t,n,r,e,l])}function Jc(e,t,n,o){let r,l=Jr.focus.focusable.find(n);return t&&(l=(0,u.reverse)(l)),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),(0,u.find)(l,(function(e){if(!Jr.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 eu(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksEndClientId:t,getPreviousBlockClientId:n,getNextBlockClientId:o,getSettings:r,hasMultiSelection:l}=(0,m.useSelect)(qn);return(0,d.useRefEffect)((i=>{let a;function s(){a=null}function c(e,t){const n=Jc(e,t,i);return!n||!function(e,t){return e.closest(hc)===t.closest(hc)}(e,n)}function u(s){const{keyCode:u,target:d}=s,p=u===Tc.UP,m=u===Tc.DOWN,f=u===Tc.LEFT,g=u===Tc.RIGHT,h=p||f,v=f||g,b=p||m,k=v||b,_=s.shiftKey,y=_||s.ctrlKey||s.altKey||s.metaKey,E=b?Jr.isVerticalEdge:Jr.isHorizontalEdge,{ownerDocument:C}=i,{defaultView:w}=C;if(l())return;if(b?a||(a=(0,Jr.computeCaretRect)(w)):a=null,s.defaultPrevented)return;if(!k)return;if(!function(e,t,n){if((t===Tc.UP||t===Tc.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"!==o&&"TEXTAREA"!==o}(d,u,y))return;const S=(0,Jr.isRTL)(d)?!h:h,{keepCaretInsideBlock:B}=r(),I=e();if(_){const e=t(),r=n(e||I),l=o(e||I);(h&&r||!h&&l)&&c(d,h)&&E(d,h)&&(i.contentEditable=!0,i.focus())}else if(b&&(0,Jr.isVerticalEdge)(d,h)&&!B){const e=Jc(d,h,i,!0);e&&((0,Jr.placeCaretAtVerticalEdge)(e,h,a),s.preventDefault())}else if(v&&w.getSelection().isCollapsed&&(0,Jr.isHorizontalEdge)(d,S)&&!B){const e=Jc(d,S,i);(0,Jr.placeCaretAtHorizontalEdge)(e,h),s.preventDefault()}}return i.addEventListener("mousedown",s),i.addEventListener("keydown",u),()=>{i.removeEventListener("mousedown",s),i.removeEventListener("keydown",u)}}),[])}var tu=window.wp.keyboardShortcuts;function nu(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,m.useSelect)(qn),{multiSelect:o}=(0,m.useDispatch)(qn),r=(0,tu.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((l=>{function i(l){if(!r("core/block-editor/select-all",l))return;const i=t();if(i.length<2&&!(0,Jr.isEntirelySelected)(l.target))return;const[a]=i,s=n(a);let c=e(s);i.length===c.length&&(c=e(n(s)));const d=(0,u.first)(c),p=(0,u.last)(c);d!==p&&(o(d,p),l.preventDefault())}return l.addEventListener("keydown",i),()=>{l.removeEventListener("keydown",i)}}),[])}function ou(e,t){e.contentEditable=t,t&&e.focus()}function ru(){const{startMultiSelect:e,stopMultiSelect:t}=(0,m.useDispatch)(qn),{isSelectionEnabled:n,hasMultiSelection:o}=(0,m.useSelect)(qn);return(0,d.useRefEffect)((r=>{const{ownerDocument:l}=r,{defaultView:i}=l;let a,s;function c(){t(),i.removeEventListener("mouseup",c),s=i.requestAnimationFrame((()=>{if(o())return;ou(r,!1);const e=i.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);a.contains(t)&&a.focus()}}))}function u(t){let{buttons:o,target:s}=t;1===o&&s.getAttribute("contenteditable")&&n()&&(a=l.activeElement,e(),i.addEventListener("mouseup",c),ou(r,!0))}return r.addEventListener("mouseout",u),()=>{r.removeEventListener("mouseout",u),i.removeEventListener("mouseup",c),i.cancelAnimationFrame(s)}}),[e,t,n,o])}function lu(e,t){e.contentEditable=t,t&&e.focus()}function iu(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,m.useDispatch)(qn),{getBlockParents:o,getBlockSelectionStart:r}=(0,m.useSelect)(qn);return(0,d.useRefEffect)((n=>{const{ownerDocument:l}=n,{defaultView:i}=l;function a(l){const a=i.getSelection();if(!a.rangeCount)return void lu(n,!1);const s=l.shiftKey&&"mouseup"===l.type;if(a.isCollapsed&&!s)return void lu(n,!1);let c=_c(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE?t:t.childNodes[n]}(a)),u=_c(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE?t:t.childNodes[n-1]}(a));if(s){const e=r(),t=_c(l.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void lu(n,!1);if(c===u)t(c);else{const t=[...o(c),c],n=[...o(u),u],r=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[r],n[r])}}function s(){l.addEventListener("selectionchange",a),i.addEventListener("mouseup",a)}function c(){l.removeEventListener("selectionchange",a),i.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,o])}function au(){const{selectBlock:e}=(0,m.useDispatch)(qn),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,m.useSelect)(qn);return(0,d.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),a=_c(l.target);l.shiftKey?i!==a&&(r.contentEditable=!0,r.focus()):o()&&e(a)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function su(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,m.useSelect)(qn),{replaceBlocks:l,__unstableSplitSelection:i,removeBlocks:a,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((u=>{function d(d){d.defaultPrevented||o()&&(d.keyCode===Tc.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?l(t(),(0,r.createBlock)((0,r.getDefaultBlockName)())):i()):d.keyCode===Tc.BACKSPACE||d.keyCode===Tc.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?a(t()):n()?s(d.keyCode===Tc.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?s(d.keyCode===Tc.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function p(e){o()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("keydown",d),u.addEventListener("compositionstart",p),()=>{u.removeEventListener("keydown",d),u.removeEventListener("compositionstart",p)}}),[])}function cu(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),o=(0,a.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,m.useSelect)(qn),{setNavigationMode:s}=(0,m.useDispatch)(qn),c=(0,m.useSelect)((e=>e(qn).isNavigationMode()),[])?void 0:"0",u=(0,a.useRef)();function p(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{s(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Jr.focus.tabbable[n](t.target).focus()}}const f=(0,a.createElement)("div",{ref:t,tabIndex:c,onFocus:p}),g=(0,a.createElement)("div",{ref:n,tabIndex:c,onFocus:p}),h=(0,d.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===Tc.ESCAPE&&!r())return e.preventDefault(),void s(!0);if(e.keyCode!==Tc.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===a&&s(!0));if(((0,Jr.isFormElement)(e.target)||e.target.getAttribute("data-block")===l())&&(0,Jr.isFormElement)(Jr.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==i()||a.focus()}function p(o){var r;if(o.keyCode!==Tc.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=Jr.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=a,{defaultView:f}=m;return f.addEventListener("keydown",p),a.addEventListener("keydown",c),a.addEventListener("focusout",d),()=>{f.removeEventListener("keydown",p),a.removeEventListener("keydown",c),a.removeEventListener("focusout",d)}}),[]);return[f,(0,d.useMergeRefs)([e,h]),g]}(),o=(0,m.useSelect)((e=>e(qn).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,su(),ru(),iu(),au(),Zc(),nu(),eu(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=o,o)return e.setAttribute("aria-label",(0,g.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[o])]),n]}var uu=(0,a.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,s]=cu();return(0,a.createElement)(a.Fragment,null,r,(0,a.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),s)}));const du="editor-styles-wrapper";function pu(e){return(0,a.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var mu=(0,a.forwardRef)((function(e,t){let{contentRef:n,children:o,head:r,tabIndex:l=0,assets:s,...u}=e;const[,m]=(0,a.useReducer)((()=>({}))),[f,h]=(0,a.useState)(),[v,b]=(0,a.useState)([]),k=pu(null==s?void 0:s.styles),_=pu(null==s?void 0:s.scripts),y=Yc(),[E,C,w]=cu(),S=(0,d.useRefEffect)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:o,documentElement:r}=t;return("interactive"===o||"complete"===o)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(t),h(t),y(r),b(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),t.dir=n.dir,r.removeChild(t.head),r.removeChild(t.body),!0)}return e.addEventListener("load",t),()=>e.removeEventListener("load",t)}),[]),B=(0,d.useRefEffect)((e=>{_.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{m()}))}),[]),I=(0,d.useMergeRefs)([n,y,C]),x=(0,d.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(o).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${du}`)||t.includes(".wp-block"))}))&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.appendChild(o.cloneNode(!0))}}))}),[]);return r=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,"body{margin:0}"),k.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const s=t.toLowerCase();return"style"===s?(0,a.createElement)(s,{id:o,key:o},i):(0,a.createElement)(s,{href:n,id:o,rel:r,media:l,key:o})})),r),(0,a.createElement)(a.Fragment,null,l>=0&&E,(0,a.createElement)("iframe",i({},u,{ref:(0,d.useMergeRefs)([t,S]),tabIndex:l,srcDoc:"",title:(0,g.__)("Editor canvas")}),f&&(0,a.createPortal)((0,a.createElement)(a.Fragment,null,(0,a.createElement)("head",{ref:B},r),(0,a.createElement)("body",{ref:I,className:c()(du,...v)},(0,a.createElement)("div",{style:{display:"none"},ref:x}),(0,a.createElement)(p.__experimentalStyleProvider,{document:f},o))),f.documentElement)),l>=0&&w)})),fu={grad:.9,turn:360,rad:360/(2*Math.PI)},gu=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},hu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},vu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},bu=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ku=function(e){return{r:vu(e.r,0,255),g:vu(e.g,0,255),b:vu(e.b,0,255),a:vu(e.a)}},_u=function(e){return{r:hu(e.r),g:hu(e.g),b:hu(e.b),a:hu(e.a,3)}},yu=/^#([0-9a-f]{3,8})$/i,Eu=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Cu=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),a=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(a<0?a+6:a),s:l?i/l*100:0,v:l/255*100,a:r}},wu=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),a=o*(1-(t-l)*n),s=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,a,i,i,s,o][c],g:255*[s,o,o,a,i,i][c],b:255*[i,i,s,o,o,a][c],a:r}},Su=function(e){return{h:bu(e.h),s:vu(e.s,0,100),l:vu(e.l,0,100),a:vu(e.a)}},Bu=function(e){return{h:hu(e.h),s:hu(e.s),l:hu(e.l),a:hu(e.a,3)}},Iu=function(e){return wu((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},xu=function(e){return{h:(t=Cu(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},Tu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mu=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ru={string:[[function(e){var t=yu.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?hu(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?hu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Pu.exec(e)||Mu.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ku({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=Tu.exec(e)||Nu.exec(e);if(!t)return null;var n,o,r=Su({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(fu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Iu(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return gu(t)&&gu(n)&&gu(o)?ku({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!gu(t)||!gu(n)||!gu(o))return null;var i=Su({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return Iu(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!gu(t)||!gu(n)||!gu(o))return null;var i=function(e){return{h:bu(e.h),s:vu(e.s,0,100),v:vu(e.v,0,100),a:vu(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return wu(i)},"hsv"]]},Lu=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=_u(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?Eu(hu(255*r)):"","#"+Eu(t)+Eu(n)+Eu(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return _u(this.rgba)},e.prototype.toRgbString=function(){return t=(e=_u(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 Bu(xu(this.rgba))},e.prototype.toHslString=function(){return t=(e=Bu(xu(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=Cu(this.rgba),{h:hu(e.h),s:hu(e.s),v:hu(e.v),a:hu(e.a,3)};var e},e.prototype.invert=function(){return Vu({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),Vu(Du(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Vu(Du(this.rgba,-e))},e.prototype.grayscale=function(){return Vu(Du(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Vu(Fu(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Vu(Fu(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?Vu({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):hu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=xu(this.rgba);return"number"==typeof e?Vu({h:e,s:t.s,l:t.l,a:t.a}):hu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Vu(e).toHex()},e}(),Vu=function(e){return e instanceof zu?e:new zu(e)},Hu=[],Gu=function(e){e.forEach((function(e){Hu.indexOf(e)<0&&(e(zu,Ru),Hu.push(e))}))};function Uu(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,a=o[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=s,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m(s=$u(i))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var Ku=n(3124),qu=n.n(Ku);const Yu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Qu(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const a=[];function s(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;a.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),f(n);e.length&&"}"!==e.charAt(0)&&(t=w()||S());)!1!==t&&(n.push(t),f(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function f(e){let t;for(e=e||[];t=g();)!1!==t&&e.push(t);return e}function g(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function h(){const e=p(/^([^{]+)/);if(e)return Xu(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Xu(t[0]),!p(/^:\s*/))return s("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Yu,""),value:n?Xu(n[0]).replace(Yu,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return s("missing '{'");let t;for(f(e);t=v();)!1!==t&&(e.push(t),f(e));return u()?e:s("missing '}'")}function k(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function w(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const o=t[1];if(!c())return s("@keyframes missing '{'");let r,i=f();for(;r=k();)i.push(r),i=i.concat(f());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):s("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Xu(t[1]);if(!c())return s("@media missing '{'");const o=f().concat(d());return u()?e({type:"media",media:n,rules:o}):s("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Xu(t[1]),media:Xu(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Xu(t[1]);if(!c())return s("@supports missing '{'");const o=f().concat(d());return u()?e({type:"supports",supports:n,rules:o}):s("@supports missing '}'")}()||_()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Xu(t[1]),o=Xu(t[2]);if(!c())return s("@document missing '{'");const r=f().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):s("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=h()||[];if(!c())return s("@page missing '{'");let n,o=f();for(;n=v();)o.push(n),o=o.concat(f());return u()?e({type:"page",selectors:t,declarations:o}):s("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=f().concat(d());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=f();for(;t=v();)n.push(t),n=n.concat(f());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function S(){const e=l(),t=h();return t?(f(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return Zu(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function Xu(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Zu(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Zu(e,o)})):n&&"object"==typeof n&&Zu(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Ju=n(8575),ed=n.n(Ju),td=nd;function nd(e){this.options=e||{}}nd.prototype.emit=function(e){return e},nd.prototype.visit=function(e){return this[e.type](e)},nd.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;ot=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};sd(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+cd(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t};const dd=/^(body|html|:root).*$/;var pd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const o=n=>t.includes(n.trim())?n:n.match(dd)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(o)}:n}};var md=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o}=e;const r=[];return t&&r.push(pd(t)),o&&r.push(ud(o)),r.length?ad(n,(0,d.compose)(r)):n}))};const fd=".editor-styles-wrapper";function gd(e){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(fd);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Vu(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function hd(e){let{styles:t}=e;const n=(0,a.useMemo)((()=>md(t,fd)),[t]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",{ref:gd(t)}),n.map(((e,t)=>(0,a.createElement)("style",{key:t},e))))}let vd;Gu([Uu,ju]);const bd=2e3;var kd=function(e){let{viewportWidth:t,__experimentalPadding:n,__experimentalMinHeight:o}=e;const[r,{width:l}]=(0,d.useResizeObserver)(),[i,{height:s}]=(0,d.useResizeObserver)(),{styles:c,assets:u}=(0,m.useSelect)((e=>{const t=e(qn).getSettings();return{styles:t.styles,assets:t.__unstableResolvedAssets}}),[]),f=(0,a.useMemo)((()=>c?[...c,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:c),[c]);vd=vd||(0,d.pure)(Wf);const g=l/t;return(0,a.createElement)("div",{className:"block-editor-block-preview__container"},r,(0,a.createElement)(p.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${g})`,height:s*g,maxHeight:s>bd?bd*g:void 0,minHeight:o}},(0,a.createElement)(mu,{head:(0,a.createElement)(hd,{styles:f}),assets:u,contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px",e.style.position="relative"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:s,pointerEvents:"none",maxHeight:bd,minHeight:g<1&&o?o/g:o}},i,(0,a.createElement)(vd,{renderAppender:!1}))))};var _d=(0,a.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l,__experimentalMinHeight:i}=e;const s=(0,m.useSelect)((e=>e(qn).getSettings()),[]),c=(0,a.useMemo)((()=>{const e={...s};return e.__experimentalBlockPatterns=[],e}),[s]),d=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,a.createElement)(Kc,{value:d,settings:c},r?(0,a.createElement)(qc,{onClick:l}):(0,a.createElement)(kd,{viewportWidth:o,__experimentalPadding:n,__experimentalMinHeight:i})):null}));function yd(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const r=(0,m.useSelect)((e=>e(qn).getSettings()),[]),l=(0,d.__experimentalUseDisabled)(),i=(0,d.useMergeRefs)([n.ref,l]),s=(0,a.useMemo)((()=>({...r,__experimentalBlockPatterns:[]})),[r]),p=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]),f=(0,a.createElement)(Kc,{value:p,settings:s},(0,a.createElement)(jf,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:i,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?f:null}}var Ed=function(e){var t,n;let{item:o}=e;const{name:l,title:i,icon:s,description:c,initialAttributes:u}=o,d=(0,r.getBlockType)(l),p=(0,r.isReusableBlock)(o);return(0,a.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,a.createElement)("div",{className:"block-editor-inserter__preview"},p||null!=d&&d.example?(0,a.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,a.createElement)(_d,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=d.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:d.example?(0,r.getBlockFromExample)(o.name,{attributes:{...d.example.attributes,...u},innerBlocks:d.example.innerBlocks}):(0,r.createBlock)(l,u)})):(0,a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,g.__)("No Preview Available."))),!p&&(0,a.createElement)($c,{title:i,icon:s,description:c}))};var Cd=(0,a.createContext)();var wd=(0,a.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const s=(0,a.useContext)(Cd);return(0,a.createElement)(p.__unstableCompositeItem,i({ref:t,state:s,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,a.createElement)(o,t,r):"function"==typeof r?r(t):(0,a.createElement)(p.Button,t,r)}))}));var Sd=(0,a.createElement)(O.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function Bd(e){let{count:t,icon:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,a.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,a.createElement)(p.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,a.createElement)(p.FlexItem,null,n?(0,a.createElement)(Wc,{icon:n}):(0,g.sprintf)((0,g._n)("%d block","%d blocks",t),t)),(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(Wc,{icon:Sd})))))}var Id=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,a.createElement)(p.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,a.createElement)(Bd,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))};function xd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var Td=(0,a.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:s,isDraggable:u,...d}=e;const p=(0,a.useRef)(!1),m=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},f=(0,a.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,a.createElement)(Id,{isEnabled:u&&!o.disabled,blocks:f,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:f}=e;return(0,a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(s(null),u(e))},onDragEnd:e=>{p.current=!1,f&&f(e)}},(0,a.createElement)(wd,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,xd()?e.metaKey:e.ctrlKey),s(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Tc.ENTER&&(e.preventDefault(),l(o,xd()?e.metaKey:e.ctrlKey),s(null))},onFocus:()=>{p.current||s(o)},onMouseEnter:()=>{p.current||s(o)},onMouseLeave:()=>s(null),onBlur:()=>s(null)},d),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:m},(0,a.createElement)(Wc,{icon:o.icon,showColors:!0})),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-title"},o.title)))}))}));var Nd=(0,a.forwardRef)((function(e,t){const[n,o]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,Ft.speak)((0,g.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,a.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))}));var Pd=(0,a.forwardRef)((function(e,t){const n=(0,a.useContext)(Cd);return(0,a.createElement)(p.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))}));var Md=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:s=!0}=e;return(0,a.createElement)(Nd,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let o=0,r=e.length;o(0,a.createElement)(Pd,{key:t},e.map(((e,l)=>(0,a.createElement)(Td,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:s,isFirst:0===t&&0===l})))))),l)};var Rd=function(e){let{title:t,icon:n,children:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,a.createElement)(p.Icon,{icon:n})),(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},o))};var Ld=(e,t)=>{const{categories:n,collections:o,items:l}=(0,m.useSelect)((t=>{const{getInserterItems:n}=t(qn),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,a.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const a=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(a,void 0,n)}),[t])]};var Ad=function(e){let{children:t}=e;const n=(0,p.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,a.createElement)(Cd.Provider,{value:n},t)};const Dd=[];var Od=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,s,c]=Ld(t,n),p=(0,a.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,a.useMemo)((()=>l.filter((e=>!e.category))),[l]),f=(0,a.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),h=(0,a.useMemo)((()=>{const e={...s};return Object.keys(s).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,s]);(0,a.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,k=(0,a.useMemo)((()=>Object.entries(s)),[s]),_=(0,d.useAsyncList)(b?k:Dd);return(0,a.createElement)(Ad,null,(0,a.createElement)("div",null,r&&!!p.length&&(0,a.createElement)(Rd,{title:(0,g._x)("Most used","blocks")},(0,a.createElement)(Md,{items:p,onSelect:c,onHover:o,label:(0,g._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=f[e.slug];return t&&t.length?(0,a.createElement)(Rd,{key:e.slug,title:e.title,icon:e.icon},(0,a.createElement)(Md,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,a.createElement)(Rd,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,g.__)("Uncategorized")},(0,a.createElement)(Md,{items:m,onSelect:c,onHover:o,label:(0,g.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const r=h[t];return r&&r.length?(0,a.createElement)(Rd,{key:t,title:n.title,icon:n.icon},(0,a.createElement)(Md,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))};var Fd=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,a.createElement)(p.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,a.createElement)(p.FlexItem,{isBlock:!0},(0,a.createElement)(p.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,g.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(p.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,g.__)("Explore all patterns"),onClick:()=>r()},(0,g._x)("Explore","Label for showing all block patterns"))))},zd=window.wp.notices;var Vd=(e,t)=>{const{patternCategories:n,patterns:o}=(0,m.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(qn);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,m.useDispatch)(zd.store),i=(0,a.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,g.sprintf)((0,g.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[o,n,i]};function Hd(e){let{isDraggable:t,pattern:n,onClick:o,composite:r}=e;const{blocks:l,viewportWidth:s}=n,c=`block-editor-block-patterns-list__item-description-${(0,d.useInstanceId)(Hd)}`;return(0,a.createElement)(Id,{isEnabled:t,blocks:l},(e=>{let{draggable:t,onDragStart:u,onDragEnd:d}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:d},(0,a.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},r,{className:"block-editor-block-patterns-list__item",onClick:()=>o(n,l)}),(0,a.createElement)(_d,{blocks:l,viewportWidth:s}),(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,a.createElement)(p.VisuallyHidden,{id:c},n.description)))}))}function Gd(){return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Ud=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:o,onClickPattern:r,orientation:l,label:s=(0,g.__)("Block Patterns")}=e;const c=(0,p.__unstableUseCompositeState)({orientation:l});return(0,a.createElement)(p.__unstableComposite,i({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((e=>o.includes(e)?(0,a.createElement)(Hd,{key:e.name,pattern:e,onClick:r,isDraggable:t,composite:c}):(0,a.createElement)(Gd,{key:e.name}))))};function Wd(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o}=e;const r="block-editor-block-patterns-explorer__sidebar";return(0,a.createElement)("div",{className:`${r}__categories-list`},n.map((e=>{let{name:n,label:l}=e;return(0,a.createElement)(p.Button,{key:n,label:l,className:`${r}__categories-list__item`,isPressed:t===n,onClick:()=>{o(n)}},l)})))}function $d(e){let{filterValue:t,setFilterValue:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,a.createElement)(p.SearchControl,{onChange:n,value:t,label:(0,g.__)("Search for patterns"),placeholder:(0,g.__)("Search")}))}var jd=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,filterValue:r,setFilterValue:l}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,a.createElement)($d,{filterValue:r,setFilterValue:l}),!r&&(0,a.createElement)(Wd,{selectedCategory:t,patternCategories:n,onClickCategory:o}))};var Kd=function(){return(0,a.createElement)("div",{className:"block-editor-inserter__no-results"},(0,a.createElement)(wr,{className:"block-editor-inserter__no-results-icon",icon:Uc}),(0,a.createElement)("p",null,(0,g.__)("No results found.")))};var qd=function(e){let{rootClientId:t="",insertionIndex:n,clientId:o,isAppender:l,onSelect:i,shouldFocusBlock:s=!0}=e;const{getSelectedBlock:c}=(0,m.useSelect)(qn),{destinationRootClientId:d,destinationIndex:p}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:r,getBlockRootClientId:i,getBlockIndex:a,getBlockOrder:s}=e(qn),c=r();let u,d=t;return void 0!==n?u=n:o?u=a(o):!l&&c?(d=i(c),u=a(c)+1):u=s(d).length,{destinationRootClientId:d,destinationIndex:u}}),[t,n,o,l]),{replaceBlocks:f,insertBlocks:h,showInsertionPoint:v,hideInsertionPoint:b}=(0,m.useDispatch)(qn),k=(0,a.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=c();!l&&o&&(0,r.isUnmodifiedDefaultBlock)(o)?f(o.clientId,e,null,s||n?0:null,t):h(e,p,d,!0,s||n?0:null,t);const a=(0,g.sprintf)((0,g._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,Ft.speak)(a),i&&i()}),[l,c,f,h,d,p,i,s]),_=(0,a.useCallback)((e=>{e?v(d,p):b()}),[v,b,d,p]);return[d,k,_]};const Yd=e=>e.name||"",Qd=e=>e.title,Xd=e=>e.description||"",Zd=e=>e.keywords||[],Jd=e=>e.category,ep=()=>null;function tp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(0,u.deburr)(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const np=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(tp(e))},op=(e,t)=>(0,u.differenceWith)(e,np(t),((e,t)=>t.includes(e))),rp=(e,t,n,o)=>{if(0===np(o).length)return e;return lp(e,o,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},lp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=np(t);if(0===o.length)return e;const r=e.map((e=>[e,ip(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return r.sort(((e,t)=>{let[,n]=e,[,o]=t;return o-n})),r.map((e=>{let[t]=e;return t}))};function ip(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:o=Yd,getTitle:r=Qd,getDescription:l=Xd,getKeywords:i=Zd,getCategory:a=Jd,getCollection:s=ep}=n,c=o(e),d=r(e),p=l(e),m=i(e),f=a(e),g=s(e),h=tp(t),v=tp(d);let b=0;if(h===v)b+=30;else if(v.startsWith(h))b+=20;else{const e=[c,d,p,...m,f,g].join(" "),t=(0,u.words)(h);0===op(t,e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function ap(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,a.createElement)(p.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,g.sprintf)((0,g._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var sp=function(e){let{filterValue:t,selectedCategory:n,patternCategories:o}=e;const r=(0,d.useDebounce)(Ft.speak,500),[l,i]=qd({shouldFocusBlock:!0}),[s,,c]=Vd(i,l),u=(0,a.useMemo)((()=>o.map((e=>e.name))),[o]),p=(0,a.useMemo)((()=>t?lp(s,t):s.filter((e=>{var t,o;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(o=e.categories)||void 0===o?void 0:o.includes(n)}))),[t,n,s]);(0,a.useEffect)((()=>{if(!t)return;const e=p.length,n=(0,g.sprintf)((0,g._n)("%d result found.","%d results found.",e),e);r(n)}),[t,r]);const m=(0,d.useAsyncList)(p,{step:2}),f=!(null==p||!p.length);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},f&&(0,a.createElement)(ap,{filterValue:t,filteredBlockPatternsLength:p.length}),(0,a.createElement)(Ad,null,!f&&(0,a.createElement)(Kd,null),f&&(0,a.createElement)(Ud,{shownPatterns:m,blockPatterns:p,onClickPattern:c,isDraggable:!1})))};function cp(e){let{initialCategory:t,patternCategories:n}=e;const[o,r]=(0,a.useState)(""),[l,i]=(0,a.useState)(null==t?void 0:t.name);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,a.createElement)(jd,{selectedCategory:l,patternCategories:n,onClickCategory:i,filterValue:o,setFilterValue:r}),(0,a.createElement)(sp,{filterValue:o,selectedCategory:l,patternCategories:n}))}var up=function(e){let{onModalClose:t,...n}=e;return(0,a.createElement)(p.Modal,{title:(0,g.__)("Patterns"),closeLabel:(0,g.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,a.createElement)(cp,n))};function dp(e){let{rootClientId:t,onInsert:n,selectedCategory:o,populatedCategories:r}=e;const[l,,i]=Vd(n,t),s=(0,a.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=r.reduce(((e,t,n)=>{let{name:o}=t;return e[o]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[r]),c=(0,a.useMemo)((()=>l.filter((e=>{var t;return"uncategorized"===o.name?s(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(o.name)}))),[l,o]),u=(0,a.useMemo)((()=>c.sort(((e,t)=>s(e)-s(t)))),[c,s]),p=(0,d.useAsyncList)(u);return c.length?(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,a.createElement)(Ud,{shownPatterns:p,blockPatterns:c,onClickPattern:i,label:o.label,orientation:"vertical",isDraggable:!0})):null}var pp=function(e){let{rootClientId:t,onInsert:n,onClickCategory:o,selectedCategory:r}=e;const[l,i]=(0,a.useState)(!1),[s,c]=Vd(),u=(0,a.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),d=(0,a.useMemo)((()=>{const e=c.filter((e=>s.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:o}=t;return[n,o].includes("featured")?"featured"===n?-1:1:0}));return s.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,g._x)("Uncategorized")}),e}),[s,c]),p=r||d[0];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Fd,{selectedCategory:p,patternCategories:d,onClickCategory:o,openPatternExplorer:()=>i(!0)}),!l&&(0,a.createElement)(dp,{rootClientId:t,onInsert:n,selectedCategory:p,populatedCategories:d}),l&&(0,a.createElement)(up,{initialCategory:p,patternCategories:d,onModalClose:()=>i(!1)}))},mp=window.wp.url;function fp(e){let{onHover:t,onInsert:n,rootClientId:o}=e;const[r,,,l]=Ld(o,n),i=(0,a.useMemo)((()=>r.filter((e=>{let{category:t}=e;return"reusable"===t}))),[r]);return 0===i.length?(0,a.createElement)(Kd,null):(0,a.createElement)(Rd,{title:(0,g.__)("Reusable blocks")},(0,a.createElement)(Md,{items:i,onSelect:l,onHover:t,label:(0,g.__)("Reusable blocks")}))}var gp=function(e){let{rootClientId:t,onInsert:n,onHover:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(fp,{onHover:o,onInsert:n,rootClientId:t}),(0,a.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,a.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,mp.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,g.__)("Manage Reusable blocks"))))};const{Fill:hp,Slot:vp}=(0,p.createSlotFill)("__unstableInserterMenuExtension");hp.Slot=vp;var bp=hp;const kp=[];var _p=function(e){let{filterValue:t,onSelect:n,onHover:o,rootClientId:r,clientId:l,isAppender:i,__experimentalInsertionIndex:s,maxBlockPatterns:c,maxBlockTypes:m,showBlockDirectory:f=!1,isDraggable:h=!0,shouldFocusBlock:v=!0,prioritizePatterns:b}=e;const k=(0,d.useDebounce)(Ft.speak,500),[_,y]=qd({onSelect:n,rootClientId:r,clientId:l,isAppender:i,insertionIndex:s,shouldFocusBlock:v}),[E,C,w,S]=Ld(_,y),[B,,I]=Vd(y,_),x=(0,a.useMemo)((()=>{if(0===c)return[];const e=lp(B,t);return void 0!==c?e.slice(0,c):e}),[t,B,c]);let T=m;b&&x.length>2&&(T=0);const N=(0,a.useMemo)((()=>{if(0===T)return[];const e=rp((0,u.orderBy)(E,["frecency"],["desc"]),C,w,t);return void 0!==T?e.slice(0,T):e}),[t,E,C,w,m]);(0,a.useEffect)((()=>{if(!t)return;const e=N.length+x.length,n=(0,g.sprintf)((0,g._n)("%d result found.","%d results found.",e),e);k(n)}),[t,k]);const P=(0,d.useAsyncList)(N,{step:9}),M=(0,d.useAsyncList)(P.length===N.length?x:kp),R=!(0,u.isEmpty)(N)||!(0,u.isEmpty)(x),L=!!N.length&&(0,a.createElement)(Rd,{title:(0,a.createElement)(p.VisuallyHidden,null,(0,g.__)("Blocks"))},(0,a.createElement)(Md,{items:P,onSelect:S,onHover:o,label:(0,g.__)("Blocks"),isDraggable:h})),A=!!x.length&&(0,a.createElement)(Rd,{title:(0,a.createElement)(p.VisuallyHidden,null,(0,g.__)("Block Patterns"))},(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,a.createElement)(Ud,{shownPatterns:M,blockPatterns:x,onClickPattern:I,isDraggable:h})));return(0,a.createElement)(Ad,null,!f&&!R&&(0,a.createElement)(Kd,null),b?A:L,!!N.length&&!!x.length&&(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?L:A,f&&(0,a.createElement)(bp.Slot,{fillProps:{onSelect:S,onHover:o,filterValue:t,hasItems:R,rootClientId:_}},(e=>e.length?e:R?null:(0,a.createElement)(Kd,null))))};const yp={name:"blocks",title:(0,g.__)("Blocks")},Ep={name:"patterns",title:(0,g.__)("Patterns")},Cp={name:"reusable",title:(0,g.__)("Reusable")};var wp=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:o=!1,onSelect:r}=e;const l=(0,a.useMemo)((()=>{const e=[yp];return n&&e.push(Ep),o&&e.push(Cp),e}),[yp,n,Ep,o,Cp]);return(0,a.createElement)(p.TabPanel,{className:"block-editor-inserter__tabs",tabs:l,onSelect:r},t)};var Sp=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:l,onSelect:i,showInserterHelpPanel:s,showMostUsedBlocks:c,__experimentalFilterValue:u="",shouldFocusBlock:d=!0}=e;const[f,h]=(0,a.useState)(u),[v,b]=(0,a.useState)(null),[k,_]=(0,a.useState)(null),[y,E,C]=qd({rootClientId:n,clientId:o,isAppender:r,insertionIndex:l,shouldFocusBlock:d}),{showPatterns:w,hasReusableBlocks:S}=(0,m.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(qn);return{showPatterns:!!n(y).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[y]),B=(0,a.useCallback)(((e,t,n)=>{E(e,t,n),i()}),[E,i]),I=(0,a.useCallback)(((e,t)=>{E(e,{patternName:t}),i()}),[E,i]),x=(0,a.useCallback)((e=>{C(!!e),b(e)}),[C,b]),T=(0,a.useCallback)((e=>{_(e)}),[_]),N=(0,a.useMemo)((()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__block-list"},(0,a.createElement)(Od,{rootClientId:y,onInsert:B,onHover:x,showMostUsedBlocks:c})),s&&(0,a.createElement)("div",{className:"block-editor-inserter__tips"},(0,a.createElement)(p.VisuallyHidden,{as:"h2"},(0,g.__)("A tip for using the block editor")),(0,a.createElement)(Gc,null)))),[y,B,x,f,c,s]),P=(0,a.useMemo)((()=>(0,a.createElement)(pp,{rootClientId:y,onInsert:I,onClickCategory:T,selectedCategory:k})),[y,I,T,k]),M=(0,a.useMemo)((()=>(0,a.createElement)(gp,{rootClientId:y,onInsert:B,onHover:x})),[y,B,x]),R=(0,a.useCallback)((e=>"blocks"===e.name?N:"patterns"===e.name?P:M),[N,P,M]),L=(0,a.useRef)();return(0,a.useImperativeHandle)(t,(()=>({focusSearch:()=>{L.current.focus()}}))),(0,a.createElement)("div",{className:"block-editor-inserter__menu"},(0,a.createElement)("div",{className:"block-editor-inserter__main-area"},(0,a.createElement)("div",{className:"block-editor-inserter__content"},(0,a.createElement)(p.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{v&&b(null),h(e)},value:f,label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search"),ref:L}),!!f&&(0,a.createElement)(_p,{filterValue:f,onSelect:i,onHover:x,rootClientId:n,clientId:o,isAppender:r,__experimentalInsertionIndex:l,showBlockDirectory:!0,shouldFocusBlock:d}),!f&&(w||S)&&(0,a.createElement)(wp,{showPatterns:w,showReusableBlocks:S},R),!f&&!w&&!S&&N)),s&&v&&(0,a.createElement)(Ed,{item:v}))}));function Bp(e){let{onSelect:t,rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:l}=e;const[i,s]=(0,a.useState)(""),[u,d]=qd({onSelect:t,rootClientId:n,clientId:o,isAppender:r}),[f]=Ld(u,d),[h]=Vd(d,u),{setInserterIsOpened:v,insertionIndex:b}=(0,m.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:r}=e(qn),l=t(),i=n(o),a=r();return{setInserterIsOpened:l.__experimentalSetIsInserterOpened,insertionIndex:-1===i?a:i}}),[o]),k=h.length&&(!!i||l),_=k&&h.length>6||f.length>6;(0,a.useEffect)((()=>{v&&v(!1)}),[v]);let y=0;return k&&(y=l?4:2),(0,a.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":v})},_&&(0,a.createElement)(p.SearchControl,{className:"block-editor-inserter__search",value:i,onChange:e=>{s(e)},label:(0,g.__)("Search for blocks and patterns"),placeholder:(0,g.__)("Search")}),(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,a.createElement)(_p,{filterValue:i,onSelect:t,rootClientId:n,clientId:o,isAppender:r,maxBlockPatterns:y,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:l})),v&&(0,a.createElement)(p.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{v({rootClientId:n,insertionIndex:b,filterValue:i})},"aria-label":(0,g.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,g.__)("Browse all")))}const Ip=e=>{let t,{onToggle:n,disabled:o,isOpen:r,blockTitle:l,hasSingleBlockType:s,toggleProps:c={},prioritizePatterns:u}=e;t=s?(0,g.sprintf)((0,g._x)("Add %s","directly add the only allowed block"),l):u?(0,g.__)("Add pattern"):(0,g._x)("Add block","Generic label for block inserter button");const{onClick:d,...m}=c;return(0,a.createElement)(p.Button,i({icon:Vc,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!s&&"true","aria-expanded":!s&&r,disabled:o},m))};class xp extends a.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:o,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:a,hasItems:s,renderToggle:c=Ip,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:o||!s,blockTitle:r,hasSingleBlockType:l,directInsertBlock:i,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,__experimentalIsQuick:i,prioritizePatterns:s}=this.props;return i?(0,a.createElement)(Bp,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,prioritizePatterns:s}):(0,a.createElement)(Sp,{onSelect:()=>{t()},rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:l}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,a.createElement)(p.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":r}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,g.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:l})}}var Tp=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{getBlockRootClientId:l,hasInserterItems:i,__experimentalGetAllowedBlocks:a,__experimentalGetDirectInsertBlock:s,getBlockIndex:c,getBlockCount:d,getSettings:p}=e(qn),{getBlockVariations:m}=e(r.store);o=o||l(n)||void 0;const f=a(o),g=s(o),h=c(n),v=d(),b=p(),k=1===(0,u.size)(f)&&0===(0,u.size)(m(f[0].name,"inserter"));let _=!1;return k&&(_=f[0]),{hasItems:i(o),hasSingleBlockType:k,blockTitle:_?_.title:"",allowedBlockType:_,directInsertBlock:g,rootClientId:o,prioritizePatterns:b.__experimentalPreferPatternsOnRoot&&!o&&h>0&&(h{let{select:o}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:l,isAppender:i,hasSingleBlockType:a,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u}=t;if(!a&&!c)return;const{insertBlock:d}=e(qn);let p;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:r}=o(qn);if(!e||!l&&!n)return{};const i={};let a={};if(l){const e=t(l),n=t(r(l));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(i[e]=a[e])})),i}(c.attributesToCopy);p=(0,r.createBlock)(c.name,{...c.attributes||{},...e})}else p=(0,r.createBlock)(s.name);d(p,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:r,getBlockRootClientId:a}=o(qn);if(l)return e(l);const s=t();return!i&&s&&a(s)===n?e(s)+1:r(n).length}(),n),u&&u();const m=(0,g.sprintf)((0,g.__)("%s block added"),s.title);(0,Ft.speak)(m)}}})),(0,d.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:o,clientId:r}=e;return t||!n&&!o&&!r}))])(xp);var Np=(0,d.compose)((0,m.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r}=e(qn),l=!n(t.rootClientId),{bodyPlaceholder:i}=o();return{showPrompt:l,isLocked:!!r(t.rootClientId),placeholder:i}})),(0,m.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:o}=e(qn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),o()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:o,placeholder:r,rootClientId:l}=e;if(t)return null;const i=(0,zc.decodeEntities)(r)||(0,g.__)("Type / to choose a block");return(0,a.createElement)("div",{"data-root-client-id":l||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":o})},(0,a.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,g.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Tc.ENTER!==e.keyCode&&Tc.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{o&&n()}},o?i:"\ufeff"),(0,a.createElement)(Tp,{rootClientId:l,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function Pp(e,t){let{rootClientId:n,className:o,onFocus:r,tabIndex:l}=e;return(0,a.createElement)(Tp,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:i,disabled:s,isOpen:u,blockTitle:d,hasSingleBlockType:m}=e;n=m?(0,g.sprintf)((0,g._x)("Add %s","directly add the only allowed block"),d):(0,g._x)("Add block","Generic label for block inserter button");const f=!m;let h=(0,a.createElement)(p.Button,{ref:t,onFocus:r,tabIndex:l,className:c()(o,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?u:void 0,disabled:s,label:n},!m&&(0,a.createElement)(p.VisuallyHidden,{as:"span"},n),(0,a.createElement)(wr,{icon:Vc}));return(f||m)&&(h=(0,a.createElement)(p.Tooltip,{text:n},h)),h},isAppender:!0})}const Mp=(0,a.forwardRef)(((e,t)=>(Vt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),Pp(e,t))));var Rp=(0,a.forwardRef)(Pp);var Lp=(0,m.withSelect)(((e,t)=>{let{rootClientId:n}=t;const{canInsertBlockType:o,getTemplateLock:l,getSelectedBlockClientId:i}=e(qn);return{isLocked:!!l(n),canInsertDefaultBlock:o((0,r.getDefaultBlockName)(),n),selectedBlockClientId:i()}}))((function(e){let t,{rootClientId:n,canInsertDefaultBlock:o,isLocked:r,renderAppender:l,className:i,selectedBlockClientId:s,tagName:u="div"}=e;if(r||!1===l)return null;if(l)t=(0,a.createElement)(l,null);else{if(!(s===n||!n&&!s))return null;t=o?(0,a.createElement)(Np,{rootClientId:n}):(0,a.createElement)(Rp,{rootClientId:n,className:"block-list-appender__toggle"})}return(0,a.createElement)(u,{tabIndex:-1,className:c()("block-list-appender wp-block",i),contentEditable:!1,"data-block":!0},t)}));function Ap(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])}const Dp=(0,a.createContext)();function Op(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:o,hideInsertionPoint:r}=(0,m.useDispatch)(qn),l=(0,a.useContext)(Dp),i=(0,a.useRef)(),{orientation:s,previousClientId:u,nextClientId:f,rootClientId:h,isInserterShown:v}=(0,m.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:o,getBlockInsertionPoint:r,isBlockBeingDragged:l,getPreviousBlockClientId:i,getNextBlockClientId:a}=e(qn),s=r(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],d=c[s.index];for(;l(u);)u=i(u);for(;l(d);)d=a(d);return{previousClientId:u,nextClientId:d,orientation:(null===(t=o(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),b=Co(u),k=Co(f),_="vertical"===s,y=(0,a.useMemo)((()=>{if(!b&&!k)return{};const e=b?b.getBoundingClientRect():null,t=k?k.getBoundingClientRect():null;if(_)return{width:b?b.offsetWidth:k.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,g.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:b?b.offsetHeight:k.offsetHeight}}),[b,k]),E=(0,a.useCallback)((()=>{if(!b&&!k)return{};const{ownerDocument:e}=b||k,t=b?b.getBoundingClientRect():null,n=k?k.getBoundingClientRect():null;return _?(0,g.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:(0,g.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[b,k]),C=Ap(n),w=(0,d.useReducedMotion)(),S=c()("block-editor-block-list__insertion-point","is-"+s);const B=b&&k&&v,I={start:{..._?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:B?.4:0}},hover:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},x={start:{scale:w?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,a.createElement)(p.Popover,{ref:C,noArrow:!0,animate:!1,getAnchorRect:E,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:f+"--"+h},(0,a.createElement)(p.__unstableMotion.div,{layout:!w,initial:w?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:i,tabIndex:-1,onClick:function(e){e.target===i.current&&f&&o(f,-1)},onFocus:function(e){e.target!==i.current&&(l.current=!0)},className:c()(S,{"is-with-inserter":B}),onHoverEnd:function(e){e.target!==i.current||l.current||r()},style:y},(0,a.createElement)(p.__unstableMotion.div,{variants:I,className:"block-editor-block-list__insertion-point-indicator"}),B&&(0,a.createElement)(p.__unstableMotion.div,{variants:x,className:c()("block-editor-block-list__insertion-point-inserter")},(0,a.createElement)(Tp,{position:"bottom center",clientId:f,rootClientId:h,__experimentalIsQuick:!0,onToggle:e=>{l.current=e},onSelectOrClose:()=>{l.current=!1}}))))}function Fp(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:o}=e;const r=(0,m.useSelect)((e=>e(qn).isBlockInsertionPointVisible()),[]);return(0,a.createElement)(Dp.Provider,{value:(0,a.useRef)(!1)},r&&(0,a.createElement)(Op,{__unstablePopoverSlot:n,__unstableContentRef:o}),t)}function zp(){const e=(0,a.useContext)(Dp),t=(0,m.useSelect)((e=>e(qn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:o,getBlockIndex:r,isBlockInsertionPointVisible:l,isMultiSelecting:i,getSelectedBlockClientIds:s,getTemplateLock:c}=(0,m.useSelect)(qn),{showInsertionPoint:u,hideInsertionPoint:p}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((o=>{if(!t)return o.addEventListener("mousemove",a),()=>{o.removeEventListener("mousemove",a)};function a(t){var o,a;if(e.current)return;if(i())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(l()&&p());let d;if(!t.target.classList.contains("is-root-container")){d=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(c(d))return;const m=(null===(o=n(d))||void 0===o?void 0:o.orientation)||"vertical",f=t.target.getBoundingClientRect(),g=t.clientY-f.top,h=t.clientX-f.left;let v=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===m&&e.offsetTop>g||e.classList.contains("wp-block")&&"horizontal"===m&&e.offsetLeft>h));if(!v)return;if(!v.id&&(v=v.firstElementChild,!v))return;if(null===(a=v.parentElement)||void 0===a?void 0:a.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=v.id.slice("block-".length);if(!b)return;if(s().includes(b))return;const k=v.getBoundingClientRect();if("horizontal"===m&&(t.clientY>k.bottom||t.clientYk.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Hp="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Gp(e){return(0,m.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(qn),{getBlockType:l,getActiveBlockVariation:i}=t(r.store),a=n(e),s=l(a);if(!s)return null;const c=o(e),u=i(a,c),d={title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description}:d}),[e])}function Up(e,t){const{attributes:n,name:o,reusableBlockTitle:l}=(0,m.useSelect)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:o,__experimentalGetReusableBlockTitle:l}=t(qn),i=n(e);if(!i)return{};const a=(0,r.isReusableBlock)((0,r.getBlockType)(i));return{attributes:o(e),name:i,reusableBlockTitle:a&&l(o(e).ref)}}),[e]),i=Gp(e);if(!o||!i)return null;const a=(0,r.getBlockType)(o),s=a?(0,r.__experimentalGetBlockLabel)(a,n):null,c=l||s,d=c&&c!==a.title?c:i.title;return t&&t>0?(0,u.truncate)(d,{length:t}):d}function Wp(e){let{clientId:t,maximumLength:n}=e;return Up(t,n)}var $p=e=>{let{children:t,clientIds:n,cloneClassname:o,onDragStart:l,onDragEnd:i}=e;const{srcRootClientId:s,isDraggable:c,icon:u}=(0,m.useSelect)((e=>{var t;const{canMoveBlocks:o,getBlockRootClientId:l,getBlockName:i}=e(qn),a=l(n[0]),s=i(n[0]);return{srcRootClientId:a,isDraggable:o(n,a),icon:null===(t=(0,r.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),d=(0,a.useRef)(!1),[f,g,h]=function(){const e=(0,a.useRef)(null),t=(0,a.useRef)(null),n=(0,a.useRef)(null),o=(0,a.useRef)(null);return(0,a.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,a.useCallback)((r=>{e.current=r.clientY,n.current=(0,Jr.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,a.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,l=e.current-n.current.offsetTop,i=o.clientY-n.current.offsetTop;if(o.clientY>l){const e=Math.max(r-l-50,0),n=Math.max(i-l-50,0)/e;t.current=25*n}else if(o.clientY{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{startDraggingBlocks:v,stopDraggingBlocks:b}=(0,m.useDispatch)(qn);if((0,a.useEffect)((()=>()=>{d.current&&b()}),[]),!c)return t({isDraggable:!1});const k={type:"block",srcClientIds:n,srcRootClientId:s};return(0,a.createElement)(p.Draggable,{cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:k,onDragStart:e=>{v(n),d.current=!0,f(e),l&&l()},onDragOver:g,onDragEnd:()=>{b(),d.current=!1,h(),i&&i()},__experimentalDragComponent:(0,a.createElement)(Bd,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return t({draggable:!0,onDragStart:n,onDragEnd:o})}))};var jp=function(e){let{clientId:t,rootClientId:n,blockElement:o}=e;const l=Gp(t),s=(0,m.useSelect)((e=>{var o;const{getBlock:r,getBlockIndex:l,hasBlockMovingClientId:i,getBlockListSettings:a}=e(qn),s=l(t),{name:c,attributes:u}=r(t);return{index:s,name:c,attributes:u,blockMovingMode:i(),orientation:null===(o=a(n))||void 0===o?void 0:o.orientation}}),[t,n]),{index:u,name:d,attributes:f,blockMovingMode:h,orientation:v}=s,{setNavigationMode:b,removeBlock:k}=(0,m.useDispatch)(qn),_=(0,a.useRef)(),y=(0,r.getBlockType)(d),E=(0,r.__experimentalGetAccessibleBlockLabel)(y,f,u+1,v);(0,a.useEffect)((()=>{_.current.focus(),(0,Ft.speak)(E)}),[E]);const{hasBlockMovingClientId:C,getBlockIndex:w,getBlockRootClientId:S,getClientIdsOfDescendants:B,getSelectedBlockClientId:I,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:T,getNextBlockClientId:N,isNavigationMode:P}=(0,m.useSelect)(qn),{selectBlock:M,clearSelectedBlock:R,setBlockMovingClientId:L,moveBlockToPosition:A}=(0,m.useDispatch)(qn),D=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!h}),O=(0,g.__)("Drag");return(0,a.createElement)("div",{className:D},(0,a.createElement)(p.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(Wc,{icon:null==l?void 0:l.icon,showColors:!0})),(0,a.createElement)(p.FlexItem,null,(0,a.createElement)($p,{clientIds:[t]},(e=>(0,a.createElement)(p.Button,i({icon:Sd,className:"block-selection-button_drag-handle","aria-hidden":"true",label:O,tabIndex:"-1"},e))))),(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(p.Button,{ref:_,onClick:()=>b(!1),onKeyDown:function(e){const{keyCode:n}=e,r=n===Tc.UP,l=n===Tc.DOWN,i=n===Tc.LEFT,a=n===Tc.RIGHT,s=n===Tc.TAB,c=n===Tc.ESCAPE,u=n===Tc.ENTER,d=n===Tc.SPACE,p=e.shiftKey;if(n===Tc.BACKSPACE||n===Tc.DELETE)return k(t),void e.preventDefault();const m=I(),f=x(),g=T(f||m),h=N(f||m),v=s&&p||r,b=s&&!p||l,_=i,y=a;let E;if(v)E=g;else if(b)E=h;else if(_){var D;E=null!==(D=S(m))&&void 0!==D?D:m}else if(y){var O;E=null!==(O=B([m])[0])&&void 0!==O?O:m}const F=C();if(c&&P()&&(R(),e.preventDefault()),c&&F&&!e.defaultPrevented&&(L(null),e.preventDefault()),(u||d)&&F){const e=S(F),t=S(m),n=w(F);let o=w(m);n{!function(e){const[t]=Jr.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,tu.useShortcut)("core/block-editor/focus-toolbar",s),(0,a.useEffect)((()=>{l&&s()}),[n,l,s]),(0,a.useEffect)((()=>{let t=0;return i&&!l&&(t=window.requestAnimationFrame((()=>{const t=Kp(e.current),n=i||0;var o;t[n]&&(o=e.current).contains(o.ownerDocument.activeElement)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!r||!e.current)return;const n=Kp(e.current).findIndex((e=>0===e.tabIndex));r(n)}}),[i,l])}var Yp=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:o,__experimentalOnIndexChange:r,...l}=e;const s=(0,a.useRef)(),c=function(e){const[t,n]=(0,a.useState)(!0),o=(0,a.useCallback)((()=>{const t=!Jr.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||Vt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(s);return qp(s,n,c,o,r),c?(0,a.createElement)(p.Toolbar,i({label:l["aria-label"],ref:s},l),t):(0,a.createElement)(p.NavigableMenu,i({orientation:"horizontal",role:"toolbar",ref:s},l),t)};var Qp=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var Xp=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Zp=(0,a.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(O.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var Jp=(0,a.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(O.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function em(e,t,n,o,r,l,i){const a=n+1,s=e=>"up"===e?"horizontal"===i?(0,g.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===i?(0,g.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,o,r){const l=t+1;if(r<0&&n)return(0,g.__)("Blocks cannot be moved up as they are already at the top");if(r>0&&o)return(0,g.__)("Blocks cannot be moved down as they are already at the bottom");if(r<0&&!n)return(0,g.sprintf)((0,g._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,l);if(r>0&&!o)return(0,g.sprintf)((0,g._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,l)}(e,n,o,r,l);if(o&&r)return(0,g.sprintf)((0,g.__)("Block %s is the only block, and cannot be moved"),t);if(l>0&&!r){const e=s("down");if("down"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(l>0&&r){const e=s("down");if("down"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(l<0&&!o){const e=s("up");if("up"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,g.sprintf)((0,g.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(l<0&&o){const e=s("up");if("up"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,g.sprintf)((0,g.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const tm=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?Qp:Xp:Zp:"down"===e?"horizontal"===t?(0,g.isRTL)()?Xp:Qp:Jp:null,nm=(e,t)=>"up"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move right"):(0,g.__)("Move left"):(0,g.__)("Move up"):"down"===e?"horizontal"===t?(0,g.isRTL)()?(0,g.__)("Move left"):(0,g.__)("Move right"):(0,g.__)("Move down"):null,om=(0,a.forwardRef)(((e,t)=>{let{clientIds:n,direction:o,orientation:l,...s}=e;const f=(0,d.useInstanceId)(om),g=(0,u.castArray)(n).length,{blockType:h,isDisabled:v,rootClientId:b,isFirst:k,isLast:_,firstIndex:y,orientation:E="vertical"}=(0,m.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:i,getBlockOrder:a,getBlock:s,getBlockListSettings:c}=e(qn),d=(0,u.castArray)(n),p=(0,u.first)(d),m=i(p),f=t(p),g=t((0,u.last)(d)),h=a(m),v=s(p),b=0===f,k=g===h.length-1,{orientation:_}=c(m)||{};return{blockType:v?(0,r.getBlockType)(v.name):null,isDisabled:"up"===o?b:k,rootClientId:m,firstIndex:f,isFirst:b,isLast:k,orientation:l||_}}),[n,o]),{moveBlocksDown:C,moveBlocksUp:w}=(0,m.useDispatch)(qn),S="up"===o?w:C,B=`block-editor-block-mover-button__description-${f}`;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.Button,i({ref:t,className:c()("block-editor-block-mover-button",`is-${o}-button`),icon:tm(o,E),label:nm(o,E),"aria-describedby":B},s,{onClick:v?null:e=>{S(n,b),s.onClick&&s.onClick(e)},"aria-disabled":v})),(0,a.createElement)("span",{id:B,className:"block-editor-block-mover-button__description"},em(g,h&&h.title,y,k,_,"up"===o?-1:1,E)))})),rm=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(om,i({direction:"up",ref:t},e)))),lm=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(om,i({direction:"down",ref:t},e))));var im=(0,m.withSelect)(((e,t)=>{var n;let{clientIds:o}=t;const{getBlock:l,getBlockIndex:i,getBlockListSettings:a,canMoveBlocks:s,getBlockOrder:c,getBlockRootClientId:d}=e(qn),p=(0,u.castArray)(o),m=(0,u.first)(p),f=l(m),g=d((0,u.first)(p)),h=i(m),v=0===h,b=i((0,u.last)(p))===c(g).length-1;return{blockType:f?(0,r.getBlockType)(f.name):null,canMove:s(o,g),rootClientId:g,firstIndex:h,isFirst:v,isLast:b,orientation:null===(n=a(g))||void 0===n?void 0:n.orientation}}))((function(e){let{isFirst:t,isLast:n,clientIds:o,canMove:r,isHidden:l,rootClientId:s,orientation:u,hideDragHandle:d}=e;const[m,f]=(0,a.useState)(!1),h=()=>f(!0),v=()=>f(!1);if(!r||t&&n&&!s)return null;const b=(0,g.__)("Drag");return(0,a.createElement)("div",{className:c()("block-editor-block-mover",{"is-visible":m||!l,"is-horizontal":"horizontal"===u})},!d&&(0,a.createElement)($p,{clientIds:o,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,a.createElement)(p.Button,i({icon:Sd,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:b,tabIndex:"-1"},e)))),(0,a.createElement)(p.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},(0,a.createElement)(p.ToolbarItem,{onFocus:h,onBlur:v},(e=>(0,a.createElement)(rm,i({clientIds:o},e)))),(0,a.createElement)(p.ToolbarItem,{onFocus:h,onBlur:v},(e=>(0,a.createElement)(lm,i({clientIds:o},e))))))}));const{clearTimeout:am,setTimeout:sm}=window,cm=200;function um(e){let{ref:t,isFocused:n,debounceTimeout:o=cm,onChange:r=u.noop}=e;const[l,i]=(0,a.useState)(!1),s=(0,a.useRef)(),c=e=>{null!=t&&t.current&&i(e),r(e)},d=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},p=()=>{const e=s.current;e&&am&&am(e)};return(0,a.useEffect)((()=>()=>{c(!1),p()}),[]),{showMovers:l,debouncedShowMovers:e=>{e&&e.stopPropagation(),p(),l||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),p(),s.current=sm((()=>{d()&&c(!1)}),o)}}}function dm(e){let{ref:t,debounceTimeout:n=cm,onChange:o=u.noop}=e;const[r,l]=(0,a.useState)(!1),{showMovers:i,debouncedShowMovers:s,debouncedHideMovers:c}=um({ref:t,debounceTimeout:n,isFocused:r,onChange:o}),d=(0,a.useRef)(!1),p=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const e=t.current,n=()=>{p()&&(l(!0),s())},o=()=>{p()||(l(!1),c())};return e&&!d.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",o,!0),d.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",o))}}),[t,d,l,s,c]),{showMovers:i,gestures:{onMouseMove:s,onMouseLeave:c}}}function pm(){const{selectBlock:e,toggleBlockHighlight:t}=(0,m.useDispatch)(qn),{firstParentClientId:n,shouldHide:o,hasReducedUI:l}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:o,getSettings:l}=e(qn),{hasBlockSupport:i}=e(r.store),a=n(o()),s=a[a.length-1],c=t(s),u=(0,r.getBlockType)(c),d=l();return{firstParentClientId:s,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),s=Gp(n),c=(0,a.useRef)(),{gestures:u}=dm({ref:c,onChange(e){e&&l||t(n,e)}});return o||void 0===n?null:(0,a.createElement)("div",i({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,a.createElement)(p.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,g.sprintf)((0,g.__)("Select %s"),s.title),showTooltip:!0,icon:(0,a.createElement)(Wc,{icon:s.icon})}))}var mm=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function fm(e){let{blocks:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,g.__)("Preview")),(0,a.createElement)(_d,{viewportWidth:500,blocks:t})))))}var gm=e=>{let{className:t,possibleBlockTransformations:n,onSelect:o,blocks:l}=e;const[i,s]=(0,a.useState)();return(0,a.createElement)(p.MenuGroup,{label:(0,g.__)("Transform to"),className:t},i&&(0,a.createElement)(fm,{blocks:(0,r.switchToBlockType)(l,i)}),n.map((e=>{const{name:t,icon:n,title:l,isDisabled:i}=e;return(0,a.createElement)(p.MenuItem,{key:t,className:(0,r.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),o(t)},disabled:i,onMouseLeave:()=>s(null),onMouseEnter:()=>s(t)},(0,a.createElement)(Wc,{icon:n,showColors:!0}),l)})))};var hm=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),vm=window.wp.tokenList,bm=n.n(vm);function km(e,t,n){const o=new(bm())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function _m(e){return(0,u.find)(e,"isDefault")}function ym(e){let{clientId:t,onSwitch:n}=e;const{styles:o,block:l,blockType:i,className:s}=(0,m.useSelect)((e=>{const{getBlock:n}=e(qn),o=n(t);if(!o)return{};const l=(0,r.getBlockType)(o.name),{getBlockStyles:i}=e(r.store);return{block:o,blockType:l,styles:i(o.name),className:o.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,m.useDispatch)(qn),d=function(e){return e&&0!==e.length?_m(e)?e:[{name:"default",label:(0,g._x)("Default","block style"),isDefault:!0},...e]:[]}(o),p=function(e,t){for(const n of new(bm())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=(0,u.find)(e,{name:t});if(o)return o}return(0,u.find)(e,"isDefault")}(d,s),f=function(e,t){return(0,a.useMemo)((()=>{const n=null==t?void 0:t.example,o=null==t?void 0:t.name;return n&&o?(0,r.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,r.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(l,i);return{onSelect:e=>{const o=km(s,p,e);c(t,{className:o}),n()},stylesToRender:d,activeStyle:p,genericPreviewBlock:f,className:s}}function Em(e){let{clientId:t,onSwitch:n=u.noop}=e;const{onSelect:o,stylesToRender:r,activeStyle:l}=ym({clientId:t,onSwitch:n});return r&&0!==r.length?(0,a.createElement)(a.Fragment,null,r.map((e=>{const t=e.label||e.name;return(0,a.createElement)(p.MenuItem,{key:e.name,icon:l.name===e.name?hm:null,onClick:()=>o(e)},(0,a.createElement)(p.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function Cm(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:o}=t;return(0,a.createElement)(p.MenuGroup,{label:(0,g.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,a.createElement)(Em,{clientId:o,onSwitch:n}))}const wm=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:o,name:r,innerBlocks:l=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of l){const o=wm(e,t,n);if(o)return o}}},Sm=(e,t)=>{const n=((e,t)=>{const n=(0,r.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var Bm=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,r.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=wm(r,t.name,o);if(n){e=!0,o.add(n.clientId),Sm(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function Im(e){let{patterns:t,onSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(p.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,g.__)("Preview")),(0,a.createElement)(xm,{patterns:t,onSelect:n})))))}function xm(e){let{patterns:t,onSelect:n}=e;const o=(0,p.__unstableUseCompositeState)();return(0,a.createElement)(p.__unstableComposite,i({},o,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,g.__)("Patterns list")}),t.map((e=>(0,a.createElement)(Tm,{key:e.name,pattern:e,onSelect:n,composite:o}))))}function Tm(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-switcher__preview-patterns-container",l=(0,d.useInstanceId)(Tm,`${r}-list__item-description`);return(0,a.createElement)("div",{className:`${r}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?l:void 0},(0,a.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,a.createElement)(_d,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,a.createElement)("div",{className:`${r}-list__item-title`},t.title)),!!t.description&&(0,a.createElement)(p.VisuallyHidden,{id:l},t.description))}var Nm=function(e){let{blocks:t,patterns:n,onSelect:o}=e;const[r,l]=(0,a.useState)(!1),i=Bm(n,t);return i.length?(0,a.createElement)(p.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},r&&(0,a.createElement)(Im,{patterns:i,onSelect:o}),(0,a.createElement)(p.MenuItem,{onClick:e=>{e.preventDefault(),l(!r)},icon:Qp},(0,g.__)("Patterns"))):null};const Pm=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:o}=(0,m.useDispatch)(qn),l=Gp(n[0].clientId),{possibleBlockTransformations:i,canRemove:s,hasBlockStyles:c,icon:d,blockTitle:f,patterns:h}=(0,m.useSelect)((e=>{var o;const{getBlockRootClientId:i,getBlockTransformItems:a,__experimentalGetPatternTransformItems:s}=e(qn),{getBlockStyles:c,getBlockType:d}=e(r.store),{canRemoveBlocks:p}=e(qn),m=i((0,u.castArray)(t)[0]),[{name:f}]=n,g=1===n.length,h=g&&c(f);let v;if(g)v=null==l?void 0:l.icon;else{var b;v=1===(0,u.uniq)(n.map((e=>{let{name:t}=e;return t}))).length?null===(b=d(f))||void 0===b?void 0:b.icon:mm}return{possibleBlockTransformations:a(n,m),canRemove:p(t,m),hasBlockStyles:!(null==h||!h.length),icon:v,blockTitle:null===(o=d(f))||void 0===o?void 0:o.title,patterns:s(n,m)}}),[t,n,null==l?void 0:l.icon]),v=1===n.length&&(0,r.isReusableBlock)(n[0]),b=1===n.length&&(0,r.isTemplatePart)(n[0]),k=!!i.length&&s,_=!(null==h||!h.length)&&s;if(!c&&!k)return(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(p.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wc,{icon:d,showColors:!0}),(v||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,a.createElement)(Wp,{clientId:t,maximumLength:35})))}));const y=f,E=1===n.length?(0,g.sprintf)((0,g.__)("%s: Change block type or style"),f):(0,g.sprintf)((0,g._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),C=c||k||_;return(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(p.ToolbarItem,null,(e=>(0,a.createElement)(p.DropdownMenu,{className:"block-editor-block-switcher",label:y,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wc,{icon:d,className:"block-editor-block-switcher__toggle",showColors:!0}),(v||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,a.createElement)(Wp,{clientId:t,maximumLength:35}))),toggleProps:{describedBy:E,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:l}=e;return C&&(0,a.createElement)("div",{className:"block-editor-block-switcher__container"},_&&(0,a.createElement)(Nm,{blocks:n,patterns:h,onSelect:e=>{(e=>{o(t,e)})(e),l()}}),k&&(0,a.createElement)(gm,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:e=>{(e=>{o(t,(0,r.switchToBlockType)(n,e))})(e),l()}}),c&&(0,a.createElement)(Cm,{hoveredBlock:n[0],onSwitch:l}))})))))};var Mm=e=>{let{clientIds:t}=e;const n=(0,m.useSelect)((e=>e(qn).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,a.createElement)(Pm,{clientIds:t,blocks:n})};const{Fill:Rm,Slot:Lm}=(0,p.createSlotFill)("__unstableBlockToolbarLastItem");Rm.Slot=Lm;var Am=Rm;var Dm=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Om=window.wp.blob;function Fm(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;return 1!==(null===(n=t.match(e))||void 0===n?void 0:n.length)}return!1}function zm(){const{getBlockName:e}=(0,m.useSelect)(qn),{getBlockType:t}=(0,m.useSelect)(r.store),{createSuccessNotice:n}=(0,m.useDispatch)(zd.store);return(0,a.useCallback)(((o,r)=>{let l="";if(1===r.length){var i;const n=r[0],a=null===(i=t(e(n)))||void 0===i?void 0:i.title;l="copy"===o?(0,g.sprintf)((0,g.__)('Copied "%s" to clipboard.'),a):(0,g.sprintf)((0,g.__)('Moved "%s" to clipboard.'),a)}else l="copy"===o?(0,g.sprintf)((0,g._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,g.sprintf)((0,g._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(l,{type:"snackbar"})}),[])}function Vm(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:o,__unstableIsFullySelected:l,__unstableIsSelectionCollapsed:i,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:s}=(0,m.useSelect)(qn),{flashBlock:c,removeBlocks:u,replaceBlocks:p,__unstableDeleteSelection:f,__unstableExpandSelection:g}=(0,m.useDispatch)(qn),h=zm();return(0,d.useRefEffect)((d=>{function m(m){const v=t();if(0===v.length)return;if(!n()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Jr.documentHasUncollapsedSelection)(t):(0,Jr.documentHasSelection)(t))return}if(!d.contains(m.target.ownerDocument.activeElement))return;const b=m.defaultPrevented;m.preventDefault();const k=a(),_=i()||l(),y=!_&&!k;if("copy"===m.type||"cut"===m.type)if(1===v.length&&c(v[0]),y)g();else{let t;if(h(m.type,v),_)t=e(v);else{const[n,o]=s();t=[n,...e(v.slice(1,v.length-1)),o]}const n=(0,r.serialize)(t);m.clipboardData.setData("text/plain",n),m.clipboardData.setData("text/html",n)}if("cut"===m.type)_&&!y?u(v):f();else if("paste"===m.type){if(b)return;const{__experimentalCanUserUseUnfilteredHTML:e}=o(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",o="";try{n=t.getData("text/plain"),o=t.getData("text/html")}catch(e){try{o=t.getData("Text")}catch(e){return}}const r=(0,Jr.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return r.length&&!Fm(r,o)&&(o=r.map((e=>``)).join(""),n=""),{html:o,plainText:n}}(m),l=(0,r.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});p(v,l,l.length-1,-1)}}return d.ownerDocument.addEventListener("copy",m),d.ownerDocument.addEventListener("cut",m),d.ownerDocument.addEventListener("paste",m),()=>{d.ownerDocument.removeEventListener("copy",m),d.ownerDocument.removeEventListener("cut",m),d.ownerDocument.removeEventListener("paste",m)}}),[])}var Hm=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:Vm()},t)};function Gm(e){let{clientIds:t,children:n,__experimentalUpdateSelection:o}=e;const{canInsertBlockType:l,getBlockRootClientId:i,getBlocksByClientId:a,canMoveBlocks:s,canRemoveBlocks:c}=(0,m.useSelect)(qn),{getDefaultBlockName:d,getGroupingBlockName:p}=(0,m.useSelect)(r.store),f=a(t),g=i(t[0]),h=(0,u.every)(f,(e=>!!e&&(0,r.hasBlockSupport)(e.name,"multiple",!0)&&l(e.name,g))),v=l(d(),g),b=s(t,g),k=c(t,g),{removeBlocks:_,replaceBlocks:y,duplicateBlocks:E,insertAfterBlock:C,insertBeforeBlock:w,flashBlock:S,setBlockMovingClientId:B,setNavigationMode:I,selectBlock:x}=(0,m.useDispatch)(qn),T=zm();return n({canDuplicate:h,canInsertDefaultBlock:v,canMove:b,canRemove:k,rootClientId:g,blocks:f,onDuplicate:()=>E(t,o),onRemove:()=>_(t,o),onInsertBefore(){w((0,u.first)((0,u.castArray)(t)))},onInsertAfter(){C((0,u.last)((0,u.castArray)(t)))},onMoveTo(){I(!0),x(t[0]),B(t[0])},onGroup(){if(!f.length)return;const e=p(),n=(0,r.switchToBlockType)(f,e);n&&y(t,n)},onUngroup(){if(!f.length)return;const e=f[0].innerBlocks;e.length&&y(t,e)},onCopy(){const e=f.map((e=>{let{clientId:t}=e;return t}));1===f.length&&S(e[0]),T("copy",e)}})}var Um=(0,d.compose)([(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:o,getBlockMode:l,getSettings:i}=e(qn),a=o(n),s=i().codeEditingEnabled;return{mode:l(n),blockType:a?(0,r.getBlockType)(a.name):null,isCodeEditingEnabled:s}})),(0,m.withDispatch)(((e,t)=>{let{onToggle:n=u.noop,clientId:o}=t;return{onToggleMode(){e(qn).toggleBlockMode(o),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:o,small:l=!1,isCodeEditingEnabled:i=!0}=e;if(!(0,r.hasBlockSupport)(t,"html",!0)||!i)return null;const s="visual"===n?(0,g.__)("Edit as HTML"):(0,g.__)("Edit visually");return(0,a.createElement)(p.MenuItem,{onClick:o},!l&&s)}));var Wm=(0,d.compose)((0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const o=e(qn).getBlock(n);return{block:o,shouldRender:o&&"core/html"===o.name}})),(0,m.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(qn).replaceBlocks(n.clientId,(0,r.rawHandler)({HTML:(0,r.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:o}=e;if(!t)return null;const r=(0,g.__)("Convert to Blocks");return(0,a.createElement)(p.MenuItem,{onClick:n},!o&&r)}));const{Fill:$m,Slot:jm}=(0,p.createSlotFill)("__unstableBlockSettingsMenuFirstItem");$m.Slot=jm;var Km=$m;function qm(e){let{clientIds:t,isGroupable:n,isUngroupable:o,blocksSelection:l,groupingBlockName:i,onClose:s=(()=>{})}=e;const{replaceBlocks:c}=(0,m.useDispatch)(qn);return n||o?(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=(0,r.switchToBlockType)(l,i);e&&c(t,e)})(),s()}},(0,g._x)("Group","verb")),o&&(0,a.createElement)(p.MenuItem,{onClick:()=>{(()=>{const e=l[0].innerBlocks;e.length&&c(t,e)})(),s()}},(0,g._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Ym(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}=(0,m.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:o,canInsertBlockType:l,getSelectedBlockClientIds:i}=e(qn),{getGroupingBlockName:a}=e(r.store),s=i(),c=a(),u=l(c,null!=s&&s.length?n(s[0]):void 0),d=o(s),p=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&d.length,isUngroupable:p&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:o,groupingBlockName:l}}var Qm=(0,a.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(O.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Xm=(0,a.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(O.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));function Zm(e){return(0,m.useSelect)((t=>{const{canMoveBlock:n,canRemoveBlock:o,canLockBlockType:r,getBlockName:l,getBlockRootClientId:i}=t(qn),a=i(e),s=n(e,a),c=o(e,a);return{canMove:s,canRemove:c,canLock:r(l(e)),isLocked:!s||!c}}),[e])}function Jm(e){let{clientId:t,onClose:n}=e;const[o,r]=(0,a.useState)({move:!1,remove:!1}),{canMove:l,canRemove:i}=Zm(t),{updateBlockAttributes:s}=(0,m.useDispatch)(qn),c=Gp(t),u=(0,d.useInstanceId)(Jm,"block-editor-block-lock-modal__options-title");(0,a.useEffect)((()=>{r({move:!l,remove:!i})}),[l,i]);const f=Object.values(o).every(Boolean),h=Object.values(o).some(Boolean)&&!f;return(0,a.createElement)(p.Modal,{title:(0,g.sprintf)((0,g.__)("Lock %s"),c.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,g.__)("Close"),onRequestClose:n},(0,a.createElement)("form",{onSubmit:e=>{e.preventDefault(),s([t],{lock:o}),n()}},(0,a.createElement)("p",null,(0,g.__)("Choose specific attributes to restrict or lock all available options.")),(0,a.createElement)("div",{role:"group","aria-labelledby":u,className:"block-editor-block-lock-modal__options"},(0,a.createElement)(p.CheckboxControl,{className:"block-editor-block-lock-modal__options-title",label:(0,a.createElement)("span",{id:u},(0,g.__)("Lock all")),checked:f,indeterminate:h,onChange:e=>r({move:e,remove:e})}),(0,a.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(p.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Disable movement"),(0,a.createElement)(p.Icon,{icon:o.move?Xm:Qm})),checked:o.move,onChange:e=>r((t=>({...t,move:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(p.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Prevent removal"),(0,a.createElement)(p.Icon,{icon:o.remove?Xm:Qm})),checked:o.remove,onChange:e=>r((t=>({...t,remove:e})))})))),(0,a.createElement)(p.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(p.Button,{variant:"tertiary",onClick:n},(0,g.__)("Cancel"))),(0,a.createElement)(p.FlexItem,null,(0,a.createElement)(p.Button,{variant:"primary",type:"submit"},(0,g.__)("Apply"))))))}function ef(e){let{clientId:t}=e;const{canLock:n,isLocked:o}=Zm(t),[r,l]=(0,a.useReducer)((e=>!e),!1);if(!n)return null;const i=o?(0,g.__)("Unlock"):(0,g.__)("Lock");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.MenuItem,{icon:o?Qm:Xm,onClick:l},i),r&&(0,a.createElement)(Jm,{clientId:t,onClose:l}))}const{Fill:tf,Slot:nf}=(0,p.createSlotFill)("BlockSettingsMenuControls");function of(e){let{...t}=e;return(0,a.createElement)(p.__experimentalStyleProvider,{document:document},(0,a.createElement)(tf,t))}of.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:o,selectedClientIds:r,canRemove:l}=(0,m.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:o,canRemoveBlocks:r}=e(qn),l=null!==n?n:o();return{selectedBlocks:(0,u.map)((0,u.compact)(t(l)),(e=>e.name)),selectedClientIds:l,canRemove:r(l)}}),[n]),s=1===r.length,c=Ym(),{isGroupable:d,isUngroupable:f}=c,g=(d||f)&&l;return(0,a.createElement)(nf,{fillProps:{...t,selectedBlocks:o,selectedClientIds:r}},(e=>!(null!=e&&e.length)>0&&!g&&!s?null:(0,a.createElement)(p.MenuGroup,null,s&&(0,a.createElement)(ef,{clientId:r[0]}),e,g&&(0,a.createElement)(qm,i({},c,{onClose:null==t?void 0:t.onClose})))))};var rf=of;const lf={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function af(e){let{blocks:t,onCopy:n}=e;const o=(0,d.useCopyToClipboard)((()=>(0,r.serialize)(t)),n);return(0,a.createElement)(p.MenuItem,{ref:o},(0,g.__)("Copy"))}var sf=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:o,...l}=e;const s=(0,u.castArray)(t),c=s.length,d=s[0],{firstParentClientId:f,hasReducedUI:h,onlyBlock:v,parentBlockType:b,previousBlockClientId:k,nextBlockClientId:_,selectedBlockClientIds:y}=(0,m.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockParents:o,getPreviousBlockClientId:l,getNextBlockClientId:i,getSelectedBlockClientIds:a,getSettings:s}=e(qn),c=o(d),u=c[c.length-1],p=n(u);return{firstParentClientId:u,hasReducedUI:s().hasReducedUI,onlyBlock:1===t(),parentBlockType:(0,r.getBlockType)(p),previousBlockClientId:l(d),nextBlockClientId:i(d),selectedBlockClientIds:a()}}),[d]),E=(0,m.useSelect)((e=>{const{getShortcutRepresentation:t}=e(tu.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:C,toggleBlockHighlight:w}=(0,m.useDispatch)(qn),S=(0,a.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:u.noop,[n]),B=Up(d,25),I=(0,a.useCallback)(n?()=>{const e=k||_;e&&y.includes(d)&&!y.includes(e)&&n(e)}:u.noop,[n,k,_,y]),x=(0,g.sprintf)((0,g.__)("Remove %s"),B),T=1===c?x:(0,g.__)("Remove blocks"),N=(0,a.useRef)(),{gestures:P}=dm({ref:N,onChange(e){e&&h||w(f,e)}});return(0,a.createElement)(Gm,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:r,canMove:s,canRemove:m,onDuplicate:h,onInsertAfter:k,onInsertBefore:_,onRemove:y,onCopy:w,onMoveTo:B,blocks:x}=e;return(0,a.createElement)(p.DropdownMenu,i({icon:Dm,label:(0,g.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:lf,noIcons:!0},l),(e=>{let{onClose:l}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.MenuGroup,null,(0,a.createElement)(Km.Slot,{fillProps:{onClose:l}}),void 0!==f&&(0,a.createElement)(p.MenuItem,i({},P,{ref:N,icon:(0,a.createElement)(Wc,{icon:b.icon}),onClick:()=>C(f)}),(0,g.sprintf)((0,g.__)("Select parent block (%s)"),b.title)),1===c&&(0,a.createElement)(Wm,{clientId:d}),(0,a.createElement)(af,{blocks:x,onCopy:w}),n&&(0,a.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,h,S),shortcut:E.duplicate},(0,g.__)("Duplicate")),r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,_),shortcut:E.insertBefore},(0,g.__)("Insert before")),(0,a.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,k),shortcut:E.insertAfter},(0,g.__)("Insert after"))),s&&!v&&(0,a.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,B)},(0,g.__)("Move to")),1===c&&(0,a.createElement)(Um,{clientId:d,onToggle:l})),(0,a.createElement)(rf.Slot,{fillProps:{onClose:l},clientIds:t}),"function"==typeof o?o({onClose:l}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:l}))),m&&(0,a.createElement)(p.MenuGroup,null,(0,a.createElement)(p.MenuItem,{onClick:(0,u.flow)(l,y,I),shortcut:E.remove},T)))}))}))};var cf=function(e){let{clientIds:t,...n}=e;return(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(p.ToolbarItem,null,(e=>(0,a.createElement)(sf,i({clientIds:t,toggleProps:e},n)))))};function uf(e){let{clientId:t}=e;const n=Gp(t),{canMove:o,canRemove:r,canLock:l}=Zm(t),[i,s]=(0,a.useReducer)((e=>!e),!1);return l?o&&r?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,a.createElement)(p.ToolbarButton,{icon:Xm,label:(0,g.sprintf)((0,g.__)("Unlock %s"),n.title),onClick:s})),i&&(0,a.createElement)(Jm,{clientId:t,onClose:s})):null}var df=(0,a.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(O.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var pf=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var mf=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const ff={group:void 0,row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var gf=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=Ym(),{replaceBlocks:l}=(0,m.useDispatch)(qn),{canRemove:i}=(0,m.useSelect)((e=>{const{canRemoveBlocks:n}=e(qn);return{canRemove:n(t)}}),[t]),s=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"group";const i=(0,r.switchToBlockType)(e,n);i&&i.length>0&&(i[0].attributes.layout=ff[o],l(t,i))};return o&&i?(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(p.ToolbarButton,{icon:df,label:(0,g._x)("Group","verb"),onClick:s}),(0,a.createElement)(p.ToolbarButton,{icon:pf,label:(0,g._x)("Row","single horizontal line"),onClick:()=>s("row")}),(0,a.createElement)(p.ToolbarButton,{icon:mf,label:(0,g._x)("Stack","verb"),onClick:()=>s("stack")})):null};var hf=(0,a.createContext)("");var vf=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:o,blockType:l,hasFixedToolbar:s,hasReducedUI:u,isValid:f,isVisual:g}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:o,isBlockValid:l,getBlockRootClientId:i,getSettings:a}=e(qn),s=o(),c=s[0],u=i(c),d=a();return{blockClientIds:s,blockClientId:c,blockType:c&&(0,r.getBlockType)(t(c)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:s.every((e=>l(e))),isVisual:s.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:h}=(0,m.useDispatch)(qn),v=(0,a.useRef)(),{showMovers:b,gestures:k}=dm({ref:v,onChange(e){e&&u||h(o,e)}}),_=(0,d.useViewportMatch)("medium","<")||s;if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const y=_||b;if(0===n.length)return null;const E=f&&g,C=n.length>1,w=c()("block-editor-block-toolbar",y&&"is-showing-movers");return(0,a.createElement)("div",{className:w},!C&&!_&&(0,a.createElement)(pm,{clientIds:n}),(0,a.createElement)("div",i({ref:v},k),(E||C)&&(0,a.createElement)(p.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,a.createElement)(Mm,{clientIds:n}),!C&&(0,a.createElement)(uf,{clientId:n[0]}),(0,a.createElement)(im,{clientIds:n,hideDragHandle:t||u}))),E&&C&&(0,a.createElement)(gf,null),E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ro.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(ro.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(ro.Slot,{className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(ro.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(ro.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(hf.Provider,{value:null==l?void 0:l.name},(0,a.createElement)(Am.Slot,null))),(0,a.createElement)(cf,{clientIds:n}))};var bf=function(e){let{focusOnMount:t,isFixed:n,...o}=e;const{blockType:l,hasParents:s,showParentSelector:u}=(0,m.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:o}=e(qn),{getBlockType:l}=e(r.store),i=o(),a=i[0],s=n(a),c=l(t(s[s.length-1]));return{blockType:a&&l(t(a)),hasParents:s.length,showParentSelector:(0,r.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&i.length<=1}}),[]);if(l&&!(0,r.hasBlockSupport)(l,"__experimentalToolbar",!0))return null;const d=c()("block-editor-block-contextual-toolbar",{"has-parent":s&&u,"is-fixed":n});return(0,a.createElement)(Yp,i({focusOnMount:t,className:d,"aria-label":(0,g.__)("Block tools")},o),(0,a.createElement)(vf,{hideDragHandle:n}))};function kf(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:o,isTyping:r,isCaretWithinFormattedText:l,getSettings:i,getLastMultiSelectedBlockClientId:a}=e(qn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:r(),isCaretWithinFormattedText:l(),hasMultiSelection:o(),hasFixedToolbar:i().hasFixedToolbar,lastClientId:a()}}function _f(e){let{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:r,capturingClientId:l,__unstablePopoverSlot:i,__unstableContentRef:s}=e;const{isNavigationMode:u,isMultiSelecting:f,isTyping:g,isCaretWithinFormattedText:h,hasMultiSelection:v,hasFixedToolbar:b,lastClientId:k}=(0,m.useSelect)(kf,[]),_=(0,m.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:o,getBlockOrder:r}=e(qn);if(!n())return!1;const l=o();return r(l.rootClientId)[l.index]===t}),[t]),y=(0,d.useViewportMatch)("medium"),[E,C]=(0,a.useState)(!1),[w,S]=(0,a.useState)(!1),{stopTyping:B}=(0,m.useDispatch)(qn),I=!g&&!u&&r&&o,x=u,T=!u&&!b&&y&&!I&&!f&&(!g||h),N=!(u||T||b||r);(0,tu.useShortcut)("core/block-editor/focus-toolbar",(()=>{C(!0),B(!0)}),{isDisabled:!N}),(0,a.useEffect)((()=>{T||C(!1)}),[T]);const P=(0,a.useRef)(),M=Co(t),R=Co(k),L=Co(l),A=Ap(s);if(!(x||T||E||I))return null;let D=M;if(!D)return null;l&&(D=L);let O=D;if(v){if(!R)return null;O={top:D,bottom:R}}const F=I?"top left right":"top right left",{ownerDocument:z}=D,V=I?void 0:z.defaultView.frameElement||(0,Jr.getScrollContainer)(D)||z.body;return(0,a.createElement)(p.Popover,{ref:A,noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:O,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":_}),__unstableStickyBoundaryElement:V,__unstableSlotName:i||null,__unstableBoundaryParent:!0,__unstableObserveElement:D,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==s?void 0:s.current},(T||E)&&(0,a.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":w})},(0,a.createElement)(Tp,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||E)&&(0,a.createElement)(bf,{focusOnMount:E,__experimentalInitialIndex:P.current,__experimentalOnIndexChange:e=>{P.current=e},key:t}),x&&(0,a.createElement)(jp,{clientId:t,rootClientId:n,blockElement:D}),I&&(0,a.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,a.createElement)(Tp,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function yf(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:o,getBlock:l,getBlockParents:i,__experimentalGetBlockListSettingsForBlocks:a}=e(qn),s=t()||n();if(!s)return;const{name:c,attributes:d={},isValid:p}=l(s)||{},m=i(s),f=a(m),g=(0,u.find)(m,(e=>{var t;return null===(t=f[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:o(s),name:c,isValid:p,isEmptyDefaultBlock:c&&(0,r.isUnmodifiedDefaultBlock)({name:c,attributes:d}),capturingClientId:g}}function Ef(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const o=(0,m.useSelect)(yf,[]);if(!o)return null;const{clientId:r,rootClientId:l,name:i,isValid:s,isEmptyDefaultBlock:c,capturingClientId:u}=o;return i?(0,a.createElement)(_f,{clientId:r,rootClientId:l,isValid:s,isEmptyDefaultBlock:c,capturingClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function Cf(e){let{children:t}=e;const n=(0,a.useContext)(Dp),o=(0,a.useContext)(p.Disabled.Context);return n||o?t:(Vt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,a.createElement)(Fp,{__unstablePopoverSlot:"block-toolbar"},(0,a.createElement)(Ef,{__unstablePopoverSlot:"block-toolbar"}),t))}var wf=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Zn();return(0,a.createElement)(e,i({},t,{clientId:n}))}),"withClientId");var Sf=wf((e=>{let{clientId:t,showSeparator:n,isFloating:o,onAddBlock:r,isToggle:l}=e;return(0,a.createElement)(Rp,{className:c()({"block-list-appender__toggle":l}),rootClientId:t,showSeparator:n,isFloating:o,onAddBlock:r})}));var Bf=(0,d.compose)([wf,(0,m.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:o}=e(qn),r=o(n);return{lastBlockClientId:(0,u.last)(r)}}))])((e=>{let{clientId:t}=e;return(0,a.createElement)(Np,{rootClientId:t})})),If=window.wp.isShallowEqual,xf=n.n(If);const Tf=new WeakMap;function Nf(e,t,n,o,l,i,a){return s=>{const{srcRootClientId:c,srcClientIds:u,type:d,blocks:p}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===d){a();const n=p.map((e=>(0,r.cloneBlock)(e)));i(n,t,e,!0,null)}if("block"===d){const r=n(u[0]);if(c===e&&r===t)return;if(u.includes(e)||o(u).some((t=>t===e)))return;const i=c===e,a=u.length;l(u,c,e,i&&re(qn).getSettings().mediaUpload),[]),{canInsertBlockType:o,getBlockIndex:l,getClientIdsOfDescendants:i}=(0,m.useSelect)(qn),{insertBlocks:a,moveBlocksToPosition:s,updateBlockAttributes:c,clearSelectedBlock:u}=(0,m.useDispatch)(qn),d=Nf(e,t,l,i,s,a,u),p=function(e,t,n,o,l,i){return a=>{if(!n)return;const s=(0,r.findTransform)((0,r.getBlockTransforms)("from"),(t=>"files"===t.type&&l(t.blockName,e)&&t.isMatch(a)));if(s){const n=s.transform(a,o);i(n,t,e)}}}(e,t,n,c,o,a),f=function(e,t,n){return o=>{const l=(0,r.pasteHandler)({HTML:o,mode:"BLOCKS"});l.length&&n(l,t,e)}}(e,t,a);return e=>{const t=(0,Jr.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?f(n):t.length?p(t):d(e)}}function Mf(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:l}=e,i=o?r:l,a=o?l:r,s=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=i>=s&&i<=c?i:i2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return r.forEach((r=>{const l=Mf(e,t,r);(void 0===n||l{const a=e.getBoundingClientRect(),[s,c]=Rf(t,a,o);if(void 0===i||s0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(null),o=(0,m.useSelect)((t=>{const{getTemplateLock:n}=t(qn);return"all"===n(e)}),[e]),{getBlockListSettings:r}=(0,m.useSelect)(qn),{showInsertionPoint:l,hideInsertionPoint:i}=(0,m.useDispatch)(qn),s=Pf(e,t),c=(0,d.useThrottle)((0,a.useCallback)(((t,o)=>{var i;const a=Lf(Array.from(o.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(i=r(e))||void 0===i?void 0:i.orientation);n(void 0===a?0:a),null!==a&&l(e,a)}),[]),200);return(0,d.__experimentalUseDropZone)({isDisabled:o,onDrop:s,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),i(),n(null)},onDragEnd(){c.cancel(),i(),n(null)}})}function Df(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:o,__experimentalDirectInsert:l,template:i,templateLock:s,wrapperRef:c,templateInsertUpdatesSelection:d,__experimentalCaptureToolbars:p,__experimentalAppenderTagName:f,renderAppender:g,orientation:h,placeholder:v,__experimentalLayout:b}=e;!function(e,t,n,o,r,l,i,s){const{updateBlockListSettings:c}=(0,m.useDispatch)(qn),{blockListSettings:u,parentLock:d}=(0,m.useSelect)((t=>{const n=t(qn).getBlockRootClientId(e);return{blockListSettings:t(qn).getBlockListSettings(e),parentLock:t(qn).getTemplateLock(n)}}),[e]),p=(0,a.useMemo)((()=>t),t);(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:p,templateLock:void 0===r?d:r};if(void 0!==l&&(t.__experimentalCaptureToolbars=l),void 0!==i)t.orientation=i;else{const e=Ir(null==s?void 0:s.type);t.orientation=e.getOrientation(s)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==o&&(t.__experimentalDirectInsert=o),xf()(u,t)||c(e,t)}),[e,u,p,n,o,r,d,l,i,c,s])}(t,n,o,l,s,p,h,b),function(e,t,n,o){const{getSelectedBlocksInitialCaretPosition:l}=(0,m.useSelect)(qn),{replaceInnerBlocks:i}=(0,m.useDispatch)(qn),s=(0,m.useSelect)((t=>t(qn).getBlocks(e)),[e]),c=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{if((0===s.length||"all"===n)&&!(0,u.isEqual)(t,c.current)){c.current=t;const n=(0,r.synchronizeBlocksWithTemplate)(s,t);(0,u.isEqual)(n,s)||i(e,n,0===s.length&&o&&0!==n.length,l())}}),[s,t,n,e])}(t,i,s,d);const k=(0,m.useSelect)((e=>{const n=e(qn).getBlock(t),o=(0,r.getBlockType)(n.name);if(o&&o.providesContext)return function(e,t){Tf.has(t)||Tf.set(t,new WeakMap);const n=Tf.get(t);if(!n.has(e)){const o=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,o)}return n.get(e)}(n.attributes,o)}),[t]);return(0,a.createElement)(tl,{value:k},(0,a.createElement)(jf,{rootClientId:t,renderAppender:g,__experimentalAppenderTagName:f,__experimentalLayout:b,wrapperRef:c,placeholder:v}))}function Of(e){return jc(e),(0,a.createElement)(Df,e)}const Ff=(0,a.forwardRef)(((e,t)=>{const n=zf({ref:t},e);return(0,a.createElement)("div",{className:"block-editor-inner-blocks"},(0,a.createElement)("div",n))}));function zf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=Zn(),o=(0,d.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:l,hasOverlay:s}=(0,m.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:l,hasSelectedInnerBlock:i,isNavigationMode:a}=e(qn),s=t(n),c=a()||o;return{__experimentalCaptureToolbars:e(r.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!l(n)&&!i(n,!0)&&c}}),[n,o]),u=(0,d.useMergeRefs)([e.ref,Af({rootClientId:n})]),p={__experimentalCaptureToolbars:l,...t},f=p.value&&p.onChange?Of:Df;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":s}),children:n?(0,a.createElement)(f,i({},p,{clientId:n})):(0,a.createElement)(jf,t)}}zf.save=r.__unstableGetInnerBlocksProps,Ff.DefaultBlockAppender=Bf,Ff.ButtonBlockAppender=Sf,Ff.Content=()=>zf.save().children;var Vf=Ff;const Hf=(0,a.createContext)(),Gf=(0,a.createContext)();function Uf(e){let{className:t,...n}=e;const[o,r]=(0,a.useState)(),l=(0,d.useViewportMatch)("medium"),{isOutlineMode:i,isFocusMode:s,isNavigationMode:u}=(0,m.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(qn),{outlineMode:o,focusMode:r}=t();return{isOutlineMode:o,isFocusMode:r,isNavigationMode:n()}}),[]),p=zf({ref:(0,d.useMergeRefs)([Yc(),zp(),r]),className:c()("is-root-container",t,{"is-outline-mode":i,"is-focus-mode":s&&l,"is-navigate-mode":u})},n);return(0,a.createElement)(Hf.Provider,{value:o},(0,a.createElement)("div",p))}function Wf(e){return function(){const e=(0,m.useSelect)((e=>e(qn).getSettings().__experimentalBlockPatterns),[]);(0,a.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const o=()=>{n++,n>=e.length||((0,m.select)(qn).__experimentalGetParsedPattern(e[n].name),t=Vp(o))};return t=Vp(o),()=>Hp(t)}),[e])}(),(0,a.createElement)(Cf,null,(0,a.createElement)(Xn,{value:Yn},(0,a.createElement)(Uf,e)))}function $f(e){let{placeholder:t,rootClientId:n,renderAppender:o,__experimentalAppenderTagName:r,__experimentalLayout:l=xr}=e;const[i,s]=(0,a.useState)(new Set),c=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{s((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[s]),{order:u,selectedBlocks:d}=(0,m.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:o}=e(qn);return{order:t(n),selectedBlocks:o()}}),[n]);return(0,a.createElement)(Nr,{value:l},(0,a.createElement)(Gf.Provider,{value:c},u.map((e=>(0,a.createElement)(m.AsyncModeProvider,{key:e,value:!i.has(e)&&!d.includes(e)},(0,a.createElement)(Fc,{rootClientId:n,clientId:e}))))),u.length<1&&t,(0,a.createElement)(Lp,{tagName:r,rootClientId:n,renderAppender:o}))}function jf(e){return(0,a.createElement)(m.AsyncModeProvider,{value:!1},(0,a.createElement)($f,e))}Wf.__unstableElementContext=Hf;const Kf=["colors","disableCustomColors","gradients","disableCustomGradients"];function qf(e){let{colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,className:s,label:d,onColorChange:m,onGradientChange:f,colorValue:h,gradientValue:v,clearable:b,showTitle:k=!0,enableAlpha:_}=e;const y=m&&(!(0,u.isEmpty)(t)||!o),E=f&&(!(0,u.isEmpty)(n)||!r),[C,w]=(0,a.useState)(v?"gradient":!!y&&"color");return y||E?(0,a.createElement)(p.BaseControl,{className:c()("block-editor-color-gradient-control",s)},(0,a.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,a.createElement)(p.__experimentalVStack,{spacing:1},k&&(0,a.createElement)("legend",null,(0,a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,a.createElement)(p.BaseControl.VisualLabel,null,d))),y&&E&&(0,a.createElement)(p.__experimentalToggleGroupControl,{value:C,onChange:w,label:(0,g.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,a.createElement)(p.__experimentalToggleGroupControlOption,{value:"color",label:(0,g.__)("Solid")}),(0,a.createElement)(p.__experimentalToggleGroupControlOption,{value:"gradient",label:(0,g.__)("Gradient")})),("color"===C||!E)&&(0,a.createElement)(p.ColorPalette,{value:h,onChange:E?e=>{m(e),f()}:m,colors:t,disableCustomColors:o,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b,enableAlpha:_}),("gradient"===C||!y)&&(0,a.createElement)(p.GradientPicker,{value:v,onChange:y?e=>{f(e),m()}:f,gradients:n,disableCustomGradients:r,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:i,clearable:b})))):null}function Yf(e){const t={};return t.colors=Io("color.palette"),t.gradients=Io("color.gradients"),t.disableCustomColors=!Io("color.custom"),t.disableCustomGradients=!Io("color.customGradient"),(0,a.createElement)(qf,i({},t,e))}var Qf=function(e){return(0,u.every)(Kf,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(qf,e):(0,a.createElement)(Yf,e)};function Xf(e){let t,{colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:s,__experimentalIsRenderedInSidebar:u,enableAlpha:d,settings:m}=e;return u&&(t="bottom left"),(0,a.createElement)(p.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,className:"block-editor-panel-color-gradient-settings__item-group"},m.map(((e,m)=>e&&(0,a.createElement)(p.Dropdown,{key:m,position:t,className:"block-editor-panel-color-gradient-settings__dropdown",contentClassName:"block-editor-panel-color-gradient-settings__dropdown-content",renderToggle:t=>{var n;let{isOpen:o,onToggle:r}=t;return(0,a.createElement)(p.__experimentalItem,{onClick:r,className:c()("block-editor-panel-color-gradient-settings__item",{"is-open":o})},(0,a.createElement)(p.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(p.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:null!==(n=e.gradientValue)&&void 0!==n?n:e.colorValue}),(0,a.createElement)(p.FlexItem,null,e.label)))},renderContent:()=>(0,a.createElement)(Qf,i({showTitle:!1,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:s,__experimentalIsRenderedInSidebar:u,enableAlpha:d},e))}))))}function Zf(){return{disableCustomColors:!Io("color.custom"),disableCustomGradients:!Io("color.customGradient")}}function Jf(){const e=Zf(),t=Io("color.palette.custom"),n=Io("color.palette.theme"),o=Io("color.palette.default"),r=Io("color.defaultPalette");e.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,g._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,g._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,g._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[o,n,t]);const l=Io("color.gradients.custom"),i=Io("color.gradients.theme"),s=Io("color.gradients.default"),c=Io("color.defaultGradients");return e.gradients=(0,a.useMemo)((()=>{const e=[];return i&&i.length&&e.push({name:(0,g._x)("Theme","Indicates this palette comes from the theme."),gradients:i}),c&&s&&s.length&&e.push({name:(0,g._x)("Default","Indicates this palette comes from WordPress."),gradients:s}),l&&l.length&&e.push({name:(0,g._x)("Custom","Indicates this palette is created by the user."),gradients:l}),e}),[l,i,s]),e}Gu([Uu,ju]);const eg=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},tg=(e,t)=>(0,u.find)(e,{color:t});function ng(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const og=[];function rg(e){const{attributes:{borderColor:t,style:n},setAttributes:o}=e,r=Jf(),l=r.colors.reduce(((e,t)=>e.concat(t.colors)),[]),{color:s}=(null==n?void 0:n.border)||{},[c,u]=(0,a.useState)((()=>{var e;return null===(e=eg(l,t,s))||void 0===e?void 0:e.color}));(0,a.useEffect)((()=>{var e;u(null===(e=eg(l,t,s))||void 0===e?void 0:e.color)}),[t,s,l]);const d=[{label:(0,g.__)("Color"),onColorChange:e=>{u(e);const t=tg(l,e),r={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},i=null!=t&&t.slug?t.slug:void 0;o({style:No(r),borderColor:i})},colorValue:c,clearable:!1}];return(0,a.createElement)(Xf,i({settings:d,disableCustomColors:!0,disableCustomGradients:!0,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,enableAlpha:!0},r))}function lg(e,t,n){var o;if(!Ng(t,"color")||Ro(t,xg,"color"))return e;const{borderColor:r,style:l}=n,i=ng("border-color",r),a=c()(e.className,{"has-border-color":r||(null==l||null===(o=l.border)||void 0===o?void 0:o.color),[i]:!!i});return e.className=a||void 0,e}const ig=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const{name:r,attributes:l}=t,{borderColor:s}=l,c=Io("color.palette")||og;if(!Ng(r,"color")||Ro(r,xg,"color"))return(0,a.createElement)(e,t);const u={borderColor:s?null===(n=eg(c,s))||void 0===n?void 0:n.color:void 0};let d=t.wrapperProps;return d={...t.wrapperProps,style:{...u,...null===(o=t.wrapperProps)||void 0===o?void 0:o.style}},(0,a.createElement)(e,i({},t,{wrapperProps:d}))}));function ag(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function sg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,p.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",l=ag(o),i=0===r||r?`${r}${l}`:void 0;return i}function cg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=sg(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function ug(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function dg(e){let{onChange:t,values:n,...o}=e;const r=sg(n),l=ug(n)&&cg(n),s=l?(0,g.__)("Mixed"):null;return(0,a.createElement)(p.__experimentalUnitControl,i({},o,{"aria-label":(0,g.__)("Border radius"),disableUnits:l,isOnly:!0,value:r,onChange:t,placeholder:s}))}(0,l.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Ng(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",lg),(0,l.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!Ng(e,"color")||Ro(e,xg,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),lg(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",ig);const pg={topLeft:(0,g.__)("Top left"),topRight:(0,g.__)("Top right"),bottomLeft:(0,g.__)("Bottom left"),bottomRight:(0,g.__)("Bottom right")};function mg(e){let{onChange:t,values:n,...o}=e;const r="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,a.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(pg).map((e=>{let[n,l]=e;return(0,a.createElement)(p.__experimentalUnitControl,i({},o,{key:n,"aria-label":l,value:r[n],onChange:(s=n,e=>{t&&t({...r,[s]:e||void 0})})}));var s})))}var fg=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));var gg=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function hg(e){let{isLinked:t,...n}=e;const o=t?(0,g.__)("Unlink Radii"):(0,g.__)("Link Radii");return(0,a.createElement)(p.Tooltip,{text:o},(0,a.createElement)(p.Button,i({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?fg:gg,iconSize:16,"aria-label":o})))}const vg={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},bg={px:100,em:20,rem:20};function kg(e){let{onChange:t,values:n}=e;const[o,r]=(0,a.useState)(!ug(n)||!cg(n)),l=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["px","em","rem"]}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,p.__experimentalParseQuantityAndUnitFromRawValue)(e);return t||"px"}const t=Object.values(e).map((e=>{const[,t]=(0,p.__experimentalParseQuantityAndUnitFromRawValue)(e);return t}));return ag(t)||"px"}(n),s=l&&l.find((e=>e.value===i)),c=(null==s?void 0:s.step)||1,[u]=(0,p.__experimentalParseQuantityAndUnitFromRawValue)(sg(n));return(0,a.createElement)("fieldset",{className:"components-border-radius-control"},(0,a.createElement)("legend",null,(0,g.__)("Radius")),(0,a.createElement)("div",{className:"components-border-radius-control__wrapper"},o?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(dg,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,units:l}),(0,a.createElement)(p.RangeControl,{className:"components-border-radius-control__range-control",value:null!=u?u:"",min:0,max:bg[i],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${i}`:void 0)},step:c})):(0,a.createElement)(mg,{min:0,onChange:t,values:n||vg,units:l}),(0,a.createElement)(hg,{onClick:()=>r(!o),isLinked:o})))}function _g(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(kg,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=No(t)),o({style:t})}})}var yg=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,a.createElement)(O.Path,{d:"M5 11.25h14v1.5H5z"}));var Eg=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,a.createElement)(O.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}));var Cg=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,a.createElement)(O.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const wg=[{label:(0,g.__)("Solid"),icon:yg,value:"solid"},{label:(0,g.__)("Dashed"),icon:Eg,value:"dashed"},{label:(0,g.__)("Dotted"),icon:Cg,value:"dotted"}];function Sg(e){let{onChange:t,value:n}=e;return(0,a.createElement)("fieldset",{className:"components-border-style-control"},(0,a.createElement)("legend",null,(0,g.__)("Style")),(0,a.createElement)("div",{className:"components-border-style-control__buttons"},wg.map((e=>(0,a.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const Bg=e=>{var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(Sg,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};o({style:No(t)})}})};const Ig=e=>{const{attributes:{borderColor:t,style:n},setAttributes:o}=e,{width:r,color:l,style:i}=(null==n?void 0:n.border)||{},[s,c]=(0,a.useState)(),[u,d]=(0,a.useState)(),[m,f]=(0,a.useState)(),h=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["px","em","rem"]});return(0,a.createElement)(p.__experimentalUnitControl,{value:r,label:(0,g.__)("Width"),min:0,onChange:e=>{let a={...n,border:{...null==n?void 0:n.border,width:e}},p=t;const g=0===parseFloat(e),h=0===parseFloat(r);g&&!h&&(d(t),f(l),c(i),p=void 0,a.border.color=void 0,a.border.style="none"),!g&&h&&("none"===i&&(a.border.style=s),void 0===t&&(p=u,a.border.color=m)),void 0!==e&&""!==e||(a=No(a)),o({borderColor:p,style:a})},units:h})};const xg="__experimentalBorder";function Tg(e){const{clientId:t}=e,n=Io("border.color")&&Ng(e.name,"color"),o=Io("border.radius")&&Ng(e.name,"radius"),l=Io("border.style")&&Ng(e.name,"style"),i=Io("border.width")&&Ng(e.name,"width");if([!n,!o,!l,!i].every(Boolean))return null;const s=(0,r.getBlockSupport)(e.name,[xg,"__experimentalDefaultControls"]),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var o;return{...n,...t,style:{...n.style,border:{...null===(o=n.style)||void 0===o?void 0:o.border,[e]:void 0}}}}};return(0,a.createElement)(zo,{__experimentalGroup:"border"},i&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.width)}(e),label:(0,g.__)("Width"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Pg(o,"width")})}(e),isShownByDefault:null==s?void 0:s.width,resetAllFilter:c("width"),panelId:t},(0,a.createElement)(Ig,e)),l&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.style)}(e),label:(0,g.__)("Style"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Pg(o,"style")})}(e),isShownByDefault:null==s?void 0:s.style,resetAllFilter:c("style"),panelId:t},(0,a.createElement)(Bg,e)),n&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{attributes:{borderColor:n,style:o}}=e;return!!n||!(null==o||null===(t=o.border)||void 0===t||!t.color)}(e),label:(0,g.__)("Color"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({borderColor:void 0,style:Pg(o,"color")})}(e),isShownByDefault:null==s?void 0:s.color,resetAllFilter:c("color",{borderColor:void 0}),panelId:t},(0,a.createElement)(rg,e)),o&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const o=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof o?Object.entries(o).some(Boolean):!!o}(e),label:(0,g.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:Pg(o,"radius")})}(e),isShownByDefault:null==s?void 0:s.radius,resetAllFilter:c("radius"),panelId:t},(0,a.createElement)(_g,e)))}function Ng(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==a.Platform.OS)return!1;const n=(0,r.getBlockSupport)(e,xg);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function Pg(e,t){return No({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function Mg(e){if(e)return`has-${e}-gradient-background`}function Rg(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function Lg(e,t){return(0,u.find)(e,["gradient",t])}function Ag(e,t){const n=Lg(e,t);return n&&n.slug}function Dg(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Zn(),o=Io("color.gradients.custom"),r=Io("color.gradients.theme"),l=Io("color.gradients.default"),i=(0,a.useMemo)((()=>[...o||[],...r||[],...l||[]]),[o,r,l]),{gradient:s,customGradient:c}=(0,m.useSelect)((o=>{const{getBlockAttributes:r}=o(qn),l=r(n)||{};return{customGradient:l[t],gradient:l[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,m.useDispatch)(qn),d=(0,a.useCallback)((o=>{const r=Ag(i,o);u(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[i,n,u]),p=Mg(s);let f;return f=s?Rg(i,s):c,{gradientClass:p,gradientValue:f,setGradient:d}}Gu([Uu,ju]);var Og=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:o,fallbackLinkColor:r,fontSize:l,isLargeText:i,textColor:s,linkColor:c,enableAlphaChecker:u=!1}=e;const d=t||n;if(!d)return null;const m=s||o,f=c||r;if(!m&&!f)return null;const h=[{color:m,description:(0,g.__)("text color")},{color:f,description:(0,g.__)("link color")}],v=Vu(d),b=v.alpha()<1,k=v.brightness(),_={level:"AA",size:i||!1!==i&&l>=24?"large":"small"};let y="",E="";for(const e of h){if(!e.color)continue;const t=Vu(e.color),n=t.isReadable(v,_),o=t.alpha()<1;if(!n){if(b||o)continue;y=k{let{isOpen:t,onToggle:o}=e;return(0,a.createElement)(p.Button,{onClick:o,"aria-expanded":t,className:c()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":t})},(0,a.createElement)(p.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(p.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:s}),(0,a.createElement)(p.FlexItem,null,n.label)))},renderContent:()=>(0,a.createElement)(Qf,i({showTitle:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,enableAlpha:!0},l))}))}function zg(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Vg(e){let{enableAlpha:t=!1,settings:n,clientId:o,enableContrastChecking:r=!0}=e;const[l,i]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,d]=(0,a.useState)(),p=Eo(o);return(0,a.useEffect)((()=>{var e;if(!r)return;if(!p.current)return;c(zg(p.current).color);const t=null===(e=p.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&d(zg(t).color);let n=p.current,o=zg(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,o=zg(n).backgroundColor;i(o)})),(0,a.createElement)(zo,{__experimentalGroup:"color"},n.map(((e,n)=>(0,a.createElement)(Fg,{key:n,settings:e,panelId:o,enableAlpha:t}))),r&&(0,a.createElement)(Og,{backgroundColor:l,textColor:s,enableAlphaChecker:t,linkColor:u}))}const Hg="color",Gg=e=>{const t=(0,r.getBlockSupport)(e,Hg);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Ug=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,r.getBlockSupport)(e,Hg);return(0,u.isObject)(t)&&!!t.link},Wg=e=>{const t=(0,r.getBlockSupport)(e,Hg);return(0,u.isObject)(t)&&!!t.gradients},$g=e=>{const t=(0,r.getBlockSupport)(e,Hg);return t&&!1!==t.background},jg=e=>{const t=(0,r.getBlockSupport)(e,Hg);return t&&!1!==t.text},Kg=e=>t=>{var n,o,r,l,i,a,s,c,u,d;return"background"===e?!!(t.attributes.backgroundColor||null!==(r=t.attributes.style)&&void 0!==r&&null!==(l=r.color)&&void 0!==l&&l.background||t.attributes.gradient||null!==(i=t.attributes.style)&&void 0!==i&&null!==(a=i.color)&&void 0!==a&&a.gradient):"link"===e?!(null===(s=t.attributes.style)||void 0===s||null===(c=s.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(d=u.color)||void 0===d||!d.text):!!t.attributes[`${e}Color`]||!(null===(n=t.attributes.style)||void 0===n||null===(o=n.color)||void 0===o||!o[e])},qg=(e,t)=>No(Po(t,e,void 0)),Yg=e=>({textColor:void 0,style:qg(["color","text"],e.style)}),Qg=e=>({style:qg(["elements","link","color","text"],e.style)}),Xg=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function Zg(e,t,n){var o,r,l,i,a,s;if(!Gg(t)||Ro(t,Hg))return e;const u=Wg(t),{backgroundColor:d,textColor:p,gradient:m,style:f}=n,g=e=>!Ro(t,Hg,e),h=g("text")?ng("color",p):void 0,v=g("gradients")?Mg(m):void 0,b=g("background")?ng("background-color",d):void 0,k=g("background")||g("gradients"),_=d||(null==f||null===(o=f.color)||void 0===o?void 0:o.background)||u&&(m||(null==f||null===(r=f.color)||void 0===r?void 0:r.gradient)),y=c()(e.className,h,v,{[b]:!(u&&null!=f&&null!==(l=f.color)&&void 0!==l&&l.gradient||!b),"has-text-color":g("text")&&(p||(null==f||null===(i=f.color)||void 0===i?void 0:i.text)),"has-background":k&&_,"has-link-color":g("link")&&(null==f||null===(a=f.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=y||void 0,e}const Jg=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?eg(e,n[1]).color:t};function eh(e){var t,n,o,l,i,s,c,u,d;const{name:p,attributes:m}=e,f=Io("color.palette.custom"),h=Io("color.palette.theme"),v=Io("color.palette.default"),b=(0,a.useMemo)((()=>[...f||[],...h||[],...v||[]]),[f,h,v]),k=Io("color.gradients.custom"),_=Io("color.gradients.theme"),y=Io("color.gradients.default"),E=(0,a.useMemo)((()=>[...k||[],..._||[],...y||[]]),[k,_,y]),C=Io("color.custom"),w=Io("color.customGradient"),S=Io("color.background"),B=Io("color.link"),I=Io("color.text"),x=C||!h||(null==h?void 0:h.length)>0,T=w||!_||(null==_?void 0:_.length)>0,N=(0,a.useRef)(m);if((0,a.useEffect)((()=>{N.current=m}),[m]),!Gg(p))return null;const P=Ug(p)&&B&&x,M=jg(p)&&I&&x,R=$g(p)&&S&&x,L=Wg(p)&&T;if(!(P||M||R||L))return null;const{style:A,textColor:D,backgroundColor:O,gradient:F}=m;let z;if(L&&F)z=Rg(E,F);else if(L){var V;z=null==A||null===(V=A.color)||void 0===V?void 0:V.gradient}const H=t=>n=>{var o,r;const l=tg(b,n),i=t+"Color",a={...N.current.style,color:{...null===(o=N.current)||void 0===o||null===(r=o.style)||void 0===r?void 0:r.color,[t]:null!=l&&l.slug?void 0:n}},s=null!=l&&l.slug?l.slug:void 0,c={style:No(a),[i]:s};e.setAttributes(c),N.current={...N.current,...c}},G=!("web"!==a.Platform.OS||F||null!=A&&null!==(t=A.color)&&void 0!==t&&t.gradient),U=(0,r.getBlockSupport)(e.name,[Hg,"__experimentalDefaultControls"]);return(0,a.createElement)(Vg,{enableContrastChecking:G,clientId:e.clientId,enableAlpha:!0,settings:[...M?[{label:(0,g.__)("Text"),onColorChange:H("text"),colorValue:eg(b,D,null==A||null===(n=A.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==U?void 0:U.text,hasValue:()=>Kg("text")(e),onDeselect:()=>(e=>{let{attributes:t,setAttributes:n}=e;n({textColor:void 0,style:qg(["color","text"],t.style)})})(e),resetAllFilter:Yg}]:[],...R||L?[{label:(0,g.__)("Background"),onColorChange:R?H("background"):void 0,colorValue:eg(b,O,null==A||null===(o=A.color)||void 0===o?void 0:o.background).color,gradientValue:z,onGradientChange:L?t=>{const n=Ag(E,t);let o;if(n){var r,l,i;const e={...null===(r=N.current)||void 0===r?void 0:r.style,color:{...null===(l=N.current)||void 0===l||null===(i=l.style)||void 0===i?void 0:i.color,gradient:void 0}};o={style:No(e),gradient:n}}else{var a,s,c;const e={...null===(a=N.current)||void 0===a?void 0:a.style,color:{...null===(s=N.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};o={style:No(e),gradient:void 0}}e.setAttributes(o),N.current={...N.current,...o}}:void 0,isShownByDefault:null==U?void 0:U.background,hasValue:()=>Kg("background")(e),onDeselect:()=>(e=>{let{attributes:t,setAttributes:n}=e;n(Xg(t))})(e),resetAllFilter:Xg}]:[],...P?[{label:(0,g.__)("Link"),onColorChange:t=>{const n=tg(b,t),o=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,r=No(Po(A,["elements","link","color","text"],o));e.setAttributes({style:r})},colorValue:Jg(b,null==A||null===(l=A.elements)||void 0===l||null===(i=l.link)||void 0===i||null===(s=i.color)||void 0===s?void 0:s.text),clearable:!(null==A||null===(c=A.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(d=u.color)||void 0===d||!d.text),isShownByDefault:null==U?void 0:U.link,hasValue:()=>Kg("link")(e),onDeselect:()=>(e=>{let{attributes:t,setAttributes:n}=e;n({style:qg(["elements","link","color","text"],t.style)})})(e),resetAllFilter:Qg}]:[]]})}const th=(0,d.createHigherOrderComponent)((e=>t=>{var n;const{name:o,attributes:r}=t,{backgroundColor:l,textColor:s}=r,c=Io("color.palette.custom")||[],u=Io("color.palette.theme")||[],d=Io("color.palette.default")||[],p=(0,a.useMemo)((()=>[...c||[],...u||[],...d||[]]),[c,u,d]);if(!Gg(o)||Ro(o,Hg))return(0,a.createElement)(e,t);const m={};var f,g;s&&!Ro(o,Hg,"text")&&(m.color=null===(f=eg(p,s))||void 0===f?void 0:f.color);l&&!Ro(o,Hg,"background")&&(m.backgroundColor=null===(g=eg(p,l))||void 0===g?void 0:g.color);let h=t.wrapperProps;return h={...t.wrapperProps,style:{...m,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,a.createElement)(e,i({},t,{wrapperProps:h}))})),nh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,l.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Gg(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Wg(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Zg),(0,l.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Gg(e)||Ro(e,Hg))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Zg(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",th),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return Mo({linkColor:Ug(r),textColor:jg(r),backgroundColor:$g(r),gradient:Wg(r)},nh,e,t,n,o)}));const oh=[{name:(0,g._x)("Regular","font style"),value:"normal"},{name:(0,g._x)("Italic","font style"),value:"italic"}],rh=[{name:(0,g._x)("Thin","font weight"),value:"100"},{name:(0,g._x)("Extra Light","font weight"),value:"200"},{name:(0,g._x)("Light","font weight"),value:"300"},{name:(0,g._x)("Regular","font weight"),value:"400"},{name:(0,g._x)("Medium","font weight"),value:"500"},{name:(0,g._x)("Semi Bold","font weight"),value:"600"},{name:(0,g._x)("Bold","font weight"),value:"700"},{name:(0,g._x)("Extra Bold","font weight"),value:"800"},{name:(0,g._x)("Black","font weight"),value:"900"}],lh=(e,t)=>e?t?(0,g.__)("Appearance"):(0,g.__)("Font style"):(0,g.__)("Font weight");function ih(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:o=!0,value:{fontStyle:r,fontWeight:l}}=e,i=n||o,s=lh(n,o),c={key:"default",name:(0,g.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,a.useMemo)((()=>n&&o?(()=>{const e=[c];return oh.forEach((t=>{let{name:n,value:o}=t;rh.forEach((t=>{let{name:r,value:l}=t;const i="normal"===o?r:(0,g.sprintf)((0,g.__)("%1$s %2$s"),r,n);e.push({key:`${o}-${l}`,name:i,style:{fontStyle:o,fontWeight:l}})}))})),e})():n?(()=>{const e=[c];return oh.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:o,fontWeight:void 0}})})),e})():(()=>{const e=[c];return rh.forEach((t=>{let{name:n,value:o}=t;e.push({key:o,name:n,style:{fontStyle:void 0,fontWeight:o}})})),e})()),[e.options]),d=u.find((e=>e.style.fontStyle===r&&e.style.fontWeight===l))||u[0];return i&&(0,a.createElement)(p.CustomSelectControl,{className:"components-font-appearance-control",label:s,describedBy:d?n?o?(0,g.sprintf)((0,g.__)("Currently selected font appearance: %s"),d.name):(0,g.sprintf)((0,g.__)("Currently selected font style: %s"),d.name):(0,g.sprintf)((0,g.__)("Currently selected font weight: %s"),d.name):(0,g.__)("No selected font appearance"),options:u,value:d,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}const ah=1.5,sh=.1;var ch=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:o=!1,__unstableInputWidth:r="60px"}=e;const l=function(e){return void 0!==e&&""!==e}(t),i=l?t:"";o||Vt()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const s=o?void 0:{marginBottom:24};return(0,a.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,a.createElement)(p.__experimentalNumberControl,{__unstableInputWidth:r,__unstableStateReducer:(e,t)=>{var n;const o=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),r=((e,t)=>{if(l)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return ah;default:return e}})(e.value,o);return{...e,value:r}},onChange:n,label:(0,g.__)("Line height"),placeholder:ah,step:sh,value:i,min:0}))};const uh="typography.lineHeight";function dh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(ch,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};o({style:No(t)})}})}function ph(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Io("typography.lineHeight");return!(0,r.hasBlockSupport)(e,uh)||t}const mh="typography.__experimentalFontStyle",fh="typography.__experimentalFontWeight";function gh(e){var t,n;const{attributes:{style:o},setAttributes:r}=e,l=!hh(e),i=!vh(e),s=null==o||null===(t=o.typography)||void 0===t?void 0:t.fontStyle,c=null==o||null===(n=o.typography)||void 0===n?void 0:n.fontWeight;return(0,a.createElement)(ih,{onChange:e=>{r({style:No({...o,typography:{...null==o?void 0:o.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:l,hasFontWeights:i,value:{fontStyle:s,fontWeight:c}})}function hh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,mh),n=Io("typography.fontStyle");return!t||!n}function vh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.hasBlockSupport)(e,fh),n=Io("typography.fontWeight");return!t||!n}function bh(e){const t=hh(e),n=vh(e);return t&&n}function kh(e){let{value:t="",onChange:n,fontFamilies:o,...r}=e;const l=Io("typography.fontFamilies");if(o||(o=l),(0,u.isEmpty)(o))return null;const s=[{value:"",label:(0,g.__)("Default")},...o.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,a.createElement)(p.SelectControl,i({label:(0,g.__)("Font family"),options:s,value:t,onChange:n,labelPosition:"top"},r))}const _h="typography.__experimentalFontFamily";function yh(e,t,n){if(!(0,r.hasBlockSupport)(t,_h))return e;if(Ro(t,Jh,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const o=new(bm())(e.className);o.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const l=o.value;return e.className=l||void 0,e}function Eh(e){var t;let{setAttributes:n,attributes:{fontFamily:o}}=e;const r=Io("typography.fontFamilies"),l=null===(t=(0,u.find)(r,(e=>{let{slug:t}=e;return o===t})))||void 0===t?void 0:t.fontFamily;return(0,a.createElement)(kh,{className:"block-editor-hooks-font-family-control",fontFamilies:r,value:l,onChange:function(e){const t=(0,u.find)(r,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function Ch(e){let{name:t}=e;const n=Io("typography.fontFamilies");return!n||0===n.length||!(0,r.hasBlockSupport)(t,_h)}(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,_h)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",yh),(0,l.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,_h))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),yh(o,e,n)},e}));const wh=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function Sh(e,t){const n=(0,u.find)(e,{size:t});return n||{size:t}}function Bh(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var Ih=function(e){const t=Io("typography.fontSizes"),n=!Io("typography.customFontSize");return(0,a.createElement)(p.FontSizePicker,i({},e,{fontSizes:t,disableCustomFontSizes:n}))};const xh="typography.fontSize";function Th(e,t,n){if(!(0,r.hasBlockSupport)(t,xh))return e;if(Ro(t,Jh,"fontSize"))return e;const o=new(bm())(e.className);o.add(Bh(n.fontSize));const l=o.value;return e.className=l||void 0,e}function Nh(e){var t,n;const{attributes:{fontSize:o,style:r},setAttributes:l}=e,i=Io("typography.fontSizes"),s=wh(i,o,null==r||null===(t=r.typography)||void 0===t?void 0:t.fontSize),c=(null==s?void 0:s.size)||(null==r||null===(n=r.typography)||void 0===n?void 0:n.fontSize)||o;return(0,a.createElement)(Ih,{onChange:e=>{const t=Sh(i,e).slug;l({style:No({...r,typography:{...null==r?void 0:r.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function Ph(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Io("typography.fontSizes"),n=!(null==t||!t.length);return!(0,r.hasBlockSupport)(e,xh)||!n}const Mh=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=Io("typography.fontSizes"),{name:i,attributes:{fontSize:s,style:c},wrapperProps:u}=t;if(!(0,r.hasBlockSupport)(i,xh)||Ro(i,Jh,"fontSize")||!s||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,a.createElement)(e,t);const d=wh(l,s,null==c||null===(o=c.typography)||void 0===o?void 0:o.fontSize).size,p={...t,wrapperProps:{...u,style:{fontSize:d,...null==u?void 0:u.style}}};return(0,a.createElement)(e,p)}),"withFontSizeInlineStyles"),Rh={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,l.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,r.hasBlockSupport)(e,xh)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",Th),(0,l.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,r.hasBlockSupport)(e,xh))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),Th(o,e,n)},e})),(0,l.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Mh),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const l=e.name;return Mo({fontSize:(0,r.hasBlockSupport)(l,xh)},Rh,e,t,n,o)}));var Lh=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var Ah=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const Dh=[{name:(0,g.__)("Underline"),value:"underline",icon:Lh},{name:(0,g.__)("Strikethrough"),value:"line-through",icon:Ah}];function Oh(e){let{value:t,onChange:n}=e;return(0,a.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,a.createElement)("legend",null,(0,g.__)("Decoration")),(0,a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Dh.map((e=>(0,a.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const Fh="typography.__experimentalTextDecoration";function zh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(Oh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){o({style:No({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function Vh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,Fh),n=Io("typography.textDecoration");return t||!n}var Hh=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var Gh=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var Uh=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const Wh=[{name:(0,g.__)("Uppercase"),value:"uppercase",icon:Hh},{name:(0,g.__)("Lowercase"),value:"lowercase",icon:Gh},{name:(0,g.__)("Capitalize"),value:"capitalize",icon:Uh}];function $h(e){let{value:t,onChange:n}=e;return(0,a.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,a.createElement)("legend",null,(0,g.__)("Letter case")),(0,a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Wh.map((e=>(0,a.createElement)(p.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const jh="typography.__experimentalTextTransform";function Kh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)($h,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){o({style:No({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function qh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,jh),n=Io("typography.textTransform");return t||!n}function Yh(e){let{value:t,onChange:n,__unstableInputWidth:o="60px"}=e;const r=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,a.createElement)(p.__experimentalUnitControl,{label:(0,g.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:r,onChange:n})}const Qh="typography.__experimentalLetterSpacing";function Xh(e){var t;const{attributes:{style:n},setAttributes:o}=e;return(0,a.createElement)(Yh,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){o({style:No({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function Zh(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,r.hasBlockSupport)(e,Qh),n=Io("typography.letterSpacing");return t||!n}const Jh="typography",ev=[uh,xh,mh,fh,_h,Fh,jh,Qh];function tv(e){const{clientId:t}=e,n=Ch(e),o=Ph(e),l=bh(e),i=ph(e),s=Vh(e),c=qh(e),u=Zh(e),d=!hh(e),m=!vh(e),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[bh(e),Ph(e),ph(e),Ch(e),Vh(e),qh(e),Zh(e)];return t.filter(Boolean).length===t.length}(e),h=nv(e.name);if(f||!h)return null;const v=(0,r.getBlockSupport)(e.name,[Jh,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,a.createElement)(zo,{__experimentalGroup:"typography"},!n&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,g.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==v?void 0:v.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,a.createElement)(Eh,e)),!o&&(0,a.createElement)(p.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:o}=e.attributes;return!!n||!(null==o||null===(t=o.typography)||void 0===t||!t.fontSize)}(e),label:(0,g.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({fontSize:void 0,style:No({...o,typography:{...null==o?void 0:o.typography,fontSize:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,a.createElement)(Nh,e)),!l&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:o}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!o}(e),label:lh(d,m),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,typography:{...null==o?void 0:o.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,a.createElement)(gh,e)),!i&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,g.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,typography:{...null==o?void 0:o.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==v?void 0:v.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,a.createElement)(dh,e)),!s&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,g.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,typography:{...null==o?void 0:o.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,a.createElement)(zh,e)),!c&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,g.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,typography:{...null==o?void 0:o.typography,textTransform:void 0}})})}(e),isShownByDefault:null==v?void 0:v.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,a.createElement)(Kh,e)),!u&&(0,a.createElement)(p.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,g.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:No({...o,typography:{...null==o?void 0:o.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==v?void 0:v.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,a.createElement)(Xh,e)))}const nv=e=>ev.some((t=>(0,r.hasBlockSupport)(e,t)));const ov=[...ev,xg,Hg,jo],rv=e=>ov.some((t=>(0,r.hasBlockSupport)(e,t))),lv="var:";function iv(e){if((0,u.startsWith)(e,lv)){return`var(--wp--${e.slice(lv.length).split("|").join("--")})`}return e}function av(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["spacing.blockGap"],n={};Object.keys(r.__EXPERIMENTAL_STYLE_PROPERTY).forEach((o=>{const l=r.__EXPERIMENTAL_STYLE_PROPERTY[o].value,i=r.__EXPERIMENTAL_STYLE_PROPERTY[o].properties;if((0,u.has)(e,l)&&"elements"!==(0,u.first)(l)){const a=(0,u.get)(e,l);r.__EXPERIMENTAL_STYLE_PROPERTY[o].useEngine||(i&&!(0,u.isString)(a)?Object.entries(i).forEach((e=>{const[t,o]=e,r=(0,u.get)(a,[o]);r&&(n[t]=iv(r))})):t.includes(l.join("."))||(n[o]=iv((0,u.get)(e,l))))}}));const o=Zr(e,{selector:"self"});return o.forEach((e=>{if("self"!==e.selector)throw"This style can't be added as inline style";n[e.key]=e.value})),n}const sv={[`${xg}.__experimentalSkipSerialization`]:["border"],"color.__experimentalSkipSerialization":[Hg],[`${Jh}.__experimentalSkipSerialization`]:[Jh],[`${jo}.__experimentalSkipSerialization`]:["spacing"]},cv={...sv,[`${jo}`]:["spacing.blockGap"]},uv={gradients:"gradient"};function dv(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:cv;if(!rv(t))return e;let{style:l}=n;return(0,u.forEach)(o,((e,n)=>{const o=(0,r.getBlockSupport)(t,n);!0===o&&(l=(0,u.omit)(l,e)),Array.isArray(o)&&o.forEach((t=>{const n=uv[t]||t;l=(0,u.omit)(l,[[...e,n]])}))})),e.style={...av(l),...e.style},e}const pv=(0,d.createHigherOrderComponent)((e=>t=>{const n=Jn();return(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(eh,t),(0,a.createElement)(tv,t),(0,a.createElement)(Tg,t),(0,a.createElement)(Yo,t)),(0,a.createElement)(e,t))}),"withToolbarControls"),mv=(0,d.createHigherOrderComponent)((e=>t=>{var n,o;const l=`wp-elements-${(0,d.useInstanceId)(e)}`,s=Ro(t.name,Hg,"link")?(0,u.omit)(null===(n=t.attributes.style)||void 0===n?void 0:n.elements,["link"]):null===(o=t.attributes.style)||void 0===o?void 0:o.elements,p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.map)(t,((t,n)=>{const o=av(t);return(0,u.isEmpty)(o)?"":[`.editor-styles-wrapper .${e} ${r.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(o,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(l,s),m=(0,a.useContext)(Wf.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,s&&m&&(0,a.createPortal)((0,a.createElement)("style",{dangerouslySetInnerHTML:{__html:p}}),m),(0,a.createElement)(e,i({},t,{className:s?c()(t.className,l):t.className})))}));(0,l.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return rv(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",dv),(0,l.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!rv(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let o={};return t&&(o=t(n)),dv(o,e,n,sv)},e})),(0,l.addFilter)("editor.BlockEdit","core/style/with-block-controls",pv),(0,l.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",mv);var fv=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}=e;return(0,a.createElement)(p.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,g.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(p.ToolbarButton,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==Tc.DOWN||(e.preventDefault(),n())},label:(0,g.__)("Apply duotone filter"),icon:(0,a.createElement)(p.DuotoneSwatch,{values:l})})},renderContent:()=>(0,a.createElement)(p.MenuGroup,{label:(0,g.__)("Duotone")},(0,a.createElement)("div",{className:"block-editor-duotone-control__description"},(0,g.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(p.DuotonePicker,{colorPalette:t,duotonePalette:n,disableCustomColors:o,disableCustomDuotone:r,value:l,onChange:i}))})};const gv=[];function hv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Vu(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function vv(e){let{selector:t,id:n}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,a.createElement)("style",null,o)}function bv(e){let{id:t,values:n}=e;return(0,a.createElement)(p.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,a.createElement)("defs",null,(0,a.createElement)("filter",{id:t},(0,a.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,a.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,a.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),(0,a.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),(0,a.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}),(0,a.createElement)("feFuncA",{type:"table",tableValues:n.a.join(" ")})),(0,a.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function kv(e){let{selector:t,id:n,values:o}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(bv,{id:n,values:o}),(0,a.createElement)(vv,{id:n,selector:t}))}function _v(e){let{presetSetting:t,defaultSetting:n}=e;const o=!Io(n),r=Io(`${t}.custom`)||gv,l=Io(`${t}.theme`)||gv,i=Io(`${t}.default`)||gv;return(0,a.useMemo)((()=>[...r,...l,...o?gv:i]),[o,r,l,i])}function yv(e){var t;let{attributes:n,setAttributes:o}=e;const r=null==n?void 0:n.style,l=null==r||null===(t=r.color)||void 0===t?void 0:t.duotone,i=_v({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),s=_v({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),c=!Io("color.custom"),u=!Io("color.customDuotone")||0===(null==s?void 0:s.length)&&c;return 0===(null==i?void 0:i.length)&&u?null:(0,a.createElement)(ro,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(fv,{duotonePalette:i,colorPalette:s,disableCustomDuotone:u,disableCustomColors:c,value:l,onChange:e=>{const t={...r,color:{...null==r?void 0:r.color,duotone:e}};o({style:t})}}))}Gu([Uu]);const Ev=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,r.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(yv,t))}),"withDuotoneControls");const Cv=(0,d.createHigherOrderComponent)((e=>t=>{var n,o,l;const s=(0,r.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(l=o.color)||void 0===l?void 0:l.duotone;if(!s||!u)return(0,a.createElement)(e,t);const p=`wp-duotone-${(0,d.useInstanceId)(e)}`,m=function(e,t){const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}(`.editor-styles-wrapper .${p}`,s),f=c()(null==t?void 0:t.className,p),g=(0,a.useContext)(Wf.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,g&&(0,a.createPortal)((0,a.createElement)(kv,{selector:m,id:p,values:hv(u)}),g),(0,a.createElement)(e,i({},t,{className:f})))}),"withDuotoneStyles");function wv(e){let{preset:t}=e;return(0,a.createElement)(bv,{id:`wp-duotone-${t.slug}`,values:hv(t.colors)})}(0,l.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,r.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,l.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",Ev),(0,l.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",Cv);const Sv="__experimentalLayout";function Bv(e){let{setAttributes:t,attributes:n,name:o}=e;const{layout:l}=n,i=Io("layout"),s=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn);return t().supportsLayout}),[]),c=(0,r.getBlockSupport)(o,Sv,{}),{allowSwitching:u,allowEditing:d=!0,allowInheriting:f=!0,default:h}=c;if(!d)return null;const v=!(!f||!i||null!=l&&l.type&&"default"!==(null==l?void 0:l.type)&&(null==l||!l.inherit)),b=l||h||{},{inherit:k=!1,type:_="default"}=b;if("default"===_&&!s)return null;const y=Ir(_),E=e=>t({layout:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(zo,null,(0,a.createElement)(p.PanelBody,{title:(0,g.__)("Layout")},v&&(0,a.createElement)(p.ToggleControl,{label:(0,g.__)("Inherit default layout"),checked:!!k,onChange:()=>t({layout:{inherit:!k}})}),!k&&u&&(0,a.createElement)(Iv,{type:_,onChange:e=>t({layout:{type:e}})}),!k&&y&&(0,a.createElement)(y.inspectorControls,{layout:b,onChange:E,layoutBlockSupport:c}))),!k&&y&&(0,a.createElement)(y.toolBarControls,{layout:b,onChange:E,layoutBlockSupport:c}))}function Iv(e){let{type:t,onChange:n}=e;return(0,a.createElement)(p.ButtonGroup,null,Br.map((e=>{let{name:o,label:r}=e;return(0,a.createElement)(p.Button,{key:o,isPressed:t===o,onClick:()=>n(o)},r)})))}const xv=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,r.hasBlockSupport)(n,Sv)&&(0,a.createElement)(Bv,i({key:"layout"},t)),(0,a.createElement)(e,i({key:"edit"},t))]}),"withInspectorControls"),Tv=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,l=(0,r.hasBlockSupport)(n,Sv),s=(0,d.useInstanceId)(e),p=Io("layout")||{},m=(0,a.useContext)(Wf.__unstableElementContext),{layout:f}=o,{default:g}=(0,r.getBlockSupport)(n,Sv)||{},h=null!=f&&f.inherit?p:f||g||{},v=l?function(e){var t,n,o;const r=[];return e.layout?(null!=e&&null!==(t=e.layout)&&void 0!==t&&t.orientation&&r.push(`is-${(0,u.kebabCase)(e.layout.orientation)}`),null!=e&&null!==(n=e.layout)&&void 0!==n&&n.justifyContent&&r.push(`is-content-justification-${(0,u.kebabCase)(e.layout.justifyContent)}`),null!=e&&null!==(o=e.layout)&&void 0!==o&&o.flexWrap&&"nowrap"===e.layout.flexWrap&&r.push("is-nowrap"),r):r}(o):null,b=c()(null==t?void 0:t.className,{[`wp-container-${s}`]:l},v);return(0,a.createElement)(a.Fragment,null,l&&m&&(0,a.createPortal)((0,a.createElement)(Mr,{blockName:n,selector:`.wp-container-${s}`,layout:h,style:null==o?void 0:o.style}),m),(0,a.createElement)(e,i({},t,{className:b})))}));(0,l.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,r.hasBlockSupport)(e,Sv)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",Tv),(0,l.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",xv);const Nv=[];function Pv(e){var t;let{borderColor:n,style:o}=e;const r=(null==o?void 0:o.border)||{},l=ng("border-color",n);return{className:c()({[l]:!!l,"has-border-color":n||(null==o||null===(t=o.border)||void 0===t?void 0:t.color)})||void 0,style:av({border:r})}}function Mv(e){const t=Io("color.palette")||Nv,n=Pv(e);if(e.borderColor){const o=eg(t,e.borderColor);n.style.borderColor=o.color}return n}function Rv(e){var t,n,o,r,l,i;const{backgroundColor:a,textColor:s,gradient:u,style:d}=e,p=ng("background-color",a),m=ng("color",s),f=Mg(u),g=f||(null==d||null===(t=d.color)||void 0===t?void 0:t.gradient);return{className:c()(m,f,{[p]:!g&&!!p,"has-text-color":s||(null==d||null===(n=d.color)||void 0===n?void 0:n.text),"has-background":a||(null==d||null===(o=d.color)||void 0===o?void 0:o.background)||u||(null==d||null===(r=d.color)||void 0===r?void 0:r.gradient),"has-link-color":null==d||null===(l=d.elements)||void 0===l||null===(i=l.link)||void 0===i?void 0:i.color})||void 0,style:av({color:(null==d?void 0:d.color)||{}})}}const Lv={};function Av(e){const{backgroundColor:t,textColor:n,gradient:o}=e,r=Io("color.palette.custom")||[],l=Io("color.palette.theme")||[],i=Io("color.palette.default")||[],s=Io("color.gradients")||Lv,c=(0,a.useMemo)((()=>[...r||[],...l||[],...i||[]]),[r,l,i]),u=(0,a.useMemo)((()=>[...(null==s?void 0:s.custom)||[],...(null==s?void 0:s.theme)||[],...(null==s?void 0:s.default)||[]]),[s]),d=Rv(e);if(t){const e=eg(c,t);d.style.backgroundColor=e.color}if(o&&(d.style.background=Rg(u,o)),n){const e=eg(c,n);d.style.color=e.color}return d}function Dv(e){const{style:t}=e;return{style:av({spacing:(null==t?void 0:t.spacing)||{}})}}function Ov(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}const Fv=e=>(0,d.createHigherOrderComponent)((t=>n=>(0,a.createElement)(t,i({},n,{colors:e}))),"withCustomColorPalette"),zv=()=>(0,d.createHigherOrderComponent)((e=>t=>{const n=Io("color.palette.custom"),o=Io("color.palette.theme"),r=Io("color.palette.default"),l=(0,a.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,a.createElement)(e,i({},t,{colors:l}))}),"withEditorColorPalette");function Vv(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,...(0,u.isString)(t)?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,d.compose)([t,e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Vu(t);return(0,u.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const o=(0,u.upperFirst)(n),r=`custom${o}`;return e[`set${o}`]=this.createSetColor(n,r),e}),{})}createSetColor(e,t){return n=>{const o=tg(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:o,colors:r}=e;return(0,u.reduce)(n,((e,n,l)=>{const i=eg(r,o[l],o[`custom${(0,u.upperFirst)(l)}`]),a=t[l];return(null==a?void 0:a.color)===i.color&&a?e[l]=a:e[l]={...i,class:ng(n,i.slug)},e}),{})}render(){return(0,a.createElement)(e,i({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Hv(e){return function(){const t=Fv(e);for(var n=arguments.length,o=new Array(n),r=0;r(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,d.createHigherOrderComponent)((0,d.compose)([(0,d.createHigherOrderComponent)((e=>t=>{const n=Io("typography.fontSizes")||Uv;return(0,a.createElement)(e,i({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(o,((e,t,n)=>(e[`set${(0,u.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const o=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:r}=e;const l=(e,o)=>!t[o]||(n[o]?n[o]!==t[o].slug:t[o].size!==n[e]);if(!(0,u.some)(o,l))return null;const i=(0,u.reduce)((0,u.pickBy)(o,l),((e,t,o)=>{const l=n[o],i=wh(r,l,n[t]);return e[o]={...i,class:Bh(l)},e}),{});return{...t,...i}}render(){return(0,a.createElement)(e,i({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var $v=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var jv=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var Kv=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const qv=[{icon:$v,title:(0,g.__)("Align text left"),align:"left"},{icon:jv,title:(0,g.__)("Align text center"),align:"center"},{icon:Kv,title:(0,g.__)("Align text right"),align:"right"}],Yv={position:"bottom right",isAlternate:!0};var Qv=function(e){let{value:t,onChange:n,alignmentControls:o=qv,label:r=(0,g.__)("Align"),describedBy:l=(0,g.__)("Change text alignment"),isCollapsed:s=!0,isToolbar:c}=e;function d(e){return()=>n(t===e?void 0:e)}const m=(0,u.find)(o,(e=>e.align===t)),f=c?p.ToolbarGroup:p.ToolbarDropdownMenu,h=c?{isCollapsed:s}:{};return(0,a.createElement)(f,i({icon:m?m.icon:(0,g.isRTL)()?Kv:$v,label:r,toggleProps:{describedBy:l},popoverProps:Yv,controls:o.map((e=>{const{align:n}=e,o=t===n;return{...e,isActive:o,role:s?"menuitemradio":void 0,onClick:d(n)}}))},h))};const Xv=e=>(0,a.createElement)(Qv,i({},e,{isToolbar:!1})),Zv=e=>(0,a.createElement)(Qv,i({},e,{isToolbar:!0}));var Jv={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:o}=e(qn),r=t();return{selectedBlockName:r?n(r):null,rootClientId:o().rootClientId}}),[]),[o,r,l]=Ld(t,u.noop),i=(0,a.useMemo)((()=>(e.trim()?rp(o,r,l,e):(0,u.orderBy)(o,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,o,r,l]),s=(0,a.useMemo)((()=>i.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wc,{key:"icon",icon:n,showColors:!0}),t),isDisabled:o}}))),[i]);return[s]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o}=e;return{action:"replace",value:(0,r.createBlock)(t,n,(0,r.createBlocksFromInnerBlocksTemplate)(o))}}},eb=window.wp.apiFetch,tb=n.n(eb);var nb=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var ob=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var rb={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await tb()({path:(0,mp.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(wr,{key:"icon",icon:"page"===e.subtype?nb:ob}),e.title),getOptionCompletion:e=>(0,a.createElement)("a",{href:e.url},e.title)};const lb=[];function ib(e){let{completers:t=lb}=e;const{name:n}=Zn();return(0,a.useMemo)((()=>{let e=t;return(n===(0,r.getDefaultBlockName)()||(0,r.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([Jv,rb])),(0,l.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,l.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var ab=function(e){return(0,a.createElement)(p.Autocomplete,i({},e,{completers:ib(e)}))};var sb=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var cb=function(e){let{isActive:t,label:n=(0,g.__)("Toggle full height"),onToggle:o,isDisabled:r}=e;return(0,a.createElement)(p.ToolbarButton,{isActive:t,icon:sb,label:n,onClick:()=>o(!t),disabled:r})};var ub=function(e){const{label:t=(0,g.__)("Change matrix alignment"),onChange:n=u.noop,value:o="center",isDisabled:r}=e,l=(0,a.createElement)(p.__experimentalAlignmentMatrixControl.Icon,{value:o}),i="block-editor-block-alignment-matrix-control",s=`${i}__popover`;return(0,a.createElement)(p.Dropdown,{position:"bottom right",className:i,popoverProps:{className:s,isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:o}=e;return(0,a.createElement)(p.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":o,onKeyDown:e=>{o||e.keyCode!==Tc.DOWN||(e.preventDefault(),n())},label:t,icon:l,showTooltip:!0,disabled:r})},renderContent:()=>(0,a.createElement)(p.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};var db=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var pb=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:o}=(0,m.useDispatch)(qn),{clientId:r,parents:l,hasSelection:i}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:o}=e(qn),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=t||(0,g.__)("Document");return(0,a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,g.__)("Block breadcrumb")},(0,a.createElement)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true"},i&&(0,a.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:o},s),!i&&s,!!r&&(0,a.createElement)(wr,{icon:db,className:"block-editor-block-breadcrumb__separator"})),l.map((e=>(0,a.createElement)("li",{key:e},(0,a.createElement)(p.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,a.createElement)(Wp,{clientId:e,maximumLength:35})),(0,a.createElement)(wr,{icon:db,className:"block-editor-block-breadcrumb__separator"})))),!!r&&(0,a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,a.createElement)(Wp,{clientId:r,maximumLength:35})))};function mb(e){let{clientId:t,tagName:n="div",wrapperProps:o,className:r}=e;const[l,s]=(0,a.useState)(!0),[u,d]=(0,a.useState)(!1),{isParentSelected:p,hasChildSelected:f,isDraggingBlocks:g,isParentHighlighted:h}=(0,m.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:o,isDraggingBlocks:r,isBlockHighlighted:l}=e(qn);return{isParentSelected:n(t),hasChildSelected:o(t,!0),isDraggingBlocks:r(),isParentHighlighted:l(t)}}),[t]),v=c()("block-editor-block-content-overlay",null==o?void 0:o.className,r,{"overlay-active":l,"parent-highlighted":h,"is-dragging-blocks":g});return(0,a.useEffect)((()=>{p||f||l||s(!0),p&&!u&&l&&s(!1),f&&l&&s(!1)}),[p,f,l,u]),(0,a.createElement)(n,i({},o,{className:v,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onMouseUp:l?()=>s(!1):void 0}),null==o?void 0:o.children)}const fb=()=>(0,a.createElement)(p.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,a.createElement)(p.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),gb=e=>{let{style:t,className:n}=e;return(0,a.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,a.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,a.createElement)(fb,null)))},hb=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:o,isOpen:r}=e;return(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(p.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,g.__)("Open Colors Selector"),onClick:o,onKeyDown:e=>{r||e.keyCode!==Tc.DOWN||(e.preventDefault(),o())},icon:(0,a.createElement)(n,null,(0,a.createElement)(t,null,(0,a.createElement)(gb,null)))}))}};var vb=e=>{let{children:t,...n}=e;return(0,a.createElement)(p.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:hb(n),renderContent:()=>t})};var bb=(0,a.createElement)(O.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(O.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const kb=pc(p.__experimentalTreeGridRow);function _b(e){let{isSelected:t,position:n,level:o,rowCount:r,children:l,className:s,path:u,...d}=e;const p=gc({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,a.createElement)(kb,i({ref:p,className:c()("block-editor-list-view-leaf",s),level:o,positionInSet:n,setSize:r},d),l)}function yb(e){let{onClick:t}=e;return(0,a.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,a.createElement)(wr,{icon:db}))}var Eb=(0,a.forwardRef)((function(e,t){let{className:n,block:{clientId:o},onClick:r,onToggleExpanded:l,tabIndex:i,onFocus:s,onDragStart:u,onDragEnd:d,draggable:m}=e;const f=Gp(o),{isLocked:g}=Zm(o);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.Button,{className:c()("block-editor-list-view-block-select-button",n),onClick:r,onKeyDown:function(e){e.keyCode!==Tc.ENTER&&e.keyCode!==Tc.SPACE||r(e)},ref:t,tabIndex:i,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==u||u(e)},onDragEnd:d,draggable:m,href:`#block-${o}`,"aria-hidden":!0},(0,a.createElement)(yb,{onClick:l}),(0,a.createElement)(Wc,{icon:null==f?void 0:f.icon,showColors:!0}),(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,a.createElement)(Wp,{clientId:o,maximumLength:35})),(null==f?void 0:f.anchor)&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},f.anchor),g&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,a.createElement)(wr,{icon:Xm}))))}));const Cb=(0,a.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:o,block:r,isSelected:l,position:s,siblingBlockCount:u,level:d,isExpanded:p,selectedClientIds:f,...g}=e;const{clientId:h}=r,{blockMovingClientId:v,selectedBlockInBlockEditor:b}=(0,m.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(qn);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[h]),k=v&&b===h,_=c()("block-editor-list-view-block-contents",{"is-dropping-before":k}),y=f.includes(h)?f:[h];return(0,a.createElement)($p,{clientIds:y},(e=>{let{draggable:c,onDragStart:m,onDragEnd:f}=e;return(0,a.createElement)(Eb,i({ref:t,className:_,block:r,onClick:n,onToggleExpanded:o,isSelected:l,position:s,siblingBlockCount:u,level:d,draggable:c,onDragStart:m,onDragEnd:f,isExpanded:p},g))}))}));var wb=Cb;const Sb=(0,a.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),Bb=()=>(0,a.useContext)(Sb);var Ib=(0,a.memo)((function e(t){let{block:n,isDragged:o,isSelected:r,isBranchSelected:l,selectBlock:i,position:s,level:u,rowCount:f,siblingBlockCount:h,showBlockMovers:v,path:b,isExpanded:k,selectedClientIds:_,preventAnnouncement:y}=t;const E=(0,a.useRef)(null),[C,w]=(0,a.useState)(!1),{clientId:S}=n,B=r&&_[0]===S,I=r&&_[_.length-1]===S,{toggleBlockHighlight:x}=(0,m.useDispatch)(qn),T=Gp(S),{isLocked:N}=Zm(S),P=`list-view-block-select-button__${(0,d.useInstanceId)(e)}`,M=((e,t,n)=>(0,g.sprintf)((0,g.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,h,u);let R=(0,g.__)("Link");T&&(R=N?(0,g.sprintf)((0,g.__)("%s link (locked)"),T.title):(0,g.sprintf)((0,g.__)("%s link"),T.title));const L=T?(0,g.sprintf)((0,g.__)("Options for %s block"),T.title):(0,g.__)("Options"),{__experimentalFeatures:A,__experimentalPersistentListViewFeatures:D,__experimentalHideContainerBlockActions:O,isTreeGridMounted:F,expand:z,collapse:V}=Bb(),H=v&&h>0,G=c()("block-editor-list-view-block__mover-cell",{"is-visible":C||r}),U=c()("block-editor-list-view-block__menu-cell",{"is-visible":C||B});(0,a.useEffect)((()=>{D&&!F&&r&&E.current.focus()}),[]);const W=D?x:()=>{},$=(0,a.useCallback)((()=>{w(!0),W(S,!0)}),[S,w,W]),j=(0,a.useCallback)((()=>{w(!1),W(S,!1)}),[S,w,W]),K=(0,a.useCallback)((e=>{i(e,S),e.preventDefault()}),[S,i]),q=(0,a.useCallback)((e=>{i(void 0,e)}),[i]),Y=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===k?V(S):!1===k&&z(S)}),[S,z,V,k]),Q=A&&(!O||O&&u>1),X=A&&!Q;let Z;H?Z=2:X&&(Z=3);const J=c()({"is-selected":r,"is-first-selected":B,"is-last-selected":I,"is-branch-selected":D&&l,"is-dragging":o,"has-single-cell":X}),ee=_.includes(S)?_:[S];return(0,a.createElement)(_b,{className:J,onMouseEnter:$,onMouseLeave:j,onFocus:$,onBlur:j,level:u,position:s,rowCount:f,path:b,id:`list-view-block-${S}`,"data-block":S,isExpanded:k,"aria-selected":!!r},(0,a.createElement)(p.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:Z,ref:E,"aria-label":R,"aria-selected":!!r,"aria-expanded":k,"aria-describedby":P},(e=>{let{ref:t,tabIndex:o,onFocus:l}=e;return(0,a.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,a.createElement)(wb,{block:n,onClick:K,onToggleExpanded:Y,isSelected:r,position:s,siblingBlockCount:h,level:u,ref:t,tabIndex:o,onFocus:l,isExpanded:k,selectedClientIds:_,preventAnnouncement:y}),(0,a.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:P},M))})),H&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.__experimentalTreeGridCell,{className:G,withoutGridItem:!0},(0,a.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,a.createElement)(rm,{orientation:"vertical",clientIds:[S],ref:t,tabIndex:n,onFocus:o})})),(0,a.createElement)(p.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,a.createElement)(lm,{orientation:"vertical",clientIds:[S],ref:t,tabIndex:n,onFocus:o})})))),Q&&(0,a.createElement)(p.__experimentalTreeGridCell,{className:U,"aria-selected":!!r},(e=>{let{ref:t,tabIndex:n,onFocus:o}=e;return(0,a.createElement)(sf,{clientIds:ee,icon:Dm,label:L,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:q})})))}));function xb(e,t,n,o){var r;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(r=t[e.clientId])&&void 0!==r?r:o)?1+e.innerBlocks.reduce(Tb(t,n,o),0):1}const Tb=(e,t,n)=>(o,r)=>{var l;if(null==t?void 0:t.includes(r.clientId))return o;return(null!==(l=e[r.clientId])&&void 0!==l?l:n)&&r.innerBlocks.length>0?o+xb(r,e,t,n):o+1};function Nb(e){const{blocks:t,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,selectedClientIds:l,level:i=1,path:s="",isBranchSelected:c=!1,listPosition:d=0,fixedListWindow:p,expandNested:f}=e,{expandedState:g,draggedClientIds:h,__experimentalPersistentListViewFeatures:v}=Bb(),b=(0,u.compact)(t),k=b.length;let _=d;return(0,a.createElement)(a.Fragment,null,b.map(((e,t)=>{var d;const{clientId:y,innerBlocks:E}=e;t>0&&(_+=xb(b[t-1],g,h,f));const C=v,{itemInView:w}=p,S=!C||w(_),B=t+1,I=s.length>0?`${s}_${B}`:`${B}`,x=r&&!!E&&!!E.length,T=x?null!==(d=g[y])&&void 0!==d?d:f:void 0,N=!(null==h||!h.includes(y)),P=N||S,M=((e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(y,l),R=c||M&&x;return(0,a.createElement)(m.AsyncModeProvider,{key:y,value:!M},P&&(0,a.createElement)(Ib,{block:e,selectBlock:n,isSelected:M,isBranchSelected:R,isDragged:N,level:i,position:B,rowCount:k,siblingBlockCount:k,showBlockMovers:o,path:I,isExpanded:T,listPosition:_,selectedClientIds:l}),!P&&(0,a.createElement)("tr",null,(0,a.createElement)("td",{className:"block-editor-list-view-placeholder"})),x&&T&&!N&&(0,a.createElement)(Nb,{blocks:E,selectBlock:n,showBlockMovers:o,showNestedBlocks:r,level:i+1,path:I,listPosition:_+1,fixedListWindow:p,isBranchSelected:R,selectedClientIds:l,expandNested:f}))})))}Nb.defaultProps={selectBlock:()=>{}};var Pb=(0,a.memo)(Nb);function Mb(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:o,clientId:r,dropPosition:l}=n||{},[i,s]=(0,a.useMemo)((()=>{if(!t.current)return[];return[o?t.current.querySelector(`[data-block="${o}"]`):void 0,r?t.current.querySelector(`[data-block="${r}"]`):void 0]}),[o,r]),c=s||i,u=(0,a.useCallback)((()=>{if(!i)return 0;const e=c.getBoundingClientRect();return i.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[i,c]),d=(0,a.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),m=(0,a.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),o={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===l?{...o,top:t.top,bottom:t.top}:"bottom"===l||"inside"===l?{...o,top:t.bottom,bottom:t.bottom}:{}}),[c,l,u]);return c?(0,a.createElement)(p.Popover,{noArrow:!0,animate:!1,getAnchorRect:m,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,a.createElement)("div",{style:d,className:"block-editor-list-view-drop-indicator__line"})):null}function Rb(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,m.useDispatch)(qn),{getBlockName:o,getBlockParents:l,getBlockSelectionStart:i,getBlockSelectionEnd:s,getSelectedBlockClientIds:c,hasMultiSelection:d,hasSelectedBlock:p}=(0,m.useSelect)(qn),{getBlockType:f}=(0,m.useSelect)(r.store),h=(0,a.useCallback)((async(r,a,s)=>{if(null==r||!r.shiftKey)return await e(),void n(a);r.preventDefault();const m="keydown"===r.type&&(r.keyCode===Tc.UP||r.keyCode===Tc.DOWN||r.keyCode===Tc.HOME||r.keyCode===Tc.END);if(!m&&!p()&&!d())return void n(a,null);const h=c(),v=[...l(a),a];m&&!h.some((e=>v.includes(e)))&&await e();let b=i(),k=a;m&&(p()||d()||(b=a),s&&(k=s));const _=l(b),y=l(k),{start:E,end:C}=function(e,t,n,o){const r=[...n,e],l=[...o,t],i=Math.min(r.length,l.length)-1;return{start:r[i],end:l[i]}}(b,k,_,y);await t(E,C,null);const w=c();if((r.keyCode===Tc.HOME||r.keyCode===Tc.END)&&w.length>1)return;const S=(0,u.difference)(h,w);let B;if(1===S.length){var I;const e=null===(I=f(o(S[0])))||void 0===I?void 0:I.title;e&&(B=(0,g.sprintf)((0,g.__)("%s deselected."),e))}else S.length>1&&(B=(0,g.sprintf)((0,g.__)("%s blocks deselected."),S.length));B&&(0,Ft.speak)(B)}),[e,o,f,l,i,s,c,d,p,t,n]);return{updateBlockSelection:h}}function Lb(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const Ab=["top","bottom"];function Db(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:o,canInsertBlocks:r}=(0,m.useSelect)(qn),[l,i]=(0,a.useState)(),{rootClientId:s,blockIndex:c}=l||{},u=Pf(s,c),p=o(),f=(0,d.useThrottle)((0,a.useCallback)(((o,l)=>{const a={x:o.clientX,y:o.clientY},s=!(null==p||!p.length),c=function(e,t){let n,o,r,l;for(const i of e){if(i.isDraggedBlock)continue;const a=i.element.getBoundingClientRect(),[s,c]=Rf(t,a,Ab),u=Lb(t,a);if(void 0===r||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,l)))return{rootClientId:o.clientId,blockIndex:0,dropPosition:"inside"};if(!o.canInsertDraggedBlocksAsSibling)return;const a=i?1:0;return{rootClientId:o.rootClientId,clientId:o.clientId,blockIndex:o.blockIndex+a,dropPosition:n}}(Array.from(l.querySelectorAll("[data-block]")).map((o=>{const l=o.dataset.block,i=e(l);return{clientId:l,rootClientId:i,blockIndex:t(l),element:o,isDraggedBlock:!!s&&p.includes(l),innerBlockCount:n(l),canInsertDraggedBlocksAsSibling:!s||r(p,i),canInsertDraggedBlocksAsChild:!s||r(p,l)}})),a);c&&i(c)}),[p]),200);return{ref:(0,d.__experimentalUseDropZone)({onDrop:u,onDragOver(e){f(e,e.currentTarget)},onDragEnd(){f.cancel(),i(null)}}),target:l}}const Ob=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var Fb=(0,a.forwardRef)((function(e,t){let{blocks:n,__experimentalFeatures:o,__experimentalPersistentListViewFeatures:r,__experimentalHideContainerBlockActions:l,showNestedBlocks:s,showBlockMovers:c,id:u,expandNested:f=!1,...h}=e;const{clientIdsTree:v,draggedClientIds:b,selectedClientIds:k}=function(e){return(0,m.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:o,__unstableGetClientIdsTree:r}=t(qn);return{selectedClientIds:o(),draggedClientIds:n(),clientIdsTree:e||r()}}),[e])}(n),{visibleBlockCount:_}=(0,m.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(qn),o=(null==b?void 0:b.length)>0?n(b).length+1:0;return{visibleBlockCount:t()-o}}),[b]),{updateBlockSelection:y}=Rb(),[E,C]=(0,a.useReducer)(Ob,{}),{ref:w,target:S}=Db(),B=(0,a.useRef)(),I=(0,d.useMergeRefs)([B,w,t]),x=(0,a.useRef)(!1),{setSelectedTreeId:T}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[o,r]=(0,a.useState)(null),{selectedBlockParentClientIds:l}=(0,m.useSelect)((e=>{const{getBlockParents:n}=e(qn);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),i=Array.isArray(l)&&l.length?l:null;return(0,a.useEffect)((()=>{o!==t&&i&&n({type:"expand",clientIds:l})}),[t]),{setSelectedTreeId:r}}({firstSelectedBlockClientId:k[0],setExpandedState:C}),N=(0,a.useCallback)(((e,t)=>{y(e,t),T(t)}),[T,y]);(0,a.useEffect)((()=>{x.current=!0}),[]);const[P]=(0,d.__experimentalUseFixedWindowList)(B,36,_,{useWindowing:r,windowOverscan:40}),M=(0,a.useCallback)((e=>{e&&C({type:"expand",clientIds:[e]})}),[C]),R=(0,a.useCallback)((e=>{e&&C({type:"collapse",clientIds:[e]})}),[C]),L=(0,a.useCallback)((e=>{var t;M(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[M]),A=(0,a.useCallback)((e=>{var t;R(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[R]),D=(0,a.useCallback)(((e,t,n)=>{var o,r;e.shiftKey&&y(e,null==t||null===(o=t.dataset)||void 0===o?void 0:o.block,null==n||null===(r=n.dataset)||void 0===r?void 0:r.block)}),[y]),O=(0,a.useMemo)((()=>({__experimentalFeatures:o,__experimentalPersistentListViewFeatures:r,__experimentalHideContainerBlockActions:l,isTreeGridMounted:x.current,draggedClientIds:b,expandedState:E,expand:M,collapse:R})),[o,r,l,x.current,b,E,M,R]);return(0,a.createElement)(m.AsyncModeProvider,{value:!0},(0,a.createElement)(Mb,{listViewRef:B,blockDropTarget:S}),(0,a.createElement)(p.__experimentalTreeGrid,{id:u,className:"block-editor-list-view-tree","aria-label":(0,g.__)("Block navigation structure"),ref:I,onCollapseRow:A,onExpandRow:L,onFocusRow:D},(0,a.createElement)(Sb.Provider,{value:O},(0,a.createElement)(Pb,i({blocks:v,selectBlock:N,showNestedBlocks:s,showBlockMovers:c,fixedListWindow:P,selectedClientIds:k,expandNested:f},h)))))}));function zb(e){let{isEnabled:t,onToggle:n,isOpen:o,innerRef:r,...l}=e;return(0,a.createElement)(p.Button,i({},l,{ref:r,icon:bb,"aria-expanded":o,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,g.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var Vb=(0,a.forwardRef)((function(e,t){let{isDisabled:n,__experimentalFeatures:o,...r}=e;const l=(0,m.useSelect)((e=>!!e(qn).getBlockCount()),[])&&!n;return(0,a.createElement)(p.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return(0,a.createElement)(zb,i({},r,{innerRef:t,isOpen:n,onToggle:o,isEnabled:l}))},renderContent:()=>(0,a.createElement)("div",{className:"block-editor-block-navigation__container"},(0,a.createElement)("p",{className:"block-editor-block-navigation__label"},(0,g.__)("List view")),(0,a.createElement)(Fb,{showNestedBlocks:!0,__experimentalFeatures:o}))})}));function Hb(e){let{genericPreviewBlock:t,style:n,className:o,activeStyle:r}=e;const l=km(o,r,n),i=(0,a.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:l+" block-editor-block-styles__block-preview-container"}})),[t,l]);return(0,a.createElement)(Ed,{item:i,isStylePreview:!0})}function Gb(e){let{children:t,scope:n,...o}=e;return(0,a.createElement)(p.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,a.createElement)("div",o,t))}function Ub(e){let{clientId:t,onSwitch:n=u.noop,onHoverClassName:o=u.noop,scope:r}=e;const{onSelect:l,stylesToRender:i,activeStyle:s,genericPreviewBlock:m,className:f}=ym({clientId:t,onSwitch:n}),[g,h]=(0,a.useState)(null),[v,b]=(0,a.useState)(0),k=(0,d.useViewportMatch)("medium","<");if((0,a.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[g]),!i||0===i.length)return null;const _=(0,u.debounce)(h,250),y=e=>{l(e),o(null),h(null),_.cancel()},E=e=>{var t;g!==e?(_(e),o(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,a.createElement)("div",{className:"block-editor-block-styles"},(0,a.createElement)("div",{className:"block-editor-block-styles__variants"},i.map((e=>{const t=e.label||e.name;return(0,a.createElement)(p.Button,{className:c()("block-editor-block-styles__item",{"is-active":s.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>E(e),onFocus:()=>E(e),onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:t=>{Tc.ENTER!==t.keyCode&&Tc.SPACE!==t.keyCode||(t.preventDefault(),y(e))},onClick:()=>y(e),role:"button",tabIndex:"0"},(0,a.createElement)(p.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),g&&!k&&(0,a.createElement)(Gb,{scope:r,className:"block-editor-block-styles__preview-panel",style:{top:v},onMouseLeave:()=>E(null)},(0,a.createElement)(Hb,{activeStyle:s,className:f,genericPreviewBlock:m,style:g})))}Ub.Slot=function(e){let{scope:t}=e;return(0,a.createElement)(p.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var Wb=Ub;var $b=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var jb=function(e){let{icon:t=$b,label:n=(0,g.__)("Choose variation"),instructions:o=(0,g.__)("Select a variation to start with."),variations:r,onSelect:l,allowSkip:i}=e;const s=c()("block-editor-block-variation-picker",{"has-many-variations":r.length>4});return(0,a.createElement)(p.Placeholder,{icon:t,label:n,instructions:o,className:s},(0,a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,g.__)("Block variations")},r.map((e=>(0,a.createElement)("li",{key:e.name},(0,a.createElement)(p.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>l(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),i&&(0,a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,a.createElement)(p.Button,{variant:"link",onClick:()=>l()},(0,g.__)("Skip"))))};var Kb=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const qb="carousel",Yb="grid",Qb=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},t&&(0,a.createElement)(p.Button,{onClick:t},(0,g.__)("Start blank")),(0,a.createElement)(p.Button,{variant:"primary",onClick:n},(0,g.__)("Choose")))},Xb=e=>{let{handlePrevious:t,handleNext:n,activeSlide:o,totalSlides:r}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,a.createElement)(p.Button,{icon:Xp,label:(0,g.__)("Previous pattern"),onClick:t,disabled:0===o}),(0,a.createElement)(p.Button,{icon:Qp,label:(0,g.__)("Next pattern"),onClick:n,disabled:o===r-1}))};var Zb=e=>{let{viewMode:t,setViewMode:n,handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i,onBlockPatternSelect:s,onStartBlank:c}=e;const u=t===qb,d=(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,a.createElement)(p.Button,{icon:uo,label:(0,g.__)("Carousel view"),onClick:()=>n(qb),isPressed:u}),(0,a.createElement)(p.Button,{icon:Kb,label:(0,g.__)("Grid view"),onClick:()=>n(Yb),isPressed:t===Yb}));return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,a.createElement)(Xb,{handlePrevious:o,handleNext:r,activeSlide:l,totalSlides:i}),d,u&&(0,a.createElement)(Qb,{onBlockPatternSelect:s,onStartBlank:c}))};var Jb=function(e,t,n){return(0,m.useSelect)((o=>{const{getBlockRootClientId:r,__experimentalGetPatternsByBlockTypes:l,__experimentalGetAllowedPatterns:i}=o(qn),a=r(e);return n?i(a).filter(n):l(t,a)}),[e,t,n])};const ek=e=>{let{viewMode:t,activeSlide:n,patterns:o,onBlockPatternSelect:r,height:l}=e;const s=(0,p.__unstableUseCompositeState)(),c="block-editor-block-pattern-setup__container";if(t===qb){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__carousel",style:{height:l}},(0,a.createElement)("div",{className:c},(0,a.createElement)("ul",{className:"carousel-container"},o.map(((t,n)=>(0,a.createElement)(nk,{className:e.get(n)||"",key:t.name,pattern:t,minHeight:l}))))))}return(0,a.createElement)("div",{style:{height:l},className:"block-editor-block-pattern-setup__grid"},(0,a.createElement)(p.__unstableComposite,i({},s,{role:"listbox",className:c,"aria-label":(0,g.__)("Patterns list")}),o.map((e=>(0,a.createElement)(tk,{key:e.name,pattern:e,onSelect:r,composite:s})))))};function tk(e){let{pattern:t,onSelect:n,composite:o}=e;const r="block-editor-block-pattern-setup-list",{blocks:l,description:s,viewportWidth:c=700}=t,u=(0,d.useInstanceId)(tk,`${r}__item-description`);return(0,a.createElement)("div",{className:`${r}__list-item`,"aria-label":t.title,"aria-describedby":t.description?u:void 0},(0,a.createElement)(p.__unstableCompositeItem,i({role:"option",as:"div"},o,{className:`${r}__item`,onClick:()=>n(l)}),(0,a.createElement)(_d,{blocks:l,viewportWidth:c})),!!s&&(0,a.createElement)(p.VisuallyHidden,{id:u},s))}function nk(e){let{className:t,pattern:n,minHeight:o}=e;const{blocks:r,title:l,description:i}=n,s=(0,d.useInstanceId)(nk,"block-editor-block-pattern-setup-list__item-description");return(0,a.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":l,"aria-describedby":i?s:void 0},(0,a.createElement)(_d,{blocks:r,__experimentalMinHeight:o}),!!i&&(0,a.createElement)(p.VisuallyHidden,{id:s},i))}var ok=e=>{let{clientId:t,blockName:n,filterPatternsFn:o,startBlankComponent:l,onBlockPatternSelect:i}=e;const[s,c]=(0,a.useState)(qb),[u,p]=(0,a.useState)(0),[f,g]=(0,a.useState)(!1),{replaceBlock:h}=(0,m.useDispatch)(qn),v=Jb(t,n,o),[b,{height:k}]=(0,d.useResizeObserver)();if(null==v||!v.length||f)return l;const _=i||(e=>{const n=e.map((e=>(0,r.cloneBlock)(e)));h(t,n)}),y=l?()=>{g(!0)}:void 0;return(0,a.createElement)(a.Fragment,null,b,(0,a.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,a.createElement)(ek,{viewMode:s,activeSlide:u,patterns:v,onBlockPatternSelect:_,height:k-120}),(0,a.createElement)(Zb,{viewMode:s,setViewMode:c,activeSlide:u,totalSlides:v.length,handleNext:()=>{p((e=>e+1))},handlePrevious:()=>{p((e=>e-1))},onBlockPatternSelect:()=>{_(v[u].blocks)},onStartBlank:y})))};function rk(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;return(0,a.createElement)("fieldset",{className:t},(0,a.createElement)(p.VisuallyHidden,{as:"legend"},(0,g.__)("Transform to variation")),r.map((e=>(0,a.createElement)(p.Button,{key:e.name,icon:e.icon,isPressed:o===e.name,label:o===e.name?e.title:(0,g.sprintf)((0,g.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function lk(e){let{className:t,onSelectVariation:n,selectedValue:o,variations:r}=e;const l=r.map((e=>{let{name:t,title:n,description:o}=e;return{value:t,label:n,info:o}}));return(0,a.createElement)(p.DropdownMenu,{className:t,label:(0,g.__)("Transform to variation"),text:(0,g.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:Jp,toggleProps:{iconPosition:"right"}},(()=>(0,a.createElement)("div",{className:`${t}__container`},(0,a.createElement)(p.MenuGroup,null,(0,a.createElement)(p.MenuItemsChoice,{choices:l,value:o,onSelect:n})))))}var ik=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,m.useDispatch)(qn),{activeBlockVariation:o,variations:l}=(0,m.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:o}=e(r.store),{getBlockName:l,getBlockAttributes:i}=e(qn),a=t&&l(t);return{activeBlockVariation:n(a,i(t)),variations:a&&o(a,"transform")}}),[t]),i=null==o?void 0:o.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!l&&(l.forEach((t=>{t.icon&&e.add(t.icon)})),e.size===l.length)}),[l]);if(null==l||!l.length)return null;const c=s?rk:lk;return(0,a.createElement)(c,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...l.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:i,variations:l})},ak=(0,d.createHigherOrderComponent)((e=>t=>{const n=Io("color.palette"),o=!Io("color.custom"),r=void 0===t.colors?n:t.colors,l=void 0===t.disableCustomColors?o:t.disableCustomColors,s=!(0,u.isEmpty)(r)||!l;return(0,a.createElement)(e,i({},t,{colors:r,disableCustomColors:l,hasColorsToChoose:s}))}),"withColorContext"),sk=ak(p.ColorPalette);function ck(e){let{onChange:t,value:n,...o}=e;return(0,a.createElement)(Qf,i({},o,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var uk=window.wp.date;const dk=new Date(2022,0,25);function pk(e){let{format:t,defaultFormat:n,onChange:o}=e;return(0,a.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,a.createElement)(p.VisuallyHidden,{as:"legend"},(0,g.__)("Date format")),(0,a.createElement)(p.ToggleControl,{label:(0,a.createElement)(a.Fragment,null,(0,g.__)("Default format"),(0,a.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,uk.dateI18n)(n,dk))),checked:!t,onChange:e=>o(e?null:n)}),t&&(0,a.createElement)(mk,{format:t,onChange:o}))}function mk(e){var t;let{format:n,onChange:o}=e;const r=(0,u.uniq)(["Y-m-d",(0,g._x)("n/j/Y","short date format"),(0,g._x)("n/j/Y g:i A","short date format with time"),(0,g._x)("M j, Y","medium date format"),(0,g._x)("M j, Y g:i A","medium date format with time"),(0,g._x)("F j, Y","long date format")]),l=r.map(((e,t)=>({key:`suggested-${t}`,name:(0,uk.dateI18n)(e,dk),format:e}))),i={key:"custom",name:(0,g.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,g.__)("Enter your own date format")},[s,c]=(0,a.useState)((()=>!!n&&!r.includes(n)));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.BaseControl,{className:"block-editor-date-format-picker__custom-format-select-control"},(0,a.createElement)(p.CustomSelectControl,{label:(0,g.__)("Choose a format"),options:[...l,i],value:s?i:null!==(t=l.find((e=>e.format===n)))&&void 0!==t?t:i,onChange:e=>{let{selectedItem:t}=e;t===i?c(!0):(c(!1),o(t.format))}})),s&&(0,a.createElement)(p.TextControl,{label:(0,g.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,g.__)("Enter a date or time format string."),{Link:(0,a.createElement)(p.ExternalLink,{href:(0,g.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>o(e)}))}const fk=(0,g.__)("(%s: color %s)"),gk=(0,g.__)("(%s: gradient %s)"),hk=["colors","disableCustomColors","gradients","disableCustomGradients"],vk=e=>{let{colors:t,gradients:n,settings:o}=e;return o.map(((e,o)=>{let r,{colorValue:l,gradientValue:i,label:s,colors:c,gradients:u}=e;if(!l&&!i)return null;if(l){const e=tg(c||t,l);r=(0,g.sprintf)(fk,s.toLowerCase(),e&&e.name||l)}else{const e=Lg(u||n,l);r=(0,g.sprintf)(gk,s.toLowerCase(),e&&e.name||i)}return(0,a.createElement)(p.ColorIndicator,{key:o,colorValue:l||i,"aria-label":r})}))},bk=e=>{let{className:t,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,children:s,settings:d,title:m,showTitle:f=!0,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:h,enableAlpha:v,...b}=e;if((0,u.isEmpty)(n)&&(0,u.isEmpty)(o)&&r&&l&&(0,u.every)(d,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const k=(0,a.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},m,(0,a.createElement)(vk,{colors:n,gradients:o,settings:d}));return(0,a.createElement)(p.PanelBody,i({className:c()("block-editor-panel-color-gradient-settings",t),title:f?k:void 0},b),(0,a.createElement)(Xf,{settings:d,colors:n,gradients:o,disableCustomColors:r,disableCustomGradients:l,__experimentalHasMultipleOrigins:g,__experimentalIsRenderedInSidebar:h,enableAlpha:v}),!!s&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.__experimentalSpacer,{marginY:4})," ",s))},kk=e=>{const t=Zf();return t.colors=Io("color.palette"),t.gradients=Io("color.gradients"),(0,a.createElement)(bk,i({},t,e))},_k=e=>{const t=Jf();return(0,a.createElement)(bk,i({},t,e))};var yk=e=>(0,u.every)(hk,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(bk,e):e.__experimentalHasMultipleOrigins?(0,a.createElement)(_k,e):(0,a.createElement)(kk,e),Ek=function(e,t){return Ek=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ek(e,t)};var Ck=function(){return Ck=Object.assign||function(e){for(var t,n=1,o=arguments.length;nu*r?{width:u*r,height:u}:{width:c,height:c/r}}function Ik(e,t,n,o,r){void 0===r&&(r=0);var l=Ok(t.width,t.height,r),i=l.width,a=l.height;return{x:xk(e.x,i,n.width,o),y:xk(e.y,a,n.height,o)}}function xk(e,t,n,o){var r=t*o/2-n/2;return Math.min(r,Math.max(e,-r))}function Tk(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Nk(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function Pk(e,t,n,o,r,l,i){void 0===l&&(l=0),void 0===i&&(i=!0);var a=i&&0===l?Mk:Rk,s={x:a(100,((t.width-n.width/r)/2-e.x/r)/t.width*100),y:a(100,((t.height-n.height/r)/2-e.y/r)/t.height*100),width:a(100,n.width/t.width*100/r),height:a(100,n.height/t.height*100/r)},c=Math.round(a(t.naturalWidth,s.width*t.naturalWidth/100)),u=Math.round(a(t.naturalHeight,s.height*t.naturalHeight/100)),d=t.naturalWidth>=t.naturalHeight*o?{width:Math.round(u*o),height:u}:{width:c,height:Math.round(c/o)};return{croppedAreaPercentages:s,croppedAreaPixels:Ck(Ck({},d),{x:Math.round(a(t.naturalWidth-d.width,s.x*t.naturalWidth/100)),y:Math.round(a(t.naturalHeight-d.height,s.y*t.naturalHeight/100))})}}function Mk(e,t){return Math.min(e,Math.max(0,t))}function Rk(e,t){return t}function Lk(e,t,n){var o=t.width/t.naturalWidth,r=function(e,t,n){var o=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/o/e.height:n.width/o/e.width;var r=e.width/e.height;return t.naturalWidth>=t.naturalHeight*r?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),l=o*r;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*l,y:((t.naturalHeight-e.height)/2-e.y)*l},zoom:r}}function Ak(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Dk(e,t,n,o,r){var l=Math.cos,i=Math.sin,a=r*Math.PI/180;return[(e-n)*l(a)-(t-o)*i(a)+n,(e-n)*i(a)+(t-o)*l(a)+o]}function Ok(e,t,n){var o=e/2,r=t/2,l=[Dk(0,0,o,r,n),Dk(e,0,o,r,n),Dk(e,t,o,r,n),Dk(0,t,o,r,n)],i=Math.min.apply(Math,l.map((function(e){return e[0]}))),a=Math.max.apply(Math,l.map((function(e){return e[0]}))),s=Math.min.apply(Math,l.map((function(e){return e[1]}))),c=Math.max.apply(Math,l.map((function(e){return e[1]})));return{width:a-i,height:c-s}}function Fk(){for(var e=[],t=0;t0})).join(" ").trim()}var zk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,o=e.cropSize;if(t){var r=Lk(t,n.mediaSize,o),l=r.crop,i=r.zoom;n.props.onCropChange(l),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,o,r,l,i,a=n.imageRef||n.videoRef;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.mediaSize={width:a.offsetWidth,height:a.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(o=n.imageRef)||void 0===o?void 0:o.naturalHeight)||(null===(r=n.videoRef)||void 0===r?void 0:r.videoHeight)||0};var s=n.props.cropSize?n.props.cropSize:Bk(a.offsetWidth,a.offsetHeight,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);(null===(l=n.state.cropSize)||void 0===l?void 0:l.height)===s.height&&(null===(i=n.state.cropSize)||void 0===i?void 0:i.width)===s.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(s),n.setState({cropSize:s},n.recomputeCropPosition)}},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,o,r=e.x,l=e.y;n.dragStartPosition={x:r,y:l},n.dragStartCrop=Ck({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,o=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==o){var e=t-n.dragStartPosition.x,r=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},i=n.props.restrictPosition?Ik(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(i)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var o=t.getMousePoint(e),r=Sk()(e).pixelY,l=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(l,o),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(o-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,l=r.crop,i=r.zoom;return{x:(t+l.x)/i,y:(o+l.y)/i}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var o=n.getPointOnContainer(t),r=n.getPointOnMedia(o),l=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),i={x:r.x*l-o.x,y:r.y*l-o.y},a=n.props.restrictPosition?Ik(i,n.mediaSize,n.state.cropSize,l,n.props.rotation):i;n.props.onCropChange(a),n.props.onZoomChange(l)}},n.getCropData=function(){return n.state.cropSize?Pk(n.props.restrictPosition?Ik(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,o=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Ik(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}Ek(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){var e;window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,o,r,l,i,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(o=e.cropSize)||void 0===o?void 0:o.width)!==(null===(r=this.props.cropSize)||void 0===r?void 0:r.width)?this.computeSizes():(null===(l=e.crop)||void 0===l?void 0:l.x)===(null===(i=this.props.crop)||void 0===i?void 0:i.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Tk(n,o),this.lastPinchRotation=Nk(n,o),this.onDragStart(Ak(n,o))},t.prototype.onPinchMove=function(e){var n=this,o=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]),l=Ak(o,r);this.onDrag(l),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=Tk(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,l),n.lastPinchDistance=e;var i=Nk(o,r),a=n.props.rotation+(i-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=i}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,l=t.transform,i=t.crop,a=i.x,s=i.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,m=t.style,f=m.containerStyle,g=m.cropAreaStyle,h=m.mediaStyle,v=t.classes,b=v.containerClassName,k=v.cropAreaClassName,_=v.mediaClassName,y=t.objectFit;return Fl().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:f,className:Fk("reactEasyCrop_Container",b)},n?Fl().createElement("img",Ck({alt:"",className:Fk("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",_)},r,{src:n,ref:function(t){return e.imageRef=t},style:Ck(Ck({},h),{transform:l||"translate("+a+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):o&&Fl().createElement("video",Ck({autoPlay:!0,loop:!0,muted:!0,className:Fk("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",_)},r,{ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:Ck(Ck({},h),{transform:l||"translate("+a+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return Fl().createElement("source",Ck({key:e.src},e))}))),this.state.cropSize&&Fl().createElement("div",{style:Ck(Ck({},g),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Fk("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",k)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(Fl().Component),Vk=zk;const Hk={position:"bottom right",isAlternate:!0};function Gk(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:o}=e;const[r,i]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,d]=(0,a.useState)({x:0,y:0}),[p,m]=(0,a.useState)(),[f,g]=(0,a.useState)(),[h,v]=(0,a.useState)(),[b,k]=(0,a.useState)(),_=(0,a.useCallback)((()=>{d({x:0,y:0}),m(100),g(0),v(n/o),k(n/o)}),[n,o,d,m,g,v,k]),y=(0,a.useCallback)((()=>{const e=(f+90)%360;let r=n/o;if(f%180==90&&(r=o/n),0===e)return i(),g(e),v(1/h),void d({x:-u.y*r,y:u.x*r});const a=new window.Image;a.src=t,a.onload=function(t){const n=document.createElement("canvas");let o=0,l=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(o=n.width),270!==e&&180!==e||(l=n.height);const a=n.getContext("2d");a.translate(o,l),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),n.toBlob((t=>{i(URL.createObjectURL(t)),g(e),v(1/h),d({x:-u.y*r,y:u.x*r})}))};const s=(0,l.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof s&&(a.crossOrigin=s)}),[f,n,o,i,g,v,d]);return(0,a.useMemo)((()=>({editedUrl:r,setEditedUrl:i,crop:s,setCrop:c,position:u,setPosition:d,zoom:p,setZoom:m,rotation:f,setRotation:g,rotateClockwise:y,aspect:h,setAspect:v,defaultAspect:b,initializeTransformValues:_})),[r,i,s,c,u,d,p,m,f,g,y,h,v,b,_])}(e),{initializeTransformValues:o}=n;return(0,a.useEffect)((()=>{t&&o()}),[t,o]),n}const Uk=(0,a.createContext)({}),Wk=()=>(0,a.useContext)(Uk);function $k(e){let{id:t,url:n,naturalWidth:o,naturalHeight:r,isEditing:l,onFinishEditing:i,onSaveImage:s,children:c}=e;const u=Gk({url:n,naturalWidth:o,naturalHeight:r},l),d=function(e){let{crop:t,rotation:n,height:o,width:r,aspect:l,url:i,id:s,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:d}=(0,m.useDispatch)(zd.store),[p,f]=(0,a.useState)(!1),h=(0,a.useCallback)((()=>{f(!1),u()}),[f,u]),v=(0,a.useCallback)((()=>{f(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=i,tb()({path:`/wp/v2/media/${s}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:o&&r?r/l:void 0})})).catch((e=>{d((0,g.sprintf)((0,g.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{f(!1),u()}))}),[f,t,n,o,r,l,i,c,d,f,u]);return(0,a.useMemo)((()=>({isInProgress:p,apply:v,cancel:h})),[p,v,h])}({id:t,url:n,onSaveImage:s,onFinishEditing:i,...u}),p=(0,a.useMemo)((()=>({...u,...d})),[u,d]);return(0,a.createElement)(Uk.Provider,{value:p},c)}function jk(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;const{isInProgress:s,editedUrl:u,position:d,zoom:m,aspect:f,setPosition:g,setCrop:h,setZoom:v,rotation:b}=Wk();let k=o||r*l/i;return b%180==90&&(k=r*i/l),(0,a.createElement)("div",{className:c()("wp-block-image__crop-area",{"is-applying":s}),style:{width:n||r,height:k}},(0,a.createElement)(Vk,{image:u||t,disabled:s,minZoom:1,maxZoom:3,crop:d,zoom:m/100,aspect:f,onCropChange:g,onCropComplete:e=>{h(e)},onZoomChange:e=>{v(100*e)}}),s&&(0,a.createElement)(p.Spinner,null))}var Kk=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function qk(){const{isInProgress:e,zoom:t,setZoom:n}=Wk();return(0,a.createElement)(p.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:Hk,renderToggle:t=>{let{isOpen:n,onToggle:o}=t;return(0,a.createElement)(p.ToolbarButton,{icon:Kk,label:(0,g.__)("Zoom"),onClick:o,"aria-expanded":n,disabled:e})},renderContent:()=>(0,a.createElement)(p.RangeControl,{label:(0,g.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var Yk=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function Qk(e){let{aspectRatios:t,isDisabled:n,label:o,onClick:r,value:l}=e;return(0,a.createElement)(p.MenuGroup,{label:o},t.map((e=>{let{title:t,aspect:o}=e;return(0,a.createElement)(p.MenuItem,{key:o,disabled:n,onClick:()=>{r(o)},role:"menuitemradio",isSelected:o===l,icon:o===l?hm:void 0},t)})))}function Xk(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:o,setAspect:r,defaultAspect:l}=Wk();return(0,a.createElement)(p.DropdownMenu,{icon:Yk,label:(0,g.__)("Aspect Ratio"),popoverProps:Hk,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Qk,{isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,g.__)("Original"),aspect:l},{title:(0,g.__)("Square"),aspect:1}]}),(0,a.createElement)(Qk,{label:(0,g.__)("Landscape"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,g.__)("16:10"),aspect:1.6},{title:(0,g.__)("16:9"),aspect:16/9},{title:(0,g.__)("4:3"),aspect:4/3},{title:(0,g.__)("3:2"),aspect:1.5}]}),(0,a.createElement)(Qk,{label:(0,g.__)("Portrait"),isDisabled:n,onClick:e=>{r(e),t()},value:o,aspectRatios:[{title:(0,g.__)("10:16"),aspect:.625},{title:(0,g.__)("9:16"),aspect:9/16},{title:(0,g.__)("3:4"),aspect:3/4},{title:(0,g.__)("2:3"),aspect:2/3}]}))}))}var Zk=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function Jk(){const{isInProgress:e,rotateClockwise:t}=Wk();return(0,a.createElement)(p.ToolbarButton,{icon:Zk,label:(0,g.__)("Rotate"),onClick:t,disabled:e})}function e_(){const{isInProgress:e,apply:t,cancel:n}=Wk();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ToolbarButton,{onClick:t,disabled:e},(0,g.__)("Apply")),(0,a.createElement)(p.ToolbarButton,{onClick:n},(0,g.__)("Cancel")))}function t_(e){let{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(jk,{url:t,width:n,height:o,clientWidth:r,naturalHeight:l,naturalWidth:i}),(0,a.createElement)(ro,null,(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(qk,null),(0,a.createElement)(p.ToolbarItem,null,(e=>(0,a.createElement)(Xk,{toggleProps:e}))),(0,a.createElement)(Jk,null)),(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)(e_,null))))}const n_=[25,50,75,100];function o_(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:l,width:i,height:s,onChange:c,onChangeImage:d=u.noop}=e;const{currentHeight:m,currentWidth:f,updateDimension:h,updateDimensions:v}=function(e,t,n,o,r){var l,i;const[s,c]=(0,a.useState)(null!==(l=null!=t?t:o)&&void 0!==l?l:""),[u,d]=(0,a.useState)(null!==(i=null!=e?e:n)&&void 0!==i?i:"");return(0,a.useEffect)((()=>{void 0===t&&void 0!==o&&c(o),void 0===e&&void 0!==n&&d(n)}),[o,n]),(0,a.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&d(e)}),[t,e]),{currentHeight:u,currentWidth:s,updateDimension:(e,t)=>{"width"===e?c(t):d(t),r({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{d(null!=e?e:n),c(null!=t?t:o),r({height:e,width:t})}}}(s,i,n,t,c);return(0,a.createElement)(a.Fragment,null,!(0,u.isEmpty)(o)&&(0,a.createElement)(p.SelectControl,{label:(0,g.__)("Image size"),value:l,options:o,onChange:d}),r&&(0,a.createElement)("div",{className:"block-editor-image-size-control"},(0,a.createElement)("p",{className:"block-editor-image-size-control__row"},(0,g.__)("Image dimensions")),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,g.__)("Width"),value:f,min:1,onChange:e=>h("width",e)}),(0,a.createElement)(p.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,g.__)("Height"),value:m,min:1,onChange:e=>h("height",e)})),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(p.ButtonGroup,{"aria-label":(0,g.__)("Image size presets")},n_.map((e=>{const o=Math.round(t*(e/100)),r=Math.round(n*(e/100)),l=f===o&&m===r;return(0,a.createElement)(p.Button,{key:e,isSmall:!0,variant:l?"primary":void 0,isPressed:l,onClick:()=>v(r,o)},e,"%")}))),(0,a.createElement)(p.Button,{isSmall:!0,onClick:()=>v()},(0,g.__)("Reset")))))}var r_=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(O.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));var l_=e=>{let{value:t,onChange:n=u.noop,settings:o}=e;if(!o||!o.length)return null;const r=e=>o=>{n({...t,[e.id]:o})},l=o.map((e=>(0,a.createElement)(p.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:r(e),checked:!!t&&!!t[e.id]})));return(0,a.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,a.createElement)(p.VisuallyHidden,{as:"legend"},(0,g.__)("Currently selected link settings")),l)},i_=n(5425),a_=n.n(i_);class s_ extends a.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,a.createRef)(),this.inputRef=(0,a.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,a_()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===o||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=o&&o.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:o}=this.props;if(!n)return;const r=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!r&&(t.length<2||!o&&(0,mp.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const l=n(t,{isInitialSuggestions:r});l.then((e=>{this.suggestionsRequest===l&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,g.sprintf)((0,g._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,g.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===l&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=l}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case Tc.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Tc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Tc.ENTER:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const l=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Tc.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Tc.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Tc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(l),this.props.speak((0,g.__)("Link selected.")));break;case Tc.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(l),this.props.onSubmit&&this.props.onSubmit(l,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:o,disableSuggestions:r,__experimentalShowInitialSuggestions:l=!1}=e,{showSuggestions:i}=t,a=i;const s=n&&n.length;return l||s||(a=!1),!0===r&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${o}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${o}`}}render(){return(0,a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,g.__)("Paste URL or type to search"),__experimentalRenderControl:l,value:i=""}=this.props,{loading:s,showSuggestions:u,selectedSuggestion:d,suggestionsListboxId:m,suggestionOptionIdPrefix:f}=this.state,h={id:`url-input-control-${o}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},v={value:i,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,g.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":m,"aria-activedescendant":null!==d?`${f}-${d}`:void 0,ref:this.inputRef};return l?l(h,v,s):(0,a.createElement)(p.BaseControl,h,(0,a.createElement)("input",v),s&&(0,a.createElement)(p.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:o=!1}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:s,suggestionsListboxId:d,suggestionOptionIdPrefix:m,loading:f}=this.state,g={id:d,ref:this.autocompleteRef,role:"listbox"},h=(e,t)=>({role:"option",tabIndex:"-1",id:`${m}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===s});return(0,u.isFunction)(t)&&r&&l.length?t({suggestions:l,selectedSuggestion:s,suggestionsListProps:g,buildSuggestionItemProps:h,isLoading:f,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:o&&!(n&&n.length)}):!(0,u.isFunction)(t)&&r&&l.length?(0,a.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,a.createElement)("div",i({},g,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),l.map(((e,t)=>(0,a.createElement)(p.Button,i({},h(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===s}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var c_=(0,d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,(0,m.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(qn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(s_);var u_=e=>{let t,{searchTerm:n,onClick:o,itemProps:r,isSelected:l,buttonText:s}=e;return n?(t=s?(0,u.isFunction)(s)?s(n):s:(0,a.createInterpolateElement)((0,g.sprintf)((0,g.__)("Create: %s"),n),{mark:(0,a.createElement)("mark",null)}),(0,a.createElement)(p.Button,i({},r,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":l}),onClick:o}),(0,a.createElement)(wr,{className:"block-editor-link-control__search-item-icon",icon:Vc}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var d_=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.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"}));var p_=e=>{let{itemProps:t,suggestion:n,isSelected:o=!1,onClick:r,isURL:l=!1,searchTerm:s="",shouldShowType:u=!1}=e;return(0,a.createElement)(p.Button,i({},t,{onClick:r,className:c()("block-editor-link-control__search-item",{"is-selected":o,"is-url":l,"is-entity":!l})}),l&&(0,a.createElement)(wr,{className:"block-editor-link-control__search-item-icon",icon:d_}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,a.createElement)(p.TextHighlight,{text:n.title,highlight:s})),(0,a.createElement)("span",{"aria-hidden":!l,className:"block-editor-link-control__search-item-info"},!l&&((0,mp.filterURLForDisplay)((0,mp.safeDecodeURI)(n.url))||""),l&&(0,g.__)("Press ENTER to add this link"))),u&&n.type&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const m_="__CREATE__",f_=[{id:"opensInNewTab",title:(0,g.__)("Open in new tab")}];function g_(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:o,handleSuggestionClick:r,suggestionsListProps:l,buildSuggestionItemProps:s,suggestions:u,selectedSuggestion:d,isLoading:m,isInitialSuggestions:f,createSuggestionButtonText:h,suggestionsQuery:v}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":m}),k=["url","mailto","tel","internal"],_=1===u.length&&k.includes(u[0].type.toLowerCase()),y=n&&!_&&!f,E=!(null!=v&&v.type),C=`block-editor-link-control-search-results-label-${t}`,w=f?(0,g.__)("Recently updated"):(0,g.sprintf)((0,g.__)('Search results for "%s"'),o),S=(0,a.createElement)(f?a.Fragment:p.VisuallyHidden,{},(0,a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:C},w));return(0,a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},S,(0,a.createElement)("div",i({},l,{className:b,"aria-labelledby":C}),u.map(((e,t)=>y&&m_===e.type?(0,a.createElement)(u_,{searchTerm:o,buttonText:h,onClick:()=>r(e),key:e.type,itemProps:s(e,t),isSelected:t===d}):m_===e.type?null:(0,a.createElement)(p_,{key:`${e.id}-${e.type}`,itemProps:s(e,t),suggestion:e,index:t,onClick:()=>{r(e)},isSelected:t===d,isURL:k.includes(e.type.toLowerCase()),searchTerm:o,shouldShowType:E,isFrontPage:null==e?void 0:e.isFrontPage})))))}function h_(e){const t=(0,u.startsWith)(e,"#");return(0,mp.isURL)(e)||e&&e.includes("www.")||t}const v_=()=>Promise.resolve([]),b_=e=>{let t="URL";const n=(0,mp.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,mp.prependHTTP)(e):e,type:t}])};function k_(e,t,n,o){const{fetchSearchSuggestions:r,pageOnFront:l}=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),i=t?b_:v_;return(0,a.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return h_(t)?i(t,{isInitialSuggestions:s}):(async(e,t,n,o,r,l,i)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),o(e)]);c[0]=c[0].map((e=>Number(e.id)===i?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&l&&!a?c[0].concat(c[1]):c[0],a||h_(e)||!r?c:c.concat({title:e,url:e,type:m_})})(t,{...e,isInitialSuggestions:s},r,i,n,o,l)}),[i,r,n])}const __=()=>Promise.resolve([]),y_=(0,a.forwardRef)(((e,t)=>{let{value:n,children:o,currentLink:r={},className:l=null,placeholder:i=null,withCreateSuggestion:s=!1,onCreateSuggestion:p=u.noop,onChange:m=u.noop,onSelect:f=u.noop,showSuggestions:h=!0,renderSuggestions:v=(e=>(0,a.createElement)(g_,e)),fetchSuggestions:b=null,allowDirectEntry:k=!0,showInitialSuggestions:_=!1,suggestionsQuery:y={},withURLSuggestion:E=!0,createSuggestionButtonText:C,useLabel:w=!1}=e;const S=k_(y,k,s,E),B=h?b||S:__,I=(0,d.useInstanceId)(y_),[x,T]=(0,a.useState)(),N=async e=>{let t=e;if(m_!==e.type)(k||t&&Object.keys(t).length>=1)&&f({...(0,u.omit)(r,"id","url"),...t},t);else try{var n;t=await p(e.title),null!==(n=t)&&void 0!==n&&n.url&&f(t)}catch(e){}},P=c()(l,{"has-no-label":!w});return(0,a.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,a.createElement)(c_,{label:w?"URL":void 0,className:P,value:n,onChange:(e,t)=>{m(e),T(t)},placeholder:null!=i?i:(0,g.__)("Search or type url"),__experimentalRenderSuggestions:h?e=>v({...e,instanceId:I,withCreateSuggestion:s,currentInputValue:n,createSuggestionButtonText:C,suggestionsQuery:y,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),N(t)}}):null,__experimentalFetchLinkSuggestions:B,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:_,onSubmit:(e,t)=>{var o;const r=e||x;r||null!=n&&null!==(o=n.trim())&&void 0!==o&&o.length?N(r||{url:n}):t.preventDefault()},ref:t}),o)}));var E_=y_;var C_=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var w_=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:S_,Fill:B_}=(0,p.createSlotFill)("BlockEditorLinkControlViewer");function I_(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var x_=function(e){const[t,n]=(0,a.useReducer)(I_,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(null!=e&&e.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function T_(e){var t;let{value:n,onEditClick:o,hasRichPreviews:r=!1,hasUnlinkControl:l=!1,onRemove:i}=e;const s=r?null==n?void 0:n.url:null,{richData:u,isFetching:d}=x_(s),m=u&&Object.keys(u).length,f=n&&(0,mp.filterURLForDisplay)((0,mp.safeDecodeURI)(n.url),16)||"",h=(null==u?void 0:u.title)||(null==n?void 0:n.title)||f,v=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let b;return b=null!=u&&u.icon?(0,a.createElement)("img",{src:null==u?void 0:u.icon,alt:""}):v?(0,a.createElement)(wr,{icon:C_,size:32}):(0,a.createElement)(wr,{icon:d_}),(0,a.createElement)("div",{"aria-label":(0,g.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":m,"is-fetching":!!d,"is-preview":!0,"is-error":v})},(0,a.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==u?void 0:u.icon})},b),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-details"},v?(0,a.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,g.__)("Link is empty")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Jr.__unstableStripHTML)(h)),(null==n?void 0:n.url)&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-info"},f)))),(0,a.createElement)(p.Button,{icon:w_,label:(0,g.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:o,iconSize:24}),l&&(0,a.createElement)(p.Button,{icon:gg,label:(0,g.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:i,iconSize:24}),(0,a.createElement)(S_,{fillProps:n})),(m&&((null==u?void 0:u.image)||(null==u?void 0:u.description))||d)&&(0,a.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==u?void 0:u.image)||d)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=u&&u.image)})},(null==u?void 0:u.image)&&(0,a.createElement)("img",{src:null==u?void 0:u.image,alt:""})),((null==u?void 0:u.description)||d)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=u&&u.description)})},(null==u?void 0:u.description)&&(0,a.createElement)(p.__experimentalText,{truncate:!0,numberOfLines:"2"},u.description))))}const N_=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};function P_(e){var t,n,o;let{searchInputPlaceholder:r,value:l,settings:i=f_,onChange:s=u.noop,onRemove:d,noDirectEntry:m=!1,showSuggestions:f=!0,showInitialSuggestions:h,forceIsEditingLink:v,createSuggestion:b,withCreateSuggestion:k,inputValue:_="",suggestionsQuery:y={},noURLSuggestion:E=!1,createSuggestionButtonText:C,hasRichPreviews:w=!1,hasTextControl:S=!1,renderControlBottom:B=null}=e;void 0===k&&b&&(k=!0);const I=(0,a.useRef)(!0),x=(0,a.useRef)(),T=(0,a.useRef)(),[N,P]=(0,a.useState)((null==l?void 0:l.url)||""),[M,R]=(0,a.useState)((null==l?void 0:l.title)||""),L=_||N,[A,D]=(0,a.useState)(void 0!==v?v:!l||!l.url),O=(0,a.useRef)(!1),F=!(null!=L&&null!==(t=L.trim())&&void 0!==t&&t.length),{createPage:z,isCreatingPage:V,errorMessage:H}=function(e){const t=(0,a.useRef)(),[n,o]=(0,a.useState)(!1),[r,l]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),l(null);try{return t.current=N_(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw l(e.message||(0,g.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(b);function G(){var e;O.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),D(!1)}(0,a.useEffect)((()=>{void 0!==v&&v!==A&&D(v)}),[v]),(0,a.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=T&&T.current?1:0;(Jr.focus.focusable.find(x.current)[e]||x.current).focus(),O.current=!1}),[A,V]),(0,a.useEffect)((()=>{null!=l&&l.title&&l.title!==M&&R(l.title),null!=l&&l.url&&P(l.url)}),[l]);const U=()=>{L===(null==l?void 0:l.url)&&M===(null==l?void 0:l.title)||s({url:L,title:M}),G()},W=d&&l&&!A&&!V,$=!(null==i||!i.length),j=(null==l||null===(n=l.url)||void 0===n||null===(o=n.trim())||void 0===o?void 0:o.length)>0&&S;return(0,a.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},V&&(0,a.createElement)("div",{className:"block-editor-link-control__loading"},(0,a.createElement)(p.Spinner,null)," ",(0,g.__)("Creating"),"…"),(A||!l)&&!V&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":j})},j&&(0,a.createElement)(p.TextControl,{ref:T,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:M,onChange:R,onKeyDown:e=>{const{keyCode:t}=e;t!==Tc.ENTER||F||(e.preventDefault(),U())}}),(0,a.createElement)(E_,{currentLink:l,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:r,value:L,withCreateSuggestion:k,onCreateSuggestion:z,onChange:P,onSelect:e=>{s({...e,title:M||(null==e?void 0:e.title)}),G()},showInitialSuggestions:h,allowDirectEntry:!m,showSuggestions:f,suggestionsQuery:y,withURLSuggestion:!E,createSuggestionButtonText:C,useLabel:j},(0,a.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,a.createElement)(p.Button,{onClick:U,label:(0,g.__)("Submit"),icon:r_,className:"block-editor-link-control__search-submit",disabled:F})))),H&&(0,a.createElement)(p.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},H)),l&&!A&&!V&&(0,a.createElement)(T_,{key:null==l?void 0:l.url,value:l,onEditClick:()=>D(!0),hasRichPreviews:w,hasUnlinkControl:W,onRemove:d}),$&&(0,a.createElement)("div",{className:"block-editor-link-control__tools"},(0,a.createElement)(l_,{value:l,settings:i,onChange:s})),B&&B())}P_.ViewerFill=B_;var M_=P_;var R_=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));var L_=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));var A_=(0,p.withFilters)("editor.MediaUpload")((()=>null));var D_=function(e){let{fallback:t=null,children:n}=e;const o=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn);return!!t().mediaUpload}),[]);return o?n:t};var O_=(0,d.compose)([(0,m.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(zd.store);return{createNotice:t,removeNotice:n}})),(0,p.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:o,allowedTypes:r,accept:l,onError:i,onSelect:s,onSelectURL:c,onFilesUpload:d=u.noop,name:f=(0,g.__)("Replace"),createNotice:h,removeNotice:v,children:b,multiple:k=!1,addToGallery:_,handleUpload:y=!0}=e;const[E,C]=(0,a.useState)(t),w=(0,m.useSelect)((e=>e(qn).getSettings().mediaUpload),[]),S=(0,a.useRef)(),B=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),I=e=>{const t=(0,Jr.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{h("error",t,{speak:!0,id:B,isDismissible:!0})}),1e3)},x=(e,t)=>{t(),C(null==e?void 0:e.url),s(e),(0,Ft.speak)((0,g.__)("The media file has been replaced")),v(B)},T=e=>{e.keyCode===Tc.DOWN&&(e.preventDefault(),e.target.click())},N=k&&!(!r||0===r.length)&&r.every((e=>"image"===e||e.startsWith("image/")));return(0,a.createElement)(p.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(p.ToolbarButton,{ref:S,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:T},f)},renderContent:e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,a.createElement)(A_,{gallery:N,addToGallery:_,multiple:k,value:k?o:n,onSelect:e=>x(e,t),allowedTypes:r,render:e=>{let{open:t}=e;return(0,a.createElement)(p.MenuItem,{icon:R_,onClick:t},(0,g.__)("Open Media Library"))}}),(0,a.createElement)(D_,null,(0,a.createElement)(p.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!y)return t(),s(n);d(n),w({allowedTypes:r,filesList:n,onFileChange:e=>{let[n]=e;x(n,t)},onError:I})})(e,t)},accept:l,multiple:k,render:e=>{let{openFileDialog:t}=e;return(0,a.createElement)(p.MenuItem,{icon:L_,onClick:()=>{t()}},(0,g.__)("Upload"))}})),b),c&&(0,a.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,g.__)("Current media URL:")),(0,a.createElement)(M_,{value:{url:E},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;C(t),c(t),S.current.focus()}})))}})}));function F_(e){let{url:t,urlLabel:n,className:o}=e;const r=c()(o,"block-editor-url-popover__link-viewer-url");return t?(0,a.createElement)(p.ExternalLink,{className:r,href:t},n||(0,mp.filterURLForDisplay)((0,mp.safeDecodeURI)(t))):(0,a.createElement)("span",{className:r})}function z_(e){let{additionalControls:t,children:n,renderSettings:o,position:r="bottom center",focusOnMount:l="firstElement",...s}=e;const[c,u]=(0,a.useState)(!1),d=!!o&&c;return(0,a.createElement)(p.Popover,i({className:"block-editor-url-popover",focusOnMount:l,position:r},s),(0,a.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!o&&(0,a.createElement)(p.Button,{className:"block-editor-url-popover__settings-toggle",icon:Jp,label:(0,g.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),d&&(0,a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},o())),t&&!d&&(0,a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}z_.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:o,value:r,...l}=e;return(0,a.createElement)("form",i({className:c()("block-editor-url-popover__link-editor",n)},l),(0,a.createElement)(c_,{value:r,onChange:o,autocompleteRef:t}),(0,a.createElement)(p.Button,{icon:r_,label:(0,g.__)("Apply"),type:"submit"}))},z_.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:o,url:r,urlLabel:l,...s}=e;return(0,a.createElement)("div",i({className:c()("block-editor-url-popover__link-viewer",t)},s),(0,a.createElement)(F_,{url:r,urlLabel:l,className:n}),o&&(0,a.createElement)(p.Button,{icon:w_,label:(0,g.__)("Edit"),onClick:o}))};var V_=z_;const H_=e=>{let{src:t,onChange:n,onSubmit:o,onClose:r}=e;return(0,a.createElement)(V_,{onClose:r},(0,a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,g.__)("URL"),placeholder:(0,g.__)("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(p.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:r_,label:(0,g.__)("Apply"),type:"submit"})))};var G_=(0,p.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:o,icon:r,labels:l={},mediaPreview:i,notices:s,isAppender:d,accept:f,addToGallery:h,multiple:v=!1,handleUpload:b=!0,disableDropZone:k,disableMediaButtons:_,onError:y,onSelect:E,onCancel:C,onSelectURL:w,onDoubleClick:S,onFilesPreUpload:B=u.noop,onHTMLDrop:I=u.noop,children:x,mediaLibraryButton:T,placeholder:N,style:P}=e;const M=(0,m.useSelect)((e=>{const{getSettings:t}=e(qn);return t().mediaUpload}),[]),[R,L]=(0,a.useState)(""),[A,D]=(0,a.useState)(!1);(0,a.useEffect)((()=>{var e;L(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const O=e=>{L(e.target.value)},F=()=>{D(!0)},z=()=>{D(!1)},V=e=>{e.preventDefault(),R&&w&&(w(R),z())},H=e=>{if(!b)return E(e);let o;if(B(e),v)if(h){let e=[];o=n=>{const o=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));E(o.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else o=E;else o=e=>{let[t]=e;return E(t)};M({allowedTypes:n,filesList:e,onFileChange:o,onError:y})},G=e=>{H(e.target.files)},U=null!=N?N:e=>{let{instructions:t,title:u}=l;if(M||w||(t=(0,g.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[o]=e,r=1===e.length,l=r&&"audio"===o,i=r&&"image"===o,a=r&&"video"===o;void 0===t&&M&&(t=(0,g.__)("Upload a media file or pick one from your media library."),l?t=(0,g.__)("Upload an audio file, pick one from your media library, or add one with a URL."):i?t=(0,g.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,g.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,g.__)("Media"),l?u=(0,g.__)("Audio"):i?u=(0,g.__)("Image"):a&&(u=(0,g.__)("Video")))}const m=c()("block-editor-media-placeholder",o,{"is-appender":d});return(0,a.createElement)(p.Placeholder,{icon:r,label:u,instructions:t,className:m,notices:s,onDoubleClick:S,preview:i,style:P},e,x)},W=()=>k?null:(0,a.createElement)(p.DropZone,{onFilesDrop:H,onHTMLDrop:I}),$=()=>C&&(0,a.createElement)(p.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,g.__)("Cancel"),variant:"link",onClick:C},(0,g.__)("Cancel")),j=()=>w&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(p.Button,{className:"block-editor-media-placeholder__button",onClick:F,isPressed:A,variant:"tertiary"},(0,g.__)("Insert from URL")),A&&(0,a.createElement)(H_,{src:R,onChange:O,onSubmit:V,onClose:z}));return _?(0,a.createElement)(D_,null,W()):(0,a.createElement)(D_,{fallback:U(j())},(()=>{const e=null!=T?T:e=>{let{open:t}=e;return(0,a.createElement)(p.Button,{variant:"tertiary",onClick:()=>{t()}},(0,g.__)("Media Library"))},o=(0,a.createElement)(A_,{addToGallery:h,gallery:v&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:v,onSelect:E,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(M&&d)return(0,a.createElement)(a.Fragment,null,W(),(0,a.createElement)(p.FormFileUpload,{onChange:G,accept:f,multiple:v,render:e=>{let{openFileDialog:t}=e;const n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,g.__)("Upload")),o,j(),$());return U(n)}}));if(M){const e=(0,a.createElement)(a.Fragment,null,W(),(0,a.createElement)(p.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:G,accept:f,multiple:v},(0,g.__)("Upload")),o,j(),$());return U(e)}return U(o)})())}));var U_=e=>{let{colorSettings:t,...n}=e;const o=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...o}=e;return{...o,colorValue:t,onColorChange:n}}));return(0,a.createElement)(yk,i({settings:o,gradients:[],disableCustomGradients:!0},n))};const W_={position:"bottom right",isAlternate:!0};var $_=()=>(0,a.createElement)(a.Fragment,null,["bold","italic","link"].map((e=>(0,a.createElement)(p.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,a.createElement)(p.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,a.createElement)(p.ToolbarItem,null,(n=>(0,a.createElement)(p.DropdownMenu,{icon:Jp,label:(0,g.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,g.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:W_})))})));var j_=e=>{let{inline:t,anchorRef:n}=e;return t?(0,a.createElement)(p.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,a.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,a.createElement)(p.ToolbarGroup,null,(0,a.createElement)($_,null)))):(0,a.createElement)(ro,{group:"inline"},(0,a.createElement)($_,null))};function K_(){const{didAutomaticChange:e,getSettings:t}=(0,m.useSelect)(qn);return(0,d.useRefEffect)((n=>{function o(n){const{keyCode:o}=n;n.defaultPrevented||o!==Tc.DELETE&&o!==Tc.BACKSPACE&&o!==Tc.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}}),[])}function q_(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>``)).join("")}var Y_=window.wp.shortcode;function Q_(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function X_(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Z_(e){let{allowedFormats:t,formattingControls:n,disableFormats:o}=e;return o?Z_.EMPTY_ARRAY:t||n?t||(Vt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats",version:"6.2"}),n.map((e=>`core/${e}`))):void 0}Z_.EMPTY_ARRAY=[];function J_(e){let{value:t,pastedBlocks:n=[],onReplace:o,onSplit:r,onSplitMiddle:l,multilineTag:i}=e;if(!o||!r)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[d,p]=(0,z.split)(c),m=n.length>0;let f=-1;const g=(0,z.isEmpty)(d)&&!(0,z.isEmpty)(p);m&&(0,z.isEmpty)(d)||(u.push(r((0,z.toHTMLString)({value:d,multilineTag:i}),!g)),f+=1),m?(u.push(...n),f+=n.length):l&&u.push(l()),(m||l)&&(0,z.isEmpty)(p)||u.push(r((0,z.toHTMLString)({value:p,multilineTag:i}),g));o(u,m?f:1,m?-1:0)}function ey(e,t){return t?(0,z.replace)(e,/\n+/g,z.__UNSTABLE_LINE_SEPARATOR):(0,z.replace)(e,new RegExp(z.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function ty(e){const t=(0,a.useRef)(e);return t.current=e,(0,d.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:o,onChange:l,value:i,formatTypes:a,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:d,__unstableEmbedURLOnPaste:p,multilineTag:m,preserveWhiteSpace:f,pastePlainText:g}=t.current;if(!n)return;const{clipboardData:h}=e;let v="",b="";try{v=h.getData("text/plain"),b=h.getData("text/html")}catch(e){try{b=h.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const o="\x3c!--EndFragment--\x3e",r=e.indexOf(o);r>-1&&(e=e.substring(0,r));return e}(b),b=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",v),o)return void l((0,z.insert)(i,v));const k=a.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===i&&(e=n(i,{html:b,plainText:v})),e}),i);if(k!==i)return void l(k);const _=[...(0,Jr.getFilesFromDataTransfer)(h)];if("true"===h.getData("rich-text")){const e=h.getData("rich-text-multi-line-tag")||void 0;let t=(0,z.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:f});return t=ey(t,!!m),Q_(t,i.activeFormats),void l((0,z.insert)(i,t))}if(g)return void l((0,z.insert)(i,(0,z.create)({text:v})));if(null!=_&&_.length&&!Fm(_,b)){const e=(0,r.pasteHandler)({HTML:q_(_),mode:"BLOCKS",tagName:s,preserveWhiteSpace:f});return window.console.log("Received items:\n\n",_),void(c&&(0,z.isEmpty)(i)?c(e):J_({value:i,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}let y=c&&u?"AUTO":"INLINE";var E;"AUTO"===y&&(0,z.isEmpty)(i)&&(E=v,(0,Y_.regexp)(".*").test(E))&&(y="BLOCKS"),p&&(0,z.isEmpty)(i)&&(0,mp.isURL)(v.trim())&&(y="BLOCKS");const C=(0,r.pasteHandler)({HTML:b,plainText:v,mode:y,tagName:s,preserveWhiteSpace:f});if("string"==typeof C){let e=(0,z.create)({html:C});e=ey(e,!!m),Q_(e,i.activeFormats),l((0,z.insert)(i,e))}else C.length>0&&(c&&(0,z.isEmpty)(i)?c(C,C.length-1,-1):J_({value:i,pastedBlocks:C,onReplace:c,onSplit:u,onSplitMiddle:d,multilineTag:m}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function ny(e){let t=e.length;for(;t--;){const n=(0,u.findKey)(e[t].attributes,(e=>"string"==typeof e&&-1!==e.indexOf("†")));if(n)return e[t].attributes[n]=e[t].attributes[n].replace("†",""),e[t].clientId;const o=ny(e[t].innerBlocks);if(o)return o}}function oy(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,m.useDispatch)(qn),o=(0,a.useRef)(e);return o.current=e,(0,d.useRefEffect)((e=>{function l(){const{value:e,onReplace:t,selectionChange:l}=o.current;if(!t)return;const{start:i,text:a}=e;if(" "!==a.slice(i-1,i))return;const s=a.slice(0,i).trim(),c=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,r.findTransform)(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const d=(0,z.toHTMLString)({value:(0,z.insert)(e,"†",0,i)}),p=u.transform(d);l(ny([p])),t([p]),n()}function i(e){const{inputType:r,type:i}=e,{value:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=o.current;if("insertText"!==r&&"compositionend"!==i)return;c&&l&&l();const d=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:o}=e;return n{e.removeEventListener("input",i),e.removeEventListener("compositionend",i)}}),[])}function ry(e){const{__unstableMarkAutomaticChange:t}=(0,m.useDispatch)(qn),n=(0,a.useRef)(e);return n.current=e,(0,d.useRefEffect)((e=>{function o(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:o,value:l,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:d,onSplitAtEnd:p}=n.current;if(e.keyCode!==Tc.ENTER)return;e.preventDefault();const m={...l};m.formats=o(l);const f=i&&a;if(i){const e=(0,r.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,r.findTransform)(e,(e=>e.regExp.test(m.text)));n&&(i([n.transform({content:m.text})]),t())}if(c)e.shiftKey?d||u((0,z.insert)(m,"\n")):f&&(0,z.__unstableIsEmptyLine)(m)?J_({value:m,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:c}):u((0,z.__unstableInsertLineSeparator)(m));else{const{text:t,start:n,end:o}=m,r=p&&n===o&&o===t.length;e.shiftKey||!f&&!r?d||u((0,z.insert)(m,"\n")):!f&&r?p():f&&J_({value:m,onReplace:i,onSplit:a,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}}),[])}function ly(e){return e(z.store).getFormatTypes()}const iy=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function ay(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function sy(e){return(0,d.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function cy(){const{isMultiSelecting:e}=(0,m.useSelect)(qn);return(0,d.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function uy(e){let{formatTypes:t,onChange:n,onFocus:o,value:r,forwardedRef:l}=e;return t.map((e=>{const{name:t,edit:i}=e;if(!i)return null;const s=(0,z.getActiveFormat)(r,t);let c=void 0!==s;const d=(0,z.getActiveObject)(r),p=void 0!==d&&d.type===t;if("core/link"===t&&!(0,z.isCollapsed)(r)){const e=r.formats,t=(0,u.find)(e[r.start],{type:"core/link"}),n=(0,u.find)(e[r.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,a.createElement)(i,{key:t,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:p,activeObjectAttributes:p&&d.attributes||{},value:r,onChange:n,onFocus:o,contentRef:l})}))}const dy=(0,a.createContext)(),py=(0,a.createContext)();const my=(0,a.forwardRef)((function e(t,n){let{children:o,tagName:l="div",value:s="",onChange:f,isSelected:g,multiline:h,inlineToolbar:v,wrapperClassName:b,autocompleters:k,onReplace:_,placeholder:y,allowedFormats:E,formattingControls:C,withoutInteractiveFormatting:w,onRemove:S,onMerge:B,onSplit:I,__unstableOnSplitAtEnd:x,__unstableOnSplitMiddle:T,identifier:N,preserveWhiteSpace:P,__unstablePastePlainText:M,__unstableEmbedURLOnPaste:R,__unstableDisableFormats:L,disableLineBreaks:A,unstableOnFocus:D,__unstableAllowPrefixTransformations:O,...F}=t;const V=(0,d.useInstanceId)(e);N=N||V,F=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(F);const H=(0,a.useRef)(),{clientId:G}=Zn(),{selectionStart:U,selectionEnd:W,isSelected:$}=(0,m.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(qn),o=t(),r=n();let l;return void 0===g?l=o.clientId===G&&r.clientId===G&&o.attributeKey===N:g&&(l=o.clientId===G),{selectionStart:l?o.offset:void 0,selectionEnd:l?r.offset:void 0,isSelected:l}})),{selectionChange:j}=(0,m.useDispatch)(qn),K=X_(h),q=Z_({allowedFormats:E,formattingControls:C,disableFormats:L}),Y=!q||q.length>0;let Q=s,X=f;Array.isArray(s)&&(Q=r.children.toHTML(s),X=e=>f(r.children.fromDOM((0,z.__unstableCreateElement)(document,e).childNodes)));const Z=(0,a.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t;("number"==typeof e||o)&&(n.start={clientId:G,attributeKey:N,offset:e}),("number"==typeof t||o)&&(n.end={clientId:G,attributeKey:N,offset:t}),j(n)}),[G,N]),{formatTypes:J,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:oe}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:o,allowedFormats:r}=e;const l=(0,m.useSelect)(ly,[]),i=(0,a.useMemo)((()=>l.filter((e=>{let{name:t,tagName:n}=e;return!(r&&!r.includes(t)||o&&iy.has(n))}))),[l,r,iy]),s=(0,m.useSelect)((e=>i.reduce(((o,r)=>(r.__experimentalGetPropsForEditableTreePreparation&&(o[r.name]=r.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),o)),{})),[i,t,n]),c=(0,m.useDispatch)(),u=[],d=[],p=[],f=[];return i.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const o=s[e.name],r=e.__experimentalCreatePrepareEditableTree(o,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?d.push(r):u.push(r);for(const e in o)f.push(o[e])}if(e.__experimentalCreateOnChangeEditableValue){let o={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(o=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),p.push(e.__experimentalCreateOnChangeEditableValue({...s[e.name]||{},...o},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:i,prepareHandlers:u,valueHandlers:d,changeHandlers:p,dependencies:f}}({clientId:G,identifier:N,withoutInteractiveFormatting:w,allowedFormats:q});function re(e){return J.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,z.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:le,onChange:ie,ref:ae}=(0,z.__unstableUseRichText)({value:Q,onChange(e,t){let{__unstableFormats:n,__unstableText:o}=t;X(e),Object.values(ne).forEach((e=>{e(n,o)}))},selectionStart:U,selectionEnd:W,onSelectionChange:Z,placeholder:y,__unstableIsSelected:$,__unstableMultilineTag:K,__unstableDisableFormats:L,preserveWhiteSpace:P,__unstableDependencies:[...oe,l],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:re,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),se=function(e){return(0,p.__unstableUseAutocompleteProps)({...e,completers:ib(e)})}({onReplace:_,completers:k,record:le,onChange:ie});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:o}=(0,m.useSelect)(qn),{enterFormattedText:r,exitFormattedText:l}=(0,m.useDispatch)(qn);(0,a.useEffect)((()=>{n?o()||r():o()&&l()}),[n])}({value:le}),function(e){let{html:t,value:n}=e;const o=(0,a.useRef)(),r=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:l}=(0,m.useDispatch)(qn);(0,a.useLayoutEffect)((()=>{if(o.current){if(o.current!==n.text){const e=window.setTimeout((()=>{l()}),1e3);return o.current=n.text,()=>{window.clearTimeout(e)}}l()}else o.current=n.text}),[t,r])}({html:Q,value:le});const ce=(0,a.useRef)(new Set),ue=(0,a.useRef)(new Set);function de(){H.current.focus()}const pe=l,me=(0,a.createElement)(a.Fragment,null,$&&(0,a.createElement)(dy.Provider,{value:ce},(0,a.createElement)(py.Provider,{value:ue},(0,a.createElement)(p.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},o&&o({value:le,onChange:ie,onFocus:de}),(0,a.createElement)(uy,{value:le,onChange:ie,onFocus:de,formatTypes:J,forwardedRef:H})))),$&&Y&&(0,a.createElement)(j_,{inline:v,anchorRef:H.current}),(0,a.createElement)(pe,i({role:"textbox","aria-multiline":!A,"aria-label":y},F,se,{ref:(0,d.useMergeRefs)([n,se.ref,F.ref,ae,oy({value:le,onChange:ie,__unstableAllowPrefixTransformations:O,formatTypes:J,onReplace:_,selectionChange:j}),(0,d.useRefEffect)((e=>{function t(e){(Tc.isKeyboardEvent.primary(e,"z")||Tc.isKeyboardEvent.primary(e,"y")||Tc.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),ay(ce),sy(ue),K_(),ty({isSelected:$,disableFormats:L,onChange:ie,value:le,formatTypes:J,tagName:l,onReplace:_,onSplit:I,onSplitMiddle:T,__unstableEmbedURLOnPaste:R,multilineTag:K,preserveWhiteSpace:P,pastePlainText:M}),ry({removeEditorOnlyFormats:re,value:le,onReplace:_,onSplit:I,onSplitMiddle:T,multilineTag:K,onChange:ie,disableLineBreaks:A,onSplitAtEnd:x}),cy(),H]),contentEditable:!0,suppressContentEditableWarning:!0,className:c()("block-editor-rich-text__editable",F.className,"rich-text"),onFocus:D,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===Tc.DELETE||t===Tc.BACKSPACE)){const{start:n,end:o,text:r}=le,l=t===Tc.BACKSPACE,i=le.activeFormats&&!!le.activeFormats.length;if(!(0,z.isCollapsed)(le)||i||l&&0!==n||!l&&o!==r.length)return;B&&B(!l),S&&(0,z.isEmpty)(le)&&l&&S(!l),e.preventDefault()}}})));if(!b)return me;Vt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div",version:"6.2"});const fe=c()("block-editor-rich-text",b);return(0,a.createElement)("div",{className:fe},me)}));my.Content=e=>{let{value:t,tagName:n,multiline:o,...l}=e;Array.isArray(t)&&(t=r.children.toHTML(t));const i=X_(o);!t&&i&&(t=`<${i}>`);const s=(0,a.createElement)(a.RawHTML,null,t);return n?(0,a.createElement)(n,(0,u.omit)(l,["format"]),s):s},my.isEmpty=e=>!e||0===e.length;var fy=my;const gy=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(fy,i({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));gy.Content=e=>{let{value:t="",tagName:n="div",...o}=e;return(0,a.createElement)(n,o,t)};var hy=gy;var vy=(0,a.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...o}=e;if(2===n)return(0,a.createElement)(hy,i({ref:t},o));const{className:r,onChange:l,...s}=o;return(0,a.createElement)(vl.Z,i({ref:t,className:c()("block-editor-plain-text",r),onChange:e=>l(e.target.value)},s))}));function by(e){let{property:t,viewport:n,desc:o}=e;const r=(0,d.useInstanceId)(by),l=o||(0,g.sprintf)((0,g._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{"aria-describedby":`rbc-desc-${r}`},n.label),(0,a.createElement)(p.VisuallyHidden,{as:"span",id:`rbc-desc-${r}`},l))}var ky=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:l,renderResponsiveControls:i,isResponsive:s=!1,defaultLabel:u={id:"all",label:(0,g.__)("All")},viewports:d=[{id:"small",label:(0,g.__)("Small screens")},{id:"medium",label:(0,g.__)("Medium screens")},{id:"large",label:(0,g.__)("Large screens")}]}=e;if(!t||!n||!l)return null;const m=o||(0,g.sprintf)((0,g.__)("Use the same %s on all screensizes."),n),f=(0,g.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),h=l((0,a.createElement)(by,{property:n,viewport:u}),u);return(0,a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,a.createElement)(p.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!s,onChange:r,help:f}),(0,a.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&h,s&&(i?i(d):d.map((e=>(0,a.createElement)(a.Fragment,{key:e.id},l((0,a.createElement)(by,{property:n,viewport:e}),e))))))))};function _y(e){let{character:t,type:n,onUse:o}=e;const r=(0,a.useContext)(dy),l=(0,a.useRef)();return l.current=o,(0,a.useEffect)((()=>{function e(e){Tc.isKeyboardEvent[n](e,t)&&(l.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t,n]),null}function yy(e){let t,{name:n,shortcutType:o,shortcutCharacter:r,...l}=e,s="RichText.ToolbarControls";return n&&(s+=`.${n}`),o&&r&&(t=Tc.displayShortcut[o](r)),(0,a.createElement)(p.Fill,{name:s},(0,a.createElement)(p.ToolbarButton,i({},l,{shortcut:t})))}function Ey(e){let{inputType:t,onInput:n}=e;const o=(0,a.useContext)(py),r=(0,a.useRef)();return r.current=n,(0,a.useEffect)((()=>{function e(e){e.inputType===t&&(r.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t]),null}const Cy=(0,a.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(p.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var wy=(0,a.forwardRef)((function(e,t){const n=(0,m.useSelect)((e=>e(qn).isNavigationMode()),[]),{setNavigationMode:o}=(0,m.useDispatch)(qn),r=e=>{o("edit"!==e)};return(0,a.createElement)(p.Dropdown,{renderToggle:o=>{let{isOpen:r,onToggle:l}=o;return(0,a.createElement)(p.Button,i({},e,{ref:t,icon:n?Cy:w_,"aria-expanded":r,"aria-haspopup":"true",onClick:l,label:(0,g.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.NavigableMenu,{role:"menu","aria-label":(0,g.__)("Tools")},(0,a.createElement)(p.MenuItemsChoice,{value:n?"select":"edit",onSelect:r,choices:[{value:"edit",label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(wr,{icon:w_}),(0,g.__)("Edit"))},{value:"select",label:(0,a.createElement)(a.Fragment,null,Cy,(0,g.__)("Select"))}]})),(0,a.createElement)("div",{className:"block-editor-tool-selector__help"},(0,g.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function Sy(e){let{units:t,...n}=e;const o=(0,p.__experimentalUseCustomUnits)({availableUnits:Io("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,a.createElement)(p.__experimentalUnitControl,i({units:o},n))}var By=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class Iy extends a.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,o=e?(0,g.__)("Edit link"):(0,g.__)("Insert link");return(0,a.createElement)("div",{className:"block-editor-url-input__button"},(0,a.createElement)(p.Button,{icon:fg,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,a.createElement)(p.Button,{className:"block-editor-url-input__back",icon:By,label:(0,g.__)("Close"),onClick:this.toggle}),(0,a.createElement)(c_,{value:e||"",onChange:t}),(0,a.createElement)(p.Button,{icon:r_,label:(0,g.__)("Submit"),type:"submit"}))))}}var xy=Iy;var Ty=(0,a.createElement)(O.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(O.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const Ny="none",Py="custom",My="media",Ry="attachment",Ly=["noreferrer","noopener"],Ay=(0,a.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(p.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,a.createElement)(p.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,a.createElement)(p.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Dy=e=>{let{linkDestination:t,onChangeUrl:n,url:o,mediaType:r="image",mediaUrl:l,mediaLink:i,linkTarget:s,linkClass:c,rel:d}=e;const[m,f]=(0,a.useState)(!1),h=(0,a.useCallback)((()=>{f(!0)})),[v,b]=(0,a.useState)(!1),[k,_]=(0,a.useState)(null),y=(0,a.useRef)(null),E=(0,a.useCallback)((()=>{t!==My&&t!==Ry||_(""),b(!0)})),C=(0,a.useCallback)((()=>{b(!1)})),w=(0,a.useCallback)((()=>{_(null),C(),f(!1)})),S=(0,a.useCallback)((()=>e=>{const t=y.current;t&&t.contains(e.target)||(f(!1),_(null),C())})),B=(0,a.useCallback)((()=>e=>{if(k){var t;const e=(null===(t=x().find((e=>e.url===k)))||void 0===t?void 0:t.linkDestination)||Py;n({href:k,linkDestination:e})}C(),_(null),e.preventDefault()})),I=(0,a.useCallback)((()=>{n({linkDestination:Ny,href:""})})),x=()=>{const e=[{linkDestination:My,title:(0,g.__)("Media File"),url:"image"===r?l:void 0,icon:Ay}];return"image"===r&&i&&e.push({linkDestination:Ry,title:(0,g.__)("Attachment Page"),url:"image"===r?i:void 0,icon:(0,a.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(p.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,a.createElement)(p.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},T=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ToggleControl,{label:(0,g.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=d?d:"").split(" ");Ly.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=d?d:"").split(" ").filter((e=>!1===Ly.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,a.createElement)(p.TextControl,{label:(0,g.__)("Link Rel"),value:null!=d?d:"",onChange:e=>{n({rel:e})}}),(0,a.createElement)(p.TextControl,{label:(0,g.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),N=null!==k?k:o,P=((0,u.find)(x(),["linkDestination",t])||{}).title;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.ToolbarButton,{icon:fg,className:"components-toolbar__control",label:o?(0,g.__)("Edit link"):(0,g.__)("Insert link"),"aria-expanded":m,onClick:h}),m&&(0,a.createElement)(V_,{onFocusOutside:S(),onClose:w,renderSettings:()=>T,additionalControls:!N&&(0,a.createElement)(p.NavigableMenu,null,(0,u.map)(x(),(e=>(0,a.createElement)(p.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const t=x();let o;o=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:Py}).linkDestination:Ny,n({linkDestination:o,href:e})})(e.url),C()}},e.title))))},(!o||v)&&(0,a.createElement)(V_.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:N,onChangeInputValue:_,onSubmit:B(),autocompleteRef:y}),o&&!v&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(V_.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:E,urlLabel:P}),(0,a.createElement)(p.Button,{icon:Ty,label:(0,g.__)("Remove link"),onClick:I}))))};function Oy(e){let{children:t,className:n,isEnabled:o=!0,deviceType:r,setDeviceType:l}=e;if((0,d.useViewportMatch)("small","<"))return null;const i={className:c()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!o,children:(0,g.__)("Preview")};return(0,a.createElement)(p.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:i,toggleProps:s,icon:null},(()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(p.MenuGroup,null,(0,a.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Desktop"),icon:"Desktop"===r&&hm},(0,g.__)("Desktop")),(0,a.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Tablet"),icon:"Tablet"===r&&hm},(0,g.__)("Tablet")),(0,a.createElement)(p.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>l("Mobile"),icon:"Mobile"===r&&hm},(0,g.__)("Mobile"))),t)))}function Fy(e){const[t,n]=(0,a.useState)(window.innerWidth);(0,a.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const o=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:o(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var zy=(0,m.withSelect)((e=>({selectedBlockClientId:e(qn).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=Eo(t);return t?(0,a.createElement)(p.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,g.__)("Skip to the selected block")):null})),Vy=window.wp.wordcount;var Hy=(0,m.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(qn);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Vy.count)((0,r.serialize)(t),"words");return(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,a.createElement)(Wc,{icon:mm,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,g.sprintf)((0,g._n)("%d block","%d blocks",t.length),t.length)),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,g.sprintf)((0,g._n)("%d word","%d words",n),n))))}));function Gy(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:o,styles:l}=(0,m.useSelect)((e=>{var n,o;const l=e(qn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==l||null===(n=l.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(o=null==l?void 0:l.onChange)&&void 0!==o?o:null,styles:e(r.store).getBlockStyles(t)}}),[t]),i=(0,a.useMemo)((()=>[{label:(0,g.__)("Not set"),value:""},...l.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[l]),s=(0,a.useMemo)((()=>{var e;return null===(e=_m(l))||void 0===e?void 0:e.name}),[l]),c=(0,a.useCallback)((e=>{o(t,e)}),[t,o]);return n&&n!==s?o&&(0,a.createElement)("div",{className:"default-style-picker__default-switcher"},(0,a.createElement)(p.SelectControl,{options:i,value:n||"",label:(0,g.__)("Default Style"),onChange:c})):null}const Uy=e=>{let{clientId:t,blockName:n,hasBlockStyles:o}=e;const l=Gp(t);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)($c,l),(0,a.createElement)(ik,{blockClientId:t}),o&&(0,a.createElement)("div",null,(0,a.createElement)(p.PanelBody,{title:(0,g.__)("Styles")},(0,a.createElement)(Wb,{scope:"core/block-inspector",clientId:t}),(0,r.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,a.createElement)(Gy,{blockName:n}))),(0,a.createElement)(zo.Slot,null),(0,a.createElement)(zo.Slot,{__experimentalGroup:"color",label:(0,g.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(zo.Slot,{__experimentalGroup:"typography",label:(0,g.__)("Typography")}),(0,a.createElement)(zo.Slot,{__experimentalGroup:"dimensions",label:(0,g.__)("Dimensions")}),(0,a.createElement)(zo.Slot,{__experimentalGroup:"border",label:(0,g.__)("Border")}),(0,a.createElement)("div",null,(0,a.createElement)(Wy,null)),(0,a.createElement)(zy,{key:"back"}))},Wy=()=>{const e=(0,p.__experimentalUseSlot)(Fo.slotName);return Boolean(e.fills&&e.fills.length)?(0,a.createElement)(p.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,g.__)("Advanced"),initialOpen:!1},(0,a.createElement)(zo.Slot,{__experimentalGroup:"advanced"})):null};var $y=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,hasBlockStyles:o,selectedBlockName:l,selectedBlockClientId:i,blockType:s}=(0,m.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:o}=e(qn),{getBlockStyles:l}=e(r.store),i=t(),a=i&&o(i),s=a&&(0,r.getBlockType)(a),c=a&&l(a);return{count:n(),selectedBlockClientId:i,selectedBlockName:a,blockType:s,hasBlockStyles:c&&c.length>0}}),[]);if(n>1)return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Hy,null),(0,a.createElement)(zo.Slot,null),(0,a.createElement)(zo.Slot,{__experimentalGroup:"color",label:(0,g.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(zo.Slot,{__experimentalGroup:"typography",label:(0,g.__)("Typography")}),(0,a.createElement)(zo.Slot,{__experimentalGroup:"dimensions",label:(0,g.__)("Dimensions")}),(0,a.createElement)(zo.Slot,{__experimentalGroup:"border",label:(0,g.__)("Border")}));const c=l===(0,r.getUnregisteredTypeHandlerName)();return s&&i&&!c?(0,a.createElement)(Uy,{clientId:i,blockName:s.name,hasBlockStyles:o}):t?(0,a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,g.__)("No block selected.")):null};function jy(e){let{children:t,__unstableContentRef:n,...o}=e;const r=(0,d.useViewportMatch)("medium"),l=(0,m.useSelect)((e=>e(qn).getSettings().hasFixedToolbar),[]),s=(0,tu.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:c,getBlockRootClientId:f}=(0,m.useSelect)(qn),{duplicateBlocks:g,removeBlocks:h,insertAfterBlock:v,insertBeforeBlock:b,clearSelectedBlock:k,moveBlocksUp:_,moveBlocksDown:y}=(0,m.useDispatch)(qn);return(0,a.createElement)("div",i({},o,{onKeyDown:function(e){if(s("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));_(t,n)}}else if(s("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=f((0,u.first)(t));y(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),g(t))}else if(s("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),h(t))}else if(s("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),v((0,u.last)(t)))}else if(s("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(s("core/block-editor/unselect",e)){c().length>1&&(e.preventDefault(),k(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}}),(0,a.createElement)(Fp,{__unstableContentRef:n},(l||!r)&&(0,a.createElement)(bf,{isFixed:!0}),(0,a.createElement)(Ef,{__unstableContentRef:n}),(0,a.createElement)(p.Popover.Slot,{name:"block-toolbar",ref:Ap(n)}),t,(0,a.createElement)(p.Popover.Slot,{name:"__unstable-block-tools-after",ref:Ap(n)})))}var Ky=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:c,onSelect:d=u.noop,shouldFocusBlock:p=!1}=e;const f=(0,m.useSelect)((e=>{const{getBlockRootClientId:t}=e(qn);return n||t(o)||void 0}),[o,n]);return(0,a.createElement)(Sp,{onSelect:d,rootClientId:f,clientId:o,isAppender:r,showInserterHelpPanel:l,showMostUsedBlocks:i,__experimentalInsertionIndex:s,__experimentalFilterValue:c,shouldFocusBlock:p,ref:t})}));function qy(){return null}qy.Register=function(){const{registerShortcut:e}=(0,m.useDispatch)(tu.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,g.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,g.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,g.__)("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,g.__)("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,g.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,g.__)("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,g.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,g.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,g.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,g.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Yy=qy;function Qy(){return Vt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const Xy=new Set([Tc.UP,Tc.RIGHT,Tc.DOWN,Tc.LEFT,Tc.ENTER,Tc.BACKSPACE]);function Zy(){const e=(0,m.useSelect)((e=>e(qn).isTyping()),[]),{stopTyping:t}=(0,m.useDispatch)(qn);return(0,d.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,l;function i(e){const{clientX:n,clientY:o}=e;r&&l&&(r!==n||l!==o)&&t(),r=n,l=o}return o.addEventListener("mousemove",i),()=>{o.removeEventListener("mousemove",i)}}),[e,t])}function Jy(){const e=(0,m.useSelect)((e=>e(qn).isTyping())),{startTyping:t,stopTyping:n}=(0,m.useDispatch)(qn),o=Zy(),r=(0,d.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:l}=r;if(e){let a;function s(e){const{target:t}=e;a=l.setTimeout((()=>{(0,Jr.isTextField)(t)||n()}))}function c(e){const{keyCode:t}=e;t!==Tc.ESCAPE&&t!==Tc.TAB||n()}function u(){const e=l.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return o.addEventListener("focus",s),o.addEventListener("keydown",c),r.addEventListener("selectionchange",u),()=>{l.clearTimeout(a),o.removeEventListener("focus",s),o.removeEventListener("keydown",c),r.removeEventListener("selectionchange",u)}}function i(e){const{type:n,target:r}=e;(0,Jr.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&Xy.has(t)}(e))&&t()}return o.addEventListener("keypress",i),o.addEventListener("keydown",i),()=>{o.removeEventListener("keypress",i),o.removeEventListener("keydown",i)}}),[e,t,n]);return(0,d.useMergeRefs)([o,r])}var eE=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:Jy()},t)};const tE=-1!==window.navigator.userAgent.indexOf("Trident"),nE=new Set([Tc.UP,Tc.DOWN,Tc.LEFT,Tc.RIGHT]);function oE(){const e=(0,m.useSelect)((e=>e(qn).hasSelectedBlock()),[]);return(0,d.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,l,i;function a(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function s(e){l&&o.cancelAnimationFrame(l),l=o.requestAnimationFrame((()=>{c(e),l=null}))}function c(e){let{keyCode:r}=e;if(!m())return;const l=(0,Jr.computeCaretRect)(o);if(!l)return;if(!i)return void(i=l);if(nE.has(r))return void(i=l);const a=l.top-i.top;if(0===a)return;const s=(0,Jr.getScrollContainer)(t);if(!s)return;const c=s===n.body,u=c?o.scrollY:s.scrollTop,d=c?0:s.getBoundingClientRect().top,p=c?i.top/o.innerHeight:(i.top-d)/(o.innerHeight-d);if(0===u&&p<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(i=l);const f=c?o.innerHeight:s.clientHeight;i.top+i.height>d+f||i.top{o.removeEventListener("scroll",a,!0),o.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(l)}}),[e])}var rE=tE?e=>e.children:function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:oE(),className:"block-editor__typewriter"},t)};const lE=(0,a.createContext)({});function iE(e,t,n){const o={...e,[t]:e[t]?new Set(e[t]):new Set};return o[t].add(n),o}function aE(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const o=(0,a.useContext)(lE),{name:r}=Zn();n=n||r;const l=Boolean(null===(t=o[n])||void 0===t?void 0:t.has(e)),i=(0,a.useMemo)((()=>iE(o,n,e)),[o,n,e]),s=(0,a.useCallback)((e=>{let{children:t}=e;return(0,a.createElement)(lE.Provider,{value:i},t)}),[i]);return[l,s]}const sE=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,u.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};function cE(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function uE(e,t){const n=e.split(/[(),]/g).filter(Boolean),o=n.slice(1).map((e=>cE(gE(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...o)+"px";case"max":return Math.max(...o)+"px";case"clamp":return 3!==o.length?null:o[1]o[2]?o[2]+"px":o[1]+"px";case"calc":return o[0]+"px"}}function dE(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=uE(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return cE(e)}function pE(e){for(let t=0;tr.height?r.width:r.height)*o,"%":("font"===r.type?r.fontSize:r.width)*o,ch:8,ex:7.15625,lh:r.lineHeight},i={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":null}function gE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=cE(e);return n.unit||(n=dE(e)),pE(e)&&!n.unit?mE(e):fE(n,t)}const hE={};function vE(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var bE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+vE(t);return hE[n]||(hE[n]=gE(e,t)),hE[n]}}(),(window.wp=window.wp||{}).blockEditor=o}(); \ No newline at end of file + */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var l=document.createElement("div");l.setAttribute(n,"return;"),i="function"==typeof l[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},195:function(e,t,n){"use strict";var r=n(3812),o=n(7939);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},8383:function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=n(4418),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=l(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var y=c&&n;if(a&&e.length>0&&!o.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},131:function(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,l){if(l!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-1?o(n):n}},9386:function(e,t,n){"use strict";var r=n(5127),o=n(8024),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6850:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},330:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1489);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1489:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9277:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1312:function(e,t,n){"use strict";var r=n(2137),o=n(6073),i=r("RegExp.prototype.exec"),l=n(1642);e.exports=function(e){if(!o(e))throw new l("`regex` must be a RegExp");return function(t){return null!==i(e,t)}}},2137:function(e,t,n){"use strict";var r=n(5273),o=n(381),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},381:function(e,t,n){"use strict";var r=n(3331),o=n(5273),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7780:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},6339:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6789);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6789:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6073:function(e,t,n){"use strict";var r,o,i,l,a=n(2137),s=n(4111)();if(s){r=a("Object.prototype.hasOwnProperty"),o=a("RegExp.prototype.exec"),i={};var c=function(){throw i};l={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=p(e,"lastIndex");if(!(t&&r(t,"value")))return!1;try{o(e,l)}catch(e){return e===i}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},4521:function(e,t,n){"use strict";var r=n(1757),o=n(2656),i=n(8594)(),l=n(3828),a=n(1642),s=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&l){var u=l(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},5371:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8594:function(e,t,n){"use strict";var r=n(8918),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1207:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(2326);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},2326:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3124:function(e,t,n){"use strict";var r=n(4010),o=n(1140),i=n(3828);function l(e){return Object.prototype.toString.call(e)}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n2?arguments[2]:g,l=i.includeSymbols?d:c,u=!!i.immutable;return function e(c){var p=u?m(c,i):c,d={},g=!0,h={node:p,node_:c,path:[].concat(n),parent:r[r.length-1],parents:r,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){a(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){o=!1},block:function(){g=!1}};if(!o)return h;function b(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0===h.keys.length;for(var e=0;e1?arguments[1]:g,this.value=e}function v(e){var t=arguments.length>1?arguments[1]:g;return new b(e,t)}b.prototype.get=function(e){for(var t=this.value,n=0;t&&n-1?o(n):n}},8388:function(e,t,n){"use strict";var r=n(7715),o=n(1634),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},9003:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},263:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(9184);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},9184:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7046:function(e,t,n){"use strict";var r=n(4843),o=n(2526),i=n(4343)(),l={},a=n(1856)(),s=n(3828),c=Object.defineProperty;if(s){var u=function(e){return e.byteOffset};r(i,(function(e){if("function"==typeof n.g[e]||"object"==typeof n.g[e]){var t=n.g[e].prototype,r=s(t,"byteOffset");if(!r&&a){var i=t.__proto__;r=s(i,"byteOffset")}if(r&&r.get)l[e]=o(r.get);else if(c){var p=new n.g[e](2);(r=s(p,"byteOffset"))&&r.configurable&&c(p,"length",{value:3}),2===p.length&&(l[e]=u)}}}))}var p=n(2527);e.exports=function(e){return!!p(e)&&function(e){var t;return r(l,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},2526:function(e,t,n){"use strict";var r=n(1530),o=n(3699),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},1609:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5162:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(3903);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},3903:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},8150:function(e,t,n){"use strict";var r=n(4888),o=n(4843),i=n(3828),l=n(1856)(),a=n(2527),s=n(131),c={__proto__:null},u=Object.defineProperty;if(i){var p=function(e){return e.length};o(s,(function(e){var t=n.g[e];if("function"==typeof t||"object"==typeof t){var o=t.prototype,a=i(o,"length");if(!a&&l){var s=o.__proto__;a=i(s,"length")}if(a&&a.get)c["$"+e]=r(a.get);else if(u){var d=new n.g[e](2);(a=i(d,"length"))&&a.configurable&&u(d,"length",{value:3}),2===d.length&&(c["$"+e]=p)}}}))}e.exports=function(e){return!!a(e)&&function(e){var t;return o(c,(function(n){if("number"!=typeof t)try{var r=n(e);"number"==typeof r&&(t=r)}catch(e){}})),t}(e)}},4888:function(e,t,n){"use strict";var r=n(3576),o=n(8031),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7380:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},307:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1766);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1766:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4073:function(e,t,n){"use strict";var r=n(1642),o=n(3675),i=n(9661),l=n(1320),a=n(1367),s=n(2967),c=n(8055),u=n(3383),p=n(2897),d=n(7249),f=n(9149),y=n(1586),m=n(817),g=n(3842),h=n(6740),b=n(7046);e.exports=function(e,t){var n=this;g(n,"SEQ-CST");var v,_=n.length,k=p(e);v=k===-1/0?0:k<0?a(_+k,0):s(k,_);var E,S=void 0===t?_:p(t);E=S===-1/0?0:S<0?a(_+S,0):s(S,_);var w=a(E-v,0),A=m(n,[w]);if(w>0){if(l(h(n)))throw new r("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");if(y(n)===y(A))for(var C=h(n),I=h(A),x=f(n),B=v*x+b(n),P=b(A),T=P+w*x;P-1?o(n):n}},8374:function(e,t,n){"use strict";var r=n(8474),o=n(682),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},6776:function(e,t,n){"use strict";var r=n(806),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,l=Array.prototype.concat,a=n(2656),s=n(8198)(),c=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())return;var o;s?a(e,t,n,!0):a(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=l.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},5314:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(6188);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},6188:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},6841:function(e){"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,l=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!l(e)&&(r.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),p=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(p=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!l(e)&&a(e)}:function(e){if(p(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(l(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},589:function(e,t,n){"use strict";var r=n(1154)("SharedArrayBuffer.prototype.byteLength",!0);e.exports=r?function(e){if(!e||"object"!=typeof e)return!1;try{return r(e),!0}catch(e){return!1}}:function(e){return!1}},5726:function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,l=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,_=String.prototype.toUpperCase,k=String.prototype.toLowerCase,E=RegExp.prototype.test,S=Array.prototype.concat,w=Array.prototype.join,A=Array.prototype.slice,C=Math.floor,I="function"==typeof BigInt?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===P||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var o=String(r),i=b.call(t,o.length+1);return v.call(o,n,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,n,"$&_")}var F=n(5794),M=F.custom,D=z(M)?M:null;function L(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return v.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||T&&"object"==typeof e&&T in e)}function V(e){return!("[object RegExp]"!==W(e)||T&&"object"==typeof e&&T in e)}function z(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(H(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!H(s,"customInspect")||s.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return K(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return _?R(t,E):E}if("bigint"==typeof t){var C=String(t)+"n";return _?R(t,C):C}var x=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=x&&x>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if($(a,t)>=0)return"[Circular]";function G(t,n,r){if(n&&(a=A.call(a)).push(n),r){var i={depth:s.depth};return H(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!V(t)){var q=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=Z(t,G);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+w.call(ee,", ")+" }":"")}if(z(t)){var te=P?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||P?te:J(te)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var ne="<"+k.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(j(t)){if(0===t.length)return"[]";var ie=Z(t,G);return M&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+X(ie,M)+"]":"[ "+w.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)){var le=Z(t,G);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===le.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(le,", ")+" }":"{ ["+String(t)+"] "+w.call(S.call("[cause]: "+G(t.cause),le),", ")+" }"}if("object"==typeof t&&m){if(D&&"function"==typeof t[D]&&F)return F(t,{depth:x-o});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return l&&l.call(t,(function(e,n){ae.push(G(n,t,!0)+" => "+G(e,t))})),Q("Map",i.call(t),ae,M)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(G(e,t))})),Q("Set",c.call(t),se,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}(t))return J(G(I.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(y.call(t));if(function(e){return!("[object String]"!==W(e)||T&&"object"==typeof e&&T in e)}(t))return J(G(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||T&&"object"==typeof e&&T in e)}(t)&&!V(t)){var ce=Z(t,G),ue=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&T&&Object(t)===t&&T in t?b.call(W(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+w.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===ce.length?fe+"{}":M?fe+"{"+X(ce,M)+"}":fe+"{ "+w.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function W(e){return m.call(e)}function $(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(b.call(e,0,t.maxStringLength),t)+r}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?X(n,r):w.call(n,", "))+"}"}function X(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function Z(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?t:"Object"===t&&function(e){var t=!1;return r(m,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return a?function(e){var t=!1;return r(m,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},7120:function(e,t,n){"use strict";var r=n(6883),o=n(4899),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},4899:function(e,t,n){"use strict";var r=n(7961),o=n(6883),i=n(4521),l=n(1642),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,a),u=n(8918),p=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new l("a function is required");var t=c(r,s,arguments);return i(t,1+p(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},7562:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",i=function(e,t){for(var n=[],r=0;r1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R(e),r=n.length>0?n[0]:"",o=F("%"+r+"%",t),i=o.name,l=o.value,a=!1,u=o.alias;u&&(r=u[0],x(n,I([0,1],u)));for(var p=1,d=!0;p=n.length){var h=f(l,y);l=(d=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:l[y]}else d=C(l,y),l=l[y];d&&!a&&(k[i]=l)}}return l}},8861:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(704);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},704:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},2346:function(e,t,n){"use strict";var r=n(704);e.exports=function(){return r()&&!!Symbol.toStringTag}},9196:function(e){"use strict";e.exports=window.React},5794:function(){},4343:function(e,t,n){"use strict";var r=n(131),o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t5&&"boolean"!=typeof arguments[5])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: `arrayBuffer` is detached");if(t<0)throw new i("Assertion failed: `byteIndex` must be non-negative");var b,v=y.size["$"+n];if(!v)throw new i('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');if(h)throw new o("SharedArrayBuffer is not supported by this implementation");b=a(new l(e,t),0,v);var _=arguments.length>5?arguments[5]:"little"===m,k=_?a(f([0,0,0,0,0,0,0,0],b),-v):a(f(b,[0,0,0,0,0,0,0,0]),0,v);return u(n,k,_)}},5584:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(9762),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!i(t))throw new r("Assertion failed: `P` must be a Property Key");return o(e,t)}},2985:function(e,t,n){"use strict";e.exports=n(692)},4734:function(e){"use strict";e.exports=function(e){return"BIGUINT64"===e||"BIGINT64"===e}},3071:function(e,t,n){"use strict";e.exports=n(6841)},7010:function(e,t,n){"use strict";var r=n(4342)("%Reflect.construct%",!0),o=n(9002);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},l={};o(l,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,l)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},4065:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i=n(6862);e.exports=function(e){if(void 0===e)return!1;if(!i(e))throw new r("Assertion failed: `Desc` must be a Property Descriptor");return!(!o(e,"[[Value]]")&&!o(e,"[[Writable]]"))}},1320:function(e,t,n){"use strict";var r=n(1642),o=n(480),i=n(4343)(),l=n(1154),a=n(4602),s=n(589),c=l("SharedArrayBuffer.prototype.byteLength",!0);e.exports=function(e){var t=s(e);if(!a(e)&&!t)throw new r("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if(0===(t?c:o)(e))try{new n.g[i[0]](e)}catch(e){return!!e&&"TypeError"===e.name}return!1}},9442:function(e,t,n){"use strict";var r=n(1642),o=n(1154),i=o("%ArrayBuffer.prototype.resizable%",!0),l=o("%SharedArrayBuffer.prototype.growable%",!0),a=n(4602),s=n(589);e.exports=function(e){var t=a(e),n=s(e);if(!t&&!n)throw new r("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return t&&i?!i(e):!n||!l||!l(e)}},9762:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},9954:function(e,t,n){"use strict";var r=n(1642),o=n(1320),i=n(9149),l=n(359),a=n(6740),s=n(7046),c=n(8150);e.exports=function(e){if(!l(e))throw new r("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var t=e["[[Object]]"],n=e["[[CachedBufferByteLength]]"];if(o(a(t))&&"DETACHED"!==n)throw new r("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if("DETACHED"===n)return!0;var u,p=s(t),d=c(t);"AUTO"===d?u=n:u=p+d*i(t);return p>n||u>n}},7551:function(e){"use strict";e.exports=function(e){return"UINT8"===e||"UINT8C"===e||"UINT16"===e||"UINT32"===e||"BIGUINT64"===e}},6005:function(e,t,n){"use strict";var r=n(1642),o=n(2981),i=n(1320),l=n(2527),a=n(6740);e.exports=function(e,t){if(!l(e))throw new r("Assertion failed: `obj` must be a Typed Array");if("SEQ-CST"!==t&&"UNORDERED"!==t)throw new r("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=a(e);return{"[[Object]]":e,"[[CachedBufferByteLength]]":i(n)?"DETACHED":o(n,t)}}},4604:function(e,t,n){"use strict";var r=n(1642),o=n(5584),i=n(1242),l=n(2947),a=n(3181),s=n(2587),c=n(5562),u=n(5465),p=n(5964),d=n(9496),f=n(6550),y=n(3647),m=n(7511),g=n(1520),h=n(806),b={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},v={__proto__:null,INT8:c,UINT8:d,UINT8C:f,INT16:a,UINT16:u,INT32:s,UINT32:p,BIGINT64:i,BIGUINT64:l};e.exports=function(e,t,n){if("string"!=typeof e||!o(b,e))throw new r("Assertion failed: `type` must be a TypedArray element type: "+h(b));if("number"!=typeof t&&"bigint"!=typeof t)throw new r("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof n)throw new r("Assertion failed: `isLittleEndian` must be a Boolean");if("FLOAT32"===e)return y(t,n);if("FLOAT64"===e)return m(t,n);var i=b[e],l=(0,v[e])(t);return g(l,i,n)}},9219:function(e,t,n){"use strict";var r=n(682),o=n(1154),i=n(9204),l=n(6724),a=n(1642),s=r("%BigInt%",!0),c=n(5584),u=n(2985),p=n(4734),d=n(7551),f=n(8727),y=n(7604),m=n(2367),g=n(8172),h=n(1824),b=o("Array.prototype.reverse"),v=o("Array.prototype.slice"),_=n(806),k={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};e.exports=function(e,t,n){if(!c(k,e))throw new a("Assertion failed: `type` must be a TypedArray element type: "+_(k));if(!u(t)||!g(t,h))throw new a("Assertion failed: `rawBytes` must be an Array of bytes");if("boolean"!=typeof n)throw new a("Assertion failed: `isLittleEndian` must be a Boolean");var r=k[e];if(t.length!==r)throw new i("Assertion failed: `rawBytes` must have a length of "+r+" for type "+e);var o=p(e);if(o&&!s)throw new l("this environment does not support BigInts");return t=v(t,0,r),n||b(t),"FLOAT32"===e?f(t):"FLOAT64"===e?y(t):m(t,r,d(e),o)}},3392:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},8055:function(e,t,n){"use strict";var r=n(1642),o=n(9762),i=n(3392),l=n(9655),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,n,s){if("Object"!==l(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");if("boolean"!=typeof s)throw new r("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=n,a&&!i(e[t],n))throw new r("Attempted to assign to readonly property.");return!0}try{return e[t]=n,!a||i(e[t],n)}catch(e){return!1}}},3383:function(e,t,n){"use strict";var r=n(682),o=n(6724),i=n(1642),l=r("%Uint8Array%",!0),a=n(6156),s=n(4734),c=n(1320),u=n(4604),p=n(4602),d=n(589),f=n(9429),y=n(2170),m=n(2142),g=n(9065);e.exports=function(e,t,n,r,h,b){var v=d(e);if(!p(e)&&!v)throw new i("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!a(t)||t<0)throw new i("Assertion failed: `byteIndex` must be a non-negative integer");if("string"!=typeof n||!f(y.size,"$"+n))throw new i("Assertion failed: `type` must be a Typed Array Element Type");if("number"!=typeof r&&"bigint"!=typeof r)throw new i("Assertion failed: `value` must be a Number or a BigInt");if("boolean"!=typeof h)throw new i("Assertion failed: `isTypedArray` must be a boolean");if("SEQ-CST"!==b&&"UNORDERED"!==b&&"INIT"!==b)throw new i('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("Assertion failed: `isLittleEndian` must be a boolean, if present");if(c(e))throw new i("Assertion failed: ArrayBuffer is detached");if(s(n)?"bigint"!=typeof r:"number"!=typeof r)throw new i("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var _=y.size["$"+n],k=arguments.length>6?arguments[6]:"little"===m,E=u(n,r,k);if(v)throw new o("SharedArrayBuffer is not supported by this implementation");var S=new l(e,t,_);g(E,(function(e,t){S[t]=e}))}},5994:function(e,t,n){"use strict";var r=n(682)("%Symbol.species%",!0),o=n(1642),i=n(7010),l=n(9655);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: Type(O) is not Object");var n=e.constructor;if(void 0===n)return t;if("Object"!==l(n))throw new o("O.constructor is not an Object");var a=r?n[r]:void 0;if(null==a)return t;if(i(a))return a;throw new o("no constructor found")}},907:function(e,t,n){"use strict";var r=n(682)("%BigInt%",!0),o=n(1642),i=n(6724);e.exports=function(e){if("string"!=typeof e)throw new o("`argument` must be a string");if(!r)throw new i("BigInts are not supported in this environment");try{return r(e)}catch(e){return}}},4967:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%RegExp%"),l=n(1642),a=r("%parseInt%"),s=n(1154),c=n(1312),u=s("String.prototype.slice"),p=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),f=c(/^[-+]0x[0-9a-f]+$/i),y=c(new i("["+["…","​","￾"].join("")+"]","g")),m=n(6368);e.exports=function e(t){if("string"!=typeof t)throw new l("Assertion failed: `argument` is not a String");if(p(t))return o(a(u(t,2),2));if(d(t))return o(a(u(t,2),8));if(y(t)||f(t))return NaN;var n=m(t);return n!==t?e(n):o(t)}},9752:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Number%"),l=n(1642),a=n(6724),s=n(907),c=n(210);e.exports=function(e){if(!o)throw new a("BigInts are not supported in this environment");var t=c(e,i);if(null==t)throw new l("Cannot convert null or undefined to a BigInt");if("boolean"==typeof t)return o(t?1:0);if("number"==typeof t)throw new l("Cannot convert a Number value to a BigInt");if("string"==typeof t){var n=s(t);if(void 0===n)throw new l("Failed to parse String to BigInt");return n}if("symbol"==typeof t)throw new l("Cannot convert a Symbol value to a BigInt");if("bigint"!=typeof t)throw new a("Assertion failed: unknown primitive type");return t}},1242:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,31)),u=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e),n=s(a,t,u);return n>=c?n-u:n}},2947:function(e,t,n){"use strict";var r=n(682),o=r("%BigInt%",!0),i=r("%Math.pow%"),l=n(9752),a=n(6548),s=n(8626),c=o&&BigInt(i(2,32))*BigInt(i(2,32));e.exports=function(e){var t=l(e);return s(a,t,c)}},6440:function(e){"use strict";e.exports=function(e){return!!e}},3181:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return a>=32768?a-65536:a}},2587:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991),a=4294967296;e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),s=r(n,a),c=s>=2147483648?s-a:s;return 0===c?0:c}},5562:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,256);return a>=128?a-256:a}},2897:function(e,t,n){"use strict";var r=n(3438),o=n(736),i=n(9404),l=n(7991);e.exports=function(e){var t=r(e);return i(t)||0===t?0:l(t)?o(t):t}},3438:function(e,t,n){"use strict";var r=n(682),o=n(1642),i=r("%Number%"),l=n(4968),a=n(210),s=n(4967);e.exports=function(e){var t=l(e)?e:a(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):i(t)}},210:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},8110:function(e,t,n){"use strict";var r=n(9429),o=n(1642),i=n(9655),l=n(6440),a=n(3071);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=l(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=l(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=l(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!a(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new o("setter must be a function");t["[[Set]]"]=s}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},7249:function(e,t,n){"use strict";var r=n(682)("%String%"),o=n(1642);e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return r(e)}},5465:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,65536);return 0===a?0:a}},5964:function(e,t,n){"use strict";var r=n(8457),o=n(3438),i=n(736),l=n(7991);e.exports=function(e){var t=o(e);if(!l(t)||0===t)return 0;var n=i(t),a=r(n,4294967296);return 0===a?0:a}},9496:function(e,t,n){"use strict";var r=n(7991),o=n(8457),i=n(3438),l=n(736);e.exports=function(e){var t=i(e);if(!r(t)||0===t)return 0;var n=l(t);return o(n,256)}},6550:function(e,t,n){"use strict";var r=n(3832),o=n(3438),i=n(3473),l=n(9404);e.exports=function(e){var t=o(e);if(l(t))return 0;var n=r(t,0,255),a=i(n);return na+.5?a+1:a%2==0?a:a+1}},9655:function(e,t,n){"use strict";var r=n(1528);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},7265:function(e,t,n){"use strict";var r=n(6724),o=n(1642),i=n(2985),l=n(7010),a=n(9954),s=n(8921),c=n(3842),u=n(4343)();e.exports=function(e,t){if(!l(e))throw new o("Assertion failed: `constructor` must be a constructor");if(!i(t))throw new o("Assertion failed: `argumentList` must be a List");if(0===u.length)throw new r("Assertion failed: Typed Arrays are not supported in this environment");var n;n=0===t.length?new e:1===t.length?new e(t[0]):2===t.length?new e(t[0],t[1]):new e(t[0],t[1],t[2]);var p=c(n,"SEQ-CST");if(1===t.length&&"number"==typeof t[0]){if(a(p))throw new o("new Typed Array is out of bounds");if(s(p)>7,o=(127&e[2])<<16|e[1]<<8|e[0];return 0===n&&0===o?1===t?0:-0:255===n&&0===o?1===t?1/0:-1/0:255===n&&0!==o?NaN:-127===(n-=127)?t*o*r(2,-149):t*(1+o*r(2,-23))*r(2,n)}},7604:function(e,t,n){"use strict";var r=n(682)("%Math.pow%");e.exports=function(e){var t=128&e[7]?-1:1,n=(127&e[7])<<4|(240&e[6])>>4,o=281474976710656*(15&e[6])+1099511627776*e[5]+4294967296*e[4]+16777216*e[3]+65536*e[2]+256*e[1]+e[0];return 0===n&&0===o?0*t:2047===n&&0!==o?NaN:2047===n&&0===o?t*(1/0):-1023===(n-=1023)?t*o*5e-324:t*(1+o/4503599627370496)*r(2,n)}},2367:function(e,t,n){"use strict";var r=n(682),o=r("%Math.pow%"),i=r("%Number%"),l=r("%BigInt%",!0);e.exports=function(e,t,n,r){for(var a=r?l:i,s=a(0),c=0;c=1?(e=r-1,n+="1",o===t&&(o=i)):(e=r,n+="0"),1===r||i-o>54)return n;return n}},2646:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},9495:function(e,t,n){"use strict";var r=n(682)("%Object.getPrototypeOf%",!0),o=n(1856)();e.exports=r||(o?function(e){return e.__proto__}:null)},20:function(e,t,n){"use strict";var r=n(682)("%Math.floor%");e.exports=function(e){for(var t,n="";e>0;)n=(t=e/2)===(e=r(t))?"0"+n:"1"+n;return n}},1520:function(e,t,n){"use strict";var r=n(682),o=r("%Number%"),i=r("%BigInt%",!0);e.exports=function(e,t,n){var r="bigint"==typeof e?i:o;e<0&&(e>>>=0);for(var l=[],a=0;a>=r(8);return l}},1824:function(e){"use strict";e.exports=function(e){return"number"==typeof e&&e>=0&&e<=255&&(0|e)===e}},7991:function(e,t,n){"use strict";var r=n(9404);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!r(e)&&e!==1/0&&e!==-1/0}},6156:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=n(9404),a=n(7991);e.exports=function(e){if("number"!=typeof e||l(e)||!a(e))return!1;var t=o(e);return i(t)===t}},9404:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},2745:function(e){"use strict";e.exports=function(e){return 0===e&&1/e==-1/0}},4968:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2076:function(e){"use strict";var t=Math.floor;e.exports=function(e,n){var r=e%n;return t(r>=0?r:r+n)}},8626:function(e){"use strict";e.exports=function(e,t,n){var r=e(t,n);return r>=0?r:r+n}},6862:function(e,t,n){"use strict";var r=n(1642),o=n(9429),i={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};e.exports=function(e){if(!e||"object"!=typeof e)return!1;for(var t in e)if(o(e,t)&&!i[t])return!1;var n=o(e,"[[Value]]")||o(e,"[[Writable]]"),l=o(e,"[[Get]]")||o(e,"[[Set]]");if(n&&l)throw new r("Property Descriptors may not be both accessor and data descriptors");return!0}},359:function(e,t,n){"use strict";var r=n(9429),o=n(2527),i=n(6156);e.exports=function(e){return!!e&&"object"==typeof e&&r(e,"[[Object]]")&&r(e,"[[CachedBufferByteLength]]")&&(i(e["[[CachedBufferByteLength]]"])&&e["[[CachedBufferByteLength]]"]>=0||"DETACHED"===e["[[CachedBufferByteLength]]"])&&o(e["[[Object]]"])}},9660:function(e,t,n){"use strict";var r=n(682),o={__proto__:null,$Int8Array:r("%Int8Array%",!0),$Uint8Array:r("%Uint8Array%",!0),$Uint8ClampedArray:r("%Uint8ClampedArray%",!0),$Int16Array:r("%Int16Array%",!0),$Uint16Array:r("%Uint16Array%",!0),$Int32Array:r("%Int32Array%",!0),$Uint32Array:r("%Uint32Array%",!0),$BigInt64Array:r("%BigInt64Array%",!0),$BigUint64Array:r("%BigUint64Array%",!0),$Float32Array:r("%Float32Array%",!0),$Float64Array:r("%Float64Array%",!0)};e.exports=function(e){return o["$"+e]}},3647:function(e,t,n){"use strict";var r=n(682),o=r("%Math.abs%"),i=r("%Math.floor%"),l=r("%Math.pow%"),a=n(7991),s=n(9404),c=n(2745);e.exports=function(e,t){if(s(e))return t?[0,0,192,127]:[127,192,0,0];var n;if(0===e)return n=c(e)?128:0,t?[0,0,0,n]:[n,0,0,0];if(o(e)>34028234663852886e22||!a(e))return n=e<0?255:127,t?[0,0,128,n]:[n,128,0,0];var r=e<0?1:0;e=o(e);for(var u=0;e>=2;)u+=1,e/=2;for(;e<1;)u-=1,e*=2;var p=e-1;p*=l(2,23)+.5,u+=127;var d=r<<31|(u<<=23)|(p=i(p)),f=255&d,y=255&(d>>=8),m=255&(d>>=8),g=255&(d>>=8);return t?[f,y,m,g]:[g,m,y,f]}},7511:function(e,t,n){"use strict";var r=n(682),o=r("%parseInt%"),i=r("%Math.abs%"),l=r("%Math.floor%"),a=n(1154),s=a("String.prototype.indexOf"),c=a("String.prototype.slice"),u=n(1211),p=n(20),d=n(2745),f=1023,y="11111111111",m="00000000000",g="000000000000000000000000000000000000000000000000000";e.exports=function(e,t){var n,r,a=e<0||d(e)?"1":"0";if(isNaN(e))n=y,r="1"+g;else if(isFinite(e))if(0===e)n=m,r="0"+g;else{e=i(e);var h,b=l(e),v=p(b),_=u(e-b);if(v)n=v.length-1;else{var k=s(_,"1");k>-1&&(h=k+1),n=-h}r=v+_,n<0?(n<=-1023&&(h=1022),r=c(r,h)):r=c(r,1),n=c(m+p(n+f),-11),r=c(r+g+"0",0,52)}else n=y,r="0"+g;for(var E=a+n+r,S=[],w=0;w<8;w++){S[t?8-w-1:w]=o(c(E,8*w,8*(w+1)),2)}return S}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{AlignmentControl:function(){return jh},AlignmentToolbar:function(){return Vh},Autocomplete:function(){return Yh},BlockAlignmentControl:function(){return Uo},BlockAlignmentToolbar:function(){return jo},BlockBreadcrumb:function(){return tb},BlockColorsStyleSelector:function(){return lb},BlockContextProvider:function(){return ti},BlockControls:function(){return or},BlockEdit:function(){return ii},BlockEditorKeyboardShortcuts:function(){return Lk},BlockEditorProvider:function(){return Mc},BlockFormatControls:function(){return rr},BlockIcon:function(){return Nc},BlockInspector:function(){return Rk},BlockList:function(){return Ny},BlockMover:function(){return Jd},BlockNavigationDropdown:function(){return Bb},BlockPreview:function(){return cp},BlockSelectionClearer:function(){return Uc},BlockSettingsMenu:function(){return Xf},BlockSettingsMenuControls:function(){return qf},BlockStyles:function(){return Nb},BlockTitle:function(){return Nd},BlockToolbar:function(){return ly},BlockTools:function(){return Fk},BlockVerticalAlignmentControl:function(){return so},BlockVerticalAlignmentToolbar:function(){return co},ButtonBlockAppender:function(){return Ed},ButtonBlockerAppender:function(){return kd},ColorPalette:function(){return Qb},ColorPaletteControl:function(){return Xb},ContrastChecker:function(){return Cm},CopyHandler:function(){return Tf},DefaultBlockAppender:function(){return vd},FontSizePicker:function(){return gg},InnerBlocks:function(){return By},Inserter:function(){return bd},InspectorAdvancedControls:function(){return Dr},InspectorControls:function(){return Lr},JustifyContentControl:function(){return fo},JustifyToolbar:function(){return yo},LineHeightControl:function(){return Xm},MediaPlaceholder:function(){return T_},MediaReplaceFlow:function(){return C_},MediaUpload:function(){return w_},MediaUploadCheck:function(){return A_},MultiSelectScrollIntoView:function(){return Uk},NavigableToolbar:function(){return Ld},ObserveTyping:function(){return Gk},PanelColorSettings:function(){return O_},PlainText:function(){return lk},RichText:function(){return rk},RichTextShortcut:function(){return ck},RichTextToolbarButton:function(){return uk},SETTINGS_DEFAULTS:function(){return h},SkipToSelectedBlock:function(){return xk},ToolSelector:function(){return fk},Typewriter:function(){return Kk},URLInput:function(){return Xv},URLInputButton:function(){return hk},URLPopover:function(){return B_},Warning:function(){return ai},WritingFlow:function(){return Zc},__experimentalBlockAlignmentMatrixControl:function(){return Zh},__experimentalBlockContentOverlay:function(){return nb},__experimentalBlockFullHeightAligmentControl:function(){return Xh},__experimentalBlockPatternSetup:function(){return $b},__experimentalBlockPatternsList:function(){return Op},__experimentalBlockVariationPicker:function(){return Fb},__experimentalBlockVariationTransforms:function(){return Jb},__experimentalBorderRadiusControl:function(){return sm},__experimentalBorderStyleControl:function(){return ym},__experimentalColorGradientControl:function(){return Uy},__experimentalColorGradientSettingsDropdown:function(){return jy},__experimentalDateFormatPicker:function(){return tv},__experimentalDuotoneControl:function(){return rh},__experimentalFontAppearanceControl:function(){return Jm},__experimentalFontFamilyControl:function(){return sg},__experimentalGetBorderClassesAndStyles:function(){return _h},__experimentalGetColorClassesAndStyles:function(){return Eh},__experimentalGetGradientClass:function(){return km},__experimentalGetGradientObjectByGradientValue:function(){return Sm},__experimentalGetMatchingVariation:function(){return Qk},__experimentalGetSpacingClassesAndStyles:function(){return Ah},__experimentalImageEditingProvider:function(){return Rv},__experimentalImageEditor:function(){return Hv},__experimentalImageSizeControl:function(){return $v},__experimentalImageURLInputUI:function(){return Ak},__experimentalLayoutStyle:function(){return Oo},__experimentalLetterSpacingControl:function(){return Lg},__experimentalLibrary:function(){return Mk},__experimentalLinkControl:function(){return k_},__experimentalLinkControlSearchInput:function(){return p_},__experimentalLinkControlSearchItem:function(){return t_},__experimentalLinkControlSearchResults:function(){return o_},__experimentalListView:function(){return Ib},__experimentalPanelColorGradientSettings:function(){return uv},__experimentalPreviewOptions:function(){return Ck},__experimentalResponsiveBlockControl:function(){return sk},__experimentalTextDecorationControl:function(){return Cg},__experimentalTextTransformControl:function(){return Rg},__experimentalToolsPanelColorDropdown:function(){return Im},__experimentalUnitControl:function(){return yk},__experimentalUseBlockPreview:function(){return up},__experimentalUseBorderProps:function(){return kh},__experimentalUseColorProps:function(){return wh},__experimentalUseCustomSides:function(){return Yr},__experimentalUseGradient:function(){return Am},__experimentalUseNoRecursiveRenders:function(){return Yk},__experimentalUseResizeCanvas:function(){return Ik},__unstableBlockNameContext:function(){return iy},__unstableBlockSettingsMenuFirstItem:function(){return Df},__unstableBlockToolbarLastItem:function(){return Af},__unstableEditorStyles:function(){return ip},__unstableIframe:function(){return nu},__unstableInserterMenuExtension:function(){return ad},__unstablePresetDuotoneFilter:function(){return fh},__unstableRichTextInputEvent:function(){return pk},__unstableUseBlockSelectionClearer:function(){return Lc},__unstableUseClipboardHandler:function(){return Pf},__unstableUseMouseMoveTypingReset:function(){return Vk},__unstableUseTypewriter:function(){return $k},__unstableUseTypingObserver:function(){return zk},createCustomColorsHOC:function(){return Ph},getColorClassName:function(){return Wy},getColorObjectByAttributeValues:function(){return Gy},getColorObjectByColorValue:function(){return Hy},getFontSize:function(){return fg},getFontSizeClass:function(){return mg},getFontSizeObjectByValue:function(){return yg},getGradientSlugByValue:function(){return wm},getGradientValueBySlug:function(){return Em},getPxFromCssUnit:function(){return aE},store:function(){return qn},storeConfig:function(){return Kn},transformStyles:function(){return np},useBlockDisplayInformation:function(){return Td},useBlockEditContext:function(){return Xn},useBlockProps:function(){return Ec},useCachedTruthy:function(){return Ch},useInnerBlocksProps:function(){return xy},useSetting:function(){return Cr},withColorContext:function(){return Yb},withColors:function(){return Th},withFontSizes:function(){return Nh}});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:function(){return Mt},__experimentalGetAllowedBlocks:function(){return gt},__experimentalGetAllowedPatterns:function(){return _t},__experimentalGetBlockListSettingsForBlocks:function(){return Ct},__experimentalGetDirectInsertBlock:function(){return ht},__experimentalGetGlobalBlocksByName:function(){return Z},__experimentalGetLastBlockAttributeChanges:function(){return Bt},__experimentalGetParsedPattern:function(){return bt},__experimentalGetPatternTransformItems:function(){return Et},__experimentalGetPatternsByBlockTypes:function(){return kt},__experimentalGetReusableBlockTitle:function(){return It},__unstableGetBlockWithoutInnerBlocks:function(){return $},__unstableGetClientIdWithClientIdsTree:function(){return q},__unstableGetClientIdsTree:function(){return J},__unstableGetSelectedBlocksWithPartialSelection:function(){return Oe},__unstableIsFullySelected:function(){return Be},__unstableIsLastBlockChangeIgnored:function(){return xt},__unstableIsSelectionCollapsed:function(){return Pe},__unstableIsSelectionMergeable:function(){return Te},areInnerBlocksControlled:function(){return Ft},canInsertBlockType:function(){return tt},canInsertBlocks:function(){return nt},canLockBlockType:function(){return at},canMoveBlock:function(){return it},canMoveBlocks:function(){return lt},canRemoveBlock:function(){return rt},canRemoveBlocks:function(){return ot},didAutomaticChange:function(){return Nt},getAdjacentBlockClientId:function(){return me},getBlock:function(){return W},getBlockAttributes:function(){return H},getBlockCount:function(){return te},getBlockHierarchyRootClientId:function(){return fe},getBlockIndex:function(){return Re},getBlockInsertionPoint:function(){return qe},getBlockListSettings:function(){return St},getBlockMode:function(){return Ve},getBlockName:function(){return z},getBlockOrder:function(){return Ne},getBlockParents:function(){return pe},getBlockParentsByBlockName:function(){return de},getBlockRootClientId:function(){return ue},getBlockSelectionEnd:function(){return ie},getBlockSelectionStart:function(){return oe},getBlockTransformItems:function(){return yt},getBlocks:function(){return K},getBlocksByClientId:function(){return ee},getClientIdsOfDescendants:function(){return Y},getClientIdsWithDescendants:function(){return Q},getDraggedBlockClientIds:function(){return He},getFirstMultiSelectedBlockClientId:function(){return Ee},getGlobalBlockCount:function(){return X},getInserterItems:function(){return ft},getLastMultiSelectedBlockClientId:function(){return Se},getLowestCommonAncestorWithSelectedBlock:function(){return ye},getMultiSelectedBlockClientIds:function(){return _e},getMultiSelectedBlocks:function(){return ke},getMultiSelectedBlocksEndClientId:function(){return xe},getMultiSelectedBlocksStartClientId:function(){return Ie},getNextBlockClientId:function(){return he},getPreviousBlockClientId:function(){return ge},getSelectedBlock:function(){return ce},getSelectedBlockClientId:function(){return se},getSelectedBlockClientIds:function(){return ve},getSelectedBlockCount:function(){return le},getSelectedBlocksInitialCaretPosition:function(){return be},getSelectionEnd:function(){return re},getSelectionStart:function(){return ne},getSettings:function(){return wt},getTemplate:function(){return Qe},getTemplateLock:function(){return Xe},hasBlockMovingClientId:function(){return Ot},hasInserterItems:function(){return mt},hasMultiSelection:function(){return Le},hasSelectedBlock:function(){return ae},hasSelectedInnerBlock:function(){return Me},isAncestorBeingDragged:function(){return $e},isAncestorMultiSelected:function(){return Ce},isBlockBeingDragged:function(){return We},isBlockHighlighted:function(){return Rt},isBlockInsertionPointVisible:function(){return Je},isBlockMultiSelected:function(){return Ae},isBlockSelected:function(){return Fe},isBlockValid:function(){return G},isBlockWithinSelection:function(){return De},isCaretWithinFormattedText:function(){return Ke},isDraggingBlocks:function(){return Ge},isFirstMultiSelectedBlock:function(){return we},isLastBlockChangePersistent:function(){return At},isMultiSelecting:function(){return Ue},isNavigationMode:function(){return Tt},isSelectionEnabled:function(){return je},isTyping:function(){return ze},isValidTemplate:function(){return Ye},wasBlockJustInserted:function(){return Dt}});var t={};n.r(t),n.d(t,{__unstableDeleteSelection:function(){return gn},__unstableExpandSelection:function(){return bn},__unstableMarkAutomaticChange:function(){return Dn},__unstableMarkLastChangeAsPersistent:function(){return Fn},__unstableMarkNextChangeAsNotPersistent:function(){return Mn},__unstableSaveReusableBlock:function(){return Rn},__unstableSplitSelection:function(){return hn},clearSelectedBlock:function(){return Zt},duplicateBlocks:function(){return jn},enterFormattedText:function(){return xn},exitFormattedText:function(){return Bn},flashBlock:function(){return Hn},hideInsertionPoint:function(){return fn},insertAfterBlock:function(){return zn},insertBeforeBlock:function(){return Vn},insertBlock:function(){return un},insertBlocks:function(){return pn},insertDefaultBlock:function(){return Tn},mergeBlocks:function(){return vn},moveBlockToPosition:function(){return cn},moveBlocksDown:function(){return ln},moveBlocksToPosition:function(){return sn},moveBlocksUp:function(){return an},multiSelect:function(){return Xt},receiveBlocks:function(){return Ht},removeBlock:function(){return kn},removeBlocks:function(){return _n},replaceBlock:function(){return rn},replaceBlocks:function(){return nn},replaceInnerBlocks:function(){return En},resetBlocks:function(){return Vt},resetSelection:function(){return Gt},selectBlock:function(){return Kt},selectNextBlock:function(){return Jt},selectPreviousBlock:function(){return qt},selectionChange:function(){return Pn},setBlockMovingClientId:function(){return Un},setHasControlledInnerBlocks:function(){return Wn},setNavigationMode:function(){return Ln},setTemplateValidity:function(){return yn},showInsertionPoint:function(){return dn},startDraggingBlocks:function(){return Cn},startMultiSelect:function(){return Yt},startTyping:function(){return wn},stopDraggingBlocks:function(){return In},stopMultiSelect:function(){return Qt},stopTyping:function(){return An},synchronizeTemplate:function(){return mn},toggleBlockHighlight:function(){return Gn},toggleBlockMode:function(){return Sn},toggleSelection:function(){return en},updateBlock:function(){return $t},updateBlockAttributes:function(){return Wt},updateBlockListSettings:function(){return On},updateSettings:function(){return Nn},validateBlocksToTemplate:function(){return zt}});var o=window.wp.blocks,i=window.wp.hooks;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:1;const o=[...e];return o.splice(t,r),b(o,e.slice(t,t+r),n)}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:r,innerBlocks:o}=e;n[t].push(r),Object.assign(n,_(o,r))})),n}function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},k(n.innerBlocks,n.clientId))),{})}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;const n={},r=[...e];for(;r.length;){const{innerBlocks:e,...o}=r.shift();r.push(...e),n[o.clientId]=t(o)}return n}function S(e){return E(e,(e=>(0,u.omit)(e,"attributes")))}function w(e){return E(e,(e=>e.attributes))}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)((0,u.keys)(e),(0,u.keys)(t))}(e.attributes,t.attributes)}function C(e,t){const n={},r=[...t],o=[...t];for(;r.length;){const e=r.shift();r.push(...e.innerBlocks),o.push(...e.innerBlocks)}for(const e of o)n[e.clientId]={};for(const t of o)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function I(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=new Set([]),i=new Set;for(const t of n){let n=r?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){i.add(n);break}o.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of o)t[e]={...t[e]};for(const n of o)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of i)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const x=(0,u.flow)(f.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:r}=n;if(e===r)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,o)=>{const{name:i}=t.byClientId[o];return"core/block"===i&&n.ref===e?{...n,ref:r}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const r=e(t,n);if(r===t)return t;switch(r.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=C(r,n.blocks);r.tree=I(r,{...r.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":r.tree=I(r,{...r.tree,[n.clientId]:{...r.tree[n.clientId],...r.byClientId[n.clientId],attributes:r.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...r.tree[t],attributes:r.attributes[t]},e)),{});r.tree=I(r,{...r.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=C(r,n.blocks);r.tree=I(r,{...(0,u.omit)(r.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const o=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!r.byClientId[t.parents[e]]||o.push(t.parents[e]);r.tree=I(r,r.tree,o,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const o of n.clientIds)void 0===t.parents[o]||""!==t.parents[o]&&!r.byClientId[t.parents[o]]||e.push(t.parents[o]);r.tree=I(r,(0,u.omit)(r.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId&&e.push(n.fromRootClientId),n.toRootClientId&&e.push(n.toRootClientId),n.fromRootClientId&&n.fromRootClientId||e.push(""),r.tree=I(r,r.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];r.tree=I(r,r.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=(0,u.keys)((0,u.omitBy)(r.attributes,((e,t)=>"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId)));r.tree=I(r,{...r.tree,...e.reduce(((e,t)=>(e[t]={...r.byClientId[t],attributes:r.attributes[t],innerBlocks:r.tree[t].innerBlocks},e)),{})},e,!1)}}return r}),(e=>(t,n)=>{const r=e=>{let r=e;for(let o=0;o(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const r={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...o}=e.shift();e.push(...n),t.controlledInnerBlocks[o.clientId]&&(r[o.clientId]=!0)}}let o=t;t.order[n.rootClientId]&&(o=e(o,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));let i=o;return n.blocks.length&&(i=e(i,{...n,type:"INSERT_BLOCKS",index:0}),i.order={...i.order,...(0,u.reduce)(r,((e,n,r)=>(t.order[r]&&(e[r]=t.order[r]),e)),{})}),i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:S(n.blocks),attributes:w(n.blocks),order:_(n.blocks),parents:k(n.blocks),controlledInnerBlocks:{}},r=C(e,n.blocks);return e.tree={...r,"":{innerBlocks:n.blocks.map((e=>r[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(r,o)=>{let i=e(r,o);const l="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===i&&!l){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;const e=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===e?r:{...i,isPersistentChange:e}}return i={...i,isPersistentChange:l?!n:!A(o,t)},t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,i}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,r)=>{const o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const r=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(r,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,r)=>({...n,[r]:(0,u.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,((t,n,o)=>{var i,l;return n!==t[o]&&((t=(i=e[r])===(l=t)?{...i}:l)[o]=n),t}),e[r])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=_(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,r=e[n]||[],o=_(t.blocks,n),{index:i=r.length}=t;return{...e,...o,[n]:b(r,o[n],i)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:r="",clientIds:o}=t,{index:i=e[r].length}=t;if(n===r){const t=e[r].indexOf(o[0]);return{...e,[r]:v(e[r],t,i,o.length)}}return{...e,[n]:(0,u.without)(e[n],...o),[r]:b(e[r],o,i)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:r=""}=t,o=(0,u.first)(n),i=e[r];if(!i.length||o===(0,u.first)(i))return e;const l=i.indexOf(o);return{...e,[r]:v(i,l,l-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:r=""}=t,o=(0,u.first)(n),i=(0,u.last)(n),l=e[r];if(!l.length||i===(0,u.last)(l))return e;const a=l.indexOf(o);return{...e,[r]:v(l,a,a+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const r=_(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(r,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...r[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...k(t.blocks)};case"INSERT_BLOCKS":return{...e,...k(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...k(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:r}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:r}:e}});function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}var P,T,O=(0,f.combineReducers)({blocks:x,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;switch(i.type){case"SELECTION_CHANGE":return i.clientId?{selectionStart:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.startOffset},selectionEnd:{clientId:i.clientId,attributeKey:i.attributeKey,offset:i.endOffset}}:{selectionStart:i.start||o.selectionStart,selectionEnd:i.end||o.selectionEnd};case"RESET_SELECTION":const{selectionStart:l,selectionEnd:a}=i;return{selectionStart:l,selectionEnd:a};case"MULTI_SELECT":const{start:s,end:c}=i;return s===(null===(e=o.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=o.selectionEnd)||void 0===t?void 0:t.clientId)?o:{selectionStart:{clientId:s},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==o||null===(n=o.selectionStart)||void 0===n?void 0:n.clientId,p=null==o||null===(r=o.selectionEnd)||void 0===r?void 0:r.clientId;if(!u&&!p)return o;if(!i.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!i.blocks.some((e=>e.clientId===p)))return{...o,selectionEnd:o.selectionStart}}return{selectionStart:B(o.selectionStart,i),selectionEnd:B(o.selectionEnd,i)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:r}=t;return{rootClientId:e,index:n,__unstableWithInserter:r};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:r,name:i}=n,l=(0,f.select)(o.store).getActiveBlockVariation(i,r);let a=null!=l&&l.name?`${i}/${l.name}`:i;const s={name:a};return"core/block"===i&&(s.ref=r.ref,a+="/"+r.ref),{...e,insertUsage:{...e.insertUsage,[a]:{time:t.time,count:e.insertUsage[a]?e.insertUsage[a].count+1:1,insert:s}}}}),e)}return e},lastBlockAttributesChange:function(e,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 null},isNavigationMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:r}=t;return r?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;return{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source};case"RESET_BLOCKS":return{}}return t}});function N(e){return[e]}function R(){var e={clear:function(){e.head=null}};return e}function F(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r{const n=e.blocks.byClientId[t];return n?{...n,attributes:H(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function K(e,t){var n;const r=t&&Ft(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[r])||void 0===n?void 0:n.innerBlocks)||V}const q=M(((e,t)=>({clientId:t,innerBlocks:J(e,t)})),(e=>[e.blocks.order])),J=M((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Ne(e,t),(t=>q(e,t)))}),(e=>[e.blocks.order])),Y=M(((e,t)=>{const n=[];for(const r of t)for(const t of Ne(e,r))n.push(t,...Y(e,[t]));return n}),(e=>[e.blocks.order])),Q=M((e=>{const t=[];for(const n of Ne(e))t.push(n,...Y(e,[n]));return t}),(e=>[e.blocks.order])),X=M(((e,t)=>{const n=Q(e);return t?(0,u.reduce)(n,((n,r)=>e.blocks.byClientId[r].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),Z=M(((e,t)=>{if(!t)return V;const n=Q(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:V}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=M(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>W(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function te(e,t){return Ne(e,t).length}function ne(e){return e.selection.selectionStart}function re(e){return e.selection.selectionEnd}function oe(e){return e.selection.selectionStart.clientId}function ie(e){return e.selection.selectionEnd.clientId}function le(e){const t=_e(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function ae(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function se(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:r}=t;return r&&r===n.clientId?r:null}function ce(e){const t=se(e);return t?W(e,t):null}function ue(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const pe=M((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(e=>[e.blocks.parents])),de=M((function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=pe(e,t,r);return(0,u.map)((0,u.filter)((0,u.map)(o,(t=>({id:t,name:z(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function fe(e,t){let n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function ye(e,t){const n=se(e),r=[...pe(e,t),t],o=[...pe(e,n),n];let i;const l=Math.min(r.length,o.length);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=se(e)),void 0===t&&(t=n<0?Ee(e):Se(e)),!t)return null;const r=ue(e,t);if(null===r)return null;const{order:o}=e.blocks,i=o[r],l=i.indexOf(t),a=l+1*n;return a<0||a===i.length?null:i[a]}function ge(e,t){return me(e,t,-1)}function he(e,t){return me(e,t,1)}function be(e){return e.initialPosition}const ve=M((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return V;if(t.clientId===n.clientId)return[t.clientId];const r=ue(e,t.clientId);if(null===r)return V;const o=Ne(e,r),i=o.indexOf(t.clientId),l=o.indexOf(n.clientId);return i>l?o.slice(l,i+1):o.slice(i,l+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function _e(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?V:ve(e)}const ke=M((e=>{const t=_e(e);return t.length?t.map((t=>W(e,t))):V}),(e=>[...ve.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ee(e){return(0,u.first)(_e(e))||null}function Se(e){return(0,u.last)(_e(e))||null}function we(e,t){return Ee(e)===t}function Ae(e,t){return-1!==_e(e).indexOf(t)}const Ce=M(((e,t)=>{let n=t,r=!1;for(;n&&!r;)n=ue(e,n),r=Ae(e,n);return r}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function Ie(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Be(e){const t=ne(e),n=re(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Pe(e){const t=ne(e),n=re(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Te(e,t){const n=ne(e),r=re(e);if(n.clientId===r.clientId)return!1;if(!n.attributeKey||!r.attributeKey||void 0===n.offset||void 0===r.offset)return!1;const i=ue(e,n.clientId);if(i!==ue(e,r.clientId))return!1;const l=Ne(e,i);let a,s;l.indexOf(n.clientId)>l.indexOf(r.clientId)?(a=r,s=n):(a=n,s=r);const c=t?s.clientId:a.clientId,u=t?a.clientId:s.clientId,p=W(e,c);if(!(0,o.getBlockType)(p.name).merge)return!1;const d=W(e,u);if(d.name===p.name)return!0;const f=(0,o.switchToBlockType)(d,p.name);return f&&f.length}const Oe=e=>{const t=ne(e),n=re(e);if(t.clientId===n.clientId)return V;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return V;const r=ue(e,t.clientId);if(r!==ue(e,n.clientId))return V;const i=Ne(e,r),l=i.indexOf(t.clientId),a=i.indexOf(n.clientId),[s,c]=l>a?[n,t]:[t,n],u=W(e,s.clientId),p=(0,o.getBlockType)(u.name),d=W(e,c.clientId),f=(0,o.getBlockType)(d.name),y=u.attributes[s.attributeKey],m=d.attributes[c.attributeKey],g=p.attributes[s.attributeKey],h=f.attributes[c.attributeKey];let b=(0,U.create)({html:y,...j(g)}),v=(0,U.create)({html:m,...j(h)});return b=(0,U.remove)(b,0,s.offset),v=(0,U.remove)(v,c.offset,v.text.length),[{...u,attributes:{...u.attributes,[s.attributeKey]:(0,U.toHTMLString)({value:b,...j(g)})}},{...d,attributes:{...d.attributes,[c.attributeKey]:(0,U.toHTMLString)({value:v,...j(h)})}}]};function Ne(e,t){return e.blocks.order[t||""]||V}function Re(e,t){return Ne(e,ue(e,t)).indexOf(t)}function Fe(e,t){const{selectionStart:n,selectionEnd:r}=e.selection;return n.clientId===r.clientId&&n.clientId===t}function Me(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Ne(e,t),(t=>Fe(e,t)||Ae(e,t)||n&&Me(e,t,n)))}function De(e,t){if(!t)return!1;const n=_e(e),r=n.indexOf(t);return r>-1&&rWe(e,t)))}function Ke(e){return e.isCaretWithinFormattedText}function qe(e){let t,n;const{insertionPoint:r,selection:{selectionEnd:o}}=e;if(null!==r)return r;const{clientId:i}=o;return i?(t=ue(e,i)||void 0,n=Re(e,o.clientId)+1):n=Ne(e).length,{rootClientId:t,index:n}}function Je(e){return null!==e.insertionPoint}function Ye(e){return e.template.isValid}function Qe(e){return e.settings.template}function Xe(e,t){if(!t)return e.settings.templateLock;const n=St(e,t);return n?n.templateLock:null}const Ze=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,u.isBoolean)(e)?e:(0,u.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},et=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,o.getBlockType)(t),!n)return!1;const{allowedBlockTypes:l}=wt(e),a=Ze(l,t,!0);if(!a)return!1;const s=!!Xe(e,r);if(s)return!1;const c=St(e,r);if(r&&void 0===c)return!1;const p=null==c?void 0:c.allowedBlocks,d=Ze(p,t),f=n.parent,y=z(e,r),m=Ze(f,y);let g=!0;const h=n.ancestor;if(h){const t=[r,...pe(e,r)];g=(0,u.some)(t,(t=>Ze(h,z(e,t))))}const b=g&&(null===d&&null===m||!0===d||!0===m);return b?(0,i.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,r,{getBlock:W.bind(null,e),getBlockParentsByBlockName:de.bind(null,e)}):b},tt=M(et,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function nt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>tt(e,z(e,t),n)))}function rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=H(e,t);if(null===r)return!0;const{lock:o}=r,i=!!Xe(e,n);return void 0===o||void 0===(null==o?void 0:o.remove)?!i:!(null!=o&&o.remove)}function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>rt(e,t,n)))}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=H(e,t);if(null===r)return;const{lock:o}=r,i="all"===Xe(e,n);return void 0===o||void 0===(null==o?void 0:o.move)?!i:!(null!=o&&o.move)}function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>it(e,t,n)))}function at(e,t){var n;return!!(0,o.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function st(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}const ct=(e,t,n)=>!!(0,o.hasBlockSupport)(t,"inserter",!0)&&et(e,t.name,n),ut=(e,t)=>n=>{const r=`${t.id}/${n.name}`,{time:o,count:i=0}=st(e,r)||{};return{...t,id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:pt(o,i)}},pt=(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}},dt=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const r=t.name;let i=!1;(0,o.hasBlockSupport)(t.name,"multiple",!0)||(i=(0,u.some)(ee(e,Q(e)),{name:t.name}));const{time:l,count:a=0}=st(e,r)||{},s={id:r,name:t.name,title:t.title,icon:t.icon,isDisabled:i,frecency:pt(l,a)};if("transform"===n)return s;const c=(0,o.getBlockVariations)(t.name,"inserter");return{...s,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},ft=M((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=dt(e,{buildScope:"inserter"}),r=/^\s*)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,i=t=>{let n=L;if("web"===a.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(r);if(e){const[,,t="core/",r]=e,i=(0,o.getBlockType)(t+r);i&&(n=i.icon)}}const i=`core/block/${t.id}`,{time:l,count:s=0}=st(e,i)||{},c=pt(l,s);return{id:i,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},l=(0,o.getBlockTypes)().filter((n=>ct(e,n,t))).map(n),s=et(e,"core/block",t)?Pt(e).map(i):[],c=l.reduce(((t,n)=>{const{variations:r=[]}=n;if(r.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),r.length){const o=ut(e,n);t.push(...r.map(o))}return t}),[]),u=(e,t)=>{const{core:n,noncore:r}=e;return(t.name.startsWith("core/")?n:r).push(t),e},{core:p,noncore:d}=c.reduce(u,{core:[],noncore:[]}),f=[...p,...d];return[...f,...s]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Pt(e),(0,o.getBlockTypes)()])),yt=M((function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const[i]=t,l=dt(e,{buildScope:"transform"}),a=(0,o.getBlockTypes)().filter((t=>ct(e,t,r))).map(l),s=(0,u.mapKeys)(a,(e=>{let{name:t}=e;return t}));s["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,m.__)("Unwrap"),icon:null===(n=s[i.name])||void 0===n?void 0:n.icon};const c=(0,o.getPossibleBlockTransformations)(t).reduce(((e,t)=>("*"===t?e.push(s["*"]):s[null==t?void 0:t.name]&&e.push(s[t.name]),e)),[]);return(0,u.orderBy)(c,(e=>s[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,o.getBlockTypes)()])),mt=M((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,o.getBlockTypes)(),(n=>ct(e,n,t)));if(n)return!0;const r=et(e,"core/block",t)&&Pt(e).length>0;return r}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Pt(e),(0,o.getBlockTypes)()])),gt=M((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,o.getBlockTypes)(),(n=>ct(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,o.getBlockTypes)()])),ht=M((function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!r)return;const o=null===(t=e.blockListSettings[r])||void 0===t?void 0:t.__experimentalDefaultBlock,i=null===(n=e.blockListSettings[r])||void 0===n?void 0:n.__experimentalDirectInsert;return o&&i?"function"==typeof i?i(W(e,r))?o:null:o:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),bt=M(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,o.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),vt=M((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=wt(e),r=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return bt(e,n)})),o=r.filter((e=>{let{blocks:t}=e;return((e,t)=>{if((0,u.isBoolean)(t))return t;const n=[...e];for(;n.length>0;){var r;const e=n.shift();if(!Ze(t,e.name||e.blockName,!0))return!1;null===(r=e.innerBlocks)||void 0===r||r.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return o}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),_t=M((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=vt(e),r=(0,u.filter)(n,(n=>{let{blocks:r}=n;return r.every((n=>{let{name:r}=n;return tt(e,r,t)}))}));return r}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),kt=M((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;const r=_t(e,n),o=Array.isArray(t)?t:[t];return r.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>o.includes(e)))}))}),((e,t)=>[..._t.getDependants(e,t)])),Et=M((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return V;if(t.some((t=>{let{clientId:n,innerBlocks:r}=t;return r.length||Ft(e,n)})))return V;const r=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return kt(e,r,n)}),((e,t)=>[...kt.getDependants(e,t)]));function St(e,t){return e.blockListSettings[t]}function wt(e){return e.settings}function At(e){return e.blocks.isPersistentChange}const Ct=M((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),It=M(((e,t)=>{var n;const r=(0,u.find)(Pt(e),(e=>e.id===t));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(e=>[Pt(e)]));function xt(e){return e.blocks.isIgnoredChange}function Bt(e){return e.lastBlockAttributesChange}function Pt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:V}function Tt(e){return e.isNavigationMode}function Ot(e){return e.hasBlockMovingClientId}function Nt(e){return!!e.automaticChangeStatus}function Rt(e,t){return e.highlightedBlock===t}function Ft(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Mt=M(((e,t)=>{if(!t.length)return null;const n=se(e);if(t.includes(z(e,n)))return n;const r=_e(e),o=de(e,n||r[0],t);return o?(0,u.last)(o):null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Dt(e,t,n){const{lastBlockInserted:r}=e;return r.clientId===t&&r.source===n}var Lt=window.wp.a11y,Ut=window.wp.deprecated,jt=n.n(Ut);const Vt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(zt(e))},zt=e=>t=>{let{select:n,dispatch:r}=t;const i=n.getTemplate(),l=n.getTemplateLock(),a=!i||"all"!==l||(0,o.doBlocksMatchTemplate)(e,i);if(a!==n.isValidTemplate())return r.setTemplateValidity(a),a};function Gt(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function Ht(e){return jt()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function Wt(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:(0,u.castArray)(e),attributes:t,uniqueByBlock:n}}function $t(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const qt=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getPreviousBlockClientId(e);o&&r.selectBlock(o,-1)},Jt=e=>t=>{let{select:n,dispatch:r}=t;const o=n.getNextBlockClientId(e);o&&r.selectBlock(o)};function Yt(){return{type:"START_MULTI_SELECT"}}function Qt(){return{type:"STOP_MULTI_SELECT"}}const Xt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r=>{let{select:o,dispatch:i}=r;if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;i({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const l=o.getSelectedBlockCount();(0,Lt.speak)((0,m.sprintf)((0,m._n)("%s block selected.","%s blocks selected.",l),l),"assertive")}};function Zt(){return{type:"CLEAR_SELECTED_BLOCK"}}function en(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function tn(e,t){var n,r;const i=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,o.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!i[n])return e;const r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;const{attributes:l={}}=e,a=i[n];return{...e,attributes:{...l,className:`${r||""} is-style-${a}`.trim()}}}))}const nn=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;return i=>{let{select:l,dispatch:a}=i;e=(0,u.castArray)(e),t=tn((0,u.castArray)(t),l.getSettings());const s=l.getBlockRootClientId((0,u.first)(e));for(let e=0;e{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()}))}};function rn(e,t){return nn(e,t)}const on=e=>(t,n)=>r=>{let{select:o,dispatch:i}=r;o.canMoveBlocks(t,n)&&i({type:e,clientIds:(0,u.castArray)(t),rootClientId:n})},ln=on("MOVE_BLOCKS_DOWN"),an=on("MOVE_BLOCKS_UP"),sn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return o=>{let{select:i,dispatch:l}=o;if(i.canMoveBlocks(e,t)){if(t!==n){if(!i.canRemoveBlocks(e,t))return;if(!i.canInsertBlocks(e,n))return}l({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r})}}};function cn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3?arguments[3]:void 0;return sn([e],t,n,r)}function un(e,t,n,r,o){return pn([e],t,n,r,0,o)}const pn=function(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;return l=>{let{select:a,dispatch:s}=l;(0,u.isObject)(o)&&(i=o,o=0,jt()("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=tn((0,u.castArray)(e),a.getSettings());const c=[];for(const t of e){a.canInsertBlockType(t.name,n)&&c.push(t)}c.length&&s({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:i})}};function dn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:r}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:r}}function fn(){return{type:"HIDE_INSERTION_POINT"}}function yn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const mn=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const r=t.getBlocks(),i=t.getTemplate(),l=(0,o.synchronizeBlocksWithTemplate)(r,i);n.resetBlocks(l)},gn=e=>t=>{let{registry:n,select:r,dispatch:i}=t;const l=r.getSelectionStart(),a=r.getSelectionEnd();if(l.clientId===a.clientId)return;if(!l.attributeKey||!a.attributeKey||void 0===l.offset||void 0===a.offset)return!1;const s=r.getBlockRootClientId(l.clientId);if(s!==r.getBlockRootClientId(a.clientId))return;const c=r.getBlockOrder(s);let p,d;c.indexOf(l.clientId)>c.indexOf(a.clientId)?(p=a,d=l):(p=l,d=a);const f=e?d:p,y=r.getBlock(f.clientId),m=(0,o.getBlockType)(y.name);if(!m.merge)return;const g=p,h=d,b=r.getBlock(g.clientId),v=(0,o.getBlockType)(b.name),_=r.getBlock(h.clientId),k=(0,o.getBlockType)(_.name),E=b.attributes[g.attributeKey],S=_.attributes[h.attributeKey],w=v.attributes[g.attributeKey],A=k.attributes[h.attributeKey];let C=(0,U.create)({html:E,...j(w)}),I=(0,U.create)({html:S,...j(A)});C=(0,U.remove)(C,g.offset,C.text.length),I=(0,U.insert)(I,"†",0,h.offset);const x=(0,o.cloneBlock)(b,{[g.attributeKey]:(0,U.toHTMLString)({value:C,...j(w)})}),B=(0,o.cloneBlock)(_,{[h.attributeKey]:(0,U.toHTMLString)({value:I,...j(A)})}),P=e?x:B,T=b.name===_.name?[P]:(0,o.switchToBlockType)(P,m.name);if(!T||!T.length)return;let O;if(e){const e=T.pop();O=m.merge(e.attributes,B.attributes)}else{const e=T.shift();O=m.merge(x.attributes,e.attributes)}const N=(0,u.findKey)(O,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),R=O[N],F=(0,U.create)({html:R,...j(m.attributes[N])}),M=F.text.indexOf("†"),D=(0,U.remove)(F,M,M+1),L=(0,U.toHTMLString)({value:D,...j(m.attributes[N])});O[N]=L;const V=r.getSelectedBlockClientIds(),z=[...e?T:[],{...y,attributes:{...y.attributes,...O}},...e?[]:T];n.batch((()=>{i.selectionChange(y.clientId,N,M,M),i.replaceBlocks(V,z,0,r.getSelectedBlocksInitialCaretPosition())}))},hn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),i=t.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return;const l=t.getBlockRootClientId(r.clientId);if(l!==t.getBlockRootClientId(i.clientId))return;const a=t.getBlockOrder(l);let s,c;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(s=i,c=r):(s=r,c=i);const u=s,p=c,d=t.getBlock(u.clientId),f=(0,o.getBlockType)(d.name),y=t.getBlock(p.clientId),m=(0,o.getBlockType)(y.name),g=d.attributes[u.attributeKey],h=y.attributes[p.attributeKey],b=f.attributes[u.attributeKey],v=m.attributes[p.attributeKey];let _=(0,U.create)({html:g,...j(b)}),k=(0,U.create)({html:h,...j(v)});_=(0,U.remove)(_,u.offset,_.text.length),k=(0,U.remove)(k,0,p.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...d,attributes:{...d.attributes,[u.attributeKey]:(0,U.toHTMLString)({value:_,...j(b)})}},(0,o.createBlock)((0,o.getDefaultBlockName)()),{...y,attributes:{...y.attributes,[p.attributeKey]:(0,U.toHTMLString)({value:k,...j(v)})}}],1,t.getSelectedBlocksInitialCaretPosition())},bn=()=>e=>{let{select:t,dispatch:n}=e;const r=t.getSelectionStart(),o=t.getSelectionEnd();n.selectionChange({start:{clientId:r.clientId},end:{clientId:o.clientId}})},vn=(e,t)=>n=>{let{select:r,dispatch:i}=n;const l=[e,t];i({type:"MERGE_BLOCKS",blocks:l});const[a,s]=l,c=r.getBlock(a),p=(0,o.getBlockType)(c.name);if(p&&!p.merge)return void i.selectBlock(c.clientId);const d=r.getBlock(s),f=(0,o.getBlockType)(d.name),{clientId:y,attributeKey:m,offset:g}=r.getSelectionStart(),h=(y===a?p:f).attributes[m],b=(y===a||y===s)&&void 0!==m&&void 0!==g&&!!h;h||("number"==typeof m?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 m):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const v=(0,o.cloneBlock)(c),_=(0,o.cloneBlock)(d);if(b){const e=y===a?v:_,t=e.attributes[m],n=(0,U.insert)((0,U.create)({html:t,...j(h)}),"†",g,g);e.attributes[m]=(0,U.toHTMLString)({value:n,...j(h)})}const k=c.name===d.name?[_]:(0,o.switchToBlockType)(_,c.name);if(!k||!k.length)return;const E=p.merge(v.attributes,k[0].attributes);if(b){const e=(0,u.findKey)(E,(e=>"string"==typeof e&&-1!==e.indexOf("†"))),t=E[e],n=(0,U.create)({html:t,...j(p.attributes[e])}),r=n.text.indexOf("†"),o=(0,U.remove)(n,r,r+1),l=(0,U.toHTMLString)({value:o,...j(p.attributes[e])});E[e]=l,i.selectionChange(c.clientId,e,r,r)}i.replaceBlocks([c.clientId,d.clientId],[{...c,attributes:{...c.attributes,...E}},...k.slice(1)],0)},_n=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:o}=n;if(!e||!e.length)return;e=(0,u.castArray)(e);const i=r.getBlockRootClientId(e[0]);r.canRemoveBlocks(e,i)&&(t&&o.selectPreviousBlock(e[0]),o({type:"REMOVE_BLOCKS",clientIds:e}),o((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:r}=t.getSettings();r||n.insertDefaultBlock()})))}};function kn(e,t){return _n([e],t)}function En(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function Sn(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function wn(){return{type:"START_TYPING"}}function An(){return{type:"STOP_TYPING"}}function Cn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function In(){return{type:"STOP_DRAGGING_BLOCKS"}}function xn(){return{type:"ENTER_FORMATTED_TEXT"}}function Bn(){return{type:"EXIT_FORMATTED_TEXT"}}function Pn(e,t,n,r){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}:{type:"SELECTION_CHANGE",...e}}const Tn=(e,t,n)=>r=>{let{dispatch:i}=r;const l=(0,o.getDefaultBlockName)();if(!l)return;const a=(0,o.createBlock)(l,e);return i.insertBlock(a,n,t)};function On(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Nn(e){return{type:"UPDATE_SETTINGS",settings:e}}function Rn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Fn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Mn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Dn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Ln=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n({type:"SET_NAVIGATION_MODE",isNavigationMode:e}),e?(0,Lt.speak)((0,m.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):(0,Lt.speak)((0,m.__)("You are currently in edit mode. To return to the navigation mode, press Escape."))}},Un=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,Lt.speak)((0,m.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},jn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:r,dispatch:i}=n;if(!e||!e.length)return;const l=r.getBlocksByClientId(e);if((0,u.some)(l,(e=>!e)))return;const a=l.map((e=>e.name));if(a.some((e=>!(0,o.hasBlockSupport)(e,"multiple",!0))))return;const s=r.getBlockRootClientId(e[0]),c=r.getBlockIndex((0,u.last)((0,u.castArray)(e))),p=l.map((e=>(0,o.__experimentalCloneSanitizedBlock)(e)));return i.insertBlocks(p,c+1,s,t),p.length>1&&t&&i.multiSelect((0,u.first)(p).clientId,(0,u.last)(p).clientId),p.map((e=>e.clientId))}},Vn=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i)},zn=e=>t=>{let{select:n,dispatch:r}=t;if(!e)return;const o=n.getBlockRootClientId(e);if(n.getTemplateLock(o))return;const i=n.getBlockIndex(e);return r.insertDefaultBlock({},o,i+1)};function Gn(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const Hn=e=>async t=>{let{dispatch:n}=t;n(Gn(e,!0)),await new Promise((e=>setTimeout(e,150))),n(Gn(e,!1))};function Wn(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}const $n="core/block-editor",Kn={reducer:O,selectors:e,actions:t},qn=(0,f.createReduxStore)($n,{...Kn,persist:["preferences"]});(0,f.registerStore)($n,{...Kn,persist:["preferences"]});const Jn={name:"",isSelected:!1},Yn=(0,a.createContext)(Jn),{Provider:Qn}=Yn;function Xn(){return(0,a.useContext)(Yn)}function Zn(){const{isSelected:e,clientId:t,name:n}=Xn();return(0,f.useSelect)((r=>{if(e)return!0;const{getBlockName:o,isFirstMultiSelectedBlock:i,getMultiSelectedBlockClientIds:l}=r(qn);return!!i(t)&&l().every((e=>o(e)===n))}),[t,e,n])}function er(e){let{group:t="default",controls:n,children:r,__experimentalShareWithChildBlocks:i=!1}=e;const l=function(e,t){const n=Zn(),{clientId:r}=Xn(),i=(0,f.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:i}=e(qn),{hasBlockSupport:l}=e(o.store);return t&&l(n(r),"__experimentalExposeControlsToChildren",!1)&&i(r)}),[t,r]);var l;return n?null===(l=y[e])||void 0===l?void 0:l.Fill:i?y.parent.Fill:null}(t,i);return l?(0,a.createElement)(d.__experimentalStyleProvider,{document:document},(0,a.createElement)(l,null,(e=>{const o=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(d.__experimentalToolbarContext.Provider,{value:o},"default"===t&&(0,a.createElement)(d.ToolbarGroup,{controls:n}),r)}))):null}function tr(e){let{group:t="default",...n}=e;const r=(0,a.useContext)(d.__experimentalToolbarContext),o=y[t].Slot,i=(0,d.__experimentalUseSlot)(o.__unstableName);return Boolean(i.fills&&i.fills.length)?"default"===t?(0,a.createElement)(o,l({},n,{bubblesVirtually:!0,fillProps:r})):(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(o,l({},n,{bubblesVirtually:!0,fillProps:r}))):null}const nr=er;nr.Slot=tr;const rr=e=>(0,a.createElement)(er,l({group:"inline"},e));rr.Slot=e=>(0,a.createElement)(tr,l({group:"inline"},e));var or=nr;var ir=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"}));var lr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));var ar=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));var sr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));var cr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"}));var ur=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"}));var pr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}));var dr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"}));var fr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}));var yr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"}));var mr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}));var gr=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function hr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e} ${t}`)).join(",")}const br=(0,a.createContext)({refs:new Map,callbacks:new Map});function vr(e){let{children:t}=e;const n=(0,a.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,a.createElement)(br.Provider,{value:n},t)}function _r(e){const{refs:t,callbacks:n}=(0,a.useContext)(br),r=(0,a.useRef)();return(0,a.useLayoutEffect)((()=>(t.set(r,e),()=>{t.delete(r)})),[e]),(0,p.useRefEffect)((t=>{r.current=t,n.forEach(((n,r)=>{e===n&&r(t)}))}),[e])}function kr(e){const{refs:t}=(0,a.useContext)(br),n=(0,a.useRef)();return n.current=e,(0,a.useMemo)((()=>({get current(){let e=null;for(const[r,o]of t.entries())o===n.current&&r.current&&(e=r.current);return e}})),[])}function Er(e){const{callbacks:t}=(0,a.useContext)(br),n=kr(e),[r,o]=(0,a.useState)(null);return(0,a.useLayoutEffect)((()=>{if(e)return t.set(o,e),()=>{t.delete(o)}}),[e]),n.current||r}const Sr=["color","border","typography","spacing"],wr={"color.palette":e=>void 0===e.colors?void 0:e.colors,"color.gradients":e=>void 0===e.gradients?void 0: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=>void 0===e.fontSizes?void 0: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},Ar={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function Cr(e){const{name:t}=Xn(),n=(0,f.useSelect)((n=>{var r;if(Sr.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");const i=n(qn).getSettings(),l=(e=>Ar[e]||e)(e),a=`__experimentalFeatures.${l}`,s=`__experimentalFeatures.blocks.${t}.${l}`,c=null!==(r=(0,u.get)(i,s))&&void 0!==r?r:(0,u.get)(i,a);var p,d;if(void 0!==c)return o.__EXPERIMENTAL_PATHS_WITH_MERGE[l]?null!==(p=null!==(d=c.custom)&&void 0!==d?d:c.theme)&&void 0!==p?p:c.default:c;const f=wr[l]?wr[l](i):void 0;return void 0!==f?f:"typography.dropCap"===l||void 0}),[t,e]);return n}window.wp.warning;var Ir={default:(0,d.createSlotFill)("InspectorControls"),advanced:(0,d.createSlotFill)("InspectorAdvancedControls"),border:(0,d.createSlotFill)("InspectorControlsBorder"),color:(0,d.createSlotFill)("InspectorControlsColor"),dimensions:(0,d.createSlotFill)("InspectorControlsDimensions"),typography:(0,d.createSlotFill)("InspectorControlsTypography")};function xr(e){var t;let{__experimentalGroup:n="default",children:r}=e;const o=Zn(),i=null===(t=Ir[n])||void 0===t?void 0:t.Fill;return i?o?(0,a.createElement)(d.__experimentalStyleProvider,{document:document},(0,a.createElement)(i,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,a.createElement)(d.__experimentalToolsPanelContext.Provider,{value:t},r)}))):null:("undefined"!=typeof process&&process.env,null)}const Br=e=>{if(!(0,u.isObject)(e)||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,Br),u.identity);return(0,u.isEmpty)(t)?void 0:t};function Pr(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function Tr(e,t,n,r,o,i){var l;if((0,u.every)(e,(e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===r.length)return n;let a=null===(l=r[0])||void 0===l?void 0:l.attributes;if(i.length>1&&r.length>1){if(!r[o])return n;var s;a=null===(s=r[o])||void 0===s?void 0:s.attributes}let c=n;return(0,u.forEach)(e,((e,n)=>{e&&t[n].forEach((e=>{const t=(0,u.get)(a,e);t&&(c={...c,attributes:Pr(c.attributes,e,t)})}))})),c}function Or(e,t,n){const r=(0,o.getBlockSupport)(e,t),i=null==r?void 0:r.__experimentalSkipSerialization;return Array.isArray(i)?i.includes(n):i}function Nr(e){let{children:t,group:n,label:r}=e;const{updateBlockAttributes:o}=(0,f.useDispatch)(qn),{getBlockAttributes:i,getMultiSelectedBlockClientIds:l,getSelectedBlockClientId:s,hasMultiSelection:c}=(0,f.useSelect)(qn),u=s(),p=(0,a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?l():[u];n.forEach((n=>{const{style:r}=i(n);let o={style:r};e.forEach((e=>{o={...o,...e(o)}})),o={...o,style:Br(o.style)},t[n]=o})),o(n,t,!0)}),[Br,i,l,c,u,o]);return(0,a.createElement)(d.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:r,resetAll:p,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function Rr(e){let{Slot:t,...n}=e;const r=(0,a.useContext)(d.__experimentalToolsPanelContext);return(0,a.createElement)(t,l({},n,{fillProps:r,bubblesVirtually:!0}))}function Fr(e){var t;let{__experimentalGroup:n="default",label:r,...o}=e;const i=null===(t=Ir[n])||void 0===t?void 0:t.Slot,s=(0,d.__experimentalUseSlot)(null==i?void 0:i.__unstableName);if(!i||!s)return"undefined"!=typeof process&&process.env,null;return Boolean(s.fills&&s.fills.length)?r?(0,a.createElement)(Nr,{group:n,label:r},(0,a.createElement)(Rr,l({},o,{Slot:i}))):(0,a.createElement)(i,l({},o,{bubblesVirtually:!0})):null}const Mr=xr;Mr.Slot=Fr;const Dr=e=>(0,a.createElement)(xr,l({},e,{__experimentalGroup:"advanced"}));Dr.Slot=e=>(0,a.createElement)(Fr,l({},e,{__experimentalGroup:"advanced"})),Dr.slotName="InspectorAdvancedControls";var Lr=Mr;function Ur(e){const t=(0,o.getBlockSupport)(e,Wr);return!!(!0===t||null!=t&&t.margin)}function jr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Cr("spacing.margin"),n=!Qr(e,"margin");return!Ur(e)||t||n}function Vr(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,i=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["%","px","em","rem","vw"]}),l=Yr(n,"margin"),s=l&&l.some((e=>Kr.includes(e)));if(jr(e))return null;return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};o({style:Br(t)})},onChangeShowVisualizer:e=>{const t={...r,visualizers:{margin:e}};o({style:Br(t)})},label:(0,m.__)("Margin"),sides:l,units:i,allowReset:!1,splitOnAxis:s})),native:null})}function zr(e){const t=(0,o.getBlockSupport)(e,Wr);return!!(!0===t||null!=t&&t.padding)}function Gr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Cr("spacing.padding"),n=!Qr(e,"padding");return!zr(e)||t||n}function Hr(e){var t;const{name:n,attributes:{style:r},setAttributes:o}=e,i=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["%","px","em","rem","vw"]}),l=Yr(n,"padding"),s=l&&l.some((e=>Kr.includes(e)));if(Gr(e))return null;return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};o({style:Br(t)})},onChangeShowVisualizer:e=>{const t={...r,visualizers:{padding:e}};o({style:Br(t)})},label:(0,m.__)("Padding"),sides:l,units:i,allowReset:!1,splitOnAxis:s})),native:null})}const Wr="spacing",$r=["top","right","bottom","left"],Kr=["vertical","horizontal"];function qr(e){const t=eo(e),n=Gr(e),r=jr(e),i=Jr(e),l=function(e){if("web"!==a.Platform.OS)return!1;return Xr(e)||zr(e)||Ur(e)}(e.name);if(i||!l)return null;const s=(0,o.getBlockSupport)(e.name,[Wr,"__experimentalDefaultControls"]),c=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}};return(0,a.createElement)(Lr,{__experimentalGroup:"dimensions"},!n&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,m.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,spacing:{...null==r?void 0:r.spacing,padding:void 0}})})}(e),resetAllFilter:c("padding"),isShownByDefault:null==s?void 0:s.padding,panelId:e.clientId},(0,a.createElement)(Hr,e)),!r&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,m.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,spacing:{...null==r?void 0:r.spacing,margin:void 0}})})}(e),resetAllFilter:c("margin"),isShownByDefault:null==s?void 0:s.margin,panelId:e.clientId},(0,a.createElement)(Vr,e)),!t&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,m.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:{...r,spacing:{...null==r?void 0:r.spacing,blockGap:void 0}}})}(e),resetAllFilter:c("blockGap"),isShownByDefault:null==s?void 0:s.blockGap,panelId:e.clientId},(0,a.createElement)(to,e)))}const Jr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=eo(e),n=Gr(e),r=jr(e);return t&&n&&r};function Yr(e,t){var n;const r=(0,o.getBlockSupport)(e,Wr);if(r&&"boolean"!=typeof r[t])return Array.isArray(r[t])?r[t]:null!==(n=r[t])&&void 0!==n&&n.sides?r[t].sides:void 0}function Qr(e,t){const n=Yr(e,t);return!(n&&n.some((e=>$r.includes(e)))&&n.some((e=>Kr.includes(e))))||(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),!1)}function Xr(e){const t=(0,o.getBlockSupport)(e,Wr);return!!(!0===t||null!=t&&t.blockGap)}function Zr(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function eo(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Cr("spacing.blockGap");return!Xr(e)||t}function to(e){var t;const{clientId:n,attributes:{style:r},name:o,setAttributes:i}=e,l=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["%","px","em","rem","vw"]}),s=Yr(o,"blockGap"),c=kr(n);if(eo(e))return null;const u=s&&s.some((e=>Kr.includes(e))),p=e=>{var t;let n=e;e&&u&&(n={...Zr(e)});const o={...r,spacing:{...null==r?void 0:r.spacing,blockGap:n}};i({style:Br(o)});const l=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var a;c.current&&l&&(null===(a=c.current.parentNode)||void 0===a||a.replaceChild(c.current,c.current))},f=Zr(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap),y=u?{...f,right:null==f?void 0:f.left,bottom:null==f?void 0:f.top}:null==f?void 0:f.top;return a.Platform.select({web:(0,a.createElement)(a.Fragment,null,u?(0,a.createElement)(d.__experimentalBoxControl,{label:(0,m.__)("Block spacing"),min:0,onChange:p,units:l,sides:s,values:y,allowReset:!1,splitOnAxis:u}):(0,a.createElement)(d.__experimentalUnitControl,{label:(0,m.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:p,units:l,value:y})),native:null})}const no=(0,a.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(d.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),ro=(0,a.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(d.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),oo={top:{icon:(0,a.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(d.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,m._x)("Align top","Block vertical alignment setting")},center:{icon:ro,title:(0,m._x)("Align middle","Block vertical alignment setting")},bottom:{icon:no,title:(0,m._x)("Align bottom","Block vertical alignment setting")}},io=["top","center","bottom"],lo={isAlternate:!0};var ao=function(e){let{value:t,onChange:n,controls:r=io,isCollapsed:o=!0,isToolbar:i}=e;const s=oo[t],c=oo.top,u=i?d.ToolbarGroup:d.ToolbarDropdownMenu,p=i?{isCollapsed:o}:{};return(0,a.createElement)(u,l({popoverProps:lo,icon:s?s.icon:c.icon,label:(0,m._x)("Change vertical alignment","Block vertical alignment setting label"),controls:r.map((e=>{return{...oo[e],isActive:t===e,role:o?"menuitemradio":void 0,onClick:(r=e,()=>n(t===r?void 0:r))};var r}))},p))};const so=e=>(0,a.createElement)(ao,l({},e,{isToolbar:!1})),co=e=>(0,a.createElement)(ao,l({},e,{isToolbar:!0})),uo={left:pr,center:dr,right:fr,"space-between":yr};var po=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:r,value:o,popoverProps:i,isToolbar:s}=e;const c=e=>{r(e===o?void 0:e)},u=o?uo[o]:uo.left,p=[{name:"left",icon:pr,title:(0,m.__)("Justify items left"),isActive:"left"===o,onClick:()=>c("left")},{name:"center",icon:dr,title:(0,m.__)("Justify items center"),isActive:"center"===o,onClick:()=>c("center")},{name:"right",icon:fr,title:(0,m.__)("Justify items right"),isActive:"right"===o,onClick:()=>c("right")},{name:"space-between",icon:yr,title:(0,m.__)("Space between items"),isActive:"space-between"===o,onClick:()=>c("space-between")}],f=s?d.ToolbarGroup:d.ToolbarDropdownMenu,y=s?{isCollapsed:n}:{};return(0,a.createElement)(f,l({icon:u,popoverProps:i,label:(0,m.__)("Change items justification"),controls:p.filter((e=>t.includes(e.name)))},y))};const fo=e=>(0,a.createElement)(po,l({},e,{isToolbar:!1})),yo=e=>(0,a.createElement)(po,l({},e,{isToolbar:!0})),mo={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},go={left:"flex-start",right:"flex-end",center:"center"},ho={top:"flex-start",center:"center",bottom:"flex-end"},bo=["wrap","nowrap"];var vo={name:"flex",label:(0,m.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r={}}=e;const{allowOrientation:o=!0}=r;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Flex,null,(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(ko,{layout:t,onChange:n})),(0,a.createElement)(d.FlexItem,null,o&&(0,a.createElement)(So,{layout:t,onChange:n}))),(0,a.createElement)(Eo,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:r}=e;if(null!=r&&r.allowSwitching)return null;const{allowVerticalAlignment:o=!0}=r;return(0,a.createElement)(or,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(ko,{layout:t,onChange:n,isToolbar:!0}),o&&"vertical"!==(null==t?void 0:t.orientation)&&(0,a.createElement)(_o,{layout:t,onChange:n,isToolbar:!0}))},save:function(e){var t,n;let{selector:r,layout:i,style:l,blockName:s}=e;const{orientation:c="horizontal"}=i,u=Cr("spacing.blockGap"),p=(0,o.getBlockSupport)(s,["spacing","blockGap","__experimentalDefault"])||"0.5em",d=null!==u,f=null!=l&&null!==(t=l.spacing)&&void 0!==t&&t.blockGap&&!Or(s,"spacing","blockGap")?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Zr(e);if(!n)return null;const r=(null==n?void 0:n.top)||t,o=(null==n?void 0:n.left)||t;return r===o?r:`${r} ${o}`}(null==l||null===(n=l.spacing)||void 0===n?void 0:n.blockGap,p):`var( --wp--style--block-gap, ${p} )`,y=mo[i.justifyContent]||mo.left,m=bo.includes(i.flexWrap)?i.flexWrap:"wrap",g=`\n\t\tflex-direction: row;\n\t\talign-items: ${ho[i.verticalAlignment]||ho.center};\n\t\tjustify-content: ${y};\n\t\t`,h=`\n\t\tflex-direction: column;\n\t\talign-items: ${go[i.justifyContent]||go.left};\n\t\t`;return(0,a.createElement)("style",null,`\n\t\t\t\t${hr(r)} {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-wrap: ${m};\n\t\t\t\t\tgap: ${d?f:p};\n\t\t\t\t\t${"horizontal"===c?g:h}\n\t\t\t\t}\n\n\t\t\t\t${hr(r,"> *")} {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t}\n\t\t\t`)},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function _o(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{verticalAlignment:o=ho.center}=t,i=e=>{n({...t,verticalAlignment:e})};if(r)return(0,a.createElement)(so,{onChange:i,value:o});const l=[{value:"flex-start",label:(0,m.__)("Align items top")},{value:"center",label:(0,m.__)("Align items center")},{value:"flex-end",label:(0,m.__)("Align items bottom")}];return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,a.createElement)("legend",null,(0,m.__)("Vertical alignment")),(0,a.createElement)("div",null,l.map(((e,t,n)=>(0,a.createElement)(d.Button,{key:e,label:n,icon:t,isPressed:o===e,onClick:()=>i(e)})))))}function ko(e){let{layout:t,onChange:n,isToolbar:r=!1}=e;const{justifyContent:o="left",orientation:i="horizontal"}=t,l=e=>{n({...t,justifyContent:e})},s=["left","center","right"];if("horizontal"===i&&s.push("space-between"),r)return(0,a.createElement)(fo,{allowedControls:s,value:o,onChange:l,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:pr,label:(0,m.__)("Justify items left")},{value:"center",icon:dr,label:(0,m.__)("Justify items center")},{value:"right",icon:fr,label:(0,m.__)("Justify items right")}];return"horizontal"===i&&c.push({value:"space-between",icon:yr,label:(0,m.__)("Space between items")}),(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,a.createElement)("legend",null,(0,m.__)("Justification")),(0,a.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:r}=e;return(0,a.createElement)(d.Button,{key:t,label:r,icon:n,isPressed:o===t,onClick:()=>l(t)})}))))}function Eo(e){let{layout:t,onChange:n}=e;const{flexWrap:r="wrap"}=t;return(0,a.createElement)(d.ToggleControl,{label:(0,m.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===r})}function So(e){let{layout:t,onChange:n}=e;const{orientation:r="horizontal"}=t;return(0,a.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,a.createElement)("legend",null,(0,m.__)("Orientation")),(0,a.createElement)(d.Button,{label:"horizontal",icon:mr,isPressed:"horizontal"===r,onClick:()=>n({...t,orientation:"horizontal"})}),(0,a.createElement)(d.Button,{label:"vertical",icon:gr,isPressed:"vertical"===r,onClick:()=>n({...t,orientation:"vertical"})}))}var wo=function(e){let{icon:t,size:n=24,...r}=e;return(0,a.cloneElement)(t,{width:n,height:n,...r})},Ao={name:"default",label:(0,m.__)("Flow"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:r,contentSize:o}=t,i=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["%","px","em","rem","vw"]});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(d.__experimentalUnitControl,{label:(0,m.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:i}),(0,a.createElement)(wo,{icon:ar})),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,a.createElement)(d.__experimentalUnitControl,{label:(0,m.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:i}),(0,a.createElement)(wo,{icon:cr}))),(0,a.createElement)("div",{className:"block-editor-hooks__layout-controls-reset"},(0,a.createElement)(d.Button,{variant:"secondary",isSmall:!0,disabled:!o&&!r,onClick:()=>n({contentSize:void 0,wideSize:void 0,inherit:!1})},(0,m.__)("Reset"))),(0,a.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,m.__)("Customize the width for all elements that are assigned to the center or wide columns.")))},toolBarControls:function(){return null},save:function(e){var t;let{selector:n,layout:r={},style:o,blockName:i}=e;const{contentSize:l,wideSize:s}=r,c=null!==Cr("spacing.blockGap"),u=Zr(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),p=null!=u&&u.top&&!Or(i,"spacing","blockGap")?null==u?void 0:u.top:"var( --wp--style--block-gap )";let d=l||s?`\n\t\t\t\t\t${hr(n,"> :where(:not(.alignleft):not(.alignright))")} {\n\t\t\t\t\t\tmax-width: ${null!=l?l:s};\n\t\t\t\t\t\tmargin-left: auto !important;\n\t\t\t\t\t\tmargin-right: auto !important;\n\t\t\t\t\t}\n\t\t\t\t\t${hr(n,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=s?s:l};\n\t\t\t\t\t}\n\t\t\t\t\t${hr(n,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return d+=`\n\t\t\t${hr(n,"> .alignleft")} {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-inline-start: 0;\n\t\t\t\tmargin-inline-end: 2em;\n\t\t\t}\n\t\t\t${hr(n,"> .alignright")} {\n\t\t\t\tfloat: right;\n\t\t\t\tmargin-inline-start: 2em;\n\t\t\t\tmargin-inline-end: 0;\n\t\t\t}\n\n\t\t\t${hr(n,"> .aligncenter")} {\n\t\t\t\tmargin-left: auto !important;\n\t\t\t\tmargin-right: auto !important;\n\t\t\t}\n\t\t`,c&&(d+=`\n\t\t\t\t${hr(n,"> *")} {\n\t\t\t\t\tmargin-block-start: 0;\n\t\t\t\t\tmargin-block-end: 0;\n\t\t\t\t}\n\t\t\t\t${hr(n,"> * + *")} {\n\t\t\t\t\tmargin-block-start: ${p};\n\t\t\t\t}\n\t\t\t`),(0,a.createElement)("style",null,d)},getOrientation:()=>"vertical",getAlignments(e){const t=function(e){const{contentSize:t,wideSize:n}=e,r={},o=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;o.test(t)&&(r.none=(0,m.sprintf)((0,m.__)("Max %s wide"),t));o.test(n)&&(r.wide=(0,m.sprintf)((0,m.__)("Max %s wide"),n));return r}(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:r}=e,o=[{name:"left"},{name:"center"},{name:"right"}];return n&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:t.wide}),o.unshift({name:"none",info:t.none}),o}};const Co=[Ao,vo];function Io(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Co.find((t=>t.name===e))}const xo={type:"default"},Bo=(0,a.createContext)(xo),Po=Bo.Provider;function To(){return(0,a.useContext)(Bo)}function Oo(e){let{layout:t={},...n}=e;const r=Io(t.type);return r?(0,a.createElement)(r.save,l({layout:t},n)):null}const No=["none","left","center","right","wide","full"],Ro=["wide","full"];function Fo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:No;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),r=To(),o=Io(null==r?void 0:r.type),i=o.getAlignments(r);if(n){const t=i.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==o.name)return[];const{alignments:l=No}=r,a=e.filter((e=>(r.alignments||t||!Ro.includes(e))&&l.includes(e))).map((e=>({name:e})));return 1===a.length&&"none"===a[0].name?[]:a}const Mo={none:{icon:ir,title:(0,m._x)("None","Alignment option")},left:{icon:lr,title:(0,m.__)("Align left")},center:{icon:ar,title:(0,m.__)("Align center")},right:{icon:sr,title:(0,m.__)("Align right")},wide:{icon:cr,title:(0,m.__)("Wide width")},full:{icon:ur,title:(0,m.__)("Full width")}},Do={isAlternate:!0};var Lo=function(e){let{value:t,onChange:n,controls:r,isToolbar:o,isCollapsed:i=!0}=e;const s=Fo(r);if(!!!s.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const p=Mo[t],f=Mo.none,y=o?d.ToolbarGroup:d.ToolbarDropdownMenu,g={popoverProps:Do,icon:p?p.icon:f.icon,label:(0,m.__)("Align"),toggleProps:{describedBy:(0,m.__)("Change alignment")}},h=o||a.Platform.isNative?{isCollapsed:o?i:void 0,controls:s.map((e=>{let{name:n}=e;return{...Mo[n],isActive:t===n||!t&&"none"===n,role:i?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{children:e=>{let{onClose:n}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},s.map((e=>{let{name:r,info:o}=e;const{icon:i,title:l}=Mo[r],s=r===t||!t&&"none"===r;return(0,a.createElement)(d.MenuItem,{key:r,icon:i,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":s}),isSelected:s,onClick:()=>{u(r),n()},role:"menuitemradio",info:o},l)}))))}};return(0,a.createElement)(y,l({},g,h))};const Uo=e=>(0,a.createElement)(Lo,l({},e,{isToolbar:!1})),jo=e=>(0,a.createElement)(Lo,l({},e,{isToolbar:!0})),Vo=["left","center","right","wide","full"],zo=["wide","full"];function Go(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Vo.filter((t=>e.includes(t))):!0===e?[...Vo]:[],!r||!0===e&&!n?(0,u.without)(t,...zo):t}const Ho=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n}=t,r=Fo(Go((0,o.getBlockSupport)(n,"align"),(0,o.hasBlockSupport)(n,"alignWide",!0))).map((e=>{let{name:t}=e;return t}));return(0,a.createElement)(a.Fragment,null,!!r.length&&(0,a.createElement)(or,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(Uo,{value:t.attributes.align,onChange:e=>{if(!e){var n,r;const i=(0,o.getBlockType)(t.name);(null==i||null===(n=i.attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e="")}t.setAttributes({align:e})},controls:r})),(0,a.createElement)(e,t))}),"withToolbarControls"),Wo=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,{align:i}=r,s=Fo(Go((0,o.getBlockSupport)(n,"align"),(0,o.hasBlockSupport)(n,"alignWide",!0)));if(void 0===i)return(0,a.createElement)(e,t);let c=t.wrapperProps;return s.some((e=>e.name===i))&&(c={...c,"data-align":i}),(0,a.createElement)(e,l({},t,{wrapperProps:c}))}));(0,i.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return(0,u.has)(e.attributes,["align","type"])||(0,o.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Vo,""]}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Wo),(0,i.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Ho),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:r}=n;return Go((0,o.getBlockSupport)(t,"align"),(0,o.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=c()(`align${r}`,e.className)),e})),(0,i.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return(0,u.has)(e.attributes,["lock","type"])||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const $o=/[\s#]/g,Ko={type:"string",source:"attribute",attribute:"id",selector:"*"};const qo=(0,p.createHigherOrderComponent)((e=>t=>{if((0,o.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===a.Platform.OS,r=(0,a.createElement)(d.TextControl,{className:"html-anchor-control",label:(0,m.__)("HTML anchor"),help:(0,a.createElement)(a.Fragment,null,(0,m.__)("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,a.createElement)(d.ExternalLink,{href:(0,m.__)("https://wordpress.org/support/article/page-jumps/")},(0,m.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,m.__)("Add an anchor"),onChange:e=>{e=e.replace($o,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(Lr,{__experimentalGroup:"advanced"},r),!n&&"core/heading"===t.name&&(0,a.createElement)(Lr,null,(0,a.createElement)(d.PanelBody,{title:(0,m.__)("Heading settings")},r)))}return(0,a.createElement)(e,t)}),"withInspectorControl");(0,i.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return(0,u.has)(e.attributes,["anchor","type"])||(0,o.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Ko}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",qo),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Jo=(0,p.createHigherOrderComponent)((e=>t=>(0,o.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(Lr,{__experimentalGroup:"advanced"},(0,a.createElement)(d.TextControl,{autoComplete:"off",label:(0,m.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,m.__)("Separate multiple classes with spaces.")}))):(0,a.createElement)(e,t)),"withInspectorControl");function Yo(e,t,n,r){const o=(0,u.get)(e,n);if(!o)return[];const i=[];if("string"==typeof o)i.push({selector:t.selector,key:r,value:o});else{const e=["top","right","bottom","left"].reduce(((e,n)=>{const i=(0,u.get)(o,[n]);return i&&e.push({selector:t.selector,key:`${r}${(0,u.upperFirst)(n)}`,value:i}),e}),[]);i.push(...e)}return i}(0,i.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,o.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,i.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Jo),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,o.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){if(!(0,o.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===r.length&&e.innerBlocks.length===t.length)return e;if(1===r.length&&t.length>1||r.length>1&&1===t.length)return e;if(t[n]){var i;const r=null===(i=t[n])||void 0===i?void 0:i.attributes.className;if(r)return{...e,attributes:{...e.attributes,className:r}}}return e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,o.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=(0,u.uniq)([(0,o.getBlockDefaultClassName)(t.name),...e.className.split(" ")]).join(" ").trim():e.className=(0,o.getBlockDefaultClassName)(t.name)),e}));const Qo=[{name:"margin",generate:(e,t)=>Yo(e,t,["spacing","margin"],"margin")},{name:"padding",generate:(e,t)=>Yo(e,t,["spacing","padding"],"padding")}];function Xo(e,t){const n=[];return Qo.forEach((r=>{n.push(...r.generate(e,t))})),n}var Zo=window.wp.dom;const ei=(0,a.createContext)({});function ti(e){let{value:t,children:n}=e;const r=(0,a.useContext)(ei),o=(0,a.useMemo)((()=>({...r,...t})),[r,t]);return(0,a.createElement)(ei.Provider,{value:o,children:n})}var ni=ei;const ri={};var oi=(0,d.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,r=(0,o.getBlockType)(n),i=(0,a.useContext)(ni),s=(0,a.useMemo)((()=>r&&r.usesContext?(0,u.pick)(i,r.usesContext):ri),[r,i]);if(!r)return null;const p=r.edit||r.save;if(r.apiVersion>1)return(0,a.createElement)(p,l({},e,{context:s}));const d=(0,o.hasBlockSupport)(r,"className",!0)?(0,o.getBlockDefaultClassName)(n):null,f=c()(d,t.className);return(0,a.createElement)(p,l({},e,{context:s,className:f}))}));function ii(e){const{name:t,isSelected:n,clientId:r}=e,o={name:t,isSelected:n,clientId:r};return(0,a.createElement)(Qn,{value:(0,a.useMemo)((()=>o),Object.values(o))},(0,a.createElement)(oi,e))}var li=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var ai=function(e){let{className:t,actions:n,children:r,secondaryActions:o}=e;return(0,a.createElement)("div",{style:{display:"contents",all:"initial"}},(0,a.createElement)("div",{className:c()(t,"block-editor-warning")},(0,a.createElement)("div",{className:"block-editor-warning__contents"},(0,a.createElement)("p",{className:"block-editor-warning__message"},r),(a.Children.count(n)>0||o)&&(0,a.createElement)("div",{className:"block-editor-warning__actions"},a.Children.count(n)>0&&a.Children.map(n,((e,t)=>(0,a.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),o&&(0,a.createElement)(d.DropdownMenu,{className:"block-editor-warning__secondary",icon:li,label:(0,m.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,a.createElement)(d.MenuGroup,null,o.map(((e,t)=>(0,a.createElement)(d.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))},si=n(1973);function ci(e){let{title:t,rawContent:n,renderedContent:r,action:o,actionText:i,className:l}=e;return(0,a.createElement)("div",{className:l},(0,a.createElement)("div",{className:"block-editor-block-compare__content"},(0,a.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,a.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,a.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,a.createElement)(a.RawHTML,null,(0,Zo.safeHTML)(r)))),(0,a.createElement)("div",{className:"block-editor-block-compare__action"},(0,a.createElement)(d.Button,{variant:"secondary",tabIndex:"0",onClick:o},i)))}var ui=function(e){let{block:t,onKeep:n,onConvert:r,convertor:i,convertButtonText:l}=e;const s=(p=i(t),(0,u.castArray)(p).map((e=>(0,o.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var p;const d=(f=t.originalContent,y=s,(0,si.Kx)(f,y).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,a.createElement)("span",{key:t,className:n},e.value)})));var f,y;return(0,a.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,a.createElement)(ci,{title:(0,m.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,m.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,a.createElement)(ci,{title:(0,m.__)("After Conversion"),className:"block-editor-block-compare__converted",action:r,actionText:l,rawContent:d,renderedContent:s}))};const pi=e=>(0,o.rawHandler)({HTML:e.originalContent});var di=(0,p.compose)([(0,f.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(qn).getBlock(n)}})),(0,f.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:r}=e(qn);return{convertToClassic(){r(n.clientId,(e=>(0,o.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){r(n.clientId,(e=>(0,o.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){r(n.clientId,pi(n))},attemptBlockRecovery(){r(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:r}=e;return(0,o.createBlock)(t,n,r)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:r,attemptBlockRecovery:i,block:l}=e;const s=!!(0,o.getBlockType)("core/html"),[c,u]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>u(!0)),[]),f=(0,a.useCallback)((()=>u(!1)),[]),y=(0,a.useMemo)((()=>[{title:(0,m._x)("Resolve","imperative verb"),onClick:p},s&&{title:(0,m.__)("Convert to HTML"),onClick:t},{title:(0,m.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)),[p,t,r]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ai,{actions:[(0,a.createElement)(d.Button,{key:"recover",onClick:i,variant:"primary"},(0,m.__)("Attempt Block Recovery"))],secondaryActions:y},(0,m.__)("This block contains unexpected or invalid content.")),c&&(0,a.createElement)(d.Modal,{title:(0,m.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},(0,a.createElement)(ui,{block:l,onKeep:t,onConvert:n,convertor:pi,convertButtonText:(0,m.__)("Convert to Blocks")})))}));const fi=(0,a.createElement)(ai,{className:"block-editor-block-list__block-crash-warning"},(0,m.__)("This block has encountered an error and cannot be previewed."));var yi=()=>fi;class mi extends a.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var gi=mi,hi=n(773);var bi=function(e){let{clientId:t}=e;const[n,r]=(0,a.useState)(""),i=(0,f.useSelect)((e=>e(qn).getBlock(t)),[t]),{updateBlock:l}=(0,f.useDispatch)(qn);return(0,a.useEffect)((()=>{r((0,o.getBlockContent)(i))}),[i]),(0,a.createElement)(hi.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,o.getBlockType)(i.name);if(!e)return;const a=(0,o.getBlockAttributes)(e,n,i.attributes),s=n||(0,o.getSaveContent)(e,a),[c]=n?(0,o.validateBlock)({...i,attributes:a,originalContent:s}):[!0];l(t,{attributes:a,originalContent:s,isValid:c}),n||r({content:s})},onChange:e=>r(e.target.value)})},vi=n(9196),_i=n.n(vi),ki=Object.defineProperty,Ei={};((e,t)=>{for(var n in t)ki(e,n,{get:t[n],enumerable:!0})})(Ei,{assign:()=>tl,colors:()=>Xi,createStringInterpolator:()=>qi,skipAnimation:()=>Zi,to:()=>Ji,willAdvance:()=>el});var Si=Ui(),wi=e=>Fi(e,Si),Ai=Ui();wi.write=e=>Fi(e,Ai);var Ci=Ui();wi.onStart=e=>Fi(e,Ci);var Ii=Ui();wi.onFrame=e=>Fi(e,Ii);var xi=Ui();wi.onFinish=e=>Fi(e,xi);var Bi=[];wi.setTimeout=(e,t)=>{const n=wi.now()+t,r=()=>{const e=Bi.findIndex((e=>e.cancel==r));~e&&Bi.splice(e,1),Ni-=~e?1:0},o={time:n,handler:e,cancel:r};return Bi.splice(Pi(n),0,o),Ni+=1,Mi(),o};var Pi=e=>~(~Bi.findIndex((t=>t.time>e))||~Bi.length);wi.cancel=e=>{Ci.delete(e),Ii.delete(e),xi.delete(e),Si.delete(e),Ai.delete(e)},wi.sync=e=>{Ri=!0,wi.batchedUpdates(e),Ri=!1},wi.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,wi.onStart(n)}return r.handler=e,r.cancel=()=>{Ci.delete(n),t=null},r};var Ti="undefined"!=typeof window?window.requestAnimationFrame:()=>{};wi.use=e=>Ti=e,wi.now="undefined"!=typeof performance?()=>performance.now():Date.now,wi.batchedUpdates=e=>e(),wi.catch=console.error,wi.frameLoop="always",wi.advance=()=>{"demand"!==wi.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Li()};var Oi=-1,Ni=0,Ri=!1;function Fi(e,t){Ri?(t.delete(e),e(0)):(t.add(e),Mi())}function Mi(){Oi<0&&(Oi=0,"demand"!==wi.frameLoop&&Ti(Di))}function Di(){~Oi&&(Ti(Di),wi.batchedUpdates(Li))}function Li(){const e=Oi;Oi=wi.now();const t=Pi(Oi);t&&(ji(Bi.splice(0,t),(e=>e.handler())),Ni-=t),Ni?(Ci.flush(),Si.flush(e?Math.min(64,Oi-e):16.667),Ii.flush(),Ai.flush(),xi.flush()):Oi=-1}function Ui(){let e=new Set,t=e;return{add(n){Ni+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Ni-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Ni-=t.size,ji(t,(t=>t(n)&&e.add(t))),Ni+=e.size,t=e)}}}function ji(e,t){e.forEach((e=>{try{t(e)}catch(e){wi.catch(e)}}))}function Vi(){}var zi={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 Gi(e,t){if(zi.arr(e)){if(!zi.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function Wi(e,t,n){if(zi.arr(e))for(let r=0;rzi.und(e)?[]:zi.arr(e)?e:[e];function Ki(e,t){if(e.size){const n=Array.from(e);e.clear(),Hi(n,t)}}var qi,Ji,Yi=(e,...t)=>Ki(e,(e=>e(...t))),Qi=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Xi=null,Zi=!1,el=Vi,tl=e=>{e.to&&(Ji=e.to),e.now&&(wi.now=e.now),void 0!==e.colors&&(Xi=e.colors),null!=e.skipAnimation&&(Zi=e.skipAnimation),e.createStringInterpolator&&(qi=e.createStringInterpolator),e.requestAnimationFrame&&wi.use(e.requestAnimationFrame),e.batchedUpdates&&(wi.batchedUpdates=e.batchedUpdates),e.willAdvance&&(el=e.willAdvance),e.frameLoop&&(wi.frameLoop=e.frameLoop)},nl=new Set,rl=[],ol=[],il=0,ll={get idle(){return!nl.size&&!rl.length},start(e){il>e.priority?(nl.add(e),wi.onStart(al)):(sl(e),wi(ul))},advance:ul,sort(e){if(il)wi.onFrame((()=>ll.sort(e)));else{const t=rl.indexOf(e);~t&&(rl.splice(t,1),cl(e))}},clear(){rl=[],nl.clear()}};function al(){nl.forEach(sl),nl.clear(),wi(ul)}function sl(e){rl.includes(e)||cl(e)}function cl(e){rl.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(rl,(t=>t.priority>e.priority)),0,e)}function ul(e){const t=ol;for(let n=0;n0}var pl="[-+]?\\d*\\.?\\d+",dl=pl+"%";function fl(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var yl=new RegExp("rgb"+fl(pl,pl,pl)),ml=new RegExp("rgba"+fl(pl,pl,pl,pl)),gl=new RegExp("hsl"+fl(pl,dl,dl)),hl=new RegExp("hsla"+fl(pl,dl,dl,pl)),bl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vl=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,_l=/^#([0-9a-fA-F]{6})$/,kl=/^#([0-9a-fA-F]{8})$/;function El(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 Sl(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=El(o,r,e+1/3),l=El(o,r,e),a=El(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*l)<<16|Math.round(255*a)<<8}function wl(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Al(e){return(parseFloat(e)%360+360)%360/360}function Cl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Il(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function xl(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=_l.exec(e))?parseInt(t[1]+"ff",16)>>>0:Xi&&void 0!==Xi[e]?Xi[e]:(t=yl.exec(e))?(wl(t[1])<<24|wl(t[2])<<16|wl(t[3])<<8|255)>>>0:(t=ml.exec(e))?(wl(t[1])<<24|wl(t[2])<<16|wl(t[3])<<8|Cl(t[4]))>>>0:(t=bl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=kl.exec(e))?parseInt(t[1],16)>>>0:(t=vl.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=gl.exec(e))?(255|Sl(Al(t[1]),Il(t[2]),Il(t[3])))>>>0:(t=hl.exec(e))?(Sl(Al(t[1]),Il(t[2]),Il(t[3]))|Cl(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var Bl=(e,t,n)=>{if(zi.fun(e))return e;if(zi.arr(e))return Bl({range:e,output:t,extrapolate:n});if(zi.str(e.output[0]))return qi(e);const r=e,o=r.output,i=r.range||[0,1],l=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,l,a,s){let c=s?s(e):e;if(cn){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],s,l,a,r.map)}};var Pl=1.70158,Tl=1.525*Pl,Ol=Pl+1,Nl=2*Math.PI/3,Rl=2*Math.PI/4.5,Fl=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ml={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=>Ol*e*e*e-Pl*e*e,easeOutBack:e=>1+Ol*Math.pow(e-1,3)+Pl*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Tl)/2:(Math.pow(2*e-2,2)*((Tl+1)*(2*e-2)+Tl)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Nl),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Nl)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Rl)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Rl)/2+1,easeInBounce:e=>1-Fl(1-e),easeOutBounce:Fl,easeInOutBounce:e=>e<.5?(1-Fl(1-2*e))/2:(1+Fl(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},Dl=Symbol.for("FluidValue.get"),Ll=Symbol.for("FluidValue.observers"),Ul=e=>Boolean(e&&e[Dl]),jl=e=>e&&e[Dl]?e[Dl]():e,Vl=e=>e[Ll]||null;function zl(e,t){const n=e[Ll];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Gl=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Hl(this,e)}},Hl=(e,t)=>ql(e,Dl,t);function Wl(e,t){if(e[Dl]){let n=e[Ll];n||ql(e,Ll,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function $l(e,t){const n=e[Ll];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ll]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Kl,ql=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Jl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Yl=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ql=new RegExp(`(${Jl.source})(%|[a-z]+)`,"i"),Xl=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Zl=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ea=e=>{const[t,n]=ta(e);if(!t||Qi())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&Zl.test(n)?ea(n):n||e},ta=e=>{const t=Zl.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},na=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,ra=e=>{Kl||(Kl=Xi?new RegExp(`(${Object.keys(Xi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>jl(e).replace(Zl,ea).replace(Yl,xl).replace(Kl,xl))),n=t.map((e=>e.match(Jl).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),o=r.map((t=>Bl({...e,output:t})));return e=>{const n=!Ql.test(t[0])&&t.find((e=>Ql.test(e)))?.replace(Jl,"");let r=0;return t[0].replace(Jl,(()=>`${o[r++](e)}${n||""}`)).replace(Xl,na)}},oa="react-spring: ",ia=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${oa}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},la=ia(console.warn);var aa=ia(console.warn);function sa(e){return zi.str(e)&&("#"==e[0]||/\d/.test(e)||!Qi()&&Zl.test(e)||e in(Xi||{}))}var ca=Qi()?vi.useEffect:vi.useLayoutEffect;function ua(){const e=(0,vi.useState)()[1],t=(()=>{const e=(0,vi.useRef)(!1);return ca((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var pa=e=>(0,vi.useEffect)(e,da),da=[];function fa(e){const t=(0,vi.useRef)();return(0,vi.useEffect)((()=>{t.current=e})),t.current}var ya=Symbol.for("Animated:node"),ma=e=>e&&e[ya],ga=(e,t)=>{return n=e,r=ya,o=t,Object.defineProperty(n,r,{value:o,writable:!0,configurable:!0});var n,r,o},ha=e=>e&&e[ya]&&e[ya].getPayload(),ba=class{constructor(){ga(this,this)}getPayload(){return this.payload||[]}},va=class extends ba{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,zi.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new va(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return zi.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,zi.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},_a=class extends va{constructor(e){super(0),this._string=null,this._toString=Bl({output:[e,e]})}static create(e){return new _a(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(zi.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=Bl({output:[this.getValue(),e]})),this._value=0,super.reset()}},ka={dependencies:null},Ea=class extends ba{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Wi(this.source,((n,r)=>{var o;(o=n)&&o[ya]===o?t[r]=n.getValue(e):Ul(n)?t[r]=jl(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Hi(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Wi(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){ka.dependencies&&Ul(e)&&ka.dependencies.add(e);const t=ha(e);t&&Hi(t,(e=>this.add(e)))}},Sa=class extends Ea{constructor(e){super(e)}static create(e){return new Sa(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(wa)),!0)}};function wa(e){return(sa(e)?_a:va).create(e)}function Aa(e){const t=ma(e);return t?t.constructor:zi.arr(e)?Sa:sa(e)?_a:va}var Ca=(e,t)=>{const n=!zi.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,vi.forwardRef)(((r,o)=>{const i=(0,vi.useRef)(null),l=n&&(0,vi.useCallback)((e=>{i.current=function(e,t){e&&(zi.fun(e)?e(t):e.current=t);return t}(o,e)}),[o]),[a,s]=function(e,t){const n=new Set;ka.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new Ea(e),ka.dependencies=null,[e,n]}(r,t),c=ua(),u=()=>{const e=i.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,a.getValue(!0)))&&c()},p=new Ia(u,s),d=(0,vi.useRef)();ca((()=>(d.current=p,Hi(s,(e=>Wl(e,p))),()=>{d.current&&(Hi(d.current.deps,(e=>$l(e,d.current))),wi.cancel(d.current.update))}))),(0,vi.useEffect)(u,[]),pa((()=>()=>{const e=d.current;Hi(e.deps,(t=>$l(t,e)))}));const f=t.getComponentProps(a.getValue());return vi.createElement(e,{...f,ref:l})}))},Ia=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&wi.write(this.update)}};var xa=Symbol.for("AnimatedComponent"),Ba=e=>zi.str(e)?e:e&&zi.str(e.displayName)?e.displayName:zi.fun(e)&&e.name||null;function Pa(e,...t){return zi.fun(e)?e(...t):e}var Ta=(e,t)=>!0===e||!!(t&&e&&(zi.fun(e)?e(t):$i(e).includes(t))),Oa=(e,t)=>zi.obj(e)?t&&e[t]:e,Na=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Ra=e=>e,Fa=(e,t=Ra)=>{let n=Ma;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);zi.und(n)||(r[o]=n)}return r},Ma=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Da={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 La(e){const t=function(e){const t={};let n=0;if(Wi(e,((e,r)=>{Da[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Wi(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function Ua(e){return e=jl(e),zi.arr(e)?e.map(Ua):sa(e)?Ei.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function ja(e){for(const t in e)return!0;return!1}function Va(e){return zi.fun(e)||zi.arr(e)&&zi.obj(e[0])}function za(e,t){e.ref?.delete(e),t?.delete(e)}function Ga(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var Ha={tension:170,friction:26,mass:1,damping:1,easing:Ml.linear,clamp:!1};function Wa(e,t){if(zi.und(t.decay)){const n=!zi.und(t.tension)||!zi.und(t.friction);!n&&zi.und(t.frequency)&&zi.und(t.damping)&&zi.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var $a=[];function Ka(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise(((l,a)=>{let s,c,u=Ta(n.cancel??r?.cancel,t);if(u)f();else{zi.und(n.pause)||(o.paused=Ta(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||Ta(e,t)),s=Pa(n.delay||0,t),e?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function p(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),s=c.time-wi.now()}function d(){s>0&&!Ei.skipAnimation?(o.delayed=!0,c=wi.setTimeout(f,s),o.pauseQueue.add(p),o.timeouts.add(c)):f()}function f(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(p),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},l)}catch(e){a(e)}}}))}var qa=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Qa(e.get()):t.every((e=>e.noop))?Ja(e.get()):Ya(e.get(),t.every((e=>e.finished))),Ja=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ya=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Qa=e=>({value:e,cancelled:!0,finished:!1});function Xa(e,t,n,r){const{callId:o,parentId:i,onRest:l}=t,{asyncTo:a,promise:s}=n;return i||e!==a||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=Fa(t,((e,t)=>"onRest"===t?void 0:e));let u,p;const d=new Promise(((e,t)=>(u=e,p=t))),f=e=>{const t=o<=(n.cancelId||0)&&Qa(r)||o!==n.asyncId&&Ya(r,!1);if(t)throw e.result=t,p(e),e},y=(e,t)=>{const i=new es,l=new ts;return(async()=>{if(Ei.skipAnimation)throw Za(n),l.result=Ya(r,!1),p(l),l;f(i);const a=zi.obj(e)?{...e}:{...t,to:e};a.parentId=o,Wi(c,((e,t)=>{zi.und(a[t])&&(a[t]=e)}));const s=await r.start(a);return f(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};let m;if(Ei.skipAnimation)return Za(n),Ya(r,!1);try{let t;t=zi.arr(e)?(async e=>{for(const t of e)await y(t)})(e):Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([t.then(u),d]),m=Ya(r.get(),!0,!1)}catch(e){if(e instanceof es)m=e.result;else{if(!(e instanceof ts))throw e;m=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?s:void 0)}return zi.fun(l)&&wi.batchedUpdates((()=>{l(m,r,r.item)})),m})():s}function Za(e,t){Ki(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var es=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},ts=class extends Error{constructor(){super("SkipAnimationSignal")}},ns=e=>e instanceof os,rs=1,os=class extends Gl{constructor(){super(...arguments),this.id=rs++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ma(this);return e&&e.getValue()}to(...e){return Ei.to(this,e)}interpolate(...e){return la(`${oa}The "interpolate" function is deprecated in v9 (use "to" instead)`),Ei.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){zl(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ll.sort(this),zl(this,{type:"priority",parent:this,priority:e})}},is=Symbol.for("SpringPhase"),ls=e=>(1&e[is])>0,as=e=>(2&e[is])>0,ss=e=>(4&e[is])>0,cs=(e,t)=>t?e[is]|=3:e[is]&=-3,us=(e,t)=>t?e[is]|=4:e[is]&=-5,ps=class extends os{constructor(e,t){if(super(),this.animation=new class{constructor(){this.changed=!1,this.values=$a,this.toValues=null,this.fromValues=$a,this.config=new class{constructor(){this.velocity=0,Object.assign(this,Ha)}},this.immediate=!1}},this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!zi.und(e)||!zi.und(t)){const n=zi.obj(e)?{...e}:{...t,from:e};zi.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(as(this)||this._state.asyncTo)||ss(this)}get goal(){return jl(this.animation.to)}get velocity(){const e=ma(this);return e instanceof va?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return ls(this)}get isAnimating(){return as(this)}get isPaused(){return ss(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,l=ha(r.to);!l&&Ul(r.to)&&(o=$i(jl(r.to))),r.values.forEach(((a,s)=>{if(a.done)return;const c=a.constructor==_a?1:l?l[s].lastPosition:o[s];let u=r.immediate,p=c;if(!u){if(p=a.lastPosition,i.tension<=0)return void(a.done=!0);let t=a.elapsedTime+=e;const n=r.fromValues[s],o=null!=a.v0?a.v0:a.v0=zi.arr(i.velocity)?i.velocity[s]:i.velocity;let l;const d=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(zi.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);p=n+o/(1-e)*(1-r),u=Math.abs(a.lastPosition-p)<=d,l=o*r}else{l=null==a.lastVelocity?o:a.lastVelocity;const t=i.restVelocity||d/10,r=i.clamp?0:i.bounce,s=!zi.und(r),f=n==c?a.v0>0:nt,y||(u=Math.abs(c-p)<=d,!u));++e){s&&(m=p==c||p>c==f,m&&(l=-l*r,p=c));l+=(1e-6*-i.tension*(p-c)+.001*-i.friction*l)/i.mass*g,p+=l*g}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,a.durationProgress>0&&(a.elapsedTime=i.duration*a.durationProgress,t=a.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,a.durationProgress=r),p=n+i.easing(r)*(c-n),l=(p-a.lastPosition)/e,u=1==r}a.lastVelocity=l,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),u=!0)}l&&!l[s].done&&(u=!1),u?a.done=!0:t=!1,a.setValue(p,i.round)&&(n=!0)}));const a=ma(this),s=a.getValue();if(t){const e=jl(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(a.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return wi.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(as(this)){const{to:e,config:t}=this.animation;wi.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 zi.und(e)?(n=this.queue||[],this.queue=[]):n=[zi.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>qa(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Za(this._state,e&&this._lastCallId),wi.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=zi.obj(n)?n[t]:n,(null==n||Va(n))&&(n=void 0),r=zi.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return ls(this)||(e.reverse&&([n,r]=[r,n]),r=jl(r),zi.und(r)?ma(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Fa(e,((e,t)=>/^on/.test(t)?Oa(e,n):e))),bs(this,e,"onProps"),vs(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Ka(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{ss(this)||(us(this,!0),Yi(i.pauseQueue),vs(this,"onPause",Ya(this,ds(this,this.animation.to)),this))},resume:()=>{ss(this)&&(us(this,!1),as(this)&&this._resume(),Yi(i.resumeQueue),vs(this,"onResume",Ya(this,ds(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=fs(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Qa(this));const r=!zi.und(e.to),o=!zi.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Qa(this));this._lastToId=t.callId}const{key:i,defaultProps:l,animation:a}=this,{to:s,from:c}=a;let{to:u=s,from:p=c}=e;!o||r||t.default&&!zi.und(u)||(u=p),t.reverse&&([u,p]=[p,u]);const d=!Gi(p,c);d&&(a.from=p),p=jl(p);const f=!Gi(u,s);f&&this._focus(u);const y=Va(t.to),{config:m}=a,{decay:g,velocity:h}=m;(r||o)&&(m.velocity=0),t.config&&!y&&function(e,t,n){n&&(Wa(n={...n},t),t={...n,...t}),Wa(e,t),Object.assign(e,t);for(const t in Ha)null==e[t]&&(e[t]=Ha[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;zi.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(m,Pa(t.config,i),t.config!==l.config?Pa(l.config,i):void 0);let b=ma(this);if(!b||zi.und(u))return n(Ya(this,!0));const v=zi.und(t.reset)?o&&!t.default:!zi.und(p)&&Ta(t.reset,i),_=v?p:this.get(),k=Ua(u),E=zi.num(k)||zi.arr(k)||sa(k),S=!y&&(!E||Ta(l.immediate||t.immediate,i));if(f){const e=Aa(u);if(e!==b.constructor){if(!S)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(k)}}const w=b.constructor;let A=Ul(u),C=!1;if(!A){const e=v||!ls(this)&&d;(f||e)&&(C=Gi(Ua(_),k),A=!C),(Gi(a.immediate,S)||S)&&Gi(m.decay,g)&&Gi(m.velocity,h)||(A=!0)}if(C&&as(this)&&(a.changed&&!v?A=!0:A||this._stop(s)),!y&&((A||Ul(s))&&(a.values=b.getPayload(),a.toValues=Ul(u)?null:w==_a?[1]:$i(k)),a.immediate!=S&&(a.immediate=S,S||v||this._set(s)),A)){const{onRest:e}=a;Hi(hs,(e=>bs(this,t,e)));const r=Ya(this,ds(this,s));Yi(this._pendingCalls,r),this._pendingCalls.add(n),a.changed&&wi.batchedUpdates((()=>{a.changed=!v,e?.(r,this),v?Pa(l.onRest,r):a.onStart?.(r,this)}))}v&&this._set(_),y?n(Xa(t.to,t,this._state,this)):A?this._start():as(this)&&!f?this._pendingCalls.add(n):n(Ja(_))}_focus(e){const t=this.animation;e!==t.to&&(Vl(this)&&this._detach(),t.to=e,Vl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ul(t)&&(Wl(t,this),ns(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ul(e)&&$l(e,this)}_set(e,t=!0){const n=jl(e);if(!zi.und(n)){const e=ma(this);if(!e||!Gi(n,e.getValue())){const r=Aa(n);e&&e.constructor==r?e.setValue(n):ga(this,r.create(n)),e&&wi.batchedUpdates((()=>{this._onChange(n,t)}))}}return ma(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,vs(this,"onStart",Ya(this,ds(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Pa(this.animation.onChange,e,this)),Pa(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ma(this).reset(jl(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),as(this)||(cs(this,!0),ss(this)||this._resume())}_resume(){Ei.skipAnimation?this.finish():ll.start(this)}_stop(e,t){if(as(this)){cs(this,!1);const n=this.animation;Hi(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),zl(this,{type:"idle",parent:this});const r=t?Qa(this.get()):Ya(this.get(),ds(this,e??n.to));Yi(this._pendingCalls,r),n.changed&&(n.changed=!1,vs(this,"onRest",r,this))}}};function ds(e,t){const n=Ua(t);return Gi(Ua(e.get()),n)}function fs(e,t=e.loop,n=e.to){const r=Pa(t);if(r){const o=!0!==r&&La(r),i=(o||e).reverse,l=!o||o.reset;return ys({...e,loop:t,default:!1,pause:void 0,to:!i||Va(n)?n:void 0,from:l?e.from:void 0,reset:l,...o})}}function ys(e){const{to:t,from:n}=e=La(e),r=new Set;return zi.obj(t)&&gs(t,r),zi.obj(n)&&gs(n,r),e.keys=r.size?Array.from(r):null,e}function ms(e){const t=ys(e);return zi.und(t.default)&&(t.default=Fa(t)),t}function gs(e,t){Wi(e,((e,n)=>null!=e&&t.add(n)))}var hs=["onStart","onRest","onChange","onPause","onResume"];function bs(e,t,n){e.animation[n]=t[n]!==Na(t,n)?Oa(t[n],e.key):void 0}function vs(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var _s=["onStart","onChange","onRest"],ks=1,Es=class{constructor(e,t){this.id=ks++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];zi.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ys(e)),this}start(e){let{queue:t}=this;return e?t=$i(e).map(ys):this.queue=[],this._flush?this._flush(this,t):(Bs(this,t),Ss(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Hi($i(t),(t=>n[t].stop(!!e)))}else Za(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(zi.und(e))this.start({pause:!0});else{const t=this.springs;Hi($i(e),(e=>t[e].pause()))}return this}resume(e){if(zi.und(e))this.start({pause:!1});else{const t=this.springs;Hi($i(e),(e=>t[e].resume()))}return this}each(e){Wi(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Ki(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const i=!r&&this._started,l=o||i&&n.size?this.get():null;o&&t.size&&Ki(t,(([e,t])=>{t.value=l,e(t,this,this._item)})),i&&(this._started=!1,Ki(n,(([e,t])=>{t.value=l,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}wi.onFrame(this._onFrame)}};function Ss(e,t){return Promise.all(t.map((t=>ws(e,t)))).then((t=>qa(e,t)))}async function ws(e,t,n){const{keys:r,to:o,from:i,loop:l,onRest:a,onResolve:s}=t,c=zi.obj(t.default)&&t.default;l&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=zi.arr(o)||zi.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Hi(_s,(n=>{const r=t[n];if(zi.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const p=e._state;t.pause===!p.paused?(p.paused=t.pause,Yi(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),f=!0===t.cancel||!0===Na(t,"cancel");(u||f&&p.asyncId)&&d.push(Ka(++e._lastAsyncId,{props:t,state:p,actions:{pause:Vi,resume:Vi,start(t,n){f?(Za(p,e._lastAsyncId),n(Qa(e))):(t.onRest=a,n(Xa(u,t,p,e)))}}})),p.paused&&await new Promise((e=>{p.resumeQueue.add(e)}));const y=qa(e,await Promise.all(d));if(l&&y.finished&&(!n||!y.noop)){const n=fs(t,l,o);if(n)return Bs(e,[n]),ws(e,n,!0)}return s&&wi.batchedUpdates((()=>s(y,e,e.item))),y}function As(e,t){const n={...e.springs};return t&&Hi($i(t),(e=>{zi.und(e.keys)&&(e=ys(e)),zi.obj(e.to)||(e={...e,to:void 0}),xs(n,e,(e=>Is(e)))})),Cs(e,n),n}function Cs(e,t){Wi(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Wl(t,e))}))}function Is(e,t){const n=new ps;return n.key=e,t&&Wl(n,t),n}function xs(e,t,n){t.keys&&Hi(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function Bs(e,t){Hi(t,(t=>{xs(e.springs,t,(t=>Is(t,e)))}))}var Ps,Ts,Os=({children:e,...t})=>{const n=(0,vi.useContext)(Ns),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,vi.useState)((()=>({inputs:t,result:e()}))),r=(0,vi.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:r,immediate:o})),[r,o]);const{Provider:i}=Ns;return vi.createElement(i,{value:t},e)},Ns=(Ps=Os,Ts={},Object.assign(Ps,vi.createContext(Ts)),Ps.Provider._context=Ps,Ps.Consumer._context=Ps,Ps);Os.Provider=Ns.Provider,Os.Consumer=Ns.Consumer;var Rs=()=>{const e=[],t=function(t){aa(`${oa}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return Hi(e,((e,o)=>{if(zi.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Hi(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Hi(e,(e=>e.resume(...arguments))),this},t.set=function(t){Hi(e,((e,n)=>{const r=zi.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return Hi(e,((e,r)=>{if(zi.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return Hi(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Hi(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return zi.fun(e)?e(n,t):e};return t._getProps=n,t};function Fs(e,t,n){const r=zi.fun(t)&&t;r&&!n&&(n=[]);const o=(0,vi.useMemo)((()=>r||3==arguments.length?Rs():void 0),[]),i=(0,vi.useRef)(0),l=ua(),a=(0,vi.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=As(e,t);return i.current>0&&!a.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?Ss(e,t):new Promise((r=>{Cs(e,n),a.queue.push((()=>{r(Ss(e,t))})),l()}))}})),[]),s=(0,vi.useRef)([...a.ctrls]),c=[],u=fa(e)||0;function p(e,n){for(let o=e;o{Hi(s.current.slice(e,u),(e=>{za(e,o),e.stop(!0)})),s.current.length=e,p(u,e)}),[e]),(0,vi.useMemo)((()=>{p(0,Math.min(u,e))}),n);const d=s.current.map(((e,t)=>As(e,c[t]))),f=(0,vi.useContext)(Os),y=fa(f),m=f!==y&&ja(f);ca((()=>{i.current++,a.ctrls=s.current;const{queue:e}=a;e.length&&(a.queue=[],Hi(e,(e=>e()))),Hi(s.current,((e,t)=>{o?.add(e),m&&e.start({default:f});const n=c[t];n&&(Ga(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),pa((()=>()=>{Hi(a.ctrls,(e=>e.stop(!0)))}));const g=d.map((e=>({...e})));return o?[g,o]:g}function Ms(e,t){const n=zi.fun(e),[[r],o]=Fs(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}var Ds=class extends os{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Bl(...t);const n=this._get(),r=Aa(n);ga(this,r.create(n))}advance(e){const t=this._get();Gi(t,this.get())||(ma(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Us(this._active)&&js(this)}_get(){const e=zi.arr(this.source)?this.source.map(jl):$i(jl(this.source));return this.calc(...e)}_start(){this.idle&&!Us(this._active)&&(this.idle=!1,Hi(ha(this),(e=>{e.done=!1})),Ei.skipAnimation?(wi.batchedUpdates((()=>this.advance())),js(this)):ll.start(this))}_attach(){let e=1;Hi($i(this.source),(t=>{Ul(t)&&Wl(t,this),ns(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Hi($i(this.source),(e=>{Ul(e)&&$l(e,this)})),this._active.clear(),js(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=$i(this.source).reduce(((e,t)=>Math.max(e,(ns(t)?t.priority:0)+1)),0))}};function Ls(e){return!1!==e.idle}function Us(e){return!e.size||Array.from(e).every(Ls)}function js(e){e.idle||(e.idle=!0,Hi(ha(e),(e=>{e.done=!0})),zl(e,{type:"idle",parent:e}))}Ei.assign({createStringInterpolator:ra,to:(e,t)=>new Ds(e,t)});ll.advance;var Vs=window.ReactDOM,zs=/^--/;function Gs(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||zs.test(e)||Ws.hasOwnProperty(e)&&Ws[e]?(""+t).trim():t+"px"}var Hs={};var Ws={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},$s=["Webkit","Ms","Moz","O"];Ws=Object.keys(Ws).reduce(((e,t)=>($s.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Ws);var Ks=/^(matrix|translate|scale|rotate|skew)/,qs=/^(translate)/,Js=/^(rotate|skew)/,Ys=(e,t)=>zi.num(e)&&0!==e?e+t:e,Qs=(e,t)=>zi.arr(e)?e.every((e=>Qs(e,t))):zi.num(e)?e===t:parseFloat(e)===t,Xs=class extends Ea{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Ys(e,"px"))).join(",")})`,Qs(e,0)]))),Wi(r,((e,t)=>{if("transform"===t)o.push([e||""]),i.push((e=>[e,""===e]));else if(Ks.test(t)){if(delete r[t],zi.und(e))return;const n=qs.test(t)?"px":Js.test(t)?"deg":"";o.push($i(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Ys(o,n)})`,Qs(o,0)]:e=>[`${t}(${e.map((e=>Ys(e,n))).join(",")})`,Qs(e,t.startsWith("scale")?1:0)])}})),o.length&&(r.transform=new Zs(o,i)),super(r)}},Zs=class extends Gl{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Hi(this.inputs,((n,r)=>{const o=jl(n[0]),[i,l]=this.transforms[r](zi.arr(o)?o:n.map(jl));e+=" "+i,t=t&&l})),t?"none":e}observerAdded(e){1==e&&Hi(this.inputs,(e=>Hi(e,(e=>Ul(e)&&Wl(e,this)))))}observerRemoved(e){0==e&&Hi(this.inputs,(e=>Hi(e,(e=>Ul(e)&&$l(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),zl(this,e)}};Ei.assign({batchedUpdates:Vs.unstable_batchedUpdates,createStringInterpolator:ra,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 ec=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Ea(e)),getComponentProps:r=(e=>e)}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=Ba(e)||"Anonymous";return(e=zi.str(e)?i[e]||(i[e]=Ca(e,o)):e[xa]||(e[xa]=Ca(e,o))).displayName=`Animated(${t})`,e};return Wi(e,((t,n)=>{zi.arr(e)&&(n=Ba(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:l,viewBox:a,...s}=t,c=Object.values(s),u=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:Hs[t]||(Hs[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(const t in r)if(r.hasOwnProperty(t)){const n=Gs(t,r[t]);zs.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==l&&(e.scrollLeft=l),void 0!==a&&e.setAttribute("viewBox",a)},createAnimatedStyle:e=>new Xs(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),tc=ec.animated;const nc=e=>e+1,rc=e=>({top:e.offsetTop,left:e.offsetLeft});var oc=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:r,triggerAnimationOnChange:o}=e;const i=(0,a.useRef)(),l=(0,p.useReducedMotion)()||!r,[s,c]=(0,a.useReducer)(nc,0),[u,d]=(0,a.useReducer)(nc,0),[f,y]=(0,a.useState)({x:0,y:0}),m=(0,a.useMemo)((()=>i.current?rc(i.current):null),[o]),g=(0,a.useMemo)((()=>{if(!n||!i.current)return()=>{};const e=(0,Zo.getScrollContainer)(i.current);if(!e)return()=>{};const t=i.current.getBoundingClientRect();return()=>{const n=i.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[o,n]);function h(e){let{value:n}=e,{x:r,y:o}=n;r=Math.round(r),o=Math.round(o),r===h.x&&o===h.y||(!function(e){let{x:n,y:r}=e;if(!i.current)return;const o=0===n&&0===r;i.current.style.transformOrigin=o?"":"center",i.current.style.transform=o?"":`translate3d(${n}px,${r}px,0)`,i.current.style.zIndex=!t||o?"":"1",g()}({x:r,y:o}),h.x=r,h.y=o)}return(0,a.useLayoutEffect)((()=>{s&&d()}),[s]),(0,a.useLayoutEffect)((()=>{if(!m)return;if(l)return void g();i.current.style.transform="";const e=rc(i.current);c(),y({x:Math.round(m.left-e.left),y:Math.round(m.top-e.top)})}),[o]),h.x=0,h.y=0,Ms({from:{x:f.x,y:f.y},to:{x:0,y:0},reset:s!==u,config:{mass:5,tension:2e3,friction:200},immediate:l,onChange:h}),i};const ic=".block-editor-block-list__block",lc=".block-list-appender",ac=".block-editor-button-block-appender";function sc(e,t){return t.closest([ic,lc,ac].join(","))===e}function cc(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(ic);return t?t.id.slice("block-".length):void 0}function uc(e){const t=(0,a.useRef)(),n=function(e){return(0,f.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,isNavigationMode:r,isBlockSelected:o}=t(qn);if(o(e)&&!r())return n()}),[e])}(e),{isBlockSelected:r,isMultiSelecting:o}=(0,f.useSelect)(qn);return(0,a.useEffect)((()=>{if(!r(e)||o())return;if(null==n)return;if(!t.current)return;const{ownerDocument:i}=t.current;if(t.current.contains(i.activeElement))return;const l=Zo.focus.tabbable.find(t.current).filter((e=>(0,Zo.isTextField)(e))),a=-1===n,s=(a?u.last:u.first)(l)||t.current;if(sc(t.current,s)){if(!t.current.getAttribute("contenteditable")){const e=Zo.focus.tabbable.findNext(t.current);if(e&&sc(t.current,e)&&(0,Zo.isFormElement)(e))return void e.focus()}(0,Zo.placeCaretAtHorizontalEdge)(s,a)}else t.current.focus()}),[n,e]),t}function pc(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function dc(){const e=(0,f.useSelect)((e=>{const{isNavigationMode:t,getSettings:n}=e(qn);return t()||n().outlineMode}),[]);return(0,p.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",pc),t.addEventListener("mouseover",pc),()=>{t.removeEventListener("mouseout",pc),t.removeEventListener("mouseover",pc),t.classList.remove("is-hovered")}}),[e])}function fc(e){return(0,f.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:r,isBlockSelected:i,isBlockMultiSelected:l,getBlockName:a,getSettings:s,hasSelectedInnerBlock:u,isTyping:p,__experimentalGetActiveBlockIdByBlockNames:d}=t(qn),{__experimentalSpotlightEntityBlocks:f,outlineMode:y}=s(),m=n(e),g=i(e),h=a(e),b=u(e,!0),v=d(f);return c()({"is-selected":g,"is-highlighted":r(e),"is-multi-selected":l(e),"is-reusable":(0,o.isReusableBlock)((0,o.getBlockType)(h)),"is-dragging":m,"has-child-selected":b,"has-active-entity":v,"is-active-entity":v===e,"remove-outline":g&&y&&p()})}),[e])}function yc(e){return(0,f.useSelect)((t=>{const n=t(qn).getBlockName(e),r=(0,o.getBlockType)(n);if((null==r?void 0:r.apiVersion)>1)return(0,o.getBlockDefaultClassName)(n)}),[e])}function mc(e){return(0,f.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:r}=t(qn),i=r(e);if(null==i||!i.className)return;const l=(0,o.getBlockType)(n(e));return(null==l?void 0:l.apiVersion)>1?i.className:void 0}),[e])}function gc(e){return(0,f.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:r,getBlockName:o,getBlockRootClientId:i,isBlockSelected:l}=t(qn);if(!l(e))return;const a=n();return a?c()("is-block-moving-mode",{"can-insert-moving-block":r(o(a),i(e))}):void 0}),[e])}function hc(e){const{isBlockSelected:t}=(0,f.useSelect)(qn),{selectBlock:n,selectionChange:r}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((o=>{function i(i){o.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||r(e):sc(o,i.target)&&n(e))}return o.addEventListener("focusin",i),()=>{o.removeEventListener("focusin",i)}}),[t,n])}var bc=window.wp.keycodes;function vc(e){const t=(0,f.useSelect)((t=>t(qn).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:r}=(0,f.useSelect)(qn),{insertDefaultBlock:o,removeBlock:i}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((l=>{if(t)return l.addEventListener("keydown",a),l.addEventListener("dragstart",s),()=>{l.removeEventListener("keydown",a),l.removeEventListener("dragstart",s)};function a(t){const{keyCode:a,target:s}=t;a!==bc.ENTER&&a!==bc.BACKSPACE&&a!==bc.DELETE||s!==l||(0,Zo.isTextField)(s)||(t.preventDefault(),a===bc.ENTER?o({},n(e),r(e)+1):i(e))}function s(e){e.preventDefault()}}),[e,t,n,r,o,i])}function _c(e){const{isNavigationMode:t,isBlockSelected:n}=(0,f.useSelect)(qn),{setNavigationMode:r,selectBlock:o}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((i=>{function l(i){t()&&!i.defaultPrevented&&(i.preventDefault(),n(e)?r(!1):o(e))}return i.addEventListener("mousedown",l),()=>{i.addEventListener("mousedown",l)}}),[e,t,n,r])}function kc(){const e=(0,a.useContext)(Ty);return(0,p.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Ec(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:r,wrapperProps:i={},isAligned:l}=(0,a.useContext)(Sc),{index:s,mode:u,name:d,blockApiVersion:y,blockTitle:g,isPartOfSelection:h,adjustScrolling:b,enableAnimation:v}=(0,f.useSelect)((e=>{const{getBlockIndex:t,getBlockMode:r,getBlockName:i,isTyping:l,getGlobalBlockCount:a,isBlockSelected:s,isBlockMultiSelected:c,isAncestorMultiSelected:u,isFirstMultiSelectedBlock:p}=e(qn),d=s(n),f=c(n)||u(n),y=i(n),m=(0,o.getBlockType)(y);return{index:t(n),mode:r(n),name:y,blockApiVersion:(null==m?void 0:m.apiVersion)||1,blockTitle:null==m?void 0:m.title,isPartOfSelection:d||f,adjustScrolling:d||p(n),enableAnimation:!l()&&a()<=200}}),[n]),_=(0,m.sprintf)((0,m.__)("Block: %s"),g),k="html"!==u||t?"":"-visual",E=(0,p.useMergeRefs)([e.ref,uc(n),_r(n),hc(n),vc(n),_c(n),dc(),kc(),oc({isSelected:h,adjustScrolling:b,enableAnimation:v,triggerAnimationOnChange:s})]),S=Xn();return y<2&&n===S.clientId&&"undefined"!=typeof process&&process.env,{...i,...e,ref:E,id:`block-${n}${k}`,tabIndex:0,role:"document","aria-label":_,"data-block":n,"data-type":d,"data-title":g,className:c()(c()("block-editor-block-list__block",{"wp-block":!l}),r,e.className,i.className,fc(n),yc(n),mc(n),gc(n)),style:{...i.style,...e.style}}}Ec.save=o.__unstableGetBlockProps;const Sc=(0,a.createContext)();function wc(e){let{children:t,isHtml:n,...r}=e;return(0,a.createElement)("div",Ec(r,{__unstableIsHtml:n}),t)}const Ac=(0,f.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{isBlockSelected:o,getBlockMode:i,isSelectionEnabled:l,getTemplateLock:a,__unstableGetBlockWithoutInnerBlocks:s,canRemoveBlock:c,canMoveBlock:u}=e(qn),p=s(n),d=o(n),f=a(r),y=c(n,r),m=u(n,r),{name:g,attributes:h,isValid:b}=p||{};return{mode:i(n),isSelectionEnabled:l(),isLocked:!!f,canRemove:y,canMove:m,block:p,name:g,attributes:h,isValid:b,isSelected:d}})),Cc=(0,f.withDispatch)(((e,t,n)=>{let{select:r}=n;const{updateBlockAttributes:i,insertBlocks:l,mergeBlocks:a,replaceBlocks:s,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(qn);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=r(qn),o=n(),{clientId:l}=t,a=o.length?o:[l];i(a,e)},onInsertBlocks(e,n){const{rootClientId:r}=t;l(e,n,r)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:o}=t,{getBlockIndex:i}=r(qn),a=i(n);l(e,a+1,o)},onMerge(e){const{clientId:n}=t,{getPreviousBlockClientId:o,getNextBlockClientId:i}=r(qn);if(e){const e=i(n);e&&a(n,e)}else{const e=o(n);e&&a(e,n)}},onReplace(e,n,r){e.length&&!(0,o.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),s([t.clientId],e,n,r)},toggleSelection(e){c(e)}}}));var Ic=(0,p.compose)(p.pure,Ac,Cc,(0,p.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,d.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:r,isLocked:i,canRemove:l,clientId:s,isSelected:p,isSelectionEnabled:d,className:y,name:m,isValid:g,attributes:h,wrapperProps:b,setAttributes:v,onReplace:_,onInsertBlocksAfter:k,onMerge:E,toggleSelection:S}=e;const w=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn);return t().supportsLayout}),[]),{removeBlock:A}=(0,f.useDispatch)(qn),C=(0,a.useCallback)((()=>A(s)),[s]);let I=(0,a.createElement)(ii,{name:m,isSelected:p,attributes:h,setAttributes:v,insertBlocksAfter:i?void 0:k,onReplace:l?_:void 0,onRemove:l?C:void 0,mergeBlocks:l?E:void 0,clientId:s,isSelectionEnabled:d,toggleSelection:S});const x=(0,o.getBlockType)(m);null!=x&&x.getEditWrapperProps&&(b=function(e,t){const n={...e,...t};return e&&t&&e.className&&t.className&&(n.className=c()(e.className,t.className)),e&&t&&e.style&&t.style&&(n.style={...e.style,...t.style}),n}(b,x.getEditWrapperProps(h)));const B=b&&!!b["data-align"]&&!w;let P;if(B&&(I=(0,a.createElement)("div",{className:"wp-block","data-align":b["data-align"]},I)),g)P="html"===r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{style:{display:"none"}},I),(0,a.createElement)(wc,{isHtml:!0},(0,a.createElement)(bi,{clientId:s}))):(null==x?void 0:x.apiVersion)>1?I:(0,a.createElement)(wc,b,I);else{const e=n?(0,o.serializeRawBlock)(n):(0,o.getSaveContent)(x,h);P=(0,a.createElement)(wc,{className:"has-warning"},(0,a.createElement)(di,{clientId:s}),(0,a.createElement)(a.RawHTML,null,(0,Zo.safeHTML)(e)))}const T={clientId:s,className:null!==(t=b)&&void 0!==t&&t["data-align"]&&w?c()(y,`align${b["data-align"]}`):y,wrapperProps:(0,u.omit)(b,["data-align"]),isAligned:B},O=(0,a.useMemo)((()=>T),Object.values(T));return(0,a.createElement)(Sc.Provider,{value:O},(0,a.createElement)(gi,{fallback:(0,a.createElement)(wc,{className:"has-warning"},(0,a.createElement)(yi,null))},P))})),xc=window.wp.htmlEntities;var Bc=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const Pc=[(0,a.createInterpolateElement)((0,m.__)("While writing, you can press / to quickly insert new blocks."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,m.__)("Indent a list by pressing space at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,a.createInterpolateElement)((0,m.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:(0,a.createElement)("kbd",null)}),(0,m.__)("Drag files into the editor to automatically insert media blocks."),(0,m.__)("Change a block's type by pressing the block icon on the toolbar.")];var Tc=function(){const[e]=(0,a.useState)(Math.floor(Math.random()*Pc.length));return(0,a.createElement)(d.Tip,null,Pc[e])};var Oc=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));var Nc=(0,a.memo)((function(e){var t;let{icon:n,showColors:r=!1,className:o}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Oc});const i=(0,a.createElement)(d.Icon,{icon:n&&n.src?n.src:n}),l=r?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,a.createElement)("span",{style:l,className:c()("block-editor-block-icon",o,{"has-colors":r})},i)}));var Rc=function(e){let{title:t,icon:n,description:r,blockType:o}=e;return o&&(jt()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:r}=o)),(0,a.createElement)("div",{className:"block-editor-block-card"},(0,a.createElement)(Nc,{icon:n,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-block-card__content"},(0,a.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,a.createElement)("span",{className:"block-editor-block-card__description"},r)))};function Fc(e){let{clientId:t=null,value:n,selection:r,onChange:i=u.noop,onInput:l=u.noop}=e;const s=(0,f.useRegistry)(),{resetBlocks:c,resetSelection:p,replaceInnerBlocks:d,setHasControlledInnerBlocks:y,__unstableMarkNextChangeAsNotPersistent:m}=s.dispatch(qn),{getBlockName:g,getBlocks:h}=s.select(qn),b=(0,f.useSelect)((e=>!t||e(qn).areInnerBlocksControlled(t)),[t]),v=(0,a.useRef)({incoming:null,outgoing:[]}),_=(0,a.useRef)(!1),k=()=>{n&&(m(),t?s.batch((()=>{y(t,!0);const e=n.map((e=>(0,o.cloneBlock)(e)));_.current&&(v.current.incoming=e),m(),d(t,e)})):(_.current&&(v.current.incoming=n),c(n)))},E=(0,a.useRef)(l),S=(0,a.useRef)(i);(0,a.useEffect)((()=>{E.current=l,S.current=i}),[l,i]),(0,a.useEffect)((()=>{v.current.outgoing.includes(n)?(0,u.last)(v.current.outgoing)===n&&(v.current.outgoing=[]):h(t)!==n&&(v.current.outgoing=[],k(),r&&p(r.selectionStart,r.selectionEnd,r.initialPosition))}),[n,t]),(0,a.useEffect)((()=>{b||(v.current.outgoing=[],k())}),[b]),(0,a.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:r,isLastBlockChangePersistent:o,__unstableIsLastBlockChangeIgnored:i,areInnerBlocksControlled:l}=s.select(qn);let a=h(t),c=o(),u=!1;_.current=!0;const p=s.subscribe((()=>{if(null!==t&&null===g(t))return;if(!(!t||l(t)))return;const s=o(),p=h(t),d=p!==a;if(a=p,d&&(v.current.incoming||i()))return v.current.incoming=null,void(c=s);if(d||u&&!d&&s&&!c){c=s,v.current.outgoing.push(a);(c?S.current:E.current)(a,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:r()}})}u=d}));return()=>p()}),[s,t])}var Mc=(0,p.createHigherOrderComponent)((e=>(0,f.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:r,...o}=t;if(!n)return(0,a.createElement)(e,l({registry:r},o));const[i,s]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const e=(0,f.createRegistry)({},r);e.registerStore($n,Kn),s(e)}),[r]),i?(0,a.createElement)(f.RegistryProvider,{value:i},(0,a.createElement)(e,l({registry:i},o))):null}))),"withRegistryProvider")((function(e){const{children:t,settings:n}=e,{updateSettings:r}=(0,f.useDispatch)(qn);return(0,a.useEffect)((()=>{r(n)}),[n]),Fc(e),(0,a.createElement)(vr,null,t)}));function Dc(e){let{onClick:t}=e;return(0,a.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,a.createElement)(d.Disabled,null,(0,a.createElement)(Ny,null)))}function Lc(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,f.useSelect)(qn),{clearSelectedBlock:n}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((r=>{function o(o){(e()||t())&&o.target===r&&n()}return r.addEventListener("mousedown",o),()=>{r.removeEventListener("mousedown",o)}}),[e,t,n])}function Uc(e){return(0,a.createElement)("div",l({ref:Lc()},e))}function jc(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:r,getSelectedBlockClientId:o,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:l}=e(qn);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:r(),selectedBlockClientId:o(),initialPosition:i(),isFullSelection:l()}}function Vc(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:r,selectedBlockClientId:o,isFullSelection:i}=(0,f.useSelect)(jc,[]),l=kr(o),a=kr((0,u.first)(n)),s=kr((0,u.last)(n));return(0,p.useRefEffect)((c=>{const{ownerDocument:u}=c,{defaultView:p}=u;if(null==e)return;if(!r||t){if(!o||t)return;const e=p.getSelection();if(e.rangeCount&&!e.isCollapsed){const t=l.current,{startContainer:n,endContainer:r}=e.getRangeAt(0);!t||t.contains(n)&&t.contains(r)||e.removeAllRanges()}return}const{length:d}=n;if(d<2)return;if(!i)return;if(c.contentEditable=!0,c.focus(),!a.current||!s.current)return;const f=p.getSelection(),y=u.createRange();y.setStartBefore(a.current),y.setEndAfter(s.current),f.removeAllRanges(),f.addRange(y)}),[r,t,n,o,e,i])}function zc(e,t,n,r){let o,i=Zo.focus.focusable.find(n);return t&&(i=(0,u.reverse)(i)),i=i.slice(i.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),(0,u.find)(i,(function(e){if(!Zo.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){const t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function Gc(){const{getSelectedBlockClientId:e,getMultiSelectedBlocksEndClientId:t,getPreviousBlockClientId:n,getNextBlockClientId:r,getSettings:o,hasMultiSelection:i}=(0,f.useSelect)(qn);return(0,p.useRefEffect)((l=>{let a;function s(){a=null}function c(e,t){const n=zc(e,t,l);return!n||!function(e,t){return e.closest(ic)===t.closest(ic)}(e,n)}function u(s){const{keyCode:u,target:p}=s,d=u===bc.UP,f=u===bc.DOWN,y=u===bc.LEFT,m=u===bc.RIGHT,g=d||y,h=y||m,b=d||f,v=h||b,_=s.shiftKey,k=_||s.ctrlKey||s.altKey||s.metaKey,E=b?Zo.isVerticalEdge:Zo.isHorizontalEdge,{ownerDocument:S}=l,{defaultView:w}=S;if(i())return;if(b?a||(a=(0,Zo.computeCaretRect)(w)):a=null,s.defaultPrevented)return;if(!v)return;if(!function(e,t,n){if((t===bc.UP||t===bc.DOWN)&&!n)return!0;const{tagName:r}=e;return"INPUT"!==r&&"TEXTAREA"!==r}(p,u,k))return;const A=(0,Zo.isRTL)(p)?!g:g,{keepCaretInsideBlock:C}=o(),I=e();if(_){const e=t(),o=n(e||I),i=r(e||I);(g&&o||!g&&i)&&c(p,g)&&E(p,g)&&(l.contentEditable=!0,l.focus())}else if(b&&(0,Zo.isVerticalEdge)(p,g)&&!C){const e=zc(p,g,l,!0);e&&((0,Zo.placeCaretAtVerticalEdge)(e,g,a),s.preventDefault())}else if(h&&w.getSelection().isCollapsed&&(0,Zo.isHorizontalEdge)(p,A)&&!C){const e=zc(p,A,l);(0,Zo.placeCaretAtHorizontalEdge)(e,g),s.preventDefault()}}return l.addEventListener("mousedown",s),l.addEventListener("keydown",u),()=>{l.removeEventListener("mousedown",s),l.removeEventListener("keydown",u)}}),[])}var Hc=window.wp.keyboardShortcuts;function Wc(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,f.useSelect)(qn),{multiSelect:r}=(0,f.useDispatch)(qn),o=(0,Hc.__unstableUseShortcutEventMatch)();return(0,p.useRefEffect)((i=>{function l(i){if(!o("core/block-editor/select-all",i))return;const l=t();if(l.length<2&&!(0,Zo.isEntirelySelected)(i.target))return;const[a]=l,s=n(a);let c=e(s);l.length===c.length&&(c=e(n(s)));const p=(0,u.first)(c),d=(0,u.last)(c);p!==d&&(r(p,d),i.preventDefault())}return i.addEventListener("keydown",l),()=>{i.removeEventListener("keydown",l)}}),[])}function $c(e,t){e.contentEditable=t,t&&e.focus()}function Kc(){const{startMultiSelect:e,stopMultiSelect:t}=(0,f.useDispatch)(qn),{isSelectionEnabled:n,hasMultiSelection:r}=(0,f.useSelect)(qn);return(0,p.useRefEffect)((o=>{const{ownerDocument:i}=o,{defaultView:l}=i;let a,s;function c(){t(),l.removeEventListener("mouseup",c),s=l.requestAnimationFrame((()=>{if(r())return;$c(o,!1);const e=l.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);a.contains(t)&&a.focus()}}))}function u(t){let{buttons:r,target:s}=t;1===r&&s.getAttribute("contenteditable")&&n()&&(a=i.activeElement,e(),l.addEventListener("mouseup",c),$c(o,!0))}return o.addEventListener("mouseout",u),()=>{o.removeEventListener("mouseout",u),l.removeEventListener("mouseup",c),l.cancelAnimationFrame(s)}}),[e,t,n,r])}function qc(e,t){e.contentEditable=t,t&&e.focus()}function Jc(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,f.useDispatch)(qn),{getBlockParents:r,getBlockSelectionStart:o}=(0,f.useSelect)(qn);return(0,p.useRefEffect)((n=>{const{ownerDocument:i}=n,{defaultView:l}=i;function a(i){const a=l.getSelection();if(!a.rangeCount)return void qc(n,!1);const s=i.shiftKey&&"mouseup"===i.type;if(a.isCollapsed&&!s)return void qc(n,!1);let c=cc(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE?t:t.childNodes[n]}(a)),u=cc(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE?t:t.childNodes[n-1]}(a));if(s){const e=o(),t=cc(i.target),n=t!==u;(c===u&&a.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0===c&&void 0===u)return void qc(n,!1);if(c===u)t(c);else{const t=[...r(c),c],n=[...r(u),u],o=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[o],n[o])}}function s(){i.addEventListener("selectionchange",a),l.addEventListener("mouseup",a)}function c(){i.removeEventListener("selectionchange",a),l.removeEventListener("mouseup",a)}function u(){c(),s()}return s(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,r])}function Yc(){const{selectBlock:e}=(0,f.useDispatch)(qn),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:r}=(0,f.useSelect)(qn);return(0,p.useRefEffect)((o=>{function i(i){if(!t()||0!==i.button)return;const l=n(),a=cc(i.target);i.shiftKey?l!==a&&(o.contentEditable=!0,o.focus()):r()&&e(a)}return o.addEventListener("mousedown",i),()=>{o.removeEventListener("mousedown",i)}}),[e,t,n,r])}function Qc(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:r}=(0,f.useSelect)(qn),{replaceBlocks:i,__unstableSplitSelection:l,removeBlocks:a,__unstableDeleteSelection:s,__unstableExpandSelection:c}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((u=>{function p(p){p.defaultPrevented||r()&&(p.keyCode===bc.ENTER?(u.contentEditable=!1,p.preventDefault(),e()?i(t(),(0,o.createBlock)((0,o.getDefaultBlockName)())):l()):p.keyCode===bc.BACKSPACE||p.keyCode===bc.DELETE?(u.contentEditable=!1,p.preventDefault(),e()?a(t()):n()?s(p.keyCode===bc.DELETE):c()):1!==p.key.length||p.metaKey||p.ctrlKey||(u.contentEditable=!1,n()?s(p.keyCode===bc.DELETE):(p.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function d(e){r()&&(u.contentEditable=!1,n()?s():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("keydown",p),u.addEventListener("compositionstart",d),()=>{u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",d)}}),[])}function Xc(){const[e,t,n]=function(){const e=(0,a.useRef)(),t=(0,a.useRef)(),n=(0,a.useRef)(),r=(0,a.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:i,getBlockCount:l}=(0,f.useSelect)(qn),{setNavigationMode:s}=(0,f.useDispatch)(qn),c=(0,f.useSelect)((e=>e(qn).isNavigationMode()),[])?void 0:"0",u=(0,a.useRef)();function d(t){if(u.current)u.current=null;else if(o())e.current.focus();else if(i())r.current.focus();else{s(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Zo.focus.tabbable[n](t.target).focus()}}const y=(0,a.createElement)("div",{ref:t,tabIndex:c,onFocus:d}),m=(0,a.createElement)("div",{ref:n,tabIndex:c,onFocus:d}),g=(0,p.useRefEffect)((a=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===bc.ESCAPE&&!o())return e.preventDefault(),void s(!0);if(e.keyCode!==bc.TAB)return;const r=e.shiftKey,l=r?"findPrevious":"findNext";if(!o()&&!i())return void(e.target===a&&s(!0));if(((0,Zo.isFormElement)(e.target)||e.target.getAttribute("data-block")===i())&&(0,Zo.isFormElement)(Zo.focus.tabbable[l](e.target)))return;const c=r?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function p(e){r.current=e.target;const{ownerDocument:t}=a;e.relatedTarget||t.activeElement!==t.body||0!==l()||a.focus()}function d(r){var o;if(r.keyCode!==bc.TAB)return;if("region"===(null===(o=r.target)||void 0===o?void 0:o.getAttribute("role")))return;if(e.current===r.target)return;const i=r.shiftKey?"findPrevious":"findNext",l=Zo.focus.tabbable[i](r.target);l!==t.current&&l!==n.current||(r.preventDefault(),l.focus({preventScroll:!0}))}const{ownerDocument:f}=a,{defaultView:y}=f;return y.addEventListener("keydown",d),a.addEventListener("keydown",c),a.addEventListener("focusout",p),()=>{y.removeEventListener("keydown",d),a.removeEventListener("keydown",c),a.removeEventListener("focusout",p)}}),[]);return[y,(0,p.useMergeRefs)([e,g]),m]}(),r=(0,f.useSelect)((e=>e(qn).hasMultiSelection()),[]);return[e,(0,p.useMergeRefs)([t,Qc(),Kc(),Jc(),Yc(),Vc(),Wc(),Gc(),(0,p.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=r,r)return e.setAttribute("aria-label",(0,m.__)("Multiple selected blocks")),()=>{e.removeAttribute("aria-label")}}),[r])]),n]}var Zc=(0,a.forwardRef)((function(e,t){let{children:n,...r}=e;const[o,i,s]=Xc();return(0,a.createElement)(a.Fragment,null,o,(0,a.createElement)("div",l({},r,{ref:(0,p.useMergeRefs)([i,t]),className:c()(r.className,"block-editor-writing-flow")}),n),s)}));const eu="editor-styles-wrapper";function tu(e){return(0,a.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}var nu=(0,a.forwardRef)((function(e,t){let{contentRef:n,children:r,head:o,tabIndex:i=0,assets:s,...u}=e;const[,f]=(0,a.useReducer)((()=>({}))),[y,g]=(0,a.useState)(),[h,b]=(0,a.useState)([]),v=tu(null==s?void 0:s.styles),_=tu(null==s?void 0:s.scripts),k=Lc(),[E,S,w]=Xc(),A=(0,p.useRefEffect)((e=>{function t(){const{contentDocument:t,ownerDocument:n}=e,{readyState:r,documentElement:o}=t;return("interactive"===r||"complete"===r)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function r(e){const r=Object.getPrototypeOf(e).constructor.name,o=window[r],i={};for(const t in e)i[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();i.clientX+=e.left,i.clientY+=e.top}const l=new o(e.type,i);!n.dispatchEvent(l)&&e.preventDefault()}const o=["dragover"];for(const t of o)e.addEventListener(t,r)}(t),g(t),k(o),b(Array.from(n.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),t.dir=n.dir,o.removeChild(t.head),o.removeChild(t.body),!0)}return e.addEventListener("load",t),()=>e.removeEventListener("load",t)}),[]),C=(0,p.useRefEffect)((e=>{_.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:r}=t;return new Promise(((t,o)=>{const i=e.ownerDocument.createElement("script");i.id=n,r?(i.src=r,i.onload=()=>t(),i.onerror=()=>o()):t(),e.appendChild(i)}))}(e,n)))),Promise.resolve()).finally((()=>{f()}))}),[]),I=(0,p.useMergeRefs)([n,k,S]),x=(0,p.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:r}=t;if(r&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&Array.from(r).find((e=>{let{selectorText:t}=e;return t&&(t.includes(`.${eu}`)||t.includes(".wp-block"))}))&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),r=document.getElementById(t);r&&e.appendChild(r.cloneNode(!0))}}))}),[]);return o=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",null,"body{margin:0}"),v.map((e=>{let{tagName:t,href:n,id:r,rel:o,media:i,textContent:l}=e;const s=t.toLowerCase();return"style"===s?(0,a.createElement)(s,{id:r,key:r},l):(0,a.createElement)(s,{href:n,id:r,rel:o,media:i,key:r})})),o),(0,a.createElement)(a.Fragment,null,i>=0&&E,(0,a.createElement)("iframe",l({},u,{ref:(0,p.useMergeRefs)([t,A]),tabIndex:i,srcDoc:"",title:(0,m.__)("Editor canvas")}),y&&(0,a.createPortal)((0,a.createElement)(a.Fragment,null,(0,a.createElement)("head",{ref:C},o),(0,a.createElement)("body",{ref:I,className:c()(eu,...h)},(0,a.createElement)("div",{style:{display:"none"},ref:x}),(0,a.createElement)(d.__experimentalStyleProvider,{document:y},r))),y.documentElement)),i>=0&&w)})),ru={grad:.9,turn:360,rad:360/(2*Math.PI)},ou=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},iu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},lu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},au=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},su=function(e){return{r:lu(e.r,0,255),g:lu(e.g,0,255),b:lu(e.b,0,255),a:lu(e.a)}},cu=function(e){return{r:iu(e.r),g:iu(e.g),b:iu(e.b),a:iu(e.a,3)}},uu=/^#([0-9a-f]{3,8})$/i,pu=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},du=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),l=i-Math.min(t,n,r),a=l?i===t?(n-r)/l:i===n?2+(r-t)/l:4+(t-n)/l:0;return{h:60*(a<0?a+6:a),s:i?l/i*100:0,v:i/255*100,a:o}},fu=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),l=r*(1-n),a=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:255*[r,a,l,l,s,r][c],g:255*[s,r,r,a,l,l][c],b:255*[l,l,s,r,r,a][c],a:o}},yu=function(e){return{h:au(e.h),s:lu(e.s,0,100),l:lu(e.l,0,100),a:lu(e.a)}},mu=function(e){return{h:iu(e.h),s:iu(e.s),l:iu(e.l),a:iu(e.a,3)}},gu=function(e){return fu((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},hu=function(e){return{h:(t=du(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},bu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vu=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_u=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ku=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Eu={string:[[function(e){var t=uu.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?iu(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?iu(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=_u.exec(e)||ku.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:su({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=bu.exec(e)||vu.exec(e);if(!t)return null;var n,r,o=yu({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(ru[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return gu(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return ou(t)&&ou(n)&&ou(r)?su({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!ou(t)||!ou(n)||!ou(r))return null;var l=yu({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return gu(l)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!ou(t)||!ou(n)||!ou(r))return null;var l=function(e){return{h:au(e.h),s:lu(e.s,0,100),v:lu(e.v,0,100),a:lu(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return fu(l)},"hsv"]]},Su=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=cu(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?pu(iu(255*o)):"","#"+pu(t)+pu(n)+pu(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return cu(this.rgba)},e.prototype.toRgbString=function(){return t=(e=cu(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return mu(hu(this.rgba))},e.prototype.toHslString=function(){return t=(e=mu(hu(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=du(this.rgba),{h:iu(e.h),s:iu(e.s),v:iu(e.v),a:iu(e.a,3)};var e},e.prototype.invert=function(){return Bu({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),Bu(Au(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Bu(Au(this.rgba,-e))},e.prototype.grayscale=function(){return Bu(Au(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Bu(Iu(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Bu(Iu(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?Bu({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):iu(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=hu(this.rgba);return"number"==typeof e?Bu({h:e,s:t.s,l:t.l,a:t.a}):iu(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Bu(e).toHex()},e}(),Bu=function(e){return e instanceof xu?e:new xu(e)},Pu=[],Tu=function(e){e.forEach((function(e){Pu.indexOf(e)<0&&(e(xu,Eu),Pu.push(e))}))};function Ou(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,l,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var s=this.toRgb(),c=1/0,u="black";if(!i.length)for(var p in n)i[p]=new e(n[p]).toRgb();for(var d in n){var f=(o=s,l=i[d],Math.pow(o.r-l.r,2)+Math.pow(o.g-l.g,2)+Math.pow(o.b-l.b,2));f(s=Ru(l))?(a+.05)/(s+.05):(s+.05)/(a+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(l=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===l?7:"AA"===o&&"large"===l?3:4.5);var n,r,o,i,l}}var Mu=n(3124),Du=n.n(Mu);const Lu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Uu(e,t){t=t||{};let n=1,r=1;function o(e){const t=e.match(/\n/g);t&&(n+=t.length);const o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){const e={line:n,column:r};return function(t){return t.position=new l(e),f(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;const a=[];function s(o){const i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;a.push(i)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function p(){let t;const n=[];for(f(),y(n);e.length&&"}"!==e.charAt(0)&&(t=w()||A());)!1!==t&&(n.push(t),y(n));return n}function d(t){const n=t.exec(e);if(!n)return;const r=n[0];return o(r),e=e.slice(r.length),n}function f(){d(/^\s*/)}function y(e){let t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){const t=i();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return s("End of comment missing");const l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}function g(){const e=d(/^([^{]+)/);if(e)return ju(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function h(){const e=i();let t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=ju(t[0]),!d(/^:\s*/))return s("property missing ':'");const n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Lu,""),value:n?ju(n[0]).replace(Lu,""):""});return d(/^[;\s]*/),r}function b(){const e=[];if(!c())return s("missing '{'");let t;for(y(e);t=h();)!1!==t&&(e.push(t),y(e));return u()?e:s("missing '}'")}function v(){let e;const t=[],n=i();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const _=S("import"),k=S("charset"),E=S("namespace");function S(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=i(),r=d(t);if(!r)return;const o={type:e};return o[e]=r[1].trim(),n(o)}}function w(){if("@"===e[0])return function(){const e=i();let t=d(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=d(/^([-\w]+)\s*/),!t)return s("@keyframes missing name");const r=t[1];if(!c())return s("@keyframes missing '{'");let o,l=y();for(;o=v();)l.push(o),l=l.concat(y());return u()?e({type:"keyframes",name:r,vendor:n,keyframes:l}):s("@keyframes missing '}'")}()||function(){const e=i(),t=d(/^@media *([^{]+)/);if(!t)return;const n=ju(t[1]);if(!c())return s("@media missing '{'");const r=y().concat(p());return u()?e({type:"media",media:n,rules:r}):s("@media missing '}'")}()||function(){const e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:ju(t[1]),media:ju(t[2])})}()||function(){const e=i(),t=d(/^@supports *([^{]+)/);if(!t)return;const n=ju(t[1]);if(!c())return s("@supports missing '{'");const r=y().concat(p());return u()?e({type:"supports",supports:n,rules:r}):s("@supports missing '}'")}()||_()||k()||E()||function(){const e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=ju(t[1]),r=ju(t[2]);if(!c())return s("@document missing '{'");const o=y().concat(p());return u()?e({type:"document",document:r,vendor:n,rules:o}):s("@document missing '}'")}()||function(){const e=i();if(!d(/^@page */))return;const t=g()||[];if(!c())return s("@page missing '{'");let n,r=y();for(;n=h();)r.push(n),r=r.concat(y());return u()?e({type:"page",selectors:t,declarations:r}):s("@page missing '}'")}()||function(){const e=i();if(!d(/^@host\s*/))return;if(!c())return s("@host missing '{'");const t=y().concat(p());return u()?e({type:"host",rules:t}):s("@host missing '}'")}()||function(){const e=i();if(!d(/^@font-face\s*/))return;if(!c())return s("@font-face missing '{'");let t,n=y();for(;t=h();)n.push(t),n=n.concat(y());return u()?e({type:"font-face",declarations:n}):s("@font-face missing '}'")}()}function A(){const e=i(),t=g();return t?(y(),e({type:"rule",selectors:t,declarations:b()})):s("selector missing")}return Vu(function(){const e=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:a}}}())}function ju(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Vu(e,t){const n=e&&"string"==typeof e.type,r=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Vu(e,r)})):n&&"object"==typeof n&&Vu(n,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var zu=n(8575),Gu=n.n(zu),Hu=Wu;function Wu(e){this.options=e||{}}Wu.prototype.emit=function(e){return e},Wu.prototype.visit=function(e){return this[e.type](e)},Wu.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let r=0,o=e.length;rt=>{if("declaration"===t.type){const i=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const r=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Qu(e)&&r.push(e)}return r}(t.value).map((o=e,e=>({...e,newUrl:"url("+e.before+e.quote+Xu(e.value,o)+e.quote+e.after+")"})));return{...t,value:(n=t.value,r=i,r.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,r,o;return t};const ep=/^(body|html|:root).*$/;var tp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>{const r=n=>t.includes(n.trim())?n:n.match(ep)?n.replace(/^(body|html|:root)/,e):e+" "+n;return"rule"===n.type?{...n,selectors:n.selectors.map(r)}:n}};var np=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:r}=e;const o=[];return t&&o.push(tp(t)),r&&o.push(Zu(r)),o.length?Yu(n,(0,p.compose)(o)):n}))};const rp=".editor-styles-wrapper";function op(e){return(0,a.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:r}=t,o=t.querySelector(rp);let i;if(o)i=n.getComputedStyle(o,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),i=n.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=Bu(i);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e])}function ip(e){let{styles:t}=e;const n=(0,a.useMemo)((()=>np(t,rp)),[t]);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("style",{ref:op(t)}),n.map(((e,t)=>(0,a.createElement)("style",{key:t},e))))}let lp;Tu([Ou,Fu]);const ap=2e3;var sp=function(e){let{viewportWidth:t,__experimentalPadding:n,__experimentalMinHeight:r}=e;const[o,{width:i}]=(0,p.useResizeObserver)(),[l,{height:s}]=(0,p.useResizeObserver)(),{styles:c,assets:u}=(0,f.useSelect)((e=>{const t=e(qn).getSettings();return{styles:t.styles,assets:t.__unstableResolvedAssets}}),[]),y=(0,a.useMemo)((()=>c?[...c,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:c),[c]);lp=lp||(0,p.pure)(Ny);const m=i/t;return(0,a.createElement)("div",{className:"block-editor-block-preview__container"},o,(0,a.createElement)(d.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${m})`,height:s*m,maxHeight:s>ap?ap*m:void 0,minHeight:r}},(0,a.createElement)(nu,{head:(0,a.createElement)(ip,{styles:y}),assets:u,contentRef:(0,p.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=n+"px",e.style.position="relative"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:s,pointerEvents:"none",maxHeight:ap,minHeight:m<1&&r?r/m:r}},l,(0,a.createElement)(lp,{renderAppender:!1}))))};var cp=(0,a.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:r=1200,__experimentalLive:o=!1,__experimentalOnClick:i,__experimentalMinHeight:l}=e;const s=(0,f.useSelect)((e=>e(qn).getSettings()),[]),c=(0,a.useMemo)((()=>{const e={...s};return e.__experimentalBlockPatterns=[],e}),[s]),p=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,a.createElement)(Mc,{value:p,settings:c},o?(0,a.createElement)(Dc,{onClick:i}):(0,a.createElement)(sp,{viewportWidth:r,__experimentalPadding:n,__experimentalMinHeight:l})):null}));function up(e){let{blocks:t,props:n={},__experimentalLayout:r}=e;const o=(0,f.useSelect)((e=>e(qn).getSettings()),[]),i=(0,p.__experimentalUseDisabled)(),l=(0,p.useMergeRefs)([n.ref,i]),s=(0,a.useMemo)((()=>({...o,__experimentalBlockPatterns:[]})),[o]),d=(0,a.useMemo)((()=>(0,u.castArray)(t)),[t]),y=(0,a.createElement)(Mc,{value:d,settings:s},(0,a.createElement)(Fy,{renderAppender:!1,__experimentalLayout:r}));return{...n,ref:l,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?y:null}}var pp=function(e){var t,n;let{item:r}=e;const{name:i,title:l,icon:s,description:c,initialAttributes:u}=r,p=(0,o.getBlockType)(i),d=(0,o.isReusableBlock)(r);return(0,a.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,a.createElement)("div",{className:"block-editor-inserter__preview"},d||null!=p&&p.example?(0,a.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,a.createElement)(cp,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=p.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:p.example?(0,o.getBlockFromExample)(r.name,{attributes:{...p.example.attributes,...u},innerBlocks:p.example.innerBlocks}):(0,o.createBlock)(i,u)})):(0,a.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,m.__)("No Preview Available."))),!d&&(0,a.createElement)(Rc,{title:l,icon:s,description:c}))};var dp=(0,a.createContext)();var fp=(0,a.forwardRef)((function(e,t){let{isFirst:n,as:r,children:o,...i}=e;const s=(0,a.useContext)(dp);return(0,a.createElement)(d.__unstableCompositeItem,l({ref:t,state:s,role:"option",focusable:!0},i),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return r?(0,a.createElement)(r,t,o):"function"==typeof o?o(t):(0,a.createElement)(d.Button,t,o)}))}));var yp=(0,a.createElement)(D.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function mp(e){let{count:t,icon:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,a.createElement)("div",{className:"block-editor-block-draggable-chip"},(0,a.createElement)(d.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,a.createElement)(d.FlexItem,null,n?(0,a.createElement)(Nc,{icon:n}):(0,m.sprintf)((0,m._n)("%d block","%d blocks",t),t)),(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(Nc,{icon:yp})))))}var gp=e=>{let{isEnabled:t,blocks:n,icon:r,children:o}=e;const i={type:"inserter",blocks:n};return(0,a.createElement)(d.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:i,__experimentalDragComponent:(0,a.createElement)(mp,{count:n.length,icon:r})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};function hp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:t}=e.navigator;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var bp=(0,a.memo)((function(e){let{className:t,isFirst:n,item:r,onSelect:i,onHover:s,isDraggable:u,...p}=e;const d=(0,a.useRef)(!1),f=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},y=(0,a.useMemo)((()=>[(0,o.createBlock)(r.name,r.initialAttributes,(0,o.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]),[r.name,r.initialAttributes,r.initialAttributes]);return(0,a.createElement)(gp,{isEnabled:u&&!r.disabled,blocks:y,icon:r.icon},(e=>{let{draggable:o,onDragStart:u,onDragEnd:y}=e;return(0,a.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:o,onDragStart:e=>{d.current=!0,u&&(s(null),u(e))},onDragEnd:e=>{d.current=!1,y&&y(e)}},(0,a.createElement)(fp,l({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:e=>{e.preventDefault(),i(r,hp()?e.metaKey:e.ctrlKey),s(null)},onKeyDown:e=>{const{keyCode:t}=e;t===bc.ENTER&&(e.preventDefault(),i(r,hp()?e.metaKey:e.ctrlKey),s(null))},onFocus:()=>{d.current||s(r)},onMouseEnter:()=>{d.current||s(r)},onMouseLeave:()=>s(null),onBlur:()=>s(null)},p),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:f},(0,a.createElement)(Nc,{icon:r.icon,showColors:!0})),(0,a.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))}));var vp=(0,a.forwardRef)((function(e,t){const[n,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{n&&(0,Lt.speak)((0,m.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,a.createElement)("div",l({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{r(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&r(!1)}},e))}));var _p=(0,a.forwardRef)((function(e,t){const n=(0,a.useContext)(dp);return(0,a.createElement)(d.__unstableCompositeGroup,l({state:n,role:"presentation",ref:t},e))}));var kp=function(e){let{items:t=[],onSelect:n,onHover:r=(()=>{}),children:i,label:l,isDraggable:s=!0}=e;return(0,a.createElement)(vp,{className:"block-editor-block-types-list","aria-label":l},function(e,t){const n=[];for(let r=0,o=e.length;r(0,a.createElement)(_p,{key:t},e.map(((e,i)=>(0,a.createElement)(bp,{key:e.id,item:e,className:(0,o.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:r,isDraggable:s,isFirst:0===t&&0===i})))))),i)};var Ep=function(e){let{title:t,icon:n,children:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,a.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,a.createElement)(d.Icon,{icon:n})),(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},r))};var Sp=(e,t)=>{const{categories:n,collections:r,items:i}=(0,f.useSelect)((t=>{const{getInserterItems:n}=t(qn),{getCategories:r,getCollections:i}=t(o.store);return{categories:r(),collections:i(),items:n(e)}}),[e]);return[i,n,r,(0,a.useCallback)(((e,n)=>{let{name:r,initialAttributes:i,innerBlocks:l}=e;const a=(0,o.createBlock)(r,i,(0,o.createBlocksFromInnerBlocksTemplate)(l));t(a,void 0,n)}),[t])]};var wp=function(e){let{children:t}=e;const n=(0,d.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,a.createElement)(dp.Provider,{value:n},t)};const Ap=[];var Cp=function(e){let{rootClientId:t,onInsert:n,onHover:r,showMostUsedBlocks:o}=e;const[i,l,s,c]=Sp(t,n),d=(0,a.useMemo)((()=>(0,u.orderBy)(i,["frecency"],["desc"]).slice(0,6)),[i]),f=(0,a.useMemo)((()=>i.filter((e=>!e.category))),[i]),y=(0,a.useMemo)((()=>(0,u.flow)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(i)),[i]),g=(0,a.useMemo)((()=>{const e={...s};return Object.keys(s).forEach((t=>{e[t]=i.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[i,s]);(0,a.useEffect)((()=>()=>r(null)),[]);const h=(0,p.useAsyncList)(l),b=l.length===h.length,v=(0,a.useMemo)((()=>Object.entries(s)),[s]),_=(0,p.useAsyncList)(b?v:Ap);return(0,a.createElement)(wp,null,(0,a.createElement)("div",null,o&&!!d.length&&(0,a.createElement)(Ep,{title:(0,m._x)("Most used","blocks")},(0,a.createElement)(kp,{items:d,onSelect:c,onHover:r,label:(0,m._x)("Most used","blocks")})),(0,u.map)(h,(e=>{const t=y[e.slug];return t&&t.length?(0,a.createElement)(Ep,{key:e.slug,title:e.title,icon:e.icon},(0,a.createElement)(kp,{items:t,onSelect:c,onHover:r,label:e.title})):null})),b&&f.length>0&&(0,a.createElement)(Ep,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,m.__)("Uncategorized")},(0,a.createElement)(kp,{items:f,onSelect:c,onHover:r,label:(0,m.__)("Uncategorized")})),(0,u.map)(_,(e=>{let[t,n]=e;const o=g[t];return o&&o.length?(0,a.createElement)(Ep,{key:t,title:n.title,icon:n.icon},(0,a.createElement)(kp,{items:o,onSelect:c,onHover:r,label:n.title})):null}))))};var Ip=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,openPatternExplorer:o}=e;const i=(0,p.useViewportMatch)("medium","<"),l=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,a.createElement)(d.Flex,{justify:"space-between",align:"start",gap:"4",className:l},(0,a.createElement)(d.FlexItem,{isBlock:!0},(0,a.createElement)(d.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,m.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{r(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!i&&(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(d.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,m.__)("Explore all patterns"),onClick:()=>o()},(0,m._x)("Explore","Label for showing all block patterns"))))},xp=window.wp.notices;var Bp=(e,t)=>{const{patternCategories:n,patterns:r}=(0,f.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(qn);return{patterns:n(t),patternCategories:r().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:i}=(0,f.useDispatch)(xp.store),l=(0,a.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,o.cloneBlock)(e))),t.name),i((0,m.sprintf)((0,m.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[]);return[r,n,l]};function Pp(e){let{isDraggable:t,pattern:n,onClick:r,composite:o}=e;const{blocks:i,viewportWidth:s}=n,c=`block-editor-block-patterns-list__item-description-${(0,p.useInstanceId)(Pp)}`;return(0,a.createElement)(gp,{isEnabled:t,blocks:i},(e=>{let{draggable:t,onDragStart:u,onDragEnd:p}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:p},(0,a.createElement)(d.__unstableCompositeItem,l({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:()=>r(n,i)}),(0,a.createElement)(cp,{blocks:i,viewportWidth:s}),(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,a.createElement)(d.VisuallyHidden,{id:c},n.description)))}))}function Tp(){return(0,a.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Op=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:r,onClickPattern:o,orientation:i,label:s=(0,m.__)("Block Patterns")}=e;const c=(0,d.__unstableUseCompositeState)({orientation:i});return(0,a.createElement)(d.__unstableComposite,l({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((e=>r.includes(e)?(0,a.createElement)(Pp,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:c}):(0,a.createElement)(Tp,{key:e.name}))))};function Np(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r}=e;const o="block-editor-block-patterns-explorer__sidebar";return(0,a.createElement)("div",{className:`${o}__categories-list`},n.map((e=>{let{name:n,label:i}=e;return(0,a.createElement)(d.Button,{key:n,label:i,className:`${o}__categories-list__item`,isPressed:t===n,onClick:()=>{r(n)}},i)})))}function Rp(e){let{filterValue:t,setFilterValue:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,a.createElement)(d.SearchControl,{onChange:n,value:t,label:(0,m.__)("Search for patterns"),placeholder:(0,m.__)("Search")}))}var Fp=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:r,filterValue:o,setFilterValue:i}=e;return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__sidebar"},(0,a.createElement)(Rp,{filterValue:o,setFilterValue:i}),!o&&(0,a.createElement)(Np,{selectedCategory:t,patternCategories:n,onClickCategory:r}))};var Mp=function(){return(0,a.createElement)("div",{className:"block-editor-inserter__no-results"},(0,a.createElement)(wo,{className:"block-editor-inserter__no-results-icon",icon:Oc}),(0,a.createElement)("p",null,(0,m.__)("No results found.")))};var Dp=function(e){let{rootClientId:t="",insertionIndex:n,clientId:r,isAppender:i,onSelect:l,shouldFocusBlock:s=!0}=e;const{getSelectedBlock:c}=(0,f.useSelect)(qn),{destinationRootClientId:p,destinationIndex:d}=(0,f.useSelect)((e=>{const{getSelectedBlockClientId:o,getBlockRootClientId:l,getBlockIndex:a,getBlockOrder:s}=e(qn),c=o();let u,p=t;return void 0!==n?u=n:r?u=a(r):!i&&c?(p=l(c),u=a(c)+1):u=s(p).length,{destinationRootClientId:p,destinationIndex:u}}),[t,n,r,i]),{replaceBlocks:y,insertBlocks:g,showInsertionPoint:h,hideInsertionPoint:b}=(0,f.useDispatch)(qn),v=(0,a.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=c();!i&&r&&(0,o.isUnmodifiedDefaultBlock)(r)?y(r.clientId,e,null,s||n?0:null,t):g(e,d,p,!0,s||n?0:null,t);const a=(0,m.sprintf)((0,m._n)("%d block added.","%d blocks added.",(0,u.castArray)(e).length),(0,u.castArray)(e).length);(0,Lt.speak)(a),l&&l()}),[i,c,y,g,p,d,l,s]),_=(0,a.useCallback)((e=>{e?h(p,d):b()}),[h,b,p,d]);return[p,v,_]};const Lp=e=>e.name||"",Up=e=>e.title,jp=e=>e.description||"",Vp=e=>e.keywords||[],zp=e=>e.category,Gp=()=>null;function Hp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(0,u.deburr)(e),e=e.replace(/^\//,""),e=e.toLowerCase(),e}const Wp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,u.words)(Hp(e))},$p=(e,t)=>(0,u.differenceWith)(e,Wp(t),((e,t)=>t.includes(e))),Kp=(e,t,n,r)=>{if(0===Wp(r).length)return e;return qp(e,r,{getCategory:e=>{var n;return null===(n=(0,u.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:e=>{var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title}})},qp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Wp(t);if(0===r.length)return e;const o=e.map((e=>[e,Jp(e,t,n)])).filter((e=>{let[,t]=e;return t>0}));return o.sort(((e,t)=>{let[,n]=e,[,r]=t;return r-n})),o.map((e=>{let[t]=e;return t}))};function Jp(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{getName:r=Lp,getTitle:o=Up,getDescription:i=jp,getKeywords:l=Vp,getCategory:a=zp,getCollection:s=Gp}=n,c=r(e),p=o(e),d=i(e),f=l(e),y=a(e),m=s(e),g=Hp(t),h=Hp(p);let b=0;if(g===h)b+=30;else if(h.startsWith(g))b+=20;else{const e=[c,p,d,...f,y,m].join(" "),t=(0,u.words)(g);0===$p(t,e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function Yp(e){let{filterValue:t,filteredBlockPatternsLength:n}=e;return t?(0,a.createElement)(d.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count"},(0,m.sprintf)((0,m._n)('%1$d pattern found for "%2$s"','%1$d patterns found for "%2$s"',n),n,t)):null}var Qp=function(e){let{filterValue:t,selectedCategory:n,patternCategories:r}=e;const o=(0,p.useDebounce)(Lt.speak,500),[i,l]=Dp({shouldFocusBlock:!0}),[s,,c]=Bp(l,i),u=(0,a.useMemo)((()=>r.map((e=>e.name))),[r]),d=(0,a.useMemo)((()=>t?qp(s,t):s.filter((e=>{var t,r;return"uncategorized"===n?!(null!==(t=e.categories)&&void 0!==t&&t.length)||e.categories.every((e=>!u.includes(e))):null===(r=e.categories)||void 0===r?void 0:r.includes(n)}))),[t,n,s]);(0,a.useEffect)((()=>{if(!t)return;const e=d.length,n=(0,m.sprintf)((0,m._n)("%d result found.","%d results found.",e),e);o(n)}),[t,o]);const f=(0,p.useAsyncList)(d,{step:2}),y=!(null==d||!d.length);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer__list"},y&&(0,a.createElement)(Yp,{filterValue:t,filteredBlockPatternsLength:d.length}),(0,a.createElement)(wp,null,!y&&(0,a.createElement)(Mp,null),y&&(0,a.createElement)(Op,{shownPatterns:f,blockPatterns:d,onClickPattern:c,isDraggable:!1})))};function Xp(e){let{initialCategory:t,patternCategories:n}=e;const[r,o]=(0,a.useState)(""),[i,l]=(0,a.useState)(null==t?void 0:t.name);return(0,a.createElement)("div",{className:"block-editor-block-patterns-explorer"},(0,a.createElement)(Fp,{selectedCategory:i,patternCategories:n,onClickCategory:l,filterValue:r,setFilterValue:o}),(0,a.createElement)(Qp,{filterValue:r,selectedCategory:i,patternCategories:n}))}var Zp=function(e){let{onModalClose:t,...n}=e;return(0,a.createElement)(d.Modal,{title:(0,m.__)("Patterns"),closeLabel:(0,m.__)("Close"),onRequestClose:t,isFullScreen:!0},(0,a.createElement)(Xp,n))};function ed(e){let{rootClientId:t,onInsert:n,selectedCategory:r,populatedCategories:o}=e;const[i,,l]=Bp(n,t),s=(0,a.useCallback)((e=>{var t;if(null===(t=e.categories)||void 0===t||!t.length)return 1/0;const n=o.reduce(((e,t,n)=>{let{name:r}=t;return e[r]=n,e}),{});return Math.min(...e.categories.map((e=>void 0!==n[e]?n[e]:1/0)))}),[o]),c=(0,a.useMemo)((()=>i.filter((e=>{var t;return"uncategorized"===r.name?s(e)===1/0:null===(t=e.categories)||void 0===t?void 0:t.includes(r.name)}))),[i,r]),u=(0,a.useMemo)((()=>c.sort(((e,t)=>s(e)-s(t)))),[c,s]),d=(0,p.useAsyncList)(u);return c.length?(0,a.createElement)("div",{className:"block-editor-inserter__panel-content"},(0,a.createElement)(Op,{shownPatterns:d,blockPatterns:c,onClickPattern:l,label:r.label,orientation:"vertical",isDraggable:!0})):null}var td=function(e){let{rootClientId:t,onInsert:n,onClickCategory:r,selectedCategory:o}=e;const[i,l]=(0,a.useState)(!1),[s,c]=Bp(),u=(0,a.useCallback)((e=>!(!e.categories||!e.categories.length)&&e.categories.some((e=>c.some((t=>t.name===e))))),[c]),p=(0,a.useMemo)((()=>{const e=c.filter((e=>s.some((t=>{var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)})))).sort(((e,t)=>{let{name:n}=e,{name:r}=t;return[n,r].includes("featured")?"featured"===n?-1:1:0}));return s.some((e=>!u(e)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,m._x)("Uncategorized")}),e}),[s,c]),d=o||p[0];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ip,{selectedCategory:d,patternCategories:p,onClickCategory:r,openPatternExplorer:()=>l(!0)}),!i&&(0,a.createElement)(ed,{rootClientId:t,onInsert:n,selectedCategory:d,populatedCategories:p}),i&&(0,a.createElement)(Zp,{initialCategory:d,patternCategories:p,onModalClose:()=>l(!1)}))},nd=window.wp.url;function rd(e){let{onHover:t,onInsert:n,rootClientId:r}=e;const[o,,,i]=Sp(r,n),l=(0,a.useMemo)((()=>o.filter((e=>{let{category:t}=e;return"reusable"===t}))),[o]);return 0===l.length?(0,a.createElement)(Mp,null):(0,a.createElement)(Ep,{title:(0,m.__)("Reusable blocks")},(0,a.createElement)(kp,{items:l,onSelect:i,onHover:t,label:(0,m.__)("Reusable blocks")}))}var od=function(e){let{rootClientId:t,onInsert:n,onHover:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(rd,{onHover:r,onInsert:n,rootClientId:t}),(0,a.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},(0,a.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:(0,nd.addQueryArgs)("edit.php",{post_type:"wp_block"})},(0,m.__)("Manage Reusable blocks"))))};const{Fill:id,Slot:ld}=(0,d.createSlotFill)("__unstableInserterMenuExtension");id.Slot=ld;var ad=id;const sd=[];var cd=function(e){let{filterValue:t,onSelect:n,onHover:r,rootClientId:o,clientId:i,isAppender:l,__experimentalInsertionIndex:s,maxBlockPatterns:c,maxBlockTypes:f,showBlockDirectory:y=!1,isDraggable:g=!0,shouldFocusBlock:h=!0,prioritizePatterns:b}=e;const v=(0,p.useDebounce)(Lt.speak,500),[_,k]=Dp({onSelect:n,rootClientId:o,clientId:i,isAppender:l,insertionIndex:s,shouldFocusBlock:h}),[E,S,w,A]=Sp(_,k),[C,,I]=Bp(k,_),x=(0,a.useMemo)((()=>{if(0===c)return[];const e=qp(C,t);return void 0!==c?e.slice(0,c):e}),[t,C,c]);let B=f;b&&x.length>2&&(B=0);const P=(0,a.useMemo)((()=>{if(0===B)return[];const e=Kp((0,u.orderBy)(E,["frecency"],["desc"]),S,w,t);return void 0!==B?e.slice(0,B):e}),[t,E,S,w,f]);(0,a.useEffect)((()=>{if(!t)return;const e=P.length+x.length,n=(0,m.sprintf)((0,m._n)("%d result found.","%d results found.",e),e);v(n)}),[t,v]);const T=(0,p.useAsyncList)(P,{step:9}),O=(0,p.useAsyncList)(T.length===P.length?x:sd),N=!(0,u.isEmpty)(P)||!(0,u.isEmpty)(x),R=!!P.length&&(0,a.createElement)(Ep,{title:(0,a.createElement)(d.VisuallyHidden,null,(0,m.__)("Blocks"))},(0,a.createElement)(kp,{items:T,onSelect:A,onHover:r,label:(0,m.__)("Blocks"),isDraggable:g})),F=!!x.length&&(0,a.createElement)(Ep,{title:(0,a.createElement)(d.VisuallyHidden,null,(0,m.__)("Block Patterns"))},(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},(0,a.createElement)(Op,{shownPatterns:O,blockPatterns:x,onClickPattern:I,isDraggable:g})));return(0,a.createElement)(wp,null,!y&&!N&&(0,a.createElement)(Mp,null),b?F:R,!!P.length&&!!x.length&&(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?R:F,y&&(0,a.createElement)(ad.Slot,{fillProps:{onSelect:A,onHover:r,filterValue:t,hasItems:N,rootClientId:_}},(e=>e.length?e:N?null:(0,a.createElement)(Mp,null))))};const ud={name:"blocks",title:(0,m.__)("Blocks")},pd={name:"patterns",title:(0,m.__)("Patterns")},dd={name:"reusable",title:(0,m.__)("Reusable")};var fd=function(e){let{children:t,showPatterns:n=!1,showReusableBlocks:r=!1,onSelect:o}=e;const i=(0,a.useMemo)((()=>{const e=[ud];return n&&e.push(pd),r&&e.push(dd),e}),[ud,n,pd,r,dd]);return(0,a.createElement)(d.TabPanel,{className:"block-editor-inserter__tabs",tabs:i,onSelect:o},t)};var yd=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,onSelect:l,showInserterHelpPanel:s,showMostUsedBlocks:c,__experimentalFilterValue:u="",shouldFocusBlock:p=!0}=e;const[y,g]=(0,a.useState)(u),[h,b]=(0,a.useState)(null),[v,_]=(0,a.useState)(null),[k,E,S]=Dp({rootClientId:n,clientId:r,isAppender:o,insertionIndex:i,shouldFocusBlock:p}),{showPatterns:w,hasReusableBlocks:A}=(0,f.useSelect)((e=>{var t;const{__experimentalGetAllowedPatterns:n,getSettings:r}=e(qn);return{showPatterns:!!n(k).length,hasReusableBlocks:!(null===(t=r().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[k]),C=(0,a.useCallback)(((e,t,n)=>{E(e,t,n),l()}),[E,l]),I=(0,a.useCallback)(((e,t)=>{E(e,{patternName:t}),l()}),[E,l]),x=(0,a.useCallback)((e=>{S(!!e),b(e)}),[S,b]),B=(0,a.useCallback)((e=>{_(e)}),[_]),P=(0,a.useMemo)((()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"block-editor-inserter__block-list"},(0,a.createElement)(Cp,{rootClientId:k,onInsert:C,onHover:x,showMostUsedBlocks:c})),s&&(0,a.createElement)("div",{className:"block-editor-inserter__tips"},(0,a.createElement)(d.VisuallyHidden,{as:"h2"},(0,m.__)("A tip for using the block editor")),(0,a.createElement)(Tc,null)))),[k,C,x,y,c,s]),T=(0,a.useMemo)((()=>(0,a.createElement)(td,{rootClientId:k,onInsert:I,onClickCategory:B,selectedCategory:v})),[k,I,B,v]),O=(0,a.useMemo)((()=>(0,a.createElement)(od,{rootClientId:k,onInsert:C,onHover:x})),[k,C,x]),N=(0,a.useCallback)((e=>"blocks"===e.name?P:"patterns"===e.name?T:O),[P,T,O]),R=(0,a.useRef)();return(0,a.useImperativeHandle)(t,(()=>({focusSearch:()=>{R.current.focus()}}))),(0,a.createElement)("div",{className:"block-editor-inserter__menu"},(0,a.createElement)("div",{className:"block-editor-inserter__main-area"},(0,a.createElement)("div",{className:"block-editor-inserter__content"},(0,a.createElement)(d.SearchControl,{className:"block-editor-inserter__search",onChange:e=>{h&&b(null),g(e)},value:y,label:(0,m.__)("Search for blocks and patterns"),placeholder:(0,m.__)("Search"),ref:R}),!!y&&(0,a.createElement)(cd,{filterValue:y,onSelect:l,onHover:x,rootClientId:n,clientId:r,isAppender:o,__experimentalInsertionIndex:i,showBlockDirectory:!0,shouldFocusBlock:p}),!y&&(w||A)&&(0,a.createElement)(fd,{showPatterns:w,showReusableBlocks:A},N),!y&&!w&&!A&&P)),s&&h&&(0,a.createElement)(pp,{item:h}))}));function md(e){let{onSelect:t,rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:i}=e;const[l,s]=(0,a.useState)(""),[u,p]=Dp({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),[y]=Sp(u,p),[g]=Bp(p,u),{setInserterIsOpened:h,insertionIndex:b}=(0,f.useSelect)((e=>{const{getSettings:t,getBlockIndex:n,getBlockCount:o}=e(qn),i=t(),l=n(r),a=o();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===l?a:l}}),[r]),v=g.length&&(!!l||i),_=v&&g.length>6||y.length>6;(0,a.useEffect)((()=>{h&&h(!1)}),[h]);let k=0;return v&&(k=i?4:2),(0,a.createElement)("div",{className:c()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":h})},_&&(0,a.createElement)(d.SearchControl,{className:"block-editor-inserter__search",value:l,onChange:e=>{s(e)},label:(0,m.__)("Search for blocks and patterns"),placeholder:(0,m.__)("Search")}),(0,a.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},(0,a.createElement)(cd,{filterValue:l,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:k,maxBlockTypes:6,isDraggable:!1,prioritizePatterns:i})),h&&(0,a.createElement)(d.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{h({rootClientId:n,insertionIndex:b,filterValue:l})},"aria-label":(0,m.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},(0,m.__)("Browse all")))}const gd=e=>{let t,{onToggle:n,disabled:r,isOpen:o,blockTitle:i,hasSingleBlockType:s,toggleProps:c={},prioritizePatterns:u}=e;t=s?(0,m.sprintf)((0,m._x)("Add %s","directly add the only allowed block"),i):u?(0,m.__)("Add pattern"):(0,m._x)("Add block","Generic label for block inserter button");const{onClick:p,...f}=c;return(0,a.createElement)(d.Button,l({icon:Bc,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),p&&p(e)},className:"block-editor-inserter__toggle","aria-haspopup":!s&&"true","aria-expanded":!s&&o,disabled:r},f))};class hd extends a.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle(e){let{onToggle:t,isOpen:n}=e;const{disabled:r,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,hasItems:s,renderToggle:c=gd,prioritizePatterns:u}=this.props;return c({onToggle:t,isOpen:n,disabled:r||!s,blockTitle:o,hasSingleBlockType:i,directInsertBlock:l,toggleProps:a,prioritizePatterns:u})}renderContent(e){let{onClose:t}=e;const{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,__experimentalIsQuick:l,prioritizePatterns:s}=this.props;return l?(0,a.createElement)(md,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,prioritizePatterns:s}):(0,a.createElement)(yd,{onSelect:()=>{t()},rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:r,__experimentalIsQuick:o,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:r}):(0,a.createElement)(d.Dropdown,{className:"block-editor-inserter",contentClassName:c()("block-editor-inserter__popover",{"is-quick":o}),position:e,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,m.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var bd=(0,p.compose)([(0,f.withSelect)(((e,t)=>{let{clientId:n,rootClientId:r}=t;const{getBlockRootClientId:i,hasInserterItems:l,__experimentalGetAllowedBlocks:a,__experimentalGetDirectInsertBlock:s,getBlockIndex:c,getBlockCount:p,getSettings:d}=e(qn),{getBlockVariations:f}=e(o.store);r=r||i(n)||void 0;const y=a(r),m=s(r),g=c(n),h=p(),b=d(),v=1===(0,u.size)(y)&&0===(0,u.size)(f(y[0].name,"inserter"));let _=!1;return v&&(_=y[0]),{hasItems:l(r),hasSingleBlockType:v,blockTitle:_?_.title:"",allowedBlockType:_,directInsertBlock:m,rootClientId:r,prioritizePatterns:b.__experimentalPreferPatternsOnRoot&&!r&&g>0&&(g{let{select:r}=n;return{insertOnlyAllowedBlock(){const{rootClientId:n,clientId:i,isAppender:l,hasSingleBlockType:a,allowedBlockType:s,directInsertBlock:c,onSelectOrClose:u}=t;if(!a&&!c)return;const{insertBlock:p}=e(qn);let d;if(c){const e=function(e){const{getBlock:t,getPreviousBlockClientId:o}=r(qn);if(!e||!i&&!n)return{};const l={};let a={};if(i){const e=t(i),n=t(o(i));(null==e?void 0:e.name)===(null==n?void 0:n.name)&&(a=(null==n?void 0:n.attributes)||{})}else{var s;const e=t(n);if(null!=e&&null!==(s=e.innerBlocks)&&void 0!==s&&s.length){const t=e.innerBlocks[e.innerBlocks.length-1];c&&(null==c?void 0:c.name)===t.name&&(a=t.attributes)}}return e.forEach((e=>{a.hasOwnProperty(e)&&(l[e]=a[e])})),l}(c.attributesToCopy);d=(0,o.createBlock)(c.name,{...c.attributes||{},...e})}else d=(0,o.createBlock)(s.name);p(d,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:o,getBlockRootClientId:a}=r(qn);if(i)return e(i);const s=t();return!l&&s&&a(s)===n?e(s)+1:o(n).length}(),n),u&&u();const f=(0,m.sprintf)((0,m.__)("%s block added"),s.title);(0,Lt.speak)(f)}}})),(0,p.ifCondition)((e=>{let{hasItems:t,isAppender:n,rootClientId:r,clientId:o}=e;return t||!n&&!r&&!o}))])(hd);var vd=(0,p.compose)((0,f.withSelect)(((e,t)=>{const{getBlockCount:n,getSettings:r,getTemplateLock:o}=e(qn),i=!n(t.rootClientId),{bodyPlaceholder:l}=r();return{showPrompt:i,isLocked:!!o(t.rootClientId),placeholder:l}})),(0,f.withDispatch)(((e,t)=>{const{insertDefaultBlock:n,startTyping:r}=e(qn);return{onAppend(){const{rootClientId:e}=t;n(void 0,e),r()}}})))((function(e){let{isLocked:t,onAppend:n,showPrompt:r,placeholder:o,rootClientId:i}=e;if(t)return null;const l=(0,xc.decodeEntities)(o)||(0,m.__)("Type / to choose a block");return(0,a.createElement)("div",{"data-root-client-id":i||"",className:c()("block-editor-default-block-appender",{"has-visible-prompt":r})},(0,a.createElement)("p",{tabIndex:"0",role:"button","aria-label":(0,m.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{bc.ENTER!==e.keyCode&&bc.SPACE!==e.keyCode||n()},onClick:()=>n(),onFocus:()=>{r&&n()}},r?l:"\ufeff"),(0,a.createElement)(bd,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))}));function _d(e,t){let{rootClientId:n,className:r,onFocus:o,tabIndex:i}=e;return(0,a.createElement)(bd,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:e=>{let n,{onToggle:l,disabled:s,isOpen:u,blockTitle:p,hasSingleBlockType:f}=e;n=f?(0,m.sprintf)((0,m._x)("Add %s","directly add the only allowed block"),p):(0,m._x)("Add block","Generic label for block inserter button");const y=!f;let g=(0,a.createElement)(d.Button,{ref:t,onFocus:o,tabIndex:i,className:c()(r,"block-editor-button-block-appender"),onClick:l,"aria-haspopup":y?"true":void 0,"aria-expanded":y?u:void 0,disabled:s,label:n},!f&&(0,a.createElement)(d.VisuallyHidden,{as:"span"},n),(0,a.createElement)(wo,{icon:Bc}));return(y||f)&&(g=(0,a.createElement)(d.Tooltip,{text:n},g)),g},isAppender:!0})}const kd=(0,a.forwardRef)(((e,t)=>(jt()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),_d(e,t))));var Ed=(0,a.forwardRef)(_d);var Sd=(0,f.withSelect)(((e,t)=>{let{rootClientId:n}=t;const{canInsertBlockType:r,getTemplateLock:i,getSelectedBlockClientId:l}=e(qn);return{isLocked:!!i(n),canInsertDefaultBlock:r((0,o.getDefaultBlockName)(),n),selectedBlockClientId:l()}}))((function(e){let t,{rootClientId:n,canInsertDefaultBlock:r,isLocked:o,renderAppender:i,className:l,selectedBlockClientId:s,tagName:u="div"}=e;if(o||!1===i)return null;if(i)t=(0,a.createElement)(i,null);else{if(!(s===n||!n&&!s))return null;t=r?(0,a.createElement)(vd,{rootClientId:n}):(0,a.createElement)(Ed,{rootClientId:n,className:"block-list-appender__toggle"})}return(0,a.createElement)(u,{tabIndex:-1,className:c()("block-list-appender wp-block",l),contentEditable:!1,"data-block":!0},t)}));function wd(e){return(0,p.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:r}=t;e.current.scrollBy(n,r)}const r={passive:!0};return t.addEventListener("wheel",n,r),()=>{t.removeEventListener("wheel",n,r)}}),[e])}const Ad=(0,a.createContext)();function Cd(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const{selectBlock:r,hideInsertionPoint:o}=(0,f.useDispatch)(qn),i=(0,a.useContext)(Ad),l=(0,a.useRef)(),{orientation:s,previousClientId:u,nextClientId:y,rootClientId:g,isInserterShown:h}=(0,f.useSelect)((e=>{var t;const{getBlockOrder:n,getBlockListSettings:r,getBlockInsertionPoint:o,isBlockBeingDragged:i,getPreviousBlockClientId:l,getNextBlockClientId:a}=e(qn),s=o(),c=n(s.rootClientId);if(!c.length)return{};let u=c[s.index-1],p=c[s.index];for(;i(u);)u=l(u);for(;i(p);)p=a(p);return{previousClientId:u,nextClientId:p,orientation:(null===(t=r(s.rootClientId))||void 0===t?void 0:t.orientation)||"vertical",rootClientId:s.rootClientId,isInserterShown:null==s?void 0:s.__unstableWithInserter}}),[]),b=Er(u),v=Er(y),_="vertical"===s,k=(0,a.useMemo)((()=>{if(!b&&!v)return{};const e=b?b.getBoundingClientRect():null,t=v?v.getBoundingClientRect():null;if(_)return{width:b?b.offsetWidth:v.offsetWidth,height:t&&e?t.top-e.bottom:0};let n=0;return e&&t&&(n=(0,m.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:b?b.offsetHeight:v.offsetHeight}}),[b,v]),E=(0,a.useCallback)((()=>{if(!b&&!v)return{};const{ownerDocument:e}=b||v,t=b?b.getBoundingClientRect():null,n=v?v.getBoundingClientRect():null;return _?(0,m.isRTL)()?{top:t?t.bottom:n.top,left:t?t.right:n.right,right:t?t.left:n.left,bottom:n?n.top:t.bottom,ownerDocument:e}:{top:t?t.bottom:n.top,left:t?t.left:n.left,right:t?t.right:n.right,bottom:n?n.top:t.bottom,ownerDocument:e}:(0,m.isRTL)()?{top:t?t.top:n.top,left:t?t.left:n.right,right:n?n.right:t.left,bottom:t?t.bottom:n.bottom,ownerDocument:e}:{top:t?t.top:n.top,left:t?t.right:n.left,right:n?n.left:t.right,bottom:t?t.bottom:n.bottom,ownerDocument:e}}),[b,v]),S=wd(n),w=(0,p.useReducedMotion)(),A=c()("block-editor-block-list__insertion-point","is-"+s);const C=b&&v&&h,I={start:{..._?{height:0,left:"50%",right:"50%",y:0}:{width:0,top:"50%",bottom:"50%",x:0},opacity:0},rest:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:C?.4:0}},hover:{..._?{height:4,left:0,right:0,y:-2}:{width:4,top:0,bottom:0,x:-2},opacity:1,borderRadius:"2px",transition:{delay:.4}}},x={start:{scale:w?1:0},rest:{scale:1,transition:{delay:.2}}};return(0,a.createElement)(d.Popover,{ref:S,noArrow:!0,animate:!1,getAnchorRect:E,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:t||null,key:y+"--"+g},(0,a.createElement)(d.__unstableMotion.div,{layout:!w,initial:w?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&y&&r(y,-1)},onFocus:function(e){e.target!==l.current&&(i.current=!0)},className:c()(A,{"is-with-inserter":C}),onHoverEnd:function(e){e.target!==l.current||i.current||o()},style:k},(0,a.createElement)(d.__unstableMotion.div,{variants:I,className:"block-editor-block-list__insertion-point-indicator"}),C&&(0,a.createElement)(d.__unstableMotion.div,{variants:x,className:c()("block-editor-block-list__insertion-point-inserter")},(0,a.createElement)(bd,{position:"bottom center",clientId:y,rootClientId:g,__experimentalIsQuick:!0,onToggle:e=>{i.current=e},onSelectOrClose:()=>{i.current=!1}}))))}function Id(e){let{children:t,__unstablePopoverSlot:n,__unstableContentRef:r}=e;const o=(0,f.useSelect)((e=>e(qn).isBlockInsertionPointVisible()),[]);return(0,a.createElement)(Ad.Provider,{value:(0,a.useRef)(!1)},o&&(0,a.createElement)(Cd,{__unstablePopoverSlot:n,__unstableContentRef:r}),t)}function xd(){const e=(0,a.useContext)(Ad),t=(0,f.useSelect)((e=>e(qn).getSettings().hasReducedUI),[]),{getBlockListSettings:n,getBlockRootClientId:r,getBlockIndex:o,isBlockInsertionPointVisible:i,isMultiSelecting:l,getSelectedBlockClientIds:s,getTemplateLock:c}=(0,f.useSelect)(qn),{showInsertionPoint:u,hideInsertionPoint:d}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((r=>{if(!t)return r.addEventListener("mousemove",a),()=>{r.removeEventListener("mousemove",a)};function a(t){var r,a;if(e.current)return;if(l())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void(i()&&d());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(c(p))return;const f=(null===(r=n(p))||void 0===r?void 0:r.orientation)||"vertical",y=t.target.getBoundingClientRect(),m=t.clientY-y.top,g=t.clientX-y.left;let h=Array.from(t.target.children).find((e=>e.classList.contains("wp-block")&&"vertical"===f&&e.offsetTop>m||e.classList.contains("wp-block")&&"horizontal"===f&&e.offsetLeft>g));if(!h)return;if(!h.id&&(h=h.firstElementChild,!h))return;if(null===(a=h.parentElement)||void 0===a?void 0:a.closest(".block-editor-block-content-overlay.overlay-active"))return;const b=h.id.slice("block-".length);if(!b)return;if(s().includes(b))return;const v=h.getBoundingClientRect();if("horizontal"===f&&(t.clientY>v.bottom||t.clientYv.right||t.clientX{setTimeout((()=>e(Date.now())),0)}:window.requestIdleCallback||window.requestAnimationFrame,Pd="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame;function Td(e){return(0,f.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:r}=t(qn),{getBlockType:i,getActiveBlockVariation:l}=t(o.store),a=n(e),s=i(a);if(!s)return null;const c=r(e),u=l(a,c),p={title:s.title,icon:s.icon,description:s.description,anchor:null==c?void 0:c.anchor};return u?{title:u.title||s.title,icon:u.icon||s.icon,description:u.description||s.description}:p}),[e])}function Od(e,t){const{attributes:n,name:r,reusableBlockTitle:i}=(0,f.useSelect)((t=>{if(!e)return{};const{getBlockName:n,getBlockAttributes:r,__experimentalGetReusableBlockTitle:i}=t(qn),l=n(e);if(!l)return{};const a=(0,o.isReusableBlock)((0,o.getBlockType)(l));return{attributes:r(e),name:l,reusableBlockTitle:a&&i(r(e).ref)}}),[e]),l=Td(e);if(!r||!l)return null;const a=(0,o.getBlockType)(r),s=a?(0,o.__experimentalGetBlockLabel)(a,n):null,c=i||s,p=c&&c!==a.title?c:l.title;return t&&t>0?(0,u.truncate)(p,{length:t}):p}function Nd(e){let{clientId:t,maximumLength:n}=e;return Od(t,n)}var Rd=e=>{let{children:t,clientIds:n,cloneClassname:r,onDragStart:i,onDragEnd:l}=e;const{srcRootClientId:s,isDraggable:c,icon:u}=(0,f.useSelect)((e=>{var t;const{canMoveBlocks:r,getBlockRootClientId:i,getBlockName:l}=e(qn),a=i(n[0]),s=l(n[0]);return{srcRootClientId:a,isDraggable:r(n,a),icon:null===(t=(0,o.getBlockType)(s))||void 0===t?void 0:t.icon}}),[n]),p=(0,a.useRef)(!1),[y,m,g]=function(){const e=(0,a.useRef)(null),t=(0,a.useRef)(null),n=(0,a.useRef)(null),r=(0,a.useRef)(null);return(0,a.useEffect)((()=>()=>{r.current&&(clearInterval(r.current),r.current=null)}),[]),[(0,a.useCallback)((o=>{e.current=o.clientY,n.current=(0,Zo.getScrollContainer)(o.target),r.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,a.useCallback)((r=>{if(!n.current)return;const o=n.current.offsetHeight,i=e.current-n.current.offsetTop,l=r.clientY-n.current.offsetTop;if(r.clientY>i){const e=Math.max(o-i-50,0),n=Math.max(l-i-50,0)/e;t.current=25*n}else if(r.clientY{e.current=null,n.current=null,r.current&&(clearInterval(r.current),r.current=null)}]}(),{startDraggingBlocks:h,stopDraggingBlocks:b}=(0,f.useDispatch)(qn);if((0,a.useEffect)((()=>()=>{p.current&&b()}),[]),!c)return t({isDraggable:!1});const v={type:"block",srcClientIds:n,srcRootClientId:s};return(0,a.createElement)(d.Draggable,{cloneClassname:r,__experimentalTransferDataType:"wp-blocks",transferData:v,onDragStart:e=>{h(n),p.current=!0,y(e),i&&i()},onDragOver:m,onDragEnd:()=>{b(),p.current=!1,g(),l&&l()},__experimentalDragComponent:(0,a.createElement)(mp,{count:n.length,icon:u})},(e=>{let{onDraggableStart:n,onDraggableEnd:r}=e;return t({draggable:!0,onDragStart:n,onDragEnd:r})}))};var Fd=function(e){let{clientId:t,rootClientId:n,blockElement:r}=e;const i=Td(t),s=(0,f.useSelect)((e=>{var r;const{getBlock:o,getBlockIndex:i,hasBlockMovingClientId:l,getBlockListSettings:a}=e(qn),s=i(t),{name:c,attributes:u}=o(t);return{index:s,name:c,attributes:u,blockMovingMode:l(),orientation:null===(r=a(n))||void 0===r?void 0:r.orientation}}),[t,n]),{index:u,name:p,attributes:y,blockMovingMode:g,orientation:h}=s,{setNavigationMode:b,removeBlock:v}=(0,f.useDispatch)(qn),_=(0,a.useRef)(),k=(0,o.getBlockType)(p),E=(0,o.__experimentalGetAccessibleBlockLabel)(k,y,u+1,h);(0,a.useEffect)((()=>{_.current.focus(),(0,Lt.speak)(E)}),[E]);const{hasBlockMovingClientId:S,getBlockIndex:w,getBlockRootClientId:A,getClientIdsOfDescendants:C,getSelectedBlockClientId:I,getMultiSelectedBlocksEndClientId:x,getPreviousBlockClientId:B,getNextBlockClientId:P,isNavigationMode:T}=(0,f.useSelect)(qn),{selectBlock:O,clearSelectedBlock:N,setBlockMovingClientId:R,moveBlockToPosition:F}=(0,f.useDispatch)(qn),M=c()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!g}),D=(0,m.__)("Drag");return(0,a.createElement)("div",{className:M},(0,a.createElement)(d.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(Nc,{icon:null==i?void 0:i.icon,showColors:!0})),(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(Rd,{clientIds:[t]},(e=>(0,a.createElement)(d.Button,l({icon:yp,className:"block-selection-button_drag-handle","aria-hidden":"true",label:D,tabIndex:"-1"},e))))),(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(d.Button,{ref:_,onClick:()=>b(!1),onKeyDown:function(e){const{keyCode:n}=e,o=n===bc.UP,i=n===bc.DOWN,l=n===bc.LEFT,a=n===bc.RIGHT,s=n===bc.TAB,c=n===bc.ESCAPE,u=n===bc.ENTER,p=n===bc.SPACE,d=e.shiftKey;if(n===bc.BACKSPACE||n===bc.DELETE)return v(t),void e.preventDefault();const f=I(),y=x(),m=B(y||f),g=P(y||f),h=s&&d||o,b=s&&!d||i,_=l,k=a;let E;if(h)E=m;else if(b)E=g;else if(_){var M;E=null!==(M=A(f))&&void 0!==M?M:f}else if(k){var D;E=null!==(D=C([f])[0])&&void 0!==D?D:f}const L=S();if(c&&T()&&(N(),e.preventDefault()),c&&L&&!e.defaultPrevented&&(R(null),e.preventDefault()),(u||p)&&L){const e=A(L),t=A(f),n=w(L);let r=w(f);n{!function(e){const[t]=Zo.focus.tabbable.find(e);t&&t.focus()}(e.current)}),[]);(0,Hc.useShortcut)("core/block-editor/focus-toolbar",s),(0,a.useEffect)((()=>{i&&s()}),[n,i,s]),(0,a.useEffect)((()=>{let t=0;return l&&!i&&(t=window.requestAnimationFrame((()=>{const t=Md(e.current),n=l||0;var r;t[n]&&(r=e.current).contains(r.ownerDocument.activeElement)&&t[n].focus()}))),()=>{if(window.cancelAnimationFrame(t),!o||!e.current)return;const n=Md(e.current).findIndex((e=>0===e.tabIndex));o(n)}}),[l,i])}var Ld=function(e){let{children:t,focusOnMount:n,__experimentalInitialIndex:r,__experimentalOnIndexChange:o,...i}=e;const s=(0,a.useRef)(),c=function(e){const[t,n]=(0,a.useState)(!0),r=(0,a.useCallback)((()=>{const t=!Zo.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||jt()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem, ToolbarButton or ToolbarDropdownMenu components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),n(t)}),[]);return(0,a.useLayoutEffect)((()=>{const t=new window.MutationObserver(r);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[t]),t}(s);return Dd(s,n,c,r,o),c?(0,a.createElement)(d.Toolbar,l({label:i["aria-label"],ref:s},i),t):(0,a.createElement)(d.NavigableMenu,l({orientation:"horizontal",role:"toolbar",ref:s},i),t)};var Ud=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var jd=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var Vd=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));var zd=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));function Gd(e,t,n,r,o,i,l){const a=n+1,s=e=>"up"===e?"horizontal"===l?(0,m.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===l?(0,m.isRTL)()?"left":"right":"down":null;if(e>1)return function(e,t,n,r,o){const i=t+1;if(o<0&&n)return(0,m.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return(0,m.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return(0,m.sprintf)((0,m._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(o>0&&!r)return(0,m.sprintf)((0,m._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,r,o,i);if(r&&o)return(0,m.sprintf)((0,m.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!o){const e=s("down");if("down"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1);if("left"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a+1);if("right"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a+1)}if(i>0&&o){const e=s("down");if("down"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!r){const e=s("up");if("up"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1);if("left"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d left to position %3$d"),t,a,a-1);if("right"===e)return(0,m.sprintf)((0,m.__)("Move %1$s block from position %2$d right to position %3$d"),t,a,a-1)}if(i<0&&r){const e=s("up");if("up"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,m.sprintf)((0,m.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const Hd=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?Ud:jd:Vd:"down"===e?"horizontal"===t?(0,m.isRTL)()?jd:Ud:zd:null,Wd=(e,t)=>"up"===e?"horizontal"===t?(0,m.isRTL)()?(0,m.__)("Move right"):(0,m.__)("Move left"):(0,m.__)("Move up"):"down"===e?"horizontal"===t?(0,m.isRTL)()?(0,m.__)("Move left"):(0,m.__)("Move right"):(0,m.__)("Move down"):null,$d=(0,a.forwardRef)(((e,t)=>{let{clientIds:n,direction:r,orientation:i,...s}=e;const y=(0,p.useInstanceId)($d),m=(0,u.castArray)(n).length,{blockType:g,isDisabled:h,rootClientId:b,isFirst:v,isLast:_,firstIndex:k,orientation:E="vertical"}=(0,f.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:l,getBlockOrder:a,getBlock:s,getBlockListSettings:c}=e(qn),p=(0,u.castArray)(n),d=(0,u.first)(p),f=l(d),y=t(d),m=t((0,u.last)(p)),g=a(f),h=s(d),b=0===y,v=m===g.length-1,{orientation:_}=c(f)||{};return{blockType:h?(0,o.getBlockType)(h.name):null,isDisabled:"up"===r?b:v,rootClientId:f,firstIndex:y,isFirst:b,isLast:v,orientation:i||_}}),[n,r]),{moveBlocksDown:S,moveBlocksUp:w}=(0,f.useDispatch)(qn),A="up"===r?w:S,C=`block-editor-block-mover-button__description-${y}`;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Button,l({ref:t,className:c()("block-editor-block-mover-button",`is-${r}-button`),icon:Hd(r,E),label:Wd(r,E),"aria-describedby":C},s,{onClick:h?null:e=>{A(n,b),s.onClick&&s.onClick(e)},"aria-disabled":h})),(0,a.createElement)("span",{id:C,className:"block-editor-block-mover-button__description"},Gd(m,g&&g.title,k,v,_,"up"===r?-1:1,E)))})),Kd=(0,a.forwardRef)(((e,t)=>(0,a.createElement)($d,l({direction:"up",ref:t},e)))),qd=(0,a.forwardRef)(((e,t)=>(0,a.createElement)($d,l({direction:"down",ref:t},e))));var Jd=(0,f.withSelect)(((e,t)=>{var n;let{clientIds:r}=t;const{getBlock:i,getBlockIndex:l,getBlockListSettings:a,canMoveBlocks:s,getBlockOrder:c,getBlockRootClientId:p}=e(qn),d=(0,u.castArray)(r),f=(0,u.first)(d),y=i(f),m=p((0,u.first)(d)),g=l(f),h=0===g,b=l((0,u.last)(d))===c(m).length-1;return{blockType:y?(0,o.getBlockType)(y.name):null,canMove:s(r,m),rootClientId:m,firstIndex:g,isFirst:h,isLast:b,orientation:null===(n=a(m))||void 0===n?void 0:n.orientation}}))((function(e){let{isFirst:t,isLast:n,clientIds:r,canMove:o,isHidden:i,rootClientId:s,orientation:u,hideDragHandle:p}=e;const[f,y]=(0,a.useState)(!1),g=()=>y(!0),h=()=>y(!1);if(!o||t&&n&&!s)return null;const b=(0,m.__)("Drag");return(0,a.createElement)("div",{className:c()("block-editor-block-mover",{"is-visible":f||!i,"is-horizontal":"horizontal"===u})},!p&&(0,a.createElement)(Rd,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(e=>(0,a.createElement)(d.Button,l({icon:yp,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:b,tabIndex:"-1"},e)))),(0,a.createElement)(d.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},(0,a.createElement)(d.ToolbarItem,{onFocus:g,onBlur:h},(e=>(0,a.createElement)(Kd,l({clientIds:r},e)))),(0,a.createElement)(d.ToolbarItem,{onFocus:g,onBlur:h},(e=>(0,a.createElement)(qd,l({clientIds:r},e))))))}));const{clearTimeout:Yd,setTimeout:Qd}=window,Xd=200;function Zd(e){let{ref:t,isFocused:n,debounceTimeout:r=Xd,onChange:o=u.noop}=e;const[i,l]=(0,a.useState)(!1),s=(0,a.useRef)(),c=e=>{null!=t&&t.current&&l(e),o(e)},p=()=>{const e=(null==t?void 0:t.current)&&t.current.matches(":hover");return!n&&!e},d=()=>{const e=s.current;e&&Yd&&Yd(e)};return(0,a.useEffect)((()=>()=>{c(!1),d()}),[]),{showMovers:i,debouncedShowMovers:e=>{e&&e.stopPropagation(),d(),i||c(!0)},debouncedHideMovers:e=>{e&&e.stopPropagation(),d(),s.current=Qd((()=>{p()&&c(!1)}),r)}}}function ef(e){let{ref:t,debounceTimeout:n=Xd,onChange:r=u.noop}=e;const[o,i]=(0,a.useState)(!1),{showMovers:l,debouncedShowMovers:s,debouncedHideMovers:c}=Zd({ref:t,debounceTimeout:n,isFocused:o,onChange:r}),p=(0,a.useRef)(!1),d=()=>(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement);return(0,a.useEffect)((()=>{const e=t.current,n=()=>{d()&&(i(!0),s())},r=()=>{d()||(i(!1),c())};return e&&!p.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),p.current=!0),()=>{e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,p,i,s,c]),{showMovers:l,gestures:{onMouseMove:s,onMouseLeave:c}}}function tf(){const{selectBlock:e,toggleBlockHighlight:t}=(0,f.useDispatch)(qn),{firstParentClientId:n,shouldHide:r,hasReducedUI:i}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientId:r,getSettings:i}=e(qn),{hasBlockSupport:l}=e(o.store),a=n(r()),s=a[a.length-1],c=t(s),u=(0,o.getBlockType)(c),p=i();return{firstParentClientId:s,shouldHide:!l(u,"__experimentalParentSelector",!0),hasReducedUI:p.hasReducedUI}}),[]),s=Td(n),c=(0,a.useRef)(),{gestures:u}=ef({ref:c,onChange(e){e&&i||t(n,e)}});return r||void 0===n?null:(0,a.createElement)("div",l({className:"block-editor-block-parent-selector",key:n,ref:c},u),(0,a.createElement)(d.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(n),label:(0,m.sprintf)((0,m.__)("Select %s"),s.title),showTooltip:!0,icon:(0,a.createElement)(Nc,{icon:s.icon})}))}var nf=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function rf(e){let{blocks:t}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(d.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,m.__)("Preview")),(0,a.createElement)(cp,{viewportWidth:500,blocks:t})))))}var of=e=>{let{className:t,possibleBlockTransformations:n,onSelect:r,blocks:i}=e;const[l,s]=(0,a.useState)();return(0,a.createElement)(d.MenuGroup,{label:(0,m.__)("Transform to"),className:t},l&&(0,a.createElement)(rf,{blocks:(0,o.switchToBlockType)(i,l)}),n.map((e=>{const{name:t,icon:n,title:i,isDisabled:l}=e;return(0,a.createElement)(d.MenuItem,{key:t,className:(0,o.getBlockMenuDefaultClassName)(t),onClick:e=>{e.preventDefault(),r(t)},disabled:l,onMouseLeave:()=>s(null),onMouseEnter:()=>s(t)},(0,a.createElement)(Nc,{icon:n,showColors:!0}),i)})))};var lf=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),af=window.wp.tokenList,sf=n.n(af);function cf(e,t,n){const r=new(sf())(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}function uf(e){return(0,u.find)(e,"isDefault")}function pf(e){let{clientId:t,onSwitch:n}=e;const{styles:r,block:i,blockType:l,className:s}=(0,f.useSelect)((e=>{const{getBlock:n}=e(qn),r=n(t);if(!r)return{};const i=(0,o.getBlockType)(r.name),{getBlockStyles:l}=e(o.store);return{block:r,blockType:i,styles:l(r.name),className:r.attributes.className||""}}),[t]),{updateBlockAttributes:c}=(0,f.useDispatch)(qn),p=function(e){return e&&0!==e.length?uf(e)?e:[{name:"default",label:(0,m._x)("Default","block style"),isDefault:!0},...e]:[]}(r),d=function(e,t){for(const n of new(sf())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,u.find)(e,{name:t});if(r)return r}return(0,u.find)(e,"isDefault")}(p,s),y=function(e,t){return(0,a.useMemo)((()=>{const n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?(0,o.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,o.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(i,l);return{onSelect:e=>{const r=cf(s,d,e);c(t,{className:r}),n()},stylesToRender:p,activeStyle:d,genericPreviewBlock:y,className:s}}function df(e){let{clientId:t,onSwitch:n=u.noop}=e;const{onSelect:r,stylesToRender:o,activeStyle:i}=pf({clientId:t,onSwitch:n});return o&&0!==o.length?(0,a.createElement)(a.Fragment,null,o.map((e=>{const t=e.label||e.name;return(0,a.createElement)(d.MenuItem,{key:e.name,icon:i.name===e.name?lf:null,onClick:()=>r(e)},(0,a.createElement)(d.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0},t))}))):null}function ff(e){let{hoveredBlock:t,onSwitch:n}=e;const{clientId:r}=t;return(0,a.createElement)(d.MenuGroup,{label:(0,m.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},(0,a.createElement)(df,{clientId:r,onSwitch:n}))}const yf=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const{clientId:r,name:o,innerBlocks:i=[]}=e;if(!n.has(r)){if(o===t)return e;for(const e of i){const r=yf(e,t,n);if(r)return r}}},mf=(e,t)=>{const n=((e,t)=>{const n=(0,o.__experimentalGetBlockAttributesNamesByRole)(e,"content");return null!=n&&n.length?n.reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{}):t})(t.name,t.attributes);e.attributes={...e.attributes,...n}};var gf=(e,t)=>(0,a.useMemo)((()=>e.reduce(((e,n)=>{const r=((e,t)=>{const n=t.map((e=>(0,o.cloneBlock)(e))),r=new Set;for(const t of e){let e=!1;for(const o of n){const n=yf(o,t.name,r);if(n){e=!0,r.add(n.clientId),mf(n,t);break}}if(!e)return}return n})(t,n.blocks);return r&&e.push({...n,transformedBlocks:r}),e}),[])),[e,t]);function hf(e){let{patterns:t,onSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},(0,a.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},(0,a.createElement)(d.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview"},(0,a.createElement)("div",{className:"block-editor-block-switcher__preview-title"},(0,m.__)("Preview")),(0,a.createElement)(bf,{patterns:t,onSelect:n})))))}function bf(e){let{patterns:t,onSelect:n}=e;const r=(0,d.__unstableUseCompositeState)();return(0,a.createElement)(d.__unstableComposite,l({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,m.__)("Patterns list")}),t.map((e=>(0,a.createElement)(vf,{key:e.name,pattern:e,onSelect:n,composite:r}))))}function vf(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-switcher__preview-patterns-container",i=(0,p.useInstanceId)(vf,`${o}-list__item-description`);return(0,a.createElement)("div",{className:`${o}-list__list-item`,"aria-label":t.title,"aria-describedby":t.description?i:void 0},(0,a.createElement)(d.__unstableCompositeItem,l({role:"option",as:"div"},r,{className:`${o}-list__item`,onClick:()=>n(t.transformedBlocks)}),(0,a.createElement)(cp,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),(0,a.createElement)("div",{className:`${o}-list__item-title`},t.title)),!!t.description&&(0,a.createElement)(d.VisuallyHidden,{id:i},t.description))}var _f=function(e){let{blocks:t,patterns:n,onSelect:r}=e;const[o,i]=(0,a.useState)(!1),l=gf(n,t);return l.length?(0,a.createElement)(d.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},o&&(0,a.createElement)(hf,{patterns:l,onSelect:r}),(0,a.createElement)(d.MenuItem,{onClick:e=>{e.preventDefault(),i(!o)},icon:Ud},(0,m.__)("Patterns"))):null};const kf=e=>{let{clientIds:t,blocks:n}=e;const{replaceBlocks:r}=(0,f.useDispatch)(qn),i=Td(n[0].clientId),{possibleBlockTransformations:l,canRemove:s,hasBlockStyles:c,icon:p,blockTitle:y,patterns:g}=(0,f.useSelect)((e=>{var r;const{getBlockRootClientId:l,getBlockTransformItems:a,__experimentalGetPatternTransformItems:s}=e(qn),{getBlockStyles:c,getBlockType:p}=e(o.store),{canRemoveBlocks:d}=e(qn),f=l((0,u.castArray)(t)[0]),[{name:y}]=n,m=1===n.length,g=m&&c(y);let h;if(m)h=null==i?void 0:i.icon;else{var b;h=1===(0,u.uniq)(n.map((e=>{let{name:t}=e;return t}))).length?null===(b=p(y))||void 0===b?void 0:b.icon:nf}return{possibleBlockTransformations:a(n,f),canRemove:d(t,f),hasBlockStyles:!(null==g||!g.length),icon:h,blockTitle:null===(r=p(y))||void 0===r?void 0:r.title,patterns:s(n,f)}}),[t,n,null==i?void 0:i.icon]),h=1===n.length&&(0,o.isReusableBlock)(n[0]),b=1===n.length&&(0,o.isTemplatePart)(n[0]),v=!!l.length&&s,_=!(null==g||!g.length)&&s;if(!c&&!v)return(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(d.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:y,icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Nc,{icon:p,showColors:!0}),(h||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,a.createElement)(Nd,{clientId:t,maximumLength:35})))}));const k=y,E=1===n.length?(0,m.sprintf)((0,m.__)("%s: Change block type or style"),y):(0,m.sprintf)((0,m._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),S=c||v||_;return(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(d.ToolbarItem,null,(e=>(0,a.createElement)(d.DropdownMenu,{className:"block-editor-block-switcher",label:k,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Nc,{icon:p,className:"block-editor-block-switcher__toggle",showColors:!0}),(h||b)&&(0,a.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},(0,a.createElement)(Nd,{clientId:t,maximumLength:35}))),toggleProps:{describedBy:E,...e},menuProps:{orientation:"both"}},(e=>{let{onClose:i}=e;return S&&(0,a.createElement)("div",{className:"block-editor-block-switcher__container"},_&&(0,a.createElement)(_f,{blocks:n,patterns:g,onSelect:e=>{(e=>{r(t,e)})(e),i()}}),v&&(0,a.createElement)(of,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,blocks:n,onSelect:e=>{(e=>{r(t,(0,o.switchToBlockType)(n,e))})(e),i()}}),c&&(0,a.createElement)(ff,{hoveredBlock:n[0],onSwitch:i}))})))))};var Ef=e=>{let{clientIds:t}=e;const n=(0,f.useSelect)((e=>e(qn).getBlocksByClientId(t)),[t]);return!n.length||n.some((e=>!e))?null:(0,a.createElement)(kf,{clientIds:t,blocks:n})};const{Fill:Sf,Slot:wf}=(0,d.createSlotFill)("__unstableBlockToolbarLastItem");Sf.Slot=wf;var Af=Sf;var Cf=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),If=window.wp.blob;function xf(e,t){if(t&&1===(null==e?void 0:e.length)&&0===e[0].type.indexOf("image/")){var n;const e=/<\s*img\b/gi;return 1!==(null===(n=t.match(e))||void 0===n?void 0:n.length)}return!1}function Bf(){const{getBlockName:e}=(0,f.useSelect)(qn),{getBlockType:t}=(0,f.useSelect)(o.store),{createSuccessNotice:n}=(0,f.useDispatch)(xp.store);return(0,a.useCallback)(((r,o)=>{let i="";if(1===o.length){var l;const n=o[0],a=null===(l=t(e(n)))||void 0===l?void 0:l.title;i="copy"===r?(0,m.sprintf)((0,m.__)('Copied "%s" to clipboard.'),a):(0,m.sprintf)((0,m.__)('Moved "%s" to clipboard.'),a)}else i="copy"===r?(0,m.sprintf)((0,m._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):(0,m.sprintf)((0,m._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(i,{type:"snackbar"})}),[])}function Pf(){const{getBlocksByClientId:e,getSelectedBlockClientIds:t,hasMultiSelection:n,getSettings:r,__unstableIsFullySelected:i,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:s}=(0,f.useSelect)(qn),{flashBlock:c,removeBlocks:u,replaceBlocks:d,__unstableDeleteSelection:y,__unstableExpandSelection:m}=(0,f.useDispatch)(qn),g=Bf();return(0,p.useRefEffect)((p=>{function f(f){const h=t();if(0===h.length)return;if(!n()){const{target:e}=f,{ownerDocument:t}=e;if("copy"===f.type||"cut"===f.type?(0,Zo.documentHasUncollapsedSelection)(t):(0,Zo.documentHasSelection)(t))return}if(!p.contains(f.target.ownerDocument.activeElement))return;const b=f.defaultPrevented;f.preventDefault();const v=a(),_=l()||i(),k=!_&&!v;if("copy"===f.type||"cut"===f.type)if(1===h.length&&c(h[0]),k)m();else{let t;if(g(f.type,h),_)t=e(h);else{const[n,r]=s();t=[n,...e(h.slice(1,h.length-1)),r]}const n=(0,o.serialize)(t);f.clipboardData.setData("text/plain",n),f.clipboardData.setData("text/html",n)}if("cut"===f.type)_&&!k?u(h):y();else if("paste"===f.type){if(b)return;const{__experimentalCanUserUseUnfilteredHTML:e}=r(),{plainText:t,html:n}=function(e){let{clipboardData:t}=e,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}const o=(0,Zo.getFilesFromDataTransfer)(t).filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)}));return o.length&&!xf(o,r)&&(r=o.map((e=>``)).join(""),n=""),{html:r,plainText:n}}(f),i=(0,o.pasteHandler)({HTML:n,plainText:t,mode:"BLOCKS",canUserUseUnfilteredHTML:e});d(h,i,i.length-1,-1)}}return p.ownerDocument.addEventListener("copy",f),p.ownerDocument.addEventListener("cut",f),p.ownerDocument.addEventListener("paste",f),()=>{p.ownerDocument.removeEventListener("copy",f),p.ownerDocument.removeEventListener("cut",f),p.ownerDocument.removeEventListener("paste",f)}}),[])}var Tf=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:Pf()},t)};function Of(e){let{clientIds:t,children:n,__experimentalUpdateSelection:r}=e;const{canInsertBlockType:i,getBlockRootClientId:l,getBlocksByClientId:a,canMoveBlocks:s,canRemoveBlocks:c}=(0,f.useSelect)(qn),{getDefaultBlockName:p,getGroupingBlockName:d}=(0,f.useSelect)(o.store),y=a(t),m=l(t[0]),g=(0,u.every)(y,(e=>!!e&&(0,o.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m))),h=i(p(),m),b=s(t,m),v=c(t,m),{removeBlocks:_,replaceBlocks:k,duplicateBlocks:E,insertAfterBlock:S,insertBeforeBlock:w,flashBlock:A,setBlockMovingClientId:C,setNavigationMode:I,selectBlock:x}=(0,f.useDispatch)(qn),B=Bf();return n({canDuplicate:g,canInsertDefaultBlock:h,canMove:b,canRemove:v,rootClientId:m,blocks:y,onDuplicate:()=>E(t,r),onRemove:()=>_(t,r),onInsertBefore(){w((0,u.first)((0,u.castArray)(t)))},onInsertAfter(){S((0,u.last)((0,u.castArray)(t)))},onMoveTo(){I(!0),x(t[0]),C(t[0])},onGroup(){if(!y.length)return;const e=d(),n=(0,o.switchToBlockType)(y,e);n&&k(t,n)},onUngroup(){if(!y.length)return;const e=y[0].innerBlocks;e.length&&k(t,e)},onCopy(){const e=y.map((e=>{let{clientId:t}=e;return t}));1===y.length&&A(e[0]),B("copy",e)}})}var Nf=(0,p.compose)([(0,f.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlock:r,getBlockMode:i,getSettings:l}=e(qn),a=r(n),s=l().codeEditingEnabled;return{mode:i(n),blockType:a?(0,o.getBlockType)(a.name):null,isCodeEditingEnabled:s}})),(0,f.withDispatch)(((e,t)=>{let{onToggle:n=u.noop,clientId:r}=t;return{onToggleMode(){e(qn).toggleBlockMode(r),n()}}}))])((function(e){let{blockType:t,mode:n,onToggleMode:r,small:i=!1,isCodeEditingEnabled:l=!0}=e;if(!(0,o.hasBlockSupport)(t,"html",!0)||!l)return null;const s="visual"===n?(0,m.__)("Edit as HTML"):(0,m.__)("Edit visually");return(0,a.createElement)(d.MenuItem,{onClick:r},!i&&s)}));var Rf=(0,p.compose)((0,f.withSelect)(((e,t)=>{let{clientId:n}=t;const r=e(qn).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),(0,f.withDispatch)(((e,t)=>{let{block:n}=t;return{onClick:()=>e(qn).replaceBlocks(n.clientId,(0,o.rawHandler)({HTML:(0,o.getBlockContent)(n)}))}})))((function(e){let{shouldRender:t,onClick:n,small:r}=e;if(!t)return null;const o=(0,m.__)("Convert to Blocks");return(0,a.createElement)(d.MenuItem,{onClick:n},!r&&o)}));const{Fill:Ff,Slot:Mf}=(0,d.createSlotFill)("__unstableBlockSettingsMenuFirstItem");Ff.Slot=Mf;var Df=Ff;function Lf(e){let{clientIds:t,isGroupable:n,isUngroupable:r,blocksSelection:i,groupingBlockName:l,onClose:s=(()=>{})}=e;const{replaceBlocks:c}=(0,f.useDispatch)(qn);return n||r?(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(d.MenuItem,{onClick:()=>{(()=>{const e=(0,o.switchToBlockType)(i,l);e&&c(t,e)})(),s()}},(0,m._x)("Group","verb")),r&&(0,a.createElement)(d.MenuItem,{onClick:()=>{(()=>{const e=i[0].innerBlocks;e.length&&c(t,e)})(),s()}},(0,m._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function Uf(){const{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:i}=(0,f.useSelect)((e=>{var t;const{getBlockRootClientId:n,getBlocksByClientId:r,canInsertBlockType:i,getSelectedBlockClientIds:l}=e(qn),{getGroupingBlockName:a}=e(o.store),s=l(),c=a(),u=i(c,null!=s&&s.length?n(s[0]):void 0),p=r(s),d=1===p.length&&(null===(t=p[0])||void 0===t?void 0:t.name)===c;return{clientIds:s,isGroupable:u&&p.length,isUngroupable:d&&!!p[0].innerBlocks.length,blocksSelection:p,groupingBlockName:c}}),[]);return{clientIds:e,isGroupable:t,isUngroupable:n,blocksSelection:r,groupingBlockName:i}}var jf=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}));var Vf=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));function zf(e){return(0,f.useSelect)((t=>{const{canMoveBlock:n,canRemoveBlock:r,canLockBlockType:o,getBlockName:i,getBlockRootClientId:l}=t(qn),a=l(e),s=n(e,a),c=r(e,a);return{canMove:s,canRemove:c,canLock:o(i(e)),isLocked:!s||!c}}),[e])}function Gf(e){let{clientId:t,onClose:n}=e;const[r,o]=(0,a.useState)({move:!1,remove:!1}),{canMove:i,canRemove:l}=zf(t),{updateBlockAttributes:s}=(0,f.useDispatch)(qn),c=Td(t),u=(0,p.useInstanceId)(Gf,"block-editor-block-lock-modal__options-title");(0,a.useEffect)((()=>{o({move:!i,remove:!l})}),[i,l]);const y=Object.values(r).every(Boolean),g=Object.values(r).some(Boolean)&&!y;return(0,a.createElement)(d.Modal,{title:(0,m.sprintf)((0,m.__)("Lock %s"),c.title),overlayClassName:"block-editor-block-lock-modal",closeLabel:(0,m.__)("Close"),onRequestClose:n},(0,a.createElement)("form",{onSubmit:e=>{e.preventDefault(),s([t],{lock:r}),n()}},(0,a.createElement)("p",null,(0,m.__)("Choose specific attributes to restrict or lock all available options.")),(0,a.createElement)("div",{role:"group","aria-labelledby":u,className:"block-editor-block-lock-modal__options"},(0,a.createElement)(d.CheckboxControl,{className:"block-editor-block-lock-modal__options-title",label:(0,a.createElement)("span",{id:u},(0,m.__)("Lock all")),checked:y,indeterminate:g,onChange:e=>o({move:e,remove:e})}),(0,a.createElement)("ul",{className:"block-editor-block-lock-modal__checklist"},(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(d.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Disable movement"),(0,a.createElement)(d.Icon,{icon:r.move?Vf:jf})),checked:r.move,onChange:e=>o((t=>({...t,move:e})))})),(0,a.createElement)("li",{className:"block-editor-block-lock-modal__checklist-item"},(0,a.createElement)(d.CheckboxControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Prevent removal"),(0,a.createElement)(d.Icon,{icon:r.remove?Vf:jf})),checked:r.remove,onChange:e=>o((t=>({...t,remove:e})))})))),(0,a.createElement)(d.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1},(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(d.Button,{variant:"tertiary",onClick:n},(0,m.__)("Cancel"))),(0,a.createElement)(d.FlexItem,null,(0,a.createElement)(d.Button,{variant:"primary",type:"submit"},(0,m.__)("Apply"))))))}function Hf(e){let{clientId:t}=e;const{canLock:n,isLocked:r}=zf(t),[o,i]=(0,a.useReducer)((e=>!e),!1);if(!n)return null;const l=r?(0,m.__)("Unlock"):(0,m.__)("Lock");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.MenuItem,{icon:r?jf:Vf,onClick:i},l),o&&(0,a.createElement)(Gf,{clientId:t,onClose:i}))}const{Fill:Wf,Slot:$f}=(0,d.createSlotFill)("BlockSettingsMenuControls");function Kf(e){let{...t}=e;return(0,a.createElement)(d.__experimentalStyleProvider,{document:document},(0,a.createElement)(Wf,t))}Kf.Slot=e=>{let{fillProps:t,clientIds:n=null}=e;const{selectedBlocks:r,selectedClientIds:o,canRemove:i}=(0,f.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:r,canRemoveBlocks:o}=e(qn),i=null!==n?n:r();return{selectedBlocks:(0,u.map)((0,u.compact)(t(i)),(e=>e.name)),selectedClientIds:i,canRemove:o(i)}}),[n]),s=1===o.length,c=Uf(),{isGroupable:p,isUngroupable:y}=c,m=(p||y)&&i;return(0,a.createElement)($f,{fillProps:{...t,selectedBlocks:r,selectedClientIds:o}},(e=>!(null!=e&&e.length)>0&&!m&&!s?null:(0,a.createElement)(d.MenuGroup,null,s&&(0,a.createElement)(Hf,{clientId:o[0]}),e,m&&(0,a.createElement)(Lf,l({},c,{onClose:null==t?void 0:t.onClose})))))};var qf=Kf;const Jf={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function Yf(e){let{blocks:t,onCopy:n}=e;const r=(0,p.useCopyToClipboard)((()=>(0,o.serialize)(t)),n);return(0,a.createElement)(d.MenuItem,{ref:r},(0,m.__)("Copy"))}var Qf=function(e){let{clientIds:t,__experimentalSelectBlock:n,children:r,...i}=e;const s=(0,u.castArray)(t),c=s.length,p=s[0],{firstParentClientId:y,hasReducedUI:g,onlyBlock:h,parentBlockType:b,previousBlockClientId:v,nextBlockClientId:_,selectedBlockClientIds:k}=(0,f.useSelect)((e=>{const{getBlockCount:t,getBlockName:n,getBlockParents:r,getPreviousBlockClientId:i,getNextBlockClientId:l,getSelectedBlockClientIds:a,getSettings:s}=e(qn),c=r(p),u=c[c.length-1],d=n(u);return{firstParentClientId:u,hasReducedUI:s().hasReducedUI,onlyBlock:1===t(),parentBlockType:(0,o.getBlockType)(d),previousBlockClientId:i(p),nextBlockClientId:l(p),selectedBlockClientIds:a()}}),[p]),E=(0,f.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Hc.store);return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),{selectBlock:S,toggleBlockHighlight:w}=(0,f.useDispatch)(qn),A=(0,a.useCallback)(n?async e=>{const t=await e;t&&t[0]&&n(t[0])}:u.noop,[n]),C=Od(p,25),I=(0,a.useCallback)(n?()=>{const e=v||_;e&&k.includes(p)&&!k.includes(e)&&n(e)}:u.noop,[n,v,_,k]),x=(0,m.sprintf)((0,m.__)("Remove %s"),C),B=1===c?x:(0,m.__)("Remove blocks"),P=(0,a.useRef)(),{gestures:T}=ef({ref:P,onChange(e){e&&g||w(y,e)}});return(0,a.createElement)(Of,{clientIds:t,__experimentalUpdateSelection:!n},(e=>{let{canDuplicate:n,canInsertDefaultBlock:o,canMove:s,canRemove:f,onDuplicate:g,onInsertAfter:v,onInsertBefore:_,onRemove:k,onCopy:w,onMoveTo:C,blocks:x}=e;return(0,a.createElement)(d.DropdownMenu,l({icon:Cf,label:(0,m.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Jf,noIcons:!0},i),(e=>{let{onClose:i}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.MenuGroup,null,(0,a.createElement)(Df.Slot,{fillProps:{onClose:i}}),void 0!==y&&(0,a.createElement)(d.MenuItem,l({},T,{ref:P,icon:(0,a.createElement)(Nc,{icon:b.icon}),onClick:()=>S(y)}),(0,m.sprintf)((0,m.__)("Select parent block (%s)"),b.title)),1===c&&(0,a.createElement)(Rf,{clientId:p}),(0,a.createElement)(Yf,{blocks:x,onCopy:w}),n&&(0,a.createElement)(d.MenuItem,{onClick:(0,u.flow)(i,g,A),shortcut:E.duplicate},(0,m.__)("Duplicate")),o&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.MenuItem,{onClick:(0,u.flow)(i,_),shortcut:E.insertBefore},(0,m.__)("Insert before")),(0,a.createElement)(d.MenuItem,{onClick:(0,u.flow)(i,v),shortcut:E.insertAfter},(0,m.__)("Insert after"))),s&&!h&&(0,a.createElement)(d.MenuItem,{onClick:(0,u.flow)(i,C)},(0,m.__)("Move to")),1===c&&(0,a.createElement)(Nf,{clientId:p,onToggle:i})),(0,a.createElement)(qf.Slot,{fillProps:{onClose:i},clientIds:t}),"function"==typeof r?r({onClose:i}):a.Children.map((e=>(0,a.cloneElement)(e,{onClose:i}))),f&&(0,a.createElement)(d.MenuGroup,null,(0,a.createElement)(d.MenuItem,{onClick:(0,u.flow)(i,k,I),shortcut:E.remove},B)))}))}))};var Xf=function(e){let{clientIds:t,...n}=e;return(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(d.ToolbarItem,null,(e=>(0,a.createElement)(Qf,l({clientIds:t,toggleProps:e},n)))))};function Zf(e){let{clientId:t}=e;const n=Td(t),{canMove:r,canRemove:o,canLock:i}=zf(t),[l,s]=(0,a.useReducer)((e=>!e),!1);return i?r&&o?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ToolbarGroup,{className:"block-editor-block-lock-toolbar"},(0,a.createElement)(d.ToolbarButton,{icon:Vf,label:(0,m.sprintf)((0,m.__)("Unlock %s"),n.title),onClick:s})),l&&(0,a.createElement)(Gf,{clientId:t,onClose:s})):null}var ey=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z"}));var ty=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z"}));var ny=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z"}));const ry={group:void 0,row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"}};var oy=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:r}=Uf(),{replaceBlocks:i}=(0,f.useDispatch)(qn),{canRemove:l}=(0,f.useSelect)((e=>{const{canRemoveBlocks:n}=e(qn);return{canRemove:n(t)}}),[t]),s=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"group";const l=(0,o.switchToBlockType)(e,n);l&&l.length>0&&(l[0].attributes.layout=ry[r],i(t,l))};return r&&l?(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(d.ToolbarButton,{icon:ey,label:(0,m._x)("Group","verb"),onClick:s}),(0,a.createElement)(d.ToolbarButton,{icon:ty,label:(0,m._x)("Row","single horizontal line"),onClick:()=>s("row")}),(0,a.createElement)(d.ToolbarButton,{icon:ny,label:(0,m._x)("Stack","verb"),onClick:()=>s("stack")})):null};var iy=(0,a.createContext)("");var ly=e=>{let{hideDragHandle:t}=e;const{blockClientIds:n,blockClientId:r,blockType:i,hasFixedToolbar:s,hasReducedUI:u,isValid:y,isVisual:m}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getSelectedBlockClientIds:r,isBlockValid:i,getBlockRootClientId:l,getSettings:a}=e(qn),s=r(),c=s[0],u=l(c),p=a();return{blockClientIds:s,blockClientId:c,blockType:c&&(0,o.getBlockType)(t(c)),hasFixedToolbar:p.hasFixedToolbar,hasReducedUI:p.hasReducedUI,rootClientId:u,isValid:s.every((e=>i(e))),isVisual:s.every((e=>"visual"===n(e)))}}),[]),{toggleBlockHighlight:g}=(0,f.useDispatch)(qn),h=(0,a.useRef)(),{showMovers:b,gestures:v}=ef({ref:h,onChange(e){e&&u||g(r,e)}}),_=(0,p.useViewportMatch)("medium","<")||s;if(i&&!(0,o.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;const k=_||b;if(0===n.length)return null;const E=y&&m,S=n.length>1,w=c()("block-editor-block-toolbar",k&&"is-showing-movers");return(0,a.createElement)("div",{className:w},!S&&!_&&(0,a.createElement)(tf,{clientIds:n}),(0,a.createElement)("div",l({ref:h},v),(E||S)&&(0,a.createElement)(d.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},(0,a.createElement)(Ef,{clientIds:n}),!S&&(0,a.createElement)(Zf,{clientId:n[0]}),(0,a.createElement)(Jd,{clientIds:n,hideDragHandle:t||u}))),E&&S&&(0,a.createElement)(oy,null),E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(or.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(or.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(or.Slot,{className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(or.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(or.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,a.createElement)(iy.Provider,{value:null==i?void 0:i.name},(0,a.createElement)(Af.Slot,null))),(0,a.createElement)(Xf,{clientIds:n}))};var ay=function(e){let{focusOnMount:t,isFixed:n,...r}=e;const{blockType:i,hasParents:s,showParentSelector:u}=(0,f.useSelect)((e=>{const{getBlockName:t,getBlockParents:n,getSelectedBlockClientIds:r}=e(qn),{getBlockType:i}=e(o.store),l=r(),a=l[0],s=n(a),c=i(t(s[s.length-1]));return{blockType:a&&i(t(a)),hasParents:s.length,showParentSelector:(0,o.hasBlockSupport)(c,"__experimentalParentSelector",!0)&&l.length<=1}}),[]);if(i&&!(0,o.hasBlockSupport)(i,"__experimentalToolbar",!0))return null;const p=c()("block-editor-block-contextual-toolbar",{"has-parent":s&&u,"is-fixed":n});return(0,a.createElement)(Ld,l({focusOnMount:t,className:p,"aria-label":(0,m.__)("Block tools")},r),(0,a.createElement)(ly,{hideDragHandle:n}))};function sy(e){const{isNavigationMode:t,isMultiSelecting:n,hasMultiSelection:r,isTyping:o,isCaretWithinFormattedText:i,getSettings:l,getLastMultiSelectedBlockClientId:a}=e(qn);return{isNavigationMode:t(),isMultiSelecting:n(),isTyping:o(),isCaretWithinFormattedText:i(),hasMultiSelection:r(),hasFixedToolbar:l().hasFixedToolbar,lastClientId:a()}}function cy(e){let{clientId:t,rootClientId:n,isValid:r,isEmptyDefaultBlock:o,capturingClientId:i,__unstablePopoverSlot:l,__unstableContentRef:s}=e;const{isNavigationMode:u,isMultiSelecting:y,isTyping:m,isCaretWithinFormattedText:g,hasMultiSelection:h,hasFixedToolbar:b,lastClientId:v}=(0,f.useSelect)(sy,[]),_=(0,f.useSelect)((e=>{const{isBlockInsertionPointVisible:n,getBlockInsertionPoint:r,getBlockOrder:o}=e(qn);if(!n())return!1;const i=r();return o(i.rootClientId)[i.index]===t}),[t]),k=(0,p.useViewportMatch)("medium"),[E,S]=(0,a.useState)(!1),[w,A]=(0,a.useState)(!1),{stopTyping:C}=(0,f.useDispatch)(qn),I=!m&&!u&&o&&r,x=u,B=!u&&!b&&k&&!I&&!y&&(!m||g),P=!(u||B||b||o);(0,Hc.useShortcut)("core/block-editor/focus-toolbar",(()=>{S(!0),C(!0)}),{isDisabled:!P}),(0,a.useEffect)((()=>{B||S(!1)}),[B]);const T=(0,a.useRef)(),O=Er(t),N=Er(v),R=Er(i),F=wd(s);if(!(x||B||E||I))return null;let M=O;if(!M)return null;i&&(M=R);let D=M;if(h){if(!N)return null;D={top:M,bottom:N}}const L=I?"top left right":"top right left",{ownerDocument:U}=M,j=I?void 0:U.defaultView.frameElement||(0,Zo.getScrollContainer)(M)||U.body;return(0,a.createElement)(d.Popover,{ref:F,noArrow:!0,animate:!1,position:L,focusOnMount:!1,anchorRef:D,className:c()("block-editor-block-list__block-popover",{"is-insertion-point-visible":_}),__unstableStickyBoundaryElement:j,__unstableSlotName:l||null,__unstableBoundaryParent:!0,__unstableObserveElement:M,shouldAnchorIncludePadding:!0,__unstableEditorCanvasWrapper:null==s?void 0:s.current},(B||E)&&(0,a.createElement)("div",{onFocus:function(){A(!0)},onBlur:function(){A(!1)},tabIndex:-1,className:c()("block-editor-block-list__block-popover-inserter",{"is-visible":w})},(0,a.createElement)(bd,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(B||E)&&(0,a.createElement)(ay,{focusOnMount:E,__experimentalInitialIndex:T.current,__experimentalOnIndexChange:e=>{T.current=e},key:t}),x&&(0,a.createElement)(Fd,{clientId:t,rootClientId:n,blockElement:M}),I&&(0,a.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},(0,a.createElement)(bd,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function uy(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlockRootClientId:r,getBlock:i,getBlockParents:l,__experimentalGetBlockListSettingsForBlocks:a}=e(qn),s=t()||n();if(!s)return;const{name:c,attributes:p={},isValid:d}=i(s)||{},f=l(s),y=a(f),m=(0,u.find)(f,(e=>{var t;return null===(t=y[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:s,rootClientId:r(s),name:c,isValid:d,isEmptyDefaultBlock:c&&(0,o.isUnmodifiedDefaultBlock)({name:c,attributes:p}),capturingClientId:m}}function py(e){let{__unstablePopoverSlot:t,__unstableContentRef:n}=e;const r=(0,f.useSelect)(uy,[]);if(!r)return null;const{clientId:o,rootClientId:i,name:l,isValid:s,isEmptyDefaultBlock:c,capturingClientId:u}=r;return l?(0,a.createElement)(cy,{clientId:o,rootClientId:i,isValid:s,isEmptyDefaultBlock:c,capturingClientId:u,__unstablePopoverSlot:t,__unstableContentRef:n}):null}function dy(e){let{children:t}=e;const n=(0,a.useContext)(Ad),r=(0,a.useContext)(d.Disabled.Context);return n||r?t:(jt()('wp.components.Popover.Slot name="block-toolbar"',{alternative:"wp.blockEditor.BlockTools",since:"5.8"}),(0,a.createElement)(Id,{__unstablePopoverSlot:"block-toolbar"},(0,a.createElement)(py,{__unstablePopoverSlot:"block-toolbar"}),t))}var fy=(0,p.createHigherOrderComponent)((e=>t=>{const{clientId:n}=Xn();return(0,a.createElement)(e,l({},t,{clientId:n}))}),"withClientId");var yy=fy((e=>{let{clientId:t,showSeparator:n,isFloating:r,onAddBlock:o,isToggle:i}=e;return(0,a.createElement)(Ed,{className:c()({"block-list-appender__toggle":i}),rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})}));var my=(0,p.compose)([fy,(0,f.withSelect)(((e,t)=>{let{clientId:n}=t;const{getBlockOrder:r}=e(qn),o=r(n);return{lastBlockClientId:(0,u.last)(o)}}))])((e=>{let{clientId:t}=e;return(0,a.createElement)(vd,{rootClientId:t})})),gy=window.wp.isShallowEqual,hy=n.n(gy);const by=new WeakMap;function vy(e,t,n,r,i,l,a){return s=>{const{srcRootClientId:c,srcClientIds:u,type:p,blocks:d}=function(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(s);if("inserter"===p){a();const n=d.map((e=>(0,o.cloneBlock)(e)));l(n,t,e,!0,null)}if("block"===p){const o=n(u[0]);if(c===e&&o===t)return;if(u.includes(e)||r(u).some((t=>t===e)))return;const l=c===e,a=u.length;i(u,c,e,l&&oe(qn).getSettings().mediaUpload),[]),{canInsertBlockType:r,getBlockIndex:i,getClientIdsOfDescendants:l}=(0,f.useSelect)(qn),{insertBlocks:a,moveBlocksToPosition:s,updateBlockAttributes:c,clearSelectedBlock:u}=(0,f.useDispatch)(qn),p=vy(e,t,i,l,s,a,u),d=function(e,t,n,r,i,l){return a=>{if(!n)return;const s=(0,o.findTransform)((0,o.getBlockTransforms)("from"),(t=>"files"===t.type&&i(t.blockName,e)&&t.isMatch(a)));if(s){const n=s.transform(a,r);l(n,t,e)}}}(e,t,n,c,r,a),y=function(e,t,n){return r=>{const i=(0,o.pasteHandler)({HTML:r,mode:"BLOCKS"});i.length&&n(i,t,e)}}(e,t,a);return e=>{const t=(0,Zo.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?y(n):t.length?d(t):p(e)}}function ky(e,t,n){const r="top"===n||"bottom"===n,{x:o,y:i}=e,l=r?o:i,a=r?i:o,s=r?t.left:t.top,c=r?t.right:t.bottom,u=t[n];let p;return p=l>=s&&l<=c?l:l2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((o=>{const i=ky(e,t,o);(void 0===n||i{const a=e.getBoundingClientRect(),[s,c]=Ey(t,a,r);if(void 0===l||s0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=(0,a.useState)(null),r=(0,f.useSelect)((t=>{const{getTemplateLock:n}=t(qn);return"all"===n(e)}),[e]),{getBlockListSettings:o}=(0,f.useSelect)(qn),{showInsertionPoint:i,hideInsertionPoint:l}=(0,f.useDispatch)(qn),s=_y(e,t),c=(0,p.useThrottle)((0,a.useCallback)(((t,r)=>{var l;const a=Sy(Array.from(r.children).filter((e=>e.classList.contains("wp-block"))),{x:t.clientX,y:t.clientY},null===(l=o(e))||void 0===l?void 0:l.orientation);n(void 0===a?0:a),null!==a&&i(e,a)}),[]),200);return(0,p.__experimentalUseDropZone)({isDisabled:r,onDrop:s,onDragOver(e){c(e,e.currentTarget)},onDragLeave(){c.cancel(),l(),n(null)},onDragEnd(){c.cancel(),l(),n(null)}})}function Ay(e){const{clientId:t,allowedBlocks:n,__experimentalDefaultBlock:r,__experimentalDirectInsert:i,template:l,templateLock:s,wrapperRef:c,templateInsertUpdatesSelection:p,__experimentalCaptureToolbars:d,__experimentalAppenderTagName:y,renderAppender:m,orientation:g,placeholder:h,__experimentalLayout:b}=e;!function(e,t,n,r,o,i,l,s){const{updateBlockListSettings:c}=(0,f.useDispatch)(qn),{blockListSettings:u,parentLock:p}=(0,f.useSelect)((t=>{const n=t(qn).getBlockRootClientId(e);return{blockListSettings:t(qn).getBlockListSettings(e),parentLock:t(qn).getTemplateLock(n)}}),[e]),d=(0,a.useMemo)((()=>t),t);(0,a.useLayoutEffect)((()=>{const t={allowedBlocks:d,templateLock:void 0===o?p:o};if(void 0!==i&&(t.__experimentalCaptureToolbars=i),void 0!==l)t.orientation=l;else{const e=Io(null==s?void 0:s.type);t.orientation=e.getOrientation(s)}void 0!==n&&(t.__experimentalDefaultBlock=n),void 0!==r&&(t.__experimentalDirectInsert=r),hy()(u,t)||c(e,t)}),[e,u,d,n,r,o,p,i,l,c,s])}(t,n,r,i,s,d,g,b),function(e,t,n,r){const{getSelectedBlocksInitialCaretPosition:i}=(0,f.useSelect)(qn),{replaceInnerBlocks:l}=(0,f.useDispatch)(qn),s=(0,f.useSelect)((t=>t(qn).getBlocks(e)),[e]),c=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{if((0===s.length||"all"===n)&&!(0,u.isEqual)(t,c.current)){c.current=t;const n=(0,o.synchronizeBlocksWithTemplate)(s,t);(0,u.isEqual)(n,s)||l(e,n,0===s.length&&r&&0!==n.length,i())}}),[s,t,n,e])}(t,l,s,p);const v=(0,f.useSelect)((e=>{const n=e(qn).getBlock(t),r=(0,o.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){by.has(t)||by.set(t,new WeakMap);const n=by.get(t);if(!n.has(e)){const r=(0,u.mapValues)(t.providesContext,(t=>e[t]));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return(0,a.createElement)(ti,{value:v},(0,a.createElement)(Fy,{rootClientId:t,renderAppender:m,__experimentalAppenderTagName:y,__experimentalLayout:b,wrapperRef:c,placeholder:h}))}function Cy(e){return Fc(e),(0,a.createElement)(Ay,e)}const Iy=(0,a.forwardRef)(((e,t)=>{const n=xy({ref:t},e);return(0,a.createElement)("div",{className:"block-editor-inner-blocks"},(0,a.createElement)("div",n))}));function xy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n}=Xn(),r=(0,p.useViewportMatch)("medium","<"),{__experimentalCaptureToolbars:i,hasOverlay:s}=(0,f.useSelect)((e=>{if(!n)return{};const{getBlockName:t,isBlockSelected:i,hasSelectedInnerBlock:l,isNavigationMode:a}=e(qn),s=t(n),c=a()||r;return{__experimentalCaptureToolbars:e(o.store).hasBlockSupport(s,"__experimentalExposeControlsToChildren",!1),hasOverlay:"core/template"!==s&&!i(n)&&!l(n,!0)&&c}}),[n,r]),u=(0,p.useMergeRefs)([e.ref,wy({rootClientId:n})]),d={__experimentalCaptureToolbars:i,...t},y=d.value&&d.onChange?Cy:Ay;return{...e,ref:u,className:c()(e.className,"block-editor-block-list__layout",{"has-overlay":s}),children:n?(0,a.createElement)(y,l({},d,{clientId:n})):(0,a.createElement)(Fy,t)}}xy.save=o.__unstableGetInnerBlocksProps,Iy.DefaultBlockAppender=my,Iy.ButtonBlockAppender=yy,Iy.Content=()=>xy.save().children;var By=Iy;const Py=(0,a.createContext)(),Ty=(0,a.createContext)();function Oy(e){let{className:t,...n}=e;const[r,o]=(0,a.useState)(),i=(0,p.useViewportMatch)("medium"),{isOutlineMode:l,isFocusMode:s,isNavigationMode:u}=(0,f.useSelect)((e=>{const{getSettings:t,isNavigationMode:n}=e(qn),{outlineMode:r,focusMode:o}=t();return{isOutlineMode:r,isFocusMode:o,isNavigationMode:n()}}),[]),d=xy({ref:(0,p.useMergeRefs)([Lc(),xd(),o]),className:c()("is-root-container",t,{"is-outline-mode":l,"is-focus-mode":s&&i,"is-navigate-mode":u})},n);return(0,a.createElement)(Py.Provider,{value:r},(0,a.createElement)("div",d))}function Ny(e){return function(){const e=(0,f.useSelect)((e=>e(qn).getSettings().__experimentalBlockPatterns),[]);(0,a.useEffect)((()=>{if(null==e||!e.length)return;let t,n=-1;const r=()=>{n++,n>=e.length||((0,f.select)(qn).__experimentalGetParsedPattern(e[n].name),t=Bd(r))};return t=Bd(r),()=>Pd(t)}),[e])}(),(0,a.createElement)(dy,null,(0,a.createElement)(Qn,{value:Jn},(0,a.createElement)(Oy,e)))}function Ry(e){let{placeholder:t,rootClientId:n,renderAppender:r,__experimentalAppenderTagName:o,__experimentalLayout:i=xo}=e;const[l,s]=(0,a.useState)(new Set),c=(0,a.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{s((t=>{const n=new Set(t);for(const t of e){const e=t.target.getAttribute("data-block");n[t.isIntersecting?"add":"delete"](e)}return n}))}))}),[s]),{order:u,selectedBlocks:p}=(0,f.useSelect)((e=>{const{getBlockOrder:t,getSelectedBlockClientIds:r}=e(qn);return{order:t(n),selectedBlocks:r()}}),[n]);return(0,a.createElement)(Po,{value:i},(0,a.createElement)(Ty.Provider,{value:c},u.map((e=>(0,a.createElement)(f.AsyncModeProvider,{key:e,value:!l.has(e)&&!p.includes(e)},(0,a.createElement)(Ic,{rootClientId:n,clientId:e}))))),u.length<1&&t,(0,a.createElement)(Sd,{tagName:o,rootClientId:n,renderAppender:r}))}function Fy(e){return(0,a.createElement)(f.AsyncModeProvider,{value:!1},(0,a.createElement)(Ry,e))}Ny.__unstableElementContext=Py;const My=["colors","disableCustomColors","gradients","disableCustomGradients"];function Dy(e){let{colors:t,gradients:n,disableCustomColors:r,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,className:s,label:p,onColorChange:f,onGradientChange:y,colorValue:g,gradientValue:h,clearable:b,showTitle:v=!0,enableAlpha:_}=e;const k=f&&(!(0,u.isEmpty)(t)||!r),E=y&&(!(0,u.isEmpty)(n)||!o),[S,w]=(0,a.useState)(h?"gradient":!!k&&"color");return k||E?(0,a.createElement)(d.BaseControl,{className:c()("block-editor-color-gradient-control",s)},(0,a.createElement)("fieldset",{className:"block-editor-color-gradient-control__fieldset"},(0,a.createElement)(d.__experimentalVStack,{spacing:1},v&&(0,a.createElement)("legend",null,(0,a.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},(0,a.createElement)(d.BaseControl.VisualLabel,null,p))),k&&E&&(0,a.createElement)(d.__experimentalToggleGroupControl,{value:S,onChange:w,label:(0,m.__)("Select color type"),hideLabelFromVision:!0,isBlock:!0},(0,a.createElement)(d.__experimentalToggleGroupControlOption,{value:"color",label:(0,m.__)("Solid")}),(0,a.createElement)(d.__experimentalToggleGroupControlOption,{value:"gradient",label:(0,m.__)("Gradient")})),("color"===S||!E)&&(0,a.createElement)(d.ColorPalette,{value:g,onChange:E?e=>{f(e),y()}:f,colors:t,disableCustomColors:r,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,clearable:b,enableAlpha:_}),("gradient"===S||!k)&&(0,a.createElement)(d.GradientPicker,{value:h,onChange:k?e=>{y(e),f()}:y,gradients:n,disableCustomGradients:o,__experimentalHasMultipleOrigins:i,__experimentalIsRenderedInSidebar:l,clearable:b})))):null}function Ly(e){const t={};return t.colors=Cr("color.palette"),t.gradients=Cr("color.gradients"),t.disableCustomColors=!Cr("color.custom"),t.disableCustomGradients=!Cr("color.customGradient"),(0,a.createElement)(Dy,l({},t,e))}var Uy=function(e){return(0,u.every)(My,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(Dy,e):(0,a.createElement)(Ly,e)};function jy(e){let t,{colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalHasMultipleOrigins:s,__experimentalIsRenderedInSidebar:u,enableAlpha:p,settings:f}=e;return u&&(t="bottom left"),(0,a.createElement)(d.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,className:"block-editor-panel-color-gradient-settings__item-group"},f.map(((e,f)=>e&&(0,a.createElement)(d.Dropdown,{key:f,position:t,className:"block-editor-panel-color-gradient-settings__dropdown",contentClassName:"block-editor-panel-color-gradient-settings__dropdown-content",renderToggle:t=>{var n;let{isOpen:r,onToggle:o}=t;return(0,a.createElement)(d.__experimentalItem,{onClick:o,className:c()("block-editor-panel-color-gradient-settings__item",{"is-open":r})},(0,a.createElement)(d.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(d.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:null!==(n=e.gradientValue)&&void 0!==n?n:e.colorValue}),(0,a.createElement)(d.FlexItem,null,e.label)))},renderContent:()=>(0,a.createElement)(Uy,l({showTitle:!1,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalHasMultipleOrigins:s,__experimentalIsRenderedInSidebar:u,enableAlpha:p},e))}))))}function Vy(){return{disableCustomColors:!Cr("color.custom"),disableCustomGradients:!Cr("color.customGradient")}}function zy(){const e=Vy(),t=Cr("color.palette.custom"),n=Cr("color.palette.theme"),r=Cr("color.palette.default"),o=Cr("color.defaultPalette");e.colors=(0,a.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,m._x)("Theme","Indicates this palette comes from the theme."),colors:n}),o&&r&&r.length&&e.push({name:(0,m._x)("Default","Indicates this palette comes from WordPress."),colors:r}),t&&t.length&&e.push({name:(0,m._x)("Custom","Indicates this palette comes from the theme."),colors:t}),e}),[r,n,t]);const i=Cr("color.gradients.custom"),l=Cr("color.gradients.theme"),s=Cr("color.gradients.default"),c=Cr("color.defaultGradients");return e.gradients=(0,a.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,m._x)("Theme","Indicates this palette comes from the theme."),gradients:l}),c&&s&&s.length&&e.push({name:(0,m._x)("Default","Indicates this palette comes from WordPress."),gradients:s}),i&&i.length&&e.push({name:(0,m._x)("Custom","Indicates this palette is created by the user."),gradients:i}),e}),[i,l,s]),e}Tu([Ou,Fu]);const Gy=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{color:n}},Hy=(e,t)=>(0,u.find)(e,{color:t});function Wy(e,t){if(e&&t)return`has-${(0,u.kebabCase)(t)}-${e}`}const $y=[];function Ky(e){const{attributes:{borderColor:t,style:n},setAttributes:r}=e,o=zy(),i=o.colors.reduce(((e,t)=>e.concat(t.colors)),[]),{color:s}=(null==n?void 0:n.border)||{},[c,u]=(0,a.useState)((()=>{var e;return null===(e=Gy(i,t,s))||void 0===e?void 0:e.color}));(0,a.useEffect)((()=>{var e;u(null===(e=Gy(i,t,s))||void 0===e?void 0:e.color)}),[t,s,i]);const p=[{label:(0,m.__)("Color"),onColorChange:e=>{u(e);const t=Hy(i,e),o={...n,border:{...null==n?void 0:n.border,color:null!=t&&t.slug?void 0:e}},l=null!=t&&t.slug?t.slug:void 0;r({style:Br(o),borderColor:l})},colorValue:c,clearable:!1}];return(0,a.createElement)(jy,l({settings:p,disableCustomColors:!0,disableCustomGradients:!0,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,enableAlpha:!0},o))}function qy(e,t,n){var r;if(!vm(t,"color")||Or(t,hm,"color"))return e;const{borderColor:o,style:i}=n,l=Wy("border-color",o),a=c()(e.className,{"has-border-color":o||(null==i||null===(r=i.border)||void 0===r?void 0:r.color),[l]:!!l});return e.className=a||void 0,e}const Jy=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const{name:o,attributes:i}=t,{borderColor:s}=i,c=Cr("color.palette")||$y;if(!vm(o,"color")||Or(o,hm,"color"))return(0,a.createElement)(e,t);const u={borderColor:s?null===(n=Gy(c,s))||void 0===n?void 0:n.color:void 0};let p=t.wrapperProps;return p={...t.wrapperProps,style:{...u,...null===(r=t.wrapperProps)||void 0===r?void 0:r.style}},(0,a.createElement)(e,l({},t,{wrapperProps:p}))}));function Yy(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function Qy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,d.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),r=t.map((e=>e[1])),o=n.every((e=>e===n[0]))?n[0]:"",i=Yy(r),l=0===o||o?`${o}${i}`:void 0;return l}function Xy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Qy(e),n="string"!=typeof e&&isNaN(parseFloat(t));return n}function Zy(e){if(!e)return!1;if("string"==typeof e)return!0;return!!Object.values(e).filter((e=>!!e||0===e)).length}function em(e){let{onChange:t,values:n,...r}=e;const o=Qy(n),i=Zy(n)&&Xy(n),s=i?(0,m.__)("Mixed"):null;return(0,a.createElement)(d.__experimentalUnitControl,l({},r,{"aria-label":(0,m.__)("Border radius"),disableUnits:i,isOnly:!0,value:o,onChange:t,placeholder:s}))}(0,i.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return vm(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/border/addSaveProps",qy),(0,i.addFilter)("blocks.registerBlockType","core/border/addEditProps",(function(e){if(!vm(e,"color")||Or(e,hm,"color"))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),qy(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/border/with-border-color-palette-styles",Jy);const tm={topLeft:(0,m.__)("Top left"),topRight:(0,m.__)("Top right"),bottomLeft:(0,m.__)("Bottom left"),bottomRight:(0,m.__)("Bottom right")};function nm(e){let{onChange:t,values:n,...r}=e;const o="string"!=typeof n?n:{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n};return(0,a.createElement)("div",{className:"components-border-radius-control__input-controls-wrapper"},Object.entries(tm).map((e=>{let[n,i]=e;return(0,a.createElement)(d.__experimentalUnitControl,l({},r,{key:n,"aria-label":i,value:o[n],onChange:(s=n,e=>{t&&t({...o,[s]:e||void 0})})}));var s})))}var rm=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));var om=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function im(e){let{isLinked:t,...n}=e;const r=t?(0,m.__)("Unlink Radii"):(0,m.__)("Link Radii");return(0,a.createElement)(d.Tooltip,{text:r},(0,a.createElement)(d.Button,l({},n,{className:"component-border-radius-control__linked-button",isPrimary:t,isSecondary:!t,isSmall:!0,icon:t?rm:om,iconSize:16,"aria-label":r})))}const lm={topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},am={px:100,em:20,rem:20};function sm(e){let{onChange:t,values:n}=e;const[r,o]=(0,a.useState)(!Zy(n)||!Xy(n)),i=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["px","em","rem"]}),l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"==typeof e){const[,t]=(0,d.__experimentalParseQuantityAndUnitFromRawValue)(e);return t||"px"}const t=Object.values(e).map((e=>{const[,t]=(0,d.__experimentalParseQuantityAndUnitFromRawValue)(e);return t}));return Yy(t)||"px"}(n),s=i&&i.find((e=>e.value===l)),c=(null==s?void 0:s.step)||1,[u]=(0,d.__experimentalParseQuantityAndUnitFromRawValue)(Qy(n));return(0,a.createElement)("fieldset",{className:"components-border-radius-control"},(0,a.createElement)("legend",null,(0,m.__)("Radius")),(0,a.createElement)("div",{className:"components-border-radius-control__wrapper"},r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(em,{className:"components-border-radius-control__unit-control",values:n,min:0,onChange:t,units:i}),(0,a.createElement)(d.RangeControl,{className:"components-border-radius-control__range-control",value:null!=u?u:"",min:0,max:am[l],initialPosition:0,withInputField:!1,onChange:e=>{t(void 0!==e?`${e}${l}`:void 0)},step:c})):(0,a.createElement)(nm,{min:0,onChange:t,values:n||lm,units:i}),(0,a.createElement)(im,{onClick:()=>o(!r),isLinked:r})))}function cm(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(sm,{values:null==n||null===(t=n.border)||void 0===t?void 0:t.radius,onChange:e=>{let t={...n,border:{...null==n?void 0:n.border,radius:e}};void 0!==e&&""!==e||(t=Br(t)),r({style:t})}})}var um=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,a.createElement)(D.Path,{d:"M5 11.25h14v1.5H5z"}));var pm=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,a.createElement)(D.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}));var dm=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,a.createElement)(D.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));const fm=[{label:(0,m.__)("Solid"),icon:um,value:"solid"},{label:(0,m.__)("Dashed"),icon:pm,value:"dashed"},{label:(0,m.__)("Dotted"),icon:dm,value:"dotted"}];function ym(e){let{onChange:t,value:n}=e;return(0,a.createElement)("fieldset",{className:"components-border-style-control"},(0,a.createElement)("legend",null,(0,m.__)("Style")),(0,a.createElement)("div",{className:"components-border-style-control__buttons"},fm.map((e=>(0,a.createElement)(d.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===n,onClick:()=>t(e.value===n?void 0:e.value),"aria-label":e.label})))))}const mm=e=>{var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(ym,{value:null==n||null===(t=n.border)||void 0===t?void 0:t.style,onChange:e=>{const t={...n,border:{...null==n?void 0:n.border,style:e}};r({style:Br(t)})}})};const gm=e=>{const{attributes:{borderColor:t,style:n},setAttributes:r}=e,{width:o,color:i,style:l}=(null==n?void 0:n.border)||{},[s,c]=(0,a.useState)(),[u,p]=(0,a.useState)(),[f,y]=(0,a.useState)(),g=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["px","em","rem"]});return(0,a.createElement)(d.__experimentalUnitControl,{value:o,label:(0,m.__)("Width"),min:0,onChange:e=>{let a={...n,border:{...null==n?void 0:n.border,width:e}},d=t;const m=0===parseFloat(e),g=0===parseFloat(o);m&&!g&&(p(t),y(i),c(l),d=void 0,a.border.color=void 0,a.border.style="none"),!m&&g&&("none"===l&&(a.border.style=s),void 0===t&&(d=u,a.border.color=f)),void 0!==e&&""!==e||(a=Br(a)),r({borderColor:d,style:a})},units:g})};const hm="__experimentalBorder";function bm(e){const{clientId:t}=e,n=Cr("border.color")&&vm(e.name,"color"),r=Cr("border.radius")&&vm(e.name,"radius"),i=Cr("border.style")&&vm(e.name,"style"),l=Cr("border.width")&&vm(e.name,"width");if([!n,!r,!i,!l].every(Boolean))return null;const s=(0,o.getBlockSupport)(e.name,[hm,"__experimentalDefaultControls"]),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{var r;return{...n,...t,style:{...n.style,border:{...null===(r=n.style)||void 0===r?void 0:r.border,[e]:void 0}}}}};return(0,a.createElement)(Lr,{__experimentalGroup:"border"},l&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.width)}(e),label:(0,m.__)("Width"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:_m(r,"width")})}(e),isShownByDefault:null==s?void 0:s.width,resetAllFilter:c("width"),panelId:t},(0,a.createElement)(gm,e)),i&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n||!n.style)}(e),label:(0,m.__)("Style"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:_m(r,"style")})}(e),isShownByDefault:null==s?void 0:s.style,resetAllFilter:c("style"),panelId:t},(0,a.createElement)(mm,e)),n&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{attributes:{borderColor:n,style:r}}=e;return!!n||!(null==r||null===(t=r.border)||void 0===t||!t.color)}(e),label:(0,m.__)("Color"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({borderColor:void 0,style:_m(r,"color")})}(e),isShownByDefault:null==s?void 0:s.color,resetAllFilter:c("color",{borderColor:void 0}),panelId:t},(0,a.createElement)(Ky,e)),r&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t,n;const r=null===(t=e.attributes.style)||void 0===t||null===(n=t.border)||void 0===n?void 0:n.radius;return"object"==typeof r?Object.entries(r).some(Boolean):!!r}(e),label:(0,m.__)("Radius"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:_m(r,"radius")})}(e),isShownByDefault:null==s?void 0:s.radius,resetAllFilter:c("radius"),panelId:t},(0,a.createElement)(cm,e)))}function vm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any";if("web"!==a.Platform.OS)return!1;const n=(0,o.getBlockSupport)(e,hm);return!0===n||("any"===t?!!(null!=n&&n.color||null!=n&&n.radius||null!=n&&n.width||null!=n&&n.style):!(null==n||!n[t]))}function _m(e,t){return Br({...e,border:{...null==e?void 0:e.border,[t]:void 0}})}function km(e){if(e)return`has-${e}-gradient-background`}function Em(e,t){const n=(0,u.find)(e,["slug",t]);return n&&n.gradient}function Sm(e,t){return(0,u.find)(e,["gradient",t])}function wm(e,t){const n=Sm(e,t);return n&&n.slug}function Am(){let{gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clientId:n}=Xn(),r=Cr("color.gradients.custom"),o=Cr("color.gradients.theme"),i=Cr("color.gradients.default"),l=(0,a.useMemo)((()=>[...r||[],...o||[],...i||[]]),[r,o,i]),{gradient:s,customGradient:c}=(0,f.useSelect)((r=>{const{getBlockAttributes:o}=r(qn),i=o(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:u}=(0,f.useDispatch)(qn),p=(0,a.useCallback)((r=>{const o=wm(l,r);u(n,o?{[e]:o,[t]:void 0}:{[e]:void 0,[t]:r})}),[l,n,u]),d=km(s);let y;return y=s?Em(l,s):c,{gradientClass:d,gradientValue:y,setGradient:p}}Tu([Ou,Fu]);var Cm=function(e){let{backgroundColor:t,fallbackBackgroundColor:n,fallbackTextColor:r,fallbackLinkColor:o,fontSize:i,isLargeText:l,textColor:s,linkColor:c,enableAlphaChecker:u=!1}=e;const p=t||n;if(!p)return null;const f=s||r,y=c||o;if(!f&&!y)return null;const g=[{color:f,description:(0,m.__)("text color")},{color:y,description:(0,m.__)("link color")}],h=Bu(p),b=h.alpha()<1,v=h.brightness(),_={level:"AA",size:l||!1!==l&&i>=24?"large":"small"};let k="",E="";for(const e of g){if(!e.color)continue;const t=Bu(e.color),n=t.isReadable(h,_),r=t.alpha()<1;if(!n){if(b||r)continue;k=v{let{isOpen:t,onToggle:r}=e;return(0,a.createElement)(d.Button,{onClick:r,"aria-expanded":t,className:c()("block-editor-panel-color-gradient-settings__dropdown",{"is-open":t})},(0,a.createElement)(d.__experimentalHStack,{justify:"flex-start"},(0,a.createElement)(d.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:s}),(0,a.createElement)(d.FlexItem,null,n.label)))},renderContent:()=>(0,a.createElement)(Uy,l({showTitle:!1,__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,enableAlpha:!0},i))}))}function xm(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function Bm(e){let{enableAlpha:t=!1,settings:n,clientId:r,enableContrastChecking:o=!0}=e;const[i,l]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,p]=(0,a.useState)(),d=kr(r);return(0,a.useEffect)((()=>{var e;if(!o)return;if(!d.current)return;c(xm(d.current).color);const t=null===(e=d.current)||void 0===e?void 0:e.querySelector("a");t&&t.innerText&&p(xm(t).color);let n=d.current,r=xm(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=xm(n).backgroundColor;l(r)})),(0,a.createElement)(Lr,{__experimentalGroup:"color"},n.map(((e,n)=>(0,a.createElement)(Im,{key:n,settings:e,panelId:r,enableAlpha:t}))),o&&(0,a.createElement)(Cm,{backgroundColor:i,textColor:s,enableAlphaChecker:t,linkColor:u}))}const Pm="color",Tm=e=>{const t=(0,o.getBlockSupport)(e,Pm);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Om=e=>{if("web"!==a.Platform.OS)return!1;const t=(0,o.getBlockSupport)(e,Pm);return(0,u.isObject)(t)&&!!t.link},Nm=e=>{const t=(0,o.getBlockSupport)(e,Pm);return(0,u.isObject)(t)&&!!t.gradients},Rm=e=>{const t=(0,o.getBlockSupport)(e,Pm);return t&&!1!==t.background},Fm=e=>{const t=(0,o.getBlockSupport)(e,Pm);return t&&!1!==t.text},Mm=e=>t=>{var n,r,o,i,l,a,s,c,u,p;return"background"===e?!!(t.attributes.backgroundColor||null!==(o=t.attributes.style)&&void 0!==o&&null!==(i=o.color)&&void 0!==i&&i.background||t.attributes.gradient||null!==(l=t.attributes.style)&&void 0!==l&&null!==(a=l.color)&&void 0!==a&&a.gradient):"link"===e?!(null===(s=t.attributes.style)||void 0===s||null===(c=s.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(p=u.color)||void 0===p||!p.text):!!t.attributes[`${e}Color`]||!(null===(n=t.attributes.style)||void 0===n||null===(r=n.color)||void 0===r||!r[e])},Dm=(e,t)=>Br(Pr(t,e,void 0)),Lm=e=>({textColor:void 0,style:Dm(["color","text"],e.style)}),Um=e=>({style:Dm(["elements","link","color","text"],e.style)}),jm=e=>{var t;return{backgroundColor:void 0,gradient:void 0,style:{...e.style,color:{...null===(t=e.style)||void 0===t?void 0:t.color,background:void 0,gradient:void 0}}}};function Vm(e,t,n){var r,o,i,l,a,s;if(!Tm(t)||Or(t,Pm))return e;const u=Nm(t),{backgroundColor:p,textColor:d,gradient:f,style:y}=n,m=e=>!Or(t,Pm,e),g=m("text")?Wy("color",d):void 0,h=m("gradients")?km(f):void 0,b=m("background")?Wy("background-color",p):void 0,v=m("background")||m("gradients"),_=p||(null==y||null===(r=y.color)||void 0===r?void 0:r.background)||u&&(f||(null==y||null===(o=y.color)||void 0===o?void 0:o.gradient)),k=c()(e.className,g,h,{[b]:!(u&&null!=y&&null!==(i=y.color)&&void 0!==i&&i.gradient||!b),"has-text-color":m("text")&&(d||(null==y||null===(l=y.color)||void 0===l?void 0:l.text)),"has-background":v&&_,"has-link-color":m("link")&&(null==y||null===(a=y.elements)||void 0===a||null===(s=a.link)||void 0===s?void 0:s.color)});return e.className=k||void 0,e}const zm=(e,t)=>{const n=/var:preset\|color\|(.+)/.exec(t);return n&&n[1]?Gy(e,n[1]).color:t};function Gm(e){var t,n,r,i,l,s,c,u,p;const{name:d,attributes:f}=e,y=Cr("color.palette.custom"),g=Cr("color.palette.theme"),h=Cr("color.palette.default"),b=(0,a.useMemo)((()=>[...y||[],...g||[],...h||[]]),[y,g,h]),v=Cr("color.gradients.custom"),_=Cr("color.gradients.theme"),k=Cr("color.gradients.default"),E=(0,a.useMemo)((()=>[...v||[],..._||[],...k||[]]),[v,_,k]),S=Cr("color.custom"),w=Cr("color.customGradient"),A=Cr("color.background"),C=Cr("color.link"),I=Cr("color.text"),x=S||!g||(null==g?void 0:g.length)>0,B=w||!_||(null==_?void 0:_.length)>0,P=(0,a.useRef)(f);if((0,a.useEffect)((()=>{P.current=f}),[f]),!Tm(d))return null;const T=Om(d)&&C&&x,O=Fm(d)&&I&&x,N=Rm(d)&&A&&x,R=Nm(d)&&B;if(!(T||O||N||R))return null;const{style:F,textColor:M,backgroundColor:D,gradient:L}=f;let U;if(R&&L)U=Em(E,L);else if(R){var j;U=null==F||null===(j=F.color)||void 0===j?void 0:j.gradient}const V=t=>n=>{var r,o;const i=Hy(b,n),l=t+"Color",a={...P.current.style,color:{...null===(r=P.current)||void 0===r||null===(o=r.style)||void 0===o?void 0:o.color,[t]:null!=i&&i.slug?void 0:n}},s=null!=i&&i.slug?i.slug:void 0,c={style:Br(a),[l]:s};e.setAttributes(c),P.current={...P.current,...c}},z=!("web"!==a.Platform.OS||L||null!=F&&null!==(t=F.color)&&void 0!==t&&t.gradient),G=(0,o.getBlockSupport)(e.name,[Pm,"__experimentalDefaultControls"]);return(0,a.createElement)(Bm,{enableContrastChecking:z,clientId:e.clientId,enableAlpha:!0,settings:[...O?[{label:(0,m.__)("Text"),onColorChange:V("text"),colorValue:Gy(b,M,null==F||null===(n=F.color)||void 0===n?void 0:n.text).color,isShownByDefault:null==G?void 0:G.text,hasValue:()=>Mm("text")(e),onDeselect:()=>(e=>{let{attributes:t,setAttributes:n}=e;n({textColor:void 0,style:Dm(["color","text"],t.style)})})(e),resetAllFilter:Lm}]:[],...N||R?[{label:(0,m.__)("Background"),onColorChange:N?V("background"):void 0,colorValue:Gy(b,D,null==F||null===(r=F.color)||void 0===r?void 0:r.background).color,gradientValue:U,onGradientChange:R?t=>{const n=wm(E,t);let r;if(n){var o,i,l;const e={...null===(o=P.current)||void 0===o?void 0:o.style,color:{...null===(i=P.current)||void 0===i||null===(l=i.style)||void 0===l?void 0:l.color,gradient:void 0}};r={style:Br(e),gradient:n}}else{var a,s,c;const e={...null===(a=P.current)||void 0===a?void 0:a.style,color:{...null===(s=P.current)||void 0===s||null===(c=s.style)||void 0===c?void 0:c.color,gradient:t}};r={style:Br(e),gradient:void 0}}e.setAttributes(r),P.current={...P.current,...r}}:void 0,isShownByDefault:null==G?void 0:G.background,hasValue:()=>Mm("background")(e),onDeselect:()=>(e=>{let{attributes:t,setAttributes:n}=e;n(jm(t))})(e),resetAllFilter:jm}]:[],...T?[{label:(0,m.__)("Link"),onColorChange:t=>{const n=Hy(b,t),r=null!=n&&n.slug?`var:preset|color|${n.slug}`:t,o=Br(Pr(F,["elements","link","color","text"],r));e.setAttributes({style:o})},colorValue:zm(b,null==F||null===(i=F.elements)||void 0===i||null===(l=i.link)||void 0===l||null===(s=l.color)||void 0===s?void 0:s.text),clearable:!(null==F||null===(c=F.elements)||void 0===c||null===(u=c.link)||void 0===u||null===(p=u.color)||void 0===p||!p.text),isShownByDefault:null==G?void 0:G.link,hasValue:()=>Mm("link")(e),onDeselect:()=>(e=>{let{attributes:t,setAttributes:n}=e;n({style:Dm(["elements","link","color","text"],t.style)})})(e),resetAllFilter:Um}]:[]]})}const Hm=(0,p.createHigherOrderComponent)((e=>t=>{var n;const{name:r,attributes:o}=t,{backgroundColor:i,textColor:s}=o,c=Cr("color.palette.custom")||[],u=Cr("color.palette.theme")||[],p=Cr("color.palette.default")||[],d=(0,a.useMemo)((()=>[...c||[],...u||[],...p||[]]),[c,u,p]);if(!Tm(r)||Or(r,Pm))return(0,a.createElement)(e,t);const f={};var y,m;s&&!Or(r,Pm,"text")&&(f.color=null===(y=Gy(d,s))||void 0===y?void 0:y.color);i&&!Or(r,Pm,"background")&&(f.backgroundColor=null===(m=Gy(d,i))||void 0===m?void 0:m.color);let g=t.wrapperProps;return g={...t.wrapperProps,style:{...f,...null===(n=t.wrapperProps)||void 0===n?void 0:n.style}},(0,a.createElement)(e,l({},t,{wrapperProps:g}))})),Wm={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};(0,i.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return Tm(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),Nm(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/color/addSaveProps",Vm),(0,i.addFilter)("blocks.registerBlockType","core/color/addEditProps",(function(e){if(!Tm(e)||Or(e,Pm))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),Vm(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/color/with-color-palette-styles",Hm),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,r){const o=e.name;return Tr({linkColor:Om(o),textColor:Fm(o),backgroundColor:Rm(o),gradient:Nm(o)},Wm,e,t,n,r)}));const $m=[{name:(0,m._x)("Regular","font style"),value:"normal"},{name:(0,m._x)("Italic","font style"),value:"italic"}],Km=[{name:(0,m._x)("Thin","font weight"),value:"100"},{name:(0,m._x)("Extra Light","font weight"),value:"200"},{name:(0,m._x)("Light","font weight"),value:"300"},{name:(0,m._x)("Regular","font weight"),value:"400"},{name:(0,m._x)("Medium","font weight"),value:"500"},{name:(0,m._x)("Semi Bold","font weight"),value:"600"},{name:(0,m._x)("Bold","font weight"),value:"700"},{name:(0,m._x)("Extra Bold","font weight"),value:"800"},{name:(0,m._x)("Black","font weight"),value:"900"}],qm=(e,t)=>e?t?(0,m.__)("Appearance"):(0,m.__)("Font style"):(0,m.__)("Font weight");function Jm(e){const{onChange:t,hasFontStyles:n=!0,hasFontWeights:r=!0,value:{fontStyle:o,fontWeight:i}}=e,l=n||r,s=qm(n,r),c={key:"default",name:(0,m.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},u=(0,a.useMemo)((()=>n&&r?(()=>{const e=[c];return $m.forEach((t=>{let{name:n,value:r}=t;Km.forEach((t=>{let{name:o,value:i}=t;const l="normal"===r?o:(0,m.sprintf)((0,m.__)("%1$s %2$s"),o,n);e.push({key:`${r}-${i}`,name:l,style:{fontStyle:r,fontWeight:i}})}))})),e})():n?(()=>{const e=[c];return $m.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:r,fontWeight:void 0}})})),e})():(()=>{const e=[c];return Km.forEach((t=>{let{name:n,value:r}=t;e.push({key:r,name:n,style:{fontStyle:void 0,fontWeight:r}})})),e})()),[e.options]),p=u.find((e=>e.style.fontStyle===o&&e.style.fontWeight===i))||u[0];return l&&(0,a.createElement)(d.CustomSelectControl,{className:"components-font-appearance-control",label:s,describedBy:p?n?r?(0,m.sprintf)((0,m.__)("Currently selected font appearance: %s"),p.name):(0,m.sprintf)((0,m.__)("Currently selected font style: %s"),p.name):(0,m.sprintf)((0,m.__)("Currently selected font weight: %s"),p.name):(0,m.__)("No selected font appearance"),options:u,value:p,onChange:e=>{let{selectedItem:n}=e;return t(n.style)}})}const Ym=1.5,Qm=.1;var Xm=e=>{let{value:t,onChange:n,__nextHasNoMarginBottom:r=!1,__unstableInputWidth:o="60px"}=e;const i=function(e){return void 0!==e&&""!==e}(t),l=i?t:"";r||jt()("Bottom margin styles for wp.blockEditor.LineHeightControl",{since:"6.0",version:"6.4",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"});const s=r?void 0:{marginBottom:24};return(0,a.createElement)("div",{className:"block-editor-line-height-control",style:s},(0,a.createElement)(d.__experimentalNumberControl,{__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{var n;const r=["insertText","insertFromPaste"].includes(null===(n=t.payload.event.nativeEvent)||void 0===n?void 0:n.inputType),o=((e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Ym;default:return e}})(e.value,r);return{...e,value:o}},onChange:n,label:(0,m.__)("Line height"),placeholder:Ym,step:Qm,value:l,min:0}))};const Zm="typography.lineHeight";function eg(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(Xm,{__unstableInputWidth:"100%",__nextHasNoMarginBottom:!0,value:null==n||null===(t=n.typography)||void 0===t?void 0:t.lineHeight,onChange:e=>{const t={...n,typography:{...null==n?void 0:n.typography,lineHeight:e}};r({style:Br(t)})}})}function tg(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Cr("typography.lineHeight");return!(0,o.hasBlockSupport)(e,Zm)||t}const ng="typography.__experimentalFontStyle",rg="typography.__experimentalFontWeight";function og(e){var t,n;const{attributes:{style:r},setAttributes:o}=e,i=!ig(e),l=!lg(e),s=null==r||null===(t=r.typography)||void 0===t?void 0:t.fontStyle,c=null==r||null===(n=r.typography)||void 0===n?void 0:n.fontWeight;return(0,a.createElement)(Jm,{onChange:e=>{o({style:Br({...r,typography:{...null==r?void 0:r.typography,fontStyle:e.fontStyle,fontWeight:e.fontWeight}})})},hasFontStyles:i,hasFontWeights:l,value:{fontStyle:s,fontWeight:c}})}function ig(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.hasBlockSupport)(e,ng),n=Cr("typography.fontStyle");return!t||!n}function lg(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.hasBlockSupport)(e,rg),n=Cr("typography.fontWeight");return!t||!n}function ag(e){const t=ig(e),n=lg(e);return t&&n}function sg(e){let{value:t="",onChange:n,fontFamilies:r,...o}=e;const i=Cr("typography.fontFamilies");if(r||(r=i),(0,u.isEmpty)(r))return null;const s=[{value:"",label:(0,m.__)("Default")},...r.map((e=>{let{fontFamily:t,name:n}=e;return{value:t,label:n||t}}))];return(0,a.createElement)(d.SelectControl,l({label:(0,m.__)("Font family"),options:s,value:t,onChange:n,labelPosition:"top"},o))}const cg="typography.__experimentalFontFamily";function ug(e,t,n){if(!(0,o.hasBlockSupport)(t,cg))return e;if(Or(t,zg,"fontFamily"))return e;if(null==n||!n.fontFamily)return e;const r=new(sf())(e.className);r.add(`has-${(0,u.kebabCase)(null==n?void 0:n.fontFamily)}-font-family`);const i=r.value;return e.className=i||void 0,e}function pg(e){var t;let{setAttributes:n,attributes:{fontFamily:r}}=e;const o=Cr("typography.fontFamilies"),i=null===(t=(0,u.find)(o,(e=>{let{slug:t}=e;return r===t})))||void 0===t?void 0:t.fontFamily;return(0,a.createElement)(sg,{className:"block-editor-hooks-font-family-control",fontFamilies:o,value:i,onChange:function(e){const t=(0,u.find)(o,(t=>{let{fontFamily:n}=t;return n===e}));n({fontFamily:null==t?void 0:t.slug})}})}function dg(e){let{name:t}=e;const n=Cr("typography.fontFamilies");return!n||0===n.length||!(0,o.hasBlockSupport)(t,cg)}(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,o.hasBlockSupport)(e,cg)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/fontFamily/addSaveProps",ug),(0,i.addFilter)("blocks.registerBlockType","core/fontFamily/addEditProps",(function(e){if(!(0,o.hasBlockSupport)(e,cg))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),ug(r,e,n)},e}));const fg=(e,t,n)=>{if(t){const n=(0,u.find)(e,{slug:t});if(n)return n}return{size:n}};function yg(e,t){const n=(0,u.find)(e,{size:t});return n||{size:t}}function mg(e){if(e)return`has-${(0,u.kebabCase)(e)}-font-size`}var gg=function(e){const t=Cr("typography.fontSizes"),n=!Cr("typography.customFontSize");return(0,a.createElement)(d.FontSizePicker,l({},e,{fontSizes:t,disableCustomFontSizes:n}))};const hg="typography.fontSize";function bg(e,t,n){if(!(0,o.hasBlockSupport)(t,hg))return e;if(Or(t,zg,"fontSize"))return e;const r=new(sf())(e.className);r.add(mg(n.fontSize));const i=r.value;return e.className=i||void 0,e}function vg(e){var t,n;const{attributes:{fontSize:r,style:o},setAttributes:i}=e,l=Cr("typography.fontSizes"),s=fg(l,r,null==o||null===(t=o.typography)||void 0===t?void 0:t.fontSize),c=(null==s?void 0:s.size)||(null==o||null===(n=o.typography)||void 0===n?void 0:n.fontSize)||r;return(0,a.createElement)(gg,{onChange:e=>{const t=yg(l,e).slug;i({style:Br({...o,typography:{...null==o?void 0:o.typography,fontSize:t?void 0:e}}),fontSize:t})},value:c,withReset:!1})}function _g(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Cr("typography.fontSizes"),n=!(null==t||!t.length);return!(0,o.hasBlockSupport)(e,hg)||!n}const kg=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const i=Cr("typography.fontSizes"),{name:l,attributes:{fontSize:s,style:c},wrapperProps:u}=t;if(!(0,o.hasBlockSupport)(l,hg)||Or(l,zg,"fontSize")||!s||null!=c&&null!==(n=c.typography)&&void 0!==n&&n.fontSize)return(0,a.createElement)(e,t);const p=fg(i,s,null==c||null===(r=c.typography)||void 0===r?void 0:r.fontSize).size,d={...t,wrapperProps:{...u,style:{fontSize:p,...null==u?void 0:u.style}}};return(0,a.createElement)(e,d)}),"withFontSizeInlineStyles"),Eg={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,i.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,o.hasBlockSupport)(e,hg)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",bg),(0,i.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!(0,o.hasBlockSupport)(e,hg))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),bg(r,e,n)},e})),(0,i.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",kg),(0,i.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,r){const i=e.name;return Tr({fontSize:(0,o.hasBlockSupport)(i,hg)},Eg,e,t,n,r)}));var Sg=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));var wg=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));const Ag=[{name:(0,m.__)("Underline"),value:"underline",icon:Sg},{name:(0,m.__)("Strikethrough"),value:"line-through",icon:wg}];function Cg(e){let{value:t,onChange:n}=e;return(0,a.createElement)("fieldset",{className:"block-editor-text-decoration-control"},(0,a.createElement)("legend",null,(0,m.__)("Decoration")),(0,a.createElement)("div",{className:"block-editor-text-decoration-control__buttons"},Ag.map((e=>(0,a.createElement)(d.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:e.value===t,onClick:()=>n(e.value===t?void 0:e.value),"aria-label":e.name})))))}const Ig="typography.__experimentalTextDecoration";function xg(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(Cg,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textDecoration,onChange:function(e){r({style:Br({...n,typography:{...null==n?void 0:n.typography,textDecoration:e}})})}})}function Bg(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,Ig),n=Cr("typography.textDecoration");return t||!n}var Pg=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"}));var Tg=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}));var Og=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"}));const Ng=[{name:(0,m.__)("Uppercase"),value:"uppercase",icon:Pg},{name:(0,m.__)("Lowercase"),value:"lowercase",icon:Tg},{name:(0,m.__)("Capitalize"),value:"capitalize",icon:Og}];function Rg(e){let{value:t,onChange:n}=e;return(0,a.createElement)("fieldset",{className:"block-editor-text-transform-control"},(0,a.createElement)("legend",null,(0,m.__)("Letter case")),(0,a.createElement)("div",{className:"block-editor-text-transform-control__buttons"},Ng.map((e=>(0,a.createElement)(d.Button,{key:e.value,icon:e.icon,isSmall:!0,isPressed:t===e.value,"aria-label":e.name,onClick:()=>n(t===e.value?void 0:e.value)})))))}const Fg="typography.__experimentalTextTransform";function Mg(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(Rg,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.textTransform,onChange:function(e){r({style:Br({...n,typography:{...null==n?void 0:n.typography,textTransform:e}})})}})}function Dg(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,Fg),n=Cr("typography.textTransform");return t||!n}function Lg(e){let{value:t,onChange:n,__unstableInputWidth:r="60px"}=e;const o=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return(0,a.createElement)(d.__experimentalUnitControl,{label:(0,m.__)("Letter spacing"),value:t,__unstableInputWidth:r,units:o,onChange:n})}const Ug="typography.__experimentalLetterSpacing";function jg(e){var t;const{attributes:{style:n},setAttributes:r}=e;return(0,a.createElement)(Lg,{value:null==n||null===(t=n.typography)||void 0===t?void 0:t.letterSpacing,onChange:function(e){r({style:Br({...n,typography:{...null==n?void 0:n.typography,letterSpacing:e}})})},__unstableInputWidth:"100%"})}function Vg(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!(0,o.hasBlockSupport)(e,Ug),n=Cr("typography.letterSpacing");return t||!n}const zg="typography",Gg=[Zm,hg,ng,rg,cg,Ig,Fg,Ug];function Hg(e){const{clientId:t}=e,n=dg(e),r=_g(e),i=ag(e),l=tg(e),s=Bg(e),c=Dg(e),u=Vg(e),p=!ig(e),f=!lg(e),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[ag(e),_g(e),tg(e),dg(e),Bg(e),Dg(e),Vg(e)];return t.filter(Boolean).length===t.length}(e),g=Wg(e.name);if(y||!g)return null;const h=(0,o.getBlockSupport)(e.name,[zg,"__experimentalDefaultControls"]),b=e=>t=>{var n;return{...t,style:{...t.style,typography:{...null===(n=t.style)||void 0===n?void 0:n.typography,[e]:void 0}}}};return(0,a.createElement)(Lr,{__experimentalGroup:"typography"},!n&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){return!!e.attributes.fontFamily}(e),label:(0,m.__)("Font family"),onDeselect:()=>function(e){let{setAttributes:t}=e;t({fontFamily:void 0})}(e),isShownByDefault:null==h?void 0:h.fontFamily,resetAllFilter:e=>({...e,fontFamily:void 0}),panelId:t},(0,a.createElement)(pg,e)),!r&&(0,a.createElement)(d.__experimentalToolsPanelItem,{hasValue:()=>function(e){var t;const{fontSize:n,style:r}=e.attributes;return!!n||!(null==r||null===(t=r.typography)||void 0===t||!t.fontSize)}(e),label:(0,m.__)("Font size"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({fontSize:void 0,style:Br({...r,typography:{...null==r?void 0:r.typography,fontSize:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontSize,resetAllFilter:e=>{var t;return{...e,fontSize:void 0,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontSize:void 0}}}},panelId:t},(0,a.createElement)(vg,e)),!i&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t;const{fontStyle:n,fontWeight:r}=(null===(t=e.attributes.style)||void 0===t?void 0:t.typography)||{};return!!n||!!r}(e),label:qm(p,f),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,typography:{...null==r?void 0:r.typography,fontStyle:void 0,fontWeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.fontAppearance,resetAllFilter:e=>{var t;return{...e,style:{...e.style,typography:{...null===(t=e.style)||void 0===t?void 0:t.typography,fontStyle:void 0,fontWeight:void 0}}}},panelId:t},(0,a.createElement)(og,e)),!l&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.lineHeight)}(e),label:(0,m.__)("Line height"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,typography:{...null==r?void 0:r.typography,lineHeight:void 0}})})}(e),isShownByDefault:null==h?void 0:h.lineHeight,resetAllFilter:b("lineHeight"),panelId:t},(0,a.createElement)(eg,e)),!s&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textDecoration)}(e),label:(0,m.__)("Decoration"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,typography:{...null==r?void 0:r.typography,textDecoration:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textDecoration,resetAllFilter:b("textDecoration"),panelId:t},(0,a.createElement)(xg,e)),!c&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.textTransform)}(e),label:(0,m.__)("Letter case"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,typography:{...null==r?void 0:r.typography,textTransform:void 0}})})}(e),isShownByDefault:null==h?void 0:h.textTransform,resetAllFilter:b("textTransform"),panelId:t},(0,a.createElement)(Mg,e)),!u&&(0,a.createElement)(d.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>function(e){var t,n;return!(null===(t=e.attributes.style)||void 0===t||null===(n=t.typography)||void 0===n||!n.letterSpacing)}(e),label:(0,m.__)("Letter spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:r}=t;n({style:Br({...r,typography:{...null==r?void 0:r.typography,letterSpacing:void 0}})})}(e),isShownByDefault:null==h?void 0:h.letterSpacing,resetAllFilter:b("letterSpacing"),panelId:t},(0,a.createElement)(jg,e)))}const Wg=e=>Gg.some((t=>(0,o.hasBlockSupport)(e,t)));const $g=[...Gg,hm,Pm,Wr],Kg=e=>$g.some((t=>(0,o.hasBlockSupport)(e,t))),qg="var:";function Jg(e){if((0,u.startsWith)(e,qg)){return`var(--wp--${e.slice(qg.length).split("|").join("--")})`}return e}function Yg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["spacing.blockGap"],n={};Object.keys(o.__EXPERIMENTAL_STYLE_PROPERTY).forEach((r=>{const i=o.__EXPERIMENTAL_STYLE_PROPERTY[r].value,l=o.__EXPERIMENTAL_STYLE_PROPERTY[r].properties;if((0,u.has)(e,i)&&"elements"!==(0,u.first)(i)){const a=(0,u.get)(e,i);o.__EXPERIMENTAL_STYLE_PROPERTY[r].useEngine||(l&&!(0,u.isString)(a)?Object.entries(l).forEach((e=>{const[t,r]=e,o=(0,u.get)(a,[r]);o&&(n[t]=Jg(o))})):t.includes(i.join("."))||(n[r]=Jg((0,u.get)(e,i))))}}));const r=Xo(e,{selector:"self"});return r.forEach((e=>{if("self"!==e.selector)throw"This style can't be added as inline style";n[e.key]=e.value})),n}const Qg={[`${hm}.__experimentalSkipSerialization`]:["border"],"color.__experimentalSkipSerialization":[Pm],[`${zg}.__experimentalSkipSerialization`]:[zg],[`${Wr}.__experimentalSkipSerialization`]:["spacing"]},Xg={...Qg,[`${Wr}`]:["spacing.blockGap"]},Zg={gradients:"gradient"};function eh(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xg;if(!Kg(t))return e;let{style:i}=n;return(0,u.forEach)(r,((e,n)=>{const r=(0,o.getBlockSupport)(t,n);!0===r&&(i=(0,u.omit)(i,e)),Array.isArray(r)&&r.forEach((t=>{const n=Zg[t]||t;i=(0,u.omit)(i,[[...e,n]])}))})),e.style={...Yg(i),...e.style},e}const th=(0,p.createHigherOrderComponent)((e=>t=>{const n=Zn();return(0,a.createElement)(a.Fragment,null,n&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Gm,t),(0,a.createElement)(Hg,t),(0,a.createElement)(bm,t),(0,a.createElement)(qr,t)),(0,a.createElement)(e,t))}),"withToolbarControls"),nh=(0,p.createHigherOrderComponent)((e=>t=>{var n,r;const i=`wp-elements-${(0,p.useInstanceId)(e)}`,s=Or(t.name,Pm,"link")?(0,u.omit)(null===(n=t.attributes.style)||void 0===n?void 0:n.elements,["link"]):null===(r=t.attributes.style)||void 0===r?void 0:r.elements,d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.map)(t,((t,n)=>{const r=Yg(t);return(0,u.isEmpty)(r)?"":[`.editor-styles-wrapper .${e} ${o.__EXPERIMENTAL_ELEMENTS[n]}{`,...(0,u.map)(r,((e,t)=>`\t${(0,u.kebabCase)(t)}: ${e};`)),"}"].join("\n")})).join("\n")}(i,s),f=(0,a.useContext)(Ny.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,s&&f&&(0,a.createPortal)((0,a.createElement)("style",{dangerouslySetInnerHTML:{__html:d}}),f),(0,a.createElement)(e,l({},t,{className:s?c()(t.className,i):t.className})))}));(0,i.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Kg(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",eh),(0,i.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Kg(e))return e;const t=e.getEditWrapperProps;return e.getEditWrapperProps=n=>{let r={};return t&&(r=t(n)),eh(r,e,n,Qg)},e})),(0,i.addFilter)("editor.BlockEdit","core/style/with-block-controls",th),(0,i.addFilter)("editor.BlockListBlock","core/editor/with-elements-styles",nh);var rh=function(e){let{colorPalette:t,duotonePalette:n,disableCustomColors:r,disableCustomDuotone:o,value:i,onChange:l}=e;return(0,a.createElement)(d.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,m.__)("Duotone"),isAlternate:!0},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(d.ToolbarButton,{showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,onKeyDown:e=>{t||e.keyCode!==bc.DOWN||(e.preventDefault(),n())},label:(0,m.__)("Apply duotone filter"),icon:(0,a.createElement)(d.DuotoneSwatch,{values:i})})},renderContent:()=>(0,a.createElement)(d.MenuGroup,{label:(0,m.__)("Duotone")},(0,a.createElement)("div",{className:"block-editor-duotone-control__description"},(0,m.__)("Create a two-tone color effect without losing your original image.")),(0,a.createElement)(d.DuotonePicker,{colorPalette:t,duotonePalette:n,disableCustomColors:r,disableCustomDuotone:o,value:i,onChange:l}))})};const oh=[];function ih(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Bu(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function lh(e){let{selector:t,id:n}=e;const r=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,a.createElement)("style",null,r)}function ah(e){let{id:t,values:n}=e;return(0,a.createElement)(d.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,a.createElement)("defs",null,(0,a.createElement)("filter",{id:t},(0,a.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,a.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,a.createElement)("feFuncR",{type:"table",tableValues:n.r.join(" ")}),(0,a.createElement)("feFuncG",{type:"table",tableValues:n.g.join(" ")}),(0,a.createElement)("feFuncB",{type:"table",tableValues:n.b.join(" ")}),(0,a.createElement)("feFuncA",{type:"table",tableValues:n.a.join(" ")})),(0,a.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function sh(e){let{selector:t,id:n,values:r}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ah,{id:n,values:r}),(0,a.createElement)(lh,{id:n,selector:t}))}function ch(e){let{presetSetting:t,defaultSetting:n}=e;const r=!Cr(n),o=Cr(`${t}.custom`)||oh,i=Cr(`${t}.theme`)||oh,l=Cr(`${t}.default`)||oh;return(0,a.useMemo)((()=>[...o,...i,...r?oh:l]),[r,o,i,l])}function uh(e){var t;let{attributes:n,setAttributes:r}=e;const o=null==n?void 0:n.style,i=null==o||null===(t=o.color)||void 0===t?void 0:t.duotone,l=ch({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),s=ch({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),c=!Cr("color.custom"),u=!Cr("color.customDuotone")||0===(null==s?void 0:s.length)&&c;return 0===(null==l?void 0:l.length)&&u?null:(0,a.createElement)(or,{group:"block",__experimentalShareWithChildBlocks:!0},(0,a.createElement)(rh,{duotonePalette:l,colorPalette:s,disableCustomDuotone:u,disableCustomColors:c,value:i,onChange:e=>{const t={...o,color:{...null==o?void 0:o.color,duotone:e}};r({style:t})}}))}Tu([Ou]);const ph=(0,p.createHigherOrderComponent)((e=>t=>{const n=(0,o.hasBlockSupport)(t.name,"color.__experimentalDuotone");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),n&&(0,a.createElement)(uh,t))}),"withDuotoneControls");const dh=(0,p.createHigherOrderComponent)((e=>t=>{var n,r,i;const s=(0,o.getBlockSupport)(t.name,"color.__experimentalDuotone"),u=null==t||null===(n=t.attributes)||void 0===n||null===(r=n.style)||void 0===r||null===(i=r.color)||void 0===i?void 0:i.duotone;if(!s||!u)return(0,a.createElement)(e,t);const d=`wp-duotone-${(0,p.useInstanceId)(e)}`,f=function(e,t){const n=e.split(","),r=t.split(","),o=[];return n.forEach((e=>{r.forEach((t=>{o.push(`${e.trim()} ${t.trim()}`)}))})),o.join(", ")}(`.editor-styles-wrapper .${d}`,s),y=c()(null==t?void 0:t.className,d),m=(0,a.useContext)(Ny.__unstableElementContext);return(0,a.createElement)(a.Fragment,null,m&&(0,a.createPortal)((0,a.createElement)(sh,{selector:f,id:d,values:ih(u)}),m),(0,a.createElement)(e,l({},t,{className:y})))}),"withDuotoneStyles");function fh(e){let{preset:t}=e;return(0,a.createElement)(ah,{id:`wp-duotone-${t.slug}`,values:ih(t.colors)})}(0,i.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,o.hasBlockSupport)(e,"color.__experimentalDuotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),(0,i.addFilter)("editor.BlockEdit","core/editor/duotone/with-editor-controls",ph),(0,i.addFilter)("editor.BlockListBlock","core/editor/duotone/with-styles",dh);const yh="__experimentalLayout";function mh(e){let{setAttributes:t,attributes:n,name:r}=e;const{layout:i}=n,l=Cr("layout"),s=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn);return t().supportsLayout}),[]),c=(0,o.getBlockSupport)(r,yh,{}),{allowSwitching:u,allowEditing:p=!0,allowInheriting:y=!0,default:g}=c;if(!p)return null;const h=!(!y||!l||null!=i&&i.type&&"default"!==(null==i?void 0:i.type)&&(null==i||!i.inherit)),b=i||g||{},{inherit:v=!1,type:_="default"}=b;if("default"===_&&!s)return null;const k=Io(_),E=e=>t({layout:e});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Lr,null,(0,a.createElement)(d.PanelBody,{title:(0,m.__)("Layout")},h&&(0,a.createElement)(d.ToggleControl,{label:(0,m.__)("Inherit default layout"),checked:!!v,onChange:()=>t({layout:{inherit:!v}})}),!v&&u&&(0,a.createElement)(gh,{type:_,onChange:e=>t({layout:{type:e}})}),!v&&k&&(0,a.createElement)(k.inspectorControls,{layout:b,onChange:E,layoutBlockSupport:c}))),!v&&k&&(0,a.createElement)(k.toolBarControls,{layout:b,onChange:E,layoutBlockSupport:c}))}function gh(e){let{type:t,onChange:n}=e;return(0,a.createElement)(d.ButtonGroup,null,Co.map((e=>{let{name:r,label:o}=e;return(0,a.createElement)(d.Button,{key:r,isPressed:t===r,onClick:()=>n(r)},o)})))}const hh=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return[(0,o.hasBlockSupport)(n,yh)&&(0,a.createElement)(mh,l({key:"layout"},t)),(0,a.createElement)(e,l({key:"edit"},t))]}),"withInspectorControls"),bh=(0,p.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:r}=t,i=(0,o.hasBlockSupport)(n,yh),s=(0,p.useInstanceId)(e),d=Cr("layout")||{},f=(0,a.useContext)(Ny.__unstableElementContext),{layout:y}=r,{default:m}=(0,o.getBlockSupport)(n,yh)||{},g=null!=y&&y.inherit?d:y||m||{},h=i?function(e){var t,n,r;const o=[];return e.layout?(null!=e&&null!==(t=e.layout)&&void 0!==t&&t.orientation&&o.push(`is-${(0,u.kebabCase)(e.layout.orientation)}`),null!=e&&null!==(n=e.layout)&&void 0!==n&&n.justifyContent&&o.push(`is-content-justification-${(0,u.kebabCase)(e.layout.justifyContent)}`),null!=e&&null!==(r=e.layout)&&void 0!==r&&r.flexWrap&&"nowrap"===e.layout.flexWrap&&o.push("is-nowrap"),o):o}(r):null,b=c()(null==t?void 0:t.className,{[`wp-container-${s}`]:i},h);return(0,a.createElement)(a.Fragment,null,i&&f&&(0,a.createPortal)((0,a.createElement)(Oo,{blockName:n,selector:`.wp-container-${s}`,layout:g,style:null==r?void 0:r.style}),f),(0,a.createElement)(e,l({},t,{className:b})))}));(0,i.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return(0,u.has)(e.attributes,["layout","type"])||(0,o.hasBlockSupport)(e,yh)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,i.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",bh),(0,i.addFilter)("editor.BlockEdit","core/editor/layout/with-inspector-controls",hh);const vh=[];function _h(e){var t;let{borderColor:n,style:r}=e;const o=(null==r?void 0:r.border)||{},i=Wy("border-color",n);return{className:c()({[i]:!!i,"has-border-color":n||(null==r||null===(t=r.border)||void 0===t?void 0:t.color)})||void 0,style:Yg({border:o})}}function kh(e){const t=Cr("color.palette")||vh,n=_h(e);if(e.borderColor){const r=Gy(t,e.borderColor);n.style.borderColor=r.color}return n}function Eh(e){var t,n,r,o,i,l;const{backgroundColor:a,textColor:s,gradient:u,style:p}=e,d=Wy("background-color",a),f=Wy("color",s),y=km(u),m=y||(null==p||null===(t=p.color)||void 0===t?void 0:t.gradient);return{className:c()(f,y,{[d]:!m&&!!d,"has-text-color":s||(null==p||null===(n=p.color)||void 0===n?void 0:n.text),"has-background":a||(null==p||null===(r=p.color)||void 0===r?void 0:r.background)||u||(null==p||null===(o=p.color)||void 0===o?void 0:o.gradient),"has-link-color":null==p||null===(i=p.elements)||void 0===i||null===(l=i.link)||void 0===l?void 0:l.color})||void 0,style:Yg({color:(null==p?void 0:p.color)||{}})}}const Sh={};function wh(e){const{backgroundColor:t,textColor:n,gradient:r}=e,o=Cr("color.palette.custom")||[],i=Cr("color.palette.theme")||[],l=Cr("color.palette.default")||[],s=Cr("color.gradients")||Sh,c=(0,a.useMemo)((()=>[...o||[],...i||[],...l||[]]),[o,i,l]),u=(0,a.useMemo)((()=>[...(null==s?void 0:s.custom)||[],...(null==s?void 0:s.theme)||[],...(null==s?void 0:s.default)||[]]),[s]),p=Eh(e);if(t){const e=Gy(c,t);p.style.backgroundColor=e.color}if(r&&(p.style.background=Em(u,r)),n){const e=Gy(c,n);p.style.color=e.color}return p}function Ah(e){const{style:t}=e;return{style:Yg({spacing:(null==t?void 0:t.spacing)||{}})}}function Ch(e){const[t,n]=(0,a.useState)(e);return(0,a.useEffect)((()=>{e&&n(e)}),[e]),t}const Ih=e=>(0,p.createHigherOrderComponent)((t=>n=>(0,a.createElement)(t,l({},n,{colors:e}))),"withCustomColorPalette"),xh=()=>(0,p.createHigherOrderComponent)((e=>t=>{const n=Cr("color.palette.custom"),r=Cr("color.palette.theme"),o=Cr("color.palette.default"),i=(0,a.useMemo)((()=>[...n||[],...r||[],...o||[]]),[n,r,o]);return(0,a.createElement)(e,l({},t,{colors:i}))}),"withEditorColorPalette");function Bh(e,t){const n=(0,u.reduce)(e,((e,t)=>({...e,...(0,u.isString)(t)?{[t]:(0,u.kebabCase)(t)}:t})),{});return(0,p.compose)([t,e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=Bu(t);return(0,u.maxBy)(e,(e=>{let{color:t}=e;return n.contrast(t)})).color}(t,e)}createSetters(){return(0,u.reduce)(n,((e,t,n)=>{const r=(0,u.upperFirst)(n),o=`custom${r}`;return e[`set${r}`]=this.createSetColor(n,o),e}),{})}createSetColor(e,t){return n=>{const r=Hy(this.props.colors,n);this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:r,colors:o}=e;return(0,u.reduce)(n,((e,n,i)=>{const l=Gy(o,r[i],r[`custom${(0,u.upperFirst)(i)}`]),a=t[i];return(null==a?void 0:a.color)===l.color&&a?e[i]=a:e[i]={...l,class:Wy(n,l.slug)},e}),{})}render(){return(0,a.createElement)(e,l({},this.props,{colors:void 0},this.state,this.setters,{colorUtils:this.colorUtils}))}}])}function Ph(e){return function(){const t=Ih(e);for(var n=arguments.length,r=new Array(n),o=0;o(e[t]=`custom${(0,u.upperFirst)(t)}`,e)),{});return(0,p.createHigherOrderComponent)((0,p.compose)([(0,p.createHigherOrderComponent)((e=>t=>{const n=Cr("typography.fontSizes")||Oh;return(0,a.createElement)(e,l({},t,{fontSizes:n}))}),"withFontSizes"),e=>class extends a.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return(0,u.reduce)(r,((e,t,n)=>(e[`set${(0,u.upperFirst)(n)}`]=this.createSetFontSize(n,t),e)),{})}createSetFontSize(e,t){return n=>{const r=(0,u.find)(this.props.fontSizes,{size:Number(n)});this.props.setAttributes({[e]:r&&r.slug?r.slug:void 0,[t]:r&&r.slug?void 0:n})}}static getDerivedStateFromProps(e,t){let{attributes:n,fontSizes:o}=e;const i=(e,r)=>!t[r]||(n[r]?n[r]!==t[r].slug:t[r].size!==n[e]);if(!(0,u.some)(r,i))return null;const l=(0,u.reduce)((0,u.pickBy)(r,i),((e,t,r)=>{const i=n[r],l=fg(o,i,n[t]);return e[r]={...l,class:mg(i)},e}),{});return{...t,...l}}render(){return(0,a.createElement)(e,l({},this.props,{fontSizes:void 0},this.state,this.setters))}}]),"withFontSizes")};var Rh=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));var Fh=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));var Mh=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));const Dh=[{icon:Rh,title:(0,m.__)("Align text left"),align:"left"},{icon:Fh,title:(0,m.__)("Align text center"),align:"center"},{icon:Mh,title:(0,m.__)("Align text right"),align:"right"}],Lh={position:"bottom right",isAlternate:!0};var Uh=function(e){let{value:t,onChange:n,alignmentControls:r=Dh,label:o=(0,m.__)("Align"),describedBy:i=(0,m.__)("Change text alignment"),isCollapsed:s=!0,isToolbar:c}=e;function p(e){return()=>n(t===e?void 0:e)}const f=(0,u.find)(r,(e=>e.align===t)),y=c?d.ToolbarGroup:d.ToolbarDropdownMenu,g=c?{isCollapsed:s}:{};return(0,a.createElement)(y,l({icon:f?f.icon:(0,m.isRTL)()?Mh:Rh,label:o,toggleProps:{describedBy:i},popoverProps:Lh,controls:r.map((e=>{const{align:n}=e,r=t===n;return{...e,isActive:r,role:s?"menuitemradio":void 0,onClick:p(n)}}))},g))};const jh=e=>(0,a.createElement)(Uh,l({},e,{isToolbar:!1})),Vh=e=>(0,a.createElement)(Uh,l({},e,{isToolbar:!0}));var zh={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockName:n}=(0,f.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n,getBlockInsertionPoint:r}=e(qn),o=t();return{selectedBlockName:o?n(o):null,rootClientId:r().rootClientId}}),[]),[r,o,i]=Sp(t,u.noop),l=(0,a.useMemo)((()=>(e.trim()?Kp(r,o,i,e):(0,u.orderBy)(r,["frecency"],["desc"])).filter((e=>e.name!==n)).slice(0,9)),[e,n,r,o,i]),s=(0,a.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:r}=e;return{key:`block-${e.id}`,value:e,label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Nc,{key:"icon",icon:n,showColors:!0}),t),isDisabled:r}}))),[l]);return[s]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:r}=e;return{action:"replace",value:(0,o.createBlock)(t,n,(0,o.createBlocksFromInnerBlocksTemplate)(r))}}},Gh=window.wp.apiFetch,Hh=n.n(Gh);var Wh=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));var $h=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));var Kh={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await Hh()({path:(0,nd.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(wo,{key:"icon",icon:"page"===e.subtype?Wh:$h}),e.title),getOptionCompletion:e=>(0,a.createElement)("a",{href:e.url},e.title)};const qh=[];function Jh(e){let{completers:t=qh}=e;const{name:n}=Xn();return(0,a.useMemo)((()=>{let e=t;return(n===(0,o.getDefaultBlockName)()||(0,o.getBlockSupport)(n,"__experimentalSlashInserter",!1))&&(e=e.concat([zh,Kh])),(0,i.hasFilter)("editor.Autocomplete.completers")&&(e===t&&(e=e.map(u.clone)),e=(0,i.applyFilters)("editor.Autocomplete.completers",e,n)),e}),[t,n])}var Yh=function(e){return(0,a.createElement)(d.Autocomplete,l({},e,{completers:Jh(e)}))};var Qh=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z"}));var Xh=function(e){let{isActive:t,label:n=(0,m.__)("Toggle full height"),onToggle:r,isDisabled:o}=e;return(0,a.createElement)(d.ToolbarButton,{isActive:t,icon:Qh,label:n,onClick:()=>r(!t),disabled:o})};var Zh=function(e){const{label:t=(0,m.__)("Change matrix alignment"),onChange:n=u.noop,value:r="center",isDisabled:o}=e,i=(0,a.createElement)(d.__experimentalAlignmentMatrixControl.Icon,{value:r}),l="block-editor-block-alignment-matrix-control",s=`${l}__popover`;return(0,a.createElement)(d.Dropdown,{position:"bottom right",className:l,popoverProps:{className:s,isAlternate:!0},renderToggle:e=>{let{onToggle:n,isOpen:r}=e;return(0,a.createElement)(d.ToolbarButton,{onClick:n,"aria-haspopup":"true","aria-expanded":r,onKeyDown:e=>{r||e.keyCode!==bc.DOWN||(e.preventDefault(),n())},label:t,icon:i,showTooltip:!0,disabled:o})},renderContent:()=>(0,a.createElement)(d.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:r})})};var eb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));var tb=function(e){let{rootLabelText:t}=e;const{selectBlock:n,clearSelectedBlock:r}=(0,f.useDispatch)(qn),{clientId:o,parents:i,hasSelection:l}=(0,f.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getBlockParents:r}=e(qn),o=n();return{parents:r(o),clientId:o,hasSelection:!!t().clientId}}),[]),s=t||(0,m.__)("Document");return(0,a.createElement)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,m.__)("Block breadcrumb")},(0,a.createElement)("li",{className:l?void 0:"block-editor-block-breadcrumb__current","aria-current":l?void 0:"true"},l&&(0,a.createElement)(d.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:r},s),!l&&s,!!o&&(0,a.createElement)(wo,{icon:eb,className:"block-editor-block-breadcrumb__separator"})),i.map((e=>(0,a.createElement)("li",{key:e},(0,a.createElement)(d.Button,{className:"block-editor-block-breadcrumb__button",variant:"tertiary",onClick:()=>n(e)},(0,a.createElement)(Nd,{clientId:e,maximumLength:35})),(0,a.createElement)(wo,{icon:eb,className:"block-editor-block-breadcrumb__separator"})))),!!o&&(0,a.createElement)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true"},(0,a.createElement)(Nd,{clientId:o,maximumLength:35})))};function nb(e){let{clientId:t,tagName:n="div",wrapperProps:r,className:o}=e;const[i,s]=(0,a.useState)(!0),[u,p]=(0,a.useState)(!1),{isParentSelected:d,hasChildSelected:y,isDraggingBlocks:m,isParentHighlighted:g}=(0,f.useSelect)((e=>{const{isBlockSelected:n,hasSelectedInnerBlock:r,isDraggingBlocks:o,isBlockHighlighted:i}=e(qn);return{isParentSelected:n(t),hasChildSelected:r(t,!0),isDraggingBlocks:o(),isParentHighlighted:i(t)}}),[t]),h=c()("block-editor-block-content-overlay",null==r?void 0:r.className,o,{"overlay-active":i,"parent-highlighted":g,"is-dragging-blocks":m});return(0,a.useEffect)((()=>{d||y||i||s(!0),d&&!u&&i&&s(!1),y&&i&&s(!1)}),[d,y,i,u]),(0,a.createElement)(n,l({},r,{className:h,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onMouseUp:i?()=>s(!1):void 0}),null==r?void 0:r.children)}const rb=()=>(0,a.createElement)(d.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,a.createElement)(d.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})),ob=e=>{let{style:t,className:n}=e;return(0,a.createElement)("div",{className:"block-library-colors-selector__icon-container"},(0,a.createElement)("div",{className:`${n} block-library-colors-selector__state-selection`,style:t},(0,a.createElement)(rb,null)))},ib=e=>{let{TextColor:t,BackgroundColor:n}=e;return e=>{let{onToggle:r,isOpen:o}=e;return(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(d.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,m.__)("Open Colors Selector"),onClick:r,onKeyDown:e=>{o||e.keyCode!==bc.DOWN||(e.preventDefault(),r())},icon:(0,a.createElement)(n,null,(0,a.createElement)(t,null,(0,a.createElement)(ob,null)))}))}};var lb=e=>{let{children:t,...n}=e;return(0,a.createElement)(d.Dropdown,{position:"bottom right",className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:ib(n),renderContent:()=>t})};var ab=(0,a.createElement)(D.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(D.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));const sb=tc(d.__experimentalTreeGridRow);function cb(e){let{isSelected:t,position:n,level:r,rowCount:o,children:i,className:s,path:u,...p}=e;const d=oc({isSelected:t,adjustScrolling:!1,enableAnimation:!0,triggerAnimationOnChange:u});return(0,a.createElement)(sb,l({ref:d,className:c()("block-editor-list-view-leaf",s),level:r,positionInSet:n,setSize:o},p),i)}function ub(e){let{onClick:t}=e;return(0,a.createElement)("span",{className:"block-editor-list-view__expander",onClick:e=>t(e,{forceToggle:!0}),"aria-hidden":"true"},(0,a.createElement)(wo,{icon:eb}))}var pb=(0,a.forwardRef)((function(e,t){let{className:n,block:{clientId:r},onClick:o,onToggleExpanded:i,tabIndex:l,onFocus:s,onDragStart:u,onDragEnd:p,draggable:f}=e;const y=Td(r),{isLocked:m}=zf(r);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Button,{className:c()("block-editor-list-view-block-select-button",n),onClick:o,onKeyDown:function(e){e.keyCode!==bc.ENTER&&e.keyCode!==bc.SPACE||o(e)},ref:t,tabIndex:l,onFocus:s,onDragStart:e=>{e.dataTransfer.clearData(),null==u||u(e)},onDragEnd:p,draggable:f,href:`#block-${r}`,"aria-hidden":!0},(0,a.createElement)(ub,{onClick:i}),(0,a.createElement)(Nc,{icon:null==y?void 0:y.icon,showColors:!0}),(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__title"},(0,a.createElement)(Nd,{clientId:r,maximumLength:35})),(null==y?void 0:y.anchor)&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__anchor"},y.anchor),m&&(0,a.createElement)("span",{className:"block-editor-list-view-block-select-button__lock"},(0,a.createElement)(wo,{icon:Vf}))))}));const db=(0,a.forwardRef)(((e,t)=>{let{onClick:n,onToggleExpanded:r,block:o,isSelected:i,position:s,siblingBlockCount:u,level:p,isExpanded:d,selectedClientIds:y,...m}=e;const{clientId:g}=o,{blockMovingClientId:h,selectedBlockInBlockEditor:b}=(0,f.useSelect)((e=>{const{hasBlockMovingClientId:t,getSelectedBlockClientId:n}=e(qn);return{blockMovingClientId:t(),selectedBlockInBlockEditor:n()}}),[g]),v=h&&b===g,_=c()("block-editor-list-view-block-contents",{"is-dropping-before":v}),k=y.includes(g)?y:[g];return(0,a.createElement)(Rd,{clientIds:k},(e=>{let{draggable:c,onDragStart:f,onDragEnd:y}=e;return(0,a.createElement)(pb,l({ref:t,className:_,block:o,onClick:n,onToggleExpanded:r,isSelected:i,position:s,siblingBlockCount:u,level:p,draggable:c,onDragStart:f,onDragEnd:y,isExpanded:d},m))}))}));var fb=db;const yb=(0,a.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),mb=()=>(0,a.useContext)(yb);var gb=(0,a.memo)((function e(t){let{block:n,isDragged:r,isSelected:o,isBranchSelected:i,selectBlock:l,position:s,level:u,rowCount:y,siblingBlockCount:g,showBlockMovers:h,path:b,isExpanded:v,selectedClientIds:_,preventAnnouncement:k}=t;const E=(0,a.useRef)(null),[S,w]=(0,a.useState)(!1),{clientId:A}=n,C=o&&_[0]===A,I=o&&_[_.length-1]===A,{toggleBlockHighlight:x}=(0,f.useDispatch)(qn),B=Td(A),{isLocked:P}=zf(A),T=`list-view-block-select-button__${(0,p.useInstanceId)(e)}`,O=((e,t,n)=>(0,m.sprintf)((0,m.__)("Block %1$d of %2$d, Level %3$d"),e,t,n))(s,g,u);let N=(0,m.__)("Link");B&&(N=P?(0,m.sprintf)((0,m.__)("%s link (locked)"),B.title):(0,m.sprintf)((0,m.__)("%s link"),B.title));const R=B?(0,m.sprintf)((0,m.__)("Options for %s block"),B.title):(0,m.__)("Options"),{__experimentalFeatures:F,__experimentalPersistentListViewFeatures:M,__experimentalHideContainerBlockActions:D,isTreeGridMounted:L,expand:U,collapse:j}=mb(),V=h&&g>0,z=c()("block-editor-list-view-block__mover-cell",{"is-visible":S||o}),G=c()("block-editor-list-view-block__menu-cell",{"is-visible":S||C});(0,a.useEffect)((()=>{M&&!L&&o&&E.current.focus()}),[]);const H=M?x:()=>{},W=(0,a.useCallback)((()=>{w(!0),H(A,!0)}),[A,w,H]),$=(0,a.useCallback)((()=>{w(!1),H(A,!1)}),[A,w,H]),K=(0,a.useCallback)((e=>{l(e,A),e.preventDefault()}),[A,l]),q=(0,a.useCallback)((e=>{l(void 0,e)}),[l]),J=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===v?j(A):!1===v&&U(A)}),[A,U,j,v]),Y=F&&(!D||D&&u>1),Q=F&&!Y;let X;V?X=2:Q&&(X=3);const Z=c()({"is-selected":o,"is-first-selected":C,"is-last-selected":I,"is-branch-selected":M&&i,"is-dragging":r,"has-single-cell":Q}),ee=_.includes(A)?_:[A];return(0,a.createElement)(cb,{className:Z,onMouseEnter:W,onMouseLeave:$,onFocus:W,onBlur:$,level:u,position:s,rowCount:y,path:b,id:`list-view-block-${A}`,"data-block":A,isExpanded:v,"aria-selected":!!o},(0,a.createElement)(d.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:X,ref:E,"aria-label":N,"aria-selected":!!o,"aria-expanded":v,"aria-describedby":T},(e=>{let{ref:t,tabIndex:r,onFocus:i}=e;return(0,a.createElement)("div",{className:"block-editor-list-view-block__contents-container"},(0,a.createElement)(fb,{block:n,onClick:K,onToggleExpanded:J,isSelected:o,position:s,siblingBlockCount:g,level:u,ref:t,tabIndex:r,onFocus:i,isExpanded:v,selectedClientIds:_,preventAnnouncement:k}),(0,a.createElement)("div",{className:"block-editor-list-view-block-select-button__description",id:T},O))})),V&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.__experimentalTreeGridCell,{className:z,withoutGridItem:!0},(0,a.createElement)(d.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(Kd,{orientation:"vertical",clientIds:[A],ref:t,tabIndex:n,onFocus:r})})),(0,a.createElement)(d.__experimentalTreeGridItem,null,(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(qd,{orientation:"vertical",clientIds:[A],ref:t,tabIndex:n,onFocus:r})})))),Y&&(0,a.createElement)(d.__experimentalTreeGridCell,{className:G,"aria-selected":!!o},(e=>{let{ref:t,tabIndex:n,onFocus:r}=e;return(0,a.createElement)(Qf,{clientIds:ee,icon:Cf,label:R,toggleProps:{ref:t,className:"block-editor-list-view-block__menu",tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:q})})))}));function hb(e,t,n,r){var o;if(null==n?void 0:n.includes(e.clientId))return 0;return(null!==(o=t[e.clientId])&&void 0!==o?o:r)?1+e.innerBlocks.reduce(bb(t,n,r),0):1}const bb=(e,t,n)=>(r,o)=>{var i;if(null==t?void 0:t.includes(o.clientId))return r;return(null!==(i=e[o.clientId])&&void 0!==i?i:n)&&o.innerBlocks.length>0?r+hb(o,e,t,n):r+1};function vb(e){const{blocks:t,selectBlock:n,showBlockMovers:r,showNestedBlocks:o,selectedClientIds:i,level:l=1,path:s="",isBranchSelected:c=!1,listPosition:p=0,fixedListWindow:d,expandNested:y}=e,{expandedState:m,draggedClientIds:g,__experimentalPersistentListViewFeatures:h}=mb(),b=(0,u.compact)(t),v=b.length;let _=p;return(0,a.createElement)(a.Fragment,null,b.map(((e,t)=>{var p;const{clientId:k,innerBlocks:E}=e;t>0&&(_+=hb(b[t-1],m,g,y));const S=h,{itemInView:w}=d,A=!S||w(_),C=t+1,I=s.length>0?`${s}_${C}`:`${C}`,x=o&&!!E&&!!E.length,B=x?null!==(p=m[k])&&void 0!==p?p:y:void 0,P=!(null==g||!g.includes(k)),T=P||A,O=((e,t)=>(0,u.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e)(k,i),N=c||O&&x;return(0,a.createElement)(f.AsyncModeProvider,{key:k,value:!O},T&&(0,a.createElement)(gb,{block:e,selectBlock:n,isSelected:O,isBranchSelected:N,isDragged:P,level:l,position:C,rowCount:v,siblingBlockCount:v,showBlockMovers:r,path:I,isExpanded:B,listPosition:_,selectedClientIds:i}),!T&&(0,a.createElement)("tr",null,(0,a.createElement)("td",{className:"block-editor-list-view-placeholder"})),x&&B&&!P&&(0,a.createElement)(vb,{blocks:E,selectBlock:n,showBlockMovers:r,showNestedBlocks:o,level:l+1,path:I,listPosition:_+1,fixedListWindow:d,isBranchSelected:N,selectedClientIds:i,expandNested:y}))})))}vb.defaultProps={selectBlock:()=>{}};var _b=(0,a.memo)(vb);function kb(e){let{listViewRef:t,blockDropTarget:n}=e;const{rootClientId:r,clientId:o,dropPosition:i}=n||{},[l,s]=(0,a.useMemo)((()=>{if(!t.current)return[];return[r?t.current.querySelector(`[data-block="${r}"]`):void 0,o?t.current.querySelector(`[data-block="${o}"]`):void 0]}),[r,o]),c=s||l,u=(0,a.useCallback)((()=>{if(!l)return 0;const e=c.getBoundingClientRect();return l.querySelector(".block-editor-block-icon").getBoundingClientRect().right-e.left}),[l,c]),p=(0,a.useMemo)((()=>{if(!c)return{};const e=u();return{width:c.offsetWidth-e}}),[u,c]),f=(0,a.useCallback)((()=>{if(!c)return{};const e=c.ownerDocument,t=c.getBoundingClientRect(),n=u(),r={left:t.left+n,right:t.right,width:0,height:t.height,ownerDocument:e};return"top"===i?{...r,top:t.top,bottom:t.top}:"bottom"===i||"inside"===i?{...r,top:t.bottom,bottom:t.bottom}:{}}),[c,i,u]);return c?(0,a.createElement)(d.Popover,{noArrow:!0,animate:!1,getAnchorRect:f,focusOnMount:!1,className:"block-editor-list-view-drop-indicator"},(0,a.createElement)("div",{style:p,className:"block-editor-list-view-drop-indicator__line"})):null}function Eb(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,f.useDispatch)(qn),{getBlockName:r,getBlockParents:i,getBlockSelectionStart:l,getBlockSelectionEnd:s,getSelectedBlockClientIds:c,hasMultiSelection:p,hasSelectedBlock:d}=(0,f.useSelect)(qn),{getBlockType:y}=(0,f.useSelect)(o.store),g=(0,a.useCallback)((async(o,a,s)=>{if(null==o||!o.shiftKey)return await e(),void n(a);o.preventDefault();const f="keydown"===o.type&&(o.keyCode===bc.UP||o.keyCode===bc.DOWN||o.keyCode===bc.HOME||o.keyCode===bc.END);if(!f&&!d()&&!p())return void n(a,null);const g=c(),h=[...i(a),a];f&&!g.some((e=>h.includes(e)))&&await e();let b=l(),v=a;f&&(d()||p()||(b=a),s&&(v=s));const _=i(b),k=i(v),{start:E,end:S}=function(e,t,n,r){const o=[...n,e],i=[...r,t],l=Math.min(o.length,i.length)-1;return{start:o[l],end:i[l]}}(b,v,_,k);await t(E,S,null);const w=c();if((o.keyCode===bc.HOME||o.keyCode===bc.END)&&w.length>1)return;const A=(0,u.difference)(g,w);let C;if(1===A.length){var I;const e=null===(I=y(r(A[0])))||void 0===I?void 0:I.title;e&&(C=(0,m.sprintf)((0,m.__)("%s deselected."),e))}else A.length>1&&(C=(0,m.sprintf)((0,m.__)("%s blocks deselected."),A.length));C&&(0,Lt.speak)(C)}),[e,r,y,i,l,s,c,p,d,t,n]);return{updateBlockSelection:g}}function Sb(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const wb=["top","bottom"];function Ab(){const{getBlockRootClientId:e,getBlockIndex:t,getBlockCount:n,getDraggedBlockClientIds:r,canInsertBlocks:o}=(0,f.useSelect)(qn),[i,l]=(0,a.useState)(),{rootClientId:s,blockIndex:c}=i||{},u=_y(s,c),d=r(),y=(0,p.useThrottle)((0,a.useCallback)(((r,i)=>{const a={x:r.clientX,y:r.clientY},s=!(null==d||!d.length),c=function(e,t){let n,r,o,i;for(const l of e){if(l.isDraggedBlock)continue;const a=l.element.getBoundingClientRect(),[s,c]=Ey(t,a,wb),u=Sb(t,a);if(void 0===o||s0||function(e,t){const n=t.left+t.width/2;return e.x>n}(t,i)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(!r.canInsertDraggedBlocksAsSibling)return;const a=l?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+a,dropPosition:n}}(Array.from(i.querySelectorAll("[data-block]")).map((r=>{const i=r.dataset.block,l=e(i);return{clientId:i,rootClientId:l,blockIndex:t(i),element:r,isDraggedBlock:!!s&&d.includes(i),innerBlockCount:n(i),canInsertDraggedBlocksAsSibling:!s||o(d,l),canInsertDraggedBlocksAsChild:!s||o(d,i)}})),a);c&&l(c)}),[d]),200);return{ref:(0,p.__experimentalUseDropZone)({onDrop:u,onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),l(null)}}),target:i}}const Cb=(e,t)=>Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;var Ib=(0,a.forwardRef)((function(e,t){let{blocks:n,__experimentalFeatures:r,__experimentalPersistentListViewFeatures:o,__experimentalHideContainerBlockActions:i,showNestedBlocks:s,showBlockMovers:c,id:u,expandNested:y=!1,...g}=e;const{clientIdsTree:h,draggedClientIds:b,selectedClientIds:v}=function(e){return(0,f.useSelect)((t=>{const{getDraggedBlockClientIds:n,getSelectedBlockClientIds:r,__unstableGetClientIdsTree:o}=t(qn);return{selectedClientIds:r(),draggedClientIds:n(),clientIdsTree:e||o()}}),[e])}(n),{visibleBlockCount:_}=(0,f.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(qn),r=(null==b?void 0:b.length)>0?n(b).length+1:0;return{visibleBlockCount:t()-r}}),[b]),{updateBlockSelection:k}=Eb(),[E,S]=(0,a.useReducer)(Cb,{}),{ref:w,target:A}=Ab(),C=(0,a.useRef)(),I=(0,p.useMergeRefs)([C,w,t]),x=(0,a.useRef)(!1),{setSelectedTreeId:B}=function(e){let{firstSelectedBlockClientId:t,setExpandedState:n}=e;const[r,o]=(0,a.useState)(null),{selectedBlockParentClientIds:i}=(0,f.useSelect)((e=>{const{getBlockParents:n}=e(qn);return{selectedBlockParentClientIds:n(t,!1)}}),[t]),l=Array.isArray(i)&&i.length?i:null;return(0,a.useEffect)((()=>{r!==t&&l&&n({type:"expand",clientIds:i})}),[t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:v[0],setExpandedState:S}),P=(0,a.useCallback)(((e,t)=>{k(e,t),B(t)}),[B,k]);(0,a.useEffect)((()=>{x.current=!0}),[]);const[T]=(0,p.__experimentalUseFixedWindowList)(C,36,_,{useWindowing:o,windowOverscan:40}),O=(0,a.useCallback)((e=>{e&&S({type:"expand",clientIds:[e]})}),[S]),N=(0,a.useCallback)((e=>{e&&S({type:"collapse",clientIds:[e]})}),[S]),R=(0,a.useCallback)((e=>{var t;O(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[O]),F=(0,a.useCallback)((e=>{var t;N(null==e||null===(t=e.dataset)||void 0===t?void 0:t.block)}),[N]),M=(0,a.useCallback)(((e,t,n)=>{var r,o;e.shiftKey&&k(e,null==t||null===(r=t.dataset)||void 0===r?void 0:r.block,null==n||null===(o=n.dataset)||void 0===o?void 0:o.block)}),[k]),D=(0,a.useMemo)((()=>({__experimentalFeatures:r,__experimentalPersistentListViewFeatures:o,__experimentalHideContainerBlockActions:i,isTreeGridMounted:x.current,draggedClientIds:b,expandedState:E,expand:O,collapse:N})),[r,o,i,x.current,b,E,O,N]);return(0,a.createElement)(f.AsyncModeProvider,{value:!0},(0,a.createElement)(kb,{listViewRef:C,blockDropTarget:A}),(0,a.createElement)(d.__experimentalTreeGrid,{id:u,className:"block-editor-list-view-tree","aria-label":(0,m.__)("Block navigation structure"),ref:I,onCollapseRow:F,onExpandRow:R,onFocusRow:M},(0,a.createElement)(yb.Provider,{value:D},(0,a.createElement)(_b,l({blocks:h,selectBlock:P,showNestedBlocks:s,showBlockMovers:c,fixedListWindow:T,selectedClientIds:v,expandNested:y},g)))))}));function xb(e){let{isEnabled:t,onToggle:n,isOpen:r,innerRef:o,...i}=e;return(0,a.createElement)(d.Button,l({},i,{ref:o,icon:ab,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0,label:(0,m.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!t}))}var Bb=(0,a.forwardRef)((function(e,t){let{isDisabled:n,__experimentalFeatures:r,...o}=e;const i=(0,f.useSelect)((e=>!!e(qn).getBlockCount()),[])&&!n;return(0,a.createElement)(d.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,a.createElement)(xb,l({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:i}))},renderContent:()=>(0,a.createElement)("div",{className:"block-editor-block-navigation__container"},(0,a.createElement)("p",{className:"block-editor-block-navigation__label"},(0,m.__)("List view")),(0,a.createElement)(Ib,{showNestedBlocks:!0,__experimentalFeatures:r}))})}));function Pb(e){let{genericPreviewBlock:t,style:n,className:r,activeStyle:o}=e;const i=cf(r,o,n),l=(0,a.useMemo)((()=>({...t,title:n.label||n.name,description:n.description,initialAttributes:{...t.attributes,className:i+" block-editor-block-styles__block-preview-container"}})),[t,i]);return(0,a.createElement)(pp,{item:l,isStylePreview:!0})}function Tb(e){let{children:t,scope:n,...r}=e;return(0,a.createElement)(d.Fill,{name:`BlockStylesPreviewPanel/${n}`},(0,a.createElement)("div",r,t))}function Ob(e){let{clientId:t,onSwitch:n=u.noop,onHoverClassName:r=u.noop,scope:o}=e;const{onSelect:i,stylesToRender:l,activeStyle:s,genericPreviewBlock:f,className:y}=pf({clientId:t,onSwitch:n}),[m,g]=(0,a.useState)(null),[h,b]=(0,a.useState)(0),v=(0,p.useViewportMatch)("medium","<");if((0,a.useLayoutEffect)((()=>{const e=document.querySelector(".interface-interface-skeleton__content"),t=(null==e?void 0:e.scrollTop)||0;b(t+16)}),[m]),!l||0===l.length)return null;const _=(0,u.debounce)(g,250),k=e=>{i(e),r(null),g(null),_.cancel()},E=e=>{var t;m!==e?(_(e),r(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null)):_.cancel()};return(0,a.createElement)("div",{className:"block-editor-block-styles"},(0,a.createElement)("div",{className:"block-editor-block-styles__variants"},l.map((e=>{const t=e.label||e.name;return(0,a.createElement)(d.Button,{className:c()("block-editor-block-styles__item",{"is-active":s.name===e.name}),key:e.name,variant:"secondary",label:t,onMouseEnter:()=>E(e),onFocus:()=>E(e),onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:t=>{bc.ENTER!==t.keyCode&&bc.SPACE!==t.keyCode||(t.preventDefault(),k(e))},onClick:()=>k(e),role:"button",tabIndex:"0"},(0,a.createElement)(d.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text"},t))}))),m&&!v&&(0,a.createElement)(Tb,{scope:o,className:"block-editor-block-styles__preview-panel",style:{top:h},onMouseLeave:()=>E(null)},(0,a.createElement)(Pb,{activeStyle:s,className:y,genericPreviewBlock:f,style:m})))}Ob.Slot=function(e){let{scope:t}=e;return(0,a.createElement)(d.Slot,{name:`BlockStylesPreviewPanel/${t}`})};var Nb=Ob;var Rb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));var Fb=function(e){let{icon:t=Rb,label:n=(0,m.__)("Choose variation"),instructions:r=(0,m.__)("Select a variation to start with."),variations:o,onSelect:i,allowSkip:l}=e;const s=c()("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,a.createElement)(d.Placeholder,{icon:t,label:n,instructions:r,className:s},(0,a.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,m.__)("Block variations")},o.map((e=>(0,a.createElement)("li",{key:e.name},(0,a.createElement)(d.Button,{variant:"secondary",icon:e.icon,iconSize:48,onClick:()=>i(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,a.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))))),l&&(0,a.createElement)("div",{className:"block-editor-block-variation-picker__skip"},(0,a.createElement)(d.Button,{variant:"link",onClick:()=>i()},(0,m.__)("Skip"))))};var Mb=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"}));const Db="carousel",Lb="grid",Ub=e=>{let{onStartBlank:t,onBlockPatternSelect:n}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__actions"},t&&(0,a.createElement)(d.Button,{onClick:t},(0,m.__)("Start blank")),(0,a.createElement)(d.Button,{variant:"primary",onClick:n},(0,m.__)("Choose")))},jb=e=>{let{handlePrevious:t,handleNext:n,activeSlide:r,totalSlides:o}=e;return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__navigation"},(0,a.createElement)(d.Button,{icon:jd,label:(0,m.__)("Previous pattern"),onClick:t,disabled:0===r}),(0,a.createElement)(d.Button,{icon:Ud,label:(0,m.__)("Next pattern"),onClick:n,disabled:r===o-1}))};var Vb=e=>{let{viewMode:t,setViewMode:n,handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l,onBlockPatternSelect:s,onStartBlank:c}=e;const u=t===Db,p=(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__display-controls"},(0,a.createElement)(d.Button,{icon:ur,label:(0,m.__)("Carousel view"),onClick:()=>n(Db),isPressed:u}),(0,a.createElement)(d.Button,{icon:Mb,label:(0,m.__)("Grid view"),onClick:()=>n(Lb),isPressed:t===Lb}));return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__toolbar"},u&&(0,a.createElement)(jb,{handlePrevious:r,handleNext:o,activeSlide:i,totalSlides:l}),p,u&&(0,a.createElement)(Ub,{onBlockPatternSelect:s,onStartBlank:c}))};var zb=function(e,t,n){return(0,f.useSelect)((r=>{const{getBlockRootClientId:o,__experimentalGetPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:l}=r(qn),a=o(e);return n?l(a).filter(n):i(t,a)}),[e,t,n])};const Gb=e=>{let{viewMode:t,activeSlide:n,patterns:r,onBlockPatternSelect:o,height:i}=e;const s=(0,d.__unstableUseCompositeState)(),c="block-editor-block-pattern-setup__container";if(t===Db){const e=new Map([[n,"active-slide"],[n-1,"previous-slide"],[n+1,"next-slide"]]);return(0,a.createElement)("div",{className:"block-editor-block-pattern-setup__carousel",style:{height:i}},(0,a.createElement)("div",{className:c},(0,a.createElement)("ul",{className:"carousel-container"},r.map(((t,n)=>(0,a.createElement)(Wb,{className:e.get(n)||"",key:t.name,pattern:t,minHeight:i}))))))}return(0,a.createElement)("div",{style:{height:i},className:"block-editor-block-pattern-setup__grid"},(0,a.createElement)(d.__unstableComposite,l({},s,{role:"listbox",className:c,"aria-label":(0,m.__)("Patterns list")}),r.map((e=>(0,a.createElement)(Hb,{key:e.name,pattern:e,onSelect:o,composite:s})))))};function Hb(e){let{pattern:t,onSelect:n,composite:r}=e;const o="block-editor-block-pattern-setup-list",{blocks:i,description:s,viewportWidth:c=700}=t,u=(0,p.useInstanceId)(Hb,`${o}__item-description`);return(0,a.createElement)("div",{className:`${o}__list-item`,"aria-label":t.title,"aria-describedby":t.description?u:void 0},(0,a.createElement)(d.__unstableCompositeItem,l({role:"option",as:"div"},r,{className:`${o}__item`,onClick:()=>n(i)}),(0,a.createElement)(cp,{blocks:i,viewportWidth:c})),!!s&&(0,a.createElement)(d.VisuallyHidden,{id:u},s))}function Wb(e){let{className:t,pattern:n,minHeight:r}=e;const{blocks:o,title:i,description:l}=n,s=(0,p.useInstanceId)(Wb,"block-editor-block-pattern-setup-list__item-description");return(0,a.createElement)("li",{className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":l?s:void 0},(0,a.createElement)(cp,{blocks:o,__experimentalMinHeight:r}),!!l&&(0,a.createElement)(d.VisuallyHidden,{id:s},l))}var $b=e=>{let{clientId:t,blockName:n,filterPatternsFn:r,startBlankComponent:i,onBlockPatternSelect:l}=e;const[s,c]=(0,a.useState)(Db),[u,d]=(0,a.useState)(0),[y,m]=(0,a.useState)(!1),{replaceBlock:g}=(0,f.useDispatch)(qn),h=zb(t,n,r),[b,{height:v}]=(0,p.useResizeObserver)();if(null==h||!h.length||y)return i;const _=l||(e=>{const n=e.map((e=>(0,o.cloneBlock)(e)));g(t,n)}),k=i?()=>{m(!0)}:void 0;return(0,a.createElement)(a.Fragment,null,b,(0,a.createElement)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`},(0,a.createElement)(Gb,{viewMode:s,activeSlide:u,patterns:h,onBlockPatternSelect:_,height:v-120}),(0,a.createElement)(Vb,{viewMode:s,setViewMode:c,activeSlide:u,totalSlides:h.length,handleNext:()=>{d((e=>e+1))},handlePrevious:()=>{d((e=>e-1))},onBlockPatternSelect:()=>{_(h[u].blocks)},onStartBlank:k})))};function Kb(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;return(0,a.createElement)("fieldset",{className:t},(0,a.createElement)(d.VisuallyHidden,{as:"legend"},(0,m.__)("Transform to variation")),o.map((e=>(0,a.createElement)(d.Button,{key:e.name,icon:e.icon,isPressed:r===e.name,label:r===e.name?e.title:(0,m.sprintf)((0,m.__)("Transform to %s"),e.title),onClick:()=>n(e.name),"aria-label":e.title,showTooltip:!0}))))}function qb(e){let{className:t,onSelectVariation:n,selectedValue:r,variations:o}=e;const i=o.map((e=>{let{name:t,title:n,description:r}=e;return{value:t,label:n,info:r}}));return(0,a.createElement)(d.DropdownMenu,{className:t,label:(0,m.__)("Transform to variation"),text:(0,m.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${t}__popover`},icon:zd,toggleProps:{iconPosition:"right"}},(()=>(0,a.createElement)("div",{className:`${t}__container`},(0,a.createElement)(d.MenuGroup,null,(0,a.createElement)(d.MenuItemsChoice,{choices:i,value:r,onSelect:n})))))}var Jb=function(e){let{blockClientId:t}=e;const{updateBlockAttributes:n}=(0,f.useDispatch)(qn),{activeBlockVariation:r,variations:i}=(0,f.useSelect)((e=>{const{getActiveBlockVariation:n,getBlockVariations:r}=e(o.store),{getBlockName:i,getBlockAttributes:l}=e(qn),a=t&&i(t);return{activeBlockVariation:n(a,l(t)),variations:a&&r(a,"transform")}}),[t]),l=null==r?void 0:r.name,s=(0,a.useMemo)((()=>{const e=new Set;return!!i&&(i.forEach((t=>{t.icon&&e.add(t.icon)})),e.size===i.length)}),[i]);if(null==i||!i.length)return null;const c=s?Kb:qb;return(0,a.createElement)(c,{className:"block-editor-block-variation-transforms",onSelectVariation:e=>{n(t,{...i.find((t=>{let{name:n}=t;return n===e})).attributes})},selectedValue:l,variations:i})},Yb=(0,p.createHigherOrderComponent)((e=>t=>{const n=Cr("color.palette"),r=!Cr("color.custom"),o=void 0===t.colors?n:t.colors,i=void 0===t.disableCustomColors?r:t.disableCustomColors,s=!(0,u.isEmpty)(o)||!i;return(0,a.createElement)(e,l({},t,{colors:o,disableCustomColors:i,hasColorsToChoose:s}))}),"withColorContext"),Qb=Yb(d.ColorPalette);function Xb(e){let{onChange:t,value:n,...r}=e;return(0,a.createElement)(Uy,l({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Zb=window.wp.date;const ev=new Date(2022,0,25);function tv(e){let{format:t,defaultFormat:n,onChange:r}=e;return(0,a.createElement)("fieldset",{className:"block-editor-date-format-picker"},(0,a.createElement)(d.VisuallyHidden,{as:"legend"},(0,m.__)("Date format")),(0,a.createElement)(d.ToggleControl,{label:(0,a.createElement)(a.Fragment,null,(0,m.__)("Default format"),(0,a.createElement)("span",{className:"block-editor-date-format-picker__default-format-toggle-control__hint"},(0,Zb.dateI18n)(n,ev))),checked:!t,onChange:e=>r(e?null:n)}),t&&(0,a.createElement)(nv,{format:t,onChange:r}))}function nv(e){var t;let{format:n,onChange:r}=e;const o=(0,u.uniq)(["Y-m-d",(0,m._x)("n/j/Y","short date format"),(0,m._x)("n/j/Y g:i A","short date format with time"),(0,m._x)("M j, Y","medium date format"),(0,m._x)("M j, Y g:i A","medium date format with time"),(0,m._x)("F j, Y","long date format")]),i=o.map(((e,t)=>({key:`suggested-${t}`,name:(0,Zb.dateI18n)(e,ev),format:e}))),l={key:"custom",name:(0,m.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",__experimentalHint:(0,m.__)("Enter your own date format")},[s,c]=(0,a.useState)((()=>!!n&&!o.includes(n)));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.BaseControl,{className:"block-editor-date-format-picker__custom-format-select-control"},(0,a.createElement)(d.CustomSelectControl,{label:(0,m.__)("Choose a format"),options:[...i,l],value:s?l:null!==(t=i.find((e=>e.format===n)))&&void 0!==t?t:l,onChange:e=>{let{selectedItem:t}=e;t===l?c(!0):(c(!1),r(t.format))}})),s&&(0,a.createElement)(d.TextControl,{label:(0,m.__)("Custom format"),hideLabelFromVision:!0,help:(0,a.createInterpolateElement)((0,m.__)("Enter a date or time format string."),{Link:(0,a.createElement)(d.ExternalLink,{href:(0,m.__)("https://wordpress.org/support/article/formatting-date-and-time/")})}),value:n,onChange:e=>r(e)}))}const rv=(0,m.__)("(%s: color %s)"),ov=(0,m.__)("(%s: gradient %s)"),iv=["colors","disableCustomColors","gradients","disableCustomGradients"],lv=e=>{let{colors:t,gradients:n,settings:r}=e;return r.map(((e,r)=>{let o,{colorValue:i,gradientValue:l,label:s,colors:c,gradients:u}=e;if(!i&&!l)return null;if(i){const e=Hy(c||t,i);o=(0,m.sprintf)(rv,s.toLowerCase(),e&&e.name||i)}else{const e=Sm(u||n,i);o=(0,m.sprintf)(ov,s.toLowerCase(),e&&e.name||l)}return(0,a.createElement)(d.ColorIndicator,{key:r,colorValue:i||l,"aria-label":o})}))},av=e=>{let{className:t,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,children:s,settings:p,title:f,showTitle:y=!0,__experimentalHasMultipleOrigins:m,__experimentalIsRenderedInSidebar:g,enableAlpha:h,...b}=e;if((0,u.isEmpty)(n)&&(0,u.isEmpty)(r)&&o&&i&&(0,u.every)(p,(e=>(0,u.isEmpty)(e.colors)&&(0,u.isEmpty)(e.gradients)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients))))return null;const v=(0,a.createElement)("span",{className:"block-editor-panel-color-gradient-settings__panel-title"},f,(0,a.createElement)(lv,{colors:n,gradients:r,settings:p}));return(0,a.createElement)(d.PanelBody,l({className:c()("block-editor-panel-color-gradient-settings",t),title:y?v:void 0},b),(0,a.createElement)(jy,{settings:p,colors:n,gradients:r,disableCustomColors:o,disableCustomGradients:i,__experimentalHasMultipleOrigins:m,__experimentalIsRenderedInSidebar:g,enableAlpha:h}),!!s&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.__experimentalSpacer,{marginY:4})," ",s))},sv=e=>{const t=Vy();return t.colors=Cr("color.palette"),t.gradients=Cr("color.gradients"),(0,a.createElement)(av,l({},t,e))},cv=e=>{const t=zy();return(0,a.createElement)(av,l({},t,e))};var uv=e=>(0,u.every)(iv,(t=>e.hasOwnProperty(t)))?(0,a.createElement)(av,e):e.__experimentalHasMultipleOrigins?(0,a.createElement)(cv,e):(0,a.createElement)(sv,e),pv=function(e,t){return pv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},pv(e,t)};var dv=function(){return dv=Object.assign||function(e){for(var t,n=1,r=arguments.length;nu*o?{width:u*o,height:u}:{width:c,height:c/o}}function gv(e,t,n,r,o){void 0===o&&(o=0);var i=Cv(t.width,t.height,o),l=i.width,a=i.height;return{x:hv(e.x,l,n.width,r),y:hv(e.y,a,n.height,r)}}function hv(e,t,n,r){var o=t*r/2-n/2;return Math.min(o,Math.max(e,-o))}function bv(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function vv(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function _v(e,t,n,r,o,i,l){void 0===i&&(i=0),void 0===l&&(l=!0);var a=l&&0===i?kv:Ev,s={x:a(100,((t.width-n.width/o)/2-e.x/o)/t.width*100),y:a(100,((t.height-n.height/o)/2-e.y/o)/t.height*100),width:a(100,n.width/t.width*100/o),height:a(100,n.height/t.height*100/o)},c=Math.round(a(t.naturalWidth,s.width*t.naturalWidth/100)),u=Math.round(a(t.naturalHeight,s.height*t.naturalHeight/100)),p=t.naturalWidth>=t.naturalHeight*r?{width:Math.round(u*r),height:u}:{width:c,height:Math.round(c/r)};return{croppedAreaPercentages:s,croppedAreaPixels:dv(dv({},p),{x:Math.round(a(t.naturalWidth-p.width,s.x*t.naturalWidth/100)),y:Math.round(a(t.naturalHeight-p.height,s.y*t.naturalHeight/100))})}}function kv(e,t){return Math.min(e,Math.max(0,t))}function Ev(e,t){return t}function Sv(e,t,n){var r=t.width/t.naturalWidth,o=function(e,t,n){var r=t.width/t.naturalWidth;if(n)return n.height>n.width?n.height/r/e.height:n.width/r/e.width;var o=e.width/e.height;return t.naturalWidth>=t.naturalHeight*o?t.naturalHeight/e.height:t.naturalWidth/e.width}(e,t,n),i=r*o;return{crop:{x:((t.naturalWidth-e.width)/2-e.x)*i,y:((t.naturalHeight-e.height)/2-e.y)*i},zoom:o}}function wv(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Av(e,t,n,r,o){var i=Math.cos,l=Math.sin,a=o*Math.PI/180;return[(e-n)*i(a)-(t-r)*l(a)+n,(e-n)*l(a)+(t-r)*i(a)+r]}function Cv(e,t,n){var r=e/2,o=t/2,i=[Av(0,0,r,o,n),Av(e,0,r,o,n),Av(e,t,r,o,n),Av(0,t,r,o,n)],l=Math.min.apply(Math,i.map((function(e){return e[0]}))),a=Math.max.apply(Math,i.map((function(e){return e[0]}))),s=Math.min.apply(Math,i.map((function(e){return e[1]}))),c=Math.max.apply(Math,i.map((function(e){return e[1]})));return{width:a-l,height:c-s}}function Iv(){for(var e=[],t=0;t0})).join(" ").trim()}var xv=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=null,n.videoRef=null,n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){document.removeEventListener("mousemove",n.onMouseMove),document.removeEventListener("mouseup",n.onDragStopped),document.removeEventListener("touchmove",n.onTouchMove),document.removeEventListener("touchend",n.onDragStopped)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){n.computeSizes(),n.emitCropData(),n.setInitialCrop(),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(){var e=n.props,t=e.initialCroppedAreaPixels,r=e.cropSize;if(t){var o=Sv(t,n.mediaSize,r),i=o.crop,l=o.zoom;n.props.onCropChange(i),n.props.onZoomChange&&n.props.onZoomChange(l)}},n.computeSizes=function(){var e,t,r,o,i,l,a=n.imageRef||n.videoRef;if(a&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.mediaSize={width:a.offsetWidth,height:a.offsetHeight,naturalWidth:(null===(e=n.imageRef)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef)||void 0===t?void 0:t.videoWidth)||0,naturalHeight:(null===(r=n.imageRef)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef)||void 0===o?void 0:o.videoHeight)||0};var s=n.props.cropSize?n.props.cropSize:mv(a.offsetWidth,a.offsetHeight,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===s.height&&(null===(l=n.state.cropSize)||void 0===l?void 0:l.width)===s.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(s),n.setState({cropSize:s},n.recomputeCropPosition)}},n.onMouseDown=function(e){e.preventDefault(),document.addEventListener("mousemove",n.onMouseMove),document.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){document.addEventListener("touchmove",n.onTouchMove,{passive:!1}),document.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=dv({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&window.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=window.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},l=n.props.restrictPosition?gv(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(l)}}))},n.onDragStopped=function(){var e,t;n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){e.preventDefault();var r=t.getMousePoint(e),o=yv()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=window.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,l=o.zoom;return{x:(t+i.x)/l,y:(r+i.y)/l}},n.setNewZoom=function(e,t){if(n.state.cropSize&&n.props.onZoomChange){var r=n.getPointOnContainer(t),o=n.getPointOnMedia(r),i=Math.min(n.props.maxZoom,Math.max(e,n.props.minZoom)),l={x:o.x*i-r.x,y:o.y*i-r.y},a=n.props.restrictPosition?gv(l,n.mediaSize,n.state.cropSize,i,n.props.rotation):l;n.props.onCropChange(a),n.props.onZoomChange(i)}},n.getCropData=function(){return n.state.cropSize?_v(n.props.restrictPosition?gv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?gv(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){function n(){this.constructor=e}pv(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.computeSizes),this.containerRef&&(this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.preventZoomSafari),this.containerRef.addEventListener("gesturechange",this.preventZoomSafari)),this.props.disableAutomaticStylesInjection||(this.styleRef=document.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",document.head.appendChild(this.styleRef)),this.imageRef&&this.imageRef.complete&&this.onMediaLoad()},t.prototype.componentWillUnmount=function(){var e;window.removeEventListener("resize",this.computeSizes),this.containerRef&&(this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.containerRef.removeEventListener("gesturechange",this.preventZoomSafari)),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,l,a,s,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(l=this.props.crop)||void 0===l?void 0:l.x)&&(null===(a=e.crop)||void 0===a?void 0:a.y)===(null===(s=this.props.crop)||void 0===s?void 0:s.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=bv(n,r),this.lastPinchRotation=vv(n,r),this.onDragStart(wv(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=wv(r,o);this.onDrag(i),this.rafPinchTimeout&&window.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=window.requestAnimationFrame((function(){var e=bv(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i),n.lastPinchDistance=e;var l=vv(r,o),a=n.props.rotation+(l-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(a),n.lastPinchRotation=l}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,r=t.video,o=t.mediaProps,i=t.transform,l=t.crop,a=l.x,s=l.y,c=t.rotation,u=t.zoom,p=t.cropShape,d=t.showGrid,f=t.style,y=f.containerStyle,m=f.cropAreaStyle,g=f.mediaStyle,h=t.classes,b=h.containerClassName,v=h.cropAreaClassName,_=h.mediaClassName,k=t.objectFit;return _i().createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:y,className:Iv("reactEasyCrop_Container",b)},n?_i().createElement("img",dv({alt:"",className:Iv("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",_)},o,{src:n,ref:function(t){return e.imageRef=t},style:dv(dv({},g),{transform:i||"translate("+a+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),onLoad:this.onMediaLoad})):r&&_i().createElement("video",dv({autoPlay:!0,loop:!0,muted:!0,className:Iv("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",_)},o,{ref:function(t){return e.videoRef=t},onLoadedMetadata:this.onMediaLoad,style:dv(dv({},g),{transform:i||"translate("+a+"px, "+s+"px) rotate("+c+"deg) scale("+u+")"}),controls:!1}),(Array.isArray(r)?r:[{src:r}]).map((function(e){return _i().createElement("source",dv({key:e.src},e))}))),this.state.cropSize&&_i().createElement("div",{style:dv(dv({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Iv("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",d&&"reactEasyCrop_CropAreaGrid",v)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(_i().Component),Bv=xv;const Pv={position:"bottom right",isAlternate:!0};function Tv(e,t){const n=function(e){let{url:t,naturalWidth:n,naturalHeight:r}=e;const[o,l]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,p]=(0,a.useState)({x:0,y:0}),[d,f]=(0,a.useState)(),[y,m]=(0,a.useState)(),[g,h]=(0,a.useState)(),[b,v]=(0,a.useState)(),_=(0,a.useCallback)((()=>{p({x:0,y:0}),f(100),m(0),h(n/r),v(n/r)}),[n,r,p,f,m,h,v]),k=(0,a.useCallback)((()=>{const e=(y+90)%360;let o=n/r;if(y%180==90&&(o=r/n),0===e)return l(),m(e),h(1/g),void p({x:-u.y*o,y:u.x*o});const a=new window.Image;a.src=t,a.onload=function(t){const n=document.createElement("canvas");let r=0,i=0;e%180?(n.width=t.target.height,n.height=t.target.width):(n.width=t.target.width,n.height=t.target.height),90!==e&&180!==e||(r=n.width),270!==e&&180!==e||(i=n.height);const a=n.getContext("2d");a.translate(r,i),a.rotate(e*Math.PI/180),a.drawImage(t.target,0,0),n.toBlob((t=>{l(URL.createObjectURL(t)),m(e),h(1/g),p({x:-u.y*o,y:u.x*o})}))};const s=(0,i.applyFilters)("media.crossOrigin",void 0,t);"string"==typeof s&&(a.crossOrigin=s)}),[y,n,r,l,m,h,p]);return(0,a.useMemo)((()=>({editedUrl:o,setEditedUrl:l,crop:s,setCrop:c,position:u,setPosition:p,zoom:d,setZoom:f,rotation:y,setRotation:m,rotateClockwise:k,aspect:g,setAspect:h,defaultAspect:b,initializeTransformValues:_})),[o,l,s,c,u,p,d,f,y,m,k,g,h,b,_])}(e),{initializeTransformValues:r}=n;return(0,a.useEffect)((()=>{t&&r()}),[t,r]),n}const Ov=(0,a.createContext)({}),Nv=()=>(0,a.useContext)(Ov);function Rv(e){let{id:t,url:n,naturalWidth:r,naturalHeight:o,isEditing:i,onFinishEditing:l,onSaveImage:s,children:c}=e;const u=Tv({url:n,naturalWidth:r,naturalHeight:o},i),p=function(e){let{crop:t,rotation:n,height:r,width:o,aspect:i,url:l,id:s,onSaveImage:c,onFinishEditing:u}=e;const{createErrorNotice:p}=(0,f.useDispatch)(xp.store),[d,y]=(0,a.useState)(!1),g=(0,a.useCallback)((()=>{y(!1),u()}),[y,u]),h=(0,a.useCallback)((()=>{y(!0);let e={};(t.width<99.9||t.height<99.9)&&(e=t),n>0&&(e.rotation=n),e.src=l,Hh()({path:`/wp/v2/media/${s}/edit`,method:"POST",data:e}).then((e=>{c({id:e.id,url:e.source_url,height:r&&o?o/i:void 0})})).catch((e=>{p((0,m.sprintf)((0,m.__)("Could not edit image. %s"),e.message),{id:"image-editing-error",type:"snackbar"})})).finally((()=>{y(!1),u()}))}),[y,t,n,r,o,i,l,c,p,y,u]);return(0,a.useMemo)((()=>({isInProgress:d,apply:h,cancel:g})),[d,h,g])}({id:t,url:n,onSaveImage:s,onFinishEditing:l,...u}),d=(0,a.useMemo)((()=>({...u,...p})),[u,p]);return(0,a.createElement)(Ov.Provider,{value:d},c)}function Fv(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l}=e;const{isInProgress:s,editedUrl:u,position:p,zoom:f,aspect:y,setPosition:m,setCrop:g,setZoom:h,rotation:b}=Nv();let v=r||o*i/l;return b%180==90&&(v=o*l/i),(0,a.createElement)("div",{className:c()("wp-block-image__crop-area",{"is-applying":s}),style:{width:n||o,height:v}},(0,a.createElement)(Bv,{image:u||t,disabled:s,minZoom:1,maxZoom:3,crop:p,zoom:f/100,aspect:y,onCropChange:m,onCropComplete:e=>{g(e)},onZoomChange:e=>{h(100*e)}}),s&&(0,a.createElement)(d.Spinner,null))}var Mv=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));function Dv(){const{isInProgress:e,zoom:t,setZoom:n}=Nv();return(0,a.createElement)(d.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:Pv,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,a.createElement)(d.ToolbarButton,{icon:Mv,label:(0,m.__)("Zoom"),onClick:r,"aria-expanded":n,disabled:e})},renderContent:()=>(0,a.createElement)(d.RangeControl,{label:(0,m.__)("Zoom"),min:100,max:300,value:Math.round(t),onChange:n})})}var Lv=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}));function Uv(e){let{aspectRatios:t,isDisabled:n,label:r,onClick:o,value:i}=e;return(0,a.createElement)(d.MenuGroup,{label:r},t.map((e=>{let{title:t,aspect:r}=e;return(0,a.createElement)(d.MenuItem,{key:r,disabled:n,onClick:()=>{o(r)},role:"menuitemradio",isSelected:r===i,icon:r===i?lf:void 0},t)})))}function jv(e){let{toggleProps:t}=e;const{isInProgress:n,aspect:r,setAspect:o,defaultAspect:i}=Nv();return(0,a.createElement)(d.DropdownMenu,{icon:Lv,label:(0,m.__)("Aspect Ratio"),popoverProps:Pv,toggleProps:t,className:"wp-block-image__aspect-ratio"},(e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Uv,{isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("Original"),aspect:i},{title:(0,m.__)("Square"),aspect:1}]}),(0,a.createElement)(Uv,{label:(0,m.__)("Landscape"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("16:10"),aspect:1.6},{title:(0,m.__)("16:9"),aspect:16/9},{title:(0,m.__)("4:3"),aspect:4/3},{title:(0,m.__)("3:2"),aspect:1.5}]}),(0,a.createElement)(Uv,{label:(0,m.__)("Portrait"),isDisabled:n,onClick:e=>{o(e),t()},value:r,aspectRatios:[{title:(0,m.__)("10:16"),aspect:.625},{title:(0,m.__)("9:16"),aspect:9/16},{title:(0,m.__)("3:4"),aspect:3/4},{title:(0,m.__)("2:3"),aspect:2/3}]}))}))}var Vv=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));function zv(){const{isInProgress:e,rotateClockwise:t}=Nv();return(0,a.createElement)(d.ToolbarButton,{icon:Vv,label:(0,m.__)("Rotate"),onClick:t,disabled:e})}function Gv(){const{isInProgress:e,apply:t,cancel:n}=Nv();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ToolbarButton,{onClick:t,disabled:e},(0,m.__)("Apply")),(0,a.createElement)(d.ToolbarButton,{onClick:n},(0,m.__)("Cancel")))}function Hv(e){let{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Fv,{url:t,width:n,height:r,clientWidth:o,naturalHeight:i,naturalWidth:l}),(0,a.createElement)(or,null,(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(Dv,null),(0,a.createElement)(d.ToolbarItem,null,(e=>(0,a.createElement)(jv,{toggleProps:e}))),(0,a.createElement)(zv,null)),(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(Gv,null))))}const Wv=[25,50,75,100];function $v(e){let{imageWidth:t,imageHeight:n,imageSizeOptions:r=[],isResizable:o=!0,slug:i,width:l,height:s,onChange:c,onChangeImage:p=u.noop}=e;const{currentHeight:f,currentWidth:y,updateDimension:g,updateDimensions:h}=function(e,t,n,r,o){var i,l;const[s,c]=(0,a.useState)(null!==(i=null!=t?t:r)&&void 0!==i?i:""),[u,p]=(0,a.useState)(null!==(l=null!=e?e:n)&&void 0!==l?l:"");return(0,a.useEffect)((()=>{void 0===t&&void 0!==r&&c(r),void 0===e&&void 0!==n&&p(n)}),[r,n]),(0,a.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(s)&&c(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(u)&&p(e)}),[t,e]),{currentHeight:u,currentWidth:s,updateDimension:(e,t)=>{"width"===e?c(t):p(t),o({[e]:""===t?void 0:parseInt(t,10)})},updateDimensions:(e,t)=>{p(null!=e?e:n),c(null!=t?t:r),o({height:e,width:t})}}}(s,l,n,t,c);return(0,a.createElement)(a.Fragment,null,!(0,u.isEmpty)(r)&&(0,a.createElement)(d.SelectControl,{label:(0,m.__)("Image size"),value:i,options:r,onChange:p}),o&&(0,a.createElement)("div",{className:"block-editor-image-size-control"},(0,a.createElement)("p",{className:"block-editor-image-size-control__row"},(0,m.__)("Image dimensions")),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(d.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:(0,m.__)("Width"),value:y,min:1,onChange:e=>g("width",e)}),(0,a.createElement)(d.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:(0,m.__)("Height"),value:f,min:1,onChange:e=>g("height",e)})),(0,a.createElement)("div",{className:"block-editor-image-size-control__row"},(0,a.createElement)(d.ButtonGroup,{"aria-label":(0,m.__)("Image size presets")},Wv.map((e=>{const r=Math.round(t*(e/100)),o=Math.round(n*(e/100)),i=y===r&&f===o;return(0,a.createElement)(d.Button,{key:e,isSmall:!0,variant:i?"primary":void 0,isPressed:i,onClick:()=>h(o,r)},e,"%")}))),(0,a.createElement)(d.Button,{isSmall:!0,onClick:()=>h()},(0,m.__)("Reset")))))}var Kv=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(D.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));var qv=e=>{let{value:t,onChange:n=u.noop,settings:r}=e;if(!r||!r.length)return null;const o=e=>r=>{n({...t,[e.id]:r})},i=r.map((e=>(0,a.createElement)(d.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:o(e),checked:!!t&&!!t[e.id]})));return(0,a.createElement)("fieldset",{className:"block-editor-link-control__settings"},(0,a.createElement)(d.VisuallyHidden,{as:"legend"},(0,m.__)("Currently selected link settings")),i)},Jv=n(5425),Yv=n.n(Jv);class Qv extends a.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,a.createRef)(),this.inputRef=(0,a.createRef)(),this.updateSuggestions=(0,u.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:r,__experimentalShowInitialSuggestions:o=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Yv()(this.suggestionNodes[n],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100)),e.value===r||this.props.disableSuggestions||this.isUpdatingSuggestions||(null!=r&&r.length?this.updateSuggestions(r):o&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{suggestions:e}=this.state,{__experimentalShowInitialSuggestions:t=!1,value:n}=this.props;return!this.isUpdatingSuggestions&&t&&!(n&&n.length)&&!(e&&e.length)}updateSuggestions(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{__experimentalFetchLinkSuggestions:n,__experimentalHandleURLSuggestions:r}=this.props;if(!n)return;const o=!(null!==(e=t)&&void 0!==e&&e.length);if(t=t.trim(),!o&&(t.length<2||!r&&(0,nd.isURL)(t)))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});const i=n(t,{isInitialSuggestions:o});i.then((e=>{this.suggestionsRequest===i&&(this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length}),e.length?this.props.debouncedSpeak((0,m.sprintf)((0,m._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):this.props.debouncedSpeak((0,m.__)("No results."),"assertive"),this.isUpdatingSuggestions=!1)})).catch((()=>{this.suggestionsRequest===i&&(this.setState({loading:!1}),this.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}onChange(e){const t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(n)}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:r,loading:o}=this.state;if(!t||!r.length||o){switch(e.keyCode){case bc.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case bc.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case bc.ENTER:this.props.onSubmit&&this.props.onSubmit(null,e)}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case bc.UP:{e.preventDefault();const t=n?n-1:r.length-1;this.setState({selectedSuggestion:t});break}case bc.DOWN:{e.preventDefault();const t=null===n||n===r.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case bc.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,m.__)("Link selected.")));break;case bc.ENTER:null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps(e,t){let{value:n,instanceId:r,disableSuggestions:o,__experimentalShowInitialSuggestions:i=!1}=e,{showSuggestions:l}=t,a=l;const s=n&&n.length;return i||s||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:`block-editor-url-input-suggestions-${r}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${r}`}}render(){return(0,a.createElement)(a.Fragment,null,this.renderControl(),this.renderSuggestions())}renderControl(){const{label:e,className:t,isFullWidth:n,instanceId:r,placeholder:o=(0,m.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:l=""}=this.props,{loading:s,showSuggestions:u,selectedSuggestion:p,suggestionsListboxId:f,suggestionOptionIdPrefix:y}=this.state,g={id:`url-input-control-${r}`,label:e,className:c()("block-editor-url-input",t,{"is-full-width":n})},h={value:l,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:o,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,m.__)("URL"),"aria-expanded":u,"aria-autocomplete":"list","aria-owns":f,"aria-activedescendant":null!==p?`${y}-${p}`:void 0,ref:this.inputRef};return i?i(g,h,s):(0,a.createElement)(d.BaseControl,g,(0,a.createElement)("input",h),s&&(0,a.createElement)(d.Spinner,null))}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t,value:n="",__experimentalShowInitialSuggestions:r=!1}=this.props,{showSuggestions:o,suggestions:i,selectedSuggestion:s,suggestionsListboxId:p,suggestionOptionIdPrefix:f,loading:y}=this.state,m={id:p,ref:this.autocompleteRef,role:"listbox"},g=(e,t)=>({role:"option",tabIndex:"-1",id:`${f}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===s});return(0,u.isFunction)(t)&&o&&i.length?t({suggestions:i,selectedSuggestion:s,suggestionsListProps:m,buildSuggestionItemProps:g,isLoading:y,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:r&&!(n&&n.length)}):!(0,u.isFunction)(t)&&o&&i.length?(0,a.createElement)(d.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,a.createElement)("div",l({},m,{className:c()("block-editor-url-input__suggestions",`${e}__suggestions`)}),i.map(((e,t)=>(0,a.createElement)(d.Button,l({},g(0,t),{key:e.id,className:c()("block-editor-url-input__suggestion",{"is-selected":t===s}),onClick:()=>this.handleOnClick(e)}),e.title))))):null}}var Xv=(0,p.compose)(p.withSafeTimeout,d.withSpokenMessages,p.withInstanceId,(0,f.withSelect)(((e,t)=>{if((0,u.isFunction)(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(qn);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(Qv);var Zv=e=>{let t,{searchTerm:n,onClick:r,itemProps:o,isSelected:i,buttonText:s}=e;return n?(t=s?(0,u.isFunction)(s)?s(n):s:(0,a.createInterpolateElement)((0,m.sprintf)((0,m.__)("Create: %s"),n),{mark:(0,a.createElement)("mark",null)}),(0,a.createElement)(d.Button,l({},o,{className:c()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":i}),onClick:r}),(0,a.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:Bc}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null};var e_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.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"}));var t_=e=>{let{itemProps:t,suggestion:n,isSelected:r=!1,onClick:o,isURL:i=!1,searchTerm:s="",shouldShowType:u=!1}=e;return(0,a.createElement)(d.Button,l({},t,{onClick:o,className:c()("block-editor-link-control__search-item",{"is-selected":r,"is-url":i,"is-entity":!i})}),i&&(0,a.createElement)(wo,{className:"block-editor-link-control__search-item-icon",icon:e_}),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-title"},(0,a.createElement)(d.TextHighlight,{text:n.title,highlight:s})),(0,a.createElement)("span",{"aria-hidden":!i,className:"block-editor-link-control__search-item-info"},!i&&((0,nd.filterURLForDisplay)((0,nd.safeDecodeURI)(n.url))||""),i&&(0,m.__)("Press ENTER to add this link"))),u&&n.type&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-type"},function(e){if(e.isFrontPage)return"front page";return"post_tag"===e.type?"tag":e.type}(n)))};const n_="__CREATE__",r_=[{id:"opensInNewTab",title:(0,m.__)("Open in new tab")}];function o_(e){let{instanceId:t,withCreateSuggestion:n,currentInputValue:r,handleSuggestionClick:o,suggestionsListProps:i,buildSuggestionItemProps:s,suggestions:u,selectedSuggestion:p,isLoading:f,isInitialSuggestions:y,createSuggestionButtonText:g,suggestionsQuery:h}=e;const b=c()("block-editor-link-control__search-results",{"is-loading":f}),v=["url","mailto","tel","internal"],_=1===u.length&&v.includes(u[0].type.toLowerCase()),k=n&&!_&&!y,E=!(null!=h&&h.type),S=`block-editor-link-control-search-results-label-${t}`,w=y?(0,m.__)("Recently updated"):(0,m.sprintf)((0,m.__)('Search results for "%s"'),r),A=(0,a.createElement)(y?a.Fragment:d.VisuallyHidden,{},(0,a.createElement)("span",{className:"block-editor-link-control__search-results-label",id:S},w));return(0,a.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},A,(0,a.createElement)("div",l({},i,{className:b,"aria-labelledby":S}),u.map(((e,t)=>k&&n_===e.type?(0,a.createElement)(Zv,{searchTerm:r,buttonText:g,onClick:()=>o(e),key:e.type,itemProps:s(e,t),isSelected:t===p}):n_===e.type?null:(0,a.createElement)(t_,{key:`${e.id}-${e.type}`,itemProps:s(e,t),suggestion:e,index:t,onClick:()=>{o(e)},isSelected:t===p,isURL:v.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:E,isFrontPage:null==e?void 0:e.isFrontPage})))))}function i_(e){const t=(0,u.startsWith)(e,"#");return(0,nd.isURL)(e)||e&&e.includes("www.")||t}const l_=()=>Promise.resolve([]),a_=e=>{let t="URL";const n=(0,nd.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),(0,u.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,nd.prependHTTP)(e):e,type:t}])};function s_(e,t,n,r){const{fetchSearchSuggestions:o,pageOnFront:i}=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn);return{pageOnFront:t().pageOnFront,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),l=t?a_:l_;return(0,a.useCallback)(((t,a)=>{let{isInitialSuggestions:s}=a;return i_(t)?l(t,{isInitialSuggestions:s}):(async(e,t,n,r,o,i,l)=>{const{isInitialSuggestions:a}=t;let s=!1,c=await Promise.all([n(e,t),r(e)]);c[0]=c[0].map((e=>Number(e.id)===l?(s=!0,e.isFrontPage=!0,e):e));const u=!e.includes(" ");return c=!s&&u&&i&&!a?c[0].concat(c[1]):c[0],a||i_(e)||!o?c:c.concat({title:e,url:e,type:n_})})(t,{...e,isInitialSuggestions:s},o,l,n,r,i)}),[l,o,n])}const c_=()=>Promise.resolve([]),u_=(0,a.forwardRef)(((e,t)=>{let{value:n,children:r,currentLink:o={},className:i=null,placeholder:l=null,withCreateSuggestion:s=!1,onCreateSuggestion:d=u.noop,onChange:f=u.noop,onSelect:y=u.noop,showSuggestions:g=!0,renderSuggestions:h=(e=>(0,a.createElement)(o_,e)),fetchSuggestions:b=null,allowDirectEntry:v=!0,showInitialSuggestions:_=!1,suggestionsQuery:k={},withURLSuggestion:E=!0,createSuggestionButtonText:S,useLabel:w=!1}=e;const A=s_(k,v,s,E),C=g?b||A:c_,I=(0,p.useInstanceId)(u_),[x,B]=(0,a.useState)(),P=async e=>{let t=e;if(n_!==e.type)(v||t&&Object.keys(t).length>=1)&&y({...(0,u.omit)(o,"id","url"),...t},t);else try{var n;t=await d(e.title),null!==(n=t)&&void 0!==n&&n.url&&y(t)}catch(e){}},T=c()(i,{"has-no-label":!w});return(0,a.createElement)("div",{className:"block-editor-link-control__search-input-container"},(0,a.createElement)(Xv,{label:w?"URL":void 0,className:T,value:n,onChange:(e,t)=>{f(e),B(t)},placeholder:null!=l?l:(0,m.__)("Search or type url"),__experimentalRenderSuggestions:g?e=>h({...e,instanceId:I,withCreateSuggestion:s,currentInputValue:n,createSuggestionButtonText:S,suggestionsQuery:k,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),P(t)}}):null,__experimentalFetchLinkSuggestions:C,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:_,onSubmit:(e,t)=>{var r;const o=e||x;o||null!=n&&null!==(r=n.trim())&&void 0!==r&&r.length?P(o||{url:n}):t.preventDefault()},ref:t}),r)}));var p_=u_;var d_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));var f_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{Slot:y_,Fill:m_}=(0,d.createSlotFill)("BlockEditorLinkControlViewer");function g_(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var h_=function(e){const[t,n]=(0,a.useReducer)(g_,{richData:null,isFetching:!1}),{fetchRichUrlData:r}=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,a.useEffect)((()=>{if(null!=e&&e.length&&r&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,o=t.signal;return r(e,{signal:o}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{o.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function b_(e){var t;let{value:n,onEditClick:r,hasRichPreviews:o=!1,hasUnlinkControl:i=!1,onRemove:l}=e;const s=o?null==n?void 0:n.url:null,{richData:u,isFetching:p}=h_(s),f=u&&Object.keys(u).length,y=n&&(0,nd.filterURLForDisplay)((0,nd.safeDecodeURI)(n.url),16)||"",g=(null==u?void 0:u.title)||(null==n?void 0:n.title)||y,h=!(null!=n&&null!==(t=n.url)&&void 0!==t&&t.length);let b;return b=null!=u&&u.icon?(0,a.createElement)("img",{src:null==u?void 0:u.icon,alt:""}):h?(0,a.createElement)(wo,{icon:d_,size:32}):(0,a.createElement)(wo,{icon:e_}),(0,a.createElement)("div",{"aria-label":(0,m.__)("Currently selected"),"aria-selected":"true",className:c()("block-editor-link-control__search-item",{"is-current":!0,"is-rich":f,"is-fetching":!!p,"is-preview":!0,"is-error":h})},(0,a.createElement)("div",{className:"block-editor-link-control__search-item-top"},(0,a.createElement)("span",{className:"block-editor-link-control__search-item-header"},(0,a.createElement)("span",{className:c()("block-editor-link-control__search-item-icon",{"is-image":null==u?void 0:u.icon})},b),(0,a.createElement)("span",{className:"block-editor-link-control__search-item-details"},h?(0,a.createElement)("span",{className:"block-editor-link-control__search-item-error-notice"},(0,m.__)("Link is empty")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},(0,Zo.__unstableStripHTML)(g)),(null==n?void 0:n.url)&&(0,a.createElement)("span",{className:"block-editor-link-control__search-item-info"},y)))),(0,a.createElement)(d.Button,{icon:f_,label:(0,m.__)("Edit"),className:"block-editor-link-control__search-item-action",onClick:r,iconSize:24}),i&&(0,a.createElement)(d.Button,{icon:om,label:(0,m.__)("Unlink"),className:"block-editor-link-control__search-item-action block-editor-link-control__unlink",onClick:l,iconSize:24}),(0,a.createElement)(y_,{fillProps:n})),(f&&((null==u?void 0:u.image)||(null==u?void 0:u.description))||p)&&(0,a.createElement)("div",{className:"block-editor-link-control__search-item-bottom"},((null==u?void 0:u.image)||p)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.image),className:c()("block-editor-link-control__search-item-image",{"is-placeholder":!(null!=u&&u.image)})},(null==u?void 0:u.image)&&(0,a.createElement)("img",{src:null==u?void 0:u.image,alt:""})),((null==u?void 0:u.description)||p)&&(0,a.createElement)("div",{"aria-hidden":!(null!=u&&u.description),className:c()("block-editor-link-control__search-item-description",{"is-placeholder":!(null!=u&&u.description)})},(null==u?void 0:u.description)&&(0,a.createElement)(d.__experimentalText,{truncate:!0,numberOfLines:"2"},u.description))))}const v_=e=>{let t=!1;return{promise:new Promise(((n,r)=>{e.then((e=>t?r({isCanceled:!0}):n(e)),(e=>r(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};function __(e){var t,n,r;let{searchInputPlaceholder:o,value:i,settings:l=r_,onChange:s=u.noop,onRemove:p,noDirectEntry:f=!1,showSuggestions:y=!0,showInitialSuggestions:g,forceIsEditingLink:h,createSuggestion:b,withCreateSuggestion:v,inputValue:_="",suggestionsQuery:k={},noURLSuggestion:E=!1,createSuggestionButtonText:S,hasRichPreviews:w=!1,hasTextControl:A=!1,renderControlBottom:C=null}=e;void 0===v&&b&&(v=!0);const I=(0,a.useRef)(!0),x=(0,a.useRef)(),B=(0,a.useRef)(),[P,T]=(0,a.useState)((null==i?void 0:i.url)||""),[O,N]=(0,a.useState)((null==i?void 0:i.title)||""),R=_||P,[F,M]=(0,a.useState)(void 0!==h?h:!i||!i.url),D=(0,a.useRef)(!1),L=!(null!=R&&null!==(t=R.trim())&&void 0!==t&&t.length),{createPage:U,isCreatingPage:j,errorMessage:V}=function(e){const t=(0,a.useRef)(),[n,r]=(0,a.useState)(!1),[o,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){r(!0),i(null);try{return t.current=v_(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,m.__)("An unknown error occurred during creation. Please try again.")),e}finally{r(!1)}},isCreatingPage:n,errorMessage:o}}(b);function z(){var e;D.current=!(null===(e=x.current)||void 0===e||!e.contains(x.current.ownerDocument.activeElement)),M(!1)}(0,a.useEffect)((()=>{void 0!==h&&h!==F&&M(h)}),[h]),(0,a.useEffect)((()=>{if(I.current)return void(I.current=!1);const e=null!=B&&B.current?1:0;(Zo.focus.focusable.find(x.current)[e]||x.current).focus(),D.current=!1}),[F,j]),(0,a.useEffect)((()=>{null!=i&&i.title&&i.title!==O&&N(i.title),null!=i&&i.url&&T(i.url)}),[i]);const G=()=>{R===(null==i?void 0:i.url)&&O===(null==i?void 0:i.title)||s({url:R,title:O}),z()},H=p&&i&&!F&&!j,W=!(null==l||!l.length),$=(null==i||null===(n=i.url)||void 0===n||null===(r=n.trim())||void 0===r?void 0:r.length)>0&&A;return(0,a.createElement)("div",{tabIndex:-1,ref:x,className:"block-editor-link-control"},j&&(0,a.createElement)("div",{className:"block-editor-link-control__loading"},(0,a.createElement)(d.Spinner,null)," ",(0,m.__)("Creating"),"…"),(F||!i)&&!j&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:c()({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":$})},$&&(0,a.createElement)(d.TextControl,{ref:B,className:"block-editor-link-control__field block-editor-link-control__text-content",label:"Text",value:O,onChange:N,onKeyDown:e=>{const{keyCode:t}=e;t!==bc.ENTER||L||(e.preventDefault(),G())}}),(0,a.createElement)(p_,{currentLink:i,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:o,value:R,withCreateSuggestion:v,onCreateSuggestion:U,onChange:T,onSelect:e=>{s({...e,title:O||(null==e?void 0:e.title)}),z()},showInitialSuggestions:g,allowDirectEntry:!f,showSuggestions:y,suggestionsQuery:k,withURLSuggestion:!E,createSuggestionButtonText:S,useLabel:$},(0,a.createElement)("div",{className:"block-editor-link-control__search-actions"},(0,a.createElement)(d.Button,{onClick:G,label:(0,m.__)("Submit"),icon:Kv,className:"block-editor-link-control__search-submit",disabled:L})))),V&&(0,a.createElement)(d.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),i&&!F&&!j&&(0,a.createElement)(b_,{key:null==i?void 0:i.url,value:i,onEditClick:()=>M(!0),hasRichPreviews:w,hasUnlinkControl:H,onRemove:p}),W&&(0,a.createElement)("div",{className:"block-editor-link-control__tools"},(0,a.createElement)(qv,{value:i,settings:l,onChange:s})),C&&C())}__.ViewerFill=m_;var k_=__;var E_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));var S_=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));var w_=(0,d.withFilters)("editor.MediaUpload")((()=>null));var A_=function(e){let{fallback:t=null,children:n}=e;const r=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn);return!!t().mediaUpload}),[]);return r?n:t};var C_=(0,p.compose)([(0,f.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(xp.store);return{createNotice:t,removeNotice:n}})),(0,d.withFilters)("editor.MediaReplaceFlow")])((e=>{let{mediaURL:t,mediaId:n,mediaIds:r,allowedTypes:o,accept:i,onError:l,onSelect:s,onSelectURL:c,onFilesUpload:p=u.noop,name:y=(0,m.__)("Replace"),createNotice:g,removeNotice:h,children:b,multiple:v=!1,addToGallery:_,handleUpload:k=!0}=e;const[E,S]=(0,a.useState)(t),w=(0,f.useSelect)((e=>e(qn).getSettings().mediaUpload),[]),A=(0,a.useRef)(),C=(0,u.uniqueId)("block-editor/media-replace-flow/error-notice/"),I=e=>{const t=(0,Zo.__unstableStripHTML)(e);l?l(t):setTimeout((()=>{g("error",t,{speak:!0,id:C,isDismissible:!0})}),1e3)},x=(e,t)=>{t(),S(null==e?void 0:e.url),s(e),(0,Lt.speak)((0,m.__)("The media file has been replaced")),h(C)},B=e=>{e.keyCode===bc.DOWN&&(e.preventDefault(),e.target.click())},P=v&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,a.createElement)(d.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,a.createElement)(d.ToolbarButton,{ref:A,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:B},y)},renderContent:e=>{let{onClose:t}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},(0,a.createElement)(w_,{gallery:P,addToGallery:_,multiple:v,value:v?r:n,onSelect:e=>x(e,t),allowedTypes:o,render:e=>{let{open:t}=e;return(0,a.createElement)(d.MenuItem,{icon:E_,onClick:t},(0,m.__)("Open Media Library"))}}),(0,a.createElement)(A_,null,(0,a.createElement)(d.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!k)return t(),s(n);p(n),w({allowedTypes:o,filesList:n,onFileChange:e=>{let[n]=e;x(n,t)},onError:I})})(e,t)},accept:i,multiple:v,render:e=>{let{openFileDialog:t}=e;return(0,a.createElement)(d.MenuItem,{icon:S_,onClick:()=>{t()}},(0,m.__)("Upload"))}})),b),c&&(0,a.createElement)("form",{className:"block-editor-media-flow__url-input"},(0,a.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},(0,m.__)("Current media URL:")),(0,a.createElement)(k_,{value:{url:E},settings:[],showSuggestions:!1,onChange:e=>{let{url:t}=e;S(t),c(t),A.current.focus()}})))}})}));function I_(e){let{url:t,urlLabel:n,className:r}=e;const o=c()(r,"block-editor-url-popover__link-viewer-url");return t?(0,a.createElement)(d.ExternalLink,{className:o,href:t},n||(0,nd.filterURLForDisplay)((0,nd.safeDecodeURI)(t))):(0,a.createElement)("span",{className:o})}function x_(e){let{additionalControls:t,children:n,renderSettings:r,position:o="bottom center",focusOnMount:i="firstElement",...s}=e;const[c,u]=(0,a.useState)(!1),p=!!r&&c;return(0,a.createElement)(d.Popover,l({className:"block-editor-url-popover",focusOnMount:i,position:o},s),(0,a.createElement)("div",{className:"block-editor-url-popover__input-container"},(0,a.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&(0,a.createElement)(d.Button,{className:"block-editor-url-popover__settings-toggle",icon:zd,label:(0,m.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c})),p&&(0,a.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!p&&(0,a.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}x_.LinkEditor=function(e){let{autocompleteRef:t,className:n,onChangeInputValue:r,value:o,...i}=e;return(0,a.createElement)("form",l({className:c()("block-editor-url-popover__link-editor",n)},i),(0,a.createElement)(Xv,{value:o,onChange:r,autocompleteRef:t}),(0,a.createElement)(d.Button,{icon:Kv,label:(0,m.__)("Apply"),type:"submit"}))},x_.LinkViewer=function(e){let{className:t,linkClassName:n,onEditLinkClick:r,url:o,urlLabel:i,...s}=e;return(0,a.createElement)("div",l({className:c()("block-editor-url-popover__link-viewer",t)},s),(0,a.createElement)(I_,{url:o,urlLabel:i,className:n}),r&&(0,a.createElement)(d.Button,{icon:f_,label:(0,m.__)("Edit"),onClick:r}))};var B_=x_;const P_=e=>{let{src:t,onChange:n,onSubmit:r,onClose:o}=e;return(0,a.createElement)(B_,{onClose:o},(0,a.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},(0,a.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"text","aria-label":(0,m.__)("URL"),placeholder:(0,m.__)("Paste or type URL"),onChange:n,value:t}),(0,a.createElement)(d.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:Kv,label:(0,m.__)("Apply"),type:"submit"})))};var T_=(0,d.withFilters)("editor.MediaPlaceholder")((function(e){let{value:t={},allowedTypes:n,className:r,icon:o,labels:i={},mediaPreview:l,notices:s,isAppender:p,accept:y,addToGallery:g,multiple:h=!1,handleUpload:b=!0,disableDropZone:v,disableMediaButtons:_,onError:k,onSelect:E,onCancel:S,onSelectURL:w,onDoubleClick:A,onFilesPreUpload:C=u.noop,onHTMLDrop:I=u.noop,children:x,mediaLibraryButton:B,placeholder:P,style:T}=e;const O=(0,f.useSelect)((e=>{const{getSettings:t}=e(qn);return t().mediaUpload}),[]),[N,R]=(0,a.useState)(""),[F,M]=(0,a.useState)(!1);(0,a.useEffect)((()=>{var e;R(null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"")}),[null==t?void 0:t.src]);const D=e=>{R(e.target.value)},L=()=>{M(!0)},U=()=>{M(!1)},j=e=>{e.preventDefault(),N&&w&&(w(N),U())},V=e=>{if(!b)return E(e);let r;if(C(e),h)if(g){let e=[];r=n=>{const r=(null!=t?t:[]).filter((t=>t.id?!e.some((e=>{let{id:n}=e;return Number(n)===Number(t.id)})):!e.some((e=>{let{urlSlug:n}=e;return t.url.includes(n)}))));E(r.concat(n)),e=n.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else r=E;else r=e=>{let[t]=e;return E(t)};O({allowedTypes:n,filesList:e,onFileChange:r,onError:k})},z=e=>{V(e.target.files)},G=null!=P?P:e=>{let{instructions:t,title:u}=i;if(O||w||(t=(0,m.__)("To edit this block, you need permission to upload media.")),void 0===t||void 0===u){const e=null!=n?n:[],[r]=e,o=1===e.length,i=o&&"audio"===r,l=o&&"image"===r,a=o&&"video"===r;void 0===t&&O&&(t=(0,m.__)("Upload a media file or pick one from your media library."),i?t=(0,m.__)("Upload an audio file, pick one from your media library, or add one with a URL."):l?t=(0,m.__)("Upload an image file, pick one from your media library, or add one with a URL."):a&&(t=(0,m.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===u&&(u=(0,m.__)("Media"),i?u=(0,m.__)("Audio"):l?u=(0,m.__)("Image"):a&&(u=(0,m.__)("Video")))}const f=c()("block-editor-media-placeholder",r,{"is-appender":p});return(0,a.createElement)(d.Placeholder,{icon:o,label:u,instructions:t,className:f,notices:s,onDoubleClick:A,preview:l,style:T},e,x)},H=()=>v?null:(0,a.createElement)(d.DropZone,{onFilesDrop:V,onHTMLDrop:I}),W=()=>S&&(0,a.createElement)(d.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,m.__)("Cancel"),variant:"link",onClick:S},(0,m.__)("Cancel")),$=()=>w&&(0,a.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,a.createElement)(d.Button,{className:"block-editor-media-placeholder__button",onClick:L,isPressed:F,variant:"tertiary"},(0,m.__)("Insert from URL")),F&&(0,a.createElement)(P_,{src:N,onChange:D,onSubmit:j,onClose:U}));return _?(0,a.createElement)(A_,null,H()):(0,a.createElement)(A_,{fallback:G($())},(()=>{const e=null!=B?B:e=>{let{open:t}=e;return(0,a.createElement)(d.Button,{variant:"tertiary",onClick:()=>{t()}},(0,m.__)("Media Library"))},r=(0,a.createElement)(w_,{addToGallery:g,gallery:h&&!(!n||0===n.length)&&n.every((e=>"image"===e||e.startsWith("image/"))),multiple:h,onSelect:E,allowedTypes:n,value:Array.isArray(t)?t.map((e=>{let{id:t}=e;return t})):t.id,render:e});if(O&&p)return(0,a.createElement)(a.Fragment,null,H(),(0,a.createElement)(d.FormFileUpload,{onChange:z,accept:y,multiple:h,render:e=>{let{openFileDialog:t}=e;const n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.Button,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:t},(0,m.__)("Upload")),r,$(),W());return G(n)}}));if(O){const e=(0,a.createElement)(a.Fragment,null,H(),(0,a.createElement)(d.FormFileUpload,{variant:"primary",className:c()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:z,accept:y,multiple:h},(0,m.__)("Upload")),r,$(),W());return G(e)}return G(r)})())}));var O_=e=>{let{colorSettings:t,...n}=e;const r=t.map((e=>{if(!e)return e;const{value:t,onChange:n,...r}=e;return{...r,colorValue:t,onColorChange:n}}));return(0,a.createElement)(uv,l({settings:r,gradients:[],disableCustomGradients:!0},n))};const N_={position:"bottom right",isAlternate:!0};var R_=()=>(0,a.createElement)(a.Fragment,null,["bold","italic","link"].map((e=>(0,a.createElement)(d.Slot,{name:`RichText.ToolbarControls.${e}`,key:e}))),(0,a.createElement)(d.Slot,{name:"RichText.ToolbarControls"},(e=>{if(!e.length)return null;const t=e.map((e=>{let[{props:t}]=e;return t})).some((e=>{let{isActive:t}=e;return t}));return(0,a.createElement)(d.ToolbarItem,null,(n=>(0,a.createElement)(d.DropdownMenu,{icon:zd,label:(0,m.__)("More"),toggleProps:{...n,className:c()(n.className,{"is-pressed":t}),describedBy:(0,m.__)("Displays more block tools")},controls:(0,u.orderBy)(e.map((e=>{let[{props:t}]=e;return t})),"title"),popoverProps:N_})))})));var F_=e=>{let{inline:t,anchorRef:n}=e;return t?(0,a.createElement)(d.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},(0,a.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},(0,a.createElement)(d.ToolbarGroup,null,(0,a.createElement)(R_,null)))):(0,a.createElement)(or,{group:"inline"},(0,a.createElement)(R_,null))};function M_(){const{didAutomaticChange:e,getSettings:t}=(0,f.useSelect)(qn);return(0,p.useRefEffect)((n=>{function r(n){const{keyCode:r}=n;n.defaultPrevented||r!==bc.DELETE&&r!==bc.BACKSPACE&&r!==bc.ESCAPE||e()&&(n.preventDefault(),t().__experimentalUndo())}return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}),[])}function D_(e){return e.filter((e=>{let{type:t}=e;return/^image\/(?:jpe?g|png|gif|webp)$/.test(t)})).map((e=>``)).join("")}var L_=window.wp.shortcode;function U_(e,t){if(null!=t&&t.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}function j_(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function V_(e){let{allowedFormats:t,formattingControls:n,disableFormats:r}=e;return r?V_.EMPTY_ARRAY:t||n?t||(jt()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats",version:"6.2"}),n.map((e=>`core/${e}`))):void 0}V_.EMPTY_ARRAY=[];function z_(e){let{value:t,pastedBlocks:n=[],onReplace:r,onSplit:o,onSplitMiddle:i,multilineTag:l}=e;if(!r||!o)return;const{start:a=0,end:s=0}=t,c={...t,start:a,end:s},u=[],[p,d]=(0,U.split)(c),f=n.length>0;let y=-1;const m=(0,U.isEmpty)(p)&&!(0,U.isEmpty)(d);f&&(0,U.isEmpty)(p)||(u.push(o((0,U.toHTMLString)({value:p,multilineTag:l}),!m)),y+=1),f?(u.push(...n),y+=n.length):i&&u.push(i()),(f||i)&&(0,U.isEmpty)(d)||u.push(o((0,U.toHTMLString)({value:d,multilineTag:l}),m));r(u,f?y:1,f?-1:0)}function G_(e,t){return t?(0,U.replace)(e,/\n+/g,U.__UNSTABLE_LINE_SEPARATOR):(0,U.replace)(e,new RegExp(U.__UNSTABLE_LINE_SEPARATOR,"g"),"\n")}function H_(e){const t=(0,a.useRef)(e);return t.current=e,(0,p.useRefEffect)((e=>{function n(e){const{isSelected:n,disableFormats:r,onChange:i,value:l,formatTypes:a,tagName:s,onReplace:c,onSplit:u,onSplitMiddle:p,__unstableEmbedURLOnPaste:d,multilineTag:f,preserveWhiteSpace:y,pastePlainText:m}=t.current;if(!n)return;const{clipboardData:g}=e;let h="",b="";try{h=g.getData("text/plain"),b=g.getData("text/html")}catch(e){try{b=g.getData("Text")}catch(e){return}}if(b=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;e=e.substring(n+t.length);const r="\x3c!--EndFragment--\x3e",o=e.indexOf(r);o>-1&&(e=e.substring(0,o));return e}(b),b=function(e){const t="";if(e.startsWith(t))return e.slice(t.length);return e}(b),e.preventDefault(),window.console.log("Received HTML:\n\n",b),window.console.log("Received plain text:\n\n",h),r)return void i((0,U.insert)(l,h));const v=a.reduce(((e,t)=>{let{__unstablePasteRule:n}=t;return n&&e===l&&(e=n(l,{html:b,plainText:h})),e}),l);if(v!==l)return void i(v);const _=[...(0,Zo.getFilesFromDataTransfer)(g)];if("true"===g.getData("rich-text")){const e=g.getData("rich-text-multi-line-tag")||void 0;let t=(0,U.create)({html:b,multilineTag:e,multilineWrapperTags:"li"===e?["ul","ol"]:void 0,preserveWhiteSpace:y});return t=G_(t,!!f),U_(t,l.activeFormats),void i((0,U.insert)(l,t))}if(m)return void i((0,U.insert)(l,(0,U.create)({text:h})));if(null!=_&&_.length&&!xf(_,b)){const e=(0,o.pasteHandler)({HTML:D_(_),mode:"BLOCKS",tagName:s,preserveWhiteSpace:y});return window.console.log("Received items:\n\n",_),void(c&&(0,U.isEmpty)(l)?c(e):z_({value:l,pastedBlocks:e,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}let k=c&&u?"AUTO":"INLINE";var E;"AUTO"===k&&(0,U.isEmpty)(l)&&(E=h,(0,L_.regexp)(".*").test(E))&&(k="BLOCKS"),d&&(0,U.isEmpty)(l)&&(0,nd.isURL)(h.trim())&&(k="BLOCKS");const S=(0,o.pasteHandler)({HTML:b,plainText:h,mode:k,tagName:s,preserveWhiteSpace:y});if("string"==typeof S){let e=(0,U.create)({html:S});e=G_(e,!!f),U_(e,l.activeFormats),i((0,U.insert)(l,e))}else S.length>0&&(c&&(0,U.isEmpty)(l)?c(S,S.length-1,-1):z_({value:l,pastedBlocks:S,onReplace:c,onSplit:u,onSplitMiddle:p,multilineTag:f}))}return e.addEventListener("paste",n),()=>{e.removeEventListener("paste",n)}}),[])}function W_(e){let t=e.length;for(;t--;){const n=(0,u.findKey)(e[t].attributes,(e=>"string"==typeof e&&-1!==e.indexOf("†")));if(n)return e[t].attributes[n]=e[t].attributes[n].replace("†",""),e[t].clientId;const r=W_(e[t].innerBlocks);if(r)return r}}function $_(e){const{__unstableMarkLastChangeAsPersistent:t,__unstableMarkAutomaticChange:n}=(0,f.useDispatch)(qn),r=(0,a.useRef)(e);return r.current=e,(0,p.useRefEffect)((e=>{function i(){const{value:e,onReplace:t,selectionChange:i}=r.current;if(!t)return;const{start:l,text:a}=e;if(" "!==a.slice(l-1,l))return;const s=a.slice(0,l).trim(),c=(0,o.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"prefix"===t})),u=(0,o.findTransform)(c,(e=>{let{prefix:t}=e;return s===t}));if(!u)return;const p=(0,U.toHTMLString)({value:(0,U.insert)(e,"†",0,l)}),d=u.transform(p);i(W_([d])),t([d]),n()}function l(e){const{inputType:o,type:l}=e,{value:a,onChange:s,__unstableAllowPrefixTransformations:c,formatTypes:u}=r.current;if("insertText"!==o&&"compositionend"!==l)return;c&&i&&i();const p=u.reduce(((e,t)=>{let{__unstableInputRule:n}=t;return n&&(e=n(e)),e}),function(e){const t="tales of gutenberg",{start:n,text:r}=e;return n{e.removeEventListener("input",l),e.removeEventListener("compositionend",l)}}),[])}function K_(e){const{__unstableMarkAutomaticChange:t}=(0,f.useDispatch)(qn),n=(0,a.useRef)(e);return n.current=e,(0,p.useRefEffect)((e=>{function r(e){if(e.defaultPrevented)return;const{removeEditorOnlyFormats:r,value:i,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c,onChange:u,disableLineBreaks:p,onSplitAtEnd:d}=n.current;if(e.keyCode!==bc.ENTER)return;e.preventDefault();const f={...i};f.formats=r(i);const y=l&&a;if(l){const e=(0,o.getBlockTransforms)("from").filter((e=>{let{type:t}=e;return"enter"===t})),n=(0,o.findTransform)(e,(e=>e.regExp.test(f.text)));n&&(l([n.transform({content:f.text})]),t())}if(c)e.shiftKey?p||u((0,U.insert)(f,"\n")):y&&(0,U.__unstableIsEmptyLine)(f)?z_({value:f,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c}):u((0,U.__unstableInsertLineSeparator)(f));else{const{text:t,start:n,end:r}=f,o=d&&n===r&&r===t.length;e.shiftKey||!y&&!o?p||u((0,U.insert)(f,"\n")):!y&&o?d():y&&z_({value:f,onReplace:l,onSplit:a,onSplitMiddle:s,multilineTag:c})}}return e.addEventListener("keydown",r),()=>{e.removeEventListener("keydown",r)}}),[])}function q_(e){return e(U.store).getFormatTypes()}const J_=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function Y_(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[])}function Q_(e){return(0,p.useRefEffect)((t=>{function n(t){for(const n of e.current)n(t)}return t.addEventListener("input",n),()=>{t.removeEventListener("input",n)}}),[])}function X_(){const{isMultiSelecting:e}=(0,f.useSelect)(qn);return(0,p.useRefEffect)((t=>{function n(){if(!e())return;const n=t.parentElement.closest('[contenteditable="true"]');n&&n.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}),[])}function Z_(e){let{formatTypes:t,onChange:n,onFocus:r,value:o,forwardedRef:i}=e;return t.map((e=>{const{name:t,edit:l}=e;if(!l)return null;const s=(0,U.getActiveFormat)(o,t);let c=void 0!==s;const p=(0,U.getActiveObject)(o),d=void 0!==p&&p.type===t;if("core/link"===t&&!(0,U.isCollapsed)(o)){const e=o.formats,t=(0,u.find)(e[o.start],{type:"core/link"}),n=(0,u.find)(e[o.end-1],{type:"core/link"});t&&n&&t===n||(c=!1)}return(0,a.createElement)(l,{key:t,isActive:c,activeAttributes:c&&s.attributes||{},isObjectActive:d,activeObjectAttributes:d&&p.attributes||{},value:o,onChange:n,onFocus:r,contentRef:i})}))}const ek=(0,a.createContext)(),tk=(0,a.createContext)();const nk=(0,a.forwardRef)((function e(t,n){let{children:r,tagName:i="div",value:s="",onChange:y,isSelected:m,multiline:g,inlineToolbar:h,wrapperClassName:b,autocompleters:v,onReplace:_,placeholder:k,allowedFormats:E,formattingControls:S,withoutInteractiveFormatting:w,onRemove:A,onMerge:C,onSplit:I,__unstableOnSplitAtEnd:x,__unstableOnSplitMiddle:B,identifier:P,preserveWhiteSpace:T,__unstablePastePlainText:O,__unstableEmbedURLOnPaste:N,__unstableDisableFormats:R,disableLineBreaks:F,unstableOnFocus:M,__unstableAllowPrefixTransformations:D,...L}=t;const j=(0,p.useInstanceId)(e);P=P||j,L=function(e){return(0,u.omit)(e,["__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","setRef"])}(L);const V=(0,a.useRef)(),{clientId:z}=Xn(),{selectionStart:G,selectionEnd:H,isSelected:W}=(0,f.useSelect)((e=>{const{getSelectionStart:t,getSelectionEnd:n}=e(qn),r=t(),o=n();let i;return void 0===m?i=r.clientId===z&&o.clientId===z&&r.attributeKey===P:m&&(i=r.clientId===z),{selectionStart:i?r.offset:void 0,selectionEnd:i?o.offset:void 0,isSelected:i}})),{selectionChange:$}=(0,f.useDispatch)(qn),K=j_(g),q=V_({allowedFormats:E,formattingControls:S,disableFormats:R}),J=!q||q.length>0;let Y=s,Q=y;Array.isArray(s)&&(Y=o.children.toHTML(s),Q=e=>y(o.children.fromDOM((0,U.__unstableCreateElement)(document,e).childNodes)));const X=(0,a.useCallback)(((e,t)=>{const n={},r=void 0===e&&void 0===t;("number"==typeof e||r)&&(n.start={clientId:z,attributeKey:P,offset:e}),("number"==typeof t||r)&&(n.end={clientId:z,attributeKey:P,offset:t}),$(n)}),[z,P]),{formatTypes:Z,prepareHandlers:ee,valueHandlers:te,changeHandlers:ne,dependencies:re}=function(e){let{clientId:t,identifier:n,withoutInteractiveFormatting:r,allowedFormats:o}=e;const i=(0,f.useSelect)(q_,[]),l=(0,a.useMemo)((()=>i.filter((e=>{let{name:t,tagName:n}=e;return!(o&&!o.includes(t)||r&&J_.has(n))}))),[i,o,J_]),s=(0,f.useSelect)((e=>l.reduce(((r,o)=>(o.__experimentalGetPropsForEditableTreePreparation&&(r[o.name]=o.__experimentalGetPropsForEditableTreePreparation(e,{richTextIdentifier:n,blockClientId:t})),r)),{})),[l,t,n]),c=(0,f.useDispatch)(),u=[],p=[],d=[],y=[];return l.forEach((e=>{if(e.__experimentalCreatePrepareEditableTree){const r=s[e.name],o=e.__experimentalCreatePrepareEditableTree(r,{richTextIdentifier:n,blockClientId:t});e.__experimentalCreateOnChangeEditableValue?p.push(o):u.push(o);for(const e in r)y.push(r[e])}if(e.__experimentalCreateOnChangeEditableValue){let r={};e.__experimentalGetPropsForEditableTreeChangeHandler&&(r=e.__experimentalGetPropsForEditableTreeChangeHandler(c,{richTextIdentifier:n,blockClientId:t})),d.push(e.__experimentalCreateOnChangeEditableValue({...s[e.name]||{},...r},{richTextIdentifier:n,blockClientId:t}))}})),{formatTypes:l,prepareHandlers:u,valueHandlers:p,changeHandlers:d,dependencies:y}}({clientId:z,identifier:P,withoutInteractiveFormatting:w,allowedFormats:q});function oe(e){return Z.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,U.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:ie,onChange:le,ref:ae}=(0,U.__unstableUseRichText)({value:Y,onChange(e,t){let{__unstableFormats:n,__unstableText:r}=t;Q(e),Object.values(ne).forEach((e=>{e(n,r)}))},selectionStart:G,selectionEnd:H,onSelectionChange:X,placeholder:k,__unstableIsSelected:W,__unstableMultilineTag:K,__unstableDisableFormats:R,preserveWhiteSpace:T,__unstableDependencies:[...re,i],__unstableAfterParse:function(e){return te.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:oe,__unstableAddInvisibleFormats:function(e){return ee.reduce(((t,n)=>n(t,e.text)),e.formats)}}),se=function(e){return(0,d.__unstableUseAutocompleteProps)({...e,completers:Jh(e)})}({onReplace:_,completers:v,record:ie,onChange:le});!function(e){let{value:t}=e;const n=t.activeFormats&&!!t.activeFormats.length,{isCaretWithinFormattedText:r}=(0,f.useSelect)(qn),{enterFormattedText:o,exitFormattedText:i}=(0,f.useDispatch)(qn);(0,a.useEffect)((()=>{n?r()||o():r()&&i()}),[n])}({value:ie}),function(e){let{html:t,value:n}=e;const r=(0,a.useRef)(),o=n.activeFormats&&!!n.activeFormats.length,{__unstableMarkLastChangeAsPersistent:i}=(0,f.useDispatch)(qn);(0,a.useLayoutEffect)((()=>{if(r.current){if(r.current!==n.text){const e=window.setTimeout((()=>{i()}),1e3);return r.current=n.text,()=>{window.clearTimeout(e)}}i()}else r.current=n.text}),[t,o])}({html:Y,value:ie});const ce=(0,a.useRef)(new Set),ue=(0,a.useRef)(new Set);function pe(){V.current.focus()}const de=i,fe=(0,a.createElement)(a.Fragment,null,W&&(0,a.createElement)(ek.Provider,{value:ce},(0,a.createElement)(tk.Provider,{value:ue},(0,a.createElement)(d.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after"},r&&r({value:ie,onChange:le,onFocus:pe}),(0,a.createElement)(Z_,{value:ie,onChange:le,onFocus:pe,formatTypes:Z,forwardedRef:V})))),W&&J&&(0,a.createElement)(F_,{inline:h,anchorRef:V.current}),(0,a.createElement)(de,l({role:"textbox","aria-multiline":!F,"aria-label":k},L,se,{ref:(0,p.useMergeRefs)([n,se.ref,L.ref,ae,$_({value:ie,onChange:le,__unstableAllowPrefixTransformations:D,formatTypes:Z,onReplace:_,selectionChange:$}),(0,p.useRefEffect)((e=>{function t(e){(bc.isKeyboardEvent.primary(e,"z")||bc.isKeyboardEvent.primary(e,"y")||bc.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.addEventListener("keydown",t)}}),[]),Y_(ce),Q_(ue),M_(),H_({isSelected:W,disableFormats:R,onChange:le,value:ie,formatTypes:Z,tagName:i,onReplace:_,onSplit:I,onSplitMiddle:B,__unstableEmbedURLOnPaste:N,multilineTag:K,preserveWhiteSpace:T,pastePlainText:O}),K_({removeEditorOnlyFormats:oe,value:ie,onReplace:_,onSplit:I,onSplitMiddle:B,multilineTag:K,onChange:le,disableLineBreaks:F,onSplitAtEnd:x}),X_(),V]),contentEditable:!0,suppressContentEditableWarning:!0,className:c()("block-editor-rich-text__editable",L.className,"rich-text"),onFocus:M,onKeyDown:function(e){const{keyCode:t}=e;if(!e.defaultPrevented&&(t===bc.DELETE||t===bc.BACKSPACE)){const{start:n,end:r,text:o}=ie,i=t===bc.BACKSPACE,l=ie.activeFormats&&!!ie.activeFormats.length;if(!(0,U.isCollapsed)(ie)||l||i&&0!==n||!i&&r!==o.length)return;C&&C(!i),A&&(0,U.isEmpty)(ie)&&i&&A(!i),e.preventDefault()}}})));if(!b)return fe;jt()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div",version:"6.2"});const ye=c()("block-editor-rich-text",b);return(0,a.createElement)("div",{className:ye},fe)}));nk.Content=e=>{let{value:t,tagName:n,multiline:r,...i}=e;Array.isArray(t)&&(t=o.children.toHTML(t));const l=j_(r);!t&&l&&(t=`<${l}>`);const s=(0,a.createElement)(a.RawHTML,null,t);return n?(0,a.createElement)(n,(0,u.omit)(i,["format"]),s):s},nk.isEmpty=e=>!e||0===e.length;var rk=nk;const ok=(0,a.forwardRef)(((e,t)=>(0,a.createElement)(rk,l({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))));ok.Content=e=>{let{value:t="",tagName:n="div",...r}=e;return(0,a.createElement)(n,r,t)};var ik=ok;var lk=(0,a.forwardRef)(((e,t)=>{let{__experimentalVersion:n,...r}=e;if(2===n)return(0,a.createElement)(ik,l({ref:t},r));const{className:o,onChange:i,...s}=r;return(0,a.createElement)(hi.Z,l({ref:t,className:c()("block-editor-plain-text",o),onChange:e=>i(e.target.value)},s))}));function ak(e){let{property:t,viewport:n,desc:r}=e;const o=(0,p.useInstanceId)(ak),i=r||(0,m.sprintf)((0,m._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{"aria-describedby":`rbc-desc-${o}`},n.label),(0,a.createElement)(d.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`},i))}var sk=function(e){const{title:t,property:n,toggleLabel:r,onIsResponsiveChange:o,renderDefaultControl:i,renderResponsiveControls:l,isResponsive:s=!1,defaultLabel:u={id:"all",label:(0,m.__)("All")},viewports:p=[{id:"small",label:(0,m.__)("Small screens")},{id:"medium",label:(0,m.__)("Medium screens")},{id:"large",label:(0,m.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const f=r||(0,m.sprintf)((0,m.__)("Use the same %s on all screensizes."),n),y=(0,m.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=i((0,a.createElement)(ak,{property:n,viewport:u}),u);return(0,a.createElement)("fieldset",{className:"block-editor-responsive-block-control"},(0,a.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),(0,a.createElement)("div",{className:"block-editor-responsive-block-control__inner"},(0,a.createElement)(d.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:f,checked:!s,onChange:o,help:y}),(0,a.createElement)("div",{className:c()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(l?l(p):p.map((e=>(0,a.createElement)(a.Fragment,{key:e.id},i((0,a.createElement)(ak,{property:n,viewport:e}),e))))))))};function ck(e){let{character:t,type:n,onUse:r}=e;const o=(0,a.useContext)(ek),i=(0,a.useRef)();return i.current=r,(0,a.useEffect)((()=>{function e(e){bc.isKeyboardEvent[n](e,t)&&(i.current(),e.preventDefault())}return o.current.add(e),()=>{o.current.delete(e)}}),[t,n]),null}function uk(e){let t,{name:n,shortcutType:r,shortcutCharacter:o,...i}=e,s="RichText.ToolbarControls";return n&&(s+=`.${n}`),r&&o&&(t=bc.displayShortcut[r](o)),(0,a.createElement)(d.Fill,{name:s},(0,a.createElement)(d.ToolbarButton,l({},i,{shortcut:t})))}function pk(e){let{inputType:t,onInput:n}=e;const r=(0,a.useContext)(tk),o=(0,a.useRef)();return o.current=n,(0,a.useEffect)((()=>{function e(e){e.inputType===t&&(o.current(),e.preventDefault())}return r.current.add(e),()=>{r.current.delete(e)}}),[t]),null}const dk=(0,a.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)(d.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"}));var fk=(0,a.forwardRef)((function(e,t){const n=(0,f.useSelect)((e=>e(qn).isNavigationMode()),[]),{setNavigationMode:r}=(0,f.useDispatch)(qn),o=e=>{r("edit"!==e)};return(0,a.createElement)(d.Dropdown,{renderToggle:r=>{let{isOpen:o,onToggle:i}=r;return(0,a.createElement)(d.Button,l({},e,{ref:t,icon:n?dk:f_,"aria-expanded":o,"aria-haspopup":"true",onClick:i,label:(0,m.__)("Tools")}))},position:"bottom right",renderContent:()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.NavigableMenu,{role:"menu","aria-label":(0,m.__)("Tools")},(0,a.createElement)(d.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(wo,{icon:f_}),(0,m.__)("Edit"))},{value:"select",label:(0,a.createElement)(a.Fragment,null,dk,(0,m.__)("Select"))}]})),(0,a.createElement)("div",{className:"block-editor-tool-selector__help"},(0,m.__)("Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.")))})}));function yk(e){let{units:t,...n}=e;const r=(0,d.__experimentalUseCustomUnits)({availableUnits:Cr("spacing.units")||["%","px","em","rem","vw"],units:t});return(0,a.createElement)(d.__experimentalUnitControl,l({units:r},n))}var mk=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"}));class gk extends a.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.submitLink=this.submitLink.bind(this),this.state={expanded:!1}}toggle(){this.setState({expanded:!this.state.expanded})}submitLink(e){e.preventDefault(),this.toggle()}render(){const{url:e,onChange:t}=this.props,{expanded:n}=this.state,r=e?(0,m.__)("Edit link"):(0,m.__)("Insert link");return(0,a.createElement)("div",{className:"block-editor-url-input__button"},(0,a.createElement)(d.Button,{icon:rm,label:r,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!e}),n&&(0,a.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},(0,a.createElement)("div",{className:"block-editor-url-input__button-modal-line"},(0,a.createElement)(d.Button,{className:"block-editor-url-input__back",icon:mk,label:(0,m.__)("Close"),onClick:this.toggle}),(0,a.createElement)(Xv,{value:e||"",onChange:t}),(0,a.createElement)(d.Button,{icon:Kv,label:(0,m.__)("Submit"),type:"submit"}))))}}var hk=gk;var bk=(0,a.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(D.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const vk="none",_k="custom",kk="media",Ek="attachment",Sk=["noreferrer","noopener"],wk=(0,a.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(d.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,a.createElement)(d.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,a.createElement)(d.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Ak=e=>{let{linkDestination:t,onChangeUrl:n,url:r,mediaType:o="image",mediaUrl:i,mediaLink:l,linkTarget:s,linkClass:c,rel:p}=e;const[f,y]=(0,a.useState)(!1),g=(0,a.useCallback)((()=>{y(!0)})),[h,b]=(0,a.useState)(!1),[v,_]=(0,a.useState)(null),k=(0,a.useRef)(null),E=(0,a.useCallback)((()=>{t!==kk&&t!==Ek||_(""),b(!0)})),S=(0,a.useCallback)((()=>{b(!1)})),w=(0,a.useCallback)((()=>{_(null),S(),y(!1)})),A=(0,a.useCallback)((()=>e=>{const t=k.current;t&&t.contains(e.target)||(y(!1),_(null),S())})),C=(0,a.useCallback)((()=>e=>{if(v){var t;const e=(null===(t=x().find((e=>e.url===v)))||void 0===t?void 0:t.linkDestination)||_k;n({href:v,linkDestination:e})}S(),_(null),e.preventDefault()})),I=(0,a.useCallback)((()=>{n({linkDestination:vk,href:""})})),x=()=>{const e=[{linkDestination:kk,title:(0,m.__)("Media File"),url:"image"===o?i:void 0,icon:wk}];return"image"===o&&l&&e.push({linkDestination:Ek,title:(0,m.__)("Attachment Page"),url:"image"===o?l:void 0,icon:(0,a.createElement)(d.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(d.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,a.createElement)(d.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},B=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ToggleControl,{label:(0,m.__)("Open in new tab"),onChange:e=>{const t=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(null!=p?p:"").split(" ");Sk.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(null!=p?p:"").split(" ").filter((e=>!1===Sk.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);n(t)},checked:"_blank"===s}),(0,a.createElement)(d.TextControl,{label:(0,m.__)("Link Rel"),value:null!=p?p:"",onChange:e=>{n({rel:e})}}),(0,a.createElement)(d.TextControl,{label:(0,m.__)("Link CSS Class"),value:c||"",onChange:e=>{n({linkClass:e})}})),P=null!==v?v:r,T=((0,u.find)(x(),["linkDestination",t])||{}).title;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.ToolbarButton,{icon:rm,className:"components-toolbar__control",label:r?(0,m.__)("Edit link"):(0,m.__)("Insert link"),"aria-expanded":f,onClick:g}),f&&(0,a.createElement)(B_,{onFocusOutside:A(),onClose:w,renderSettings:()=>B,additionalControls:!P&&(0,a.createElement)(d.NavigableMenu,null,(0,u.map)(x(),(e=>(0,a.createElement)(d.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:()=>{_(null),(e=>{const t=x();let r;r=e?((0,u.find)(t,(t=>t.url===e))||{linkDestination:_k}).linkDestination:vk,n({linkDestination:r,href:e})})(e.url),S()}},e.title))))},(!r||h)&&(0,a.createElement)(B_.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:P,onChangeInputValue:_,onSubmit:C(),autocompleteRef:k}),r&&!h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(B_.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:E,urlLabel:T}),(0,a.createElement)(d.Button,{icon:bk,label:(0,m.__)("Remove link"),onClick:I}))))};function Ck(e){let{children:t,className:n,isEnabled:r=!0,deviceType:o,setDeviceType:i}=e;if((0,p.useViewportMatch)("small","<"))return null;const l={className:c()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={variant:"tertiary",className:"block-editor-post-preview__button-toggle",disabled:!r,children:(0,m.__)("Preview")};return(0,a.createElement)(d.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:l,toggleProps:s,icon:null},(()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(d.MenuGroup,null,(0,a.createElement)(d.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Desktop"),icon:"Desktop"===o&&lf},(0,m.__)("Desktop")),(0,a.createElement)(d.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Tablet"),icon:"Tablet"===o&&lf},(0,m.__)("Tablet")),(0,a.createElement)(d.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:()=>i("Mobile"),icon:"Mobile"===o&&lf},(0,m.__)("Mobile"))),t)))}function Ik(e){const[t,n]=(0,a.useState)(window.innerWidth);(0,a.useEffect)((()=>{if("Desktop"===e)return;const t=()=>n(window.innerWidth);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e]);const r=e=>{let n;switch(e){case"Tablet":n=780;break;case"Mobile":n=360;break;default:return null}return n{const t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:r(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px 2px 2px 2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}})(e)}var xk=(0,f.withSelect)((e=>({selectedBlockClientId:e(qn).getBlockSelectionStart()})))((e=>{let{selectedBlockClientId:t}=e;const n=kr(t);return t?(0,a.createElement)(d.Button,{variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{n.current.focus()}},(0,m.__)("Skip to the selected block")):null})),Bk=window.wp.wordcount;var Pk=(0,f.withSelect)((e=>{const{getMultiSelectedBlocks:t}=e(qn);return{blocks:t()}}))((function(e){let{blocks:t}=e;const n=(0,Bk.count)((0,o.serialize)(t),"words");return(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},(0,a.createElement)(Nc,{icon:nf,showColors:!0}),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},(0,m.sprintf)((0,m._n)("%d block","%d blocks",t.length),t.length)),(0,a.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},(0,m.sprintf)((0,m._n)("%d word","%d words",n),n))))}));function Tk(e){let{blockName:t}=e;const{preferredStyle:n,onUpdatePreferredStyleVariations:r,styles:i}=(0,f.useSelect)((e=>{var n,r;const i=e(qn).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==i||null===(n=i.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==i?void 0:i.onChange)&&void 0!==r?r:null,styles:e(o.store).getBlockStyles(t)}}),[t]),l=(0,a.useMemo)((()=>[{label:(0,m.__)("Not set"),value:""},...i.map((e=>{let{label:t,name:n}=e;return{label:t,value:n}}))]),[i]),s=(0,a.useMemo)((()=>{var e;return null===(e=uf(i))||void 0===e?void 0:e.name}),[i]),c=(0,a.useCallback)((e=>{r(t,e)}),[t,r]);return n&&n!==s?r&&(0,a.createElement)("div",{className:"default-style-picker__default-switcher"},(0,a.createElement)(d.SelectControl,{options:l,value:n||"",label:(0,m.__)("Default Style"),onChange:c})):null}const Ok=e=>{let{clientId:t,blockName:n,hasBlockStyles:r}=e;const i=Td(t);return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Rc,i),(0,a.createElement)(Jb,{blockClientId:t}),r&&(0,a.createElement)("div",null,(0,a.createElement)(d.PanelBody,{title:(0,m.__)("Styles")},(0,a.createElement)(Nb,{scope:"core/block-inspector",clientId:t}),(0,o.hasBlockSupport)(n,"defaultStylePicker",!0)&&(0,a.createElement)(Tk,{blockName:n}))),(0,a.createElement)(Lr.Slot,null),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"color",label:(0,m.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"typography",label:(0,m.__)("Typography")}),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"dimensions",label:(0,m.__)("Dimensions")}),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"border",label:(0,m.__)("Border")}),(0,a.createElement)("div",null,(0,a.createElement)(Nk,null)),(0,a.createElement)(xk,{key:"back"}))},Nk=()=>{const e=(0,d.__experimentalUseSlot)(Dr.slotName);return Boolean(e.fills&&e.fills.length)?(0,a.createElement)(d.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,m.__)("Advanced"),initialOpen:!1},(0,a.createElement)(Lr.Slot,{__experimentalGroup:"advanced"})):null};var Rk=e=>{let{showNoBlockSelectedMessage:t=!0}=e;const{count:n,hasBlockStyles:r,selectedBlockName:i,selectedBlockClientId:l,blockType:s}=(0,f.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockCount:n,getBlockName:r}=e(qn),{getBlockStyles:i}=e(o.store),l=t(),a=l&&r(l),s=a&&(0,o.getBlockType)(a),c=a&&i(a);return{count:n(),selectedBlockClientId:l,selectedBlockName:a,blockType:s,hasBlockStyles:c&&c.length>0}}),[]);if(n>1)return(0,a.createElement)("div",{className:"block-editor-block-inspector"},(0,a.createElement)(Pk,null),(0,a.createElement)(Lr.Slot,null),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"color",label:(0,m.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"typography",label:(0,m.__)("Typography")}),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"dimensions",label:(0,m.__)("Dimensions")}),(0,a.createElement)(Lr.Slot,{__experimentalGroup:"border",label:(0,m.__)("Border")}));const c=i===(0,o.getUnregisteredTypeHandlerName)();return s&&l&&!c?(0,a.createElement)(Ok,{clientId:l,blockName:s.name,hasBlockStyles:r}):t?(0,a.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},(0,m.__)("No block selected.")):null};function Fk(e){let{children:t,__unstableContentRef:n,...r}=e;const o=(0,p.useViewportMatch)("medium"),i=(0,f.useSelect)((e=>e(qn).getSettings().hasFixedToolbar),[]),s=(0,Hc.__unstableUseShortcutEventMatch)(),{getSelectedBlockClientIds:c,getBlockRootClientId:y}=(0,f.useSelect)(qn),{duplicateBlocks:m,removeBlocks:g,insertAfterBlock:h,insertBeforeBlock:b,clearSelectedBlock:v,moveBlocksUp:_,moveBlocksDown:k}=(0,f.useDispatch)(qn);return(0,a.createElement)("div",l({},r,{onKeyDown:function(e){if(s("core/block-editor/move-up",e)){const t=c();if(t.length){e.preventDefault();const n=y((0,u.first)(t));_(t,n)}}else if(s("core/block-editor/move-down",e)){const t=c();if(t.length){e.preventDefault();const n=y((0,u.first)(t));k(t,n)}}else if(s("core/block-editor/duplicate",e)){const t=c();t.length&&(e.preventDefault(),m(t))}else if(s("core/block-editor/remove",e)){const t=c();t.length&&(e.preventDefault(),g(t))}else if(s("core/block-editor/insert-after",e)){const t=c();t.length&&(e.preventDefault(),h((0,u.last)(t)))}else if(s("core/block-editor/insert-before",e)){const t=c();t.length&&(e.preventDefault(),b((0,u.first)(t)))}else if(s("core/block-editor/unselect",e)){c().length>1&&(e.preventDefault(),v(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges())}}}),(0,a.createElement)(Id,{__unstableContentRef:n},(i||!o)&&(0,a.createElement)(ay,{isFixed:!0}),(0,a.createElement)(py,{__unstableContentRef:n}),(0,a.createElement)(d.Popover.Slot,{name:"block-toolbar",ref:wd(n)}),t,(0,a.createElement)(d.Popover.Slot,{name:"__unstable-block-tools-after",ref:wd(n)})))}var Mk=(0,a.forwardRef)((function(e,t){let{rootClientId:n,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l=!1,__experimentalInsertionIndex:s,__experimentalFilterValue:c,onSelect:p=u.noop,shouldFocusBlock:d=!1}=e;const y=(0,f.useSelect)((e=>{const{getBlockRootClientId:t}=e(qn);return n||t(r)||void 0}),[r,n]);return(0,a.createElement)(yd,{onSelect:p,rootClientId:y,clientId:r,isAppender:o,showInserterHelpPanel:i,showMostUsedBlocks:l,__experimentalInsertionIndex:s,__experimentalFilterValue:c,shouldFocusBlock:d,ref:t})}));function Dk(){return null}Dk.Register=function(){const{registerShortcut:e}=(0,f.useDispatch)(Hc.store);return(0,a.useEffect)((()=>{e({name:"core/block-editor/duplicate",category:"block",description:(0,m.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,m.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,m.__)("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,m.__)("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,m.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,m.__)("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,m.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,m.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,m.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,m.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var Lk=Dk;function Uk(){return jt()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const jk=new Set([bc.UP,bc.RIGHT,bc.DOWN,bc.LEFT,bc.ENTER,bc.BACKSPACE]);function Vk(){const e=(0,f.useSelect)((e=>e(qn).isTyping()),[]),{stopTyping:t}=(0,f.useDispatch)(qn);return(0,p.useRefEffect)((n=>{if(!e)return;const{ownerDocument:r}=n;let o,i;function l(e){const{clientX:n,clientY:r}=e;o&&i&&(o!==n||i!==r)&&t(),o=n,i=r}return r.addEventListener("mousemove",l),()=>{r.removeEventListener("mousemove",l)}}),[e,t])}function zk(){const e=(0,f.useSelect)((e=>e(qn).isTyping())),{startTyping:t,stopTyping:n}=(0,f.useDispatch)(qn),r=Vk(),o=(0,p.useRefEffect)((r=>{const{ownerDocument:o}=r,{defaultView:i}=o;if(e){let a;function s(e){const{target:t}=e;a=i.setTimeout((()=>{(0,Zo.isTextField)(t)||n()}))}function c(e){const{keyCode:t}=e;t!==bc.ESCAPE&&t!==bc.TAB||n()}function u(){const e=i.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||n()}return r.addEventListener("focus",s),r.addEventListener("keydown",c),o.addEventListener("selectionchange",u),()=>{i.clearTimeout(a),r.removeEventListener("focus",s),r.removeEventListener("keydown",c),o.removeEventListener("selectionchange",u)}}function l(e){const{type:n,target:o}=e;(0,Zo.isTextField)(o)&&r.contains(o)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&jk.has(t)}(e))&&t()}return r.addEventListener("keypress",l),r.addEventListener("keydown",l),()=>{r.removeEventListener("keypress",l),r.removeEventListener("keydown",l)}}),[e,t,n]);return(0,p.useMergeRefs)([r,o])}var Gk=function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:zk()},t)};const Hk=-1!==window.navigator.userAgent.indexOf("Trident"),Wk=new Set([bc.UP,bc.DOWN,bc.LEFT,bc.RIGHT]);function $k(){const e=(0,f.useSelect)((e=>e(qn).hasSelectedBlock()),[]);return(0,p.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:r}=n;let o,i,l;function a(){o||(o=r.requestAnimationFrame((()=>{d(),o=null})))}function s(e){i&&r.cancelAnimationFrame(i),i=r.requestAnimationFrame((()=>{c(e),i=null}))}function c(e){let{keyCode:o}=e;if(!f())return;const i=(0,Zo.computeCaretRect)(r);if(!i)return;if(!l)return void(l=i);if(Wk.has(o))return void(l=i);const a=i.top-l.top;if(0===a)return;const s=(0,Zo.getScrollContainer)(t);if(!s)return;const c=s===n.body,u=c?r.scrollY:s.scrollTop,p=c?0:s.getBoundingClientRect().top,d=c?l.top/r.innerHeight:(l.top-p)/(r.innerHeight-p);if(0===u&&d<.75&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(l=i);const y=c?r.innerHeight:s.clientHeight;l.top+l.height>p+y||l.top{r.removeEventListener("scroll",a,!0),r.removeEventListener("resize",a,!0),t.removeEventListener("keydown",s),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",p),r.cancelAnimationFrame(o),r.cancelAnimationFrame(i)}}),[e])}var Kk=Hk?e=>e.children:function(e){let{children:t}=e;return(0,a.createElement)("div",{ref:$k(),className:"block-editor__typewriter"},t)};const qk=(0,a.createContext)({});function Jk(e,t,n){const r={...e,[t]:e[t]?new Set(e[t]):new Set};return r[t].add(n),r}function Yk(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=(0,a.useContext)(qk),{name:o}=Xn();n=n||o;const i=Boolean(null===(t=r[n])||void 0===t?void 0:t.has(e)),l=(0,a.useMemo)((()=>Jk(r,n,e)),[r,n,e]),s=(0,a.useCallback)((e=>{let{children:t}=e;return(0,a.createElement)(qk.Provider,{value:l},t)}),[l]);return[i,s]}const Qk=(e,t)=>{if(!t||!e)return;const n=t.filter((t=>{let{attributes:n}=t;return!(!n||!Object.keys(n).length)&&(0,u.isMatch)(e,n)}));return 1===n.length?n[0]:void 0};function Xk(e){const t=null==e?void 0:e.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);return isNaN(e)||isNaN(parseFloat(e))?t?{value:parseFloat(t[1])||t[1],unit:t[2]}:{value:e,unit:void 0}:{value:parseFloat(e),unit:"px"}}function Zk(e,t){const n=e.split(/[(),]/g).filter(Boolean),r=n.slice(1).map((e=>Xk(oE(e,t)).value)).filter(Boolean);switch(n[0]){case"min":return Math.min(...r)+"px";case"max":return Math.max(...r)+"px";case"clamp":return 3!==r.length?null:r[1]r[2]?r[2]+"px":r[1]+"px";case"calc":return r[0]+"px"}}function eE(e){for(;;){const t=e,n=/(max|min|calc|clamp)\(([^()]*)\)/g.exec(e)||[];if(n[0]){const t=Zk(n[0]);e=e.replace(n[0],t)}if(e===t||parseFloat(e))break}return Xk(e)}function tE(e){for(let t=0;to.height?o.width:o.height)*r,"%":("font"===o.type?o.fontSize:o.width)*r,ch:8,ex:7.15625,lh:o.lineHeight},l={in:n,cm:37.79527559055118,mm:3.7795275590551185,pt:1.3333333333333333,pc:16,px:1,Q:.9448818897637794};return i[e.unit]?(i[e.unit]*e.value).toFixed(0)+"px":l[e.unit]?(l[e.unit]*e.value).toFixed(0)+"px":null}function oE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e.toFixed(0)+"px";if(void 0===e)return null;let n=Xk(e);return n.unit||(n=eE(e)),tE(e)&&!n.unit?nE(e):rE(n,t)}const iE={};function lE(e){let t="";return e.hasOwnProperty("fontSize")&&(t=":"+e.width),e.hasOwnProperty("lineHeight")&&(t=":"+e.lineHeight),e.hasOwnProperty("width")&&(t=":"+e.width),e.hasOwnProperty("height")&&(t=":"+e.height),e.hasOwnProperty("type")&&(t=":"+e.type),t}var aE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e+lE(t);return iE[n]||(iE[n]=oE(e,t)),iE[n]}}(),(window.wp=window.wp||{}).blockEditor=r}(); \ No newline at end of file diff --git a/wp-includes/js/dist/blocks.js b/wp-includes/js/dist/blocks.js index d5e358a7a8..5e8c23a79f 100644 --- a/wp-includes/js/dist/blocks.js +++ b/wp-includes/js/dist/blocks.js @@ -10466,22 +10466,19 @@ function convertLegacyBlockNameAndAttributes(name, attributes) { * Given object and string of dot-delimited path segments, returns value at * path or undefined if path cannot be resolved. * - * @param {Object} object Lookup object - * @param {string} path Path to resolve - * @return {?*} Resolved value + * @param object Lookup object + * @param path Path to resolve + * @return Resolved value */ function getPath(object, path) { var segments = path.split('.'); var segment; - while (segment = segments.shift()) { if (!(segment in object)) { return; } - object = object[segment]; } - return object; } ;// CONCATENATED MODULE: ./node_modules/hpq/es/index.js @@ -10493,133 +10490,162 @@ function getPath(object, path) { * Function returning a DOM document created by `createHTMLDocument`. The same * document is returned between invocations. * - * @return {Document} DOM document. + * @return DOM document. */ - var getDocument = function () { var doc; return function () { if (!doc) { doc = document.implementation.createHTMLDocument(''); } - return doc; }; }(); + /** * Given a markup string or DOM element, creates an object aligning with the * shape of the matchers object, or the value returned by the matcher. * - * @param {(string|Element)} source Source content - * @param {(Object|Function)} matchers Matcher function or object of matchers - * @return {(Object|*)} Matched value(s), shaped by object + * @param source Source content + * @param matchers Matcher function or object of matchers */ - +/** + * Given a markup string or DOM element, creates an object aligning with the + * shape of the matchers object, or the value returned by the matcher. + * + * @param source Source content + * @param matchers Matcher function or object of matchers + */ function parse(source, matchers) { if (!matchers) { return; - } // Coerce to element - + } + // Coerce to element if ('string' === typeof source) { var doc = getDocument(); doc.body.innerHTML = source; source = doc.body; - } // Return singular value + } - - if ('function' === typeof matchers) { + // Return singular value + if (typeof matchers === 'function') { return matchers(source); - } // Bail if we can't handle matchers - + } + // Bail if we can't handle matchers if (Object !== matchers.constructor) { return; - } // Shape result by matcher object - + } + // Shape result by matcher object return Object.keys(matchers).reduce(function (memo, key) { - memo[key] = parse(source, matchers[key]); + var inner = matchers[key]; + memo[key] = parse(source, inner); return memo; }, {}); } + /** * Generates a function which matches node of type selector, returning an * attribute by property if the attribute exists. If no selector is passed, * returns property of the query element. * - * @param {?string} selector Optional selector - * @param {string} name Property name - * @return {*} Property value + * @param name Property name + * @return Property value */ -function prop(selector, name) { +/** + * Generates a function which matches node of type selector, returning an + * attribute by property if the attribute exists. If no selector is passed, + * returns property of the query element. + * + * @param selector Optional selector + * @param name Property name + * @return Property value + */ +function prop(arg1, arg2) { + var name; + var selector; if (1 === arguments.length) { - name = selector; + name = arg1; selector = undefined; + } else { + name = arg2; + selector = arg1; } - return function (node) { var match = node; - if (selector) { match = node.querySelector(selector); } - if (match) { return getPath(match, name); } }; } + /** * Generates a function which matches node of type selector, returning an * attribute by name if the attribute exists. If no selector is passed, * returns attribute of the query element. * - * @param {?string} selector Optional selector - * @param {string} name Attribute name - * @return {?string} Attribute value + * @param name Attribute name + * @return Attribute value */ -function attr(selector, name) { +/** + * Generates a function which matches node of type selector, returning an + * attribute by name if the attribute exists. If no selector is passed, + * returns attribute of the query element. + * + * @param selector Optional selector + * @param name Attribute name + * @return Attribute value + */ +function attr(arg1, arg2) { + var name; + var selector; if (1 === arguments.length) { - name = selector; + name = arg1; selector = undefined; + } else { + name = arg2; + selector = arg1; } - return function (node) { var attributes = prop(selector, 'attributes')(node); - - if (attributes && attributes.hasOwnProperty(name)) { + if (attributes && Object.prototype.hasOwnProperty.call(attributes, name)) { return attributes[name].value; } }; } + /** * Convenience for `prop( selector, 'innerHTML' )`. * * @see prop() * - * @param {?string} selector Optional selector - * @return {string} Inner HTML + * @param selector Optional selector + * @return Inner HTML */ - function html(selector) { return prop(selector, 'innerHTML'); } + /** * Convenience for `prop( selector, 'textContent' )`. * * @see prop() * - * @param {?string} selector Optional selector - * @return {string} Text content + * @param selector Optional selector + * @return Text content */ - function es_text(selector) { return prop(selector, 'textContent'); } + /** * Creates a new matching context by first finding elements matching selector * using querySelectorAll before then running another `parse` on `matchers` @@ -10627,11 +10653,10 @@ function es_text(selector) { * * @see parse() * - * @param {string} selector Selector to match - * @param {(Object|Function)} matchers Matcher function or object of matchers - * @return {Array.<*,Object>} Array of matched value(s) + * @param selector Selector to match + * @param matchers Matcher function or object of matchers + * @return Matcher function which returns an array of matched value(s) */ - function query(selector, matchers) { return function (node) { var matches = node.querySelectorAll(selector); diff --git a/wp-includes/js/dist/blocks.min.js b/wp-includes/js/dist/blocks.min.js index a03a635136..abfa90ca13 100644 --- a/wp-includes/js/dist/blocks.min.js +++ b/wp-includes/js/dist/blocks.min.js @@ -1,3 +1,3 @@ /*! This file is auto-generated */ !function(){var e={9756:function(e){e.exports=function(e,t){var r,n,a=0;function o(){var o,i,s=r,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n].defaultValue);return r}var o={},i={},s={},c=a(!0),l="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e=a(!0),t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}()};function d(e,t){"use strict";var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};o.helper.isArray(e)||(e=[e]);for(var a=0;a").replace(/&/g,"&")};var h=function(e,t,r,n){"use strict";var a,o,i,s,c,l=n||"",u=l.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+l.replace(/g/g,"")),p=new RegExp(t,l.replace(/g/g,"")),h=[];do{for(a=0;i=d.exec(e);)if(p.test(i[0]))a++||(s=(o=d.lastIndex)-i[0].length);else if(a&&!--a){c=i.index+i[0].length;var f={left:{start:s,end:o},match:{start:o,end:i.index},right:{start:i.index,end:c},wholeMatch:{start:s,end:c}};if(h.push(f),!u)return h}}while(a&&(d.lastIndex=o));return h};o.helper.matchRecursiveRegExp=function(e,t,r,n){"use strict";for(var a=h(e,t,r,n),o=[],i=0;i0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var d=0;d=0?n+(r||0):n},o.helper.splitAtIndex=function(e,t){"use strict";if(!o.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},o.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e}))},o.helper.padEnd=function(e,t,r){"use strict";return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},o.Converter=function(e){"use strict";var t={},r=[],n=[],a={},i=l,p={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,o.helper.isString(e)){if(t=e=o.helper.stdExtName(e),o.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new o.Converter));o.helper.isArray(e)||(e=[e]);var a=d(e,t);if(!a.valid)throw Error(a.error);for(var i=0;i[ \t]+¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var n={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],n=0;n'}else r.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)i="";else if(!i){if(a||(a=n.toLowerCase().replace(/ ?\n/g," ")),i="#"+a,o.helper.isUndefined(r.gUrls[a]))return e;i=r.gUrls[a],o.helper.isUndefined(r.gTitles[a])||(l=r.gTitles[a])}var u='"};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[([^\[\]]+)]()()()()()/g,n),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,r,n,a,i){if("\\"===n)return r+a;if(!o.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,i),c="";return t.openLinksInNewWindow&&(c=' rel="noopener noreferrer" target="¨E95Eblank"'),r+'"+a+""}))),e=r.converter._dispatch("anchors.after",e,t,r)}));var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,g=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,m=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,b=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,k=function(e){"use strict";return function(t,r,n,a,i,s,c){var l=n=n.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback),u="",d="",p=r||"",h=c||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),p+'"+l+""+u+h}},y=function(e,t){"use strict";return function(r,n,a){var i="mailto:";return n=n||"",a=o.subParser("unescapeSpecialChars")(a,e,t),e.encodeEmails?(i=o.helper.encodeEmailAddress(i+a),a=o.helper.encodeEmailAddress(a)):i+=a,n+''+a+""}};o.subParser("autoLinks",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(m,k(t))).replace(_,y(t,r)),e=r.converter._dispatch("autoLinks.after",e,t,r)})),o.subParser("simplifiedAutoLinks",(function(e,t,r){"use strict";return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(g,k(t)):e.replace(f,k(t))).replace(b,y(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e})),o.subParser("blockGamut",(function(e,t,r){"use strict";return e=r.converter._dispatch("blockGamut.before",e,t,r),e=o.subParser("blockQuotes")(e,t,r),e=o.subParser("headers")(e,t,r),e=o.subParser("horizontalRule")(e,t,r),e=o.subParser("lists")(e,t,r),e=o.subParser("codeBlocks")(e,t,r),e=o.subParser("tables")(e,t,r),e=o.subParser("hashHTMLBlocks")(e,t,r),e=o.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)})),o.subParser("blockQuotes",(function(e,t,r){"use strict";e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=o.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=o.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,(function(e,t){var r=t;return r=(r=r.replace(/^  /gm,"¨0")).replace(/¨0/g,"")})),o.subParser("hashBlock")("
\n"+e+"\n
",t,r)})),e=r.converter._dispatch("blockQuotes.after",e,t,r)})),o.subParser("codeBlocks",(function(e,t,r){"use strict";e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,n,a){var i=n,s=a,c="\n";return i=o.subParser("outdent")(i,t,r),i=o.subParser("encodeCode")(i,t,r),i=(i=(i=o.subParser("detab")(i,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),i="
"+i+c+"
",o.subParser("hashBlock")(i,t,r)+s}))).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)})),o.subParser("codeSpans",(function(e,t,r){"use strict";return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,n,a,i){var s=i;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=n+""+(s=o.subParser("encodeCode")(s,t,r))+"",s=o.subParser("hashHTMLSpans")(s,t,r)})),e=r.converter._dispatch("codeSpans.after",e,t,r)})),o.subParser("completeHTMLDocument",(function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",a="\n",o="",i='\n',s="",c="";for(var l in void 0!==r.metadata.parsed.doctype&&(a="\n","html"!==(n=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(i='')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":o=""+r.metadata.parsed.title+"\n";break;case"charset":i="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[l]+'"',c+='\n';break;default:c+='\n'}return e=a+"\n\n"+o+i+c+"\n\n"+e.trim()+"\n\n",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)})),o.subParser("detab",(function(e,t,r){"use strict";return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){for(var r=t,n=4-r.length%4,a=0;a/g,">"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)})),o.subParser("encodeBackslashEscapes",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,o.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,o.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)})),o.subParser("encodeCode",(function(e,t,r){"use strict";return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,o.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)})),o.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}))).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)})),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)})),o.subParser("githubCodeBlocks",(function(e,t,r){"use strict";return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,n,a,i){var s=t.omitExtraWLInCodeBlocks?"":"\n";return i=o.subParser("encodeCode")(i,t,r),i="
"+(i=(i=(i=o.subParser("detab")(i,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",i=o.subParser("hashBlock")(i,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:i})-1)+"G\n\n"}))).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e})),o.subParser("hashBlock",(function(e,t,r){"use strict";return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)})),o.subParser("hashCodeTags",(function(e,t,r){"use strict";e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=o.helper.replaceRecursiveRegExp(e,(function(e,n,a,i){var s=a+o.subParser("encodeCode")(n,t,r)+i;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"}),"]*>","","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)})),o.subParser("hashElement",(function(e,t,r){"use strict";return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n¨K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}})),o.subParser("hashHTMLBlocks",(function(e,t,r){"use strict";e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,t,n,a){var o=e;return-1!==n.search(/\bmarkdown\b/)&&(o=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(o)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var i=0;i]*>)","im"),l="<"+n[i]+"\\b[^>]*>",u="";-1!==(s=o.helper.regexIndexOf(e,c));){var d=o.helper.splitAtIndex(e,s),p=o.helper.replaceRecursiveRegExp(d[1],a,l,u,"im");if(p===d[1])break;e=d[0].concat(p)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(e,t,r)),e=(e=o.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)})),o.subParser("hashHTMLSpans",(function(e,t,r){"use strict";function n(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,(function(e){return n(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return n(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return n(e)}))).replace(/<[^>]+?>/gi,(function(e){return n(e)})),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)})),o.subParser("unhashHTMLSpans",(function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)})),o.subParser("headers",(function(e,t,r){"use strict";e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),a=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,i=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(a,(function(e,a){var i=o.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=""+i+"";return o.subParser("hashBlock")(l,t,r)}))).replace(i,(function(e,a){var i=o.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=n+1,u=""+i+"";return o.subParser("hashBlock")(u,t,r)}));var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function c(e){var n,a;if(t.customizedHeaderId){var i=e.match(/\{([^{]+?)}\s*$/);i&&i[1]&&(e=i[1])}return n=e,a=o.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(n=a+n),n=t.ghCompatibleHeaderId?n.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?n.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():n.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(n=a+n),r.hashLinkCounts[n]?n=n+"-"+r.hashLinkCounts[n]++:r.hashLinkCounts[n]=1,n}return e=e.replace(s,(function(e,a,i){var s=i;t.customizedHeaderId&&(s=i.replace(/\s?\{([^{]+?)}\s*$/,""));var l=o.subParser("spanGamut")(s,t,r),u=t.noHeaderId?"":' id="'+c(i)+'"',d=n-1+a.length,p=""+l+"";return o.subParser("hashBlock")(p,t,r)})),e=r.converter._dispatch("headers.after",e,t,r)})),o.subParser("horizontalRule",(function(e,t,r){"use strict";e=r.converter._dispatch("horizontalRule.before",e,t,r);var n=o.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=r.converter._dispatch("horizontalRule.after",e,t,r)})),o.subParser("images",(function(e,t,r){"use strict";function n(e,t,n,a,i,s,c,l){var u=r.gUrls,d=r.gTitles,p=r.gDimensions;if(n=n.toLowerCase(),l||(l=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)a="";else if(""===a||null===a){if(""!==n&&null!==n||(n=t.toLowerCase().replace(/ ?\n/g," ")),a="#"+n,o.helper.isUndefined(u[n]))return e;a=u[n],o.helper.isUndefined(d[n])||(l=d[n]),o.helper.isUndefined(p[n])||(i=p[n].width,s=p[n].height)}t=t.replace(/"/g,""").replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var h=''+t+'"}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,r,a,o,i,s,c){return n(e,t,r,a=a.replace(/\s/g,""),o,i,s,c)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n)).replace(/!\[([^\[\]]+)]()()()()()/g,n),e=r.converter._dispatch("images.after",e,t,r)})),o.subParser("italicsAndBold",(function(e,t,r){"use strict";function n(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return n(t,"","")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return n(t,"","")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return n(t,"","")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,r){return n(r,t+"","")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,r){return n(r,t+"","")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,r){return n(r,t+"","")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e})),e=r.converter._dispatch("italicsAndBold.after",e,t,r)})),o.subParser("lists",(function(e,t,r){"use strict";function n(e,n){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,i=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,(function(e,n,a,s,c,l,u){u=u&&""!==u.trim();var d=o.subParser("outdent")(c,t,r),p="";return l&&t.tasklists&&(p=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='-1?(d=o.subParser("githubCodeBlocks")(d,t,r),d=o.subParser("blockGamut")(d,t,r)):(d=(d=o.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=o.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=i?o.subParser("paragraphs")(d,t,r):o.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+"\n"}))).replace(/¨0/g,""),r.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function a(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function i(e,r,o){var i=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===r?i:s,l="";if(-1!==e.search(c))!function t(u){var d=u.search(c),p=a(e,r);-1!==d?(l+="\n\n<"+r+p+">\n"+n(u.slice(0,d),!!o)+"\n",c="ul"===(r="ul"===r?"ol":"ul")?i:s,t(u.slice(d))):l+="\n\n<"+r+p+">\n"+n(u,!!o)+"\n"}(e);else{var u=a(e,r);l="\n\n<"+r+u+">\n"+n(e,!!o)+"\n"}return l}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,r){return i(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,r,n){return i(r,n.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)})),o.subParser("metadata",(function(e,t,r){"use strict";if(!t.metadata)return e;function n(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,n){return r.metadata.parsed[t]=n,""}))}return e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,r){return n(r),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,a){return t&&(r.metadata.format=t),n(a),"¨M"}))).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)})),o.subParser("outdent",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=r.converter._dispatch("outdent.after",e,t,r)})),o.subParser("paragraphs",(function(e,t,r){"use strict";for(var n=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),a=[],i=n.length,s=0;s=0?a.push(c):c.search(/\S/)>=0&&(c=(c=o.subParser("spanGamut")(c,t,r)).replace(/^([ \t]*)/g,"

"),c+="

",a.push(c))}for(i=a.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}a[s]=u}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)})),o.subParser("runExtension",(function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t})),o.subParser("spanGamut",(function(e,t,r){"use strict";return e=r.converter._dispatch("spanGamut.before",e,t,r),e=o.subParser("codeSpans")(e,t,r),e=o.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=o.subParser("encodeBackslashEscapes")(e,t,r),e=o.subParser("images")(e,t,r),e=o.subParser("anchors")(e,t,r),e=o.subParser("autoLinks")(e,t,r),e=o.subParser("simplifiedAutoLinks")(e,t,r),e=o.subParser("emoji")(e,t,r),e=o.subParser("underline")(e,t,r),e=o.subParser("italicsAndBold")(e,t,r),e=o.subParser("strikethrough")(e,t,r),e=o.subParser("ellipsis")(e,t,r),e=o.subParser("hashHTMLSpans")(e,t,r),e=o.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)})),o.subParser("strikethrough",(function(e,t,r){"use strict";return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,n){return function(e){return t.simplifiedAutoLink&&(e=o.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(n)})),e=r.converter._dispatch("strikethrough.after",e,t,r)),e})),o.subParser("stripLinkDefinitions",(function(e,t,r){"use strict";var n=function(e,n,a,i,s,c,l){return n=n.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[n]=a.replace(/\s/g,""):r.gUrls[n]=o.subParser("encodeAmpsAndAngles")(a,t,r),c?c+l:(l&&(r.gTitles[n]=l.replace(/"|'/g,""")),t.parseImgDimensions&&i&&s&&(r.gDimensions[n]={width:i,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n)).replace(/¨0/,"")})),o.subParser("tables",(function(e,t,r){"use strict";if(!t.tables)return e;function n(e,n){return""+o.subParser("spanGamut")(e,t,r)+"\n"}function a(e){var a,i=e.split("\n");for(a=0;a"+(c=o.subParser("spanGamut")(c,t,r))+"\n"));for(a=0;a\n\n\n",a=0;a\n";for(var o=0;o\n"}return r+"\n\n"}(f,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,o.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),e=r.converter._dispatch("tables.after",e,t,r)})),o.subParser("underline",(function(e,t,r){"use strict";return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return""+t+""}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return""+t+""})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/(_)/g,o.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e})),o.subParser("unescapeSpecialChars",(function(e,t,r){"use strict";return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,(function(e,t){var r=parseInt(t);return String.fromCharCode(r)})),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)})),o.subParser("makeMarkdown.blockquote",(function(e,t){"use strict";var r="";if(e.hasChildNodes())for(var n=e.childNodes,a=n.length,i=0;i ")})),o.subParser("makeMarkdown.codeBlock",(function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"})),o.subParser("makeMarkdown.codeSpan",(function(e){"use strict";return"`"+e.innerHTML+"`"})),o.subParser("makeMarkdown.emphasis",(function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="*";for(var n=e.childNodes,a=n.length,i=0;i",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),o.subParser("makeMarkdown.links",(function(e,t){"use strict";var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,a=n.length;r="[";for(var i=0;i",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r})),o.subParser("makeMarkdown.list",(function(e,t,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,i=a.length,s=e.getAttribute("start")||1,c=0;c"+t.preList[r]+""})),o.subParser("makeMarkdown.strikethrough",(function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="~~";for(var n=e.childNodes,a=n.length,i=0;itr>th"),c=e.querySelectorAll("tbody>tr");for(r=0;rf&&(f=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}));void 0===(n=function(){"use strict";return o}.call(t,r,t,e))||(e.exports=n)}).call(this)}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{__EXPERIMENTAL_ELEMENTS:function(){return ve},__EXPERIMENTAL_PATHS_WITH_MERGE:function(){return Te},__EXPERIMENTAL_STYLE_PROPERTY:function(){return we},__experimentalCloneSanitizedBlock:function(){return dt},__experimentalGetAccessibleBlockLabel:function(){return Et},__experimentalGetBlockAttributesNamesByRole:function(){return Nt},__experimentalGetBlockLabel:function(){return St},__experimentalSanitizeBlockAttributes:function(){return Bt},__unstableGetBlockProps:function(){return ir},__unstableGetInnerBlocksProps:function(){return sr},__unstableSerializeAndClean:function(){return hr},children:function(){return mn},cloneBlock:function(){return pt},createBlock:function(){return lt},createBlocksFromInnerBlocksTemplate:function(){return ut},doBlocksMatchTemplate:function(){return ba},findTransform:function(){return bt},getBlockAttributes:function(){return vn},getBlockContent:function(){return dr},getBlockDefaultClassName:function(){return rr},getBlockFromExample:function(){return yt},getBlockMenuDefaultClassName:function(){return nr},getBlockSupport:function(){return $e},getBlockTransforms:function(){return _t},getBlockType:function(){return He},getBlockTypes:function(){return Re},getBlockVariations:function(){return Ze},getCategories:function(){return fa},getChildBlockNames:function(){return Ge},getDefaultBlockName:function(){return Ve},getFreeformContentHandlerName:function(){return Me},getGroupingBlockName:function(){return De},getPhrasingContentSchema:function(){return Fn},getPossibleBlockTransformations:function(){return mt},getSaveContent:function(){return lr},getSaveElement:function(){return cr},getUnregisteredTypeHandlerName:function(){return ze},hasBlockSupport:function(){return Fe},hasChildBlocks:function(){return Ke},hasChildBlocksWithInserterSupport:function(){return We},isReusableBlock:function(){return qe},isTemplatePart:function(){return Ue},isUnmodifiedDefaultBlock:function(){return vt},isValidBlockContent:function(){return en},isValidIcon:function(){return Tt},node:function(){return pn},normalizeIconObject:function(){return Ct},parse:function(){return En},parseWithAttributeSchema:function(){return wn},pasteHandler:function(){return ha},rawHandler:function(){return qn},registerBlockCollection:function(){return Ae},registerBlockStyle:function(){return Ye},registerBlockType:function(){return Be},registerBlockVariation:function(){return Xe},serialize:function(){return fr},serializeRawBlock:function(){return tr},setCategories:function(){return ga},setDefaultBlockName:function(){return Oe},setFreeformContentHandlerName:function(){return Le},setGroupingBlockName:function(){return Ie},setUnregisteredTypeHandlerName:function(){return je},store:function(){return Qt},switchToBlockType:function(){return kt},synchronizeBlocksWithTemplate:function(){return _a},unregisterBlockStyle:function(){return Qe},unregisterBlockType:function(){return Pe},unregisterBlockVariation:function(){return Je},unstable__bootstrapServerSideBlockDefinitions:function(){return Se},updateCategory:function(){return ma},validateBlock:function(){return Jr},withBlockContentContext:function(){return Ta}});var e={};r.r(e),r.d(e,{__experimentalGetUnprocessedBlockTypes:function(){return w},getActiveBlockVariation:function(){return S},getBlockStyles:function(){return C},getBlockSupport:function(){return j},getBlockType:function(){return T},getBlockTypes:function(){return v},getBlockVariations:function(){return x},getCategories:function(){return B},getChildBlockNames:function(){return D},getCollections:function(){return N},getDefaultBlockName:function(){return A},getDefaultBlockVariation:function(){return E},getFreeformFallbackBlockName:function(){return P},getGroupingBlockName:function(){return M},getUnregisteredFallbackBlockName:function(){return L},hasBlockSupport:function(){return z},hasChildBlocks:function(){return I},hasChildBlocksWithInserterSupport:function(){return V},isMatchingSearchTerm:function(){return O}});var t={};r.r(t),r.d(t,{__experimentalReapplyBlockTypeFilters:function(){return zt},__experimentalRegisterBlockType:function(){return jt},addBlockCollection:function(){return Wt},addBlockStyles:function(){return It},addBlockTypes:function(){return Dt},addBlockVariations:function(){return Ht},removeBlockCollection:function(){return Yt},removeBlockStyles:function(){return Vt},removeBlockTypes:function(){return Ot},removeBlockVariations:function(){return Rt},setCategories:function(){return Gt},setDefaultBlockName:function(){return $t},setFreeformFallbackBlockName:function(){return Ft},setGroupingBlockName:function(){return Ut},setUnregisteredFallbackBlockName:function(){return qt},updateCategory:function(){return Kt}});var a=window.wp.data,o=window.lodash,i=window.wp.i18n;const s=[{slug:"text",title:(0,i.__)("Text")},{slug:"media",title:(0,i.__)("Media")},{slug:"design",title:(0,i.__)("Design")},{slug:"widgets",title:(0,i.__)("Widgets")},{slug:"theme",title:(0,i.__)("Theme")},{slug:"embed",title:(0,i.__)("Embeds")},{slug:"reusable",title:(0,i.__)("Reusable blocks")}];function c(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REMOVE_BLOCK_TYPES":return-1!==r.names.indexOf(t)?null:t;case e:return r.name||null}return t}}const l=c("SET_DEFAULT_BLOCK_NAME"),u=c("SET_FREEFORM_FALLBACK_BLOCK_NAME"),d=c("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),p=c("SET_GROUPING_BLOCK_NAME");var h,f,g=(0,a.combineReducers)({unprocessedBlockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.blockType.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return(0,o.omit)(e,t.names)}return e},blockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,o.keyBy)(t.blockTypes,"name")};case"REMOVE_BLOCK_TYPES":return(0,o.omit)(e,t.names)}return e},blockStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,o.mapValues)((0,o.keyBy)(t.blockTypes,"name"),(t=>(0,o.uniqBy)([...(0,o.get)(t,["styles"],[]).map((e=>({...e,source:"block"}))),...(0,o.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))],(e=>e.name))))};case"ADD_BLOCK_STYLES":return{...e,[t.blockName]:(0,o.uniqBy)([...(0,o.get)(e,[t.blockName],[]),...t.styles],(e=>e.name))};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:(0,o.filter)((0,o.get)(e,[t.blockName],[]),(e=>-1===t.styleNames.indexOf(e.name)))}}return e},blockVariations:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,o.mapValues)((0,o.keyBy)(t.blockTypes,"name"),(t=>(0,o.uniqBy)([...(0,o.get)(t,["variations"],[]).map((e=>({...e,source:"block"}))),...(0,o.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))],(e=>e.name))))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,o.uniqBy)([...(0,o.get)(e,[t.blockName],[]),...t.variations],(e=>e.name))};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,o.filter)((0,o.get)(e,[t.blockName],[]),(e=>-1===t.variationNames.indexOf(e.name)))}}return e},defaultBlockName:l,freeformFallbackBlockName:u,unregisteredFallbackBlockName:d,groupingBlockName:p,categories:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||(0,o.isEmpty)(t.category))return e;if((0,o.find)(e,["slug",t.slug]))return(0,o.map)(e,(e=>e.slug===t.slug?{...e,...t.category}:e))}return e},collections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return(0,o.omit)(e,t.namespace)}return e}});function m(e){return[e]}function b(){var e={clear:function(){e.head=null}};return e}function _(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n"string"==typeof t?T(e,t):t;function w(e){return e.unprocessedBlockTypes}const v=k((e=>Object.values(e.blockTypes)),(e=>[e.blockTypes]));function T(e,t){return e.blockTypes[t]}function C(e,t){return e.blockStyles[t]}const x=k(((e,t,r)=>{const n=e.blockVariations[t];return n&&r?n.filter((e=>(e.scope||["block","inserter"]).includes(r))):n}),((e,t)=>[e.blockVariations[t]]));function S(e,t,r,n){const a=x(e,t,n);return null==a?void 0:a.find((n=>{var a;if(Array.isArray(n.isActive)){const a=T(e,t),o=Object.keys((null==a?void 0:a.attributes)||{}),i=n.isActive.filter((e=>o.includes(e)));return 0!==i.length&&i.every((e=>r[e]===n.attributes[e]))}return null===(a=n.isActive)||void 0===a?void 0:a.call(n,r,n.attributes)}))}function E(e,t,r){const n=x(e,t,r);return(0,o.findLast)(n,"isDefault")||(0,o.first)(n)}function B(e){return e.categories}function N(e){return e.collections}function A(e){return e.defaultBlockName}function P(e){return e.freeformFallbackBlockName}function L(e){return e.unregisteredFallbackBlockName}function M(e){return e.groupingBlockName}const D=k(((e,t)=>(0,o.map)((0,o.filter)(e.blockTypes,(e=>(0,o.includes)(e.parent,t))),(e=>{let{name:t}=e;return t}))),(e=>[e.blockTypes])),j=(e,t,r,n)=>{const a=y(e,t);return null!=a&&a.supports?(0,o.get)(a.supports,r,n):n};function z(e,t,r,n){return!!j(e,t,r,n)}function O(e,t,r){const n=y(e,t),a=(0,o.flow)([o.deburr,e=>e.toLowerCase(),e=>e.trim()]),i=a(r),s=(0,o.flow)([a,e=>(0,o.includes)(e,i)]);return s(n.title)||(0,o.some)(n.keywords,s)||s(n.category)||s(n.description)}const I=(e,t)=>D(e,t).length>0,V=(e,t)=>(0,o.some)(D(e,t),(t=>z(e,t,"inserter",!0)));var H=window.wp.hooks,R={grad:.9,turn:360,rad:360/(2*Math.PI)},$=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},F=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},q=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e>t?e:t},U=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},G=function(e){return{r:q(e.r,0,255),g:q(e.g,0,255),b:q(e.b,0,255),a:q(e.a)}},K=function(e){return{r:F(e.r),g:F(e.g),b:F(e.b),a:F(e.a,3)}},W=/^#([0-9a-f]{3,8})$/i,Y=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Q=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=Math.max(t,r,n),i=o-Math.min(t,r,n),s=i?o===t?(r-n)/i:o===r?2+(n-t)/i:4+(t-r)/i:0;return{h:60*(s<0?s+6:s),s:o?i/o*100:0,v:o/255*100,a:a}},Z=function(e){var t=e.h,r=e.s,n=e.v,a=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),i=n*(1-r),s=n*(1-(t-o)*r),c=n*(1-(1-t+o)*r),l=o%6;return{r:255*[n,s,i,i,c,n][l],g:255*[c,n,n,s,i,i][l],b:255*[i,i,c,n,n,s][l],a:a}},X=function(e){return{h:U(e.h),s:q(e.s,0,100),l:q(e.l,0,100),a:q(e.a)}},J=function(e){return{h:F(e.h),s:F(e.s),l:F(e.l),a:F(e.a,3)}},ee=function(e){return Z((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},te=function(e){return{h:(t=Q(e)).h,s:(a=(200-(r=t.s))*(n=t.v)/100)>0&&a<200?r*n/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,r,n,a},re=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ne=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ae=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ie={string:[[function(e){var t=W.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?F(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?F(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ae.exec(e)||oe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:G({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=re.exec(e)||ne.exec(e);if(!t)return null;var r,n,a=X({h:(r=t[1],n=t[2],void 0===n&&(n="deg"),Number(r)*(R[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ee(a)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=void 0===a?1:a;return $(t)&&$(r)&&$(n)?G({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,a=e.a,o=void 0===a?1:a;if(!$(t)||!$(r)||!$(n))return null;var i=X({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return ee(i)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,a=e.a,o=void 0===a?1:a;if(!$(t)||!$(r)||!$(n))return null;var i=function(e){return{h:U(e.h),s:q(e.s,0,100),v:q(e.v,0,100),a:q(e.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return Z(i)},"hsv"]]},se=function(e,t){for(var r=0;r=.5},e.prototype.toHex=function(){return t=(e=K(this.rgba)).r,r=e.g,n=e.b,o=(a=e.a)<1?Y(F(255*a)):"","#"+Y(t)+Y(r)+Y(n)+o;var e,t,r,n,a,o},e.prototype.toRgb=function(){return K(this.rgba)},e.prototype.toRgbString=function(){return t=(e=K(this.rgba)).r,r=e.g,n=e.b,(a=e.a)<1?"rgba("+t+", "+r+", "+n+", "+a+")":"rgb("+t+", "+r+", "+n+")";var e,t,r,n,a},e.prototype.toHsl=function(){return J(te(this.rgba))},e.prototype.toHslString=function(){return t=(e=J(te(this.rgba))).h,r=e.s,n=e.l,(a=e.a)<1?"hsla("+t+", "+r+"%, "+n+"%, "+a+")":"hsl("+t+", "+r+"%, "+n+"%)";var e,t,r,n,a},e.prototype.toHsv=function(){return e=Q(this.rgba),{h:F(e.h),s:F(e.s),v:F(e.v),a:F(e.a,3)};var e},e.prototype.invert=function(){return he({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),he(le(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),he(le(this.rgba,-e))},e.prototype.grayscale=function(){return he(le(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),he(de(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),he(de(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?he({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):F(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=te(this.rgba);return"number"==typeof e?he({h:e,s:t.s,l:t.l,a:t.a}):F(t.h)},e.prototype.isEqual=function(e){return this.toHex()===he(e).toHex()},e}(),he=function(e){return e instanceof pe?e:new pe(e)},fe=[];var ge=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},me=function(e){return.2126*ge(e.r)+.7152*ge(e.g)+.0722*ge(e.b)};var be=window.wp.element,_e=window.wp.dom;const ke="block-default",ye=["attributes","supports","save","migrate","isEligible","apiVersion"],we={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},background:{value:["color","gradient"],support:["color","gradients"]},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"]},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"}},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"]},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"]},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0},filter:{value:["filter","duotone"],support:["color","__experimentalDuotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"]},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"]},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"]},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"]},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"]},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"]},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"]},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"]},"--wp--style--block-gap":{value:["spacing","blockGap"],support:["spacing","blockGap"]}},ve={link:"a",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},Te={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0},Ce={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]},xe={};function Se(e){for(const t of Object.keys(e))xe[t]?(void 0===xe[t].apiVersion&&e[t].apiVersion&&(xe[t].apiVersion=e[t].apiVersion),void 0===xe[t].ancestor&&e[t].ancestor&&(xe[t].ancestor=e[t].ancestor)):xe[t]=(0,o.mapKeys)((0,o.pickBy)(e[t],(e=>!(0,o.isNil)(e))),((e,t)=>(0,o.camelCase)(t)))}function Ee(e){let{textdomain:t,...r}=e;const n=(0,o.pick)(r,["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","supports","styles","example","variations"]);return t&&Object.keys(Ce).forEach((e=>{n[e]&&(n[e]=Ne(Ce[e],n[e],t))})),n}function Be(e,t){const r=(0,o.isObject)(e)?e.name:e;if("string"!=typeof r)return void console.error("Block names must be strings.");if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(r))return void console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");if((0,a.select)(Qt).getBlockType(r))return void console.error('Block "'+r+'" is already registered.');(0,o.isObject)(e)&&Se({[r]:Ee(e)});const n={name:r,icon:ke,keywords:[],attributes:{},providesContext:{},usesContext:[],supports:{},styles:[],variations:[],save:()=>null,...null==xe?void 0:xe[r],...t};return(0,a.dispatch)(Qt).__experimentalRegisterBlockType(n),(0,a.select)(Qt).getBlockType(r)}function Ne(e,t,r){return(0,o.isString)(e)&&(0,o.isString)(t)?(0,i._x)(t,e,r):(0,o.isArray)(e)&&!(0,o.isEmpty)(e)&&(0,o.isArray)(t)?t.map((t=>Ne(e[0],t,r))):(0,o.isObject)(e)&&!(0,o.isEmpty)(e)&&(0,o.isObject)(t)?Object.keys(t).reduce(((n,a)=>e[a]?(n[a]=Ne(e[a],t[a],r),n):(n[a]=t[a],n)),{}):t}function Ae(e,t){let{title:r,icon:n}=t;(0,a.dispatch)(Qt).addBlockCollection(e,r,n)}function Pe(e){const t=(0,a.select)(Qt).getBlockType(e);if(t)return(0,a.dispatch)(Qt).removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}function Le(e){(0,a.dispatch)(Qt).setFreeformFallbackBlockName(e)}function Me(){return(0,a.select)(Qt).getFreeformFallbackBlockName()}function De(){return(0,a.select)(Qt).getGroupingBlockName()}function je(e){(0,a.dispatch)(Qt).setUnregisteredFallbackBlockName(e)}function ze(){return(0,a.select)(Qt).getUnregisteredFallbackBlockName()}function Oe(e){(0,a.dispatch)(Qt).setDefaultBlockName(e)}function Ie(e){(0,a.dispatch)(Qt).setGroupingBlockName(e)}function Ve(){return(0,a.select)(Qt).getDefaultBlockName()}function He(e){var t;return null===(t=(0,a.select)(Qt))||void 0===t?void 0:t.getBlockType(e)}function Re(){return(0,a.select)(Qt).getBlockTypes()}function $e(e,t,r){return(0,a.select)(Qt).getBlockSupport(e,t,r)}function Fe(e,t,r){return(0,a.select)(Qt).hasBlockSupport(e,t,r)}function qe(e){return"core/block"===(null==e?void 0:e.name)}function Ue(e){return"core/template-part"===e.name}const Ge=e=>(0,a.select)(Qt).getChildBlockNames(e),Ke=e=>(0,a.select)(Qt).hasChildBlocks(e),We=e=>(0,a.select)(Qt).hasChildBlocksWithInserterSupport(e),Ye=(e,t)=>{(0,a.dispatch)(Qt).addBlockStyles(e,t)},Qe=(e,t)=>{(0,a.dispatch)(Qt).removeBlockStyles(e,t)},Ze=(e,t)=>(0,a.select)(Qt).getBlockVariations(e,t),Xe=(e,t)=>{(0,a.dispatch)(Qt).addBlockVariations(e,t)},Je=(e,t)=>{(0,a.dispatch)(Qt).removeBlockVariations(e,t)};var et,tt=new Uint8Array(16);function rt(){if(!et&&!(et="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return et(tt)}var nt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var at=function(e){return"string"==typeof e&&nt.test(e)},ot=[],it=0;it<256;++it)ot.push((it+256).toString(16).substr(1));var st=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(ot[e[t+0]]+ot[e[t+1]]+ot[e[t+2]]+ot[e[t+3]]+"-"+ot[e[t+4]]+ot[e[t+5]]+"-"+ot[e[t+6]]+ot[e[t+7]]+"-"+ot[e[t+8]]+ot[e[t+9]]+"-"+ot[e[t+10]]+ot[e[t+11]]+ot[e[t+12]]+ot[e[t+13]]+ot[e[t+14]]+ot[e[t+15]]).toLowerCase();if(!at(r))throw TypeError("Stringified UUID is invalid");return r};var ct=function(e,t,r){var n=(e=e||{}).random||(e.rng||rt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return st(n)};function lt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=Bt(e,t),a=ct();return{clientId:a,name:e,isValid:!0,attributes:n,innerBlocks:r}}function ut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[r,n,a=[]]=t;return lt(r,n,ut(a))}))}function dt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const n=ct(),a=Bt(e.name,{...e.attributes,...t});return{...e,clientId:n,attributes:a,innerBlocks:r||e.innerBlocks.map((e=>dt(e)))}}function pt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const n=ct();return{...e,clientId:n,attributes:{...e.attributes,...t},innerBlocks:r||e.innerBlocks.map((e=>pt(e)))}}const ht=(e,t,r)=>{if((0,o.isEmpty)(r))return!1;const n=r.length>1,a=(0,o.first)(r).name;if(!(ft(e)||!n||e.isMultiBlock))return!1;if(!ft(e)&&!(0,o.every)(r,{name:a}))return!1;if(!("block"===e.type))return!1;const i=(0,o.first)(r);if(!("from"!==t||-1!==e.blocks.indexOf(i.name)||ft(e)))return!1;if(!n&>(i.name)&>(e.blockName))return!1;if((0,o.isFunction)(e.isMatch)){const t=e.isMultiBlock?r.map((e=>e.attributes)):i.attributes,n=e.isMultiBlock?r:i;if(!e.isMatch(t,n))return!1}return!(e.usingMobileTransformations&&ft(e)&&!gt(i.name))},ft=e=>e&&"block"===e.type&&Array.isArray(e.blocks)&&e.blocks.includes("*"),gt=e=>e===De();function mt(e){if((0,o.isEmpty)(e))return[];const t=(e=>{if((0,o.isEmpty)(e))return[];const t=Re();return(0,o.filter)(t,(t=>!!bt(_t("from",t.name),(t=>ht(t,"from",e)))))})(e),r=(e=>{if((0,o.isEmpty)(e))return[];const t=He((0,o.first)(e).name),r=t?_t("to",t.name):[],n=(0,o.filter)(r,(t=>t&&ht(t,"to",e)));return(0,o.flatMap)(n,(e=>e.blocks)).map((e=>"*"===e?e:He(e)))})(e);return(0,o.uniq)([...t,...r])}function bt(e,t){const r=(0,H.createHooks)();for(let n=0;ne||a),a.priority)}return r.applyFilters("transform",null)}function _t(e,t){if(void 0===t)return(0,o.flatMap)(Re(),(t=>{let{name:r}=t;return _t(e,r)}));const r=xt(t),{name:n,transforms:a}=r||{};if(!a||!Array.isArray(a[e]))return[];const i=a.supportedMobileTransforms&&Array.isArray(a.supportedMobileTransforms),s=i?(0,o.filter)(a[e],(e=>"raw"===e.type||!(!e.blocks||!e.blocks.length)&&(!!ft(e)||(0,o.every)(e.blocks,(e=>a.supportedMobileTransforms.includes(e)))))):a[e];return s.map((e=>({...e,blockName:n,usingMobileTransformations:i})))}function kt(e,t){const r=(0,o.castArray)(e),n=r.length>1,a=r[0],i=a.name,s=_t("from",t),c=bt(_t("to",i),(e=>"block"===e.type&&(ft(e)||-1!==e.blocks.indexOf(t))&&(!n||e.isMultiBlock)))||bt(s,(e=>"block"===e.type&&(ft(e)||-1!==e.blocks.indexOf(i))&&(!n||e.isMultiBlock)));if(!c)return null;let l;if(l=c.isMultiBlock?(0,o.has)(c,"__experimentalConvert")?c.__experimentalConvert(r):c.transform(r.map((e=>e.attributes)),r.map((e=>e.innerBlocks))):(0,o.has)(c,"__experimentalConvert")?c.__experimentalConvert(a):c.transform(a.attributes,a.innerBlocks),!(0,o.isObjectLike)(l))return null;if(l=(0,o.castArray)(l),l.some((e=>!He(e.name))))return null;if(!("*"===t||(0,o.some)(l,(e=>e.name===t))))return null;return l.map(((t,r,n)=>(0,H.applyFilters)("blocks.switchToBlockType.transformedBlock",t,e,r,n)))}const yt=(e,t)=>lt(e,t.attributes,(0,o.map)(t.innerBlocks,(e=>yt(e.name,e))));!function(e){e.forEach((function(e){fe.indexOf(e)<0&&(e(pe,ie),fe.push(e))}))}([function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var a in r)n[r[a]]=a;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,i,s=n[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var c=this.toRgb(),l=1/0,u="black";if(!o.length)for(var d in r)o[d]=new e(r[d]).toRgb();for(var p in r){var h=(a=c,i=o[p],Math.pow(a.r-i.r,2)+Math.pow(a.g-i.g,2)+Math.pow(a.b-i.b,2));h(c=me(i))?(s+.05)/(c+.05):(c+.05)/(s+.05),void 0===(n=2)&&(n=0),void 0===a&&(a=Math.pow(10,n)),Math.floor(a*r)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(o=(r=t).size)?"normal":o,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===i?7:"AA"===a&&"large"===i?3:4.5);var r,n,a,o,i}}]);const wt=["#191e23","#f8f9f9"];function vt(e){const t=Ve();if(e.name!==t)return!1;vt.block&&vt.block.name===t||(vt.block=lt(t));const r=vt.block,n=He(t);return(0,o.every)(null==n?void 0:n.attributes,((t,n)=>r.attributes[n]===e.attributes[n]))}function Tt(e){return!!e&&((0,o.isString)(e)||(0,be.isValidElement)(e)||(0,o.isFunction)(e)||e instanceof be.Component)}function Ct(e){if(Tt(e=e||ke))return{src:e};if((0,o.has)(e,["background"])){const t=he(e.background);return{...e,foreground:e.foreground?e.foreground:(0,o.maxBy)(wt,(e=>t.contrast(e))),shadowColor:t.alpha(.3).toRgbString()}}return e}function xt(e){return(0,o.isString)(e)?He(e):e}function St(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"visual";const{__experimentalLabel:n,title:a}=e,o=n&&n(t,{context:r});return o?(0,_e.__unstableStripHTML)(o):a}function Et(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vertical";const a=null==e?void 0:e.title,o=e?St(e,t,"accessibility"):"",s=void 0!==r,c=o&&o!==a;return s&&"vertical"===n?c?(0,i.sprintf)((0,i.__)("%1$s Block. Row %2$d. %3$s"),a,r,o):(0,i.sprintf)((0,i.__)("%1$s Block. Row %2$d"),a,r):s&&"horizontal"===n?c?(0,i.sprintf)((0,i.__)("%1$s Block. Column %2$d. %3$s"),a,r,o):(0,i.sprintf)((0,i.__)("%1$s Block. Column %2$d"),a,r):c?(0,i.sprintf)((0,i.__)("%1$s Block. %2$s"),a,o):(0,i.sprintf)((0,i.__)("%s Block"),a)}function Bt(e,t){const r=He(e);if(void 0===r)throw new Error(`Block type '${e}' is not registered.`);return(0,o.reduce)(r.attributes,((e,r,n)=>{const a=t[n];return void 0!==a?e[n]=a:r.hasOwnProperty("default")&&(e[n]=r.default),-1!==["node","children"].indexOf(r.source)&&("string"==typeof e[n]?e[n]=[e[n]]:Array.isArray(e[n])||(e[n]=[])),e}),{})}function Nt(e,t){var r;const n=null===(r=He(e))||void 0===r?void 0:r.attributes;if(!n)return[];const a=Object.keys(n);return t?a.filter((e=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.__experimentalRole)===t})):a}const{error:At,warn:Pt}=window.console,Lt={common:"text",formatting:"text",layout:"design"},Mt=(e,t)=>{let{select:r}=t;const{name:n}=e,a=(0,H.applyFilters)("blocks.registerBlockType",{...e},n);if(a.deprecated&&(a.deprecated=a.deprecated.map((t=>(0,o.pick)((0,H.applyFilters)("blocks.registerBlockType",{...(0,o.omit)(e,ye),...t},n),ye)))),(0,o.isPlainObject)(a))if((0,o.isFunction)(a.save))if(!("edit"in a)||(0,o.isFunction)(a.edit))if(Lt.hasOwnProperty(a.category)&&(a.category=Lt[a.category]),"category"in a&&!(0,o.some)(r.getCategories(),{slug:a.category})&&(Pt('The block "'+n+'" is registered with an invalid category "'+a.category+'".'),delete a.category),"title"in a&&""!==a.title)if("string"==typeof a.title){if(a.icon=Ct(a.icon),Tt(a.icon.src))return a;At("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional")}else At("Block titles must be strings.");else At('The block "'+n+'" must have a title.');else At('The "edit" property must be a valid function.');else At('The "save" property must be a valid function.');else At("Block settings must be a valid object.")};function Dt(e){return{type:"ADD_BLOCK_TYPES",blockTypes:(0,o.castArray)(e)}}const jt=e=>t=>{let{dispatch:r,select:n}=t;r({type:"ADD_UNPROCESSED_BLOCK_TYPE",blockType:e});const a=Mt(e,{select:n});a&&r.addBlockTypes(a)},zt=()=>e=>{let{dispatch:t,select:r}=e;const n=r.__experimentalGetUnprocessedBlockTypes(),a=Object.keys(n).reduce(((e,t)=>{const a=Mt(n[t],{select:r});return a&&e.push(a),e}),[]);a.length&&t.addBlockTypes(a)};function Ot(e){return{type:"REMOVE_BLOCK_TYPES",names:(0,o.castArray)(e)}}function It(e,t){return{type:"ADD_BLOCK_STYLES",styles:(0,o.castArray)(t),blockName:e}}function Vt(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:(0,o.castArray)(t),blockName:e}}function Ht(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:(0,o.castArray)(t),blockName:e}}function Rt(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:(0,o.castArray)(t),blockName:e}}function $t(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function Ft(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function qt(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function Ut(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function Gt(e){return{type:"SET_CATEGORIES",categories:e}}function Kt(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function Wt(e,t,r){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:r}}function Yt(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const Qt=(0,a.createReduxStore)("core/blocks",{reducer:g,selectors:e,actions:t});(0,a.register)(Qt);var Zt=window.wp.blockSerializationDefaultParser,Xt=window.wp.autop,Jt=window.wp.isShallowEqual,er=r.n(Jt);function tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isCommentDelimited:r=!0}=t,{blockName:n,attrs:a={},innerBlocks:o=[],innerContent:i=[]}=e;let s=0;const c=i.map((e=>null!==e?e:tr(o[s++],t))).join("\n").replace(/\n+/g,"\n").trim();return r?pr(n,a,c):c}function rr(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,H.applyFilters)("blocks.getBlockDefaultClassName",t,e)}function nr(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,H.applyFilters)("blocks.getBlockMenuDefaultClassName",t,e)}const ar={},or={};function ir(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blockType:t,attributes:r}=ar;return(0,H.applyFilters)("blocks.getSaveContent.extraProps",{...e},t,r)}function sr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerBlocks:t}=or,r=fr(t,{isInnerBlocks:!0}),n=(0,be.createElement)(be.RawHTML,null,r);return{...e,children:n}}function cr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=xt(e);let{save:a}=n;if(a.prototype instanceof be.Component){const e=new a({attributes:t});a=e.render.bind(e)}ar.blockType=n,ar.attributes=t,or.innerBlocks=r;let i=a({attributes:t,innerBlocks:r});if((0,o.isObject)(i)&&(0,H.hasFilter)("blocks.getSaveContent.extraProps")&&!(n.apiVersion>1)){const e=(0,H.applyFilters)("blocks.getSaveContent.extraProps",{...i.props},n,t);er()(e,i.props)||(i=(0,be.cloneElement)(i,e))}return(0,H.applyFilters)("blocks.getSaveElement",i,n,t)}function lr(e,t,r){const n=xt(e);return(0,be.renderToString)(cr(n,t,r))}function ur(e,t){return(0,o.reduce)(e.attributes,((e,r,n)=>{const a=t[n];return void 0===a||void 0!==r.source||"default"in r&&r.default===a||(e[n]=a),e}),{})}function dr(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=lr(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function pr(e,t,r){const n=(0,o.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",a=(0,o.startsWith)(e,"core/")?e.slice(5):e;return r?`\x3c!-- wp:${a} ${n}--\x3e\n`+r+`\n\x3c!-- /wp:${a} --\x3e`:`\x3c!-- wp:${a} ${n}/--\x3e`}function hr(e){1===e.length&&vt(e[0])&&(e=[]);let t=fr(e);return 1===e.length&&e[0].name===Me()&&(t=(0,Xt.removep)(t)),t}function fr(e,t){return(0,o.castArray)(e).map((e=>function(e){let{isInnerBlocks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.isValid&&e.__unstableBlockSource)return tr(e.__unstableBlockSource);const r=e.name,n=dr(e);if(r===ze()||!t&&r===Me())return n;const a=ur(He(r),e.attributes);return pr(r,a,n)}(e,t))).join("\n\n")}var gr=/^#[xX]([A-Fa-f0-9]+)$/,mr=/^#([0-9]+)$/,br=/^([A-Za-z0-9]+)$/,_r=(function(){function e(e){this.named=e}e.prototype.parse=function(e){if(e){var t=e.match(gr);return t?String.fromCharCode(parseInt(t[1],16)):(t=e.match(mr))?String.fromCharCode(parseInt(t[1],10)):(t=e.match(br))?this.named[t[1]]:void 0}}}(),/[\t\n\f ]/),kr=/[A-Za-z]/,yr=/\r\n?/g;function wr(e){return _r.test(e)}function vr(e){return kr.test(e)}var Tr=function(){function e(e,t,r){void 0===r&&(r="precompile"),this.delegate=e,this.entityParser=t,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var e=this.peek();if("<"!==e||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===e){var t=this.tagNameBuffer.toLowerCase();"pre"!==t&&"textarea"!==t||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var e=this.peek(),t=this.tagNameBuffer;"<"!==e||this.isIgnoredEndTag()?"&"===e&&"script"!==t&&"style"!==t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var e=this.consume();"!"===e?this.transitionTo("markupDeclarationOpen"):"/"===e?this.transitionTo("endTagOpen"):("@"===e||":"===e||vr(e))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(e))},markupDeclarationOpen:function(){var e=this.consume();"-"===e&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===e.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){wr(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var e=this.consume();wr(e)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase()))},doctypeName:function(){var e=this.consume();wr(e)?this.transitionTo("afterDoctypeName"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase())},afterDoctypeName:function(){var e=this.consume();if(!wr(e))if(">"===e)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var t=e.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),r="PUBLIC"===t.toUpperCase(),n="SYSTEM"===t.toUpperCase();(r||n)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),r?this.transitionTo("afterDoctypePublicKeyword"):n&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var e=this.peek();wr(e)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===e?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===e?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===e&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},doctypePublicIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},afterDoctypePublicIdentifier:function(){var e=this.consume();wr(e)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var e=this.consume();wr(e)||(">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},doctypeSystemIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},afterDoctypeSystemIdentifier:function(){var e=this.consume();wr(e)||">"===e&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var e=this.consume();"-"===e?this.transitionTo("commentStartDash"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(e),this.transitionTo("comment"))},commentStartDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var e=this.consume();"-"===e?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+e),this.transitionTo("comment"))},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+e),this.transitionTo("comment"))},tagName:function(){var e=this.consume();wr(e)?this.transitionTo("beforeAttributeName"):"/"===e?this.transitionTo("selfClosingStartTag"):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(e)},endTagName:function(){var e=this.consume();wr(e)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===e?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();wr(e)?this.consume():"/"===e?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();wr(e)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();wr(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();wr(e)?this.consume():'"'===e?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();wr(e)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();wr(e)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var e=this.consume();("@"===e||":"===e||vr(e))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(e))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(e){this.state=e},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(yr,"\n")}(e);this.index"!==this.input.substring(this.index,this.index+8)||"style"===e&&""!==this.input.substring(this.index,this.index+8)||"script"===e&&"<\/script>"!==this.input.substring(this.index,this.index+9)},e}(),Cr=function(){function e(e,t){void 0===t&&(t={}),this.options=t,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Tr(this,e,t.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},e.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var e=this.token;if(null===e)throw new Error("token was unexpectedly null");if(0===arguments.length)return e;for(var t=0;t1?r-1:0),a=1;a[]}}function Nr(){const e=[],t=Br();return{error(){for(var r=arguments.length,n=new Array(r),a=0;ae}}const Ar=/[\t\n\r\v\f ]+/g,Pr=/^[\t\n\r\v\f ]*$/,Lr=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,Mr=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],Dr=[...Mr,"autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],jr=[o.identity,function(e){return Hr(e).join(" ")}],zr=/^[\da-z]+$/i,Or=/^#\d+$/,Ir=/^#x[\da-f]+$/i;class Vr{parse(e){if(t=e,zr.test(t)||Or.test(t)||Ir.test(t))return(0,Er.decodeEntities)("&"+e+";");var t}}function Hr(e){return e.trim().split(Ar)}function Rr(e){return e.attributes.filter((e=>{const[t,r]=e;return r||0===t.indexOf("data-")||(0,o.includes)(Dr,t)}))}function $r(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Br(),n=e.chars,a=t.chars;for(let e=0;e{const[t,...r]=e.split(":"),n=r.join(":");return[t.trim(),qr(n.trim())]}));return(0,o.fromPairs)(t)}const Gr={class:(e,t)=>!(0,o.xor)(...[e,t].map(Hr)).length,style:(e,t)=>(0,o.isEqual)(...[e,t].map(Ur)),...(0,o.fromPairs)(Mr.map((e=>[e,o.stubTrue])))};function Kr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Br();if(e.length!==t.length)return r.warning("Expected attributes %o, instead saw %o.",t,e),!1;const n={};for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:Br();return e.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(r.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):Kr(...[e,t].map(Rr),r)},Chars:$r,Comment:$r};function Yr(e){let t;for(;t=e.shift();){if("Chars"!==t.type)return t;if(!Pr.test(t.chars))return t}}function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Br();try{return new Cr(new Vr).tokenize(e)}catch(r){t.warning("Malformed HTML detected: %s",e)}return null}function Zr(e,t){return!!e.selfClosing&&!(!t||t.tagName!==e.tagName||"EndTag"!==t.type)}function Xr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Br();if(e===t)return!0;const[n,a]=[e,t].map((e=>Qr(e,r)));if(!n||!a)return!1;let o,i;for(;o=Yr(n);){if(i=Yr(a),!i)return r.warning("Expected end of content, instead saw %o.",o),!1;if(o.type!==i.type)return r.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,o.type,o),!1;const e=Wr[o.type];if(e&&!e(o,i,r))return!1;Zr(o,a[0])?Yr(a):Zr(i,n[0])&&Yr(n)}return!(i=Yr(a))||(r.warning("Expected %o, instead saw end of content.",i),!1)}function Jr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.name;const r=e.name===Me()||e.name===ze();if(r)return[!0,[]];const n=Nr(),a=xt(t);let o;try{o=lr(a,e.attributes)}catch(e){return n.error("Block validation failed because an error occurred while generating block content:\n\n%s",e.toString()),[!1,n.getItems()]}const i=Xr(e.originalContent,o,n);return i||n.error("Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",a.name,a,o,e.originalContent),[i,n.getItems()]}function en(e,t,r){Sr()("isValidBlockContent introduces opportunity for data loss",{since:"12.6",plugin:"Gutenberg",alternative:"validateBlock"});const n=xt(e),a={name:n.name,attributes:t,innerBlocks:[],originalContent:r},[o]=Jr(a,n);return o}function tn(e,t){const r={...t};if("core/cover-image"===e&&(e="core/cover"),"core/text"!==e&&"core/cover-text"!==e||(e="core/paragraph"),e&&0===e.indexOf("core/social-link-")&&(r.service=e.substring(17),e="core/social-link"),e&&0===e.indexOf("core-embed/")){const t=e.substring(11),n={speaker:"speaker-deck",polldaddy:"crowdsignal"};r.providerNameSlug=t in n?n[t]:t,["amazon-kindle","wordpress"].includes(t)||(r.responsive=!0),e="core/embed"}return"core/query-loop"===e&&(e="core/post-template"),"core/post-comment-author"===e&&(e="core/comment-author-name"),"core/post-comment-content"===e&&(e="core/comment-content"),"core/post-comment-date"===e&&(e="core/comment-date"),[e,r]}function rn(e,t){for(var r,n=t.split(".");r=n.shift();){if(!(r in e))return;e=e[r]}return e}var nn,an=function(){return nn||(nn=document.implementation.createHTMLDocument("")),nn};function on(e,t){if(t){if("string"==typeof e){var r=an();r.body.innerHTML=e,e=r.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce((function(r,n){return r[n]=on(e,t[n]),r}),{})}}function sn(e,t){return 1===arguments.length&&(t=e,e=void 0),function(r){var n=r;if(e&&(n=r.querySelector(e)),n)return rn(n,t)}}var cn=r(9756);function ln(e){const t={};for(let r=0;r{let r=t;e&&(r=t.querySelector(e));try{return un(r)}catch(e){return null}}}var pn={isNodeOfType:function(e,t){return e&&e.type===t},fromDOM:un,toHTML:function(e){return fn([e])},matcher:dn};function hn(e){const t=[];for(let r=0;r{let r=t;return e&&(r=t.querySelector(e)),r?hn(r.childNodes):[]}}var mn={concat:function(){const e=[];for(let t=0;tfunction(e,t){switch(t){case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"object":return!!e&&e.constructor===Object;case"null":return null===e;case"array":return Array.isArray(e);case"integer":case"number":return"number"==typeof e}return!0}(e,t)))}function _n(e,t,r,n){let a;switch(t.source){case void 0:a=n?n[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=wn(r,t)}return function(e,t){return void 0===t||bn(e,(0,o.castArray)(t))}(a,t.type)&&function(e,t){return!Array.isArray(t)||t.includes(e)}(a,t.enum)||(a=void 0),void 0===a&&(a=t.default),a}const kn=r.n(cn)()((e=>{switch(e.source){case"attribute":let n=function(e,t){return 1===arguments.length&&(t=e,e=void 0),function(r){var n=sn(e,"attributes")(r);if(n&&n.hasOwnProperty(t))return n[t].value}}(e.selector,e.attribute);return"boolean"===e.type&&(n=(e=>(0,o.flow)([e,e=>void 0!==e]))(n)),n;case"html":return t=e.selector,r=e.multiline,e=>{let n=e;if(t&&(n=e.querySelector(t)),!n)return"";if(r){let e="";const t=n.children.length;for(let a=0;ae?e.toLowerCase():void 0]);default:console.error(`Unknown source type "${e.source}"`)}var t,r}));function yn(e){return on(e,(e=>e))}function wn(e,t){return kn(t)(yn(e))}function vn(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=yn(t),a=xt(e),i=(0,o.mapValues)(a.attributes,((e,t)=>_n(t,e,n,r)));return(0,H.applyFilters)("blocks.getBlockAttributes",i,a,t,r)}const Tn={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function Cn(e){const t=wn(`
${e}
`,Tn);return t?t.trim().split(/\s+/):[]}function xn(e,t){const r=function(e,t,r){if(Fe(t,"customClassName",!0)){const n=lr(t,(0,o.omit)(e,["className"])),a=Cn(n),i=Cn(r),s=(0,o.difference)(i,a);s.length?e.className=s.join(" "):n&&delete e.className}return e}(e.attributes,t,e.originalContent);return{...e,attributes:r}}function Sn(e,t){let r=function(e){const t=Me(),r=e.blockName||Me(),n=e.attrs||{},a=e.innerBlocks||[];let o=e.innerHTML.trim();return r===t&&(o=(0,Xt.autop)(o).trim()),{...e,blockName:r,attrs:n,innerHTML:o,innerBlocks:a}}(e);r=function(e){const[t,r]=tn(e.blockName,e.attrs);return{...e,blockName:t,attrs:r}}(r);let n=He(r.blockName);n||(r=function(e){const t=ze()||Me(),r=tr(e,{isCommentDelimited:!1}),n=tr(e,{isCommentDelimited:!0});return{blockName:t,attrs:{originalName:e.blockName,originalContent:n,originalUndelimitedContent:r},innerHTML:e.blockName?n:e.innerHTML,innerBlocks:e.innerBlocks,innerContent:e.innerContent}}(r),n=He(r.blockName));const a=r.blockName===Me()||r.blockName===ze();if(!n||!r.innerHTML&&a)return;const i=r.innerBlocks.map((e=>Sn(e,t))).filter((e=>!!e)),s=lt(r.blockName,vn(n,r.innerHTML,r.attrs),i);s.originalContent=r.innerHTML;const c=function(e,t){const[r]=Jr(e,t);if(r)return{...e,isValid:r,validationIssues:[]};const n=xn(e,t),[a,o]=Jr(e,t);return{...n,isValid:a,validationIssues:o}}(s,n),{validationIssues:l}=c,u=function(e,t,r){const n=t.attrs,{deprecated:a}=r;if(!a||!a.length)return e;for(let t=0;t{let{log:t,args:r}=e;return t(...r)})):(console.groupCollapsed("Updated Block: %s",n.name),console.info("Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",n.name,n,lr(n,u.attributes),u.originalContent),console.groupEnd()),u}function En(e,t){return(0,Zt.parse)(e).reduce(((e,r)=>{const n=Sn(r,t);return n&&e.push(n),e}),[])}function Bn(){return(0,o.filter)(_t("from"),{type:"raw"}).map((e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)}))}function Nn(e){const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children).flatMap((e=>{const t=bt(Bn(),(t=>{let{isMatch:r}=t;return r(e)}));if(!t)return lt("core/html",vn("core/html",e.outerHTML));const{transform:r,blockName:n}=t;return r?r(e):lt(n,vn(n,e.outerHTML))}))}function An(e){const t=document.implementation.createHTMLDocument(""),r=document.implementation.createHTMLDocument(""),n=t.body,a=r.body;for(n.innerHTML=e;n.firstChild;){const e=n.firstChild;e.nodeType===e.TEXT_NODE?(0,_e.isEmpty)(e)?n.removeChild(e):(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(e)):e.nodeType===e.ELEMENT_NODE?"BR"===e.nodeName?(e.nextSibling&&"BR"===e.nextSibling.nodeName&&(a.appendChild(r.createElement("P")),n.removeChild(e.nextSibling)),a.lastChild&&"P"===a.lastChild.nodeName&&a.lastChild.hasChildNodes()?a.lastChild.appendChild(e):n.removeChild(e)):"P"===e.nodeName?(0,_e.isEmpty)(e)?n.removeChild(e):a.appendChild(e):(0,_e.isPhrasingContent)(e)?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(e)):a.appendChild(e):n.removeChild(e)}return a.innerHTML}function Pn(e,t){if(e.nodeType===e.COMMENT_NODE)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){const r=e.nodeValue.slice(4).trim();let n=e,a=!1;for(;n=n.nextSibling;)if(n.nodeType===n.COMMENT_NODE&&"noteaser"===n.nodeValue){a=!0,(0,_e.remove)(n);break}(0,_e.replace)(e,function(e,t,r){const n=r.createElement("wp-block");n.dataset.block="core/more",e&&(n.dataset.customText=e);t&&(n.dataset.noTeaser="");return n}(r,a,t))}}else(0,_e.replace)(e,function(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))}function Ln(e){return"OL"===e.nodeName||"UL"===e.nodeName}function Mn(e){if(!Ln(e))return;const t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}const n=e.parentNode;if(n&&"LI"===n.nodeName&&1===n.children.length&&!/\S/.test((a=n,Array.from(a.childNodes).map((e=>{let{nodeValue:t=""}=e;return t})).join("")))){const e=n,r=e.previousElementSibling,a=e.parentNode;r?(r.appendChild(t),a.removeChild(e)):(a.parentNode.insertBefore(t,a),a.parentNode.removeChild(a))}var a;if(n&&Ln(n)){const t=e.previousElementSibling;t?t.appendChild(e):(0,_e.unwrap)(e)}}function Dn(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=An(e.innerHTML))}function jn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(r,t),r.appendChild(e)}function zn(e,t,r){if(!function(e,t){const r=e.nodeName.toLowerCase();return"figcaption"!==r&&!(0,_e.isTextContent)(e)&&(0,o.has)(t,["figure","children",r])}(e,r))return;let n=e;const a=e.parentNode;(function(e,t){const r=e.nodeName.toLowerCase();return(0,o.has)(t,["figure","children","a","children",r])})(e,r)&&"A"===a.nodeName&&1===a.childNodes.length&&(n=e.parentNode);const i=n.closest("p,div");i?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!i.textContent.trim())&&jn(n,i):jn(n,i):"BODY"===n.parentNode.nodeName&&jn(n)}var On=window.wp.shortcode;var In=function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const a=_t("from"),i=bt(a,(e=>-1===n.indexOf(e.blockName)&&"shortcode"===e.type&&(0,o.some)((0,o.castArray)(e.tag),(e=>(0,On.regexp)(e).test(t)))));if(!i)return[t];const s=(0,o.castArray)(i.tag),c=(0,o.find)(s,(e=>(0,On.regexp)(e).test(t)));let l;const u=r;if(l=(0,On.next)(c,t,r)){r=l.index+l.content.length;const a=t.substr(0,l.index),s=t.substr(r);if(!((0,o.includes)(l.shortcode.content||"","<")||/(\n|

)\s*$/.test(a)&&/^\s*(\n|<\/p>)/.test(s)))return e(t,r);if(i.isMatch&&!i.isMatch(l.shortcode.attrs))return e(t,u,[...n,i.blockName]);const c=(0,o.mapValues)((0,o.pickBy)(i.attributes,(e=>e.shortcode)),(e=>e.shortcode(l.shortcode.attrs,l))),d={...He(i.blockName),attributes:i.attributes};let p=lt(i.blockName,vn(d,l.shortcode.content,c));return p.originalContent=l.shortcode.content,p=xn(p,d),[...e(a),p,...e(s)]}return[t]};function Vn(e){return function(e,t){const r={phrasingContentSchema:(0,_e.getPhrasingContentSchema)(t),isPaste:"paste"===t},n=e.map((e=>{let{isMatch:t,blockName:n,schema:a}=e;const i=Fe(n,"anchor");return a=(0,o.isFunction)(a)?a(r):a,i||t?(0,o.mapValues)(a,(e=>{let r=e.attributes||[];return i&&(r=[...r,"id"]),{...e,attributes:r,isMatch:t||void 0}})):a}));return(0,o.mergeWith)({},...n,((e,t,r)=>{switch(r){case"children":return"*"===e||"*"===t?"*":{...e,...t};case"attributes":case"require":return[...e||[],...t||[]];case"isMatch":if(!e||!t)return;return function(){return e(...arguments)||t(...arguments)}}}))}(Bn(),e)}function Hn(e,t,r,n){Array.from(e).forEach((e=>{Hn(e.childNodes,t,r,n),t.forEach((t=>{r.contains(e)&&t(e,r,n)}))}))}function Rn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Hn(n.body.childNodes,t,n,r),n.body.innerHTML}function $n(e,t){const r=e[`${t}Sibling`];if(r&&(0,_e.isPhrasingContent)(r))return r;const{parentNode:n}=e;return n&&(0,_e.isPhrasingContent)(n)?$n(n,t):void 0}function Fn(e){return Sr()("wp.blocks.getPhrasingContentSchema",{since:"5.6",alternative:"wp.dom.getPhrasingContentSchema"}),(0,_e.getPhrasingContentSchema)(e)}function qn(e){let{HTML:t=""}=e;if(-1!==t.indexOf("\x3c!-- wp:"))return En(t);const r=In(t),n=Vn();return(0,o.compact)((0,o.flatMap)(r,(e=>{if("string"!=typeof e)return e;return Nn(e=An(e=Rn(e,[Mn,Pn,zn,Dn],n)))})))}function Un(e){e.nodeType===e.COMMENT_NODE&&(0,_e.remove)(e)}function Gn(e,t){return e.every((e=>function(e,t){if((0,_e.isTextContent)(e))return!0;if(!t)return!1;const r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((e=>0===(0,o.difference)([r,t],e).length))}(e,t)&&Gn(Array.from(e.children),t)))}function Kn(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}function Wn(e,t){if("SPAN"===e.nodeName&&e.style){const{fontWeight:r,fontStyle:n,textDecorationLine:a,textDecoration:i,verticalAlign:s}=e.style;"bold"!==r&&"700"!==r||(0,_e.wrap)(t.createElement("strong"),e),"italic"===n&&(0,_e.wrap)(t.createElement("em"),e),("line-through"===a||(0,o.includes)(i,"line-through"))&&(0,_e.wrap)(t.createElement("s"),e),"super"===s?(0,_e.wrap)(t.createElement("sup"),e):"sub"===s&&(0,_e.wrap)(t.createElement("sub"),e)}else"B"===e.nodeName?e=(0,_e.replaceTag)(e,"strong"):"I"===e.nodeName?e=(0,_e.replaceTag)(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function Yn(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)}const{parseInt:Qn}=window;function Zn(e){return"OL"===e.nodeName||"UL"===e.nodeName}function Xn(e,t){if("P"!==e.nodeName)return;const r=e.getAttribute("style");if(!r)return;if(-1===r.indexOf("mso-list"))return;const n=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r);if(!n)return;let a=Qn(n[1],10)-1||0;const o=e.previousElementSibling;if(!o||!Zn(o)){const r=e.textContent.trim().slice(0,1),n=/[1iIaA]/.test(r),a=t.createElement(n?"ol":"ul");n&&a.setAttribute("type",r),e.parentNode.insertBefore(a,e)}const i=e.previousElementSibling,s=i.nodeName,c=t.createElement("li");let l=i;for(e.removeChild(e.firstChild);e.firstChild;)c.appendChild(e.firstChild);for(;a--;)l=l.lastChild||l,Zn(l)&&(l=l.lastChild||l);Zn(l)||(l=l.appendChild(t.createElement(s))),l.appendChild(c),e.parentNode.removeChild(e)}var Jn=window.wp.blob;const{atob:ea,File:ta}=window;function ra(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){const[t,r]=e.src.split(","),[n]=t.slice(5).split(";");if(!r||!n)return void(e.src="");let a;try{a=ea(r)}catch(t){return void(e.src="")}const o=new Uint8Array(a.length);for(let e=0;e]+>/g,""),t=t.replace(/^\s*]*>\s*]*>(?:\s*)?/i,""),t=t.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),"INLINE"!==n){const e=t||r;if(-1!==e.indexOf("\x3c!-- wp:"))return En(e)}var s;if(String.prototype.normalize&&(t=t.normalize()),!r||t&&!function(e){return!/<(?!br[ />])/i.test(e)}(t)||(t=r,/^\s+$/.test(r)||(s=t,t=oa.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,((e,t,r,n)=>`${t}\n${r}\n${n}`))}(s))),"AUTO"===n&&-1===r.indexOf("\n")&&0!==r.indexOf("

")&&0===t.indexOf("

")&&(n="INLINE")),"INLINE"===n)return pa(t,i);const c=In(t),l=c.length>1;if("AUTO"===n&&!l&&function(e,t){const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const n=Array.from(r.body.children);return!n.some(Kn)&&Gn(n,t)}(t,a))return pa(t,i);const u=(0,_e.getPhrasingContentSchema)("paste"),d=Vn("paste"),p=(0,o.compact)((0,o.flatMap)(c,(e=>{if("string"!=typeof e)return e;const t=[sa,Xn,Yn,Mn,ra,Wn,Pn,Un,ia,zn,Dn,na],r={...d,...u};return e=Rn(e,t,d),e=Rn(e=An(e=(0,_e.removeInvalidHTML)(e,r)),[ca,la,ua],d),da.log("Processed HTML piece:\n\n",e),Nn(e)})));if("AUTO"===n&&1===p.length&&Fe(p[0].name,"__unstablePasteTextInline",!1)){const e=r.replace(/^[\n]+|[\n]+$/g,"");if(""!==e&&-1===e.indexOf("\n"))return(0,_e.removeInvalidHTML)(dr(p[0]),u)}return p}function fa(){return(0,a.select)(Qt).getCategories()}function ga(e){(0,a.dispatch)(Qt).setCategories(e)}function ma(e,t){(0,a.dispatch)(Qt).updateCategory(e,t)}function ba(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,o.every)(t,((t,r)=>{let[n,,a]=t;const o=e[r];return n===o.name&&ba(o.innerBlocks,a)}))}function _a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?(0,o.map)(t,((t,r)=>{let[n,a,i]=t;const s=e[r];if(s&&s.name===n){const e=_a(s.innerBlocks,i);return{...s,innerBlocks:e}}const c=He(n),l=(e,t)=>(0,o.mapValues)(t,((t,r)=>u(e[r],t))),u=(e,t)=>{return r=e,"html"===(0,o.get)(r,["source"])&&(0,o.isArray)(t)?(0,be.renderToString)(t):(e=>"query"===(0,o.get)(e,["source"]))(e)&&t?t.map((t=>l(e.query,t))):t;var r},d=l((0,o.get)(c,["attributes"],{}),a);let[p,h]=tn(n,d);return void 0===He(p)&&(h={originalName:n,originalContent:"",originalUndelimitedContent:""},p="core/missing"),lt(p,h,_a([],i))})):e}function ka(){return ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t{})),Ta=(0,ya.createHigherOrderComponent)((e=>t=>(0,be.createElement)(wa,null,(r=>(0,be.createElement)(e,ka({},t,{BlockContent:r}))))),"withBlockContentContext")}(),(window.wp=window.wp||{}).blocks=n}(); \ No newline at end of file +(function(){function a(e){"use strict";var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:

foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n].defaultValue);return r}var o={},i={},s={},c=a(!0),l="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:a(!0),allOn:function(){"use strict";var e=a(!0),t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}()};function d(e,t){"use strict";var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};o.helper.isArray(e)||(e=[e]);for(var a=0;a").replace(/&/g,"&")};var h=function(e,t,r,n){"use strict";var a,o,i,s,c,l=n||"",u=l.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+l.replace(/g/g,"")),p=new RegExp(t,l.replace(/g/g,"")),h=[];do{for(a=0;i=d.exec(e);)if(p.test(i[0]))a++||(s=(o=d.lastIndex)-i[0].length);else if(a&&!--a){c=i.index+i[0].length;var f={left:{start:s,end:o},match:{start:o,end:i.index},right:{start:i.index,end:c},wholeMatch:{start:s,end:c}};if(h.push(f),!u)return h}}while(a&&(d.lastIndex=o));return h};o.helper.matchRecursiveRegExp=function(e,t,r,n){"use strict";for(var a=h(e,t,r,n),o=[],i=0;i0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var d=0;d=0?n+(r||0):n},o.helper.splitAtIndex=function(e,t){"use strict";if(!o.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},o.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e=e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e}))},o.helper.padEnd=function(e,t,r){"use strict";return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),o.helper.regexes={asteriskDashAndColon:/([*_:~])/g},o.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:"S"},o.Converter=function(e){"use strict";var t={},r=[],n=[],a={},i=l,p={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,o.helper.isString(e)){if(t=e=o.helper.stdExtName(e),o.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new o.Converter));o.helper.isArray(e)||(e=[e]);var a=d(e,t);if(!a.valid)throw Error(a.error);for(var i=0;i[ \t]+¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var n={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],n=0;n'}else r.push(t[n].innerHTML),t[n].innerHTML="",t[n].setAttribute("prenum",n.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)i="";else if(!i){if(a||(a=n.toLowerCase().replace(/ ?\n/g," ")),i="#"+a,o.helper.isUndefined(r.gUrls[a]))return e;i=r.gUrls[a],o.helper.isUndefined(r.gTitles[a])||(l=r.gTitles[a])}var u='"};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,n)).replace(/\[([^\[\]]+)]()()()()()/g,n),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,r,n,a,i){if("\\"===n)return r+a;if(!o.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,i),c="";return t.openLinksInNewWindow&&(c=' rel="noopener noreferrer" target="¨E95Eblank"'),r+'"+a+""}))),e=r.converter._dispatch("anchors.after",e,t,r)}));var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,g=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,m=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,b=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,_=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,k=function(e){"use strict";return function(t,r,n,a,i,s,c){var l=n=n.replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback),u="",d="",p=r||"",h=c||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' rel="noopener noreferrer" target="¨E95Eblank"'),p+'"+l+""+u+h}},y=function(e,t){"use strict";return function(r,n,a){var i="mailto:";return n=n||"",a=o.subParser("unescapeSpecialChars")(a,e,t),e.encodeEmails?(i=o.helper.encodeEmailAddress(i+a),a=o.helper.encodeEmailAddress(a)):i+=a,n+''+a+""}};o.subParser("autoLinks",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(m,k(t))).replace(_,y(t,r)),e=r.converter._dispatch("autoLinks.after",e,t,r)})),o.subParser("simplifiedAutoLinks",(function(e,t,r){"use strict";return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(g,k(t)):e.replace(f,k(t))).replace(b,y(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e})),o.subParser("blockGamut",(function(e,t,r){"use strict";return e=r.converter._dispatch("blockGamut.before",e,t,r),e=o.subParser("blockQuotes")(e,t,r),e=o.subParser("headers")(e,t,r),e=o.subParser("horizontalRule")(e,t,r),e=o.subParser("lists")(e,t,r),e=o.subParser("codeBlocks")(e,t,r),e=o.subParser("tables")(e,t,r),e=o.subParser("hashHTMLBlocks")(e,t,r),e=o.subParser("paragraphs")(e,t,r),e=r.converter._dispatch("blockGamut.after",e,t,r)})),o.subParser("blockQuotes",(function(e,t,r){"use strict";e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var n=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(n=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(n,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=o.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=o.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*
[^\r]+?<\/pre>)/gm,(function(e,t){var r=t;return r=(r=r.replace(/^  /gm,"¨0")).replace(/¨0/g,"")})),o.subParser("hashBlock")("
\n"+e+"\n
",t,r)})),e=r.converter._dispatch("blockQuotes.after",e,t,r)})),o.subParser("codeBlocks",(function(e,t,r){"use strict";e=r.converter._dispatch("codeBlocks.before",e,t,r);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,n,a){var i=n,s=a,c="\n";return i=o.subParser("outdent")(i,t,r),i=o.subParser("encodeCode")(i,t,r),i=(i=(i=o.subParser("detab")(i,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),i="
"+i+c+"
",o.subParser("hashBlock")(i,t,r)+s}))).replace(/¨0/,""),e=r.converter._dispatch("codeBlocks.after",e,t,r)})),o.subParser("codeSpans",(function(e,t,r){"use strict";return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,n,a,i){var s=i;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=n+""+(s=o.subParser("encodeCode")(s,t,r))+"",s=o.subParser("hashHTMLSpans")(s,t,r)})),e=r.converter._dispatch("codeSpans.after",e,t,r)})),o.subParser("completeHTMLDocument",(function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",a="\n",o="",i='\n',s="",c="";for(var l in void 0!==r.metadata.parsed.doctype&&(a="\n","html"!==(n=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==n||(i='')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":o=""+r.metadata.parsed.title+"\n";break;case"charset":i="html"===n||"html5"===n?'\n':'\n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[l]+'"',c+='\n';break;default:c+='\n'}return e=a+"\n\n"+o+i+c+"\n\n"+e.trim()+"\n\n",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)})),o.subParser("detab",(function(e,t,r){"use strict";return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,(function(e,t){for(var r=t,n=4-r.length%4,a=0;a/g,">"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)})),o.subParser("encodeBackslashEscapes",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,o.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,o.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)})),o.subParser("encodeCode",(function(e,t,r){"use strict";return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,o.helper.escapeCharactersCallback),e=r.converter._dispatch("encodeCode.after",e,t,r)})),o.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)}))).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,o.helper.escapeCharactersCallback)})),e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)})),o.subParser("githubCodeBlocks",(function(e,t,r){"use strict";return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,n,a,i){var s=t.omitExtraWLInCodeBlocks?"":"\n";return i=o.subParser("encodeCode")(i,t,r),i="
"+(i=(i=(i=o.subParser("detab")(i,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
",i=o.subParser("hashBlock")(i,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:i})-1)+"G\n\n"}))).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e})),o.subParser("hashBlock",(function(e,t,r){"use strict";return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)})),o.subParser("hashCodeTags",(function(e,t,r){"use strict";e=r.converter._dispatch("hashCodeTags.before",e,t,r);return e=o.helper.replaceRecursiveRegExp(e,(function(e,n,a,i){var s=a+o.subParser("encodeCode")(n,t,r)+i;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"}),"]*>","","gim"),e=r.converter._dispatch("hashCodeTags.after",e,t,r)})),o.subParser("hashElement",(function(e,t,r){"use strict";return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n¨K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}})),o.subParser("hashHTMLBlocks",(function(e,t,r){"use strict";e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var n=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],a=function(e,t,n,a){var o=e;return-1!==n.search(/\bmarkdown\b/)&&(o=n+r.converter.makeHtml(t)+a),"\n\n¨K"+(r.gHtmlBlocks.push(o)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var i=0;i]*>)","im"),l="<"+n[i]+"\\b[^>]*>",u="";-1!==(s=o.helper.regexIndexOf(e,c));){var d=o.helper.splitAtIndex(e,s),p=o.helper.replaceRecursiveRegExp(d[1],a,l,u,"im");if(p===d[1])break;e=d[0].concat(p)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(e,t,r)),e=(e=o.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o.subParser("hashElement")(e,t,r)),e=r.converter._dispatch("hashHTMLBlocks.after",e,t,r)})),o.subParser("hashHTMLSpans",(function(e,t,r){"use strict";function n(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,(function(e){return n(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return n(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return n(e)}))).replace(/<[^>]+?>/gi,(function(e){return n(e)})),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)})),o.subParser("unhashHTMLSpans",(function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n]*>\\s*]*>","^ {0,3}\\s*
","gim"),e=r.converter._dispatch("hashPreCodeTags.after",e,t,r)})),o.subParser("headers",(function(e,t,r){"use strict";e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),a=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,i=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(a,(function(e,a){var i=o.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=""+i+"";return o.subParser("hashBlock")(l,t,r)}))).replace(i,(function(e,a){var i=o.subParser("spanGamut")(a,t,r),s=t.noHeaderId?"":' id="'+c(a)+'"',l=n+1,u=""+i+"";return o.subParser("hashBlock")(u,t,r)}));var s=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function c(e){var n,a;if(t.customizedHeaderId){var i=e.match(/\{([^{]+?)}\s*$/);i&&i[1]&&(e=i[1])}return n=e,a=o.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(n=a+n),n=t.ghCompatibleHeaderId?n.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?n.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():n.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(n=a+n),r.hashLinkCounts[n]?n=n+"-"+r.hashLinkCounts[n]++:r.hashLinkCounts[n]=1,n}return e=e.replace(s,(function(e,a,i){var s=i;t.customizedHeaderId&&(s=i.replace(/\s?\{([^{]+?)}\s*$/,""));var l=o.subParser("spanGamut")(s,t,r),u=t.noHeaderId?"":' id="'+c(i)+'"',d=n-1+a.length,p=""+l+"";return o.subParser("hashBlock")(p,t,r)})),e=r.converter._dispatch("headers.after",e,t,r)})),o.subParser("horizontalRule",(function(e,t,r){"use strict";e=r.converter._dispatch("horizontalRule.before",e,t,r);var n=o.subParser("hashBlock")("
",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,n)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,n),e=r.converter._dispatch("horizontalRule.after",e,t,r)})),o.subParser("images",(function(e,t,r){"use strict";function n(e,t,n,a,i,s,c,l){var u=r.gUrls,d=r.gTitles,p=r.gDimensions;if(n=n.toLowerCase(),l||(l=""),e.search(/\(? ?(['"].*['"])?\)$/m)>-1)a="";else if(""===a||null===a){if(""!==n&&null!==n||(n=t.toLowerCase().replace(/ ?\n/g," ")),a="#"+n,o.helper.isUndefined(u[n]))return e;a=u[n],o.helper.isUndefined(d[n])||(l=d[n]),o.helper.isUndefined(p[n])||(i=p[n].width,s=p[n].height)}t=t.replace(/"/g,""").replace(o.helper.regexes.asteriskDashAndColon,o.helper.escapeCharactersCallback);var h=''+t+'"}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,r,a,o,i,s,c){return n(e,t,r,a=a.replace(/\s/g,""),o,i,s,c)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n)).replace(/!\[([^\[\]]+)]()()()()()/g,n),e=r.converter._dispatch("images.after",e,t,r)})),o.subParser("italicsAndBold",(function(e,t,r){"use strict";function n(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return n(t,"","")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return n(t,"","")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return n(t,"","")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,r){return n(r,t+"","")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,r){return n(r,t+"","")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,r){return n(r,t+"","")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?n(t,"",""):e})),e=r.converter._dispatch("italicsAndBold.after",e,t,r)})),o.subParser("lists",(function(e,t,r){"use strict";function n(e,n){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,i=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(a=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(a,(function(e,n,a,s,c,l,u){u=u&&""!==u.trim();var d=o.subParser("outdent")(c,t,r),p="";return l&&t.tasklists&&(p=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='-1?(d=o.subParser("githubCodeBlocks")(d,t,r),d=o.subParser("blockGamut")(d,t,r)):(d=(d=o.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=o.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=i?o.subParser("paragraphs")(d,t,r):o.subParser("spanGamut")(d,t,r)),d=""+(d=d.replace("¨A",""))+"\n"}))).replace(/¨0/g,""),r.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function a(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function i(e,r,o){var i=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,c="ul"===r?i:s,l="";if(-1!==e.search(c))!function t(u){var d=u.search(c),p=a(e,r);-1!==d?(l+="\n\n<"+r+p+">\n"+n(u.slice(0,d),!!o)+"\n",c="ul"===(r="ul"===r?"ol":"ul")?i:s,t(u.slice(d))):l+="\n\n<"+r+p+">\n"+n(u,!!o)+"\n"}(e);else{var u=a(e,r);l="\n\n<"+r+u+">\n"+n(e,!!o)+"\n"}return l}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,r){return i(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,r,n){return i(r,n.search(/[*+-]/g)>-1?"ul":"ol",!1)}))).replace(/¨0/,""),e=r.converter._dispatch("lists.after",e,t,r)})),o.subParser("metadata",(function(e,t,r){"use strict";if(!t.metadata)return e;function n(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,n){return r.metadata.parsed[t]=n,""}))}return e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,(function(e,t,r){return n(r),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,a){return t&&(r.metadata.format=t),n(a),"¨M"}))).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)})),o.subParser("outdent",(function(e,t,r){"use strict";return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),e=r.converter._dispatch("outdent.after",e,t,r)})),o.subParser("paragraphs",(function(e,t,r){"use strict";for(var n=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),a=[],i=n.length,s=0;s=0?a.push(c):c.search(/\S/)>=0&&(c=(c=o.subParser("spanGamut")(c,t,r)).replace(/^([ \t]*)/g,"

"),c+="

",a.push(c))}for(i=a.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}a[s]=u}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)})),o.subParser("runExtension",(function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t})),o.subParser("spanGamut",(function(e,t,r){"use strict";return e=r.converter._dispatch("spanGamut.before",e,t,r),e=o.subParser("codeSpans")(e,t,r),e=o.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=o.subParser("encodeBackslashEscapes")(e,t,r),e=o.subParser("images")(e,t,r),e=o.subParser("anchors")(e,t,r),e=o.subParser("autoLinks")(e,t,r),e=o.subParser("simplifiedAutoLinks")(e,t,r),e=o.subParser("emoji")(e,t,r),e=o.subParser("underline")(e,t,r),e=o.subParser("italicsAndBold")(e,t,r),e=o.subParser("strikethrough")(e,t,r),e=o.subParser("ellipsis")(e,t,r),e=o.subParser("hashHTMLSpans")(e,t,r),e=o.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=r.converter._dispatch("spanGamut.after",e,t,r)})),o.subParser("strikethrough",(function(e,t,r){"use strict";return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,n){return function(e){return t.simplifiedAutoLink&&(e=o.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(n)})),e=r.converter._dispatch("strikethrough.after",e,t,r)),e})),o.subParser("stripLinkDefinitions",(function(e,t,r){"use strict";var n=function(e,n,a,i,s,c,l){return n=n.toLowerCase(),a.match(/^data:.+?\/.+?;base64,/)?r.gUrls[n]=a.replace(/\s/g,""):r.gUrls[n]=o.subParser("encodeAmpsAndAngles")(a,t,r),c?c+l:(l&&(r.gTitles[n]=l.replace(/"|'/g,""")),t.parseImgDimensions&&i&&s&&(r.gDimensions[n]={width:i,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,n)).replace(/¨0/,"")})),o.subParser("tables",(function(e,t,r){"use strict";if(!t.tables)return e;function n(e,n){return""+o.subParser("spanGamut")(e,t,r)+"\n"}function a(e){var a,i=e.split("\n");for(a=0;a"+(c=o.subParser("spanGamut")(c,t,r))+"\n"));for(a=0;a\n\n\n",a=0;a\n";for(var o=0;o\n"}return r+"\n\n"}(f,m)}return e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,o.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,a)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,a),e=r.converter._dispatch("tables.after",e,t,r)})),o.subParser("underline",(function(e,t,r){"use strict";return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return""+t+""}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return""+t+""})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?""+t+"":e}))).replace(/(_)/g,o.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e})),o.subParser("unescapeSpecialChars",(function(e,t,r){"use strict";return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,(function(e,t){var r=parseInt(t);return String.fromCharCode(r)})),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)})),o.subParser("makeMarkdown.blockquote",(function(e,t){"use strict";var r="";if(e.hasChildNodes())for(var n=e.childNodes,a=n.length,i=0;i ")})),o.subParser("makeMarkdown.codeBlock",(function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"})),o.subParser("makeMarkdown.codeSpan",(function(e){"use strict";return"`"+e.innerHTML+"`"})),o.subParser("makeMarkdown.emphasis",(function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="*";for(var n=e.childNodes,a=n.length,i=0;i",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),o.subParser("makeMarkdown.links",(function(e,t){"use strict";var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var n=e.childNodes,a=n.length;r="[";for(var i=0;i",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r})),o.subParser("makeMarkdown.list",(function(e,t,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,i=a.length,s=e.getAttribute("start")||1,c=0;c"+t.preList[r]+""})),o.subParser("makeMarkdown.strikethrough",(function(e,t){"use strict";var r="";if(e.hasChildNodes()){r+="~~";for(var n=e.childNodes,a=n.length,i=0;itr>th"),c=e.querySelectorAll("tbody>tr");for(r=0;rf&&(f=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}));void 0===(n=function(){"use strict";return o}.call(t,r,t,e))||(e.exports=n)}).call(this)}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{__EXPERIMENTAL_ELEMENTS:function(){return ve},__EXPERIMENTAL_PATHS_WITH_MERGE:function(){return Te},__EXPERIMENTAL_STYLE_PROPERTY:function(){return we},__experimentalCloneSanitizedBlock:function(){return dt},__experimentalGetAccessibleBlockLabel:function(){return Et},__experimentalGetBlockAttributesNamesByRole:function(){return Nt},__experimentalGetBlockLabel:function(){return St},__experimentalSanitizeBlockAttributes:function(){return Bt},__unstableGetBlockProps:function(){return ir},__unstableGetInnerBlocksProps:function(){return sr},__unstableSerializeAndClean:function(){return hr},children:function(){return mn},cloneBlock:function(){return pt},createBlock:function(){return lt},createBlocksFromInnerBlocksTemplate:function(){return ut},doBlocksMatchTemplate:function(){return ba},findTransform:function(){return bt},getBlockAttributes:function(){return vn},getBlockContent:function(){return dr},getBlockDefaultClassName:function(){return rr},getBlockFromExample:function(){return yt},getBlockMenuDefaultClassName:function(){return nr},getBlockSupport:function(){return $e},getBlockTransforms:function(){return _t},getBlockType:function(){return He},getBlockTypes:function(){return Re},getBlockVariations:function(){return Ze},getCategories:function(){return fa},getChildBlockNames:function(){return Ge},getDefaultBlockName:function(){return Ve},getFreeformContentHandlerName:function(){return Me},getGroupingBlockName:function(){return De},getPhrasingContentSchema:function(){return Fn},getPossibleBlockTransformations:function(){return mt},getSaveContent:function(){return lr},getSaveElement:function(){return cr},getUnregisteredTypeHandlerName:function(){return ze},hasBlockSupport:function(){return Fe},hasChildBlocks:function(){return Ke},hasChildBlocksWithInserterSupport:function(){return We},isReusableBlock:function(){return qe},isTemplatePart:function(){return Ue},isUnmodifiedDefaultBlock:function(){return vt},isValidBlockContent:function(){return en},isValidIcon:function(){return Tt},node:function(){return pn},normalizeIconObject:function(){return Ct},parse:function(){return En},parseWithAttributeSchema:function(){return wn},pasteHandler:function(){return ha},rawHandler:function(){return qn},registerBlockCollection:function(){return Ae},registerBlockStyle:function(){return Ye},registerBlockType:function(){return Be},registerBlockVariation:function(){return Xe},serialize:function(){return fr},serializeRawBlock:function(){return tr},setCategories:function(){return ga},setDefaultBlockName:function(){return Oe},setFreeformContentHandlerName:function(){return Le},setGroupingBlockName:function(){return Ie},setUnregisteredTypeHandlerName:function(){return je},store:function(){return Qt},switchToBlockType:function(){return kt},synchronizeBlocksWithTemplate:function(){return _a},unregisterBlockStyle:function(){return Qe},unregisterBlockType:function(){return Pe},unregisterBlockVariation:function(){return Je},unstable__bootstrapServerSideBlockDefinitions:function(){return Se},updateCategory:function(){return ma},validateBlock:function(){return Jr},withBlockContentContext:function(){return Ta}});var e={};r.r(e),r.d(e,{__experimentalGetUnprocessedBlockTypes:function(){return w},getActiveBlockVariation:function(){return S},getBlockStyles:function(){return C},getBlockSupport:function(){return j},getBlockType:function(){return T},getBlockTypes:function(){return v},getBlockVariations:function(){return x},getCategories:function(){return B},getChildBlockNames:function(){return D},getCollections:function(){return N},getDefaultBlockName:function(){return A},getDefaultBlockVariation:function(){return E},getFreeformFallbackBlockName:function(){return P},getGroupingBlockName:function(){return M},getUnregisteredFallbackBlockName:function(){return L},hasBlockSupport:function(){return z},hasChildBlocks:function(){return I},hasChildBlocksWithInserterSupport:function(){return V},isMatchingSearchTerm:function(){return O}});var t={};r.r(t),r.d(t,{__experimentalReapplyBlockTypeFilters:function(){return zt},__experimentalRegisterBlockType:function(){return jt},addBlockCollection:function(){return Wt},addBlockStyles:function(){return It},addBlockTypes:function(){return Dt},addBlockVariations:function(){return Ht},removeBlockCollection:function(){return Yt},removeBlockStyles:function(){return Vt},removeBlockTypes:function(){return Ot},removeBlockVariations:function(){return Rt},setCategories:function(){return Gt},setDefaultBlockName:function(){return $t},setFreeformFallbackBlockName:function(){return Ft},setGroupingBlockName:function(){return Ut},setUnregisteredFallbackBlockName:function(){return qt},updateCategory:function(){return Kt}});var a=window.wp.data,o=window.lodash,i=window.wp.i18n;const s=[{slug:"text",title:(0,i.__)("Text")},{slug:"media",title:(0,i.__)("Media")},{slug:"design",title:(0,i.__)("Design")},{slug:"widgets",title:(0,i.__)("Widgets")},{slug:"theme",title:(0,i.__)("Theme")},{slug:"embed",title:(0,i.__)("Embeds")},{slug:"reusable",title:(0,i.__)("Reusable blocks")}];function c(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REMOVE_BLOCK_TYPES":return-1!==r.names.indexOf(t)?null:t;case e:return r.name||null}return t}}const l=c("SET_DEFAULT_BLOCK_NAME"),u=c("SET_FREEFORM_FALLBACK_BLOCK_NAME"),d=c("SET_UNREGISTERED_FALLBACK_BLOCK_NAME"),p=c("SET_GROUPING_BLOCK_NAME");var h,f,g=(0,a.combineReducers)({unprocessedBlockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_UNPROCESSED_BLOCK_TYPE":return{...e,[t.blockType.name]:t.blockType};case"REMOVE_BLOCK_TYPES":return(0,o.omit)(e,t.names)}return e},blockTypes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,o.keyBy)(t.blockTypes,"name")};case"REMOVE_BLOCK_TYPES":return(0,o.omit)(e,t.names)}return e},blockStyles:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,o.mapValues)((0,o.keyBy)(t.blockTypes,"name"),(t=>(0,o.uniqBy)([...(0,o.get)(t,["styles"],[]).map((e=>({...e,source:"block"}))),...(0,o.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))],(e=>e.name))))};case"ADD_BLOCK_STYLES":return{...e,[t.blockName]:(0,o.uniqBy)([...(0,o.get)(e,[t.blockName],[]),...t.styles],(e=>e.name))};case"REMOVE_BLOCK_STYLES":return{...e,[t.blockName]:(0,o.filter)((0,o.get)(e,[t.blockName],[]),(e=>-1===t.styleNames.indexOf(e.name)))}}return e},blockVariations:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_TYPES":return{...e,...(0,o.mapValues)((0,o.keyBy)(t.blockTypes,"name"),(t=>(0,o.uniqBy)([...(0,o.get)(t,["variations"],[]).map((e=>({...e,source:"block"}))),...(0,o.get)(e,[t.name],[]).filter((e=>{let{source:t}=e;return"block"!==t}))],(e=>e.name))))};case"ADD_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,o.uniqBy)([...(0,o.get)(e,[t.blockName],[]),...t.variations],(e=>e.name))};case"REMOVE_BLOCK_VARIATIONS":return{...e,[t.blockName]:(0,o.filter)((0,o.get)(e,[t.blockName],[]),(e=>-1===t.variationNames.indexOf(e.name)))}}return e},defaultBlockName:l,freeformFallbackBlockName:u,unregisteredFallbackBlockName:d,groupingBlockName:p,categories:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CATEGORIES":return t.categories||[];case"UPDATE_CATEGORY":if(!t.category||(0,o.isEmpty)(t.category))return e;if((0,o.find)(e,["slug",t.slug]))return(0,o.map)(e,(e=>e.slug===t.slug?{...e,...t.category}:e))}return e},collections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_BLOCK_COLLECTION":return{...e,[t.namespace]:{title:t.title,icon:t.icon}};case"REMOVE_BLOCK_COLLECTION":return(0,o.omit)(e,t.namespace)}return e}});function m(e){return[e]}function b(){var e={clear:function(){e.head=null}};return e}function _(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n"string"==typeof t?T(e,t):t;function w(e){return e.unprocessedBlockTypes}const v=k((e=>Object.values(e.blockTypes)),(e=>[e.blockTypes]));function T(e,t){return e.blockTypes[t]}function C(e,t){return e.blockStyles[t]}const x=k(((e,t,r)=>{const n=e.blockVariations[t];return n&&r?n.filter((e=>(e.scope||["block","inserter"]).includes(r))):n}),((e,t)=>[e.blockVariations[t]]));function S(e,t,r,n){const a=x(e,t,n);return null==a?void 0:a.find((n=>{var a;if(Array.isArray(n.isActive)){const a=T(e,t),o=Object.keys((null==a?void 0:a.attributes)||{}),i=n.isActive.filter((e=>o.includes(e)));return 0!==i.length&&i.every((e=>r[e]===n.attributes[e]))}return null===(a=n.isActive)||void 0===a?void 0:a.call(n,r,n.attributes)}))}function E(e,t,r){const n=x(e,t,r);return(0,o.findLast)(n,"isDefault")||(0,o.first)(n)}function B(e){return e.categories}function N(e){return e.collections}function A(e){return e.defaultBlockName}function P(e){return e.freeformFallbackBlockName}function L(e){return e.unregisteredFallbackBlockName}function M(e){return e.groupingBlockName}const D=k(((e,t)=>(0,o.map)((0,o.filter)(e.blockTypes,(e=>(0,o.includes)(e.parent,t))),(e=>{let{name:t}=e;return t}))),(e=>[e.blockTypes])),j=(e,t,r,n)=>{const a=y(e,t);return null!=a&&a.supports?(0,o.get)(a.supports,r,n):n};function z(e,t,r,n){return!!j(e,t,r,n)}function O(e,t,r){const n=y(e,t),a=(0,o.flow)([o.deburr,e=>e.toLowerCase(),e=>e.trim()]),i=a(r),s=(0,o.flow)([a,e=>(0,o.includes)(e,i)]);return s(n.title)||(0,o.some)(n.keywords,s)||s(n.category)||s(n.description)}const I=(e,t)=>D(e,t).length>0,V=(e,t)=>(0,o.some)(D(e,t),(t=>z(e,t,"inserter",!0)));var H=window.wp.hooks,R={grad:.9,turn:360,rad:360/(2*Math.PI)},$=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},F=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},q=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e>t?e:t},U=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},G=function(e){return{r:q(e.r,0,255),g:q(e.g,0,255),b:q(e.b,0,255),a:q(e.a)}},K=function(e){return{r:F(e.r),g:F(e.g),b:F(e.b),a:F(e.a,3)}},W=/^#([0-9a-f]{3,8})$/i,Y=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Q=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=Math.max(t,r,n),i=o-Math.min(t,r,n),s=i?o===t?(r-n)/i:o===r?2+(n-t)/i:4+(t-r)/i:0;return{h:60*(s<0?s+6:s),s:o?i/o*100:0,v:o/255*100,a:a}},Z=function(e){var t=e.h,r=e.s,n=e.v,a=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),i=n*(1-r),s=n*(1-(t-o)*r),c=n*(1-(1-t+o)*r),l=o%6;return{r:255*[n,s,i,i,c,n][l],g:255*[c,n,n,s,i,i][l],b:255*[i,i,c,n,n,s][l],a:a}},X=function(e){return{h:U(e.h),s:q(e.s,0,100),l:q(e.l,0,100),a:q(e.a)}},J=function(e){return{h:F(e.h),s:F(e.s),l:F(e.l),a:F(e.a,3)}},ee=function(e){return Z((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},te=function(e){return{h:(t=Q(e)).h,s:(a=(200-(r=t.s))*(n=t.v)/100)>0&&a<200?r*n/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,r,n,a},re=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ne=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ae=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ie={string:[[function(e){var t=W.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?F(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?F(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ae.exec(e)||oe.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:G({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=re.exec(e)||ne.exec(e);if(!t)return null;var r,n,a=X({h:(r=t[1],n=t[2],void 0===n&&(n="deg"),Number(r)*(R[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ee(a)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=void 0===a?1:a;return $(t)&&$(r)&&$(n)?G({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,a=e.a,o=void 0===a?1:a;if(!$(t)||!$(r)||!$(n))return null;var i=X({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return ee(i)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,a=e.a,o=void 0===a?1:a;if(!$(t)||!$(r)||!$(n))return null;var i=function(e){return{h:U(e.h),s:q(e.s,0,100),v:q(e.v,0,100),a:q(e.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return Z(i)},"hsv"]]},se=function(e,t){for(var r=0;r=.5},e.prototype.toHex=function(){return t=(e=K(this.rgba)).r,r=e.g,n=e.b,o=(a=e.a)<1?Y(F(255*a)):"","#"+Y(t)+Y(r)+Y(n)+o;var e,t,r,n,a,o},e.prototype.toRgb=function(){return K(this.rgba)},e.prototype.toRgbString=function(){return t=(e=K(this.rgba)).r,r=e.g,n=e.b,(a=e.a)<1?"rgba("+t+", "+r+", "+n+", "+a+")":"rgb("+t+", "+r+", "+n+")";var e,t,r,n,a},e.prototype.toHsl=function(){return J(te(this.rgba))},e.prototype.toHslString=function(){return t=(e=J(te(this.rgba))).h,r=e.s,n=e.l,(a=e.a)<1?"hsla("+t+", "+r+"%, "+n+"%, "+a+")":"hsl("+t+", "+r+"%, "+n+"%)";var e,t,r,n,a},e.prototype.toHsv=function(){return e=Q(this.rgba),{h:F(e.h),s:F(e.s),v:F(e.v),a:F(e.a,3)};var e},e.prototype.invert=function(){return he({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),he(le(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),he(le(this.rgba,-e))},e.prototype.grayscale=function(){return he(le(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),he(de(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),he(de(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?he({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):F(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=te(this.rgba);return"number"==typeof e?he({h:e,s:t.s,l:t.l,a:t.a}):F(t.h)},e.prototype.isEqual=function(e){return this.toHex()===he(e).toHex()},e}(),he=function(e){return e instanceof pe?e:new pe(e)},fe=[];var ge=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},me=function(e){return.2126*ge(e.r)+.7152*ge(e.g)+.0722*ge(e.b)};var be=window.wp.element,_e=window.wp.dom;const ke="block-default",ye=["attributes","supports","save","migrate","isEligible","apiVersion"],we={"--wp--style--color--link":{value:["color","link"],support:["color","link"]},background:{value:["color","gradient"],support:["color","gradients"]},backgroundColor:{value:["color","background"],support:["color","background"],requiresOptOut:!0},borderColor:{value:["border","color"],support:["__experimentalBorder","color"]},borderRadius:{value:["border","radius"],support:["__experimentalBorder","radius"],properties:{borderTopLeftRadius:"topLeft",borderTopRightRadius:"topRight",borderBottomLeftRadius:"bottomLeft",borderBottomRightRadius:"bottomRight"}},borderStyle:{value:["border","style"],support:["__experimentalBorder","style"]},borderWidth:{value:["border","width"],support:["__experimentalBorder","width"]},color:{value:["color","text"],support:["color","text"],requiresOptOut:!0},filter:{value:["filter","duotone"],support:["color","__experimentalDuotone"]},linkColor:{value:["elements","link","color","text"],support:["color","link"]},fontFamily:{value:["typography","fontFamily"],support:["typography","__experimentalFontFamily"]},fontSize:{value:["typography","fontSize"],support:["typography","fontSize"]},fontStyle:{value:["typography","fontStyle"],support:["typography","__experimentalFontStyle"]},fontWeight:{value:["typography","fontWeight"],support:["typography","__experimentalFontWeight"]},lineHeight:{value:["typography","lineHeight"],support:["typography","lineHeight"]},margin:{value:["spacing","margin"],support:["spacing","margin"],properties:{marginTop:"top",marginRight:"right",marginBottom:"bottom",marginLeft:"left"},useEngine:!0},padding:{value:["spacing","padding"],support:["spacing","padding"],properties:{paddingTop:"top",paddingRight:"right",paddingBottom:"bottom",paddingLeft:"left"},useEngine:!0},textDecoration:{value:["typography","textDecoration"],support:["typography","__experimentalTextDecoration"]},textTransform:{value:["typography","textTransform"],support:["typography","__experimentalTextTransform"]},letterSpacing:{value:["typography","letterSpacing"],support:["typography","__experimentalLetterSpacing"]},"--wp--style--block-gap":{value:["spacing","blockGap"],support:["spacing","blockGap"]}},ve={link:"a",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},Te={"color.duotone":!0,"color.gradients":!0,"color.palette":!0,"typography.fontFamilies":!0,"typography.fontSizes":!0},Ce={title:"block title",description:"block description",keywords:["block keyword"],styles:[{label:"block style label"}],variations:[{title:"block variation title",description:"block variation description",keywords:["block variation keyword"]}]},xe={};function Se(e){for(const t of Object.keys(e))xe[t]?(void 0===xe[t].apiVersion&&e[t].apiVersion&&(xe[t].apiVersion=e[t].apiVersion),void 0===xe[t].ancestor&&e[t].ancestor&&(xe[t].ancestor=e[t].ancestor)):xe[t]=(0,o.mapKeys)((0,o.pickBy)(e[t],(e=>!(0,o.isNil)(e))),((e,t)=>(0,o.camelCase)(t)))}function Ee(e){let{textdomain:t,...r}=e;const n=(0,o.pick)(r,["apiVersion","title","category","parent","ancestor","icon","description","keywords","attributes","providesContext","usesContext","supports","styles","example","variations"]);return t&&Object.keys(Ce).forEach((e=>{n[e]&&(n[e]=Ne(Ce[e],n[e],t))})),n}function Be(e,t){const r=(0,o.isObject)(e)?e.name:e;if("string"!=typeof r)return void console.error("Block names must be strings.");if(!/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(r))return void console.error("Block names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-block");if((0,a.select)(Qt).getBlockType(r))return void console.error('Block "'+r+'" is already registered.');(0,o.isObject)(e)&&Se({[r]:Ee(e)});const n={name:r,icon:ke,keywords:[],attributes:{},providesContext:{},usesContext:[],supports:{},styles:[],variations:[],save:()=>null,...null==xe?void 0:xe[r],...t};return(0,a.dispatch)(Qt).__experimentalRegisterBlockType(n),(0,a.select)(Qt).getBlockType(r)}function Ne(e,t,r){return(0,o.isString)(e)&&(0,o.isString)(t)?(0,i._x)(t,e,r):(0,o.isArray)(e)&&!(0,o.isEmpty)(e)&&(0,o.isArray)(t)?t.map((t=>Ne(e[0],t,r))):(0,o.isObject)(e)&&!(0,o.isEmpty)(e)&&(0,o.isObject)(t)?Object.keys(t).reduce(((n,a)=>e[a]?(n[a]=Ne(e[a],t[a],r),n):(n[a]=t[a],n)),{}):t}function Ae(e,t){let{title:r,icon:n}=t;(0,a.dispatch)(Qt).addBlockCollection(e,r,n)}function Pe(e){const t=(0,a.select)(Qt).getBlockType(e);if(t)return(0,a.dispatch)(Qt).removeBlockTypes(e),t;console.error('Block "'+e+'" is not registered.')}function Le(e){(0,a.dispatch)(Qt).setFreeformFallbackBlockName(e)}function Me(){return(0,a.select)(Qt).getFreeformFallbackBlockName()}function De(){return(0,a.select)(Qt).getGroupingBlockName()}function je(e){(0,a.dispatch)(Qt).setUnregisteredFallbackBlockName(e)}function ze(){return(0,a.select)(Qt).getUnregisteredFallbackBlockName()}function Oe(e){(0,a.dispatch)(Qt).setDefaultBlockName(e)}function Ie(e){(0,a.dispatch)(Qt).setGroupingBlockName(e)}function Ve(){return(0,a.select)(Qt).getDefaultBlockName()}function He(e){var t;return null===(t=(0,a.select)(Qt))||void 0===t?void 0:t.getBlockType(e)}function Re(){return(0,a.select)(Qt).getBlockTypes()}function $e(e,t,r){return(0,a.select)(Qt).getBlockSupport(e,t,r)}function Fe(e,t,r){return(0,a.select)(Qt).hasBlockSupport(e,t,r)}function qe(e){return"core/block"===(null==e?void 0:e.name)}function Ue(e){return"core/template-part"===e.name}const Ge=e=>(0,a.select)(Qt).getChildBlockNames(e),Ke=e=>(0,a.select)(Qt).hasChildBlocks(e),We=e=>(0,a.select)(Qt).hasChildBlocksWithInserterSupport(e),Ye=(e,t)=>{(0,a.dispatch)(Qt).addBlockStyles(e,t)},Qe=(e,t)=>{(0,a.dispatch)(Qt).removeBlockStyles(e,t)},Ze=(e,t)=>(0,a.select)(Qt).getBlockVariations(e,t),Xe=(e,t)=>{(0,a.dispatch)(Qt).addBlockVariations(e,t)},Je=(e,t)=>{(0,a.dispatch)(Qt).removeBlockVariations(e,t)};var et,tt=new Uint8Array(16);function rt(){if(!et&&!(et="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return et(tt)}var nt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var at=function(e){return"string"==typeof e&&nt.test(e)},ot=[],it=0;it<256;++it)ot.push((it+256).toString(16).substr(1));var st=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(ot[e[t+0]]+ot[e[t+1]]+ot[e[t+2]]+ot[e[t+3]]+"-"+ot[e[t+4]]+ot[e[t+5]]+"-"+ot[e[t+6]]+ot[e[t+7]]+"-"+ot[e[t+8]]+ot[e[t+9]]+"-"+ot[e[t+10]]+ot[e[t+11]]+ot[e[t+12]]+ot[e[t+13]]+ot[e[t+14]]+ot[e[t+15]]).toLowerCase();if(!at(r))throw TypeError("Stringified UUID is invalid");return r};var ct=function(e,t,r){var n=(e=e||{}).random||(e.rng||rt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return st(n)};function lt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=Bt(e,t),a=ct();return{clientId:a,name:e,isValid:!0,attributes:n,innerBlocks:r}}function ut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{const t=Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],[r,n,a=[]]=t;return lt(r,n,ut(a))}))}function dt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const n=ct(),a=Bt(e.name,{...e.attributes,...t});return{...e,clientId:n,attributes:a,innerBlocks:r||e.innerBlocks.map((e=>dt(e)))}}function pt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const n=ct();return{...e,clientId:n,attributes:{...e.attributes,...t},innerBlocks:r||e.innerBlocks.map((e=>pt(e)))}}const ht=(e,t,r)=>{if((0,o.isEmpty)(r))return!1;const n=r.length>1,a=(0,o.first)(r).name;if(!(ft(e)||!n||e.isMultiBlock))return!1;if(!ft(e)&&!(0,o.every)(r,{name:a}))return!1;if(!("block"===e.type))return!1;const i=(0,o.first)(r);if(!("from"!==t||-1!==e.blocks.indexOf(i.name)||ft(e)))return!1;if(!n&>(i.name)&>(e.blockName))return!1;if((0,o.isFunction)(e.isMatch)){const t=e.isMultiBlock?r.map((e=>e.attributes)):i.attributes,n=e.isMultiBlock?r:i;if(!e.isMatch(t,n))return!1}return!(e.usingMobileTransformations&&ft(e)&&!gt(i.name))},ft=e=>e&&"block"===e.type&&Array.isArray(e.blocks)&&e.blocks.includes("*"),gt=e=>e===De();function mt(e){if((0,o.isEmpty)(e))return[];const t=(e=>{if((0,o.isEmpty)(e))return[];const t=Re();return(0,o.filter)(t,(t=>!!bt(_t("from",t.name),(t=>ht(t,"from",e)))))})(e),r=(e=>{if((0,o.isEmpty)(e))return[];const t=He((0,o.first)(e).name),r=t?_t("to",t.name):[],n=(0,o.filter)(r,(t=>t&&ht(t,"to",e)));return(0,o.flatMap)(n,(e=>e.blocks)).map((e=>"*"===e?e:He(e)))})(e);return(0,o.uniq)([...t,...r])}function bt(e,t){const r=(0,H.createHooks)();for(let n=0;ne||a),a.priority)}return r.applyFilters("transform",null)}function _t(e,t){if(void 0===t)return(0,o.flatMap)(Re(),(t=>{let{name:r}=t;return _t(e,r)}));const r=xt(t),{name:n,transforms:a}=r||{};if(!a||!Array.isArray(a[e]))return[];const i=a.supportedMobileTransforms&&Array.isArray(a.supportedMobileTransforms),s=i?(0,o.filter)(a[e],(e=>"raw"===e.type||!(!e.blocks||!e.blocks.length)&&(!!ft(e)||(0,o.every)(e.blocks,(e=>a.supportedMobileTransforms.includes(e)))))):a[e];return s.map((e=>({...e,blockName:n,usingMobileTransformations:i})))}function kt(e,t){const r=(0,o.castArray)(e),n=r.length>1,a=r[0],i=a.name,s=_t("from",t),c=bt(_t("to",i),(e=>"block"===e.type&&(ft(e)||-1!==e.blocks.indexOf(t))&&(!n||e.isMultiBlock)))||bt(s,(e=>"block"===e.type&&(ft(e)||-1!==e.blocks.indexOf(i))&&(!n||e.isMultiBlock)));if(!c)return null;let l;if(l=c.isMultiBlock?(0,o.has)(c,"__experimentalConvert")?c.__experimentalConvert(r):c.transform(r.map((e=>e.attributes)),r.map((e=>e.innerBlocks))):(0,o.has)(c,"__experimentalConvert")?c.__experimentalConvert(a):c.transform(a.attributes,a.innerBlocks),!(0,o.isObjectLike)(l))return null;if(l=(0,o.castArray)(l),l.some((e=>!He(e.name))))return null;if(!("*"===t||(0,o.some)(l,(e=>e.name===t))))return null;return l.map(((t,r,n)=>(0,H.applyFilters)("blocks.switchToBlockType.transformedBlock",t,e,r,n)))}const yt=(e,t)=>lt(e,t.attributes,(0,o.map)(t.innerBlocks,(e=>yt(e.name,e))));!function(e){e.forEach((function(e){fe.indexOf(e)<0&&(e(pe,ie),fe.push(e))}))}([function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var a in r)n[r[a]]=a;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,i,s=n[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var c=this.toRgb(),l=1/0,u="black";if(!o.length)for(var d in r)o[d]=new e(r[d]).toRgb();for(var p in r){var h=(a=c,i=o[p],Math.pow(a.r-i.r,2)+Math.pow(a.g-i.g,2)+Math.pow(a.b-i.b,2));h(c=me(i))?(s+.05)/(c+.05):(c+.05)/(s+.05),void 0===(n=2)&&(n=0),void 0===a&&(a=Math.pow(10,n)),Math.floor(a*r)/a+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(o=(r=t).size)?"normal":o,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===i?7:"AA"===a&&"large"===i?3:4.5);var r,n,a,o,i}}]);const wt=["#191e23","#f8f9f9"];function vt(e){const t=Ve();if(e.name!==t)return!1;vt.block&&vt.block.name===t||(vt.block=lt(t));const r=vt.block,n=He(t);return(0,o.every)(null==n?void 0:n.attributes,((t,n)=>r.attributes[n]===e.attributes[n]))}function Tt(e){return!!e&&((0,o.isString)(e)||(0,be.isValidElement)(e)||(0,o.isFunction)(e)||e instanceof be.Component)}function Ct(e){if(Tt(e=e||ke))return{src:e};if((0,o.has)(e,["background"])){const t=he(e.background);return{...e,foreground:e.foreground?e.foreground:(0,o.maxBy)(wt,(e=>t.contrast(e))),shadowColor:t.alpha(.3).toRgbString()}}return e}function xt(e){return(0,o.isString)(e)?He(e):e}function St(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"visual";const{__experimentalLabel:n,title:a}=e,o=n&&n(t,{context:r});return o?(0,_e.__unstableStripHTML)(o):a}function Et(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vertical";const a=null==e?void 0:e.title,o=e?St(e,t,"accessibility"):"",s=void 0!==r,c=o&&o!==a;return s&&"vertical"===n?c?(0,i.sprintf)((0,i.__)("%1$s Block. Row %2$d. %3$s"),a,r,o):(0,i.sprintf)((0,i.__)("%1$s Block. Row %2$d"),a,r):s&&"horizontal"===n?c?(0,i.sprintf)((0,i.__)("%1$s Block. Column %2$d. %3$s"),a,r,o):(0,i.sprintf)((0,i.__)("%1$s Block. Column %2$d"),a,r):c?(0,i.sprintf)((0,i.__)("%1$s Block. %2$s"),a,o):(0,i.sprintf)((0,i.__)("%s Block"),a)}function Bt(e,t){const r=He(e);if(void 0===r)throw new Error(`Block type '${e}' is not registered.`);return(0,o.reduce)(r.attributes,((e,r,n)=>{const a=t[n];return void 0!==a?e[n]=a:r.hasOwnProperty("default")&&(e[n]=r.default),-1!==["node","children"].indexOf(r.source)&&("string"==typeof e[n]?e[n]=[e[n]]:Array.isArray(e[n])||(e[n]=[])),e}),{})}function Nt(e,t){var r;const n=null===(r=He(e))||void 0===r?void 0:r.attributes;if(!n)return[];const a=Object.keys(n);return t?a.filter((e=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.__experimentalRole)===t})):a}const{error:At,warn:Pt}=window.console,Lt={common:"text",formatting:"text",layout:"design"},Mt=(e,t)=>{let{select:r}=t;const{name:n}=e,a=(0,H.applyFilters)("blocks.registerBlockType",{...e},n);if(a.deprecated&&(a.deprecated=a.deprecated.map((t=>(0,o.pick)((0,H.applyFilters)("blocks.registerBlockType",{...(0,o.omit)(e,ye),...t},n),ye)))),(0,o.isPlainObject)(a))if((0,o.isFunction)(a.save))if(!("edit"in a)||(0,o.isFunction)(a.edit))if(Lt.hasOwnProperty(a.category)&&(a.category=Lt[a.category]),"category"in a&&!(0,o.some)(r.getCategories(),{slug:a.category})&&(Pt('The block "'+n+'" is registered with an invalid category "'+a.category+'".'),delete a.category),"title"in a&&""!==a.title)if("string"==typeof a.title){if(a.icon=Ct(a.icon),Tt(a.icon.src))return a;At("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#icon-optional")}else At("Block titles must be strings.");else At('The block "'+n+'" must have a title.');else At('The "edit" property must be a valid function.');else At('The "save" property must be a valid function.');else At("Block settings must be a valid object.")};function Dt(e){return{type:"ADD_BLOCK_TYPES",blockTypes:(0,o.castArray)(e)}}const jt=e=>t=>{let{dispatch:r,select:n}=t;r({type:"ADD_UNPROCESSED_BLOCK_TYPE",blockType:e});const a=Mt(e,{select:n});a&&r.addBlockTypes(a)},zt=()=>e=>{let{dispatch:t,select:r}=e;const n=r.__experimentalGetUnprocessedBlockTypes(),a=Object.keys(n).reduce(((e,t)=>{const a=Mt(n[t],{select:r});return a&&e.push(a),e}),[]);a.length&&t.addBlockTypes(a)};function Ot(e){return{type:"REMOVE_BLOCK_TYPES",names:(0,o.castArray)(e)}}function It(e,t){return{type:"ADD_BLOCK_STYLES",styles:(0,o.castArray)(t),blockName:e}}function Vt(e,t){return{type:"REMOVE_BLOCK_STYLES",styleNames:(0,o.castArray)(t),blockName:e}}function Ht(e,t){return{type:"ADD_BLOCK_VARIATIONS",variations:(0,o.castArray)(t),blockName:e}}function Rt(e,t){return{type:"REMOVE_BLOCK_VARIATIONS",variationNames:(0,o.castArray)(t),blockName:e}}function $t(e){return{type:"SET_DEFAULT_BLOCK_NAME",name:e}}function Ft(e){return{type:"SET_FREEFORM_FALLBACK_BLOCK_NAME",name:e}}function qt(e){return{type:"SET_UNREGISTERED_FALLBACK_BLOCK_NAME",name:e}}function Ut(e){return{type:"SET_GROUPING_BLOCK_NAME",name:e}}function Gt(e){return{type:"SET_CATEGORIES",categories:e}}function Kt(e,t){return{type:"UPDATE_CATEGORY",slug:e,category:t}}function Wt(e,t,r){return{type:"ADD_BLOCK_COLLECTION",namespace:e,title:t,icon:r}}function Yt(e){return{type:"REMOVE_BLOCK_COLLECTION",namespace:e}}const Qt=(0,a.createReduxStore)("core/blocks",{reducer:g,selectors:e,actions:t});(0,a.register)(Qt);var Zt=window.wp.blockSerializationDefaultParser,Xt=window.wp.autop,Jt=window.wp.isShallowEqual,er=r.n(Jt);function tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isCommentDelimited:r=!0}=t,{blockName:n,attrs:a={},innerBlocks:o=[],innerContent:i=[]}=e;let s=0;const c=i.map((e=>null!==e?e:tr(o[s++],t))).join("\n").replace(/\n+/g,"\n").trim();return r?pr(n,a,c):c}function rr(e){const t="wp-block-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,H.applyFilters)("blocks.getBlockDefaultClassName",t,e)}function nr(e){const t="editor-block-list-item-"+e.replace(/\//,"-").replace(/^core-/,"");return(0,H.applyFilters)("blocks.getBlockMenuDefaultClassName",t,e)}const ar={},or={};function ir(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blockType:t,attributes:r}=ar;return(0,H.applyFilters)("blocks.getSaveContent.extraProps",{...e},t,r)}function sr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerBlocks:t}=or,r=fr(t,{isInnerBlocks:!0}),n=(0,be.createElement)(be.RawHTML,null,r);return{...e,children:n}}function cr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=xt(e);let{save:a}=n;if(a.prototype instanceof be.Component){const e=new a({attributes:t});a=e.render.bind(e)}ar.blockType=n,ar.attributes=t,or.innerBlocks=r;let i=a({attributes:t,innerBlocks:r});if((0,o.isObject)(i)&&(0,H.hasFilter)("blocks.getSaveContent.extraProps")&&!(n.apiVersion>1)){const e=(0,H.applyFilters)("blocks.getSaveContent.extraProps",{...i.props},n,t);er()(e,i.props)||(i=(0,be.cloneElement)(i,e))}return(0,H.applyFilters)("blocks.getSaveElement",i,n,t)}function lr(e,t,r){const n=xt(e);return(0,be.renderToString)(cr(n,t,r))}function ur(e,t){return(0,o.reduce)(e.attributes,((e,r,n)=>{const a=t[n];return void 0===a||void 0!==r.source||"default"in r&&r.default===a||(e[n]=a),e}),{})}function dr(e){let t=e.originalContent;if(e.isValid||e.innerBlocks.length)try{t=lr(e.name,e.attributes,e.innerBlocks)}catch(e){}return t}function pr(e,t,r){const n=(0,o.isEmpty)(t)?"":function(e){return JSON.stringify(e).replace(/--/g,"\\u002d\\u002d").replace(//g,"\\u003e").replace(/&/g,"\\u0026").replace(/\\"/g,"\\u0022")}(t)+" ",a=(0,o.startsWith)(e,"core/")?e.slice(5):e;return r?`\x3c!-- wp:${a} ${n}--\x3e\n`+r+`\n\x3c!-- /wp:${a} --\x3e`:`\x3c!-- wp:${a} ${n}/--\x3e`}function hr(e){1===e.length&&vt(e[0])&&(e=[]);let t=fr(e);return 1===e.length&&e[0].name===Me()&&(t=(0,Xt.removep)(t)),t}function fr(e,t){return(0,o.castArray)(e).map((e=>function(e){let{isInnerBlocks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.isValid&&e.__unstableBlockSource)return tr(e.__unstableBlockSource);const r=e.name,n=dr(e);if(r===ze()||!t&&r===Me())return n;const a=ur(He(r),e.attributes);return pr(r,a,n)}(e,t))).join("\n\n")}var gr=/^#[xX]([A-Fa-f0-9]+)$/,mr=/^#([0-9]+)$/,br=/^([A-Za-z0-9]+)$/,_r=(function(){function e(e){this.named=e}e.prototype.parse=function(e){if(e){var t=e.match(gr);return t?String.fromCharCode(parseInt(t[1],16)):(t=e.match(mr))?String.fromCharCode(parseInt(t[1],10)):(t=e.match(br))?this.named[t[1]]:void 0}}}(),/[\t\n\f ]/),kr=/[A-Za-z]/,yr=/\r\n?/g;function wr(e){return _r.test(e)}function vr(e){return kr.test(e)}var Tr=function(){function e(e,t,r){void 0===r&&(r="precompile"),this.delegate=e,this.entityParser=t,this.mode=r,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var e=this.peek();if("<"!==e||this.isIgnoredEndTag()){if("precompile"===this.mode&&"\n"===e){var t=this.tagNameBuffer.toLowerCase();"pre"!==t&&"textarea"!==t||this.consume()}this.transitionTo("data"),this.delegate.beginData()}else this.transitionTo("tagOpen"),this.markTagStart(),this.consume()},data:function(){var e=this.peek(),t=this.tagNameBuffer;"<"!==e||this.isIgnoredEndTag()?"&"===e&&"script"!==t&&"style"!==t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(e)):(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume())},tagOpen:function(){var e=this.consume();"!"===e?this.transitionTo("markupDeclarationOpen"):"/"===e?this.transitionTo("endTagOpen"):("@"===e||":"===e||vr(e))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(e))},markupDeclarationOpen:function(){var e=this.consume();"-"===e&&"-"===this.peek()?(this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment()):"DOCTYPE"===e.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){wr(this.consume())&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var e=this.consume();wr(e)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase()))},doctypeName:function(){var e=this.consume();wr(e)?this.transitionTo("afterDoctypeName"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(e.toLowerCase())},afterDoctypeName:function(){var e=this.consume();if(!wr(e))if(">"===e)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var t=e.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),r="PUBLIC"===t.toUpperCase(),n="SYSTEM"===t.toUpperCase();(r||n)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),r?this.transitionTo("afterDoctypePublicKeyword"):n&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var e=this.peek();wr(e)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):'"'===e?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):"'"===e?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):">"===e&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},doctypePublicIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypePublicIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(e)},afterDoctypePublicIdentifier:function(){var e=this.consume();wr(e)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var e=this.consume();wr(e)||(">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):'"'===e?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):"'"===e&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var e=this.consume();'"'===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},doctypeSystemIdentifierSingleQuoted:function(){var e=this.consume();"'"===e?this.transitionTo("afterDoctypeSystemIdentifier"):">"===e?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(e)},afterDoctypeSystemIdentifier:function(){var e=this.consume();wr(e)||">"===e&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var e=this.consume();"-"===e?this.transitionTo("commentStartDash"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(e),this.transitionTo("comment"))},commentStartDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var e=this.consume();"-"===e?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(e)},commentEndDash:function(){var e=this.consume();"-"===e?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+e),this.transitionTo("comment"))},commentEnd:function(){var e=this.consume();">"===e?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+e),this.transitionTo("comment"))},tagName:function(){var e=this.consume();wr(e)?this.transitionTo("beforeAttributeName"):"/"===e?this.transitionTo("selfClosingStartTag"):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(e)},endTagName:function(){var e=this.consume();wr(e)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):"/"===e?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):">"===e?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(e)},beforeAttributeName:function(){var e=this.peek();wr(e)?this.consume():"/"===e?(this.transitionTo("selfClosingStartTag"),this.consume()):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):"="===e?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var e=this.peek();wr(e)?(this.transitionTo("afterAttributeName"),this.consume()):"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.transitionTo("beforeAttributeValue"),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):'"'===e||"'"===e||"<"===e?(this.delegate.reportSyntaxError(e+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(e)):(this.consume(),this.delegate.appendToAttributeName(e))},afterAttributeName:function(){var e=this.peek();wr(e)?this.consume():"/"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"="===e?(this.consume(),this.transitionTo("beforeAttributeValue")):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(e))},beforeAttributeValue:function(){var e=this.peek();wr(e)?this.consume():'"'===e?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):"'"===e?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):">"===e?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(e))},attributeValueDoubleQuoted:function(){var e=this.consume();'"'===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueSingleQuoted:function(){var e=this.consume();"'"===e?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):"&"===e?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(e)},attributeValueUnquoted:function(){var e=this.peek();wr(e)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):"&"===e?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):">"===e?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(e))},afterAttributeValueQuoted:function(){var e=this.peek();wr(e)?(this.consume(),this.transitionTo("beforeAttributeName")):"/"===e?(this.consume(),this.transitionTo("selfClosingStartTag")):">"===e?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){">"===this.peek()?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var e=this.consume();("@"===e||":"===e||vr(e))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(e))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(e){this.state=e},e.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},e.prototype.tokenizePart=function(e){for(this.input+=function(e){return e.replace(yr,"\n")}(e);this.index"!==this.input.substring(this.index,this.index+8)||"style"===e&&""!==this.input.substring(this.index,this.index+8)||"script"===e&&"<\/script>"!==this.input.substring(this.index,this.index+9)},e}(),Cr=function(){function e(e,t){void 0===t&&(t={}),this.options=t,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Tr(this,e,t.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},e.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var e=this.token;if(null===e)throw new Error("token was unexpectedly null");if(0===arguments.length)return e;for(var t=0;t1?r-1:0),a=1;a[]}}function Nr(){const e=[],t=Br();return{error(){for(var r=arguments.length,n=new Array(r),a=0;ae}}const Ar=/[\t\n\r\v\f ]+/g,Pr=/^[\t\n\r\v\f ]*$/,Lr=/^url\s*\(['"\s]*(.*?)['"\s]*\)$/,Mr=["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"],Dr=[...Mr,"autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"],jr=[o.identity,function(e){return Hr(e).join(" ")}],zr=/^[\da-z]+$/i,Or=/^#\d+$/,Ir=/^#x[\da-f]+$/i;class Vr{parse(e){if(t=e,zr.test(t)||Or.test(t)||Ir.test(t))return(0,Er.decodeEntities)("&"+e+";");var t}}function Hr(e){return e.trim().split(Ar)}function Rr(e){return e.attributes.filter((e=>{const[t,r]=e;return r||0===t.indexOf("data-")||(0,o.includes)(Dr,t)}))}function $r(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Br(),n=e.chars,a=t.chars;for(let e=0;e{const[t,...r]=e.split(":"),n=r.join(":");return[t.trim(),qr(n.trim())]}));return(0,o.fromPairs)(t)}const Gr={class:(e,t)=>!(0,o.xor)(...[e,t].map(Hr)).length,style:(e,t)=>(0,o.isEqual)(...[e,t].map(Ur)),...(0,o.fromPairs)(Mr.map((e=>[e,o.stubTrue])))};function Kr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Br();if(e.length!==t.length)return r.warning("Expected attributes %o, instead saw %o.",t,e),!1;const n={};for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:Br();return e.tagName!==t.tagName&&e.tagName.toLowerCase()!==t.tagName.toLowerCase()?(r.warning("Expected tag name `%s`, instead saw `%s`.",t.tagName,e.tagName),!1):Kr(...[e,t].map(Rr),r)},Chars:$r,Comment:$r};function Yr(e){let t;for(;t=e.shift();){if("Chars"!==t.type)return t;if(!Pr.test(t.chars))return t}}function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Br();try{return new Cr(new Vr).tokenize(e)}catch(r){t.warning("Malformed HTML detected: %s",e)}return null}function Zr(e,t){return!!e.selfClosing&&!(!t||t.tagName!==e.tagName||"EndTag"!==t.type)}function Xr(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Br();if(e===t)return!0;const[n,a]=[e,t].map((e=>Qr(e,r)));if(!n||!a)return!1;let o,i;for(;o=Yr(n);){if(i=Yr(a),!i)return r.warning("Expected end of content, instead saw %o.",o),!1;if(o.type!==i.type)return r.warning("Expected token of type `%s` (%o), instead saw `%s` (%o).",i.type,i,o.type,o),!1;const e=Wr[o.type];if(e&&!e(o,i,r))return!1;Zr(o,a[0])?Yr(a):Zr(i,n[0])&&Yr(n)}return!(i=Yr(a))||(r.warning("Expected %o, instead saw end of content.",i),!1)}function Jr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.name;const r=e.name===Me()||e.name===ze();if(r)return[!0,[]];const n=Nr(),a=xt(t);let o;try{o=lr(a,e.attributes)}catch(e){return n.error("Block validation failed because an error occurred while generating block content:\n\n%s",e.toString()),[!1,n.getItems()]}const i=Xr(e.originalContent,o,n);return i||n.error("Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",a.name,a,o,e.originalContent),[i,n.getItems()]}function en(e,t,r){Sr()("isValidBlockContent introduces opportunity for data loss",{since:"12.6",plugin:"Gutenberg",alternative:"validateBlock"});const n=xt(e),a={name:n.name,attributes:t,innerBlocks:[],originalContent:r},[o]=Jr(a,n);return o}function tn(e,t){const r={...t};if("core/cover-image"===e&&(e="core/cover"),"core/text"!==e&&"core/cover-text"!==e||(e="core/paragraph"),e&&0===e.indexOf("core/social-link-")&&(r.service=e.substring(17),e="core/social-link"),e&&0===e.indexOf("core-embed/")){const t=e.substring(11),n={speaker:"speaker-deck",polldaddy:"crowdsignal"};r.providerNameSlug=t in n?n[t]:t,["amazon-kindle","wordpress"].includes(t)||(r.responsive=!0),e="core/embed"}return"core/query-loop"===e&&(e="core/post-template"),"core/post-comment-author"===e&&(e="core/comment-author-name"),"core/post-comment-content"===e&&(e="core/comment-content"),"core/post-comment-date"===e&&(e="core/comment-date"),[e,r]}function rn(e,t){for(var r,n=t.split(".");r=n.shift();){if(!(r in e))return;e=e[r]}return e}var nn,an=function(){return nn||(nn=document.implementation.createHTMLDocument("")),nn};function on(e,t){if(t){if("string"==typeof e){var r=an();r.body.innerHTML=e,e=r.body}if("function"==typeof t)return t(e);if(Object===t.constructor)return Object.keys(t).reduce((function(r,n){var a=t[n];return r[n]=on(e,a),r}),{})}}function sn(e,t){var r,n;return 1===arguments.length?(r=e,n=void 0):(r=t,n=e),function(e){var t=e;if(n&&(t=e.querySelector(n)),t)return rn(t,r)}}var cn=r(9756);function ln(e){const t={};for(let r=0;r{let r=t;e&&(r=t.querySelector(e));try{return un(r)}catch(e){return null}}}var pn={isNodeOfType:function(e,t){return e&&e.type===t},fromDOM:un,toHTML:function(e){return fn([e])},matcher:dn};function hn(e){const t=[];for(let r=0;r{let r=t;return e&&(r=t.querySelector(e)),r?hn(r.childNodes):[]}}var mn={concat:function(){const e=[];for(let t=0;tfunction(e,t){switch(t){case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"object":return!!e&&e.constructor===Object;case"null":return null===e;case"array":return Array.isArray(e);case"integer":case"number":return"number"==typeof e}return!0}(e,t)))}function _n(e,t,r,n){let a;switch(t.source){case void 0:a=n?n[e]:void 0;break;case"attribute":case"property":case"html":case"text":case"children":case"node":case"query":case"tag":a=wn(r,t)}return function(e,t){return void 0===t||bn(e,(0,o.castArray)(t))}(a,t.type)&&function(e,t){return!Array.isArray(t)||t.includes(e)}(a,t.enum)||(a=void 0),void 0===a&&(a=t.default),a}const kn=r.n(cn)()((e=>{switch(e.source){case"attribute":let n=function(e,t){var r,n;return 1===arguments.length?(r=e,n=void 0):(r=t,n=e),function(e){var t=sn(n,"attributes")(e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r].value}}(e.selector,e.attribute);return"boolean"===e.type&&(n=(e=>(0,o.flow)([e,e=>void 0!==e]))(n)),n;case"html":return t=e.selector,r=e.multiline,e=>{let n=e;if(t&&(n=e.querySelector(t)),!n)return"";if(r){let e="";const t=n.children.length;for(let a=0;ae?e.toLowerCase():void 0]);default:console.error(`Unknown source type "${e.source}"`)}var t,r}));function yn(e){return on(e,(e=>e))}function wn(e,t){return kn(t)(yn(e))}function vn(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=yn(t),a=xt(e),i=(0,o.mapValues)(a.attributes,((e,t)=>_n(t,e,n,r)));return(0,H.applyFilters)("blocks.getBlockAttributes",i,a,t,r)}const Tn={type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"};function Cn(e){const t=wn(`
${e}
`,Tn);return t?t.trim().split(/\s+/):[]}function xn(e,t){const r=function(e,t,r){if(Fe(t,"customClassName",!0)){const n=lr(t,(0,o.omit)(e,["className"])),a=Cn(n),i=Cn(r),s=(0,o.difference)(i,a);s.length?e.className=s.join(" "):n&&delete e.className}return e}(e.attributes,t,e.originalContent);return{...e,attributes:r}}function Sn(e,t){let r=function(e){const t=Me(),r=e.blockName||Me(),n=e.attrs||{},a=e.innerBlocks||[];let o=e.innerHTML.trim();return r===t&&(o=(0,Xt.autop)(o).trim()),{...e,blockName:r,attrs:n,innerHTML:o,innerBlocks:a}}(e);r=function(e){const[t,r]=tn(e.blockName,e.attrs);return{...e,blockName:t,attrs:r}}(r);let n=He(r.blockName);n||(r=function(e){const t=ze()||Me(),r=tr(e,{isCommentDelimited:!1}),n=tr(e,{isCommentDelimited:!0});return{blockName:t,attrs:{originalName:e.blockName,originalContent:n,originalUndelimitedContent:r},innerHTML:e.blockName?n:e.innerHTML,innerBlocks:e.innerBlocks,innerContent:e.innerContent}}(r),n=He(r.blockName));const a=r.blockName===Me()||r.blockName===ze();if(!n||!r.innerHTML&&a)return;const i=r.innerBlocks.map((e=>Sn(e,t))).filter((e=>!!e)),s=lt(r.blockName,vn(n,r.innerHTML,r.attrs),i);s.originalContent=r.innerHTML;const c=function(e,t){const[r]=Jr(e,t);if(r)return{...e,isValid:r,validationIssues:[]};const n=xn(e,t),[a,o]=Jr(e,t);return{...n,isValid:a,validationIssues:o}}(s,n),{validationIssues:l}=c,u=function(e,t,r){const n=t.attrs,{deprecated:a}=r;if(!a||!a.length)return e;for(let t=0;t{let{log:t,args:r}=e;return t(...r)})):(console.groupCollapsed("Updated Block: %s",n.name),console.info("Block successfully updated for `%s` (%o).\n\nNew content generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s",n.name,n,lr(n,u.attributes),u.originalContent),console.groupEnd()),u}function En(e,t){return(0,Zt.parse)(e).reduce(((e,r)=>{const n=Sn(r,t);return n&&e.push(n),e}),[])}function Bn(){return(0,o.filter)(_t("from"),{type:"raw"}).map((e=>e.isMatch?e:{...e,isMatch:t=>e.selector&&t.matches(e.selector)}))}function Nn(e){const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children).flatMap((e=>{const t=bt(Bn(),(t=>{let{isMatch:r}=t;return r(e)}));if(!t)return lt("core/html",vn("core/html",e.outerHTML));const{transform:r,blockName:n}=t;return r?r(e):lt(n,vn(n,e.outerHTML))}))}function An(e){const t=document.implementation.createHTMLDocument(""),r=document.implementation.createHTMLDocument(""),n=t.body,a=r.body;for(n.innerHTML=e;n.firstChild;){const e=n.firstChild;e.nodeType===e.TEXT_NODE?(0,_e.isEmpty)(e)?n.removeChild(e):(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(e)):e.nodeType===e.ELEMENT_NODE?"BR"===e.nodeName?(e.nextSibling&&"BR"===e.nextSibling.nodeName&&(a.appendChild(r.createElement("P")),n.removeChild(e.nextSibling)),a.lastChild&&"P"===a.lastChild.nodeName&&a.lastChild.hasChildNodes()?a.lastChild.appendChild(e):n.removeChild(e)):"P"===e.nodeName?(0,_e.isEmpty)(e)?n.removeChild(e):a.appendChild(e):(0,_e.isPhrasingContent)(e)?(a.lastChild&&"P"===a.lastChild.nodeName||a.appendChild(r.createElement("P")),a.lastChild.appendChild(e)):a.appendChild(e):n.removeChild(e)}return a.innerHTML}function Pn(e,t){if(e.nodeType===e.COMMENT_NODE)if("nextpage"!==e.nodeValue){if(0===e.nodeValue.indexOf("more")){const r=e.nodeValue.slice(4).trim();let n=e,a=!1;for(;n=n.nextSibling;)if(n.nodeType===n.COMMENT_NODE&&"noteaser"===n.nodeValue){a=!0,(0,_e.remove)(n);break}(0,_e.replace)(e,function(e,t,r){const n=r.createElement("wp-block");n.dataset.block="core/more",e&&(n.dataset.customText=e);t&&(n.dataset.noTeaser="");return n}(r,a,t))}}else(0,_e.replace)(e,function(e){const t=e.createElement("wp-block");return t.dataset.block="core/nextpage",t}(t))}function Ln(e){return"OL"===e.nodeName||"UL"===e.nodeName}function Mn(e){if(!Ln(e))return;const t=e,r=e.previousElementSibling;if(r&&r.nodeName===e.nodeName&&1===t.children.length){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode.removeChild(t)}const n=e.parentNode;if(n&&"LI"===n.nodeName&&1===n.children.length&&!/\S/.test((a=n,Array.from(a.childNodes).map((e=>{let{nodeValue:t=""}=e;return t})).join("")))){const e=n,r=e.previousElementSibling,a=e.parentNode;r?(r.appendChild(t),a.removeChild(e)):(a.parentNode.insertBefore(t,a),a.parentNode.removeChild(a))}var a;if(n&&Ln(n)){const t=e.previousElementSibling;t?t.appendChild(e):(0,_e.unwrap)(e)}}function Dn(e){"BLOCKQUOTE"===e.nodeName&&(e.innerHTML=An(e.innerHTML))}function jn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=e.ownerDocument.createElement("figure");t.parentNode.insertBefore(r,t),r.appendChild(e)}function zn(e,t,r){if(!function(e,t){const r=e.nodeName.toLowerCase();return"figcaption"!==r&&!(0,_e.isTextContent)(e)&&(0,o.has)(t,["figure","children",r])}(e,r))return;let n=e;const a=e.parentNode;(function(e,t){const r=e.nodeName.toLowerCase();return(0,o.has)(t,["figure","children","a","children",r])})(e,r)&&"A"===a.nodeName&&1===a.childNodes.length&&(n=e.parentNode);const i=n.closest("p,div");i?e.classList?(e.classList.contains("alignright")||e.classList.contains("alignleft")||e.classList.contains("aligncenter")||!i.textContent.trim())&&jn(n,i):jn(n,i):"BODY"===n.parentNode.nodeName&&jn(n)}var On=window.wp.shortcode;var In=function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const a=_t("from"),i=bt(a,(e=>-1===n.indexOf(e.blockName)&&"shortcode"===e.type&&(0,o.some)((0,o.castArray)(e.tag),(e=>(0,On.regexp)(e).test(t)))));if(!i)return[t];const s=(0,o.castArray)(i.tag),c=(0,o.find)(s,(e=>(0,On.regexp)(e).test(t)));let l;const u=r;if(l=(0,On.next)(c,t,r)){r=l.index+l.content.length;const a=t.substr(0,l.index),s=t.substr(r);if(!((0,o.includes)(l.shortcode.content||"","<")||/(\n|

)\s*$/.test(a)&&/^\s*(\n|<\/p>)/.test(s)))return e(t,r);if(i.isMatch&&!i.isMatch(l.shortcode.attrs))return e(t,u,[...n,i.blockName]);const c=(0,o.mapValues)((0,o.pickBy)(i.attributes,(e=>e.shortcode)),(e=>e.shortcode(l.shortcode.attrs,l))),d={...He(i.blockName),attributes:i.attributes};let p=lt(i.blockName,vn(d,l.shortcode.content,c));return p.originalContent=l.shortcode.content,p=xn(p,d),[...e(a),p,...e(s)]}return[t]};function Vn(e){return function(e,t){const r={phrasingContentSchema:(0,_e.getPhrasingContentSchema)(t),isPaste:"paste"===t},n=e.map((e=>{let{isMatch:t,blockName:n,schema:a}=e;const i=Fe(n,"anchor");return a=(0,o.isFunction)(a)?a(r):a,i||t?(0,o.mapValues)(a,(e=>{let r=e.attributes||[];return i&&(r=[...r,"id"]),{...e,attributes:r,isMatch:t||void 0}})):a}));return(0,o.mergeWith)({},...n,((e,t,r)=>{switch(r){case"children":return"*"===e||"*"===t?"*":{...e,...t};case"attributes":case"require":return[...e||[],...t||[]];case"isMatch":if(!e||!t)return;return function(){return e(...arguments)||t(...arguments)}}}))}(Bn(),e)}function Hn(e,t,r,n){Array.from(e).forEach((e=>{Hn(e.childNodes,t,r,n),t.forEach((t=>{r.contains(e)&&t(e,r,n)}))}))}function Rn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n=document.implementation.createHTMLDocument("");return n.body.innerHTML=e,Hn(n.body.childNodes,t,n,r),n.body.innerHTML}function $n(e,t){const r=e[`${t}Sibling`];if(r&&(0,_e.isPhrasingContent)(r))return r;const{parentNode:n}=e;return n&&(0,_e.isPhrasingContent)(n)?$n(n,t):void 0}function Fn(e){return Sr()("wp.blocks.getPhrasingContentSchema",{since:"5.6",alternative:"wp.dom.getPhrasingContentSchema"}),(0,_e.getPhrasingContentSchema)(e)}function qn(e){let{HTML:t=""}=e;if(-1!==t.indexOf("\x3c!-- wp:"))return En(t);const r=In(t),n=Vn();return(0,o.compact)((0,o.flatMap)(r,(e=>{if("string"!=typeof e)return e;return Nn(e=An(e=Rn(e,[Mn,Pn,zn,Dn],n)))})))}function Un(e){e.nodeType===e.COMMENT_NODE&&(0,_e.remove)(e)}function Gn(e,t){return e.every((e=>function(e,t){if((0,_e.isTextContent)(e))return!0;if(!t)return!1;const r=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((e=>0===(0,o.difference)([r,t],e).length))}(e,t)&&Gn(Array.from(e.children),t)))}function Kn(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}function Wn(e,t){if("SPAN"===e.nodeName&&e.style){const{fontWeight:r,fontStyle:n,textDecorationLine:a,textDecoration:i,verticalAlign:s}=e.style;"bold"!==r&&"700"!==r||(0,_e.wrap)(t.createElement("strong"),e),"italic"===n&&(0,_e.wrap)(t.createElement("em"),e),("line-through"===a||(0,o.includes)(i,"line-through"))&&(0,_e.wrap)(t.createElement("s"),e),"super"===s?(0,_e.wrap)(t.createElement("sup"),e):"sub"===s&&(0,_e.wrap)(t.createElement("sub"),e)}else"B"===e.nodeName?e=(0,_e.replaceTag)(e,"strong"):"I"===e.nodeName?e=(0,_e.replaceTag)(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")),e.name&&!e.id&&(e.id=e.name),e.id&&!e.ownerDocument.querySelector(`[href="#${e.id}"]`)&&e.removeAttribute("id"))}function Yn(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)}const{parseInt:Qn}=window;function Zn(e){return"OL"===e.nodeName||"UL"===e.nodeName}function Xn(e,t){if("P"!==e.nodeName)return;const r=e.getAttribute("style");if(!r)return;if(-1===r.indexOf("mso-list"))return;const n=/mso-list\s*:[^;]+level([0-9]+)/i.exec(r);if(!n)return;let a=Qn(n[1],10)-1||0;const o=e.previousElementSibling;if(!o||!Zn(o)){const r=e.textContent.trim().slice(0,1),n=/[1iIaA]/.test(r),a=t.createElement(n?"ol":"ul");n&&a.setAttribute("type",r),e.parentNode.insertBefore(a,e)}const i=e.previousElementSibling,s=i.nodeName,c=t.createElement("li");let l=i;for(e.removeChild(e.firstChild);e.firstChild;)c.appendChild(e.firstChild);for(;a--;)l=l.lastChild||l,Zn(l)&&(l=l.lastChild||l);Zn(l)||(l=l.appendChild(t.createElement(s))),l.appendChild(c),e.parentNode.removeChild(e)}var Jn=window.wp.blob;const{atob:ea,File:ta}=window;function ra(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){const[t,r]=e.src.split(","),[n]=t.slice(5).split(";");if(!r||!n)return void(e.src="");let a;try{a=ea(r)}catch(t){return void(e.src="")}const o=new Uint8Array(a.length);for(let e=0;e]+>/g,""),t=t.replace(/^\s*]*>\s*]*>(?:\s*)?/i,""),t=t.replace(/(?:\s*)?<\/body>\s*<\/html>\s*$/i,""),"INLINE"!==n){const e=t||r;if(-1!==e.indexOf("\x3c!-- wp:"))return En(e)}var s;if(String.prototype.normalize&&(t=t.normalize()),!r||t&&!function(e){return!/<(?!br[ />])/i.test(e)}(t)||(t=r,/^\s+$/.test(r)||(s=t,t=oa.makeHtml(function(e){return e.replace(/((?:^|\n)```)([^\n`]+)(```(?:$|\n))/,((e,t,r,n)=>`${t}\n${r}\n${n}`))}(s))),"AUTO"===n&&-1===r.indexOf("\n")&&0!==r.indexOf("

")&&0===t.indexOf("

")&&(n="INLINE")),"INLINE"===n)return pa(t,i);const c=In(t),l=c.length>1;if("AUTO"===n&&!l&&function(e,t){const r=document.implementation.createHTMLDocument("");r.body.innerHTML=e;const n=Array.from(r.body.children);return!n.some(Kn)&&Gn(n,t)}(t,a))return pa(t,i);const u=(0,_e.getPhrasingContentSchema)("paste"),d=Vn("paste"),p=(0,o.compact)((0,o.flatMap)(c,(e=>{if("string"!=typeof e)return e;const t=[sa,Xn,Yn,Mn,ra,Wn,Pn,Un,ia,zn,Dn,na],r={...d,...u};return e=Rn(e,t,d),e=Rn(e=An(e=(0,_e.removeInvalidHTML)(e,r)),[ca,la,ua],d),da.log("Processed HTML piece:\n\n",e),Nn(e)})));if("AUTO"===n&&1===p.length&&Fe(p[0].name,"__unstablePasteTextInline",!1)){const e=r.replace(/^[\n]+|[\n]+$/g,"");if(""!==e&&-1===e.indexOf("\n"))return(0,_e.removeInvalidHTML)(dr(p[0]),u)}return p}function fa(){return(0,a.select)(Qt).getCategories()}function ga(e){(0,a.dispatch)(Qt).setCategories(e)}function ma(e,t){(0,a.dispatch)(Qt).updateCategory(e,t)}function ba(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,o.every)(t,((t,r)=>{let[n,,a]=t;const o=e[r];return n===o.name&&ba(o.innerBlocks,a)}))}function _a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?(0,o.map)(t,((t,r)=>{let[n,a,i]=t;const s=e[r];if(s&&s.name===n){const e=_a(s.innerBlocks,i);return{...s,innerBlocks:e}}const c=He(n),l=(e,t)=>(0,o.mapValues)(t,((t,r)=>u(e[r],t))),u=(e,t)=>{return r=e,"html"===(0,o.get)(r,["source"])&&(0,o.isArray)(t)?(0,be.renderToString)(t):(e=>"query"===(0,o.get)(e,["source"]))(e)&&t?t.map((t=>l(e.query,t))):t;var r},d=l((0,o.get)(c,["attributes"],{}),a);let[p,h]=tn(n,d);return void 0===He(p)&&(h={originalName:n,originalContent:"",originalUndelimitedContent:""},p="core/missing"),lt(p,h,_a([],i))})):e}function ka(){return ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t{})),Ta=(0,ya.createHigherOrderComponent)((e=>t=>(0,be.createElement)(wa,null,(r=>(0,be.createElement)(e,ka({},t,{BlockContent:r}))))),"withBlockContentContext")}(),(window.wp=window.wp||{}).blocks=n}(); \ No newline at end of file diff --git a/wp-includes/js/dist/components.js b/wp-includes/js/dist/components.js index f13624e0a4..19e04159f7 100644 --- a/wp-includes/js/dist/components.js +++ b/wp-includes/js/dist/components.js @@ -1738,7 +1738,7 @@ module.exports = defineProperties; /***/ }), -/***/ 8110: +/***/ 7767: /***/ (function(module) { "use strict"; @@ -1768,7 +1768,7 @@ module.exports = function contains(other) { /***/ }), -/***/ 6789: +/***/ 8950: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -1776,7 +1776,7 @@ module.exports = function contains(other) { var define = __webpack_require__(9170); -var implementation = __webpack_require__(8110); +var implementation = __webpack_require__(7767); var getPolyfill = __webpack_require__(8267); var polyfill = getPolyfill(); var shim = __webpack_require__(714); @@ -1802,7 +1802,7 @@ module.exports = boundContains; "use strict"; -var implementation = __webpack_require__(8110); +var implementation = __webpack_require__(7767); module.exports = function getPolyfill() { if (typeof document !== 'undefined') { @@ -3001,7 +3001,7 @@ module.exports = function GetIntrinsic(name, allowMissing) { /***/ }), -/***/ 5371: +/***/ 5077: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -5134,7 +5134,7 @@ module.exports = now; /***/ }), -/***/ 8172: +/***/ 3372: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var debounce = __webpack_require__(6897), @@ -6468,7 +6468,7 @@ var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _moment = __webpack_require__(6292); @@ -6950,7 +6950,7 @@ var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _moment = __webpack_require__(6292); @@ -6962,7 +6962,7 @@ var _getPhrasePropTypes = __webpack_require__(2893); var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); -var _CalendarWeek = __webpack_require__(4604); +var _CalendarWeek = __webpack_require__(7160); var _CalendarWeek2 = _interopRequireDefault(_CalendarWeek); @@ -7356,7 +7356,7 @@ var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _moment = __webpack_require__(6292); @@ -7887,7 +7887,7 @@ exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref) { /***/ }), -/***/ 4604: +/***/ 7160: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -8081,7 +8081,7 @@ var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _moment = __webpack_require__(6292); @@ -8588,13 +8588,13 @@ var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowComp var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _moment = __webpack_require__(6292); var _moment2 = _interopRequireDefault(_moment); -var _throttle = __webpack_require__(8172); +var _throttle = __webpack_require__(3372); var _throttle2 = _interopRequireDefault(_throttle); @@ -10167,7 +10167,7 @@ var _propTypes2 = _interopRequireDefault(_propTypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _defaultPhrases = __webpack_require__(6030); @@ -10674,7 +10674,7 @@ var _propTypes2 = _interopRequireDefault(_propTypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); var _defaultPhrases = __webpack_require__(6030); @@ -12034,7 +12034,7 @@ var _propTypes2 = _interopRequireDefault(_propTypes); var _airbnbPropTypes = __webpack_require__(4882); -var _reactWithStyles = __webpack_require__(3576); +var _reactWithStyles = __webpack_require__(9459); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } @@ -13812,7 +13812,7 @@ var _object = __webpack_require__(5861); var _object2 = _interopRequireDefault(_object); -var _document = __webpack_require__(6789); +var _document = __webpack_require__(8950); var _document2 = _interopRequireDefault(_document); @@ -14094,7 +14094,7 @@ var _arrayPrototype = __webpack_require__(116); var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype); -var _globalCache = __webpack_require__(5371); +var _globalCache = __webpack_require__(5077); var _globalCache2 = _interopRequireDefault(_globalCache); @@ -14359,7 +14359,7 @@ exports["default"] = { /***/ }), -/***/ 3576: +/***/ 9459: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -14712,7 +14712,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var ArrayCreate = __webpack_require__(3665); var Get = __webpack_require__(6448); var IsArray = __webpack_require__(5971); -var IsConstructor = __webpack_require__(4065); +var IsConstructor = __webpack_require__(5176); var IsIntegralNumber = __webpack_require__(485); var Type = __webpack_require__(9747); @@ -15133,7 +15133,7 @@ module.exports = __webpack_require__(4363); /***/ }), -/***/ 4065: +/***/ 5176: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; @@ -15245,7 +15245,7 @@ module.exports = $preventExtensions var abs = __webpack_require__(13); -var floor = __webpack_require__(5127); +var floor = __webpack_require__(961); var Type = __webpack_require__(9747); var $isNaN = __webpack_require__(3234); @@ -15443,7 +15443,7 @@ module.exports = function ToBoolean(value) { return !!value; }; var abs = __webpack_require__(13); -var floor = __webpack_require__(5127); +var floor = __webpack_require__(961); var ToNumber = __webpack_require__(5541); var $isNaN = __webpack_require__(3234); @@ -15719,7 +15719,7 @@ module.exports = function abs(x) { /***/ }), -/***/ 5127: +/***/ 961: /***/ (function(module) { "use strict"; @@ -17072,7 +17072,7 @@ function normalizePropsAreEqual(propsAreEqual) { -function createComponent_forwardRef(component) { +function forwardRef(component) { return /*#__PURE__*/(0,external_React_.forwardRef)(component); } @@ -17140,7 +17140,7 @@ function createComponent(_ref) { if (false) {} - Comp = createComponent_forwardRef(Comp); + Comp = forwardRef(Comp); if (shouldMemo) { Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual)); @@ -19746,7 +19746,7 @@ var Utility_assign = Object.assign * @return {number} */ function hash (value, length) { - return (((((((length << 2) ^ Utility_charat(value, 0)) << 2) ^ Utility_charat(value, 1)) << 2) ^ Utility_charat(value, 2)) << 2) ^ Utility_charat(value, 3) + return Utility_charat(value, 0) ^ 45 ? (((((((length << 2) ^ Utility_charat(value, 0)) << 2) ^ Utility_charat(value, 1)) << 2) ^ Utility_charat(value, 2)) << 2) ^ Utility_charat(value, 3) : 0 } /** @@ -19762,7 +19762,7 @@ function trim (value) { * @param {RegExp} pattern * @return {string?} */ -function match (value, pattern) { +function Utility_match (value, pattern) { return (value = pattern.exec(value)) ? value[0] : value } @@ -19772,7 +19772,7 @@ function match (value, pattern) { * @param {string} replacement * @return {string} */ -function replace (value, pattern, replacement) { +function Utility_replace (value, pattern, replacement) { return value.replace(pattern, replacement) } @@ -19866,7 +19866,7 @@ function node (value, root, parent, type, props, children, length) { * @param {object} props * @return {object} */ -function copy (root, props) { +function Tokenizer_copy (root, props) { return Utility_assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props) } @@ -20087,13 +20087,13 @@ function identifier (index) { } ;// CONCATENATED MODULE: ./node_modules/stylis/src/Enum.js -var MS = '-ms-' -var MOZ = '-moz-' -var WEBKIT = '-webkit-' +var Enum_MS = '-ms-' +var Enum_MOZ = '-moz-' +var Enum_WEBKIT = '-webkit-' var COMMENT = 'comm' var Enum_RULESET = 'rule' -var DECLARATION = 'decl' +var Enum_DECLARATION = 'decl' var PAGE = '@page' var MEDIA = '@media' @@ -20103,10 +20103,11 @@ var VIEWPORT = '@viewport' var SUPPORTS = '@supports' var DOCUMENT = '@document' var NAMESPACE = '@namespace' -var KEYFRAMES = '@keyframes' +var Enum_KEYFRAMES = '@keyframes' var FONT_FACE = '@font-face' var COUNTER_STYLE = '@counter-style' var FONT_FEATURE_VALUES = '@font-feature-values' +var LAYER = '@layer' ;// CONCATENATED MODULE: ./node_modules/stylis/src/Serializer.js @@ -20117,7 +20118,7 @@ var FONT_FEATURE_VALUES = '@font-feature-values' * @param {function} callback * @return {string} */ -function serialize (children, callback) { +function Serializer_serialize (children, callback) { var output = '' var length = Utility_sizeof(children) @@ -20136,134 +20137,14 @@ function serialize (children, callback) { */ function stringify (element, index, children, callback) { switch (element.type) { - case IMPORT: case DECLARATION: return element.return = element.return || element.value + case LAYER: if (element.children.length) break + case IMPORT: case Enum_DECLARATION: return element.return = element.return || element.value case COMMENT: return '' - case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}' + case Enum_KEYFRAMES: return element.return = element.value + '{' + Serializer_serialize(element.children, callback) + '}' case Enum_RULESET: element.value = element.props.join(',') } - return Utility_strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '' -} - -;// CONCATENATED MODULE: ./node_modules/stylis/src/Prefixer.js - - - -/** - * @param {string} value - * @param {number} length - * @return {string} - */ -function prefix (value, length) { - switch (hash(value, length)) { - // color-adjust - case 5103: - return WEBKIT + 'print-' + value + value - // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) - case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: - // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break - case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: - // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, - case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: - // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) - case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: - return WEBKIT + value + value - // appearance, user-select, transform, hyphens, text-size-adjust - case 5349: case 4246: case 4810: case 6968: case 2756: - return WEBKIT + value + MOZ + value + MS + value + value - // flex, flex-direction - case 6828: case 4268: - return WEBKIT + value + MS + value + value - // order - case 6165: - return WEBKIT + value + MS + 'flex-' + value + value - // align-items - case 5187: - return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value - // align-self - case 5443: - return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value - // align-content - case 4675: - return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value - // flex-shrink - case 5548: - return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value - // flex-basis - case 5292: - return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value - // flex-grow - case 6060: - return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value - // transition - case 4554: - return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value - // cursor - case 6187: - return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value - // background, background-image - case 5495: case 3959: - return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1') - // justify-content - case 4968: - return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value - // (margin|padding)-inline-(start|end) - case 4095: case 3583: case 4068: case 2532: - return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value - // (min|max)?(width|height|inline-size|block-size) - case 8116: case 7059: case 5753: case 5535: - case 5445: case 5701: case 4933: case 4677: - case 5533: case 5789: case 5021: case 4765: - // stretch, max-content, min-content, fill-available - if (Utility_strlen(value) - 1 - length > 6) - switch (Utility_charat(value, length + 1)) { - // (m)ax-content, (m)in-content - case 109: - // - - if (Utility_charat(value, length + 4) !== 45) - break - // (f)ill-available, (f)it-content - case 102: - return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (Utility_charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value - // (s)tretch - case 115: - return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value - } - break - // position: sticky - case 4949: - // (s)ticky? - if (Utility_charat(value, length + 1) !== 115) - break - // display: (flex|inline-flex) - case 6444: - switch (Utility_charat(value, Utility_strlen(value) - 3 - (~indexof(value, '!important') && 10))) { - // stic(k)y - case 107: - return replace(value, ':', ':' + WEBKIT) + value - // (inline-)?fl(e)x - case 101: - return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (Utility_charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value - } - break - // writing-mode - case 5936: - switch (Utility_charat(value, length + 11)) { - // vertical-l(r) - case 114: - return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value - // vertical-r(l) - case 108: - return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value - // horizontal(-)tb - case 45: - return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value - } - - return WEBKIT + value + MS + value + value - } - - return value + return Utility_strlen(children = Serializer_serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '' } ;// CONCATENATED MODULE: ./node_modules/stylis/src/Middleware.js @@ -20312,13 +20193,13 @@ function prefixer (element, index, children, callback) { if (element.length > -1) if (!element.return) switch (element.type) { - case DECLARATION: element.return = prefix(element.value, element.length) - break + case DECLARATION: element.return = prefix(element.value, element.length, children) + return case KEYFRAMES: return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback) - case Enum_RULESET: + case RULESET: if (element.length) - return Utility_combine(element.props, function (value) { + return combine(element.props, function (value) { switch (match(value, /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ':read-only': case ':read-write': @@ -20422,8 +20303,8 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl switch (previous = character, character = next()) { // ( case 40: - if (previous != 108 && characters.charCodeAt(length - 1) == 58) { - if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1) + if (previous != 108 && Utility_charat(characters, length - 1) == 58) { + if (indexof(characters += Utility_replace(delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1 break } @@ -20458,9 +20339,9 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl // \0 } case 0: case 125: scanning = 0 // ; - case 59 + offset: + case 59 + offset: if (ampersand == -1) characters = Utility_replace(characters, /\f/g, '') if (property > 0 && (Utility_strlen(characters) - length)) - Utility_append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations) + Utility_append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(Utility_replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations) break // @ ; case 59: characters += ';' @@ -20472,9 +20353,9 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children) else - switch (atrule) { - // d m s - case 100: case 109: case 115: + switch (atrule === 99 && Utility_charat(characters, 3) === 110 ? 100 : atrule) { + // d l m s + case 100: case 108: case 109: case 115: parse(value, reference, reference, rule && Utility_append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children) break default: @@ -20542,7 +20423,7 @@ function ruleset (value, root, parent, index, offset, rules, points, type, props for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = Utility_substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) - if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x]))) + if (z = trim(j > 0 ? rule[x] + ' ' + y : Utility_replace(y, /&\f/g, rule[x]))) props[k++] = z return node(value, root, parent, offset === 0 ? Enum_RULESET : type, props, children, length) @@ -20566,7 +20447,7 @@ function comment (value, root, parent) { * @return {object} */ function declaration (value, root, parent, length) { - return node(value, root, parent, DECLARATION, Utility_substr(value, 0, length), Utility_substr(value, length + 1, -1), length) + return node(value, root, parent, Enum_DECLARATION, Utility_substr(value, 0, length), Utility_substr(value, length + 1, -1), length) } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js @@ -20711,7 +20592,7 @@ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) { var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); if (unsafePseudoClasses) { - var isNested = element.parent === children[0]; // in nested rules comments become children of the "auto-inserted" rule + var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent` // // considering this input: // .a { @@ -20727,16 +20608,16 @@ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) { // .b {} // } - var commentContainer = isNested ? children[0].children : // global rule at the root level + var commentContainer = isNested ? element.parent.children : // global rule at the root level children; - for (var i = 0; i < commentContainer.length; i++) { + for (var i = commentContainer.length - 1; i >= 0; i--) { var node = commentContainer[i]; - if (node.line > element.line) { + if (node.line < element.line) { break; } // it is quite weird but comments are *usually* put at `column: element.column - 1` - // so we seek for the node that is later than the rule's `element` and check the previous element + // so we seek *from the end* for the node that is earlier than the rule's `element` and check that // this will also match inputs like this: // .a { // /* comm */ @@ -20753,10 +20634,8 @@ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) { // TODO: consider changing this comment placement in the next major version - if (node.column > element.column) { - var previousNode = commentContainer[i - 1]; - - if (isIgnoringComment(previousNode)) { + if (node.column < element.column) { + if (isIgnoringComment(node)) { return; } @@ -20810,14 +20689,226 @@ var incorrectImportAlarm = function incorrectImportAlarm(element, index, childre } }; -var defaultStylisPlugins = [prefixer]; +/* eslint-disable no-fallthrough */ + +function emotion_cache_browser_esm_prefix(value, length) { + switch (hash(value, length)) { + // color-adjust + case 5103: + return Enum_WEBKIT + 'print-' + value + value; + // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) + + case 5737: + case 4201: + case 3177: + case 3433: + case 1641: + case 4457: + case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break + + case 5572: + case 6356: + case 5844: + case 3191: + case 6645: + case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, + + case 6391: + case 5879: + case 5623: + case 6135: + case 4599: + case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) + + case 4215: + case 6389: + case 5109: + case 5365: + case 5621: + case 3829: + return Enum_WEBKIT + value + value; + // appearance, user-select, transform, hyphens, text-size-adjust + + case 5349: + case 4246: + case 4810: + case 6968: + case 2756: + return Enum_WEBKIT + value + Enum_MOZ + value + Enum_MS + value + value; + // flex, flex-direction + + case 6828: + case 4268: + return Enum_WEBKIT + value + Enum_MS + value + value; + // order + + case 6165: + return Enum_WEBKIT + value + Enum_MS + 'flex-' + value + value; + // align-items + + case 5187: + return Enum_WEBKIT + value + Utility_replace(value, /(\w+).+(:[^]+)/, Enum_WEBKIT + 'box-$1$2' + Enum_MS + 'flex-$1$2') + value; + // align-self + + case 5443: + return Enum_WEBKIT + value + Enum_MS + 'flex-item-' + Utility_replace(value, /flex-|-self/, '') + value; + // align-content + + case 4675: + return Enum_WEBKIT + value + Enum_MS + 'flex-line-pack' + Utility_replace(value, /align-content|flex-|-self/, '') + value; + // flex-shrink + + case 5548: + return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'shrink', 'negative') + value; + // flex-basis + + case 5292: + return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'basis', 'preferred-size') + value; + // flex-grow + + case 6060: + return Enum_WEBKIT + 'box-' + Utility_replace(value, '-grow', '') + Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'grow', 'positive') + value; + // transition + + case 4554: + return Enum_WEBKIT + Utility_replace(value, /([^-])(transform)/g, '$1' + Enum_WEBKIT + '$2') + value; + // cursor + + case 6187: + return Utility_replace(Utility_replace(Utility_replace(value, /(zoom-|grab)/, Enum_WEBKIT + '$1'), /(image-set)/, Enum_WEBKIT + '$1'), value, '') + value; + // background, background-image + + case 5495: + case 3959: + return Utility_replace(value, /(image-set\([^]*)/, Enum_WEBKIT + '$1' + '$`$1'); + // justify-content + + case 4968: + return Utility_replace(Utility_replace(value, /(.+:)(flex-)?(.*)/, Enum_WEBKIT + 'box-pack:$3' + Enum_MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + Enum_WEBKIT + value + value; + // (margin|padding)-inline-(start|end) + + case 4095: + case 3583: + case 4068: + case 2532: + return Utility_replace(value, /(.+)-inline(.+)/, Enum_WEBKIT + '$1$2') + value; + // (min|max)?(width|height|inline-size|block-size) + + case 8116: + case 7059: + case 5753: + case 5535: + case 5445: + case 5701: + case 4933: + case 4677: + case 5533: + case 5789: + case 5021: + case 4765: + // stretch, max-content, min-content, fill-available + if (Utility_strlen(value) - 1 - length > 6) switch (Utility_charat(value, length + 1)) { + // (m)ax-content, (m)in-content + case 109: + // - + if (Utility_charat(value, length + 4) !== 45) break; + // (f)ill-available, (f)it-content + + case 102: + return Utility_replace(value, /(.+:)(.+)-([^]+)/, '$1' + Enum_WEBKIT + '$2-$3' + '$1' + Enum_MOZ + (Utility_charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value; + // (s)tretch + + case 115: + return ~indexof(value, 'stretch') ? emotion_cache_browser_esm_prefix(Utility_replace(value, 'stretch', 'fill-available'), length) + value : value; + } + break; + // position: sticky + + case 4949: + // (s)ticky? + if (Utility_charat(value, length + 1) !== 115) break; + // display: (flex|inline-flex) + + case 6444: + switch (Utility_charat(value, Utility_strlen(value) - 3 - (~indexof(value, '!important') && 10))) { + // stic(k)y + case 107: + return Utility_replace(value, ':', ':' + Enum_WEBKIT) + value; + // (inline-)?fl(e)x + + case 101: + return Utility_replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + Enum_WEBKIT + (Utility_charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + Enum_WEBKIT + '$2$3' + '$1' + Enum_MS + '$2box$3') + value; + } + + break; + // writing-mode + + case 5936: + switch (Utility_charat(value, length + 11)) { + // vertical-l(r) + case 114: + return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value; + // vertical-r(l) + + case 108: + return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value; + // horizontal(-)tb + + case 45: + return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value; + } + + return Enum_WEBKIT + value + Enum_MS + value + value; + } + + return value; +} + +var emotion_cache_browser_esm_prefixer = function prefixer(element, index, children, callback) { + if (element.length > -1) if (!element["return"]) switch (element.type) { + case Enum_DECLARATION: + element["return"] = emotion_cache_browser_esm_prefix(element.value, element.length); + break; + + case Enum_KEYFRAMES: + return Serializer_serialize([Tokenizer_copy(element, { + value: Utility_replace(element.value, '@', '@' + Enum_WEBKIT) + })], callback); + + case Enum_RULESET: + if (element.length) return Utility_combine(element.props, function (value) { + switch (Utility_match(value, /(::plac\w+|:read-\w+)/)) { + // :read-(only|write) + case ':read-only': + case ':read-write': + return Serializer_serialize([Tokenizer_copy(element, { + props: [Utility_replace(value, /:(read-\w+)/, ':' + Enum_MOZ + '$1')] + })], callback); + // :placeholder + + case '::placeholder': + return Serializer_serialize([Tokenizer_copy(element, { + props: [Utility_replace(value, /:(plac\w+)/, ':' + Enum_WEBKIT + 'input-$1')] + }), Tokenizer_copy(element, { + props: [Utility_replace(value, /:(plac\w+)/, ':' + Enum_MOZ + '$1')] + }), Tokenizer_copy(element, { + props: [Utility_replace(value, /:(plac\w+)/, Enum_MS + 'input-$1')] + })], callback); + } + + return ''; + }); + } +}; + +var defaultStylisPlugins = [emotion_cache_browser_esm_prefixer]; var createCache = function createCache(options) { var key = options.key; if (false) {} - if ( key === 'css') { + if (key === 'css') { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be) // note this very very intentionally targets all style elements regardless of the key to ensure @@ -20877,7 +20968,7 @@ var createCache = function createCache(options) { var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); var stylis = function stylis(styles) { - return serialize(compile(styles), serializer); + return Serializer_serialize(compile(styles), serializer); }; _insert = function insert(selector, serialized, sheet, shouldCache) { @@ -20912,7 +21003,7 @@ var createCache = function createCache(options) { return cache; }; -/* harmony default export */ var emotion_cache_browser_esm = (createCache); + ;// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/emotion-hash.esm.js /* eslint-disable */ @@ -20969,11 +21060,12 @@ function murmur2(str) { return ((h ^ h >>> 15) >>> 0).toString(36); } -/* harmony default export */ var emotion_hash_esm = (murmur2); + ;// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js var unitlessKeys = { animationIterationCount: 1, + aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, @@ -21021,7 +21113,7 @@ var unitlessKeys = { strokeWidth: 1 }; -/* harmony default export */ var emotion_unitless_esm = (unitlessKeys); + ;// CONCATENATED MODULE: ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js function memoize(fn) { @@ -21032,7 +21124,7 @@ function memoize(fn) { }; } -/* harmony default export */ var emotion_memoize_esm = (memoize); + ;// CONCATENATED MODULE: ./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js @@ -21052,7 +21144,7 @@ var isProcessableValue = function isProcessableValue(value) { return value != null && typeof value !== 'boolean'; }; -var processStyleName = /* #__PURE__ */emotion_memoize_esm(function (styleName) { +var processStyleName = /* #__PURE__ */memoize(function (styleName) { return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase(); }); @@ -21074,7 +21166,7 @@ var processStyleValue = function processStyleValue(key, value) { } } - if (emotion_unitless_esm[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { + if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { return value + 'px'; } @@ -21270,7 +21362,7 @@ var emotion_serialize_browser_esm_serializeStyles = function serializeStyles(arg match[1]; } - var name = emotion_hash_esm(styles) + identifierName; + var name = murmur2(styles) + identifierName; if (false) {} @@ -21283,7 +21375,20 @@ var emotion_serialize_browser_esm_serializeStyles = function serializeStyles(arg -;// CONCATENATED MODULE: ./node_modules/@emotion/react/dist/emotion-element-cbed451f.browser.esm.js +;// CONCATENATED MODULE: ./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js + + +var syncFallback = function syncFallback(create) { + return create(); +}; + +var useInsertionEffect = external_React_['useInsertion' + 'Effect'] ? external_React_['useInsertion' + 'Effect'] : false; +var emotion_use_insertion_effect_with_fallbacks_browser_esm_useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback; +var emotion_use_insertion_effect_with_fallbacks_browser_esm_useInsertionEffectWithLayoutFallback = useInsertionEffect || external_React_.useLayoutEffect; + + + +;// CONCATENATED MODULE: ./node_modules/@emotion/react/dist/emotion-element-43c6fea0.browser.esm.js @@ -21293,15 +21398,17 @@ var emotion_serialize_browser_esm_serializeStyles = function serializeStyles(arg -var emotion_element_cbed451f_browser_esm_hasOwnProperty = {}.hasOwnProperty; -var EmotionCacheContext = /* #__PURE__ */(0,external_React_.createContext)( // we're doing this to avoid preconstruct's dead code elimination in this one case +var isBrowser = "object" !== 'undefined'; +var emotion_element_43c6fea0_browser_esm_hasOwn = {}.hasOwnProperty; + +var EmotionCacheContext = /* #__PURE__ */external_React_.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway -typeof HTMLElement !== 'undefined' ? /* #__PURE__ */emotion_cache_browser_esm({ +typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({ key: 'css' }) : null); @@ -21312,7 +21419,7 @@ var __unsafe_useEmotionCache = function useEmotionCache() { return (0,external_React_.useContext)(EmotionCacheContext); }; -var emotion_element_cbed451f_browser_esm_withEmotionCache = function withEmotionCache(func) { +var emotion_element_43c6fea0_browser_esm_withEmotionCache = function withEmotionCache(func) { // $FlowFixMe return /*#__PURE__*/(0,external_React_.forwardRef)(function (props, ref) { // the cache will never be null in the browser @@ -21321,12 +21428,36 @@ var emotion_element_cbed451f_browser_esm_withEmotionCache = function withEmotion }); }; -var emotion_element_cbed451f_browser_esm_ThemeContext = /* #__PURE__ */(0,external_React_.createContext)({}); +if (!isBrowser) { + emotion_element_43c6fea0_browser_esm_withEmotionCache = function withEmotionCache(func) { + return function (props) { + var cache = (0,external_React_.useContext)(EmotionCacheContext); + + if (cache === null) { + // yes, we're potentially creating this on every render + // it doesn't actually matter though since it's only on the server + // so there will only every be a single render + // that could change in the future because of suspense and etc. but for now, + // this works and i don't want to optimise for a future thing that we aren't sure about + cache = createCache({ + key: 'css' + }); + return /*#__PURE__*/external_React_.createElement(EmotionCacheContext.Provider, { + value: cache + }, func(props, cache)); + } else { + return func(props, cache); + } + }; + }; +} + +var emotion_element_43c6fea0_browser_esm_ThemeContext = /* #__PURE__ */external_React_.createContext({}); if (false) {} var useTheme = function useTheme() { - return useContext(emotion_element_cbed451f_browser_esm_ThemeContext); + return React.useContext(emotion_element_43c6fea0_browser_esm_ThemeContext); }; var getTheme = function getTheme(outerTheme, theme) { @@ -21349,13 +21480,13 @@ var createCacheWithTheme = /* #__PURE__ */(/* unused pure expression or super */ }); }))); var ThemeProvider = function ThemeProvider(props) { - var theme = useContext(emotion_element_cbed451f_browser_esm_ThemeContext); + var theme = React.useContext(emotion_element_43c6fea0_browser_esm_ThemeContext); if (props.theme !== theme) { theme = createCacheWithTheme(theme)(props.theme); } - return /*#__PURE__*/createElement(emotion_element_cbed451f_browser_esm_ThemeContext.Provider, { + return /*#__PURE__*/React.createElement(emotion_element_43c6fea0_browser_esm_ThemeContext.Provider, { value: theme }, props.children); }; @@ -21363,15 +21494,15 @@ function withTheme(Component) { var componentName = Component.displayName || Component.name || 'Component'; var render = function render(props, ref) { - var theme = useContext(emotion_element_cbed451f_browser_esm_ThemeContext); - return /*#__PURE__*/createElement(Component, _extends({ + var theme = React.useContext(emotion_element_43c6fea0_browser_esm_ThemeContext); + return /*#__PURE__*/React.createElement(Component, _extends({ theme: theme, ref: ref }, props)); }; // $FlowFixMe - var WithTheme = /*#__PURE__*/forwardRef(render); + var WithTheme = /*#__PURE__*/React.forwardRef(render); WithTheme.displayName = "WithTheme(" + componentName + ")"; return hoistNonReactStatics(WithTheme, Component); } @@ -21419,23 +21550,15 @@ var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) { return undefined; }; -var useInsertionEffect = external_React_['useInsertion' + 'Effect'] ? external_React_['useInsertion' + 'Effect'] : function useInsertionEffect(create) { - create(); -}; -function emotion_element_cbed451f_browser_esm_useInsertionEffectMaybe(create) { - - useInsertionEffect(create); -} - var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__'; var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__'; -var emotion_element_cbed451f_browser_esm_createEmotionProps = function createEmotionProps(type, props) { +var emotion_element_43c6fea0_browser_esm_createEmotionProps = function createEmotionProps(type, props) { if (false) {} var newProps = {}; for (var key in props) { - if (emotion_element_cbed451f_browser_esm_hasOwnProperty.call(props, key)) { + if (emotion_element_43c6fea0_browser_esm_hasOwn.call(props, key)) { newProps[key] = props[key]; } } @@ -21453,14 +21576,14 @@ var Insertion = function Insertion(_ref) { serialized = _ref.serialized, isStringTag = _ref.isStringTag; registerStyles(cache, serialized, isStringTag); - var rules = emotion_element_cbed451f_browser_esm_useInsertionEffectMaybe(function () { + useInsertionEffectAlwaysWithSyncFallback(function () { return insertStyles(cache, serialized, isStringTag); }); return null; }; -var emotion_element_cbed451f_browser_esm_Emotion = /* #__PURE__ */(/* unused pure expression or super */ null && (emotion_element_cbed451f_browser_esm_withEmotionCache(function (props, cache, ref) { +var emotion_element_43c6fea0_browser_esm_Emotion = /* #__PURE__ */(/* unused pure expression or super */ null && (emotion_element_43c6fea0_browser_esm_withEmotionCache(function (props, cache, ref) { var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works // not passing the registered cache to serializeStyles because it would // make certain babel optimisations not possible @@ -21479,7 +21602,7 @@ var emotion_element_cbed451f_browser_esm_Emotion = /* #__PURE__ */(/* unused pur className = props.className + " "; } - var serialized = serializeStyles(registeredStyles, undefined, useContext(emotion_element_cbed451f_browser_esm_ThemeContext)); + var serialized = serializeStyles(registeredStyles, undefined, React.useContext(emotion_element_43c6fea0_browser_esm_ThemeContext)); if (false) { var labelFromStack; } @@ -21487,26 +21610,28 @@ var emotion_element_cbed451f_browser_esm_Emotion = /* #__PURE__ */(/* unused pur var newProps = {}; for (var key in props) { - if (emotion_element_cbed451f_browser_esm_hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( true || 0)) { + if (emotion_element_43c6fea0_browser_esm_hasOwn.call(props, key) && key !== 'css' && key !== typePropName && ( true || 0)) { newProps[key] = props[key]; } } newProps.ref = ref; newProps.className = className; - return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, { + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, { cache: cache, serialized: serialized, isStringTag: typeof WrappedComponent === 'string' - }), /*#__PURE__*/createElement(WrappedComponent, newProps)); + }), /*#__PURE__*/React.createElement(WrappedComponent, newProps)); }))); if (false) {} +var Emotion$1 = (/* unused pure expression or super */ null && (emotion_element_43c6fea0_browser_esm_Emotion)); + ;// CONCATENATED MODULE: ./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js -var isBrowser = "object" !== 'undefined'; +var emotion_utils_browser_esm_isBrowser = "object" !== 'undefined'; function emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) { var rawClassName = ''; classNames.split(' ').forEach(function (className) { @@ -21530,7 +21655,7 @@ var emotion_utils_browser_esm_insertStyles = function insertStyles(cache, serial // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser - isBrowser === false ) && cache.registered[className] === undefined) { + emotion_utils_browser_esm_isBrowser === false ) && cache.registered[className] === undefined) { cache.registered[className] = serialized.styles; } @@ -21548,7 +21673,7 @@ var emotion_utils_browser_esm_insertStyles = function insertStyles(cache, serial ;// CONCATENATED MODULE: ./node_modules/@emotion/css/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js -var emotion_utils_browser_esm_isBrowser = "object" !== 'undefined'; +var dist_emotion_utils_browser_esm_isBrowser = "object" !== 'undefined'; function dist_emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) { var rawClassName = ''; classNames.split(' ').forEach(function (className) { @@ -21572,7 +21697,7 @@ var emotion_utils_browser_esm_registerStyles = function registerStyles(cache, se // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser - emotion_utils_browser_esm_isBrowser === false ) && cache.registered[className] === undefined) { + dist_emotion_utils_browser_esm_isBrowser === false ) && cache.registered[className] === undefined) { cache.registered[className] = serialized.styles; } }; @@ -21584,7 +21709,7 @@ var dist_emotion_utils_browser_esm_insertStyles = function insertStyles(cache, s var current = serialized; do { - var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); + cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); current = current.next; } while (current !== undefined); @@ -21616,7 +21741,7 @@ function merge(registered, css, className) { } var createEmotion = function createEmotion(options) { - var cache = emotion_cache_browser_esm(options); // $FlowFixMe + var cache = createCache(options); // $FlowFixMe cache.sheet.speedy = function (value) { if (false) {} @@ -21735,7 +21860,7 @@ var emotion_css_create_instance_esm_classnames = function classnames(args) { return cls; }; -/* harmony default export */ var emotion_css_create_instance_esm = (createEmotion); + ;// CONCATENATED MODULE: ./node_modules/@emotion/css/dist/emotion-css.esm.js @@ -21743,7 +21868,7 @@ var emotion_css_create_instance_esm_classnames = function classnames(args) { -var _createEmotion = emotion_css_create_instance_esm({ +var _createEmotion = createEmotion({ key: 'css' }), flush = _createEmotion.flush, @@ -22025,9 +22150,9 @@ const visuallyHidden = { ;// CONCATENATED MODULE: ./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js -var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 +var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 -var isPropValid = /* #__PURE__ */emotion_memoize_esm(function (prop) { +var isPropValid = /* #__PURE__ */memoize(function (prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 @@ -22037,10 +22162,10 @@ var isPropValid = /* #__PURE__ */emotion_memoize_esm(function (prop) { /* Z+1 */ ); -/* harmony default export */ var emotion_is_prop_valid_esm = (isPropValid); + ;// CONCATENATED MODULE: ./node_modules/@emotion/styled/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js -var dist_emotion_utils_browser_esm_isBrowser = "object" !== 'undefined'; +var utils_dist_emotion_utils_browser_esm_isBrowser = "object" !== 'undefined'; function utils_dist_emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) { var rawClassName = ''; classNames.split(' ').forEach(function (className) { @@ -22064,7 +22189,7 @@ var dist_emotion_utils_browser_esm_registerStyles = function registerStyles(cach // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser - dist_emotion_utils_browser_esm_isBrowser === false ) && cache.registered[className] === undefined) { + utils_dist_emotion_utils_browser_esm_isBrowser === false ) && cache.registered[className] === undefined) { cache.registered[className] = serialized.styles; } }; @@ -22076,7 +22201,7 @@ var utils_dist_emotion_utils_browser_esm_insertStyles = function insertStyles(ca var current = serialized; do { - var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); + cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); current = current.next; } while (current !== undefined); @@ -22094,7 +22219,7 @@ var utils_dist_emotion_utils_browser_esm_insertStyles = function insertStyles(ca -var testOmitPropsOnStringTag = emotion_is_prop_valid_esm; +var testOmitPropsOnStringTag = isPropValid; var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) { return key !== 'theme'; @@ -22123,14 +22248,6 @@ var composeShouldForwardProps = function composeShouldForwardProps(tag, options, return shouldForwardProp; }; -var emotion_styled_base_browser_esm_useInsertionEffect = external_React_['useInsertion' + 'Effect'] ? external_React_['useInsertion' + 'Effect'] : function useInsertionEffect(create) { - create(); -}; -function emotion_styled_base_browser_esm_useInsertionEffectMaybe(create) { - - emotion_styled_base_browser_esm_useInsertionEffect(create); -} - var emotion_styled_base_browser_esm_ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; var emotion_styled_base_browser_esm_Insertion = function Insertion(_ref) { @@ -22138,7 +22255,7 @@ var emotion_styled_base_browser_esm_Insertion = function Insertion(_ref) { serialized = _ref.serialized, isStringTag = _ref.isStringTag; dist_emotion_utils_browser_esm_registerStyles(cache, serialized, isStringTag); - var rules = emotion_styled_base_browser_esm_useInsertionEffectMaybe(function () { + emotion_use_insertion_effect_with_fallbacks_browser_esm_useInsertionEffectAlwaysWithSyncFallback(function () { return utils_dist_emotion_utils_browser_esm_insertStyles(cache, serialized, isStringTag); }); @@ -22186,7 +22303,7 @@ var createStyled = function createStyled(tag, options) { } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class - var Styled = emotion_element_cbed451f_browser_esm_withEmotionCache(function (props, cache, ref) { + var Styled = emotion_element_43c6fea0_browser_esm_withEmotionCache(function (props, cache, ref) { var FinalTag = shouldUseAs && props.as || baseTag; var className = ''; var classInterpolations = []; @@ -22199,7 +22316,7 @@ var createStyled = function createStyled(tag, options) { mergedProps[key] = props[key]; } - mergedProps.theme = (0,external_React_.useContext)(emotion_element_cbed451f_browser_esm_ThemeContext); + mergedProps.theme = external_React_.useContext(emotion_element_43c6fea0_browser_esm_ThemeContext); } if (typeof props.className === 'string') { @@ -22229,11 +22346,11 @@ var createStyled = function createStyled(tag, options) { newProps.className = className; newProps.ref = ref; - return /*#__PURE__*/(0,external_React_.createElement)(external_React_.Fragment, null, /*#__PURE__*/(0,external_React_.createElement)(emotion_styled_base_browser_esm_Insertion, { + return /*#__PURE__*/external_React_.createElement(external_React_.Fragment, null, /*#__PURE__*/external_React_.createElement(emotion_styled_base_browser_esm_Insertion, { cache: cache, serialized: serialized, isStringTag: typeof FinalTag === 'string' - }), /*#__PURE__*/(0,external_React_.createElement)(FinalTag, newProps)); + }), /*#__PURE__*/external_React_.createElement(FinalTag, newProps)); }); Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")"; Styled.defaultProps = tag.defaultProps; @@ -22260,7 +22377,7 @@ var createStyled = function createStyled(tag, options) { }; }; -/* harmony default export */ var emotion_styled_base_browser_esm = (createStyled); + ;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/view/component.js @@ -22289,7 +22406,7 @@ var createStyled = function createStyled(tag, options) { * @type {import('../ui/context').WordPressComponent<'div', { children?: import('react').ReactNode }, true>} */ // @ts-ignore -const View = emotion_styled_base_browser_esm("div", true ? { +const View = createStyled("div", true ? { target: "em57xhy0" } : 0)( true ? "" : 0); @@ -22995,7 +23112,7 @@ const memoizedCreateCacheWithContainer = memize_default()(container => { } uuidCache.add(key); - return emotion_cache_browser_esm({ + return createCache({ container, key }); @@ -24339,7 +24456,7 @@ var hoist_non_react_statics_cjs = __webpack_require__(1281); var pkg = { name: "@emotion/react", - version: "11.10.0", + version: "11.11.4", main: "dist/emotion-react.cjs.js", module: "dist/emotion-react.esm.js", browser: { @@ -24352,6 +24469,7 @@ var pkg = { browser: "./dist/emotion-react.browser.esm.js", "default": "./dist/emotion-react.esm.js" }, + "import": "./dist/emotion-react.cjs.mjs", "default": "./dist/emotion-react.cjs.js" }, "./jsx-runtime": { @@ -24360,6 +24478,7 @@ var pkg = { browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js", "default": "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js" }, + "import": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs", "default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js" }, "./_isolated-hnrs": { @@ -24368,6 +24487,7 @@ var pkg = { browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js", "default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js" }, + "import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs", "default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js" }, "./jsx-dev-runtime": { @@ -24376,11 +24496,18 @@ var pkg = { browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js", "default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js" }, + "import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs", "default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js" }, "./package.json": "./package.json", "./types/css-prop": "./types/css-prop.d.ts", - "./macro": "./macro.js" + "./macro": { + types: { + "import": "./macro.d.mts", + "default": "./macro.d.ts" + }, + "default": "./macro.js" + } }, types: "types/index.d.ts", files: [ @@ -24390,9 +24517,7 @@ var pkg = { "jsx-dev-runtime", "_isolated-hnrs", "types/*.d.ts", - "macro.js", - "macro.d.ts", - "macro.js.flow" + "macro.*" ], sideEffects: false, author: "Emotion Contributors", @@ -24402,32 +24527,28 @@ var pkg = { }, dependencies: { "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.10.0", - "@emotion/cache": "^11.10.0", - "@emotion/serialize": "^1.1.0", - "@emotion/utils": "^1.2.0", - "@emotion/weak-memoize": "^0.3.0", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/cache": "^11.11.0", + "@emotion/serialize": "^1.1.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", "hoist-non-react-statics": "^3.3.1" }, peerDependencies: { - "@babel/core": "^7.0.0", react: ">=16.8.0" }, peerDependenciesMeta: { - "@babel/core": { - optional: true - }, "@types/react": { optional: true } }, devDependencies: { - "@babel/core": "^7.18.5", "@definitelytyped/dtslint": "0.0.112", - "@emotion/css": "11.10.0", - "@emotion/css-prettifier": "1.1.0", - "@emotion/server": "11.10.0", - "@emotion/styled": "11.10.0", + "@emotion/css": "11.11.2", + "@emotion/css-prettifier": "1.1.3", + "@emotion/server": "11.11.0", + "@emotion/styled": "11.11.0", "html-tag-names": "^1.1.2", react: "16.14.0", "svg-tag-names": "^1.1.1", @@ -24453,7 +24574,13 @@ var pkg = { ], extra: { "./types/css-prop": "./types/css-prop.d.ts", - "./macro": "./macro.js" + "./macro": { + types: { + "import": "./macro.d.mts", + "default": "./macro.d.ts" + }, + "default": "./macro.js" + } } } } @@ -24462,9 +24589,9 @@ var pkg = { var jsx = function jsx(type, props) { var args = arguments; - if (props == null || !hasOwnProperty.call(props, 'css')) { + if (props == null || !hasOwn.call(props, 'css')) { // $FlowFixMe - return createElement.apply(undefined, args); + return React.createElement.apply(undefined, args); } var argsLength = args.length; @@ -24477,10 +24604,9 @@ var jsx = function jsx(type, props) { } // $FlowFixMe - return createElement.apply(null, createElementArgArray); + return React.createElement.apply(null, createElementArgArray); }; -var emotion_react_browser_esm_useInsertionEffect = external_React_['useInsertion' + 'Effect'] ? external_React_['useInsertion' + 'Effect'] : external_React_.useLayoutEffect; var warnedAboutCssPropForGlobal = false; // maintain place over rerenders. // initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild // initial client-side render from SSR, use place of hydrating tag @@ -24489,14 +24615,42 @@ var Global = /* #__PURE__ */(/* unused pure expression or super */ null && (with if (false) {} var styles = props.styles; - var serialized = serializeStyles([styles], undefined, useContext(ThemeContext)); + var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext)); + + if (!isBrowser$1) { + var _ref; + + var serializedNames = serialized.name; + var serializedStyles = serialized.styles; + var next = serialized.next; + + while (next !== undefined) { + serializedNames += ' ' + next.name; + serializedStyles += next.styles; + next = next.next; + } + + var shouldCache = cache.compat === true; + var rules = cache.insert("", { + name: serializedNames, + styles: serializedStyles + }, cache.sheet, shouldCache); + + if (shouldCache) { + return null; + } + + return /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = { + __html: rules + }, _ref.nonce = cache.sheet.nonce, _ref)); + } // yes, i know these hooks are used conditionally // but it is based on a constant that will never change at runtime // it's effectively like having two implementations and switching them out // so it's not actually breaking anything - var sheetRef = useRef(); - emotion_react_browser_esm_useInsertionEffect(function () { + var sheetRef = React.useRef(); + useInsertionEffectWithLayoutFallback(function () { var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675 var sheet = new cache.sheet.constructor({ @@ -24525,7 +24679,7 @@ var Global = /* #__PURE__ */(/* unused pure expression or super */ null && (with sheet.flush(); }; }, [cache]); - emotion_react_browser_esm_useInsertionEffect(function () { + useInsertionEffectWithLayoutFallback(function () { var sheetRefCurrent = sheetRef.current; var sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1]; @@ -24639,10 +24793,10 @@ function emotion_react_browser_esm_merge(registered, css, className) { var emotion_react_browser_esm_Insertion = function Insertion(_ref) { var cache = _ref.cache, serializedArr = _ref.serializedArr; - var rules = useInsertionEffectMaybe(function () { + useInsertionEffectAlwaysWithSyncFallback(function () { for (var i = 0; i < serializedArr.length; i++) { - var res = insertStyles(cache, serializedArr[i], false); + insertStyles(cache, serializedArr[i], false); } }); @@ -24680,11 +24834,11 @@ var ClassNames = /* #__PURE__ */(/* unused pure expression or super */ null && ( var content = { css: css, cx: cx, - theme: useContext(ThemeContext) + theme: React.useContext(ThemeContext) }; var ele = props.children(content); hasRendered = true; - return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(emotion_react_browser_esm_Insertion, { + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(emotion_react_browser_esm_Insertion, { cache: cache, serializedArr: serializedArr }), ele); @@ -24692,7 +24846,7 @@ var ClassNames = /* #__PURE__ */(/* unused pure expression or super */ null && ( if (false) {} -if (false) { var globalKey, globalContext, isJest, emotion_react_browser_esm_isBrowser; } +if (false) { var globalKey, globalContext, isTestEnv, emotion_react_browser_esm_isBrowser; } @@ -24976,10 +25130,10 @@ const rootSize = _ref2 => { return /*#__PURE__*/emotion_react_browser_esm_css("grid-template-rows:repeat( 3, calc( ", size, "px / 3 ) );width:", size, "px;" + ( true ? "" : 0), true ? "" : 0); }; -const Root = emotion_styled_base_browser_esm("div", true ? { +const Root = createStyled("div", true ? { target: "e1od1u4s3" } : 0)(rootBase, ";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;", rootSize, ";" + ( true ? "" : 0)); -const Row = emotion_styled_base_browser_esm("div", true ? { +const Row = createStyled("div", true ? { target: "e1od1u4s2" } : 0)( true ? { name: "1x5gbbj", @@ -24999,10 +25153,10 @@ const pointActive = _ref3 => { const pointBase = props => { return /*#__PURE__*/emotion_react_browser_esm_css("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;", reduceMotion('transition'), " ", pointActive(props), ";" + ( true ? "" : 0), true ? "" : 0); }; -const Point = emotion_styled_base_browser_esm("span", true ? { +const Point = createStyled("span", true ? { target: "e1od1u4s1" } : 0)("height:6px;width:6px;", pointBase, ";" + ( true ? "" : 0)); -const Cell = emotion_styled_base_browser_esm("span", true ? { +const Cell = createStyled("span", true ? { target: "e1od1u4s0" } : 0)( true ? { name: "rjf3ub", @@ -26718,13 +26872,13 @@ const rootPointerEvents = _ref => { }, true ? "" : 0, true ? "" : 0); }; -const Wrapper = emotion_styled_base_browser_esm("div", true ? { +const Wrapper = createStyled("div", true ? { target: "elqsdmc2" } : 0)( true ? { name: "ogl07i", styles: "box-sizing:border-box;padding:2px" } : 0); -const alignment_matrix_control_icon_styles_Root = emotion_styled_base_browser_esm("div", true ? { +const alignment_matrix_control_icon_styles_Root = createStyled("div", true ? { target: "elqsdmc1" } : 0)("transform-origin:top left;height:100%;width:100%;", rootBase, ";", alignment_matrix_control_icon_styles_rootSize, ";", rootPointerEvents, ";" + ( true ? "" : 0)); @@ -26736,7 +26890,7 @@ const alignment_matrix_control_icon_styles_pointActive = _ref2 => { return /*#__PURE__*/emotion_react_browser_esm_css("box-shadow:", boxShadow, ";color:currentColor;*:hover>&{color:currentColor;}" + ( true ? "" : 0), true ? "" : 0); }; -const alignment_matrix_control_icon_styles_Point = emotion_styled_base_browser_esm("span", true ? { +const alignment_matrix_control_icon_styles_Point = createStyled("span", true ? { target: "elqsdmc0" } : 0)("height:2px;width:2px;", pointBase, ";", alignment_matrix_control_icon_styles_pointActive, ";" + ( true ? "" : 0)); const alignment_matrix_control_icon_styles_Cell = Cell; @@ -37883,7 +38037,7 @@ const rootLabelPositionStyles = _ref8 => { } }; -const input_control_styles_Root = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const input_control_styles_Root = /*#__PURE__*/createStyled(flex_component, true ? { target: "em5sgkm7" } : 0)("position:relative;border-radius:2px;padding-top:0;", rootFocusedStyles, " ", rootLabelPositionStyles, ";" + ( true ? "" : 0)); @@ -37934,7 +38088,7 @@ const containerWidthStyles = _ref11 => { }, true ? "" : 0, true ? "" : 0); }; -const Container = emotion_styled_base_browser_esm("div", true ? { +const Container = createStyled("div", true ? { target: "em5sgkm6" } : 0)("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;", containerDisabledStyles, " ", containerMarginStyles, " ", containerWidthStyles, ";" + ( true ? "" : 0)); @@ -38015,7 +38169,7 @@ const dragStyles = _ref15 => { // https://github.com/WordPress/gutenberg/issues/18483 -const Input = emotion_styled_base_browser_esm("input", true ? { +const Input = createStyled("input", true ? { target: "em5sgkm5" } : 0)("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:", COLORS.black, ";display:block;font-family:inherit;margin:0;outline:none;width:100%;", dragStyles, " ", disabledStyles, " ", fontSizeStyles, " ", sizeStyles, " &::-webkit-input-placeholder{line-height:normal;}}" + ( true ? "" : 0)); @@ -38037,14 +38191,14 @@ const labelMargin = _ref16 => { }, true ? "" : 0, true ? "" : 0); }; -const BaseLabel = /*#__PURE__*/emotion_styled_base_browser_esm(text_component, true ? { +const BaseLabel = /*#__PURE__*/createStyled(text_component, true ? { target: "em5sgkm4" } : 0)("&&&{box-sizing:border-box;color:currentColor;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;", labelMargin, " overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}" + ( true ? "" : 0)); const Label = props => (0,external_wp_element_namespaceObject.createElement)(BaseLabel, extends_extends({}, props, { as: "label" })); -const LabelWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(flex_item_component, true ? { +const LabelWrapper = /*#__PURE__*/createStyled(flex_item_component, true ? { target: "em5sgkm3" } : 0)( true ? { name: "1b6uupn", @@ -38075,18 +38229,18 @@ const backdropFocusedStyles = _ref17 => { }, true ? "" : 0, true ? "" : 0); }; -const BackdropUI = emotion_styled_base_browser_esm("div", true ? { +const BackdropUI = createStyled("div", true ? { target: "em5sgkm2" } : 0)("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;", backdropFocusedStyles, " ", rtl({ paddingLeft: 2 }), ";}" + ( true ? "" : 0)); -const Prefix = emotion_styled_base_browser_esm("span", true ? { +const Prefix = createStyled("span", true ? { target: "em5sgkm1" } : 0)( true ? { name: "pvvbxf", styles: "box-sizing:border-box;display:block" } : 0); -const Suffix = emotion_styled_base_browser_esm("span", true ? { +const Suffix = createStyled("span", true ? { target: "em5sgkm0" } : 0)( true ? { name: "jgf79h", @@ -38250,8 +38404,8 @@ function InputBase(_ref, ref) { } /* harmony default export */ var input_base = ((0,external_wp_element_namespaceObject.forwardRef)(InputBase)); -;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/maths-b2a210f4.esm.js -function maths_b2a210f4_esm_clamp(v, min, max) { +;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.js +function maths_0ab39ae9_esm_clamp(v, min, max) { return Math.max(min, Math.min(v, max)); } const V = { @@ -38259,34 +38413,27 @@ const V = { if (v === undefined) v = fallback; return Array.isArray(v) ? v : [v, v]; }, - add(v1, v2) { return [v1[0] + v2[0], v1[1] + v2[1]]; }, - sub(v1, v2) { return [v1[0] - v2[0], v1[1] - v2[1]]; }, - addTo(v1, v2) { v1[0] += v2[0]; v1[1] += v2[1]; }, - subTo(v1, v2) { v1[0] -= v2[0]; v1[1] -= v2[1]; } - }; - function rubberband(distance, dimension, constant) { if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance, constant * 5); return distance * dimension * constant / (dimension + constant * distance); } - function rubberbandIfOutOfBounds(position, min, max, constant = 0.15) { - if (constant === 0) return maths_b2a210f4_esm_clamp(position, min, max); + if (constant === 0) return maths_0ab39ae9_esm_clamp(position, min, max); if (position < min) return -rubberband(min - position, max - min, constant) + min; if (position > max) return +rubberband(position - max, max - min, constant) + max; return position; @@ -38298,10 +38445,27 @@ function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) { -;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/actions-aeda4790.esm.js +;// CONCATENATED MODULE: ./node_modules/@use-gesture/core/dist/actions-fe213e88.esm.js -function actions_aeda4790_esm_defineProperty(obj, key, value) { +function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); +} + +function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); +} + +function actions_fe213e88_esm_defineProperty(obj, key, value) { + key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, @@ -38312,34 +38476,29 @@ function actions_aeda4790_esm_defineProperty(obj, key, value) { } else { obj[key] = value; } - return obj; } -function actions_aeda4790_esm_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - +function actions_fe213e88_esm_ownKeys(e, r) { + var t = Object.keys(e); if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); } - - return keys; + return t; } - -function actions_aeda4790_esm_objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? actions_aeda4790_esm_ownKeys(Object(source), !0).forEach(function (key) { - actions_aeda4790_esm_defineProperty(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : actions_aeda4790_esm_ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); +function actions_fe213e88_esm_objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? actions_fe213e88_esm_ownKeys(Object(t), !0).forEach(function (r) { + actions_fe213e88_esm_defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : actions_fe213e88_esm_ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } - - return target; + return e; } const EVENT_TYPE_MAP = { @@ -38364,18 +38523,14 @@ const EVENT_TYPE_MAP = { end: 'end' } }; - function capitalize(string) { if (!string) return ''; return string[0].toUpperCase() + string.slice(1); } - const actionsWithoutCaptureSupported = ['enter', 'leave']; - function hasCapture(capture = false, actionKey) { return capture && !actionsWithoutCaptureSupported.includes(actionKey); } - function toHandlerProp(device, action = '', capture = false) { const deviceProps = EVENT_TYPE_MAP[device]; const actionKey = deviceProps ? deviceProps[action] || action : action; @@ -38408,36 +38563,34 @@ function getPointerType(event) { if ('pointerType' in event) return event.pointerType; return 'mouse'; } - function getCurrentTargetTouchList(event) { return Array.from(event.touches).filter(e => { var _event$currentTarget, _event$currentTarget$; - - return e.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e.target)); + return e.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e.target)); }); } - function getTouchList(event) { return event.type === 'touchend' || event.type === 'touchcancel' ? event.changedTouches : event.targetTouches; } - function getValueEvent(event) { return isTouch(event) ? getTouchList(event)[0] : event; } - function distanceAngle(P1, P2) { - const dx = P2.clientX - P1.clientX; - const dy = P2.clientY - P1.clientY; - const cx = (P2.clientX + P1.clientX) / 2; - const cy = (P2.clientY + P1.clientY) / 2; - const distance = Math.hypot(dx, dy); - const angle = -(Math.atan2(dx, dy) * 180) / Math.PI; - const origin = [cx, cy]; - return { - angle, - distance, - origin - }; + try { + const dx = P2.clientX - P1.clientX; + const dy = P2.clientY - P1.clientY; + const cx = (P2.clientX + P1.clientX) / 2; + const cy = (P2.clientY + P1.clientY) / 2; + const distance = Math.hypot(dx, dy); + const angle = -(Math.atan2(dx, dy) * 180) / Math.PI; + const origin = [cx, cy]; + return { + angle, + distance, + origin + }; + } catch (_unused) {} + return null; } function touchIds(event) { return getCurrentTargetTouchList(event).map(touch => touch.identifier); @@ -38462,7 +38615,6 @@ function wheelValues(event) { deltaY, deltaMode } = event; - if (deltaMode === 1) { deltaX *= LINE_HEIGHT; deltaY *= LINE_HEIGHT; @@ -38470,12 +38622,10 @@ function wheelValues(event) { deltaX *= PAGE_HEIGHT; deltaY *= PAGE_HEIGHT; } - return [deltaX, deltaY]; } function scrollValues(event) { var _ref, _ref2; - const { scrollX, scrollY, @@ -38487,7 +38637,6 @@ function scrollValues(event) { function getEventDetails(event) { const payload = {}; if ('buttons' in event) payload.buttons = event.buttons; - if ('shiftKey' in event) { const { shiftKey, @@ -38502,7 +38651,6 @@ function getEventDetails(event) { ctrlKey }); } - return payload; } @@ -38519,11 +38667,9 @@ function chain(...fns) { if (fns.length === 1) return fns[0]; return function () { let result; - for (const fn of fns) { result = fn.apply(this, arguments) || result; } - return result; }; } @@ -38537,7 +38683,6 @@ class Engine { this.ctrl = ctrl; this.args = args; this.key = key; - if (!this.state) { this.state = {}; this.computeValues([0, 0]); @@ -38546,39 +38691,30 @@ class Engine { this.reset(); } } - get state() { return this.ctrl.state[this.key]; } - set state(state) { this.ctrl.state[this.key] = state; } - get shared() { return this.ctrl.state.shared; } - get eventStore() { return this.ctrl.gestureEventStores[this.key]; } - get timeoutStore() { return this.ctrl.gestureTimeoutStores[this.key]; } - get config() { return this.ctrl.config[this.key]; } - get sharedConfig() { return this.ctrl.config.shared; } - get handler() { return this.ctrl.handlers[this.key]; } - reset() { const { state, @@ -38597,7 +38733,7 @@ class Engine { state.args = args; state.axis = undefined; state.memo = undefined; - state.elapsedTime = 0; + state.elapsedTime = state.timeDelta = 0; state.direction = [0, 0]; state.distance = [0, 0]; state.overflow = [0, 0]; @@ -38607,11 +38743,9 @@ class Engine { state.delta = [0, 0]; state.timeStamp = 0; } - start(event) { const state = this.state; const config = this.config; - if (!state._active) { this.reset(); this.computeInitial(); @@ -38620,23 +38754,19 @@ class Engine { state.currentTarget = event.currentTarget; state.lastOffset = config.from ? call(config.from, state) : state.offset; state.offset = state.lastOffset; + state.startTime = state.timeStamp = event.timeStamp; } - - state.startTime = state.timeStamp = event.timeStamp; } - computeValues(values) { const state = this.state; state._values = values; state.values = this.config.transform(values); } - computeInitial() { const state = this.state; state._initial = state._values; state.initial = state.values; } - compute(event) { const { state, @@ -38645,7 +38775,6 @@ class Engine { } = this; state.args = this.args; let dt = 0; - if (event) { state.event = event; if (config.preventDefault && event.cancelable) state.event.preventDefault(); @@ -38658,13 +38787,10 @@ class Engine { state.timeStamp = event.timeStamp; state.elapsedTime = state.timeStamp - state.startTime; } - if (state._active) { const _absoluteDelta = state._delta.map(Math.abs); - V.addTo(state._distance, _absoluteDelta); } - if (this.axisIntent) this.axisIntent(event); const [_m0, _m1] = state._movement; const [t0, t1] = config.threshold; @@ -38672,7 +38798,6 @@ class Engine { _step, values } = state; - if (config.hasCustomTransform) { if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && values[0]; if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && values[1]; @@ -38680,11 +38805,9 @@ class Engine { if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && Math.sign(_m0) * t0; if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && Math.sign(_m1) * t1; } - state.intentional = _step[0] !== false || _step[1] !== false; if (!state.intentional) return; const movement = [0, 0]; - if (config.hasCustomTransform) { const [v0, v1] = values; movement[0] = _step[0] !== false ? v0 - _step[0] : 0; @@ -38693,27 +38816,22 @@ class Engine { movement[0] = _step[0] !== false ? _m0 - _step[0] : 0; movement[1] = _step[1] !== false ? _m1 - _step[1] : 0; } - if (this.restrictToAxis && !state._blocked) this.restrictToAxis(movement); const previousOffset = state.offset; const gestureIsActive = state._active && !state._blocked || state.active; - if (gestureIsActive) { state.first = state._active && !state.active; state.last = !state._active && state.active; state.active = shared[this.ingKey] = state._active; - if (event) { if (state.first) { if ('bounds' in config) state._bounds = call(config.bounds, state); if (this.setup) this.setup(); } - state.movement = movement; this.computeOffset(); } } - const [ox, oy] = state.offset; const [[x0, x1], [y0, y1]] = state._bounds; state.overflow = [ox < x0 ? -1 : ox > x1 ? 1 : 0, oy < y0 ? -1 : oy > y1 ? 1 : 0]; @@ -38723,105 +38841,86 @@ class Engine { state.offset = computeRubberband(state._bounds, state.offset, rubberband); state.delta = V.sub(state.offset, previousOffset); this.computeMovement(); - if (gestureIsActive && (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY)) { state.delta = V.sub(state.offset, previousOffset); const absoluteDelta = state.delta.map(Math.abs); V.addTo(state.distance, absoluteDelta); state.direction = state.delta.map(Math.sign); state._direction = state._delta.map(Math.sign); - if (!state.first && dt > 0) { state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt]; + state.timeDelta = dt; } } } - emit() { const state = this.state; const shared = this.shared; const config = this.config; if (!state._active) this.clean(); if ((state._blocked || !state.intentional) && !state._force && !config.triggerAllEvents) return; - const memo = this.handler(actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, shared), state), {}, { + const memo = this.handler(actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, shared), state), {}, { [this.aliasKey]: state.values })); if (memo !== undefined) state.memo = memo; } - clean() { this.eventStore.clean(); this.timeoutStore.clean(); } - } function selectAxis([dx, dy], threshold) { const absDx = Math.abs(dx); const absDy = Math.abs(dy); - if (absDx > absDy && absDx > threshold) { return 'x'; } - if (absDy > absDx && absDy > threshold) { return 'y'; } - return undefined; } - class CoordinatesEngine extends Engine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "aliasKey", 'xy'); + actions_fe213e88_esm_defineProperty(this, "aliasKey", 'xy'); } - reset() { super.reset(); this.state.axis = undefined; } - init() { this.state.offset = [0, 0]; this.state.lastOffset = [0, 0]; } - computeOffset() { this.state.offset = V.add(this.state.lastOffset, this.state.movement); } - computeMovement() { this.state.movement = V.sub(this.state.offset, this.state.lastOffset); } - axisIntent(event) { const state = this.state; const config = this.config; - if (!state.axis && event) { const threshold = typeof config.axisThreshold === 'object' ? config.axisThreshold[getPointerType(event)] : config.axisThreshold; state.axis = selectAxis(state._movement, threshold); } - state._blocked = (config.lockDirection || !!config.axis) && !state.axis || !!config.axis && config.axis !== state.axis; } - restrictToAxis(v) { if (this.config.axis || this.config.lockDirection) { switch (this.state.axis) { case 'x': v[1] = 0; break; - case 'y': v[0] = 0; break; } } } - } const identity = v => v; @@ -38830,80 +38929,62 @@ const commonConfigResolver = { enabled(value = true) { return value; }, - eventOptions(value, _k, config) { - return actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, config.shared.eventOptions), value); + return actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, config.shared.eventOptions), value); }, - preventDefault(value = false) { return value; }, - triggerAllEvents(value = false) { return value; }, - rubberband(value = 0) { switch (value) { case true: return [DEFAULT_RUBBERBAND, DEFAULT_RUBBERBAND]; - case false: return [0, 0]; - default: return V.toVector(value); } }, - from(value) { if (typeof value === 'function') return value; if (value != null) return V.toVector(value); }, - transform(value, _k, config) { const transform = value || config.shared.transform; this.hasCustomTransform = !!transform; - if (false) {} - return transform || identity; }, - threshold(value) { return V.toVector(value, 0); } - }; - if (false) {} const DEFAULT_AXIS_THRESHOLD = 0; -const coordinatesConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, commonConfigResolver), {}, { +const coordinatesConfigResolver = actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, commonConfigResolver), {}, { axis(_v, _k, { axis }) { this.lockDirection = axis === 'lock'; if (!this.lockDirection) return axis; }, - axisThreshold(value = DEFAULT_AXIS_THRESHOLD) { return value; }, - bounds(value = {}) { if (typeof value === 'function') { return state => coordinatesConfigResolver.bounds(value(state)); } - if ('current' in value) { return () => value.current; } - if (typeof HTMLElement === 'function' && value instanceof HTMLElement) { return value; } - const { left = -Infinity, right = Infinity, @@ -38912,23 +38993,19 @@ const coordinatesConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aed } = value; return [[left, right], [top, bottom]]; } - }); -const DISPLACEMENT = 10; const KEYS_DELTA_MAP = { - ArrowRight: (factor = 1) => [DISPLACEMENT * factor, 0], - ArrowLeft: (factor = 1) => [-DISPLACEMENT * factor, 0], - ArrowUp: (factor = 1) => [0, -DISPLACEMENT * factor], - ArrowDown: (factor = 1) => [0, DISPLACEMENT * factor] + ArrowRight: (displacement, factor = 1) => [displacement * factor, 0], + ArrowLeft: (displacement, factor = 1) => [-1 * displacement * factor, 0], + ArrowUp: (displacement, factor = 1) => [0, -1 * displacement * factor], + ArrowDown: (displacement, factor = 1) => [0, displacement * factor] }; class DragEngine extends CoordinatesEngine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "ingKey", 'dragging'); + actions_fe213e88_esm_defineProperty(this, "ingKey", 'dragging'); } - reset() { super.reset(); const state = this.state; @@ -38942,13 +39019,10 @@ class DragEngine extends CoordinatesEngine { state.canceled = false; state.cancel = this.cancel.bind(this); } - setup() { const state = this.state; - if (state._bounds instanceof HTMLElement) { const boundRect = state._bounds.getBoundingClientRect(); - const targetRect = state.currentTarget.getBoundingClientRect(); const _bounds = { left: boundRect.left - targetRect.left + state.offset[0], @@ -38959,7 +39033,6 @@ class DragEngine extends CoordinatesEngine { state._bounds = coordinatesConfigResolver.bounds(_bounds); } } - cancel() { const state = this.state; if (state.canceled) return; @@ -38970,28 +39043,23 @@ class DragEngine extends CoordinatesEngine { this.emit(); }, 0); } - setActive() { this.state._active = this.state._pointerActive || this.state._keyboardActive; } - clean() { this.pointerClean(); this.state._pointerActive = false; this.state._keyboardActive = false; super.clean(); } - pointerDown(event) { const config = this.config; const state = this.state; if (event.buttons != null && (Array.isArray(config.pointerButtons) ? !config.pointerButtons.includes(event.buttons) : config.pointerButtons !== -1 && config.pointerButtons !== event.buttons)) return; const ctrlIds = this.ctrl.setEventIds(event); - if (config.pointerCapture) { event.target.setPointerCapture(event.pointerId); } - if (ctrlIds && ctrlIds.size > 1 && state._pointerActive) return; this.start(event); this.setupPointer(event); @@ -38999,13 +39067,11 @@ class DragEngine extends CoordinatesEngine { state._pointerActive = true; this.computeValues(pointerValues(event)); this.computeInitial(); - if (config.preventScrollAxis && getPointerType(event) !== 'mouse') { state._active = false; this.setupScrollPrevention(event); } else if (config.delay > 0) { this.setupDelayTrigger(event); - if (config.triggerAllEvents) { this.compute(event); this.emit(); @@ -39014,7 +39080,6 @@ class DragEngine extends CoordinatesEngine { this.startPointerDrag(event); } } - startPointerDrag(event) { const state = this.state; state._active = true; @@ -39023,34 +39088,27 @@ class DragEngine extends CoordinatesEngine { this.compute(event); this.emit(); } - pointerMove(event) { const state = this.state; const config = this.config; if (!state._pointerActive) return; - if (state.type === event.type && event.timeStamp === state.timeStamp) return; const id = pointerId(event); if (state._pointerId !== undefined && id !== state._pointerId) return; - const _values = pointerValues(event); - if (document.pointerLockElement === event.target) { state._delta = [event.movementX, event.movementY]; } else { state._delta = V.sub(_values, state._values); this.computeValues(_values); } - V.addTo(state._movement, state._delta); this.compute(event); - if (state._delayed && state.intentional) { this.timeoutStore.remove('dragDelay'); state.active = false; this.startPointerDrag(event); return; } - if (config.preventScrollAxis && !state._preventScroll) { if (state.axis) { if (state.axis === config.preventScrollAxis || config.preventScrollAxis === 'xy') { @@ -39066,13 +39124,10 @@ class DragEngine extends CoordinatesEngine { return; } } - this.emit(); } - pointerUp(event) { this.ctrl.setEventIds(event); - try { if (this.config.pointerCapture && event.target.hasPointerCapture(event.pointerId)) { ; @@ -39081,7 +39136,6 @@ class DragEngine extends CoordinatesEngine { } catch (_unused) { if (false) {} } - const state = this.state; const config = this.config; if (!state._active || !state._pointerActive) return; @@ -39092,62 +39146,52 @@ class DragEngine extends CoordinatesEngine { this.compute(event); const [dx, dy] = state._distance; state.tap = dx <= config.tapsThreshold && dy <= config.tapsThreshold; - if (state.tap && config.filterTaps) { state._force = true; } else { - const [dirx, diry] = state.direction; - const [vx, vy] = state.velocity; - const [mx, my] = state.movement; + const [_dx, _dy] = state._delta; + const [_mx, _my] = state._movement; const [svx, svy] = config.swipe.velocity; const [sx, sy] = config.swipe.distance; const sdt = config.swipe.duration; - if (state.elapsedTime < sdt) { - if (Math.abs(vx) > svx && Math.abs(mx) > sx) state.swipe[0] = dirx; - if (Math.abs(vy) > svy && Math.abs(my) > sy) state.swipe[1] = diry; + const _vx = Math.abs(_dx / state.timeDelta); + const _vy = Math.abs(_dy / state.timeDelta); + if (_vx > svx && Math.abs(_mx) > sx) state.swipe[0] = Math.sign(_dx); + if (_vy > svy && Math.abs(_my) > sy) state.swipe[1] = Math.sign(_dy); } } - this.emit(); } - pointerClick(event) { if (!this.state.tap && event.detail > 0) { event.preventDefault(); event.stopPropagation(); } } - setupPointer(event) { const config = this.config; const device = config.device; - if (false) {} - if (config.pointerLock) { event.currentTarget.requestPointerLock(); } - if (!config.pointerCapture) { this.eventStore.add(this.sharedConfig.window, device, 'change', this.pointerMove.bind(this)); this.eventStore.add(this.sharedConfig.window, device, 'end', this.pointerUp.bind(this)); this.eventStore.add(this.sharedConfig.window, device, 'cancel', this.pointerUp.bind(this)); } } - pointerClean() { if (this.config.pointerLock && document.pointerLockElement === this.state.currentTarget) { document.exitPointerLock(); } } - preventScroll(event) { if (this.state._preventScroll && event.cancelable) { event.preventDefault(); } } - setupScrollPrevention(event) { this.state._preventScroll = false; persistEvent(event); @@ -39158,7 +39202,6 @@ class DragEngine extends CoordinatesEngine { this.eventStore.add(this.sharedConfig.window, 'touch', 'cancel', remove); this.timeoutStore.add('startPointerDrag', this.startPointerDrag.bind(this), this.config.preventScrollDelay, event); } - setupDelayTrigger(event) { this.state._delayed = true; this.timeoutStore.add('dragDelay', () => { @@ -39166,22 +39209,19 @@ class DragEngine extends CoordinatesEngine { this.startPointerDrag(event); }, this.config.delay); } - keyDown(event) { const deltaFn = KEYS_DELTA_MAP[event.key]; - if (deltaFn) { const state = this.state; const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1; this.start(event); - state._delta = deltaFn(factor); + state._delta = deltaFn(this.config.keyboardDisplacement, factor); state._keyboardActive = true; V.addTo(state._movement, state._delta); this.compute(event); this.emit(); } } - keyUp(event) { if (!(event.key in KEYS_DELTA_MAP)) return; this.state._keyboardActive = false; @@ -39189,23 +39229,19 @@ class DragEngine extends CoordinatesEngine { this.compute(event); this.emit(); } - bind(bindFunction) { const device = this.config.device; bindFunction(device, 'start', this.pointerDown.bind(this)); - if (this.config.pointerCapture) { bindFunction(device, 'change', this.pointerMove.bind(this)); bindFunction(device, 'end', this.pointerUp.bind(this)); bindFunction(device, 'cancel', this.pointerUp.bind(this)); bindFunction('lostPointerCapture', '', this.pointerUp.bind(this)); } - if (this.config.keys) { bindFunction('key', 'down', this.keyDown.bind(this)); bindFunction('key', 'up', this.keyUp.bind(this)); } - if (this.config.filterTaps) { bindFunction('click', '', this.pointerClick.bind(this), { capture: true, @@ -39213,31 +39249,24 @@ class DragEngine extends CoordinatesEngine { }); } } - } - function persistEvent(event) { 'persist' in event && typeof event.persist === 'function' && event.persist(); } -const actions_aeda4790_esm_isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement; - -function actions_aeda4790_esm_supportsTouchEvents() { - return actions_aeda4790_esm_isBrowser && 'ontouchstart' in window; +const actions_fe213e88_esm_isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement; +function actions_fe213e88_esm_supportsTouchEvents() { + return actions_fe213e88_esm_isBrowser && 'ontouchstart' in window; } - function isTouchScreen() { - return actions_aeda4790_esm_supportsTouchEvents() || actions_aeda4790_esm_isBrowser && window.navigator.maxTouchPoints > 1; + return actions_fe213e88_esm_supportsTouchEvents() || actions_fe213e88_esm_isBrowser && window.navigator.maxTouchPoints > 1; } - -function actions_aeda4790_esm_supportsPointerEvents() { - return actions_aeda4790_esm_isBrowser && 'onpointerdown' in window; +function actions_fe213e88_esm_supportsPointerEvents() { + return actions_fe213e88_esm_isBrowser && 'onpointerdown' in window; } - function supportsPointerLock() { - return actions_aeda4790_esm_isBrowser && 'exitPointerLock' in window.document; + return actions_fe213e88_esm_isBrowser && 'exitPointerLock' in window.document; } - function supportsGestureEvents() { try { return 'constructor' in GestureEvent; @@ -39245,13 +39274,12 @@ function supportsGestureEvents() { return false; } } - const SUPPORT = { - isBrowser: actions_aeda4790_esm_isBrowser, + isBrowser: actions_fe213e88_esm_isBrowser, gesture: supportsGestureEvents(), - touch: isTouchScreen(), + touch: actions_fe213e88_esm_supportsTouchEvents(), touchscreen: isTouchScreen(), - pointer: actions_aeda4790_esm_supportsPointerEvents(), + pointer: actions_fe213e88_esm_supportsPointerEvents(), pointerLock: supportsPointerLock() }; @@ -39260,12 +39288,13 @@ const DEFAULT_DRAG_DELAY = 180; const DEFAULT_SWIPE_VELOCITY = 0.5; const DEFAULT_SWIPE_DISTANCE = 50; const DEFAULT_SWIPE_DURATION = 250; +const DEFAULT_KEYBOARD_DISPLACEMENT = 10; const DEFAULT_DRAG_AXIS_THRESHOLD = { mouse: 0, touch: 0, pen: 8 }; -const dragConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, coordinatesConfigResolver), {}, { +const dragConfigResolver = actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, coordinatesConfigResolver), {}, { device(_v, _k, { pointer: { touch = false, @@ -39280,7 +39309,6 @@ const dragConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_e if (SUPPORT.touch) return 'touch'; return 'mouse'; }, - preventScrollAxis(value, _k, { preventScroll }) { @@ -39288,21 +39316,17 @@ const dragConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_e if (!SUPPORT.touchscreen || preventScroll === false) return undefined; return value ? value : preventScroll !== undefined ? 'y' : undefined; }, - pointerCapture(_v, _k, { pointer: { capture = true, - buttons = 1 + buttons = 1, + keys = true } = {} }) { this.pointerButtons = buttons; + this.keys = keys; return !this.pointerLock && this.device === 'pointer' && capture; }, - - keys(value = true) { - return value; - }, - threshold(value, _k, { filterTaps = false, tapsThreshold = 3, @@ -39313,7 +39337,6 @@ const dragConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_e this.tapsThreshold = tapsThreshold; return threshold; }, - swipe({ velocity = DEFAULT_SWIPE_VELOCITY, distance = DEFAULT_SWIPE_DISTANCE, @@ -39325,46 +39348,51 @@ const dragConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_e duration }; }, - delay(value = 0) { switch (value) { case true: return DEFAULT_DRAG_DELAY; - case false: return 0; - default: return value; } }, - axisThreshold(value) { if (!value) return DEFAULT_DRAG_AXIS_THRESHOLD; - return actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value); + return actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value); + }, + keyboardDisplacement(value = DEFAULT_KEYBOARD_DISPLACEMENT) { + return value; } - }); - if (false) {} +function clampStateInternalMovementToBounds(state) { + const [ox, oy] = state.overflow; + const [dx, dy] = state._delta; + const [dirx, diry] = state._direction; + if (ox < 0 && dx > 0 && dirx < 0 || ox > 0 && dx < 0 && dirx > 0) { + state._movement[0] = state._movementBound[0]; + } + if (oy < 0 && dy > 0 && diry < 0 || oy > 0 && dy < 0 && diry > 0) { + state._movement[1] = state._movementBound[1]; + } +} + const SCALE_ANGLE_RATIO_INTENT_DEG = 30; const PINCH_WHEEL_RATIO = 100; class PinchEngine extends Engine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "ingKey", 'pinching'); - - actions_aeda4790_esm_defineProperty(this, "aliasKey", 'da'); + actions_fe213e88_esm_defineProperty(this, "ingKey", 'pinching'); + actions_fe213e88_esm_defineProperty(this, "aliasKey", 'da'); } - init() { this.state.offset = [1, 0]; this.state.lastOffset = [1, 0]; this.state._pointerEvents = new Map(); } - reset() { super.reset(); const state = this.state; @@ -39373,21 +39401,18 @@ class PinchEngine extends Engine { state.cancel = this.cancel.bind(this); state.turns = 0; } - computeOffset() { const { type, movement, lastOffset } = this.state; - if (type === 'wheel') { this.state.offset = V.add(movement, lastOffset); } else { this.state.offset = [(1 + movement[0]) * lastOffset[0], movement[1] + lastOffset[1]]; } } - computeMovement() { const { offset, @@ -39395,23 +39420,19 @@ class PinchEngine extends Engine { } = this.state; this.state.movement = [offset[0] / lastOffset[0], offset[1] - lastOffset[1]]; } - axisIntent() { const state = this.state; const [_m0, _m1] = state._movement; - if (!state.axis) { const axisMovementDifference = Math.abs(_m0) * SCALE_ANGLE_RATIO_INTENT_DEG - Math.abs(_m1); if (axisMovementDifference < 0) state.axis = 'angle';else if (axisMovementDifference > 0) state.axis = 'scale'; } } - restrictToAxis(v) { if (this.config.lockDirection) { if (this.state.axis === 'scale') v[1] = 0;else if (this.state.axis === 'angle') v[0] = 0; } } - cancel() { const state = this.state; if (state.canceled) return; @@ -39422,23 +39443,20 @@ class PinchEngine extends Engine { this.emit(); }, 0); } - touchStart(event) { this.ctrl.setEventIds(event); const state = this.state; const ctrlTouchIds = this.ctrl.touchIds; - if (state._active) { if (state._touchIds.every(id => ctrlTouchIds.has(id))) return; } - if (ctrlTouchIds.size < 2) return; this.start(event); state._touchIds = Array.from(ctrlTouchIds).slice(0, 2); const payload = touchDistanceAngle(event, state._touchIds); + if (!payload) return; this.pinchStart(event, payload); } - pointerStart(event) { if (event.buttons != null && event.buttons % 2 !== 1) return; this.ctrl.setEventIds(event); @@ -39446,21 +39464,18 @@ class PinchEngine extends Engine { const state = this.state; const _pointerEvents = state._pointerEvents; const ctrlPointerIds = this.ctrl.pointerIds; - if (state._active) { if (Array.from(_pointerEvents.keys()).every(id => ctrlPointerIds.has(id))) return; } - if (_pointerEvents.size < 2) { _pointerEvents.set(event.pointerId, event); } - if (state._pointerEvents.size < 2) return; this.start(event); const payload = distanceAngle(...Array.from(_pointerEvents.values())); + if (!payload) return; this.pinchStart(event, payload); } - pinchStart(event, payload) { const state = this.state; state.origin = payload.origin; @@ -39469,25 +39484,22 @@ class PinchEngine extends Engine { this.compute(event); this.emit(); } - touchMove(event) { if (!this.state._active) return; const payload = touchDistanceAngle(event, this.state._touchIds); + if (!payload) return; this.pinchMove(event, payload); } - pointerMove(event) { const _pointerEvents = this.state._pointerEvents; - if (_pointerEvents.has(event.pointerId)) { _pointerEvents.set(event.pointerId, event); } - if (!this.state._active) return; const payload = distanceAngle(...Array.from(_pointerEvents.values())); + if (!payload) return; this.pinchMove(event, payload); } - pinchMove(event, payload) { const state = this.state; const prev_a = state._values[1]; @@ -39501,39 +39513,31 @@ class PinchEngine extends Engine { this.compute(event); this.emit(); } - touchEnd(event) { this.ctrl.setEventIds(event); if (!this.state._active) return; - if (this.state._touchIds.some(id => !this.ctrl.touchIds.has(id))) { this.state._active = false; this.compute(event); this.emit(); } } - pointerEnd(event) { const state = this.state; this.ctrl.setEventIds(event); - try { event.target.releasePointerCapture(event.pointerId); } catch (_unused) {} - if (state._pointerEvents.has(event.pointerId)) { state._pointerEvents.delete(event.pointerId); } - if (!state._active) return; - if (state._pointerEvents.size < 2) { state._active = false; this.compute(event); this.emit(); } } - gestureStart(event) { if (event.cancelable) event.preventDefault(); const state = this.state; @@ -39544,7 +39548,6 @@ class PinchEngine extends Engine { this.compute(event); this.emit(); } - gestureMove(event) { if (event.cancelable) event.preventDefault(); if (!this.state._active) return; @@ -39557,70 +39560,62 @@ class PinchEngine extends Engine { this.compute(event); this.emit(); } - gestureEnd(event) { if (!this.state._active) return; this.state._active = false; this.compute(event); this.emit(); } - wheel(event) { const modifierKey = this.config.modifierKey; - if (modifierKey && !event[modifierKey]) return; + if (modifierKey && (Array.isArray(modifierKey) ? !modifierKey.find(k => event[k]) : !event[modifierKey])) return; if (!this.state._active) this.wheelStart(event);else this.wheelChange(event); this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this)); } - wheelStart(event) { this.start(event); this.wheelChange(event); } - wheelChange(event) { const isR3f = ('uv' in event); - if (!isR3f) { if (event.cancelable) { event.preventDefault(); } - if (false) {} } - const state = this.state; state._delta = [-wheelValues(event)[1] / PINCH_WHEEL_RATIO * state.offset[0], 0]; V.addTo(state._movement, state._delta); + clampStateInternalMovementToBounds(state); this.state.origin = [event.clientX, event.clientY]; this.compute(event); this.emit(); } - wheelEnd() { if (!this.state._active) return; this.state._active = false; this.compute(); this.emit(); } - bind(bindFunction) { const device = this.config.device; - if (!!device) { bindFunction(device, 'start', this[device + 'Start'].bind(this)); bindFunction(device, 'change', this[device + 'Move'].bind(this)); bindFunction(device, 'end', this[device + 'End'].bind(this)); bindFunction(device, 'cancel', this[device + 'End'].bind(this)); + bindFunction('lostPointerCapture', '', this[device + 'End'].bind(this)); + } + if (this.config.pinchOnWheel) { + bindFunction('wheel', '', this.wheel.bind(this), { + passive: false + }); } - - bindFunction('wheel', '', this.wheel.bind(this), { - passive: false - }); } - } -const pinchConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, commonConfigResolver), {}, { +const pinchConfigResolver = actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, commonConfigResolver), {}, { device(_v, _k, { shared, pointer: { @@ -39630,13 +39625,11 @@ const pinchConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_ const sharedConfig = shared; if (sharedConfig.target && !SUPPORT.touch && SUPPORT.gesture) return 'gesture'; if (SUPPORT.touch && touch) return 'touch'; - if (SUPPORT.touchscreen) { if (SUPPORT.pointer) return 'pointer'; if (SUPPORT.touch) return 'touch'; } }, - bounds(_v, _k, { scaleBounds = {}, angleBounds = {} @@ -39648,7 +39641,6 @@ const pinchConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_ }); return [D.min, D.max]; }; - const _angleBounds = state => { const A = assignDefault(call(angleBounds, state), { min: -Infinity, @@ -39656,37 +39648,33 @@ const pinchConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_ }); return [A.min, A.max]; }; - if (typeof scaleBounds !== 'function' && typeof angleBounds !== 'function') return [_scaleBounds(), _angleBounds()]; return state => [_scaleBounds(state), _angleBounds(state)]; }, - threshold(value, _k, config) { this.lockDirection = config.axis === 'lock'; const threshold = V.toVector(value, this.lockDirection ? [0.1, 3] : 0); return threshold; }, - modifierKey(value) { if (value === undefined) return 'ctrlKey'; return value; + }, + pinchOnWheel(value = true) { + return value; } - }); class MoveEngine extends CoordinatesEngine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "ingKey", 'moving'); + actions_fe213e88_esm_defineProperty(this, "ingKey", 'moving'); } - move(event) { if (this.config.mouseOnly && event.pointerType !== 'mouse') return; if (!this.state._active) this.moveStart(event);else this.moveChange(event); this.timeoutStore.add('moveEnd', this.moveEnd.bind(this)); } - moveStart(event) { this.start(event); this.computeValues(pointerValues(event)); @@ -39694,7 +39682,6 @@ class MoveEngine extends CoordinatesEngine { this.computeInitial(); this.emit(); } - moveChange(event) { if (!this.state._active) return; const values = pointerValues(event); @@ -39705,38 +39692,32 @@ class MoveEngine extends CoordinatesEngine { this.compute(event); this.emit(); } - moveEnd(event) { if (!this.state._active) return; this.state._active = false; this.compute(event); this.emit(); } - bind(bindFunction) { bindFunction('pointer', 'change', this.move.bind(this)); bindFunction('pointer', 'leave', this.moveEnd.bind(this)); } - } -const moveConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, coordinatesConfigResolver), {}, { +const moveConfigResolver = actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, coordinatesConfigResolver), {}, { mouseOnly: (value = true) => value }); class ScrollEngine extends CoordinatesEngine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "ingKey", 'scrolling'); + actions_fe213e88_esm_defineProperty(this, "ingKey", 'scrolling'); } - scroll(event) { if (!this.state._active) this.start(event); this.scrollChange(event); this.timeoutStore.add('scrollEnd', this.scrollEnd.bind(this)); } - scrollChange(event) { if (event.cancelable) event.preventDefault(); const state = this.state; @@ -39747,18 +39728,15 @@ class ScrollEngine extends CoordinatesEngine { this.compute(event); this.emit(); } - scrollEnd() { if (!this.state._active) return; this.state._active = false; this.compute(); this.emit(); } - bind(bindFunction) { bindFunction('scroll', '', this.scroll.bind(this)); } - } const scrollConfigResolver = coordinatesConfigResolver; @@ -39766,47 +39744,30 @@ const scrollConfigResolver = coordinatesConfigResolver; class WheelEngine extends CoordinatesEngine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "ingKey", 'wheeling'); + actions_fe213e88_esm_defineProperty(this, "ingKey", 'wheeling'); } - wheel(event) { if (!this.state._active) this.start(event); this.wheelChange(event); this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this)); } - wheelChange(event) { const state = this.state; state._delta = wheelValues(event); V.addTo(state._movement, state._delta); - const [ox, oy] = state.overflow; - const [dx, dy] = state._delta; - const [dirx, diry] = state._direction; - - if (ox < 0 && dx > 0 && dirx < 0 || ox > 0 && dx < 0 && dirx > 0) { - state._movement[0] = state._movementBound[0]; - } - - if (oy < 0 && dy > 0 && diry < 0 || oy > 0 && dy < 0 && diry > 0) { - state._movement[1] = state._movementBound[1]; - } - + clampStateInternalMovementToBounds(state); this.compute(event); this.emit(); } - wheelEnd() { if (!this.state._active) return; this.state._active = false; this.compute(); this.emit(); } - bind(bindFunction) { bindFunction('wheel', '', this.wheel.bind(this)); } - } const wheelConfigResolver = coordinatesConfigResolver; @@ -39814,10 +39775,8 @@ const wheelConfigResolver = coordinatesConfigResolver; class HoverEngine extends CoordinatesEngine { constructor(...args) { super(...args); - - actions_aeda4790_esm_defineProperty(this, "ingKey", 'hovering'); + actions_fe213e88_esm_defineProperty(this, "ingKey", 'hovering'); } - enter(event) { if (this.config.mouseOnly && event.pointerType !== 'mouse') return; this.start(event); @@ -39825,7 +39784,6 @@ class HoverEngine extends CoordinatesEngine { this.compute(event); this.emit(); } - leave(event) { if (this.config.mouseOnly && event.pointerType !== 'mouse') return; const state = this.state; @@ -39838,50 +39796,48 @@ class HoverEngine extends CoordinatesEngine { state.delta = state.movement; this.emit(); } - bind(bindFunction) { bindFunction('pointer', 'enter', this.enter.bind(this)); bindFunction('pointer', 'leave', this.leave.bind(this)); } - } -const hoverConfigResolver = actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, coordinatesConfigResolver), {}, { +const hoverConfigResolver = actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, coordinatesConfigResolver), {}, { mouseOnly: (value = true) => value }); -const actions_aeda4790_esm_EngineMap = new Map(); +const actions_fe213e88_esm_EngineMap = new Map(); const ConfigResolverMap = new Map(); -function actions_aeda4790_esm_registerAction(action) { - actions_aeda4790_esm_EngineMap.set(action.key, action.engine); +function actions_fe213e88_esm_registerAction(action) { + actions_fe213e88_esm_EngineMap.set(action.key, action.engine); ConfigResolverMap.set(action.key, action.resolver); } -const actions_aeda4790_esm_dragAction = { +const actions_fe213e88_esm_dragAction = { key: 'drag', engine: DragEngine, resolver: dragConfigResolver }; -const actions_aeda4790_esm_hoverAction = { +const actions_fe213e88_esm_hoverAction = { key: 'hover', engine: HoverEngine, resolver: hoverConfigResolver }; -const actions_aeda4790_esm_moveAction = { +const actions_fe213e88_esm_moveAction = { key: 'move', engine: MoveEngine, resolver: moveConfigResolver }; -const actions_aeda4790_esm_pinchAction = { +const actions_fe213e88_esm_pinchAction = { key: 'pinch', engine: PinchEngine, resolver: pinchConfigResolver }; -const actions_aeda4790_esm_scrollAction = { +const actions_fe213e88_esm_scrollAction = { key: 'scroll', engine: ScrollEngine, resolver: scrollConfigResolver }; -const actions_aeda4790_esm_wheelAction = { +const actions_fe213e88_esm_wheelAction = { key: 'wheel', engine: WheelEngine, resolver: wheelConfigResolver @@ -39898,13 +39854,11 @@ function use_gesture_core_esm_objectWithoutPropertiesLoose(source, excluded) { var target = {}; var sourceKeys = Object.keys(source); var key, i; - for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } - return target; } @@ -39912,10 +39866,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = use_gesture_core_esm_objectWithoutPropertiesLoose(source, excluded); var key, i; - if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; @@ -39923,7 +39875,6 @@ function _objectWithoutProperties(source, excluded) { target[key] = source[key]; } } - return target; } @@ -39932,18 +39883,14 @@ const sharedConfigResolver = { if (value) { return () => 'current' in value ? value.current : value; } - return undefined; }, - enabled(value = true) { return value; }, - window(value = SUPPORT.isBrowser ? window : undefined) { return value; }, - eventOptions({ passive = true, capture = false @@ -39953,158 +39900,120 @@ const sharedConfigResolver = { capture }; }, - transform(value) { return value; } - }; const _excluded = ["target", "eventOptions", "window", "enabled", "transform"]; function resolveWith(config = {}, resolvers) { const result = {}; - for (const [key, resolver] of Object.entries(resolvers)) { switch (typeof resolver) { case 'function': if (false) {} else { result[key] = resolver.call(result, config[key], key, config); } - break; - case 'object': result[key] = resolveWith(config[key], resolver); break; - case 'boolean': if (resolver) result[key] = config[key]; break; } } - return result; } -function use_gesture_core_esm_parse(config, gestureKey) { - const _ref = config, - { - target, - eventOptions, - window, - enabled, - transform - } = _ref, - rest = _objectWithoutProperties(_ref, _excluded); - - const _config = { - shared: resolveWith({ +function use_gesture_core_esm_parse(newConfig, gestureKey, _config = {}) { + const _ref = newConfig, + { target, eventOptions, window, enabled, transform - }, sharedConfigResolver) - }; - + } = _ref, + rest = _objectWithoutProperties(_ref, _excluded); + _config.shared = resolveWith({ + target, + eventOptions, + window, + enabled, + transform + }, sharedConfigResolver); if (gestureKey) { const resolver = ConfigResolverMap.get(gestureKey); - _config[gestureKey] = resolveWith(actions_aeda4790_esm_objectSpread2({ + _config[gestureKey] = resolveWith(actions_fe213e88_esm_objectSpread2({ shared: _config.shared }, rest), resolver); } else { for (const key in rest) { const resolver = ConfigResolverMap.get(key); - if (resolver) { - _config[key] = resolveWith(actions_aeda4790_esm_objectSpread2({ + _config[key] = resolveWith(actions_fe213e88_esm_objectSpread2({ shared: _config.shared }, rest[key]), resolver); } else if (false) {} } } - return _config; } class EventStore { constructor(ctrl, gestureKey) { - actions_aeda4790_esm_defineProperty(this, "_listeners", new Set()); - + actions_fe213e88_esm_defineProperty(this, "_listeners", new Set()); this._ctrl = ctrl; this._gestureKey = gestureKey; } - add(element, device, action, handler, options) { const listeners = this._listeners; const type = toDomEventType(device, action); - const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}; - - const eventOptions = actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, _options), options); - + const eventOptions = actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, _options), options); element.addEventListener(type, handler, eventOptions); - const remove = () => { element.removeEventListener(type, handler, eventOptions); listeners.delete(remove); }; - listeners.add(remove); return remove; } - clean() { this._listeners.forEach(remove => remove()); - this._listeners.clear(); } - } class TimeoutStore { constructor() { - actions_aeda4790_esm_defineProperty(this, "_timeouts", new Map()); + actions_fe213e88_esm_defineProperty(this, "_timeouts", new Map()); } - add(key, callback, ms = 140, ...args) { this.remove(key); - this._timeouts.set(key, window.setTimeout(callback, ms, ...args)); } - remove(key) { const timeout = this._timeouts.get(key); - if (timeout) window.clearTimeout(timeout); } - clean() { this._timeouts.forEach(timeout => void window.clearTimeout(timeout)); - this._timeouts.clear(); } - } class Controller { constructor(handlers) { - actions_aeda4790_esm_defineProperty(this, "gestures", new Set()); - - actions_aeda4790_esm_defineProperty(this, "_targetEventStore", new EventStore(this)); - - actions_aeda4790_esm_defineProperty(this, "gestureEventStores", {}); - - actions_aeda4790_esm_defineProperty(this, "gestureTimeoutStores", {}); - - actions_aeda4790_esm_defineProperty(this, "handlers", {}); - - actions_aeda4790_esm_defineProperty(this, "config", {}); - - actions_aeda4790_esm_defineProperty(this, "pointerIds", new Set()); - - actions_aeda4790_esm_defineProperty(this, "touchIds", new Set()); - - actions_aeda4790_esm_defineProperty(this, "state", { + actions_fe213e88_esm_defineProperty(this, "gestures", new Set()); + actions_fe213e88_esm_defineProperty(this, "_targetEventStore", new EventStore(this)); + actions_fe213e88_esm_defineProperty(this, "gestureEventStores", {}); + actions_fe213e88_esm_defineProperty(this, "gestureTimeoutStores", {}); + actions_fe213e88_esm_defineProperty(this, "handlers", {}); + actions_fe213e88_esm_defineProperty(this, "config", {}); + actions_fe213e88_esm_defineProperty(this, "pointerIds", new Set()); + actions_fe213e88_esm_defineProperty(this, "touchIds", new Set()); + actions_fe213e88_esm_defineProperty(this, "state", { shared: { shiftKey: false, metaKey: false, @@ -40112,10 +40021,8 @@ class Controller { altKey: false } }); - resolveGestures(this, handlers); } - setEventIds(event) { if (isTouch(event)) { this.touchIds = new Set(touchIds(event)); @@ -40125,89 +40032,71 @@ class Controller { return this.pointerIds; } } - applyHandlers(handlers, nativeHandlers) { this.handlers = handlers; this.nativeHandlers = nativeHandlers; } - applyConfig(config, gestureKey) { - this.config = use_gesture_core_esm_parse(config, gestureKey); + this.config = use_gesture_core_esm_parse(config, gestureKey, this.config); } - clean() { this._targetEventStore.clean(); - for (const key of this.gestures) { this.gestureEventStores[key].clean(); this.gestureTimeoutStores[key].clean(); } } - effect() { if (this.config.shared.target) this.bind(); return () => this._targetEventStore.clean(); } - bind(...args) { const sharedConfig = this.config.shared; const props = {}; let target; - if (sharedConfig.target) { target = sharedConfig.target(); if (!target) return; } - if (sharedConfig.enabled) { for (const gestureKey of this.gestures) { const gestureConfig = this.config[gestureKey]; const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target); - if (gestureConfig.enabled) { - const Engine = actions_aeda4790_esm_EngineMap.get(gestureKey); + const Engine = actions_fe213e88_esm_EngineMap.get(gestureKey); new Engine(this, args, gestureKey).bind(bindFunction); } } - const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target); - for (const eventKey in this.nativeHandlers) { - nativeBindFunction(eventKey, '', event => this.nativeHandlers[eventKey](actions_aeda4790_esm_objectSpread2(actions_aeda4790_esm_objectSpread2({}, this.state.shared), {}, { + nativeBindFunction(eventKey, '', event => this.nativeHandlers[eventKey](actions_fe213e88_esm_objectSpread2(actions_fe213e88_esm_objectSpread2({}, this.state.shared), {}, { event, args })), undefined, true); } } - for (const handlerProp in props) { props[handlerProp] = chain(...props[handlerProp]); } - if (!target) return props; - for (const handlerProp in props) { const { device, capture, passive } = parseProp(handlerProp); - this._targetEventStore.add(target, device, '', props[handlerProp], { capture, passive }); } } - } - function setupGesture(ctrl, gestureKey) { ctrl.gestures.add(gestureKey); ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey); ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore(); } - function resolveGestures(ctrl, internalHandlers) { if (internalHandlers.drag) setupGesture(ctrl, 'drag'); if (internalHandlers.wheel) setupGesture(ctrl, 'wheel'); @@ -40216,10 +40105,8 @@ function resolveGestures(ctrl, internalHandlers) { if (internalHandlers.pinch) setupGesture(ctrl, 'pinch'); if (internalHandlers.hover) setupGesture(ctrl, 'hover'); } - const bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options = {}, isNative = false) => { var _options$capture, _options$passive; - const capture = (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture; const passive = (_options$passive = options.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive; let handlerProp = isNative ? device : toHandlerProp(device, action, capture); @@ -40229,12 +40116,10 @@ const bindToProps = (props, eventOptions, withPassiveOption) => (device, action, }; const RE_NOT_NATIVE = /^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/; - function sortHandlers(_handlers) { const native = {}; const handlers = {}; const actions = new Set(); - for (let key in _handlers) { if (RE_NOT_NATIVE.test(key)) { actions.add(RegExp.lastMatch); @@ -40243,22 +40128,16 @@ function sortHandlers(_handlers) { native[key] = _handlers[key]; } } - return [handlers, native, actions]; } - function registerGesture(actions, handlers, handlerKey, key, internalHandlers, config) { if (!actions.has(handlerKey)) return; - if (!EngineMap.has(key)) { if (false) {} - return; } - const startKey = handlerKey + 'Start'; const endKey = handlerKey + 'End'; - const fn = state => { let memo = undefined; if (state.first && startKey in handlers) handlers[startKey](state); @@ -40266,11 +40145,9 @@ function registerGesture(actions, handlers, handlerKey, key, internalHandlers, c if (state.last && endKey in handlers) handlers[endKey](state); return memo; }; - internalHandlers[key] = fn; config[key] = config[key] || {}; } - function use_gesture_core_esm_parseMergedHandlers(mergedHandlers, mergedConfig) { const [handlers, nativeHandlers, actions] = sortHandlers(mergedHandlers); const internalHandlers = {}; @@ -40305,16 +40182,14 @@ function useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) { external_React_default().useEffect(() => { return ctrl.clean.bind(ctrl); }, []); - if (config.target === undefined) { return ctrl.bind.bind(ctrl); } - return undefined; } function use_gesture_react_esm_useDrag(handler, config) { - actions_aeda4790_esm_registerAction(actions_aeda4790_esm_dragAction); + actions_fe213e88_esm_registerAction(actions_fe213e88_esm_dragAction); return useRecognizers({ drag: handler }, config || {}, 'drag'); @@ -40349,7 +40224,7 @@ function useMove(handler, config) { } function useHover(handler, config) { - actions_aeda4790_esm_registerAction(actions_aeda4790_esm_hoverAction); + actions_fe213e88_esm_registerAction(actions_fe213e88_esm_hoverAction); return useRecognizers({ hover: handler }, config || {}, 'hover'); @@ -41069,19 +40944,19 @@ function angle_picker_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return " const CIRCLE_SIZE = 32; const INNER_CIRCLE_SIZE = 3; -const angle_picker_control_styles_Root = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const angle_picker_control_styles_Root = /*#__PURE__*/createStyled(flex_component, true ? { target: "e65ony43" } : 0)("margin-bottom:", space(2), ";" + ( true ? "" : 0)); -const CircleRoot = emotion_styled_base_browser_esm("div", true ? { +const CircleRoot = createStyled("div", true ? { target: "e65ony42" } : 0)("border-radius:50%;border:", config_values.borderWidth, " solid ", COLORS.ui.border, ";box-sizing:border-box;cursor:grab;height:", CIRCLE_SIZE, "px;overflow:hidden;width:", CIRCLE_SIZE, "px;" + ( true ? "" : 0)); -const CircleIndicatorWrapper = emotion_styled_base_browser_esm("div", true ? { +const CircleIndicatorWrapper = createStyled("div", true ? { target: "e65ony41" } : 0)( true ? { name: "1bhd2sw", styles: "box-sizing:border-box;position:relative;width:100%;height:100%" } : 0); -const CircleIndicator = emotion_styled_base_browser_esm("div", true ? { +const CircleIndicator = createStyled("div", true ? { target: "e65ony40" } : 0)("background:", COLORS.admin.theme, ";border-radius:50%;border:", INNER_CIRCLE_SIZE, "px solid ", COLORS.admin.theme, ";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-", CIRCLE_SIZE / 2, "px;width:0px;" + ( true ? "" : 0)); @@ -41965,7 +41840,7 @@ function base_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have -const base_control_styles_Wrapper = emotion_styled_base_browser_esm("div", true ? { +const base_control_styles_Wrapper = createStyled("div", true ? { target: "ej5x27r4" } : 0)("font-family:", font('default.fontFamily'), ";font-size:", font('default.fontSize'), ";" + ( true ? "" : 0)); @@ -41976,11 +41851,11 @@ const deprecatedMarginField = _ref2 => { return !__nextHasNoMarginBottom && /*#__PURE__*/emotion_react_browser_esm_css("margin-bottom:", space(2), ";" + ( true ? "" : 0), true ? "" : 0); }; -const StyledField = emotion_styled_base_browser_esm("div", true ? { +const StyledField = createStyled("div", true ? { target: "ej5x27r3" } : 0)(deprecatedMarginField, " .components-panel__row &{margin-bottom:inherit;}" + ( true ? "" : 0)); const labelStyles = /*#__PURE__*/emotion_react_browser_esm_css("display:inline-block;margin-bottom:", space(2), ";" + ( true ? "" : 0), true ? "" : 0); -const StyledLabel = emotion_styled_base_browser_esm("label", true ? { +const StyledLabel = createStyled("label", true ? { target: "ej5x27r2" } : 0)(labelStyles, ";" + ( true ? "" : 0)); @@ -41996,10 +41871,10 @@ const deprecatedMarginHelp = _ref3 => { return !__nextHasNoMarginBottom && base_control_styles_ref; }; -const StyledHelp = emotion_styled_base_browser_esm("p", true ? { +const StyledHelp = createStyled("p", true ? { target: "ej5x27r1" } : 0)("margin-top:", space(2), ";margin-bottom:0;font-size:", font('helpText.fontSize'), ";font-style:normal;color:", COLORS.mediumGray.text, ";", deprecatedMarginHelp, ";" + ( true ? "" : 0)); -const StyledVisualLabel = emotion_styled_base_browser_esm("span", true ? { +const StyledVisualLabel = createStyled("span", true ? { target: "ej5x27r0" } : 0)(labelStyles, ";" + ( true ? "" : 0)); @@ -42400,7 +42275,7 @@ const htmlArrowStyles = _ref2 => { return number_control_styles_ref; }; -const number_control_styles_Input = /*#__PURE__*/emotion_styled_base_browser_esm(input_control, true ? { +const number_control_styles_Input = /*#__PURE__*/createStyled(input_control, true ? { target: "ep48uk90" } : 0)(htmlArrowStyles, ";" + ( true ? "" : 0)); @@ -42791,7 +42666,7 @@ function unit_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have */ -const unit_control_styles_Root = emotion_styled_base_browser_esm("div", true ? { +const unit_control_styles_Root = createStyled("div", true ? { target: "e1bagdl33" } : 0)( true ? { name: "100d0a9", @@ -42832,17 +42707,17 @@ const arrowStyles = _ref3 => { // https://github.com/WordPress/gutenberg/issues/18483 -const ValueInput = /*#__PURE__*/emotion_styled_base_browser_esm(number_control, true ? { +const ValueInput = /*#__PURE__*/createStyled(number_control, true ? { target: "e1bagdl32" } : 0)("&&&{input{appearance:none;-moz-appearance:textfield;display:block;width:100%;", arrowStyles, ";", paddingStyles, ";}}" + ( true ? "" : 0)); const baseUnitLabelStyles = /*#__PURE__*/emotion_react_browser_esm_css("appearance:none;background:transparent;border-radius:2px;border:none;box-sizing:border-box;color:", COLORS.darkGray[500], ";display:block;font-size:8px;letter-spacing:-0.5px;outline:none;padding:2px 1px;text-align-last:center;text-transform:uppercase;width:20px;", rtl({ borderTopLeftRadius: 0, borderBottomLeftRadius: 0 })(), ";" + ( true ? "" : 0), true ? "" : 0); -const UnitLabel = emotion_styled_base_browser_esm("div", true ? { +const UnitLabel = createStyled("div", true ? { target: "e1bagdl31" } : 0)("&&&{pointer-events:none;", baseUnitLabelStyles, ";}" + ( true ? "" : 0)); -const UnitSelect = emotion_styled_base_browser_esm("select", true ? { +const UnitSelect = createStyled("select", true ? { target: "e1bagdl30" } : 0)("&&&{", baseUnitLabelStyles, ";cursor:pointer;border:1px solid transparent;height:100%;&:hover{background-color:", COLORS.lightGray[300], ";}&:focus{border-color:", COLORS.ui.borderFocus, ";outline:2px solid transparent;outline-offset:0;}&:disabled{cursor:initial;&:hover{background-color:transparent;}}}" + ( true ? "" : 0)); @@ -43569,10 +43444,10 @@ const sizePaddings = _ref4 => { // https://github.com/WordPress/gutenberg/issues/18483 -const Select = emotion_styled_base_browser_esm("select", true ? { +const Select = createStyled("select", true ? { target: "e1mv6sxx1" } : 0)("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:", COLORS.black, ";display:block;font-family:inherit;margin:0;width:100%;", select_control_styles_disabledStyles, ";", select_control_styles_fontSizeStyles, ";", select_control_styles_sizeStyles, ";", sizePaddings, ";}" + ( true ? "" : 0)); -const DownArrowWrapper = emotion_styled_base_browser_esm("div", true ? { +const DownArrowWrapper = createStyled("div", true ? { target: "e1mv6sxx0" } : 0)("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;", rtl({ right: 0 @@ -43951,7 +43826,7 @@ const rangeHeight = () => /*#__PURE__*/emotion_react_browser_esm_css({ }, true ? "" : 0, true ? "" : 0); const thumbSize = 12; -const range_control_styles_Root = emotion_styled_base_browser_esm("div", true ? { +const range_control_styles_Root = createStyled("div", true ? { target: "exqw8y214" } : 0)( true ? { name: "17z6zai", @@ -43976,15 +43851,15 @@ const wrapperMargin = _ref5 => { }, true ? "" : 0, true ? "" : 0); }; -const range_control_styles_Wrapper = emotion_styled_base_browser_esm("div", true ? { +const range_control_styles_Wrapper = createStyled("div", true ? { target: "exqw8y213" } : 0)("box-sizing:border-box;color:", COLORS.blue.medium.focus, ";display:block;flex:1;position:relative;width:100%;", wrapperColor, ";", rangeHeight, ";", wrapperMargin, ";" + ( true ? "" : 0)); -const BeforeIconWrapper = emotion_styled_base_browser_esm("span", true ? { +const BeforeIconWrapper = createStyled("span", true ? { target: "exqw8y212" } : 0)("margin-top:", railHeight, "px;", rtl({ marginRight: 6 }), ";" + ( true ? "" : 0)); -const AfterIconWrapper = emotion_styled_base_browser_esm("span", true ? { +const AfterIconWrapper = createStyled("span", true ? { target: "exqw8y211" } : 0)("margin-top:", railHeight, "px;", rtl({ marginLeft: 6 @@ -44006,7 +43881,7 @@ const railBackgroundColor = _ref6 => { }, true ? "" : 0, true ? "" : 0); }; -const Rail = emotion_styled_base_browser_esm("span", true ? { +const Rail = createStyled("span", true ? { target: "exqw8y210" } : 0)("background-color:", COLORS.lightGray[600], ";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:", railHeight, "px;position:absolute;margin-top:", (rangeHeightValue - railHeight) / 2, "px;top:0;border-radius:", railHeight, "px;", railBackgroundColor, ";" + ( true ? "" : 0)); @@ -44026,10 +43901,10 @@ const trackBackgroundColor = _ref7 => { }, true ? "" : 0, true ? "" : 0); }; -const Track = emotion_styled_base_browser_esm("span", true ? { +const Track = createStyled("span", true ? { target: "exqw8y29" } : 0)("background-color:currentColor;border-radius:", railHeight, "px;box-sizing:border-box;height:", railHeight, "px;pointer-events:none;display:block;position:absolute;margin-top:", (rangeHeightValue - railHeight) / 2, "px;top:0;", trackBackgroundColor, ";" + ( true ? "" : 0)); -const MarksWrapper = emotion_styled_base_browser_esm("span", true ? { +const MarksWrapper = createStyled("span", true ? { target: "exqw8y28" } : 0)( true ? { name: "1xuuvmv", @@ -44052,7 +43927,7 @@ const markFill = _ref8 => { }, true ? "" : 0, true ? "" : 0); }; -const Mark = emotion_styled_base_browser_esm("span", true ? { +const Mark = createStyled("span", true ? { target: "exqw8y27" } : 0)("box-sizing:border-box;height:", thumbSize, "px;left:0;position:absolute;top:-4px;width:1px;", markFill, ";" + ( true ? "" : 0)); @@ -44065,7 +43940,7 @@ const markLabelFill = _ref9 => { }, true ? "" : 0, true ? "" : 0); }; -const MarkLabel = emotion_styled_base_browser_esm("span", true ? { +const MarkLabel = createStyled("span", true ? { target: "exqw8y26" } : 0)("box-sizing:border-box;color:", COLORS.lightGray[600], ";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;", markLabelFill, ";" + ( true ? "" : 0)); @@ -44081,7 +43956,7 @@ const thumbColor = _ref10 => { return disabled ? /*#__PURE__*/emotion_react_browser_esm_css("background-color:", COLORS.lightGray[800], ";" + ( true ? "" : 0), true ? "" : 0) : range_control_styles_ref3; }; -const ThumbWrapper = emotion_styled_base_browser_esm("span", true ? { +const ThumbWrapper = createStyled("span", true ? { target: "exqw8y25" } : 0)("align-items:center;box-sizing:border-box;display:flex;height:", thumbSize, "px;justify-content:center;margin-top:", (rangeHeightValue - thumbSize) / 2, "px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:", thumbSize, "px;border-radius:50%;", thumbColor, ";", rtl({ marginLeft: -10 @@ -44098,10 +43973,10 @@ const thumbFocus = _ref11 => { return isFocused ? /*#__PURE__*/emotion_react_browser_esm_css("&::before{content:' ';position:absolute;background-color:var( --wp-admin-theme-color );opacity:0.4;border-radius:50%;height:", thumbSize + 8, "px;width:", thumbSize + 8, "px;top:-4px;left:-4px;}" + ( true ? "" : 0), true ? "" : 0) : ''; }; -const Thumb = emotion_styled_base_browser_esm("span", true ? { +const Thumb = createStyled("span", true ? { target: "exqw8y24" } : 0)("align-items:center;border-radius:50%;box-sizing:border-box;height:100%;outline:0;position:absolute;user-select:none;width:100%;", thumbColor, ";", thumbFocus, ";" + ( true ? "" : 0)); -const InputRange = emotion_styled_base_browser_esm("input", true ? { +const InputRange = createStyled("input", true ? { target: "exqw8y23" } : 0)("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -", thumbSize / 2, "px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ", thumbSize, "px );" + ( true ? "" : 0)); @@ -44137,7 +44012,7 @@ const tooltipPosition = _ref13 => { return range_control_styles_ref; }; -const range_control_styles_Tooltip = emotion_styled_base_browser_esm("span", true ? { +const range_control_styles_Tooltip = createStyled("span", true ? { target: "exqw8y22" } : 0)("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;", tooltipShow, ";", tooltipPosition, ";", reduceMotion('transition'), ";", rtl({ transform: 'translateX(-50%)' @@ -44146,12 +44021,12 @@ const range_control_styles_Tooltip = emotion_styled_base_browser_esm("span", tr }), ";" + ( true ? "" : 0)); // @todo: Refactor RangeControl with latest HStack configuration // @wordpress/components/ui/hstack. -const InputNumber = /*#__PURE__*/emotion_styled_base_browser_esm(number_control, true ? { +const InputNumber = /*#__PURE__*/createStyled(number_control, true ? { target: "exqw8y21" } : 0)("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:", space(16), "!important;input[type='number']&{", rangeHeight, ";}", rtl({ marginLeft: `${space(4)} !important` }), ";" + ( true ? "" : 0)); -const ActionRightWrapper = emotion_styled_base_browser_esm("span", true ? { +const ActionRightWrapper = createStyled("span", true ? { target: "exqw8y20" } : 0)("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;", rangeHeight, ";}", rtl({ marginLeft: 8 @@ -44728,13 +44603,13 @@ function color_picker_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have -const NumberControlWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(number_control, true ? { +const NumberControlWrapper = /*#__PURE__*/createStyled(number_control, true ? { target: "ez9hsf46" } : 0)(Container, "{width:", space(24), ";}" + ( true ? "" : 0)); -const styles_SelectControl = /*#__PURE__*/emotion_styled_base_browser_esm(select_control, true ? { +const styles_SelectControl = /*#__PURE__*/createStyled(select_control, true ? { target: "ez9hsf45" } : 0)("margin-left:", space(-2), ";width:5em;", BackdropUI, "{display:none;}" + ( true ? "" : 0)); -const styles_RangeControl = /*#__PURE__*/emotion_styled_base_browser_esm(range_control, true ? { +const styles_RangeControl = /*#__PURE__*/createStyled(range_control, true ? { target: "ez9hsf44" } : 0)("flex:1;", StyledField, "{margin-bottom:0;}" + ( true ? "" : 0)); // All inputs should be the same height so this should be changed at the component level. // That involves changing heights of multiple input types probably buttons too etc. @@ -44750,16 +44625,16 @@ const interactiveHueStyles = ` width: calc( 100% - ${space(2)} ); margin-left: ${space(1)}; }`; -const AuxiliaryColorArtefactWrapper = emotion_styled_base_browser_esm("div", true ? { +const AuxiliaryColorArtefactWrapper = createStyled("div", true ? { target: "ez9hsf43" } : 0)("padding:", space(2), " ", space(4), ";" + ( true ? "" : 0)); -const ColorfulWrapper = emotion_styled_base_browser_esm("div", true ? { +const ColorfulWrapper = createStyled("div", true ? { target: "ez9hsf42" } : 0)("width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:", space(4), ";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:", space(2), ";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ", config_values.borderWidthFocus, " #fff;}", interactiveHueStyles, " ", StyledField, "{margin-bottom:0;}", inputHeightStyle, ";" + ( true ? "" : 0)); -const DetailsControlButton = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_button, true ? { +const DetailsControlButton = /*#__PURE__*/createStyled(build_module_button, true ? { target: "ez9hsf41" } : 0)("&&&&&{min-width:", space(6), ";padding:0;}" + ( true ? "" : 0)); -const ColorHexInputControl = /*#__PURE__*/emotion_styled_base_browser_esm(input_control, true ? { +const ColorHexInputControl = /*#__PURE__*/createStyled(input_control, true ? { target: "ez9hsf40" } : 0)( true ? { name: "1287a6j", @@ -44811,7 +44686,7 @@ var round = Math.round; function getUAString() { var uaData = navigator.userAgentData; - if (uaData != null && uaData.brands) { + if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) { return uaData.brands.map(function (item) { return item.brand + "/" + item.version; }).join(' '); @@ -45279,13 +45154,6 @@ function mergeByName(modifiers) { - - - - - -var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.'; -var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.'; var DEFAULT_OPTIONS = { placement: 'bottom', modifiers: [], @@ -45347,11 +45215,7 @@ function popperGenerator(generatorOptions) { state.orderedModifiers = orderedModifiers.filter(function (m) { return m.enabled; - }); // Validate the provided modifiers so that the consumer will get warned - // if one of the modifiers is invalid for any reason - - if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; } - + }); runModifierEffects(); return instance.update(); }, @@ -45371,8 +45235,6 @@ function popperGenerator(generatorOptions) { // anymore if (!areValidElements(reference, popper)) { - if (false) {} - return; } // Store the reference and popper rects to be read by modifiers @@ -45395,11 +45257,8 @@ function popperGenerator(generatorOptions) { state.orderedModifiers.forEach(function (modifier) { return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); }); - var __debug_loops__ = 0; for (var index = 0; index < state.orderedModifiers.length; index++) { - if (false) {} - if (state.reset === true) { state.reset = false; index = -1; @@ -45437,8 +45296,6 @@ function popperGenerator(generatorOptions) { }; if (!areValidElements(reference, popper)) { - if (false) {} - return instance; } @@ -45453,11 +45310,11 @@ function popperGenerator(generatorOptions) { // one. function runModifierEffects() { - state.orderedModifiers.forEach(function (_ref3) { - var name = _ref3.name, - _ref3$options = _ref3.options, - options = _ref3$options === void 0 ? {} : _ref3$options, - effect = _ref3.effect; + state.orderedModifiers.forEach(function (_ref) { + var name = _ref.name, + _ref$options = _ref.options, + options = _ref$options === void 0 ? {} : _ref$options, + effect = _ref.effect; if (typeof effect === 'function') { var cleanupFn = effect({ @@ -45666,10 +45523,9 @@ var unsetSides = { // Zooming can change the DPR, but it seems to report a value that will // cleanly divide the values into the appropriate subpixels. -function roundOffsetsByDPR(_ref) { +function roundOffsetsByDPR(_ref, win) { var x = _ref.x, y = _ref.y; - var win = window; var dpr = win.devicePixelRatio || 1; return { x: round(x * dpr) / dpr || 0, @@ -45752,7 +45608,7 @@ function mapToStyles(_ref2) { var _ref4 = roundOffsets === true ? roundOffsetsByDPR({ x: x, y: y - }) : { + }, getWindow_getWindow(popper)) : { x: x, y: y }; @@ -45778,9 +45634,6 @@ function computeStyles(_ref5) { adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; - - if (false) { var transitionProperty; } - var commonStyles = { placement: getBasePlacement(state.placement), variation: getVariation(state.placement), @@ -46264,8 +46117,6 @@ function computeAutoPlacement(state, options) { if (allowedPlacements.length === 0) { allowedPlacements = placements; - - if (false) {} } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... @@ -46595,7 +46446,6 @@ function preventOverflow(_ref) { - // eslint-disable-next-line import/no-unused-modules var toPaddingObject = function toPaddingObject(padding, state) { @@ -46661,11 +46511,7 @@ function arrow_effect(_ref2) { } } - if (false) {} - if (!contains_contains(state.elements.popper, arrowElement)) { - if (false) {} - return; } @@ -47632,14 +47478,14 @@ function tooltip_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have trie const TooltipContent = /*#__PURE__*/emotion_react_browser_esm_css("z-index:", z_index_Tooltip, ";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ", config_values.transitionDurationFastest, " ease;&[data-enter]{opacity:1;}" + ( true ? "" : 0), true ? "" : 0); -const TooltipPopoverView = emotion_styled_base_browser_esm("div", true ? { +const TooltipPopoverView = createStyled("div", true ? { target: "e7tfjmw1" } : 0)("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:", COLORS.white, ";padding:4px 8px;" + ( true ? "" : 0)); const noOutline = true ? { name: "12mkfdx", styles: "outline:none" } : 0; -const TooltipShortcut = /*#__PURE__*/emotion_styled_base_browser_esm(shortcut_component, true ? { +const TooltipShortcut = /*#__PURE__*/createStyled(shortcut_component, true ? { target: "e7tfjmw0" } : 0)("display:inline-block;margin-left:", space(1), ";" + ( true ? "" : 0)); @@ -48836,7 +48682,7 @@ function color_palette_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You hav * Internal dependencies */ -const ColorHeading = /*#__PURE__*/emotion_styled_base_browser_esm(heading_component, true ? { +const ColorHeading = /*#__PURE__*/createStyled(heading_component, true ? { target: "e1uu5br00" } : 0)( true ? { name: "13lxv2o", @@ -50784,34 +50630,34 @@ function box_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have -const box_control_styles_Root = emotion_styled_base_browser_esm("div", true ? { +const box_control_styles_Root = createStyled("div", true ? { target: "e7pk0lh6" } : 0)( true ? { name: "14bvcyk", styles: "box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%" } : 0); -const Header = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const Header = /*#__PURE__*/createStyled(flex_component, true ? { target: "e7pk0lh5" } : 0)("color:", COLORS.ui.label, ";margin-bottom:8px;" + ( true ? "" : 0)); -const HeaderControlWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const HeaderControlWrapper = /*#__PURE__*/createStyled(flex_component, true ? { target: "e7pk0lh4" } : 0)( true ? { name: "aujtid", styles: "min-height:30px;gap:0" } : 0); -const UnitControlWrapper = emotion_styled_base_browser_esm("div", true ? { +const UnitControlWrapper = createStyled("div", true ? { target: "e7pk0lh3" } : 0)( true ? { name: "112jwab", styles: "box-sizing:border-box;max-width:80px" } : 0); -const LayoutContainer = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const LayoutContainer = /*#__PURE__*/createStyled(flex_component, true ? { target: "e7pk0lh2" } : 0)( true ? { name: "xy18ro", styles: "justify-content:center;padding-top:8px" } : 0); -const Layout = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const Layout = /*#__PURE__*/createStyled(flex_component, true ? { target: "e7pk0lh1" } : 0)( true ? { name: "3tw5wk", @@ -50867,7 +50713,7 @@ const unitControlMarginStyles = _ref4 => { })(); }; -const box_control_styles_UnitControl = /*#__PURE__*/emotion_styled_base_browser_esm(unit_control, true ? { +const box_control_styles_UnitControl = /*#__PURE__*/createStyled(unit_control, true ? { target: "e7pk0lh0" } : 0)("max-width:60px;", unitControlBorderRadiusStyles, ";", unitControlMarginStyles, ";" + ( true ? "" : 0)); @@ -51523,13 +51369,13 @@ function box_control_icon_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You * External dependencies */ -const box_control_icon_styles_Root = emotion_styled_base_browser_esm("span", true ? { +const box_control_icon_styles_Root = createStyled("span", true ? { target: "eaw9yqk8" } : 0)( true ? { name: "1w884gc", styles: "box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px" } : 0); -const Viewbox = emotion_styled_base_browser_esm("span", true ? { +const Viewbox = createStyled("span", true ? { target: "eaw9yqk7" } : 0)( true ? { name: "i6vjox", @@ -51546,43 +51392,43 @@ const strokeFocus = _ref => { }, true ? "" : 0, true ? "" : 0); }; -const Stroke = emotion_styled_base_browser_esm("span", true ? { +const Stroke = createStyled("span", true ? { target: "eaw9yqk6" } : 0)("box-sizing:border-box;display:block;pointer-events:none;position:absolute;", strokeFocus, ";" + ( true ? "" : 0)); -const VerticalStroke = /*#__PURE__*/emotion_styled_base_browser_esm(Stroke, true ? { +const VerticalStroke = /*#__PURE__*/createStyled(Stroke, true ? { target: "eaw9yqk5" } : 0)( true ? { name: "1k2w39q", styles: "bottom:3px;top:3px;width:2px" } : 0); -const HorizontalStroke = /*#__PURE__*/emotion_styled_base_browser_esm(Stroke, true ? { +const HorizontalStroke = /*#__PURE__*/createStyled(Stroke, true ? { target: "eaw9yqk4" } : 0)( true ? { name: "1q9b07k", styles: "height:2px;left:3px;right:3px" } : 0); -const TopStroke = /*#__PURE__*/emotion_styled_base_browser_esm(HorizontalStroke, true ? { +const TopStroke = /*#__PURE__*/createStyled(HorizontalStroke, true ? { target: "eaw9yqk3" } : 0)( true ? { name: "abcix4", styles: "top:0" } : 0); -const RightStroke = /*#__PURE__*/emotion_styled_base_browser_esm(VerticalStroke, true ? { +const RightStroke = /*#__PURE__*/createStyled(VerticalStroke, true ? { target: "eaw9yqk2" } : 0)( true ? { name: "1wf8jf", styles: "right:0" } : 0); -const BottomStroke = /*#__PURE__*/emotion_styled_base_browser_esm(HorizontalStroke, true ? { +const BottomStroke = /*#__PURE__*/createStyled(HorizontalStroke, true ? { target: "eaw9yqk1" } : 0)( true ? { name: "8tapst", styles: "bottom:0" } : 0); -const LeftStroke = /*#__PURE__*/emotion_styled_base_browser_esm(VerticalStroke, true ? { +const LeftStroke = /*#__PURE__*/createStyled(VerticalStroke, true ? { target: "eaw9yqk0" } : 0)( true ? { name: "1ode3cm", @@ -51698,10 +51544,10 @@ const containerPositionStyles = _ref2 => { return box_control_visualizer_styles_ref; }; -const box_control_visualizer_styles_Container = emotion_styled_base_browser_esm("div", true ? { +const box_control_visualizer_styles_Container = createStyled("div", true ? { target: "e1df9b4q5" } : 0)("box-sizing:border-box;position:relative;", containerPositionStyles, ";" + ( true ? "" : 0)); -const Side = emotion_styled_base_browser_esm("div", true ? { +const Side = createStyled("div", true ? { target: "e1df9b4q4" } : 0)("box-sizing:border-box;background:", COLORS.blue.wordpress[700], ";background:", COLORS.ui.theme, ";filter:brightness( 1 );opacity:0;position:absolute;pointer-events:none;transition:opacity 120ms linear;z-index:1;", _ref3 => { let { @@ -51711,24 +51557,24 @@ const Side = emotion_styled_base_browser_esm("div", true ? { opacity: 0.3; `; }, ";" + ( true ? "" : 0)); -const TopView = /*#__PURE__*/emotion_styled_base_browser_esm(Side, true ? { +const TopView = /*#__PURE__*/createStyled(Side, true ? { target: "e1df9b4q3" } : 0)( true ? { name: "5i97ct", styles: "top:0;left:0;right:0" } : 0); -const RightView = /*#__PURE__*/emotion_styled_base_browser_esm(Side, true ? { +const RightView = /*#__PURE__*/createStyled(Side, true ? { target: "e1df9b4q2" } : 0)("top:0;bottom:0;", rtl({ right: 0 }), ";" + ( true ? "" : 0)); -const BottomView = /*#__PURE__*/emotion_styled_base_browser_esm(Side, true ? { +const BottomView = /*#__PURE__*/createStyled(Side, true ? { target: "e1df9b4q1" } : 0)( true ? { name: "8cxke2", styles: "bottom:0;left:0;right:0" } : 0); -const LeftView = /*#__PURE__*/emotion_styled_base_browser_esm(Side, true ? { +const LeftView = /*#__PURE__*/createStyled(Side, true ? { target: "e1df9b4q0" } : 0)("top:0;bottom:0;", rtl({ left: 0 @@ -52944,7 +52790,7 @@ const renderSize = _ref5 => { }, true ? "" : 0, true ? "" : 0); }; -const DividerView = emotion_styled_base_browser_esm("hr", true ? { +const DividerView = createStyled("hr", true ? { target: "e19on6iw0" } : 0)("border:0;margin:0;", renderDisplay, " ", renderBorder, " ", renderSize, " ", renderMargin, ";" + ( true ? "" : 0)); @@ -54465,13 +54311,13 @@ function custom_gradient_picker_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return * Internal dependencies */ -const SelectWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(flex_block_component, true ? { +const SelectWrapper = /*#__PURE__*/createStyled(flex_block_component, true ? { target: "e99xvul1" } : 0)( true ? { name: "1gvx10y", styles: "flex-grow:5" } : 0); -const AccessoryWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(flex_block_component, true ? { +const AccessoryWrapper = /*#__PURE__*/createStyled(flex_block_component, true ? { target: "e99xvul0" } : 0)( true ? { name: "1gvx10y", @@ -55168,37 +55014,37 @@ function palette_edit_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have -const IndicatorStyled = /*#__PURE__*/emotion_styled_base_browser_esm(CircularOptionPicker.Option, true ? { +const IndicatorStyled = /*#__PURE__*/createStyled(CircularOptionPicker.Option, true ? { target: "e5bw3229" } : 0)("width:", space(6), ";height:", space(6), ";pointer-events:none;" + ( true ? "" : 0)); -const NameInputControl = /*#__PURE__*/emotion_styled_base_browser_esm(input_control, true ? { +const NameInputControl = /*#__PURE__*/createStyled(input_control, true ? { target: "e5bw3228" } : 0)(Container, "{background:", COLORS.gray[100], ";border-radius:", config_values.controlBorderRadius, ";}", Input, Input, Input, Input, "{height:", space(8), ";}", BackdropUI, BackdropUI, BackdropUI, "{border-color:transparent;box-shadow:none;}" + ( true ? "" : 0)); -const PaletteItem = /*#__PURE__*/emotion_styled_base_browser_esm(component, true ? { +const PaletteItem = /*#__PURE__*/createStyled(component, true ? { target: "e5bw3227" } : 0)("padding:3px 0 3px ", space(3), ";height:calc( 40px - ", config_values.borderWidth, " );border:1px solid ", config_values.surfaceBorderColor, ";border-bottom-color:transparent;&:first-of-type{border-top-left-radius:", config_values.controlBorderRadius, ";border-top-right-radius:", config_values.controlBorderRadius, ";}&:last-of-type{border-bottom-left-radius:", config_values.controlBorderRadius, ";border-bottom-right-radius:", config_values.controlBorderRadius, ";border-bottom-color:", config_values.surfaceBorderColor, ";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:", COLORS.blue.wordpress[700], ";}" + ( true ? "" : 0)); -const NameContainer = emotion_styled_base_browser_esm("div", true ? { +const NameContainer = createStyled("div", true ? { target: "e5bw3226" } : 0)("line-height:", space(8), ";margin-left:", space(2), ";margin-right:", space(2), ";white-space:nowrap;overflow:hidden;", PaletteItem, ":hover &{color:var( --wp-admin-theme-color, ", COLORS.blue.wordpress[700], " );}" + ( true ? "" : 0)); -const PaletteHeading = /*#__PURE__*/emotion_styled_base_browser_esm(heading_component, true ? { +const PaletteHeading = /*#__PURE__*/createStyled(heading_component, true ? { target: "e5bw3225" } : 0)("text-transform:uppercase;line-height:", space(6), ";font-weight:500;&&&{font-size:11px;margin-bottom:0;}" + ( true ? "" : 0)); -const PaletteActionsContainer = /*#__PURE__*/emotion_styled_base_browser_esm(component, true ? { +const PaletteActionsContainer = /*#__PURE__*/createStyled(component, true ? { target: "e5bw3224" } : 0)("height:", space(6), ";display:flex;" + ( true ? "" : 0)); -const PaletteHStackHeader = /*#__PURE__*/emotion_styled_base_browser_esm(h_stack_component, true ? { +const PaletteHStackHeader = /*#__PURE__*/createStyled(h_stack_component, true ? { target: "e5bw3223" } : 0)("margin-bottom:", space(2), ";" + ( true ? "" : 0)); -const PaletteEditStyles = /*#__PURE__*/emotion_styled_base_browser_esm(component, true ? { +const PaletteEditStyles = /*#__PURE__*/createStyled(component, true ? { target: "e5bw3222" } : 0)( true ? { name: "u6wnko", styles: "&&&{.components-button.has-icon{min-width:0;padding:0;}}" } : 0); -const DoneButton = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_button, true ? { +const DoneButton = /*#__PURE__*/createStyled(build_module_button, true ? { target: "e5bw3221" } : 0)("&&{color:", COLORS.ui.theme, ";}" + ( true ? "" : 0)); -const RemoveButton = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_button, true ? { +const RemoveButton = /*#__PURE__*/createStyled(build_module_button, true ? { target: "e5bw3220" } : 0)("&&{margin-top:", space(1), ";}" + ( true ? "" : 0)); @@ -56267,8 +56113,9 @@ var prop_types = __webpack_require__(2652); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: ./node_modules/downshift/node_modules/react-is/index.js var react_is = __webpack_require__(2797); -;// CONCATENATED MODULE: ./node_modules/compute-scroll-into-view/dist/index.module.js -function index_module_t(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function index_module_e(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function index_module_n(t,n){if(t.clientHeighte||o>t&&l=e&&d>=n?o-t-r:l>e&&dn?l-e+i:0}/* harmony default export */ function index_module(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c="function"==typeof h?h:function(t){return t!==h};if(!index_module_t(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;index_module_t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&index_module_n(p)&&!index_module_n(document.documentElement)||null!=p&&index_module_n(p,a)&&s.push(p)}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x="start"===d||"nearest"===d?y:"end"===d?M:y+b/2,I="center"===u?V+H/2:"end"===u?E:V,C=[],T=0;T=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J="offsetWidth"in k?k.offsetWidth-k.clientWidth-j-z:0,K="offsetHeight"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F="start"===d?x:"end"===d?x-g:"nearest"===d?index_module_r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G="start"===u?I:"center"===u?I-m/2:"end"===u?I-m:index_module_r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else{F="start"===d?x-R-q:"end"===d?x-Y+A+K:"nearest"===d?index_module_r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G="start"===u?I-L-j:"center"===u?I-(L+O/2)+J/2:"end"===u?I-X+z+J:index_module_r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)))}C.push({el:k,top:F,left:G})}return C} +;// CONCATENATED MODULE: ./node_modules/compute-scroll-into-view/dist/index.mjs +function dist_t(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function dist_e(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function dist_n(t,n){if(t.clientHeighte||o>t&&l=e&&d>=n?o-t-r:l>e&&dn?l-e+i:0}var compute_scroll_into_view_dist_i=function(e,i){var o=window,l=i.scrollMode,d=i.block,f=i.inline,h=i.boundary,u=i.skipOverflowHiddenElements,s="function"==typeof h?h:function(t){return t!==h};if(!dist_t(e))throw new TypeError("Invalid target");for(var a,c,g=document.scrollingElement||document.documentElement,p=[],m=e;dist_t(m)&&s(m);){if((m=null==(c=(a=m).parentElement)?a.getRootNode().host||null:c)===g){p.push(m);break}null!=m&&m===document.body&&dist_n(m)&&!dist_n(document.documentElement)||null!=m&&dist_n(m,u)&&p.push(m)}for(var w=o.visualViewport?o.visualViewport.width:innerWidth,v=o.visualViewport?o.visualViewport.height:innerHeight,W=window.scrollX||pageXOffset,H=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),y=b.height,E=b.width,M=b.top,V=b.right,x=b.bottom,I=b.left,C="start"===d||"nearest"===d?M:"end"===d?x:M+y/2,R="center"===f?I+E/2:"end"===f?V:I,T=[],k=0;k=0&&I>=0&&x<=v&&V<=w&&M>=Y&&x<=S&&I>=j&&V<=L)return T;var N=getComputedStyle(B),q=parseInt(N.borderLeftWidth,10),z=parseInt(N.borderTopWidth,10),A=parseInt(N.borderRightWidth,10),F=parseInt(N.borderBottomWidth,10),G=0,J=0,K="offsetWidth"in B?B.offsetWidth-B.clientWidth-q-A:0,P="offsetHeight"in B?B.offsetHeight-B.clientHeight-z-F:0,Q="offsetWidth"in B?0===B.offsetWidth?0:X/B.offsetWidth:0,U="offsetHeight"in B?0===B.offsetHeight?0:O/B.offsetHeight:0;if(g===B)G="start"===d?C:"end"===d?C-v:"nearest"===d?dist_r(H,H+v,v,z,F,H+C,H+C+y,y):C-v/2,J="start"===f?R:"center"===f?R-w/2:"end"===f?R-w:dist_r(W,W+w,w,q,A,W+R,W+R+E,E),G=Math.max(0,G+H),J=Math.max(0,J+W);else{G="start"===d?C-Y-z:"end"===d?C-S+F+P:"nearest"===d?dist_r(Y,S,O,z,F+P,C,C+y,y):C-(Y+O/2)+P/2,J="start"===f?R-j-q:"center"===f?R-(j+X/2)+K/2:"end"===f?R-L+A+K:dist_r(j,L,X,q,A+K,R,R+E,E);var Z=B.scrollLeft,$=B.scrollTop;C+=$-(G=Math.max(0,Math.min($+G/U,B.scrollHeight-O/U+P))),R+=Z-(J=Math.max(0,Math.min(Z+J/Q,B.scrollWidth-X/Q+K)))}T.push({el:B,top:G,left:J})}return T}; +//# sourceMappingURL=index.mjs.map ;// CONCATENATED MODULE: ./node_modules/downshift/dist/downshift.esm.js @@ -56304,7 +56151,7 @@ function scrollIntoView(node, menuNode) { return; } - const actions = index_module(node, { + const actions = compute_scroll_into_view_dist_i(node, { boundary: menuNode, block: 'nearest', scrollMode: 'if-needed' @@ -56452,7 +56299,7 @@ function getA11yStatusMessage$1(_ref2) { } if (resultCount !== previousResultCount) { - return resultCount + " result" + (resultCount === 1 ? ' is' : 's are') + " available, use up and down arrow keys to navigate. Press Enter key to select."; + return `${resultCount} result${resultCount === 1 ? ' is' : 's are'} available, use up and down arrow keys to navigate. Press Enter key to select.`; } return ''; @@ -56508,7 +56355,7 @@ function getElementProps(element) { function requiredProp(fnName, propName) { // eslint-disable-next-line no-console - console.error("The property \"" + propName + "\" is required in \"" + fnName + "\""); + console.error(`The property "${propName}" is required in "${fnName}"`); } const stateKeys = ['highlightedIndex', 'inputValue', 'isOpen', 'selectedItem', 'type']; @@ -56578,7 +56425,7 @@ function normalizeArrowKey(event) { /* istanbul ignore next (ie) */ if (keyCode >= 37 && keyCode <= 40 && key.indexOf('Arrow') !== 0) { - return "Arrow" + key; + return `Arrow${key}`; } return key; @@ -56805,12 +56652,12 @@ const Downshift = /*#__PURE__*/(() => { super(_props); _this = this; - this.id = this.props.id || "downshift-" + generateId(); - this.menuId = this.props.menuId || this.id + "-menu"; - this.labelId = this.props.labelId || this.id + "-label"; - this.inputId = this.props.inputId || this.id + "-input"; + this.id = this.props.id || `downshift-${generateId()}`; + this.menuId = this.props.menuId || `${this.id}-menu`; + this.labelId = this.props.labelId || `${this.id}-label`; + this.inputId = this.props.inputId || `${this.id}-input`; - this.getItemId = this.props.getItemId || (index => this.id + "-item-" + index); + this.getItemId = this.props.getItemId || (index => `${this.id}-item-${index}`); this.input = null; this.items = []; @@ -57868,7 +57715,7 @@ function validateGetMenuPropsCalledCorrectly(node, _ref3) { if (!node) { // eslint-disable-next-line no-console - console.error("downshift: The ref prop \"" + refKey + "\" from getMenuProps was not applied correctly on your menu element."); + console.error(`downshift: The ref prop "${refKey}" from getMenuProps was not applied correctly on your menu element.`); } } @@ -57884,12 +57731,12 @@ function validateGetRootPropsCalledCorrectly(element, _ref4) { console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps'); } else if (!isComposite && refKeySpecified) { // eslint-disable-next-line no-console - console.error("downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"" + refKey + "\""); + console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${refKey}"`); } if (!isForwardRef(element) && !getElementProps(element)[refKey]) { // eslint-disable-next-line no-console - console.error("downshift: You must apply the ref prop \"" + refKey + "\" from getRootProps onto your root element."); + console.error(`downshift: You must apply the ref prop "${refKey}" from getRootProps onto your root element.`); } } @@ -57927,7 +57774,7 @@ function invokeOnChangeHandler(key, action, state, newState) { props, type } = action; - const handler = "on" + capitalizeString(key) + "Change"; + const handler = `on${capitalizeString(key)}Change`; if (props[handler] && newState[key] !== undefined && newState[key] !== state[key]) { props[handler]({ @@ -57961,7 +57808,7 @@ function getA11ySelectionMessage(selectionParameters) { selectedItem, itemToString: itemToStringLocal } = selectionParameters; - return selectedItem ? itemToStringLocal(selectedItem) + " has been selected." : ''; + return selectedItem ? `${itemToStringLocal(selectedItem)} has been selected.` : ''; } /** * Debounced call for updating the a11y message. @@ -57976,7 +57823,7 @@ const downshift_esm_useIsomorphicLayoutEffect = typeof window !== 'undefined' && function useElementIds(_ref) { let { - id = "downshift-" + generateId(), + id = `downshift-${generateId()}`, labelId, menuId, getItemId, @@ -57984,11 +57831,11 @@ function useElementIds(_ref) { inputId } = _ref; const elementIdsRef = (0,external_React_.useRef)({ - labelId: labelId || id + "-label", - menuId: menuId || id + "-menu", - getItemId: getItemId || (index => id + "-item-" + index), - toggleButtonId: toggleButtonId || id + "-toggle-button", - inputId: inputId || id + "-input" + labelId: labelId || `${id}-label`, + menuId: menuId || `${id}-menu`, + getItemId: getItemId || (index => `${id}-item-${index}`), + toggleButtonId: toggleButtonId || `${id}-toggle-button`, + inputId: inputId || `${id}-input` }); return elementIdsRef.current; } @@ -58014,7 +57861,7 @@ function isAcceptedCharacterKey(key) { } function capitalizeString(string) { - return "" + string.slice(0, 1).toUpperCase() + string.slice(1); + return `${string.slice(0, 1).toUpperCase()}${string.slice(1)}`; } function useLatestRef(val) { @@ -58099,7 +57946,7 @@ function getDefaultValue$1(props, propKey, defaultStateValues) { defaultStateValues = dropdownDefaultStateValues; } - const defaultValue = props["default" + capitalizeString(propKey)]; + const defaultValue = props[`default${capitalizeString(propKey)}`]; if (defaultValue !== undefined) { return defaultValue; @@ -58119,7 +57966,7 @@ function getInitialValue$1(props, propKey, defaultStateValues) { return value; } - const initialValue = props["initial" + capitalizeString(propKey)]; + const initialValue = props[`initial${capitalizeString(propKey)}`]; if (initialValue !== undefined) { return initialValue; @@ -58324,7 +58171,7 @@ function downshiftCommonReducer(state, action, stateChangeTypes) { switch (type) { case stateChangeTypes.ItemMouseMove: changes = { - highlightedIndex: action.index + highlightedIndex: action.disabled ? -1 : action.index }; break; @@ -58539,7 +58386,7 @@ function downshiftSelectReducer(state, action) { case ToggleButtonKeyDownCharacter: { const lowercasedKey = action.key; - const inputValue = "" + state.inputValue + lowercasedKey; + const inputValue = `${state.inputValue}${lowercasedKey}`; const itemIndex = getItemIndexByCharacterKey({ keysSoFar: inputValue, highlightedIndex: state.selectedItem ? props.items.indexOf(state.selectedItem) : -1, @@ -58610,7 +58457,7 @@ function downshiftSelectReducer(state, action) { case MenuKeyDownCharacter: { const lowercasedKey = action.key; - const inputValue = "" + state.inputValue + lowercasedKey; + const inputValue = `${state.inputValue}${lowercasedKey}`; const highlightedIndex = getItemIndexByCharacterKey({ keysSoFar: inputValue, highlightedIndex: state.highlightedIndex, @@ -59049,7 +58896,7 @@ function useSelect(userProps) { id: elementIds.toggleButtonId, 'aria-haspopup': 'listbox', 'aria-expanded': latest.current.state.isOpen, - 'aria-labelledby': elementIds.labelId + " " + elementIds.toggleButtonId, + 'aria-labelledby': `${elementIds.labelId} ${elementIds.toggleButtonId}`, ...rest }; @@ -59069,6 +58916,7 @@ function useSelect(userProps) { onClick, refKey = 'ref', ref, + disabled, ...rest } = _temp5 === void 0 ? {} : _temp5; const { @@ -59084,7 +58932,8 @@ function useSelect(userProps) { shouldScrollRef.current = false; dispatch({ type: ItemMouseMove$1, - index + index, + disabled }); }; @@ -59102,8 +58951,9 @@ function useSelect(userProps) { } const itemProps = { + disabled, role: 'option', - 'aria-selected': "" + (itemIndex === latestState.highlightedIndex), + 'aria-selected': `${itemIndex === latestState.highlightedIndex}`, id: elementIds.getItemId(itemIndex), [refKey]: handleRefs(ref, itemNode => { if (itemNode) { @@ -59113,11 +58963,11 @@ function useSelect(userProps) { ...rest }; - if (!rest.disabled) { - itemProps.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove); + if (!disabled) { itemProps.onClick = callAllEventHandlers(onClick, itemHandleClick); } + itemProps.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove); return itemProps; }, [dispatch, latest, shouldScrollRef, elementIds]); return { @@ -59572,10 +59422,11 @@ function useCombobox(userProps) { }); }, - Escape() { + Escape(event) { const latestState = latest.current.state; if (latestState.isOpen || latestState.inputValue || latestState.selectedItem || latestState.highlightedIndex > -1) { + event.preventDefault(); dispatch({ type: InputKeyDownEscape }); @@ -59637,8 +59488,10 @@ function useCombobox(userProps) { refKey = 'ref', ref, onMouseMove, + onMouseDown, onClick, onPress, + disabled, ...rest } = _temp3 === void 0 ? {} : _temp3; const { @@ -59662,7 +59515,8 @@ function useCombobox(userProps) { shouldScrollRef.current = false; dispatch({ type: ItemMouseMove, - index + index, + disabled }); }; @@ -59671,25 +59525,25 @@ function useCombobox(userProps) { type: ItemClick, index }); - - if (inputRef.current) { - inputRef.current.focus(); - } }; + const itemHandleMouseDown = e => e.preventDefault(); + return { [refKey]: handleRefs(ref, itemNode => { if (itemNode) { itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode; } }), + disabled, role: 'option', - 'aria-selected': "" + (itemIndex === latestState.highlightedIndex), + 'aria-selected': `${itemIndex === latestState.highlightedIndex}`, id: elementIds.getItemId(itemIndex), - ...(!rest.disabled && { - onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove), + ...(!disabled && { [onSelectKey]: callAllEventHandlers(customClickHandler, itemHandleClick) }), + onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove), + onMouseDown: callAllEventHandlers(onMouseDown, itemHandleMouseDown), ...rest }; }, [dispatch, latest, shouldScrollRef, elementIds]); @@ -59970,7 +59824,7 @@ function getA11yRemovalMessage(selectionParameters) { removedSelectedItem, itemToString: itemToStringLocal } = selectionParameters; - return itemToStringLocal(removedSelectedItem) + " has been removed."; + return `${itemToStringLocal(removedSelectedItem)} has been removed.`; } const propTypes = { @@ -61331,7 +61185,7 @@ function disabled_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri /** * External dependencies */ -const StyledWrapper = emotion_styled_base_browser_esm("div", true ? { +const StyledWrapper = createStyled("div", true ? { target: "e1ac3xxk0" } : 0)( true ? { name: "u2jump", @@ -62519,7 +62373,7 @@ function external_link_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You hav * WordPress dependencies */ -const StyledIcon = /*#__PURE__*/emotion_styled_base_browser_esm(icons_build_module_icon, true ? { +const StyledIcon = /*#__PURE__*/createStyled(icons_build_module_icon, true ? { target: "etxm6pv0" } : 0)( true ? { name: "rvs7bx", @@ -64078,10 +63932,10 @@ var Popover_Popover = createComponent({ -const FlyoutContentView = /*#__PURE__*/emotion_styled_base_browser_esm(Popover_Popover, true ? { +const FlyoutContentView = /*#__PURE__*/createStyled(Popover_Popover, true ? { target: "e1vtu5161" } : 0)("z-index:", Flyout, ";box-sizing:border-box;opacity:0;outline:none;position:relative;transform-origin:center center;transition:opacity ", config_values.transitionDurationFastest, " linear;width:100%;&[data-enter]{opacity:1;}&::before,&::after{display:none;}" + ( true ? "" : 0)); -const CardView = /*#__PURE__*/emotion_styled_base_browser_esm(card_component, true ? { +const CardView = /*#__PURE__*/createStyled(card_component, true ? { target: "e1vtu5160" } : 0)(card_body_component.selector, "{max-height:80vh;}" + ( true ? "" : 0)); @@ -64287,34 +64141,34 @@ function focal_point_picker_style_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You -const MediaWrapper = emotion_styled_base_browser_esm("div", true ? { +const MediaWrapper = createStyled("div", true ? { target: "e11wezi78" } : 0)( true ? { name: "1g31405", styles: "background-color:transparent;box-sizing:border-box;text-align:center;width:100%" } : 0); -const MediaContainer = emotion_styled_base_browser_esm("div", true ? { +const MediaContainer = createStyled("div", true ? { target: "e11wezi77" } : 0)( true ? { name: "v0nrlz", styles: "align-items:center;box-sizing:border-box;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.2 );cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;img,video{box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}" } : 0); -const MediaPlaceholder = emotion_styled_base_browser_esm("div", true ? { +const MediaPlaceholder = createStyled("div", true ? { target: "e11wezi76" } : 0)("background:", COLORS.lightGray[300], ";box-sizing:border-box;height:170px;max-width:280px;min-width:200px;width:100%;" + ( true ? "" : 0)); -const focal_point_picker_style_UnitControl = /*#__PURE__*/emotion_styled_base_browser_esm(unit_control, true ? { +const focal_point_picker_style_UnitControl = /*#__PURE__*/createStyled(unit_control, true ? { target: "e11wezi75" } : 0)( true ? { name: "1pzk433", styles: "width:100px" } : 0); -const ControlWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? { +const ControlWrapper = /*#__PURE__*/createStyled(flex_component, true ? { target: "e11wezi74" } : 0)( true ? { name: "ox4xcy", styles: "max-width:320px;padding:1em 0" } : 0); -const GridView = emotion_styled_base_browser_esm("div", true ? { +const GridView = createStyled("div", true ? { target: "e11wezi73" } : 0)("box-sizing:border-box;left:50%;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 120ms linear;z-index:1;", _ref => { let { @@ -64324,19 +64178,19 @@ const GridView = emotion_styled_base_browser_esm("div", true ? { opacity: 1; `; }, ";" + ( true ? "" : 0)); -const GridLine = emotion_styled_base_browser_esm("div", true ? { +const GridLine = createStyled("div", true ? { target: "e11wezi72" } : 0)( true ? { name: "1sy4ch9", styles: "box-sizing:border-box;background:white;box-shadow:0 0 2px rgba( 0, 0, 0, 0.6 );position:absolute;opacity:0.4;transform:translateZ( 0 )" } : 0); -const GridLineX = /*#__PURE__*/emotion_styled_base_browser_esm(GridLine, true ? { +const GridLineX = /*#__PURE__*/createStyled(GridLine, true ? { target: "e11wezi71" } : 0)( true ? { name: "1qp910y", styles: "height:1px;left:0;right:0" } : 0); -const GridLineY = /*#__PURE__*/emotion_styled_base_browser_esm(GridLine, true ? { +const GridLineY = /*#__PURE__*/createStyled(GridLine, true ? { target: "e11wezi70" } : 0)( true ? { name: "1oz3zka", @@ -64476,7 +64330,7 @@ function focal_point_style_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have t */ -const FocalPointWrapper = emotion_styled_base_browser_esm("div", true ? { +const FocalPointWrapper = createStyled("div", true ? { target: "eas61re3" } : 0)("background-color:transparent;box-sizing:border-box;cursor:grab;height:30px;margin:-15px 0 0 -15px;opacity:0.8;position:absolute;user-select:none;width:30px;will-change:transform;z-index:10000;", _ref => { let { @@ -64484,19 +64338,19 @@ const FocalPointWrapper = emotion_styled_base_browser_esm("div", true ? { } = _ref; return isDragging && 'cursor: grabbing;'; }, ";" + ( true ? "" : 0)); -const PointerIconSVG = /*#__PURE__*/emotion_styled_base_browser_esm(external_wp_primitives_namespaceObject.SVG, true ? { +const PointerIconSVG = /*#__PURE__*/createStyled(external_wp_primitives_namespaceObject.SVG, true ? { target: "eas61re2" } : 0)( true ? { name: "qkx60y", styles: "display:block;height:100%;left:0;position:absolute;top:0;width:100%" } : 0); -const PointerIconPathOutline = /*#__PURE__*/emotion_styled_base_browser_esm(external_wp_primitives_namespaceObject.Path, true ? { +const PointerIconPathOutline = /*#__PURE__*/createStyled(external_wp_primitives_namespaceObject.Path, true ? { target: "eas61re1" } : 0)( true ? { name: "1b3qpiw", styles: "fill:white" } : 0); -const PointerIconPathFill = /*#__PURE__*/emotion_styled_base_browser_esm(external_wp_primitives_namespaceObject.Path, true ? { +const PointerIconPathFill = /*#__PURE__*/createStyled(external_wp_primitives_namespaceObject.Path, true ? { target: "eas61re0" } : 0)("fill:", COLORS.blue.wordpress[700], ";fill:", COLORS.ui.theme, ";" + ( true ? "" : 0)); @@ -65217,7 +65071,7 @@ const toggle_group_control_styles_block = true ? { name: "7whenc", styles: "display:flex;width:100%" } : 0; -const BackdropView = emotion_styled_base_browser_esm("div", true ? { +const BackdropView = createStyled("div", true ? { target: "eakva830" } : 0)("background:", COLORS.gray[900], ";border-radius:", config_values.controlBorderRadius, ";box-shadow:", config_values.toggleGroupControlBackdropBoxShadow, ";left:0;position:absolute;top:2px;bottom:2px;transition:transform ", config_values.transitionDurationFast, " ease;", reduceMotion('transition'), " z-index:1;" + ( true ? "" : 0)); @@ -65625,7 +65479,7 @@ function toggle_group_control_option_base_styles_EMOTION_STRINGIFIED_CSS_ERROR_( * Internal dependencies */ -const LabelView = emotion_styled_base_browser_esm("div", true ? { +const LabelView = createStyled("div", true ? { target: "et6ln9s1" } : 0)( true ? { name: "sln1fl", @@ -65637,7 +65491,7 @@ const labelBlock = true ? { } : 0; const buttonView = /*#__PURE__*/emotion_react_browser_esm_css("align-items:center;appearance:none;background:transparent;border:none;border-radius:", config_values.controlBorderRadius, ";color:", COLORS.gray[700], ";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ", config_values.transitionDurationFast, " linear,color ", config_values.transitionDurationFast, " linear,font-weight 60ms linear;", reduceMotion('transition'), " user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:", config_values.toggleGroupControlBackgroundColor, ";}" + ( true ? "" : 0), true ? "" : 0); const buttonActive = /*#__PURE__*/emotion_react_browser_esm_css("color:", COLORS.white, ";&:active{background:transparent;}" + ( true ? "" : 0), true ? "" : 0); -const ButtonContentView = emotion_styled_base_browser_esm("div", true ? { +const ButtonContentView = createStyled("div", true ? { target: "et6ln9s0" } : 0)("font-size:", config_values.fontSize, ";line-height:1;" + ( true ? "" : 0)); const separatorActive = true ? { @@ -67723,53 +67577,53 @@ function navigation_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have t -const NavigationUI = emotion_styled_base_browser_esm("div", true ? { +const NavigationUI = createStyled("div", true ? { target: "ejwewyf11" } : 0)("width:100%;box-sizing:border-box;padding:0 ", space(4), ";overflow:hidden;" + ( true ? "" : 0)); -const MenuUI = emotion_styled_base_browser_esm("div", true ? { +const MenuUI = createStyled("div", true ? { target: "ejwewyf10" } : 0)("margin-top:", space(6), ";margin-bottom:", space(6), ";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:", space(6), ";}.components-navigation__group+.components-navigation__group{margin-top:", space(6), ";}" + ( true ? "" : 0)); -const MenuBackButtonUI = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_button, true ? { +const MenuBackButtonUI = /*#__PURE__*/createStyled(build_module_button, true ? { target: "ejwewyf9" } : 0)( true ? { name: "26l0q2", styles: "&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}" } : 0); -const MenuTitleUI = emotion_styled_base_browser_esm("div", true ? { +const MenuTitleUI = createStyled("div", true ? { target: "ejwewyf8" } : 0)( true ? { name: "1aubja5", styles: "overflow:hidden;width:100%" } : 0); -const MenuTitleActionsUI = emotion_styled_base_browser_esm("span", true ? { +const MenuTitleActionsUI = createStyled("span", true ? { target: "ejwewyf7" } : 0)("height:", space(6), ";.components-button.is-small{color:inherit;opacity:0.7;margin-right:", space(1), ";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}" + ( true ? "" : 0)); -const MenuTitleSearchUI = /*#__PURE__*/emotion_styled_base_browser_esm(search_control, true ? { +const MenuTitleSearchUI = /*#__PURE__*/createStyled(search_control, true ? { target: "ejwewyf6" } : 0)( true ? { name: "za3n3e", styles: "input[type='search'].components-search-control__input{margin:0;background:#303030;color:#fff;&:focus{background:#434343;color:#fff;}&::placeholder{color:rgba( 255, 255, 255, 0.6 );}}svg{fill:white;}.components-button.has-icon{padding:0;min-width:auto;}" } : 0); -const GroupTitleUI = /*#__PURE__*/emotion_styled_base_browser_esm(heading_component, true ? { +const GroupTitleUI = /*#__PURE__*/createStyled(heading_component, true ? { target: "ejwewyf5" } : 0)("min-height:", space(12), ";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:", space(2), ";padding:", () => (0,external_wp_i18n_namespaceObject.isRTL)() ? `${space(1)} ${space(4)} ${space(1)} ${space(2)}` : `${space(1)} ${space(2)} ${space(1)} ${space(4)}`, ";" + ( true ? "" : 0)); -const ItemBaseUI = emotion_styled_base_browser_esm("li", true ? { +const ItemBaseUI = createStyled("li", true ? { target: "ejwewyf4" } : 0)("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:", space(2), " ", space(4), ";", rtl({ textAlign: 'left' }, { textAlign: 'right' }), " &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:", UI.theme, ";color:", BASE.white, ";>button,>a{color:", BASE.white, ";opacity:1;}}>svg path{color:", G2.lightGray.ui, ";}" + ( true ? "" : 0)); -const ItemUI = emotion_styled_base_browser_esm("div", true ? { +const ItemUI = createStyled("div", true ? { target: "ejwewyf3" } : 0)("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:", space(1.5), " ", space(4), ";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;" + ( true ? "" : 0)); -const ItemIconUI = emotion_styled_base_browser_esm("span", true ? { +const ItemIconUI = createStyled("span", true ? { target: "ejwewyf2" } : 0)("display:flex;margin-right:", space(2), ";" + ( true ? "" : 0)); -const ItemBadgeUI = emotion_styled_base_browser_esm("span", true ? { +const ItemBadgeUI = createStyled("span", true ? { target: "ejwewyf1" } : 0)("margin-left:", () => (0,external_wp_i18n_namespaceObject.isRTL)() ? '0' : space(2), ";margin-right:", () => (0,external_wp_i18n_namespaceObject.isRTL)() ? space(2) : '0', ";display:inline-flex;padding:", space(1), " ", space(3), ";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}", reduceMotion('animation'), ";" + ( true ? "" : 0)); -const ItemTitleUI = /*#__PURE__*/emotion_styled_base_browser_esm(text_component, true ? { +const ItemTitleUI = /*#__PURE__*/createStyled(text_component, true ? { target: "ejwewyf0" } : 0)(() => (0,external_wp_i18n_namespaceObject.isRTL)() ? 'margin-left: auto;' : 'margin-right: auto;', " font-size:14px;line-height:20px;color:inherit;" + ( true ? "" : 0)); @@ -71163,24 +71017,24 @@ function resize_tooltip_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You ha */ -const resize_tooltip_styles_Root = emotion_styled_base_browser_esm("div", true ? { +const resize_tooltip_styles_Root = createStyled("div", true ? { target: "ekdag503" } : 0)( true ? { name: "1cd7zoc", styles: "bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0" } : 0); -const TooltipWrapper = emotion_styled_base_browser_esm("div", true ? { +const TooltipWrapper = createStyled("div", true ? { target: "ekdag502" } : 0)( true ? { name: "ajymcs", styles: "align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear" } : 0); -const resize_tooltip_styles_Tooltip = emotion_styled_base_browser_esm("div", true ? { +const resize_tooltip_styles_Tooltip = createStyled("div", true ? { target: "ekdag501" } : 0)("background:", COLORS.ui.border, ";border-radius:2px;box-sizing:border-box;font-size:12px;color:", COLORS.ui.textDark, ";padding:4px 8px;position:relative;" + ( true ? "" : 0)); // TODO: Resolve need to use &&& to increase specificity // https://github.com/WordPress/gutenberg/issues/18483 -const LabelText = /*#__PURE__*/emotion_styled_base_browser_esm(text_component, true ? { +const LabelText = /*#__PURE__*/createStyled(text_component, true ? { target: "ekdag500" } : 0)("&&&{color:", COLORS.ui.textDark, ";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}" + ( true ? "" : 0)); @@ -71935,17 +71789,17 @@ const spinAnimation = emotion_react_browser_esm_keyframes` transform: rotate(360deg); } `; -const StyledSpinner = emotion_styled_base_browser_esm("svg", true ? { +const StyledSpinner = createStyled("svg", true ? { target: "e1bj2jdf2" } : 0)("width:", config_values.spinnerSize, "px;height:", config_values.spinnerSize, "px;display:inline-block;margin:5px 11px 0;position:relative;color:var( --wp-admin-theme-color );overflow:visible;" + ( true ? "" : 0)); const commonPathProps = true ? { name: "9s4963", styles: "fill:transparent;stroke-width:1.5px" } : 0; -const SpinnerTrack = emotion_styled_base_browser_esm("circle", true ? { +const SpinnerTrack = createStyled("circle", true ? { target: "e1bj2jdf1" } : 0)(commonPathProps, ";stroke:", COLORS.gray[300], ";" + ( true ? "" : 0)); -const SpinnerIndicator = emotion_styled_base_browser_esm("path", true ? { +const SpinnerIndicator = createStyled("path", true ? { target: "e1bj2jdf0" } : 0)(commonPathProps, ";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ", spinAnimation, ";" + ( true ? "" : 0)); @@ -72281,7 +72135,7 @@ const inputControl = /*#__PURE__*/emotion_react_browser_esm_css("font-family:", * Internal dependencies */ -const StyledTextarea = emotion_styled_base_browser_esm("textarea", true ? { +const StyledTextarea = createStyled("textarea", true ? { target: "ebk7yr50" } : 0)("width:100%;", inputControl, ";" + ( true ? "" : 0)); @@ -74283,13 +74137,13 @@ function z_stack_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have trie * Internal dependencies */ -const ZStackView = emotion_styled_base_browser_esm("div", true ? { +const ZStackView = createStyled("div", true ? { target: "ebn2ljm1" } : 0)( true ? { name: "5ob2ly", styles: "display:flex;position:relative" } : 0); -const ZStackChildView = emotion_styled_base_browser_esm("div", true ? { +const ZStackChildView = createStyled("div", true ? { target: "ebn2ljm0" } : 0)(_ref => { let { diff --git a/wp-includes/js/dist/components.min.js b/wp-includes/js/dist/components.min.js index 1eb98a0c08..69aee91481 100644 --- a/wp-includes/js/dist/components.min.js +++ b/wp-includes/js/dist/components.min.js @@ -4,7 +4,7 @@ Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s0?!0===a?r.scrollTop(t,b.top+w.top):!1===a?r.scrollTop(t,b.top+_.top):w.top<0?r.scrollTop(t,b.top+w.top):r.scrollTop(t,b.top+_.top):i||((a=void 0===a||!!a)?r.scrollTop(t,b.top+w.top):r.scrollTop(t,b.top+_.top)),o&&(w.left<0||_.left>0?!0===s?r.scrollLeft(t,b.left+w.left):!1===s?r.scrollLeft(t,b.left+_.left):w.left<0?r.scrollLeft(t,b.left+w.left):r.scrollLeft(t,b.left+_.left):i||((s=void 0===s||!!s)?r.scrollLeft(t,b.left+w.left):r.scrollLeft(t,b.left+_.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s0?!0===a?r.scrollTop(t,b.top+w.top):!1===a?r.scrollTop(t,b.top+_.top):w.top<0?r.scrollTop(t,b.top+w.top):r.scrollTop(t,b.top+_.top):i||((a=void 0===a||!!a)?r.scrollTop(t,b.top+w.top):r.scrollTop(t,b.top+_.top)),o&&(w.left<0||_.left>0?!0===s?r.scrollLeft(t,b.left+w.left):!1===s?r.scrollLeft(t,b.left+_.left):w.left<0?r.scrollLeft(t,b.left+w.left):r.scrollLeft(t,b.left+_.left):i||((s=void 0===s||!!s)?r.scrollLeft(t,b.left+w.left):r.scrollLeft(t,b.left+_.left)))}},5425:function(e,t,n){"use strict";e.exports=n(1345)},5022:function(e){"use strict";var t=Object.assign||function(e){for(var t=1;t1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=u(e,Symbol.toPrimitive):s(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(a(e)||s(e))&&(n="string"),l(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},9930:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(t+i);for(var a,s=n.call(arguments,1),l=function(){if(this instanceof a){var t=i.apply(this,s.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,s.concat(n.call(arguments)))},u=Math.max(0,i.length-s.length),c=[],d=0;d1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=P(e),r=n.length>0?n[0]:"",i=O("%"+r+"%",t),s=i.name,u=i.value,c=!1,d=i.alias;d&&(r=d[0],x(n,_([0,1],d)));for(var f=1,p=!0;f=n.length){var y=l(u,h);u=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[h]}else p=w(u,h),u=u[h];p&&!c&&(g[s]=u)}}return u}},5371:function(e,t,n){"use strict";var r=n(9170),o=n(3082),i="__ global cache key __";"function"==typeof Symbol&&o(Symbol("foo"))&&"function"==typeof Symbol.for&&(i=Symbol.for(i));var a=function(){return!0},s=function(){if(!n.g[i]){var e={};e[i]={};var t={};t[i]=a,r(n.g,e,t)}return n.g[i]},l=s(),u=function(e){return o(e)?Symbol.prototype.valueOf.call(e):typeof e+" | "+String(e)},c=function(e){if(!function(e){return null===e||"object"!=typeof e&&"function"!=typeof e}(e))throw new TypeError("key must not be an object")},d={clear:function(){delete n.g[i],l=s()},delete:function(e){return c(e),delete l[u(e)],!d.has(e)},get:function(e){return c(e),l[u(e)]},has:function(e){return c(e),u(e)in l},set:function(e,t){c(e);var n=u(e),o={};o[n]=t;var i={};return i[n]=a,r(l,o,i),d.has(e)},setIfMissingThenGet:function(e,t){if(d.has(e))return d.get(e);var n=t();return d.set(e,n),n}};e.exports=d},7115:function(e,t){var n={};n.parse=function(){var e=/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,t=/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,n=/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,r=/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,i=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,a=/^(left|center|right|top|bottom)/i,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,d=/^\(/,f=/^\)/,p=/^,/,h=/^\#([0-9a-fA-F]+)/,m=/^([a-zA-Z]+)/,v=/^rgb/i,g=/^rgba/i,y=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,b="";function w(e){var t=new Error(b+": "+e);throw t.source=b,t}function _(){var e=I(x);return b.length>0&&w("Invalid input not EOF"),e}function x(){return E("linear-gradient",e,S)||E("repeating-linear-gradient",t,S)||E("radial-gradient",n,C)||E("repeating-radial-gradient",r,C)}function E(e,t,n){return k(t,(function(t){var r=n();return r&&(L(p)||w("Missing comma before color stops")),{type:e,orientation:r,colorStops:I(T)}}))}function k(e,t){var n=L(e);if(n)return L(d)||w("Missing ("),result=t(n),L(f)||w("Missing )"),result}function S(){return N("directional",o,1)||N("angular",c,1)}function C(){var e,t,n=P();return n&&((e=[]).push(n),t=b,L(p)&&((n=P())?e.push(n):b=t)),e}function P(){var e=function(){var e=N("shape",/^(circle)/i,0);e&&(e.style=R()||O());return e}()||function(){var e=N("shape",/^(ellipse)/i,0);e&&(e.style=A()||O());return e}();if(e)e.at=function(){if(N("position",/^at/,0)){var e=M();return e||w("Missing positioning value"),e}}();else{var t=M();t&&(e={type:"default-radial",at:t})}return e}function O(){return N("extent-keyword",i,1)}function M(){var e={x:A(),y:A()};if(e.x||e.y)return{type:"position",value:e}}function I(e){var t=e(),n=[];if(t)for(n.push(t);L(p);)(t=e())?n.push(t):w("One extra comma");return n}function T(){var e=N("hex",h,1)||k(g,(function(){return{type:"rgba",value:I(D)}}))||k(v,(function(){return{type:"rgb",value:I(D)}}))||N("literal",m,0);return e||w("Expected color definition"),e.length=A(),e}function D(){return L(y)[1]}function A(){return N("%",l,1)||N("position-keyword",a,1)||R()}function R(){return N("px",s,1)||N("em",u,1)}function N(e,t,n){var r=L(t);if(r)return{type:e,value:r[n]}}function L(e){var t,n;return(n=/^[\n\r\t\s]+/.exec(b))&&F(n[0].length),(t=e.exec(b))&&F(t[0].length),t}function F(e){b=b.substr(e)}return function(e){return b=e.toString(),_()}}(),t.parse=(n||{}).parse},8198:function(e,t,n){"use strict";var r=n(3010)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},3010:function(e,t,n){"use strict";var r,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var u=function(){throw new a},c=l?function(){try{return u}catch(e){try{return l(arguments,"callee").get}catch(e){return u}}}():u,d=n(1779)(),f=Object.getPrototypeOf||function(e){return e.__proto__},p={},h="undefined"==typeof Uint8Array?r:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?f(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":c,"%TypedArray%":h,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},v=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return m[t]=n,n},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n(1930),b=n(9284),w=y.call(Function.call,Array.prototype.concat),_=y.call(Function.apply,Array.prototype.splice),x=y.call(Function.call,String.prototype.replace),E=y.call(Function.call,String.prototype.slice),k=y.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,P=function(e){var t=E(e,0,1),n=E(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return x(e,S,(function(e,t,n,o){r[r.length]=n?x(o,C,"$1"):t||e})),r},O=function(e,t){var n,r=e;if(b(g,r)&&(r="%"+(n=g[r])[0]+"%"),b(m,r)){var i=m[r];if(i===p&&(i=v(r)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/g,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=P(e),r=n.length>0?n[0]:"",i=O("%"+r+"%",t),s=i.name,u=i.value,c=!1,d=i.alias;d&&(r=d[0],_(n,w([0,1],d)));for(var f=1,p=!0;f=n.length){var y=l(u,h);u=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[h]}else p=b(u,h),u=u[h];p&&!c&&(m[s]=u)}}return u}},1779:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(8030);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},8030:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9284:function(e,t,n){"use strict";var r=n(1930);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},3138:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,a=void 0!==i&&i,s=e.findChunks,l=void 0===s?r:s,u=e.sanitize,c=e.searchWords,d=e.textToHighlight;return o({chunksToHighlight:n({chunks:l({autoEscape:t,caseSensitive:a,sanitize:u,searchWords:c,textToHighlight:d})}),totalLength:d?d.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t=t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,a=e.searchWords,s=e.textToHighlight;return s=o(s),a.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),a=void 0;a=i.exec(s);){var l=a.index,u=i.lastIndex;u>l&&e.push({highlight:!1,start:l,end:u}),a.index===i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r};function i(e){return e}}])},1281:function(e,t,n){"use strict";var r=n(338),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v=t||n<0||v&&e-h>=c}function _(){var e=o();if(w(e))return x(e);f=setTimeout(_,function(e){var n=t-(e-p);return v?s(n,c-(e-h)):n}(e))}function x(e){return f=void 0,g&&l?y(e):(l=u=void 0,d)}function E(){var e=o(),n=w(e);if(l=arguments,u=this,p=e,n){if(void 0===f)return b(p);if(v)return clearTimeout(f),f=setTimeout(_,t),y(p)}return void 0===f&&(f=setTimeout(_,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(i(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=p=u=f=void 0},E.flush=function(){return void 0===f?d:x(o())},E}},3619:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1653:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1878:function(e,t,n){var r=n(194),o=n(1653);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},8253:function(e,t,n){var r=n(158);e.exports=function(){return r.Date.now()}},8172:function(e,t,n){var r=n(6897),o=n(3619);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},5053:function(e,t,n){var r=n(2383),o=n(3619),i=n(1878),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9756:function(e){e.exports=function(e,t){var n,r,o=0;function i(){var i,a,s=n,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a0&&!o.call(e,0))for(var m=0;m0)for(var v=0;v=0&&"[object Function]"===t.call(e.callee)),r}},2148:function(e,t,n){"use strict";var r=n(806),o=function(e){return null!=e},i=n(5682)(),a=n(7615),s=Object,l=a("Array.prototype.push"),u=a("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(!o(e))throw new TypeError("target must be an object");var n,a,d,f,p,h,m,v=s(e);for(n=1;n1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=C(e),r=n.length>0?n[0]:"",o=P("%"+r+"%",t),i=o.name,s=o.value,u=!1,c=o.alias;c&&(r=c[0],x(n,_([0,1],c)));for(var d=1,f=!0;d=n.length){var h=l(s,p);if(f=!!h,!t&&!(p in s))throw new a("base intrinsic for "+e+" exists, but the property is not available.");s=f&&"get"in h&&!("originalValue"in h.get)?h.get:s[p]}else f=w(s,p),s=s[p];f&&!u&&(g[i]=s)}}return s}},779:function(e,t,n){"use strict";var r=n(1631);e.exports=function(){return"function"==typeof Object.values?Object.values:r}},7256:function(e,t,n){"use strict";var r=n(779),o=n(9170);e.exports=function(){var e=r();return o(Object,{values:e},{values:function(){return Object.values!==e}}),e}},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2541:function(e){"use strict";var t=Object.prototype.hasOwnProperty;function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function r(e,r){if(n(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var o=Object.keys(e),i=Object.keys(r);if(o.length!==i.length)return!1;for(var a=0;a=o&&i0&&this.setState({visibleDays:(0,i.default)({},E,T)})}},{key:"componentWillUpdate",value:function(){this.today=(0,c.default)()}},{key:"onDayClick",value:function(e,t){if(t&&t.preventDefault(),!this.isBlocked(e)){var n=this.props,r=n.onDateChange,o=n.keepOpenOnDateSelect,i=n.onFocusChange,a=n.onClose;r(e),o||(i({focused:!1}),a({date:e}))}}},{key:"onDayMouseEnter",value:function(e){if(!this.isTouchDevice){var t=this.state,n=t.hoverDate,r=t.visibleDays,o=this.deleteModifier({},n,"hovered");o=this.addModifier(o,e,"hovered"),this.setState({hoverDate:e,visibleDays:(0,i.default)({},r,o)})}}},{key:"onDayMouseLeave",value:function(){var e=this.state,t=e.hoverDate,n=e.visibleDays;if(!this.isTouchDevice&&t){var r=this.deleteModifier({},t,"hovered");this.setState({hoverDate:null,visibleDays:(0,i.default)({},n,r)})}}},{key:"onPrevMonthClick",value:function(){var e=this.props,t=e.onPrevMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,o=this.state,a=o.currentMonth,s=o.visibleDays,l={};Object.keys(s).sort().slice(0,n+1).forEach((function(e){l[e]=s[e]}));var u=a.clone().subtract(1,"month"),c=(0,g.default)(u,1,r);this.setState({currentMonth:u,visibleDays:(0,i.default)({},l,this.getModifiers(c))},(function(){t(u.clone())}))}},{key:"onNextMonthClick",value:function(){var e=this.props,t=e.onNextMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,o=this.state,a=o.currentMonth,s=o.visibleDays,l={};Object.keys(s).sort().slice(1).forEach((function(e){l[e]=s[e]}));var u=a.clone().add(n,"month"),c=(0,g.default)(u,1,r),d=a.clone().add(1,"month");this.setState({currentMonth:d,visibleDays:(0,i.default)({},l,this.getModifiers(c))},(function(){t(d.clone())}))}},{key:"onMonthChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===k.VERTICAL_SCROLLABLE,i=(0,g.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(i)})}},{key:"onYearChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===k.VERTICAL_SCROLLABLE,i=(0,g.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(i)})}},{key:"getFirstFocusableDay",value:function(e){var t=this,n=this.props,o=n.date,i=n.numberOfMonths,a=e.clone().startOf("month");if(o&&(a=o.clone()),this.isBlocked(a)){for(var s=[],l=e.clone().add(i-1,"months").endOf("month"),u=a.clone();!(0,v.default)(u,l);)u=u.clone().add(1,"day"),s.push(u);var c=s.filter((function(e){return!t.isBlocked(e)&&(0,v.default)(e,a)}));if(c.length>0){var d=r(c,1);a=d[0]}}return a}},{key:"getModifiers",value:function(e){var t=this,n={};return Object.keys(e).forEach((function(r){n[r]={},e[r].forEach((function(e){n[r][(0,b.default)(e)]=t.getModifiersForDay(e)}))})),n}},{key:"getModifiersForDay",value:function(e){var t=this;return new Set(Object.keys(this.modifiers).filter((function(n){return t.modifiers[n](e)})))}},{key:"getStateForNewMonth",value:function(e){var t=this,n=e.initialVisibleMonth,r=e.date,o=e.numberOfMonths,i=e.enableOutsideDays,a=(n||(r?function(){return r}:function(){return t.today}))();return{currentMonth:a,visibleDays:this.getModifiers((0,g.default)(a,o,i))}}},{key:"addModifier",value:function(e,t,n){var r=this.props,o=r.numberOfMonths,a=r.enableOutsideDays,s=r.orientation,l=this.state,u=l.currentMonth,c=l.visibleDays,d=u,f=o;if(s===k.VERTICAL_SCROLLABLE?f=Object.keys(c).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,y.default)(t,d,f,a))return e;var p=(0,b.default)(t),h=(0,i.default)({},e);if(a)h=Object.keys(c).filter((function(e){return Object.keys(c[e]).indexOf(p)>-1})).reduce((function(t,r){var o=e[r]||c[r],a=new Set(o[p]);return a.add(n),(0,i.default)({},t,P({},r,(0,i.default)({},o,P({},p,a))))}),h);else{var m=(0,w.default)(t),v=e[m]||c[m],g=new Set(v[p]);g.add(n),h=(0,i.default)({},h,P({},m,(0,i.default)({},v,P({},p,g))))}return h}},{key:"deleteModifier",value:function(e,t,n){var r=this.props,o=r.numberOfMonths,a=r.enableOutsideDays,s=r.orientation,l=this.state,u=l.currentMonth,c=l.visibleDays,d=u,f=o;if(s===k.VERTICAL_SCROLLABLE?f=Object.keys(c).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,y.default)(t,d,f,a))return e;var p=(0,b.default)(t),h=(0,i.default)({},e);if(a)h=Object.keys(c).filter((function(e){return Object.keys(c[e]).indexOf(p)>-1})).reduce((function(t,r){var o=e[r]||c[r],a=new Set(o[p]);return a.delete(n),(0,i.default)({},t,P({},r,(0,i.default)({},o,P({},p,a))))}),h);else{var m=(0,w.default)(t),v=e[m]||c[m],g=new Set(v[p]);g.delete(n),h=(0,i.default)({},h,P({},m,(0,i.default)({},v,P({},p,g))))}return h}},{key:"isBlocked",value:function(e){var t=this.props,n=t.isDayBlocked,r=t.isOutsideRange;return n(e)||r(e)}},{key:"isHovered",value:function(e){var t=(this.state||{}).hoverDate;return(0,m.default)(e,t)}},{key:"isSelected",value:function(e){var t=this.props.date;return(0,m.default)(e,t)}},{key:"isToday",value:function(e){return(0,m.default)(e,this.today)}},{key:"isFirstDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===(t||c.default.localeData().firstDayOfWeek())}},{key:"isLastDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===((t||c.default.localeData().firstDayOfWeek())+6)%7}},{key:"render",value:function(){var e=this.props,t=e.numberOfMonths,n=e.orientation,r=e.monthFormat,o=e.renderMonthText,i=e.navPrev,s=e.navNext,l=e.onOutsideClick,u=e.withPortal,c=e.focused,d=e.enableOutsideDays,f=e.hideKeyboardShortcutsPanel,p=e.daySize,h=e.firstDayOfWeek,m=e.renderCalendarDay,v=e.renderDayContents,g=e.renderCalendarInfo,y=e.renderMonthElement,b=e.calendarInfoPosition,w=e.isFocused,_=e.isRTL,x=e.phrases,E=e.dayAriaLabelFormat,k=e.onBlur,C=e.showKeyboardShortcuts,P=e.weekDayFormat,O=e.verticalHeight,M=e.noBorder,I=e.transitionDuration,T=e.verticalBorderSpacing,D=e.horizontalMonthPadding,A=this.state,R=A.currentMonth,N=A.visibleDays;return a.default.createElement(S.default,{orientation:n,enableOutsideDays:d,modifiers:N,numberOfMonths:t,onDayClick:this.onDayClick,onDayMouseEnter:this.onDayMouseEnter,onDayMouseLeave:this.onDayMouseLeave,onPrevMonthClick:this.onPrevMonthClick,onNextMonthClick:this.onNextMonthClick,onMonthChange:this.onMonthChange,onYearChange:this.onYearChange,monthFormat:r,withPortal:u,hidden:!c,hideKeyboardShortcutsPanel:f,initialVisibleMonth:function(){return R},firstDayOfWeek:h,onOutsideClick:l,navPrev:i,navNext:s,renderMonthText:o,renderCalendarDay:m,renderDayContents:v,renderCalendarInfo:g,renderMonthElement:y,calendarInfoPosition:b,isFocused:w,getFirstFocusableDay:this.getFirstFocusableDay,onBlur:k,phrases:x,daySize:p,isRTL:_,showKeyboardShortcuts:C,weekDayFormat:P,dayAriaLabelFormat:E,verticalHeight:O,noBorder:M,transitionDuration:I,verticalBorderSpacing:T,horizontalMonthPadding:D})}}]),t}(a.default.Component);t.Z=I,I.propTypes=O,I.defaultProps=M},5820:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t2?n-2:0),o=2;o2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e)return 0;var o="width"===t?"Left":"Top",i="width"===t?"Right":"Bottom",a=!n||r?window.getComputedStyle(e):null,s=e.offsetWidth,l=e.offsetHeight,u="width"===t?s:l;n||(u-=parseFloat(a["padding"+o])+parseFloat(a["padding"+i])+parseFloat(a["border"+o+"Width"])+parseFloat(a["border"+i+"Width"]));r&&(u+=parseFloat(a["margin"+o])+parseFloat(a["margin"+i]));return u}},5814:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return"undefined"!=typeof document&&document.activeElement}},7475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){var s=o.chooseAvailableDate,l=o.dateIsUnavailable,u=o.dateIsSelected,c={width:n,height:n-1},d=r.has("blocked-minimum-nights")||r.has("blocked-calendar")||r.has("blocked-out-of-range"),f=r.has("selected")||r.has("selected-start")||r.has("selected-end"),p=!f&&(r.has("hovered-span")||r.has("after-hovered-start")),h=r.has("blocked-out-of-range"),m={date:e.format(t)},v=(0,i.default)(s,m);r.has(a.BLOCKED_MODIFIER)?v=(0,i.default)(l,m):f&&(v=(0,i.default)(u,m));return{daySizeStyles:c,useDefaultCursor:d,selected:f,hoveredSpan:p,isOutsideRange:h,ariaLabel:v}};var r,o=n(7098),i=(r=o)&&r.__esModule?r:{default:r},a=n(257)},5644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.default.localeData().firstDayOfWeek();if(!i.default.isMoment(e)||!e.isValid())throw new TypeError("`month` must be a valid moment object");if(-1===a.WEEKDAYS.indexOf(n))throw new TypeError("`firstDayOfWeek` must be an integer between 0 and 6");for(var r=e.clone().startOf("month").hour(12),o=e.clone().endOf("month").hour(12),s=(r.day()+7-n)%7,l=(n+6-o.day())%7,u=r.clone().subtract(s,"day"),c=o.clone().add(l,"day"),d=c.diff(u,"days")+1,f=u.clone(),p=[],h=0;h=s&&h1&&void 0!==arguments[1]?arguments[1]:i.default.localeData().firstDayOfWeek(),n=e.clone().startOf("month"),r=a(n,t);return Math.ceil((r+e.daysInMonth())/7)};var r,o=n(6292),i=(r=o)&&r.__esModule?r:{default:r};function a(e,t){return(e.day()-t+7)%7}},7098:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"==typeof e)return e;if("function"==typeof e)return e(t);return""}},2893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce((function(e,t){return(0,r.default)({},e,function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({},t,o.default.oneOfType([o.default.string,o.default.func,o.default.node])))}),{})};var r=i(n(4011)),o=i(n(2652));function i(e){return e&&e.__esModule?e:{default:e}}},8304:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{transform:e,msTransform:e,MozTransform:e,WebkitTransform:e}}},3268:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){if(!r.default.isMoment(e))return{};for(var a={},s=i?e.clone():e.clone().subtract(1,"month"),l=0;l<(i?t:t+2);l+=1){var u=[],c=s.clone(),d=c.clone().startOf("month").hour(12),f=c.clone().endOf("month").hour(12),p=d.clone();if(n)for(var h=0;h1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=u(e,Symbol.toPrimitive):s(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(a(e)||s(e))&&(n="string"),l(e,"default"===n?"number":n)}},3777:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},9930:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(t+i);for(var a,s=n.call(arguments,1),l=function(){if(this instanceof a){var t=i.apply(this,s.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,s.concat(n.call(arguments)))},u=Math.max(0,i.length-s.length),c=[],d=0;d1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=P(e),r=n.length>0?n[0]:"",i=O("%"+r+"%",t),s=i.name,u=i.value,c=!1,d=i.alias;d&&(r=d[0],x(n,_([0,1],d)));for(var f=1,p=!0;f=n.length){var y=l(u,h);u=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[h]}else p=w(u,h),u=u[h];p&&!c&&(g[s]=u)}}return u}},5077:function(e,t,n){"use strict";var r=n(9170),o=n(3082),i="__ global cache key __";"function"==typeof Symbol&&o(Symbol("foo"))&&"function"==typeof Symbol.for&&(i=Symbol.for(i));var a=function(){return!0},s=function(){if(!n.g[i]){var e={};e[i]={};var t={};t[i]=a,r(n.g,e,t)}return n.g[i]},l=s(),u=function(e){return o(e)?Symbol.prototype.valueOf.call(e):typeof e+" | "+String(e)},c=function(e){if(!function(e){return null===e||"object"!=typeof e&&"function"!=typeof e}(e))throw new TypeError("key must not be an object")},d={clear:function(){delete n.g[i],l=s()},delete:function(e){return c(e),delete l[u(e)],!d.has(e)},get:function(e){return c(e),l[u(e)]},has:function(e){return c(e),u(e)in l},set:function(e,t){c(e);var n=u(e),o={};o[n]=t;var i={};return i[n]=a,r(l,o,i),d.has(e)},setIfMissingThenGet:function(e,t){if(d.has(e))return d.get(e);var n=t();return d.set(e,n),n}};e.exports=d},7115:function(e,t){var n={};n.parse=function(){var e=/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,t=/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,n=/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,r=/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,i=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,a=/^(left|center|right|top|bottom)/i,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,d=/^\(/,f=/^\)/,p=/^,/,h=/^\#([0-9a-fA-F]+)/,m=/^([a-zA-Z]+)/,v=/^rgb/i,g=/^rgba/i,y=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,b="";function w(e){var t=new Error(b+": "+e);throw t.source=b,t}function _(){var e=I(x);return b.length>0&&w("Invalid input not EOF"),e}function x(){return E("linear-gradient",e,S)||E("repeating-linear-gradient",t,S)||E("radial-gradient",n,C)||E("repeating-radial-gradient",r,C)}function E(e,t,n){return k(t,(function(t){var r=n();return r&&(L(p)||w("Missing comma before color stops")),{type:e,orientation:r,colorStops:I(T)}}))}function k(e,t){var n=L(e);if(n)return L(d)||w("Missing ("),result=t(n),L(f)||w("Missing )"),result}function S(){return N("directional",o,1)||N("angular",c,1)}function C(){var e,t,n=P();return n&&((e=[]).push(n),t=b,L(p)&&((n=P())?e.push(n):b=t)),e}function P(){var e=function(){var e=N("shape",/^(circle)/i,0);e&&(e.style=R()||O());return e}()||function(){var e=N("shape",/^(ellipse)/i,0);e&&(e.style=A()||O());return e}();if(e)e.at=function(){if(N("position",/^at/,0)){var e=M();return e||w("Missing positioning value"),e}}();else{var t=M();t&&(e={type:"default-radial",at:t})}return e}function O(){return N("extent-keyword",i,1)}function M(){var e={x:A(),y:A()};if(e.x||e.y)return{type:"position",value:e}}function I(e){var t=e(),n=[];if(t)for(n.push(t);L(p);)(t=e())?n.push(t):w("One extra comma");return n}function T(){var e=N("hex",h,1)||k(g,(function(){return{type:"rgba",value:I(D)}}))||k(v,(function(){return{type:"rgb",value:I(D)}}))||N("literal",m,0);return e||w("Expected color definition"),e.length=A(),e}function D(){return L(y)[1]}function A(){return N("%",l,1)||N("position-keyword",a,1)||R()}function R(){return N("px",s,1)||N("em",u,1)}function N(e,t,n){var r=L(t);if(r)return{type:e,value:r[n]}}function L(e){var t,n;return(n=/^[\n\r\t\s]+/.exec(b))&&F(n[0].length),(t=e.exec(b))&&F(t[0].length),t}function F(e){b=b.substr(e)}return function(e){return b=e.toString(),_()}}(),t.parse=(n||{}).parse},8198:function(e,t,n){"use strict";var r=n(3010)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},3010:function(e,t,n){"use strict";var r,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var u=function(){throw new a},c=l?function(){try{return u}catch(e){try{return l(arguments,"callee").get}catch(e){return u}}}():u,d=n(1779)(),f=Object.getPrototypeOf||function(e){return e.__proto__},p={},h="undefined"==typeof Uint8Array?r:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?f(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":c,"%TypedArray%":h,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},v=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return m[t]=n,n},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n(1930),b=n(9284),w=y.call(Function.call,Array.prototype.concat),_=y.call(Function.apply,Array.prototype.splice),x=y.call(Function.call,String.prototype.replace),E=y.call(Function.call,String.prototype.slice),k=y.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,P=function(e){var t=E(e,0,1),n=E(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return x(e,S,(function(e,t,n,o){r[r.length]=n?x(o,C,"$1"):t||e})),r},O=function(e,t){var n,r=e;if(b(g,r)&&(r="%"+(n=g[r])[0]+"%"),b(m,r)){var i=m[r];if(i===p&&(i=v(r)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/g,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=P(e),r=n.length>0?n[0]:"",i=O("%"+r+"%",t),s=i.name,u=i.value,c=!1,d=i.alias;d&&(r=d[0],_(n,w([0,1],d)));for(var f=1,p=!0;f=n.length){var y=l(u,h);u=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[h]}else p=b(u,h),u=u[h];p&&!c&&(m[s]=u)}}return u}},1779:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(8030);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},8030:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9905:function(e,t,n){"use strict";var r=n.g.Symbol,o=n(5682);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},5682:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},81:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4111:function(e,t,n){"use strict";var r=n(81);e.exports=function(){return r()&&!!Symbol.toStringTag}},9284:function(e,t,n){"use strict";var r=n(1930);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},3138:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,a=void 0!==i&&i,s=e.findChunks,l=void 0===s?r:s,u=e.sanitize,c=e.searchWords,d=e.textToHighlight;return o({chunksToHighlight:n({chunks:l({autoEscape:t,caseSensitive:a,sanitize:u,searchWords:c,textToHighlight:d})}),totalLength:d?d.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t=t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,a=e.searchWords,s=e.textToHighlight;return s=o(s),a.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),a=void 0;a=i.exec(s);){var l=a.index,u=i.lastIndex;u>l&&e.push({highlight:!1,start:l,end:u}),a.index===i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r};function i(e){return e}}])},1281:function(e,t,n){"use strict";var r=n(338),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v=t||n<0||v&&e-h>=c}function _(){var e=o();if(w(e))return x(e);f=setTimeout(_,function(e){var n=t-(e-p);return v?s(n,c-(e-h)):n}(e))}function x(e){return f=void 0,g&&l?y(e):(l=u=void 0,d)}function E(){var e=o(),n=w(e);if(l=arguments,u=this,p=e,n){if(void 0===f)return b(p);if(v)return clearTimeout(f),f=setTimeout(_,t),y(p)}return void 0===f&&(f=setTimeout(_,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(v="maxWait"in n)?a(i(n.maxWait)||0,t):c,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=p=u=f=void 0},E.flush=function(){return void 0===f?d:x(o())},E}},3619:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1653:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1878:function(e,t,n){var r=n(194),o=n(1653);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},8253:function(e,t,n){var r=n(158);e.exports=function(){return r.Date.now()}},3372:function(e,t,n){var r=n(6897),o=n(3619);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},5053:function(e,t,n){var r=n(2383),o=n(3619),i=n(1878),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9756:function(e){e.exports=function(e,t){var n,r,o=0;function i(){var i,a,s=n,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a0&&!o.call(e,0))for(var m=0;m0)for(var v=0;v=0&&"[object Function]"===t.call(e.callee)),r}},2148:function(e,t,n){"use strict";var r=n(806),o=function(e){return null!=e},i=n(5682)(),a=n(7615),s=Object,l=a("Array.prototype.push"),u=a("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(!o(e))throw new TypeError("target must be an object");var n,a,d,f,p,h,m,v=s(e);for(n=1;n1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=C(e),r=n.length>0?n[0]:"",o=P("%"+r+"%",t),i=o.name,s=o.value,u=!1,c=o.alias;c&&(r=c[0],x(n,_([0,1],c)));for(var d=1,f=!0;d=n.length){var h=l(s,p);if(f=!!h,!t&&!(p in s))throw new a("base intrinsic for "+e+" exists, but the property is not available.");s=f&&"get"in h&&!("originalValue"in h.get)?h.get:s[p]}else f=w(s,p),s=s[p];f&&!u&&(g[i]=s)}}return s}},779:function(e,t,n){"use strict";var r=n(1631);e.exports=function(){return"function"==typeof Object.values?Object.values:r}},7256:function(e,t,n){"use strict";var r=n(779),o=n(9170);e.exports=function(){var e=r();return o(Object,{values:e},{values:function(){return Object.values!==e}}),e}},5372:function(e,t,n){"use strict";var r=n(9567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2652:function(e,t,n){e.exports=n(5372)()},9567:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2541:function(e){"use strict";var t=Object.prototype.hasOwnProperty;function n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function r(e,r){if(n(e,r))return!0;if("object"!=typeof e||null===e||"object"!=typeof r||null===r)return!1;var o=Object.keys(e),i=Object.keys(r);if(o.length!==i.length)return!1;for(var a=0;a=o&&i0&&this.setState({visibleDays:(0,i.default)({},E,T)})}},{key:"componentWillUpdate",value:function(){this.today=(0,c.default)()}},{key:"onDayClick",value:function(e,t){if(t&&t.preventDefault(),!this.isBlocked(e)){var n=this.props,r=n.onDateChange,o=n.keepOpenOnDateSelect,i=n.onFocusChange,a=n.onClose;r(e),o||(i({focused:!1}),a({date:e}))}}},{key:"onDayMouseEnter",value:function(e){if(!this.isTouchDevice){var t=this.state,n=t.hoverDate,r=t.visibleDays,o=this.deleteModifier({},n,"hovered");o=this.addModifier(o,e,"hovered"),this.setState({hoverDate:e,visibleDays:(0,i.default)({},r,o)})}}},{key:"onDayMouseLeave",value:function(){var e=this.state,t=e.hoverDate,n=e.visibleDays;if(!this.isTouchDevice&&t){var r=this.deleteModifier({},t,"hovered");this.setState({hoverDate:null,visibleDays:(0,i.default)({},n,r)})}}},{key:"onPrevMonthClick",value:function(){var e=this.props,t=e.onPrevMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,o=this.state,a=o.currentMonth,s=o.visibleDays,l={};Object.keys(s).sort().slice(0,n+1).forEach((function(e){l[e]=s[e]}));var u=a.clone().subtract(1,"month"),c=(0,g.default)(u,1,r);this.setState({currentMonth:u,visibleDays:(0,i.default)({},l,this.getModifiers(c))},(function(){t(u.clone())}))}},{key:"onNextMonthClick",value:function(){var e=this.props,t=e.onNextMonthClick,n=e.numberOfMonths,r=e.enableOutsideDays,o=this.state,a=o.currentMonth,s=o.visibleDays,l={};Object.keys(s).sort().slice(1).forEach((function(e){l[e]=s[e]}));var u=a.clone().add(n,"month"),c=(0,g.default)(u,1,r),d=a.clone().add(1,"month");this.setState({currentMonth:d,visibleDays:(0,i.default)({},l,this.getModifiers(c))},(function(){t(d.clone())}))}},{key:"onMonthChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===k.VERTICAL_SCROLLABLE,i=(0,g.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(i)})}},{key:"onYearChange",value:function(e){var t=this.props,n=t.numberOfMonths,r=t.enableOutsideDays,o=t.orientation===k.VERTICAL_SCROLLABLE,i=(0,g.default)(e,n,r,o);this.setState({currentMonth:e.clone(),visibleDays:this.getModifiers(i)})}},{key:"getFirstFocusableDay",value:function(e){var t=this,n=this.props,o=n.date,i=n.numberOfMonths,a=e.clone().startOf("month");if(o&&(a=o.clone()),this.isBlocked(a)){for(var s=[],l=e.clone().add(i-1,"months").endOf("month"),u=a.clone();!(0,v.default)(u,l);)u=u.clone().add(1,"day"),s.push(u);var c=s.filter((function(e){return!t.isBlocked(e)&&(0,v.default)(e,a)}));if(c.length>0){var d=r(c,1);a=d[0]}}return a}},{key:"getModifiers",value:function(e){var t=this,n={};return Object.keys(e).forEach((function(r){n[r]={},e[r].forEach((function(e){n[r][(0,b.default)(e)]=t.getModifiersForDay(e)}))})),n}},{key:"getModifiersForDay",value:function(e){var t=this;return new Set(Object.keys(this.modifiers).filter((function(n){return t.modifiers[n](e)})))}},{key:"getStateForNewMonth",value:function(e){var t=this,n=e.initialVisibleMonth,r=e.date,o=e.numberOfMonths,i=e.enableOutsideDays,a=(n||(r?function(){return r}:function(){return t.today}))();return{currentMonth:a,visibleDays:this.getModifiers((0,g.default)(a,o,i))}}},{key:"addModifier",value:function(e,t,n){var r=this.props,o=r.numberOfMonths,a=r.enableOutsideDays,s=r.orientation,l=this.state,u=l.currentMonth,c=l.visibleDays,d=u,f=o;if(s===k.VERTICAL_SCROLLABLE?f=Object.keys(c).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,y.default)(t,d,f,a))return e;var p=(0,b.default)(t),h=(0,i.default)({},e);if(a)h=Object.keys(c).filter((function(e){return Object.keys(c[e]).indexOf(p)>-1})).reduce((function(t,r){var o=e[r]||c[r],a=new Set(o[p]);return a.add(n),(0,i.default)({},t,P({},r,(0,i.default)({},o,P({},p,a))))}),h);else{var m=(0,w.default)(t),v=e[m]||c[m],g=new Set(v[p]);g.add(n),h=(0,i.default)({},h,P({},m,(0,i.default)({},v,P({},p,g))))}return h}},{key:"deleteModifier",value:function(e,t,n){var r=this.props,o=r.numberOfMonths,a=r.enableOutsideDays,s=r.orientation,l=this.state,u=l.currentMonth,c=l.visibleDays,d=u,f=o;if(s===k.VERTICAL_SCROLLABLE?f=Object.keys(c).length:(d=d.clone().subtract(1,"month"),f+=2),!t||!(0,y.default)(t,d,f,a))return e;var p=(0,b.default)(t),h=(0,i.default)({},e);if(a)h=Object.keys(c).filter((function(e){return Object.keys(c[e]).indexOf(p)>-1})).reduce((function(t,r){var o=e[r]||c[r],a=new Set(o[p]);return a.delete(n),(0,i.default)({},t,P({},r,(0,i.default)({},o,P({},p,a))))}),h);else{var m=(0,w.default)(t),v=e[m]||c[m],g=new Set(v[p]);g.delete(n),h=(0,i.default)({},h,P({},m,(0,i.default)({},v,P({},p,g))))}return h}},{key:"isBlocked",value:function(e){var t=this.props,n=t.isDayBlocked,r=t.isOutsideRange;return n(e)||r(e)}},{key:"isHovered",value:function(e){var t=(this.state||{}).hoverDate;return(0,m.default)(e,t)}},{key:"isSelected",value:function(e){var t=this.props.date;return(0,m.default)(e,t)}},{key:"isToday",value:function(e){return(0,m.default)(e,this.today)}},{key:"isFirstDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===(t||c.default.localeData().firstDayOfWeek())}},{key:"isLastDayOfWeek",value:function(e){var t=this.props.firstDayOfWeek;return e.day()===((t||c.default.localeData().firstDayOfWeek())+6)%7}},{key:"render",value:function(){var e=this.props,t=e.numberOfMonths,n=e.orientation,r=e.monthFormat,o=e.renderMonthText,i=e.navPrev,s=e.navNext,l=e.onOutsideClick,u=e.withPortal,c=e.focused,d=e.enableOutsideDays,f=e.hideKeyboardShortcutsPanel,p=e.daySize,h=e.firstDayOfWeek,m=e.renderCalendarDay,v=e.renderDayContents,g=e.renderCalendarInfo,y=e.renderMonthElement,b=e.calendarInfoPosition,w=e.isFocused,_=e.isRTL,x=e.phrases,E=e.dayAriaLabelFormat,k=e.onBlur,C=e.showKeyboardShortcuts,P=e.weekDayFormat,O=e.verticalHeight,M=e.noBorder,I=e.transitionDuration,T=e.verticalBorderSpacing,D=e.horizontalMonthPadding,A=this.state,R=A.currentMonth,N=A.visibleDays;return a.default.createElement(S.default,{orientation:n,enableOutsideDays:d,modifiers:N,numberOfMonths:t,onDayClick:this.onDayClick,onDayMouseEnter:this.onDayMouseEnter,onDayMouseLeave:this.onDayMouseLeave,onPrevMonthClick:this.onPrevMonthClick,onNextMonthClick:this.onNextMonthClick,onMonthChange:this.onMonthChange,onYearChange:this.onYearChange,monthFormat:r,withPortal:u,hidden:!c,hideKeyboardShortcutsPanel:f,initialVisibleMonth:function(){return R},firstDayOfWeek:h,onOutsideClick:l,navPrev:i,navNext:s,renderMonthText:o,renderCalendarDay:m,renderDayContents:v,renderCalendarInfo:g,renderMonthElement:y,calendarInfoPosition:b,isFocused:w,getFirstFocusableDay:this.getFirstFocusableDay,onBlur:k,phrases:x,daySize:p,isRTL:_,showKeyboardShortcuts:C,weekDayFormat:P,dayAriaLabelFormat:E,verticalHeight:O,noBorder:M,transitionDuration:I,verticalBorderSpacing:T,horizontalMonthPadding:D})}}]),t}(a.default.Component);t.Z=I,I.propTypes=O,I.defaultProps=M},5820:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t2?n-2:0),o=2;o2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e)return 0;var o="width"===t?"Left":"Top",i="width"===t?"Right":"Bottom",a=!n||r?window.getComputedStyle(e):null,s=e.offsetWidth,l=e.offsetHeight,u="width"===t?s:l;n||(u-=parseFloat(a["padding"+o])+parseFloat(a["padding"+i])+parseFloat(a["border"+o+"Width"])+parseFloat(a["border"+i+"Width"]));r&&(u+=parseFloat(a["margin"+o])+parseFloat(a["margin"+i]));return u}},5814:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return"undefined"!=typeof document&&document.activeElement}},7475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){var s=o.chooseAvailableDate,l=o.dateIsUnavailable,u=o.dateIsSelected,c={width:n,height:n-1},d=r.has("blocked-minimum-nights")||r.has("blocked-calendar")||r.has("blocked-out-of-range"),f=r.has("selected")||r.has("selected-start")||r.has("selected-end"),p=!f&&(r.has("hovered-span")||r.has("after-hovered-start")),h=r.has("blocked-out-of-range"),m={date:e.format(t)},v=(0,i.default)(s,m);r.has(a.BLOCKED_MODIFIER)?v=(0,i.default)(l,m):f&&(v=(0,i.default)(u,m));return{daySizeStyles:c,useDefaultCursor:d,selected:f,hoveredSpan:p,isOutsideRange:h,ariaLabel:v}};var r,o=n(7098),i=(r=o)&&r.__esModule?r:{default:r},a=n(257)},5644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.default.localeData().firstDayOfWeek();if(!i.default.isMoment(e)||!e.isValid())throw new TypeError("`month` must be a valid moment object");if(-1===a.WEEKDAYS.indexOf(n))throw new TypeError("`firstDayOfWeek` must be an integer between 0 and 6");for(var r=e.clone().startOf("month").hour(12),o=e.clone().endOf("month").hour(12),s=(r.day()+7-n)%7,l=(n+6-o.day())%7,u=r.clone().subtract(s,"day"),c=o.clone().add(l,"day"),d=c.diff(u,"days")+1,f=u.clone(),p=[],h=0;h=s&&h1&&void 0!==arguments[1]?arguments[1]:i.default.localeData().firstDayOfWeek(),n=e.clone().startOf("month"),r=a(n,t);return Math.ceil((r+e.daysInMonth())/7)};var r,o=n(6292),i=(r=o)&&r.__esModule?r:{default:r};function a(e,t){return(e.day()-t+7)%7}},7098:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"==typeof e)return e;if("function"==typeof e)return e(t);return""}},2893:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.keys(e).reduce((function(e,t){return(0,r.default)({},e,function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;return e}({},t,o.default.oneOfType([o.default.string,o.default.func,o.default.node])))}),{})};var r=i(n(4011)),o=i(n(2652));function i(e){return e&&e.__esModule?e:{default:e}}},8304:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{transform:e,msTransform:e,MozTransform:e,WebkitTransform:e}}},3268:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){if(!r.default.isMoment(e))return{};for(var a={},s=i?e.clone():e.clone().subtract(1,"month"),l=0;l<(i?t:t+2);l+=1){var u=[],c=s.clone(),d=c.clone().startOf("month").hour(12),f=c.clone().endOf("month").hour(12),p=d.clone();if(n)for(var h=0;h>",baseInvalidMessage:"Invalid "};function n(e){if("function"!=typeof e)throw new Error(t.invalidPropValidator);var n=e.bind(null,!1,null);return n.isRequired=e.bind(null,!0,null),n.withPredicate=function(n){if("function"!=typeof n)throw new Error(t.invalidPredicate);var r=e.bind(null,!1,n);return r.isRequired=e.bind(null,!0,n),r},n}function r(e,n,r){return new Error("The prop `"+e+"` "+t.requiredCore+" in `"+n+"`, but its value is `"+r+"`.")}e.exports={constructPropValidatorVariations:n,createMomentChecker:function(e,o,i,a){return n((function(n,s,l,u,c,d,f){var p=l[u],h=typeof p,m=function(e,t,n,o){var i=void 0===o,a=null===o;if(e){if(i)return r(n,t,"undefined");if(a)return r(n,t,"null")}return i||a?null:-1}(n,c=c||t.anonymousMessage,f=f||u,p);if(-1!==m)return m;if(o&&!o(p))return new Error(t.invalidTypeCore+": `"+u+"` of type `"+h+"` supplied to `"+c+"`, expected `"+e+"`.");if(!i(p))return new Error(t.baseInvalidMessage+d+" `"+u+"` of type `"+h+"` supplied to `"+c+"`, expected `"+a+"`.");if(s&&!s(p)){var v=s.name||t.anonymousMessage;return new Error(t.baseInvalidMessage+d+" `"+u+"` of type `"+h+"` supplied to `"+c+"`. "+t.predicateFailureCore+" `"+v+"`.")}return null}))},messages:t}},6150:function(e,t,n){var r=n(6292),o=n(3416),i=n(9217);e.exports={momentObj:i.createMomentChecker("object",(function(e){return"object"==typeof e}),(function(e){return o.isValidMoment(e)}),"Moment"),momentString:i.createMomentChecker("string",(function(e){return"string"==typeof e}),(function(e){return o.isValidMoment(r(e))}),"Moment"),momentDurationObj:i.createMomentChecker("object",(function(e){return"object"==typeof e}),(function(e){return r.isDuration(e)}),"Duration")}},3416:function(e,t,n){var r=n(6292);e.exports={isValidMoment:function(e){return!("function"==typeof r.isMoment&&!r.isMoment(e))&&("function"==typeof e.isValid?e.isValid():!isNaN(e))}}},2239:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0?String(e)+"__":"")+String(t)}},1881:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=[],n=!1,r={},o=0;o1&&void 0!==arguments[1]?arguments[1]:{},n=t.stylesPropName,s=void 0===n?"styles":n,c=t.themePropName,f=void 0===c?"theme":c,g=t.cssPropName,x=void 0===g?"css":g,E=t.flushBefore,k=void 0!==E&&E,S=t.pureComponent,C=void 0!==S&&S,P=void 0,O=void 0,M=void 0,I=void 0,T=b(C);function D(e){return e===u.DIRECTIONS.LTR?d.default.resolveLTR:d.default.resolveRTL}function A(e){return e===u.DIRECTIONS.LTR?M:I}function R(t,n){var r=A(t),o=t===u.DIRECTIONS.LTR?P:O,i=d.default.get();return o&&r===i||(t===u.DIRECTIONS.RTL?(O=e?d.default.createRTL(e):y,I=i,o=O):(P=e?d.default.createLTR(e):y,M=i,o=P)),o}function N(e,t){return{resolveMethod:D(e),styleDef:R(e)}}return function(e){var t=e.displayName||e.name||"Component",n=function(t){function n(e,t){p(this,n);var r=h(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t)),o=r.context[u.CHANNEL]?r.context[u.CHANNEL].getState():_;return r.state=N(o),r}return m(n,t),o(n,[{key:"componentDidMount",value:function(){var e=this;this.context[u.CHANNEL]&&(this.channelUnsubscribe=this.context[u.CHANNEL].subscribe((function(t){e.setState(N(t))})))}},{key:"componentWillUnmount",value:function(){this.channelUnsubscribe&&this.channelUnsubscribe()}},{key:"render",value:function(){var t;k&&d.default.flush();var n=this.state,o=n.resolveMethod,i=n.styleDef;return a.default.createElement(e,r({},this.props,(v(t={},f,d.default.get()),v(t,s,i()),v(t,x,o),t)))}}]),n}(T);return n.WrappedComponent=e,n.displayName="withStyles("+String(t)+")",n.contextTypes=w,e.propTypes&&(n.propTypes=(0,i.default)({},e.propTypes),delete n.propTypes[s],delete n.propTypes[f],delete n.propTypes[x]),e.defaultProps&&(n.defaultProps=(0,i.default)({},e.defaultProps)),(0,l.default)(n,e)}};var i=f(n(4011)),a=f(n(9196)),s=f(n(2652)),l=f(n(1281)),u=n(5080),c=f(n(6640)),d=f(n(9349));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.css=d.default.resolveLTR,t.withStylesPropTypes={styles:s.default.object.isRequired,theme:s.default.object.isRequired,css:s.default.func.isRequired};var g={},y=function(){return g};function b(e){if(e){if(!a.default.PureComponent)throw new ReferenceError("withStyles() pureComponent option requires React 15.3.0 or later");return a.default.PureComponent}return a.default.Component}var w=v({},u.CHANNEL,c.default),_=u.DIRECTIONS.LTR},9196:function(e){"use strict";e.exports=window.React},6292:function(e){"use strict";e.exports=window.moment},4080:function(){},3665:function(e,t,n){"use strict";var r=n(4219),o=r("%Array.prototype%"),i=r("%RangeError%"),a=r("%SyntaxError%"),s=r("%TypeError%"),l=n(485),u=Math.pow(2,32)-1,c=r("%Object.setPrototypeOf%",!0)||([].__proto__!==o?null:function(e,t){return e.__proto__=t,e});e.exports=function(e){if(!l(e)||e<0)throw new s("Assertion failed: `length` must be an integer Number >= 0");if(e>u)throw new i("length is greater than (2**32 - 1)");var t=arguments.length>1?arguments[1]:o,n=[];if(t!==o){if(!c)throw new a("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");c(n,t)}return 0!==e&&(n.length=e),n}},1539:function(e,t,n){"use strict";var r=n(4219),o=r("%Symbol.species%",!0),i=r("%TypeError%"),a=n(3665),s=n(6448),l=n(5971),u=n(4065),c=n(485),d=n(9747);e.exports=function(e,t){if(!c(t)||t<0)throw new i("Assertion failed: length must be an integer >= 0");if(!l(e))return a(t);var n=s(e,"constructor");if(o&&"Object"===d(n)&&null===(n=s(n,o))&&(n=void 0),void 0===n)return a(t);if(!u(n))throw new i("C must be a constructor");return new n(t)}},8323:function(e,t,n){"use strict";var r=n(4219),o=n(9630),i=r("%TypeError%"),a=n(5971),s=r("%Reflect.apply%",!0)||o("%Function.prototype.apply%");e.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!a(n))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(e,t,n)}},5597:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(1327),i=n(8487),a=n(6403),s=n(1392),l=n(3428),u=n(3290),c=n(9836),d=n(9747);e.exports=function(e,t,n){if("Object"!==d(e))throw new r("Assertion failed: Type(O) is not Object");if(!u(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var f=a(e,t),p=!f||l(e);return!(f&&!f["[[Configurable]]"]||!p)&&o(s,c,i,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":n,"[[Writable]]":!0})}},3323:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(5597),i=n(3290),a=n(9747);e.exports=function(e,t,n){if("Object"!==a(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=o(e,t,n);if(!s)throw new r("unable to create data property");return s}},6356:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(8682),i=n(1327),a=n(8487),s=n(7857),l=n(1392),u=n(3290),c=n(9836),d=n(2402),f=n(9747);e.exports=function(e,t,n){if("Object"!==f(e))throw new r("Assertion failed: Type(O) is not Object");if(!u(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var p=o({Type:f,IsDataDescriptor:l,IsAccessorDescriptor:s},n)?n:d(n);if(!o({Type:f,IsDataDescriptor:l,IsAccessorDescriptor:s},p))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return i(l,c,a,e,t,p)}},6739:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(8540),i=n(8323),a=n(3323),s=n(6448),l=n(3059),u=n(5971),c=n(2151),d=n(6888);e.exports=function e(t,n,f,p,h){var m;arguments.length>5&&(m=arguments[5]);for(var v=p,g=0;g0&&(_=u(w)),_){var x=c(w);v=e(t,w,x,v,h-1)}else{if(v>=o)throw new r("index too large");a(t,d(v),w),v+=1}}g+=1}return v}},8487:function(e,t,n){"use strict";var r=n(5114),o=n(3359),i=n(9747);e.exports=function(e){return void 0!==e&&r(i,"Property Descriptor","Desc",e),o(e)}},6448:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(3205),i=n(3290),a=n(9747);e.exports=function(e,t){if("Object"!==a(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},3059:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(3290),i=n(9747);e.exports=function(e,t){if("Object"!==i(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");return t in e}},7857:function(e,t,n){"use strict";var r=n(9284),o=n(5114),i=n(9747);e.exports=function(e){return void 0!==e&&(o(i,"Property Descriptor","Desc",e),!(!r(e,"[[Get]]")&&!r(e,"[[Set]]")))}},5971:function(e,t,n){"use strict";e.exports=n(4351)},1089:function(e,t,n){"use strict";e.exports=n(4363)},4065:function(e,t,n){"use strict";var r=n(137)("%Reflect.construct%",!0),o=n(6356);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,a)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},1392:function(e,t,n){"use strict";var r=n(9284),o=n(5114),i=n(9747);e.exports=function(e){return void 0!==e&&(o(i,"Property Descriptor","Desc",e),!(!r(e,"[[Value]]")&&!r(e,"[[Writable]]")))}},3428:function(e,t,n){"use strict";var r=n(4219),o=r("%Object.preventExtensions%",!0),i=r("%Object.isExtensible%",!0),a=n(5019);e.exports=o?function(e){return!a(e)&&i(e)}:function(e){return!a(e)}},485:function(e,t,n){"use strict";var r=n(13),o=n(5127),i=n(9747),a=n(3234),s=n(7061);e.exports=function(e){if("Number"!==i(e)||a(e)||!s(e))return!1;var t=r(e);return o(t)===t}},3290:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},1275:function(e,t,n){"use strict";var r=n(4219)("%Symbol.match%",!0),o=n(4221),i=n(3704);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(r){var t=e[r];if(void 0!==t)return i(t)}return o(e)}},2151:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(6448),i=n(6840),a=n(9747);e.exports=function(e){if("Object"!==a(e))throw new r("Assertion failed: `obj` must be an Object");return i(o(e,"length"))}},6403:function(e,t,n){"use strict";var r=n(4219),o=n(5180),i=r("%TypeError%"),a=n(9630)("Object.prototype.propertyIsEnumerable"),s=n(9284),l=n(5971),u=n(3290),c=n(1275),d=n(2402),f=n(9747);e.exports=function(e,t){if("Object"!==f(e))throw new i("Assertion failed: O must be an Object");if(!u(t))throw new i("Assertion failed: P must be a Property Key");if(s(e,t)){if(!o){var n=l(e)&&"length"===t,r=c(e)&&"lastIndex"===t;return{"[[Configurable]]":!(n||r),"[[Enumerable]]":a(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return d(o(e,t))}}},6953:function(e,t,n){"use strict";e.exports=n(3031)},9836:function(e,t,n){"use strict";var r=n(3234);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},3704:function(e){"use strict";e.exports=function(e){return!!e}},1723:function(e,t,n){"use strict";var r=n(13),o=n(5127),i=n(5541),a=n(3234),s=n(7061),l=n(2163);e.exports=function(e){var t=i(e);return a(t)||0===t?0:s(t)?l(t)*o(r(t)):t}},6840:function(e,t,n){"use strict";var r=n(8540),o=n(1723);e.exports=function(e){var t=o(e);return t<=0?0:t>r?r:t}},5541:function(e,t,n){"use strict";var r=n(4219),o=r("%TypeError%"),i=r("%Number%"),a=r("%RegExp%"),s=r("%parseInt%"),l=n(9630),u=n(8441),c=n(5019),d=l("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),h=u(/^[-+]0x[0-9a-f]+$/i),m=u(new a("["+["…","​","￾"].join("")+"]","g")),v=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),g=new RegExp("(^["+v+"]+)|(["+v+"]+$)","g"),y=l("String.prototype.replace"),b=n(6745);e.exports=function e(t){var n=c(t)?t:b(t,i);if("symbol"==typeof n)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof n)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");if("string"==typeof n){if(f(n))return e(s(d(n,2),2));if(p(n))return e(s(d(n,2),8));if(m(n)||h(n))return NaN;var r=function(e){return y(e,g,"")}(n);if(r!==n)return e(r)}return i(n)}},1283:function(e,t,n){"use strict";var r=n(4219)("%Object%"),o=n(6953);e.exports=function(e){return o(e),r(e)}},6745:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},2402:function(e,t,n){"use strict";var r=n(9284),o=n(4219)("%TypeError%"),i=n(9747),a=n(3704),s=n(1089);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=a(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=a(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=a(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!s(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var l=e.set;if(void 0!==l&&!s(l))throw new o("setter must be a function");t["[[Set]]"]=l}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},6888:function(e,t,n){"use strict";var r=n(4219),o=r("%String%"),i=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},9747:function(e,t,n){"use strict";var r=n(290);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},13:function(e,t,n){"use strict";var r=n(4219)("%Math.abs%");e.exports=function(e){return r(e)}},5127:function(e){"use strict";var t=Math.floor;e.exports=function(e){return t(e)}},3031:function(e,t,n){"use strict";var r=n(4219)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},290:function(e){"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},137:function(e,t,n){"use strict";e.exports=n(4219)},1327:function(e,t,n){"use strict";var r=n(8198),o=n(4219),i=r()&&o("%Object.defineProperty%",!0),a=r.hasArrayLengthDefineBug(),s=a&&n(4351),l=n(9630)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,n,r,o,u){if(!i){if(!e(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in r&&l(r,o)!==!!u["[[Enumerable]]"])return!1;var c=u["[[Value]]"];return r[o]=c,t(r[o],c)}return a&&"length"===o&&"[[Value]]"in u&&s(r)&&r.length!==u["[[Value]]"]?(r.length=u["[[Value]]"],r.length===u["[[Value]]"]):(i(r,o,n(u)),!0)}},4351:function(e,t,n){"use strict";var r=n(4219)("%Array%"),o=!r.isArray&&n(9630)("Object.prototype.toString");e.exports=r.isArray||function(e){return"[object Array]"===o(e)}},5114:function(e,t,n){"use strict";var r=n(4219),o=r("%TypeError%"),i=r("%SyntaxError%"),a=n(9284),s={"Property Descriptor":function(e){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(a(e,n)&&!t[n])return!1;var r=a(e,"[[Value]]"),i=a(e,"[[Get]]")||a(e,"[[Set]]");if(r&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":n(7040)};e.exports=function(e,t,n,r){var a=s[t];if("function"!=typeof a)throw new i("unknown record type: "+t);if("Object"!==e(r)||!a(r))throw new o(n+" must be a "+t)}},3359:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},5180:function(e,t,n){"use strict";var r=n(4219)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},7061:function(e){"use strict";var t=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!t(e)&&e!==1/0&&e!==-1/0}},7040:function(e,t,n){"use strict";var r=n(9284);e.exports=function(e){return r(e,"[[StartIndex]]")&&r(e,"[[EndIndex]]")&&e["[[StartIndex]]"]>=0&&e["[[EndIndex]]"]>=e["[[StartIndex]]"]&&String(parseInt(e["[[StartIndex]]"],10))===String(e["[[StartIndex]]"])&&String(parseInt(e["[[EndIndex]]"],10))===String(e["[[EndIndex]]"])}},3234:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},5019:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},8682:function(e,t,n){"use strict";var r=n(4219),o=n(9284),i=r("%TypeError%");e.exports=function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(o(t,r)&&!n[r])return!1;if(e.IsDataDescriptor(t)&&e.IsAccessorDescriptor(t))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},8540:function(e,t,n){"use strict";var r=n(4219),o=r("%Math%"),i=r("%Number%");e.exports=i.MAX_SAFE_INTEGER||o.pow(2,53)-1},8441:function(e,t,n){"use strict";var r=n(9630)("RegExp.prototype.exec");e.exports=function(e){return function(t){return null!==r(e,t)}}},2163:function(e){"use strict";e.exports=function(e){return e>=0?1:-1}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{AnglePickerControl:function(){return Qm},Animate:function(){return Ir},Autocomplete:function(){return av},BaseControl:function(){return gv},BlockQuotation:function(){return i.BlockQuotation},Button:function(){return Kn},ButtonGroup:function(){return Zx},Card:function(){return IE},CardBody:function(){return jE},CardDivider:function(){return $E},CardFooter:function(){return KE},CardHeader:function(){return GE},CardMedia:function(){return qE},CheckboxControl:function(){return XE},Circle:function(){return i.Circle},ClipboardButton:function(){return ZE},ColorIndicator:function(){return cg},ColorPalette:function(){return p_},ColorPicker:function(){return r_},ComboboxControl:function(){return CS},CustomGradientPicker:function(){return Vk},CustomSelectControl:function(){return NC},Dashicon:function(){return Ve},DatePicker:function(){return VC},DateTimePicker:function(){return GC},Disabled:function(){return nP},Draggable:function(){return oP},DropZone:function(){return dP},DropZoneProvider:function(){return fP},Dropdown:function(){return pg},DropdownMenu:function(){return Jk},DuotonePicker:function(){return _P},DuotoneSwatch:function(){return vP},ExternalLink:function(){return kP},Fill:function(){return kr},Flex:function(){return Tp},FlexBlock:function(){return gp},FlexItem:function(){return yp},FocalPointPicker:function(){return $O},FocusReturnProvider:function(){return DA},FocusableIframe:function(){return KO},FontSizePicker:function(){return IM},FormFileUpload:function(){return TM},FormToggle:function(){return DM},FormTokenField:function(){return FM},G:function(){return i.G},GradientPicker:function(){return Uk},Guide:function(){return zM},GuidePage:function(){return VM},HorizontalRule:function(){return i.HorizontalRule},Icon:function(){return He},IconButton:function(){return HM},IsolatedEventContainer:function(){return yA},KeyboardShortcuts:function(){return $M},MenuGroup:function(){return KM},MenuItem:function(){return GM},MenuItemsChoice:function(){return qM},Modal:function(){return DS},NavigableMenu:function(){return Xk},Notice:function(){return WI},NoticeList:function(){return UI},Panel:function(){return KI},PanelBody:function(){return XI},PanelHeader:function(){return $I},PanelRow:function(){return JI},Path:function(){return i.Path},Placeholder:function(){return QI},Polygon:function(){return i.Polygon},Popover:function(){return jr},QueryControls:function(){return sT},RadioControl:function(){return dT},RangeControl:function(){return ry},Rect:function(){return i.Rect},ResizableBox:function(){return XT},ResponsiveWrapper:function(){return ZT},SVG:function(){return i.SVG},SandBox:function(){return eD},ScrollLock:function(){return Xn},SearchControl:function(){return eI},SelectControl:function(){return Sg},Slot:function(){return Sr},SlotFillProvider:function(){return Cr},Snackbar:function(){return tD},SnackbarList:function(){return oD},Spinner:function(){return cD},TabPanel:function(){return pD},TabbableContainer:function(){return YM},TextControl:function(){return hD},TextHighlight:function(){return _D},TextareaControl:function(){return wD},TimePicker:function(){return KC},Tip:function(){return ED},ToggleControl:function(){return kD},Toolbar:function(){return BD},ToolbarButton:function(){return DD},ToolbarDropdownMenu:function(){return zD},ToolbarGroup:function(){return ND},ToolbarItem:function(){return ID},Tooltip:function(){return $r},TreeSelect:function(){return nT},VisuallyHidden:function(){return Un},__experimentalAlignmentMatrixControl:function(){return Li},__experimentalBorderBoxControl:function(){return X_},__experimentalBorderControl:function(){return N_},__experimentalBoxControl:function(){return Xx},__experimentalConfirmDialog:function(){return RS},__experimentalDimensionControl:function(){return YC},__experimentalDivider:function(){return UE},__experimentalElevation:function(){return tE},__experimentalFlyout:function(){return yO},__experimentalGrid:function(){return j_},__experimentalHStack:function(){return bg},__experimentalHasSplitBorders:function(){return U_},__experimentalHeading:function(){return l_},__experimentalInputControl:function(){return Um},__experimentalIsDefinedBorder:function(){return W_},__experimentalIsEmptyBorder:function(){return H_},__experimentalItem:function(){return WM},__experimentalItemGroup:function(){return mk},__experimentalNavigation:function(){return hI},__experimentalNavigationBackButton:function(){return gI},__experimentalNavigationGroup:function(){return bI},__experimentalNavigationItem:function(){return CI},__experimentalNavigationMenu:function(){return II},__experimentalNavigatorBackButton:function(){return VI},__experimentalNavigatorButton:function(){return zI},__experimentalNavigatorProvider:function(){return RI},__experimentalNavigatorScreen:function(){return jI},__experimentalNumberControl:function(){return Hv},__experimentalPaletteEdit:function(){return vS},__experimentalParseQuantityAndUnitFromRawValue:function(){return __},__experimentalRadio:function(){return uT},__experimentalRadioGroup:function(){return cT},__experimentalScrollable:function(){return FE},__experimentalSpacer:function(){return Jm},__experimentalStyleProvider:function(){return vr},__experimentalSurface:function(){return dD},__experimentalText:function(){return sh},__experimentalToggleGroupControl:function(){return iM},__experimentalToggleGroupControlOption:function(){return xM},__experimentalToggleGroupControlOptionIcon:function(){return SD},__experimentalToolbarContext:function(){return MD},__experimentalToolsPanel:function(){return aA},__experimentalToolsPanelContext:function(){return XD},__experimentalToolsPanelItem:function(){return sA},__experimentalTreeGrid:function(){return fA},__experimentalTreeGridCell:function(){return vA},__experimentalTreeGridItem:function(){return mA},__experimentalTreeGridRow:function(){return pA},__experimentalTruncate:function(){return s_},__experimentalUnitControl:function(){return I_},__experimentalUseCustomUnits:function(){return E_},__experimentalUseNavigator:function(){return BI},__experimentalUseSlot:function(){return ir},__experimentalVStack:function(){return a_},__experimentalView:function(){return Wn},__experimentalZStack:function(){return EA},__unstableComposite:function(){return Oi},__unstableCompositeGroup:function(){return Ti},__unstableCompositeItem:function(){return Ae},__unstableDisclosureContent:function(){return Wb},__unstableGetAnimateClassName:function(){return Mr},__unstableMotion:function(){return up},__unstableUseAutocompleteProps:function(){return iv},__unstableUseCompositeState:function(){return yi},__unstableUseNavigateRegions:function(){return SA},createSlotFill:function(){return Pr},navigateRegions:function(){return CA},withConstrainedTabbing:function(){return PA},withFallbackStyles:function(){return OA},withFilters:function(){return IA},withFocusOutside:function(){return kS},withFocusReturn:function(){return TA},withNotices:function(){return AA},withSpokenMessages:function(){return RM}});var e={};n.r(e),n.d(e,{Text:function(){return Kp},block:function(){return Gp},destructive:function(){return Yp},highlighterText:function(){return Zp},muted:function(){return Xp},positive:function(){return qp},upperCase:function(){return Jp}});var t={};n.r(t),n.d(t,{TooltipContent:function(){return Jb},TooltipPopoverView:function(){return Qb},TooltipShortcut:function(){return tw},noOutline:function(){return ew}});var o={};n.r(o),n.d(o,{ButtonContentView:function(){return hM},LabelView:function(){return cM},buttonActive:function(){return pM},buttonView:function(){return fM},labelBlock:function(){return dM},medium:function(){return vM},separatorActive:function(){return mM}});var i=window.wp.primitives;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var b=n(9196),w=n.n(b);function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t=0||(o[n]=e[n]);return o}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var P=(0,b.createContext)({});var O,M=function(e,t,n){void 0===n&&(n=t.children);var r=(0,b.useContext)(P);if(r.useCreateElement)return r.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(k(t,["children"]))}return(0,b.createElement)(e,t,n)};function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function L(e,t){if(void 0===t&&(t=[]),!R(e.state))return N(e,t);var n=N(e,[].concat(t,["state"])),r=n[0],o=n[1],i=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(r,["state"]);return[D(D({},i),a),o]}function F(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0,a=n;i0||t.offsetHeight>0||e.getClientRects().length>0}(e)}function ae(e){return ie(e)&&!function(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}(e)}function se(e,t){var n=Array.from(e.querySelectorAll(oe)),r=n.filter(ae);return ae(e)&&r.unshift(e),!r.length&&t?n:r}function le(e,t){return se(e,t)[0]||null}var ue=V({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=v(e,["unstable_system"]),o=t.unstable_system,i=v(t,["unstable_system"]);return!(n!==o&&!F(n,o))&&F(r,i)}}),ce=(B({as:"div",useHook:ue}),ne("Mac")&&!ne("Chrome")&&(ne("Safari")||ne("Firefox")));function de(e){!J(e)&&ie(e)&&e.focus()}function fe(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function pe(e,t){return(0,b.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var he=V({name:"Tabbable",compose:ue,keys:["disabled","focusable"],useOptions:function(e,t){return m({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,i=t.onMouseDownCapture,a=t.onMouseDown,s=t.onKeyPressCapture,l=t.style,u=v(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),c=(0,b.useRef)(null),d=q(o),f=q(i),p=q(a),h=q(s),g=!!e.disabled&&!e.focusable,y=(0,b.useState)(!0),w=y[0],_=y[1],x=(0,b.useState)(!0),E=x[0],k=x[1],S=e.disabled?m({pointerEvents:"none"},l):l;G((function(){var e=c.current;e&&(["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(e.tagName)||_(!1),function(e){return["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)}(e)||k(!1))}),[]);var C=pe(d,e.disabled),P=pe(f,e.disabled),O=pe(h,e.disabled),M=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e);var n=e.currentTarget;if(!e.defaultPrevented&&ce&&!Q(e)&&te(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),de(n)})),o=function(){cancelAnimationFrame(r),de(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return m({ref:W(c,n),style:S,tabIndex:fe(g,w,E,r),disabled:!(!g||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:C,onMouseDownCapture:P,onMouseDown:M,onKeyPressCapture:O},u)}});B({as:"div",useHook:he});var me=V({name:"Clickable",compose:he,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return m({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},v(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=v(t,["onKeyDown","onKeyUp"]),i=(0,b.useState)(!1),a=i[0],s=i[1],l=q(n),u=q(r),c=(0,b.useCallback)((function(t){var n;if(null===(n=l.current)||void 0===n||n.call(l,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Y(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(te(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&s(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=(0,b.useCallback)((function(t){var n;if(null===(n=u.current)||void 0===n||n.call(u,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(s(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return m({"data-active":a||void 0,onKeyDown:c,onKeyUp:d},o)}});B({as:"button",memo:!0,useHook:me});function ve(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function ge(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=ve(e.items||[]))||void 0===n?void 0:n.id}var ye=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],be=ye,we=be;function _e(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function xe(e,t){e.userFocus=t}function Ee(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function ke(e){var t=X(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function Se(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,i=void 0===o?ke:o;return i(e)?-1:(e.focus({preventScroll:r}),i(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:r})})))}function Ce(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var Pe=(0,b.createContext)(Ce);var Oe=V({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=(0,b.useContext)(Pe),r=(0,b.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=(0,b.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),i=t.id||e.id||""+o+r;return m(m({},e),{},{id:i})},useProps:function(e,t){return m({id:e.id},t)}});B({as:"div",useHook:Oe});function Me(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=U(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}function Ie(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(Me(e,t,n))}(e,"input",{bubbles:!0}))}}function Te(e){return e.querySelector("[data-composite-item-widget]")}var De=V({name:"CompositeItem",compose:[me,Oe],keys:we,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return me.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=v(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,s=v(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(r!==a)return!1;return me.unstable_propsAreEqual(o,s)},useOptions:function(e){return m(m({},e),{},{id:e.id,currentId:ge(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,i=void 0===o?0:o,a=t.onMouseDown,s=t.onFocus,l=t.onBlurCapture,u=t.onKeyDown,c=t.onClick,d=v(t,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),f=(0,b.useRef)(null),p=e.id,h=e.disabled&&!e.focusable,g=e.currentId===p,w=q(g),_=(0,b.useRef)(!1),x=function(e){return(0,b.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),E=q(a),k=q(s),S=q(l),C=q(u),P=q(c),O=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&g||!(null!==(n=e.items)&&void 0!==n&&n.length);(0,b.useEffect)((function(){var t;if(p)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:p,ref:f,disabled:!!h}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,p)}}),[p,h,e.registerItem,e.unregisterItem]),(0,b.useEffect)((function(){var t=f.current;t&&e.unstable_moves&&w.current&&_e(t)}),[e.unstable_moves]);var M=(0,b.useCallback)((function(e){var t;null===(t=E.current)||void 0===t||t.call(E,e),xe(e.currentTarget,!0)}),[]),I=(0,b.useCallback)((function(t){var n,r,o=!!t.currentTarget.userFocus;if(xe(t.currentTarget,!1),null===(n=k.current)||void 0===n||n.call(k,t),!t.defaultPrevented&&!Q(t)&&p&&!function(e,t){if(Y(e))return!1;for(var n,r=y(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,p),o&&e.unstable_virtual&&e.baseId&&Y(t))){var i=U(t.target).getElementById(e.baseId);i&&(_.current=!0,Se(i))}}),[p,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),T=(0,b.useCallback)((function(t){var n;null===(n=S.current)||void 0===n||n.call(S,t),t.defaultPrevented||e.unstable_virtual&&_.current&&(_.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),D=(0,b.useCallback)((function(t){var n;if(Y(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,i=!(null==x||!x.groupId),a={ArrowUp:(i||r)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||r)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:function(){var n,r;!i||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!i||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;i?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;i?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=C.current)||void 0===n||n.call(C,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var s=Te(t.currentTarget);s&&Ee(s)&&(s.focus(),Ie(s,""))}else if("Delete"===t.key||"Backspace"===t.key){var l=Te(t.currentTarget);l&&Ee(l)&&(t.preventDefault(),Ie(l,""))}}}),[e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),A=(0,b.useCallback)((function(e){var t;if(null===(t=P.current)||void 0===t||t.call(P,e),!e.defaultPrevented){var n=Te(e.currentTarget);n&&!J(n)&&n.focus()}}),[]);return m({ref:W(f,r),id:p,tabIndex:O?i:-1,"aria-selected":!(!e.unstable_virtual||!g)||void 0,onMouseDown:M,onFocus:I,onBlurCapture:T,onKeyDown:D,onClick:A},d)}}),Ae=B({as:"button",memo:!0,useHook:De}),Re=window.wp.dom;var Ne=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function Le(e,t,n,r,o,i,a,s,l){const{width:u}=t;"left"===n&&(0,d.isRTL)()?n="right":"right"===n&&(0,d.isRTL)()&&(n="left"),"left"===r&&(0,d.isRTL)()?r="right":"right"===r&&(0,d.isRTL)()&&(r="left");const c=Math.round(e.left+e.width/2),f={popoverLeft:c,contentWidth:(c-u/2>0?u/2:c)+(c+u/2>window.innerWidth?window.innerWidth-c:u/2)};let p=e.left;"right"===r?p=e.right:"middle"===i||l||(p=c);let h=e.right;"left"===r?h=e.left:"middle"===i||l||(h=c);const m={popoverLeft:p,contentWidth:p-u>0?u:p},v={popoverLeft:h,contentWidth:h+u>window.innerWidth?window.innerWidth-h:u};let g,y=n,b=null;if(!o&&!s)if("center"===n&&f.contentWidth===u)y="center";else if("left"===n&&m.contentWidth===u)y="left";else if("right"===n&&v.contentWidth===u)y="right";else{y=m.contentWidth>v.contentWidth?"left":"right";const e="left"===y?m.contentWidth:v.contentWidth;u>window.innerWidth&&(b=window.innerWidth),e!==u&&(y="center",f.popoverLeft=window.innerWidth/2)}return g="center"===y?f.popoverLeft:"left"===y?m.popoverLeft:v.popoverLeft,a&&(g=Math.min(g,a.offsetLeft+a.offsetWidth-u),(0,d.isRTL)()||(g=Math.max(g,0))),{xAxis:y,popoverLeft:g,contentWidth:b}}function Fe(e,t,n,r,o,i,a,s,l){const{height:u}=t;if(o){const t=o.getBoundingClientRect(),r=t.top+u-a,i=t.bottom-u-a;if(e.top<=r){if(l){if(!(u+100?u/2:c)+(c+u/2>window.innerHeight?window.innerHeight-c:u/2)},f={popoverTop:e.top,contentHeight:e.top-10-u>0?u:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+u>window.innerHeight?window.innerHeight-10-e.bottom:u};let h,m=n,v=null;if(!o&&!s)if("middle"===n&&d.contentHeight===u)m="middle";else if("top"===n&&f.contentHeight===u)m="top";else if("bottom"===n&&p.contentHeight===u)m="bottom";else{m=f.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?f.contentHeight:p.contentHeight;v=e!==u?e:null}return h="middle"===m?d.popoverTop:"top"===m?f.popoverTop:p.popoverTop,{yAxis:m,popoverTop:h,contentHeight:v}}function je(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}var Be=window.wp.deprecated,ze=n.n(Be);var Ve=function(e){let{icon:t,className:n,...r}=e;const o=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return(0,s.createElement)("span",a({className:o},r))};var He=function(e){let{icon:t=null,size:n=24,...r}=e;if("string"==typeof t)return(0,s.createElement)(Ve,a({icon:t},r));if((0,s.isValidElement)(t)&&Ve===t.type)return(0,s.cloneElement)(t,{...r});if("function"==typeof t)return t.prototype instanceof s.Component?(0,s.createElement)(t,{size:n,...r}):t({size:n,...r});if(t&&("svg"===t.type||t.type===i.SVG)){const e={width:n,height:n,...t.props,...r};return(0,s.createElement)(i.SVG,e)}return(0,s.isValidElement)(t)?(0,s.cloneElement)(t,{size:n,...r}):t};window.wp.warning;const We=(0,s.createContext)({}),Ue=()=>(0,s.useContext)(We);function $e(e){let{value:t}=e;const n=Ue(),r=(0,s.useRef)(t);!function(e,t){const n=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)}((()=>{(0,l.isEqual)(r.current,t)&&r.current!==t&&"undefined"!=typeof process&&process.env}),[t]);return(0,s.useMemo)((()=>(0,l.merge)((0,l.cloneDeep)(n),t)),[n,t])}const Ke=(0,s.memo)((e=>{let{children:t,value:n}=e;const r=$e({value:n});return(0,s.createElement)(We.Provider,{value:r},t)}));var Ge=n(9756),qe=n.n(Ge);const Ye=qe()((function(e){return`components-${(0,l.kebabCase)(e)}`}));var Xe=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?rt(pt,--dt):0,ut--,10===ft&&(ut=1,lt--),ft}function gt(){return ft=dt2||_t(ft)>3?"":" "}function Ct(e,t){for(;--t&>()&&!(ft<48||ft>102||ft>57&&ft<65||ft>70&&ft<97););return wt(e,bt()+(t<6&&32==yt()&&32==gt()))}function Pt(e){for(;gt();)switch(ft){case e:return dt;case 34:case 39:34!==e&&39!==e&&Pt(ft);break;case 40:41===e&&Pt(e);break;case 92:gt()}return dt}function Ot(e,t){for(;gt()&&e+ft!==57&&(e+ft!==84||47!==yt()););return"/*"+wt(t,dt-1)+"*"+Je(47===e?e:gt())}function Mt(e){for(;!_t(yt());)gt();return wt(e,dt)}var It="-ms-",Tt="-moz-",Dt="-webkit-",At="comm",Rt="rule",Nt="decl",Lt="@keyframes";function Ft(e,t){for(var n="",r=at(e),o=0;o6)switch(rt(e,t+1)){case 109:if(45!==rt(e,t+4))break;case 102:return tt(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+Tt+(108==rt(e,t+3)?"$3":"$2-$3"))+e;case 115:return~nt(e,"stretch")?Bt(tt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==rt(e,t+1))break;case 6444:switch(rt(e,it(e)-3-(~nt(e,"!important")&&10))){case 107:return tt(e,":",":"+Dt)+e;case 101:return tt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Dt+(45===rt(e,14)?"inline-":"")+"box$3$1"+Dt+"$2$3$1"+It+"$2box$3")+e}break;case 5936:switch(rt(e,t+11)){case 114:return Dt+e+It+tt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Dt+e+It+tt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Dt+e+It+tt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Dt+e+It+e+e}return e}function zt(e){return Et(Vt("",null,null,null,[""],e=xt(e),0,[0],e))}function Vt(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,f=0,p=0,h=0,m=1,v=1,g=1,y=0,b="",w=o,_=i,x=r,E=b;v;)switch(h=y,y=gt()){case 40:if(108!=h&&58==E.charCodeAt(d-1)){-1!=nt(E+=tt(kt(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:E+=kt(y);break;case 9:case 10:case 13:case 32:E+=St(h);break;case 92:E+=Ct(bt()-1,7);continue;case 47:switch(yt()){case 42:case 47:st(Wt(Ot(gt(),bt()),t,n),l);break;default:E+="/"}break;case 123*m:s[u++]=it(E)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:p>0&&it(E)-d&&st(p>32?Ut(E+";",r,n,d-1):Ut(tt(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(st(x=Ht(E,t,n,u,c,o,s,b,w=[],_=[],d),i),123===y)if(0===c)Vt(E,t,x,x,w,i,d,s,_);else switch(f){case 100:case 109:case 115:Vt(e,x,x,r&&st(Ht(e,x,x,0,0,o,s,b,o,w=[],d),_),o,_,d,s,r?w:_);break;default:Vt(E,x,x,x,[""],_,0,s,_)}}u=c=p=0,m=g=1,b=E="",d=a;break;case 58:d=1+it(E),p=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==vt())continue;switch(E+=Je(y),y*m){case 38:g=c>0?1:(E+="\f",-1);break;case 44:s[u++]=(it(E)-1)*g,g=1;break;case 64:45===yt()&&(E+=kt(gt())),f=yt(),c=d=it(b=E+=Mt(bt())),y++;break;case 45:45===h&&2==it(E)&&(m=0)}}return i}function Ht(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,f=0===o?i:[""],p=at(f),h=0,m=0,v=0;h0?f[g]+" "+y:tt(y,/&\f/g,f[g])))&&(l[v++]=b);return ht(e,t,n,0===o?Rt:s,l,u,c)}function Wt(e,t,n){return ht(e,t,n,At,Je(ft),ot(e,2,-2),0)}function Ut(e,t,n,r){return ht(e,t,n,Nt,ot(e,0,r),ot(e,r+1,-1),r)}var $t=function(e,t,n){for(var r=0,o=0;r=o,o=yt(),38===r&&12===o&&(t[n]=1),!_t(o);)gt();return wt(e,dt)},Kt=function(e,t){return Et(function(e,t){var n=-1,r=44;do{switch(_t(r)){case 0:38===r&&12===yt()&&(t[n]=1),e[n]+=$t(dt-1,t,n);break;case 2:e[n]+=kt(r);break;case 4:if(44===r){e[++n]=58===yt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Je(r)}}while(r=gt());return e}(xt(e),t))},Gt=new WeakMap,qt=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Gt.get(n))&&!r){Gt.set(e,!0);for(var o=[],i=Kt(t,o),a=n.props,s=0,l=0;s-1&&!e.return)switch(e.type){case Nt:e.return=Bt(e.value,e.length);break;case Lt:return Ft([mt(e,{value:tt(e.value,"@","@"+Dt)})],r);case Rt:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ft([mt(e,{props:[tt(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ft([mt(e,{props:[tt(t,/:(plac\w+)/,":-webkit-input-$1")]}),mt(e,{props:[tt(t,/:(plac\w+)/,":-moz-$1")]}),mt(e,{props:[tt(t,/:(plac\w+)/,It+"input-$1")]})],r)}return""}))}}],Zt=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||Xt;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},Qt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var en=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},tn=/[A-Z]|^ms/g,nn=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rn=function(e){return 45===e.charCodeAt(1)},on=function(e){return null!=e&&"boolean"!=typeof e},an=en((function(e){return rn(e)?e:e.replace(tn,"-$&").toLowerCase()})),sn=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(nn,(function(e,t,n){return un={name:t,styles:n,next:un},t}))}return 1===Qt[e]||rn(e)||"number"!=typeof t||0===t?t:t+"px"};function ln(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return un={name:n.name,styles:n.styles,next:un},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)un={name:r.name,styles:r.styles,next:un},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;onull!=e&&["name","styles"].every((t=>void 0!==e[t])),Cn=()=>{const e=(0,b.useContext)(fn),t=(0,s.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,n=new Array(t),r=0;rSn(t)?(vn(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function Pn(e,t){const n=Ue();void 0===t&&"undefined"!=typeof process&&process.env;const r=(null==n?void 0:n[t])||{},o={"data-wp-c16t":!0,...(i=t,{"data-wp-component":i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,u=Cn()(Ye(t),e.className),c="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return o.children=c,o.className=u,o}function On(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:r=!1}=n;let o=(0,s.forwardRef)(e);r&&(o=(0,s.memo)(o)),void 0===t&&"undefined"!=typeof process&&process.env;let i=o.__contextSystemKey__||[t];return Array.isArray(t)&&(i=[...i,...t]),"string"==typeof t&&(i=[...i,t]),o.displayName=t,o.__contextSystemKey__=(0,l.uniq)(i),o.selector=`.${Ye(t)}`,o}function Mn(e){if(!e)return[];let t=[];return e.__contextSystemKey__&&(t=e.__contextSystemKey__),e.type&&e.type.__contextSystemKey__&&(t=e.type.__contextSystemKey__),t}function In(e,t){return!!e&&("string"==typeof t?Mn(e).includes(t):!!Array.isArray(t)&&t.some((t=>Mn(e).includes(t))))}const Tn={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Dn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;function An(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Rn=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Nn=en((function(e){return Dn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ln=function(e){return"theme"!==e},Fn=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Nn:Ln},jn=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Bn=b.useInsertionEffect?b.useInsertionEffect:function(e){e()};var zn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Rn(t,n,r);var o;o=function(){return function(e,t,n){Rn(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)},Bn(o);return null},Vn=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=jn(t,n,i),u=l||Fn(s),c=!u("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var p=d.length,h=1;h{e.stopPropagation(),e.preventDefault()}}const R=!T&&(b&&x||_||!!x&&(!E||(0,l.isArray)(E)&&!E.length)&&!1!==b),N=P?M:null,L=O["aria-describedby"]||N,F=(0,s.createElement)(D,a({},A,O,{className:I,"aria-label":O["aria-label"]||x,"aria-describedby":L,ref:n}),v&&"left"===g&&(0,s.createElement)(He,{icon:v,size:y}),k&&(0,s.createElement)(s.Fragment,null,k),v&&"right"===g&&(0,s.createElement)(He,{icon:v,size:y}),E);return R?(0,s.createElement)(s.Fragment,null,(0,s.createElement)($r,{text:P||x,shortcut:_,position:w},F),P&&(0,s.createElement)(Un,null,(0,s.createElement)("span",{id:N},P))):(0,s.createElement)(s.Fragment,null,F,P&&(0,s.createElement)(Un,null,(0,s.createElement)("span",{id:N},P)))}));let Gn=0;function qn(e){const t=document.scrollingElement||document.body;e&&(Gn=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Gn)}let Yn=0;function Xn(){return(0,s.useEffect)((()=>(0===Yn&&qn(!0),++Yn,()=>{1===Yn&&qn(!1),--Yn})),[]),null}var Zn=(0,s.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});var Jn=e=>{const{getSlot:t,subscribe:n}=(0,s.useContext)(Zn),[r,o]=(0,s.useState)(t(e));return(0,s.useEffect)((()=>{o(t(e));return n((()=>{o(t(e))}))}),[e]),r};function Qn(e){let{name:t,children:n,registerFill:r,unregisterFill:o}=e;const i=Jn(t),a=(0,s.useRef)({name:t,children:n});return(0,s.useLayoutEffect)((()=>(r(t,a.current),()=>o(t,a.current))),[]),(0,s.useLayoutEffect)((()=>{a.current.children=n,i&&i.forceUpdate()}),[n]),(0,s.useLayoutEffect)((()=>{t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?((0,l.isFunction)(n)&&(n=n(i.props.fillProps)),(0,s.createPortal)(n,i.node)):null}var er=e=>(0,s.createElement)(Zn.Consumer,null,(t=>{let{registerFill:n,unregisterFill:r}=t;return(0,s.createElement)(Qn,a({},e,{registerFill:n,unregisterFill:r}))}));class tr extends s.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:r}=this.props,o=(0,l.map)(r(t,this),(e=>{const t=(0,l.isFunction)(e.children)?e.children(n):e.children;return s.Children.map(t,((e,t)=>{if(!e||(0,l.isString)(e))return e;const n=e.key||t;return(0,s.cloneElement)(e,{key:n})}))})).filter((0,l.negate)(s.isEmptyElement));return(0,s.createElement)(s.Fragment,null,(0,l.isFunction)(e)?e(o):o)}}var nr=e=>(0,s.createElement)(Zn.Consumer,null,(t=>{let{registerSlot:n,unregisterSlot:r,getFills:o}=t;return(0,s.createElement)(tr,a({},e,{registerSlot:n,unregisterSlot:r,getFills:o}))}));var rr,or=(0,s.createContext)({slots:{},fills:{},registerSlot:()=>{"undefined"!=typeof process&&process.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function ir(e){const t=(0,s.useContext)(or),n=t.slots[e]||{},r=t.fills[e],o=(0,s.useMemo)((()=>r||[]),[r]);return{...n,updateSlot:(0,s.useCallback)((n=>{t.updateSlot(e,n)}),[e,t.updateSlot]),unregisterSlot:(0,s.useCallback)((n=>{t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,s.useCallback)((n=>{t.registerFill(e,n)}),[e,t.registerFill]),unregisterFill:(0,s.useCallback)((n=>{t.unregisterFill(e,n)}),[e,t.unregisterFill])}}var ar=new Uint8Array(16);function sr(){if(!rr&&!(rr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rr(ar)}var lr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var ur=function(e){return"string"==typeof e&&lr.test(e)},cr=[],dr=0;dr<256;++dr)cr.push((dr+256).toString(16).substr(1));var fr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(cr[e[t+0]]+cr[e[t+1]]+cr[e[t+2]]+cr[e[t+3]]+"-"+cr[e[t+4]]+cr[e[t+5]]+"-"+cr[e[t+6]]+cr[e[t+7]]+"-"+cr[e[t+8]]+cr[e[t+9]]+"-"+cr[e[t+10]]+cr[e[t+11]]+cr[e[t+12]]+cr[e[t+13]]+cr[e[t+14]]+cr[e[t+15]]).toLowerCase();if(!ur(n))throw TypeError("Stringified UUID is invalid");return n};var pr=function(e,t,n){var r=(e=e||{}).random||(e.rng||sr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return fr(r)};const hr=new Set,mr=qe()((e=>{let t=pr().replace(/[0-9]/g,"");for(;hr.has(t);)t=pr().replace(/[0-9]/g,"");return hr.add(t),Zt({container:e,key:t})}));function vr(e){let{children:t,document:n}=e;if(!n)return null;const r=mr(n.head);return(0,s.createElement)(pn,{value:r},t)}function gr(){const[,e]=(0,s.useState)({}),t=(0,s.useRef)(!0);return(0,s.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function yr(e){let{name:t,children:n}=e;const r=ir(t),o=(0,s.useRef)({rerender:gr()});if((0,s.useEffect)((()=>(r.registerFill(o),()=>{r.unregisterFill(o)})),[r.registerFill,r.unregisterFill]),!r.ref||!r.ref.current)return null;"function"==typeof n&&(n=n(r.fillProps));const i=(0,s.createElement)(vr,{document:r.ref.current.ownerDocument},n);return(0,s.createPortal)(i,r.ref.current)}var br=(0,s.forwardRef)((function(e,t){let{name:n,fillProps:r={},as:o="div",...i}=e;const l=(0,s.useContext)(or),u=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(l.registerSlot(n,u,r),()=>{l.unregisterSlot(n,u)})),[l.registerSlot,l.unregisterSlot,n]),(0,s.useLayoutEffect)((()=>{l.updateSlot(n,r)})),(0,s.createElement)(o,a({ref:(0,f.useMergeRefs)([t,u])},i))})),wr=window.wp.isShallowEqual,_r=n.n(wr);function xr(e){let{children:t}=e;const n=function(){const[e,t]=(0,s.useState)({}),[n,r]=(0,s.useState)({}),o=(0,s.useCallback)(((e,n,r)=>{t((t=>{const o=t[e]||{};return{...t,[e]:{...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}}}))}),[]),i=(0,s.useCallback)(((e,n)=>{t((t=>{const{[e]:r,...o}=t;return(null==r?void 0:r.ref)===n?o:t}))}),[]),a=(0,s.useCallback)(((t,r)=>{const o=e[t];if(o&&!_r()(o.fillProps,r)){o.fillProps=r;const e=n[t];e&&e.map((e=>e.current.rerender()))}}),[e,n]),l=(0,s.useCallback)(((e,t)=>{r((n=>({...n,[e]:[...n[e]||[],t]})))}),[]),u=(0,s.useCallback)(((e,t)=>{r((n=>n[e]?{...n,[e]:n[e].filter((e=>e!==t))}:n))}),[]);return(0,s.useMemo)((()=>({slots:e,fills:n,registerSlot:o,updateSlot:a,unregisterSlot:i,registerFill:l,unregisterFill:u})),[e,n,o,a,i,l,u])}();return(0,s.createElement)(or.Provider,{value:n},t)}class Er extends s.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){this.fills[e]=(0,l.without)(this.fills[e],t),this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach((e=>e()))}subscribe(e){return this.listeners.push(e),()=>{this.listeners=(0,l.without)(this.listeners,e)}}render(){return(0,s.createElement)(Zn.Provider,{value:this.contextValue},this.props.children)}}function kr(e){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(er,e),(0,s.createElement)(yr,e))}const Sr=(0,s.forwardRef)(((e,t)=>{let{bubblesVirtually:n,...r}=e;return n?(0,s.createElement)(br,a({},r,{ref:t})):(0,s.createElement)(nr,r)}));function Cr(e){let{children:t,...n}=e;return(0,s.createElement)(Er,n,(0,s.createElement)(xr,null,t))}function Pr(e){const t=t=>(0,s.createElement)(kr,a({name:e},t));t.displayName=e+"Fill";const n=t=>(0,s.createElement)(Sr,a({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}function Or(e){return"appear"===e?"top":"left"}function Mr(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:n=Or(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+n):void 0}function Ir(e){let{type:t,options:n={},children:r}=e;return r({className:Mr({type:t,...n})})}const Tr="Popover",Dr=(0,s.createContext)();function Ar(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),a=n?parseInt(n,10):0,s=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+a,width:e.width-l-u,height:e.height-a-s,left:e.left+l,right:e.right-u,top:e.top+a,bottom:e.bottom-s}}function Rr(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Nr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Lr(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const Fr=(0,s.forwardRef)(((e,t)=>{let{headerTitle:n,onClose:r,children:o,className:i,noArrow:l=!0,isAlternate:u,position:d="bottom right",range:p,focusOnMount:h="firstElement",anchorRef:m,shouldAnchorIncludePadding:v,anchorRect:g,getAnchorRect:y,expandOnMobile:b,animate:w=!0,onFocusOutside:_,__unstableStickyBoundaryElement:x,__unstableSlotName:E=Tr,__unstableObserveElement:k,__unstableBoundaryParent:S,__unstableForcePosition:C,__unstableForceXAlignment:P,__unstableEditorCanvasWrapper:O,...M}=e;const I=(0,s.useRef)(null),T=(0,s.useRef)(null),D=(0,s.useRef)(),A=(0,f.useViewportMatch)("medium","<"),[R,N]=(0,s.useState)(),L=(0,s.useContext)(Dr)||E,F=ir(L),j=b&&A,[B,z]=(0,f.useResizeObserver)();l=j||l,(0,s.useLayoutEffect)((()=>{if(j)return Lr(D.current,"is-without-arrow",l),Lr(D.current,"is-alternate",u),Rr(D.current,"data-x-axis"),Rr(D.current,"data-y-axis"),Nr(D.current,"top"),Nr(D.current,"left"),Nr(T.current,"maxHeight"),void Nr(T.current,"maxWidth");const e=()=>{if(!D.current||!T.current)return;let e=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return je(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return je((0,Re.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=je(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:Ar(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=je(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?s:Ar(s,r)}if(!e.current)return;const{parentNode:a}=e.current,s=je(a.getBoundingClientRect(),a.ownerDocument,i);return o?s:Ar(s,a)}(I,g,y,m,v,D.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=D.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}S&&(r=D.current.parentElement);const i=z.height?z:T.current.getBoundingClientRect(),{popoverTop:a,popoverLeft:s,xAxis:c,yAxis:f,contentHeight:p,contentWidth:h}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0;const[u,c="center",d]=n.split(" "),f=Fe(e,t,u,d,r,0,o,a,l);return{...Le(e,t,c,d,r,f.yAxis,i,a,s),...f}}(e,i,d,x,D.current,o,r,C,P,O);"number"==typeof a&&"number"==typeof s&&(Nr(D.current,"top",a+"px"),Nr(D.current,"left",s+"px")),Lr(D.current,"is-without-arrow",l||"center"===c&&"middle"===f),Lr(D.current,"is-alternate",u),Rr(D.current,"data-x-axis",c),Rr(D.current,"data-y-axis",f),Nr(T.current,"maxHeight","number"==typeof p?p+"px":""),Nr(T.current,"maxWidth","number"==typeof h?h+"px":"");N(({left:"right",right:"left"}[c]||"center")+" "+({top:"bottom",bottom:"top"}[f]||"middle"))};e();const{ownerDocument:t}=D.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const i=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",i),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(m);let s;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),k&&(s=new n.MutationObserver(e),s.observe(k,{attributes:!0})),()=>{var l,u;(n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),a&&a!==t)&&(null===(l=a.defaultView)||void 0===l||l.removeEventListener("resize",e),null===(u=a.defaultView)||void 0===u||u.removeEventListener("scroll",e,!0));s&&s.disconnect()}}),[j,g,y,m,v,d,z,x,k,S]);const V=(e,t)=>{"focus-outside"===e&&_?_(t):r&&r()},[H,W]=(0,f.__experimentalUseDialog)({focusOnMount:h,__unstableOnClose:V,onClose:V}),U=(0,f.useMergeRefs)([D,H,t]),$=Boolean(w&&R)&&Mr({type:"appear",origin:R});let K=(0,s.createElement)("div",a({className:c()("components-popover",i,$,{"is-expanded":j,"is-without-arrow":l,"is-alternate":u})},M,{ref:U},W,{tabIndex:"-1"}),j&&(0,s.createElement)(Xn,null),j&&(0,s.createElement)("div",{className:"components-popover__header"},(0,s.createElement)("span",{className:"components-popover__header-title"},n),(0,s.createElement)(Kn,{className:"components-popover__close",icon:Ne,onClick:r})),(0,s.createElement)("div",{ref:T,className:"components-popover__content"},(0,s.createElement)("div",{style:{position:"relative"}},B,o)));return F.ref&&(K=(0,s.createElement)(kr,{name:L},K)),m||g?K:(0,s.createElement)("span",{ref:I},K)}));Fr.Slot=(0,s.forwardRef)((function(e,t){let{name:n=Tr}=e;return(0,s.createElement)(Sr,{bubblesVirtually:!0,name:n,className:"popover-slot",ref:t})})),Fr.__unstableSlotNameProvider=Dr.Provider;var jr=Fr;var Br=function(e){let t,n,{shortcut:r,className:o}=e;return r?((0,l.isString)(r)&&(t=r),(0,l.isObject)(r)&&(t=r.display,n=r.ariaLabel),(0,s.createElement)("span",{className:o,"aria-label":n},t)):null};const zr=700,Vr=(0,s.createElement)("div",{className:"event-catcher"}),Hr=e=>{let{eventHandlers:t,child:n,childrenWithPopover:r}=e;return(0,s.cloneElement)((0,s.createElement)("span",{className:"disabled-element-wrapper"},(0,s.cloneElement)(Vr,t),(0,s.cloneElement)(n,{children:r})),t)},Wr=e=>{let{child:t,eventHandlers:n,childrenWithPopover:r}=e;return(0,s.cloneElement)(t,{...n,children:r})},Ur=(e,t,n)=>{if(1!==s.Children.count(e))return;const r=s.Children.only(e);r.props.disabled||"function"==typeof r.props[t]&&r.props[t](n)};var $r=function(e){const{children:t,position:n,text:r,shortcut:o,delay:i=zr}=e,[a,u]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),p=(0,f.useDebounce)(d,i),h=e=>{Ur(t,"onMouseDown",e),document.addEventListener("mouseup",g),u(!0)},m=e=>{Ur(t,"onMouseUp",e),document.removeEventListener("mouseup",g),u(!1)},v=e=>"mouseUp"===e?m:"mouseDown"===e?h:void 0,g=v("mouseUp"),y=(e,n)=>r=>{if(Ur(t,e,r),r.currentTarget.disabled)return;if("focus"===r.type&&a)return;p.cancel();const o=(0,l.includes)(["focus","mouseenter"],r.type);o!==c&&(n?p(o):d(o))},b=()=>{p.cancel(),document.removeEventListener("mouseup",g)};if((0,s.useEffect)((()=>b),[]),1!==s.Children.count(t))return t;const w={onMouseEnter:y("onMouseEnter",!0),onMouseLeave:y("onMouseLeave"),onClick:y("onClick"),onFocus:y("onFocus"),onBlur:y("onBlur"),onMouseDown:v("mouseDown")},_=s.Children.only(t),{children:x,disabled:E}=_.props,k=E?Hr:Wr,S=(e=>{let{grandchildren:t,isOver:n,position:r,text:o,shortcut:i}=e;return(0,s.concatChildren)(t,n&&(0,s.createElement)(jr,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,s.createElement)(Br,{className:"components-tooltip__shortcut",shortcut:i})))})({grandchildren:x,...{isOver:c,position:n,text:r,shortcut:o}});return k({child:_,eventHandlers:w,childrenWithPopover:S})};const Kr=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],Gr={"top left":(0,d.__)("Top Left"),"top center":(0,d.__)("Top Center"),"top right":(0,d.__)("Top Right"),"center left":(0,d.__)("Center Left"),"center center":(0,d.__)("Center Center"),"center right":(0,d.__)("Center Right"),"bottom left":(0,d.__)("Bottom Left"),"bottom center":(0,d.__)("Bottom Center"),"bottom right":(0,d.__)("Bottom Right")},qr=(0,l.flattenDeep)(Kr);function Yr(e){return("center"===e?"center center":e).replace("-"," ")}function Xr(e,t){return`${e}-${Yr(t).replace(" ","-")}`}n(1281),b.useInsertionEffect?b.useInsertionEffect:b.useLayoutEffect;function Zr(){for(var e=arguments.length,t=new Array(e),n=0;n0:"number"==typeof e},eo=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},to=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},no=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},ro=function(e){return{r:to(e.r,0,255),g:to(e.g,0,255),b:to(e.b,0,255),a:to(e.a)}},oo=function(e){return{r:eo(e.r),g:eo(e.g),b:eo(e.b),a:eo(e.a,3)}},io=/^#([0-9a-f]{3,8})$/i,ao=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},so=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},lo=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:255*[r,s,a,a,l,r][u],g:255*[l,r,r,s,a,a][u],b:255*[a,a,l,r,r,s][u],a:o}},uo=function(e){return{h:no(e.h),s:to(e.s,0,100),l:to(e.l,0,100),a:to(e.a)}},co=function(e){return{h:eo(e.h),s:eo(e.s),l:eo(e.l),a:eo(e.a,3)}},fo=function(e){return lo((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},po=function(e){return{h:(t=so(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},ho=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mo=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,go=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yo={string:[[function(e){var t=io.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?eo(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?eo(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=vo.exec(e)||go.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:ro({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=ho.exec(e)||mo.exec(e);if(!t)return null;var n,r,o=uo({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Jr[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return fo(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Qr(t)&&Qr(n)&&Qr(r)?ro({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Qr(t)||!Qr(n)||!Qr(r))return null;var a=uo({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return fo(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Qr(t)||!Qr(n)||!Qr(r))return null;var a=function(e){return{h:no(e.h),s:to(e.s,0,100),v:to(e.v,0,100),a:to(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return lo(a)},"hsv"]]},bo=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=oo(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?ao(eo(255*o)):"","#"+ao(t)+ao(n)+ao(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return oo(this.rgba)},e.prototype.toRgbString=function(){return t=(e=oo(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return co(po(this.rgba))},e.prototype.toHslString=function(){return t=(e=co(po(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=so(this.rgba),{h:eo(e.h),s:eo(e.s),v:eo(e.v),a:eo(e.a,3)};var e},e.prototype.invert=function(){return So({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),So(_o(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),So(_o(this.rgba,-e))},e.prototype.grayscale=function(){return So(_o(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),So(Eo(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),So(Eo(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?So({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):eo(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=po(this.rgba);return"number"==typeof e?So({h:e,s:t.s,l:t.l,a:t.a}):eo(t.h)},e.prototype.isEqual=function(e){return this.toHex()===So(e).toHex()},e}(),So=function(e){return e instanceof ko?e:new ko(e)},Co=[],Po=function(e){e.forEach((function(e){Co.indexOf(e)<0&&(e(ko,yo),Co.push(e))}))};function Oo(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),u=1/0,c="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var f in n){var p=(o=l,a=i[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));p0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return So(e).alpha(t).toRgbString()}Po([Oo]);const Io={black:"#000",white:"#fff"},To={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},Do={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:Mo(To.gray[900],.62)},Ao={900:Mo("#000510",.9),800:Mo("#00000a",.85),700:Mo("#06060b",.8),600:Mo("#000913",.75),500:Mo("#0a1829",.7),400:Mo("#0a1829",.65),300:Mo("#0e1c2e",.62),200:Mo("#162435",.55),100:Mo("#223443",.5),backgroundFill:Mo(Do[700],.7)},Ro={900:Mo("#304455",.45),800:Mo("#425863",.4),700:Mo("#667886",.35),600:Mo("#7b86a2",.3),500:Mo("#9197a2",.25),400:Mo("#95959c",.2),300:Mo("#829493",.15),200:Mo("#8b8b96",.1),100:Mo("#747474",.05)},No={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:Mo(Io.white,.65)},Lo={900:Mo(Io.white,.5),800:Mo(Io.white,.45),700:Mo(Io.white,.4),600:Mo(Io.white,.35),500:Mo(Io.white,.3),400:Mo(Io.white,.25),300:Mo(Io.white,.2),200:Mo(Io.white,.15),100:Mo(Io.white,.1),backgroundFill:Mo(No[300],.8)},Fo={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},jo={theme:`var( --wp-admin-theme-color, ${Fo.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${Fo.medium.focus})`},Bo={theme:jo.theme,background:Io.white,backgroundDisabled:No[200],border:To.gray[700],borderHover:To.gray[700],borderFocus:jo.themeDark10,borderDisabled:To.gray[400],borderLight:To.gray[300],label:Do[500],textDisabled:Do[150],textDark:Io.white,textLight:Io.black},zo=Object.assign({},Io,{darkGray:(0,l.merge)({},Do,To.darkGray),darkOpacity:Ao,darkOpacityLight:Ro,mediumGray:To.mediumGray,gray:To.gray,lightGray:(0,l.merge)({},No,To.lightGray),lightGrayLight:Lo,blue:(0,l.merge)({},Fo,To.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:jo,ui:Bo});function Vo(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}var Ho={name:"lp9rn7",styles:"border-radius:2px;box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const Wo=()=>Ho,Uo=Vn("div",{target:"e1od1u4s3"})(Wo,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(e=>{let{size:t=92}=e;return Zr("grid-template-rows:repeat( 3, calc( ",t,"px / 3 ) );width:",t,"px;","")}),";"),$o=Vn("div",{target:"e1od1u4s2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),Ko=e=>Zr("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",Vo("transition")," ",(e=>{let{isActive:t}=e;return Zr("box-shadow:",t?`0 0 0 2px ${zo.black}`:null,";color:",t?zo.black:zo.lightGray[800],";*:hover>&{color:",t?zo.black:zo.blue.medium.focus,";}","")})(e),";",""),Go=Vn("span",{target:"e1od1u4s1"})("height:6px;width:6px;",Ko,";"),qo=Vn("span",{target:"e1od1u4s0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function Yo(e){let{isActive:t=!1,value:n,...r}=e;const o=Gr[n];return(0,s.createElement)($r,{text:o},(0,s.createElement)(Ae,a({as:qo,role:"gridcell"},r),(0,s.createElement)(Un,null,n),(0,s.createElement)(Go,{isActive:t,role:"presentation"})))}function Xo(e){return(0,b.useState)(e)[0]}function Zo(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=y(e);!(t=o()).done;)r();return n}function Jo(e){for(var t,n=[],r=y(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function Qo(e){return e.slice().reverse()}function ei(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function ti(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function ni(e){void 0===e&&(e={});var t=Xo(e).baseId,n=(0,b.useContext)(Pe),r=(0,b.useRef)(0),o=(0,b.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}function ri(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function oi(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&ri(t.ref.current,e.ref.current)}))}function ii(e){for(var t,n=0,r=y(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function ai(e){for(var t=Zo(e),n=ii(t),r=[],o=0;oi&&(n=!0),-1):(rZr({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(e=>{let{disablePointerEvents:t}=e;return Zr({pointerEvents:t?"none":null},"","")}),";"),Ai=Vn("span",{target:"elqsdmc0"})("height:2px;width:2px;",Ko,";",(e=>{let{isActive:t}=e;return Zr("box-shadow:",t?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")}),";"),Ri=qo,Ni=24;function Li(e){let{className:t,id:n,label:r=(0,d.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:u=l.noop,width:p=92,...h}=e;const[m]=(0,s.useState)(null!=i?i:o),v=function(e){const t=(0,f.useInstanceId)(Li,"alignment-matrix-control");return e||t}(n),g=Xr(v,m),y=yi({baseId:v,currentId:g,rtl:(0,d.isRTL)()});(0,s.useEffect)((()=>{void 0!==i&&y.setCurrentId(Xr(v,i))}),[i,y.setCurrentId]);const b=c()("component-alignment-matrix-control",t);return(0,s.createElement)(Oi,a({},h,y,{"aria-label":r,as:Uo,className:b,role:"grid",width:p}),Kr.map(((e,t)=>(0,s.createElement)(Ti,a({},y,{as:$o,role:"row",key:t}),e.map((e=>{const t=Xr(v,e),n=y.currentId===t;return(0,s.createElement)(Yo,a({},y,{id:t,isActive:n,key:e,value:e,onFocus:()=>{u(e)},tabIndex:n?0:-1}))}))))))}Li.Icon=function(e){let{className:t,disablePointerEvents:n=!0,size:r=Ni,style:o={},value:i="center",...l}=e;const u=function(){const e=Yr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"center").replace("-"," "),t=qr.indexOf(e);return t>-1?t:void 0}(i),d=(r/Ni).toFixed(2),f=c()("component-alignment-matrix-control-icon",t),p={...o,transform:`scale(${d})`};return(0,s.createElement)(Di,a({},l,{className:f,disablePointerEvents:n,role:"presentation",size:r,style:p}),qr.map(((e,t)=>{const n=u===t;return(0,s.createElement)(Ri,{key:e},(0,s.createElement)(Ai,{isActive:n}))})))}; + */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case o:return t}}}function x(e){return _(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||_(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=_},338:function(e,t,n){"use strict";e.exports=n(4821)},9217:function(e){var t={invalidPredicate:"`predicate` must be a function",invalidPropValidator:"`propValidator` must be a function",requiredCore:"is marked as required",invalidTypeCore:"Invalid input type",predicateFailureCore:"Failed to succeed with predicate",anonymousMessage:"<>",baseInvalidMessage:"Invalid "};function n(e){if("function"!=typeof e)throw new Error(t.invalidPropValidator);var n=e.bind(null,!1,null);return n.isRequired=e.bind(null,!0,null),n.withPredicate=function(n){if("function"!=typeof n)throw new Error(t.invalidPredicate);var r=e.bind(null,!1,n);return r.isRequired=e.bind(null,!0,n),r},n}function r(e,n,r){return new Error("The prop `"+e+"` "+t.requiredCore+" in `"+n+"`, but its value is `"+r+"`.")}e.exports={constructPropValidatorVariations:n,createMomentChecker:function(e,o,i,a){return n((function(n,s,l,u,c,d,f){var p=l[u],h=typeof p,m=function(e,t,n,o){var i=void 0===o,a=null===o;if(e){if(i)return r(n,t,"undefined");if(a)return r(n,t,"null")}return i||a?null:-1}(n,c=c||t.anonymousMessage,f=f||u,p);if(-1!==m)return m;if(o&&!o(p))return new Error(t.invalidTypeCore+": `"+u+"` of type `"+h+"` supplied to `"+c+"`, expected `"+e+"`.");if(!i(p))return new Error(t.baseInvalidMessage+d+" `"+u+"` of type `"+h+"` supplied to `"+c+"`, expected `"+a+"`.");if(s&&!s(p)){var v=s.name||t.anonymousMessage;return new Error(t.baseInvalidMessage+d+" `"+u+"` of type `"+h+"` supplied to `"+c+"`. "+t.predicateFailureCore+" `"+v+"`.")}return null}))},messages:t}},6150:function(e,t,n){var r=n(6292),o=n(3416),i=n(9217);e.exports={momentObj:i.createMomentChecker("object",(function(e){return"object"==typeof e}),(function(e){return o.isValidMoment(e)}),"Moment"),momentString:i.createMomentChecker("string",(function(e){return"string"==typeof e}),(function(e){return o.isValidMoment(r(e))}),"Moment"),momentDurationObj:i.createMomentChecker("object",(function(e){return"object"==typeof e}),(function(e){return r.isDuration(e)}),"Duration")}},3416:function(e,t,n){var r=n(6292);e.exports={isValidMoment:function(e){return!("function"==typeof r.isMoment&&!r.isMoment(e))&&("function"==typeof e.isValid?e.isValid():!isNaN(e))}}},2239:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0?String(e)+"__":"")+String(t)}},1881:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=[],n=!1,r={},o=0;o1&&void 0!==arguments[1]?arguments[1]:{},n=t.stylesPropName,s=void 0===n?"styles":n,c=t.themePropName,f=void 0===c?"theme":c,g=t.cssPropName,x=void 0===g?"css":g,E=t.flushBefore,k=void 0!==E&&E,S=t.pureComponent,C=void 0!==S&&S,P=void 0,O=void 0,M=void 0,I=void 0,T=b(C);function D(e){return e===u.DIRECTIONS.LTR?d.default.resolveLTR:d.default.resolveRTL}function A(e){return e===u.DIRECTIONS.LTR?M:I}function R(t,n){var r=A(t),o=t===u.DIRECTIONS.LTR?P:O,i=d.default.get();return o&&r===i||(t===u.DIRECTIONS.RTL?(O=e?d.default.createRTL(e):y,I=i,o=O):(P=e?d.default.createLTR(e):y,M=i,o=P)),o}function N(e,t){return{resolveMethod:D(e),styleDef:R(e)}}return function(e){var t=e.displayName||e.name||"Component",n=function(t){function n(e,t){p(this,n);var r=h(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t)),o=r.context[u.CHANNEL]?r.context[u.CHANNEL].getState():_;return r.state=N(o),r}return m(n,t),o(n,[{key:"componentDidMount",value:function(){var e=this;this.context[u.CHANNEL]&&(this.channelUnsubscribe=this.context[u.CHANNEL].subscribe((function(t){e.setState(N(t))})))}},{key:"componentWillUnmount",value:function(){this.channelUnsubscribe&&this.channelUnsubscribe()}},{key:"render",value:function(){var t;k&&d.default.flush();var n=this.state,o=n.resolveMethod,i=n.styleDef;return a.default.createElement(e,r({},this.props,(v(t={},f,d.default.get()),v(t,s,i()),v(t,x,o),t)))}}]),n}(T);return n.WrappedComponent=e,n.displayName="withStyles("+String(t)+")",n.contextTypes=w,e.propTypes&&(n.propTypes=(0,i.default)({},e.propTypes),delete n.propTypes[s],delete n.propTypes[f],delete n.propTypes[x]),e.defaultProps&&(n.defaultProps=(0,i.default)({},e.defaultProps)),(0,l.default)(n,e)}};var i=f(n(4011)),a=f(n(9196)),s=f(n(2652)),l=f(n(1281)),u=n(5080),c=f(n(6640)),d=f(n(9349));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.css=d.default.resolveLTR,t.withStylesPropTypes={styles:s.default.object.isRequired,theme:s.default.object.isRequired,css:s.default.func.isRequired};var g={},y=function(){return g};function b(e){if(e){if(!a.default.PureComponent)throw new ReferenceError("withStyles() pureComponent option requires React 15.3.0 or later");return a.default.PureComponent}return a.default.Component}var w=v({},u.CHANNEL,c.default),_=u.DIRECTIONS.LTR},9196:function(e){"use strict";e.exports=window.React},6292:function(e){"use strict";e.exports=window.moment},4080:function(){},3665:function(e,t,n){"use strict";var r=n(4219),o=r("%Array.prototype%"),i=r("%RangeError%"),a=r("%SyntaxError%"),s=r("%TypeError%"),l=n(485),u=Math.pow(2,32)-1,c=r("%Object.setPrototypeOf%",!0)||([].__proto__!==o?null:function(e,t){return e.__proto__=t,e});e.exports=function(e){if(!l(e)||e<0)throw new s("Assertion failed: `length` must be an integer Number >= 0");if(e>u)throw new i("length is greater than (2**32 - 1)");var t=arguments.length>1?arguments[1]:o,n=[];if(t!==o){if(!c)throw new a("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");c(n,t)}return 0!==e&&(n.length=e),n}},1539:function(e,t,n){"use strict";var r=n(4219),o=r("%Symbol.species%",!0),i=r("%TypeError%"),a=n(3665),s=n(6448),l=n(5971),u=n(5176),c=n(485),d=n(9747);e.exports=function(e,t){if(!c(t)||t<0)throw new i("Assertion failed: length must be an integer >= 0");if(!l(e))return a(t);var n=s(e,"constructor");if(o&&"Object"===d(n)&&null===(n=s(n,o))&&(n=void 0),void 0===n)return a(t);if(!u(n))throw new i("C must be a constructor");return new n(t)}},8323:function(e,t,n){"use strict";var r=n(4219),o=n(9630),i=r("%TypeError%"),a=n(5971),s=r("%Reflect.apply%",!0)||o("%Function.prototype.apply%");e.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!a(n))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(e,t,n)}},5597:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(1327),i=n(8487),a=n(6403),s=n(1392),l=n(3428),u=n(3290),c=n(9836),d=n(9747);e.exports=function(e,t,n){if("Object"!==d(e))throw new r("Assertion failed: Type(O) is not Object");if(!u(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var f=a(e,t),p=!f||l(e);return!(f&&!f["[[Configurable]]"]||!p)&&o(s,c,i,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":n,"[[Writable]]":!0})}},3323:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(5597),i=n(3290),a=n(9747);e.exports=function(e,t,n){if("Object"!==a(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var s=o(e,t,n);if(!s)throw new r("unable to create data property");return s}},6356:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(8682),i=n(1327),a=n(8487),s=n(7857),l=n(1392),u=n(3290),c=n(9836),d=n(2402),f=n(9747);e.exports=function(e,t,n){if("Object"!==f(e))throw new r("Assertion failed: Type(O) is not Object");if(!u(t))throw new r("Assertion failed: IsPropertyKey(P) is not true");var p=o({Type:f,IsDataDescriptor:l,IsAccessorDescriptor:s},n)?n:d(n);if(!o({Type:f,IsDataDescriptor:l,IsAccessorDescriptor:s},p))throw new r("Assertion failed: Desc is not a valid Property Descriptor");return i(l,c,a,e,t,p)}},6739:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(8540),i=n(8323),a=n(3323),s=n(6448),l=n(3059),u=n(5971),c=n(2151),d=n(6888);e.exports=function e(t,n,f,p,h){var m;arguments.length>5&&(m=arguments[5]);for(var v=p,g=0;g0&&(_=u(w)),_){var x=c(w);v=e(t,w,x,v,h-1)}else{if(v>=o)throw new r("index too large");a(t,d(v),w),v+=1}}g+=1}return v}},8487:function(e,t,n){"use strict";var r=n(5114),o=n(3359),i=n(9747);e.exports=function(e){return void 0!==e&&r(i,"Property Descriptor","Desc",e),o(e)}},6448:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(3205),i=n(3290),a=n(9747);e.exports=function(e,t){if("Object"!==a(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},3059:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(3290),i=n(9747);e.exports=function(e,t){if("Object"!==i(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");return t in e}},7857:function(e,t,n){"use strict";var r=n(9284),o=n(5114),i=n(9747);e.exports=function(e){return void 0!==e&&(o(i,"Property Descriptor","Desc",e),!(!r(e,"[[Get]]")&&!r(e,"[[Set]]")))}},5971:function(e,t,n){"use strict";e.exports=n(4351)},1089:function(e,t,n){"use strict";e.exports=n(4363)},5176:function(e,t,n){"use strict";var r=n(137)("%Reflect.construct%",!0),o=n(6356);try{o({},"",{"[[Get]]":function(){}})}catch(e){o=null}if(o&&r){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),e.exports=function(e){try{r(e,a)}catch(e){return e===i}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},1392:function(e,t,n){"use strict";var r=n(9284),o=n(5114),i=n(9747);e.exports=function(e){return void 0!==e&&(o(i,"Property Descriptor","Desc",e),!(!r(e,"[[Value]]")&&!r(e,"[[Writable]]")))}},3428:function(e,t,n){"use strict";var r=n(4219),o=r("%Object.preventExtensions%",!0),i=r("%Object.isExtensible%",!0),a=n(5019);e.exports=o?function(e){return!a(e)&&i(e)}:function(e){return!a(e)}},485:function(e,t,n){"use strict";var r=n(13),o=n(961),i=n(9747),a=n(3234),s=n(7061);e.exports=function(e){if("Number"!==i(e)||a(e)||!s(e))return!1;var t=r(e);return o(t)===t}},3290:function(e){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},1275:function(e,t,n){"use strict";var r=n(4219)("%Symbol.match%",!0),o=n(4221),i=n(3704);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(r){var t=e[r];if(void 0!==t)return i(t)}return o(e)}},2151:function(e,t,n){"use strict";var r=n(4219)("%TypeError%"),o=n(6448),i=n(6840),a=n(9747);e.exports=function(e){if("Object"!==a(e))throw new r("Assertion failed: `obj` must be an Object");return i(o(e,"length"))}},6403:function(e,t,n){"use strict";var r=n(4219),o=n(5180),i=r("%TypeError%"),a=n(9630)("Object.prototype.propertyIsEnumerable"),s=n(9284),l=n(5971),u=n(3290),c=n(1275),d=n(2402),f=n(9747);e.exports=function(e,t){if("Object"!==f(e))throw new i("Assertion failed: O must be an Object");if(!u(t))throw new i("Assertion failed: P must be a Property Key");if(s(e,t)){if(!o){var n=l(e)&&"length"===t,r=c(e)&&"lastIndex"===t;return{"[[Configurable]]":!(n||r),"[[Enumerable]]":a(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return d(o(e,t))}}},6953:function(e,t,n){"use strict";e.exports=n(3031)},9836:function(e,t,n){"use strict";var r=n(3234);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:r(e)&&r(t)}},3704:function(e){"use strict";e.exports=function(e){return!!e}},1723:function(e,t,n){"use strict";var r=n(13),o=n(961),i=n(5541),a=n(3234),s=n(7061),l=n(2163);e.exports=function(e){var t=i(e);return a(t)||0===t?0:s(t)?l(t)*o(r(t)):t}},6840:function(e,t,n){"use strict";var r=n(8540),o=n(1723);e.exports=function(e){var t=o(e);return t<=0?0:t>r?r:t}},5541:function(e,t,n){"use strict";var r=n(4219),o=r("%TypeError%"),i=r("%Number%"),a=r("%RegExp%"),s=r("%parseInt%"),l=n(9630),u=n(8441),c=n(5019),d=l("String.prototype.slice"),f=u(/^0b[01]+$/i),p=u(/^0o[0-7]+$/i),h=u(/^[-+]0x[0-9a-f]+$/i),m=u(new a("["+["…","​","￾"].join("")+"]","g")),v=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),g=new RegExp("(^["+v+"]+)|(["+v+"]+$)","g"),y=l("String.prototype.replace"),b=n(6745);e.exports=function e(t){var n=c(t)?t:b(t,i);if("symbol"==typeof n)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof n)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");if("string"==typeof n){if(f(n))return e(s(d(n,2),2));if(p(n))return e(s(d(n,2),8));if(m(n)||h(n))return NaN;var r=function(e){return y(e,g,"")}(n);if(r!==n)return e(r)}return i(n)}},1283:function(e,t,n){"use strict";var r=n(4219)("%Object%"),o=n(6953);e.exports=function(e){return o(e),r(e)}},6745:function(e,t,n){"use strict";var r=n(5249);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},2402:function(e,t,n){"use strict";var r=n(9284),o=n(4219)("%TypeError%"),i=n(9747),a=n(3704),s=n(1089);e.exports=function(e){if("Object"!==i(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(r(e,"enumerable")&&(t["[[Enumerable]]"]=a(e.enumerable)),r(e,"configurable")&&(t["[[Configurable]]"]=a(e.configurable)),r(e,"value")&&(t["[[Value]]"]=e.value),r(e,"writable")&&(t["[[Writable]]"]=a(e.writable)),r(e,"get")){var n=e.get;if(void 0!==n&&!s(n))throw new o("getter must be a function");t["[[Get]]"]=n}if(r(e,"set")){var l=e.set;if(void 0!==l&&!s(l))throw new o("setter must be a function");t["[[Set]]"]=l}if((r(t,"[[Get]]")||r(t,"[[Set]]"))&&(r(t,"[[Value]]")||r(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},6888:function(e,t,n){"use strict";var r=n(4219),o=r("%String%"),i=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},9747:function(e,t,n){"use strict";var r=n(290);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},13:function(e,t,n){"use strict";var r=n(4219)("%Math.abs%");e.exports=function(e){return r(e)}},961:function(e){"use strict";var t=Math.floor;e.exports=function(e){return t(e)}},3031:function(e,t,n){"use strict";var r=n(4219)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},290:function(e){"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},137:function(e,t,n){"use strict";e.exports=n(4219)},1327:function(e,t,n){"use strict";var r=n(8198),o=n(4219),i=r()&&o("%Object.defineProperty%",!0),a=r.hasArrayLengthDefineBug(),s=a&&n(4351),l=n(9630)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,n,r,o,u){if(!i){if(!e(u))return!1;if(!u["[[Configurable]]"]||!u["[[Writable]]"])return!1;if(o in r&&l(r,o)!==!!u["[[Enumerable]]"])return!1;var c=u["[[Value]]"];return r[o]=c,t(r[o],c)}return a&&"length"===o&&"[[Value]]"in u&&s(r)&&r.length!==u["[[Value]]"]?(r.length=u["[[Value]]"],r.length===u["[[Value]]"]):(i(r,o,n(u)),!0)}},4351:function(e,t,n){"use strict";var r=n(4219)("%Array%"),o=!r.isArray&&n(9630)("Object.prototype.toString");e.exports=r.isArray||function(e){return"[object Array]"===o(e)}},5114:function(e,t,n){"use strict";var r=n(4219),o=r("%TypeError%"),i=r("%SyntaxError%"),a=n(9284),s={"Property Descriptor":function(e){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(a(e,n)&&!t[n])return!1;var r=a(e,"[[Value]]"),i=a(e,"[[Get]]")||a(e,"[[Set]]");if(r&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":n(7040)};e.exports=function(e,t,n,r){var a=s[t];if("function"!=typeof a)throw new i("unknown record type: "+t);if("Object"!==e(r)||!a(r))throw new o(n+" must be a "+t)}},3359:function(e){"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},5180:function(e,t,n){"use strict";var r=n(4219)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},7061:function(e){"use strict";var t=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!t(e)&&e!==1/0&&e!==-1/0}},7040:function(e,t,n){"use strict";var r=n(9284);e.exports=function(e){return r(e,"[[StartIndex]]")&&r(e,"[[EndIndex]]")&&e["[[StartIndex]]"]>=0&&e["[[EndIndex]]"]>=e["[[StartIndex]]"]&&String(parseInt(e["[[StartIndex]]"],10))===String(e["[[StartIndex]]"])&&String(parseInt(e["[[EndIndex]]"],10))===String(e["[[EndIndex]]"])}},3234:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},5019:function(e){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},8682:function(e,t,n){"use strict";var r=n(4219),o=n(9284),i=r("%TypeError%");e.exports=function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(o(t,r)&&!n[r])return!1;if(e.IsDataDescriptor(t)&&e.IsAccessorDescriptor(t))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},8540:function(e,t,n){"use strict";var r=n(4219),o=r("%Math%"),i=r("%Number%");e.exports=i.MAX_SAFE_INTEGER||o.pow(2,53)-1},8441:function(e,t,n){"use strict";var r=n(9630)("RegExp.prototype.exec");e.exports=function(e){return function(t){return null!==r(e,t)}}},2163:function(e){"use strict";e.exports=function(e){return e>=0?1:-1}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){"use strict";n.r(r),n.d(r,{AnglePickerControl:function(){return Qm},Animate:function(){return Mr},Autocomplete:function(){return av},BaseControl:function(){return gv},BlockQuotation:function(){return i.BlockQuotation},Button:function(){return $n},ButtonGroup:function(){return Zx},Card:function(){return IE},CardBody:function(){return jE},CardDivider:function(){return $E},CardFooter:function(){return KE},CardHeader:function(){return GE},CardMedia:function(){return qE},CheckboxControl:function(){return XE},Circle:function(){return i.Circle},ClipboardButton:function(){return ZE},ColorIndicator:function(){return cg},ColorPalette:function(){return p_},ColorPicker:function(){return r_},ComboboxControl:function(){return CS},CustomGradientPicker:function(){return Vk},CustomSelectControl:function(){return NC},Dashicon:function(){return Ve},DatePicker:function(){return VC},DateTimePicker:function(){return GC},Disabled:function(){return nP},Draggable:function(){return oP},DropZone:function(){return dP},DropZoneProvider:function(){return fP},Dropdown:function(){return pg},DropdownMenu:function(){return Jk},DuotonePicker:function(){return _P},DuotoneSwatch:function(){return vP},ExternalLink:function(){return kP},Fill:function(){return Er},Flex:function(){return Ip},FlexBlock:function(){return vp},FlexItem:function(){return gp},FocalPointPicker:function(){return $O},FocusReturnProvider:function(){return DA},FocusableIframe:function(){return KO},FontSizePicker:function(){return IM},FormFileUpload:function(){return TM},FormToggle:function(){return DM},FormTokenField:function(){return FM},G:function(){return i.G},GradientPicker:function(){return Uk},Guide:function(){return zM},GuidePage:function(){return VM},HorizontalRule:function(){return i.HorizontalRule},Icon:function(){return He},IconButton:function(){return HM},IsolatedEventContainer:function(){return yA},KeyboardShortcuts:function(){return $M},MenuGroup:function(){return KM},MenuItem:function(){return GM},MenuItemsChoice:function(){return qM},Modal:function(){return DS},NavigableMenu:function(){return Xk},Notice:function(){return WI},NoticeList:function(){return UI},Panel:function(){return KI},PanelBody:function(){return XI},PanelHeader:function(){return $I},PanelRow:function(){return JI},Path:function(){return i.Path},Placeholder:function(){return QI},Polygon:function(){return i.Polygon},Popover:function(){return Fr},QueryControls:function(){return sT},RadioControl:function(){return dT},RangeControl:function(){return ry},Rect:function(){return i.Rect},ResizableBox:function(){return XT},ResponsiveWrapper:function(){return ZT},SVG:function(){return i.SVG},SandBox:function(){return eD},ScrollLock:function(){return Yn},SearchControl:function(){return eI},SelectControl:function(){return Sg},Slot:function(){return kr},SlotFillProvider:function(){return Sr},Snackbar:function(){return tD},SnackbarList:function(){return oD},Spinner:function(){return cD},TabPanel:function(){return pD},TabbableContainer:function(){return YM},TextControl:function(){return hD},TextHighlight:function(){return _D},TextareaControl:function(){return wD},TimePicker:function(){return KC},Tip:function(){return ED},ToggleControl:function(){return kD},Toolbar:function(){return BD},ToolbarButton:function(){return DD},ToolbarDropdownMenu:function(){return zD},ToolbarGroup:function(){return ND},ToolbarItem:function(){return ID},Tooltip:function(){return Ur},TreeSelect:function(){return nT},VisuallyHidden:function(){return Wn},__experimentalAlignmentMatrixControl:function(){return Ni},__experimentalBorderBoxControl:function(){return X_},__experimentalBorderControl:function(){return N_},__experimentalBoxControl:function(){return Xx},__experimentalConfirmDialog:function(){return RS},__experimentalDimensionControl:function(){return YC},__experimentalDivider:function(){return UE},__experimentalElevation:function(){return tE},__experimentalFlyout:function(){return yO},__experimentalGrid:function(){return j_},__experimentalHStack:function(){return bg},__experimentalHasSplitBorders:function(){return U_},__experimentalHeading:function(){return l_},__experimentalInputControl:function(){return Um},__experimentalIsDefinedBorder:function(){return W_},__experimentalIsEmptyBorder:function(){return H_},__experimentalItem:function(){return WM},__experimentalItemGroup:function(){return mk},__experimentalNavigation:function(){return hI},__experimentalNavigationBackButton:function(){return gI},__experimentalNavigationGroup:function(){return bI},__experimentalNavigationItem:function(){return CI},__experimentalNavigationMenu:function(){return II},__experimentalNavigatorBackButton:function(){return VI},__experimentalNavigatorButton:function(){return zI},__experimentalNavigatorProvider:function(){return RI},__experimentalNavigatorScreen:function(){return jI},__experimentalNumberControl:function(){return Hv},__experimentalPaletteEdit:function(){return vS},__experimentalParseQuantityAndUnitFromRawValue:function(){return __},__experimentalRadio:function(){return uT},__experimentalRadioGroup:function(){return cT},__experimentalScrollable:function(){return FE},__experimentalSpacer:function(){return Jm},__experimentalStyleProvider:function(){return mr},__experimentalSurface:function(){return dD},__experimentalText:function(){return ah},__experimentalToggleGroupControl:function(){return iM},__experimentalToggleGroupControlOption:function(){return xM},__experimentalToggleGroupControlOptionIcon:function(){return SD},__experimentalToolbarContext:function(){return MD},__experimentalToolsPanel:function(){return aA},__experimentalToolsPanelContext:function(){return XD},__experimentalToolsPanelItem:function(){return sA},__experimentalTreeGrid:function(){return fA},__experimentalTreeGridCell:function(){return vA},__experimentalTreeGridItem:function(){return mA},__experimentalTreeGridRow:function(){return pA},__experimentalTruncate:function(){return s_},__experimentalUnitControl:function(){return I_},__experimentalUseCustomUnits:function(){return E_},__experimentalUseNavigator:function(){return BI},__experimentalUseSlot:function(){return or},__experimentalVStack:function(){return a_},__experimentalView:function(){return Hn},__experimentalZStack:function(){return EA},__unstableComposite:function(){return Pi},__unstableCompositeGroup:function(){return Ii},__unstableCompositeItem:function(){return Ae},__unstableDisclosureContent:function(){return Wb},__unstableGetAnimateClassName:function(){return Or},__unstableMotion:function(){return lp},__unstableUseAutocompleteProps:function(){return iv},__unstableUseCompositeState:function(){return gi},__unstableUseNavigateRegions:function(){return SA},createSlotFill:function(){return Cr},navigateRegions:function(){return CA},withConstrainedTabbing:function(){return PA},withFallbackStyles:function(){return OA},withFilters:function(){return IA},withFocusOutside:function(){return kS},withFocusReturn:function(){return TA},withNotices:function(){return AA},withSpokenMessages:function(){return RM}});var e={};n.r(e),n.d(e,{Text:function(){return $p},block:function(){return Kp},destructive:function(){return qp},highlighterText:function(){return Xp},muted:function(){return Yp},positive:function(){return Gp},upperCase:function(){return Zp}});var t={};n.r(t),n.d(t,{TooltipContent:function(){return Jb},TooltipPopoverView:function(){return Qb},TooltipShortcut:function(){return tw},noOutline:function(){return ew}});var o={};n.r(o),n.d(o,{ButtonContentView:function(){return hM},LabelView:function(){return cM},buttonActive:function(){return pM},buttonView:function(){return fM},labelBlock:function(){return dM},medium:function(){return vM},separatorActive:function(){return mM}});var i=window.wp.primitives;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var b=n(9196),w=n.n(b);function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t=0||(o[n]=e[n]);return o}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var P=(0,b.createContext)({});var O,M=function(e,t,n){void 0===n&&(n=t.children);var r=(0,b.useContext)(P);if(r.useCreateElement)return r.useCreateElement(e,t,n);if("string"==typeof e&&function(e){return"function"==typeof e}(n)){t.children;return n(k(t,["children"]))}return(0,b.createElement)(e,t,n)};function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t=0?n[a]=e[a]:r[a]=e[a]}return[n,r]}function L(e,t){if(void 0===t&&(t=[]),!R(e.state))return N(e,t);var n=N(e,[].concat(t,["state"])),r=n[0],o=n[1],i=r.state,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(r,["state"]);return[D(D({},i),a),o]}function F(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0,a=n;i0||t.offsetHeight>0||e.getClientRects().length>0}(e)}function ae(e){return ie(e)&&!function(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}(e)}function se(e,t){var n=Array.from(e.querySelectorAll(oe)),r=n.filter(ae);return ae(e)&&r.unshift(e),!r.length&&t?n:r}function le(e,t){return se(e,t)[0]||null}var ue=V({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var n=e.unstable_system,r=v(e,["unstable_system"]),o=t.unstable_system,i=v(t,["unstable_system"]);return!(n!==o&&!F(n,o))&&F(r,i)}}),ce=(B({as:"div",useHook:ue}),ne("Mac")&&!ne("Chrome")&&(ne("Safari")||ne("Firefox")));function de(e){!J(e)&&ie(e)&&e.focus()}function fe(e,t,n,r){return e?t&&!n?-1:void 0:t?r:r||0}function pe(e,t){return(0,b.useCallback)((function(n){var r;null===(r=e.current)||void 0===r||r.call(e,n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}),[e,t])}var he=V({name:"Tabbable",compose:ue,keys:["disabled","focusable"],useOptions:function(e,t){return m({disabled:t.disabled},e)},useProps:function(e,t){var n=t.ref,r=t.tabIndex,o=t.onClickCapture,i=t.onMouseDownCapture,a=t.onMouseDown,s=t.onKeyPressCapture,l=t.style,u=v(t,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),c=(0,b.useRef)(null),d=q(o),f=q(i),p=q(a),h=q(s),g=!!e.disabled&&!e.focusable,y=(0,b.useState)(!0),w=y[0],_=y[1],x=(0,b.useState)(!0),E=x[0],k=x[1],S=e.disabled?m({pointerEvents:"none"},l):l;G((function(){var e=c.current;e&&(["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(e.tagName)||_(!1),function(e){return["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)}(e)||k(!1))}),[]);var C=pe(d,e.disabled),P=pe(f,e.disabled),O=pe(h,e.disabled),M=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e);var n=e.currentTarget;if(!e.defaultPrevented&&ce&&!Q(e)&&te(n)){var r=requestAnimationFrame((function(){n.removeEventListener("mouseup",o,!0),de(n)})),o=function(){cancelAnimationFrame(r),de(n)};n.addEventListener("mouseup",o,{once:!0,capture:!0})}}),[]);return m({ref:W(c,n),style:S,tabIndex:fe(g,w,E,r),disabled:!(!g||!E)||void 0,"aria-disabled":!!e.disabled||void 0,onClickCapture:C,onMouseDownCapture:P,onMouseDown:M,onKeyPressCapture:O},u)}});B({as:"div",useHook:he});var me=V({name:"Clickable",compose:he,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function(e){var t=e.unstable_clickOnEnter,n=void 0===t||t,r=e.unstable_clickOnSpace;return m({unstable_clickOnEnter:n,unstable_clickOnSpace:void 0===r||r},v(e,["unstable_clickOnEnter","unstable_clickOnSpace"]))},useProps:function(e,t){var n=t.onKeyDown,r=t.onKeyUp,o=v(t,["onKeyDown","onKeyUp"]),i=(0,b.useState)(!1),a=i[0],s=i[1],l=q(n),u=q(r),c=(0,b.useCallback)((function(t){var n;if(null===(n=l.current)||void 0===n||n.call(l,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey&&Y(t)){var r=e.unstable_clickOnEnter&&"Enter"===t.key,o=e.unstable_clickOnSpace&&" "===t.key;if(r||o){if(function(e){var t=e.currentTarget;return!!e.isTrusted&&(te(t)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"A"===t.tagName||"SELECT"===t.tagName)}(t))return;t.preventDefault(),r?t.currentTarget.click():o&&s(!0)}}}),[e.disabled,e.unstable_clickOnEnter,e.unstable_clickOnSpace]),d=(0,b.useCallback)((function(t){var n;if(null===(n=u.current)||void 0===n||n.call(u,t),!t.defaultPrevented&&!e.disabled&&!t.metaKey){var r=e.unstable_clickOnSpace&&" "===t.key;a&&r&&(s(!1),t.currentTarget.click())}}),[e.disabled,e.unstable_clickOnSpace,a]);return m({"data-active":a||void 0,onKeyDown:c,onKeyUp:d},o)}});B({as:"button",memo:!0,useHook:me});function ve(e,t){return t?e.find((function(e){return!e.disabled&&e.id!==t})):e.find((function(e){return!e.disabled}))}function ge(e,t){var n;return t||null===t?t:e.currentId||null===e.currentId?e.currentId:null===(n=ve(e.items||[]))||void 0===n?void 0:n.id}var ye=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],be=ye,we=be;function _e(e){e.userFocus=!0,e.focus(),e.userFocus=!1}function xe(e,t){e.userFocus=t}function Ee(e){try{var t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName,r="true"===e.contentEditable;return t||n||r||!1}catch(e){return!1}}function ke(e){var t=X(e);if(!t)return!1;if(t===e)return!0;var n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function Se(e,t){var n=void 0===t?{}:t,r=n.preventScroll,o=n.isActive,i=void 0===o?ke:o;return i(e)?-1:(e.focus({preventScroll:r}),i(e)?-1:requestAnimationFrame((function(){e.focus({preventScroll:r})})))}function Ce(e){return void 0===e&&(e="id"),(e?e+"-":"")+Math.random().toString(32).substr(2,6)}var Pe=(0,b.createContext)(Ce);var Oe=V({keys:[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),useOptions:function(e,t){var n=(0,b.useContext)(Pe),r=(0,b.useState)((function(){return e.unstable_idCountRef?(e.unstable_idCountRef.current+=1,"-"+e.unstable_idCountRef.current):e.baseId?"-"+n(""):""}))[0],o=(0,b.useMemo)((function(){return e.baseId||n()}),[e.baseId,n]),i=t.id||e.id||""+o+r;return m(m({},e),{},{id:i})},useProps:function(e,t){return m({id:e.id},t)}});B({as:"div",useHook:Oe});function Me(e,t,n){if("function"==typeof Event)return new Event(t,n);var r=U(e).createEvent("Event");return r.initEvent(t,null==n?void 0:n.bubbles,null==n?void 0:n.cancelable),r}function Ie(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){var n,r=Object.getPrototypeOf(e),o=null===(n=Object.getOwnPropertyDescriptor(r,"value"))||void 0===n?void 0:n.set;o&&(o.call(e,t),function(e,t,n){e.dispatchEvent(Me(e,t,n))}(e,"input",{bubbles:!0}))}}function Te(e){return e.querySelector("[data-composite-item-widget]")}var De=V({name:"CompositeItem",compose:[me,Oe],keys:we,propsAreEqual:function(e,t){if(!t.id||e.id!==t.id)return me.unstable_propsAreEqual(e,t);var n=e.currentId,r=e.unstable_moves,o=v(e,["currentId","unstable_moves"]),i=t.currentId,a=t.unstable_moves,s=v(t,["currentId","unstable_moves"]);if(i!==n){if(t.id===i||t.id===n)return!1}else if(r!==a)return!1;return me.unstable_propsAreEqual(o,s)},useOptions:function(e){return m(m({},e),{},{id:e.id,currentId:ge(e),unstable_clickOnSpace:!e.unstable_hasActiveWidget&&e.unstable_clickOnSpace})},useProps:function(e,t){var n,r=t.ref,o=t.tabIndex,i=void 0===o?0:o,a=t.onMouseDown,s=t.onFocus,l=t.onBlurCapture,u=t.onKeyDown,c=t.onClick,d=v(t,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),f=(0,b.useRef)(null),p=e.id,h=e.disabled&&!e.focusable,g=e.currentId===p,w=q(g),_=(0,b.useRef)(!1),x=function(e){return(0,b.useMemo)((function(){var t;return null===(t=e.items)||void 0===t?void 0:t.find((function(t){return e.id&&t.id===e.id}))}),[e.items,e.id])}(e),E=q(a),k=q(s),S=q(l),C=q(u),P=q(c),O=!e.unstable_virtual&&!e.unstable_hasActiveWidget&&g||!(null!==(n=e.items)&&void 0!==n&&n.length);(0,b.useEffect)((function(){var t;if(p)return null===(t=e.registerItem)||void 0===t||t.call(e,{id:p,ref:f,disabled:!!h}),function(){var t;null===(t=e.unregisterItem)||void 0===t||t.call(e,p)}}),[p,h,e.registerItem,e.unregisterItem]),(0,b.useEffect)((function(){var t=f.current;t&&e.unstable_moves&&w.current&&_e(t)}),[e.unstable_moves]);var M=(0,b.useCallback)((function(e){var t;null===(t=E.current)||void 0===t||t.call(E,e),xe(e.currentTarget,!0)}),[]),I=(0,b.useCallback)((function(t){var n,r,o=!!t.currentTarget.userFocus;if(xe(t.currentTarget,!1),null===(n=k.current)||void 0===n||n.call(k,t),!t.defaultPrevented&&!Q(t)&&p&&!function(e,t){if(Y(e))return!1;for(var n,r=y(t);!(n=r()).done;)if(n.value.ref.current===e.target)return!0;return!1}(t,e.items)&&(null===(r=e.setCurrentId)||void 0===r||r.call(e,p),o&&e.unstable_virtual&&e.baseId&&Y(t))){var i=U(t.target).getElementById(e.baseId);i&&(_.current=!0,Se(i))}}),[p,e.items,e.setCurrentId,e.unstable_virtual,e.baseId]),T=(0,b.useCallback)((function(t){var n;null===(n=S.current)||void 0===n||n.call(S,t),t.defaultPrevented||e.unstable_virtual&&_.current&&(_.current=!1,t.preventDefault(),t.stopPropagation())}),[e.unstable_virtual]),D=(0,b.useCallback)((function(t){var n;if(Y(t)){var r="horizontal"!==e.orientation,o="vertical"!==e.orientation,i=!(null==x||!x.groupId),a={ArrowUp:(i||r)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||r)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:function(){var n,r;!i||t.ctrlKey?null===(n=e.first)||void 0===n||n.call(e):null===(r=e.previous)||void 0===r||r.call(e,!0)},End:function(){var n,r;!i||t.ctrlKey?null===(n=e.last)||void 0===n||n.call(e):null===(r=e.next)||void 0===r||r.call(e,!0)},PageUp:function(){var t,n;i?null===(t=e.up)||void 0===t||t.call(e,!0):null===(n=e.first)||void 0===n||n.call(e)},PageDown:function(){var t,n;i?null===(t=e.down)||void 0===t||t.call(e,!0):null===(n=e.last)||void 0===n||n.call(e)}}[t.key];if(a)return t.preventDefault(),void a();if(null===(n=C.current)||void 0===n||n.call(C,t),!t.defaultPrevented)if(1===t.key.length&&" "!==t.key){var s=Te(t.currentTarget);s&&Ee(s)&&(s.focus(),Ie(s,""))}else if("Delete"===t.key||"Backspace"===t.key){var l=Te(t.currentTarget);l&&Ee(l)&&(t.preventDefault(),Ie(l,""))}}}),[e.orientation,x,e.up,e.next,e.down,e.previous,e.first,e.last]),A=(0,b.useCallback)((function(e){var t;if(null===(t=P.current)||void 0===t||t.call(P,e),!e.defaultPrevented){var n=Te(e.currentTarget);n&&!J(n)&&n.focus()}}),[]);return m({ref:W(f,r),id:p,tabIndex:O?i:-1,"aria-selected":!(!e.unstable_virtual||!g)||void 0,onMouseDown:M,onFocus:I,onBlurCapture:T,onKeyDown:D,onClick:A},d)}}),Ae=B({as:"button",memo:!0,useHook:De}),Re=window.wp.dom;var Ne=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function Le(e,t,n,r,o,i,a,s,l){const{width:u}=t;"left"===n&&(0,d.isRTL)()?n="right":"right"===n&&(0,d.isRTL)()&&(n="left"),"left"===r&&(0,d.isRTL)()?r="right":"right"===r&&(0,d.isRTL)()&&(r="left");const c=Math.round(e.left+e.width/2),f={popoverLeft:c,contentWidth:(c-u/2>0?u/2:c)+(c+u/2>window.innerWidth?window.innerWidth-c:u/2)};let p=e.left;"right"===r?p=e.right:"middle"===i||l||(p=c);let h=e.right;"left"===r?h=e.left:"middle"===i||l||(h=c);const m={popoverLeft:p,contentWidth:p-u>0?u:p},v={popoverLeft:h,contentWidth:h+u>window.innerWidth?window.innerWidth-h:u};let g,y=n,b=null;if(!o&&!s)if("center"===n&&f.contentWidth===u)y="center";else if("left"===n&&m.contentWidth===u)y="left";else if("right"===n&&v.contentWidth===u)y="right";else{y=m.contentWidth>v.contentWidth?"left":"right";const e="left"===y?m.contentWidth:v.contentWidth;u>window.innerWidth&&(b=window.innerWidth),e!==u&&(y="center",f.popoverLeft=window.innerWidth/2)}return g="center"===y?f.popoverLeft:"left"===y?m.popoverLeft:v.popoverLeft,a&&(g=Math.min(g,a.offsetLeft+a.offsetWidth-u),(0,d.isRTL)()||(g=Math.max(g,0))),{xAxis:y,popoverLeft:g,contentWidth:b}}function Fe(e,t,n,r,o,i,a,s,l){const{height:u}=t;if(o){const t=o.getBoundingClientRect(),r=t.top+u-a,i=t.bottom-u-a;if(e.top<=r){if(l){if(!(u+100?u/2:c)+(c+u/2>window.innerHeight?window.innerHeight-c:u/2)},f={popoverTop:e.top,contentHeight:e.top-10-u>0?u:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+u>window.innerHeight?window.innerHeight-10-e.bottom:u};let h,m=n,v=null;if(!o&&!s)if("middle"===n&&d.contentHeight===u)m="middle";else if("top"===n&&f.contentHeight===u)m="top";else if("bottom"===n&&p.contentHeight===u)m="bottom";else{m=f.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?f.contentHeight:p.contentHeight;v=e!==u?e:null}return h="middle"===m?d.popoverTop:"top"===m?f.popoverTop:p.popoverTop,{yAxis:m,popoverTop:h,contentHeight:v}}function je(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}var Be=window.wp.deprecated,ze=n.n(Be);var Ve=function(e){let{icon:t,className:n,...r}=e;const o=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return(0,s.createElement)("span",a({className:o},r))};var He=function(e){let{icon:t=null,size:n=24,...r}=e;if("string"==typeof t)return(0,s.createElement)(Ve,a({icon:t},r));if((0,s.isValidElement)(t)&&Ve===t.type)return(0,s.cloneElement)(t,{...r});if("function"==typeof t)return t.prototype instanceof s.Component?(0,s.createElement)(t,{size:n,...r}):t({size:n,...r});if(t&&("svg"===t.type||t.type===i.SVG)){const e={width:n,height:n,...t.props,...r};return(0,s.createElement)(i.SVG,e)}return(0,s.isValidElement)(t)?(0,s.cloneElement)(t,{size:n,...r}):t};window.wp.warning;const We=(0,s.createContext)({}),Ue=()=>(0,s.useContext)(We);function $e(e){let{value:t}=e;const n=Ue(),r=(0,s.useRef)(t);!function(e,t){const n=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)}((()=>{(0,l.isEqual)(r.current,t)&&r.current!==t&&"undefined"!=typeof process&&process.env}),[t]);return(0,s.useMemo)((()=>(0,l.merge)((0,l.cloneDeep)(n),t)),[n,t])}const Ke=(0,s.memo)((e=>{let{children:t,value:n}=e;const r=$e({value:n});return(0,s.createElement)(We.Provider,{value:r},t)}));var Ge=n(9756),qe=n.n(Ge);const Ye=qe()((function(e){return`components-${(0,l.kebabCase)(e)}`}));var Xe=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?rt(pt,--dt):0,ut--,10===ft&&(ut=1,lt--),ft}function gt(){return ft=dt2||_t(ft)>3?"":" "}function Ct(e,t){for(;--t&>()&&!(ft<48||ft>102||ft>57&&ft<65||ft>70&&ft<97););return wt(e,bt()+(t<6&&32==yt()&&32==gt()))}function Pt(e){for(;gt();)switch(ft){case e:return dt;case 34:case 39:34!==e&&39!==e&&Pt(ft);break;case 40:41===e&&Pt(e);break;case 92:gt()}return dt}function Ot(e,t){for(;gt()&&e+ft!==57&&(e+ft!==84||47!==yt()););return"/*"+wt(t,dt-1)+"*"+Je(47===e?e:gt())}function Mt(e){for(;!_t(yt());)gt();return wt(e,dt)}var It="-ms-",Tt="-moz-",Dt="-webkit-",At="comm",Rt="rule",Nt="decl",Lt="@keyframes";function Ft(e,t){for(var n="",r=at(e),o=0;o0&&it(E)-d&&st(p>32?Wt(E+";",r,n,d-1):Wt(tt(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(st(x=Vt(E,t,n,u,c,o,s,b,w=[],_=[],d),i),123===y)if(0===c)zt(E,t,x,x,w,i,d,s,_);else switch(99===f&&110===rt(E,3)?100:f){case 100:case 108:case 109:case 115:zt(e,x,x,r&&st(Vt(e,x,x,0,0,o,s,b,o,w=[],d),_),o,_,d,s,r?w:_);break;default:zt(E,x,x,x,[""],_,0,s,_)}}u=c=p=0,m=g=1,b=E="",d=a;break;case 58:d=1+it(E),p=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==vt())continue;switch(E+=Je(y),y*m){case 38:g=c>0?1:(E+="\f",-1);break;case 44:s[u++]=(it(E)-1)*g,g=1;break;case 64:45===yt()&&(E+=kt(gt())),f=yt(),c=d=it(b=E+=Mt(bt())),y++;break;case 45:45===h&&2==it(E)&&(m=0)}}return i}function Vt(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,f=0===o?i:[""],p=at(f),h=0,m=0,v=0;h0?f[g]+" "+y:tt(y,/&\f/g,f[g])))&&(l[v++]=b);return ht(e,t,n,0===o?Rt:s,l,u,c)}function Ht(e,t,n){return ht(e,t,n,At,Je(ft),ot(e,2,-2),0)}function Wt(e,t,n,r){return ht(e,t,n,Nt,ot(e,0,r),ot(e,r+1,-1),r)}var Ut=function(e,t,n){for(var r=0,o=0;r=o,o=yt(),38===r&&12===o&&(t[n]=1),!_t(o);)gt();return wt(e,dt)},$t=function(e,t){return Et(function(e,t){var n=-1,r=44;do{switch(_t(r)){case 0:38===r&&12===yt()&&(t[n]=1),e[n]+=Ut(dt-1,t,n);break;case 2:e[n]+=kt(r);break;case 4:if(44===r){e[++n]=58===yt()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Je(r)}}while(r=gt());return e}(xt(e),t))},Kt=new WeakMap,Gt=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Kt.get(n))&&!r){Kt.set(e,!0);for(var o=[],i=$t(t,o),a=n.props,s=0,l=0;s6)switch(rt(e,t+1)){case 109:if(45!==rt(e,t+4))break;case 102:return tt(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==rt(e,t+3)?"$3":"$2-$3"))+e;case 115:return~nt(e,"stretch")?Yt(tt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==rt(e,t+1))break;case 6444:switch(rt(e,it(e)-3-(~nt(e,"!important")&&10))){case 107:return tt(e,":",":-webkit-")+e;case 101:return tt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===rt(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(rt(e,t+11)){case 114:return Dt+e+It+tt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Dt+e+It+tt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Dt+e+It+tt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Dt+e+It+e+e}return e}var Xt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Nt:e.return=Yt(e.value,e.length);break;case Lt:return Ft([mt(e,{value:tt(e.value,"@","@-webkit-")})],r);case Rt:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ft([mt(e,{props:[tt(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ft([mt(e,{props:[tt(t,/:(plac\w+)/,":-webkit-input-$1")]}),mt(e,{props:[tt(t,/:(plac\w+)/,":-moz-$1")]}),mt(e,{props:[tt(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],Zt=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||Xt;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:ln}},dn=!!b.useInsertionEffect&&b.useInsertionEffect,fn=dn||function(e){return e()},pn=(dn||b.useLayoutEffect,b.createContext("undefined"!=typeof HTMLElement?Zt({key:"css"}):null));var hn=pn.Provider,mn=function(e){return(0,b.forwardRef)((function(t,n){var r=(0,b.useContext)(pn);return e(t,r,n)}))};var vn=b.createContext({});var gn=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0);o=o.next}while(void 0!==o)}};function yn(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var bn=function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};function wn(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function _n(e,t,n){var r=[],o=yn(e,r,n);return r.length<2?n:o+t(r)}var xn=function e(t){for(var n="",r=0;rnull!=e&&["name","styles"].every((t=>void 0!==e[t])),Cn=()=>{const e=(0,b.useContext)(pn),t=(0,s.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,n=new Array(t),r=0;rSn(t)?(gn(e,t,!1),`${e.key}-${t.name}`):t)))}),[e]);return t};function Pn(e,t){const n=Ue();void 0===t&&"undefined"!=typeof process&&process.env;const r=(null==n?void 0:n[t])||{},o={"data-wp-c16t":!0,...(i=t,{"data-wp-component":i})};var i;const{_overrides:a,...s}=r,l=Object.entries(s).length?Object.assign({},s,e):e,u=Cn()(Ye(t),e.className),c="function"==typeof l.renderChildren?l.renderChildren(l):l.children;for(const e in l)o[e]=l[e];for(const e in a)o[e]=a[e];return o.children=c,o.className=u,o}function On(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:r=!1}=n;let o=(0,s.forwardRef)(e);r&&(o=(0,s.memo)(o)),void 0===t&&"undefined"!=typeof process&&process.env;let i=o.__contextSystemKey__||[t];return Array.isArray(t)&&(i=[...i,...t]),"string"==typeof t&&(i=[...i,t]),o.displayName=t,o.__contextSystemKey__=(0,l.uniq)(i),o.selector=`.${Ye(t)}`,o}function Mn(e){if(!e)return[];let t=[];return e.__contextSystemKey__&&(t=e.__contextSystemKey__),e.type&&e.type.__contextSystemKey__&&(t=e.type.__contextSystemKey__),t}function In(e,t){return!!e&&("string"==typeof t?Mn(e).includes(t):!!Array.isArray(t)&&t.some((t=>Mn(e).includes(t))))}const Tn={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Dn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;function An(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var Rn=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Nn=Qt((function(e){return Dn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ln=function(e){return"theme"!==e},Fn=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Nn:Ln},jn=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Bn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Rn(t,n,r),fn((function(){return function(e,t,n){Rn(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},zn=function e(t,n){var r,o,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=jn(t,n,i),u=l||Fn(s),c=!u("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var p=d.length,h=1;h{e.stopPropagation(),e.preventDefault()}}const R=!T&&(b&&x||_||!!x&&(!E||(0,l.isArray)(E)&&!E.length)&&!1!==b),N=P?M:null,L=O["aria-describedby"]||N,F=(0,s.createElement)(D,a({},A,O,{className:I,"aria-label":O["aria-label"]||x,"aria-describedby":L,ref:n}),v&&"left"===g&&(0,s.createElement)(He,{icon:v,size:y}),k&&(0,s.createElement)(s.Fragment,null,k),v&&"right"===g&&(0,s.createElement)(He,{icon:v,size:y}),E);return R?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ur,{text:P||x,shortcut:_,position:w},F),P&&(0,s.createElement)(Wn,null,(0,s.createElement)("span",{id:N},P))):(0,s.createElement)(s.Fragment,null,F,P&&(0,s.createElement)(Wn,null,(0,s.createElement)("span",{id:N},P)))}));let Kn=0;function Gn(e){const t=document.scrollingElement||document.body;e&&(Kn=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Kn)}let qn=0;function Yn(){return(0,s.useEffect)((()=>(0===qn&&Gn(!0),++qn,()=>{1===qn&&Gn(!1),--qn})),[]),null}var Xn=(0,s.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});var Zn=e=>{const{getSlot:t,subscribe:n}=(0,s.useContext)(Xn),[r,o]=(0,s.useState)(t(e));return(0,s.useEffect)((()=>{o(t(e));return n((()=>{o(t(e))}))}),[e]),r};function Jn(e){let{name:t,children:n,registerFill:r,unregisterFill:o}=e;const i=Zn(t),a=(0,s.useRef)({name:t,children:n});return(0,s.useLayoutEffect)((()=>(r(t,a.current),()=>o(t,a.current))),[]),(0,s.useLayoutEffect)((()=>{a.current.children=n,i&&i.forceUpdate()}),[n]),(0,s.useLayoutEffect)((()=>{t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?((0,l.isFunction)(n)&&(n=n(i.props.fillProps)),(0,s.createPortal)(n,i.node)):null}var Qn=e=>(0,s.createElement)(Xn.Consumer,null,(t=>{let{registerFill:n,unregisterFill:r}=t;return(0,s.createElement)(Jn,a({},e,{registerFill:n,unregisterFill:r}))}));class er extends s.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:r}=this.props,o=(0,l.map)(r(t,this),(e=>{const t=(0,l.isFunction)(e.children)?e.children(n):e.children;return s.Children.map(t,((e,t)=>{if(!e||(0,l.isString)(e))return e;const n=e.key||t;return(0,s.cloneElement)(e,{key:n})}))})).filter((0,l.negate)(s.isEmptyElement));return(0,s.createElement)(s.Fragment,null,(0,l.isFunction)(e)?e(o):o)}}var tr=e=>(0,s.createElement)(Xn.Consumer,null,(t=>{let{registerSlot:n,unregisterSlot:r,getFills:o}=t;return(0,s.createElement)(er,a({},e,{registerSlot:n,unregisterSlot:r,getFills:o}))}));var nr,rr=(0,s.createContext)({slots:{},fills:{},registerSlot:()=>{"undefined"!=typeof process&&process.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function or(e){const t=(0,s.useContext)(rr),n=t.slots[e]||{},r=t.fills[e],o=(0,s.useMemo)((()=>r||[]),[r]);return{...n,updateSlot:(0,s.useCallback)((n=>{t.updateSlot(e,n)}),[e,t.updateSlot]),unregisterSlot:(0,s.useCallback)((n=>{t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,s.useCallback)((n=>{t.registerFill(e,n)}),[e,t.registerFill]),unregisterFill:(0,s.useCallback)((n=>{t.unregisterFill(e,n)}),[e,t.unregisterFill])}}var ir=new Uint8Array(16);function ar(){if(!nr&&!(nr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nr(ir)}var sr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var lr=function(e){return"string"==typeof e&&sr.test(e)},ur=[],cr=0;cr<256;++cr)ur.push((cr+256).toString(16).substr(1));var dr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ur[e[t+0]]+ur[e[t+1]]+ur[e[t+2]]+ur[e[t+3]]+"-"+ur[e[t+4]]+ur[e[t+5]]+"-"+ur[e[t+6]]+ur[e[t+7]]+"-"+ur[e[t+8]]+ur[e[t+9]]+"-"+ur[e[t+10]]+ur[e[t+11]]+ur[e[t+12]]+ur[e[t+13]]+ur[e[t+14]]+ur[e[t+15]]).toLowerCase();if(!lr(n))throw TypeError("Stringified UUID is invalid");return n};var fr=function(e,t,n){var r=(e=e||{}).random||(e.rng||ar)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return dr(r)};const pr=new Set,hr=qe()((e=>{let t=fr().replace(/[0-9]/g,"");for(;pr.has(t);)t=fr().replace(/[0-9]/g,"");return pr.add(t),Zt({container:e,key:t})}));function mr(e){let{children:t,document:n}=e;if(!n)return null;const r=hr(n.head);return(0,s.createElement)(hn,{value:r},t)}function vr(){const[,e]=(0,s.useState)({}),t=(0,s.useRef)(!0);return(0,s.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function gr(e){let{name:t,children:n}=e;const r=or(t),o=(0,s.useRef)({rerender:vr()});if((0,s.useEffect)((()=>(r.registerFill(o),()=>{r.unregisterFill(o)})),[r.registerFill,r.unregisterFill]),!r.ref||!r.ref.current)return null;"function"==typeof n&&(n=n(r.fillProps));const i=(0,s.createElement)(mr,{document:r.ref.current.ownerDocument},n);return(0,s.createPortal)(i,r.ref.current)}var yr=(0,s.forwardRef)((function(e,t){let{name:n,fillProps:r={},as:o="div",...i}=e;const l=(0,s.useContext)(rr),u=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(l.registerSlot(n,u,r),()=>{l.unregisterSlot(n,u)})),[l.registerSlot,l.unregisterSlot,n]),(0,s.useLayoutEffect)((()=>{l.updateSlot(n,r)})),(0,s.createElement)(o,a({ref:(0,f.useMergeRefs)([t,u])},i))})),br=window.wp.isShallowEqual,wr=n.n(br);function _r(e){let{children:t}=e;const n=function(){const[e,t]=(0,s.useState)({}),[n,r]=(0,s.useState)({}),o=(0,s.useCallback)(((e,n,r)=>{t((t=>{const o=t[e]||{};return{...t,[e]:{...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}}}))}),[]),i=(0,s.useCallback)(((e,n)=>{t((t=>{const{[e]:r,...o}=t;return(null==r?void 0:r.ref)===n?o:t}))}),[]),a=(0,s.useCallback)(((t,r)=>{const o=e[t];if(o&&!wr()(o.fillProps,r)){o.fillProps=r;const e=n[t];e&&e.map((e=>e.current.rerender()))}}),[e,n]),l=(0,s.useCallback)(((e,t)=>{r((n=>({...n,[e]:[...n[e]||[],t]})))}),[]),u=(0,s.useCallback)(((e,t)=>{r((n=>n[e]?{...n,[e]:n[e].filter((e=>e!==t))}:n))}),[]);return(0,s.useMemo)((()=>({slots:e,fills:n,registerSlot:o,updateSlot:a,unregisterSlot:i,registerFill:l,unregisterFill:u})),[e,n,o,a,i,l,u])}();return(0,s.createElement)(rr.Provider,{value:n},t)}class xr extends s.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){this.fills[e]=(0,l.without)(this.fills[e],t),this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach((e=>e()))}subscribe(e){return this.listeners.push(e),()=>{this.listeners=(0,l.without)(this.listeners,e)}}render(){return(0,s.createElement)(Xn.Provider,{value:this.contextValue},this.props.children)}}function Er(e){return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Qn,e),(0,s.createElement)(gr,e))}const kr=(0,s.forwardRef)(((e,t)=>{let{bubblesVirtually:n,...r}=e;return n?(0,s.createElement)(yr,a({},r,{ref:t})):(0,s.createElement)(tr,r)}));function Sr(e){let{children:t,...n}=e;return(0,s.createElement)(xr,n,(0,s.createElement)(_r,null,t))}function Cr(e){const t=t=>(0,s.createElement)(Er,a({name:e},t));t.displayName=e+"Fill";const n=t=>(0,s.createElement)(kr,a({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}function Pr(e){return"appear"===e?"top":"left"}function Or(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:n=Pr(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+n):void 0}function Mr(e){let{type:t,options:n={},children:r}=e;return r({className:Or({type:t,...n})})}const Ir="Popover",Tr=(0,s.createContext)();function Dr(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),a=n?parseInt(n,10):0,s=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+a,width:e.width-l-u,height:e.height-a-s,left:e.left+l,right:e.right-u,top:e.top+a,bottom:e.bottom-s}}function Ar(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Rr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Nr(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const Lr=(0,s.forwardRef)(((e,t)=>{let{headerTitle:n,onClose:r,children:o,className:i,noArrow:l=!0,isAlternate:u,position:d="bottom right",range:p,focusOnMount:h="firstElement",anchorRef:m,shouldAnchorIncludePadding:v,anchorRect:g,getAnchorRect:y,expandOnMobile:b,animate:w=!0,onFocusOutside:_,__unstableStickyBoundaryElement:x,__unstableSlotName:E=Ir,__unstableObserveElement:k,__unstableBoundaryParent:S,__unstableForcePosition:C,__unstableForceXAlignment:P,__unstableEditorCanvasWrapper:O,...M}=e;const I=(0,s.useRef)(null),T=(0,s.useRef)(null),D=(0,s.useRef)(),A=(0,f.useViewportMatch)("medium","<"),[R,N]=(0,s.useState)(),L=(0,s.useContext)(Tr)||E,F=or(L),j=b&&A,[B,z]=(0,f.useResizeObserver)();l=j||l,(0,s.useLayoutEffect)((()=>{if(j)return Nr(D.current,"is-without-arrow",l),Nr(D.current,"is-alternate",u),Ar(D.current,"data-x-axis"),Ar(D.current,"data-y-axis"),Rr(D.current,"top"),Rr(D.current,"left"),Rr(T.current,"maxHeight"),void Rr(T.current,"maxWidth");const e=()=>{if(!D.current||!T.current)return;let e=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return je(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return je((0,Re.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=je(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:Dr(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=je(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?s:Dr(s,r)}if(!e.current)return;const{parentNode:a}=e.current,s=je(a.getBoundingClientRect(),a.ownerDocument,i);return o?s:Dr(s,a)}(I,g,y,m,v,D.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=D.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}S&&(r=D.current.parentElement);const i=z.height?z:T.current.getBoundingClientRect(),{popoverTop:a,popoverLeft:s,xAxis:c,yAxis:f,contentHeight:p,contentWidth:h}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,l=arguments.length>9?arguments[9]:void 0;const[u,c="center",d]=n.split(" "),f=Fe(e,t,u,d,r,0,o,a,l);return{...Le(e,t,c,d,r,f.yAxis,i,a,s),...f}}(e,i,d,x,D.current,o,r,C,P,O);"number"==typeof a&&"number"==typeof s&&(Rr(D.current,"top",a+"px"),Rr(D.current,"left",s+"px")),Nr(D.current,"is-without-arrow",l||"center"===c&&"middle"===f),Nr(D.current,"is-alternate",u),Ar(D.current,"data-x-axis",c),Ar(D.current,"data-y-axis",f),Rr(T.current,"maxHeight","number"==typeof p?p+"px":""),Rr(T.current,"maxWidth","number"==typeof h?h+"px":"");N(({left:"right",right:"left"}[c]||"center")+" "+({top:"bottom",bottom:"top"}[f]||"middle"))};e();const{ownerDocument:t}=D.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const i=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",i),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(m);let s;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),k&&(s=new n.MutationObserver(e),s.observe(k,{attributes:!0})),()=>{var l,u;(n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),a&&a!==t)&&(null===(l=a.defaultView)||void 0===l||l.removeEventListener("resize",e),null===(u=a.defaultView)||void 0===u||u.removeEventListener("scroll",e,!0));s&&s.disconnect()}}),[j,g,y,m,v,d,z,x,k,S]);const V=(e,t)=>{"focus-outside"===e&&_?_(t):r&&r()},[H,W]=(0,f.__experimentalUseDialog)({focusOnMount:h,__unstableOnClose:V,onClose:V}),U=(0,f.useMergeRefs)([D,H,t]),$=Boolean(w&&R)&&Or({type:"appear",origin:R});let K=(0,s.createElement)("div",a({className:c()("components-popover",i,$,{"is-expanded":j,"is-without-arrow":l,"is-alternate":u})},M,{ref:U},W,{tabIndex:"-1"}),j&&(0,s.createElement)(Yn,null),j&&(0,s.createElement)("div",{className:"components-popover__header"},(0,s.createElement)("span",{className:"components-popover__header-title"},n),(0,s.createElement)($n,{className:"components-popover__close",icon:Ne,onClick:r})),(0,s.createElement)("div",{ref:T,className:"components-popover__content"},(0,s.createElement)("div",{style:{position:"relative"}},B,o)));return F.ref&&(K=(0,s.createElement)(Er,{name:L},K)),m||g?K:(0,s.createElement)("span",{ref:I},K)}));Lr.Slot=(0,s.forwardRef)((function(e,t){let{name:n=Ir}=e;return(0,s.createElement)(kr,{bubblesVirtually:!0,name:n,className:"popover-slot",ref:t})})),Lr.__unstableSlotNameProvider=Tr.Provider;var Fr=Lr;var jr=function(e){let t,n,{shortcut:r,className:o}=e;return r?((0,l.isString)(r)&&(t=r),(0,l.isObject)(r)&&(t=r.display,n=r.ariaLabel),(0,s.createElement)("span",{className:o,"aria-label":n},t)):null};const Br=700,zr=(0,s.createElement)("div",{className:"event-catcher"}),Vr=e=>{let{eventHandlers:t,child:n,childrenWithPopover:r}=e;return(0,s.cloneElement)((0,s.createElement)("span",{className:"disabled-element-wrapper"},(0,s.cloneElement)(zr,t),(0,s.cloneElement)(n,{children:r})),t)},Hr=e=>{let{child:t,eventHandlers:n,childrenWithPopover:r}=e;return(0,s.cloneElement)(t,{...n,children:r})},Wr=(e,t,n)=>{if(1!==s.Children.count(e))return;const r=s.Children.only(e);r.props.disabled||"function"==typeof r.props[t]&&r.props[t](n)};var Ur=function(e){const{children:t,position:n,text:r,shortcut:o,delay:i=Br}=e,[a,u]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),p=(0,f.useDebounce)(d,i),h=e=>{Wr(t,"onMouseDown",e),document.addEventListener("mouseup",g),u(!0)},m=e=>{Wr(t,"onMouseUp",e),document.removeEventListener("mouseup",g),u(!1)},v=e=>"mouseUp"===e?m:"mouseDown"===e?h:void 0,g=v("mouseUp"),y=(e,n)=>r=>{if(Wr(t,e,r),r.currentTarget.disabled)return;if("focus"===r.type&&a)return;p.cancel();const o=(0,l.includes)(["focus","mouseenter"],r.type);o!==c&&(n?p(o):d(o))},b=()=>{p.cancel(),document.removeEventListener("mouseup",g)};if((0,s.useEffect)((()=>b),[]),1!==s.Children.count(t))return t;const w={onMouseEnter:y("onMouseEnter",!0),onMouseLeave:y("onMouseLeave"),onClick:y("onClick"),onFocus:y("onFocus"),onBlur:y("onBlur"),onMouseDown:v("mouseDown")},_=s.Children.only(t),{children:x,disabled:E}=_.props,k=E?Vr:Hr,S=(e=>{let{grandchildren:t,isOver:n,position:r,text:o,shortcut:i}=e;return(0,s.concatChildren)(t,n&&(0,s.createElement)(Fr,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,s.createElement)(jr,{className:"components-tooltip__shortcut",shortcut:i})))})({grandchildren:x,...{isOver:c,position:n,text:r,shortcut:o}});return k({child:_,eventHandlers:w,childrenWithPopover:S})};const $r=[["top left","top center","top right"],["center left","center center","center right"],["bottom left","bottom center","bottom right"]],Kr={"top left":(0,d.__)("Top Left"),"top center":(0,d.__)("Top Center"),"top right":(0,d.__)("Top Right"),"center left":(0,d.__)("Center Left"),"center center":(0,d.__)("Center Center"),"center right":(0,d.__)("Center Right"),"bottom left":(0,d.__)("Bottom Left"),"bottom center":(0,d.__)("Bottom Center"),"bottom right":(0,d.__)("Bottom Right")},Gr=(0,l.flattenDeep)($r);function qr(e){return("center"===e?"center center":e).replace("-"," ")}function Yr(e,t){return`${e}-${qr(t).replace(" ","-")}`}n(1281);function Xr(){for(var e=arguments.length,t=new Array(e),n=0;n0:"number"==typeof e},Qr=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},eo=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},to=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},no=function(e){return{r:eo(e.r,0,255),g:eo(e.g,0,255),b:eo(e.b,0,255),a:eo(e.a)}},ro=function(e){return{r:Qr(e.r),g:Qr(e.g),b:Qr(e.b),a:Qr(e.a,3)}},oo=/^#([0-9a-f]{3,8})$/i,io=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ao=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:o}},so=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:255*[r,s,a,a,l,r][u],g:255*[l,r,r,s,a,a][u],b:255*[a,a,l,r,r,s][u],a:o}},lo=function(e){return{h:to(e.h),s:eo(e.s,0,100),l:eo(e.l,0,100),a:eo(e.a)}},uo=function(e){return{h:Qr(e.h),s:Qr(e.s),l:Qr(e.l),a:Qr(e.a,3)}},co=function(e){return so((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},fo=function(e){return{h:(t=ao(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},po=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ho=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,mo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,vo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,go={string:[[function(e){var t=oo.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?Qr(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?Qr(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=mo.exec(e)||vo.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:no({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=po.exec(e)||ho.exec(e);if(!t)return null;var n,r,o=lo({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Zr[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return co(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=void 0===o?1:o;return Jr(t)&&Jr(n)&&Jr(r)?no({r:Number(t),g:Number(n),b:Number(r),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,i=void 0===o?1:o;if(!Jr(t)||!Jr(n)||!Jr(r))return null;var a=lo({h:Number(t),s:Number(n),l:Number(r),a:Number(i)});return co(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,i=void 0===o?1:o;if(!Jr(t)||!Jr(n)||!Jr(r))return null;var a=function(e){return{h:to(e.h),s:eo(e.s,0,100),v:eo(e.v,0,100),a:eo(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(i)});return so(a)},"hsv"]]},yo=function(e,t){for(var n=0;n=.5},e.prototype.toHex=function(){return t=(e=ro(this.rgba)).r,n=e.g,r=e.b,i=(o=e.a)<1?io(Qr(255*o)):"","#"+io(t)+io(n)+io(r)+i;var e,t,n,r,o,i},e.prototype.toRgb=function(){return ro(this.rgba)},e.prototype.toRgbString=function(){return t=(e=ro(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return uo(fo(this.rgba))},e.prototype.toHslString=function(){return t=(e=uo(fo(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=ao(this.rgba),{h:Qr(e.h),s:Qr(e.s),v:Qr(e.v),a:Qr(e.a,3)};var e},e.prototype.invert=function(){return ko({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),ko(wo(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),ko(wo(this.rgba,-e))},e.prototype.grayscale=function(){return ko(wo(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),ko(xo(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),ko(xo(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?ko({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Qr(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=fo(this.rgba);return"number"==typeof e?ko({h:e,s:t.s,l:t.l,a:t.a}):Qr(t.h)},e.prototype.isEqual=function(e){return this.toHex()===ko(e).toHex()},e}(),ko=function(e){return e instanceof Eo?e:new Eo(e)},So=[],Co=function(e){e.forEach((function(e){So.indexOf(e)<0&&(e(Eo,go),So.push(e))}))};function Po(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var o in n)r[n[o]]=o;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),u=1/0,c="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var f in n){var p=(o=l,a=i[f],Math.pow(o.r-a.r,2)+Math.pow(o.g-a.g,2)+Math.pow(o.b-a.b,2));p0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return ko(e).alpha(t).toRgbString()}Co([Po]);const Mo={black:"#000",white:"#fff"},Io={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},To={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:Oo(Io.gray[900],.62)},Do={900:Oo("#000510",.9),800:Oo("#00000a",.85),700:Oo("#06060b",.8),600:Oo("#000913",.75),500:Oo("#0a1829",.7),400:Oo("#0a1829",.65),300:Oo("#0e1c2e",.62),200:Oo("#162435",.55),100:Oo("#223443",.5),backgroundFill:Oo(To[700],.7)},Ao={900:Oo("#304455",.45),800:Oo("#425863",.4),700:Oo("#667886",.35),600:Oo("#7b86a2",.3),500:Oo("#9197a2",.25),400:Oo("#95959c",.2),300:Oo("#829493",.15),200:Oo("#8b8b96",.1),100:Oo("#747474",.05)},Ro={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:Oo(Mo.white,.65)},No={900:Oo(Mo.white,.5),800:Oo(Mo.white,.45),700:Oo(Mo.white,.4),600:Oo(Mo.white,.35),500:Oo(Mo.white,.3),400:Oo(Mo.white,.25),300:Oo(Mo.white,.2),200:Oo(Mo.white,.15),100:Oo(Mo.white,.1),backgroundFill:Oo(Ro[300],.8)},Lo={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},Fo={theme:`var( --wp-admin-theme-color, ${Lo.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${Lo.medium.focus})`},jo={theme:Fo.theme,background:Mo.white,backgroundDisabled:Ro[200],border:Io.gray[700],borderHover:Io.gray[700],borderFocus:Fo.themeDark10,borderDisabled:Io.gray[400],borderLight:Io.gray[300],label:To[500],textDisabled:To[150],textDark:Mo.white,textLight:Mo.black},Bo=Object.assign({},Mo,{darkGray:(0,l.merge)({},To,Io.darkGray),darkOpacity:Do,darkOpacityLight:Ao,mediumGray:Io.mediumGray,gray:Io.gray,lightGray:(0,l.merge)({},Ro,Io.lightGray),lightGrayLight:No,blue:(0,l.merge)({},Lo,Io.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:Fo,ui:jo});function zo(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition";switch(t){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}var Vo={name:"lp9rn7",styles:"border-radius:2px;box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"};const Ho=()=>Vo,Wo=zn("div",{target:"e1od1u4s3"})(Ho,";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;",(e=>{let{size:t=92}=e;return Xr("grid-template-rows:repeat( 3, calc( ",t,"px / 3 ) );width:",t,"px;","")}),";"),Uo=zn("div",{target:"e1od1u4s2"})({name:"1x5gbbj",styles:"box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"}),$o=e=>Xr("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;",zo("transition")," ",(e=>{let{isActive:t}=e;return Xr("box-shadow:",t?`0 0 0 2px ${Bo.black}`:null,";color:",t?Bo.black:Bo.lightGray[800],";*:hover>&{color:",t?Bo.black:Bo.blue.medium.focus,";}","")})(e),";",""),Ko=zn("span",{target:"e1od1u4s1"})("height:6px;width:6px;",$o,";"),Go=zn("span",{target:"e1od1u4s0"})({name:"rjf3ub",styles:"appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"});function qo(e){let{isActive:t=!1,value:n,...r}=e;const o=Kr[n];return(0,s.createElement)(Ur,{text:o},(0,s.createElement)(Ae,a({as:Go,role:"gridcell"},r),(0,s.createElement)(Wn,null,n),(0,s.createElement)(Ko,{isActive:t,role:"presentation"})))}function Yo(e){return(0,b.useState)(e)[0]}function Xo(e){for(var t,n=[[]],r=function(){var e=t.value,r=n.find((function(t){return!t[0]||t[0].groupId===e.groupId}));r?r.push(e):n.push([e])},o=y(e);!(t=o()).done;)r();return n}function Zo(e){for(var t,n=[],r=y(e);!(t=r()).done;){var o=t.value;n.push.apply(n,o)}return n}function Jo(e){return e.slice().reverse()}function Qo(e,t){if(t)return null==e?void 0:e.find((function(e){return e.id===t&&!e.disabled}))}function ei(e,t){return function(e){return"function"==typeof e}(e)?e(t):e}function ti(e){void 0===e&&(e={});var t=Yo(e).baseId,n=(0,b.useContext)(Pe),r=(0,b.useRef)(0),o=(0,b.useState)((function(){return t||n()}));return{baseId:o[0],setBaseId:o[1],unstable_idCountRef:r}}function ni(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ri(e,t){return e.findIndex((function(e){return!(!e.ref.current||!t.ref.current)&&ni(t.ref.current,e.ref.current)}))}function oi(e){for(var t,n=0,r=y(e);!(t=r()).done;){var o=t.value.length;o>n&&(n=o)}return n}function ii(e){for(var t=Xo(e),n=oi(t),r=[],o=0;oi&&(n=!0),-1):(rXr({gridTemplateRows:"repeat( 3, calc( 21px / 3))",padding:1.5,maxHeight:24,maxWidth:24},"","")),";",(e=>{let{disablePointerEvents:t}=e;return Xr({pointerEvents:t?"none":null},"","")}),";"),Di=zn("span",{target:"elqsdmc0"})("height:2px;width:2px;",$o,";",(e=>{let{isActive:t}=e;return Xr("box-shadow:",t?"0 0 0 1px currentColor":null,";color:currentColor;*:hover>&{color:currentColor;}","")}),";"),Ai=Go,Ri=24;function Ni(e){let{className:t,id:n,label:r=(0,d.__)("Alignment Matrix Control"),defaultValue:o="center center",value:i,onChange:u=l.noop,width:p=92,...h}=e;const[m]=(0,s.useState)(null!=i?i:o),v=function(e){const t=(0,f.useInstanceId)(Ni,"alignment-matrix-control");return e||t}(n),g=Yr(v,m),y=gi({baseId:v,currentId:g,rtl:(0,d.isRTL)()});(0,s.useEffect)((()=>{void 0!==i&&y.setCurrentId(Yr(v,i))}),[i,y.setCurrentId]);const b=c()("component-alignment-matrix-control",t);return(0,s.createElement)(Pi,a({},h,y,{"aria-label":r,as:Wo,className:b,role:"grid",width:p}),$r.map(((e,t)=>(0,s.createElement)(Ii,a({},y,{as:Uo,role:"row",key:t}),e.map((e=>{const t=Yr(v,e),n=y.currentId===t;return(0,s.createElement)(qo,a({},y,{id:t,isActive:n,key:e,value:e,onFocus:()=>{u(e)},tabIndex:n?0:-1}))}))))))}Ni.Icon=function(e){let{className:t,disablePointerEvents:n=!0,size:r=Ri,style:o={},value:i="center",...l}=e;const u=function(){const e=qr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"center").replace("-"," "),t=Gr.indexOf(e);return t>-1?t:void 0}(i),d=(r/Ri).toFixed(2),f=c()("component-alignment-matrix-control-icon",t),p={...o,transform:`scale(${d})`};return(0,s.createElement)(Ti,a({},l,{className:f,disablePointerEvents:n,role:"presentation",size:r,style:p}),Gr.map(((e,t)=>{const n=u===t;return(0,s.createElement)(Ai,{key:e},(0,s.createElement)(Di,{isActive:n}))})))}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -35,11 +35,11 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var Fi=function(e,t){return Fi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Fi(e,t)};function ji(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Fi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Bi=function(){return Bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Hi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Wi(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o-1||/[A-Z]/.test(e))}var ka={};var Sa=["","X","Y","Z"],Ca=["transformPerspective","x","y","z"];function Pa(e,t){return Ca.indexOf(e)-Ca.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return Sa.forEach((function(t){return Ca.push(e+t)}))}));var Oa=new Set(Ca);function Ma(e){return Oa.has(e)}var Ia=new Set(["originX","originY","originZ"]);function Ta(e){return Ia.has(e)}function Da(e,t){var n=t.layout,r=t.layoutId;return Ma(e)||Ta(e)||(n||void 0!==r)&&(!!ka[e]||"opacity"===e)}var Aa=function(e){return Boolean(null!==e&&"object"==typeof e&&e.getVelocity)},Ra={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Na(e){return e.startsWith("--")}var La=function(e,t){return t&&"number"==typeof e?t.transform(e):e};const Fa=(e,t)=>n=>Math.max(Math.min(n,t),e),ja=e=>e%1?Number(e.toFixed(5)):e,Ba=/(-)?([\d]*\.?[\d])+/g,za=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Va=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Ha(e){return"string"==typeof e}const Wa=e=>({test:t=>Ha(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Ua=Wa("deg"),$a=Wa("%"),Ka=Wa("px"),Ga=Wa("vh"),qa=Wa("vw"),Ya=Object.assign(Object.assign({},$a),{parse:e=>$a.parse(e)/100,transform:e=>$a.transform(100*e)}),Xa={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Za=Object.assign(Object.assign({},Xa),{transform:Fa(0,1)}),Ja=Object.assign(Object.assign({},Xa),{default:1});var Qa=Bi(Bi({},Xa),{transform:Math.round}),es={borderWidth:Ka,borderTopWidth:Ka,borderRightWidth:Ka,borderBottomWidth:Ka,borderLeftWidth:Ka,borderRadius:Ka,radius:Ka,borderTopLeftRadius:Ka,borderTopRightRadius:Ka,borderBottomRightRadius:Ka,borderBottomLeftRadius:Ka,width:Ka,maxWidth:Ka,height:Ka,maxHeight:Ka,size:Ka,top:Ka,right:Ka,bottom:Ka,left:Ka,padding:Ka,paddingTop:Ka,paddingRight:Ka,paddingBottom:Ka,paddingLeft:Ka,margin:Ka,marginTop:Ka,marginRight:Ka,marginBottom:Ka,marginLeft:Ka,rotate:Ua,rotateX:Ua,rotateY:Ua,rotateZ:Ua,scale:Ja,scaleX:Ja,scaleY:Ja,scaleZ:Ja,skew:Ua,skewX:Ua,skewY:Ua,distance:Ka,translateX:Ka,translateY:Ka,translateZ:Ka,x:Ka,y:Ka,z:Ka,perspective:Ka,transformPerspective:Ka,opacity:Za,originX:Ya,originY:Ya,originZ:Ka,zIndex:Qa,fillOpacity:Za,strokeOpacity:Za,numOctaves:Qa};function ts(e,t,n,r){var o,i=e.style,a=e.vars,s=e.transform,l=e.transformKeys,u=e.transformOrigin;l.length=0;var c=!1,d=!1,f=!0;for(var p in t){var h=t[p];if(Na(p))a[p]=h;else{var m=es[p],v=La(h,m);if(Ma(p)){if(c=!0,s[p]=v,l.push(p),!f)continue;h!==(null!==(o=m.default)&&void 0!==o?o:0)&&(f=!1)}else Ta(p)?(u[p]=v,d=!0):i[p]=v}}c?i.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,u=void 0===l||l,c="";i.sort(Pa);for(var d=!1,f=i.length,p=0;pn=>t(e(n)),rl=(...e)=>e.reduce(nl);var ol=new Set;var il=new WeakMap,al=new WeakMap,sl=function(e){var t;null===(t=il.get(e.target))||void 0===t||t(e)},ll=function(e){e.forEach(sl)};function ul(e,t,n){var r=function(e){var t=e.root,n=zi(e,["root"]),r=t||document;al.has(r)||al.set(r,{});var o=al.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(ll,Bi({root:t},n))),o[i]}(t);return il.set(e,n),r.observe(e),function(){il.delete(e),r.unobserve(e)}}var cl={some:0,all:1};function dl(e,t,n,r){var o=r.root,i=r.margin,a=r.amount,s=void 0===a?"some":a,l=r.once;(0,b.useEffect)((function(){if(e){var r={root:null==o?void 0:o.current,rootMargin:i,threshold:"number"==typeof s?s:cl[s]};return ul(n.getInstance(),r,(function(e){var r,o=e.isIntersecting;if(t.isInView!==o&&(t.isInView=o,!l||o||!t.hasEnteredView)){o&&(t.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(Ts.InView,o);var i=n.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(e)}}))}}),[e,o,i,s])}function fl(e,t,n,r){var o=r.fallback,i=void 0===o||o;(0,b.useEffect)((function(){var r,o;e&&i&&("production"!==Ui&&(r="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||ol.has(r)||(console.warn(r),o&&console.warn(o),ol.add(r))),requestAnimationFrame((function(){var e;t.hasEnteredView=!0;var r=n.getProps().onViewportEnter;null==r||r(null),null===(e=n.animationState)||void 0===e||e.setActive(Ts.InView,!0)})))}),[e])}var pl=function(e){return function(t){return e(t),null}},hl={inView:pl((function(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=void 0===i?{}:i,s=(0,b.useRef)({hasEnteredView:!1,isInView:!1}),l=Boolean(n||r||o);a.once&&s.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?fl:dl)(l,s.current,t,a)})),tap:pl((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||n||r||o,s=(0,b.useRef)(!1),l=(0,b.useRef)(null),u={passive:!(n||t||r||h)};function c(){var e;null===(e=l.current)||void 0===e||e.call(l),l.current=null}function d(){var e;return c(),s.current=!1,null===(e=i.animationState)||void 0===e||e.setActive(Ts.Tap,!1),!Js()}function f(e,n){d()&&(el(i.getInstance(),e.target)?null==t||t(e,n):null==r||r(e,n))}function p(e,t){d()&&(null==r||r(e,t))}function h(e,t){var r;c(),s.current||(s.current=!0,l.current=rl(Ks(window,"pointerup",f,u),Ks(window,"pointercancel",p,u)),null===(r=i.animationState)||void 0===r||r.setActive(Ts.Tap,!0),null==n||n(e,t))}Gs(i,"pointerdown",a?h:void 0,u),tl(c)})),focus:pl((function(e){var t=e.whileFocus,n=e.visualElement;Ns(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Ts.Focus,!0)}:void 0),Ns(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Ts.Focus,!1)}:void 0)})),hover:pl((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;Gs(o,"pointerenter",t||r?Qs(o,!0,t):void 0,{passive:!t}),Gs(o,"pointerleave",n||r?Qs(o,!1,n):void 0,{passive:!n})}))},ml=0,vl=function(){return ml++},gl=function(){return ha(vl)};function yl(){var e=(0,b.useContext)(Ji);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=gl();(0,b.useEffect)((function(){return r(o)}),[]);return!t&&n?[!1,function(){return null==n?void 0:n(o)}]:[!0]}function bl(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;rMath.min(Math.max(n,e),t),_l=.001;function xl({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,a=1-t;a=wl(.05,1,a),e=wl(.01,10,e/1e3),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=El(t,a),l=Math.exp(-o);return _l-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=El(Math.pow(t,2),a);return(-o(t)+_l>0?-1:1)*((i-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}function El(e,t){return e*Math.sqrt(1-t*t)}const kl=["duration","bounce"],Sl=["stiffness","damping","mass"];function Cl(e,t){return t.some((t=>void 0!==e[t]))}function Pl(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:o}=e,i=zi(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Cl(e,Sl)&&Cl(e,kl)){const n=xl(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}(i),p=Ol,h=Ol;function m(){const e=c?-c/1e3:0,r=n-t,i=l/(2*Math.sqrt(s*u)),a=Math.sqrt(s/u)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-t)/100,.4)),i<1){const t=El(a,i);p=o=>{const s=Math.exp(-i*a*o);return n-s*((e+i*a*r)/t*Math.sin(t*o)+r*Math.cos(t*o))},h=n=>{const o=Math.exp(-i*a*n);return i*a*o*(Math.sin(t*n)*(e+i*a*r)/t+r*Math.cos(t*n))-o*(Math.cos(t*n)*(e+i*a*r)-t*r*Math.sin(t*n))}}else if(1===i)p=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{const t=a*Math.sqrt(i*i-1);p=o=>{const s=Math.exp(-i*a*o),l=Math.min(t*o,300);return n-s*((e+i*a*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return m(),{next:e=>{const t=p(e);if(f)a.done=e>=d;else{const i=1e3*h(e),s=Math.abs(i)<=r,l=Math.abs(n-t)<=o;a.done=s&&l}return a.value=a.done?n:t,a},flipTarget:()=>{c=-c,[t,n]=[n,t],m()}}}Pl.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const Ol=e=>0,Ml=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Il=(e,t,n)=>-n*e+n*t+e,Tl=(e,t)=>n=>Boolean(Ha(n)&&Va.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Dl=(e,t,n)=>r=>{if(!Ha(r))return r;const[o,i,a,s]=r.match(Ba);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Al=Fa(0,255),Rl=Object.assign(Object.assign({},Xa),{transform:e=>Math.round(Al(e))}),Nl={test:Tl("rgb","red"),parse:Dl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rl.transform(e)+", "+Rl.transform(t)+", "+Rl.transform(n)+", "+ja(Za.transform(r))+")"};const Ll={test:Tl("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Nl.transform},Fl={test:Tl("hsl","hue"),parse:Dl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$a.transform(ja(t))+", "+$a.transform(ja(n))+", "+ja(Za.transform(r))+")"};function jl(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 Bl({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=jl(s,r,e+1/3),i=jl(s,r,e),a=jl(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const zl=(e,t,n)=>{const r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},Vl=[Ll,Nl,Fl],Hl=e=>Vl.find((t=>t.test(e))),Wl=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,Ul=(e,t)=>{let n=Hl(e),r=Hl(t);Wl(e),Wl(t);let o=n.parse(e),i=r.parse(t);n===Fl&&(o=Bl(o),n=Nl),r===Fl&&(i=Bl(i),r=Nl);const a=Object.assign({},o);return e=>{for(const t in a)"alpha"!==t&&(a[t]=zl(o[t],i[t],e));return a.alpha=Il(o.alpha,i.alpha,e),n.transform(a)}},$l={test:e=>Nl.test(e)||Ll.test(e)||Fl.test(e),parse:e=>Nl.test(e)?Nl.parse(e):Fl.test(e)?Fl.parse(e):Ll.parse(e),transform:e=>Ha(e)?e:e.hasOwnProperty("red")?Nl.transform(e):Fl.transform(e)},Kl="${c}",Gl="${n}";function ql(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0;const r=e.match(za);r&&(n=r.length,e=e.replace(za,Kl),t.push(...r.map($l.parse)));const o=e.match(Ba);return o&&(e=e.replace(Ba,Gl),t.push(...o.map(Xa.parse))),{values:t,numColors:n,tokenised:e}}function Yl(e){return ql(e).values}function Xl(e){const{values:t,numColors:n,tokenised:r}=ql(e),o=t.length;return e=>{let t=r;for(let r=0;r"number"==typeof e?0:e;const Jl={test:function(e){var t,n,r,o;return isNaN(e)&&Ha(e)&&(null!==(n=null===(t=e.match(Ba))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(za))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:Yl,createTransformer:Xl,getAnimatableNone:function(e){const t=Yl(e);return Xl(e)(t.map(Zl))}},Ql=e=>"number"==typeof e;function eu(e,t){return Ql(e)?n=>Il(e,t,n):$l.test(e)?Ul(e,t):ou(e,t)}const tu=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>eu(e,t[n])));return e=>{for(let t=0;t{const n=Object.assign(Object.assign({},e),t),r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=eu(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}};function ru(e){const t=Jl.parse(e),n=t.length;let r=0,o=0,i=0;for(let e=0;e{const n=Jl.createTransformer(t),r=ru(e),o=ru(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?rl(tu(r.parsed,o.parsed),n):n=>`${n>0?t:e}`},iu=(e,t)=>n=>Il(e,t,n);function au(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?iu:"string"==typeof e?$l.test(e)?Ul:ou:Array.isArray(e)?tu:"object"==typeof e?nu:void 0}(e[0]),i=e.length-1;for(let n=0;ne[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=au(t,r,o),s=2===i?function([e,t],[n]){return r=>n(Ml(e,t,r))}(e,a):function(e,t){const n=e.length,r=n-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){let t=1;for(;to||t===r);t++);i=t-1}const s=Ml(e[i],e[i+1],o);return t[i](s)}}(e,a);return n?t=>s(wl(e[0],e[i-1],t)):s}const lu=e=>t=>1-e(1-t),uu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cu=e=>t=>t*t*((e+1)*t-e),du=e=>e,fu=(pu=2,e=>Math.pow(e,pu));var pu;const hu=lu(fu),mu=uu(fu),vu=e=>1-Math.sin(Math.acos(e)),gu=lu(vu),yu=uu(gu),bu=cu(1.525),wu=lu(bu),_u=uu(bu),xu=(e=>{const t=cu(e);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(1.525),Eu=e=>{if(1===e||0===e)return e;const t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},ku=lu(Eu);function Su(e,t){return e.map((()=>t||mu)).splice(0,e.length-1)}function Cu({from:e=0,to:t=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=function(e,t){return e.map((e=>e*t))}(r&&r.length===a.length?r:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(a),o);function l(){return su(s,a,{ease:Array.isArray(n)?n:Su(a,n)})}let u=l();return{next:e=>(i.value=u(e),i.done=e>=o,i),flipTarget:()=>{a.reverse(),u=l()}}}const Pu={keyframes:Cu,spring:Pl,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=void 0===i?l:i(l);return u!==l&&(s=u-t),{next:e=>{const t=-s*Math.exp(-e/r);return a.done=!(t>o||t<-o),a.value=a.done?u:u+t,a},flipTarget:()=>{}}}};const Ou=1/60*1e3,Mu="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Iu="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(Mu())),Ou);let Tu=!0,Du=!1,Au=!1;const Ru={delta:0,timestamp:0},Nu=["read","update","preRender","render","postRender"],Lu=Nu.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,u=l?t:n;return i&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;nDu=!0)),e)),{}),Fu=Nu.reduce(((e,t)=>{const n=Lu[t];return e[t]=(e,t=!1,r=!1)=>(Du||Hu(),n.schedule(e,t,r)),e}),{}),ju=Nu.reduce(((e,t)=>(e[t]=Lu[t].cancel,e)),{}),Bu=Nu.reduce(((e,t)=>(e[t]=()=>Lu[t].process(Ru),e)),{}),zu=e=>Lu[e].process(Ru),Vu=e=>{Du=!1,Ru.delta=Tu?Ou:Math.max(Math.min(e-Ru.timestamp,40),1),Ru.timestamp=e,Au=!0,Nu.forEach(zu),Au=!1,Du&&(Tu=!1,Iu(Vu))},Hu=()=>{Du=!0,Tu=!0,Au||Iu(Vu)},Wu=()=>Ru;var Uu=Fu;function $u(e,t,n=0){return e-t-n}const Ku=e=>{const t=({delta:t})=>e(t);return{start:()=>Uu.update(t,!0),stop:()=>ju.update(t)}};function Gu(e){var t,n,{from:r,autoplay:o=!0,driver:i=Ku,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:f,onRepeat:p,onUpdate:h}=e,m=zi(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let v,g,y,{to:b}=m,w=0,_=m.duration,x=!1,E=!0;const k=function(e){if(Array.isArray(e.to))return Cu;if(Pu[e.type])return Pu[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Cu:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Pl:Cu}(m);(null===(n=(t=k).needsInterpolation)||void 0===n?void 0:n.call(t,r,b))&&(y=su([0,100],[r,b],{clamp:!1}),r=0,b=100);const S=k(Object.assign(Object.assign({},m),{from:r,to:b}));function C(){w++,"reverse"===l?(E=w%2==0,a=function(e,t,n=0,r=!0){return r?$u(t+-e,t,n):t-(e-t)+n}(a,_,u,E)):(a=$u(a,_,u),"mirror"===l&&S.flipTarget()),x=!1,p&&p()}function P(e){if(E||(e=-e),a+=e,!x){const e=S.next(Math.max(0,a));g=e.value,y&&(g=y(g)),x=E?e.done:a<=0}null==h||h(g),x&&(0===w&&(null!=_||(_=a)),w=t+n:e<=-n}(a,_,u,E)&&C():(v.stop(),f&&f()))}return o&&(null==c||c(),v=i(P),v.start()),{stop:()=>{null==d||d(),v.stop()}}}function qu(e,t){return t?e*(1e3/t):0}var Yu=function(e){return 1e3*e};const Xu=(e,t)=>1-3*t+3*e,Zu=(e,t)=>3*t-6*e,Ju=e=>3*e,Qu=(e,t,n)=>((Xu(t,n)*e+Zu(t,n))*e+Ju(t))*e,ec=(e,t,n)=>3*Xu(t,n)*e*e+2*Zu(t,n)*e+Ju(t);const tc=.1;function nc(e,t,n,r){if(e===t&&n===r)return du;const o=new Float32Array(11);for(let t=0;t<11;++t)o[t]=Qu(t*tc,e,n);function i(t){let r=0,i=1;for(;10!==i&&o[i]<=t;++i)r+=tc;--i;const a=r+(t-o[i])/(o[i+1]-o[i])*tc,s=ec(a,e,n);return s>=.001?function(e,t,n,r){for(let o=0;o<8;++o){const o=ec(t,n,r);if(0===o)return t;t-=(Qu(t,n,r)-e)/o}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Qu(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+tc,e,n)}return e=>0===e||1===e?e:Qu(i(e),t,r)}var rc={linear:du,easeIn:fu,easeInOut:mu,easeOut:hu,circIn:vu,circInOut:yu,circOut:gu,backIn:bu,backInOut:_u,backOut:wu,anticipate:xu,bounceIn:ku,bounceInOut:e=>e<.5?.5*(1-Eu(1-2*e)):.5*Eu(2*e-1)+.5,bounceOut:Eu},oc=function(e){if(Array.isArray(e)){e.length;var t=Hi(e,4);return nc(t[0],t[1],t[2],t[3])}return"string"==typeof e?("Invalid easing type '".concat(e,"'"),rc[e]):e},ic=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Jl.test(t)||t.startsWith("url(")))},ac=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},sc=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},lc=function(){return{type:"keyframes",ease:"linear",duration:.3}},uc=function(e){return{type:"keyframes",duration:.8,values:e}},cc={x:ac,y:ac,z:ac,rotate:ac,rotateX:ac,rotateY:ac,rotateZ:ac,scaleX:sc,scaleY:sc,scale:sc,opacity:lc,backgroundColor:lc,color:lc,default:sc};const dc=new Set(["brightness","contrast","saturate","opacity"]);function fc(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ba)||[];if(!r)return e;const o=n.replace(r,"");let i=dc.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const pc=/([a-z-]*)\(.*?\)/g,hc=Object.assign(Object.assign({},Jl),{getAnimatableNone:e=>{const t=e.match(pc);return t?t.map(fc).join(" "):e}});var mc=Bi(Bi({},es),{color:$l,backgroundColor:$l,outlineColor:$l,fill:$l,stroke:$l,borderColor:$l,borderTopColor:$l,borderRightColor:$l,borderBottomColor:$l,borderLeftColor:$l,filter:hc,WebkitFilter:hc}),vc=function(e){return mc[e]};function gc(e,t){var n,r=vc(e);return r!==hc&&(r=Jl),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var yc=!1;function bc(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,a=zi(e,["ease","times","yoyo","flip","loop"]),s=Bi({},a);return n&&(s.offset=n),a.duration&&(s.duration=Yu(a.duration)),a.repeatDelay&&(s.repeatDelay=Yu(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(oc):oc(t)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(!0,r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function wc(e,t,n){var r,o,i,a;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=Wi([],Hi(e.to),!1),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=zi(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=Bi(Bi({},e),(o=n,i=t.to,a=Ss(i)?uc:cc[o]||cc.default,Bi({to:i},a(i))))),Bi(Bi({},t),bc(e))}function _c(e,t,n,r,o){var i,a=kc(r,e),s=null!==(i=a.from)&&void 0!==i?i:t.get(),l=ic(e,n);"none"===s&&l&&"string"==typeof n?s=gc(e,n):xc(s)&&"string"==typeof n?s=Ec(n):!Array.isArray(n)&&xc(n)&&"string"==typeof s&&(n=Ec(s));var u=ic(e,s);return"You are trying to animate ".concat(e,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."),u&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function({from:e=0,velocity:t=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:p}){let h;function m(e){return void 0!==n&&er}function v(e){return void 0===n?r:void 0===r||Math.abs(n-e){var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:p}))}function y(e){g(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(m(e))y({from:e,velocity:t,to:v(e)});else{let r=o*t+e;void 0!==u&&(r=u(r));const a=v(r),s=a===n?-1:1;let c,d;const f=e=>{c=d,d=e,t=qu(e-c,Wu().delta),(1===s&&e>a||-1===s&&enull==h?void 0:h.stop()}}(Bi(Bi({},r),a)):Gu(Bi(Bi({},wc(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e,r,i=Cs(n);return t.set(i),o(),null===(e=null==a?void 0:a.onUpdate)||void 0===e||e.call(a,i),null===(r=null==a?void 0:a.onComplete)||void 0===r||r.call(a),{stop:function(){}}}}function xc(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function Ec(e){return"number"==typeof e?0:gc("",e)}function kc(e,t){return e[t]||e.default||e}function Sc(e,t,n,r){return void 0===r&&(r={}),yc&&(r={type:!1}),t.start((function(o){var i,a,s=_c(e,t,n,r,o),l=function(e,t){var n,r;return null!==(r=null!==(n=(kc(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(r,e),u=function(){return a=s()};return l?i=window.setTimeout(u,Yu(l)):u(),function(){clearTimeout(i),null==a||a.stop()}}))}var Cc=function(e){return/^\-?\d*\.?\d+$/.test(e)},Pc=function(e){return/^0[^.\s]+$/.test(e)};function Oc(e,t){-1===e.indexOf(t)&&e.push(t)}function Mc(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ic=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Oc(this.subscriptions,e),function(){return Mc(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;oh&&g,x=Array.isArray(v)?v:[v],E=x.reduce(a,{});!1===y&&(E={});var k=m.prevResolvedValues,S=void 0===k?{}:k,C=Bi(Bi({},S),E),P=function(e){_=!0,f.delete(e),m.needsAnimating[e]=!0};for(var O in C){var M=E[O],I=S[O];p.hasOwnProperty(O)||(M!==I?Ss(M)&&Ss(I)?!bl(M,I)||w?P(O):m.protectedKeys[O]=!0:void 0!==M?P(O):f.add(O):void 0!==M&&f.has(O)?P(O):m.protectedKeys[O]=!0)}m.prevProp=v,m.prevResolvedValues=E,m.isActive&&(p=Bi(Bi({},p),E)),i&&e.blockInitialAnimation&&(_=!1),_&&!b&&d.push.apply(d,Wi([],Hi(x.map((function(e){return{animation:e,options:Bi({type:o},t)}}))),!1))},v=0;ve.hasOwnProperty("x")&&e.hasOwnProperty("y"),Qc=e=>Jc(e)&&e.hasOwnProperty("z"),ed=(e,t)=>Math.abs(e-t);function td(e,t){if(Ql(e)&&Ql(t))return ed(e,t);if(Jc(e)&&Jc(t)){const n=ed(e.x,t.x),r=ed(e.y,t.y),o=Qc(e)&&Qc(t)?ed(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var nd=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=id(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=td(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=Wu().timestamp;r.history.push(Bi(Bi({},o),{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=rd(t,r.transformPagePoint),Ls(e)&&0===e.buttons?r.handlePointerUp(e,t):Uu.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=id(rd(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(Fs(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=rd(Vs(e),this.transformPagePoint),a=i.point,s=Wu().timestamp;this.history=[Bi(Bi({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,id(i,this.history)),this.removeListeners=rl(Ks(window,"pointermove",this.handlePointerMove),Ks(window,"pointerup",this.handlePointerUp),Ks(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),ju.update(this.updatePoint)},e}();function rd(e,t){return t?{point:t(e.point)}:e}function od(e,t){return{x:e.x-t.x,y:e.y-t.y}}function id(e,t){var n=e.point;return{point:n,delta:od(n,sd(t)),offset:od(n,ad(t)),velocity:ld(t,.1)}}function ad(e){return e[0]}function sd(e){return e[e.length-1]}function ld(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=sd(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Yu(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ud(e){return e.max-e.min}function cd(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),td(e,t)t?n="y":Math.abs(e.x)>t&&(n="x");return n}(l),void(null!==n.currentDirection&&(null==a||a(n.currentDirection)));n.updateAxis("x",t.point,l),n.updateAxis("y",t.point,l),n.visualElement.syncRender(),null==s||s(e,t)}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null==o||o(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Ts.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&Bd(e,r,this.currentDirection)){var o,i,a,s,l,u=this.getAxisMotionValue(e),c=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=c,i=this.constraints[e],a=this.elastic[e],s=i.min,l=i.max,void 0!==s&&ol&&(o=a?Il(l,o,a.max):Math.min(o,l)),c=o),u.set(c)}},e.prototype.resolveConstraints=function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&ia(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:vd(e.x,r,i),y:vd(e.y,n,o)}}(o.actual,n),this.elastic=function(e){return void 0===e&&(e=yd),!1===e?e=0:!0===e&&(e=yd),{x:bd(e,"left","right"),y:bd(e,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&_d((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.actual[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!ia(t))return!1;var r=t.current,o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(e,t,n){var r=Ld(e,n),o=t.scroll;return o&&(Td(r.x,o.x),Td(r.y,o.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(e,t){return{x:gd(e.x,t.x),y:gd(e.y,t.y)}}(o.layout.actual,i);if(n){var s=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=xd(s))}return a},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=n.dragSnapToOrigin,l=n.onDragTransitionEnd,u=this.constraints||{},c=_d((function(n){var l;if(Bd(n,r,t.currentDirection)){var c=null!==(l=null==u?void 0:u[n])&&void 0!==l?l:{};s&&(c={min:0,max:0});var d=i?200:1e6,f=i?40:1e7,p=Bi(Bi({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.startAxisValueAnimation(n,p)}}));return Promise.all(c).then(l)},e.prototype.startAxisValueAnimation=function(e,t){return Sc(e,this.getAxisMotionValue(e),0,t)},e.prototype.stopAnimation=function(){var e=this;_d((function(t){return e.getAxisMotionValue(t).stop()}))},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;_d((function(n){if(Bd(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.actual[n],a=i.min,s=i.max;o.set(e[n]-Il(a,s,.5))}}}))},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(ia(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};_d((function(e){var n,r,o,i,s,l=t.getAxisMotionValue(e);if(l){var u=l.get();a[e]=(n={min:u,max:u},r=t.constraints[e],o=.5,i=ud(n),(s=ud(r))>i?o=Ml(r.min,r.max-i,n.min):i>s&&(o=Ml(n.min,n.max-s,r.min)),wl(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),_d((function(e){if(Bd(e,r,null)){var n=t.getAxisMotionValue(e),o=t.constraints[e],i=o.min,s=o.max;n.set(Il(i,s,a[e]))}}))}},e.prototype.addListeners=function(){var e,t=this;Fd.set(this.visualElement,this);var n=Ks(this.visualElement.getInstance(),"pointerdown",(function(e){var n=t.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=function(){ia(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout()),r();var a=Rs(window,"resize",(function(){return t.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(_d((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.syncRender())})),function(){a(),n(),i()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?yd:u,d=e.dragMomentum,f=void 0===d||d;return Bi(Bi({},e),{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:f})},e}();function Bd(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var zd={pan:pl((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||n||r||o,s=(0,b.useRef)(null),l=(0,b.useContext)(Xi).transformPagePoint,u={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};(0,b.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),Gs(i,"pointerdown",a&&function(e){s.current=new nd(e,u,{transformPagePoint:l})}),tl((function(){return s.current&&s.current.end()}))})),drag:pl((function(e){var t=e.dragControls,n=e.visualElement,r=ha((function(){return new jd(n)}));(0,b.useEffect)((function(){return t&&t.subscribe(r)}),[r,t]),(0,b.useEffect)((function(){return r.addListeners()}),[r])}))},Vd=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Hd=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,u=e.removeValueFromRenderState,c=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(e,t){var f=e.parent,p=e.props,h=e.presenceId,m=e.blockInitialAnimation,v=e.visualState,g=e.shouldReduceMotion;void 0===t&&(t={});var y,b,w=!1,_=v.latestValues,x=v.renderState,E=function(){var e=Vd.map((function(){return new Ic})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){Vd.forEach((function(r){var o,i="on"+r,a=e[i];null===(o=t[r])||void 0===o||o.call(t),a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+Vd[t]]=function(t){return e.add(t)},n["notify"+Vd[t]]=function(){for(var t=[],n=0;n=0?window.pageYOffset:null,u=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=rf[e](r,i)})),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);Zd(r,s[n]),e[n]=rf[n](l,i)})),e}(t,e,s);return i.length&&i.forEach((function(t){var n=Hi(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),null!==l&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}return{target:t,transitionEnd:r}};function af(e,t,n,r){return function(e){return Object.keys(e).some(Xd)}(t)?of(e,t,n,r):{target:t,transitionEnd:r}}var sf=function(e,t,n,r){var o=function(e,t,n){var r,o=zi(t,[]),i=e.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:n};for(var a in n&&(n=Bi({},n)),e.forEachValue((function(e){var t=e.get();if($d(t)){var n=Gd(t,i);n&&e.set(n)}})),o){var s=o[a];if($d(s)){var l=Gd(s,i);l&&(o[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(e,t,r);return af(e,t=o.target,n,r=o.transitionEnd)};var lf={treeType:"dom",readValueFromInstance:function(e,t){if(Ma(t)){var n=vc(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(Na(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return Ld(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,s=zi(t,["transition","transitionEnd"]),l=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=zc(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),r){!function(e,t,n){var r,o,i,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var u=0;u5)return o;var l=Jl.createTransformer(e),u="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+u]/=c,s[1+u]/=d;var f=Il(c,d,.5);"number"==typeof s[2+u]&&(s[2+u]/=f),"number"==typeof s[3+u]&&(s[3+u]/=f);var p=l(s);if(i){var h=0;p=p.replace(hf,(function(){var e=a[h];return h++,e}))}return p}},vf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ji(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,s=r.projection;e=gf,Object.assign(ka,e),s&&((null==o?void 0:o.group)&&o.group.add(s),(null==i?void 0:i.register)&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){t.safeToRemove()})),s.setOptions(Bi(Bi({},s.options),{onExitComplete:function(){return t.safeToRemove()}}))),ma.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,s=o.projection;return s?(s.isPresent=a,i||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||Uu.postRender((function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(o),(null==r?void 0:r.deregister)&&r.deregister(o))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null==e||e()},t.prototype.render=function(){return null},t}(b.Component);var gf={borderRadius:Bi(Bi({},pf),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:pf,borderTopRightRadius:pf,borderBottomLeftRadius:pf,borderBottomRightRadius:pf,boxShadow:mf},yf={measureLayout:function(e){var t=Hi(yl(),2),n=t[0],r=t[1],o=(0,b.useContext)(ga);return b.createElement(vf,Bi({},e,{layoutGroup:o,switchLayoutGroup:(0,b.useContext)(ya),isPresent:n,safeToRemove:r}))}};var bf=["TopLeft","TopRight","BottomLeft","BottomRight"],wf=bf.length,_f=function(e){return"string"==typeof e?parseFloat(e):e},xf=function(e){return"number"==typeof e||Ka.test(e)};function Ef(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var kf=Cf(0,.5,gu),Sf=Cf(.5,.95,du);function Cf(e,t,n){return function(r){return rt?1:n(Ml(e,t,r))}}function Pf(e,t){e.min=t.min,e.max=t.max}function Of(e,t){Pf(e.x,t.x),Pf(e.y,t.y)}function Mf(e,t,n,r,o){return e=Pd(e-=t,1/n,r),void 0!==o&&(e=Pd(e,1/o,r)),e}function If(e,t,n,r,o){var i=Hi(n,3),a=i[0],s=i[1],l=i[2];!function(e,t,n,r,o,i,a){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=e),void 0===a&&(a=e),$a.test(t)&&(t=parseFloat(t),t=Il(a.min,a.max,t/100)-a.min),"number"==typeof t){var s=Il(i.min,i.max,r);e===i&&(s-=t),e.min=Mf(e.min,t,n,s,o),e.max=Mf(e.max,t,n,s,o)}}(e,t[a],t[s],t[l],t.scale,r,o)}var Tf=["x","scaleX","originX"],Df=["y","scaleY","originY"];function Af(e,t,n,r){If(e.x,t,Tf,null==n?void 0:n.x,null==r?void 0:r.x),If(e.y,t,Df,null==n?void 0:n.y,null==r?void 0:r.y)}function Rf(e){return 0===e.translate&&1===e.scale}function Nf(e){return Rf(e.x)&&Rf(e.y)}function Lf(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Ff=function(){function e(){this.members=[]}return e.prototype.add=function(e){Oc(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(Mc(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach((function(e){var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))},e.prototype.scheduleRender=function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}();function jf(e,t,n){var r=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),l&&(i+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===(i+="scale(".concat(u,", ").concat(c,")"))?"none":i}var Bf=function(e,t){return e.depth-t.depth},zf=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Oc(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Mc(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Bf),this.isDirty=!1,this.children.forEach(e)},e}();function Vf(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function e(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=null==n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(qf),o.nodes.forEach(Yf)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=r?r.root||r:this,this.path=r?Wi(Wi([],Hi(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var i=0;i=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var o=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function rp(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function op(e){rp(e.x),rp(e.y)}var ip=Vf({attachResizeListener:function(e,t){return Rs(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),ap={current:void 0},sp=Vf({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!ap.current){var e=new ip(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),ap.current=e}return ap.current},resetTransform:function(e,t){e.style.transform=null!=t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),lp=Bi(Bi(Bi(Bi({},Zc),hl),zd),yf),up=_a((function(e,t){return function(e,t,n,r,o){var i=t.forwardMotionProps,a=void 0!==i&&i,s=Ea(e)?Ds:As;return Bi(Bi({},s),{preloadedFeatures:n,useRender:vs(a),createVisualElement:r,projectionNodeConstructor:o,Component:e})}(e,t,lp,df,sp)}));const cp=(0,s.createContext)({flexItemDisplay:void 0});const dp={name:"zjik7",styles:"display:flex"},fp={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},pp={name:"82a6rk",styles:"flex:1"},hp={name:"13nosa1",styles:">*{min-height:0;}"},mp={name:"1pwxzk4",styles:">*{min-width:0;}"};function vp(e){const{className:t,display:n,isBlock:r=!1,...o}=Pn(e,"FlexItem"),i={},a=(0,s.useContext)(cp).flexItemDisplay;i.Base=Zr({display:n||a},"","");return{...o,className:Cn()(fp,i.Base,r&&pp,t)}}var gp=On((function(e,t){const n=function(e){return vp({isBlock:!0,...Pn(e,"FlexBlock")})}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"FlexBlock");var yp=On((function(e,t){const n=vp(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"FlexItem");const bp=["40em","52em","64em"],wp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>bp.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${bp.length} breakpoints, got index ${t}`);const[n,r]=(0,s.useState)(t);return(0,s.useEffect)((()=>{const e=()=>{const e=bp.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function _p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=wp(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}function xp(e){var t,n;if(void 0===e)return;if(!e)return"0";const r="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(n=t.supports)&&void 0!==n&&n.call(t,"margin",e.toString())||Number.isNaN(r)?e.toString():`calc(4px * ${e})`}const Ep=new RegExp(/-left/g),kp=new RegExp(/-right/g),Sp=new RegExp(/Left/g),Cp=new RegExp(/Right/g);function Pp(e){return"left"===e?"right":"right"===e?"left":Ep.test(e)?e.replace(Ep,"-right"):kp.test(e)?e.replace(kp,"-left"):Sp.test(e)?e.replace(Sp,"Right"):Cp.test(e)?e.replace(Cp,"Left"):e}const Op=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.mapKeys)(e,((e,t)=>Pp(t)))};function Mp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,d.isRTL)()?Zr(t,""):Zr(e,""):(0,d.isRTL)()?Zr(Op(e),""):Zr(e,"")}function Ip(e){const{align:t="center",className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:l=!1,...u}=Pn(function(e){let{isReversed:t,...n}=e;return void 0!==t?(ze()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),c=_p(Array.isArray(r)?r:[r]),d="string"==typeof c&&!!c.includes("column"),f="string"==typeof c&&c.includes("reverse"),p=Cn();return{...u,className:(0,s.useMemo)((()=>{const e={};return e.Base=Zr({alignItems:d?"normal":t,flexDirection:c,flexWrap:l?"wrap":void 0,justifyContent:a,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0,marginBottom:l?`calc(${xp(i)} * -1)`:void 0},"",""),e.Items=Zr(">*+*:not( marquee ){margin-top:",d?xp(i):void 0,";",Mp({marginLeft:d||f?void 0:xp(i),marginRight:!d&&f?xp(i):void 0})(),";}",""),e.WrapItems=Zr(">*:not( marquee ){margin-bottom:",xp(i),";",Mp({marginLeft:!d&&f?xp(i):void 0,marginRight:d||f?void 0:xp(i)})(),";}>*:last-child:not( marquee ){",Mp({marginLeft:!d&&f?0:void 0,marginRight:d||f?void 0:0})(),";}",""),p(dp,e.Base,l?e.WrapItems:e.Items,d?hp:mp,n)}),[t,n,p,c,o,i,d,f,a,l,Mp.watch()]),isColumn:d}}Mp.watch=()=>(0,d.isRTL)();var Tp=On((function(e,t){const{children:n,isColumn:r,...o}=Ip(e);return(0,s.createElement)(cp.Provider,{value:{flexItemDisplay:r?"block":void 0}},(0,s.createElement)(Wn,a({},o,{ref:t}),n))}),"Flex");const Dp={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},Ap="…",Rp={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Np={ellipsis:Ap,ellipsizeMode:Rp.auto,limit:0,numberOfLines:0};function Lp(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=(0,l.isNil)(r)?Ap:r;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}function Fp(e){const{className:t,children:n,ellipsis:r=Ap,ellipsizeMode:o=Rp.auto,limit:i=0,numberOfLines:a=0,...l}=Pn(e,"Truncate"),u=Cn(),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n={...Np,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===Rp.none)return e;let a,s;switch(o){case Rp.head:a=0,s=i;break;case Rp.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}return o!==Rp.auto?Lp(e,a,s,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}),d=o===Rp.auto;return{...l,className:(0,s.useMemo)((()=>{const e={};return e.numberOfLines=Zr("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),u(d&&!a&&Dp,d&&!!a&&e.numberOfLines,t)}),[t,u,a,d]),children:c}}let jp;Po([Oo]);const Bp=qe()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&So(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!jp){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),jp=e}return jp}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));function zp(e){const t=function(e){const t=Bp(e);return So(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const Vp="36px",Hp="12px",Wp={controlSurfaceColor:zo.white,controlTextActiveColor:zo.ui.theme,controlPaddingX:Hp,controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:zo.white,controlBorderRadius:"2px",controlBorderColor:zo.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:zo.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${zo.admin.theme}`,controlDestructiveBorderColor:zo.alert.red,controlHeight:Vp,controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},Up={toggleGroupControlBackgroundColor:Wp.controlBackgroundColor,toggleGroupControlBorderColor:zo.ui.border,toggleGroupControlBackdropBackgroundColor:Wp.controlSurfaceColor,toggleGroupControlBackdropBorderColor:zo.ui.border,toggleGroupControlBackdropBoxShadow:"transparent",toggleGroupControlButtonColorActive:Wp.controlBackgroundColor};var $p=Object.assign({},Wp,Up,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${xp(2)}`,cardPaddingSmall:`${xp(4)}`,cardPaddingMedium:`${xp(4)} ${xp(6)}`,cardPaddingLarge:`${xp(6)} ${xp(8)}`,surfaceBackgroundColor:zo.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:zo.white,surfaceColor:zo.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const Kp=Zr("color:",zo.darkGray.primary,";line-height:",$p.fontLineHeightBase,";margin:0;",""),Gp={name:"4zleql",styles:"display:block"},qp=Zr("color:",zo.alert.green,";",""),Yp=Zr("color:",zo.alert.red,";",""),Xp=Zr("color:",zo.mediumGray.text,";",""),Zp=Zr("mark{background:",zo.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),Jp={name:"50zrmy",styles:"text-transform:uppercase"};var Qp=n(3138);const eh=qe()((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const th={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},nh=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function rh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13;if(e in th)return rh(th[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}const t=`(${e} / 13)`;return`calc(${t} * ${$p.fontSize})`}function oh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(!nh.includes(e))return rh(e);const t=`fontSizeH${e}`;return $p[t]}var ih={name:"50zrmy",styles:"text-transform:uppercase"};function ah(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:a,ellipsizeMode:u,isDestructive:c=!1,display:d,highlightEscape:f=!1,highlightCaseSensitive:p=!1,highlightWords:h,highlightSanitize:m,isBlock:v=!1,letterSpacing:g,lineHeight:y,optimizeReadabilityFor:b,size:w,truncate:_=!1,upperCase:x=!1,variant:E,weight:k=$p.fontWeight,...S}=Pn(t,"Text");let C=o;const P=Array.isArray(h),O="caption"===w;if(P){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");C=function(e){let{activeClassName:t="",activeIndex:n=-1,activeStyle:r,autoEscape:o,caseSensitive:i=!1,children:a,findChunks:l,highlightClassName:u="",highlightStyle:c={},highlightTag:d="mark",sanitize:f,searchWords:p=[],unhighlightClassName:h="",unhighlightStyle:m}=e;if(!a)return null;if("string"!=typeof a)return a;const v=a,g=(0,Qp.findAll)({autoEscape:o,caseSensitive:i,findChunks:l,sanitize:f,searchWords:p,textToHighlight:v}),y=d;let b,w=-1,_="";return g.map(((e,o)=>{const a=v.substr(e.start,e.end-e.start);if(e.highlight){let e;w++,"object"==typeof u?i?e=u[a]:(u=eh(u),e=u[a.toLowerCase()]):e=u;const l=w===+n;_=`${e} ${l?t:""}`,b=!0===l&&null!==r?Object.assign({},c,r):c;const d={children:a,className:_,key:o,style:b};return"string"!=typeof y&&(d.highlightIndex=w),(0,s.createElement)(y,d)}return(0,s.createElement)("span",{children:a,className:h,key:o,style:m})}))}({autoEscape:f,children:o,caseSensitive:p,searchWords:h,sanitize:m})}const M=Cn();let I;!0===_&&(I="auto"),!1===_&&(I="none");const T=Fp({...S,className:(0,s.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${$p.controlHeight} + ${xp(2)})`;switch(e){case"large":n=`calc(${$p.controlHeightLarge} + ${xp(2)})`;break;case"small":n=`calc(${$p.controlHeightSmall} + ${xp(2)})`;break;case"xSmall":n=`calc(${$p.controlHeightXSmall} + ${xp(2)})`}return n}(n,y);if(t.Base=Zr({color:a,display:d,fontSize:rh(w),fontWeight:k,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=ih,t.optimalTextColor=null,b){const e="dark"===zp(b);t.optimalTextColor=Zr(e?{color:zo.black}:{color:zo.white},"","")}return M(Kp,t.Base,t.optimalTextColor,c&&Yp,!!P&&Zp,v&&Gp,O&&Xp,E&&e[E],x&&t.upperCase,i)}),[n,r,i,a,M,d,v,O,c,P,g,y,b,w,x,E,k]),children:o,ellipsizeMode:u||I});return!_&&Array.isArray(o)&&(C=s.Children.map(o,(e=>{if(!(0,l.isPlainObject)(e)||!("props"in e))return e;return In(e,["Link"])?(0,s.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...T,children:_?T.children:C}}var sh=On((function(e,t){const n=ah(e);return(0,s.createElement)(Wn,a({as:"span"},n,{ref:t}))}),"Text");var lh={name:"1739oy8",styles:"z-index:1"};const uh=e=>{let{isFocused:t}=e;return t?lh:""};var ch={name:"2o6p8u",styles:"justify-content:space-between"},dh={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},fh={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const ph=e=>{let{labelPosition:t}=e;switch(t){case"top":return fh;case"bottom":return dh;case"edge":return ch;default:return""}},hh=Vn(Tp,{target:"em5sgkm7"})("position:relative;border-radius:2px;padding-top:0;",uh," ",ph,";");var mh={name:"wyxldh",styles:"margin:0 !important"};var vh={name:"1d3w5wq",styles:"width:100%"};const gh=Vn("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(e=>{let{disabled:t}=e;return Zr({backgroundColor:t?zo.ui.backgroundDisabled:zo.ui.background},"","")})," ",(e=>{let{hideLabel:t}=e;return t?mh:null})," ",(e=>{let{__unstableInputWidth:t,labelPosition:n}=e;return t?"side"===n?"":Zr("edge"===n?{flex:`0 0 ${t}`}:{width:t},"",""):vh}),";"),yh=Vn("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",zo.black,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(e=>{let t,n,{isDragging:r,dragCursor:o}=e;return r&&(t=Zr("cursor:",o,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),r&&o&&(n=Zr("&:active{cursor:",o,";}","")),Zr(t," ",n,";","")})," ",(e=>{let{disabled:t}=e;return t?Zr({color:zo.ui.textDisabled},"",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"},r=n[t]||n.default;return r?Zr("font-size:","16px",";@media ( min-width: 600px ){font-size:",r,";}",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:{height:30,lineHeight:1,minHeight:30,paddingLeft:8,paddingRight:8},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:8,paddingRight:8},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:16,paddingRight:16}};return Zr(n[t]||n.default,"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),bh=e=>{let{labelPosition:t}=e,n=8;return"edge"!==t&&"side"!==t||(n=0),Zr({marginTop:0,marginRight:0,marginBottom:n,marginLeft:0},"","")},wh=Vn(sh,{target:"em5sgkm4"})("&&&{box-sizing:border-box;color:currentColor;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;",bh," overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),_h=e=>(0,s.createElement)(wh,a({},e,{as:"label"})),xh=Vn(yp,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),Eh=Vn("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(e=>{let t,{disabled:n,isFocused:r}=e,o=r?zo.ui.borderFocus:zo.ui.border;return r&&(t=`0 0 0 1px ${zo.ui.borderFocus} inset`),n&&(o=zo.ui.borderDisabled),Zr({boxShadow:t,borderColor:o,borderStyle:"solid",borderWidth:1},"","")})," ",Mp({paddingLeft:2}),";}"),kh=Vn("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),Sh=Vn("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const Ch=(0,s.memo)((function(e){let{disabled:t=!1,isFocused:n=!1}=e;return(0,s.createElement)(Eh,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:t,isFocused:n})}));var Ph=Ch;function Oh(e){let{children:t,hideLabelFromVision:n,htmlFor:r,...o}=e;return t?n?(0,s.createElement)(Un,{as:"label",htmlFor:r},t):(0,s.createElement)(_h,a({htmlFor:r},o),t):null}function Mh(e,t){let{__unstableInputWidth:n,children:r,className:o,disabled:i=!1,hideLabelFromVision:l=!1,labelPosition:u,id:c,isFocused:d=!1,label:p,prefix:h,size:m="default",suffix:v,...g}=e;const y=function(e){const t=(0,f.useInstanceId)(Mh);return e||`input-base-control-${t}`}(c),b=l||!p;return(0,s.createElement)(hh,a({},g,function(e){const t={};switch(e){case"top":t.direction="column",t.gap=0;break;case"bottom":t.direction="column-reverse",t.gap=0;break;case"edge":t.justify="space-between"}return t}(u),{className:o,isFocused:d,labelPosition:u,ref:t}),(0,s.createElement)(xh,null,(0,s.createElement)(Oh,{className:"components-input-control__label",hideLabelFromVision:l,labelPosition:u,htmlFor:y,size:m},p)),(0,s.createElement)(gh,{__unstableInputWidth:n,className:"components-input-control__container",disabled:i,hideLabel:b,labelPosition:u},h&&(0,s.createElement)(kh,{className:"components-input-control__prefix"},h),r,v&&(0,s.createElement)(Sh,{className:"components-input-control__suffix"},v),(0,s.createElement)(Ph,{disabled:i,isFocused:d})))}var Ih=(0,s.forwardRef)(Mh);const Th={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Dh(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function Ah(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):en?+Dh(e-n,n-t,r)+n:e}function Rh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lh(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Gh(e){const t=$h(e);return Wh(e)?t.identifier:t.pointerId}function qh(e){const t=$h(e);return[t.clientX,t.clientY]}function Yh(e,...t){return"function"==typeof e?e(...t):e}function Xh(){}function Zh(...e){return 0===e.length?Xh:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Jh(e,t){return Object.assign({},t,e||{})}class Qh{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Yh(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);Th.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,a]=t._movement,[s,l]=n.threshold,{_step:u,values:c}=t;if(n.hasCustomTransform?(!1===u[0]&&(u[0]=Math.abs(i)>=s&&c[0]),!1===u[1]&&(u[1]=Math.abs(a)>=l&&c[1])):(!1===u[0]&&(u[0]=Math.abs(i)>=s&&Math.sign(i)*s),!1===u[1]&&(u[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==u[0]||!1!==u[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=c;d[0]=!1!==u[0]?e-u[0]:0,d[1]=!1!==u[1]?t-u[1]:0}else d[0]=!1!==u[0]?i-u[0]:0,d[1]=!1!==u[1]?a-u[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const f=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Yh(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[h,m]=t.offset,[[v,g],[y,b]]=t._bounds;t.overflow=[hg?1:0,mb?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const w=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,a],[s,l]]=e;return[Ah(t,i,a,r),Ah(n,s,l,o)]}(t._bounds,t.offset,w),t.delta=Th.sub(t.offset,f),this.computeMovement(),p&&(!t.last||o>32)){t.delta=Th.sub(t.offset,f);const e=t.delta.map(Math.abs);Th.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Lh(Lh(Lh({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class em extends Qh{constructor(...e){super(...e),Rh(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Th.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Th.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Uh(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const tm=e=>e,nm={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Lh(Lh({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return Th.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?Th.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||tm},threshold:e=>Th.toVector(e,0)};const rm=Lh(Lh({},nm),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>rm.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),om={ArrowRight:(e=1)=>[10*e,0],ArrowLeft:(e=1)=>[-10*e,0],ArrowUp:(e=1)=>[0,-10*e],ArrowDown:(e=1)=>[0,10*e]};const im="undefined"!=typeof window&&window.document&&window.document.createElement;function am(){return im&&"ontouchstart"in window||im&&window.navigator.maxTouchPoints>1}const sm={isBrowser:im,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:am(),touchscreen:am(),pointer:im&&"onpointerdown"in window,pointerLock:im&&"exitPointerLock"in window.document},lm={mouse:0,touch:0,pen:8},um=Lh(Lh({},rm),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&sm.pointerLock,sm.touch&&n?"touch":this.pointerLock?"mouse":sm.pointer&&!o?"pointer":sm.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,sm.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1}={}}){return this.pointerButtons=r,!this.pointerLock&&"pointer"===this.device&&n},keys:(e=!0)=>e,threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=Th.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(Th.toVector(e)),distance:this.transform(Th.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Lh(Lh({},lm),e):lm});Lh(Lh({},nm),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!sm.touch&&sm.gesture)return"gesture";if(sm.touch&&r)return"touch";if(sm.touchscreen){if(sm.pointer)return"pointer";if(sm.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=Jh(Yh(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=Jh(Yh(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return Th.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e});Lh(Lh({},rm),{},{mouseOnly:(e=!0)=>e});const cm=Lh(Lh({},rm),{},{mouseOnly:(e=!0)=>e}),dm=new Map,fm=new Map;function pm(e){dm.set(e.key,e.engine),fm.set(e.key,e.resolver)}const hm={key:"drag",engine:class extends em{constructor(...e){super(...e),Rh(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=rm.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Gh(e),n._pointerActive=!0,this.computeValues(qh(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Uh(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;if(t.type===e.type&&e.timeStamp===t.timeStamp)return;const r=Gh(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=qh(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=Th.sub(o,t._values),this.computeValues(o)),Th.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Gh(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t.direction,[o,i]=t.velocity,[a,s]=t.movement,[l,u]=n.swipe.velocity,[c,d]=n.swipe.distance,f=n.swipe.duration;t.elapsedTimel&&Math.abs(a)>c&&(t.swipe[0]=e),Math.abs(i)>u&&Math.abs(s)>d&&(t.swipe[1]=r))}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=om[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(r),n._keyboardActive=!0,Th.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in om&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:um},mm={key:"hover",engine:class extends em{constructor(...e){super(...e),Rh(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(qh(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=qh(e);t._movement=t._delta=Th.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:cm};function vm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const gm={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(sm.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},ym=["target","eventOptions","window","enabled","transform"];function bm(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=bm(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class wm{constructor(e,t){Rh(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,a=function(e,t=""){const n=Fh[e];return e+(n&&n[t]||t)}(t,n),s=Lh(Lh({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(a,r,s);const l=()=>{e.removeEventListener(a,r,s),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class _m{constructor(){Rh(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class xm{constructor(e){Rh(this,"gestures",new Set),Rh(this,"_targetEventStore",new wm(this)),Rh(this,"gestureEventStores",{}),Rh(this,"gestureTimeoutStores",{}),Rh(this,"handlers",{}),Rh(this,"config",{}),Rh(this,"pointerIds",new Set),Rh(this,"touchIds",new Set),Rh(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&Em(e,"drag");t.wheel&&Em(e,"wheel");t.scroll&&Em(e,"scroll");t.move&&Em(e,"move");t.pinch&&Em(e,"pinch");t.hover&&Em(e,"hover")}(this,e)}setEventIds(e){return Wh(e)?(this.touchIds=new Set(Kh(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t){const n=e,{target:r,eventOptions:o,window:i,enabled:a,transform:s}=n,l=vm(n,ym),u={shared:bm({target:r,eventOptions:o,window:i,enabled:a,transform:s},gm)};if(t){const e=fm.get(t);u[t]=bm(Lh({shared:u.shared},l),e)}else for(const e in l){const t=fm.get(e);t&&(u[e]=bm(Lh({shared:u.shared},l[e]),t))}return u}(e,t)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=km(n,o.eventOptions,!!r);if(o.enabled){new(dm.get(t))(this,e,t).bind(i)}}const o=km(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Lh(Lh({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Zh(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Hh(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function Em(e,t){e.gestures.add(t),e.gestureEventStores[t]=new wm(e,t),e.gestureTimeoutStores[t]=new _m}const km=(e,t,n)=>(r,o,i,a={},s=!1)=>{var l,u;const c=null!==(l=a.capture)&&void 0!==l?l:t.capture,d=null!==(u=a.passive)&&void 0!==u?u:t.passive;let f=s?r:zh(r,o,c);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(i)};function Sm(e,t={},n,r){const o=w().useMemo((()=>new xm(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),w().useEffect(o.effect.bind(o)),w().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}const Cm=e=>e,Pm={_event:{},error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},Om="CHANGE",Mm="COMMIT",Im="DRAG_END",Tm="DRAG_START",Dm="DRAG",Am="INVALIDATE",Rm="PRESS_DOWN",Nm="PRESS_ENTER",Lm="PRESS_UP",Fm="RESET";function jm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pm;const{value:t}=e;return{...Pm,...e,initialValue:t}}function Bm(e){return(t,n)=>{const r={...t};switch(n.type){case Lm:case Rm:r.isDirty=!1;break;case Tm:r.isDragging=!0;break;case Im:r.isDragging=!1;break;case Om:r.error=null,r.value=n.payload.value,t.isPressEnterToChange&&(r.isDirty=!0);break;case Mm:r.value=n.payload.value,r.isDirty=!1;break;case Fm:r.error=null,r.isDirty=!1,r.value=n.payload.value||t.initialValue;break;case Am:r.error=n.payload.error}return n.payload.event&&(r._event=n.payload.event),e(r,n)}}var zm=function(e,t){const n=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)};const Vm=(0,s.forwardRef)((function(e,t){let{disabled:n=!1,dragDirection:r="n",dragThreshold:o=10,id:i,isDragEnabled:u=!1,isFocused:c,isPressEnterToChange:d=!1,onBlur:f=l.noop,onChange:p=l.noop,onDrag:h=l.noop,onDragEnd:m=l.noop,onDragStart:v=l.noop,onFocus:g=l.noop,onKeyDown:y=l.noop,onValidate:b=l.noop,size:w="default",setIsFocused:_,stateReducer:x=(e=>e),value:E,type:k,...S}=e;const{state:C,change:P,commit:O,drag:M,dragEnd:I,dragStart:T,invalidate:D,pressDown:A,pressEnter:R,pressUp:N,reset:L}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pm;const[n,r]=(0,s.useReducer)(Bm(e),jm(t)),o=e=>(t,n)=>{n&&n.persist&&n.persist(),r({type:e,payload:{value:t,event:n}})},i=e=>t=>{t&&t.persist&&t.persist(),r({type:e,payload:{event:t}})},a=e=>t=>{r({type:e,payload:t})},l=o(Om),u=(e,t)=>r({type:Am,payload:{error:e,event:t}}),c=o(Fm),d=o(Mm),f=a(Tm),p=a(Dm),h=a(Im),m=i(Lm),v=i(Rm),g=i(Nm);return{change:l,commit:d,dispatch:r,drag:p,dragEnd:h,dragStart:f,invalidate:u,pressDown:v,pressEnter:g,pressUp:m,reset:c,state:n}}(x,{isDragEnabled:u,value:E,isPressEnterToChange:d}),{_event:F,value:j,isDragging:B,isDirty:z}=C,V=(0,s.useRef)(!1),H=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,s.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e]),n}(B,r);zm((()=>{E!==j&&(c||V.current?z||(p(j,{event:F}),V.current=!1):O(E,F))}),[j,z,c,E]);const W=e=>{const t=e.currentTarget.value;try{b(t),O(t,e)}catch(t){D(t,e)}},U=($=e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return m(e),void I(e);h(e),M(e),B||(v(e),T(e))}},K={axis:"e"===r||"w"===r?"x":"y",threshold:o,enabled:u,pointer:{capture:!1}},pm(hm),Sm({drag:$},K||{},"drag"));var $,K;const G=u?U():{};let q;return"number"===k&&(q=e=>{var t;null===(t=S.onMouseDown)||void 0===t||t.call(S,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,s.createElement)(yh,a({},S,G,{className:"components-input-control__input",disabled:n,dragCursor:H,isDragging:B,id:i,onBlur:e=>{f(e),null==_||_(!1),!z&&e.target.validity.valid||(V.current=!0,W(e))},onChange:e=>{const t=e.target.value;P(t,e)},onFocus:e=>{g(e),null==_||_(!0)},onKeyDown:e=>{const{key:t}=e;switch(y(e),t){case"ArrowUp":N(e);break;case"ArrowDown":A(e);break;case"Enter":R(e),d&&(e.preventDefault(),W(e));break;case"Escape":d&&z&&(e.preventDefault(),L(E,e))}},onMouseDown:q,ref:t,inputSize:w,value:j,type:k}))}));var Hm=Vm;function Wm(e,t){let{__unstableStateReducer:n=(e=>e),__unstableInputWidth:r,className:o,disabled:i=!1,hideLabelFromVision:u=!1,id:d,isPressEnterToChange:p=!1,label:h,labelPosition:m="top",onChange:v=l.noop,onValidate:g=l.noop,onKeyDown:y=l.noop,prefix:b,size:w="default",suffix:_,value:x,...E}=e;const[k,S]=(0,s.useState)(!1),C=function(e){const t=(0,f.useInstanceId)(Wm);return e||`inspector-input-control-${t}`}(d),P=c()("components-input-control",o);return(0,s.createElement)(Ih,{__unstableInputWidth:r,className:P,disabled:i,gap:3,hideLabelFromVision:u,id:C,isFocused:k,justify:"left",label:h,labelPosition:m,prefix:b,size:w,suffix:_},(0,s.createElement)(Hm,a({},E,{className:"components-input-control__input",disabled:i,id:C,isFocused:k,isPressEnterToChange:p,onChange:v,onKeyDown:y,onValidate:g,ref:t,setIsFocused:S,size:w,stateReducer:n,value:x})))}var Um=(0,s.forwardRef)(Wm);const $m=Vn(Tp,{target:"e65ony43"})("margin-bottom:",xp(2),";"),Km=Vn("div",{target:"e65ony42"})("border-radius:50%;border:",$p.borderWidth," solid ",zo.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;"),Gm=Vn("div",{target:"e65ony41"})({name:"1bhd2sw",styles:"box-sizing:border-box;position:relative;width:100%;height:100%"}),qm=Vn("div",{target:"e65ony40"})("background:",zo.admin.theme,";border-radius:50%;border:",3,"px solid ",zo.admin.theme,";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-",16,"px;width:0px;");var Ym=function(e){let{value:t,onChange:n,...r}=e;const o=(0,s.useRef)(),i=(0,s.useRef)(),l=(0,s.useRef)(),u=e=>{const{x:t,y:r}=i.current;e.preventDefault(),e.target.focus(),n(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;if(s<0)return 360+s;return s}(t,r,e.clientX,e.clientY))},{startDrag:c,isDragging:d}=(0,f.__experimentalUseDragging)({onDragStart:e=>{(()=>{const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),u(e)},onDragMove:u,onDragEnd:u});return(0,s.useEffect)((()=>{d?(void 0===l.current&&(l.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=l.current||null,l.current=void 0)}),[d]),(0,s.createElement)(Km,a({ref:o,onMouseDown:c,className:"components-angle-picker-control__angle-circle",style:d?{cursor:"grabbing"}:void 0},r),(0,s.createElement)(Gm,{style:t?{transform:`rotate(${t}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,s.createElement)(qm,{className:"components-angle-picker-control__angle-circle-indicator"})))};const Xm=e=>null!=e;const Zm=On((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:u,paddingBottom:c,paddingLeft:d,paddingRight:f,paddingTop:p,paddingX:h,paddingY:m,...v}=Pn(e,"Spacer");return{...v,className:Cn()(Xm(n)&&Zr("margin:",xp(n),";",""),Xm(l)&&Zr("margin-bottom:",xp(l),";margin-top:",xp(l),";",""),Xm(s)&&Zr("margin-left:",xp(s),";margin-right:",xp(s),";",""),Xm(a)&&Zr("margin-top:",xp(a),";",""),Xm(r)&&Zr("margin-bottom:",xp(r),";",""),Xm(o)&&Zr("margin-left:",xp(o),";",""),Xm(i)&&Zr("margin-right:",xp(i),";",""),Xm(u)&&Zr("padding:",xp(u),";",""),Xm(m)&&Zr("padding-bottom:",xp(m),";padding-top:",xp(m),";",""),Xm(h)&&Zr("padding-left:",xp(h),";padding-right:",xp(h),";",""),Xm(p)&&Zr("padding-top:",xp(p),";",""),Xm(c)&&Zr("padding-bottom:",xp(c),";",""),Xm(d)&&Zr("padding-left:",xp(d),";",""),Xm(f)&&Zr("padding-right:",xp(f),";",""),t)}}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"Spacer");var Jm=Zm;function Qm(e){let{className:t,label:n=(0,d.__)("Angle"),onChange:r,value:o}=e;const i=c()("components-angle-picker-control",t);return(0,s.createElement)($m,{className:i},(0,s.createElement)(gp,null,(0,s.createElement)(Um,{label:n,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{const t=""!==e?parseInt(e,10):0;r(t)},size:"__unstable-large",step:"1",value:o,hideHTMLArrows:!0,suffix:(0,s.createElement)(Jm,{as:sh,marginBottom:0,marginRight:xp(3),style:{color:"var( --wp-admin-theme-color )"}},"°")})),(0,s.createElement)(yp,{style:{marginLeft:xp(4),marginBottom:xp(1),marginTop:"auto"}},(0,s.createElement)(Ym,{"aria-hidden":"true",value:o,onChange:r})))}var ev=window.wp.keycodes,tv=window.wp.richText,nv=window.wp.a11y;function rv(e){return t=>{const[n,r]=(0,s.useState)([]);return(0,s.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,l.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+(0,l.escapeRegExp)(t),"i");r(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=[];for(let o=0;oe.test((0,l.deburr)(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}function ov(e){let{record:t,onChange:n,onReplace:r,completers:o,contentRef:i}=e;const a=(0,f.useDebounce)(nv.speak,500),u=(0,f.useInstanceId)(ov),[p,h]=(0,s.useState)(0),[m,v]=(0,s.useState)([]),[g,y]=(0,s.useState)(""),[b,w]=(0,s.useState)(null),[_,x]=(0,s.useState)(null),[E,k]=(0,s.useState)(!1);function S(e){const{getOptionCompletion:o}=b||{};if(!e.isDisabled){if(o){const i=o(e.value,g),{action:a,value:l}=void 0===i.action||void 0===i.value?{action:"insert-at-caret",value:i}:i;if("replace"===a)return void r([l]);"insert-at-caret"===a&&function(e){const r=t.start,o=r-b.triggerPrefix.length-g.length,i=(0,tv.create)({html:(0,s.renderToString)(e)});n((0,tv.insert)(t,i,o,r))}(l)}C()}}function C(){h(0),v([]),y(""),w(null),x(null)}let P;(0,tv.isCollapsed)(t)&&(P=(0,tv.getTextContent)((0,tv.slice)(t,0))),(0,s.useEffect)((()=>{if(!P)return void C();const e=(0,l.deburr)(P),n=(0,tv.getTextContent)((0,tv.slice)(t,void 0,(0,tv.getTextContent)(t).length)),r=(0,l.find)(o,(t=>{let{triggerPrefix:r,allowContext:o}=t;const i=e.lastIndexOf(r);if(-1===i)return!1;const a=e.slice(i+r.length);if(a.length>50)return!1;const s=0===m.length,l=1===a.split(/\s/).length,u=E&&a.split(/\s/).length<=3;return!(s&&!u&&!l)&&(!(o&&!o(e.slice(0,i),n))&&(!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a)))}));if(!r)return void C();const i=(0,l.escapeRegExp)(r.triggerPrefix),a=e.slice(e.lastIndexOf(r.triggerPrefix)).match(new RegExp(`${i}([\0-￿]*)$`)),u=a&&a[1];w(r),x((()=>r!==b?function(e){const t=e.useItems?e.useItems:rv(e);return function(e){let{filterValue:n,instanceId:r,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:u,onSelect:d,onReset:f,value:p,contentRef:h}=e;const[m]=t(n),v=(0,tv.useAnchorRef)({ref:h,value:p});return(0,s.useLayoutEffect)((()=>{u(m)}),[m]),!m.length>0?null:(0,s.createElement)(jr,{focusOnMount:!1,onClose:f,position:"top right",className:"components-autocomplete__popover",anchorRef:v},(0,s.createElement)("div",{id:o,role:"listbox",className:"components-autocomplete__results"},(0,l.map)(m,((e,t)=>(0,s.createElement)(Kn,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:c()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>d(e)},e.label)))))}}(r):_)),y(u)}),[P]);const{key:O=""}=m[p]||{},{className:M}=b||{},I=!!b&&m.length>0,T=I?`components-autocomplete-listbox-${u}`:null;return{listBoxId:T,activeId:I?`components-autocomplete-item-${u}-${O}`:null,onKeyDown:function(e){if(k(e.keyCode===ev.BACKSPACE),b&&0!==m.length&&!e.defaultPrevented){switch(e.keyCode){case ev.UP:h((0===p?m.length:p)-1);break;case ev.DOWN:h((p+1)%m.length);break;case ev.ESCAPE:w(null),x(null),e.preventDefault();break;case ev.ENTER:S(m[p]);break;case ev.LEFT:case ev.RIGHT:return void C();default:return}e.preventDefault()}},popover:void 0!==t.start&&_&&(0,s.createElement)(_,{className:M,filterValue:g,instanceId:u,listBoxId:T,selectedIndex:p,onChangeOptions:function(e){h(e.length===m.length?p:0),v(e),function(e){a&&(e.length?a((0,d.sprintf)((0,d._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):a((0,d.__)("No results."),"assertive"))}(e)},onSelect:S,value:t,contentRef:i,reset:C})}}function iv(e){const t=(0,s.useRef)(),n=(0,s.useRef)(),{popover:r,listBoxId:o,activeId:i,onKeyDown:a}=ov({...e,contentRef:t});return n.current=a,{ref:(0,f.useMergeRefs)([t,(0,f.useRefEffect)((e=>{function t(e){n.current(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]),children:r,"aria-autocomplete":o?"list":void 0,"aria-owns":o,"aria-activedescendant":i}}function av(e){let{children:t,isSelected:n,...r}=e;const{popover:o,...i}=ov(r);return(0,s.createElement)(s.Fragment,null,t(i),n&&o)}var sv={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function lv(e){return(0,l.get)(sv,e,"")}const uv=Vn("div",{target:"ej5x27r4"})("font-family:",lv("default.fontFamily"),";font-size:",lv("default.fontSize"),";"),cv=Vn("div",{target:"ej5x27r3"})((e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&Zr("margin-bottom:",xp(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),dv=Zr("display:inline-block;margin-bottom:",xp(2),";",""),fv=Vn("label",{target:"ej5x27r2"})(dv,";");var pv={name:"11yad0w",styles:"margin-bottom:revert"};const hv=Vn("p",{target:"ej5x27r1"})("margin-top:",xp(2),";margin-bottom:0;font-size:",lv("helpText.fontSize"),";font-style:normal;color:",zo.mediumGray.text,";",(e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&pv}),";"),mv=Vn("span",{target:"ej5x27r0"})(dv,";"),vv=e=>{let{__nextHasNoMarginBottom:t=!1,id:n,label:r,hideLabelFromVision:o=!1,help:i,className:a,children:l}=e;return(0,s.createElement)(uv,{className:c()("components-base-control",a)},(0,s.createElement)(cv,{className:"components-base-control__field",__nextHasNoMarginBottom:t},r&&n&&(o?(0,s.createElement)(Un,{as:"label",htmlFor:n},r):(0,s.createElement)(fv,{className:"components-base-control__label",htmlFor:n},r)),r&&!n&&(o?(0,s.createElement)(Un,{as:"label"},r):(0,s.createElement)(vv.VisualLabel,null,r)),l),!!i&&(0,s.createElement)(hv,{id:n?n+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},i))};vv.VisualLabel=e=>{let{className:t,children:n}=e;return(0,s.createElement)(mv,{className:c()("components-base-control__label",t)},n)};var gv=vv;var yv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));var bv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));const wv=Zr("",""),_v={name:"82a6rk",styles:"flex:1"},xv={name:"3gg0za",styles:"flex:0;flex-basis:36px;margin-top:7px"},Ev=e=>{const{color:t=zo.gray[200],style:n="solid",width:r=$p.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==$p.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},kv=Zr("position:relative;flex:1;",Mp({marginRight:xp(3)},{marginLeft:xp(3)})(),";",""),Sv={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};var Cv=On(((e,t)=>{const{className:n,isLinked:r,...o}=function(e){const{className:t,...n}=Pn(e,"BorderBoxControlLinkedButton"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(xv,t)),[t])}}(e),i=r?(0,d.__)("Unlink sides"):(0,d.__)("Link sides");return(0,s.createElement)($r,{text:i},(0,s.createElement)(Wn,{className:n},(0,s.createElement)(Kn,a({},o,{variant:r?"primary":"secondary",isSmall:!0,icon:r?yv:bv,iconSize:16,"aria-label":i,ref:t}))))}),"BorderBoxControlLinkedButton");function Pv(e){const{className:t,value:n,...r}=Pn(e,"BorderBoxControlVisualizer"),o=Cn(),i=(0,s.useMemo)((()=>o((e=>Zr("position:absolute;top:20px;right:30px;bottom:20px;left:30px;border-top:",Ev(null==e?void 0:e.top),";border-bottom:",Ev(null==e?void 0:e.bottom),";",Mp({borderLeft:Ev(null==e?void 0:e.left)})()," ",Mp({borderRight:Ev(null==e?void 0:e.right)})(),";",""))(n),t)),[t,n,Mp.watch()]);return{...r,className:i,value:n}}var Ov=On(((e,t)=>{const{value:n,...r}=Pv(e);return(0,s.createElement)(Wn,a({},r,{ref:t}))}),"BorderBoxControlVisualizer");var Mv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var Iv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(i.Path,{d:"M5 11.25h14v1.5H5z"}));var Tv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}));var Dv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));var Av={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const Rv=e=>{let{hideHTMLArrows:t}=e;return t?Av:""},Nv=Vn(Um,{target:"ep48uk90"})(Rv,";");function Lv(e){const t=Number(e);return isNaN(t)?0:t}function Fv(){for(var e=arguments.length,t=new Array(e),n=0;ne+Lv(t)),0)}function jv(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function Bv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=Lv(e),i=Lv(r),a=jv(r),s=Math.round(o/i)*i,u=(0,l.clamp)(s,t,n);return a?Lv(u.toFixed(a)):u}function zv(e){return null!=e}function Vv(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return null!==(e=t.find(zv))&&void 0!==e?e:n}var Hv=(0,s.forwardRef)((function(e,t){let{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,isDragEnabled:l=!0,isShiftStepEnabled:u=!0,label:f,max:p=1/0,min:h=-1/0,required:m=!1,shiftStep:v=10,step:g=1,type:y="number",value:b,...w}=e;const _="any"===g,x=_?1:parseFloat(g),E=Bv(0,h,p,x),k=(e,t)=>_?Math.min(p,Math.max(h,e)):Bv(e,h,p,null!=t?t:x),S="number"===y?"off":null,C=c()("components-number-control",r),P=(e,t)=>{const n={...e},{type:r,payload:i}=t,a=null==i?void 0:i.event,s=n.value;if(r===Lm||r===Rm){const e=a.shiftKey&&u,t=e?parseFloat(v)*x:x;let o=function(e){const t=""===e;return!zv(e)||t}(s)?E:s;null!=a&&a.preventDefault&&a.preventDefault(),r===Lm&&(o=Fv(o,t)),r===Rm&&(o=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=Lv(t);return 0===n?r:e-r}),0)}(o,t)),n.value=k(o,e?t:null)}if(r===Dm&&l){const[e,t]=i.delta,r=i.shiftKey&&u,a=r?parseFloat(v)*x:x;let l,c;switch(o){case"n":c=t,l=-1;break;case"e":c=e,l=(0,d.isRTL)()?-1:1;break;case"s":c=t,l=1;break;case"w":c=e,l=(0,d.isRTL)()?1:-1}if(0!==c){c=Math.ceil(Math.abs(c))*Math.sign(c);const e=c*a*l;n.value=k(Fv(s,e),r?a:null)}}if(r===Nm||r===Mm){const e=!1===m&&""===s;n.value=e?s:k(s)}return n};return(0,s.createElement)(Nv,a({autoComplete:S,inputMode:"numeric"},w,{className:C,dragDirection:o,hideHTMLArrows:i,isDragEnabled:l,label:f,max:p,min:h,ref:t,required:m,step:g,type:y,value:b,__unstableStateReducer:(e,t)=>{var r;const o=P(e,t);return null!==(r=null==n?void 0:n(o,t))&&void 0!==r?r:o}}))}));const Wv=Vn("div",{target:"e1bagdl33"})({name:"100d0a9",styles:"box-sizing:border-box;position:relative"}),Uv=e=>{let{disableUnits:t,size:n}=e;return Zr(Mp({default:{paddingRight:8},small:{paddingRight:8},"__unstable-large":{paddingRight:t?16:8}}[n])(),";","")};var $v={name:"1y65o8",styles:"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"};const Kv=e=>{let{disableUnits:t}=e;return t?"":$v},Gv=Vn(Hv,{target:"e1bagdl32"})("&&&{input{appearance:none;-moz-appearance:textfield;display:block;width:100%;",Kv,";",Uv,";}}"),qv=Zr("appearance:none;background:transparent;border-radius:2px;border:none;box-sizing:border-box;color:",zo.darkGray[500],";display:block;font-size:8px;letter-spacing:-0.5px;outline:none;padding:2px 1px;text-align-last:center;text-transform:uppercase;width:20px;",Mp({borderTopLeftRadius:0,borderBottomLeftRadius:0})(),";",""),Yv=Vn("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",qv,";}"),Xv=Vn("select",{target:"e1bagdl30"})("&&&{",qv,";cursor:pointer;border:1px solid transparent;height:100%;&:hover{background-color:",zo.lightGray[300],";}&:focus{border-color:",zo.ui.borderFocus,";outline:2px solid transparent;outline-offset:0;}&:disabled{cursor:initial;&:hover{background-color:transparent;}}}");const Zv={name:"f3vz0n",styles:"font-weight:500"},Jv={name:"bjn8wh",styles:"position:relative"},Qv=e=>{const{style:t}=e||{};return Zr("border-radius:9999px;border:2px solid transparent;",t?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?zo.gray[300]:void 0;return Zr("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:28px;height:28px;padding:2px;&>span{background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},eg={name:"1phacrs",styles:"&&>div>div{padding:0;}"},tg=Zr("padding:",xp(2),";>div:first-of-type>",fv,"{margin-bottom:0;",Zv,";}&& ",fv,"+button:not( .has-text ){min-width:24px;padding:0;}",""),ng=Zr("",""),rg=Zr("",""),og=Zr("justify-content:center;width:100%;&&{border-top:",$p.borderWidth," solid ",zo.gray[200],";height:46px;}",""),ig=Zr(fv,"{",Zv,";}",""),ag={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"};const sg=[{label:(0,d.__)("Solid"),icon:Iv,value:"solid"},{label:(0,d.__)("Dashed"),icon:Tv,value:"dashed"},{label:(0,d.__)("Dotted"),icon:Dv,value:"dotted"}],lg=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(Un,{as:"label"},t):(0,s.createElement)(fv,null,t):null};var ug=On(((e,t)=>{const{buttonClassName:n,hideLabelFromVision:r,label:o,onChange:i,value:l,...u}=function(e){const{className:t,...n}=Pn(e,"BorderControlStylePicker"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(ig,t)),[t,r]),buttonClassName:(0,s.useMemo)((()=>r(ag)),[r])}}(e);return(0,s.createElement)(Wn,a({},u,{ref:t}),(0,s.createElement)(lg,{label:o,hideLabelFromVision:r}),(0,s.createElement)(Tp,{justify:"flex-start",gap:1},sg.map((e=>(0,s.createElement)(Kn,{key:e.value,className:n,icon:e.icon,isSmall:!0,isPressed:e.value===l,onClick:()=>i(e.value===l?void 0:e.value),"aria-label":e.label,label:e.label,showTooltip:!0})))))}),"BorderControlStylePicker");var cg=e=>{let{className:t,colorValue:n,...r}=e;return(0,s.createElement)("span",a({className:c()("component-color-indicator",t),style:{background:n}},r))},dg=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},fg=function(e){return.2126*dg(e.r)+.7152*dg(e.g)+.0722*dg(e.b)};function pg(e){var t;const{renderContent:n,renderToggle:r,position:o="bottom right",className:i,contentClassName:l,expandOnMobile:u,headerTitle:d,focusOnMount:f,popoverProps:p,onClose:h,onToggle:m}=e,v=(0,s.useRef)(),[g,y]=function(e,t){const[n,r]=(0,s.useState)(e);return[n,e=>{r(e),t&&t(e)}]}(!1,m);function b(){h&&h(),y(!1)}(0,s.useEffect)((()=>()=>{m&&m(!1)}),[]);const w={isOpen:g,onToggle:function(){y(!g)},onClose:b};return(0,s.createElement)("div",{className:c()("components-dropdown",i),ref:v,tabIndex:"-1"},r(w),g&&(0,s.createElement)(jr,a({position:o,onClose:b,onFocusOutside:function(){const{ownerDocument:e}=v.current,t=e.activeElement.closest('[role="dialog"]');v.current.contains(e.activeElement)||t&&!t.contains(v.current)||b()},expandOnMobile:u,headerTitle:d,focusOnMount:f},p,{anchorRef:null!==(t=null==p?void 0:p.anchorRef)&&void 0!==t?t:v.current,className:c()("components-dropdown__content",p?p.className:void 0,l)}),n(w)))}var hg=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const mg={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-start",justify:"flex-end"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},vg={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-start",align:"flex-end"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{justify:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function gg(e){return"string"==typeof e?[e]:s.Children.toArray(e).filter((e=>(0,s.isValidElement)(e)))}function yg(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=Pn(e,"HStack"),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";if((0,l.isNil)(e))return{};const n="column"===t?vg:mg;return e in n?n[e]:{align:e}}(t,r);return Ip({children:gg(n).map(((e,t)=>{const n=e.key||`hstack-${t}`;return In(e,["Spacer"])?(0,s.createElement)(yp,a({isBlock:!0,key:n},e.props)):e})),direction:r,justify:"center",...u,...i,gap:o})}var bg=On((function(e,t){const n=yg(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"HStack");var wg=function(e){let{icon:t,size:n=24,...r}=e;return(0,s.cloneElement)(t,{width:n,height:n,...r})};var _g=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const xg=Vn("select",{target:"e1mv6sxx1"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",zo.black,";display:block;font-family:inherit;margin:0;width:100%;",(e=>{let{disabled:t}=e;return t?Zr({color:zo.ui.textDisabled},"",""):""}),";",(e=>{let{selectSize:t}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"}[t];return n?Zr("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""}),";",(e=>{let{selectSize:t}=e;const n={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24},"__unstable-large":{height:40,lineHeight:1,minHeight:40}};return Zr(n[t]||n.default,"","")}),";",(e=>{let{selectSize:t="default"}=e;return Mp({default:{paddingLeft:8,paddingRight:24},small:{paddingLeft:8,paddingRight:24},"__unstable-large":{paddingLeft:16,paddingRight:32}}[t])}),";}"),Eg=Vn("div",{target:"e1mv6sxx0"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",Mp({right:0})," svg{display:block;}");function kg(e,t){let{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:u,label:d,multiple:p=!1,onBlur:h=l.noop,onChange:m=l.noop,onFocus:v=l.noop,options:g=[],size:y="default",value:b,labelPosition:w="top",children:_,prefix:x,suffix:E,...k}=e;const[S,C]=(0,s.useState)(!1),P=function(e){const t=(0,f.useInstanceId)(kg);return e||`inspector-select-control-${t}`}(u),O=o?`${P}__help`:void 0;if((0,l.isEmpty)(g)&&!_)return null;const M=c()("components-select-control",n);return(0,s.createElement)(gv,{help:o,id:P},(0,s.createElement)(Ih,{className:M,disabled:r,hideLabelFromVision:i,id:P,isFocused:S,label:d,size:y,suffix:E||(0,s.createElement)(Eg,null,(0,s.createElement)(wg,{icon:_g,size:18})),prefix:x,labelPosition:w},(0,s.createElement)(xg,a({},k,{"aria-describedby":O,className:"components-select-control__input",disabled:r,id:P,multiple:p,onBlur:e=>{h(e),C(!1)},onChange:e=>{if(p){const t=Array.from(e.target.options).filter((e=>{let{selected:t}=e;return t})),n=t.map((e=>{let{value:t}=e;return t}));m(n)}else m(e.target.value,{event:e})},onFocus:e=>{v(e),C(!0)},ref:t,selectSize:y,value:b}),_||g.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,s.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))}var Sg=(0,s.forwardRef)(kg);const Cg={initial:void 0,fallback:""};var Pg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cg;const{initial:n,fallback:r}={...Cg,...t},[o,i]=(0,s.useState)(e),a=zv(e);(0,s.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]);const l=Vv([e,o,n],r),u=e=>{a||i(e)};return[l,u]};function Og(e,t,n){return"number"!=typeof e?null:parseFloat((0,l.clamp)(e,t,n))}const Mg=()=>Zr({height:30,minHeight:30},"",""),Ig=12,Tg=Vn("div",{target:"exqw8y214"})({name:"17z6zai",styles:"-webkit-tap-highlight-color:transparent;box-sizing:border-box;align-items:flex-start;display:inline-flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),Dg=Vn("div",{target:"exqw8y213"})("box-sizing:border-box;color:",zo.blue.medium.focus,";display:block;flex:1;position:relative;width:100%;",(e=>{let{color:t=zo.ui.borderFocus}=e;return Zr({color:t},"","")}),";",Mg,";",(e=>{let{marks:t}=e;return Zr({marginBottom:t?16:null},"","")}),";"),Ag=Vn("span",{target:"exqw8y212"})("margin-top:",4,"px;",Mp({marginRight:6}),";"),Rg=Vn("span",{target:"exqw8y211"})("margin-top:",4,"px;",Mp({marginLeft:6}),";"),Ng=Vn("span",{target:"exqw8y210"})("background-color:",zo.lightGray[600],";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(e=>{let{disabled:t,railColor:n}=e,r=n||null;return t&&(r=zo.lightGray[400]),Zr({background:r},"","")}),";"),Lg=Vn("span",{target:"exqw8y29"})("background-color:currentColor;border-radius:",4,"px;box-sizing:border-box;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(e=>{let{disabled:t,trackColor:n}=e,r=n||"currentColor";return t&&(r=zo.lightGray[800]),Zr({background:r},"","")}),";"),Fg=Vn("span",{target:"exqw8y28"})({name:"1xuuvmv",styles:"box-sizing:border-box;display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),jg=Vn("span",{target:"exqw8y27"})("box-sizing:border-box;height:",Ig,"px;left:0;position:absolute;top:-4px;width:1px;",(e=>{let{disabled:t,isFilled:n}=e,r=n?"currentColor":zo.lightGray[600];return t&&(r=zo.lightGray[800]),Zr({backgroundColor:r},"","")}),";"),Bg=Vn("span",{target:"exqw8y26"})("box-sizing:border-box;color:",zo.lightGray[600],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(e=>{let{isFilled:t}=e;return Zr({color:t?zo.darkGray[300]:zo.lightGray[600]},"","")}),";");var zg={name:"1sb75b3",styles:"background-color:var( --wp-admin-theme-color )"};const Vg=e=>{let{disabled:t}=e;return t?Zr("background-color:",zo.lightGray[800],";",""):zg},Hg=Vn("span",{target:"exqw8y25"})("align-items:center;box-sizing:border-box;display:flex;height:",Ig,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",Ig,"px;border-radius:50%;",Vg,";",Mp({marginLeft:-10}),";",Mp({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),Wg=Vn("span",{target:"exqw8y24"})("align-items:center;border-radius:50%;box-sizing:border-box;height:100%;outline:0;position:absolute;user-select:none;width:100%;",Vg,";",(e=>{let{isFocused:t}=e;return t?Zr("&::before{content:' ';position:absolute;background-color:var( --wp-admin-theme-color );opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),Ug=Vn("input",{target:"exqw8y23"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",Ig,"px );");var $g={name:"1cypxip",styles:"top:-80%"},Kg={name:"1lr98c4",styles:"bottom:-80%"};const Gg=Vn("span",{target:"exqw8y22"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(e=>{let{show:t}=e;return Zr({opacity:t?1:0},"","")}),";",(e=>{let{position:t}=e;return"bottom"===t?Kg:$g}),";",Vo("transition"),";",Mp({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),qg=Vn(Hv,{target:"exqw8y21"})("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:",xp(16),"!important;input[type='number']&{",Mg,";}",Mp({marginLeft:`${xp(4)} !important`}),";"),Yg=Vn("span",{target:"exqw8y20"})("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;",Mg,";}",Mp({marginLeft:8}),";");const Xg=(0,s.forwardRef)((function(e,t){let{describedBy:n,label:r,onHideTooltip:o=l.noop,onMouseLeave:i=l.noop,onMouseMove:u=l.noop,onShowTooltip:c=l.noop,value:d,...f}=e;const p=function(e){let{onHide:t=l.noop,onMouseLeave:n=l.noop,onMouseMove:r=l.noop,onShow:o=l.noop,timeout:i=300}=e;const[a,u]=(0,s.useState)(!1),c=(0,s.useRef)(),d=(0,s.useCallback)((e=>{window.clearTimeout(c.current),c.current=setTimeout(e,i)}),[i]),f=(0,s.useCallback)((e=>{r(e),d((()=>{a||(u(!0),o())}))}),[]),p=(0,s.useCallback)((e=>{n(e),d((()=>{u(!1),t()}))}),[]);return(0,s.useEffect)((()=>()=>{window.clearTimeout(c.current)})),{onMouseMove:f,onMouseLeave:p}}({onHide:o,onMouseLeave:i,onMouseMove:u,onShow:c});return(0,s.createElement)(Ug,a({},f,p,{"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:d}))}));var Zg=Xg;function Jg(e){let{className:t,isFilled:n=!1,label:r,style:o={},...i}=e;const l=c()("components-range-control__mark",n&&"is-filled",t),u=c()("components-range-control__mark-label",n&&"is-filled");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(jg,a({},i,{"aria-hidden":"true",className:l,isFilled:n,style:o})),r&&(0,s.createElement)(Bg,{"aria-hidden":"true",className:u,isFilled:n,style:o},r))}function Qg(e){let{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0,...u}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ng,a({disabled:t},u)),n&&(0,s.createElement)(ey,{disabled:t,marks:n,min:r,max:o,step:i,value:l}))}function ey(e){let{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0}=e;"any"===i&&(i=1);const u=function(e){let{marks:t,min:n=0,max:r=100,step:o=1,value:i=0}=e;if(!t)return[];const a=r-n;if(!Array.isArray(t)){t=[];const e=1+Math.round(a/o);for(;e>t.push({value:o*t.length+n}););}const s=[];return t.forEach(((e,t)=>{if(e.valuer)return;const o=`mark-${t}`,l=e.value<=i,u=(e.value-n)/a*100+"%",c={[(0,d.isRTL)()?"right":"left"]:u};s.push({...e,isFilled:l,key:o,style:c})})),s}({marks:n,min:r,max:o,step:i,value:l});return(0,s.createElement)(Fg,{"aria-hidden":"true",className:"components-range-control__marks"},u.map((e=>(0,s.createElement)(Jg,a({},e,{key:e.key,"aria-hidden":"true",disabled:t})))))}function ty(e){let{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:l=0,renderTooltipContent:u=(e=>e),zIndex:d=100,...f}=e;const p=function(e){let{inputRef:t,tooltipPosition:n}=e;const[r,o]=(0,s.useState)(),i=(0,s.useCallback)((()=>{t&&t.current&&o(n)}),[n]);return(0,s.useEffect)((()=>{i()}),[i]),(0,s.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}))),r}({inputRef:n,tooltipPosition:r}),h=c()("components-simple-tooltip",t),m={...i,zIndex:d};return(0,s.createElement)(Gg,a({},f,{"aria-hidden":o,className:h,position:p,show:o,role:"tooltip",style:m}),u(l))}const ny=(0,s.forwardRef)((function e(t,n){var r;let{afterIcon:o,allowReset:i=!1,beforeIcon:u,className:p,currentInput:h,color:m=zo.ui.theme,disabled:v=!1,help:g,initialPosition:y,isShiftStepEnabled:b=!0,label:w,hideLabelFromVision:_=!1,marks:x=!1,max:E=100,min:k=0,onBlur:S=l.noop,onChange:C=l.noop,onFocus:P=l.noop,onMouseMove:O=l.noop,onMouseLeave:M=l.noop,railColor:I,resetFallbackValue:T,renderTooltipContent:D=(e=>e),showTooltip:A,shiftStep:R=10,step:N=1,trackColor:L,value:F,withInputField:j=!0,...B}=t;const[z,V]=function(e){let{min:t,max:n,value:r,initial:o}=e;const[i,a]=Pg(Og(r,t,n),{initial:o,fallback:null});return[i,(0,s.useCallback)((e=>{a(null===e?null:Og(e,t,n))}),[t,n])]}({min:k,max:E,value:F,initial:y}),H=(0,s.useRef)(!1);"any"===N&&(A=!1,j=!1);const[W,U]=(0,s.useState)(A),[$,K]=(0,s.useState)(!1),G=(0,s.useRef)(),q=null===(r=G.current)||void 0===r?void 0:r.matches(":focus"),Y=!v&&$,X=null===z,Z=X?"":void 0!==z?z:h,J=X?(E-k)/2+k:z,Q=X?50:(z-k)/(E-k)*100,ee=`${(0,l.clamp)(Q,0,100)}%`,te=c()("components-range-control",p),ne=c()("components-range-control__wrapper",!!x&&"is-marked"),re=(0,f.useInstanceId)(e,"inspector-range-control"),oe=g?`${re}__help`:void 0,ie=!1!==A&&(0,l.isFinite)(z),ae=()=>{let e=parseFloat(T),t=e;isNaN(e)&&(e=null,t=void 0),V(e),C(t)},se={[(0,d.isRTL)()?"right":"left"]:ee};return(0,s.createElement)(gv,{className:te,label:w,hideLabelFromVision:_,id:re,help:g},(0,s.createElement)(Tg,{className:"components-range-control__root"},u&&(0,s.createElement)(Ag,null,(0,s.createElement)(He,{icon:u})),(0,s.createElement)(Dg,{className:ne,color:m,marks:!!x},(0,s.createElement)(Zg,a({},B,{className:"components-range-control__slider",describedBy:oe,disabled:v,id:re,label:w,max:E,min:k,onBlur:e=>{S(e),K(!1),U(!1)},onChange:e=>{const t=parseFloat(e.target.value);V(t),C(t)},onFocus:e=>{P(e),K(!0),U(!0)},onMouseMove:O,onMouseLeave:M,ref:e=>{G.current=e,n&&n(e)},step:N,value:Z})),(0,s.createElement)(Qg,{"aria-hidden":!0,disabled:v,marks:x,max:E,min:k,railColor:I,step:N,value:J}),(0,s.createElement)(Lg,{"aria-hidden":!0,className:"components-range-control__track",disabled:v,style:{width:ee},trackColor:L}),(0,s.createElement)(Hg,{style:se,disabled:v},(0,s.createElement)(Wg,{"aria-hidden":!0,isFocused:Y,disabled:v})),ie&&(0,s.createElement)(ty,{className:"components-range-control__tooltip",inputRef:G,tooltipPosition:"bottom",renderTooltipContent:D,show:q||W,style:se,value:z})),o&&(0,s.createElement)(Rg,null,(0,s.createElement)(He,{icon:o})),j&&(0,s.createElement)(qg,{"aria-label":w,className:"components-range-control__number",disabled:v,inputMode:"decimal",isShiftStepEnabled:b,max:E,min:k,onBlur:()=>{H.current&&(ae(),H.current=!1)},onChange:e=>{e=parseFloat(e),V(e),isNaN(e)?i&&(H.current=!0):((eE)&&(e=Og(e,k,E)),C(e),H.current=!1)},shiftStep:R,step:N,value:Z}),i&&(0,s.createElement)(Yg,null,(0,s.createElement)(Kn,{className:"components-range-control__reset",disabled:v||void 0===z,variant:"secondary",isSmall:!0,onClick:ae},(0,d.__)("Reset")))))}));var ry=ny;const oy=Vn(Hv,{target:"ez9hsf46"})(gh,"{width:",xp(24),";}"),iy=Vn(Sg,{target:"ez9hsf45"})("margin-left:",xp(-2),";width:5em;",Eh,"{display:none;}"),ay=Vn(ry,{target:"ez9hsf44"})("flex:1;",cv,"{margin-bottom:0;}"),sy=`\n&&& ${yh} {\n\theight: 40px;\n}`,ly=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${xp(2)} );\n\tmargin-left: ${xp(1)};\n}`,uy=Vn("div",{target:"ez9hsf43"})("padding:",xp(2)," ",xp(4),";"),cy=Vn("div",{target:"ez9hsf42"})("width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",xp(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",xp(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",$p.borderWidthFocus," #fff;}",ly," ",cv,"{margin-bottom:0;}",sy,";"),dy=Vn(Kn,{target:"ez9hsf41"})("&&&&&{min-width:",xp(6),";padding:0;}"),fy=Vn(Um,{target:"ez9hsf40"})({name:"1287a6j",styles:"width:8em"});function py(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function hy(e){return e instanceof py(e).Element||e instanceof Element}function my(e){return e instanceof py(e).HTMLElement||e instanceof HTMLElement}function vy(e){return"undefined"!=typeof ShadowRoot&&(e instanceof py(e).ShadowRoot||e instanceof ShadowRoot)}var gy=Math.max,yy=Math.min,by=Math.round;function wy(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function _y(){return!/^((?!chrome|android).)*safari/i.test(wy())}function xy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&my(e)&&(o=e.offsetWidth>0&&by(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&by(r.height)/e.offsetHeight||1);var a=(hy(e)?py(e):window).visualViewport,s=!_y()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function Ey(e){var t=py(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ky(e){return e?(e.nodeName||"").toLowerCase():null}function Sy(e){return((hy(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cy(e){return xy(Sy(e)).left+Ey(e).scrollLeft}function Py(e){return py(e).getComputedStyle(e)}function Oy(e){var t=Py(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function My(e,t,n){void 0===n&&(n=!1);var r=my(t),o=my(t)&&function(e){var t=e.getBoundingClientRect(),n=by(t.width)/e.offsetWidth||1,r=by(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Sy(t),a=xy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==ky(t)||Oy(i))&&(s=function(e){return e!==py(e)&&my(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Ey(e);var t}(t)),my(t)?((l=xy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Cy(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Iy(e){var t=xy(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Ty(e){return"html"===ky(e)?e:e.assignedSlot||e.parentNode||(vy(e)?e.host:null)||Sy(e)}function Dy(e){return["html","body","#document"].indexOf(ky(e))>=0?e.ownerDocument.body:my(e)&&Oy(e)?e:Dy(Ty(e))}function Ay(e,t){var n;void 0===t&&(t=[]);var r=Dy(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=py(r),a=o?[i].concat(i.visualViewport||[],Oy(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Ay(Ty(a)))}function Ry(e){return["table","td","th"].indexOf(ky(e))>=0}function Ny(e){return my(e)&&"fixed"!==Py(e).position?e.offsetParent:null}function Ly(e){for(var t=py(e),n=Ny(e);n&&Ry(n)&&"static"===Py(n).position;)n=Ny(n);return n&&("html"===ky(n)||"body"===ky(n)&&"static"===Py(n).position)?t:n||function(e){var t=/firefox/i.test(wy());if(/Trident/i.test(wy())&&my(e)&&"fixed"===Py(e).position)return null;var n=Ty(e);for(vy(n)&&(n=n.host);my(n)&&["html","body"].indexOf(ky(n))<0;){var r=Py(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Fy="top",jy="bottom",By="right",zy="left",Vy="auto",Hy=[Fy,jy,By,zy],Wy="start",Uy="end",$y="viewport",Ky="popper",Gy=Hy.reduce((function(e,t){return e.concat([t+"-"+Wy,t+"-"+Uy])}),[]),qy=[].concat(Hy,[Vy]).reduce((function(e,t){return e.concat([t,t+"-"+Wy,t+"-"+Uy])}),[]),Yy=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Xy(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Zy={placement:"bottom",modifiers:[],strategy:"absolute"};function Jy(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function ib(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?nb(o):null,a=o?rb(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Fy:t={x:s,y:n.y-r.height};break;case jy:t={x:s,y:n.y+n.height};break;case By:t={x:n.x+n.width,y:l};break;case zy:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?ob(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case Wy:t[u]=t[u]-(n[c]/2-r[c]/2);break;case Uy:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ab={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ib({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},sb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lb(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,m=void 0===h?0:h,v="function"==typeof c?c({x:p,y:m}):{x:p,y:m};p=v.x,m=v.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=zy,w=Fy,_=window;if(u){var x=Ly(n),E="clientHeight",k="clientWidth";if(x===py(n)&&"static"!==Py(x=Sy(n)).position&&"absolute"===s&&(E="scrollHeight",k="scrollWidth"),x=x,o===Fy||(o===zy||o===By)&&i===Uy)w=jy,m-=(d&&x===_&&_.visualViewport?_.visualViewport.height:x[E])-r.height,m*=l?1:-1;if(o===zy||(o===Fy||o===jy)&&i===Uy)b=By,p-=(d&&x===_&&_.visualViewport?_.visualViewport.width:x[k])-r.width,p*=l?1:-1}var S,C=Object.assign({position:s},u&&sb),P=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:by(t*r)/r||0,y:by(n*r)/r||0}}({x:p,y:m}):{x:p,y:m};return p=P.x,m=P.y,l?Object.assign({},C,((S={})[w]=y?"0":"",S[b]=g?"0":"",S.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",S)):Object.assign({},C,((t={})[w]=y?m+"px":"",t[b]=g?p+"px":"",t.transform="",t))}var ub={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:nb(t.placement),variation:rb(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,lb(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,lb(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var cb={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];my(o)&&ky(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});my(r)&&ky(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var db={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=qy.reduce((function(e,n){return e[n]=function(e,t,n){var r=nb(e),o=[zy,Fy].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[zy,By].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},fb={left:"right",right:"left",bottom:"top",top:"bottom"};function pb(e){return e.replace(/left|right|bottom|top/g,(function(e){return fb[e]}))}var hb={start:"end",end:"start"};function mb(e){return e.replace(/start|end/g,(function(e){return hb[e]}))}function vb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vy(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yb(e,t,n){return t===$y?gb(function(e,t){var n=py(e),r=Sy(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=_y();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Cy(e),y:l}}(e,n)):hy(t)?function(e,t){var n=xy(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):gb(function(e){var t,n=Sy(e),r=Ey(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=gy(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=gy(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Cy(e),l=-r.scrollTop;return"rtl"===Py(o||n).direction&&(s+=gy(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Sy(e)))}function bb(e,t,n,r){var o="clippingParents"===t?function(e){var t=Ay(Ty(e)),n=["absolute","fixed"].indexOf(Py(e).position)>=0&&my(e)?Ly(e):e;return hy(n)?t.filter((function(e){return hy(e)&&vb(e,n)&&"body"!==ky(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=yb(e,n,r);return t.top=gy(o.top,t.top),t.right=yy(o.right,t.right),t.bottom=yy(o.bottom,t.bottom),t.left=gy(o.left,t.left),t}),yb(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function wb(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function _b(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function xb(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?$y:u,d=n.elementContext,f=void 0===d?Ky:d,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,v=void 0===m?0:m,g=wb("number"!=typeof v?v:_b(v,Hy)),y=f===Ky?"reference":Ky,b=e.rects.popper,w=e.elements[h?y:f],_=bb(hy(w)?w:w.contextElement||Sy(e.elements.popper),l,c,a),x=xy(e.elements.reference),E=ib({reference:x,element:b,strategy:"absolute",placement:o}),k=gb(Object.assign({},b,E)),S=f===Ky?k:x,C={top:_.top-S.top+g.top,bottom:S.bottom-_.bottom+g.bottom,left:_.left-S.left+g.left,right:S.right-_.right+g.right},P=e.modifiersData.offset;if(f===Ky&&P){var O=P[o];Object.keys(C).forEach((function(e){var t=[By,jy].indexOf(e)>=0?1:-1,n=[Fy,jy].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}var Eb={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,v=t.options.placement,g=nb(v),y=l||(g===v||!h?[pb(v)]:function(e){if(nb(e)===Vy)return[];var t=pb(e);return[mb(e),t,mb(t)]}(v)),b=[v].concat(y).reduce((function(e,n){return e.concat(nb(n)===Vy?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?qy:l,c=rb(r),d=c?s?Gy:Gy.filter((function(e){return rb(e)===c})):Hy,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=xb(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[nb(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,E=!0,k=b[0],S=0;S=0,I=M?"width":"height",T=xb(t,{placement:C,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),D=M?O?By:zy:O?jy:Fy;w[I]>_[I]&&(D=pb(D));var A=pb(D),R=[];if(i&&R.push(T[P]<=0),s&&R.push(T[D]<=0,T[A]<=0),R.every((function(e){return e}))){k=C,E=!1;break}x.set(C,R)}if(E)for(var N=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},L=h?3:1;L>0;L--){if("break"===N(L))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kb(e,t,n){return gy(e,yy(t,n))}var Sb={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,v=xb(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),g=nb(t.placement),y=rb(t.placement),b=!y,w=ob(g),_="x"===w?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,S="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,C="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(x){if(i){var M,I="y"===w?Fy:zy,T="y"===w?jy:By,D="y"===w?"height":"width",A=x[w],R=A+v[I],N=A-v[T],L=p?-k[D]/2:0,F=y===Wy?E[D]:k[D],j=y===Wy?-k[D]:-E[D],B=t.elements.arrow,z=p&&B?Iy(B):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[I],W=V[T],U=kb(0,E[D],z[D]),$=b?E[D]/2-L-U-H-C.mainAxis:F-U-H-C.mainAxis,K=b?-E[D]/2+L+U+W+C.mainAxis:j+U+W+C.mainAxis,G=t.elements.arrow&&Ly(t.elements.arrow),q=G?"y"===w?G.clientTop||0:G.clientLeft||0:0,Y=null!=(M=null==P?void 0:P[w])?M:0,X=A+K-Y,Z=kb(p?yy(R,A+$-Y-q):R,A,p?gy(N,X):N);x[w]=Z,O[w]=Z-A}if(s){var J,Q="x"===w?Fy:zy,ee="x"===w?jy:By,te=x[_],ne="y"===_?"height":"width",re=te+v[Q],oe=te-v[ee],ie=-1!==[Fy,zy].indexOf(g),ae=null!=(J=null==P?void 0:P[_])?J:0,se=ie?re:te-E[ne]-k[ne]-ae+C.altAxis,le=ie?te+E[ne]+k[ne]-ae-C.altAxis:oe,ue=p&&ie?function(e,t,n){var r=kb(e,t,n);return r>n?n:r}(se,te,le):kb(p?se:re,te,p?le:oe);x[_]=ue,O[_]=ue-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};var Cb={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=nb(n.placement),l=ob(s),u=[zy,By].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return wb("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:_b(e,Hy))}(o.padding,n),d=Iy(i),f="y"===l?Fy:zy,p="y"===l?jy:By,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],v=Ly(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,y=h/2-m/2,b=c[f],w=g-d[u]-c[p],_=g/2-d[u]/2+y,x=kb(b,_,w),E=l;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&vb(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pb(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ob(e){return[Fy,By,jy,zy].some((function(t){return e[t]>=0}))}var Mb={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=xb(t,{elementContext:"reference"}),s=xb(t,{altBoundary:!0}),l=Pb(a,r),u=Pb(s,o,i),c=Ob(l),d=Ob(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},Ib=Qy({defaultModifiers:[tb,ab,ub,cb,db,Eb,Sb,Cb,Mb]});function Tb(e){void 0===e&&(e={});var t,n,r=Xo(e),o=r.visible,i=void 0!==o&&o,a=r.animated,s=void 0!==a&&a,l=ni(v(r,["visible","animated"])),u=(0,b.useState)(i),c=u[0],d=u[1],f=(0,b.useState)(s),p=f[0],h=f[1],g=(0,b.useState)(!1),y=g[0],w=g[1],_=(t=c,n=(0,b.useRef)(null),G((function(){n.current=t}),[t]),n),x=null!=_.current&&_.current!==c;p&&!y&&x&&w(!0),(0,b.useEffect)((function(){if("number"==typeof p&&y){var e=setTimeout((function(){return w(!1)}),p);return function(){clearTimeout(e)}}return function(){}}),[p,y]);var E=(0,b.useCallback)((function(){return d(!0)}),[]),k=(0,b.useCallback)((function(){return d(!1)}),[]),S=(0,b.useCallback)((function(){return d((function(e){return!e}))}),[]),C=(0,b.useCallback)((function(){return w(!1)}),[]);return m(m({},l),{},{visible:c,animated:p,animating:y,show:E,hide:k,toggle:S,setVisible:d,setAnimated:h,stopAnimation:C})}var Db=ne("Mac")&&!ne("Chrome")&&ne("Safari");function Ab(e){return function(t){return e&&!F(t,e)?e:t}}function Rb(e){void 0===e&&(e={});var t=Xo(e),n=t.gutter,r=void 0===n?12:n,o=t.placement,i=void 0===o?"bottom":o,a=t.unstable_flip,s=void 0===a||a,l=t.unstable_offset,u=t.unstable_preventOverflow,c=void 0===u||u,d=t.unstable_fixed,f=void 0!==d&&d,p=t.modal,h=void 0!==p&&p,g=v(t,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),y=(0,b.useRef)(null),w=(0,b.useRef)(null),_=(0,b.useRef)(null),x=(0,b.useRef)(null),E=(0,b.useState)(i),k=E[0],S=E[1],C=(0,b.useState)(i),P=C[0],O=C[1],M=(0,b.useState)(l||[0,r])[0],I=(0,b.useState)({position:"fixed",left:"100%",top:"100%"}),T=I[0],D=I[1],A=(0,b.useState)({}),R=A[0],N=A[1],L=function(e){void 0===e&&(e={});var t=Xo(e),n=t.modal,r=void 0===n||n,o=Tb(v(t,["modal"])),i=(0,b.useState)(r),a=i[0],s=i[1],l=(0,b.useRef)(null);return m(m({},o),{},{modal:a,setModal:s,unstable_disclosureRef:l})}(m({modal:h},g)),F=(0,b.useCallback)((function(){return!!y.current&&(y.current.forceUpdate(),!0)}),[]),j=(0,b.useCallback)((function(e){e.placement&&O(e.placement),e.styles&&(D(Ab(e.styles.popper)),x.current&&N(Ab(e.styles.arrow)))}),[]);return G((function(){return w.current&&_.current&&(y.current=Ib(w.current,_.current,{placement:k,strategy:f?"fixed":"absolute",onFirstUpdate:Db?j:void 0,modifiers:[{name:"eventListeners",enabled:L.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:s,options:{padding:8}},{name:"offset",options:{offset:M}},{name:"preventOverflow",enabled:c,options:{tetherOffset:function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!x.current,options:{element:x.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:L.visible&&!0,fn:function(e){var t=e.state;return j(t)}}]})),function(){y.current&&(y.current.destroy(),y.current=null)}}),[k,f,L.visible,s,M,c]),(0,b.useEffect)((function(){if(L.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=y.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[L.visible]),m(m({},L),{},{unstable_referenceRef:w,unstable_popoverRef:_,unstable_arrowRef:x,unstable_popoverStyles:T,unstable_arrowStyles:R,unstable_update:F,unstable_originalPlacement:k,placement:P,place:S})}var Nb={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}};var Lb=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],Fb=[].concat(Lb,["unstable_portal"]),jb=V({name:"TooltipReference",compose:ue,keys:Lb,useProps:function(e,t){var n=t.ref,r=t.onFocus,o=t.onBlur,i=t.onMouseEnter,a=t.onMouseLeave,s=v(t,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),l=q(r),u=q(o),c=q(i),d=q(a),f=(0,b.useCallback)((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),p=(0,b.useCallback)((function(t){var n,r;null===(n=u.current)||void 0===n||n.call(u,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]),h=(0,b.useCallback)((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),g=(0,b.useCallback)((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]);return m({ref:W(e.unstable_referenceRef,n),tabIndex:0,onFocus:f,onBlur:p,onMouseEnter:h,onMouseLeave:g,"aria-describedby":e.baseId},s)}}),Bb=B({as:"div",useHook:jb});const zb=(0,s.createContext)({});var Vb=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],Hb=V({name:"DisclosureContent",compose:ue,keys:Vb,useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,i=v(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,s=(0,b.useState)(null),l=s[0],u=s[1],c=!e.visible&&!a,d=c?m({display:"none"},o):o,f=q(n),p=q(r),h=(0,b.useRef)(0);(0,b.useEffect)((function(){if(e.animated)return h.current=window.requestAnimationFrame((function(){h.current=window.requestAnimationFrame((function(){e.visible?u("enter"):u(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(h.current)}}),[e.animated,e.visible,a]);var g=(0,b.useCallback)((function(t){var n;Y(t)&&(a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,a,e.stopAnimation]),y=(0,b.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),g(e)}),[g]),w=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),g(e)}),[g]);return m({id:e.baseId,"data-enter":"enter"===l?"":void 0,"data-leave":"leave"===l?"":void 0,onTransitionEnd:y,onAnimationEnd:w,hidden:c,style:d},i)}}),Wb=B({as:"div",useHook:Hb}),Ub=window.ReactDOM;function $b(){return K?document.body:null}var Kb=(0,b.createContext)($b());function Gb(e){var t=e.children,n=(0,b.useContext)(Kb)||$b(),r=(0,b.useState)((function(){if(K){var e=document.createElement("div");return e.className=Gb.__className,e}return null}))[0];return G((function(){if(r&&n)return n.appendChild(r),function(){n.removeChild(r)}}),[r,n]),r?(0,Ub.createPortal)((0,b.createElement)(Kb.Provider,{value:r},t),r):null}function qb(e){e.defaultPrevented||"Escape"===e.key&&Nb.show(null)}Gb.__className="__reakit-portal",Gb.__selector="."+Gb.__className;var Yb=V({name:"Tooltip",compose:Hb,keys:Fb,useOptions:function(e){var t=e.unstable_portal;return m({unstable_portal:void 0===t||t},v(e,["unstable_portal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=t.wrapElement,i=v(t,["ref","style","wrapElement"]);(0,b.useEffect)((function(){var t;U(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",qb)}),[]);var a=(0,b.useCallback)((function(t){return e.unstable_portal&&(t=(0,b.createElement)(Gb,null,t)),o?o(t):t}),[e.unstable_portal,o]);return m({ref:W(e.unstable_popoverRef,n),role:"tooltip",style:m(m({},e.unstable_popoverStyles),{},{pointerEvents:"none"},r),wrapElement:a},i)}}),Xb=B({as:"div",memo:!0,useHook:Yb});var Zb=On((function(e,t){const{as:n="span",shortcut:r,className:o,...i}=Pn(e,"Shortcut");if(!r)return null;let l,u;return"string"==typeof r?l=r:(l=r.display,u=r.ariaLabel),(0,s.createElement)(Wn,a({as:n,className:o,"aria-label":u,ref:t},i),l)}),"Shortcut");const Jb=Zr("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",$p.transitionDurationFastest," ease;&[data-enter]{opacity:1;}",""),Qb=Vn("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",zo.white,";padding:4px 8px;"),ew={name:"12mkfdx",styles:"outline:none"},tw=Vn(Zb,{target:"e7tfjmw0"})("display:inline-block;margin-left:",xp(1),";"),{TooltipPopoverView:nw}=t;var rw=On((function(e,t){const{children:n,className:r,...o}=Pn(e,"TooltipContent"),{tooltip:i}=(0,s.useContext)(zb),l=Cn()(Jb,r);return(0,s.createElement)(Xb,a({as:Wn},o,i,{className:l,ref:t}),(0,s.createElement)(nw,null,n))}),"TooltipContent");const ow=On((function(e,t){const{animated:n=!0,animationDuration:r=160,baseId:o,children:i,content:l,focusable:u=!0,gutter:c=4,id:d,modal:f=!0,placement:p,visible:h=!1,shortcut:g,...y}=Pn(e,"Tooltip"),w=function(e){void 0===e&&(e={});var t=Xo(e),n=t.placement,r=void 0===n?"top":n,o=t.unstable_timeout,i=void 0===o?0:o,a=v(t,["placement","unstable_timeout"]),s=(0,b.useState)(i),l=s[0],u=s[1],c=(0,b.useRef)(null),d=(0,b.useRef)(null),f=Rb(m(m({},a),{},{placement:r})),p=(f.modal,f.setModal,v(f,["modal","setModal"])),h=(0,b.useCallback)((function(){null!==c.current&&window.clearTimeout(c.current),null!==d.current&&window.clearTimeout(d.current)}),[]),g=(0,b.useCallback)((function(){h(),p.hide(),d.current=window.setTimeout((function(){Nb.hide(p.baseId)}),l)}),[h,p.hide,l,p.baseId]),y=(0,b.useCallback)((function(){h(),!l||Nb.currentTooltipId?(Nb.show(p.baseId),p.show()):(Nb.show(null),c.current=window.setTimeout((function(){Nb.show(p.baseId),p.show()}),l))}),[h,l,p.show,p.baseId]);return(0,b.useEffect)((function(){return Nb.subscribe((function(e){e!==p.baseId&&(h(),p.visible&&p.hide())}))}),[p.baseId,h,p.visible,p.hide]),(0,b.useEffect)((function(){return function(){h(),Nb.hide(p.baseId)}}),[h,p.baseId]),m(m({},p),{},{hide:g,show:y,unstable_timeout:l,unstable_setTimeout:u})}({animated:n?r:void 0,baseId:o||d,gutter:c,placement:p,visible:h,...y}),_=(0,s.useMemo)((()=>({tooltip:w})),[w]);return(0,s.createElement)(zb.Provider,{value:_},l&&(0,s.createElement)(rw,{unstable_portal:f,ref:t},l,g&&(0,s.createElement)(tw,{shortcut:g})),i&&(0,s.createElement)(Bb,a({},w,i.props,{ref:null==i?void 0:i.ref}),(e=>(u||(e.tabIndex=void 0),(0,s.cloneElement)(i,e)))))}),"Tooltip");var iw=ow;const aw=e=>{let{values:t}=e;return(0,s.createElement)(s.Fragment,null,t.map((e=>{let[t,n]=e;return(0,s.createElement)(yp,{key:n,isBlock:!0,display:"flex"},(0,s.createElement)(sh,{color:zo.ui.theme},n),(0,s.createElement)(sh,null,t))})))},sw=e=>{let{color:t,enableAlpha:n}=e;const{h:r,s:o,l:i,a:a}=t.toHsl(),l=[[Math.floor(r),"H"],[Math.round(100*o),"S"],[Math.round(100*i),"L"]];return n&&l.push([Math.round(100*a),"A"]),(0,s.createElement)(aw,{values:l})},lw=e=>{let{color:t,enableAlpha:n}=e;const{r:r,g:o,b:i,a:a}=t.toRgb(),l=[[r,"R"],[o,"G"],[i,"B"]];return n&&l.push([Math.round(100*a),"A"]),(0,s.createElement)(aw,{values:l})},uw=e=>{let{color:t}=e;const n=t.toHex().slice(1).toUpperCase();return(0,s.createElement)(yp,null,(0,s.createElement)(sh,{color:zo.ui.theme},"#"),(0,s.createElement)(sh,null,n))},cw=e=>{let{color:t,colorType:n,enableAlpha:r}=e;const[o,i]=(0,s.useState)(null),a=(0,s.useRef)(),l={color:t,enableAlpha:r},u=(e=>{switch(e){case"hsl":return sw;case"rgb":return lw;default:return uw}})(n),c=(0,f.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{a.current&&clearTimeout(a.current),i(t.toHex()),a.current=setTimeout((()=>{i(null),a.current=void 0}),3e3)}));return(0,s.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]),(0,s.createElement)(iw,{content:(0,s.createElement)(sh,{color:"white"},o===t.toHex()?(0,d.__)("Copied!"):(0,d.__)("Copy"))},(0,s.createElement)(Tp,{justify:"flex-start",gap:xp(1),ref:c,style:{height:30}},(0,s.createElement)(u,l)))},dw=e=>{let{min:t,max:n,label:r,abbreviation:o,onChange:i,value:a}=e;return(0,s.createElement)(Jm,{as:bg,spacing:4},(0,s.createElement)(oy,{min:t,max:n,label:r,hideLabelFromVision:!0,value:a,onChange:i,prefix:(0,s.createElement)(Jm,{as:sh,paddingLeft:xp(3.5),color:zo.ui.theme,lineHeight:1},o),hideHTMLArrows:!0}),(0,s.createElement)(ay,{label:r,hideLabelFromVision:!0,min:t,max:n,value:a,onChange:i,withInputField:!1}))},fw=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{r:o,g:i,b:a,a:l}=t.toRgb();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(dw,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>n(So({r:e,g:i,b:a,a:l}))}),(0,s.createElement)(dw,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>n(So({r:o,g:e,b:a,a:l}))}),(0,s.createElement)(dw,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>n(So({r:o,g:i,b:e,a:l}))}),r&&(0,s.createElement)(dw,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>n(So({r:o,g:i,b:a,a:e/100}))}))},pw=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{h:o,s:i,l:a,a:l}=t.toHsl();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(dw,{min:0,max:359,label:"Hue",abbreviation:"H",value:o,onChange:e=>{n(So({h:e,s:i,l:a,a:l}))}}),(0,s.createElement)(dw,{min:0,max:100,label:"Saturation",abbreviation:"S",value:i,onChange:e=>{n(So({h:o,s:e,l:a,a:l}))}}),(0,s.createElement)(dw,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a,onChange:e=>{n(So({h:o,s:i,l:e,a:l}))}}),r&&(0,s.createElement)(dw,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>{n(So({h:o,s:i,l:a,a:e/100}))}}))},hw=e=>{let{color:t,onChange:n,enableAlpha:r}=e;return(0,s.createElement)(fy,{prefix:(0,s.createElement)(Jm,{as:sh,marginLeft:xp(3.5),color:zo.ui.theme,lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const t=e.startsWith("#")?e:"#"+e;n(So(t))},maxLength:r?9:7,label:(0,d.__)("Hex color"),hideLabelFromVision:!0})},mw=e=>{let{colorType:t,color:n,onChange:r,enableAlpha:o}=e;const i={color:n,onChange:r,enableAlpha:o};switch(t){case"hsl":return(0,s.createElement)(pw,i);case"rgb":return(0,s.createElement)(fw,i);default:return(0,s.createElement)(hw,i)}};function vw(){return(vw=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function yw(e){var t=(0,b.useRef)(e),n=(0,b.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var bw=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?i(xw(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=_w(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(Ew(t),!function(e,t){return t&&!ww(e)}(t,l.current)&&r)){if(ww(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(xw(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],d=u[1],f=u[2];return(0,b.useEffect)((function(){return f}),[f]),b.createElement("div",vw({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),Sw=function(e){return e.filter(Boolean).join(" ")},Cw=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=Sw(["react-colorful__pointer",e.className]);return b.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},b.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Pw=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},Ow=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:Pw(e.h),s:Pw(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:Pw(o/2),a:Pw(r,2)}}),Mw=function(e){var t=Ow(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Iw=function(e){var t=Ow(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Tw=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:Pw(255*[r,s,a,a,l,r][u]),g:Pw(255*[l,r,r,s,a,a][u]),b:Pw(255*[a,a,l,r,r,s][u]),a:Pw(o,2)}},Dw=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Rw({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},Aw=Dw,Rw=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Pw(60*(s<0?s+6:s)),s:Pw(i?a/i*100:0),v:Pw(i/255*100),a:o}},Nw=b.memo((function(e){var t=e.hue,n=e.onChange,r=Sw(["react-colorful__hue",e.className]);return b.createElement("div",{className:r},b.createElement(kw,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:bw(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":Pw(t),"aria-valuemax":"360","aria-valuemin":"0"},b.createElement(Cw,{className:"react-colorful__hue-pointer",left:t/360,color:Mw({h:t,s:100,v:100,a:1})})))})),Lw=b.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Mw({h:t.h,s:100,v:100,a:1})};return b.createElement("div",{className:"react-colorful__saturation",style:r},b.createElement(kw,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:bw(t.s+100*e.left,0,100),v:bw(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Pw(t.s)+"%, Brightness "+Pw(t.v)+"%"},b.createElement(Cw,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Mw(t)})))})),Fw=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},jw=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function Bw(e,t,n){var r=yw(n),o=(0,b.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,b.useRef)({color:t,hsva:i});(0,b.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,b.useEffect)((function(){var t;Fw(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,b.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var zw,Vw="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,Hw=new Map,Ww=function(e){Vw((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!Hw.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',Hw.set(t,r);var o=zw||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},Uw=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=gw(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);Ww(s);var l=Bw(n,o,i),u=l[0],c=l[1],d=Sw(["react-colorful",t]);return b.createElement("div",vw({},a,{ref:s,className:d}),b.createElement(Lw,{hsva:u,onChange:c}),b.createElement(Nw,{hue:u.h,onChange:c,className:"react-colorful__last-control"}))},$w=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+Iw(Object.assign({},n,{a:0}))+", "+Iw(Object.assign({},n,{a:1}))+")"},i=Sw(["react-colorful__alpha",t]),a=Pw(100*n.a);return b.createElement("div",{className:i},b.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),b.createElement(kw,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:bw(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},b.createElement(Cw,{className:"react-colorful__alpha-pointer",left:n.a,color:Iw(n)})))},Kw=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=gw(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);Ww(s);var l=Bw(n,o,i),u=l[0],c=l[1],d=Sw(["react-colorful",t]);return b.createElement("div",vw({},a,{ref:s,className:d}),b.createElement(Lw,{hsva:u,onChange:c}),b.createElement(Nw,{hue:u.h,onChange:c}),b.createElement($w,{hsva:u,onChange:c,className:"react-colorful__last-control"}))},Gw={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Dw,fromHsva:function(e){var t=Tw(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:jw},qw=function(e){return b.createElement(Kw,vw({},e,{colorModel:Gw}))},Yw={defaultColor:"rgb(0, 0, 0)",toHsva:Aw,fromHsva:function(e){var t=Tw(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:jw},Xw=function(e){return b.createElement(Uw,vw({},e,{colorModel:Yw}))};const Zw=e=>{let{color:t,enableAlpha:n,onChange:r}=e;const o=n?qw:Xw,i=(0,s.useMemo)((()=>t.toRgbString()),[t]);return(0,s.createElement)(o,{color:i,onChange:e=>{r(So(e))}})};Po([Oo]);const Jw=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],Qw=On(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:l,...u}=Pn(e,"ColorPicker"),[c,p]=function(e){let{defaultValue:t,onChange:n,value:r}=e;const o=void 0!==r,i=o?r:t,[a,l]=(0,s.useState)(i);let u;return u=o&&"function"==typeof n?n:o||"function"!=typeof n?l:e=>{n(e),l(e)},[o?r:a,u]}({onChange:o,value:r,defaultValue:i}),h=(0,s.useMemo)((()=>So(c||"")),[c]),m=(0,f.useDebounce)(p),v=(0,s.useCallback)((e=>{m(e.toHex())}),[m]),[g,y]=(0,s.useState)(!1),[b,w]=(0,s.useState)(l||"hex");return(0,s.createElement)(cy,a({ref:t},u),(0,s.createElement)(Zw,{onChange:v,color:h,enableAlpha:n}),(0,s.createElement)(uy,null,(0,s.createElement)(bg,{justify:"space-between"},g?(0,s.createElement)(iy,{options:Jw,value:b,onChange:e=>w(e),label:(0,d.__)("Color format"),hideLabelFromVision:!0}):(0,s.createElement)(cw,{color:h,colorType:l||b,enableAlpha:n}),(0,s.createElement)(dy,{isSmall:!0,onClick:()=>y(!g),icon:hg,isPressed:g,label:g?(0,d.__)("Hide detailed inputs"):(0,d.__)("Show detailed inputs")})),(0,s.createElement)(Jm,{margin:4}),g&&(0,s.createElement)(mw,{colorType:b,color:h,onChange:v,enableAlpha:n})))}),"ColorPicker");var e_=Qw;function t_(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}const n_=qe()((e=>{const t=So(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));const r_=e=>(0,s.createElement)(e_,function(e){const t=(0,s.useCallback)((t=>{var n;return t_(e)?e.onChangeComplete(n_(t)):null===(n=e.onChange)||void 0===n?void 0:n.call(e,t)}),[e.onChangeComplete,e.onChange]),n=(0,s.useMemo)((()=>t_(e)?function(e){if(void 0!==(null==e?void 0:e.color))return"string"==typeof e.color?e.color:e.color.hex?e.color.hex:void 0}(e):e.color),[e.color]),r=(0,s.useMemo)((()=>t_(e)?!e.disableAlpha:e.enableAlpha),[e.disableAlpha,e.enableAlpha]);return{...t_(e)?{}:e,onChange:t,color:n,enableAlpha:r}}(e));var o_=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));function i_(e){let{actions:t,className:n,options:r,children:o}=e;return(0,s.createElement)("div",{className:c()("components-circular-option-picker",n)},(0,s.createElement)("div",{className:"components-circular-option-picker__swatches"},r),o,t&&(0,s.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}i_.Option=function(e){let{className:t,isSelected:n,selectedIconProps:r,tooltipText:o,...i}=e;const l=(0,s.createElement)(Kn,a({isPressed:n,className:"components-circular-option-picker__option"},i));return(0,s.createElement)("div",{className:c()(t,"components-circular-option-picker__option-wrapper")},o?(0,s.createElement)($r,{text:o},l):l,n&&(0,s.createElement)(wg,a({icon:o_},r||{})))},i_.ButtonAction=function(e){let{className:t,children:n,...r}=e;return(0,s.createElement)(Kn,a({className:c()("components-circular-option-picker__clear",t),isSmall:!0,variant:"secondary"},r),n)},i_.DropdownLinkAction=function(e){let{buttonProps:t,className:n,dropdownProps:r,linkText:o}=e;return(0,s.createElement)(pg,a({className:c()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,s.createElement)(Kn,a({"aria-expanded":n,"aria-haspopup":"true",onClick:r,variant:"link"},t),o)}},r))};var a_=On((function(e,t){const n=function(e){const{expanded:t=!1,...n}=Pn(e,"VStack");return yg({direction:"column",expanded:t,...n})}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"VStack");var s_=On((function(e,t){const n=Fp(e);return(0,s.createElement)(Wn,a({as:"span"},n,{ref:t}))}),"Truncate");var l_=On((function(e,t){const n=function(e){const{as:t,level:n=2,...r}=Pn(e,"Heading"),o=t||`h${n}`,i={};return"string"==typeof o&&"h"!==o[0]&&(i.role="heading",i["aria-level"]="string"==typeof n?parseInt(n):n),{...ah({color:zo.darkGray.heading,size:oh(n),isBlock:!0,weight:$p.fontWeightHeading,...r}),...i,as:o}}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"Heading");const u_=Vn(l_,{target:"e1uu5br00"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"});function c_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;const u=(0,s.useMemo)((()=>(0,l.map)(r,(e=>{let{color:t,name:r}=e;const a=So(t);return(0,s.createElement)(i_.Option,{key:t,isSelected:i===t,selectedIconProps:i===t?{fill:a.contrast()>a.contrast("#000")?"#fff":"#000"}:{},tooltipText:r||(0,d.sprintf)((0,d.__)("Color code: %s"),t),style:{backgroundColor:t,color:t},onClick:i===t?n:()=>o(t),"aria-label":r?(0,d.sprintf)((0,d.__)("Color: %s"),r):(0,d.sprintf)((0,d.__)("Color code: %s"),t)})}))),[r,i,o,n]);return(0,s.createElement)(i_,{className:t,options:u,actions:a})}function d_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;return(0,s.createElement)(a_,{spacing:3,className:t},r.map(((e,t)=>{let{name:l,colors:u}=e;return(0,s.createElement)(a_,{spacing:2,key:t},(0,s.createElement)(u_,null,l),(0,s.createElement)(c_,{clearColor:n,colors:u,onChange:o,value:i,actions:r.length===t+1?a:null}))})))}function f_(e){let{isRenderedInSidebar:t,...n}=e;return(0,s.createElement)(pg,a({contentClassName:c()("components-color-palette__custom-color-dropdown-content",{"is-rendered-in-sidebar":t})},n))}Po([Oo,function(e){e.prototype.luminance=function(){return e=fg(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,a,s,l,u=t instanceof e?t:new e(t);return i=this.rgba,a=u.toRgb(),n=(s=fg(i))>(l=fg(a))?(s+.05)/(l+.05):(l+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}]);function p_(e){let{clearable:t=!0,className:n,colors:r,disableCustomColors:o=!1,enableAlpha:i,onChange:a,value:l,__experimentalHasMultipleOrigins:u=!1,__experimentalIsRenderedInSidebar:c=!1}=e;const f=(0,s.useCallback)((()=>a(void 0)),[a]),p=u&&(null==r?void 0:r.length),h=p?d_:c_;let m;c&&(m="bottom left");const v=So(l),g=null!=l&&l.startsWith("#")?l.substring(1):null!=l?l:"",y=(0,s.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const r=n?t:[{colors:t}];for(const{colors:t}of r)for(const{name:n,color:r}of t)if(So(e).toHex()===So(r).toHex())return n;return(0,d.__)("Custom")}(l,r,p)),[l,r,p]),b=g?(0,d.sprintf)((0,d.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),y,g):(0,d.__)("Custom color picker.");return(0,s.createElement)(a_,{spacing:3,className:n},!o&&(0,s.createElement)(f_,{position:m,isRenderedInSidebar:c,renderContent:()=>(0,s.createElement)(r_,{color:l,onChange:e=>a(e),enableAlpha:i}),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Tp,{as:"button",justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":b,style:{background:l,color:v.contrast()>v.contrast("#000")?"#fff":"#000"}},(0,s.createElement)(yp,{isBlock:!0,as:s_,className:"components-color-palette__custom-color-name"},y),(0,s.createElement)(yp,{as:"span",className:"components-color-palette__custom-color-value"},g))}}),(0,s.createElement)(h,{clearable:t,clearColor:f,colors:r,onChange:a,value:l,actions:!!t&&(0,s.createElement)(i_.ButtonAction,{onClick:f},(0,d.__)("Clear"))}))}const h_="web"===s.Platform.OS,m_={px:{value:"px",label:h_?"px":(0,d.__)("Pixels (px)"),a11yLabel:(0,d.__)("Pixels (px)"),step:1},"%":{value:"%",label:h_?"%":(0,d.__)("Percentage (%)"),a11yLabel:(0,d.__)("Percent (%)"),step:.1},em:{value:"em",label:h_?"em":(0,d.__)("Relative to parent font size (em)"),a11yLabel:(0,d._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:h_?"rem":(0,d.__)("Relative to root font size (rem)"),a11yLabel:(0,d._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:h_?"vw":(0,d.__)("Viewport width (vw)"),a11yLabel:(0,d.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:h_?"vh":(0,d.__)("Viewport height (vh)"),a11yLabel:(0,d.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:h_?"vmin":(0,d.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,d.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:h_?"vmax":(0,d.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,d.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:h_?"ch":(0,d.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,d.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:h_?"ex":(0,d.__)("x-height of the font (ex)"),a11yLabel:(0,d.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:h_?"cm":(0,d.__)("Centimeters (cm)"),a11yLabel:(0,d.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:h_?"mm":(0,d.__)("Millimeters (mm)"),a11yLabel:(0,d.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:h_?"in":(0,d.__)("Inches (in)"),a11yLabel:(0,d.__)("Inches (in)"),step:.001},pc:{value:"pc",label:h_?"pc":(0,d.__)("Picas (pc)"),a11yLabel:(0,d.__)("Picas (pc)"),step:1},pt:{value:"pt",label:h_?"pt":(0,d.__)("Points (pt)"),a11yLabel:(0,d.__)("Points (pt)"),step:1}},v_=Object.values(m_),g_=[m_.px,m_["%"],m_.em,m_.rem,m_.vw,m_.vh],y_=m_.px;function b_(e,t,n){return __(t?`${null!=e?e:""}${t}`:e,n)}function w_(e){return Array.isArray(e)&&!!e.length}function __(e){var t,n;let r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v_;if(void 0!==e||null===e){r=`${e}`.trim();const t=parseFloat(r);o=isFinite(t)?t:void 0}const a=null===(t=r)||void 0===t?void 0:t.match(/[\d.\-\+]*\s*(.*)/),s=null==a||null===(n=a[1])||void 0===n?void 0:n.toLowerCase();let l;if(w_(i)){const e=i.find((e=>e.value===s));l=null==e?void 0:e.value}else l=y_.value;return[o,l]}function x_(e,t,n,r){const[o,i]=__(e,t),a=null!=o?o:n;let s=i||r;return!s&&w_(t)&&(s=t[0].value),[a,s]}const E_=e=>{let{units:t=v_,availableUnits:n=[],defaultValues:r}=e;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(n,t);return r&&o.forEach(((e,t)=>{if(r[e.value]){const[n]=__(r[e.value]);o[t].default=n}})),o};function k_(e){const{border:t,className:n,colors:r,contentClassName:o,onChange:i,previousStyleSelection:a,...l}=Pn(e,"BorderControlDropdown"),[u]=__(null==t?void 0:t.width),c=0===u,d=Cn(),f=(0,s.useMemo)((()=>d(Zr("background:#fff;",Mp({borderRadius:"1px 0 0 1px",borderRight:`${$p.borderWidth} solid ${zo.gray[200]}`},{borderRadius:"0 1px 1px 0",borderLeft:`${$p.borderWidth} solid ${zo.gray[200]}`})()," &&>button{padding:",xp(1),";border-radius:inherit;}",""),n)),[n,d]),p=(0,s.useMemo)((()=>d(rg)),[d]),h=(0,s.useMemo)((()=>d(Qv(t))),[t,d]),m=(0,s.useMemo)((()=>d(eg,o)),[d,o]),v=(0,s.useMemo)((()=>d(tg)),[d]),g=(0,s.useMemo)((()=>d(ng)),[d]),y=(0,s.useMemo)((()=>d(og)),[d]);return{...l,border:t,className:f,colors:r,indicatorClassName:p,indicatorWrapperClassName:h,onColorChange:e=>{const n="none"===(null==t?void 0:t.style)?a:null==t?void 0:t.style,r=c&&e?"1px":null==t?void 0:t.width;i({color:e,style:n,width:r})},onStyleChange:e=>{const n=c&&e?"1px":null==t?void 0:t.width;i({...t,style:e,width:n})},onReset:()=>{i({...t,color:void 0,style:void 0})},popoverClassName:m,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:y}}const S_=()=>{},C_=On(((e,t)=>{const{__experimentalHasMultipleOrigins:n,__experimentalIsRenderedInSidebar:r,border:o,colors:i,disableCustomColors:l,enableAlpha:u,indicatorClassName:c,indicatorWrapperClassName:f,onReset:p,onColorChange:h,onStyleChange:m,popoverClassName:v,popoverContentClassName:g,popoverControlsClassName:y,resetButtonClassName:b,showDropdownHeader:w,enableStyle:_=!0,...x}=k_(e),{color:E,style:k}=o||{},S=((e,t,n)=>{if(e&&t){if(n){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(E,i,!!n),C=((e,t,n,r)=>r?t?n?(0,d.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,t.color,n):(0,d.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?n?(0,d.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',e,n):(0,d.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s".',e):(0,d.__)("Border color and style picker."):t?(0,d.sprintf)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?(0,d.sprintf)('Border color picker. The currently selected color has a value of "%1$s".',e):(0,d.__)("Border color picker."))(E,S,k,_),P=r?"bottom left":void 0;return(0,s.createElement)(pg,a({renderToggle:e=>{let{onToggle:t=S_}=e;return(0,s.createElement)(Kn,{onClick:t,variant:"tertiary","aria-label":C,position:P},(0,s.createElement)("span",{className:f},(0,s.createElement)(cg,{className:c,colorValue:E})))},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(a_,{className:y,spacing:6},w?(0,s.createElement)(bg,null,(0,s.createElement)(fv,null,(0,d.__)("Border color")),(0,s.createElement)(Kn,{isSmall:!0,label:(0,d.__)("Close border color"),icon:Mv,onClick:t})):void 0,(0,s.createElement)(p_,{className:g,value:E,onChange:h,colors:i,disableCustomColors:l,__experimentalHasMultipleOrigins:n,__experimentalIsRenderedInSidebar:r,clearable:!1,enableAlpha:u}),_&&(0,s.createElement)(ug,{label:(0,d.__)("Style"),value:k,onChange:m})),(0,s.createElement)(Kn,{className:b,variant:"tertiary",onClick:()=>{p(),t()}},(0,d.__)("Reset to default")))},contentClassName:v},x,{ref:t}))}),"BorderControlDropdown");var P_=C_;function O_(e){let{className:t,isUnitSelectTabbable:n=!0,onChange:r,size:o="default",unit:i="px",units:l=g_,...u}=e;if(!w_(l)||1===(null==l?void 0:l.length))return(0,s.createElement)(Yv,{className:"components-unit-control__unit-label",selectSize:o},i);const d=c()("components-unit-control__select",t);return(0,s.createElement)(Xv,a({className:d,onChange:e=>{const{value:t}=e.target,n=l.find((e=>e.value===t));null==r||r(t,{event:e,data:n})},selectSize:o,tabIndex:n?void 0:-1,value:i},u),l.map((e=>(0,s.createElement)("option",{value:e.value,key:e.value},e.label))))}const M_=(0,s.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",className:o,disabled:i=!1,disableUnits:u=!1,isPressEnterToChange:f=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:h=!0,label:m,onChange:v,onUnitChange:g,size:y="default",style:b,unit:w,units:_=g_,value:x,onBlur:E,...k}=e;"unit"in e&&ze()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const S=null!=x?x:void 0,C=(0,s.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v_;const r=Array.isArray(n)?[...n]:[],[,o]=b_(e,t,v_);return o&&!r.some((e=>e.value===o))&&m_[o]&&r.unshift(m_[o]),r}(S,w,_)),[S,w,_]),[P,O]=b_(S,w,C),[M,I]=Pg(w,{initial:O,fallback:""});(0,s.useEffect)((()=>{void 0!==O&&I(O)}),[O]);const T=(0,s.useRef)(void 0),D=c()("components-unit-control",o),A=e=>{if(!isNaN(Number(e.currentTarget.value)))return void(T.current=void 0);const[t,n]=x_(e.currentTarget.value,C,P,M);if(T.current=t,f&&n!==M){const r={event:e,data:Array.isArray(C)?C.find((e=>e.value===n)):void 0};null==v||v(`${null!=t?t:""}${n}`,r),null==g||g(n,r),I(n)}},R=(e,t)=>{const n={...e};var r;t.type===Mm&&(void 0!==T.current&&(n.value=(null!==(r=T.current)&&void 0!==r?r:"").toString(),T.current=void 0));return n};let N=R;n&&(N=(e,t)=>{const r=R(e,t);return n(r,t)});const L=u?null:(0,s.createElement)(O_,{"aria-label":(0,d.__)("Select unit"),disabled:i,isUnitSelectTabbable:h,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=P?P:""}${e}`;p&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),null==v||v(r,t),null==g||g(e,t),I(e)},size:y,unit:M,units:C,onBlur:E});let F=k.step;if(!F&&C){var j;const e=C.find((e=>e.value===M));F=null!==(j=null==e?void 0:e.step)&&void 0!==j?j:1}return(0,s.createElement)(Wv,{className:"components-unit-control-wrapper",style:b},(0,s.createElement)(Gv,a({"aria-label":m,type:f?"text":"number"},(0,l.omit)(k,["children"]),{autoComplete:r,className:D,disabled:i,disableUnits:u,isPressEnterToChange:f,label:m,onBlur:e=>{A(e),null==E||E(e)},onKeyDown:e=>{const{key:t}=e;"Enter"===t&&A(e)},onChange:(e,t)=>{if(""===e||null==e)return void(null==v||v("",t));const n=x_(e,C,P,M).join("");null==v||v(n,t)},ref:t,size:y,suffix:L,value:null!=P?P:"",step:F,__unstableStateReducer:N})))}));var I_=M_;const T_=e=>{const t=void 0===(null==e?void 0:e.width)||""===e.width,n=void 0===(null==e?void 0:e.color);if(!t||!n)return e};function D_(e){const{className:t,isCompact:n,onChange:r,shouldSanitizeBorder:o=!0,value:i,width:a,...l}=Pn(e,"BorderControl"),[u,c]=__(null==i?void 0:i.width),d=c||"px",f=0===u,[p,h]=(0,s.useState)(),[m,v]=(0,s.useState)(),g=(0,s.useCallback)((e=>{if(o)return r(T_(e));r(e)}),[r,o,T_]),y=(0,s.useCallback)((e=>{const t=""===e?void 0:e,[n]=__(e),r=0===n,o={...i,width:t};r&&!f&&(h(null==i?void 0:i.color),v(null==i?void 0:i.style),o.color=void 0,o.style="none"),!r&&f&&(void 0===o.color&&(o.color=p),"none"===o.style&&(o.style=m)),g(o)}),[i,f,g]),b=(0,s.useCallback)((e=>{y(`${e}${d}`)}),[y,d]),w=Cn(),_=(0,s.useMemo)((()=>w(Jv,t)),[t,w]),x=(0,s.useMemo)((()=>{const e=n?"90px":a,t=!!e&&(e=>Zr("width:",e,";flex:0 0 auto;",""))(e);return w(Zr("border:",$p.borderWidth," solid ",zo.gray[200],";border-radius:2px;flex:1 0 40%;background:#fff;",Wv,"{flex:1;",Mp({marginLeft:0})(),";}",""),t)}),[n,a,w]),E=(0,s.useMemo)((()=>w(Zr("&&& ",Eh,"{border:none;}&&& input{",Mp({paddingRight:0})(),";}",""))),[w]),k=(0,s.useMemo)((()=>w(Zr("flex:1 1 60%;",Mp({marginRight:xp(3)})()," ",cv,"{margin-bottom:0;font-size:0;display:flex;}",""))),[w]);return{...l,className:_,innerWrapperClassName:x,onBorderChange:g,onSliderChange:b,onWidthChange:y,previousStyleSelection:m,sliderClassName:k,value:i,widthControlClassName:E,widthUnit:d,widthValue:u}}const A_=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(Un,{as:"label"},t):(0,s.createElement)(fv,null,t):null},R_=On(((e,t)=>{const{colors:n,disableCustomColors:r,enableAlpha:o,enableStyle:i=!0,hideLabelFromVision:l,innerWrapperClassName:u,label:c,onBorderChange:d,onSliderChange:f,onWidthChange:p,placeholder:h,popoverContentClassName:m,previousStyleSelection:v,showDropdownHeader:g,sliderClassName:y,value:b,widthControlClassName:w,widthUnit:_,widthValue:x,withSlider:E,__experimentalHasMultipleOrigins:k,__experimentalIsRenderedInSidebar:S,...C}=D_(e);return(0,s.createElement)(Wn,a({},C,{ref:t}),(0,s.createElement)(A_,{label:c,hideLabelFromVision:l}),(0,s.createElement)(bg,{spacing:3},(0,s.createElement)(bg,{className:u,alignment:"stretch"},(0,s.createElement)(P_,{border:b,colors:n,contentClassName:m,disableCustomColors:r,enableAlpha:o,enableStyle:i,onChange:d,previousStyleSelection:v,showDropdownHeader:g,__experimentalHasMultipleOrigins:k,__experimentalIsRenderedInSidebar:S}),(0,s.createElement)(I_,{className:w,min:0,onChange:p,value:(null==b?void 0:b.width)||"",placeholder:h})),E&&(0,s.createElement)(ry,{className:y,initialPosition:0,max:100,min:0,onChange:f,step:["px","%"].includes(_)?1:.1,value:x||void 0,withInputField:!1})))}),"BorderControl");var N_=R_;const L_={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function F_(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:l=!1,justify:u,rowGap:c,rows:d,templateColumns:f,templateRows:p,...h}=Pn(e,"Grid"),m=_p(Array.isArray(i)?i:[i]),v=_p(Array.isArray(d)?d:[d]),g=f||!!i&&`repeat( ${m}, 1fr )`,y=p||!!d&&`repeat( ${v}, 1fr )`,b=Cn();return{...h,className:(0,s.useMemo)((()=>{const e=function(e){return e?L_[e]:{}}(n),i=Zr({alignItems:t,display:l?"inline-grid":"grid",gap:`calc( ${$p.gridBase} * ${a} )`,gridTemplateColumns:g||void 0,gridTemplateRows:y||void 0,gridRowGap:c,gridColumnGap:o,justifyContent:u,verticalAlign:l?"middle":void 0,...e},"","");return b(i,r)}),[t,n,r,o,b,a,g,y,l,u,c])}}var j_=On((function(e,t){const n=F_(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"Grid");var B_=On(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:u,popoverClassNames:c,value:f,__experimentalHasMultipleOrigins:p,__experimentalIsRenderedInSidebar:h,...m}=function(e){const{className:t,...n}=Pn(e,"BorderBoxControlSplitControls"),r=Cn(),o=(0,s.useMemo)((()=>r(kv,t)),[t,Mp.watch()]);return{...n,centeredClassName:(0,s.useMemo)((()=>r(Sv,t)),[]),className:o}}(e),v={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,isCompact:!0,__experimentalHasMultipleOrigins:p,__experimentalIsRenderedInSidebar:h};return(0,s.createElement)(j_,a({},m,{ref:t,gap:4}),(0,s.createElement)(Ov,{value:f}),(0,s.createElement)(N_,a({className:n,hideLabelFromVision:!0,label:(0,d.__)("Top border"),onChange:e=>u(e,"top"),popoverContentClassName:null==c?void 0:c.top,value:null==f?void 0:f.top},v)),(0,s.createElement)(N_,a({hideLabelFromVision:!0,label:(0,d.__)("Left border"),onChange:e=>u(e,"left"),popoverContentClassName:null==c?void 0:c.left,value:null==f?void 0:f.left},v)),(0,s.createElement)(N_,a({hideLabelFromVision:!0,label:(0,d.__)("Right border"),onChange:e=>u(e,"right"),popoverContentClassName:null==c?void 0:c.right,value:null==f?void 0:f.right},v)),(0,s.createElement)(N_,a({className:n,hideLabelFromVision:!0,label:(0,d.__)("Bottom border"),onChange:e=>u(e,"bottom"),popoverContentClassName:null==c?void 0:c.bottom,value:null==f?void 0:f.bottom},v)))}),"BorderBoxControlSplitControls");const z_=["top","right","bottom","left"],V_=["color","style","width"],H_=e=>!e||!V_.some((t=>void 0!==e[t])),W_=e=>{if(!e)return!1;if(U_(e)){return!z_.every((t=>H_(e[t])))}return!H_(e)},U_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).some((e=>-1!==z_.indexOf(e)))},$_=e=>{if(!U_(e))return!1;const t=z_.map((t=>K_(null==e?void 0:e[t])));return!t.every((e=>e===t[0]))},K_=(e,t)=>{if(H_(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:a=r,width:s=o}=e;return[s,!!s&&"0"!==s||!!i?a||"solid":a,i].filter(Boolean).join(" ")};function G_(e){const{className:t,onChange:n,value:r,...o}=Pn(e,"BorderBoxControl"),i=$_(r),a=U_(r),l=a?(e=>{if(!e)return;const t=[],n=[],r=[];z_.forEach((o=>{var i,a,s;t.push(null===(i=e[o])||void 0===i?void 0:i.color),n.push(null===(a=e[o])||void 0===a?void 0:a.style),r.push(null===(s=e[o])||void 0===s?void 0:s.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),a=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:a?r[0]:void 0}})(r):r,u=a?r:(e=>{if(e&&!H_(e))return{top:e,right:e,bottom:e,left:e}})(r),[c,d]=(0,s.useState)(!i),f=Cn(),p=(0,s.useMemo)((()=>f(wv,t)),[t]),h=(0,s.useMemo)((()=>f(_v)),[]);return{...o,className:p,hasMixedBorders:i,isLinked:c,linkedControlClassName:h,onLinkedChange:e=>{if(!e)return n(void 0);if(!i||(t=e)&&V_.every((e=>void 0!==t[e])))return n(H_(e)?void 0:e);var t;const o=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(l,e),a={top:{...null==r?void 0:r.top,...o},right:{...null==r?void 0:r.right,...o},bottom:{...null==r?void 0:r.bottom,...o},left:{...null==r?void 0:r.left,...o}};if($_(a))return n(a);const s=H_(a.top)?void 0:a.top;n(s)},onSplitChange:(e,t)=>{const r={...u,[t]:e};$_(r)?n(r):n(e)},toggleLinked:()=>d(!c),linkedValue:l,splitValue:u}}const q_=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(Un,{as:"label"},t):(0,s.createElement)(fv,null,t):null},Y_=On(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,hasMixedBorders:u,hideLabelFromVision:c,isLinked:f,label:p,linkedControlClassName:h,linkedValue:m,onLinkedChange:v,onSplitChange:g,popoverClassNames:y,splitValue:b,toggleLinked:w,__experimentalHasMultipleOrigins:_,__experimentalIsRenderedInSidebar:x,...E}=G_(e);return(0,s.createElement)(Wn,a({className:n},E,{ref:t}),(0,s.createElement)(q_,{label:p,hideLabelFromVision:c}),(0,s.createElement)(bg,{alignment:"start",expanded:!0,spacing:0},f?(0,s.createElement)(N_,{className:h,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:v,placeholder:u?(0,d.__)("Mixed"):void 0,popoverContentClassName:null==y?void 0:y.linked,shouldSanitizeBorder:!1,value:m,withSlider:!0,width:"110px",__experimentalHasMultipleOrigins:_,__experimentalIsRenderedInSidebar:x}):(0,s.createElement)(B_,{colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:g,popoverClassNames:y,value:b,__experimentalHasMultipleOrigins:_,__experimentalIsRenderedInSidebar:x}),(0,s.createElement)(Cv,{onClick:w,isLinked:f})))}),"BorderBoxControl");var X_=Y_;const Z_=Vn("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),J_=Vn(Tp,{target:"e7pk0lh5"})("color:",zo.ui.label,";margin-bottom:8px;"),Q_=Vn(Tp,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),ex=Vn("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),tx=Vn(Tp,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),nx=Vn(Tp,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var rx={name:"1ch9yvl",styles:"border-radius:0"},ox={name:"tg3mx0",styles:"border-radius:2px"};const ix=e=>{let{isFirst:t,isLast:n,isOnly:r}=e;return t?Mp({borderTopRightRadius:0,borderBottomRightRadius:0})():n?Mp({borderTopLeftRadius:0,borderBottomLeftRadius:0})():r?ox:rx},ax=e=>{let{isFirst:t,isOnly:n}=e;return Mp({marginLeft:t||n?0:-1})()},sx=Vn(I_,{target:"e7pk0lh0"})("max-width:60px;",ix,";",ax,";");function lx(e){let{isFirst:t,isLast:n,isOnly:r,onHoverOn:o=l.noop,onHoverOff:i=l.noop,label:u,value:c,...d}=e;const f=(p=e=>{let{event:t,...n}=e;n.hovering?o(t,n):i(t,n)},pm(mm),Sm({hover:p},h||{},"hover"));var p,h;return(0,s.createElement)(ex,f(),(0,s.createElement)(ux,{text:u},(0,s.createElement)(sx,a({"aria-label":u,className:"component-box-control__unit-control",hideHTMLArrows:!0,isFirst:t,isLast:n,isOnly:r,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:c},d))))}function ux(e){let{children:t,text:n}=e;return n?(0,s.createElement)($r,{text:n,position:"top"},(0,s.createElement)("div",null,t)):t}const cx={all:(0,d.__)("All"),top:(0,d.__)("Top"),bottom:(0,d.__)("Bottom"),left:(0,d.__)("Left"),right:(0,d.__)("Right"),mixed:(0,d.__)("Mixed"),vertical:(0,d.__)("Vertical"),horizontal:(0,d.__)("Horizontal")},dx={top:void 0,right:void 0,bottom:void 0,left:void 0},fx={top:!1,right:!1,bottom:!1,left:!1},px=["top","right","bottom","left"];function hx(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function mx(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:px;const r=wx(n),o=r.map((t=>__(e[t]))),i=o.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),a=o.map((e=>e[1])),s=i.every((e=>e===i[0]))?i[0]:"";let u;var c;(0,l.isNumber)(s)?u=hx(a):u=null!==(c=vx(t))&&void 0!==c?c:hx(a);return[s,u].join("")}function vx(e){if(!e||"object"!=typeof e)return;return hx(Object.values(e).filter(Boolean))}function gx(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:px;const r=mx(e,t,n),o=isNaN(parseFloat(r));return o}function yx(e){return void 0!==e&&!(0,l.isEmpty)(Object.values(e).filter((e=>!!e&&/\d/.test(e))))}function bx(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function wx(e){const t=[];if(null==e||!e.length)return px;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=px.filter((t=>e.includes(t)));t.push(...n)}return t}function _x(e){let{onChange:t=l.noop,onFocus:n=l.noop,onHoverOn:r=l.noop,onHoverOff:o=l.noop,values:i,sides:u,selectedUnits:c,setSelectedUnits:d,...f}=e;const p=mx(i,c,u),h=yx(i)&&gx(i,c,u),m=h?cx.mixed:null,v=(e,t)=>{const n={...e};return null!=u&&u.length?u.forEach((e=>{"vertical"===e?(n.top=t,n.bottom=t):"horizontal"===e?(n.left=t,n.right=t):n[e]=t})):px.forEach((e=>n[e]=t)),n};return(0,s.createElement)(lx,a({},f,{disableUnits:h,isOnly:!0,value:p,onChange:e=>{const n=!isNaN(parseFloat(e)),r=v(i,n?e:void 0);t(r)},onUnitChange:e=>{const t=v(c,e);d(t)},onFocus:e=>{n(e,{side:"all"})},onHoverOn:()=>{r({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{o({top:!1,bottom:!1,left:!1,right:!1})},placeholder:m}))}function xx(e){let{onChange:t=l.noop,onFocus:n=l.noop,onHoverOn:r=l.noop,onHoverOff:o=l.noop,values:i,selectedUnits:u,setSelectedUnits:c,sides:d,...f}=e;const p=e=>t=>{n(t,{side:e})},h=e=>()=>{r({[e]:!0})},m=e=>()=>{o({[e]:!1})},v=e=>(n,r)=>{let{event:o}=r;const{altKey:a}=o,s={...i},l=!isNaN(parseFloat(n))?n:void 0;if(s[e]=l,a)switch(e){case"top":s.bottom=l;break;case"bottom":s.top=l;break;case"left":s.right=l;break;case"right":s.left=l}(e=>{t(e)})(s)},g=e=>t=>{const n={...u};n[e]=t,c(n)},y=null!=d&&d.length?px.filter((e=>d.includes(e))):px,b=y[0],w=y[y.length-1],_=b===w&&b;return(0,s.createElement)(tx,{className:"component-box-control__input-controls-wrapper"},(0,s.createElement)(nx,{gap:0,align:"top",className:"component-box-control__input-controls"},y.map((e=>{const[t,n]=__(i[e]),r=i[e]?n:u[e];return(0,s.createElement)(lx,a({},f,{isFirst:b===e,isLast:w===e,isOnly:_===e,value:[t,r].join(""),onChange:v(e),onUnitChange:g(e),onFocus:p(e),onHoverOn:h(e),onHoverOff:m(e),label:cx[e],key:`box-control-${e}`}))}))))}const Ex=["vertical","horizontal"];function kx(e){let{onChange:t,onFocus:n,onHoverOn:r,onHoverOff:o,values:i,selectedUnits:l,setSelectedUnits:u,sides:c,...d}=e;const f=e=>t=>{n&&n(t,{side:e})},p=e=>()=>{r&&("vertical"===e&&r({top:!0,bottom:!0}),"horizontal"===e&&r({left:!0,right:!0}))},h=e=>()=>{o&&("vertical"===e&&o({top:!1,bottom:!1}),"horizontal"===e&&o({left:!1,right:!1}))},m=e=>n=>{if(!t)return;const r={...i},o=!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},v=e=>t=>{const n={...l};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),u(n)},g=null!=c&&c.length?Ex.filter((e=>c.includes(e))):Ex,y=g[0],b=g[g.length-1],w=y===b;return(0,s.createElement)(nx,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},g.map((e=>{const[t,n]=__("vertical"===e?i.top:i.left),r="vertical"===e?l.top:l.left;return(0,s.createElement)(lx,a({},d,{isFirst:y===e,isLast:b===e,isOnly:w===e,value:[t,null!=r?r:n].join(""),onChange:m(e),onUnitChange:v(e),onFocus:f(e),onHoverOn:p(e),onHoverOff:h(e),label:cx[e],key:e}))})))}const Sx=Vn("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),Cx=Vn("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),Px=Vn("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(e=>{let{isFocused:t}=e;return Zr({backgroundColor:"currentColor",opacity:t?1:.3},"","")}),";"),Ox=Vn(Px,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),Mx=Vn(Px,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),Ix=Vn(Mx,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),Tx=Vn(Ox,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),Dx=Vn(Mx,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),Ax=Vn(Ox,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"});function Rx(e){let{size:t=24,side:n="all",sides:r,...o}=e;const i=e=>!(e=>(null==r?void 0:r.length)&&!r.includes(e))(e)&&("all"===n||n===e),l=i("top")||i("vertical"),u=i("right")||i("horizontal"),c=i("bottom")||i("vertical"),d=i("left")||i("horizontal"),f=t/24;return(0,s.createElement)(Sx,a({style:{transform:`scale(${f})`}},o),(0,s.createElement)(Cx,null,(0,s.createElement)(Ix,{isFocused:l}),(0,s.createElement)(Tx,{isFocused:u}),(0,s.createElement)(Dx,{isFocused:c}),(0,s.createElement)(Ax,{isFocused:d})))}function Nx(e){let{isLinked:t,...n}=e;const r=t?(0,d.__)("Unlink Sides"):(0,d.__)("Link Sides");return(0,s.createElement)($r,{text:r},(0,s.createElement)("span",null,(0,s.createElement)(Kn,a({},n,{className:"component-box-control__linked-button",variant:t?"primary":"secondary",isSmall:!0,icon:t?yv:bv,iconSize:16,"aria-label":r}))))}var Lx={name:"11f5o9n",styles:"bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1"};const Fx=Vn("div",{target:"e1df9b4q5"})("box-sizing:border-box;position:relative;",(e=>{let{isPositionAbsolute:t}=e;return t?Lx:""}),";"),jx=Vn("div",{target:"e1df9b4q4"})("box-sizing:border-box;background:",zo.blue.wordpress[700],";background:",zo.ui.theme,";filter:brightness( 1 );opacity:0;position:absolute;pointer-events:none;transition:opacity 120ms linear;z-index:1;",(e=>{let{isActive:t}=e;return t&&"\n\t\topacity: 0.3;\n\t"}),";"),Bx=Vn(jx,{target:"e1df9b4q3"})({name:"5i97ct",styles:"top:0;left:0;right:0"}),zx=Vn(jx,{target:"e1df9b4q2"})("top:0;bottom:0;",Mp({right:0}),";"),Vx=Vn(jx,{target:"e1df9b4q1"})({name:"8cxke2",styles:"bottom:0;left:0;right:0"}),Hx=Vn(jx,{target:"e1df9b4q0"})("top:0;bottom:0;",Mp({left:0}),";");function Wx(e){let{showValues:t=fx,values:n}=e;const{top:r,right:o,bottom:i,left:a}=n;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ux,{isVisible:t.top,value:r}),(0,s.createElement)($x,{isVisible:t.right,value:o}),(0,s.createElement)(Kx,{isVisible:t.bottom,value:i}),(0,s.createElement)(Gx,{isVisible:t.left,value:a}))}function Ux(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(Bx,{isActive:o,style:{height:r}})}function $x(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(zx,{isActive:o,style:{width:r}})}function Kx(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(Vx,{isActive:o,style:{height:r}})}function Gx(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(Hx,{isActive:o,style:{width:r}})}function qx(e){const[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(e),o=(0,s.useRef)(),i=()=>{o.current&&window.clearTimeout(o.current)};return(0,s.useEffect)((()=>(e!==r.current&&(n(!0),r.current=e,i(),o.current=setTimeout((()=>{n(!1)}),400)),()=>i())),[e]),{isActive:t}}const Yx={min:0};function Xx(e){let{id:t,inputProps:n=Yx,onChange:r=l.noop,onChangeShowVisualizer:o=l.noop,label:i=(0,d.__)("Box Control"),values:u,units:c,sides:p,splitOnAxis:h=!1,allowReset:m=!0,resetValues:v=dx}=e;const[g,y]=Pg(u,{fallback:dx}),b=g||dx,w=yx(u),_=1===(null==p?void 0:p.length),[x,E]=(0,s.useState)(w),[k,S]=(0,s.useState)(!w||!gx(b)||_),[C,P]=(0,s.useState)(bx(k,h)),[O,M]=(0,s.useState)({top:__(null==u?void 0:u.top)[1],right:__(null==u?void 0:u.right)[1],bottom:__(null==u?void 0:u.bottom)[1],left:__(null==u?void 0:u.left)[1]}),I=function(e){const t=(0,f.useInstanceId)(Xx,"inspector-box-control");return e||t}(t),T=`${I}-heading`,D={...n,onChange:e=>{r(e),y(e),E(!0)},onFocus:(e,t)=>{let{side:n}=t;P(n)},onHoverOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o({...fx,...e})},onHoverOff:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o({...fx,...e})},isLinked:k,units:c,selectedUnits:O,setSelectedUnits:M,sides:p,values:b};return(0,s.createElement)(Z_,{id:I,role:"region","aria-labelledby":T},(0,s.createElement)(J_,{className:"component-box-control__header"},(0,s.createElement)(yp,null,(0,s.createElement)(sh,{id:T,className:"component-box-control__label"},i)),m&&(0,s.createElement)(yp,null,(0,s.createElement)(Kn,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{r(v),y(v),M(v),E(!1)},disabled:!x},(0,d.__)("Reset")))),(0,s.createElement)(Q_,{className:"component-box-control__header-control-wrapper"},(0,s.createElement)(yp,null,(0,s.createElement)(Rx,{side:C,sides:p})),k&&(0,s.createElement)(gp,null,(0,s.createElement)(_x,a({"aria-label":i},D))),!k&&h&&(0,s.createElement)(gp,null,(0,s.createElement)(kx,D)),!_&&(0,s.createElement)(yp,null,(0,s.createElement)(Nx,{onClick:()=>{S(!k),P(bx(!k,h))},isLinked:k}))),!k&&!h&&(0,s.createElement)(xx,D))}Xx.__Visualizer=function(e){let{children:t,showValues:n=fx,values:r=dx,...o}=e;const i=!t;return(0,s.createElement)(Fx,a({},o,{isPositionAbsolute:i,"aria-hidden":"true"}),(0,s.createElement)(Wx,{showValues:n,values:r}),t)};var Zx=(0,s.forwardRef)((function(e,t){let{className:n,...r}=e;const o=c()("components-button-group",n);return(0,s.createElement)("div",a({ref:t,role:"group",className:o},r))}));const Jx={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function Qx(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0 ,0, 0, ${e/20})`}`}const eE=On((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:a=!1,offset:u=0,value:c=0,...d}=Pn(e,"Elevation"),f=Cn();return{...d,className:(0,s.useMemo)((()=>{let e=(0,l.isNil)(i)?2*c:i,s=(0,l.isNil)(t)?c/2:t;a||(e=(0,l.isNil)(i)?void 0:i,s=(0,l.isNil)(t)?void 0:t);const d=`box-shadow ${$p.transitionDuration} ${$p.transitionTimingFunction}`,p={};return p.Base=Zr({borderRadius:n,bottom:u,boxShadow:Qx(c),opacity:$p.elevationIntensity,left:u,right:u,top:u,transition:d},Vo("transition"),"",""),(0,l.isNil)(e)||(p.hover=Zr("*:hover>&{box-shadow:",Qx(e),";}","")),(0,l.isNil)(s)||(p.active=Zr("*:active>&{box-shadow:",Qx(s),";}","")),(0,l.isNil)(o)||(p.focus=Zr("*:focus>&{box-shadow:",Qx(o),";}","")),f(Jx,p.Base,p.hover&&p.hover,p.focus&&p.focus,p.active&&p.active,r)}),[t,n,r,f,o,i,a,u,c]),"aria-hidden":!0}}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"Elevation");var tE=eE;const nE=`calc(${$p.cardBorderRadius} - 1px)`,rE=Zr("box-shadow:0 0 0 1px ",$p.surfaceBorderColor,";outline:none;",""),oE={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},iE={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},aE={name:"13udsys",styles:"height:100%"},sE={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},lE={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},uE={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},cE=Zr("&:first-of-type{border-top-left-radius:",nE,";border-top-right-radius:",nE,";}&:last-of-type{border-bottom-left-radius:",nE,";border-bottom-right-radius:",nE,";}",""),dE=Zr("border-color:",$p.colorDivider,";",""),fE={name:"1t90u8d",styles:"box-shadow:none"},pE={name:"1e1ncky",styles:"border:none"},hE=Zr("border-radius:",nE,";",""),mE=Zr("padding:",$p.cardPaddingXSmall,";",""),vE={large:Zr("padding:",$p.cardPaddingLarge,";",""),medium:Zr("padding:",$p.cardPaddingMedium,";",""),small:Zr("padding:",$p.cardPaddingSmall,";",""),xSmall:mE,extraSmall:mE},gE=Zr("background-color:",zo.lightGray[200],";",""),yE=Zr("background-color:",$p.surfaceColor,";color:",zo.darkGray.primary,";position:relative;","");$p.surfaceBackgroundColor;const bE=Zr("",""),wE=Zr("background:",$p.surfaceBackgroundTintColor,";",""),_E=Zr("background:",$p.surfaceBackgroundTertiaryColor,";",""),xE=e=>[e,e].join(" "),EE=e=>["90deg",[$p.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),kE=e=>[[$p.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),SE=(e,t)=>Zr("background:",(e=>[`linear-gradient( ${EE(e)} ) center`,`linear-gradient( ${kE(e)} ) center`,$p.surfaceBorderBoldColor].join(","))(t),";background-size:",xE(e),";",""),CE=[`linear-gradient( ${[`${$p.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${$p.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),PE=(e,t,n)=>{switch(e){case"dotted":return SE(t,n);case"grid":return(e=>Zr("background:",$p.surfaceBackgroundColor,";background-image:",CE,";background-size:",xE(e),";",""))(t);case"primary":return bE;case"secondary":return wE;case"tertiary":return _E}};function OE(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:a,variant:l="primary",...u}=Pn(e,"Surface"),c=Cn(),d=(0,s.useMemo)((()=>{const e={};return e.borders=function(e){let{borderBottom:t,borderLeft:n,borderRight:r,borderTop:o}=e;const i=`1px solid ${$p.surfaceBorderColor}`;return Zr({borderBottom:t?i:void 0,borderLeft:n?i:void 0,borderRight:r?i:void 0,borderTop:o?i:void 0},"","")}({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i}),c(yE,e.borders,PE(l,`${t}px`,t-1+"px"),a)}),[t,n,r,o,i,a,c,l]);return{...u,className:d}}function ME(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...a}=Pn(function(e){let{elevation:t,isElevated:n,...r}=e;const o={...r};let i=t;var a;return n&&(ze()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(a=i)&&void 0!==a||(i=2)),void 0!==i&&(o.elevation=i),o}(e),"Card"),l=Cn();return{...OE({...a,className:(0,s.useMemo)((()=>l(rE,r&&fE,o&&hE,t)),[t,l,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}var IE=On((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:l,...u}=ME(e),c=i?$p.cardBorderRadius:0,d=Cn(),f=(0,s.useMemo)((()=>d(Zr({borderRadius:c},"",""))),[d,c]),p=(0,s.useMemo)((()=>{const e={size:l,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,l]);return(0,s.createElement)(Ke,{value:p},(0,s.createElement)(Wn,a({},u,{ref:t}),(0,s.createElement)(Wn,{className:d(aE)},n),(0,s.createElement)(tE,{className:f,isInteractive:!1,value:r?1:0}),(0,s.createElement)(tE,{className:f,isInteractive:!1,value:r})))}),"Card");const TE=Zr("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",$p.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",$p.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",$p.colorScrollbarThumbHover,";}}",""),DE={name:"13udsys",styles:"height:100%"},AE={name:"7zq9w",styles:"scroll-behavior:smooth"},RE={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},NE={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},LE={name:"umwchj",styles:"overflow-y:auto"};var FE=On((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=Pn(e,"Scrollable"),i=Cn();return{...o,className:(0,s.useMemo)((()=>i(DE,TE,r&&AE,"x"===n&&RE,"y"===n&&NE,"auto"===n&&LE,t)),[t,i,n,r])}}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"Scrollable");var jE=On((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=Pn(e,"CardBody"),a=Cn();return{...i,className:(0,s.useMemo)((()=>a(sE,cE,vE[o],r&&gE,"components-card__body",t)),[t,a,r,o]),isScrollable:n}}(e);return n?(0,s.createElement)(FE,a({},r,{ref:t})):(0,s.createElement)(Wn,a({},r,{ref:t}))}),"CardBody"),BE=V({name:"Separator",compose:ue,keys:["orientation"],useOptions:function(e){var t=e.orientation;return m({orientation:void 0===t?"horizontal":t},v(e,["orientation"]))},useProps:function(e,t){return m({role:"separator","aria-orientation":e.orientation},t)}}),zE=B({as:"hr",memo:!0,useHook:BE});const VE={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var HE={name:"1u4hpl4",styles:"display:inline"};const WE=Vn("hr",{target:"e19on6iw0"})("border:0;margin:0;",(e=>{let{"aria-orientation":t="horizontal"}=e;return"vertical"===t?HE:void 0})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return Zr({["vertical"===t?"borderRight":"borderBottom"]:"1px solid currentColor"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return Zr({height:"vertical"===t?"auto":0,width:"vertical"===t?0:"auto"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal",margin:n,marginStart:r,marginEnd:o}=e;return Zr(Mp({[VE[t].start]:xp(null!=r?r:n),[VE[t].end]:xp(null!=o?o:n)})(),"","")}),";");var UE=On((function(e,t){const n=Pn(e,"Divider");return(0,s.createElement)(zE,a({as:WE},n,{ref:t}))}),"Divider");var $E=On((function(e,t){const n=function(e){const{className:t,...n}=Pn(e,"CardDivider"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(uE,dE,"components-card__divider",t)),[t,r])}}(e);return(0,s.createElement)(UE,a({},n,{ref:t}))}),"CardDivider");var KE=On((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...a}=Pn(e,"CardFooter"),l=Cn();return{...a,className:(0,s.useMemo)((()=>l(iE,cE,dE,vE[i],r&&pE,o&&gE,"components-card__footer",t)),[t,l,r,o,i]),justify:n}}(e);return(0,s.createElement)(Tp,a({},n,{ref:t}))}),"CardFooter");var GE=On((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=Pn(e,"CardHeader"),a=Cn();return{...i,className:(0,s.useMemo)((()=>a(oE,cE,dE,vE[o],n&&pE,r&&gE,"components-card__header",t)),[t,a,n,r,o])}}(e);return(0,s.createElement)(Tp,a({},n,{ref:t}))}),"CardHeader");var qE=On((function(e,t){const n=function(e){const{className:t,...n}=Pn(e,"CardMedia"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(lE,cE,"components-card__media",t)),[t,r])}}(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"CardMedia");var YE=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M7 11.5h10V13H7z"}));function XE(e){let{label:t,className:n,heading:r,checked:o,indeterminate:i,help:l,onChange:u,...d}=e;r&&ze()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[p,h]=(0,s.useState)(!1),[m,v]=(0,s.useState)(!1),g=(0,f.useRefEffect)((e=>{e&&(e.indeterminate=!!i,h(e.matches(":checked")),v(e.matches(":indeterminate")))}),[o,i]),y=`inspector-checkbox-control-${(0,f.useInstanceId)(XE)}`;return(0,s.createElement)(gv,{label:r,id:y,help:l,className:c()("components-checkbox-control",n)},(0,s.createElement)("span",{className:"components-checkbox-control__input-container"},(0,s.createElement)("input",a({ref:g,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>u(e.target.checked),checked:o,"aria-describedby":l?y+"__help":void 0},d)),m?(0,s.createElement)(wg,{icon:YE,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,p?(0,s.createElement)(wg,{icon:o_,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,s.createElement)("label",{className:"components-checkbox-control__label",htmlFor:y},t))}function ZE(e){let{className:t,children:n,onCopy:r,onFinishCopy:o,text:i,...l}=e;ze()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const u=(0,s.useRef)(),d=(0,f.useCopyToClipboard)(i,(()=>{r(),clearTimeout(u.current),o&&(u.current=setTimeout((()=>o()),4e3))}));(0,s.useEffect)((()=>{clearTimeout(u.current)}),[]);const p=c()("components-clipboard-button",t);return(0,s.createElement)(Kn,a({},l,{className:p,ref:d,onCopy:e=>{e.target.focus()}}),n)}var JE=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));var QE=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const ek=Zr("appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:left;&:hover{color:",zo.admin.theme,";}&:focus{background-color:transparent;color:",zo.admin.theme,";border-color:",zo.admin.theme,";outline:3px solid transparent;}",""),tk={name:"1bcj5ek",styles:"width:100%;display:block"},nk={name:"a5hqs6",styles:"width:100%;display:block;margin:0;color:inherit"},rk=Zr("border:1px solid ",$p.surfaceBorderColor,";",""),ok=Zr(">*:not( marquee )>*{border-bottom:1px solid ",$p.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),ik=$p.controlBorderRadius,ak=Zr("border-radius:",ik,";",""),sk=Zr("border-radius:",ik,";>*:first-of-type>*{border-top-left-radius:",ik,";border-top-right-radius:",ik,";}>*:last-of-type>*{border-bottom-left-radius:",ik,";border-bottom-right-radius:",ik,";}",""),lk=`calc(${$p.fontSize} * ${$p.fontLineHeightBase})`,uk=`calc((${$p.controlHeight} - ${lk} - 2px) / 2)`,ck=`calc((${$p.controlHeightSmall} - ${lk} - 2px) / 2)`,dk=`calc((${$p.controlHeightLarge} - ${lk} - 2px) / 2)`,fk={small:Zr("padding:",ck," ",$p.controlPaddingXSmall,";",""),medium:Zr("padding:",uk," ",$p.controlPaddingX,";",""),large:Zr("padding:",dk," ",$p.controlPaddingXLarge,";","")};const pk=(0,s.createContext)({size:"medium"}),hk=()=>(0,s.useContext)(pk);var mk=On((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...a}=Pn(e,"ItemGroup");return{isBordered:n,className:Cn()(n&&rk,o&&ok,r&&sk,t),role:i,isSeparated:o,...a}}(e),{size:l}=hk(),u={spacedAround:!n&&!r,size:o||l};return(0,s.createElement)(pk.Provider,{value:u},(0,s.createElement)(Wn,a({},i,{ref:t})))}),"ItemGroup");function vk(e){return Math.max(0,Math.min(100,e))}function gk(e,t,n){const r=e.slice();return r[t]=n,r}function yk(e,t,n){if(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some(((e,o)=>{let{position:s}=e;return o!==t&&(Math.abs(s-n){const e={className:"components-custom-gradient-picker__color-picker-popover",position:"top"};return t&&(e.anchorRef=n.current,e.position="bottom left"),e}),[n.current,t]);return(0,s.createElement)(f_,a({isRenderedInSidebar:t,popoverProps:o},r))}function Ek(e){let{disableRemove:t,disableAlpha:n,gradientPickerDomRef:r,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:l,onStopControlPointChange:u,__experimentalIsRenderedInSidebar:c}=e;const f=(0,s.useRef)(),p=e=>{const t=wk(e.clientX,r.current,16),{initialPosition:n,index:o,significantMoveHappened:s}=f.current;!s&&Math.abs(n-t)>=5&&(f.current.significantMoveHappened=!0),a(yk(i,o,t))},h=()=>{window&&window.removeEventListener&&f.current&&f.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",h),u(),f.current.listenersActivated=!1)};return(0,s.useEffect)((()=>()=>{h()}),[]),i.map(((e,m)=>{const v=null==e?void 0:e.position;return o!==v&&(0,s.createElement)(xk,{gradientPickerDomRef:r,isRenderedInSidebar:c,key:m,onClose:u,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,s.createElement)(_k,{key:m,onClick:()=>{f.current&&f.current.significantMoveHappened||(n?u():l(),r())},onMouseDown:()=>{window&&window.addEventListener&&(f.current={initialPosition:v,index:m,significantMoveHappened:!1,listenersActivated:!0},l(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",h))},onKeyDown:t=>{t.keyCode===ev.LEFT?(t.stopPropagation(),a(yk(i,m,vk(e.position-10)))):t.keyCode===ev.RIGHT&&(t.stopPropagation(),a(yk(i,m,vk(e.position+10))))},isOpen:n,position:e.position,color:e.color})},renderContent:r=>{let{onClose:o}=r;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(r_,{enableAlpha:!n,color:e.color,onChange:e=>{a(bk(i,m,So(e).toRgbString()))}}),!t&&i.length>2&&(0,s.createElement)(Kn,{className:"components-custom-gradient-picker__remove-control-point",onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,m)),o()},variant:"link"},(0,d.__)("Remove Control Point")))}})}))}Ek.InsertPoint=function(e){let{value:t,onChange:n,onOpenInserter:r,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:l,gradientPickerDomRef:u}=e;const[c,d]=(0,s.useState)(!1);return(0,s.createElement)(xk,{gradientPickerDomRef:u,isRenderedInSidebar:l,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Kn,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?o():(d(!1),r()),n()},className:"components-custom-gradient-picker__insert-point",icon:JE,style:{left:null!==i?`${i}%`:void 0}})},renderContent:()=>(0,s.createElement)(r_,{enableAlpha:!a,onChange:e=>{c?n(function(e,t,n){const r=e.findIndex((e=>e.position===t));return bk(e,r,n)}(t,i,So(e).toRgbString())):(n(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(t,i,So(e).toRgbString())),d(!0))}})})};var kk=Ek;function Sk(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const Ck={id:"IDLE"};function Pk(e){let{background:t,hasGradient:n,value:r,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:u}=e;const d=(0,s.useRef)(),[f,p]=(0,s.useReducer)(Sk,Ck),h=e=>{const t=wk(e.clientX,d.current,16);(0,l.some)(r,(e=>{let{position:n}=e;return Math.abs(t-n)<10}))?"MOVING_INSERTER"===f.id&&p({type:"STOP_INSERTER_MOVE"}):p({type:"MOVE_INSERTER",insertPosition:t})},m="MOVING_INSERTER"===f.id,v="INSERTING_CONTROL_POINT"===f.id;return(0,s.createElement)("div",{ref:d,className:c()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:h,onMouseMove:h,style:{background:t},onMouseLeave:()=>{p({type:"STOP_INSERTER_MOVE"})}},(0,s.createElement)("div",{className:"components-custom-gradient-picker__markers-container"},!i&&(m||v)&&(0,s.createElement)(kk.InsertPoint,{__experimentalIsRenderedInSidebar:u,gradientPickerDomRef:d,disableAlpha:a,insertPosition:f.insertPosition,value:r,onChange:o,onOpenInserter:()=>{p({type:"OPEN_INSERTER"})},onCloseInserter:()=>{p({type:"CLOSE_INSERTER"})}}),(0,s.createElement)(kk,{__experimentalIsRenderedInSidebar:u,disableAlpha:a,disableRemove:i,gradientPickerDomRef:d,ignoreMarkerPosition:v?f.insertPosition:void 0,value:r,onChange:o,onStartControlPointChange:()=>{p({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{p({type:"STOP_CONTROL_CHANGE"})}})))}var Ok=n(7115);const Mk="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",Ik={type:"angular",value:90},Tk=[{value:"linear-gradient",label:(0,d.__)("Linear")},{value:"radial-gradient",label:(0,d.__)("Radial")}],Dk={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function Ak(e){let{type:t,value:n,length:r}=e;return`${function(e){let{type:t,value:n}=e;return"literal"===t?n:"hex"===t?`#${n}`:`${t}(${n.join(",")})`}({type:t,value:n})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(r)}`}function Rk(e){let{type:t,orientation:n,colorStops:r}=e;const o=function(e){if(e&&"angular"===e.type)return`${e.value}deg`}(n),i=r.sort(((e,t)=>(0,l.get)(e,["length","value"],0)-(0,l.get)(t,["length","value"],0))).map(Ak);return`${t}(${(0,l.compact)([o,...i]).join(",")})`}function Nk(e){return void 0===e.length||"%"!==e.length.type}function Lk(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Po([Oo]);const Fk=Vn(gp,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),jk=Vn(gp,{target:"e99xvul0"})({name:"1gvx10y",styles:"flex-grow:5"}),Bk=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const o=(0,l.get)(t,["orientation","value"],180);return(0,s.createElement)(Qm,{onChange:e=>{r(Rk({...t,orientation:{type:"angular",value:e}}))},labelPosition:"top",value:n?o:""})},zk=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const{type:o}=t;return(0,s.createElement)(Sg,{className:"components-custom-gradient-picker__type-picker",label:(0,d.__)("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&r(Rk({...t,...t.orientation?{}:{orientation:Ik},type:"linear-gradient"})),"radial-gradient"===e&&r(Rk({...(0,l.omit)(t,["orientation"]),type:"radial-gradient"}))},options:Tk,size:"__unstable-large",value:n&&o})};function Vk(e){let{value:t,onChange:n,__experimentalIsRenderedInSidebar:r}=e;const o=function(e){var t;let n;try{n=Ok.parse(e)[0],n.value=e}catch(e){n=Ok.parse(Mk)[0],n.value=Mk}if("directional"===(null===(t=n.orientation)||void 0===t?void 0:t.type)&&(n.orientation.type="angular",n.orientation.value=Dk[n.orientation.value].toString()),n.colorStops.some(Nk)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:t*n,type:"%"}})),n.value=Rk(n)}return n}(t),i=function(e){return Rk({type:"linear-gradient",orientation:Ik,colorStops:e.colorStops})}(o),a=o.value!==Mk,l=o.colorStops.map((e=>({color:Lk(e),position:parseInt(e.length.value)})));return(0,s.createElement)("div",{className:"components-custom-gradient-picker"},(0,s.createElement)(Pk,{__experimentalIsRenderedInSidebar:r,background:i,hasGradient:a,value:l,onChange:e=>{n(Rk(function(e,t){return{...e,colorStops:t.map((e=>{let{position:t,color:n}=e;const{r:r,g:o,b:i,a:a}=So(n).toRgb();return{length:{type:"%",value:t.toString()},type:a<1?"rgba":"rgb",value:a<1?[r,o,i,a]:[r,o,i]}}))}}(o,e)))}}),(0,s.createElement)(Tp,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,s.createElement)(Fk,null,(0,s.createElement)(zk,{gradientAST:o,hasGradient:a,onChange:n})),(0,s.createElement)(jk,null,"linear-gradient"===o.type&&(0,s.createElement)(Bk,{gradientAST:o,hasGradient:a,onChange:n}))))}function Hk(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:a,content:u}=e;const c=(0,s.useMemo)((()=>(0,l.map)(r,(e=>{let{gradient:t,name:r}=e;return(0,s.createElement)(i_.Option,{key:t,value:t,isSelected:i===t,tooltipText:r||(0,d.sprintf)((0,d.__)("Gradient code: %s"),t),style:{color:"rgba( 0,0,0,0 )",background:t},onClick:i===t?n:()=>o(t),"aria-label":r?(0,d.sprintf)((0,d.__)("Gradient: %s"),r):(0,d.sprintf)((0,d.__)("Gradient code: %s"),t)})}))),[r,i,o,n]);return(0,s.createElement)(i_,{className:t,options:c,actions:a},u)}function Wk(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:l,content:u}=e;return(0,s.createElement)(a_,{spacing:3,className:t},r.map(((e,t)=>{let{name:c,gradients:d}=e;return(0,s.createElement)(a_,{spacing:2,key:t},(0,s.createElement)(u_,null,c),(0,s.createElement)(Hk,a({clearGradient:n,gradients:d,onChange:o,value:i},r.length===t+1?{actions:l,content:u}:{})))})))}function Uk(e){let{className:t,gradients:n,onChange:r,value:o,clearable:i=!0,disableCustomGradients:a=!1,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:u}=e;const c=(0,s.useCallback)((()=>r(void 0)),[r]),f=l&&null!=n&&n.length?Wk:Hk;return(0,s.createElement)(f,{className:t,clearable:i,clearGradient:c,gradients:n,onChange:r,value:o,actions:i&&((null==n?void 0:n.length)||!a)&&(0,s.createElement)(i_.ButtonAction,{onClick:c},(0,d.__)("Clear")),content:!a&&(0,s.createElement)(Vk,{__experimentalIsRenderedInSidebar:u,value:o,onChange:r})})}var $k=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));const Kk=["menuitem","menuitemradio","menuitemcheckbox"];class Gk extends s.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,(0,l.isFunction)(t)?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?Re.focus.tabbable:Re.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=l.noop,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role");Kk.includes(t)&&e.preventDefault()}if(!a)return;const s=t(e.target.ownerDocument.activeElement);if(!s)return;const{index:u,focusables:c}=s,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(u,c.length,a):u+a;d>=0&&d(0,s.createElement)(Gk,a({},e,{forwardedRef:t}));qk.displayName="NavigableContainer";var Yk=(0,s.forwardRef)(qk);var Xk=(0,s.forwardRef)((function(e,t){let{role:n="menu",orientation:r="vertical",...o}=e;return(0,s.createElement)(Yk,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:n,"aria-orientation":"presentation"===n?null:r,eventToOffset:e=>{const{keyCode:t}=e;let n=[ev.DOWN],o=[ev.UP];return"horizontal"===r&&(n=[ev.RIGHT],o=[ev.LEFT]),"both"===r&&(n=[ev.RIGHT,ev.DOWN],o=[ev.LEFT,ev.UP]),(0,l.includes)(n,t)?1:(0,l.includes)(o,t)?-1:(0,l.includes)([ev.DOWN,ev.UP,ev.LEFT,ev.RIGHT],t)?0:void 0}},o))}));function Zk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...e,...t};return t.className&&e.className&&(n.className=c()(t.className,e.className)),n}var Jk=function(e){const{children:t,className:n,controls:r,icon:o=$k,label:i,popoverProps:u,toggleProps:d,menuProps:f,disableOpenOnArrowDown:p=!1,text:h,noIcons:m}=e;if((0,l.isEmpty)(r)&&!(0,l.isFunction)(t))return null;let v;(0,l.isEmpty)(r)||(v=r,Array.isArray(v[0])||(v=[v]));const g=Zk({className:"components-dropdown-menu__popover"},u);return(0,s.createElement)(pg,{className:c()("components-dropdown-menu",n),popoverProps:g,renderToggle:e=>{var t;let{isOpen:n,onToggle:r}=e;const l=Zk({className:c()("components-dropdown-menu__toggle",{"is-opened":n})},d);return(0,s.createElement)(Kn,a({},l,{icon:o,onClick:e=>{r(e),l.onClick&&l.onClick(e)},onKeyDown:e=>{(e=>{p||n||e.keyCode!==ev.DOWN||(e.preventDefault(),r())})(e),l.onKeyDown&&l.onKeyDown(e)},"aria-haspopup":"true","aria-expanded":n,label:i,text:h,showTooltip:null===(t=null==d?void 0:d.showTooltip)||void 0===t||t}),l.children)},renderContent:e=>{const n=Zk({"aria-label":i,className:c()("components-dropdown-menu__menu",{"no-icons":m})},f);return(0,s.createElement)(Xk,a({},n,{role:"menu"}),(0,l.isFunction)(t)?t(e):null,(0,l.flatMap)(v,((t,n)=>t.map(((t,r)=>(0,s.createElement)(Kn,{key:[n,r].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:c()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))}})};const Qk=Vn(i_.Option,{target:"e5bw3229"})("width:",xp(6),";height:",xp(6),";pointer-events:none;"),eS=Vn(Um,{target:"e5bw3228"})(gh,"{background:",zo.gray[100],";border-radius:",$p.controlBorderRadius,";}",yh,yh,yh,yh,"{height:",xp(8),";}",Eh,Eh,Eh,"{border-color:transparent;box-shadow:none;}"),tS=Vn(Wn,{target:"e5bw3227"})("padding:3px 0 3px ",xp(3),";height:calc( 40px - ",$p.borderWidth," );border:1px solid ",$p.surfaceBorderColor,";border-bottom-color:transparent;&:first-of-type{border-top-left-radius:",$p.controlBorderRadius,";border-top-right-radius:",$p.controlBorderRadius,";}&:last-of-type{border-bottom-left-radius:",$p.controlBorderRadius,";border-bottom-right-radius:",$p.controlBorderRadius,";border-bottom-color:",$p.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",zo.blue.wordpress[700],";}"),nS=Vn("div",{target:"e5bw3226"})("line-height:",xp(8),";margin-left:",xp(2),";margin-right:",xp(2),";white-space:nowrap;overflow:hidden;",tS,":hover &{color:var( --wp-admin-theme-color, ",zo.blue.wordpress[700]," );}"),rS=Vn(l_,{target:"e5bw3225"})("text-transform:uppercase;line-height:",xp(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),oS=Vn(Wn,{target:"e5bw3224"})("height:",xp(6),";display:flex;"),iS=Vn(bg,{target:"e5bw3223"})("margin-bottom:",xp(2),";"),aS=Vn(Wn,{target:"e5bw3222"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),sS=Vn(Kn,{target:"e5bw3221"})("&&{color:",zo.ui.theme,";}"),lS=Vn(Kn,{target:"e5bw3220"})("&&{margin-top:",xp(1),";}"),uS="#000";function cS(e){let{value:t,onChange:n,label:r}=e;return(0,s.createElement)(eS,{label:r,hideLabelFromVision:!0,value:t,onChange:n})}function dS(e){return(0,d.sprintf)((0,d.__)("Color %s "),e+1)}function fS(e){let{canOnlyChangeValues:t,element:n,onChange:r,isEditing:o,onStartEditing:i,onRemove:u,onStopEditing:c,slugPrefix:p,isGradient:h}=e;const m=(0,f.__experimentalUseFocusOutside)(c),v=h?n.gradient:n.color;return(0,s.createElement)(tS,a({className:o?"is-selected":void 0,as:"div",onClick:i},o?{...m}:{style:{cursor:"pointer"}}),(0,s.createElement)(bg,{justify:"flex-start"},(0,s.createElement)(yp,null,(0,s.createElement)(Qk,{style:{background:v,color:"transparent"}})),(0,s.createElement)(yp,null,o&&!t?(0,s.createElement)(cS,{label:h?(0,d.__)("Gradient name"):(0,d.__)("Color name"),value:n.name,onChange:e=>r({...n,name:e,slug:p+(0,l.kebabCase)(e)})}):(0,s.createElement)(nS,null,n.name)),o&&!t&&(0,s.createElement)(yp,null,(0,s.createElement)(lS,{isSmall:!0,icon:Iv,label:(0,d.__)("Remove color"),onClick:u}))),o&&(0,s.createElement)(jr,{position:"bottom left",className:"components-palette-edit__popover"},!h&&(0,s.createElement)(r_,{color:v,onChange:e=>r({...n,color:e})}),h&&(0,s.createElement)(Vk,{__experimentalIsRenderedInSidebar:!0,value:v,onChange:e=>r({...n,gradient:e})})))}function pS(e,t,n){let{slug:r,color:o,gradient:i}=t;return r===e+(0,l.kebabCase)(dS(n))&&(!!o&&o===uS||!!i&&i===Mk)}function hS(e){let{elements:t,onChange:n,editingElement:r,setEditingElement:o,canOnlyChangeValues:i,slugPrefix:a,isGradient:l}=e;const u=(0,s.useRef)();(0,s.useEffect)((()=>{u.current=t}),[t]),(0,s.useEffect)((()=>()=>{if(u.current.some(((e,t)=>pS(a,e,t)))){const e=u.current.filter(((e,t)=>!pS(a,e,t)));n(e.length?e:void 0)}}),[]);const c=(0,f.useDebounce)(n,100);return(0,s.createElement)(a_,{spacing:3},(0,s.createElement)(mk,{isRounded:!0},t.map(((e,u)=>(0,s.createElement)(fS,{isGradient:l,canOnlyChangeValues:i,key:u,element:e,onStartEditing:()=>{r!==u&&o(u)},onChange:e=>{c(t.map(((t,n)=>n===u?e:t)))},onRemove:()=>{o(null);const e=t.filter(((e,t)=>t!==u));n(e.length?e:void 0)},isEditing:u===r,onStopEditing:()=>{u===r&&o(null)},slugPrefix:a})))))}const mS=[];function vS(e){let{gradients:t,colors:n=mS,onChange:r,paletteLabel:o,emptyMessage:i,canOnlyChangeValues:a,canReset:u,slugPrefix:c=""}=e;const f=!!t,p=f?t:n,[h,m]=(0,s.useState)(!1),[v,g]=(0,s.useState)(null),y=h&&v&&p[v]&&!p[v].slug,b=p.length,w=b>0;return(0,s.createElement)(aS,null,(0,s.createElement)(iS,null,(0,s.createElement)(rS,null,o),(0,s.createElement)(oS,null,h&&(0,s.createElement)(sS,{isSmall:!0,onClick:()=>{m(!1),g(null)}},(0,d.__)("Done")),!a&&(0,s.createElement)(Kn,{isSmall:!0,isPressed:y,icon:JE,label:f?(0,d.__)("Add gradient"):(0,d.__)("Add color"),onClick:()=>{const e=dS(b);r([...p,{...f?{gradient:Mk}:{color:uS},name:e,slug:c+(0,l.kebabCase)(e)}]),m(!0),g(p.length)}}),w&&(!h||!a||u)&&(0,s.createElement)(Jk,{icon:QE,label:f?(0,d.__)("Gradient options"):(0,d.__)("Color options"),toggleProps:{isSmall:!0}},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Xk,{role:"menu"},!h&&(0,s.createElement)(Kn,{variant:"tertiary",onClick:()=>{m(!0),t()},className:"components-palette-edit__menu-button"},f?(0,d.__)("Edit gradients"):(0,d.__)("Edit colors")),!a&&(0,s.createElement)(Kn,{variant:"tertiary",onClick:()=>{g(null),m(!1),r(),t()},className:"components-palette-edit__menu-button"},f?(0,d.__)("Remove all gradients"):(0,d.__)("Remove all colors")),u&&(0,s.createElement)(Kn,{variant:"tertiary",onClick:()=>{g(null),r(),t()}},f?(0,d.__)("Reset gradient"):(0,d.__)("Reset colors"))))})))),w&&(0,s.createElement)(s.Fragment,null,h&&(0,s.createElement)(hS,{canOnlyChangeValues:a,elements:p,onChange:r,editingElement:v,setEditingElement:g,slugPrefix:c,isGradient:f}),!h&&(f?(0,s.createElement)(Uk,{gradients:t,onChange:()=>{},clearable:!1,disableCustomGradients:!0}):(0,s.createElement)(p_,{colors:n,onChange:()=>{},clearable:!1,disableCustomColors:!0}))),!w&&i)}class gS extends s.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:r,className:o,onChange:i,...l}=this.props,u=e?e.length+1:0;return(0,s.createElement)("input",a({ref:this.bindInput,id:`components-form-token-input-${n}`,type:"text"},l,{value:e||"",onChange:i?this.onChange:void 0,size:u,className:c()(o,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${n}`:void 0,"aria-activedescendant":-1!==r?`components-form-token-suggestions-${n}-${r}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${n}`}))}}var yS=gS,bS=n(5425),wS=n.n(bS);const _S=Object.freeze([]),xS=e=>{e.preventDefault()};var ES=(0,f.withSafeTimeout)((function(e){let{selectedIndex:t,scrollIntoView:n,match:r="",onHover:o,onSelect:i,suggestions:a=_S,displayTransform:u,instanceId:d,setTimeout:p}=e;const[h,m]=(0,s.useState)(!1),v=(0,f.useRefEffect)((e=>{t>-1&&n&&e.children[t]&&(m(!0),wS()(e.children[t],e,{onlyScrollIfNeeded:!0}),p((()=>{m(!1)}),100))}),[t,n]),g=e=>()=>{h||null==o||o(e)},y=e=>()=>{null==i||i(e)};return(0,s.createElement)("ul",{ref:v,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${d}`,role:"listbox"},(0,l.map)(a,((e,n)=>{const o=(e=>{const t=u(r||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=u(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}})(e),i=c()("components-form-token-field__suggestion",{"is-selected":n===t});return(0,s.createElement)("li",{id:`components-form-token-suggestions-${d}-${n}`,role:"option",className:i,key:null!=e&&e.value?e.value:u(e),onMouseDown:xS,onClick:y(e),onMouseEnter:g(e),"aria-selected":n===t},o?(0,s.createElement)("span",{"aria-label":u(e)},o.suggestionBeforeMatch,(0,s.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):u(e))})))})),kS=(0,f.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,s.useState)(),o=(0,s.useCallback)((e=>r((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,s.createElement)("div",(0,f.__experimentalUseFocusOutside)(n),(0,s.createElement)(e,a({ref:o},t)))}),"withFocusOutside");const SS=kS(class extends s.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});var CS=function e(t){var n;let{value:r,label:o,options:i,onChange:a,onFilterValueChange:u=l.noop,hideLabelFromVision:p,help:h,allowReset:m=!0,className:v,messages:g={selected:(0,d.__)("Item selected.")}}=t;const y=i.find((e=>e.value===r)),b=null!==(n=null==y?void 0:y.label)&&void 0!==n?n:"",w=(0,f.useInstanceId)(e),[_,x]=(0,s.useState)(y||null),[E,k]=(0,s.useState)(!1),[S,C]=(0,s.useState)(!1),[P,O]=(0,s.useState)(""),M=(0,s.useRef)(),I=(0,s.useMemo)((()=>{const e=[],t=[],n=(0,l.deburr)(P.toLocaleLowerCase());return i.forEach((r=>{const o=(0,l.deburr)(r.label).toLocaleLowerCase().indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[P,i,r]),T=e=>{a(e.value),(0,nv.speak)(g.selected,"assertive"),x(e),O(""),k(!1)},D=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=I.indexOf(_);let n=t+e;n<0?n=I.length-1:n>=I.length&&(n=0),x(I[n]),k(!0)};return(0,s.useEffect)((()=>{const e=I.length>0,t=I.indexOf(_)>0;e&&!t&&x(I[0])}),[I,_]),(0,s.useEffect)((()=>{const e=I.length>0;if(E){const t=e?(0,d.sprintf)((0,d._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",I.length),I.length):(0,d.__)("No results.");(0,nv.speak)(t,"polite")}}),[I,E]),(0,s.createElement)(SS,{onFocusOutside:()=>{k(!1)}},(0,s.createElement)(gv,{className:c()(v,"components-combobox-control"),tabIndex:"-1",label:o,id:`components-form-token-input-${w}`,hideLabelFromVision:p,help:h},(0,s.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;if(!e.defaultPrevented){switch(e.keyCode){case ev.ENTER:_&&(T(_),t=!0);break;case ev.UP:D(-1),t=!0;break;case ev.DOWN:D(1),t=!0;break;case ev.ESCAPE:k(!1),x(null),t=!0}t&&e.preventDefault()}}},(0,s.createElement)(Tp,null,(0,s.createElement)(gp,null,(0,s.createElement)(yS,{className:"components-combobox-control__input",instanceId:w,ref:M,value:E?P:b,"aria-label":b?`${b}, ${o}`:null,onFocus:()=>{C(!0),k(!0),u(""),O("")},onBlur:()=>{C(!1)},isExpanded:E,selectedSuggestionIndex:I.indexOf(_),onChange:e=>{const t=e.value;O(t),u(t),S&&k(!0)}})),m&&(0,s.createElement)(yp,null,(0,s.createElement)(Kn,{className:"components-combobox-control__reset",icon:Mv,disabled:!r,onClick:()=>{a(null),M.current.input.focus()},label:(0,d.__)("Reset")}))),E&&(0,s.createElement)(ES,{instanceId:w,match:{label:P},displayTransform:e=>e.label,suggestions:I,selectedIndex:I.indexOf(_),onHover:x,onSelect:T,scrollIntoView:!0}))))};const PS=new Set(["alert","status","log","marquee","timer"]);let OS=[],MS=!1;function IS(e){if(MS)return;const t=document.body.children;(0,l.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||PS.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),OS.push(t))})),MS=!0}let TS=0;var DS=(0,s.forwardRef)((function e(t,n){const{bodyOpenClassName:r="modal-open",role:o="dialog",title:i=null,focusOnMount:u=!0,shouldCloseOnEsc:p=!0,shouldCloseOnClickOutside:h=!0,isDismissible:m=!0,aria:v={labelledby:null,describedby:null},onRequestClose:g,icon:y,closeButtonLabel:b,children:w,style:_,overlayClassName:x,className:E,contentLabel:k,onKeyDown:S,isFullScreen:C=!1,__experimentalHideHeader:P=!1}=t,O=(0,s.useRef)(),M=(0,f.useInstanceId)(e),I=i?`components-modal-header-${M}`:v.labelledby,T=(0,f.useFocusOnMount)(u),D=(0,f.useConstrainedTabbing)(),A=(0,f.useFocusReturn)(),R=(0,f.__experimentalUseFocusOutside)(g);return(0,s.useEffect)((()=>(TS++,1===TS&&(IS(O.current),document.body.classList.add(r)),()=>{TS--,0===TS&&(document.body.classList.remove(r),MS&&((0,l.forEach)(OS,(e=>{e.removeAttribute("aria-hidden")})),OS=[],MS=!1))})),[]),(0,s.createPortal)((0,s.createElement)("div",{ref:(0,f.useMergeRefs)([O,n]),className:c()("components-modal__screen-overlay",x),onKeyDown:function(e){p&&e.keyCode===ev.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),g&&g(e))}},(0,s.createElement)(vr,{document:document},(0,s.createElement)("div",a({className:c()("components-modal__frame",E,{"is-full-screen":C}),style:_,ref:(0,f.useMergeRefs)([D,A,T]),role:o,"aria-label":k,"aria-labelledby":k?null:I,"aria-describedby":v.describedby,tabIndex:"-1"},h?R:{},{onKeyDown:S}),(0,s.createElement)("div",{className:c()("components-modal__content",{"hide-header":P}),role:"document"},!P&&(0,s.createElement)("div",{className:"components-modal__header"},(0,s.createElement)("div",{className:"components-modal__header-heading-container"},y&&(0,s.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},y),i&&(0,s.createElement)("h1",{id:I,className:"components-modal__header-heading"},i)),m&&(0,s.createElement)(Kn,{onClick:g,icon:Mv,label:b||(0,d.__)("Close dialog")})),w)))),document.body)}));const AS={name:"7g5ii0",styles:"&&{z-index:1000001;}"};var RS=On((function(e,t){const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:l,cancelButtonText:u,...c}=Pn(e,"ConfirmDialog"),f=Cn()(AS),[p,h]=(0,s.useState)(),[m,v]=(0,s.useState)();(0,s.useEffect)((()=>{const e=void 0!==n;h(!e||n),v(!e)}),[n]);const g=(0,s.useCallback)((e=>t=>{null==e||e(t),m&&h(!1)}),[m,h]),y=(0,s.useCallback)((e=>{"Enter"===e.key&&g(r)(e)}),[g,r]),b=null!=u?u:(0,d.__)("Cancel"),w=null!=l?l:(0,d.__)("OK");return(0,s.createElement)(s.Fragment,null,p&&(0,s.createElement)(DS,a({onRequestClose:g(o),onKeyDown:y,closeButtonLabel:b,isDismissible:!0,ref:t,overlayClassName:f,__experimentalHideHeader:!0},c),(0,s.createElement)(a_,{spacing:8},(0,s.createElement)(sh,null,i),(0,s.createElement)(Tp,{direction:"row",justify:"flex-end"},(0,s.createElement)(Kn,{variant:"tertiary",onClick:g(o)},b),(0,s.createElement)(Kn,{variant:"primary",onClick:g(r)},w)))))}),"ConfirmDialog"),NS=n(2652),LS=n.n(NS);n(2797);function FS(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function jS(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function BS(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}let VS=0;function HS(){}function WS(e,t){if(!e)return;const n=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!FS(e))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,c=[],d=e;FS(d)&&l(d);){if((d=d.parentElement)===u){c.push(d);break}null!=d&&d===document.body&&BS(d)&&!BS(document.documentElement)||null!=d&&BS(d,s)&&c.push(d)}for(var f=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),g=v.height,y=v.width,b=v.top,w=v.right,_=v.bottom,x=v.left,E="start"===o||"nearest"===o?b:"end"===o?_:b+g/2,k="center"===i?x+y/2:"end"===i?w:x,S=[],C=0;C=0&&x>=0&&_<=p&&w<=f&&b>=T&&_<=A&&x>=R&&w<=D)return S;var N=getComputedStyle(P),L=parseInt(N.borderLeftWidth,10),F=parseInt(N.borderTopWidth,10),j=parseInt(N.borderRightWidth,10),B=parseInt(N.borderBottomWidth,10),z=0,V=0,H="offsetWidth"in P?P.offsetWidth-P.clientWidth-L-j:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-F-B:0;if(u===P)z="start"===o?E:"end"===o?E-p:"nearest"===o?zS(m,m+p,p,F,B,m+E,m+E+g,g):E-p/2,V="start"===i?k:"center"===i?k-f/2:"end"===i?k-f:zS(h,h+f,f,L,j,h+k,h+k+y,y),z=Math.max(0,z+m),V=Math.max(0,V+h);else{z="start"===o?E-T-F:"end"===o?E-A+B+W:"nearest"===o?zS(T,A,M,F,B+W,E,E+g,g):E-(T+M/2)+W/2,V="start"===i?k-R-L:"center"===i?k-(R+I/2)+H/2:"end"===i?k-D+j+H:zS(R,D,I,L,j+H,k,k+y,y);var U=P.scrollLeft,$=P.scrollTop;E+=$-(z=Math.max(0,Math.min($+z,P.scrollHeight-M+W))),k+=U-(V=Math.max(0,Math.min(U+V,P.scrollWidth-I+H)))}S.push({el:P,top:z,left:V})}return S}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function US(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function $S(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a{n=null,e(...i)}),t)}return o.cancel=r,o}function KS(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function GS(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function qS(){return String(VS++)}function YS(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function XS(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=ZS(t,r)?t[r]:e[r],n)),{})}function ZS(e,t){return void 0!==e[t]}function JS(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function QS(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=eC(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function eC(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?eC(1,0,n,r,!1):eC(-1,n-1,n,r,!1):-1}function tC(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(US(t,e,n)||r&&US(t,n.document.activeElement,n))))}const nC=$S((e=>{oC(e).textContent=""}),500);function rC(e,t){const n=oC(t);e&&(n.textContent=e,nC(t))}function oC(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const iC={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function aC(e,t,n){const{props:r,type:o}=e,i={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:o,type:i}=t,a="on"+fC(e)+"Change";o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]({type:i,...r})}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange({type:o,...i})}const sC=$S(((e,t)=>{rC(e(),t)}),200),lC="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?b.useLayoutEffect:b.useEffect;function uC(e){let{id:t="downshift-"+qS(),labelId:n,menuId:r,getItemId:o,toggleButtonId:i,inputId:a}=e;return(0,b.useRef)({labelId:n||t+"-label",menuId:r||t+"-menu",getItemId:o||(e=>t+"-item-"+e),toggleButtonId:i||t+"-toggle-button",inputId:a||t+"-input"}).current}function cC(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function dC(e){return/^\S{1}$/.test(e)}function fC(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function pC(e){const t=(0,b.useRef)(e);return t.current=e,t}function hC(e,t,n){const r=(0,b.useRef)(),o=(0,b.useRef)(),i=(0,b.useCallback)(((t,n)=>{o.current=n,t=XS(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[a,s]=(0,b.useReducer)(i,t),l=pC(n),u=(0,b.useCallback)((e=>s({props:l.current,...e})),[l]),c=o.current;return(0,b.useEffect)((()=>{c&&r.current&&r.current!==a&&aC(c,XS(r.current,c.props),a),r.current=a}),[a,n,c]),[a,u]}function mC(e,t,n){const[r,o]=hC(e,t,n);return[XS(r,n),o]}const vC={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?n(t)+" has been selected.":""},scrollIntoView:WS,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function gC(e,t,n){void 0===n&&(n=iC);const r=e["default"+fC(t)];return void 0!==r?r:n[t]}function yC(e,t,n){void 0===n&&(n=iC);const r=e[t];if(void 0!==r)return r;const o=e["initial"+fC(t)];return void 0!==o?o:gC(e,t,n)}function bC(e){const t=yC(e,"selectedItem"),n=yC(e,"isOpen"),r=yC(e,"highlightedIndex"),o=yC(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function wC(e,t,n,r){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:l}=t;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):QS(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function _C(e,t,n,r){const o=(0,b.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,b.useEffect)((()=>{const i=()=>{o.current.isMouseDown=!0},a=i=>{o.current.isMouseDown=!1,e&&!tC(i.target,t.map((e=>e.current)),n)&&r()},s=()=>{o.current.isTouchMove=!1},l=()=>{o.current.isTouchMove=!0},u=i=>{!e||o.current.isTouchMove||tC(i.target,t.map((e=>e.current)),n,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",u)}}),[e,n]),o}let xC=()=>HS;function EC(e,t,n){let{isInitialMount:r,highlightedIndex:o,items:i,environment:a,...s}=n;(0,b.useEffect)((()=>{r||sC((()=>e({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length,...s})),a.document)}),t)}function kC(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:o,menuElement:i,scrollIntoView:a}=e;const s=(0,b.useRef)(!0);return lC((()=>{t<0||!n||!Object.keys(r.current).length||(!1===s.current?s.current=!0:a(o(t),i))}),[t]),s}let SC=HS;function CC(e,t,n){const{type:r,props:o}=t;let i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:wC(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:wC(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:gC(o,"highlightedIndex"),isOpen:gC(o,"isOpen"),selectedItem:gC(o,"selectedItem"),inputValue:gC(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}function PC(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s=0&&{selectedItem:r.items[a]}}}break;case 13:i={highlightedIndex:wC(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:i={highlightedIndex:wC(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:i={isOpen:gC(r,"isOpen"),highlightedIndex:gC(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case 3:i={highlightedIndex:eC(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case 4:i={highlightedIndex:eC(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:i={isOpen:!1,highlightedIndex:-1};break;case 7:{const n=t.key,o=""+e.inputValue+n,a=PC({keysSoFar:o,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{highlightedIndex:a}}}break;case 0:i={highlightedIndex:QS(o?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 1:i={highlightedIndex:QS(o?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 20:i={selectedItem:t.selectedItem};break;default:return CC(e,t,IC)}return{...e,...i}}function DC(e){void 0===e&&(e={}),MC(e,DC);const t={...OC,...e},{items:n,scrollIntoView:r,environment:o,initialIsOpen:i,defaultIsOpen:a,itemToString:s,getA11ySelectionMessage:l,getA11yStatusMessage:u}=t,c=bC(t),[d,f]=mC(TC,c,t),{isOpen:p,highlightedIndex:h,selectedItem:m,inputValue:v}=d,g=(0,b.useRef)(null),y=(0,b.useRef)(null),w=(0,b.useRef)({}),_=(0,b.useRef)(!0),x=(0,b.useRef)(null),E=uC(t),k=(0,b.useRef)(),S=(0,b.useRef)(!0),C=pC({state:d,props:t}),P=(0,b.useCallback)((e=>w.current[E.getItemId(e)]),[E]);EC(u,[p,h,v,n],{isInitialMount:S.current,previousResultCount:k.current,items:n,environment:o,itemToString:s,...d}),EC(l,[m],{isInitialMount:S.current,previousResultCount:k.current,items:n,environment:o,itemToString:s,...d});const O=kC({menuElement:y.current,highlightedIndex:h,isOpen:p,itemRefs:w,scrollIntoView:r,getItemNodeFromIndex:P});(0,b.useEffect)((()=>(x.current=$S((e=>{e({type:21,inputValue:""})}),500),()=>{x.current.cancel()})),[]),(0,b.useEffect)((()=>{v&&x.current(f)}),[f,v]),SC({isInitialMount:S.current,props:t,state:d}),(0,b.useEffect)((()=>{S.current?(i||a||p)&&y.current&&y.current.focus():p?y.current&&y.current.focus():o.document.activeElement===y.current&&g.current&&(_.current=!1,g.current.focus())}),[p]),(0,b.useEffect)((()=>{S.current||(k.current=n.length)}));const M=_C(p,[y,g],o,(()=>{f({type:8})})),I=xC();(0,b.useEffect)((()=>{S.current=!1}),[]),(0,b.useEffect)((()=>{p||(w.current={})}),[p]);const T=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:13,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:14,getItemNodeFromIndex:P,shiftKey:e.shiftKey})}})),[f,P]),D=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:0,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:1,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),f({type:3,getItemNodeFromIndex:P})},End(e){e.preventDefault(),f({type:4,getItemNodeFromIndex:P})},Escape(){f({type:2})},Enter(e){e.preventDefault(),f({type:5})}," "(e){e.preventDefault(),f({type:6})}})),[f,P]),A=(0,b.useCallback)((()=>{f({type:16})}),[f]),R=(0,b.useCallback)((()=>{f({type:18})}),[f]),N=(0,b.useCallback)((()=>{f({type:17})}),[f]),L=(0,b.useCallback)((e=>{f({type:19,highlightedIndex:e})}),[f]),F=(0,b.useCallback)((e=>{f({type:20,selectedItem:e})}),[f]),j=(0,b.useCallback)((()=>{f({type:22})}),[f]),B=(0,b.useCallback)((e=>{f({type:21,inputValue:e})}),[f]),z=(0,b.useCallback)((e=>({id:E.labelId,htmlFor:E.toggleButtonId,...e})),[E]),V=(0,b.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",onKeyDown:o,onBlur:i,ref:a,...s}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;const u=C.current.state;return I("getMenuProps",l,r,y),{[r]:GS(a,(e=>{y.current=e})),id:E.menuId,role:"listbox","aria-labelledby":E.labelId,tabIndex:-1,...u.isOpen&&u.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(u.highlightedIndex)},onMouseLeave:KS(n,(()=>{f({type:9})})),onKeyDown:KS(o,(e=>{const t=JS(e);t&&D[t]?D[t](e):dC(t)&&f({type:7,key:t,getItemNodeFromIndex:P})})),onBlur:KS(i,(()=>{if(!1===_.current)return void(_.current=!0);!M.current.isMouseDown&&f({type:8})})),...s}}),[f,C,D,M,I,E,P]),H=(0,b.useCallback)((function(e,t){let{onClick:n,onKeyDown:r,refKey:o="ref",ref:i,...a}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t;const l=()=>{f({type:12})},u=e=>{const t=JS(e);t&&T[t]?T[t](e):dC(t)&&f({type:15,key:t,getItemNodeFromIndex:P})},c={[o]:GS(i,(e=>{g.current=e})),id:E.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":C.current.state.isOpen,"aria-labelledby":E.labelId+" "+E.toggleButtonId,...a};return a.disabled||(c.onClick=KS(n,l),c.onKeyDown=KS(r,u)),I("getToggleButtonProps",s,o,g),c}),[f,C,T,I,E,P]),W=(0,b.useCallback)((function(e){let{item:t,index:n,onMouseMove:r,onClick:o,refKey:i="ref",ref:a,...s}=void 0===e?{}:e;const{state:l,props:u}=C.current,c=()=>{n!==l.highlightedIndex&&(O.current=!1,f({type:10,index:n}))},d=()=>{f({type:11,index:n})},p=cC(n,t,u.items);if(p<0)throw new Error("Pass either item or item index in getItemProps!");const h={role:"option","aria-selected":""+(p===l.highlightedIndex),id:E.getItemId(p),[i]:GS(a,(e=>{e&&(w.current[E.getItemId(p)]=e)})),...s};return s.disabled||(h.onMouseMove=KS(r,c),h.onClick=KS(o,d)),h}),[f,C,O,E]);return{getToggleButtonProps:H,getLabelProps:z,getMenuProps:V,getItemProps:W,toggleMenu:A,openMenu:N,closeMenu:R,setHighlightedIndex:L,selectItem:F,reset:j,setInputValue:B,highlightedIndex:h,isOpen:p,selectedItem:m,inputValue:v}}DC.stateChangeTypes=IC;LS().array.isRequired,LS().func,LS().func,LS().func,LS().bool,LS().number,LS().number,LS().number,LS().bool,LS().bool,LS().bool,LS().any,LS().any,LS().any,LS().string,LS().string,LS().string,LS().string,LS().string,LS().string,LS().func,LS().string,LS().string,LS().func,LS().func,LS().func,LS().func,LS().func,LS().func,LS().shape({addEventListener:LS().func,removeEventListener:LS().func,document:LS().shape({getElementById:LS().func,activeElement:LS().any,body:LS().any})});LS().array,LS().array,LS().array,LS().func,LS().func,LS().func,LS().number,LS().number,LS().number,LS().func,LS().func,LS().string,LS().string,LS().shape({addEventListener:LS().func,removeEventListener:LS().func,document:LS().shape({getElementById:LS().func,activeElement:LS().any,body:LS().any})});const AC=e=>null==e?void 0:e.name,RC=(e,t)=>{let{selectedItem:n}=e,{type:r,changes:o,props:{items:i}}=t;switch(r){case DC.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:i[n?Math.min(i.indexOf(n)+1,i.length-1):0]};case DC.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:i[n?Math.max(i.indexOf(n)-1,0):i.length-1]};default:return o}};function NC(e){var t;let{__next36pxDefaultSize:n=!1,className:r,hideLabelFromVision:o,label:i,describedBy:l,options:u,onChange:f,value:p}=e;const{getLabelProps:h,getToggleButtonProps:m,getMenuProps:v,getItemProps:g,isOpen:y,highlightedIndex:b,selectedItem:w}=DC({initialSelectedItem:u[0],items:u,itemToString:AC,onSelectedItemChange:f,...null!=p?{selectedItem:p}:void 0,stateReducer:RC});const _=v({className:"components-custom-select-control__menu","aria-hidden":!y}),x=(0,s.useCallback)((e=>{var t;e.stopPropagation(),null==_||null===(t=_.onKeyDown)||void 0===t||t.call(_,e)}),[_]);return null!==(t=_["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete _["aria-activedescendant"],(0,s.createElement)("div",{className:c()("components-custom-select-control",r)},o?(0,s.createElement)(Un,a({as:"label"},h()),i):(0,s.createElement)("label",h({className:"components-custom-select-control__label"}),i),(0,s.createElement)(Kn,m({"aria-label":i,"aria-labelledby":void 0,className:c()("components-custom-select-control__button",{"is-next-36px-default-size":n}),isSmall:!n,describedBy:l||(w?(0,d.sprintf)((0,d.__)("Currently selected: %s"),w.name):(0,d.__)("No selection"))}),AC(w),(0,s.createElement)(wg,{icon:_g,className:c()("components-custom-select-control__button-icon",{"is-next-36px-default-size":n}),size:18})),(0,s.createElement)("ul",a({},_,{onKeyDown:x}),y&&u.map(((e,t)=>(0,s.createElement)("li",g({item:e,index:t,key:e.key,className:c()(e.className,"components-custom-select-control__item",{"is-highlighted":t===b,"has-hint":!!e.__experimentalHint,"is-next-36px-default-size":n}),style:e.style}),e.name,e.__experimentalHint&&(0,s.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===w&&(0,s.createElement)(wg,{icon:o_,className:"components-custom-select-control__item-icon"}))))))}n(4185);var LC=n(6292),FC=n.n(LC),jC=n(6302);const BC="dddd, LL";function zC(e){let{day:t,events:n=[]}=e;const r=(0,s.useRef)();return(0,s.useEffect)((()=>{var e;if(null==r||null===(e=r.current)||void 0===e||!e.parentNode)return;const{parentNode:o}=r.current,i=FC()(t).format(BC);if(!n.length)return void o.setAttribute("aria-label",i);const a=(0,d.sprintf)((0,d._n)("%1$s. There is %2$d event.","%1$s. There are %2$d events.",n.length),i,n.length);o.setAttribute("aria-label",a)}),[n.length]),(0,s.createElement)("div",{ref:r,className:c()("components-datetime__date__day",{"has-events":null==n?void 0:n.length})},t.format("D"))}var VC=function(e){let{currentDate:t,onChange:n,events:r,isInvalidDate:o,onMonthPreviewed:i}=e;const a=(0,s.useRef)(),l=e=>{null==i||i(e.toISOString()),u()},u=()=>{if(!a.current)return;const{ownerDocument:e}=a.current,{activeElement:t}=e;if(!t||!a.current.contains(e.activeElement)){const e=a.current.querySelector(".DayPicker_focusRegion");if(!e)return;e.focus()}},c=e=>null!=r&&r.length?r.filter((t=>e.isSame(t.date,"day"))):[],f=(e=>null===e?null:e?FC()(e):FC()())(t);return(0,s.createElement)("div",{className:"components-datetime__date",ref:a},(0,s.createElement)(jC.Z,{date:f,daySize:30,focused:!0,hideKeyboardShortcutsPanel:!0,key:`datepicker-controller-${f?f.format("MM-YYYY"):"null"}`,noBorder:!0,numberOfMonths:1,onDateChange:e=>{const r=t?FC()(t):FC()(),o={hours:r.hours(),minutes:r.minutes(),seconds:0};n(e.set(o).format("YYYY-MM-DDTHH:mm:ss")),u()},transitionDuration:0,weekDayFormat:"ddd",dayAriaLabelFormat:BC,isRTL:(0,d.isRTL)(),isOutsideRange:e=>o&&o(e.toDate()),onPrevMonthClick:l,onNextMonthClick:l,renderDayContents:e=>(0,s.createElement)(zC,{day:e,events:c(e)})}))},HC=window.wp.date;var WC=()=>{const{timezone:e}=(0,HC.__experimentalGetSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=e.offset>=0?"+":"",r=""!==e.abbr&&isNaN(e.abbr)?e.abbr:`UTC${n}${e.offset}`,o="UTC"===e.string?(0,d.__)("Coordinated Universal Time"):`(${r}) ${e.string.replace("_"," ")}`;return(0,s.createElement)($r,{position:"top center",text:o},(0,s.createElement)("div",{className:"components-datetime__timezone"},r))};function UC(e,t){return t?(e%12+12)%24:e%12}function $C(e){let{as:t,value:n,onUpdate:r,className:o,...i}=e;return(0,s.createElement)(t||"input",{key:n,defaultValue:n,onBlur:function(e){const{target:t}=e;if(n===t.value)return;const o=parseInt(t.value,10);!(0,l.isInteger)(o)||void 0!==i.max&&o>i.max||void 0!==i.min&&oFC()(n).startOf("minutes")));(0,s.useEffect)((()=>{i(n?FC()(n).startOf("minutes"):FC()())}),[n]);const{day:a,month:l,year:u,minutes:f,hours:p,am:h}=(0,s.useMemo)((()=>({day:o.format("DD"),month:o.format("MM"),year:o.format("YYYY"),minutes:o.format("mm"),hours:o.format(t?"hh":"HH"),am:o.format("H")<=11?"AM":"PM"})),[o,t]);function m(e){i(e),r(e.format("YYYY-MM-DDTHH:mm:ss"))}function v(e,n){let r=n;"hours"===e&&t&&(r=UC(n,"PM"===h));m(o.clone()[e](r))}function g(e){return()=>{if(h===e)return;const t=parseInt(p,10);m(o.clone().hours(UC(t,"PM"===e)))}}const y=(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-day"},(0,s.createElement)($C,{"aria-label":(0,d.__)("Day"),className:"components-datetime__time-field-day-input",type:"number",name:"date",value:a,step:1,min:1,max:31,onUpdate:v})),b=(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-month"},(0,s.createElement)($C,{as:"select","aria-label":(0,d.__)("Month"),className:"components-datetime__time-field-month-select",name:"month",value:l,onUpdate:(e,t)=>v(e,t-1)},(0,s.createElement)("option",{value:"01"},(0,d.__)("January")),(0,s.createElement)("option",{value:"02"},(0,d.__)("February")),(0,s.createElement)("option",{value:"03"},(0,d.__)("March")),(0,s.createElement)("option",{value:"04"},(0,d.__)("April")),(0,s.createElement)("option",{value:"05"},(0,d.__)("May")),(0,s.createElement)("option",{value:"06"},(0,d.__)("June")),(0,s.createElement)("option",{value:"07"},(0,d.__)("July")),(0,s.createElement)("option",{value:"08"},(0,d.__)("August")),(0,s.createElement)("option",{value:"09"},(0,d.__)("September")),(0,s.createElement)("option",{value:"10"},(0,d.__)("October")),(0,s.createElement)("option",{value:"11"},(0,d.__)("November")),(0,s.createElement)("option",{value:"12"},(0,d.__)("December")))),w=t?(0,s.createElement)(s.Fragment,null,b,y):(0,s.createElement)(s.Fragment,null,y,b);return(0,s.createElement)("div",{className:c()("components-datetime__time")},(0,s.createElement)("fieldset",null,(0,s.createElement)("legend",{className:"components-datetime__time-legend invisible"},(0,d.__)("Date")),(0,s.createElement)("div",{className:"components-datetime__time-wrapper"},w,(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-year"},(0,s.createElement)($C,{"aria-label":(0,d.__)("Year"),className:"components-datetime__time-field-year-input",type:"number",name:"year",step:1,min:0,max:9999,value:u,onUpdate:v})))),(0,s.createElement)("fieldset",null,(0,s.createElement)("legend",{className:"components-datetime__time-legend invisible"},(0,d.__)("Time")),(0,s.createElement)("div",{className:"components-datetime__time-wrapper"},(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-time"},(0,s.createElement)($C,{"aria-label":(0,d.__)("Hours"),className:"components-datetime__time-field-hours-input",type:"number",name:"hours",step:1,min:t?1:0,max:t?12:23,value:p,onUpdate:v}),(0,s.createElement)("span",{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,s.createElement)($C,{"aria-label":(0,d.__)("Minutes"),className:"components-datetime__time-field-minutes-input",type:"number",name:"minutes",step:1,min:0,max:59,value:f,onUpdate:v})),t&&(0,s.createElement)(Zx,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,s.createElement)(Kn,{variant:"AM"===h?"primary":"secondary",onClick:g("AM"),className:"components-datetime__time-am-button"},(0,d.__)("AM")),(0,s.createElement)(Kn,{variant:"PM"===h?"primary":"secondary",onClick:g("PM"),className:"components-datetime__time-pm-button"},(0,d.__)("PM"))),(0,s.createElement)(WC,null))))};var GC=(0,s.forwardRef)((function(e,t){let{currentDate:n,is12Hour:r,isInvalidDate:o,onMonthPreviewed:i=l.noop,onChange:a,events:u}=e;const[c,f]=(0,s.useState)(!1);return(0,s.createElement)("div",{ref:t,className:"components-datetime"},!c&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(KC,{currentTime:n,onChange:a,is12Hour:r}),(0,s.createElement)(VC,{currentDate:n,onChange:a,isInvalidDate:o,events:u,onMonthPreviewed:i})),c&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"components-datetime__calendar-help"},(0,s.createElement)("h4",null,(0,d.__)("Click to Select")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,d.__)("Click the right or left arrows to select other months in the past or the future.")),(0,s.createElement)("li",null,(0,d.__)("Click the desired day to select it."))),(0,s.createElement)("h4",null,(0,d.__)("Navigating with a keyboard")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d._x)("Enter","keyboard button")},"↵")," ",(0,s.createElement)("span",null,(0,d.__)("Select the date in focus."))),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Left and Right Arrows")},"←/→")," ",(0,d.__)("Move backward (left) or forward (right) by one day.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Up and Down Arrows")},"↑/↓")," ",(0,d.__)("Move backward (up) or forward (down) by one week.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Page Up and Page Down")},(0,d.__)("PgUp/PgDn"))," ",(0,d.__)("Move backward (PgUp) or forward (PgDn) by one month.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Home and End")},(0,d.__)("Home/End"))," ",(0,d.__)("Go to the first (Home) or last (End) day of a week."))))),(0,s.createElement)("div",{className:"components-datetime__buttons"},!c&&n&&(0,s.createElement)(Kn,{className:"components-datetime__date-reset-button",variant:"link",onClick:()=>a(null)},(0,d.__)("Reset")),(0,s.createElement)(Kn,{className:"components-datetime__date-help-toggle",variant:"link",onClick:function(){f(!c)}},c?(0,d.__)("Close"):(0,d.__)("Calendar Help"))))}));var qC=[{name:(0,d._x)("None","Size of a UI element"),slug:"none"},{name:(0,d._x)("Small","Size of a UI element"),slug:"small"},{name:(0,d._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,d._x)("Large","Size of a UI element"),slug:"large"},{name:(0,d._x)("Extra Large","Size of a UI element"),slug:"xlarge"}];var YC=function(e){const{label:t,value:n,sizes:r=qC,icon:o,onChange:i,className:a=""}=e,u=(0,s.createElement)(s.Fragment,null,o&&(0,s.createElement)(He,{icon:o}),t);return(0,s.createElement)(Sg,{className:c()(a,"block-editor-dimension-control"),label:u,hideLabelFromVision:!1,value:n,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(r,e);t&&n!==t.slug?(0,l.isFunction)(i)&&i(t.slug):i(void 0)},options:(e=>{const t=e.map((e=>{let{name:t,slug:n}=e;return{label:t,value:n}}));return[{label:(0,d.__)("Default"),value:""}].concat(t)})(r)})};const XC=Vn("div",{target:"e1ac3xxk0"})({name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"}),ZC=(0,s.createContext)(!1),{Consumer:JC,Provider:QC}=ZC,eP=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];function tP(e){let{className:t,children:n,isDisabled:r=!0,...o}=e;const i=(0,s.useRef)(null),u=()=>{i.current&&Re.focus.focusable.find(i.current).forEach((e=>{(0,l.includes)(eP,e.nodeName)&&e.setAttribute("disabled",""),"A"===e.nodeName&&e.setAttribute("tabindex","-1");const t=e.getAttribute("tabindex");null!==t&&"-1"!==t&&e.removeAttribute("tabindex"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},d=(0,s.useCallback)((0,l.debounce)(u,void 0,{leading:!0}),[]);return(0,s.useLayoutEffect)((()=>{if(!r)return;let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}}),[]),r?(0,s.createElement)(QC,{value:!0},(0,s.createElement)(XC,a({ref:i,className:c()(t,"components-disabled")},o),n)):(0,s.createElement)(QC,{value:!1},n)}tP.Context=ZC,tP.Consumer=JC;var nP=tP;const rP="is-dragging-components-draggable";function oP(e){let{children:t,onDragStart:n,onDragOver:r,onDragEnd:o,cloneClassname:i,elementId:a,transferData:u,__experimentalTransferDataType:c="text",__experimentalDragComponent:d}=e;const f=(0,s.useRef)(null),p=(0,s.useRef)((()=>{}));return(0,s.useEffect)((()=>()=>{p.current()}),[]),(0,s.createElement)(s.Fragment,null,t({onDraggableStart:function(e){const{ownerDocument:t}=e.target;e.dataTransfer.setData(c,JSON.stringify(u));const o=t.createElement("div");o.style.top=0,o.style.left=0;const s=t.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(s.classList.add("components-draggable__invisible-drag-image"),t.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0)),o.classList.add("components-draggable__clone"),i&&o.classList.add(i);let d=0,h=0;if(f.current){d=e.clientX,h=e.clientY,o.style.transform=`translate( ${d}px, ${h}px )`;const n=t.createElement("div");n.innerHTML=f.current.innerHTML,o.appendChild(n),t.body.appendChild(o)}else{const e=t.getElementById(a),n=e.getBoundingClientRect(),r=e.parentNode,i=parseInt(n.top,10),s=parseInt(n.left,10);o.style.width=`${n.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${a}`,d=s-0,h=i-0,o.style.transform=`translate( ${d}px, ${h}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode.removeChild(e))),o.appendChild(l),r.appendChild(o)}let m=e.clientX,v=e.clientY;const g=(0,l.throttle)((function(e){if(m===e.clientX&&v===e.clientY)return;const t=d+e.clientX-m,n=h+e.clientY-v;o.style.transform=`translate( ${t}px, ${n}px )`,m=e.clientX,v=e.clientY,d=t,h=n,r&&r(e)}),16);let y;t.addEventListener("dragover",g),t.body.classList.add(rP),e.persist(),n&&(y=setTimeout((()=>n(e)))),p.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),s&&s.parentNode&&s.parentNode.removeChild(s),t.body.classList.remove(rP),t.removeEventListener("dragover",g),clearTimeout(y)}},onDraggableEnd:function(e){e.preventDefault(),p.current(),o&&o(e)}}),d&&(0,s.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:f},d))}var iP=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function aP(){var e=(0,b.useRef)(!1);return ea((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var sP=function(e){var t=e.children,n=e.initial,r=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=ha(lP),l=gl(),u=(0,b.useMemo)((function(){return{id:l,initial:n,isPresent:r,custom:i,onExitComplete:function(e){var t,n;s.set(e,!0);try{for(var r=Vi(s.values()),i=r.next();!i.done;i=r.next()){if(!i.value)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}null==o||o()},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),a?void 0:[r]);return(0,b.useMemo)((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[r]),b.useEffect((function(){!r&&!s.size&&(null==o||o())}),[r]),b.createElement(Ji.Provider,{value:u},t)};function lP(){return new Map}var uP=function(e){return e.key||""};var cP=function(e){var t=e.children,n=e.custom,r=e.initial,o=void 0===r||r,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=void 0===s||s,u=Hi(function(){var e=aP(),t=Hi((0,b.useState)(0),2),n=t[0],r=t[1],o=(0,b.useCallback)((function(){e.current&&r(n+1)}),[n]);return[(0,b.useCallback)((function(){return Uu.postRender(o)}),[o]),n]}(),1),c=u[0],d=(0,b.useContext)(ga).forceRender;d&&(c=d);var f=aP(),p=function(e){var t=[];return b.Children.forEach(e,(function(e){(0,b.isValidElement)(e)&&t.push(e)})),t}(t),h=p,m=new Set,v=(0,b.useRef)(h),g=(0,b.useRef)(new Map).current,y=(0,b.useRef)(!0);if(ea((function(){y.current=!1,function(e,t){e.forEach((function(e){var n=uP(e);t.set(n,e)}))}(p,g),v.current=h})),tl((function(){y.current=!0,g.clear(),m.clear()})),y.current)return b.createElement(b.Fragment,null,h.map((function(e){return b.createElement(sP,{key:uP(e),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:l},e)})));h=Wi([],Hi(h),!1);for(var w=v.current.map(uP),_=p.map(uP),x=w.length,E=0;E1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),b.createElement(b.Fragment,null,m.size?h:h.map((function(e){return(0,b.cloneElement)(e)})))};function dP(e){let{className:t,label:n,onFilesDrop:r,onHTMLDrop:o,onDrop:i}=e;const[a,u]=(0,s.useState)(),[p,h]=(0,s.useState)(),[m,v]=(0,s.useState)(),g=(0,f.__experimentalUseDropZone)({onDrop(e){const t=(0,Re.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n&&o?o(n):t.length&&r?r(t):i&&i(e)},onDragStart(e){u(!0);let t="default";(0,l.includes)(e.dataTransfer.types,"text/html")?t="html":((0,l.includes)(e.dataTransfer.types,"Files")||(0,Re.getFilesFromDataTransfer)(e.dataTransfer).length>0)&&(t="file"),v(t)},onDragEnd(){u(!1),v()},onDragEnter(){h(!0)},onDragLeave(){h(!1)}}),y=(0,f.useReducedMotion)();let b;const w={hidden:{scaleY:0,opacity:0},show:{scaleY:1,opacity:1,transition:{type:"tween",duration:.2,delay:.1,delayChildren:.2}},exit:{scaleY:1,opacity:0,transition:{duration:.3,delayChildren:0}}},_={hidden:{opacity:0,scale:.75},show:{opacity:1,scale:1},exit:{opacity:0,scale:.9}};p&&(b=(0,s.createElement)(up.div,{variants:w,initial:y?"show":"hidden",animate:"show",exit:y?"show":"exit",className:"components-drop-zone__content"},(0,s.createElement)(up.div,{variants:_},(0,s.createElement)(wg,{icon:iP,className:"components-drop-zone__content-icon"}),(0,s.createElement)("span",{className:"components-drop-zone__content-text"},n||(0,d.__)("Drop files to upload")))));const x=c()("components-drop-zone",t,{"is-active":(a||p)&&("file"===m&&r||"html"===m&&o||"default"===m&&i),"is-dragging-over-document":a,"is-dragging-over-element":p,[`is-dragging-${m}`]:!!m});return(0,s.createElement)("div",{ref:g,className:x},y?b:(0,s.createElement)(cP,null,b))}function fP(e){let{children:t}=e;return ze()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),t}var pP=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));var hP=function(e){let{fill:t}=e;return t?(0,s.createElement)("span",{className:"components-swatch",style:{background:t}}):(0,s.createElement)(He,{icon:pP})};function mP(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Po([Oo]);var vP=function(e){let{values:t}=e;return(0,s.createElement)(hP,{fill:t&&mP(t,"135deg")})};function gP(e){let{label:t,value:n,colors:r,disableCustomColors:o,enableAlpha:i,onChange:a}=e;const[l,u]=(0,s.useState)(!1);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Kn,{className:"components-color-list-picker__swatch-button",icon:(0,s.createElement)(hP,{fill:n}),onClick:()=>u((e=>!e))},t),l&&(0,s.createElement)(p_,{className:"components-color-list-picker__color-picker",colors:r,value:n,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i}))}var yP=function(e){let{colors:t,labels:n,value:r=[],disableCustomColors:o,enableAlpha:i,onChange:a}=e;return(0,s.createElement)("div",{className:"components-color-list-picker"},n.map(((e,n)=>(0,s.createElement)(gP,{key:n,label:e,value:r[n],colors:t,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=r.slice();t[n]=e,a(t)}}))))};const bP=["#333","#CCC"];function wP(e){let{value:t,onChange:n}=e;const r=!!t,o=r?t:bP,i=mP(o),a=(l=o).map(((e,t)=>({position:100*t/(l.length-1),color:e})));var l;return(0,s.createElement)(Pk,{disableInserter:!0,background:i,hasGradient:r,value:a,onChange:e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>{let{color:t}=e;return t}))}(e);n(t)}})}var _P=function(e){let{clearable:t=!0,colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:a,onChange:u}=e;const[c,f]=(0,s.useMemo)((()=>{return!(e=n)||e.length<2?["#000","#fff"]:e.map((e=>{let{color:t}=e;return{color:t,brightness:So(t).brightness()}})).reduce(((e,t)=>{let[n,r]=e;return[t.brightness<=n.brightness?t:n,t.brightness>=r.brightness?t:r]}),[{brightness:1},{brightness:0}]).map((e=>{let{color:t}=e;return t}));var e}),[n]);return(0,s.createElement)(i_,{options:r.map((e=>{let{colors:t,slug:n,name:r}=e;const o={background:mP(t,"135deg"),color:"transparent"},i=null!=r?r:(0,d.sprintf)((0,d.__)("Duotone code: %s"),n),c=r?(0,d.sprintf)((0,d.__)("Duotone: %s"),r):i,f=(0,l.isEqual)(t,a);return(0,s.createElement)(i_.Option,{key:n,value:t,isSelected:f,"aria-label":c,tooltipText:i,style:o,onClick:()=>{u(f?void 0:t)}})})),actions:!!t&&(0,s.createElement)(i_.ButtonAction,{onClick:()=>u(void 0)},(0,d.__)("Clear"))},!o&&!i&&(0,s.createElement)(wP,{value:a,onChange:u}),!i&&(0,s.createElement)(yP,{labels:[(0,d.__)("Shadows"),(0,d.__)("Highlights")],colors:n,value:a,disableCustomColors:o,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=c),e[1]||(e[1]=f);const t=e.length>=2?e:void 0;u(t)}}))};var xP=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const EP=Vn(wg,{target:"etxm6pv0"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});var kP=(0,s.forwardRef)((function(e,t){let{href:n,children:r,className:o,rel:i="",...u}=e;i=(0,l.uniq)((0,l.compact)([...i.split(" "),"external","noreferrer","noopener"])).join(" ");const f=c()("components-external-link",o);return(0,s.createElement)("a",a({},u,{className:f,href:n,target:"_blank",rel:i,ref:t}),r,(0,s.createElement)(Un,{as:"span"},(0,d.__)("(opens in a new tab)")),(0,s.createElement)(EP,{icon:xP,className:"components-external-link__icon"}))})),SP=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place"],CP=([].concat(SP,["size"]),SP),PP=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal"],OP=[].concat(PP,["hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_initialFocusRef","unstable_finalFocusRef","unstable_orphan","unstable_autoFocusOnShow","unstable_autoFocusOnHide"]),MP=PP,IP=V({name:"Button",compose:me,keys:[],useProps:function(e,t){var n=t.ref,r=v(t,["ref"]),o=(0,b.useRef)(null),i=(0,b.useState)(void 0),a=i[0],s=i[1],l=(0,b.useState)("button"),u=l[0],c=l[1];return(0,b.useEffect)((function(){var e=o.current;e&&(te(e)||("A"!==e.tagName&&s("button"),c(void 0)))}),[]),m({ref:W(o,n),role:a,type:u},r)}}),TP=(B({as:"button",memo:!0,useHook:IP}),V({name:"Disclosure",compose:IP,keys:Vb,useProps:function(e,t){var n=t.onClick,r=t["aria-controls"],o=v(t,["onClick","aria-controls"]),i=q(n),a=r?r+" "+e.baseId:e.baseId,s=(0,b.useCallback)((function(t){var n,r;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||null===(r=e.toggle)||void 0===r||r.call(e)}),[e.toggle]);return m({"aria-expanded":!!e.visible,"aria-controls":a,onClick:s},o)}})),DP=(B({as:"button",memo:!0,useHook:TP}),V({name:"DialogDisclosure",compose:TP,keys:MP,useProps:function(e,t){var n=t.ref,r=t.onClick,o=v(t,["ref","onClick"]),i=(0,b.useRef)(null),a=q(r),s=(0,b.useState)(!1),l=s[0],u=s[1],c=e.unstable_disclosureRef;G((function(){var t=i.current;c&&!c.current&&(c.current=t);var n=!(null!=c&&c.current)||c.current===t;u(!!e.visible&&n)}),[e.visible,c]);var d=(0,b.useCallback)((function(e){var t;null===(t=a.current)||void 0===t||t.call(a,e),e.defaultPrevented||c&&(c.current=e.currentTarget)}),[c]);return m({ref:W(i,n),"aria-haspopup":"dialog","aria-expanded":l,onClick:d},o)}})),AP=(B({as:"button",memo:!0,useHook:DP}),V({name:"PopoverDisclosure",compose:DP,keys:CP,useProps:function(e,t){var n=t.ref,r=v(t,["ref"]);return m({ref:W(e.unstable_referenceRef,n)},r)}})),RP=B({as:"button",memo:!0,useHook:AP});const NP=(0,s.createContext)({});var LP=n(235),FP=n.n(LP);function jP(e,t){var n=(0,b.useRef)(!1);(0,b.useEffect)((function(){if(n.current)return e();n.current=!0}),t)}function BP(e,t){var n=e.indexOf(t);return function(e,t){return-1===t?e:[].concat(e.slice(0,t),e.slice(t+1))}(e,n)}var zP=(0,b.createContext)(null);var VP=!1;if("undefined"!=typeof window){var HP={get passive(){VP=!0}};window.addEventListener("testPassive",null,HP),window.removeEventListener("testPassive",null,HP)}var WP="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),UP=[],$P=!1,KP=-1,GP=void 0,qP=void 0,YP=function(e){return UP.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},XP=function(e){var t=e||window.event;return!!YP(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},ZP=function(){void 0!==qP&&(document.body.style.paddingRight=qP,qP=void 0),void 0!==GP&&(document.body.style.overflow=GP,GP=void 0)},JP=function(e,t){if(e){if(!UP.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};UP=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?XP(e):e.stopPropagation())}(t,e)},$P||(document.addEventListener("touchmove",XP,VP?{passive:!1}:void 0),$P=!0)):function(e){if(void 0===qP){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(qP=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===GP&&(GP=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")};var QP=(0,b.createContext)(void 0);function eO(e,t){var n=Boolean(t.preventBodyScroll&&t.visible);(0,b.useEffect)((function(){var t=e.current;if(t&&n)return JP(t,{reserveScrollBarGap:!0}),function(){var e;(e=t)?(UP=UP.filter((function(t){return t.targetElement!==e})),WP?(e.ontouchstart=null,e.ontouchmove=null,$P&&0===UP.length&&(document.removeEventListener("touchmove",XP,VP?{passive:!1}:void 0),$P=!1)):UP.length||ZP()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}}),[e,n])}function tO(e,t){var n=(0,b.useRef)(null);return(0,b.useEffect)((function(){var r=e.current;r&&t.visible&&(n.current=function(e,t){if("closest"in e)return e.closest(t);do{if(re(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(r,Gb.__selector))}),[e,t.visible]),n}function nO(e){null!=e.parentNode&&e.parentNode.removeChild(e)}var rO="__reakit-focus-trap";function oO(e,t,n){var r=tO(e,n),o=n.visible&&n.modal,i=(0,b.useRef)(null),a=(0,b.useRef)(null);(0,b.useEffect)((function(){if(o){var e=r.current;if(e){if(!i.current){var t=U(e);i.current=t.createElement("div"),i.current.className=rO,i.current.tabIndex=0,i.current.style.position="fixed",i.current.setAttribute("aria-hidden","true")}return a.current||(a.current=i.current.cloneNode()),e.insertAdjacentElement("beforebegin",i.current),e.insertAdjacentElement("afterend",a.current),function(){i.current&&nO(i.current),a.current&&nO(a.current)}}}}),[r,o]),(0,b.useEffect)((function(){var n=i.current,r=a.current;if(o&&n&&r){var s=function(n){var o=e.current;if(o&&!t.length){n.preventDefault();var i=n.target===r?le(o):function(e,t){var n=se(e,t);return n[n.length-1]||null}(o);i?i.focus():o.focus()}};return n.addEventListener("focus",s),r.addEventListener("focus",s),function(){n.removeEventListener("focus",s),r.removeEventListener("focus",s)}}}),[e,t,o])}function iO(e,t,n){var r=n.unstable_autoFocusOnHide&&!n.visible,o=!(!n.animated||!n.animating);jP((function(){var i;if(r&&!o&&!function(e){var t=e.current;if(!t)return!1;var n=X(t);return!(!n||Z(t,n)||!ae(n)&&"true"!==n.getAttribute("data-dialog"))}(e)){var a=(null===(i=n.unstable_finalFocusRef)||void 0===i?void 0:i.current)||t.current;if(a){if(a.id){var s=U(a).querySelector("[aria-activedescendant='"+a.id+"']");if(s)return void Se(s)}Se(a)}else;}}),[r,o,e,t])}var aO=(0,b.createContext)({});function sO(e,t,n,r,o,i,a){var s=q(o);(0,b.useEffect)((function(){if(i){var o=function(r){if(s.current){var o,i=e.current,a=t.current,l=r.target;if(i)if(function(e){var t=U(e);return"HTML"===e.tagName||Z(t.body,e)}(l))if(!Z(i,l))if(!a||!function(e,t){return Z(t,e)}(l,a))if(!(null===(o=l.classList)||void 0===o?void 0:o.contains(rO))&&!n.some(function(e){return function(t){var n=t.current;if(!n)return!1;if(Z(n,e))return!0;var r=U(n).querySelector('[data-dialog-ref="'+n.id+'"]');return!!r&&Z(r,e)}}(l)))s.current(r)}},l=U(e.current);return l.addEventListener(r,o,a),function(){return l.removeEventListener(r,o,a)}}}),[e,t,n,r,i,s])}function lO(e,t,n,r){var o=function(e,t){var n=(0,b.useRef)();return(0,b.useEffect)((function(){if(t.visible&&t.hideOnClickOutside){var r=U(e.current),o=function(e){n.current=e.target};return r.addEventListener("mousedown",o),function(){return r.removeEventListener("mousedown",o)}}}),[t.visible,t.hideOnClickOutside,e]),n}(e,r);sO(e,t,n,"click",(function(e){var t;o.current===e.target&&(null===(t=r.hide)||void 0===t||t.call(r))}),r.visible&&r.hideOnClickOutside),sO(e,t,n,"focusin",(function(t){var n,o=U(e.current);t.target!==o&&t.target!==o.body&&(null===(n=r.hide)||void 0===n||n.call(r))}),r.visible&&r.hideOnClickOutside)}function uO(e,t){(0,b.useEffect)((function(){var n=e.current;if(t.visible&&n){var r=new MutationObserver((function(e){if(e[0].target===n){var t,r=U(n),o=X(n);o!==r.body&&(t=o,Array.isArray(t)?t.length:A(t)?Object.keys(t).length:null!=t&&""!==t)||n.focus()}}));return r.observe(n,{childList:!0,subtree:!0}),function(){r.disconnect()}}}),[t.visible,e])}function cO(e){return e&&e.tagName&&"HTML"!==e.tagName&&e!==U(e).body}var dO=V({name:"Dialog",compose:Hb,keys:OP,useOptions:function(e){var t=e.modal,n=void 0===t||t,r=e.hideOnEsc,o=void 0===r||r,i=e.hideOnClickOutside,a=void 0===i||i,s=e.preventBodyScroll,l=void 0===s?n:s,u=e.unstable_autoFocusOnShow,c=void 0===u||u,d=e.unstable_autoFocusOnHide,f=void 0===d||d,p=e.unstable_orphan;return m({modal:n,hideOnEsc:o,hideOnClickOutside:a,preventBodyScroll:n&&l,unstable_autoFocusOnShow:c,unstable_autoFocusOnHide:f,unstable_orphan:n&&p},v(e,["modal","hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_autoFocusOnShow","unstable_autoFocusOnHide","unstable_orphan"]))},useProps:function(e,t){var n=t.ref,r=t.onKeyDown,o=t.onBlur,i=t.wrapElement,a=t.tabIndex,s=v(t,["ref","onKeyDown","onBlur","wrapElement","tabIndex"]),l=(0,b.useRef)(null),u=(0,b.useContext)(QP),c=u&&u===e.baseId,d=function(e,t){var n=(0,b.useRef)(null),r=!(!t.animated||!t.animating);return(0,b.useEffect)((function(){if(!t.visible&&!r){var o=function(e){var r=e.target;"focus"in r&&(n.current=r,t.unstable_disclosureRef&&(t.unstable_disclosureRef.current=r))},i=U(e.current);return i.addEventListener("focusin",o),function(){return i.removeEventListener("focusin",o)}}}),[t.visible,r,t.unstable_disclosureRef,e]),(0,b.useEffect)((function(){var e;if(t.visible&&!r){var o=function(e){var t=e.currentTarget;te(t)&&(e.preventDefault(),t.focus())},i=(null===(e=t.unstable_disclosureRef)||void 0===e?void 0:e.current)||n.current;return null==i||i.addEventListener("mousedown",o),function(){return null==i?void 0:i.removeEventListener("mousedown",o)}}}),[t.visible,r,t.unstable_disclosureRef]),t.unstable_disclosureRef||n}(l,e),f=q(r),p=q(o),h=function(e,t){var n=(0,b.useReducer)((function(e){return e+1}),0),r=n[0],o=n[1];return G((function(){var n=e.current;t.visible&&r&&(cO(X(n))||null==n||n.focus())}),[r,e]),(0,b.useCallback)((function(e){t.visible&&(cO(Ei(e))||o())}),[t.visible])}(l,e),g=function(e,t){var n=(0,b.useContext)(aO),r=(0,b.useState)([]),o=r[0],i=r[1],a=(0,b.useState)(o),s=a[0],l=a[1],u=(0,b.useCallback)((function(e){var t;null===(t=n.addDialog)||void 0===t||t.call(n,e),i((function(t){return[].concat(t,[e])}))}),[n.addDialog]),c=(0,b.useCallback)((function(e){var t;null===(t=n.removeDialog)||void 0===t||t.call(n,e),i((function(t){return BP(t,e)}))}),[n.removeDialog]),d=(0,b.useCallback)((function(e){var t;null===(t=n.showDialog)||void 0===t||t.call(n,e),l((function(t){return[].concat(t,[e])}))}),[n.showDialog]),f=(0,b.useCallback)((function(e){var t;null===(t=n.hideDialog)||void 0===t||t.call(n,e),l((function(t){return BP(t,e)}))}),[n.hideDialog]);(0,b.useEffect)((function(){var r;if(!t.unstable_orphan)return null===(r=n.addDialog)||void 0===r||r.call(n,e),function(){var t;null===(t=n.removeDialog)||void 0===t||t.call(n,e)}}),[t.unstable_orphan,n.addDialog,e,n.removeDialog]),(0,b.useEffect)((function(){var r;if(!t.unstable_orphan&&t.modal&&t.visible)return null===(r=n.showDialog)||void 0===r||r.call(n,e),function(){var t;null===(t=n.hideDialog)||void 0===t||t.call(n,e)}}),[t.unstable_orphan,t.modal,t.visible,n.showDialog,e,n.hideDialog]),(0,b.useEffect)((function(){var e;!1===n.visible&&t.visible&&!t.unstable_orphan&&(null===(e=t.hide)||void 0===e||e.call(t))}),[n.visible,t.visible,t.hide,t.unstable_orphan]);var p=(0,b.useMemo)((function(){return{visible:t.visible,addDialog:u,removeDialog:c,showDialog:d,hideDialog:f}}),[t.visible,u,c,d,f]);return{dialogs:o,visibleModals:s,wrap:(0,b.useCallback)((function(e){return(0,b.createElement)(aO.Provider,{value:p},e)}),[p])}}(l,e),y=g.dialogs,w=g.visibleModals,_=g.wrap,x=!(!e.modal||w.length)||void 0;eO(l,e),oO(l,w,e),uO(l,e),function(e,t,n){var r=n.unstable_initialFocusRef,o=n.visible&&n.unstable_autoFocusOnShow,i=!(!n.animated||!n.animating);jP((function(){var n=e.current;if(o&&n&&!i&&!t.some((function(e){return e.current&&!e.current.hidden})))if(null!=r&&r.current)r.current.focus({preventScroll:!0});else{Se(le(n,!0)||n,{preventScroll:!0,isActive:function(){return J(n)}})}}),[e,o,i,t,r])}(l,y,e),iO(l,d,e),lO(l,d,y,e),function(e,t,n){var r=function(r){return sO(e,{current:null},t,r,(function(e){e.stopPropagation(),e.preventDefault()}),n.visible&&n.modal,!0)};r("mouseover"),r("mousemove"),r("mouseout")}(l,y,e);var E=(0,b.useCallback)((function(t){var n;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||"Escape"===t.key&&e.hideOnEsc&&e.hide&&(t.stopPropagation(),e.hide())}),[e.hideOnEsc,e.hide]),k=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),h(e)}),[h]),S=(0,b.useCallback)((function(t){return t=_(t),e.modal&&!c&&(t=(0,b.createElement)(Gb,null,t)),i&&(t=i(t)),(0,b.createElement)(zP.Provider,{value:null},t)}),[_,e.modal,c,i]);return m({ref:W(l,n),role:"dialog",tabIndex:null!=a?a:-1,"aria-modal":x,"data-dialog":!0,onKeyDown:E,onBlur:k,wrapElement:S},s)}}),fO=(B({as:"div",useHook:dO,useCreateElement:function(e,t,n){return M(e,t,n)}}),V({name:"Popover",compose:dO,keys:SP,useOptions:function(e){var t=e.modal;return m({modal:void 0!==t&&t},v(e,["modal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=v(t,["ref","style"]);return m({ref:W(e.unstable_popoverRef,n),style:m(m({},e.unstable_popoverStyles),r)},o)}}));const pO=Vn(B({as:"div",useHook:fO,useCreateElement:function(e,t,n){return M(e,t,n)}}),{target:"e1vtu5161"})("z-index:",1e4,";box-sizing:border-box;opacity:0;outline:none;position:relative;transform-origin:center center;transition:opacity ",$p.transitionDurationFastest," linear;width:100%;&[data-enter]{opacity:1;}&::before,&::after{display:none;}"),hO=Vn(IE,{target:"e1vtu5160"})(jE.selector,"{max-height:80vh;}");const mO=On((function(e,t){const{children:n,elevation:r,maxWidth:o,style:i={},...l}=Pn(e,"FlyoutContent"),{label:u,flyoutState:c}=(0,s.useContext)(NP);if(!c)throw new Error("`FlyoutContent` must only be used inside a `Flyout`.");const d=c.visible||c.animating;return(0,s.createElement)(pO,a({"aria-label":u,style:{maxWidth:o,...i}},l,c),d&&(0,s.createElement)(hO,{elevation:r,ref:t},n))}),"FlyoutContent");var vO=mO;const gO=On((function(e,t){const{children:n,elevation:r,label:o,maxWidth:i,onVisibleChange:l,trigger:u,flyoutState:c,...d}=function(e){const{animated:t=!0,animationDuration:n=160,baseId:r,elevation:o=5,id:i,maxWidth:a=360,placement:s,state:l,visible:u,...c}=Pn(e,"Flyout"),d=Rb({animated:t?n:void 0,baseId:r||i,placement:s,visible:u,...c}),f=l||d;return{...c,elevation:o,maxWidth:a,flyoutState:f}}(e),p=function(e){let{onResize:t}=e;const[n,r]=FP()();return(0,f.useIsomorphicLayoutEffect)((()=>{null==t||t()}),[r.width,r.height]),n}({onResize:c.unstable_update}),h=`flyout-${c.baseId}`,m=o||h,v=(0,s.useMemo)((()=>({label:m,flyoutState:c})),[m,c]),g=(0,s.useCallback)((e=>(0,s.cloneElement)(u,e)),[u]);return zm((()=>{null==l||l(c.visible)}),[c.visible]),(0,s.createElement)(NP.Provider,{value:v},u&&(0,s.createElement)(RP,a({},c,{ref:u.ref},u.props),g),(0,s.createElement)(Gb,null,(0,s.createElement)(vO,a({ref:t},d,{elevation:r,maxWidth:i}),p,n)))}),"Flyout");var yO=gO;const bO=Vn("div",{target:"e11wezi78"})({name:"1g31405",styles:"background-color:transparent;box-sizing:border-box;text-align:center;width:100%"}),wO=Vn("div",{target:"e11wezi77"})({name:"v0nrlz",styles:"align-items:center;box-sizing:border-box;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.2 );cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;img,video{box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"}),_O=Vn("div",{target:"e11wezi76"})("background:",zo.lightGray[300],";box-sizing:border-box;height:170px;max-width:280px;min-width:200px;width:100%;"),xO=Vn(I_,{target:"e11wezi75"})({name:"1pzk433",styles:"width:100px"}),EO=Vn(Tp,{target:"e11wezi74"})({name:"ox4xcy",styles:"max-width:320px;padding:1em 0"}),kO=Vn("div",{target:"e11wezi73"})("box-sizing:border-box;left:50%;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 120ms linear;z-index:1;",(e=>{let{isActive:t}=e;return t&&"\n\t\topacity: 1;\n\t"}),";"),SO=Vn("div",{target:"e11wezi72"})({name:"1sy4ch9",styles:"box-sizing:border-box;background:white;box-shadow:0 0 2px rgba( 0, 0, 0, 0.6 );position:absolute;opacity:0.4;transform:translateZ( 0 )"}),CO=Vn(SO,{target:"e11wezi71"})({name:"1qp910y",styles:"height:1px;left:0;right:0"}),PO=Vn(SO,{target:"e11wezi70"})({name:"1oz3zka",styles:"width:1px;top:0;bottom:0"}),OO={top:0,left:0,bottom:0,right:0,width:0,height:0},MO=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function IO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(".");return t[t.length-1]}function TO(e){return Math.round(100*e)}function DO(e){let{onChange:t=l.noop,percentages:n={x:.5,y:.5}}=e;const r=TO(n.x),o=TO(n.y),i=(e,r)=>{const o=parseInt(e,10);isNaN(o)||t({...n,[r]:o/100})};return(0,s.createElement)(EO,{className:"focal-point-picker__controls"},(0,s.createElement)(AO,{label:(0,d.__)("Left"),value:[r,"%"].join(""),onChange:e=>i(e,"x"),dragDirection:"e"}),(0,s.createElement)(AO,{label:(0,d.__)("Top"),value:[o,"%"].join(""),onChange:e=>i(e,"y"),dragDirection:"s"}))}function AO(e){return(0,s.createElement)(xO,a({className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:100,min:0,units:[{value:"%",label:"%"}]},e))}const RO=Vn("div",{target:"eas61re3"})("background-color:transparent;box-sizing:border-box;cursor:grab;height:30px;margin:-15px 0 0 -15px;opacity:0.8;position:absolute;user-select:none;width:30px;will-change:transform;z-index:10000;",(e=>{let{isDragging:t}=e;return t&&"cursor: grabbing;"}),";"),NO=Vn(i.SVG,{target:"eas61re2"})({name:"qkx60y",styles:"display:block;height:100%;left:0;position:absolute;top:0;width:100%"}),LO=Vn(i.Path,{target:"eas61re1"})({name:"1b3qpiw",styles:"fill:white"}),FO=Vn(i.Path,{target:"eas61re0"})("fill:",zo.blue.wordpress[700],";fill:",zo.ui.theme,";");function jO(e){let{coordinates:t={left:"50%",top:"50%"},...n}=e;const r=c()("components-focal-point-picker__icon_container"),o={left:t.left,top:t.top};return(0,s.createElement)(RO,a({},n,{className:r,style:o}),(0,s.createElement)(NO,{className:"components-focal-point-picker__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30"},(0,s.createElement)(LO,{className:"components-focal-point-picker__icon-outline",d:"M15 1C7.3 1 1 7.3 1 15s6.3 14 14 14 14-6.3 14-14S22.7 1 15 1zm0 22c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z"}),(0,s.createElement)(FO,{className:"components-focal-point-picker__icon-fill",d:"M15 3C8.4 3 3 8.4 3 15s5.4 12 12 12 12-5.4 12-12S21.6 3 15 3zm0 22C9.5 25 5 20.5 5 15S9.5 5 15 5s10 4.5 10 10-4.5 10-10 10z"})))}const{clearTimeout:BO,setTimeout:zO}="undefined"!=typeof window?window:{};function VO(e){let{bounds:t={},value:n,...r}=e;const o=function(e){const[t,n]=(0,s.useState)(!1);return zm((()=>{n(!0);const e=zO((()=>{n(!1)}),600);return()=>BO(e)}),[e]),{isActive:t}}(n),i={width:t.width,height:t.height};return(0,s.createElement)(kO,a({},r,o,{className:"components-focal-point-picker__grid",style:i}),(0,s.createElement)(CO,{style:{top:"33%"}}),(0,s.createElement)(CO,{style:{top:"66%"}}),(0,s.createElement)(PO,{style:{left:"33%"}}),(0,s.createElement)(PO,{style:{left:"66%"}}))}function HO(e){let{alt:t,autoPlay:n,src:r,onLoad:o=l.noop,mediaRef:i,muted:u=!0,...c}=e;if(!r)return(0,s.createElement)(WO,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",onLoad:o,mediaRef:i});const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!e&&MO.includes(IO(e))}(r);return d?(0,s.createElement)("video",a({},c,{autoPlay:n,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:u,onLoadedData:o,ref:i,src:r})):(0,s.createElement)("img",a({},c,{alt:t,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:o,ref:i,src:r}))}function WO(e){let{mediaRef:t,onLoad:n=l.noop,...r}=e;const o=(0,s.useRef)(n);return(0,s.useLayoutEffect)((()=>{window.requestAnimationFrame((()=>{o.current()}))}),[]),(0,s.createElement)(_O,a({ref:t},r))}class UO extends s.Component{constructor(e){super(...arguments),this.state={isDragging:!1,bounds:OO,percentages:e.value},this.containerRef=(0,s.createRef)(),this.mediaRef=(0,s.createRef)(),this.onMouseDown=this.startDrag.bind(this),this.onMouseUp=this.stopDrag.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseMove=this.doDrag.bind(this),this.ifDraggingStop=()=>{this.state.isDragging&&this.stopDrag()},this.onChangeAtControls=e=>{this.updateValue(e,(()=>{this.props.onChange(this.state.percentages)}))},this.updateBounds=this.updateBounds.bind(this),this.updateValue=this.updateValue.bind(this)}componentDidMount(){const{defaultView:e}=this.containerRef.current.ownerDocument;e.addEventListener("resize",this.updateBounds),this.updateBounds()}componentDidUpdate(e){e.url!==this.props.url&&this.ifDraggingStop();const{isDragging:t,percentages:{x:n,y:r}}=this.state,{value:o}=this.props;t||o.x===n&&o.y===r||this.setState({percentages:this.props.value})}componentWillUnmount(){const{defaultView:e}=this.containerRef.current.ownerDocument;e.removeEventListener("resize",this.updateBounds),this.ifDraggingStop()}calculateBounds(){const e=OO;if(!this.mediaRef.current)return e;if(0===this.mediaRef.current.clientWidth||0===this.mediaRef.current.clientHeight)return e;const t=this.mediaRef.current.clientWidth,n=this.mediaRef.current.clientHeight,r=this.pickerDimensions(),o=r.width/t,i=r.height/n;return i>=o?(e.width=e.right=r.width,e.height=n*o,e.top=(r.height-e.height)/2,e.bottom=e.top+e.height):(e.height=e.bottom=r.height,e.width=t*i,e.left=(r.width-e.width)/2,e.right=e.left+e.width),e}updateValue(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;const i=null!==(e=null===(t=(n=this.props).resolvePoint)||void 0===t?void 0:t.call(n,r))&&void 0!==e?e:r,{x:a,y:s}=i,l={x:parseFloat(a).toFixed(2),y:parseFloat(s).toFixed(2)};this.setState({percentages:l},o)}updateBounds(){this.setState({bounds:this.calculateBounds()})}startDrag(e){var t,n;e.persist(),this.containerRef.current.focus(),this.setState({isDragging:!0});const{ownerDocument:r}=this.containerRef.current;r.addEventListener("mouseup",this.onMouseUp),r.addEventListener("mousemove",this.onMouseMove);const o=this.getValueFromPoint({x:e.pageX,y:e.pageY},e.shiftKey);this.updateValue(o),null===(t=(n=this.props).onDragStart)||void 0===t||t.call(n,o,e)}stopDrag(e){var t,n;const{ownerDocument:r}=this.containerRef.current;r.removeEventListener("mouseup",this.onMouseUp),r.removeEventListener("mousemove",this.onMouseMove),this.setState({isDragging:!1},(()=>{this.props.onChange(this.state.percentages)})),null===(t=(n=this.props).onDragEnd)||void 0===t||t.call(n,e)}onKeyDown(e){const{keyCode:t,shiftKey:n}=e;if(![ev.UP,ev.DOWN,ev.LEFT,ev.RIGHT].includes(t))return;e.preventDefault();const r={...this.state.percentages},o=n?.1:.01,i=t===ev.UP||t===ev.LEFT?-1*o:o,a=t===ev.UP||t===ev.DOWN?"y":"x",s=parseFloat(r[a])+i;r[a]=Bv(s,0,1,o),this.updateValue(r,(()=>{this.props.onChange(this.state.percentages)}))}doDrag(e){var t,n;e.preventDefault();const r=this.getValueFromPoint({x:e.pageX,y:e.pageY},e.shiftKey);this.updateValue(r),null===(t=(n=this.props).onDrag)||void 0===t||t.call(n,r,e)}getValueFromPoint(e,t){const{bounds:n}=this.state,r=this.pickerDimensions(),o={left:e.x-r.left,top:e.y-r.top},i=Math.max(n.left,Math.min(o.left,n.right)),a=Math.max(n.top,Math.min(o.top,n.bottom));let s=(i-n.left)/(r.width-2*n.left),l=(a-n.top)/(r.height-2*n.top);const u=t?.1:.01;return s=Bv(s,0,1,u),l=Bv(l,0,1,u),{x:s,y:l}}pickerDimensions(){const e=this.containerRef.current;if(!e)return{width:0,height:0,left:0,top:0};const{clientHeight:t,clientWidth:n}=e,{top:r,left:o}=e.getBoundingClientRect();return{width:n,height:t,top:r+document.body.scrollTop,left:o}}iconCoordinates(){const{bounds:e,percentages:{x:t,y:n}}=this.state;if(void 0===e.left||void 0===e.top)return{left:"50%",top:"50%"};const{width:r,height:o}=this.pickerDimensions();return{left:t*(r-2*e.left)+e.left,top:n*(o-2*e.top)+e.top}}render(){const{autoPlay:e,className:t,help:n,instanceId:r,label:o,url:i}=this.props,{bounds:a,isDragging:l,percentages:u}=this.state,f=this.iconCoordinates(),p=c()("components-focal-point-picker-control",t),h=`inspector-focal-point-picker-control-${r}`;return(0,s.createElement)(gv,{label:o,id:h,help:n,className:p},(0,s.createElement)(bO,{className:"components-focal-point-picker-wrapper"},(0,s.createElement)(wO,{className:"components-focal-point-picker",onKeyDown:this.onKeyDown,onMouseDown:this.onMouseDown,onBlur:this.ifDraggingStop,ref:this.containerRef,role:"button",tabIndex:"-1"},(0,s.createElement)(VO,{bounds:a,value:u.x+u.y}),(0,s.createElement)(HO,{alt:(0,d.__)("Media preview"),autoPlay:e,mediaRef:this.mediaRef,onLoad:this.updateBounds,src:i}),(0,s.createElement)(jO,{coordinates:f,isDragging:l}))),(0,s.createElement)(DO,{percentages:u,onChange:this.onChangeAtControls}))}}UO.defaultProps={autoPlay:!0,value:{x:.5,y:.5},url:null};var $O=(0,f.withInstanceId)(UO);function KO(e){let{iframeRef:t,...n}=e;const r=(0,f.useMergeRefs)([t,(0,f.useFocusableIframe)()]);return ze()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,s.createElement)("iframe",a({ref:r},n))}function GO(e){void 0===e&&(e={});var t=Xo(e),n=t.state,r=t.loop,o=void 0===r||r,i=v(t,["state","loop"]),a=(0,b.useState)(n),s=a[0],l=a[1],u=yi(m(m({},i),{},{loop:o}));return m(m({},u),{},{state:s,setState:l})}var qO=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],YO=[].concat(qO,["value","checked","unstable_checkOnFocus"]),XO=B({as:"div",useHook:V({name:"RadioGroup",compose:Pi,keys:qO,useProps:function(e,t){return m({role:"radiogroup"},t)}}),useCreateElement:function(e,t,n){return M(e,t,n)}});const ZO=Zr("background:",zo.ui.background,";border:1px solid;border-color:",zo.ui.border,";border-radius:",$p.controlBorderRadius,";display:inline-flex;min-height:",$p.controlHeight,";min-width:0;padding:2px;position:relative;transition:transform ",$p.transitionDurationFastest," linear;",Vo("transition")," &:hover{border-color:",zo.ui.borderHover,";}&:focus-within{border-color:",zo.ui.borderFocus,";box-shadow:",$p.controlBoxShadowFocus,";outline:none;z-index:1;}",""),JO={name:"7whenc",styles:"display:flex;width:100%"},QO=Vn("div",{target:"eakva830"})("background:",zo.gray[900],";border-radius:",$p.controlBorderRadius,";box-shadow:",$p.toggleGroupControlBackdropBoxShadow,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",$p.transitionDurationFast," ease;",Vo("transition")," z-index:1;");var eM=(0,s.memo)((function(e){let{containerRef:t,containerWidth:n,isAdaptiveWidth:r,state:o}=e;const[i,a]=(0,s.useState)(0),[l,u]=(0,s.useState)(0),[c,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{const e=null==t?void 0:t.current;if(!e)return;const n=e.querySelector(`[data-value="${o}"]`);if(p(!!n),!n)return;const r=window.setTimeout((()=>{const{width:t,x:r}=n.getBoundingClientRect(),{x:o}=e.getBoundingClientRect();a(r-o-1),u(t)}),100);let i;return c||(i=window.requestAnimationFrame((()=>{d(!0)}))),()=>{window.clearTimeout(r),window.cancelAnimationFrame(i)}}),[c,t,n,o,r]),f?(0,s.createElement)(QO,{role:"presentation",style:{transform:`translateX(${i}px)`,transition:c?void 0:"none",width:l}}):null}));const tM=(0,s.createContext)({});var nM=tM;const rM=()=>{};const oM=On((function e(t,n){const{className:r,isAdaptiveWidth:o=!1,isBlock:i=!1,label:l,hideLabelFromVision:u=!1,help:c,onChange:d=rM,value:p,children:h,...m}=Pn(t,"ToggleGroupControl"),v=Cn(),g=(0,s.useRef)(),[y,b]=FP()(),w=GO({baseId:(0,f.useInstanceId)(e,"toggle-group-control").toString(),state:p}),_=(0,f.usePrevious)(p);zm((()=>{_!==w.state&&d(w.state)}),[w.state]),zm((()=>{p!==w.state&&w.setState(p)}),[p]);const x=(0,s.useMemo)((()=>v(ZO,i&&JO,"medium",r)),[r,v,i]);return(0,s.createElement)(gv,{help:c},(0,s.createElement)(nM.Provider,{value:{...w,isBlock:!o}},!u&&(0,s.createElement)("div",null,(0,s.createElement)(gv.VisualLabel,null,l)),(0,s.createElement)(XO,a({},w,{"aria-label":l,as:Wn,className:x},m,{ref:(0,f.useMergeRefs)([g,n])}),y,(0,s.createElement)(eM,a({},w,{containerRef:g,containerWidth:b.width,isAdaptiveWidth:o})),h)))}),"ToggleGroupControl");var iM=oM;function aM(e){return void 0!==e.checked?e.checked:void 0!==e.value&&e.state===e.value}function sM(e,t){var n=Me(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}var lM=V({name:"Radio",compose:De,keys:YO,useOptions:function(e,t){var n,r=t.value,o=t.checked,i=e.unstable_clickOnEnter,a=void 0!==i&&i,s=e.unstable_checkOnFocus,l=void 0===s||s,u=v(e,["unstable_clickOnEnter","unstable_checkOnFocus"]);return m(m({checked:o,unstable_clickOnEnter:a,unstable_checkOnFocus:l},u),{},{value:null!=(n=u.value)?n:r})},useProps:function(e,t){var n=t.ref,r=t.onChange,o=t.onClick,i=v(t,["ref","onChange","onClick"]),a=(0,b.useRef)(null),s=(0,b.useState)(!0),l=s[0],u=s[1],c=aM(e),d=q(e.currentId===e.id),f=q(r),p=q(o);!function(e){var t=(0,b.useState)((function(){return aM(e)}))[0],n=(0,b.useState)(e.currentId)[0],r=e.id,o=e.setCurrentId;(0,b.useEffect)((function(){t&&r&&n!==r&&(null==o||o(r))}),[t,r,o,n])}(e),(0,b.useEffect)((function(){var e=a.current;e&&("INPUT"===e.tagName&&"radio"===e.type||u(!1))}),[]);var h=(0,b.useCallback)((function(t){var n,r;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||e.disabled||null===(r=e.setState)||void 0===r||r.call(e,e.value)}),[e.disabled,e.setState,e.value]),g=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),e.defaultPrevented||l||sM(e.currentTarget,h)}),[h,l]);return(0,b.useEffect)((function(){var t=a.current;t&&e.unstable_moves&&d.current&&e.unstable_checkOnFocus&&sM(t,h)}),[e.unstable_moves,e.unstable_checkOnFocus,h]),m({ref:W(a,n),role:l?void 0:"radio",type:l?"radio":void 0,value:l?e.value:void 0,name:l?e.baseId:void 0,"aria-checked":c,checked:c,onChange:h,onClick:g},i)}}),uM=B({as:"input",memo:!0,useHook:lM});const cM=Vn("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),dM={name:"82a6rk",styles:"flex:1"},fM=Zr("align-items:center;appearance:none;background:transparent;border:none;border-radius:",$p.controlBorderRadius,";color:",zo.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",$p.transitionDurationFast," linear,color ",$p.transitionDurationFast," linear,font-weight 60ms linear;",Vo("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",$p.toggleGroupControlBackgroundColor,";}",""),pM=Zr("color:",zo.white,";&:active{background:transparent;}",""),hM=Vn("div",{target:"et6ln9s0"})("font-size:",$p.fontSize,";line-height:1;"),mM={name:"1qsuvl4",styles:"background:transparent"},vM=Zr("min-height:",$p.controlHeight,";",""),{ButtonContentView:gM,LabelView:yM}=o,bM=e=>{let{showTooltip:t,text:n,children:r}=e;return t&&n?(0,s.createElement)($r,{text:n,position:"top center"},r):(0,s.createElement)(s.Fragment,null,r)};const wM=On((function e(t,n){const r=(0,s.useContext)(tM),o=Pn({...t,id:(0,f.useInstanceId)(e,r.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{className:i,isBlock:l=!1,value:u,children:c,showTooltip:d=!1,...p}={...r,...o},h=p.state===u,m=Cn(),v=m(l&&dM),g=m(fM,i,h&&pM);return(0,s.createElement)(yM,{className:v,"data-active":h},(0,s.createElement)(bM,{showTooltip:d,text:p["aria-label"]},(0,s.createElement)(uM,a({},p,{as:"button","aria-label":p["aria-label"],className:g,"data-value":u,ref:n,value:u}),(0,s.createElement)(gM,null,c))))}),"ToggleGroupControlOptionBase");var _M=wM;function xM(e){const{label:t,...n}=e,r=n["aria-label"]||t;return(0,s.createElement)(_M,a({},n,{"aria-label":r}),t)}const EM={slug:"default",name:(0,d.__)("Default")},kM="custom",SM={slug:kM,name:(0,d.__)("Custom")},CM=["1","2","3","4","5"];function PM(e){const[t,n]=`${e}`.match(/[\d\.]+|\D+/g);return!isNaN(parseFloat(t))&&isFinite(t)?[t,n]:[]}function OM(e){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(e)}function MM(e,t,n,r){return n&&!t.length?null:e?function(e,t){return[EM,...e,...t?[]:[SM]].map((e=>{let{slug:t,name:n,size:r}=e;return{key:t,name:n,size:r,__experimentalHint:r&&OM(r)&&parseFloat(r)}}))}(t,n):function(e,t){return e.map(((e,n)=>{let{slug:r,size:o,name:i}=e,a=t?CM[n]:o;if(!t&&"string"==typeof o){const[e]=PM(o);a=e}return{key:r,value:o,label:a,name:i}}))}(t,r)}var IM=(0,s.forwardRef)((function(e,t){var n,r;let{fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:l=!1,onChange:u,value:c,withSlider:f=!1,withReset:p=!0}=e;const h=[typeof c,typeof(null==i||null===(n=i[0])||void 0===n?void 0:n.size)].includes("string"),m=h?parseInt(c):c,v="number"==typeof c||(null==c||null===(r=c.endsWith)||void 0===r?void 0:r.call(c,"px")),g=E_({availableUnits:["px","em","rem"]}),y=i.some((e=>{let{size:t}=e;return!OM(t)})),b=i.length>5,w=(0,s.useMemo)((()=>MM(b,i,l,y)),[b,i,l,y]),_=function(e,t){return t?e.find((e=>e.size===t))||SM:EM}(i,c),x=_.slug===kM,[E,k]=(0,s.useState)(!l&&x),S=(0,s.useMemo)((()=>{if(E)return`(${(0,d.__)("Custom")})`;if(x)return OM(c)&&`(${c})`;if(b)return OM(null==_?void 0:_.size)&&`(${null==_?void 0:_.size})`;let e=_.name;if(!y&&"string"==typeof _.size){const[,t]=PM(_.size);e+=`(${t})`}return e}),[E,null==_?void 0:_.slug,c,x,y]);if(!w)return null;const C=(0,d.sprintf)((0,d.__)("Currently selected font size: %s"),_.name),P="components-font-size-picker";return(0,s.createElement)("fieldset",a({className:P},t?{}:{ref:t}),(0,s.createElement)(Un,{as:"legend"},(0,d.__)("Font size")),(0,s.createElement)(Tp,{justify:"space-between",className:`${P}__header`},(0,s.createElement)(yp,null,(0,d.__)("Size"),S&&(0,s.createElement)("span",{className:`${P}__header__hint`},S)),!l&&(0,s.createElement)(yp,null,(0,s.createElement)(Kn,{label:E?(0,d.__)("Use size preset"):(0,d.__)("Set custom size"),icon:hg,onClick:()=>{k(!E)},isPressed:E,isSmall:!0}))),(0,s.createElement)("div",{className:`${P}__controls`},!!i.length&&b&&!E&&(0,s.createElement)(NC,{className:`${P}__select`,label:(0,d.__)("Font size"),hideLabelFromVision:!0,describedBy:C,options:w,value:w.find((e=>e.key===_.slug)),onChange:e=>{let{selectedItem:t}=e;u(h?t.size:Number(t.size)),t.key===kM&&k(!0)}}),!b&&!E&&(0,s.createElement)(iM,{label:(0,d.__)("Font size"),hideLabelFromVision:!0,value:c,onChange:e=>{u(h?e:Number(e))},isBlock:!0},w.map((e=>(0,s.createElement)(xM,{key:e.key,value:e.value,label:e.label,"aria-label":e.name,showTooltip:!0})))),!f&&!l&&E&&(0,s.createElement)(Tp,{justify:"space-between",className:`${P}__custom-size-control`},(0,s.createElement)(yp,{isBlock:!0},(0,s.createElement)(I_,{label:(0,d.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:c,onChange:e=>{0!==parseFloat(e)&&e?u(h?e:parseInt(e,10)):u(void 0)},units:h?g:[]})),p&&(0,s.createElement)(yp,{isBlock:!0},(0,s.createElement)(Kn,{className:"components-color-palette__clear",disabled:void 0===c,onClick:()=>{u(void 0)},isSmall:!0,variant:"secondary"},(0,d.__)("Reset"))))),f&&(0,s.createElement)(ry,{className:`${P}__custom-input`,label:(0,d.__)("Custom Size"),value:v&&m||"",initialPosition:o,onChange:e=>{u(h?e+"px":e)},min:12,max:100}))}));var TM=function(e){let{accept:t,children:n,multiple:r=!1,onChange:o,onClick:i,render:l,...u}=e;const c=(0,s.useRef)(),d=()=>{c.current.click()},f=l?l({openFileDialog:d}):(0,s.createElement)(Kn,a({onClick:d},u),n);return(0,s.createElement)("div",{className:"components-form-file-upload"},f,(0,s.createElement)("input",{type:"file",ref:c,multiple:r,style:{display:"none"},accept:t,onChange:o,onClick:i,"data-testid":"form-file-upload-input"}))};var DM=function(e){let{className:t,checked:n,id:r,disabled:o,onChange:i=l.noop,...u}=e;const d=c()("components-form-toggle",t,{"is-checked":n,"is-disabled":o});return(0,s.createElement)("span",{className:d},(0,s.createElement)("input",a({className:"components-form-toggle__input",id:r,type:"checkbox",checked:n,onChange:i,disabled:o},u)),(0,s.createElement)("span",{className:"components-form-toggle__track"}),(0,s.createElement)("span",{className:"components-form-toggle__thumb"}))};function AM(e){let{value:t,status:n,title:r,displayTransform:o,isBorderless:i=!1,disabled:a=!1,onClickRemove:u=l.noop,onMouseEnter:p,onMouseLeave:h,messages:m,termPosition:v,termsCount:g}=e;const y=(0,f.useInstanceId)(AM),b=c()("components-form-token-field__token",{"is-error":"error"===n,"is-success":"success"===n,"is-validating":"validating"===n,"is-borderless":i,"is-disabled":a}),w=o(t),_=(0,d.sprintf)((0,d.__)("%1$s (%2$s of %3$s)"),w,v,g);return(0,s.createElement)("span",{className:b,onMouseEnter:p,onMouseLeave:h,title:r},(0,s.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${y}`},(0,s.createElement)(Un,{as:"span"},_),(0,s.createElement)("span",{"aria-hidden":"true"},w)),(0,s.createElement)(Kn,{className:"components-form-token-field__remove-token",icon:Mv,onClick:!a&&(()=>u({value:t})),label:m.remove,"aria-describedby":`components-form-token-field__token-text-${y}`}))}var RM=(0,f.createHigherOrderComponent)((e=>t=>(0,s.createElement)(e,a({},t,{speak:nv.speak,debouncedSpeak:(0,f.useDebounce)(nv.speak,500)}))),"withSpokenMessages");const NM={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class LM extends s.Component{constructor(){super(...arguments),this.state=NM,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:n}=this.props,r=!_r()(t,e.suggestions);(r||n!==e.value)&&this.updateSuggestions(r)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(NM)}onKeyDown(e){let t=!1;if(!e.defaultPrevented){switch(e.keyCode){case ev.BACKSPACE:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case ev.ENTER:t=this.addCurrentToken();break;case ev.LEFT:t=this.handleLeftArrowKey();break;case ev.UP:t=this.handleUpArrowKey();break;case ev.RIGHT:t=this.handleRightArrowKey();break;case ev.DOWN:t=this.handleDownArrowKey();break;case ev.DELETE:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case ev.SPACE:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case ev.ESCAPE:t=this.handleEscapeKey(e)}t&&e.preventDefault()}}onKeyPress(e){let t=!1;if(44===e.charCode)t=this.handleCommaKey();t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,n=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=(0,l.last)(r)||"";r.length>1&&this.addNewTokens(r.slice(0,-1)),this.setState({incompleteTokenValue:o},this.updateSuggestions),this.props.onInputChange(o)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0}))),!0}handleDownArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0}))),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState(((t,n)=>({inputOffsetFromEnd:n.value.length-Math.max(e,-1)-1})))}moveInputBeforePreviousToken(){this.setState(((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)})))}moveInputAfterNextToken(){this.setState((e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)})))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e!this.valueContainsToken(e))));if(t.length>0){const e=(0,l.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:n}=this.props;n(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter((t=>this.getTokenValue(t)!==this.getTokenValue(e)));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.incompleteTokenValue,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.suggestions,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.value,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.props.maxSuggestions,o=(arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.props.saveTransform)(e);const i=[],a=[];return 0===o.length?t=(0,l.difference)(t,n):(o=o.toLocaleLowerCase(),(0,l.each)(t,(e=>{const t=e.toLocaleLowerCase().indexOf(o);-1===n.indexOf(e)&&(0===t?i.push(e):t>0&&a.push(e))})),t=i.concat(a)),(0,l.take)(t,r)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return(0,l.some)(this.props.value,(t=>this.getTokenValue(e)===this.getTokenValue(t)))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:n}=this.state,r=n.trim().length>1,o=this.getMatchingSuggestions(n),i=o.length>0,a={isExpanded:t||r&&i};if(e&&(a.selectedSuggestionIndex=-1,a.selectedSuggestionScroll=!1),this.setState(a),r){const{debouncedSpeak:e}=this.props;e(i?(0,d.sprintf)((0,d._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",o.length),o.length):(0,d.__)("No results."),"assertive")}}renderTokensAndInput(){const e=(0,l.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,n){const r=this.getTokenValue(e),o=e.status?e.status:void 0,i=t+1,a=n.length;return(0,s.createElement)(AM,{key:"token-"+r,value:r,status:o,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==o&&this.props.disabled,messages:this.props.messages,termsCount:a,termPosition:i})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:n,placeholder:r,value:o,instanceId:i}=this.props;let a={instanceId:i,autoCapitalize:e,autoComplete:t,placeholder:0===o.length?r:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return n&&o.length>=n||(a={...a,onChange:this.onInputChange}),(0,s.createElement)(yS,a)}render(){const{disabled:e,label:t=(0,d.__)("Add item"),instanceId:n,className:r,__experimentalShowHowTo:o}=this.props,{isExpanded:i}=this.state,a=c()(r,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let l={className:"components-form-token-field",tabIndex:"-1"};const u=this.getMatchingSuggestions();return e||(l=Object.assign({},l,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),(0,s.createElement)("div",l,(0,s.createElement)("label",{htmlFor:`components-form-token-input-${n}`,className:"components-form-token-field__label"},t),(0,s.createElement)("div",{ref:this.bindTokensAndInput,className:a,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),i&&(0,s.createElement)(ES,{instanceId:n,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:u,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),o&&(0,s.createElement)("p",{id:`components-form-token-suggestions-howto-${n}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?(0,d.__)("Separate with commas, spaces, or the Enter key."):(0,d.__)("Separate with commas or the Enter key.")))}}LM.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:l.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:(0,d.__)("Item added."),removed:(0,d.__)("Item removed."),remove:(0,d.__)("Remove item"),__experimentalInvalid:(0,d.__)("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0};var FM=RM((0,f.withInstanceId)(LM));const jM=e=>{let{isSelected:t}=e;return(0,s.createElement)(i.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Circle,{cx:"4",cy:"4",r:"4",fill:t?"#419ECD":"#E1E3E6"}))};function BM(e){let{currentPage:t,numberOfPages:n,setCurrentPage:r}=e;return(0,s.createElement)("ul",{className:"components-guide__page-control","aria-label":(0,d.__)("Guide controls")},(0,l.times)(n,(e=>(0,s.createElement)("li",{key:e,"aria-current":e===t?"step":void 0},(0,s.createElement)(Kn,{key:e,icon:(0,s.createElement)(jM,{isSelected:e===t}),"aria-label":(0,d.sprintf)((0,d.__)("Page %1$d of %2$d"),e+1,n),onClick:()=>r(e)})))))}function zM(e){let{children:t,className:n,contentLabel:r,finishButtonText:o,onFinish:i,pages:a=[]}=e;const l=(0,s.useRef)(),[u,f]=(0,s.useState)(0);(0,s.useEffect)((()=>{s.Children.count(t)&&ze()("Passing children to ",{since:"5.5",alternative:"the `pages` prop"})}),[t]),(0,s.useEffect)((()=>{var e,t;null===(e=Re.focus.tabbable.find(l.current))||void 0===e||null===(t=e[0])||void 0===t||t.focus()}),[u]),s.Children.count(t)&&(a=s.Children.map(t,(e=>({content:e}))));const p=u>0,h=u{p&&f(u-1)},v=()=>{h&&f(u+1)};return 0===a.length?null:(0,s.createElement)(DS,{className:c()("components-guide",n),contentLabel:r,onRequestClose:i,onKeyDown:e=>{e.keyCode===ev.LEFT?m():e.keyCode===ev.RIGHT&&v()},ref:l},(0,s.createElement)("div",{className:"components-guide__container"},(0,s.createElement)("div",{className:"components-guide__page"},a[u].image,a.length>1&&(0,s.createElement)(BM,{currentPage:u,numberOfPages:a.length,setCurrentPage:f}),a[u].content),(0,s.createElement)("div",{className:"components-guide__footer"},p&&(0,s.createElement)(Kn,{className:"components-guide__back-button",onClick:m},(0,d.__)("Previous")),h&&(0,s.createElement)(Kn,{className:"components-guide__forward-button",onClick:v},(0,d.__)("Next")),!h&&(0,s.createElement)(Kn,{className:"components-guide__finish-button",onClick:i},o||(0,d.__)("Finish")))))}function VM(e){return(0,s.useEffect)((()=>{ze()("",{since:"5.5",alternative:"the `pages` prop in "})}),[]),(0,s.createElement)("div",e)}var HM=(0,s.forwardRef)((function(e,t){let{labelPosition:n,size:r,tooltip:o,label:i,...l}=e;return ze()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,s.createElement)(Kn,a({},l,{ref:t,tooltipPosition:n,iconSize:r,showTooltip:void 0!==o?!!o:void 0,label:o||i}))}));var WM=On((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...a}=Pn(e,"Item"),{spacedAround:l,size:u}=hk(),c=i||u,d=t||(void 0!==r?"button":"div"),f=Cn(),p=(0,s.useMemo)((()=>f("button"===d&&ek,fk[c]||fk.medium,nk,l&&ak,n)),[d,n,f,c,l]),h=f(tk);return{as:d,className:p,onClick:r,wrapperClassName:h,role:o,...a}}(e);return(0,s.createElement)("div",{role:n,className:r},(0,s.createElement)(Wn,a({},o,{ref:t})))}),"Item");function UM(e){let{target:t,callback:n,shortcut:r,bindGlobal:o,eventName:i}=e;return(0,f.useKeyboardShortcut)(r,n,{bindGlobal:o,target:t,eventName:i}),null}var $M=function(e){let{children:t,shortcuts:n,bindGlobal:r,eventName:o}=e;const i=(0,s.useRef)(),a=(0,l.map)(n,((e,t)=>(0,s.createElement)(UM,{key:t,shortcut:t,callback:e,bindGlobal:r,eventName:o,target:i})));return s.Children.count(t)?(0,s.createElement)("div",{ref:i},a,t):a};var KM=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,f.useInstanceId)(e);if(!s.Children.count(n))return null;const l=`components-menu-group-label-${a}`,u=c()(r,"components-menu-group",{"has-hidden-separator":i});return(0,s.createElement)("div",{className:u},o&&(0,s.createElement)("div",{className:"components-menu-group__label",id:l,"aria-hidden":"true"},o),(0,s.createElement)("div",{role:"group","aria-labelledby":o?l:null},n))};var GM=(0,s.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:u="right",shortcut:d,isSelected:f,role:p="menuitem",...h}=e;return o=c()("components-menu-item__button",o),r&&(n=(0,s.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,s.createElement)("span",{className:"components-menu-item__item"},n),(0,s.createElement)("span",{className:"components-menu-item__info"},r))),i&&!(0,l.isString)(i)&&(i=(0,s.cloneElement)(i,{className:c()("components-menu-items__item-icon",{"has-icon-right":"right"===u})})),(0,s.createElement)(Kn,a({ref:t,"aria-checked":"menuitemcheckbox"===p||"menuitemradio"===p?f:void 0,role:p,icon:"left"===u?i:void 0,className:o},h),(0,s.createElement)("span",{className:"components-menu-item__item"},n),(0,s.createElement)(Br,{className:"components-menu-item__shortcut",shortcut:d}),i&&"right"===u&&(0,s.createElement)(He,{icon:i}))}));function qM(e){let{choices:t=[],onHover:n=l.noop,onSelect:r,value:o}=e;return t.map((e=>{const t=o===e.value;return(0,s.createElement)(GM,{key:e.value,role:"menuitemradio",icon:t&&o_,info:e.info,isSelected:t,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{t||r(e.value)},onMouseEnter:()=>n(e.value),onMouseLeave:()=>n(null),"aria-label":e["aria-label"]},e.label)}))}var YM=(0,s.forwardRef)((function(e,t){let{eventToOffset:n,...r}=e;return(0,s.createElement)(Yk,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:e=>{const{keyCode:t,shiftKey:r}=e;return ev.TAB===t?r?-1:1:n?n(e):void 0}},r))}));const XM="root",ZM=(0,s.createContext)({activeItem:void 0,activeMenu:XM,setActiveMenu:l.noop,isMenuEmpty:l.noop,navigationTree:{items:{},getItem:l.noop,addItem:l.noop,removeItem:l.noop,menus:{},getMenu:l.noop,addMenu:l.noop,removeMenu:l.noop,childMenu:{},traverseMenu:l.noop,isMenuEmpty:l.noop}}),JM=()=>(0,s.useContext)(ZM);var QM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));var eI=(0,s.forwardRef)((function e(t,n){let{className:r,onChange:o,onKeyDown:i,value:a,label:l,placeholder:u=(0,d.__)("Search"),hideLabelFromVision:p=!0,help:h,onClose:m}=t;const v=(0,f.useInstanceId)(e),g=function(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((e=>{e&&("function"==typeof e?e(r.current):e.current=r.current)}))}),[t]),r}(n),y=`components-search-control-${v}`;return(0,s.createElement)(gv,{label:l,id:y,hideLabelFromVision:p,help:h,className:c()(r,"components-search-control")},(0,s.createElement)("div",{className:"components-search-control__input-wrapper"},(0,s.createElement)("input",{ref:g,className:"components-search-control__input",id:y,type:"search",placeholder:u,onChange:e=>o(e.target.value),onKeyDown:i,autoComplete:"off",value:a||""}),(0,s.createElement)("div",{className:"components-search-control__icon"},m?(0,s.createElement)(Kn,{icon:Mv,label:(0,d.__)("Close search"),onClick:m}):a?(0,s.createElement)(Kn,{icon:Mv,label:(0,d.__)("Reset search"),onClick:()=>{o(""),g.current.focus()}}):(0,s.createElement)(wg,{icon:QM}))))}));const tI=Vn("div",{target:"ejwewyf11"})("width:100%;box-sizing:border-box;padding:0 ",xp(4),";overflow:hidden;"),nI=Vn("div",{target:"ejwewyf10"})("margin-top:",xp(6),";margin-bottom:",xp(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",xp(6),";}.components-navigation__group+.components-navigation__group{margin-top:",xp(6),";}"),rI=Vn(Kn,{target:"ejwewyf9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),oI=Vn("div",{target:"ejwewyf8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),iI=Vn("span",{target:"ejwewyf7"})("height:",xp(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",xp(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),aI=Vn(eI,{target:"ejwewyf6"})({name:"za3n3e",styles:"input[type='search'].components-search-control__input{margin:0;background:#303030;color:#fff;&:focus{background:#434343;color:#fff;}&::placeholder{color:rgba( 255, 255, 255, 0.6 );}}svg{fill:white;}.components-button.has-icon{padding:0;min-width:auto;}"}),sI=Vn(l_,{target:"ejwewyf5"})("min-height:",xp(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",xp(2),";padding:",(()=>(0,d.isRTL)()?`${xp(1)} ${xp(4)} ${xp(1)} ${xp(2)}`:`${xp(1)} ${xp(2)} ${xp(1)} ${xp(4)}`),";"),lI=Vn("li",{target:"ejwewyf4"})("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",xp(2)," ",xp(4),";",Mp({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",Bo.theme,";color:",Io.white,";>button,>a{color:",Io.white,";opacity:1;}}>svg path{color:",To.lightGray.ui,";}"),uI=Vn("div",{target:"ejwewyf3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",xp(1.5)," ",xp(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),cI=Vn("span",{target:"ejwewyf2"})("display:flex;margin-right:",xp(2),";"),dI=Vn("span",{target:"ejwewyf1"})("margin-left:",(()=>(0,d.isRTL)()?"0":xp(2)),";margin-right:",(()=>(0,d.isRTL)()?xp(2):"0"),";display:inline-flex;padding:",xp(1)," ",xp(3),";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}",Vo("animation"),";"),fI=Vn(sh,{target:"ejwewyf0"})((()=>(0,d.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;"),pI=()=>{const[e,t]=(0,s.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>t((t=>({...t,[e]:(0,l.omit)(n,"children")}))),removeNode:e=>t((t=>(0,l.omit)(t,e)))}};function hI(e){let{activeItem:t,activeMenu:n=XM,children:r,className:o,onActivateMenu:i=l.noop}=e;const[a,u]=(0,s.useState)(n),[f,p]=(0,s.useState)(),h=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=pI(),{nodes:o,getNode:i,addNode:a,removeNode:l}=pI(),[u,c]=(0,s.useState)({}),d=e=>u[e]||[],f=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{c((n=>{const r={...n};return r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r})),a(e,t)},removeMenu:l,childMenu:u,traverseMenu:f,isMenuEmpty:e=>{let t=!0;return f(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),m=(0,d.isRTL)()?"right":"left",v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;h.getMenu(e)&&(p(t),u(e),i(e))},g=(0,s.useRef)(!1);(0,s.useEffect)((()=>{g.current||(g.current=!0)}),[]),(0,s.useEffect)((()=>{n!==a&&v(n)}),[n]);const y={activeItem:t,activeMenu:a,setActiveMenu:v,navigationTree:h},b=c()("components-navigation",o),w=Mr({type:"slide-in",origin:f});return(0,s.createElement)(tI,{className:b},(0,s.createElement)("div",{key:a,className:c()({[w]:g.current&&f})},(0,s.createElement)(ZM.Provider,{value:y},r)))}var mI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var vI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gI=(0,s.forwardRef)((function(e,t){var n;let{backButtonLabel:r,className:o,href:i,onClick:a,parentMenu:l}=e;const{setActiveMenu:u,navigationTree:f}=JM(),p=c()("components-navigation__back-button",o),h=null===(n=f.getMenu(l))||void 0===n?void 0:n.title,m=(0,d.isRTL)()?mI:vI;return(0,s.createElement)(rI,{className:p,href:i,variant:"tertiary",ref:t,onClick:e=>{"function"==typeof a&&a(e);const t=(0,d.isRTL)()?"left":"right";l&&!e.defaultPrevented&&u(l,t)}},(0,s.createElement)(wg,{icon:m}),r||h||(0,d.__)("Back"))}));const yI=(0,s.createContext)({group:void 0});function bI(e){let{children:t,className:n,title:r}=e;const[o]=(0,s.useState)((0,l.uniqueId)("group-")),{navigationTree:{items:i}}=JM(),a={group:o};if(!(0,l.find)(i,{group:o,_isVisible:!0}))return(0,s.createElement)(yI.Provider,{value:a},t);const u=`components-navigation__group-title-${o}`,d=c()("components-navigation__group",n);return(0,s.createElement)(yI.Provider,{value:a},(0,s.createElement)("li",{className:d},r&&(0,s.createElement)(sI,{className:"components-navigation__group-title",id:u,level:3},r),(0,s.createElement)("ul",{"aria-labelledby":u,role:"group"},t)))}function wI(e){const{badge:t,title:n}=e;return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(fI,{className:"components-navigation__item-title",variant:"body.small",as:"span"},n),t&&(0,s.createElement)(dI,{className:"components-navigation__item-badge"},t))}const _I=(0,s.createContext)({menu:void 0,search:""}),xI=()=>(0,s.useContext)(_I),EI=e=>(0,l.deburr)(e).replace(/^\//,"").toLowerCase(),kI=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=JM(),{group:i}=(0,s.useContext)(yI),{menu:a,search:l}=xI();(0,s.useEffect)((()=>{const s=n===a,u=!l||((e,t)=>-1!==EI(e).indexOf(EI(t)))(t.title,l);return r(e,{...t,group:i,menu:a,_isVisible:s&&u}),()=>{o(e)}}),[n,l])};function SI(e){var t;const{children:n,className:r,...o}=e,[i]=(0,s.useState)((0,l.uniqueId)("item-"));kI(i,e);const{navigationTree:u}=JM();if(null===(t=u.getItem(i))||void 0===t||!t._isVisible)return null;const d=c()("components-navigation__item",r);return(0,s.createElement)(lI,a({className:d},o),n)}function CI(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:u,onClick:f=l.noop,title:p,icon:h,hideIfTargetMenuEmpty:m,isText:v,...g}=e,{activeItem:y,setActiveMenu:b,navigationTree:{isMenuEmpty:w}}=JM();if(m&&u&&w(u))return null;const _=i&&y===i,x=c()(r,{"is-active":_}),E=(0,d.isRTL)()?vI:mI,k=n?e:{...e,onClick:void 0},S=v?g:{as:Kn,href:o,onClick:e=>{u&&b(u),f(e)},"aria-current":_?"page":void 0,...g};return(0,s.createElement)(SI,a({},k,{className:x}),n||(0,s.createElement)(uI,S,h&&(0,s.createElement)(cI,null,(0,s.createElement)(wg,{icon:h})),(0,s.createElement)(wI,{title:p,badge:t}),u&&(0,s.createElement)(wg,{icon:E})))}var PI=RM((function(e){let{debouncedSpeak:t,onCloseSearch:n,onSearch:r,search:o,title:i}=e;const{navigationTree:{items:a}}=JM(),{menu:u}=xI(),c=(0,s.useRef)();(0,s.useEffect)((()=>{const e=setTimeout((()=>{c.current.focus()}),100);return()=>{clearTimeout(e)}}),[]),(0,s.useEffect)((()=>{if(!o)return;const e=(0,l.filter)(a,"_isVisible").length,n=(0,d.sprintf)((0,d._n)("%d result found.","%d results found.",e),e);t(n)}),[a,o]);const f=()=>{r(""),n()},p=`components-navigation__menu-title-search-${u}`,h=(0,d.sprintf)((0,d.__)("Search %s"),null==i?void 0:i.toLowerCase()).trim();return(0,s.createElement)("div",{className:"components-navigation__menu-title-search"},(0,s.createElement)(aI,{autoComplete:"off",className:"components-navigation__menu-search-input",id:p,onChange:e=>r(e),onKeyDown:function(e){e.keyCode!==ev.ESCAPE||e.defaultPrevented||(e.preventDefault(),f())},placeholder:h,onClose:f,ref:c,type:"search",value:o}))}));function OI(e){let{hasSearch:t,onSearch:n,search:r,title:o,titleAction:i}=e;const[a,l]=(0,s.useState)(!1),{menu:u}=xI(),c=(0,s.useRef)();if(!o)return null;const f=`components-navigation__menu-title-${u}`,p=(0,d.sprintf)((0,d.__)("Search in %s"),o);return(0,s.createElement)(oI,{className:"components-navigation__menu-title"},!a&&(0,s.createElement)(sI,{as:"h2",className:"components-navigation__menu-title-heading",level:3},(0,s.createElement)("span",{id:f},o),(t||i)&&(0,s.createElement)(iI,null,i,t&&(0,s.createElement)(Kn,{isSmall:!0,variant:"tertiary",label:p,onClick:()=>l(!0),ref:c},(0,s.createElement)(wg,{icon:QM})))),a&&(0,s.createElement)("div",{className:Mr({type:"slide-in",origin:"left"})},(0,s.createElement)(PI,{onCloseSearch:()=>{l(!1),setTimeout((()=>{c.current.focus()}),100)},onSearch:n,search:r,title:o})))}function MI(e){let{search:t}=e;const{navigationTree:{items:n}}=JM(),r=(0,l.filter)(n,"_isVisible").length;return!t||r?null:(0,s.createElement)(lI,null,(0,s.createElement)(uI,null,(0,d.__)("No results found.")," "))}function II(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=XM,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:f,title:p,titleAction:h}=e,[m,v]=(0,s.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=JM(),r=e.menu||XM;(0,s.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:g}=JM(),y={menu:i,search:m};if(g!==i)return(0,s.createElement)(_I.Provider,{value:y},n);const b=!!l,w=b?d:m,_=b?l:v,x=`components-navigation__menu-title-${i}`,E=c()("components-navigation__menu",r);return(0,s.createElement)(_I.Provider,{value:y},(0,s.createElement)(nI,{className:E},(u||a)&&(0,s.createElement)(gI,{backButtonLabel:t,parentMenu:u,onClick:a}),p&&(0,s.createElement)(OI,{hasSearch:o,onSearch:_,search:w,title:p,titleAction:h}),(0,s.createElement)(Xk,null,(0,s.createElement)("ul",{"aria-labelledby":x},n,w&&!f&&(0,s.createElement)(MI,{search:w})))))}const TI=(0,s.createContext)({location:{},goTo:()=>{},goBack:()=>{}});var DI={name:"15bx5k",styles:"overflow-x:hidden"};const AI=On((function(e,t){const{initialPath:n,children:r,className:o,...i}=Pn(e,"NavigatorProvider"),[l,u]=(0,s.useState)([{path:n}]),c=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u([...l,{...t,path:e,isBack:!1}])}),[l]),d=(0,s.useCallback)((()=>{l.length>1&&u([...l.slice(0,-2),{...l[l.length-2],isBack:!0}])}),[l]),f=(0,s.useMemo)((()=>({location:{...l[l.length-1],isInitial:1===l.length},goTo:c,goBack:d})),[l,c,d]),p=Cn(),h=(0,s.useMemo)((()=>p(DI,o)),[o,p]);return(0,s.createElement)(Wn,a({ref:t,className:h},i),(0,s.createElement)(TI.Provider,{value:f},r))}),"NavigatorProvider");var RI=AI,NI=window.wp.escapeHtml;var LI={name:"14x3t6z",styles:"overflow-x:auto;max-height:100%"};const FI=On((function(e,t){const{children:n,className:r,path:o,...i}=Pn(e,"NavigatorScreen"),l=(0,f.useReducedMotion)(),{location:u}=(0,s.useContext)(TI),c=u.path===(0,NI.escapeAttribute)(o),p=(0,s.useRef)(null),h=(0,f.usePrevious)(u),m=Cn(),v=(0,s.useMemo)((()=>m(LI,r)),[r,m]),g=u.isInitial&&!u.isBack;(0,s.useEffect)((()=>{if(g||!c||!p.current)return;let e=null;if(u.isBack&&null!=h&&h.focusTargetSelector&&(e=p.current.querySelector(h.focusTargetSelector)),!e){const t=Re.focus.tabbable.find(p.current)[0];e=null!=t?t:p.current}e.focus()}),[g,c]);const y=(0,f.useMergeRefs)([t,p]);if(!c)return null;if(l)return(0,s.createElement)(Wn,a({ref:y,className:v},i),n);const b={opacity:1,transition:{delay:0,duration:.14,ease:"easeInOut"},x:0},w={opacity:0,x:(0,d.isRTL)()&&u.isBack||!(0,d.isRTL)()&&!u.isBack?50:-50},_={animate:b,exit:{delay:0,opacity:0,x:!(0,d.isRTL)()&&u.isBack||(0,d.isRTL)()&&!u.isBack?50:-50,transition:{duration:.14,ease:"easeInOut"}},initial:w};return(0,s.createElement)(up.div,a({ref:y,className:v},i,_),n)}),"NavigatorScreen");var jI=FI;var BI=function(){const{location:e,goTo:t,goBack:n}=(0,s.useContext)(TI);return{location:e,goTo:t,goBack:n}};var zI=On((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=Kn,attributeName:o="id",...i}=Pn(e,"NavigatorButton"),a=(0,NI.escapeAttribute)(t),{goTo:l}=BI();return{as:r,onClick:(0,s.useCallback)((e=>{var t,r;e.preventDefault(),l(a,{focusTargetSelector:(t=o,r=a,`[${t}="${r}"]`)}),null==n||n(e)}),[l,n]),...i,[o]:a}}(e);return(0,s.createElement)(Wn,a({ref:t},n))}),"NavigatorButton");var VI=On((function(e,t){const n=function(e){const{onClick:t,as:n=Kn,...r}=Pn(e,"NavigatorBackButton"),{goBack:o}=BI();return{as:n,onClick:(0,s.useCallback)((e=>{e.preventDefault(),o(),null==t||t(e)}),[o,t]),...r}}(e);return(0,s.createElement)(Wn,a({ref:t},n))}),"NavigatorBackButton");function HI(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}var WI=function(e){let{className:t,status:n="info",children:r,spokenMessage:o=r,onRemove:i=l.noop,isDismissible:a=!0,actions:u=[],politeness:f=HI(n),__unstableHTML:p,onDismiss:h=l.noop}=e;!function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,nv.speak)(n,t)}),[n,t])}(o,f);const m=c()(t,"components-notice","is-"+n,{"is-dismissible":a});return p&&(r=(0,s.createElement)(s.RawHTML,null,r)),(0,s.createElement)("div",{className:m},(0,s.createElement)("div",{className:"components-notice__content"},r,(0,s.createElement)("div",{className:"components-notice__actions"},u.map(((e,t)=>{let{className:n,label:r,isPrimary:o,variant:i,noDefaultClasses:a=!1,onClick:l,url:u}=e,d=i;return"primary"===i||a||(d=u?"link":"secondary"),void 0===d&&o&&(d="primary"),(0,s.createElement)(Kn,{key:t,href:u,variant:d,onClick:u?void 0:l,className:c()("components-notice__action",n)},r)})))),a&&(0,s.createElement)(Kn,{className:"components-notice__dismiss",icon:Ne,label:(0,d.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),h(),i()},showTooltip:!1}))};var UI=function(e){let{notices:t,onRemove:n=l.noop,className:r,children:o}=e;const i=e=>()=>n(e);return r=c()("components-notice-list",r),(0,s.createElement)("div",{className:r},o,[...t].reverse().map((e=>(0,s.createElement)(WI,a({},(0,l.omit)(e,["content"]),{key:e.id,onRemove:i(e.id)}),e.content))))};var $I=function(e){let{label:t,children:n}=e;return(0,s.createElement)("div",{className:"components-panel__header"},t&&(0,s.createElement)("h2",null,t),n)};var KI=(0,s.forwardRef)((function(e,t){let{header:n,className:r,children:o}=e;const i=c()(r,"components-panel");return(0,s.createElement)("div",{className:i,ref:t},n&&(0,s.createElement)($I,{label:n}),o)}));var GI=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));const qI=(0,s.forwardRef)(((e,t)=>{let{isOpened:n,icon:r,title:o,...i}=e;return o?(0,s.createElement)("h2",{className:"components-panel__body-title"},(0,s.createElement)(Kn,a({className:"components-panel__body-toggle","aria-expanded":n,ref:t},i),(0,s.createElement)("span",{"aria-hidden":"true"},(0,s.createElement)(He,{className:"components-panel__arrow",icon:n?GI:_g})),o,r&&(0,s.createElement)(He,{icon:r,className:"components-panel__icon",size:20}))):null})),YI=(0,s.forwardRef)((function(e,t){let{buttonProps:n={},children:r,className:o,icon:i,initialOpen:u,onToggle:d=l.noop,opened:p,title:h,scrollAfterOpen:m=!0}=e;const[v,g]=Pg(p,{initial:void 0===u||u}),y=(0,s.useRef)(),b=(0,f.useReducedMotion)()?"auto":"smooth",w=(0,s.useRef)();w.current=m,zm((()=>{var e;v&&w.current&&null!==(e=y.current)&&void 0!==e&&e.scrollIntoView&&y.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:b})}),[v,b]);const _=c()("components-panel__body",o,{"is-opened":v});return(0,s.createElement)("div",{className:_,ref:(0,f.useMergeRefs)([y,t])},(0,s.createElement)(qI,a({icon:i,isOpened:v,onClick:e=>{e.preventDefault();const t=!v;g(t),d(t)},title:h},n)),"function"==typeof r?r({opened:v}):v&&r)}));YI.displayName="PanelBody";var XI=YI;const ZI=(0,s.forwardRef)(((e,t)=>{let{className:n,children:r}=e;return(0,s.createElement)("div",{className:c()("components-panel__row",n),ref:t},r)}));var JI=ZI;var QI=function(e){let{icon:t,children:n,label:r,instructions:o,className:i,notices:l,preview:u,isColumnLayout:d,...p}=e;const[h,{width:m}]=(0,f.useResizeObserver)();let v;"number"==typeof m&&(v={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});const g=c()("components-placeholder",i,v),y=c()("components-placeholder__fieldset",{"is-column-layout":d});return(0,s.createElement)("div",a({},p,{className:g}),h,l,u&&(0,s.createElement)("div",{className:"components-placeholder__preview"},u),(0,s.createElement)("div",{className:"components-placeholder__label"},(0,s.createElement)(He,{icon:t}),r),(0,s.createElement)("fieldset",{className:y},!!o&&(0,s.createElement)("legend",{className:"components-placeholder__instructions"},o),n))};function eT(e){const t=e.map((e=>({children:[],parent:null,...e}))),n=(0,l.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}function tT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,l.flatMap)(e,(e=>[{value:e.id,label:(0,l.repeat)(" ",3*t)+(0,l.unescape)(e.name)},...tT(e.children||[],t+1)]))}function nT(e){let{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i,...u}=e;const c=(0,s.useMemo)((()=>(0,l.compact)([n&&{value:"",label:n},...tT(i)])),[n,i]);return(0,s.createElement)(Sg,a({label:t,options:c,onChange:r,value:o},u))}function rT(e){let{label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...l}=e;const u=(0,s.useMemo)((()=>eT(r)),[r]);return(0,s.createElement)(nT,a({label:t,noOptionLabel:n,onChange:i,tree:u,selectedId:o},l))}function oT(e){let{label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}=e;if(!r)return null;const a=eT(r);return(0,s.createElement)(nT,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:o})}const iT=1,aT=100;function sT(e){let{authorList:t,selectedAuthorId:n,categoriesList:r,selectedCategoryId:o,categorySuggestions:i,selectedCategories:a,numberOfItems:l,order:u,orderBy:c,maxItems:f=aT,minItems:p=iT,onCategoryChange:h,onAuthorChange:m,onNumberOfItemsChange:v,onOrderChange:g,onOrderByChange:y}=e;return[g&&y&&(0,s.createElement)(Sg,{key:"query-controls-order-select",label:(0,d.__)("Order by"),value:`${c}/${u}`,options:[{label:(0,d.__)("Newest to oldest"),value:"date/desc"},{label:(0,d.__)("Oldest to newest"),value:"date/asc"},{label:(0,d.__)("A → Z"),value:"title/asc"},{label:(0,d.__)("Z → A"),value:"title/desc"}],onChange:e=>{const[t,n]=e.split("/");n!==u&&g(n),t!==c&&y(t)}}),r&&h&&(0,s.createElement)(rT,{key:"query-controls-category-select",categoriesList:r,label:(0,d.__)("Category"),noOptionLabel:(0,d.__)("All"),selectedCategoryId:o,onChange:h}),i&&h&&(0,s.createElement)(FM,{key:"query-controls-categories-select",label:(0,d.__)("Categories"),value:a&&a.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(i),onChange:h,maxSuggestions:20}),m&&(0,s.createElement)(oT,{key:"query-controls-author-select",authorList:t,label:(0,d.__)("Author"),noOptionLabel:(0,d.__)("All"),selectedAuthorId:n,onChange:m}),v&&(0,s.createElement)(ry,{key:"query-controls-range-control",label:(0,d.__)("Number of items"),value:l,onChange:v,min:p,max:f,required:!0})]}var lT=(0,s.createContext)({state:null,setState:()=>{}});var uT=(0,s.forwardRef)((function(e,t){let{children:n,value:r,...o}=e;const i=(0,s.useContext)(lT),l=i.state===r;return(0,s.createElement)(uM,a({ref:t,as:Kn,variant:l?"primary":"secondary",value:r},i,o),n||r)}));var cT=(0,s.forwardRef)((function(e,t){let{label:n,checked:r,defaultChecked:o,disabled:i,onChange:l,...u}=e;const c=GO({state:o,baseId:u.id}),d={...c,disabled:i,state:null!=r?r:c.state,setState:null!=l?l:c.setState};return(0,s.createElement)(lT.Provider,{value:d},(0,s.createElement)(XO,a({ref:t,as:Zx,"aria-label":n},c,u)))}));function dT(e){let{label:t,className:n,selected:r,help:o,onChange:i,hideLabelFromVision:u,options:d=[],...p}=e;const h=`inspector-radio-control-${(0,f.useInstanceId)(dT)}`,m=e=>i(e.target.value);return!(0,l.isEmpty)(d)&&(0,s.createElement)(gv,{label:t,id:h,hideLabelFromVision:u,help:o,className:c()(n,"components-radio-control")},d.map(((e,t)=>(0,s.createElement)("div",{key:`${h}-${t}`,className:"components-radio-control__option"},(0,s.createElement)("input",a({id:`${h}-${t}`,className:"components-radio-control__input",type:"radio",name:h,value:e.value,onChange:m,checked:e.value===r,"aria-describedby":o?`${h}__help`:void 0},p)),(0,s.createElement)("label",{htmlFor:`${h}-${t}`},e.label)))))}var fT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pT=function(){return pT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{c||(f(!1),h(!1))};(0,s.useEffect)((()=>{if(!(null!==m||null!==v))return;const e=m!==y.current,t=v!==g.current;if(e||t){if(m&&!y.current&&v&&!g.current)return y.current=m,void(g.current=v);e&&(f(!0),y.current=m),t&&(h(!0),g.current=v),r({width:m,height:v}),b.current&&DT(b.current),b.current=AT(w,n)}}),[m,v]);const _=function(e){let{axis:t,height:n,moveX:r=!1,moveY:o=!1,position:i=RT.bottom,showPx:a=!1,width:s}=e;if(!r&&!o)return;if(i===RT.corner)return`${s} x ${n}`;const l=a?" px":"";if(t){if("x"===t&&r)return`${s}${l}`;if("y"===t&&o)return`${n}${l}`}if(r&&o)return`${s} x ${n}`;if(r)return`${s}${l}`;if(o)return`${n}${l}`;return}({axis:t,height:v,moveX:d,moveY:p,position:o,showPx:i,width:m});return{label:_,resizeListener:a}}const LT=Vn("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),FT=Vn("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),jT=Vn("div",{target:"ekdag501"})("background:",zo.ui.border,";border-radius:2px;box-sizing:border-box;font-size:12px;color:",zo.ui.textDark,";padding:4px 8px;position:relative;"),BT=Vn(sh,{target:"ekdag500"})("&&&{color:",zo.ui.textDark,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const zT=(0,s.forwardRef)((function(e,t){let{label:n,position:r=RT.corner,zIndex:o=1e3,...i}=e;const l=!!n,u=r===RT.bottom,c=r===RT.corner;if(!l)return null;let f={opacity:l?1:void 0,zIndex:o},p={};return u&&(f={...f,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},p={transform:"translate(0, 100%)"}),c&&(f={...f,position:"absolute",top:4,right:(0,d.isRTL)()?void 0:4,left:(0,d.isRTL)()?4:void 0}),(0,s.createElement)(FT,a({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:t,style:f},i),(0,s.createElement)(jT,{className:"components-resizable-tooltip__tooltip",style:p},(0,s.createElement)(BT,{as:"span"},n)))}));var VT=zT;const HT=(0,s.forwardRef)((function(e,t){let{axis:n,className:r,fadeTimeout:o=180,isVisible:i=!0,labelRef:u,onResize:d=l.noop,position:f=RT.bottom,showPx:p=!0,zIndex:h=1e3,...m}=e;const{label:v,resizeListener:g}=NT({axis:n,fadeTimeout:o,onResize:d,showPx:p,position:f});if(!i)return null;const y=c()("components-resize-tooltip",r);return(0,s.createElement)(LT,a({"aria-hidden":"true",className:y,ref:t},m),g,(0,s.createElement)(VT,{"aria-hidden":m["aria-hidden"],label:v,position:f,ref:u,zIndex:h}))}));var WT=HT;const UT="components-resizable-box__handle",$T="components-resizable-box__side-handle",KT="components-resizable-box__corner-handle",GT={top:c()(UT,$T,"components-resizable-box__handle-top"),right:c()(UT,$T,"components-resizable-box__handle-right"),bottom:c()(UT,$T,"components-resizable-box__handle-bottom"),left:c()(UT,$T,"components-resizable-box__handle-left"),topLeft:c()(UT,KT,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:c()(UT,KT,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:c()(UT,KT,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:c()(UT,KT,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},qT={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},YT={top:qT,right:qT,bottom:qT,left:qT,topLeft:qT,topRight:qT,bottomRight:qT,bottomLeft:qT};var XT=(0,s.forwardRef)((function(e,t){let{className:n,children:r,showHandle:o=!0,__experimentalShowTooltip:i=!1,__experimentalTooltipProps:l={},...u}=e;return(0,s.createElement)(TT,a({className:c()("components-resizable-box__container",o&&"has-show-handle",n),handleClasses:GT,handleStyles:YT,ref:t},u),r,i&&(0,s.createElement)(WT,l))}));var ZT=function(e){let{naturalWidth:t,naturalHeight:n,children:r,isInline:o=!1}=e;const[i,{width:a}]=(0,f.useResizeObserver)();if(1!==s.Children.count(r))return null;const l={paddingBottom:t0&&void 0!==arguments[0]&&arguments[0];if(!h())return;const{contentDocument:a,ownerDocument:u}=l.current,{body:c}=a;if(!e&&null!==c.getAttribute("data-resizable-iframe-connected"))return;const d=(0,s.createElement)("html",{lang:u.documentElement.lang,className:r},(0,s.createElement)("head",null,(0,s.createElement)("title",null,n),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:QT}}),o.map(((e,t)=>(0,s.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,s.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:r},(0,s.createElement)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,s.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:JT}}),i.map((e=>(0,s.createElement)("script",{key:e,src:e})))));a.open(),a.write(""+(0,s.renderToString)(d)),a.close()}return(0,s.useEffect)((()=>{function e(){m(!1)}function t(e){const t=l.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(c(n.width),p(n.height))}m();const{ownerDocument:n}=l.current,{defaultView:r}=n;return l.current.addEventListener("load",e,!1),r.addEventListener("message",t),()=>{var n;null===(n=l.current)||void 0===n||n.removeEventListener("load",e,!1),r.addEventListener("message",t)}}),[]),(0,s.useEffect)((()=>{m()}),[n,r,o,i]),(0,s.useEffect)((()=>{m(!0)}),[t]),(0,s.createElement)("iframe",{ref:(0,f.useMergeRefs)([l,(0,f.useFocusableIframe)()]),title:n,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(u),height:Math.ceil(d)})}var tD=(0,s.forwardRef)((function(e,t){let{className:n,children:r,spokenMessage:o=r,politeness:i="polite",actions:a=[],onRemove:u=l.noop,icon:f=null,explicitDismiss:p=!1,onDismiss:h=l.noop,listRef:m}=e;function v(e){e&&e.preventDefault&&e.preventDefault(),m.current.focus(),h(),u()}h=h||l.noop,function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,nv.speak)(n,t)}),[n,t])}(o,i),(0,s.useEffect)((()=>{const e=setTimeout((()=>{p||(h(),u())}),1e4);return()=>clearTimeout(e)}),[h,u]);const g=c()(n,"components-snackbar",{"components-snackbar-explicit-dismiss":!!p});a&&a.length>1&&("undefined"!=typeof process&&process.env,a=[a[0]]);const y=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return(0,s.createElement)("div",{ref:t,className:g,onClick:p?l.noop:v,tabIndex:"0",role:p?"":"button",onKeyPress:p?l.noop:v,"aria-label":p?"":(0,d.__)("Dismiss this notice")},(0,s.createElement)("div",{className:y},f&&(0,s.createElement)("div",{className:"components-snackbar__icon"},f),r,a.map(((e,t)=>{let{label:n,onClick:r,url:o}=e;return(0,s.createElement)(Kn,{key:t,href:o,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),u(),t&&t(e)}(e,r),className:"components-snackbar__action"},n)})),p&&(0,s.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:v,onKeyPress:v},"✕")))}));const nD={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{stiffness:1e3,velocity:-100}}},exit:{opacity:0,transition:{duration:.5}}},rD={init:!1,open:!1,exit:!1};var oD=function(e){let{notices:t,className:n,children:r,onRemove:o=l.noop}=e;const i=(0,s.useRef)(),u=(0,f.useReducedMotion)();n=c()("components-snackbar-list",n);const d=e=>()=>o(e.id);return(0,s.createElement)("div",{className:n,tabIndex:-1,ref:i},r,(0,s.createElement)(cP,null,t.map((e=>(0,s.createElement)(up.div,{layout:!u,initial:"init",animate:"open",exit:"exit",key:e.id,variants:u?rD:nD},(0,s.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,s.createElement)(tD,a({},(0,l.omit)(e,["content"]),{onRemove:d(e),listRef:i}),e.content)))))))};const iD=(function(){var e=Zr.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}})` +var Li=function(e,t){return Li=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Li(e,t)};function Fi(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Li(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ji=function(){return ji=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Vi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Hi(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o-1||/[A-Z]/.test(e))}var Ea={};var ka=["","X","Y","Z"],Sa=["transformPerspective","x","y","z"];function Ca(e,t){return Sa.indexOf(e)-Sa.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return ka.forEach((function(t){return Sa.push(e+t)}))}));var Pa=new Set(Sa);function Oa(e){return Pa.has(e)}var Ma=new Set(["originX","originY","originZ"]);function Ia(e){return Ma.has(e)}function Ta(e,t){var n=t.layout,r=t.layoutId;return Oa(e)||Ia(e)||(n||void 0!==r)&&(!!Ea[e]||"opacity"===e)}var Da=function(e){return Boolean(null!==e&&"object"==typeof e&&e.getVelocity)},Aa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Ra(e){return e.startsWith("--")}var Na=function(e,t){return t&&"number"==typeof e?t.transform(e):e};const La=(e,t)=>n=>Math.max(Math.min(n,t),e),Fa=e=>e%1?Number(e.toFixed(5)):e,ja=/(-)?([\d]*\.?[\d])+/g,Ba=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,za=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Va(e){return"string"==typeof e}const Ha=e=>({test:t=>Va(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Wa=Ha("deg"),Ua=Ha("%"),$a=Ha("px"),Ka=Ha("vh"),Ga=Ha("vw"),qa=Object.assign(Object.assign({},Ua),{parse:e=>Ua.parse(e)/100,transform:e=>Ua.transform(100*e)}),Ya={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Xa=Object.assign(Object.assign({},Ya),{transform:La(0,1)}),Za=Object.assign(Object.assign({},Ya),{default:1});var Ja=ji(ji({},Ya),{transform:Math.round}),Qa={borderWidth:$a,borderTopWidth:$a,borderRightWidth:$a,borderBottomWidth:$a,borderLeftWidth:$a,borderRadius:$a,radius:$a,borderTopLeftRadius:$a,borderTopRightRadius:$a,borderBottomRightRadius:$a,borderBottomLeftRadius:$a,width:$a,maxWidth:$a,height:$a,maxHeight:$a,size:$a,top:$a,right:$a,bottom:$a,left:$a,padding:$a,paddingTop:$a,paddingRight:$a,paddingBottom:$a,paddingLeft:$a,margin:$a,marginTop:$a,marginRight:$a,marginBottom:$a,marginLeft:$a,rotate:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:Za,scaleX:Za,scaleY:Za,scaleZ:Za,skew:Wa,skewX:Wa,skewY:Wa,distance:$a,translateX:$a,translateY:$a,translateZ:$a,x:$a,y:$a,z:$a,perspective:$a,transformPerspective:$a,opacity:Xa,originX:qa,originY:qa,originZ:$a,zIndex:Ja,fillOpacity:Xa,strokeOpacity:Xa,numOctaves:Ja};function es(e,t,n,r){var o,i=e.style,a=e.vars,s=e.transform,l=e.transformKeys,u=e.transformOrigin;l.length=0;var c=!1,d=!1,f=!0;for(var p in t){var h=t[p];if(Ra(p))a[p]=h;else{var m=Qa[p],v=Na(h,m);if(Oa(p)){if(c=!0,s[p]=v,l.push(p),!f)continue;h!==(null!==(o=m.default)&&void 0!==o?o:0)&&(f=!1)}else Ia(p)?(u[p]=v,d=!0):i[p]=v}}c?i.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,u=void 0===l||l,c="";i.sort(Ca);for(var d=!1,f=i.length,p=0;pn=>t(e(n)),nl=(...e)=>e.reduce(tl);var rl=new Set;var ol=new WeakMap,il=new WeakMap,al=function(e){var t;null===(t=ol.get(e.target))||void 0===t||t(e)},sl=function(e){e.forEach(al)};function ll(e,t,n){var r=function(e){var t=e.root,n=Bi(e,["root"]),r=t||document;il.has(r)||il.set(r,{});var o=il.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(sl,ji({root:t},n))),o[i]}(t);return ol.set(e,n),r.observe(e),function(){ol.delete(e),r.unobserve(e)}}var ul={some:0,all:1};function cl(e,t,n,r){var o=r.root,i=r.margin,a=r.amount,s=void 0===a?"some":a,l=r.once;(0,b.useEffect)((function(){if(e){var r={root:null==o?void 0:o.current,rootMargin:i,threshold:"number"==typeof s?s:ul[s]};return ll(n.getInstance(),r,(function(e){var r,o=e.isIntersecting;if(t.isInView!==o&&(t.isInView=o,!l||o||!t.hasEnteredView)){o&&(t.hasEnteredView=!0),null===(r=n.animationState)||void 0===r||r.setActive(Is.InView,o);var i=n.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(e)}}))}}),[e,o,i,s])}function dl(e,t,n,r){var o=r.fallback,i=void 0===o||o;(0,b.useEffect)((function(){var r,o;e&&i&&("production"!==Wi&&(r="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||rl.has(r)||(console.warn(r),o&&console.warn(o),rl.add(r))),requestAnimationFrame((function(){var e;t.hasEnteredView=!0;var r=n.getProps().onViewportEnter;null==r||r(null),null===(e=n.animationState)||void 0===e||e.setActive(Is.InView,!0)})))}),[e])}var fl=function(e){return function(t){return e(t),null}},pl={inView:fl((function(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=void 0===i?{}:i,s=(0,b.useRef)({hasEnteredView:!1,isInView:!1}),l=Boolean(n||r||o);a.once&&s.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?dl:cl)(l,s.current,t,a)})),tap:fl((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||n||r||o,s=(0,b.useRef)(!1),l=(0,b.useRef)(null),u={passive:!(n||t||r||h)};function c(){var e;null===(e=l.current)||void 0===e||e.call(l),l.current=null}function d(){var e;return c(),s.current=!1,null===(e=i.animationState)||void 0===e||e.setActive(Is.Tap,!1),!Zs()}function f(e,n){d()&&(Qs(i.getInstance(),e.target)?null==t||t(e,n):null==r||r(e,n))}function p(e,t){d()&&(null==r||r(e,t))}function h(e,t){var r;c(),s.current||(s.current=!0,l.current=nl($s(window,"pointerup",f,u),$s(window,"pointercancel",p,u)),null===(r=i.animationState)||void 0===r||r.setActive(Is.Tap,!0),null==n||n(e,t))}Ks(i,"pointerdown",a?h:void 0,u),el(c)})),focus:fl((function(e){var t=e.whileFocus,n=e.visualElement;Rs(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Is.Focus,!0)}:void 0),Rs(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(Is.Focus,!1)}:void 0)})),hover:fl((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;Ks(o,"pointerenter",t||r?Js(o,!0,t):void 0,{passive:!t}),Ks(o,"pointerleave",n||r?Js(o,!1,n):void 0,{passive:!n})}))},hl=0,ml=function(){return hl++},vl=function(){return pa(ml)};function gl(){var e=(0,b.useContext)(Zi);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=vl();(0,b.useEffect)((function(){return r(o)}),[]);return!t&&n?[!1,function(){return null==n?void 0:n(o)}]:[!0]}function yl(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;rMath.min(Math.max(n,e),t),wl=.001;function _l({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,a=1-t;a=bl(.05,1,a),e=bl(.01,10,e/1e3),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=xl(t,a),l=Math.exp(-o);return wl-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=xl(Math.pow(t,2),a);return(-o(t)+wl>0?-1:1)*((i-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}function xl(e,t){return e*Math.sqrt(1-t*t)}const El=["duration","bounce"],kl=["stiffness","damping","mass"];function Sl(e,t){return t.some((t=>void 0!==e[t]))}function Cl(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:o}=e,i=Bi(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Sl(e,kl)&&Sl(e,El)){const n=_l(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}(i),p=Pl,h=Pl;function m(){const e=c?-c/1e3:0,r=n-t,i=l/(2*Math.sqrt(s*u)),a=Math.sqrt(s/u)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-t)/100,.4)),i<1){const t=xl(a,i);p=o=>{const s=Math.exp(-i*a*o);return n-s*((e+i*a*r)/t*Math.sin(t*o)+r*Math.cos(t*o))},h=n=>{const o=Math.exp(-i*a*n);return i*a*o*(Math.sin(t*n)*(e+i*a*r)/t+r*Math.cos(t*n))-o*(Math.cos(t*n)*(e+i*a*r)-t*r*Math.sin(t*n))}}else if(1===i)p=t=>n-Math.exp(-a*t)*(r+(e+a*r)*t);else{const t=a*Math.sqrt(i*i-1);p=o=>{const s=Math.exp(-i*a*o),l=Math.min(t*o,300);return n-s*((e+i*a*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return m(),{next:e=>{const t=p(e);if(f)a.done=e>=d;else{const i=1e3*h(e),s=Math.abs(i)<=r,l=Math.abs(n-t)<=o;a.done=s&&l}return a.value=a.done?n:t,a},flipTarget:()=>{c=-c,[t,n]=[n,t],m()}}}Cl.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const Pl=e=>0,Ol=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Ml=(e,t,n)=>-n*e+n*t+e,Il=(e,t)=>n=>Boolean(Va(n)&&za.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Tl=(e,t,n)=>r=>{if(!Va(r))return r;const[o,i,a,s]=r.match(ja);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Dl=La(0,255),Al=Object.assign(Object.assign({},Ya),{transform:e=>Math.round(Dl(e))}),Rl={test:Il("rgb","red"),parse:Tl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Al.transform(e)+", "+Al.transform(t)+", "+Al.transform(n)+", "+Fa(Xa.transform(r))+")"};const Nl={test:Il("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Rl.transform},Ll={test:Il("hsl","hue"),parse:Tl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ua.transform(Fa(t))+", "+Ua.transform(Fa(n))+", "+Fa(Xa.transform(r))+")"};function Fl(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 jl({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Fl(s,r,e+1/3),i=Fl(s,r,e),a=Fl(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const Bl=(e,t,n)=>{const r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},zl=[Nl,Rl,Ll],Vl=e=>zl.find((t=>t.test(e))),Hl=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,Wl=(e,t)=>{let n=Vl(e),r=Vl(t);Hl(e),Hl(t);let o=n.parse(e),i=r.parse(t);n===Ll&&(o=jl(o),n=Rl),r===Ll&&(i=jl(i),r=Rl);const a=Object.assign({},o);return e=>{for(const t in a)"alpha"!==t&&(a[t]=Bl(o[t],i[t],e));return a.alpha=Ml(o.alpha,i.alpha,e),n.transform(a)}},Ul={test:e=>Rl.test(e)||Nl.test(e)||Ll.test(e),parse:e=>Rl.test(e)?Rl.parse(e):Ll.test(e)?Ll.parse(e):Nl.parse(e),transform:e=>Va(e)?e:e.hasOwnProperty("red")?Rl.transform(e):Ll.transform(e)},$l="${c}",Kl="${n}";function Gl(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0;const r=e.match(Ba);r&&(n=r.length,e=e.replace(Ba,$l),t.push(...r.map(Ul.parse)));const o=e.match(ja);return o&&(e=e.replace(ja,Kl),t.push(...o.map(Ya.parse))),{values:t,numColors:n,tokenised:e}}function ql(e){return Gl(e).values}function Yl(e){const{values:t,numColors:n,tokenised:r}=Gl(e),o=t.length;return e=>{let t=r;for(let r=0;r"number"==typeof e?0:e;const Zl={test:function(e){var t,n,r,o;return isNaN(e)&&Va(e)&&(null!==(n=null===(t=e.match(ja))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(Ba))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:ql,createTransformer:Yl,getAnimatableNone:function(e){const t=ql(e);return Yl(e)(t.map(Xl))}},Jl=e=>"number"==typeof e;function Ql(e,t){return Jl(e)?n=>Ml(e,t,n):Ul.test(e)?Wl(e,t):ru(e,t)}const eu=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>Ql(e,t[n])));return e=>{for(let t=0;t{const n=Object.assign(Object.assign({},e),t),r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ql(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}};function nu(e){const t=Zl.parse(e),n=t.length;let r=0,o=0,i=0;for(let e=0;e{const n=Zl.createTransformer(t),r=nu(e),o=nu(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?nl(eu(r.parsed,o.parsed),n):n=>`${n>0?t:e}`},ou=(e,t)=>n=>Ml(e,t,n);function iu(e,t,n){const r=[],o=n||function(e){return"number"==typeof e?ou:"string"==typeof e?Ul.test(e)?Wl:ru:Array.isArray(e)?eu:"object"==typeof e?tu:void 0}(e[0]),i=e.length-1;for(let n=0;ne[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=iu(t,r,o),s=2===i?function([e,t],[n]){return r=>n(Ol(e,t,r))}(e,a):function(e,t){const n=e.length,r=n-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){let t=1;for(;to||t===r);t++);i=t-1}const s=Ol(e[i],e[i+1],o);return t[i](s)}}(e,a);return n?t=>s(bl(e[0],e[i-1],t)):s}const su=e=>t=>1-e(1-t),lu=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uu=e=>t=>t*t*((e+1)*t-e),cu=e=>e,du=(fu=2,e=>Math.pow(e,fu));var fu;const pu=su(du),hu=lu(du),mu=e=>1-Math.sin(Math.acos(e)),vu=su(mu),gu=lu(vu),yu=uu(1.525),bu=su(yu),wu=lu(yu),_u=(e=>{const t=uu(e);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(1.525),xu=e=>{if(1===e||0===e)return e;const t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},Eu=su(xu);function ku(e,t){return e.map((()=>t||hu)).splice(0,e.length-1)}function Su({from:e=0,to:t=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=function(e,t){return e.map((e=>e*t))}(r&&r.length===a.length?r:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(a),o);function l(){return au(s,a,{ease:Array.isArray(n)?n:ku(a,n)})}let u=l();return{next:e=>(i.value=u(e),i.done=e>=o,i),flipTarget:()=>{a.reverse(),u=l()}}}const Cu={keyframes:Su,spring:Cl,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=void 0===i?l:i(l);return u!==l&&(s=u-t),{next:e=>{const t=-s*Math.exp(-e/r);return a.done=!(t>o||t<-o),a.value=a.done?u:u+t,a},flipTarget:()=>{}}}};const Pu=1/60*1e3,Ou="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Mu="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(Ou())),Pu);let Iu=!0,Tu=!1,Du=!1;const Au={delta:0,timestamp:0},Ru=["read","update","preRender","render","postRender"],Nu=Ru.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,u=l?t:n;return i&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;nTu=!0)),e)),{}),Lu=Ru.reduce(((e,t)=>{const n=Nu[t];return e[t]=(e,t=!1,r=!1)=>(Tu||Vu(),n.schedule(e,t,r)),e}),{}),Fu=Ru.reduce(((e,t)=>(e[t]=Nu[t].cancel,e)),{}),ju=Ru.reduce(((e,t)=>(e[t]=()=>Nu[t].process(Au),e)),{}),Bu=e=>Nu[e].process(Au),zu=e=>{Tu=!1,Au.delta=Iu?Pu:Math.max(Math.min(e-Au.timestamp,40),1),Au.timestamp=e,Du=!0,Ru.forEach(Bu),Du=!1,Tu&&(Iu=!1,Mu(zu))},Vu=()=>{Tu=!0,Iu=!0,Du||Mu(zu)},Hu=()=>Au;var Wu=Lu;function Uu(e,t,n=0){return e-t-n}const $u=e=>{const t=({delta:t})=>e(t);return{start:()=>Wu.update(t,!0),stop:()=>Fu.update(t)}};function Ku(e){var t,n,{from:r,autoplay:o=!0,driver:i=$u,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:f,onRepeat:p,onUpdate:h}=e,m=Bi(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let v,g,y,{to:b}=m,w=0,_=m.duration,x=!1,E=!0;const k=function(e){if(Array.isArray(e.to))return Su;if(Cu[e.type])return Cu[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Su:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Cl:Su}(m);(null===(n=(t=k).needsInterpolation)||void 0===n?void 0:n.call(t,r,b))&&(y=au([0,100],[r,b],{clamp:!1}),r=0,b=100);const S=k(Object.assign(Object.assign({},m),{from:r,to:b}));function C(){w++,"reverse"===l?(E=w%2==0,a=function(e,t,n=0,r=!0){return r?Uu(t+-e,t,n):t-(e-t)+n}(a,_,u,E)):(a=Uu(a,_,u),"mirror"===l&&S.flipTarget()),x=!1,p&&p()}function P(e){if(E||(e=-e),a+=e,!x){const e=S.next(Math.max(0,a));g=e.value,y&&(g=y(g)),x=E?e.done:a<=0}null==h||h(g),x&&(0===w&&(null!=_||(_=a)),w=t+n:e<=-n}(a,_,u,E)&&C():(v.stop(),f&&f()))}return o&&(null==c||c(),v=i(P),v.start()),{stop:()=>{null==d||d(),v.stop()}}}function Gu(e,t){return t?e*(1e3/t):0}var qu=function(e){return 1e3*e};const Yu=(e,t)=>1-3*t+3*e,Xu=(e,t)=>3*t-6*e,Zu=e=>3*e,Ju=(e,t,n)=>((Yu(t,n)*e+Xu(t,n))*e+Zu(t))*e,Qu=(e,t,n)=>3*Yu(t,n)*e*e+2*Xu(t,n)*e+Zu(t);const ec=.1;function tc(e,t,n,r){if(e===t&&n===r)return cu;const o=new Float32Array(11);for(let t=0;t<11;++t)o[t]=Ju(t*ec,e,n);function i(t){let r=0,i=1;for(;10!==i&&o[i]<=t;++i)r+=ec;--i;const a=r+(t-o[i])/(o[i+1]-o[i])*ec,s=Qu(a,e,n);return s>=.001?function(e,t,n,r){for(let o=0;o<8;++o){const o=Qu(t,n,r);if(0===o)return t;t-=(Ju(t,n,r)-e)/o}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Ju(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+ec,e,n)}return e=>0===e||1===e?e:Ju(i(e),t,r)}var nc={linear:cu,easeIn:du,easeInOut:hu,easeOut:pu,circIn:mu,circInOut:gu,circOut:vu,backIn:yu,backInOut:wu,backOut:bu,anticipate:_u,bounceIn:Eu,bounceInOut:e=>e<.5?.5*(1-xu(1-2*e)):.5*xu(2*e-1)+.5,bounceOut:xu},rc=function(e){if(Array.isArray(e)){e.length;var t=Vi(e,4);return tc(t[0],t[1],t[2],t[3])}return"string"==typeof e?("Invalid easing type '".concat(e,"'"),nc[e]):e},oc=function(e,t){return"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Zl.test(t)||t.startsWith("url(")))},ic=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},ac=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},sc=function(){return{type:"keyframes",ease:"linear",duration:.3}},lc=function(e){return{type:"keyframes",duration:.8,values:e}},uc={x:ic,y:ic,z:ic,rotate:ic,rotateX:ic,rotateY:ic,rotateZ:ic,scaleX:ac,scaleY:ac,scale:ac,opacity:sc,backgroundColor:sc,color:sc,default:ac};const cc=new Set(["brightness","contrast","saturate","opacity"]);function dc(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ja)||[];if(!r)return e;const o=n.replace(r,"");let i=cc.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const fc=/([a-z-]*)\(.*?\)/g,pc=Object.assign(Object.assign({},Zl),{getAnimatableNone:e=>{const t=e.match(fc);return t?t.map(dc).join(" "):e}});var hc=ji(ji({},Qa),{color:Ul,backgroundColor:Ul,outlineColor:Ul,fill:Ul,stroke:Ul,borderColor:Ul,borderTopColor:Ul,borderRightColor:Ul,borderBottomColor:Ul,borderLeftColor:Ul,filter:pc,WebkitFilter:pc}),mc=function(e){return hc[e]};function vc(e,t){var n,r=mc(e);return r!==pc&&(r=Zl),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var gc=!1;function yc(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,a=Bi(e,["ease","times","yoyo","flip","loop"]),s=ji({},a);return n&&(s.offset=n),a.duration&&(s.duration=qu(a.duration)),a.repeatDelay&&(s.repeatDelay=qu(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(rc):rc(t)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(!0,r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function bc(e,t,n){var r,o,i,a;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=Hi([],Vi(e.to),!1),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Bi(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=ji(ji({},e),(o=n,i=t.to,a=ks(i)?lc:uc[o]||uc.default,ji({to:i},a(i))))),ji(ji({},t),yc(e))}function wc(e,t,n,r,o){var i,a=Ec(r,e),s=null!==(i=a.from)&&void 0!==i?i:t.get(),l=oc(e,n);"none"===s&&l&&"string"==typeof n?s=vc(e,n):_c(s)&&"string"==typeof n?s=xc(n):!Array.isArray(n)&&_c(n)&&"string"==typeof s&&(n=xc(s));var u=oc(e,s);return"You are trying to animate ".concat(e,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."),u&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function({from:e=0,velocity:t=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:p}){let h;function m(e){return void 0!==n&&er}function v(e){return void 0===n?r:void 0===r||Math.abs(n-e){var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:p}))}function y(e){g(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},e))}if(m(e))y({from:e,velocity:t,to:v(e)});else{let r=o*t+e;void 0!==u&&(r=u(r));const a=v(r),s=a===n?-1:1;let c,d;const f=e=>{c=d,d=e,t=Gu(e-c,Hu().delta),(1===s&&e>a||-1===s&&enull==h?void 0:h.stop()}}(ji(ji({},r),a)):Ku(ji(ji({},bc(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e,r,i=Ss(n);return t.set(i),o(),null===(e=null==a?void 0:a.onUpdate)||void 0===e||e.call(a,i),null===(r=null==a?void 0:a.onComplete)||void 0===r||r.call(a),{stop:function(){}}}}function _c(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function xc(e){return"number"==typeof e?0:vc("",e)}function Ec(e,t){return e[t]||e.default||e}function kc(e,t,n,r){return void 0===r&&(r={}),gc&&(r={type:!1}),t.start((function(o){var i,a,s=wc(e,t,n,r,o),l=function(e,t){var n,r;return null!==(r=null!==(n=(Ec(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(r,e),u=function(){return a=s()};return l?i=window.setTimeout(u,qu(l)):u(),function(){clearTimeout(i),null==a||a.stop()}}))}var Sc=function(e){return/^\-?\d*\.?\d+$/.test(e)},Cc=function(e){return/^0[^.\s]+$/.test(e)};function Pc(e,t){-1===e.indexOf(t)&&e.push(t)}function Oc(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Mc=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Pc(this.subscriptions,e),function(){return Oc(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;oh&&g,x=Array.isArray(v)?v:[v],E=x.reduce(a,{});!1===y&&(E={});var k=m.prevResolvedValues,S=void 0===k?{}:k,C=ji(ji({},S),E),P=function(e){_=!0,f.delete(e),m.needsAnimating[e]=!0};for(var O in C){var M=E[O],I=S[O];p.hasOwnProperty(O)||(M!==I?ks(M)&&ks(I)?!yl(M,I)||w?P(O):m.protectedKeys[O]=!0:void 0!==M?P(O):f.add(O):void 0!==M&&f.has(O)?P(O):m.protectedKeys[O]=!0)}m.prevProp=v,m.prevResolvedValues=E,m.isActive&&(p=ji(ji({},p),E)),i&&e.blockInitialAnimation&&(_=!1),_&&!b&&d.push.apply(d,Hi([],Vi(x.map((function(e){return{animation:e,options:ji({type:o},t)}}))),!1))},v=0;ve.hasOwnProperty("x")&&e.hasOwnProperty("y"),Jc=e=>Zc(e)&&e.hasOwnProperty("z"),Qc=(e,t)=>Math.abs(e-t);function ed(e,t){if(Jl(e)&&Jl(t))return Qc(e,t);if(Zc(e)&&Zc(t)){const n=Qc(e.x,t.x),r=Qc(e.y,t.y),o=Jc(e)&&Jc(t)?Qc(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var td=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=od(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=ed(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=Hu().timestamp;r.history.push(ji(ji({},o),{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=nd(t,r.transformPagePoint),Ns(e)&&0===e.buttons?r.handlePointerUp(e,t):Wu.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=od(nd(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(Ls(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=nd(zs(e),this.transformPagePoint),a=i.point,s=Hu().timestamp;this.history=[ji(ji({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,od(i,this.history)),this.removeListeners=nl($s(window,"pointermove",this.handlePointerMove),$s(window,"pointerup",this.handlePointerUp),$s(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Fu.update(this.updatePoint)},e}();function nd(e,t){return t?{point:t(e.point)}:e}function rd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function od(e,t){var n=e.point;return{point:n,delta:rd(n,ad(t)),offset:rd(n,id(t)),velocity:sd(t,.1)}}function id(e){return e[0]}function ad(e){return e[e.length-1]}function sd(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=ad(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qu(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ld(e){return e.max-e.min}function ud(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),ed(e,t)t?n="y":Math.abs(e.x)>t&&(n="x");return n}(l),void(null!==n.currentDirection&&(null==a||a(n.currentDirection)));n.updateAxis("x",t.point,l),n.updateAxis("y",t.point,l),n.visualElement.syncRender(),null==s||s(e,t)}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null==o||o(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Is.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&jd(e,r,this.currentDirection)){var o,i,a,s,l,u=this.getAxisMotionValue(e),c=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=c,i=this.constraints[e],a=this.elastic[e],s=i.min,l=i.max,void 0!==s&&ol&&(o=a?Ml(l,o,a.max):Math.min(o,l)),c=o),u.set(c)}},e.prototype.resolveConstraints=function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&oa(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:md(e.x,r,i),y:md(e.y,n,o)}}(o.actual,n),this.elastic=function(e){return void 0===e&&(e=gd),!1===e?e=0:!0===e&&(e=gd),{x:yd(e,"left","right"),y:yd(e,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&wd((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.actual[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!oa(t))return!1;var r=t.current,o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(e,t,n){var r=Nd(e,n),o=t.scroll;return o&&(Id(r.x,o.x),Id(r.y,o.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(e,t){return{x:vd(e.x,t.x),y:vd(e.y,t.y)}}(o.layout.actual,i);if(n){var s=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=_d(s))}return a},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=n.dragSnapToOrigin,l=n.onDragTransitionEnd,u=this.constraints||{},c=wd((function(n){var l;if(jd(n,r,t.currentDirection)){var c=null!==(l=null==u?void 0:u[n])&&void 0!==l?l:{};s&&(c={min:0,max:0});var d=i?200:1e6,f=i?40:1e7,p=ji(ji({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.startAxisValueAnimation(n,p)}}));return Promise.all(c).then(l)},e.prototype.startAxisValueAnimation=function(e,t){return kc(e,this.getAxisMotionValue(e),0,t)},e.prototype.stopAnimation=function(){var e=this;wd((function(t){return e.getAxisMotionValue(t).stop()}))},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;wd((function(n){if(jd(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.actual[n],a=i.min,s=i.max;o.set(e[n]-Ml(a,s,.5))}}}))},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(oa(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};wd((function(e){var n,r,o,i,s,l=t.getAxisMotionValue(e);if(l){var u=l.get();a[e]=(n={min:u,max:u},r=t.constraints[e],o=.5,i=ld(n),(s=ld(r))>i?o=Ol(r.min,r.max-i,n.min):i>s&&(o=Ol(n.min,n.max-s,r.min)),bl(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),wd((function(e){if(jd(e,r,null)){var n=t.getAxisMotionValue(e),o=t.constraints[e],i=o.min,s=o.max;n.set(Ml(i,s,a[e]))}}))}},e.prototype.addListeners=function(){var e,t=this;Ld.set(this.visualElement,this);var n=$s(this.visualElement.getInstance(),"pointerdown",(function(e){var n=t.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=function(){oa(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout()),r();var a=As(window,"resize",(function(){return t.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(wd((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.syncRender())})),function(){a(),n(),i()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?gd:u,d=e.dragMomentum,f=void 0===d||d;return ji(ji({},e),{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:f})},e}();function jd(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var Bd={pan:fl((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||n||r||o,s=(0,b.useRef)(null),l=(0,b.useContext)(Yi).transformPagePoint,u={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};(0,b.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),Ks(i,"pointerdown",a&&function(e){s.current=new td(e,u,{transformPagePoint:l})}),el((function(){return s.current&&s.current.end()}))})),drag:fl((function(e){var t=e.dragControls,n=e.visualElement,r=pa((function(){return new Fd(n)}));(0,b.useEffect)((function(){return t&&t.subscribe(r)}),[r,t]),(0,b.useEffect)((function(){return r.addListeners()}),[r])}))},zd=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Vd=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,u=e.removeValueFromRenderState,c=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(e,t){var f=e.parent,p=e.props,h=e.presenceId,m=e.blockInitialAnimation,v=e.visualState,g=e.shouldReduceMotion;void 0===t&&(t={});var y,b,w=!1,_=v.latestValues,x=v.renderState,E=function(){var e=zd.map((function(){return new Mc})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){zd.forEach((function(r){var o,i="on"+r,a=e[i];null===(o=t[r])||void 0===o||o.call(t),a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+zd[t]]=function(t){return e.add(t)},n["notify"+zd[t]]=function(){for(var t=[],n=0;n=0?window.pageYOffset:null,u=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=nf[e](r,i)})),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);Xd(r,s[n]),e[n]=nf[n](l,i)})),e}(t,e,s);return i.length&&i.forEach((function(t){var n=Vi(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),null!==l&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}return{target:t,transitionEnd:r}};function of(e,t,n,r){return function(e){return Object.keys(e).some(Yd)}(t)?rf(e,t,n,r):{target:t,transitionEnd:r}}var af=function(e,t,n,r){var o=function(e,t,n){var r,o=Bi(t,[]),i=e.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:n};for(var a in n&&(n=ji({},n)),e.forEachValue((function(e){var t=e.get();if(Ud(t)){var n=Kd(t,i);n&&e.set(n)}})),o){var s=o[a];if(Ud(s)){var l=Kd(s,i);l&&(o[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(e,t,r);return of(e,t=o.target,n,r=o.transitionEnd)};var sf={treeType:"dom",readValueFromInstance:function(e,t){if(Oa(t)){var n=mc(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(Ra(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return Nd(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,s=Bi(t,["transition","transitionEnd"]),l=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=Bc(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),r){!function(e,t,n){var r,o,i,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var u=0;u5)return o;var l=Zl.createTransformer(e),u="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+u]/=c,s[1+u]/=d;var f=Ml(c,d,.5);"number"==typeof s[2+u]&&(s[2+u]/=f),"number"==typeof s[3+u]&&(s[3+u]/=f);var p=l(s);if(i){var h=0;p=p.replace(pf,(function(){var e=a[h];return h++,e}))}return p}},mf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fi(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,s=r.projection;e=vf,Object.assign(Ea,e),s&&((null==o?void 0:o.group)&&o.group.add(s),(null==i?void 0:i.register)&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){t.safeToRemove()})),s.setOptions(ji(ji({},s.options),{onExitComplete:function(){return t.safeToRemove()}}))),ha.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,s=o.projection;return s?(s.isPresent=a,i||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||Wu.postRender((function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(o),(null==r?void 0:r.deregister)&&r.deregister(o))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null==e||e()},t.prototype.render=function(){return null},t}(b.Component);var vf={borderRadius:ji(ji({},ff),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ff,borderTopRightRadius:ff,borderBottomLeftRadius:ff,borderBottomRightRadius:ff,boxShadow:hf},gf={measureLayout:function(e){var t=Vi(gl(),2),n=t[0],r=t[1],o=(0,b.useContext)(va);return b.createElement(mf,ji({},e,{layoutGroup:o,switchLayoutGroup:(0,b.useContext)(ga),isPresent:n,safeToRemove:r}))}};var yf=["TopLeft","TopRight","BottomLeft","BottomRight"],bf=yf.length,wf=function(e){return"string"==typeof e?parseFloat(e):e},_f=function(e){return"number"==typeof e||$a.test(e)};function xf(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var Ef=Sf(0,.5,vu),kf=Sf(.5,.95,cu);function Sf(e,t,n){return function(r){return rt?1:n(Ol(e,t,r))}}function Cf(e,t){e.min=t.min,e.max=t.max}function Pf(e,t){Cf(e.x,t.x),Cf(e.y,t.y)}function Of(e,t,n,r,o){return e=Cd(e-=t,1/n,r),void 0!==o&&(e=Cd(e,1/o,r)),e}function Mf(e,t,n,r,o){var i=Vi(n,3),a=i[0],s=i[1],l=i[2];!function(e,t,n,r,o,i,a){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=e),void 0===a&&(a=e),Ua.test(t)&&(t=parseFloat(t),t=Ml(a.min,a.max,t/100)-a.min),"number"==typeof t){var s=Ml(i.min,i.max,r);e===i&&(s-=t),e.min=Of(e.min,t,n,s,o),e.max=Of(e.max,t,n,s,o)}}(e,t[a],t[s],t[l],t.scale,r,o)}var If=["x","scaleX","originX"],Tf=["y","scaleY","originY"];function Df(e,t,n,r){Mf(e.x,t,If,null==n?void 0:n.x,null==r?void 0:r.x),Mf(e.y,t,Tf,null==n?void 0:n.y,null==r?void 0:r.y)}function Af(e){return 0===e.translate&&1===e.scale}function Rf(e){return Af(e.x)&&Af(e.y)}function Nf(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Lf=function(){function e(){this.members=[]}return e.prototype.add=function(e){Pc(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(Oc(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach((function(e){var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))},e.prototype.scheduleRender=function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}();function Ff(e,t,n){var r=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),l&&(i+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===(i+="scale(".concat(u,", ").concat(c,")"))?"none":i}var jf=function(e,t){return e.depth-t.depth},Bf=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Pc(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Oc(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(jf),this.isDirty=!1,this.children.forEach(e)},e}();function zf(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function e(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=null==n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(Gf),o.nodes.forEach(qf)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=r?r.root||r:this,this.path=r?Hi(Hi([],Vi(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var i=0;i=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var o=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function np(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function rp(e){np(e.x),np(e.y)}var op=zf({attachResizeListener:function(e,t){return As(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),ip={current:void 0},ap=zf({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!ip.current){var e=new op(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),ip.current=e}return ip.current},resetTransform:function(e,t){e.style.transform=null!=t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),sp=ji(ji(ji(ji({},Xc),pl),Bd),gf),lp=wa((function(e,t){return function(e,t,n,r,o){var i=t.forwardMotionProps,a=void 0!==i&&i,s=xa(e)?Ts:Ds;return ji(ji({},s),{preloadedFeatures:n,useRender:ms(a),createVisualElement:r,projectionNodeConstructor:o,Component:e})}(e,t,sp,cf,ap)}));const up=(0,s.createContext)({flexItemDisplay:void 0});const cp={name:"zjik7",styles:"display:flex"},dp={name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"},fp={name:"82a6rk",styles:"flex:1"},pp={name:"13nosa1",styles:">*{min-height:0;}"},hp={name:"1pwxzk4",styles:">*{min-width:0;}"};function mp(e){const{className:t,display:n,isBlock:r=!1,...o}=Pn(e,"FlexItem"),i={},a=(0,s.useContext)(up).flexItemDisplay;i.Base=Xr({display:n||a},"","");return{...o,className:Cn()(dp,i.Base,r&&fp,t)}}var vp=On((function(e,t){const n=function(e){return mp({isBlock:!0,...Pn(e,"FlexBlock")})}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"FlexBlock");var gp=On((function(e,t){const n=mp(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"FlexItem");const yp=["40em","52em","64em"],bp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>yp.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${yp.length} breakpoints, got index ${t}`);const[n,r]=(0,s.useState)(t);return(0,s.useEffect)((()=>{const e=()=>{const e=yp.filter((e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches)).length;n!==e&&r(e)};return e(),"undefined"!=typeof window&&window.addEventListener("resize",e),()=>{"undefined"!=typeof window&&window.removeEventListener("resize",e)}}),[n]),n};function wp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=bp(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}function _p(e){var t,n;if(void 0===e)return;if(!e)return"0";const r="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(n=t.supports)&&void 0!==n&&n.call(t,"margin",e.toString())||Number.isNaN(r)?e.toString():`calc(4px * ${e})`}const xp=new RegExp(/-left/g),Ep=new RegExp(/-right/g),kp=new RegExp(/Left/g),Sp=new RegExp(/Right/g);function Cp(e){return"left"===e?"right":"right"===e?"left":xp.test(e)?e.replace(xp,"-right"):Ep.test(e)?e.replace(Ep,"-left"):kp.test(e)?e.replace(kp,"Right"):Sp.test(e)?e.replace(Sp,"Left"):e}const Pp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.mapKeys)(e,((e,t)=>Cp(t)))};function Op(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,d.isRTL)()?Xr(t,""):Xr(e,""):(0,d.isRTL)()?Xr(Pp(e),""):Xr(e,"")}function Mp(e){const{align:t="center",className:n,direction:r="row",expanded:o=!0,gap:i=2,justify:a="space-between",wrap:l=!1,...u}=Pn(function(e){let{isReversed:t,...n}=e;return void 0!==t?(ze()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...n,direction:t?"row-reverse":"row"}):n}(e),"Flex"),c=wp(Array.isArray(r)?r:[r]),d="string"==typeof c&&!!c.includes("column"),f="string"==typeof c&&c.includes("reverse"),p=Cn();return{...u,className:(0,s.useMemo)((()=>{const e={};return e.Base=Xr({alignItems:d?"normal":t,flexDirection:c,flexWrap:l?"wrap":void 0,justifyContent:a,height:d&&o?"100%":void 0,width:!d&&o?"100%":void 0,marginBottom:l?`calc(${_p(i)} * -1)`:void 0},"",""),e.Items=Xr(">*+*:not( marquee ){margin-top:",d?_p(i):void 0,";",Op({marginLeft:d||f?void 0:_p(i),marginRight:!d&&f?_p(i):void 0})(),";}",""),e.WrapItems=Xr(">*:not( marquee ){margin-bottom:",_p(i),";",Op({marginLeft:!d&&f?_p(i):void 0,marginRight:d||f?void 0:_p(i)})(),";}>*:last-child:not( marquee ){",Op({marginLeft:!d&&f?0:void 0,marginRight:d||f?void 0:0})(),";}",""),p(cp,e.Base,l?e.WrapItems:e.Items,d?pp:hp,n)}),[t,n,p,c,o,i,d,f,a,l,Op.watch()]),isColumn:d}}Op.watch=()=>(0,d.isRTL)();var Ip=On((function(e,t){const{children:n,isColumn:r,...o}=Mp(e);return(0,s.createElement)(up.Provider,{value:{flexItemDisplay:r?"block":void 0}},(0,s.createElement)(Hn,a({},o,{ref:t}),n))}),"Flex");const Tp={name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},Dp="…",Ap={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},Rp={ellipsis:Dp,ellipsizeMode:Ap.auto,limit:0,numberOfLines:0};function Np(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,a=~~n,s=(0,l.isNil)(r)?Dp:r;return 0===i&&0===a||i>=o||a>=o||i+a>=o?e:0===a?e.slice(0,i)+s:e.slice(0,i)+s+e.slice(o-a)}function Lp(e){const{className:t,children:n,ellipsis:r=Dp,ellipsizeMode:o=Ap.auto,limit:i=0,numberOfLines:a=0,...l}=Pn(e,"Truncate"),u=Cn(),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n={...Rp,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===Ap.none)return e;let a,s;switch(o){case Ap.head:a=0,s=i;break;case Ap.middle:a=Math.floor(i/2),s=Math.floor(i/2);break;default:a=i,s=0}return o!==Ap.auto?Np(e,a,s,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:i,numberOfLines:a}),d=o===Ap.auto;return{...l,className:(0,s.useMemo)((()=>{const e={};return e.numberOfLines=Xr("-webkit-box-orient:vertical;-webkit-line-clamp:",a,";display:-webkit-box;overflow:hidden;",""),u(d&&!a&&Tp,d&&!!a&&e.numberOfLines,t)}),[t,u,a,d]),children:c}}let Fp;Co([Po]);const jp=qe()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&ko(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!Fp){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),Fp=e}return Fp}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));function Bp(e){const t=function(e){const t=jp(e);return ko(t).isLight()?"#000000":"#ffffff"}(e);return"#000000"===t?"dark":"light"}const zp="36px",Vp="12px",Hp={controlSurfaceColor:Bo.white,controlTextActiveColor:Bo.ui.theme,controlPaddingX:Vp,controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:Bo.white,controlBorderRadius:"2px",controlBorderColor:Bo.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:Bo.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${Bo.admin.theme}`,controlDestructiveBorderColor:Bo.alert.red,controlHeight:zp,controlHeightXSmall:"calc( 36px * 0.6 )",controlHeightSmall:"calc( 36px * 0.8 )",controlHeightLarge:"calc( 36px * 1.2 )",controlHeightXLarge:"calc( 36px * 1.4 )"},Wp={toggleGroupControlBackgroundColor:Hp.controlBackgroundColor,toggleGroupControlBorderColor:Bo.ui.border,toggleGroupControlBackdropBackgroundColor:Hp.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Bo.ui.border,toggleGroupControlBackdropBoxShadow:"transparent",toggleGroupControlButtonColorActive:Hp.controlBackgroundColor};var Up=Object.assign({},Hp,Wp,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${_p(2)}`,cardPaddingSmall:`${_p(4)}`,cardPaddingMedium:`${_p(4)} ${_p(6)}`,cardPaddingLarge:`${_p(6)} ${_p(8)}`,surfaceBackgroundColor:Bo.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Bo.white,surfaceColor:Bo.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});const $p=Xr("color:",Bo.darkGray.primary,";line-height:",Up.fontLineHeightBase,";margin:0;",""),Kp={name:"4zleql",styles:"display:block"},Gp=Xr("color:",Bo.alert.green,";",""),qp=Xr("color:",Bo.alert.red,";",""),Yp=Xr("color:",Bo.mediumGray.text,";",""),Xp=Xr("mark{background:",Bo.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),Zp={name:"50zrmy",styles:"text-transform:uppercase"};var Jp=n(3138);const Qp=qe()((e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}));const eh={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20},th=[1,2,3,4,5,6].flatMap((e=>[e,e.toString()]));function nh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:13;if(e in eh)return nh(eh[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}const t=`(${e} / 13)`;return`calc(${t} * ${Up.fontSize})`}function rh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;if(!th.includes(e))return nh(e);const t=`fontSizeH${e}`;return Up[t]}var oh={name:"50zrmy",styles:"text-transform:uppercase"};function ih(t){const{adjustLineHeightForInnerControls:n,align:r,children:o,className:i,color:a,ellipsizeMode:u,isDestructive:c=!1,display:d,highlightEscape:f=!1,highlightCaseSensitive:p=!1,highlightWords:h,highlightSanitize:m,isBlock:v=!1,letterSpacing:g,lineHeight:y,optimizeReadabilityFor:b,size:w,truncate:_=!1,upperCase:x=!1,variant:E,weight:k=Up.fontWeight,...S}=Pn(t,"Text");let C=o;const P=Array.isArray(h),O="caption"===w;if(P){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");C=function(e){let{activeClassName:t="",activeIndex:n=-1,activeStyle:r,autoEscape:o,caseSensitive:i=!1,children:a,findChunks:l,highlightClassName:u="",highlightStyle:c={},highlightTag:d="mark",sanitize:f,searchWords:p=[],unhighlightClassName:h="",unhighlightStyle:m}=e;if(!a)return null;if("string"!=typeof a)return a;const v=a,g=(0,Jp.findAll)({autoEscape:o,caseSensitive:i,findChunks:l,sanitize:f,searchWords:p,textToHighlight:v}),y=d;let b,w=-1,_="";return g.map(((e,o)=>{const a=v.substr(e.start,e.end-e.start);if(e.highlight){let e;w++,"object"==typeof u?i?e=u[a]:(u=Qp(u),e=u[a.toLowerCase()]):e=u;const l=w===+n;_=`${e} ${l?t:""}`,b=!0===l&&null!==r?Object.assign({},c,r):c;const d={children:a,className:_,key:o,style:b};return"string"!=typeof y&&(d.highlightIndex=w),(0,s.createElement)(y,d)}return(0,s.createElement)("span",{children:a,className:h,key:o,style:m})}))}({autoEscape:f,children:o,caseSensitive:p,searchWords:h,sanitize:m})}const M=Cn();let I;!0===_&&(I="auto"),!1===_&&(I="none");const T=Lp({...S,className:(0,s.useMemo)((()=>{const t={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${Up.controlHeight} + ${_p(2)})`;switch(e){case"large":n=`calc(${Up.controlHeightLarge} + ${_p(2)})`;break;case"small":n=`calc(${Up.controlHeightSmall} + ${_p(2)})`;break;case"xSmall":n=`calc(${Up.controlHeightXSmall} + ${_p(2)})`}return n}(n,y);if(t.Base=Xr({color:a,display:d,fontSize:nh(w),fontWeight:k,lineHeight:o,letterSpacing:g,textAlign:r},"",""),t.upperCase=oh,t.optimalTextColor=null,b){const e="dark"===Bp(b);t.optimalTextColor=Xr(e?{color:Bo.black}:{color:Bo.white},"","")}return M($p,t.Base,t.optimalTextColor,c&&qp,!!P&&Xp,v&&Kp,O&&Yp,E&&e[E],x&&t.upperCase,i)}),[n,r,i,a,M,d,v,O,c,P,g,y,b,w,x,E,k]),children:o,ellipsizeMode:u||I});return!_&&Array.isArray(o)&&(C=s.Children.map(o,(e=>{if(!(0,l.isPlainObject)(e)||!("props"in e))return e;return In(e,["Link"])?(0,s.cloneElement)(e,{size:e.props.size||"inherit"}):e}))),{...T,children:_?T.children:C}}var ah=On((function(e,t){const n=ih(e);return(0,s.createElement)(Hn,a({as:"span"},n,{ref:t}))}),"Text");var sh={name:"1739oy8",styles:"z-index:1"};const lh=e=>{let{isFocused:t}=e;return t?sh:""};var uh={name:"2o6p8u",styles:"justify-content:space-between"},ch={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},dh={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const fh=e=>{let{labelPosition:t}=e;switch(t){case"top":return dh;case"bottom":return ch;case"edge":return uh;default:return""}},ph=zn(Ip,{target:"em5sgkm7"})("position:relative;border-radius:2px;padding-top:0;",lh," ",fh,";");var hh={name:"wyxldh",styles:"margin:0 !important"};var mh={name:"1d3w5wq",styles:"width:100%"};const vh=zn("div",{target:"em5sgkm6"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",(e=>{let{disabled:t}=e;return Xr({backgroundColor:t?Bo.ui.backgroundDisabled:Bo.ui.background},"","")})," ",(e=>{let{hideLabel:t}=e;return t?hh:null})," ",(e=>{let{__unstableInputWidth:t,labelPosition:n}=e;return t?"side"===n?"":Xr("edge"===n?{flex:`0 0 ${t}`}:{width:t},"",""):mh}),";"),gh=zn("input",{target:"em5sgkm5"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Bo.black,";display:block;font-family:inherit;margin:0;outline:none;width:100%;",(e=>{let t,n,{isDragging:r,dragCursor:o}=e;return r&&(t=Xr("cursor:",o,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),r&&o&&(n=Xr("&:active{cursor:",o,";}","")),Xr(t," ",n,";","")})," ",(e=>{let{disabled:t}=e;return t?Xr({color:Bo.ui.textDisabled},"",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"},r=n[t]||n.default;return r?Xr("font-size:","16px",";@media ( min-width: 600px ){font-size:",r,";}",""):""})," ",(e=>{let{inputSize:t}=e;const n={default:{height:30,lineHeight:1,minHeight:30,paddingLeft:8,paddingRight:8},small:{height:24,lineHeight:1,minHeight:24,paddingLeft:8,paddingRight:8},"__unstable-large":{height:40,lineHeight:1,minHeight:40,paddingLeft:16,paddingRight:16}};return Xr(n[t]||n.default,"","")})," &::-webkit-input-placeholder{line-height:normal;}}"),yh=e=>{let{labelPosition:t}=e,n=8;return"edge"!==t&&"side"!==t||(n=0),Xr({marginTop:0,marginRight:0,marginBottom:n,marginLeft:0},"","")},bh=zn(ah,{target:"em5sgkm4"})("&&&{box-sizing:border-box;color:currentColor;display:block;padding-top:0;padding-bottom:0;max-width:100%;z-index:1;",yh," overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"),wh=e=>(0,s.createElement)(bh,a({},e,{as:"label"})),_h=zn(gp,{target:"em5sgkm3"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),xh=zn("div",{target:"em5sgkm2"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",(e=>{let t,{disabled:n,isFocused:r}=e,o=r?Bo.ui.borderFocus:Bo.ui.border;return r&&(t=`0 0 0 1px ${Bo.ui.borderFocus} inset`),n&&(o=Bo.ui.borderDisabled),Xr({boxShadow:t,borderColor:o,borderStyle:"solid",borderWidth:1},"","")})," ",Op({paddingLeft:2}),";}"),Eh=zn("span",{target:"em5sgkm1"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),kh=zn("span",{target:"em5sgkm0"})({name:"jgf79h",styles:"align-items:center;align-self:stretch;box-sizing:border-box;display:flex"});const Sh=(0,s.memo)((function(e){let{disabled:t=!1,isFocused:n=!1}=e;return(0,s.createElement)(xh,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:t,isFocused:n})}));var Ch=Sh;function Ph(e){let{children:t,hideLabelFromVision:n,htmlFor:r,...o}=e;return t?n?(0,s.createElement)(Wn,{as:"label",htmlFor:r},t):(0,s.createElement)(wh,a({htmlFor:r},o),t):null}function Oh(e,t){let{__unstableInputWidth:n,children:r,className:o,disabled:i=!1,hideLabelFromVision:l=!1,labelPosition:u,id:c,isFocused:d=!1,label:p,prefix:h,size:m="default",suffix:v,...g}=e;const y=function(e){const t=(0,f.useInstanceId)(Oh);return e||`input-base-control-${t}`}(c),b=l||!p;return(0,s.createElement)(ph,a({},g,function(e){const t={};switch(e){case"top":t.direction="column",t.gap=0;break;case"bottom":t.direction="column-reverse",t.gap=0;break;case"edge":t.justify="space-between"}return t}(u),{className:o,isFocused:d,labelPosition:u,ref:t}),(0,s.createElement)(_h,null,(0,s.createElement)(Ph,{className:"components-input-control__label",hideLabelFromVision:l,labelPosition:u,htmlFor:y,size:m},p)),(0,s.createElement)(vh,{__unstableInputWidth:n,className:"components-input-control__container",disabled:i,hideLabel:b,labelPosition:u},h&&(0,s.createElement)(Eh,{className:"components-input-control__prefix"},h),r,v&&(0,s.createElement)(kh,{className:"components-input-control__suffix"},v),(0,s.createElement)(Ch,{disabled:i,isFocused:d})))}var Mh=(0,s.forwardRef)(Oh);const Ih={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Th(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function Dh(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):en?+Th(e-n,n-t,r)+n:e}function Ah(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Rh(e,t,n){return(t=Ah(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lh(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Gh(e){const t=$h(e);return Wh(e)?t.identifier:t.pointerId}function qh(e){const t=$h(e);return[t.clientX,t.clientY]}function Yh(e,...t){return"function"==typeof e?e(...t):e}function Xh(){}function Zh(...e){return 0===e.length?Xh:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Jh(e,t){return Object.assign({},t,e||{})}class Qh{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Yh(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:o,ctrlKey:i})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);Ih.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[i,a]=t._movement,[s,l]=n.threshold,{_step:u,values:c}=t;if(n.hasCustomTransform?(!1===u[0]&&(u[0]=Math.abs(i)>=s&&c[0]),!1===u[1]&&(u[1]=Math.abs(a)>=l&&c[1])):(!1===u[0]&&(u[0]=Math.abs(i)>=s&&Math.sign(i)*s),!1===u[1]&&(u[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==u[0]||!1!==u[1],!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[e,t]=c;d[0]=!1!==u[0]?e-u[0]:0,d[1]=!1!==u[1]?t-u[1]:0}else d[0]=!1!==u[0]?i-u[0]:0,d[1]=!1!==u[1]?a-u[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const f=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Yh(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[h,m]=t.offset,[[v,g],[y,b]]=t._bounds;t.overflow=[hg?1:0,mb?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const w=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,o]){const[[i,a],[s,l]]=e;return[Dh(t,i,a,r),Dh(n,s,l,o)]}(t._bounds,t.offset,w),t.delta=Ih.sub(t.offset,f),this.computeMovement(),p&&(!t.last||o>32)){t.delta=Ih.sub(t.offset,f);const e=t.delta.map(Math.abs);Ih.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o],t.timeDelta=o)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(Lh(Lh(Lh({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class em extends Qh{constructor(...e){super(...e),Rh(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Ih.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Ih.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[Uh(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),o=Math.abs(t);return r>o&&r>n?"x":o>r&&o>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const tm=e=>e,nm={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>Lh(Lh({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return Ih.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?Ih.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||tm},threshold:e=>Ih.toVector(e,0)};const rm=Lh(Lh({},nm),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>rm.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:o=1/0}=e;return[[t,n],[r,o]]}}),om={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const im="undefined"!=typeof window&&window.document&&window.document.createElement;function am(){return im&&"ontouchstart"in window}const sm={isBrowser:im,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:am(),touchscreen:am()||im&&window.navigator.maxTouchPoints>1,pointer:im&&"onpointerdown"in window,pointerLock:im&&"exitPointerLock"in window.document},lm={mouse:0,touch:0,pen:8},um=Lh(Lh({},rm),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:o=!1}={}}){return this.pointerLock=r&&sm.pointerLock,sm.touch&&n?"touch":this.pointerLock?"mouse":sm.pointer&&!o?"pointer":sm.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,sm.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:o=!0}={}}){return this.pointerButtons=r,this.keys=o,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:o}){const i=Ih.toVector(e,n?r:o?1:0);return this.filterTaps=n,this.tapsThreshold=r,i},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(Ih.toVector(e)),distance:this.transform(Ih.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?Lh(Lh({},lm),e):lm,keyboardDisplacement:(e=10)=>e});Lh(Lh({},nm),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!sm.touch&&sm.gesture)return"gesture";if(sm.touch&&r)return"touch";if(sm.touchscreen){if(sm.pointer)return"pointer";if(sm.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const o=e=>{const t=Jh(Yh(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},i=e=>{const t=Jh(Yh(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[o(),i()]:e=>[o(e),i(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return Ih.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});Lh(Lh({},rm),{},{mouseOnly:(e=!0)=>e});const cm=Lh(Lh({},rm),{},{mouseOnly:(e=!0)=>e}),dm=new Map,fm=new Map;function pm(e){dm.set(e.key,e.engine),fm.set(e.key,e.resolver)}const hm={key:"drag",engine:class extends em{constructor(...e){super(...e),Rh(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=rm.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=Gh(e),n._pointerActive=!0,this.computeValues(qh(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==Uh(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const r=Gh(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const o=qh(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=Ih.sub(o,t._values),this.computeValues(o)),Ih.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=Gh(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[o,i]=t._distance;if(t.tap=o<=n.tapsThreshold&&i<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[o,i]=t._movement,[a,s]=n.swipe.velocity,[l,u]=n.swipe.distance,c=n.swipe.duration;if(t.elapsedTimea&&Math.abs(o)>l&&(t.swipe[0]=Math.sign(e)),c>s&&Math.abs(i)>u&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=om[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,Ih.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in om&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:um},mm={key:"hover",engine:class extends em{constructor(...e){super(...e),Rh(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(qh(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=qh(e);t._movement=t._delta=Ih.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:cm};function vm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const gm={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(sm.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},ym=["target","eventOptions","window","enabled","transform"];function bm(e={},t){const n={};for(const[r,o]of Object.entries(t))switch(typeof o){case"function":n[r]=o.call(n,e[r],r,e);break;case"object":n[r]=bm(e[r],o);break;case"boolean":o&&(n[r]=e[r])}return n}class wm{constructor(e,t){Rh(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,o){const i=this._listeners,a=function(e,t=""){const n=Fh[e];return e+(n&&n[t]||t)}(t,n),s=Lh(Lh({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),o);e.addEventListener(a,r,s);const l=()=>{e.removeEventListener(a,r,s),i.delete(l)};return i.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class _m{constructor(){Rh(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class xm{constructor(e){Rh(this,"gestures",new Set),Rh(this,"_targetEventStore",new wm(this)),Rh(this,"gestureEventStores",{}),Rh(this,"gestureTimeoutStores",{}),Rh(this,"handlers",{}),Rh(this,"config",{}),Rh(this,"pointerIds",new Set),Rh(this,"touchIds",new Set),Rh(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&Em(e,"drag");t.wheel&&Em(e,"wheel");t.scroll&&Em(e,"scroll");t.move&&Em(e,"move");t.pinch&&Em(e,"pinch");t.hover&&Em(e,"hover")}(this,e)}setEventIds(e){return Wh(e)?(this.touchIds=new Set(Kh(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:o,eventOptions:i,window:a,enabled:s,transform:l}=r,u=vm(r,ym);if(n.shared=bm({target:o,eventOptions:i,window:a,enabled:s,transform:l},gm),t){const e=fm.get(t);n[t]=bm(Lh({shared:n.shared},u),e)}else for(const e in u){const t=fm.get(e);t&&(n[e]=bm(Lh({shared:n.shared},u[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const o=this.config[t],i=km(n,o.eventOptions,!!r);if(o.enabled){new(dm.get(t))(this,e,t).bind(i)}}const o=km(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)o(t,"",(n=>this.nativeHandlers[t](Lh(Lh({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Zh(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:o,passive:i}=Hh(e);this._targetEventStore.add(r,t,"",n[e],{capture:o,passive:i})}}}}function Em(e,t){e.gestures.add(t),e.gestureEventStores[t]=new wm(e,t),e.gestureTimeoutStores[t]=new _m}const km=(e,t,n)=>(r,o,i,a={},s=!1)=>{var l,u;const c=null!==(l=a.capture)&&void 0!==l?l:t.capture,d=null!==(u=a.passive)&&void 0!==u?u:t.passive;let f=s?r:zh(r,o,c);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(i)};function Sm(e,t={},n,r){const o=w().useMemo((()=>new xm(e)),[]);if(o.applyHandlers(e,r),o.applyConfig(t,n),w().useEffect(o.effect.bind(o)),w().useEffect((()=>o.clean.bind(o)),[]),void 0===t.target)return o.bind.bind(o)}const Cm=e=>e,Pm={_event:{},error:null,initialValue:"",isDirty:!1,isDragEnabled:!1,isDragging:!1,isPressEnterToChange:!1,value:""},Om="CHANGE",Mm="COMMIT",Im="DRAG_END",Tm="DRAG_START",Dm="DRAG",Am="INVALIDATE",Rm="PRESS_DOWN",Nm="PRESS_ENTER",Lm="PRESS_UP",Fm="RESET";function jm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pm;const{value:t}=e;return{...Pm,...e,initialValue:t}}function Bm(e){return(t,n)=>{const r={...t};switch(n.type){case Lm:case Rm:r.isDirty=!1;break;case Tm:r.isDragging=!0;break;case Im:r.isDragging=!1;break;case Om:r.error=null,r.value=n.payload.value,t.isPressEnterToChange&&(r.isDirty=!0);break;case Mm:r.value=n.payload.value,r.isDirty=!1;break;case Fm:r.error=null,r.isDirty=!1,r.value=n.payload.value||t.initialValue;break;case Am:r.error=n.payload.error}return n.payload.event&&(r._event=n.payload.event),e(r,n)}}var zm=function(e,t){const n=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current)return e();n.current=!0}),t)};const Vm=(0,s.forwardRef)((function(e,t){let{disabled:n=!1,dragDirection:r="n",dragThreshold:o=10,id:i,isDragEnabled:u=!1,isFocused:c,isPressEnterToChange:d=!1,onBlur:f=l.noop,onChange:p=l.noop,onDrag:h=l.noop,onDragEnd:m=l.noop,onDragStart:v=l.noop,onFocus:g=l.noop,onKeyDown:y=l.noop,onValidate:b=l.noop,size:w="default",setIsFocused:_,stateReducer:x=(e=>e),value:E,type:k,...S}=e;const{state:C,change:P,commit:O,drag:M,dragEnd:I,dragStart:T,invalidate:D,pressDown:A,pressEnter:R,pressUp:N,reset:L}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cm,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pm;const[n,r]=(0,s.useReducer)(Bm(e),jm(t)),o=e=>(t,n)=>{n&&n.persist&&n.persist(),r({type:e,payload:{value:t,event:n}})},i=e=>t=>{t&&t.persist&&t.persist(),r({type:e,payload:{event:t}})},a=e=>t=>{r({type:e,payload:t})},l=o(Om),u=(e,t)=>r({type:Am,payload:{error:e,event:t}}),c=o(Fm),d=o(Mm),f=a(Tm),p=a(Dm),h=a(Im),m=i(Lm),v=i(Rm),g=i(Nm);return{change:l,commit:d,dispatch:r,drag:p,dragEnd:h,dragStart:f,invalidate:u,pressDown:v,pressEnter:g,pressUp:m,reset:c,state:n}}(x,{isDragEnabled:u,value:E,isPressEnterToChange:d}),{_event:F,value:j,isDragging:B,isDirty:z}=C,V=(0,s.useRef)(!1),H=function(e,t){const n=function(e){let t="ns-resize";switch(e){case"n":case"s":t="ns-resize";break;case"e":case"w":t="ew-resize"}return t}(t);return(0,s.useEffect)((()=>{document.documentElement.style.cursor=e?n:null}),[e]),n}(B,r);zm((()=>{E!==j&&(c||V.current?z||(p(j,{event:F}),V.current=!1):O(E,F))}),[j,z,c,E]);const W=e=>{const t=e.currentTarget.value;try{b(t),O(t,e)}catch(t){D(t,e)}},U=($=e=>{const{distance:t,dragging:n,event:r,target:o}=e;if(e.event={...e.event,target:o},t){if(r.stopPropagation(),!n)return m(e),void I(e);h(e),M(e),B||(v(e),T(e))}},K={axis:"e"===r||"w"===r?"x":"y",threshold:o,enabled:u,pointer:{capture:!1}},pm(hm),Sm({drag:$},K||{},"drag"));var $,K;const G=u?U():{};let q;return"number"===k&&(q=e=>{var t;null===(t=S.onMouseDown)||void 0===t||t.call(S,e),e.currentTarget!==e.currentTarget.ownerDocument.activeElement&&e.currentTarget.focus()}),(0,s.createElement)(gh,a({},S,G,{className:"components-input-control__input",disabled:n,dragCursor:H,isDragging:B,id:i,onBlur:e=>{f(e),null==_||_(!1),!z&&e.target.validity.valid||(V.current=!0,W(e))},onChange:e=>{const t=e.target.value;P(t,e)},onFocus:e=>{g(e),null==_||_(!0)},onKeyDown:e=>{const{key:t}=e;switch(y(e),t){case"ArrowUp":N(e);break;case"ArrowDown":A(e);break;case"Enter":R(e),d&&(e.preventDefault(),W(e));break;case"Escape":d&&z&&(e.preventDefault(),L(E,e))}},onMouseDown:q,ref:t,inputSize:w,value:j,type:k}))}));var Hm=Vm;function Wm(e,t){let{__unstableStateReducer:n=(e=>e),__unstableInputWidth:r,className:o,disabled:i=!1,hideLabelFromVision:u=!1,id:d,isPressEnterToChange:p=!1,label:h,labelPosition:m="top",onChange:v=l.noop,onValidate:g=l.noop,onKeyDown:y=l.noop,prefix:b,size:w="default",suffix:_,value:x,...E}=e;const[k,S]=(0,s.useState)(!1),C=function(e){const t=(0,f.useInstanceId)(Wm);return e||`inspector-input-control-${t}`}(d),P=c()("components-input-control",o);return(0,s.createElement)(Mh,{__unstableInputWidth:r,className:P,disabled:i,gap:3,hideLabelFromVision:u,id:C,isFocused:k,justify:"left",label:h,labelPosition:m,prefix:b,size:w,suffix:_},(0,s.createElement)(Hm,a({},E,{className:"components-input-control__input",disabled:i,id:C,isFocused:k,isPressEnterToChange:p,onChange:v,onKeyDown:y,onValidate:g,ref:t,setIsFocused:S,size:w,stateReducer:n,value:x})))}var Um=(0,s.forwardRef)(Wm);const $m=zn(Ip,{target:"e65ony43"})("margin-bottom:",_p(2),";"),Km=zn("div",{target:"e65ony42"})("border-radius:50%;border:",Up.borderWidth," solid ",Bo.ui.border,";box-sizing:border-box;cursor:grab;height:",32,"px;overflow:hidden;width:",32,"px;"),Gm=zn("div",{target:"e65ony41"})({name:"1bhd2sw",styles:"box-sizing:border-box;position:relative;width:100%;height:100%"}),qm=zn("div",{target:"e65ony40"})("background:",Bo.admin.theme,";border-radius:50%;border:",3,"px solid ",Bo.admin.theme,";bottom:0;box-sizing:border-box;display:block;height:0px;left:0;margin:auto;position:absolute;right:0;top:-",16,"px;width:0px;");var Ym=function(e){let{value:t,onChange:n,...r}=e;const o=(0,s.useRef)(),i=(0,s.useRef)(),l=(0,s.useRef)(),u=e=>{const{x:t,y:r}=i.current;e.preventDefault(),e.target.focus(),n(function(e,t,n,r){const o=r-t,i=n-e,a=Math.atan2(o,i),s=Math.round(a*(180/Math.PI))+90;if(s<0)return 360+s;return s}(t,r,e.clientX,e.clientY))},{startDrag:c,isDragging:d}=(0,f.__experimentalUseDragging)({onDragStart:e=>{(()=>{const e=o.current.getBoundingClientRect();i.current={x:e.x+e.width/2,y:e.y+e.height/2}})(),u(e)},onDragMove:u,onDragEnd:u});return(0,s.useEffect)((()=>{d?(void 0===l.current&&(l.current=document.body.style.cursor),document.body.style.cursor="grabbing"):(document.body.style.cursor=l.current||null,l.current=void 0)}),[d]),(0,s.createElement)(Km,a({ref:o,onMouseDown:c,className:"components-angle-picker-control__angle-circle",style:d?{cursor:"grabbing"}:void 0},r),(0,s.createElement)(Gm,{style:t?{transform:`rotate(${t}deg)`}:void 0,className:"components-angle-picker-control__angle-circle-indicator-wrapper",tabIndex:-1},(0,s.createElement)(qm,{className:"components-angle-picker-control__angle-circle-indicator"})))};const Xm=e=>null!=e;const Zm=On((function(e,t){const n=function(e){const{className:t,margin:n,marginBottom:r=2,marginLeft:o,marginRight:i,marginTop:a,marginX:s,marginY:l,padding:u,paddingBottom:c,paddingLeft:d,paddingRight:f,paddingTop:p,paddingX:h,paddingY:m,...v}=Pn(e,"Spacer");return{...v,className:Cn()(Xm(n)&&Xr("margin:",_p(n),";",""),Xm(l)&&Xr("margin-bottom:",_p(l),";margin-top:",_p(l),";",""),Xm(s)&&Xr("margin-left:",_p(s),";margin-right:",_p(s),";",""),Xm(a)&&Xr("margin-top:",_p(a),";",""),Xm(r)&&Xr("margin-bottom:",_p(r),";",""),Xm(o)&&Xr("margin-left:",_p(o),";",""),Xm(i)&&Xr("margin-right:",_p(i),";",""),Xm(u)&&Xr("padding:",_p(u),";",""),Xm(m)&&Xr("padding-bottom:",_p(m),";padding-top:",_p(m),";",""),Xm(h)&&Xr("padding-left:",_p(h),";padding-right:",_p(h),";",""),Xm(p)&&Xr("padding-top:",_p(p),";",""),Xm(c)&&Xr("padding-bottom:",_p(c),";",""),Xm(d)&&Xr("padding-left:",_p(d),";",""),Xm(f)&&Xr("padding-right:",_p(f),";",""),t)}}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"Spacer");var Jm=Zm;function Qm(e){let{className:t,label:n=(0,d.__)("Angle"),onChange:r,value:o}=e;const i=c()("components-angle-picker-control",t);return(0,s.createElement)($m,{className:i},(0,s.createElement)(vp,null,(0,s.createElement)(Um,{label:n,className:"components-angle-picker-control__input-field",max:360,min:0,onChange:e=>{const t=""!==e?parseInt(e,10):0;r(t)},size:"__unstable-large",step:"1",value:o,hideHTMLArrows:!0,suffix:(0,s.createElement)(Jm,{as:ah,marginBottom:0,marginRight:_p(3),style:{color:"var( --wp-admin-theme-color )"}},"°")})),(0,s.createElement)(gp,{style:{marginLeft:_p(4),marginBottom:_p(1),marginTop:"auto"}},(0,s.createElement)(Ym,{"aria-hidden":"true",value:o,onChange:r})))}var ev=window.wp.keycodes,tv=window.wp.richText,nv=window.wp.a11y;function rv(e){return t=>{const[n,r]=(0,s.useState)([]);return(0,s.useLayoutEffect)((()=>{const{options:n,isDebounced:o}=e,i=(0,l.debounce)((()=>{const o=Promise.resolve("function"==typeof n?n(t):n).then((n=>{if(o.canceled)return;const i=n.map(((t,n)=>({key:`${e.name}-${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(t)}))),a=new RegExp("(?:\\b|\\s|^)"+(0,l.escapeRegExp)(t),"i");r(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=[];for(let o=0;oe.test((0,l.deburr)(t))))&&(r.push(i),r.length===n))break}return r}(a,i))}));return o}),o?250:0),a=i();return()=>{i.cancel(),a&&(a.canceled=!0)}}),[t]),[n]}}function ov(e){let{record:t,onChange:n,onReplace:r,completers:o,contentRef:i}=e;const a=(0,f.useDebounce)(nv.speak,500),u=(0,f.useInstanceId)(ov),[p,h]=(0,s.useState)(0),[m,v]=(0,s.useState)([]),[g,y]=(0,s.useState)(""),[b,w]=(0,s.useState)(null),[_,x]=(0,s.useState)(null),[E,k]=(0,s.useState)(!1);function S(e){const{getOptionCompletion:o}=b||{};if(!e.isDisabled){if(o){const i=o(e.value,g),{action:a,value:l}=void 0===i.action||void 0===i.value?{action:"insert-at-caret",value:i}:i;if("replace"===a)return void r([l]);"insert-at-caret"===a&&function(e){const r=t.start,o=r-b.triggerPrefix.length-g.length,i=(0,tv.create)({html:(0,s.renderToString)(e)});n((0,tv.insert)(t,i,o,r))}(l)}C()}}function C(){h(0),v([]),y(""),w(null),x(null)}let P;(0,tv.isCollapsed)(t)&&(P=(0,tv.getTextContent)((0,tv.slice)(t,0))),(0,s.useEffect)((()=>{if(!P)return void C();const e=(0,l.deburr)(P),n=(0,tv.getTextContent)((0,tv.slice)(t,void 0,(0,tv.getTextContent)(t).length)),r=(0,l.find)(o,(t=>{let{triggerPrefix:r,allowContext:o}=t;const i=e.lastIndexOf(r);if(-1===i)return!1;const a=e.slice(i+r.length);if(a.length>50)return!1;const s=0===m.length,l=1===a.split(/\s/).length,u=E&&a.split(/\s/).length<=3;return!(s&&!u&&!l)&&(!(o&&!o(e.slice(0,i),n))&&(!/^\s/.test(a)&&!/\s\s+$/.test(a)&&/[\u0000-\uFFFF]*$/.test(a)))}));if(!r)return void C();const i=(0,l.escapeRegExp)(r.triggerPrefix),a=e.slice(e.lastIndexOf(r.triggerPrefix)).match(new RegExp(`${i}([\0-￿]*)$`)),u=a&&a[1];w(r),x((()=>r!==b?function(e){const t=e.useItems?e.useItems:rv(e);return function(e){let{filterValue:n,instanceId:r,listBoxId:o,className:i,selectedIndex:a,onChangeOptions:u,onSelect:d,onReset:f,value:p,contentRef:h}=e;const[m]=t(n),v=(0,tv.useAnchorRef)({ref:h,value:p});return(0,s.useLayoutEffect)((()=>{u(m)}),[m]),!m.length>0?null:(0,s.createElement)(Fr,{focusOnMount:!1,onClose:f,position:"top right",className:"components-autocomplete__popover",anchorRef:v},(0,s.createElement)("div",{id:o,role:"listbox",className:"components-autocomplete__results"},(0,l.map)(m,((e,t)=>(0,s.createElement)($n,{key:e.key,id:`components-autocomplete-item-${r}-${e.key}`,role:"option","aria-selected":t===a,disabled:e.isDisabled,className:c()("components-autocomplete__result",i,{"is-selected":t===a}),onClick:()=>d(e)},e.label)))))}}(r):_)),y(u)}),[P]);const{key:O=""}=m[p]||{},{className:M}=b||{},I=!!b&&m.length>0,T=I?`components-autocomplete-listbox-${u}`:null;return{listBoxId:T,activeId:I?`components-autocomplete-item-${u}-${O}`:null,onKeyDown:function(e){if(k(e.keyCode===ev.BACKSPACE),b&&0!==m.length&&!e.defaultPrevented){switch(e.keyCode){case ev.UP:h((0===p?m.length:p)-1);break;case ev.DOWN:h((p+1)%m.length);break;case ev.ESCAPE:w(null),x(null),e.preventDefault();break;case ev.ENTER:S(m[p]);break;case ev.LEFT:case ev.RIGHT:return void C();default:return}e.preventDefault()}},popover:void 0!==t.start&&_&&(0,s.createElement)(_,{className:M,filterValue:g,instanceId:u,listBoxId:T,selectedIndex:p,onChangeOptions:function(e){h(e.length===m.length?p:0),v(e),function(e){a&&(e.length?a((0,d.sprintf)((0,d._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length),e.length),"assertive"):a((0,d.__)("No results."),"assertive"))}(e)},onSelect:S,value:t,contentRef:i,reset:C})}}function iv(e){const t=(0,s.useRef)(),n=(0,s.useRef)(),{popover:r,listBoxId:o,activeId:i,onKeyDown:a}=ov({...e,contentRef:t});return n.current=a,{ref:(0,f.useMergeRefs)([t,(0,f.useRefEffect)((e=>{function t(e){n.current(e)}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[])]),children:r,"aria-autocomplete":o?"list":void 0,"aria-owns":o,"aria-activedescendant":i}}function av(e){let{children:t,isSelected:n,...r}=e;const{popover:o,...i}=ov(r);return(0,s.createElement)(s.Fragment,null,t(i),n&&o)}var sv={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function lv(e){return(0,l.get)(sv,e,"")}const uv=zn("div",{target:"ej5x27r4"})("font-family:",lv("default.fontFamily"),";font-size:",lv("default.fontSize"),";"),cv=zn("div",{target:"ej5x27r3"})((e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&Xr("margin-bottom:",_p(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),dv=Xr("display:inline-block;margin-bottom:",_p(2),";",""),fv=zn("label",{target:"ej5x27r2"})(dv,";");var pv={name:"11yad0w",styles:"margin-bottom:revert"};const hv=zn("p",{target:"ej5x27r1"})("margin-top:",_p(2),";margin-bottom:0;font-size:",lv("helpText.fontSize"),";font-style:normal;color:",Bo.mediumGray.text,";",(e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&pv}),";"),mv=zn("span",{target:"ej5x27r0"})(dv,";"),vv=e=>{let{__nextHasNoMarginBottom:t=!1,id:n,label:r,hideLabelFromVision:o=!1,help:i,className:a,children:l}=e;return(0,s.createElement)(uv,{className:c()("components-base-control",a)},(0,s.createElement)(cv,{className:"components-base-control__field",__nextHasNoMarginBottom:t},r&&n&&(o?(0,s.createElement)(Wn,{as:"label",htmlFor:n},r):(0,s.createElement)(fv,{className:"components-base-control__label",htmlFor:n},r)),r&&!n&&(o?(0,s.createElement)(Wn,{as:"label"},r):(0,s.createElement)(vv.VisualLabel,null,r)),l),!!i&&(0,s.createElement)(hv,{id:n?n+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},i))};vv.VisualLabel=e=>{let{className:t,children:n}=e;return(0,s.createElement)(mv,{className:c()("components-base-control__label",t)},n)};var gv=vv;var yv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));var bv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));const wv=Xr("",""),_v={name:"82a6rk",styles:"flex:1"},xv={name:"3gg0za",styles:"flex:0;flex-basis:36px;margin-top:7px"},Ev=e=>{const{color:t=Bo.gray[200],style:n="solid",width:r=Up.borderWidth}=e||{};return`${t} ${!!r&&"0"!==r||!!t?n||"solid":n} ${r!==Up.borderWidth?`clamp(1px, ${r}, 10px)`:r}`},kv=Xr("position:relative;flex:1;",Op({marginRight:_p(3)},{marginLeft:_p(3)})(),";",""),Sv={name:"1nwbfnf",styles:"grid-column:span 2;margin:0 auto"};var Cv=On(((e,t)=>{const{className:n,isLinked:r,...o}=function(e){const{className:t,...n}=Pn(e,"BorderBoxControlLinkedButton"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(xv,t)),[t])}}(e),i=r?(0,d.__)("Unlink sides"):(0,d.__)("Link sides");return(0,s.createElement)(Ur,{text:i},(0,s.createElement)(Hn,{className:n},(0,s.createElement)($n,a({},o,{variant:r?"primary":"secondary",isSmall:!0,icon:r?yv:bv,iconSize:16,"aria-label":i,ref:t}))))}),"BorderBoxControlLinkedButton");function Pv(e){const{className:t,value:n,...r}=Pn(e,"BorderBoxControlVisualizer"),o=Cn(),i=(0,s.useMemo)((()=>o((e=>Xr("position:absolute;top:20px;right:30px;bottom:20px;left:30px;border-top:",Ev(null==e?void 0:e.top),";border-bottom:",Ev(null==e?void 0:e.bottom),";",Op({borderLeft:Ev(null==e?void 0:e.left)})()," ",Op({borderRight:Ev(null==e?void 0:e.right)})(),";",""))(n),t)),[t,n,Op.watch()]);return{...r,className:i,value:n}}var Ov=On(((e,t)=>{const{value:n,...r}=Pv(e);return(0,s.createElement)(Hn,a({},r,{ref:t}))}),"BorderBoxControlVisualizer");var Mv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var Iv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(i.Path,{d:"M5 11.25h14v1.5H5z"}));var Tv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}));var Dv=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"},(0,s.createElement)(i.Path,{fillRule:"evenodd",d:"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z",clipRule:"evenodd"}));var Av={name:"euqsgg",styles:"input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"};const Rv=e=>{let{hideHTMLArrows:t}=e;return t?Av:""},Nv=zn(Um,{target:"ep48uk90"})(Rv,";");function Lv(e){const t=Number(e);return isNaN(t)?0:t}function Fv(){for(var e=arguments.length,t=new Array(e),n=0;ne+Lv(t)),0)}function jv(e){const t=(e+"").split(".");return void 0!==t[1]?t[1].length:0}function Bv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const o=Lv(e),i=Lv(r),a=jv(r),s=Math.round(o/i)*i,u=(0,l.clamp)(s,t,n);return a?Lv(u.toFixed(a)):u}function zv(e){return null!=e}function Vv(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return null!==(e=t.find(zv))&&void 0!==e?e:n}var Hv=(0,s.forwardRef)((function(e,t){let{__unstableStateReducer:n,className:r,dragDirection:o="n",hideHTMLArrows:i=!1,isDragEnabled:l=!0,isShiftStepEnabled:u=!0,label:f,max:p=1/0,min:h=-1/0,required:m=!1,shiftStep:v=10,step:g=1,type:y="number",value:b,...w}=e;const _="any"===g,x=_?1:parseFloat(g),E=Bv(0,h,p,x),k=(e,t)=>_?Math.min(p,Math.max(h,e)):Bv(e,h,p,null!=t?t:x),S="number"===y?"off":null,C=c()("components-number-control",r),P=(e,t)=>{const n={...e},{type:r,payload:i}=t,a=null==i?void 0:i.event,s=n.value;if(r===Lm||r===Rm){const e=a.shiftKey&&u,t=e?parseFloat(v)*x:x;let o=function(e){const t=""===e;return!zv(e)||t}(s)?E:s;null!=a&&a.preventDefault&&a.preventDefault(),r===Lm&&(o=Fv(o,t)),r===Rm&&(o=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=Lv(t);return 0===n?r:e-r}),0)}(o,t)),n.value=k(o,e?t:null)}if(r===Dm&&l){const[e,t]=i.delta,r=i.shiftKey&&u,a=r?parseFloat(v)*x:x;let l,c;switch(o){case"n":c=t,l=-1;break;case"e":c=e,l=(0,d.isRTL)()?-1:1;break;case"s":c=t,l=1;break;case"w":c=e,l=(0,d.isRTL)()?1:-1}if(0!==c){c=Math.ceil(Math.abs(c))*Math.sign(c);const e=c*a*l;n.value=k(Fv(s,e),r?a:null)}}if(r===Nm||r===Mm){const e=!1===m&&""===s;n.value=e?s:k(s)}return n};return(0,s.createElement)(Nv,a({autoComplete:S,inputMode:"numeric"},w,{className:C,dragDirection:o,hideHTMLArrows:i,isDragEnabled:l,label:f,max:p,min:h,ref:t,required:m,step:g,type:y,value:b,__unstableStateReducer:(e,t)=>{var r;const o=P(e,t);return null!==(r=null==n?void 0:n(o,t))&&void 0!==r?r:o}}))}));const Wv=zn("div",{target:"e1bagdl33"})({name:"100d0a9",styles:"box-sizing:border-box;position:relative"}),Uv=e=>{let{disableUnits:t,size:n}=e;return Xr(Op({default:{paddingRight:8},small:{paddingRight:8},"__unstable-large":{paddingRight:t?16:8}}[n])(),";","")};var $v={name:"1y65o8",styles:"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}"};const Kv=e=>{let{disableUnits:t}=e;return t?"":$v},Gv=zn(Hv,{target:"e1bagdl32"})("&&&{input{appearance:none;-moz-appearance:textfield;display:block;width:100%;",Kv,";",Uv,";}}"),qv=Xr("appearance:none;background:transparent;border-radius:2px;border:none;box-sizing:border-box;color:",Bo.darkGray[500],";display:block;font-size:8px;letter-spacing:-0.5px;outline:none;padding:2px 1px;text-align-last:center;text-transform:uppercase;width:20px;",Op({borderTopLeftRadius:0,borderBottomLeftRadius:0})(),";",""),Yv=zn("div",{target:"e1bagdl31"})("&&&{pointer-events:none;",qv,";}"),Xv=zn("select",{target:"e1bagdl30"})("&&&{",qv,";cursor:pointer;border:1px solid transparent;height:100%;&:hover{background-color:",Bo.lightGray[300],";}&:focus{border-color:",Bo.ui.borderFocus,";outline:2px solid transparent;outline-offset:0;}&:disabled{cursor:initial;&:hover{background-color:transparent;}}}");const Zv={name:"f3vz0n",styles:"font-weight:500"},Jv={name:"bjn8wh",styles:"position:relative"},Qv=e=>{const{style:t}=e||{};return Xr("border-radius:9999px;border:2px solid transparent;",t?(e=>{const{color:t,style:n}=e||{},r=n&&"none"!==n?Bo.gray[300]:void 0;return Xr("border-style:","none"===n?"solid":n,";border-color:",t||r,";","")})(e):void 0," width:28px;height:28px;padding:2px;&>span{background:linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);}","")},eg={name:"1phacrs",styles:"&&>div>div{padding:0;}"},tg=Xr("padding:",_p(2),";>div:first-of-type>",fv,"{margin-bottom:0;",Zv,";}&& ",fv,"+button:not( .has-text ){min-width:24px;padding:0;}",""),ng=Xr("",""),rg=Xr("",""),og=Xr("justify-content:center;width:100%;&&{border-top:",Up.borderWidth," solid ",Bo.gray[200],";height:46px;}",""),ig=Xr(fv,"{",Zv,";}",""),ag={name:"1486260",styles:"&&&&&{min-width:30px;width:30px;height:30px;padding:3px;}"};const sg=[{label:(0,d.__)("Solid"),icon:Iv,value:"solid"},{label:(0,d.__)("Dashed"),icon:Tv,value:"dashed"},{label:(0,d.__)("Dotted"),icon:Dv,value:"dotted"}],lg=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(Wn,{as:"label"},t):(0,s.createElement)(fv,null,t):null};var ug=On(((e,t)=>{const{buttonClassName:n,hideLabelFromVision:r,label:o,onChange:i,value:l,...u}=function(e){const{className:t,...n}=Pn(e,"BorderControlStylePicker"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(ig,t)),[t,r]),buttonClassName:(0,s.useMemo)((()=>r(ag)),[r])}}(e);return(0,s.createElement)(Hn,a({},u,{ref:t}),(0,s.createElement)(lg,{label:o,hideLabelFromVision:r}),(0,s.createElement)(Ip,{justify:"flex-start",gap:1},sg.map((e=>(0,s.createElement)($n,{key:e.value,className:n,icon:e.icon,isSmall:!0,isPressed:e.value===l,onClick:()=>i(e.value===l?void 0:e.value),"aria-label":e.label,label:e.label,showTooltip:!0})))))}),"BorderControlStylePicker");var cg=e=>{let{className:t,colorValue:n,...r}=e;return(0,s.createElement)("span",a({className:c()("component-color-indicator",t),style:{background:n}},r))},dg=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},fg=function(e){return.2126*dg(e.r)+.7152*dg(e.g)+.0722*dg(e.b)};function pg(e){var t;const{renderContent:n,renderToggle:r,position:o="bottom right",className:i,contentClassName:l,expandOnMobile:u,headerTitle:d,focusOnMount:f,popoverProps:p,onClose:h,onToggle:m}=e,v=(0,s.useRef)(),[g,y]=function(e,t){const[n,r]=(0,s.useState)(e);return[n,e=>{r(e),t&&t(e)}]}(!1,m);function b(){h&&h(),y(!1)}(0,s.useEffect)((()=>()=>{m&&m(!1)}),[]);const w={isOpen:g,onToggle:function(){y(!g)},onClose:b};return(0,s.createElement)("div",{className:c()("components-dropdown",i),ref:v,tabIndex:"-1"},r(w),g&&(0,s.createElement)(Fr,a({position:o,onClose:b,onFocusOutside:function(){const{ownerDocument:e}=v.current,t=e.activeElement.closest('[role="dialog"]');v.current.contains(e.activeElement)||t&&!t.contains(v.current)||b()},expandOnMobile:u,headerTitle:d,focusOnMount:f},p,{anchorRef:null!==(t=null==p?void 0:p.anchorRef)&&void 0!==t?t:v.current,className:c()("components-dropdown__content",p?p.className:void 0,l)}),n(w)))}var hg=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));const mg={bottom:{align:"flex-end",justify:"center"},bottomLeft:{align:"flex-start",justify:"flex-end"},bottomRight:{align:"flex-end",justify:"flex-end"},center:{align:"center",justify:"center"},edge:{align:"center",justify:"space-between"},left:{align:"center",justify:"flex-start"},right:{align:"center",justify:"flex-end"},stretch:{align:"stretch"},top:{align:"flex-start",justify:"center"},topLeft:{align:"flex-start",justify:"flex-start"},topRight:{align:"flex-start",justify:"flex-end"}},vg={bottom:{justify:"flex-end",align:"center"},bottomLeft:{justify:"flex-start",align:"flex-end"},bottomRight:{justify:"flex-end",align:"flex-end"},center:{justify:"center",align:"center"},edge:{justify:"space-between",align:"center"},left:{justify:"center",align:"flex-start"},right:{justify:"center",align:"flex-end"},stretch:{justify:"stretch"},top:{justify:"flex-start",align:"center"},topLeft:{justify:"flex-start",align:"flex-start"},topRight:{justify:"flex-start",align:"flex-end"}};function gg(e){return"string"==typeof e?[e]:s.Children.toArray(e).filter((e=>(0,s.isValidElement)(e)))}function yg(e){const{alignment:t="edge",children:n,direction:r,spacing:o=2,...i}=Pn(e,"HStack"),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row";if((0,l.isNil)(e))return{};const n="column"===t?vg:mg;return e in n?n[e]:{align:e}}(t,r);return Mp({children:gg(n).map(((e,t)=>{const n=e.key||`hstack-${t}`;return In(e,["Spacer"])?(0,s.createElement)(gp,a({isBlock:!0,key:n},e.props)):e})),direction:r,justify:"center",...u,...i,gap:o})}var bg=On((function(e,t){const n=yg(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"HStack");var wg=function(e){let{icon:t,size:n=24,...r}=e;return(0,s.cloneElement)(t,{width:n,height:n,...r})};var _g=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const xg=zn("select",{target:"e1mv6sxx1"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",Bo.black,";display:block;font-family:inherit;margin:0;width:100%;",(e=>{let{disabled:t}=e;return t?Xr({color:Bo.ui.textDisabled},"",""):""}),";",(e=>{let{selectSize:t}=e;const n={default:"13px",small:"11px","__unstable-large":"13px"}[t];return n?Xr("font-size:","16px",";@media ( min-width: 600px ){font-size:",n,";}",""):""}),";",(e=>{let{selectSize:t}=e;const n={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24},"__unstable-large":{height:40,lineHeight:1,minHeight:40}};return Xr(n[t]||n.default,"","")}),";",(e=>{let{selectSize:t="default"}=e;return Op({default:{paddingLeft:8,paddingRight:24},small:{paddingLeft:8,paddingRight:24},"__unstable-large":{paddingLeft:16,paddingRight:32}}[t])}),";}"),Eg=zn("div",{target:"e1mv6sxx0"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",Op({right:0})," svg{display:block;}");function kg(e,t){let{className:n,disabled:r=!1,help:o,hideLabelFromVision:i,id:u,label:d,multiple:p=!1,onBlur:h=l.noop,onChange:m=l.noop,onFocus:v=l.noop,options:g=[],size:y="default",value:b,labelPosition:w="top",children:_,prefix:x,suffix:E,...k}=e;const[S,C]=(0,s.useState)(!1),P=function(e){const t=(0,f.useInstanceId)(kg);return e||`inspector-select-control-${t}`}(u),O=o?`${P}__help`:void 0;if((0,l.isEmpty)(g)&&!_)return null;const M=c()("components-select-control",n);return(0,s.createElement)(gv,{help:o,id:P},(0,s.createElement)(Mh,{className:M,disabled:r,hideLabelFromVision:i,id:P,isFocused:S,label:d,size:y,suffix:E||(0,s.createElement)(Eg,null,(0,s.createElement)(wg,{icon:_g,size:18})),prefix:x,labelPosition:w},(0,s.createElement)(xg,a({},k,{"aria-describedby":O,className:"components-select-control__input",disabled:r,id:P,multiple:p,onBlur:e=>{h(e),C(!1)},onChange:e=>{if(p){const t=Array.from(e.target.options).filter((e=>{let{selected:t}=e;return t})),n=t.map((e=>{let{value:t}=e;return t}));m(n)}else m(e.target.value,{event:e})},onFocus:e=>{v(e),C(!0)},ref:t,selectSize:y,value:b}),_||g.map(((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return(0,s.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)})))))}var Sg=(0,s.forwardRef)(kg);const Cg={initial:void 0,fallback:""};var Pg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cg;const{initial:n,fallback:r}={...Cg,...t},[o,i]=(0,s.useState)(e),a=zv(e);(0,s.useEffect)((()=>{a&&o&&i(void 0)}),[a,o]);const l=Vv([e,o,n],r),u=e=>{a||i(e)};return[l,u]};function Og(e,t,n){return"number"!=typeof e?null:parseFloat((0,l.clamp)(e,t,n))}const Mg=()=>Xr({height:30,minHeight:30},"",""),Ig=12,Tg=zn("div",{target:"exqw8y214"})({name:"17z6zai",styles:"-webkit-tap-highlight-color:transparent;box-sizing:border-box;align-items:flex-start;display:inline-flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%"}),Dg=zn("div",{target:"exqw8y213"})("box-sizing:border-box;color:",Bo.blue.medium.focus,";display:block;flex:1;position:relative;width:100%;",(e=>{let{color:t=Bo.ui.borderFocus}=e;return Xr({color:t},"","")}),";",Mg,";",(e=>{let{marks:t}=e;return Xr({marginBottom:t?16:null},"","")}),";"),Ag=zn("span",{target:"exqw8y212"})("margin-top:",4,"px;",Op({marginRight:6}),";"),Rg=zn("span",{target:"exqw8y211"})("margin-top:",4,"px;",Op({marginLeft:6}),";"),Ng=zn("span",{target:"exqw8y210"})("background-color:",Bo.lightGray[600],";box-sizing:border-box;left:0;pointer-events:none;right:0;display:block;height:",4,"px;position:absolute;margin-top:",13,"px;top:0;border-radius:",4,"px;",(e=>{let{disabled:t,railColor:n}=e,r=n||null;return t&&(r=Bo.lightGray[400]),Xr({background:r},"","")}),";"),Lg=zn("span",{target:"exqw8y29"})("background-color:currentColor;border-radius:",4,"px;box-sizing:border-box;height:",4,"px;pointer-events:none;display:block;position:absolute;margin-top:",13,"px;top:0;",(e=>{let{disabled:t,trackColor:n}=e,r=n||"currentColor";return t&&(r=Bo.lightGray[800]),Xr({background:r},"","")}),";"),Fg=zn("span",{target:"exqw8y28"})({name:"1xuuvmv",styles:"box-sizing:border-box;display:block;pointer-events:none;position:relative;width:100%;user-select:none"}),jg=zn("span",{target:"exqw8y27"})("box-sizing:border-box;height:",Ig,"px;left:0;position:absolute;top:-4px;width:1px;",(e=>{let{disabled:t,isFilled:n}=e,r=n?"currentColor":Bo.lightGray[600];return t&&(r=Bo.lightGray[800]),Xr({backgroundColor:r},"","")}),";"),Bg=zn("span",{target:"exqw8y26"})("box-sizing:border-box;color:",Bo.lightGray[600],";left:0;font-size:11px;position:absolute;top:12px;transform:translateX( -50% );white-space:nowrap;",(e=>{let{isFilled:t}=e;return Xr({color:t?Bo.darkGray[300]:Bo.lightGray[600]},"","")}),";");var zg={name:"1sb75b3",styles:"background-color:var( --wp-admin-theme-color )"};const Vg=e=>{let{disabled:t}=e;return t?Xr("background-color:",Bo.lightGray[800],";",""):zg},Hg=zn("span",{target:"exqw8y25"})("align-items:center;box-sizing:border-box;display:flex;height:",Ig,"px;justify-content:center;margin-top:",9,"px;outline:0;pointer-events:none;position:absolute;top:0;user-select:none;width:",Ig,"px;border-radius:50%;",Vg,";",Op({marginLeft:-10}),";",Op({transform:"translateX( 4.5px )"},{transform:"translateX( -4.5px )"}),";"),Wg=zn("span",{target:"exqw8y24"})("align-items:center;border-radius:50%;box-sizing:border-box;height:100%;outline:0;position:absolute;user-select:none;width:100%;",Vg,";",(e=>{let{isFocused:t}=e;return t?Xr("&::before{content:' ';position:absolute;background-color:var( --wp-admin-theme-color );opacity:0.4;border-radius:50%;height:",20,"px;width:",20,"px;top:-4px;left:-4px;}",""):""}),";"),Ug=zn("input",{target:"exqw8y23"})("box-sizing:border-box;cursor:pointer;display:block;height:100%;left:0;margin:0 -",6,"px;opacity:0;outline:none;position:absolute;right:0;top:0;width:calc( 100% + ",Ig,"px );");var $g={name:"1cypxip",styles:"top:-80%"},Kg={name:"1lr98c4",styles:"bottom:-80%"};const Gg=zn("span",{target:"exqw8y22"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-sizing:border-box;color:white;display:inline-block;font-size:12px;min-width:32px;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transition:opacity 120ms ease;user-select:none;line-height:1.4;",(e=>{let{show:t}=e;return Xr({opacity:t?1:0},"","")}),";",(e=>{let{position:t}=e;return"bottom"===t?Kg:$g}),";",zo("transition"),";",Op({transform:"translateX(-50%)"},{transform:"translateX(50%)"}),";"),qg=zn(Hv,{target:"exqw8y21"})("box-sizing:border-box;display:inline-block;font-size:13px;margin-top:0;width:",_p(16),"!important;input[type='number']&{",Mg,";}",Op({marginLeft:`${_p(4)} !important`}),";"),Yg=zn("span",{target:"exqw8y20"})("box-sizing:border-box;display:block;margin-top:0;button,button.is-small{margin-left:0;",Mg,";}",Op({marginLeft:8}),";");const Xg=(0,s.forwardRef)((function(e,t){let{describedBy:n,label:r,onHideTooltip:o=l.noop,onMouseLeave:i=l.noop,onMouseMove:u=l.noop,onShowTooltip:c=l.noop,value:d,...f}=e;const p=function(e){let{onHide:t=l.noop,onMouseLeave:n=l.noop,onMouseMove:r=l.noop,onShow:o=l.noop,timeout:i=300}=e;const[a,u]=(0,s.useState)(!1),c=(0,s.useRef)(),d=(0,s.useCallback)((e=>{window.clearTimeout(c.current),c.current=setTimeout(e,i)}),[i]),f=(0,s.useCallback)((e=>{r(e),d((()=>{a||(u(!0),o())}))}),[]),p=(0,s.useCallback)((e=>{n(e),d((()=>{u(!1),t()}))}),[]);return(0,s.useEffect)((()=>()=>{window.clearTimeout(c.current)})),{onMouseMove:f,onMouseLeave:p}}({onHide:o,onMouseLeave:i,onMouseMove:u,onShow:c});return(0,s.createElement)(Ug,a({},f,p,{"aria-describedby":n,"aria-label":r,"aria-hidden":!1,ref:t,tabIndex:0,type:"range",value:d}))}));var Zg=Xg;function Jg(e){let{className:t,isFilled:n=!1,label:r,style:o={},...i}=e;const l=c()("components-range-control__mark",n&&"is-filled",t),u=c()("components-range-control__mark-label",n&&"is-filled");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(jg,a({},i,{"aria-hidden":"true",className:l,isFilled:n,style:o})),r&&(0,s.createElement)(Bg,{"aria-hidden":"true",className:u,isFilled:n,style:o},r))}function Qg(e){let{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0,...u}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ng,a({disabled:t},u)),n&&(0,s.createElement)(ey,{disabled:t,marks:n,min:r,max:o,step:i,value:l}))}function ey(e){let{disabled:t=!1,marks:n=!1,min:r=0,max:o=100,step:i=1,value:l=0}=e;"any"===i&&(i=1);const u=function(e){let{marks:t,min:n=0,max:r=100,step:o=1,value:i=0}=e;if(!t)return[];const a=r-n;if(!Array.isArray(t)){t=[];const e=1+Math.round(a/o);for(;e>t.push({value:o*t.length+n}););}const s=[];return t.forEach(((e,t)=>{if(e.valuer)return;const o=`mark-${t}`,l=e.value<=i,u=(e.value-n)/a*100+"%",c={[(0,d.isRTL)()?"right":"left"]:u};s.push({...e,isFilled:l,key:o,style:c})})),s}({marks:n,min:r,max:o,step:i,value:l});return(0,s.createElement)(Fg,{"aria-hidden":"true",className:"components-range-control__marks"},u.map((e=>(0,s.createElement)(Jg,a({},e,{key:e.key,"aria-hidden":"true",disabled:t})))))}function ty(e){let{className:t,inputRef:n,tooltipPosition:r,show:o=!1,style:i={},value:l=0,renderTooltipContent:u=(e=>e),zIndex:d=100,...f}=e;const p=function(e){let{inputRef:t,tooltipPosition:n}=e;const[r,o]=(0,s.useState)(),i=(0,s.useCallback)((()=>{t&&t.current&&o(n)}),[n]);return(0,s.useEffect)((()=>{i()}),[i]),(0,s.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}))),r}({inputRef:n,tooltipPosition:r}),h=c()("components-simple-tooltip",t),m={...i,zIndex:d};return(0,s.createElement)(Gg,a({},f,{"aria-hidden":o,className:h,position:p,show:o,role:"tooltip",style:m}),u(l))}const ny=(0,s.forwardRef)((function e(t,n){var r;let{afterIcon:o,allowReset:i=!1,beforeIcon:u,className:p,currentInput:h,color:m=Bo.ui.theme,disabled:v=!1,help:g,initialPosition:y,isShiftStepEnabled:b=!0,label:w,hideLabelFromVision:_=!1,marks:x=!1,max:E=100,min:k=0,onBlur:S=l.noop,onChange:C=l.noop,onFocus:P=l.noop,onMouseMove:O=l.noop,onMouseLeave:M=l.noop,railColor:I,resetFallbackValue:T,renderTooltipContent:D=(e=>e),showTooltip:A,shiftStep:R=10,step:N=1,trackColor:L,value:F,withInputField:j=!0,...B}=t;const[z,V]=function(e){let{min:t,max:n,value:r,initial:o}=e;const[i,a]=Pg(Og(r,t,n),{initial:o,fallback:null});return[i,(0,s.useCallback)((e=>{a(null===e?null:Og(e,t,n))}),[t,n])]}({min:k,max:E,value:F,initial:y}),H=(0,s.useRef)(!1);"any"===N&&(A=!1,j=!1);const[W,U]=(0,s.useState)(A),[$,K]=(0,s.useState)(!1),G=(0,s.useRef)(),q=null===(r=G.current)||void 0===r?void 0:r.matches(":focus"),Y=!v&&$,X=null===z,Z=X?"":void 0!==z?z:h,J=X?(E-k)/2+k:z,Q=X?50:(z-k)/(E-k)*100,ee=`${(0,l.clamp)(Q,0,100)}%`,te=c()("components-range-control",p),ne=c()("components-range-control__wrapper",!!x&&"is-marked"),re=(0,f.useInstanceId)(e,"inspector-range-control"),oe=g?`${re}__help`:void 0,ie=!1!==A&&(0,l.isFinite)(z),ae=()=>{let e=parseFloat(T),t=e;isNaN(e)&&(e=null,t=void 0),V(e),C(t)},se={[(0,d.isRTL)()?"right":"left"]:ee};return(0,s.createElement)(gv,{className:te,label:w,hideLabelFromVision:_,id:re,help:g},(0,s.createElement)(Tg,{className:"components-range-control__root"},u&&(0,s.createElement)(Ag,null,(0,s.createElement)(He,{icon:u})),(0,s.createElement)(Dg,{className:ne,color:m,marks:!!x},(0,s.createElement)(Zg,a({},B,{className:"components-range-control__slider",describedBy:oe,disabled:v,id:re,label:w,max:E,min:k,onBlur:e=>{S(e),K(!1),U(!1)},onChange:e=>{const t=parseFloat(e.target.value);V(t),C(t)},onFocus:e=>{P(e),K(!0),U(!0)},onMouseMove:O,onMouseLeave:M,ref:e=>{G.current=e,n&&n(e)},step:N,value:Z})),(0,s.createElement)(Qg,{"aria-hidden":!0,disabled:v,marks:x,max:E,min:k,railColor:I,step:N,value:J}),(0,s.createElement)(Lg,{"aria-hidden":!0,className:"components-range-control__track",disabled:v,style:{width:ee},trackColor:L}),(0,s.createElement)(Hg,{style:se,disabled:v},(0,s.createElement)(Wg,{"aria-hidden":!0,isFocused:Y,disabled:v})),ie&&(0,s.createElement)(ty,{className:"components-range-control__tooltip",inputRef:G,tooltipPosition:"bottom",renderTooltipContent:D,show:q||W,style:se,value:z})),o&&(0,s.createElement)(Rg,null,(0,s.createElement)(He,{icon:o})),j&&(0,s.createElement)(qg,{"aria-label":w,className:"components-range-control__number",disabled:v,inputMode:"decimal",isShiftStepEnabled:b,max:E,min:k,onBlur:()=>{H.current&&(ae(),H.current=!1)},onChange:e=>{e=parseFloat(e),V(e),isNaN(e)?i&&(H.current=!0):((eE)&&(e=Og(e,k,E)),C(e),H.current=!1)},shiftStep:R,step:N,value:Z}),i&&(0,s.createElement)(Yg,null,(0,s.createElement)($n,{className:"components-range-control__reset",disabled:v||void 0===z,variant:"secondary",isSmall:!0,onClick:ae},(0,d.__)("Reset")))))}));var ry=ny;const oy=zn(Hv,{target:"ez9hsf46"})(vh,"{width:",_p(24),";}"),iy=zn(Sg,{target:"ez9hsf45"})("margin-left:",_p(-2),";width:5em;",xh,"{display:none;}"),ay=zn(ry,{target:"ez9hsf44"})("flex:1;",cv,"{margin-bottom:0;}"),sy=`\n&&& ${gh} {\n\theight: 40px;\n}`,ly=`\n.react-colorful__interactive {\n\twidth: calc( 100% - ${_p(2)} );\n\tmargin-left: ${_p(1)};\n}`,uy=zn("div",{target:"ez9hsf43"})("padding:",_p(2)," ",_p(4),";"),cy=zn("div",{target:"ez9hsf42"})("width:216px;.react-colorful{display:flex;flex-direction:column;align-items:center;width:216px;height:auto;}.react-colorful__saturation{width:100%;border-radius:0;height:216px;margin-bottom:",_p(4),";border-bottom:none;}.react-colorful__hue,.react-colorful__alpha{width:184px;height:16px;border-radius:16px;margin-bottom:",_p(2),";}.react-colorful__pointer{height:16px;width:16px;border:none;box-shadow:0 0 2px 0 rgba( 0, 0, 0, 0.25 );outline:2px solid transparent;}.react-colorful__pointer-fill{box-shadow:inset 0 0 0 ",Up.borderWidthFocus," #fff;}",ly," ",cv,"{margin-bottom:0;}",sy,";"),dy=zn($n,{target:"ez9hsf41"})("&&&&&{min-width:",_p(6),";padding:0;}"),fy=zn(Um,{target:"ez9hsf40"})({name:"1287a6j",styles:"width:8em"});function py(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function hy(e){return e instanceof py(e).Element||e instanceof Element}function my(e){return e instanceof py(e).HTMLElement||e instanceof HTMLElement}function vy(e){return"undefined"!=typeof ShadowRoot&&(e instanceof py(e).ShadowRoot||e instanceof ShadowRoot)}var gy=Math.max,yy=Math.min,by=Math.round;function wy(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function _y(){return!/^((?!chrome|android).)*safari/i.test(wy())}function xy(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&my(e)&&(o=e.offsetWidth>0&&by(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&by(r.height)/e.offsetHeight||1);var a=(hy(e)?py(e):window).visualViewport,s=!_y()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,u=(r.top+(s&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function Ey(e){var t=py(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ky(e){return e?(e.nodeName||"").toLowerCase():null}function Sy(e){return((hy(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cy(e){return xy(Sy(e)).left+Ey(e).scrollLeft}function Py(e){return py(e).getComputedStyle(e)}function Oy(e){var t=Py(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function My(e,t,n){void 0===n&&(n=!1);var r=my(t),o=my(t)&&function(e){var t=e.getBoundingClientRect(),n=by(t.width)/e.offsetWidth||1,r=by(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Sy(t),a=xy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==ky(t)||Oy(i))&&(s=function(e){return e!==py(e)&&my(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Ey(e);var t}(t)),my(t)?((l=xy(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Cy(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Iy(e){var t=xy(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Ty(e){return"html"===ky(e)?e:e.assignedSlot||e.parentNode||(vy(e)?e.host:null)||Sy(e)}function Dy(e){return["html","body","#document"].indexOf(ky(e))>=0?e.ownerDocument.body:my(e)&&Oy(e)?e:Dy(Ty(e))}function Ay(e,t){var n;void 0===t&&(t=[]);var r=Dy(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=py(r),a=o?[i].concat(i.visualViewport||[],Oy(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Ay(Ty(a)))}function Ry(e){return["table","td","th"].indexOf(ky(e))>=0}function Ny(e){return my(e)&&"fixed"!==Py(e).position?e.offsetParent:null}function Ly(e){for(var t=py(e),n=Ny(e);n&&Ry(n)&&"static"===Py(n).position;)n=Ny(n);return n&&("html"===ky(n)||"body"===ky(n)&&"static"===Py(n).position)?t:n||function(e){var t=/firefox/i.test(wy());if(/Trident/i.test(wy())&&my(e)&&"fixed"===Py(e).position)return null;var n=Ty(e);for(vy(n)&&(n=n.host);my(n)&&["html","body"].indexOf(ky(n))<0;){var r=Py(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Fy="top",jy="bottom",By="right",zy="left",Vy="auto",Hy=[Fy,jy,By,zy],Wy="start",Uy="end",$y="viewport",Ky="popper",Gy=Hy.reduce((function(e,t){return e.concat([t+"-"+Wy,t+"-"+Uy])}),[]),qy=[].concat(Hy,[Vy]).reduce((function(e,t){return e.concat([t,t+"-"+Wy,t+"-"+Uy])}),[]),Yy=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Xy(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var Zy={placement:"bottom",modifiers:[],strategy:"absolute"};function Jy(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function ib(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?nb(o):null,a=o?rb(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Fy:t={x:s,y:n.y-r.height};break;case jy:t={x:s,y:n.y+n.height};break;case By:t={x:n.x+n.width,y:l};break;case zy:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?ob(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case Wy:t[u]=t[u]-(n[c]/2-r[c]/2);break;case Uy:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ab={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ib({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},sb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lb(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,m=void 0===h?0:h,v="function"==typeof c?c({x:p,y:m}):{x:p,y:m};p=v.x,m=v.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=zy,w=Fy,_=window;if(u){var x=Ly(n),E="clientHeight",k="clientWidth";if(x===py(n)&&"static"!==Py(x=Sy(n)).position&&"absolute"===s&&(E="scrollHeight",k="scrollWidth"),x=x,o===Fy||(o===zy||o===By)&&i===Uy)w=jy,m-=(d&&x===_&&_.visualViewport?_.visualViewport.height:x[E])-r.height,m*=l?1:-1;if(o===zy||(o===Fy||o===jy)&&i===Uy)b=By,p-=(d&&x===_&&_.visualViewport?_.visualViewport.width:x[k])-r.width,p*=l?1:-1}var S,C=Object.assign({position:s},u&&sb),P=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:by(n*o)/o||0,y:by(r*o)/o||0}}({x:p,y:m},py(n)):{x:p,y:m};return p=P.x,m=P.y,l?Object.assign({},C,((S={})[w]=y?"0":"",S[b]=g?"0":"",S.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",S)):Object.assign({},C,((t={})[w]=y?m+"px":"",t[b]=g?p+"px":"",t.transform="",t))}var ub={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:nb(t.placement),variation:rb(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,lb(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,lb(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var cb={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];my(o)&&ky(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});my(r)&&ky(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var db={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=qy.reduce((function(e,n){return e[n]=function(e,t,n){var r=nb(e),o=[zy,Fy].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[zy,By].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},fb={left:"right",right:"left",bottom:"top",top:"bottom"};function pb(e){return e.replace(/left|right|bottom|top/g,(function(e){return fb[e]}))}var hb={start:"end",end:"start"};function mb(e){return e.replace(/start|end/g,(function(e){return hb[e]}))}function vb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vy(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function gb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yb(e,t,n){return t===$y?gb(function(e,t){var n=py(e),r=Sy(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=_y();(u||!u&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Cy(e),y:l}}(e,n)):hy(t)?function(e,t){var n=xy(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):gb(function(e){var t,n=Sy(e),r=Ey(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=gy(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=gy(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Cy(e),l=-r.scrollTop;return"rtl"===Py(o||n).direction&&(s+=gy(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Sy(e)))}function bb(e,t,n,r){var o="clippingParents"===t?function(e){var t=Ay(Ty(e)),n=["absolute","fixed"].indexOf(Py(e).position)>=0&&my(e)?Ly(e):e;return hy(n)?t.filter((function(e){return hy(e)&&vb(e,n)&&"body"!==ky(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=yb(e,n,r);return t.top=gy(o.top,t.top),t.right=yy(o.right,t.right),t.bottom=yy(o.bottom,t.bottom),t.left=gy(o.left,t.left),t}),yb(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function wb(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function _b(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function xb(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?$y:u,d=n.elementContext,f=void 0===d?Ky:d,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,v=void 0===m?0:m,g=wb("number"!=typeof v?v:_b(v,Hy)),y=f===Ky?"reference":Ky,b=e.rects.popper,w=e.elements[h?y:f],_=bb(hy(w)?w:w.contextElement||Sy(e.elements.popper),l,c,a),x=xy(e.elements.reference),E=ib({reference:x,element:b,strategy:"absolute",placement:o}),k=gb(Object.assign({},b,E)),S=f===Ky?k:x,C={top:_.top-S.top+g.top,bottom:S.bottom-_.bottom+g.bottom,left:_.left-S.left+g.left,right:S.right-_.right+g.right},P=e.modifiersData.offset;if(f===Ky&&P){var O=P[o];Object.keys(C).forEach((function(e){var t=[By,jy].indexOf(e)>=0?1:-1,n=[Fy,jy].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}var Eb={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,v=t.options.placement,g=nb(v),y=l||(g===v||!h?[pb(v)]:function(e){if(nb(e)===Vy)return[];var t=pb(e);return[mb(e),t,mb(t)]}(v)),b=[v].concat(y).reduce((function(e,n){return e.concat(nb(n)===Vy?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?qy:l,c=rb(r),d=c?s?Gy:Gy.filter((function(e){return rb(e)===c})):Hy,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=xb(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[nb(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,E=!0,k=b[0],S=0;S=0,I=M?"width":"height",T=xb(t,{placement:C,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),D=M?O?By:zy:O?jy:Fy;w[I]>_[I]&&(D=pb(D));var A=pb(D),R=[];if(i&&R.push(T[P]<=0),s&&R.push(T[D]<=0,T[A]<=0),R.every((function(e){return e}))){k=C,E=!1;break}x.set(C,R)}if(E)for(var N=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},L=h?3:1;L>0;L--){if("break"===N(L))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kb(e,t,n){return gy(e,yy(t,n))}var Sb={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,v=xb(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),g=nb(t.placement),y=rb(t.placement),b=!y,w=ob(g),_="x"===w?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,S="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,C="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(x){if(i){var M,I="y"===w?Fy:zy,T="y"===w?jy:By,D="y"===w?"height":"width",A=x[w],R=A+v[I],N=A-v[T],L=p?-k[D]/2:0,F=y===Wy?E[D]:k[D],j=y===Wy?-k[D]:-E[D],B=t.elements.arrow,z=p&&B?Iy(B):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[I],W=V[T],U=kb(0,E[D],z[D]),$=b?E[D]/2-L-U-H-C.mainAxis:F-U-H-C.mainAxis,K=b?-E[D]/2+L+U+W+C.mainAxis:j+U+W+C.mainAxis,G=t.elements.arrow&&Ly(t.elements.arrow),q=G?"y"===w?G.clientTop||0:G.clientLeft||0:0,Y=null!=(M=null==P?void 0:P[w])?M:0,X=A+K-Y,Z=kb(p?yy(R,A+$-Y-q):R,A,p?gy(N,X):N);x[w]=Z,O[w]=Z-A}if(s){var J,Q="x"===w?Fy:zy,ee="x"===w?jy:By,te=x[_],ne="y"===_?"height":"width",re=te+v[Q],oe=te-v[ee],ie=-1!==[Fy,zy].indexOf(g),ae=null!=(J=null==P?void 0:P[_])?J:0,se=ie?re:te-E[ne]-k[ne]-ae+C.altAxis,le=ie?te+E[ne]+k[ne]-ae-C.altAxis:oe,ue=p&&ie?function(e,t,n){var r=kb(e,t,n);return r>n?n:r}(se,te,le):kb(p?se:re,te,p?le:oe);x[_]=ue,O[_]=ue-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};var Cb={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=nb(n.placement),l=ob(s),u=[zy,By].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return wb("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:_b(e,Hy))}(o.padding,n),d=Iy(i),f="y"===l?Fy:zy,p="y"===l?jy:By,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],v=Ly(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,y=h/2-m/2,b=c[f],w=g-d[u]-c[p],_=g/2-d[u]/2+y,x=kb(b,_,w),E=l;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&vb(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pb(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ob(e){return[Fy,By,jy,zy].some((function(t){return e[t]>=0}))}var Mb={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=xb(t,{elementContext:"reference"}),s=xb(t,{altBoundary:!0}),l=Pb(a,r),u=Pb(s,o,i),c=Ob(l),d=Ob(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},Ib=Qy({defaultModifiers:[tb,ab,ub,cb,db,Eb,Sb,Cb,Mb]});function Tb(e){void 0===e&&(e={});var t,n,r=Yo(e),o=r.visible,i=void 0!==o&&o,a=r.animated,s=void 0!==a&&a,l=ti(v(r,["visible","animated"])),u=(0,b.useState)(i),c=u[0],d=u[1],f=(0,b.useState)(s),p=f[0],h=f[1],g=(0,b.useState)(!1),y=g[0],w=g[1],_=(t=c,n=(0,b.useRef)(null),G((function(){n.current=t}),[t]),n),x=null!=_.current&&_.current!==c;p&&!y&&x&&w(!0),(0,b.useEffect)((function(){if("number"==typeof p&&y){var e=setTimeout((function(){return w(!1)}),p);return function(){clearTimeout(e)}}return function(){}}),[p,y]);var E=(0,b.useCallback)((function(){return d(!0)}),[]),k=(0,b.useCallback)((function(){return d(!1)}),[]),S=(0,b.useCallback)((function(){return d((function(e){return!e}))}),[]),C=(0,b.useCallback)((function(){return w(!1)}),[]);return m(m({},l),{},{visible:c,animated:p,animating:y,show:E,hide:k,toggle:S,setVisible:d,setAnimated:h,stopAnimation:C})}var Db=ne("Mac")&&!ne("Chrome")&&ne("Safari");function Ab(e){return function(t){return e&&!F(t,e)?e:t}}function Rb(e){void 0===e&&(e={});var t=Yo(e),n=t.gutter,r=void 0===n?12:n,o=t.placement,i=void 0===o?"bottom":o,a=t.unstable_flip,s=void 0===a||a,l=t.unstable_offset,u=t.unstable_preventOverflow,c=void 0===u||u,d=t.unstable_fixed,f=void 0!==d&&d,p=t.modal,h=void 0!==p&&p,g=v(t,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),y=(0,b.useRef)(null),w=(0,b.useRef)(null),_=(0,b.useRef)(null),x=(0,b.useRef)(null),E=(0,b.useState)(i),k=E[0],S=E[1],C=(0,b.useState)(i),P=C[0],O=C[1],M=(0,b.useState)(l||[0,r])[0],I=(0,b.useState)({position:"fixed",left:"100%",top:"100%"}),T=I[0],D=I[1],A=(0,b.useState)({}),R=A[0],N=A[1],L=function(e){void 0===e&&(e={});var t=Yo(e),n=t.modal,r=void 0===n||n,o=Tb(v(t,["modal"])),i=(0,b.useState)(r),a=i[0],s=i[1],l=(0,b.useRef)(null);return m(m({},o),{},{modal:a,setModal:s,unstable_disclosureRef:l})}(m({modal:h},g)),F=(0,b.useCallback)((function(){return!!y.current&&(y.current.forceUpdate(),!0)}),[]),j=(0,b.useCallback)((function(e){e.placement&&O(e.placement),e.styles&&(D(Ab(e.styles.popper)),x.current&&N(Ab(e.styles.arrow)))}),[]);return G((function(){return w.current&&_.current&&(y.current=Ib(w.current,_.current,{placement:k,strategy:f?"fixed":"absolute",onFirstUpdate:Db?j:void 0,modifiers:[{name:"eventListeners",enabled:L.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:s,options:{padding:8}},{name:"offset",options:{offset:M}},{name:"preventOverflow",enabled:c,options:{tetherOffset:function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.clientWidth)||0}}},{name:"arrow",enabled:!!x.current,options:{element:x.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:L.visible&&!0,fn:function(e){var t=e.state;return j(t)}}]})),function(){y.current&&(y.current.destroy(),y.current=null)}}),[k,f,L.visible,s,M,c]),(0,b.useEffect)((function(){if(L.visible){var e=window.requestAnimationFrame((function(){var e;null===(e=y.current)||void 0===e||e.forceUpdate()}));return function(){window.cancelAnimationFrame(e)}}}),[L.visible]),m(m({},L),{},{unstable_referenceRef:w,unstable_popoverRef:_,unstable_arrowRef:x,unstable_popoverStyles:T,unstable_arrowStyles:R,unstable_update:F,unstable_originalPlacement:k,placement:P,place:S})}var Nb={currentTooltipId:null,listeners:new Set,subscribe:function(e){var t=this;return this.listeners.add(e),function(){t.listeners.delete(e)}},show:function(e){this.currentTooltipId=e,this.listeners.forEach((function(t){return t(e)}))},hide:function(e){this.currentTooltipId===e&&(this.currentTooltipId=null,this.listeners.forEach((function(e){return e(null)})))}};var Lb=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","unstable_disclosureRef","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place","unstable_timeout","unstable_setTimeout"],Fb=[].concat(Lb,["unstable_portal"]),jb=V({name:"TooltipReference",compose:ue,keys:Lb,useProps:function(e,t){var n=t.ref,r=t.onFocus,o=t.onBlur,i=t.onMouseEnter,a=t.onMouseLeave,s=v(t,["ref","onFocus","onBlur","onMouseEnter","onMouseLeave"]),l=q(r),u=q(o),c=q(i),d=q(a),f=(0,b.useCallback)((function(t){var n,r;null===(n=l.current)||void 0===n||n.call(l,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),p=(0,b.useCallback)((function(t){var n,r;null===(n=u.current)||void 0===n||n.call(u,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]),h=(0,b.useCallback)((function(t){var n,r;null===(n=c.current)||void 0===n||n.call(c,t),t.defaultPrevented||null===(r=e.show)||void 0===r||r.call(e)}),[e.show]),g=(0,b.useCallback)((function(t){var n,r;null===(n=d.current)||void 0===n||n.call(d,t),t.defaultPrevented||null===(r=e.hide)||void 0===r||r.call(e)}),[e.hide]);return m({ref:W(e.unstable_referenceRef,n),tabIndex:0,onFocus:f,onBlur:p,onMouseEnter:h,onMouseLeave:g,"aria-describedby":e.baseId},s)}}),Bb=B({as:"div",useHook:jb});const zb=(0,s.createContext)({});var Vb=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],Hb=V({name:"DisclosureContent",compose:ue,keys:Vb,useProps:function(e,t){var n=t.onTransitionEnd,r=t.onAnimationEnd,o=t.style,i=v(t,["onTransitionEnd","onAnimationEnd","style"]),a=e.animated&&e.animating,s=(0,b.useState)(null),l=s[0],u=s[1],c=!e.visible&&!a,d=c?m({display:"none"},o):o,f=q(n),p=q(r),h=(0,b.useRef)(0);(0,b.useEffect)((function(){if(e.animated)return h.current=window.requestAnimationFrame((function(){h.current=window.requestAnimationFrame((function(){e.visible?u("enter"):u(a?"leave":null)}))})),function(){return window.cancelAnimationFrame(h.current)}}),[e.animated,e.visible,a]);var g=(0,b.useCallback)((function(t){var n;Y(t)&&(a&&!0===e.animated&&(null===(n=e.stopAnimation)||void 0===n||n.call(e)))}),[e.animated,a,e.stopAnimation]),y=(0,b.useCallback)((function(e){var t;null===(t=f.current)||void 0===t||t.call(f,e),g(e)}),[g]),w=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),g(e)}),[g]);return m({id:e.baseId,"data-enter":"enter"===l?"":void 0,"data-leave":"leave"===l?"":void 0,onTransitionEnd:y,onAnimationEnd:w,hidden:c,style:d},i)}}),Wb=B({as:"div",useHook:Hb}),Ub=window.ReactDOM;function $b(){return K?document.body:null}var Kb=(0,b.createContext)($b());function Gb(e){var t=e.children,n=(0,b.useContext)(Kb)||$b(),r=(0,b.useState)((function(){if(K){var e=document.createElement("div");return e.className=Gb.__className,e}return null}))[0];return G((function(){if(r&&n)return n.appendChild(r),function(){n.removeChild(r)}}),[r,n]),r?(0,Ub.createPortal)((0,b.createElement)(Kb.Provider,{value:r},t),r):null}function qb(e){e.defaultPrevented||"Escape"===e.key&&Nb.show(null)}Gb.__className="__reakit-portal",Gb.__selector="."+Gb.__className;var Yb=V({name:"Tooltip",compose:Hb,keys:Fb,useOptions:function(e){var t=e.unstable_portal;return m({unstable_portal:void 0===t||t},v(e,["unstable_portal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=t.wrapElement,i=v(t,["ref","style","wrapElement"]);(0,b.useEffect)((function(){var t;U(null===(t=e.unstable_popoverRef)||void 0===t?void 0:t.current).addEventListener("keydown",qb)}),[]);var a=(0,b.useCallback)((function(t){return e.unstable_portal&&(t=(0,b.createElement)(Gb,null,t)),o?o(t):t}),[e.unstable_portal,o]);return m({ref:W(e.unstable_popoverRef,n),role:"tooltip",style:m(m({},e.unstable_popoverStyles),{},{pointerEvents:"none"},r),wrapElement:a},i)}}),Xb=B({as:"div",memo:!0,useHook:Yb});var Zb=On((function(e,t){const{as:n="span",shortcut:r,className:o,...i}=Pn(e,"Shortcut");if(!r)return null;let l,u;return"string"==typeof r?l=r:(l=r.display,u=r.ariaLabel),(0,s.createElement)(Hn,a({as:n,className:o,"aria-label":u,ref:t},i),l)}),"Shortcut");const Jb=Xr("z-index:",1000002,";box-sizing:border-box;opacity:0;outline:none;transform-origin:top center;transition:opacity ",Up.transitionDurationFastest," ease;&[data-enter]{opacity:1;}",""),Qb=zn("div",{target:"e7tfjmw1"})("background:rgba( 0, 0, 0, 0.8 );border-radius:2px;box-shadow:0 0 0 1px rgba( 255, 255, 255, 0.04 );color:",Bo.white,";padding:4px 8px;"),ew={name:"12mkfdx",styles:"outline:none"},tw=zn(Zb,{target:"e7tfjmw0"})("display:inline-block;margin-left:",_p(1),";"),{TooltipPopoverView:nw}=t;var rw=On((function(e,t){const{children:n,className:r,...o}=Pn(e,"TooltipContent"),{tooltip:i}=(0,s.useContext)(zb),l=Cn()(Jb,r);return(0,s.createElement)(Xb,a({as:Hn},o,i,{className:l,ref:t}),(0,s.createElement)(nw,null,n))}),"TooltipContent");const ow=On((function(e,t){const{animated:n=!0,animationDuration:r=160,baseId:o,children:i,content:l,focusable:u=!0,gutter:c=4,id:d,modal:f=!0,placement:p,visible:h=!1,shortcut:g,...y}=Pn(e,"Tooltip"),w=function(e){void 0===e&&(e={});var t=Yo(e),n=t.placement,r=void 0===n?"top":n,o=t.unstable_timeout,i=void 0===o?0:o,a=v(t,["placement","unstable_timeout"]),s=(0,b.useState)(i),l=s[0],u=s[1],c=(0,b.useRef)(null),d=(0,b.useRef)(null),f=Rb(m(m({},a),{},{placement:r})),p=(f.modal,f.setModal,v(f,["modal","setModal"])),h=(0,b.useCallback)((function(){null!==c.current&&window.clearTimeout(c.current),null!==d.current&&window.clearTimeout(d.current)}),[]),g=(0,b.useCallback)((function(){h(),p.hide(),d.current=window.setTimeout((function(){Nb.hide(p.baseId)}),l)}),[h,p.hide,l,p.baseId]),y=(0,b.useCallback)((function(){h(),!l||Nb.currentTooltipId?(Nb.show(p.baseId),p.show()):(Nb.show(null),c.current=window.setTimeout((function(){Nb.show(p.baseId),p.show()}),l))}),[h,l,p.show,p.baseId]);return(0,b.useEffect)((function(){return Nb.subscribe((function(e){e!==p.baseId&&(h(),p.visible&&p.hide())}))}),[p.baseId,h,p.visible,p.hide]),(0,b.useEffect)((function(){return function(){h(),Nb.hide(p.baseId)}}),[h,p.baseId]),m(m({},p),{},{hide:g,show:y,unstable_timeout:l,unstable_setTimeout:u})}({animated:n?r:void 0,baseId:o||d,gutter:c,placement:p,visible:h,...y}),_=(0,s.useMemo)((()=>({tooltip:w})),[w]);return(0,s.createElement)(zb.Provider,{value:_},l&&(0,s.createElement)(rw,{unstable_portal:f,ref:t},l,g&&(0,s.createElement)(tw,{shortcut:g})),i&&(0,s.createElement)(Bb,a({},w,i.props,{ref:null==i?void 0:i.ref}),(e=>(u||(e.tabIndex=void 0),(0,s.cloneElement)(i,e)))))}),"Tooltip");var iw=ow;const aw=e=>{let{values:t}=e;return(0,s.createElement)(s.Fragment,null,t.map((e=>{let[t,n]=e;return(0,s.createElement)(gp,{key:n,isBlock:!0,display:"flex"},(0,s.createElement)(ah,{color:Bo.ui.theme},n),(0,s.createElement)(ah,null,t))})))},sw=e=>{let{color:t,enableAlpha:n}=e;const{h:r,s:o,l:i,a:a}=t.toHsl(),l=[[Math.floor(r),"H"],[Math.round(100*o),"S"],[Math.round(100*i),"L"]];return n&&l.push([Math.round(100*a),"A"]),(0,s.createElement)(aw,{values:l})},lw=e=>{let{color:t,enableAlpha:n}=e;const{r:r,g:o,b:i,a:a}=t.toRgb(),l=[[r,"R"],[o,"G"],[i,"B"]];return n&&l.push([Math.round(100*a),"A"]),(0,s.createElement)(aw,{values:l})},uw=e=>{let{color:t}=e;const n=t.toHex().slice(1).toUpperCase();return(0,s.createElement)(gp,null,(0,s.createElement)(ah,{color:Bo.ui.theme},"#"),(0,s.createElement)(ah,null,n))},cw=e=>{let{color:t,colorType:n,enableAlpha:r}=e;const[o,i]=(0,s.useState)(null),a=(0,s.useRef)(),l={color:t,enableAlpha:r},u=(e=>{switch(e){case"hsl":return sw;case"rgb":return lw;default:return uw}})(n),c=(0,f.useCopyToClipboard)((()=>{switch(n){case"hsl":return t.toHslString();case"rgb":return t.toRgbString();default:return t.toHex()}}),(()=>{a.current&&clearTimeout(a.current),i(t.toHex()),a.current=setTimeout((()=>{i(null),a.current=void 0}),3e3)}));return(0,s.useEffect)((()=>()=>{a.current&&clearTimeout(a.current)}),[]),(0,s.createElement)(iw,{content:(0,s.createElement)(ah,{color:"white"},o===t.toHex()?(0,d.__)("Copied!"):(0,d.__)("Copy"))},(0,s.createElement)(Ip,{justify:"flex-start",gap:_p(1),ref:c,style:{height:30}},(0,s.createElement)(u,l)))},dw=e=>{let{min:t,max:n,label:r,abbreviation:o,onChange:i,value:a}=e;return(0,s.createElement)(Jm,{as:bg,spacing:4},(0,s.createElement)(oy,{min:t,max:n,label:r,hideLabelFromVision:!0,value:a,onChange:i,prefix:(0,s.createElement)(Jm,{as:ah,paddingLeft:_p(3.5),color:Bo.ui.theme,lineHeight:1},o),hideHTMLArrows:!0}),(0,s.createElement)(ay,{label:r,hideLabelFromVision:!0,min:t,max:n,value:a,onChange:i,withInputField:!1}))},fw=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{r:o,g:i,b:a,a:l}=t.toRgb();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(dw,{min:0,max:255,label:"Red",abbreviation:"R",value:o,onChange:e=>n(ko({r:e,g:i,b:a,a:l}))}),(0,s.createElement)(dw,{min:0,max:255,label:"Green",abbreviation:"G",value:i,onChange:e=>n(ko({r:o,g:e,b:a,a:l}))}),(0,s.createElement)(dw,{min:0,max:255,label:"Blue",abbreviation:"B",value:a,onChange:e=>n(ko({r:o,g:i,b:e,a:l}))}),r&&(0,s.createElement)(dw,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>n(ko({r:o,g:i,b:a,a:e/100}))}))},pw=e=>{let{color:t,onChange:n,enableAlpha:r}=e;const{h:o,s:i,l:a,a:l}=t.toHsl();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(dw,{min:0,max:359,label:"Hue",abbreviation:"H",value:o,onChange:e=>{n(ko({h:e,s:i,l:a,a:l}))}}),(0,s.createElement)(dw,{min:0,max:100,label:"Saturation",abbreviation:"S",value:i,onChange:e=>{n(ko({h:o,s:e,l:a,a:l}))}}),(0,s.createElement)(dw,{min:0,max:100,label:"Lightness",abbreviation:"L",value:a,onChange:e=>{n(ko({h:o,s:i,l:e,a:l}))}}),r&&(0,s.createElement)(dw,{min:0,max:100,label:"Alpha",abbreviation:"A",value:Math.trunc(100*l),onChange:e=>{n(ko({h:o,s:i,l:a,a:e/100}))}}))},hw=e=>{let{color:t,onChange:n,enableAlpha:r}=e;return(0,s.createElement)(fy,{prefix:(0,s.createElement)(Jm,{as:ah,marginLeft:_p(3.5),color:Bo.ui.theme,lineHeight:1},"#"),value:t.toHex().slice(1).toUpperCase(),onChange:e=>{if(!e)return;const t=e.startsWith("#")?e:"#"+e;n(ko(t))},maxLength:r?9:7,label:(0,d.__)("Hex color"),hideLabelFromVision:!0})},mw=e=>{let{colorType:t,color:n,onChange:r,enableAlpha:o}=e;const i={color:n,onChange:r,enableAlpha:o};switch(t){case"hsl":return(0,s.createElement)(pw,i);case"rgb":return(0,s.createElement)(fw,i);default:return(0,s.createElement)(hw,i)}};function vw(){return(vw=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function yw(e){var t=(0,b.useRef)(e),n=(0,b.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var bw=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?i(xw(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=_w(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(Ew(t),!function(e,t){return t&&!ww(e)}(t,l.current)&&r)){if(ww(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(xw(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],d=u[1],f=u[2];return(0,b.useEffect)((function(){return f}),[f]),b.createElement("div",vw({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),Sw=function(e){return e.filter(Boolean).join(" ")},Cw=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=Sw(["react-colorful__pointer",e.className]);return b.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},b.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Pw=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},Ow=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:Pw(e.h),s:Pw(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:Pw(o/2),a:Pw(r,2)}}),Mw=function(e){var t=Ow(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Iw=function(e){var t=Ow(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Tw=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:Pw(255*[r,s,a,a,l,r][u]),g:Pw(255*[l,r,r,s,a,a][u]),b:Pw(255*[a,a,l,r,r,s][u]),a:Pw(o,2)}},Dw=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Rw({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},Aw=Dw,Rw=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Pw(60*(s<0?s+6:s)),s:Pw(i?a/i*100:0),v:Pw(i/255*100),a:o}},Nw=b.memo((function(e){var t=e.hue,n=e.onChange,r=Sw(["react-colorful__hue",e.className]);return b.createElement("div",{className:r},b.createElement(kw,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:bw(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":Pw(t),"aria-valuemax":"360","aria-valuemin":"0"},b.createElement(Cw,{className:"react-colorful__hue-pointer",left:t/360,color:Mw({h:t,s:100,v:100,a:1})})))})),Lw=b.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Mw({h:t.h,s:100,v:100,a:1})};return b.createElement("div",{className:"react-colorful__saturation",style:r},b.createElement(kw,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:bw(t.s+100*e.left,0,100),v:bw(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Pw(t.s)+"%, Brightness "+Pw(t.v)+"%"},b.createElement(Cw,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Mw(t)})))})),Fw=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},jw=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function Bw(e,t,n){var r=yw(n),o=(0,b.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=(0,b.useRef)({color:t,hsva:i});(0,b.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),(0,b.useEffect)((function(){var t;Fw(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=(0,b.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var zw,Vw="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,Hw=new Map,Ww=function(e){Vw((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!Hw.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',Hw.set(t,r);var o=zw||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},Uw=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=gw(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);Ww(s);var l=Bw(n,o,i),u=l[0],c=l[1],d=Sw(["react-colorful",t]);return b.createElement("div",vw({},a,{ref:s,className:d}),b.createElement(Lw,{hsva:u,onChange:c}),b.createElement(Nw,{hue:u.h,onChange:c,className:"react-colorful__last-control"}))},$w=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+Iw(Object.assign({},n,{a:0}))+", "+Iw(Object.assign({},n,{a:1}))+")"},i=Sw(["react-colorful__alpha",t]),a=Pw(100*n.a);return b.createElement("div",{className:i},b.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),b.createElement(kw,{onMove:function(e){r({a:e.left})},onKey:function(e){r({a:bw(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},b.createElement(Cw,{className:"react-colorful__alpha-pointer",left:n.a,color:Iw(n)})))},Kw=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=gw(e,["className","colorModel","color","onChange"]),s=(0,b.useRef)(null);Ww(s);var l=Bw(n,o,i),u=l[0],c=l[1],d=Sw(["react-colorful",t]);return b.createElement("div",vw({},a,{ref:s,className:d}),b.createElement(Lw,{hsva:u,onChange:c}),b.createElement(Nw,{hue:u.h,onChange:c}),b.createElement($w,{hsva:u,onChange:c,className:"react-colorful__last-control"}))},Gw={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Dw,fromHsva:function(e){var t=Tw(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:jw},qw=function(e){return b.createElement(Kw,vw({},e,{colorModel:Gw}))},Yw={defaultColor:"rgb(0, 0, 0)",toHsva:Aw,fromHsva:function(e){var t=Tw(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:jw},Xw=function(e){return b.createElement(Uw,vw({},e,{colorModel:Yw}))};const Zw=e=>{let{color:t,enableAlpha:n,onChange:r}=e;const o=n?qw:Xw,i=(0,s.useMemo)((()=>t.toRgbString()),[t]);return(0,s.createElement)(o,{color:i,onChange:e=>{r(ko(e))}})};Co([Po]);const Jw=[{label:"RGB",value:"rgb"},{label:"HSL",value:"hsl"},{label:"Hex",value:"hex"}],Qw=On(((e,t)=>{const{enableAlpha:n=!1,color:r,onChange:o,defaultValue:i="#fff",copyFormat:l,...u}=Pn(e,"ColorPicker"),[c,p]=function(e){let{defaultValue:t,onChange:n,value:r}=e;const o=void 0!==r,i=o?r:t,[a,l]=(0,s.useState)(i);let u;return u=o&&"function"==typeof n?n:o||"function"!=typeof n?l:e=>{n(e),l(e)},[o?r:a,u]}({onChange:o,value:r,defaultValue:i}),h=(0,s.useMemo)((()=>ko(c||"")),[c]),m=(0,f.useDebounce)(p),v=(0,s.useCallback)((e=>{m(e.toHex())}),[m]),[g,y]=(0,s.useState)(!1),[b,w]=(0,s.useState)(l||"hex");return(0,s.createElement)(cy,a({ref:t},u),(0,s.createElement)(Zw,{onChange:v,color:h,enableAlpha:n}),(0,s.createElement)(uy,null,(0,s.createElement)(bg,{justify:"space-between"},g?(0,s.createElement)(iy,{options:Jw,value:b,onChange:e=>w(e),label:(0,d.__)("Color format"),hideLabelFromVision:!0}):(0,s.createElement)(cw,{color:h,colorType:l||b,enableAlpha:n}),(0,s.createElement)(dy,{isSmall:!0,onClick:()=>y(!g),icon:hg,isPressed:g,label:g?(0,d.__)("Hide detailed inputs"):(0,d.__)("Show detailed inputs")})),(0,s.createElement)(Jm,{margin:4}),g&&(0,s.createElement)(mw,{colorType:b,color:h,onChange:v,enableAlpha:n})))}),"ColorPicker");var e_=Qw;function t_(e){var t;return void 0!==e.onChangeComplete||void 0!==e.disableAlpha||"string"==typeof(null===(t=e.color)||void 0===t?void 0:t.hex)}const n_=qe()((e=>{const t=ko(e),n=t.toHex(),r=t.toRgb(),o=t.toHsv(),i=t.toHsl();return{hex:n,rgb:r,hsv:o,hsl:i,source:"hex",oldHue:i.h}}));const r_=e=>(0,s.createElement)(e_,function(e){const t=(0,s.useCallback)((t=>{var n;return t_(e)?e.onChangeComplete(n_(t)):null===(n=e.onChange)||void 0===n?void 0:n.call(e,t)}),[e.onChangeComplete,e.onChange]),n=(0,s.useMemo)((()=>t_(e)?function(e){if(void 0!==(null==e?void 0:e.color))return"string"==typeof e.color?e.color:e.color.hex?e.color.hex:void 0}(e):e.color),[e.color]),r=(0,s.useMemo)((()=>t_(e)?!e.disableAlpha:e.enableAlpha),[e.disableAlpha,e.enableAlpha]);return{...t_(e)?{}:e,onChange:t,color:n,enableAlpha:r}}(e));var o_=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));function i_(e){let{actions:t,className:n,options:r,children:o}=e;return(0,s.createElement)("div",{className:c()("components-circular-option-picker",n)},(0,s.createElement)("div",{className:"components-circular-option-picker__swatches"},r),o,t&&(0,s.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},t))}i_.Option=function(e){let{className:t,isSelected:n,selectedIconProps:r,tooltipText:o,...i}=e;const l=(0,s.createElement)($n,a({isPressed:n,className:"components-circular-option-picker__option"},i));return(0,s.createElement)("div",{className:c()(t,"components-circular-option-picker__option-wrapper")},o?(0,s.createElement)(Ur,{text:o},l):l,n&&(0,s.createElement)(wg,a({icon:o_},r||{})))},i_.ButtonAction=function(e){let{className:t,children:n,...r}=e;return(0,s.createElement)($n,a({className:c()("components-circular-option-picker__clear",t),isSmall:!0,variant:"secondary"},r),n)},i_.DropdownLinkAction=function(e){let{buttonProps:t,className:n,dropdownProps:r,linkText:o}=e;return(0,s.createElement)(pg,a({className:c()("components-circular-option-picker__dropdown-link-action",n),renderToggle:e=>{let{isOpen:n,onToggle:r}=e;return(0,s.createElement)($n,a({"aria-expanded":n,"aria-haspopup":"true",onClick:r,variant:"link"},t),o)}},r))};var a_=On((function(e,t){const n=function(e){const{expanded:t=!1,...n}=Pn(e,"VStack");return yg({direction:"column",expanded:t,...n})}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"VStack");var s_=On((function(e,t){const n=Lp(e);return(0,s.createElement)(Hn,a({as:"span"},n,{ref:t}))}),"Truncate");var l_=On((function(e,t){const n=function(e){const{as:t,level:n=2,...r}=Pn(e,"Heading"),o=t||`h${n}`,i={};return"string"==typeof o&&"h"!==o[0]&&(i.role="heading",i["aria-level"]="string"==typeof n?parseInt(n):n),{...ih({color:Bo.darkGray.heading,size:rh(n),isBlock:!0,weight:Up.fontWeightHeading,...r}),...i,as:o}}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"Heading");const u_=zn(l_,{target:"e1uu5br00"})({name:"13lxv2o",styles:"text-transform:uppercase;line-height:24px;font-weight:500;&&&{font-size:11px;margin-bottom:0;}"});function c_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;const u=(0,s.useMemo)((()=>(0,l.map)(r,(e=>{let{color:t,name:r}=e;const a=ko(t);return(0,s.createElement)(i_.Option,{key:t,isSelected:i===t,selectedIconProps:i===t?{fill:a.contrast()>a.contrast("#000")?"#fff":"#000"}:{},tooltipText:r||(0,d.sprintf)((0,d.__)("Color code: %s"),t),style:{backgroundColor:t,color:t},onClick:i===t?n:()=>o(t),"aria-label":r?(0,d.sprintf)((0,d.__)("Color: %s"),r):(0,d.sprintf)((0,d.__)("Color code: %s"),t)})}))),[r,i,o,n]);return(0,s.createElement)(i_,{className:t,options:u,actions:a})}function d_(e){let{className:t,clearColor:n,colors:r,onChange:o,value:i,actions:a}=e;return(0,s.createElement)(a_,{spacing:3,className:t},r.map(((e,t)=>{let{name:l,colors:u}=e;return(0,s.createElement)(a_,{spacing:2,key:t},(0,s.createElement)(u_,null,l),(0,s.createElement)(c_,{clearColor:n,colors:u,onChange:o,value:i,actions:r.length===t+1?a:null}))})))}function f_(e){let{isRenderedInSidebar:t,...n}=e;return(0,s.createElement)(pg,a({contentClassName:c()("components-color-palette__custom-color-dropdown-content",{"is-rendered-in-sidebar":t})},n))}Co([Po,function(e){e.prototype.luminance=function(){return e=fg(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,r,o,i,a,s,l,u=t instanceof e?t:new e(t);return i=this.rgba,a=u.toRgb(),n=(s=fg(i))>(l=fg(a))?(s+.05)/(l+.05):(l+.05)/(s+.05),void 0===(r=2)&&(r=0),void 0===o&&(o=Math.pow(10,r)),Math.floor(o*n)/o+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(i=(n=t).size)?"normal":i,"AAA"===(o=void 0===(r=n.level)?"AA":r)&&"normal"===a?7:"AA"===o&&"large"===a?3:4.5);var n,r,o,i,a}}]);function p_(e){let{clearable:t=!0,className:n,colors:r,disableCustomColors:o=!1,enableAlpha:i,onChange:a,value:l,__experimentalHasMultipleOrigins:u=!1,__experimentalIsRenderedInSidebar:c=!1}=e;const f=(0,s.useCallback)((()=>a(void 0)),[a]),p=u&&(null==r?void 0:r.length),h=p?d_:c_;let m;c&&(m="bottom left");const v=ko(l),g=null!=l&&l.startsWith("#")?l.substring(1):null!=l?l:"",y=(0,s.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const r=n?t:[{colors:t}];for(const{colors:t}of r)for(const{name:n,color:r}of t)if(ko(e).toHex()===ko(r).toHex())return n;return(0,d.__)("Custom")}(l,r,p)),[l,r,p]),b=g?(0,d.sprintf)((0,d.__)('Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'),y,g):(0,d.__)("Custom color picker.");return(0,s.createElement)(a_,{spacing:3,className:n},!o&&(0,s.createElement)(f_,{position:m,isRenderedInSidebar:c,renderContent:()=>(0,s.createElement)(r_,{color:l,onChange:e=>a(e),enableAlpha:i}),renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)(Ip,{as:"button",justify:"space-between",align:"flex-start",className:"components-color-palette__custom-color","aria-expanded":t,"aria-haspopup":"true",onClick:n,"aria-label":b,style:{background:l,color:v.contrast()>v.contrast("#000")?"#fff":"#000"}},(0,s.createElement)(gp,{isBlock:!0,as:s_,className:"components-color-palette__custom-color-name"},y),(0,s.createElement)(gp,{as:"span",className:"components-color-palette__custom-color-value"},g))}}),(0,s.createElement)(h,{clearable:t,clearColor:f,colors:r,onChange:a,value:l,actions:!!t&&(0,s.createElement)(i_.ButtonAction,{onClick:f},(0,d.__)("Clear"))}))}const h_="web"===s.Platform.OS,m_={px:{value:"px",label:h_?"px":(0,d.__)("Pixels (px)"),a11yLabel:(0,d.__)("Pixels (px)"),step:1},"%":{value:"%",label:h_?"%":(0,d.__)("Percentage (%)"),a11yLabel:(0,d.__)("Percent (%)"),step:.1},em:{value:"em",label:h_?"em":(0,d.__)("Relative to parent font size (em)"),a11yLabel:(0,d._x)("ems","Relative to parent font size (em)"),step:.01},rem:{value:"rem",label:h_?"rem":(0,d.__)("Relative to root font size (rem)"),a11yLabel:(0,d._x)("rems","Relative to root font size (rem)"),step:.01},vw:{value:"vw",label:h_?"vw":(0,d.__)("Viewport width (vw)"),a11yLabel:(0,d.__)("Viewport width (vw)"),step:.1},vh:{value:"vh",label:h_?"vh":(0,d.__)("Viewport height (vh)"),a11yLabel:(0,d.__)("Viewport height (vh)"),step:.1},vmin:{value:"vmin",label:h_?"vmin":(0,d.__)("Viewport smallest dimension (vmin)"),a11yLabel:(0,d.__)("Viewport smallest dimension (vmin)"),step:.1},vmax:{value:"vmax",label:h_?"vmax":(0,d.__)("Viewport largest dimension (vmax)"),a11yLabel:(0,d.__)("Viewport largest dimension (vmax)"),step:.1},ch:{value:"ch",label:h_?"ch":(0,d.__)("Width of the zero (0) character (ch)"),a11yLabel:(0,d.__)("Width of the zero (0) character (ch)"),step:.01},ex:{value:"ex",label:h_?"ex":(0,d.__)("x-height of the font (ex)"),a11yLabel:(0,d.__)("x-height of the font (ex)"),step:.01},cm:{value:"cm",label:h_?"cm":(0,d.__)("Centimeters (cm)"),a11yLabel:(0,d.__)("Centimeters (cm)"),step:.001},mm:{value:"mm",label:h_?"mm":(0,d.__)("Millimeters (mm)"),a11yLabel:(0,d.__)("Millimeters (mm)"),step:.1},in:{value:"in",label:h_?"in":(0,d.__)("Inches (in)"),a11yLabel:(0,d.__)("Inches (in)"),step:.001},pc:{value:"pc",label:h_?"pc":(0,d.__)("Picas (pc)"),a11yLabel:(0,d.__)("Picas (pc)"),step:1},pt:{value:"pt",label:h_?"pt":(0,d.__)("Points (pt)"),a11yLabel:(0,d.__)("Points (pt)"),step:1}},v_=Object.values(m_),g_=[m_.px,m_["%"],m_.em,m_.rem,m_.vw,m_.vh],y_=m_.px;function b_(e,t,n){return __(t?`${null!=e?e:""}${t}`:e,n)}function w_(e){return Array.isArray(e)&&!!e.length}function __(e){var t,n;let r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v_;if(void 0!==e||null===e){r=`${e}`.trim();const t=parseFloat(r);o=isFinite(t)?t:void 0}const a=null===(t=r)||void 0===t?void 0:t.match(/[\d.\-\+]*\s*(.*)/),s=null==a||null===(n=a[1])||void 0===n?void 0:n.toLowerCase();let l;if(w_(i)){const e=i.find((e=>e.value===s));l=null==e?void 0:e.value}else l=y_.value;return[o,l]}function x_(e,t,n,r){const[o,i]=__(e,t),a=null!=o?o:n;let s=i||r;return!s&&w_(t)&&(s=t[0].value),[a,s]}const E_=e=>{let{units:t=v_,availableUnits:n=[],defaultValues:r}=e;const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return Array.isArray(t)?t.filter((t=>e.includes(t.value))):[]}(n,t);return r&&o.forEach(((e,t)=>{if(r[e.value]){const[n]=__(r[e.value]);o[t].default=n}})),o};function k_(e){const{border:t,className:n,colors:r,contentClassName:o,onChange:i,previousStyleSelection:a,...l}=Pn(e,"BorderControlDropdown"),[u]=__(null==t?void 0:t.width),c=0===u,d=Cn(),f=(0,s.useMemo)((()=>d(Xr("background:#fff;",Op({borderRadius:"1px 0 0 1px",borderRight:`${Up.borderWidth} solid ${Bo.gray[200]}`},{borderRadius:"0 1px 1px 0",borderLeft:`${Up.borderWidth} solid ${Bo.gray[200]}`})()," &&>button{padding:",_p(1),";border-radius:inherit;}",""),n)),[n,d]),p=(0,s.useMemo)((()=>d(rg)),[d]),h=(0,s.useMemo)((()=>d(Qv(t))),[t,d]),m=(0,s.useMemo)((()=>d(eg,o)),[d,o]),v=(0,s.useMemo)((()=>d(tg)),[d]),g=(0,s.useMemo)((()=>d(ng)),[d]),y=(0,s.useMemo)((()=>d(og)),[d]);return{...l,border:t,className:f,colors:r,indicatorClassName:p,indicatorWrapperClassName:h,onColorChange:e=>{const n="none"===(null==t?void 0:t.style)?a:null==t?void 0:t.style,r=c&&e?"1px":null==t?void 0:t.width;i({color:e,style:n,width:r})},onStyleChange:e=>{const n=c&&e?"1px":null==t?void 0:t.width;i({...t,style:e,width:n})},onReset:()=>{i({...t,color:void 0,style:void 0})},popoverClassName:m,popoverContentClassName:g,popoverControlsClassName:v,resetButtonClassName:y}}const S_=()=>{},C_=On(((e,t)=>{const{__experimentalHasMultipleOrigins:n,__experimentalIsRenderedInSidebar:r,border:o,colors:i,disableCustomColors:l,enableAlpha:u,indicatorClassName:c,indicatorWrapperClassName:f,onReset:p,onColorChange:h,onStyleChange:m,popoverClassName:v,popoverContentClassName:g,popoverControlsClassName:y,resetButtonClassName:b,showDropdownHeader:w,enableStyle:_=!0,...x}=k_(e),{color:E,style:k}=o||{},S=((e,t,n)=>{if(e&&t){if(n){let n;return t.some((t=>t.colors.some((t=>t.color===e&&(n=t,!0))))),n}return t.find((t=>t.color===e))}})(E,i,!!n),C=((e,t,n,r)=>r?t?n?(0,d.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".',t.name,t.color,n):(0,d.sprintf)('Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?n?(0,d.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".',e,n):(0,d.sprintf)('Border color and style picker. The currently selected color has a value of "%1$s".',e):(0,d.__)("Border color and style picker."):t?(0,d.sprintf)('Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".',t.name,t.color):e?(0,d.sprintf)('Border color picker. The currently selected color has a value of "%1$s".',e):(0,d.__)("Border color picker."))(E,S,k,_),P=r?"bottom left":void 0;return(0,s.createElement)(pg,a({renderToggle:e=>{let{onToggle:t=S_}=e;return(0,s.createElement)($n,{onClick:t,variant:"tertiary","aria-label":C,position:P},(0,s.createElement)("span",{className:f},(0,s.createElement)(cg,{className:c,colorValue:E})))},renderContent:e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(a_,{className:y,spacing:6},w?(0,s.createElement)(bg,null,(0,s.createElement)(fv,null,(0,d.__)("Border color")),(0,s.createElement)($n,{isSmall:!0,label:(0,d.__)("Close border color"),icon:Mv,onClick:t})):void 0,(0,s.createElement)(p_,{className:g,value:E,onChange:h,colors:i,disableCustomColors:l,__experimentalHasMultipleOrigins:n,__experimentalIsRenderedInSidebar:r,clearable:!1,enableAlpha:u}),_&&(0,s.createElement)(ug,{label:(0,d.__)("Style"),value:k,onChange:m})),(0,s.createElement)($n,{className:b,variant:"tertiary",onClick:()=>{p(),t()}},(0,d.__)("Reset to default")))},contentClassName:v},x,{ref:t}))}),"BorderControlDropdown");var P_=C_;function O_(e){let{className:t,isUnitSelectTabbable:n=!0,onChange:r,size:o="default",unit:i="px",units:l=g_,...u}=e;if(!w_(l)||1===(null==l?void 0:l.length))return(0,s.createElement)(Yv,{className:"components-unit-control__unit-label",selectSize:o},i);const d=c()("components-unit-control__select",t);return(0,s.createElement)(Xv,a({className:d,onChange:e=>{const{value:t}=e.target,n=l.find((e=>e.value===t));null==r||r(t,{event:e,data:n})},selectSize:o,tabIndex:n?void 0:-1,value:i},u),l.map((e=>(0,s.createElement)("option",{value:e.value,key:e.value},e.label))))}const M_=(0,s.forwardRef)((function(e,t){const{__unstableStateReducer:n,autoComplete:r="off",className:o,disabled:i=!1,disableUnits:u=!1,isPressEnterToChange:f=!1,isResetValueOnUnitChange:p=!1,isUnitSelectTabbable:h=!0,label:m,onChange:v,onUnitChange:g,size:y="default",style:b,unit:w,units:_=g_,value:x,onBlur:E,...k}=e;"unit"in e&&ze()("UnitControl unit prop",{since:"5.6",hint:"The unit should be provided within the `value` prop.",version:"6.2"});const S=null!=x?x:void 0,C=(0,s.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v_;const r=Array.isArray(n)?[...n]:[],[,o]=b_(e,t,v_);return o&&!r.some((e=>e.value===o))&&m_[o]&&r.unshift(m_[o]),r}(S,w,_)),[S,w,_]),[P,O]=b_(S,w,C),[M,I]=Pg(w,{initial:O,fallback:""});(0,s.useEffect)((()=>{void 0!==O&&I(O)}),[O]);const T=(0,s.useRef)(void 0),D=c()("components-unit-control",o),A=e=>{if(!isNaN(Number(e.currentTarget.value)))return void(T.current=void 0);const[t,n]=x_(e.currentTarget.value,C,P,M);if(T.current=t,f&&n!==M){const r={event:e,data:Array.isArray(C)?C.find((e=>e.value===n)):void 0};null==v||v(`${null!=t?t:""}${n}`,r),null==g||g(n,r),I(n)}},R=(e,t)=>{const n={...e};var r;t.type===Mm&&(void 0!==T.current&&(n.value=(null!==(r=T.current)&&void 0!==r?r:"").toString(),T.current=void 0));return n};let N=R;n&&(N=(e,t)=>{const r=R(e,t);return n(r,t)});const L=u?null:(0,s.createElement)(O_,{"aria-label":(0,d.__)("Select unit"),disabled:i,isUnitSelectTabbable:h,onChange:(e,t)=>{const{data:n}=t;let r=`${null!=P?P:""}${e}`;p&&void 0!==(null==n?void 0:n.default)&&(r=`${n.default}${e}`),null==v||v(r,t),null==g||g(e,t),I(e)},size:y,unit:M,units:C,onBlur:E});let F=k.step;if(!F&&C){var j;const e=C.find((e=>e.value===M));F=null!==(j=null==e?void 0:e.step)&&void 0!==j?j:1}return(0,s.createElement)(Wv,{className:"components-unit-control-wrapper",style:b},(0,s.createElement)(Gv,a({"aria-label":m,type:f?"text":"number"},(0,l.omit)(k,["children"]),{autoComplete:r,className:D,disabled:i,disableUnits:u,isPressEnterToChange:f,label:m,onBlur:e=>{A(e),null==E||E(e)},onKeyDown:e=>{const{key:t}=e;"Enter"===t&&A(e)},onChange:(e,t)=>{if(""===e||null==e)return void(null==v||v("",t));const n=x_(e,C,P,M).join("");null==v||v(n,t)},ref:t,size:y,suffix:L,value:null!=P?P:"",step:F,__unstableStateReducer:N})))}));var I_=M_;const T_=e=>{const t=void 0===(null==e?void 0:e.width)||""===e.width,n=void 0===(null==e?void 0:e.color);if(!t||!n)return e};function D_(e){const{className:t,isCompact:n,onChange:r,shouldSanitizeBorder:o=!0,value:i,width:a,...l}=Pn(e,"BorderControl"),[u,c]=__(null==i?void 0:i.width),d=c||"px",f=0===u,[p,h]=(0,s.useState)(),[m,v]=(0,s.useState)(),g=(0,s.useCallback)((e=>{if(o)return r(T_(e));r(e)}),[r,o,T_]),y=(0,s.useCallback)((e=>{const t=""===e?void 0:e,[n]=__(e),r=0===n,o={...i,width:t};r&&!f&&(h(null==i?void 0:i.color),v(null==i?void 0:i.style),o.color=void 0,o.style="none"),!r&&f&&(void 0===o.color&&(o.color=p),"none"===o.style&&(o.style=m)),g(o)}),[i,f,g]),b=(0,s.useCallback)((e=>{y(`${e}${d}`)}),[y,d]),w=Cn(),_=(0,s.useMemo)((()=>w(Jv,t)),[t,w]),x=(0,s.useMemo)((()=>{const e=n?"90px":a,t=!!e&&(e=>Xr("width:",e,";flex:0 0 auto;",""))(e);return w(Xr("border:",Up.borderWidth," solid ",Bo.gray[200],";border-radius:2px;flex:1 0 40%;background:#fff;",Wv,"{flex:1;",Op({marginLeft:0})(),";}",""),t)}),[n,a,w]),E=(0,s.useMemo)((()=>w(Xr("&&& ",xh,"{border:none;}&&& input{",Op({paddingRight:0})(),";}",""))),[w]),k=(0,s.useMemo)((()=>w(Xr("flex:1 1 60%;",Op({marginRight:_p(3)})()," ",cv,"{margin-bottom:0;font-size:0;display:flex;}",""))),[w]);return{...l,className:_,innerWrapperClassName:x,onBorderChange:g,onSliderChange:b,onWidthChange:y,previousStyleSelection:m,sliderClassName:k,value:i,widthControlClassName:E,widthUnit:d,widthValue:u}}const A_=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(Wn,{as:"label"},t):(0,s.createElement)(fv,null,t):null},R_=On(((e,t)=>{const{colors:n,disableCustomColors:r,enableAlpha:o,enableStyle:i=!0,hideLabelFromVision:l,innerWrapperClassName:u,label:c,onBorderChange:d,onSliderChange:f,onWidthChange:p,placeholder:h,popoverContentClassName:m,previousStyleSelection:v,showDropdownHeader:g,sliderClassName:y,value:b,widthControlClassName:w,widthUnit:_,widthValue:x,withSlider:E,__experimentalHasMultipleOrigins:k,__experimentalIsRenderedInSidebar:S,...C}=D_(e);return(0,s.createElement)(Hn,a({},C,{ref:t}),(0,s.createElement)(A_,{label:c,hideLabelFromVision:l}),(0,s.createElement)(bg,{spacing:3},(0,s.createElement)(bg,{className:u,alignment:"stretch"},(0,s.createElement)(P_,{border:b,colors:n,contentClassName:m,disableCustomColors:r,enableAlpha:o,enableStyle:i,onChange:d,previousStyleSelection:v,showDropdownHeader:g,__experimentalHasMultipleOrigins:k,__experimentalIsRenderedInSidebar:S}),(0,s.createElement)(I_,{className:w,min:0,onChange:p,value:(null==b?void 0:b.width)||"",placeholder:h})),E&&(0,s.createElement)(ry,{className:y,initialPosition:0,max:100,min:0,onChange:f,step:["px","%"].includes(_)?1:.1,value:x||void 0,withInputField:!1})))}),"BorderControl");var N_=R_;const L_={bottom:{alignItems:"flex-end",justifyContent:"center"},bottomLeft:{alignItems:"flex-start",justifyContent:"flex-end"},bottomRight:{alignItems:"flex-end",justifyContent:"flex-end"},center:{alignItems:"center",justifyContent:"center"},spaced:{alignItems:"center",justifyContent:"space-between"},left:{alignItems:"center",justifyContent:"flex-start"},right:{alignItems:"center",justifyContent:"flex-end"},stretch:{alignItems:"stretch"},top:{alignItems:"flex-start",justifyContent:"center"},topLeft:{alignItems:"flex-start",justifyContent:"flex-start"},topRight:{alignItems:"flex-start",justifyContent:"flex-end"}};function F_(e){const{align:t,alignment:n,className:r,columnGap:o,columns:i=2,gap:a=3,isInline:l=!1,justify:u,rowGap:c,rows:d,templateColumns:f,templateRows:p,...h}=Pn(e,"Grid"),m=wp(Array.isArray(i)?i:[i]),v=wp(Array.isArray(d)?d:[d]),g=f||!!i&&`repeat( ${m}, 1fr )`,y=p||!!d&&`repeat( ${v}, 1fr )`,b=Cn();return{...h,className:(0,s.useMemo)((()=>{const e=function(e){return e?L_[e]:{}}(n),i=Xr({alignItems:t,display:l?"inline-grid":"grid",gap:`calc( ${Up.gridBase} * ${a} )`,gridTemplateColumns:g||void 0,gridTemplateRows:y||void 0,gridRowGap:c,gridColumnGap:o,justifyContent:u,verticalAlign:l?"middle":void 0,...e},"","");return b(i,r)}),[t,n,r,o,b,a,g,y,l,u,c])}}var j_=On((function(e,t){const n=F_(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"Grid");var B_=On(((e,t)=>{const{centeredClassName:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:u,popoverClassNames:c,value:f,__experimentalHasMultipleOrigins:p,__experimentalIsRenderedInSidebar:h,...m}=function(e){const{className:t,...n}=Pn(e,"BorderBoxControlSplitControls"),r=Cn(),o=(0,s.useMemo)((()=>r(kv,t)),[t,Op.watch()]);return{...n,centeredClassName:(0,s.useMemo)((()=>r(Sv,t)),[]),className:o}}(e),v={colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,isCompact:!0,__experimentalHasMultipleOrigins:p,__experimentalIsRenderedInSidebar:h};return(0,s.createElement)(j_,a({},m,{ref:t,gap:4}),(0,s.createElement)(Ov,{value:f}),(0,s.createElement)(N_,a({className:n,hideLabelFromVision:!0,label:(0,d.__)("Top border"),onChange:e=>u(e,"top"),popoverContentClassName:null==c?void 0:c.top,value:null==f?void 0:f.top},v)),(0,s.createElement)(N_,a({hideLabelFromVision:!0,label:(0,d.__)("Left border"),onChange:e=>u(e,"left"),popoverContentClassName:null==c?void 0:c.left,value:null==f?void 0:f.left},v)),(0,s.createElement)(N_,a({hideLabelFromVision:!0,label:(0,d.__)("Right border"),onChange:e=>u(e,"right"),popoverContentClassName:null==c?void 0:c.right,value:null==f?void 0:f.right},v)),(0,s.createElement)(N_,a({className:n,hideLabelFromVision:!0,label:(0,d.__)("Bottom border"),onChange:e=>u(e,"bottom"),popoverContentClassName:null==c?void 0:c.bottom,value:null==f?void 0:f.bottom},v)))}),"BorderBoxControlSplitControls");const z_=["top","right","bottom","left"],V_=["color","style","width"],H_=e=>!e||!V_.some((t=>void 0!==e[t])),W_=e=>{if(!e)return!1;if(U_(e)){return!z_.every((t=>H_(e[t])))}return!H_(e)},U_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).some((e=>-1!==z_.indexOf(e)))},$_=e=>{if(!U_(e))return!1;const t=z_.map((t=>K_(null==e?void 0:e[t])));return!t.every((e=>e===t[0]))},K_=(e,t)=>{if(H_(e))return t;const{color:n,style:r,width:o}=t||{},{color:i=n,style:a=r,width:s=o}=e;return[s,!!s&&"0"!==s||!!i?a||"solid":a,i].filter(Boolean).join(" ")};function G_(e){const{className:t,onChange:n,value:r,...o}=Pn(e,"BorderBoxControl"),i=$_(r),a=U_(r),l=a?(e=>{if(!e)return;const t=[],n=[],r=[];z_.forEach((o=>{var i,a,s;t.push(null===(i=e[o])||void 0===i?void 0:i.color),n.push(null===(a=e[o])||void 0===a?void 0:a.style),r.push(null===(s=e[o])||void 0===s?void 0:s.width)}));const o=t.every((e=>e===t[0])),i=n.every((e=>e===n[0])),a=r.every((e=>e===r[0]));return{color:o?t[0]:void 0,style:i?n[0]:void 0,width:a?r[0]:void 0}})(r):r,u=a?r:(e=>{if(e&&!H_(e))return{top:e,right:e,bottom:e,left:e}})(r),[c,d]=(0,s.useState)(!i),f=Cn(),p=(0,s.useMemo)((()=>f(wv,t)),[t]),h=(0,s.useMemo)((()=>f(_v)),[]);return{...o,className:p,hasMixedBorders:i,isLinked:c,linkedControlClassName:h,onLinkedChange:e=>{if(!e)return n(void 0);if(!i||(t=e)&&V_.every((e=>void 0!==t[e])))return n(H_(e)?void 0:e);var t;const o=((e,t)=>{const n={};return e.color!==t.color&&(n.color=t.color),e.style!==t.style&&(n.style=t.style),e.width!==t.width&&(n.width=t.width),n})(l,e),a={top:{...null==r?void 0:r.top,...o},right:{...null==r?void 0:r.right,...o},bottom:{...null==r?void 0:r.bottom,...o},left:{...null==r?void 0:r.left,...o}};if($_(a))return n(a);const s=H_(a.top)?void 0:a.top;n(s)},onSplitChange:(e,t)=>{const r={...u,[t]:e};$_(r)?n(r):n(e)},toggleLinked:()=>d(!c),linkedValue:l,splitValue:u}}const q_=e=>{const{label:t,hideLabelFromVision:n}=e;return t?n?(0,s.createElement)(Wn,{as:"label"},t):(0,s.createElement)(fv,null,t):null},Y_=On(((e,t)=>{const{className:n,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,hasMixedBorders:u,hideLabelFromVision:c,isLinked:f,label:p,linkedControlClassName:h,linkedValue:m,onLinkedChange:v,onSplitChange:g,popoverClassNames:y,splitValue:b,toggleLinked:w,__experimentalHasMultipleOrigins:_,__experimentalIsRenderedInSidebar:x,...E}=G_(e);return(0,s.createElement)(Hn,a({className:n},E,{ref:t}),(0,s.createElement)(q_,{label:p,hideLabelFromVision:c}),(0,s.createElement)(bg,{alignment:"start",expanded:!0,spacing:0},f?(0,s.createElement)(N_,{className:h,colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:v,placeholder:u?(0,d.__)("Mixed"):void 0,popoverContentClassName:null==y?void 0:y.linked,shouldSanitizeBorder:!1,value:m,withSlider:!0,width:"110px",__experimentalHasMultipleOrigins:_,__experimentalIsRenderedInSidebar:x}):(0,s.createElement)(B_,{colors:r,disableCustomColors:o,enableAlpha:i,enableStyle:l,onChange:g,popoverClassNames:y,value:b,__experimentalHasMultipleOrigins:_,__experimentalIsRenderedInSidebar:x}),(0,s.createElement)(Cv,{onClick:w,isLinked:f})))}),"BorderBoxControl");var X_=Y_;const Z_=zn("div",{target:"e7pk0lh6"})({name:"14bvcyk",styles:"box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%"}),J_=zn(Ip,{target:"e7pk0lh5"})("color:",Bo.ui.label,";margin-bottom:8px;"),Q_=zn(Ip,{target:"e7pk0lh4"})({name:"aujtid",styles:"min-height:30px;gap:0"}),ex=zn("div",{target:"e7pk0lh3"})({name:"112jwab",styles:"box-sizing:border-box;max-width:80px"}),tx=zn(Ip,{target:"e7pk0lh2"})({name:"xy18ro",styles:"justify-content:center;padding-top:8px"}),nx=zn(Ip,{target:"e7pk0lh1"})({name:"3tw5wk",styles:"position:relative;height:100%;width:100%;justify-content:flex-start"});var rx={name:"1ch9yvl",styles:"border-radius:0"},ox={name:"tg3mx0",styles:"border-radius:2px"};const ix=e=>{let{isFirst:t,isLast:n,isOnly:r}=e;return t?Op({borderTopRightRadius:0,borderBottomRightRadius:0})():n?Op({borderTopLeftRadius:0,borderBottomLeftRadius:0})():r?ox:rx},ax=e=>{let{isFirst:t,isOnly:n}=e;return Op({marginLeft:t||n?0:-1})()},sx=zn(I_,{target:"e7pk0lh0"})("max-width:60px;",ix,";",ax,";");function lx(e){let{isFirst:t,isLast:n,isOnly:r,onHoverOn:o=l.noop,onHoverOff:i=l.noop,label:u,value:c,...d}=e;const f=(p=e=>{let{event:t,...n}=e;n.hovering?o(t,n):i(t,n)},pm(mm),Sm({hover:p},h||{},"hover"));var p,h;return(0,s.createElement)(ex,f(),(0,s.createElement)(ux,{text:u},(0,s.createElement)(sx,a({"aria-label":u,className:"component-box-control__unit-control",hideHTMLArrows:!0,isFirst:t,isLast:n,isOnly:r,isPressEnterToChange:!0,isResetValueOnUnitChange:!1,value:c},d))))}function ux(e){let{children:t,text:n}=e;return n?(0,s.createElement)(Ur,{text:n,position:"top"},(0,s.createElement)("div",null,t)):t}const cx={all:(0,d.__)("All"),top:(0,d.__)("Top"),bottom:(0,d.__)("Bottom"),left:(0,d.__)("Left"),right:(0,d.__)("Right"),mixed:(0,d.__)("Mixed"),vertical:(0,d.__)("Vertical"),horizontal:(0,d.__)("Horizontal")},dx={top:void 0,right:void 0,bottom:void 0,left:void 0},fx={top:!1,right:!1,bottom:!1,left:!1},px=["top","right","bottom","left"];function hx(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function mx(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:px;const r=wx(n),o=r.map((t=>__(e[t]))),i=o.map((e=>{var t;return null!==(t=e[0])&&void 0!==t?t:""})),a=o.map((e=>e[1])),s=i.every((e=>e===i[0]))?i[0]:"";let u;var c;(0,l.isNumber)(s)?u=hx(a):u=null!==(c=vx(t))&&void 0!==c?c:hx(a);return[s,u].join("")}function vx(e){if(!e||"object"!=typeof e)return;return hx(Object.values(e).filter(Boolean))}function gx(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:px;const r=mx(e,t,n),o=isNaN(parseFloat(r));return o}function yx(e){return void 0!==e&&!(0,l.isEmpty)(Object.values(e).filter((e=>!!e&&/\d/.test(e))))}function bx(e,t){let n="all";return e||(n=t?"vertical":"top"),n}function wx(e){const t=[];if(null==e||!e.length)return px;if(e.includes("vertical"))t.push("top","bottom");else if(e.includes("horizontal"))t.push("left","right");else{const n=px.filter((t=>e.includes(t)));t.push(...n)}return t}function _x(e){let{onChange:t=l.noop,onFocus:n=l.noop,onHoverOn:r=l.noop,onHoverOff:o=l.noop,values:i,sides:u,selectedUnits:c,setSelectedUnits:d,...f}=e;const p=mx(i,c,u),h=yx(i)&&gx(i,c,u),m=h?cx.mixed:null,v=(e,t)=>{const n={...e};return null!=u&&u.length?u.forEach((e=>{"vertical"===e?(n.top=t,n.bottom=t):"horizontal"===e?(n.left=t,n.right=t):n[e]=t})):px.forEach((e=>n[e]=t)),n};return(0,s.createElement)(lx,a({},f,{disableUnits:h,isOnly:!0,value:p,onChange:e=>{const n=!isNaN(parseFloat(e)),r=v(i,n?e:void 0);t(r)},onUnitChange:e=>{const t=v(c,e);d(t)},onFocus:e=>{n(e,{side:"all"})},onHoverOn:()=>{r({top:!0,bottom:!0,left:!0,right:!0})},onHoverOff:()=>{o({top:!1,bottom:!1,left:!1,right:!1})},placeholder:m}))}function xx(e){let{onChange:t=l.noop,onFocus:n=l.noop,onHoverOn:r=l.noop,onHoverOff:o=l.noop,values:i,selectedUnits:u,setSelectedUnits:c,sides:d,...f}=e;const p=e=>t=>{n(t,{side:e})},h=e=>()=>{r({[e]:!0})},m=e=>()=>{o({[e]:!1})},v=e=>(n,r)=>{let{event:o}=r;const{altKey:a}=o,s={...i},l=!isNaN(parseFloat(n))?n:void 0;if(s[e]=l,a)switch(e){case"top":s.bottom=l;break;case"bottom":s.top=l;break;case"left":s.right=l;break;case"right":s.left=l}(e=>{t(e)})(s)},g=e=>t=>{const n={...u};n[e]=t,c(n)},y=null!=d&&d.length?px.filter((e=>d.includes(e))):px,b=y[0],w=y[y.length-1],_=b===w&&b;return(0,s.createElement)(tx,{className:"component-box-control__input-controls-wrapper"},(0,s.createElement)(nx,{gap:0,align:"top",className:"component-box-control__input-controls"},y.map((e=>{const[t,n]=__(i[e]),r=i[e]?n:u[e];return(0,s.createElement)(lx,a({},f,{isFirst:b===e,isLast:w===e,isOnly:_===e,value:[t,r].join(""),onChange:v(e),onUnitChange:g(e),onFocus:p(e),onHoverOn:h(e),onHoverOff:m(e),label:cx[e],key:`box-control-${e}`}))}))))}const Ex=["vertical","horizontal"];function kx(e){let{onChange:t,onFocus:n,onHoverOn:r,onHoverOff:o,values:i,selectedUnits:l,setSelectedUnits:u,sides:c,...d}=e;const f=e=>t=>{n&&n(t,{side:e})},p=e=>()=>{r&&("vertical"===e&&r({top:!0,bottom:!0}),"horizontal"===e&&r({left:!0,right:!0}))},h=e=>()=>{o&&("vertical"===e&&o({top:!1,bottom:!1}),"horizontal"===e&&o({left:!1,right:!1}))},m=e=>n=>{if(!t)return;const r={...i},o=!isNaN(parseFloat(n))?n:void 0;"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},v=e=>t=>{const n={...l};"vertical"===e&&(n.top=t,n.bottom=t),"horizontal"===e&&(n.left=t,n.right=t),u(n)},g=null!=c&&c.length?Ex.filter((e=>c.includes(e))):Ex,y=g[0],b=g[g.length-1],w=y===b;return(0,s.createElement)(nx,{gap:0,align:"top",className:"component-box-control__vertical-horizontal-input-controls"},g.map((e=>{const[t,n]=__("vertical"===e?i.top:i.left),r="vertical"===e?l.top:l.left;return(0,s.createElement)(lx,a({},d,{isFirst:y===e,isLast:b===e,isOnly:w===e,value:[t,null!=r?r:n].join(""),onChange:m(e),onUnitChange:v(e),onFocus:f(e),onHoverOn:p(e),onHoverOff:h(e),label:cx[e],key:e}))})))}const Sx=zn("span",{target:"eaw9yqk8"})({name:"1w884gc",styles:"box-sizing:border-box;display:block;width:24px;height:24px;position:relative;padding:4px"}),Cx=zn("span",{target:"eaw9yqk7"})({name:"i6vjox",styles:"box-sizing:border-box;display:block;position:relative;width:100%;height:100%"}),Px=zn("span",{target:"eaw9yqk6"})("box-sizing:border-box;display:block;pointer-events:none;position:absolute;",(e=>{let{isFocused:t}=e;return Xr({backgroundColor:"currentColor",opacity:t?1:.3},"","")}),";"),Ox=zn(Px,{target:"eaw9yqk5"})({name:"1k2w39q",styles:"bottom:3px;top:3px;width:2px"}),Mx=zn(Px,{target:"eaw9yqk4"})({name:"1q9b07k",styles:"height:2px;left:3px;right:3px"}),Ix=zn(Mx,{target:"eaw9yqk3"})({name:"abcix4",styles:"top:0"}),Tx=zn(Ox,{target:"eaw9yqk2"})({name:"1wf8jf",styles:"right:0"}),Dx=zn(Mx,{target:"eaw9yqk1"})({name:"8tapst",styles:"bottom:0"}),Ax=zn(Ox,{target:"eaw9yqk0"})({name:"1ode3cm",styles:"left:0"});function Rx(e){let{size:t=24,side:n="all",sides:r,...o}=e;const i=e=>!(e=>(null==r?void 0:r.length)&&!r.includes(e))(e)&&("all"===n||n===e),l=i("top")||i("vertical"),u=i("right")||i("horizontal"),c=i("bottom")||i("vertical"),d=i("left")||i("horizontal"),f=t/24;return(0,s.createElement)(Sx,a({style:{transform:`scale(${f})`}},o),(0,s.createElement)(Cx,null,(0,s.createElement)(Ix,{isFocused:l}),(0,s.createElement)(Tx,{isFocused:u}),(0,s.createElement)(Dx,{isFocused:c}),(0,s.createElement)(Ax,{isFocused:d})))}function Nx(e){let{isLinked:t,...n}=e;const r=t?(0,d.__)("Unlink Sides"):(0,d.__)("Link Sides");return(0,s.createElement)(Ur,{text:r},(0,s.createElement)("span",null,(0,s.createElement)($n,a({},n,{className:"component-box-control__linked-button",variant:t?"primary":"secondary",isSmall:!0,icon:t?yv:bv,iconSize:16,"aria-label":r}))))}var Lx={name:"11f5o9n",styles:"bottom:0;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1"};const Fx=zn("div",{target:"e1df9b4q5"})("box-sizing:border-box;position:relative;",(e=>{let{isPositionAbsolute:t}=e;return t?Lx:""}),";"),jx=zn("div",{target:"e1df9b4q4"})("box-sizing:border-box;background:",Bo.blue.wordpress[700],";background:",Bo.ui.theme,";filter:brightness( 1 );opacity:0;position:absolute;pointer-events:none;transition:opacity 120ms linear;z-index:1;",(e=>{let{isActive:t}=e;return t&&"\n\t\topacity: 0.3;\n\t"}),";"),Bx=zn(jx,{target:"e1df9b4q3"})({name:"5i97ct",styles:"top:0;left:0;right:0"}),zx=zn(jx,{target:"e1df9b4q2"})("top:0;bottom:0;",Op({right:0}),";"),Vx=zn(jx,{target:"e1df9b4q1"})({name:"8cxke2",styles:"bottom:0;left:0;right:0"}),Hx=zn(jx,{target:"e1df9b4q0"})("top:0;bottom:0;",Op({left:0}),";");function Wx(e){let{showValues:t=fx,values:n}=e;const{top:r,right:o,bottom:i,left:a}=n;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ux,{isVisible:t.top,value:r}),(0,s.createElement)($x,{isVisible:t.right,value:o}),(0,s.createElement)(Kx,{isVisible:t.bottom,value:i}),(0,s.createElement)(Gx,{isVisible:t.left,value:a}))}function Ux(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(Bx,{isActive:o,style:{height:r}})}function $x(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(zx,{isActive:o,style:{width:r}})}function Kx(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(Vx,{isActive:o,style:{height:r}})}function Gx(e){let{isVisible:t=!1,value:n}=e;const r=n,o=qx(r).isActive||t;return(0,s.createElement)(Hx,{isActive:o,style:{width:r}})}function qx(e){const[t,n]=(0,s.useState)(!1),r=(0,s.useRef)(e),o=(0,s.useRef)(),i=()=>{o.current&&window.clearTimeout(o.current)};return(0,s.useEffect)((()=>(e!==r.current&&(n(!0),r.current=e,i(),o.current=setTimeout((()=>{n(!1)}),400)),()=>i())),[e]),{isActive:t}}const Yx={min:0};function Xx(e){let{id:t,inputProps:n=Yx,onChange:r=l.noop,onChangeShowVisualizer:o=l.noop,label:i=(0,d.__)("Box Control"),values:u,units:c,sides:p,splitOnAxis:h=!1,allowReset:m=!0,resetValues:v=dx}=e;const[g,y]=Pg(u,{fallback:dx}),b=g||dx,w=yx(u),_=1===(null==p?void 0:p.length),[x,E]=(0,s.useState)(w),[k,S]=(0,s.useState)(!w||!gx(b)||_),[C,P]=(0,s.useState)(bx(k,h)),[O,M]=(0,s.useState)({top:__(null==u?void 0:u.top)[1],right:__(null==u?void 0:u.right)[1],bottom:__(null==u?void 0:u.bottom)[1],left:__(null==u?void 0:u.left)[1]}),I=function(e){const t=(0,f.useInstanceId)(Xx,"inspector-box-control");return e||t}(t),T=`${I}-heading`,D={...n,onChange:e=>{r(e),y(e),E(!0)},onFocus:(e,t)=>{let{side:n}=t;P(n)},onHoverOn:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o({...fx,...e})},onHoverOff:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o({...fx,...e})},isLinked:k,units:c,selectedUnits:O,setSelectedUnits:M,sides:p,values:b};return(0,s.createElement)(Z_,{id:I,role:"region","aria-labelledby":T},(0,s.createElement)(J_,{className:"component-box-control__header"},(0,s.createElement)(gp,null,(0,s.createElement)(ah,{id:T,className:"component-box-control__label"},i)),m&&(0,s.createElement)(gp,null,(0,s.createElement)($n,{className:"component-box-control__reset-button",isSecondary:!0,isSmall:!0,onClick:()=>{r(v),y(v),M(v),E(!1)},disabled:!x},(0,d.__)("Reset")))),(0,s.createElement)(Q_,{className:"component-box-control__header-control-wrapper"},(0,s.createElement)(gp,null,(0,s.createElement)(Rx,{side:C,sides:p})),k&&(0,s.createElement)(vp,null,(0,s.createElement)(_x,a({"aria-label":i},D))),!k&&h&&(0,s.createElement)(vp,null,(0,s.createElement)(kx,D)),!_&&(0,s.createElement)(gp,null,(0,s.createElement)(Nx,{onClick:()=>{S(!k),P(bx(!k,h))},isLinked:k}))),!k&&!h&&(0,s.createElement)(xx,D))}Xx.__Visualizer=function(e){let{children:t,showValues:n=fx,values:r=dx,...o}=e;const i=!t;return(0,s.createElement)(Fx,a({},o,{isPositionAbsolute:i,"aria-hidden":"true"}),(0,s.createElement)(Wx,{showValues:n,values:r}),t)};var Zx=(0,s.forwardRef)((function(e,t){let{className:n,...r}=e;const o=c()("components-button-group",n);return(0,s.createElement)("div",a({ref:t,role:"group",className:o},r))}));const Jx={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function Qx(e){return`0 ${e}px ${2*e}px 0\n\t${`rgba(0 ,0, 0, ${e/20})`}`}const eE=On((function(e,t){const n=function(e){const{active:t,borderRadius:n="inherit",className:r,focus:o,hover:i,isInteractive:a=!1,offset:u=0,value:c=0,...d}=Pn(e,"Elevation"),f=Cn();return{...d,className:(0,s.useMemo)((()=>{let e=(0,l.isNil)(i)?2*c:i,s=(0,l.isNil)(t)?c/2:t;a||(e=(0,l.isNil)(i)?void 0:i,s=(0,l.isNil)(t)?void 0:t);const d=`box-shadow ${Up.transitionDuration} ${Up.transitionTimingFunction}`,p={};return p.Base=Xr({borderRadius:n,bottom:u,boxShadow:Qx(c),opacity:Up.elevationIntensity,left:u,right:u,top:u,transition:d},zo("transition"),"",""),(0,l.isNil)(e)||(p.hover=Xr("*:hover>&{box-shadow:",Qx(e),";}","")),(0,l.isNil)(s)||(p.active=Xr("*:active>&{box-shadow:",Qx(s),";}","")),(0,l.isNil)(o)||(p.focus=Xr("*:focus>&{box-shadow:",Qx(o),";}","")),f(Jx,p.Base,p.hover&&p.hover,p.focus&&p.focus,p.active&&p.active,r)}),[t,n,r,f,o,i,a,u,c]),"aria-hidden":!0}}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"Elevation");var tE=eE;const nE=`calc(${Up.cardBorderRadius} - 1px)`,rE=Xr("box-shadow:0 0 0 1px ",Up.surfaceBorderColor,";outline:none;",""),oE={name:"1showjb",styles:"border-bottom:1px solid;box-sizing:border-box;&:last-child{border-bottom:none;}"},iE={name:"14n5oej",styles:"border-top:1px solid;box-sizing:border-box;&:first-of-type{border-top:none;}"},aE={name:"13udsys",styles:"height:100%"},sE={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},lE={name:"dq805e",styles:"box-sizing:border-box;overflow:hidden;&>img,&>iframe{display:block;height:auto;max-width:100%;width:100%;}"},uE={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},cE=Xr("&:first-of-type{border-top-left-radius:",nE,";border-top-right-radius:",nE,";}&:last-of-type{border-bottom-left-radius:",nE,";border-bottom-right-radius:",nE,";}",""),dE=Xr("border-color:",Up.colorDivider,";",""),fE={name:"1t90u8d",styles:"box-shadow:none"},pE={name:"1e1ncky",styles:"border:none"},hE=Xr("border-radius:",nE,";",""),mE=Xr("padding:",Up.cardPaddingXSmall,";",""),vE={large:Xr("padding:",Up.cardPaddingLarge,";",""),medium:Xr("padding:",Up.cardPaddingMedium,";",""),small:Xr("padding:",Up.cardPaddingSmall,";",""),xSmall:mE,extraSmall:mE},gE=Xr("background-color:",Bo.lightGray[200],";",""),yE=Xr("background-color:",Up.surfaceColor,";color:",Bo.darkGray.primary,";position:relative;","");Up.surfaceBackgroundColor;const bE=Xr("",""),wE=Xr("background:",Up.surfaceBackgroundTintColor,";",""),_E=Xr("background:",Up.surfaceBackgroundTertiaryColor,";",""),xE=e=>[e,e].join(" "),EE=e=>["90deg",[Up.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),kE=e=>[[Up.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),SE=(e,t)=>Xr("background:",(e=>[`linear-gradient( ${EE(e)} ) center`,`linear-gradient( ${kE(e)} ) center`,Up.surfaceBorderBoldColor].join(","))(t),";background-size:",xE(e),";",""),CE=[`linear-gradient( ${[`${Up.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${Up.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),PE=(e,t,n)=>{switch(e){case"dotted":return SE(t,n);case"grid":return(e=>Xr("background:",Up.surfaceBackgroundColor,";background-image:",CE,";background-size:",xE(e),";",""))(t);case"primary":return bE;case"secondary":return wE;case"tertiary":return _E}};function OE(e){const{backgroundSize:t=12,borderBottom:n=!1,borderLeft:r=!1,borderRight:o=!1,borderTop:i=!1,className:a,variant:l="primary",...u}=Pn(e,"Surface"),c=Cn(),d=(0,s.useMemo)((()=>{const e={};return e.borders=function(e){let{borderBottom:t,borderLeft:n,borderRight:r,borderTop:o}=e;const i=`1px solid ${Up.surfaceBorderColor}`;return Xr({borderBottom:t?i:void 0,borderLeft:n?i:void 0,borderRight:r?i:void 0,borderTop:o?i:void 0},"","")}({borderBottom:n,borderLeft:r,borderRight:o,borderTop:i}),c(yE,e.borders,PE(l,`${t}px`,t-1+"px"),a)}),[t,n,r,o,i,a,c,l]);return{...u,className:d}}function ME(e){const{className:t,elevation:n=0,isBorderless:r=!1,isRounded:o=!0,size:i="medium",...a}=Pn(function(e){let{elevation:t,isElevated:n,...r}=e;const o={...r};let i=t;var a;return n&&(ze()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(a=i)&&void 0!==a||(i=2)),void 0!==i&&(o.elevation=i),o}(e),"Card"),l=Cn();return{...OE({...a,className:(0,s.useMemo)((()=>l(rE,r&&fE,o&&hE,t)),[t,l,r,o])}),elevation:n,isBorderless:r,isRounded:o,size:i}}var IE=On((function(e,t){const{children:n,elevation:r,isBorderless:o,isRounded:i,size:l,...u}=ME(e),c=i?Up.cardBorderRadius:0,d=Cn(),f=(0,s.useMemo)((()=>d(Xr({borderRadius:c},"",""))),[d,c]),p=(0,s.useMemo)((()=>{const e={size:l,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,l]);return(0,s.createElement)(Ke,{value:p},(0,s.createElement)(Hn,a({},u,{ref:t}),(0,s.createElement)(Hn,{className:d(aE)},n),(0,s.createElement)(tE,{className:f,isInteractive:!1,value:r?1:0}),(0,s.createElement)(tE,{className:f,isInteractive:!1,value:r})))}),"Card");const TE=Xr("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",Up.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",Up.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",Up.colorScrollbarThumbHover,";}}",""),DE={name:"13udsys",styles:"height:100%"},AE={name:"7zq9w",styles:"scroll-behavior:smooth"},RE={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},NE={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},LE={name:"umwchj",styles:"overflow-y:auto"};var FE=On((function(e,t){const n=function(e){const{className:t,scrollDirection:n="y",smoothScroll:r=!1,...o}=Pn(e,"Scrollable"),i=Cn();return{...o,className:(0,s.useMemo)((()=>i(DE,TE,r&&AE,"x"===n&&RE,"y"===n&&NE,"auto"===n&&LE,t)),[t,i,n,r])}}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"Scrollable");var jE=On((function(e,t){const{isScrollable:n,...r}=function(e){const{className:t,isScrollable:n=!1,isShady:r=!1,size:o="medium",...i}=Pn(e,"CardBody"),a=Cn();return{...i,className:(0,s.useMemo)((()=>a(sE,cE,vE[o],r&&gE,"components-card__body",t)),[t,a,r,o]),isScrollable:n}}(e);return n?(0,s.createElement)(FE,a({},r,{ref:t})):(0,s.createElement)(Hn,a({},r,{ref:t}))}),"CardBody"),BE=V({name:"Separator",compose:ue,keys:["orientation"],useOptions:function(e){var t=e.orientation;return m({orientation:void 0===t?"horizontal":t},v(e,["orientation"]))},useProps:function(e,t){return m({role:"separator","aria-orientation":e.orientation},t)}}),zE=B({as:"hr",memo:!0,useHook:BE});const VE={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var HE={name:"1u4hpl4",styles:"display:inline"};const WE=zn("hr",{target:"e19on6iw0"})("border:0;margin:0;",(e=>{let{"aria-orientation":t="horizontal"}=e;return"vertical"===t?HE:void 0})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return Xr({["vertical"===t?"borderRight":"borderBottom"]:"1px solid currentColor"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return Xr({height:"vertical"===t?"auto":0,width:"vertical"===t?0:"auto"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal",margin:n,marginStart:r,marginEnd:o}=e;return Xr(Op({[VE[t].start]:_p(null!=r?r:n),[VE[t].end]:_p(null!=o?o:n)})(),"","")}),";");var UE=On((function(e,t){const n=Pn(e,"Divider");return(0,s.createElement)(zE,a({as:WE},n,{ref:t}))}),"Divider");var $E=On((function(e,t){const n=function(e){const{className:t,...n}=Pn(e,"CardDivider"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(uE,dE,"components-card__divider",t)),[t,r])}}(e);return(0,s.createElement)(UE,a({},n,{ref:t}))}),"CardDivider");var KE=On((function(e,t){const n=function(e){const{className:t,justify:n,isBorderless:r=!1,isShady:o=!1,size:i="medium",...a}=Pn(e,"CardFooter"),l=Cn();return{...a,className:(0,s.useMemo)((()=>l(iE,cE,dE,vE[i],r&&pE,o&&gE,"components-card__footer",t)),[t,l,r,o,i]),justify:n}}(e);return(0,s.createElement)(Ip,a({},n,{ref:t}))}),"CardFooter");var GE=On((function(e,t){const n=function(e){const{className:t,isBorderless:n=!1,isShady:r=!1,size:o="medium",...i}=Pn(e,"CardHeader"),a=Cn();return{...i,className:(0,s.useMemo)((()=>a(oE,cE,dE,vE[o],n&&pE,r&&gE,"components-card__header",t)),[t,a,n,r,o])}}(e);return(0,s.createElement)(Ip,a({},n,{ref:t}))}),"CardHeader");var qE=On((function(e,t){const n=function(e){const{className:t,...n}=Pn(e,"CardMedia"),r=Cn();return{...n,className:(0,s.useMemo)((()=>r(lE,cE,"components-card__media",t)),[t,r])}}(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"CardMedia");var YE=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M7 11.5h10V13H7z"}));function XE(e){let{label:t,className:n,heading:r,checked:o,indeterminate:i,help:l,onChange:u,...d}=e;r&&ze()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[p,h]=(0,s.useState)(!1),[m,v]=(0,s.useState)(!1),g=(0,f.useRefEffect)((e=>{e&&(e.indeterminate=!!i,h(e.matches(":checked")),v(e.matches(":indeterminate")))}),[o,i]),y=`inspector-checkbox-control-${(0,f.useInstanceId)(XE)}`;return(0,s.createElement)(gv,{label:r,id:y,help:l,className:c()("components-checkbox-control",n)},(0,s.createElement)("span",{className:"components-checkbox-control__input-container"},(0,s.createElement)("input",a({ref:g,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>u(e.target.checked),checked:o,"aria-describedby":l?y+"__help":void 0},d)),m?(0,s.createElement)(wg,{icon:YE,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,p?(0,s.createElement)(wg,{icon:o_,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,s.createElement)("label",{className:"components-checkbox-control__label",htmlFor:y},t))}function ZE(e){let{className:t,children:n,onCopy:r,onFinishCopy:o,text:i,...l}=e;ze()("wp.components.ClipboardButton",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const u=(0,s.useRef)(),d=(0,f.useCopyToClipboard)(i,(()=>{r(),clearTimeout(u.current),o&&(u.current=setTimeout((()=>o()),4e3))}));(0,s.useEffect)((()=>{clearTimeout(u.current)}),[]);const p=c()("components-clipboard-button",t);return(0,s.createElement)($n,a({},l,{className:p,ref:d,onCopy:e=>{e.target.focus()}}),n)}var JE=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));var QE=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));const ek=Xr("appearance:none;border:1px solid transparent;cursor:pointer;background:none;text-align:left;&:hover{color:",Bo.admin.theme,";}&:focus{background-color:transparent;color:",Bo.admin.theme,";border-color:",Bo.admin.theme,";outline:3px solid transparent;}",""),tk={name:"1bcj5ek",styles:"width:100%;display:block"},nk={name:"a5hqs6",styles:"width:100%;display:block;margin:0;color:inherit"},rk=Xr("border:1px solid ",Up.surfaceBorderColor,";",""),ok=Xr(">*:not( marquee )>*{border-bottom:1px solid ",Up.surfaceBorderColor,";}>*:last-of-type>*:not( :focus ){border-bottom-color:transparent;}",""),ik=Up.controlBorderRadius,ak=Xr("border-radius:",ik,";",""),sk=Xr("border-radius:",ik,";>*:first-of-type>*{border-top-left-radius:",ik,";border-top-right-radius:",ik,";}>*:last-of-type>*{border-bottom-left-radius:",ik,";border-bottom-right-radius:",ik,";}",""),lk=`calc(${Up.fontSize} * ${Up.fontLineHeightBase})`,uk=`calc((${Up.controlHeight} - ${lk} - 2px) / 2)`,ck=`calc((${Up.controlHeightSmall} - ${lk} - 2px) / 2)`,dk=`calc((${Up.controlHeightLarge} - ${lk} - 2px) / 2)`,fk={small:Xr("padding:",ck," ",Up.controlPaddingXSmall,";",""),medium:Xr("padding:",uk," ",Up.controlPaddingX,";",""),large:Xr("padding:",dk," ",Up.controlPaddingXLarge,";","")};const pk=(0,s.createContext)({size:"medium"}),hk=()=>(0,s.useContext)(pk);var mk=On((function(e,t){const{isBordered:n,isSeparated:r,size:o,...i}=function(e){const{className:t,isBordered:n=!1,isRounded:r=!0,isSeparated:o=!1,role:i="list",...a}=Pn(e,"ItemGroup");return{isBordered:n,className:Cn()(n&&rk,o&&ok,r&&sk,t),role:i,isSeparated:o,...a}}(e),{size:l}=hk(),u={spacedAround:!n&&!r,size:o||l};return(0,s.createElement)(pk.Provider,{value:u},(0,s.createElement)(Hn,a({},i,{ref:t})))}),"ItemGroup");function vk(e){return Math.max(0,Math.min(100,e))}function gk(e,t,n){const r=e.slice();return r[t]=n,r}function yk(e,t,n){if(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=e[t].position,i=Math.min(o,n),a=Math.max(o,n);return e.some(((e,o)=>{let{position:s}=e;return o!==t&&(Math.abs(s-n){const e={className:"components-custom-gradient-picker__color-picker-popover",position:"top"};return t&&(e.anchorRef=n.current,e.position="bottom left"),e}),[n.current,t]);return(0,s.createElement)(f_,a({isRenderedInSidebar:t,popoverProps:o},r))}function Ek(e){let{disableRemove:t,disableAlpha:n,gradientPickerDomRef:r,ignoreMarkerPosition:o,value:i,onChange:a,onStartControlPointChange:l,onStopControlPointChange:u,__experimentalIsRenderedInSidebar:c}=e;const f=(0,s.useRef)(),p=e=>{const t=wk(e.clientX,r.current,16),{initialPosition:n,index:o,significantMoveHappened:s}=f.current;!s&&Math.abs(n-t)>=5&&(f.current.significantMoveHappened=!0),a(yk(i,o,t))},h=()=>{window&&window.removeEventListener&&f.current&&f.current.listenersActivated&&(window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",h),u(),f.current.listenersActivated=!1)};return(0,s.useEffect)((()=>()=>{h()}),[]),i.map(((e,m)=>{const v=null==e?void 0:e.position;return o!==v&&(0,s.createElement)(xk,{gradientPickerDomRef:r,isRenderedInSidebar:c,key:m,onClose:u,renderToggle:t=>{let{isOpen:n,onToggle:r}=t;return(0,s.createElement)(_k,{key:m,onClick:()=>{f.current&&f.current.significantMoveHappened||(n?u():l(),r())},onMouseDown:()=>{window&&window.addEventListener&&(f.current={initialPosition:v,index:m,significantMoveHappened:!1,listenersActivated:!0},l(),window.addEventListener("mousemove",p),window.addEventListener("mouseup",h))},onKeyDown:t=>{t.keyCode===ev.LEFT?(t.stopPropagation(),a(yk(i,m,vk(e.position-10)))):t.keyCode===ev.RIGHT&&(t.stopPropagation(),a(yk(i,m,vk(e.position+10))))},isOpen:n,position:e.position,color:e.color})},renderContent:r=>{let{onClose:o}=r;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(r_,{enableAlpha:!n,color:e.color,onChange:e=>{a(bk(i,m,ko(e).toRgbString()))}}),!t&&i.length>2&&(0,s.createElement)($n,{className:"components-custom-gradient-picker__remove-control-point",onClick:()=>{a(function(e,t){return e.filter(((e,n)=>n!==t))}(i,m)),o()},variant:"link"},(0,d.__)("Remove Control Point")))}})}))}Ek.InsertPoint=function(e){let{value:t,onChange:n,onOpenInserter:r,onCloseInserter:o,insertPosition:i,disableAlpha:a,__experimentalIsRenderedInSidebar:l,gradientPickerDomRef:u}=e;const[c,d]=(0,s.useState)(!1);return(0,s.createElement)(xk,{gradientPickerDomRef:u,isRenderedInSidebar:l,className:"components-custom-gradient-picker__inserter",onClose:()=>{o()},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,s.createElement)($n,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?o():(d(!1),r()),n()},className:"components-custom-gradient-picker__insert-point",icon:JE,style:{left:null!==i?`${i}%`:void 0}})},renderContent:()=>(0,s.createElement)(r_,{enableAlpha:!a,onChange:e=>{c?n(function(e,t,n){const r=e.findIndex((e=>e.position===t));return bk(e,r,n)}(t,i,ko(e).toRgbString())):(n(function(e,t,n){const r=e.findIndex((e=>e.position>t)),o={color:n,position:t},i=e.slice();return i.splice(r-1,0,o),i}(t,i,ko(e).toRgbString())),d(!0))}})})};var kk=Ek;function Sk(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const Ck={id:"IDLE"};function Pk(e){let{background:t,hasGradient:n,value:r,onChange:o,disableInserter:i=!1,disableAlpha:a=!1,__experimentalIsRenderedInSidebar:u}=e;const d=(0,s.useRef)(),[f,p]=(0,s.useReducer)(Sk,Ck),h=e=>{const t=wk(e.clientX,d.current,16);(0,l.some)(r,(e=>{let{position:n}=e;return Math.abs(t-n)<10}))?"MOVING_INSERTER"===f.id&&p({type:"STOP_INSERTER_MOVE"}):p({type:"MOVE_INSERTER",insertPosition:t})},m="MOVING_INSERTER"===f.id,v="INSERTING_CONTROL_POINT"===f.id;return(0,s.createElement)("div",{ref:d,className:c()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:h,onMouseMove:h,style:{background:t},onMouseLeave:()=>{p({type:"STOP_INSERTER_MOVE"})}},(0,s.createElement)("div",{className:"components-custom-gradient-picker__markers-container"},!i&&(m||v)&&(0,s.createElement)(kk.InsertPoint,{__experimentalIsRenderedInSidebar:u,gradientPickerDomRef:d,disableAlpha:a,insertPosition:f.insertPosition,value:r,onChange:o,onOpenInserter:()=>{p({type:"OPEN_INSERTER"})},onCloseInserter:()=>{p({type:"CLOSE_INSERTER"})}}),(0,s.createElement)(kk,{__experimentalIsRenderedInSidebar:u,disableAlpha:a,disableRemove:i,gradientPickerDomRef:d,ignoreMarkerPosition:v?f.insertPosition:void 0,value:r,onChange:o,onStartControlPointChange:()=>{p({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{p({type:"STOP_CONTROL_CHANGE"})}})))}var Ok=n(7115);const Mk="linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)",Ik={type:"angular",value:90},Tk=[{value:"linear-gradient",label:(0,d.__)("Linear")},{value:"radial-gradient",label:(0,d.__)("Radial")}],Dk={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function Ak(e){let{type:t,value:n,length:r}=e;return`${function(e){let{type:t,value:n}=e;return"literal"===t?n:"hex"===t?`#${n}`:`${t}(${n.join(",")})`}({type:t,value:n})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(r)}`}function Rk(e){let{type:t,orientation:n,colorStops:r}=e;const o=function(e){if(e&&"angular"===e.type)return`${e.value}deg`}(n),i=r.sort(((e,t)=>(0,l.get)(e,["length","value"],0)-(0,l.get)(t,["length","value"],0))).map(Ak);return`${t}(${(0,l.compact)([o,...i]).join(",")})`}function Nk(e){return void 0===e.length||"%"!==e.length.type}function Lk(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}Co([Po]);const Fk=zn(vp,{target:"e99xvul1"})({name:"1gvx10y",styles:"flex-grow:5"}),jk=zn(vp,{target:"e99xvul0"})({name:"1gvx10y",styles:"flex-grow:5"}),Bk=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const o=(0,l.get)(t,["orientation","value"],180);return(0,s.createElement)(Qm,{onChange:e=>{r(Rk({...t,orientation:{type:"angular",value:e}}))},labelPosition:"top",value:n?o:""})},zk=e=>{let{gradientAST:t,hasGradient:n,onChange:r}=e;const{type:o}=t;return(0,s.createElement)(Sg,{className:"components-custom-gradient-picker__type-picker",label:(0,d.__)("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&r(Rk({...t,...t.orientation?{}:{orientation:Ik},type:"linear-gradient"})),"radial-gradient"===e&&r(Rk({...(0,l.omit)(t,["orientation"]),type:"radial-gradient"}))},options:Tk,size:"__unstable-large",value:n&&o})};function Vk(e){let{value:t,onChange:n,__experimentalIsRenderedInSidebar:r}=e;const o=function(e){var t;let n;try{n=Ok.parse(e)[0],n.value=e}catch(e){n=Ok.parse(Mk)[0],n.value=Mk}if("directional"===(null===(t=n.orientation)||void 0===t?void 0:t.type)&&(n.orientation.type="angular",n.orientation.value=Dk[n.orientation.value].toString()),n.colorStops.some(Nk)){const{colorStops:e}=n,t=100/(e.length-1);e.forEach(((e,n)=>{e.length={value:t*n,type:"%"}})),n.value=Rk(n)}return n}(t),i=function(e){return Rk({type:"linear-gradient",orientation:Ik,colorStops:e.colorStops})}(o),a=o.value!==Mk,l=o.colorStops.map((e=>({color:Lk(e),position:parseInt(e.length.value)})));return(0,s.createElement)("div",{className:"components-custom-gradient-picker"},(0,s.createElement)(Pk,{__experimentalIsRenderedInSidebar:r,background:i,hasGradient:a,value:l,onChange:e=>{n(Rk(function(e,t){return{...e,colorStops:t.map((e=>{let{position:t,color:n}=e;const{r:r,g:o,b:i,a:a}=ko(n).toRgb();return{length:{type:"%",value:t.toString()},type:a<1?"rgba":"rgb",value:a<1?[r,o,i,a]:[r,o,i]}}))}}(o,e)))}}),(0,s.createElement)(Ip,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,s.createElement)(Fk,null,(0,s.createElement)(zk,{gradientAST:o,hasGradient:a,onChange:n})),(0,s.createElement)(jk,null,"linear-gradient"===o.type&&(0,s.createElement)(Bk,{gradientAST:o,hasGradient:a,onChange:n}))))}function Hk(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:a,content:u}=e;const c=(0,s.useMemo)((()=>(0,l.map)(r,(e=>{let{gradient:t,name:r}=e;return(0,s.createElement)(i_.Option,{key:t,value:t,isSelected:i===t,tooltipText:r||(0,d.sprintf)((0,d.__)("Gradient code: %s"),t),style:{color:"rgba( 0,0,0,0 )",background:t},onClick:i===t?n:()=>o(t),"aria-label":r?(0,d.sprintf)((0,d.__)("Gradient: %s"),r):(0,d.sprintf)((0,d.__)("Gradient code: %s"),t)})}))),[r,i,o,n]);return(0,s.createElement)(i_,{className:t,options:c,actions:a},u)}function Wk(e){let{className:t,clearGradient:n,gradients:r,onChange:o,value:i,actions:l,content:u}=e;return(0,s.createElement)(a_,{spacing:3,className:t},r.map(((e,t)=>{let{name:c,gradients:d}=e;return(0,s.createElement)(a_,{spacing:2,key:t},(0,s.createElement)(u_,null,c),(0,s.createElement)(Hk,a({clearGradient:n,gradients:d,onChange:o,value:i},r.length===t+1?{actions:l,content:u}:{})))})))}function Uk(e){let{className:t,gradients:n,onChange:r,value:o,clearable:i=!0,disableCustomGradients:a=!1,__experimentalHasMultipleOrigins:l,__experimentalIsRenderedInSidebar:u}=e;const c=(0,s.useCallback)((()=>r(void 0)),[r]),f=l&&null!=n&&n.length?Wk:Hk;return(0,s.createElement)(f,{className:t,clearable:i,clearGradient:c,gradients:n,onChange:r,value:o,actions:i&&((null==n?void 0:n.length)||!a)&&(0,s.createElement)(i_.ButtonAction,{onClick:c},(0,d.__)("Clear")),content:!a&&(0,s.createElement)(Vk,{__experimentalIsRenderedInSidebar:u,value:o,onChange:r})})}var $k=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"}));const Kk=["menuitem","menuitemradio","menuitemcheckbox"];class Gk extends s.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,(0,l.isFunction)(t)?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?Re.focus.tabbable:Re.focus.focusable).find(this.container),r=this.getFocusableIndex(n,e);return r>-1&&e?{index:r,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:r,onNavigate:o=l.noop,stopNavigationEvents:i}=this.props,a=r(e);if(void 0!==a&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role");Kk.includes(t)&&e.preventDefault()}if(!a)return;const s=t(e.target.ownerDocument.activeElement);if(!s)return;const{index:u,focusables:c}=s,d=n?function(e,t,n){const r=e+n;return r<0?t+r:r>=t?r-t:r}(u,c.length,a):u+a;d>=0&&d(0,s.createElement)(Gk,a({},e,{forwardedRef:t}));qk.displayName="NavigableContainer";var Yk=(0,s.forwardRef)(qk);var Xk=(0,s.forwardRef)((function(e,t){let{role:n="menu",orientation:r="vertical",...o}=e;return(0,s.createElement)(Yk,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:n,"aria-orientation":"presentation"===n?null:r,eventToOffset:e=>{const{keyCode:t}=e;let n=[ev.DOWN],o=[ev.UP];return"horizontal"===r&&(n=[ev.RIGHT],o=[ev.LEFT]),"both"===r&&(n=[ev.RIGHT,ev.DOWN],o=[ev.LEFT,ev.UP]),(0,l.includes)(n,t)?1:(0,l.includes)(o,t)?-1:(0,l.includes)([ev.DOWN,ev.UP,ev.LEFT,ev.RIGHT],t)?0:void 0}},o))}));function Zk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...e,...t};return t.className&&e.className&&(n.className=c()(t.className,e.className)),n}var Jk=function(e){const{children:t,className:n,controls:r,icon:o=$k,label:i,popoverProps:u,toggleProps:d,menuProps:f,disableOpenOnArrowDown:p=!1,text:h,noIcons:m}=e;if((0,l.isEmpty)(r)&&!(0,l.isFunction)(t))return null;let v;(0,l.isEmpty)(r)||(v=r,Array.isArray(v[0])||(v=[v]));const g=Zk({className:"components-dropdown-menu__popover"},u);return(0,s.createElement)(pg,{className:c()("components-dropdown-menu",n),popoverProps:g,renderToggle:e=>{var t;let{isOpen:n,onToggle:r}=e;const l=Zk({className:c()("components-dropdown-menu__toggle",{"is-opened":n})},d);return(0,s.createElement)($n,a({},l,{icon:o,onClick:e=>{r(e),l.onClick&&l.onClick(e)},onKeyDown:e=>{(e=>{p||n||e.keyCode!==ev.DOWN||(e.preventDefault(),r())})(e),l.onKeyDown&&l.onKeyDown(e)},"aria-haspopup":"true","aria-expanded":n,label:i,text:h,showTooltip:null===(t=null==d?void 0:d.showTooltip)||void 0===t||t}),l.children)},renderContent:e=>{const n=Zk({"aria-label":i,className:c()("components-dropdown-menu__menu",{"no-icons":m})},f);return(0,s.createElement)(Xk,a({},n,{role:"menu"}),(0,l.isFunction)(t)?t(e):null,(0,l.flatMap)(v,((t,n)=>t.map(((t,r)=>(0,s.createElement)($n,{key:[n,r].join(),onClick:n=>{n.stopPropagation(),e.onClose(),t.onClick&&t.onClick()},className:c()("components-dropdown-menu__menu-item",{"has-separator":n>0&&0===r,"is-active":t.isActive,"is-icon-only":!t.title}),icon:t.icon,label:t.label,"aria-checked":"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.isActive:void 0,role:"menuitemcheckbox"===t.role||"menuitemradio"===t.role?t.role:"menuitem",disabled:t.isDisabled},t.title))))))}})};const Qk=zn(i_.Option,{target:"e5bw3229"})("width:",_p(6),";height:",_p(6),";pointer-events:none;"),eS=zn(Um,{target:"e5bw3228"})(vh,"{background:",Bo.gray[100],";border-radius:",Up.controlBorderRadius,";}",gh,gh,gh,gh,"{height:",_p(8),";}",xh,xh,xh,"{border-color:transparent;box-shadow:none;}"),tS=zn(Hn,{target:"e5bw3227"})("padding:3px 0 3px ",_p(3),";height:calc( 40px - ",Up.borderWidth," );border:1px solid ",Up.surfaceBorderColor,";border-bottom-color:transparent;&:first-of-type{border-top-left-radius:",Up.controlBorderRadius,";border-top-right-radius:",Up.controlBorderRadius,";}&:last-of-type{border-bottom-left-radius:",Up.controlBorderRadius,";border-bottom-right-radius:",Up.controlBorderRadius,";border-bottom-color:",Up.surfaceBorderColor,";}&.is-selected+&{border-top-color:transparent;}&.is-selected{border-color:",Bo.blue.wordpress[700],";}"),nS=zn("div",{target:"e5bw3226"})("line-height:",_p(8),";margin-left:",_p(2),";margin-right:",_p(2),";white-space:nowrap;overflow:hidden;",tS,":hover &{color:var( --wp-admin-theme-color, ",Bo.blue.wordpress[700]," );}"),rS=zn(l_,{target:"e5bw3225"})("text-transform:uppercase;line-height:",_p(6),";font-weight:500;&&&{font-size:11px;margin-bottom:0;}"),oS=zn(Hn,{target:"e5bw3224"})("height:",_p(6),";display:flex;"),iS=zn(bg,{target:"e5bw3223"})("margin-bottom:",_p(2),";"),aS=zn(Hn,{target:"e5bw3222"})({name:"u6wnko",styles:"&&&{.components-button.has-icon{min-width:0;padding:0;}}"}),sS=zn($n,{target:"e5bw3221"})("&&{color:",Bo.ui.theme,";}"),lS=zn($n,{target:"e5bw3220"})("&&{margin-top:",_p(1),";}"),uS="#000";function cS(e){let{value:t,onChange:n,label:r}=e;return(0,s.createElement)(eS,{label:r,hideLabelFromVision:!0,value:t,onChange:n})}function dS(e){return(0,d.sprintf)((0,d.__)("Color %s "),e+1)}function fS(e){let{canOnlyChangeValues:t,element:n,onChange:r,isEditing:o,onStartEditing:i,onRemove:u,onStopEditing:c,slugPrefix:p,isGradient:h}=e;const m=(0,f.__experimentalUseFocusOutside)(c),v=h?n.gradient:n.color;return(0,s.createElement)(tS,a({className:o?"is-selected":void 0,as:"div",onClick:i},o?{...m}:{style:{cursor:"pointer"}}),(0,s.createElement)(bg,{justify:"flex-start"},(0,s.createElement)(gp,null,(0,s.createElement)(Qk,{style:{background:v,color:"transparent"}})),(0,s.createElement)(gp,null,o&&!t?(0,s.createElement)(cS,{label:h?(0,d.__)("Gradient name"):(0,d.__)("Color name"),value:n.name,onChange:e=>r({...n,name:e,slug:p+(0,l.kebabCase)(e)})}):(0,s.createElement)(nS,null,n.name)),o&&!t&&(0,s.createElement)(gp,null,(0,s.createElement)(lS,{isSmall:!0,icon:Iv,label:(0,d.__)("Remove color"),onClick:u}))),o&&(0,s.createElement)(Fr,{position:"bottom left",className:"components-palette-edit__popover"},!h&&(0,s.createElement)(r_,{color:v,onChange:e=>r({...n,color:e})}),h&&(0,s.createElement)(Vk,{__experimentalIsRenderedInSidebar:!0,value:v,onChange:e=>r({...n,gradient:e})})))}function pS(e,t,n){let{slug:r,color:o,gradient:i}=t;return r===e+(0,l.kebabCase)(dS(n))&&(!!o&&o===uS||!!i&&i===Mk)}function hS(e){let{elements:t,onChange:n,editingElement:r,setEditingElement:o,canOnlyChangeValues:i,slugPrefix:a,isGradient:l}=e;const u=(0,s.useRef)();(0,s.useEffect)((()=>{u.current=t}),[t]),(0,s.useEffect)((()=>()=>{if(u.current.some(((e,t)=>pS(a,e,t)))){const e=u.current.filter(((e,t)=>!pS(a,e,t)));n(e.length?e:void 0)}}),[]);const c=(0,f.useDebounce)(n,100);return(0,s.createElement)(a_,{spacing:3},(0,s.createElement)(mk,{isRounded:!0},t.map(((e,u)=>(0,s.createElement)(fS,{isGradient:l,canOnlyChangeValues:i,key:u,element:e,onStartEditing:()=>{r!==u&&o(u)},onChange:e=>{c(t.map(((t,n)=>n===u?e:t)))},onRemove:()=>{o(null);const e=t.filter(((e,t)=>t!==u));n(e.length?e:void 0)},isEditing:u===r,onStopEditing:()=>{u===r&&o(null)},slugPrefix:a})))))}const mS=[];function vS(e){let{gradients:t,colors:n=mS,onChange:r,paletteLabel:o,emptyMessage:i,canOnlyChangeValues:a,canReset:u,slugPrefix:c=""}=e;const f=!!t,p=f?t:n,[h,m]=(0,s.useState)(!1),[v,g]=(0,s.useState)(null),y=h&&v&&p[v]&&!p[v].slug,b=p.length,w=b>0;return(0,s.createElement)(aS,null,(0,s.createElement)(iS,null,(0,s.createElement)(rS,null,o),(0,s.createElement)(oS,null,h&&(0,s.createElement)(sS,{isSmall:!0,onClick:()=>{m(!1),g(null)}},(0,d.__)("Done")),!a&&(0,s.createElement)($n,{isSmall:!0,isPressed:y,icon:JE,label:f?(0,d.__)("Add gradient"):(0,d.__)("Add color"),onClick:()=>{const e=dS(b);r([...p,{...f?{gradient:Mk}:{color:uS},name:e,slug:c+(0,l.kebabCase)(e)}]),m(!0),g(p.length)}}),w&&(!h||!a||u)&&(0,s.createElement)(Jk,{icon:QE,label:f?(0,d.__)("Gradient options"):(0,d.__)("Color options"),toggleProps:{isSmall:!0}},(e=>{let{onClose:t}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Xk,{role:"menu"},!h&&(0,s.createElement)($n,{variant:"tertiary",onClick:()=>{m(!0),t()},className:"components-palette-edit__menu-button"},f?(0,d.__)("Edit gradients"):(0,d.__)("Edit colors")),!a&&(0,s.createElement)($n,{variant:"tertiary",onClick:()=>{g(null),m(!1),r(),t()},className:"components-palette-edit__menu-button"},f?(0,d.__)("Remove all gradients"):(0,d.__)("Remove all colors")),u&&(0,s.createElement)($n,{variant:"tertiary",onClick:()=>{g(null),r(),t()}},f?(0,d.__)("Reset gradient"):(0,d.__)("Reset colors"))))})))),w&&(0,s.createElement)(s.Fragment,null,h&&(0,s.createElement)(hS,{canOnlyChangeValues:a,elements:p,onChange:r,editingElement:v,setEditingElement:g,slugPrefix:c,isGradient:f}),!h&&(f?(0,s.createElement)(Uk,{gradients:t,onChange:()=>{},clearable:!1,disableCustomGradients:!0}):(0,s.createElement)(p_,{colors:n,onChange:()=>{},clearable:!1,disableCustomColors:!0}))),!w&&i)}class gS extends s.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:r,className:o,onChange:i,...l}=this.props,u=e?e.length+1:0;return(0,s.createElement)("input",a({ref:this.bindInput,id:`components-form-token-input-${n}`,type:"text"},l,{value:e||"",onChange:i?this.onChange:void 0,size:u,className:c()(o,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${n}`:void 0,"aria-activedescendant":-1!==r?`components-form-token-suggestions-${n}-${r}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${n}`}))}}var yS=gS,bS=n(5425),wS=n.n(bS);const _S=Object.freeze([]),xS=e=>{e.preventDefault()};var ES=(0,f.withSafeTimeout)((function(e){let{selectedIndex:t,scrollIntoView:n,match:r="",onHover:o,onSelect:i,suggestions:a=_S,displayTransform:u,instanceId:d,setTimeout:p}=e;const[h,m]=(0,s.useState)(!1),v=(0,f.useRefEffect)((e=>{t>-1&&n&&e.children[t]&&(m(!0),wS()(e.children[t],e,{onlyScrollIfNeeded:!0}),p((()=>{m(!1)}),100))}),[t,n]),g=e=>()=>{h||null==o||o(e)},y=e=>()=>{null==i||i(e)};return(0,s.createElement)("ul",{ref:v,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${d}`,role:"listbox"},(0,l.map)(a,((e,n)=>{const o=(e=>{const t=u(r||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=u(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}})(e),i=c()("components-form-token-field__suggestion",{"is-selected":n===t});return(0,s.createElement)("li",{id:`components-form-token-suggestions-${d}-${n}`,role:"option",className:i,key:null!=e&&e.value?e.value:u(e),onMouseDown:xS,onClick:y(e),onMouseEnter:g(e),"aria-selected":n===t},o?(0,s.createElement)("span",{"aria-label":u(e)},o.suggestionBeforeMatch,(0,s.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):u(e))})))})),kS=(0,f.createHigherOrderComponent)((e=>t=>{const[n,r]=(0,s.useState)(),o=(0,s.useCallback)((e=>r((()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0))),[]);return(0,s.createElement)("div",(0,f.__experimentalUseFocusOutside)(n),(0,s.createElement)(e,a({ref:o},t)))}),"withFocusOutside");const SS=kS(class extends s.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});var CS=function e(t){var n;let{value:r,label:o,options:i,onChange:a,onFilterValueChange:u=l.noop,hideLabelFromVision:p,help:h,allowReset:m=!0,className:v,messages:g={selected:(0,d.__)("Item selected.")}}=t;const y=i.find((e=>e.value===r)),b=null!==(n=null==y?void 0:y.label)&&void 0!==n?n:"",w=(0,f.useInstanceId)(e),[_,x]=(0,s.useState)(y||null),[E,k]=(0,s.useState)(!1),[S,C]=(0,s.useState)(!1),[P,O]=(0,s.useState)(""),M=(0,s.useRef)(),I=(0,s.useMemo)((()=>{const e=[],t=[],n=(0,l.deburr)(P.toLocaleLowerCase());return i.forEach((r=>{const o=(0,l.deburr)(r.label).toLocaleLowerCase().indexOf(n);0===o?e.push(r):o>0&&t.push(r)})),e.concat(t)}),[P,i,r]),T=e=>{a(e.value),(0,nv.speak)(g.selected,"assertive"),x(e),O(""),k(!1)},D=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t=I.indexOf(_);let n=t+e;n<0?n=I.length-1:n>=I.length&&(n=0),x(I[n]),k(!0)};return(0,s.useEffect)((()=>{const e=I.length>0,t=I.indexOf(_)>0;e&&!t&&x(I[0])}),[I,_]),(0,s.useEffect)((()=>{const e=I.length>0;if(E){const t=e?(0,d.sprintf)((0,d._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",I.length),I.length):(0,d.__)("No results.");(0,nv.speak)(t,"polite")}}),[I,E]),(0,s.createElement)(SS,{onFocusOutside:()=>{k(!1)}},(0,s.createElement)(gv,{className:c()(v,"components-combobox-control"),tabIndex:"-1",label:o,id:`components-form-token-input-${w}`,hideLabelFromVision:p,help:h},(0,s.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;if(!e.defaultPrevented){switch(e.keyCode){case ev.ENTER:_&&(T(_),t=!0);break;case ev.UP:D(-1),t=!0;break;case ev.DOWN:D(1),t=!0;break;case ev.ESCAPE:k(!1),x(null),t=!0}t&&e.preventDefault()}}},(0,s.createElement)(Ip,null,(0,s.createElement)(vp,null,(0,s.createElement)(yS,{className:"components-combobox-control__input",instanceId:w,ref:M,value:E?P:b,"aria-label":b?`${b}, ${o}`:null,onFocus:()=>{C(!0),k(!0),u(""),O("")},onBlur:()=>{C(!1)},isExpanded:E,selectedSuggestionIndex:I.indexOf(_),onChange:e=>{const t=e.value;O(t),u(t),S&&k(!0)}})),m&&(0,s.createElement)(gp,null,(0,s.createElement)($n,{className:"components-combobox-control__reset",icon:Mv,disabled:!r,onClick:()=>{a(null),M.current.input.focus()},label:(0,d.__)("Reset")}))),E&&(0,s.createElement)(ES,{instanceId:w,match:{label:P},displayTransform:e=>e.label,suggestions:I,selectedIndex:I.indexOf(_),onHover:x,onSelect:T,scrollIntoView:!0}))))};const PS=new Set(["alert","status","log","marquee","timer"]);let OS=[],MS=!1;function IS(e){if(MS)return;const t=document.body.children;(0,l.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||PS.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),OS.push(t))})),MS=!0}let TS=0;var DS=(0,s.forwardRef)((function e(t,n){const{bodyOpenClassName:r="modal-open",role:o="dialog",title:i=null,focusOnMount:u=!0,shouldCloseOnEsc:p=!0,shouldCloseOnClickOutside:h=!0,isDismissible:m=!0,aria:v={labelledby:null,describedby:null},onRequestClose:g,icon:y,closeButtonLabel:b,children:w,style:_,overlayClassName:x,className:E,contentLabel:k,onKeyDown:S,isFullScreen:C=!1,__experimentalHideHeader:P=!1}=t,O=(0,s.useRef)(),M=(0,f.useInstanceId)(e),I=i?`components-modal-header-${M}`:v.labelledby,T=(0,f.useFocusOnMount)(u),D=(0,f.useConstrainedTabbing)(),A=(0,f.useFocusReturn)(),R=(0,f.__experimentalUseFocusOutside)(g);return(0,s.useEffect)((()=>(TS++,1===TS&&(IS(O.current),document.body.classList.add(r)),()=>{TS--,0===TS&&(document.body.classList.remove(r),MS&&((0,l.forEach)(OS,(e=>{e.removeAttribute("aria-hidden")})),OS=[],MS=!1))})),[]),(0,s.createPortal)((0,s.createElement)("div",{ref:(0,f.useMergeRefs)([O,n]),className:c()("components-modal__screen-overlay",x),onKeyDown:function(e){p&&e.keyCode===ev.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),g&&g(e))}},(0,s.createElement)(mr,{document:document},(0,s.createElement)("div",a({className:c()("components-modal__frame",E,{"is-full-screen":C}),style:_,ref:(0,f.useMergeRefs)([D,A,T]),role:o,"aria-label":k,"aria-labelledby":k?null:I,"aria-describedby":v.describedby,tabIndex:"-1"},h?R:{},{onKeyDown:S}),(0,s.createElement)("div",{className:c()("components-modal__content",{"hide-header":P}),role:"document"},!P&&(0,s.createElement)("div",{className:"components-modal__header"},(0,s.createElement)("div",{className:"components-modal__header-heading-container"},y&&(0,s.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},y),i&&(0,s.createElement)("h1",{id:I,className:"components-modal__header-heading"},i)),m&&(0,s.createElement)($n,{onClick:g,icon:Mv,label:b||(0,d.__)("Close dialog")})),w)))),document.body)}));const AS={name:"7g5ii0",styles:"&&{z-index:1000001;}"};var RS=On((function(e,t){const{isOpen:n,onConfirm:r,onCancel:o,children:i,confirmButtonText:l,cancelButtonText:u,...c}=Pn(e,"ConfirmDialog"),f=Cn()(AS),[p,h]=(0,s.useState)(),[m,v]=(0,s.useState)();(0,s.useEffect)((()=>{const e=void 0!==n;h(!e||n),v(!e)}),[n]);const g=(0,s.useCallback)((e=>t=>{null==e||e(t),m&&h(!1)}),[m,h]),y=(0,s.useCallback)((e=>{"Enter"===e.key&&g(r)(e)}),[g,r]),b=null!=u?u:(0,d.__)("Cancel"),w=null!=l?l:(0,d.__)("OK");return(0,s.createElement)(s.Fragment,null,p&&(0,s.createElement)(DS,a({onRequestClose:g(o),onKeyDown:y,closeButtonLabel:b,isDismissible:!0,ref:t,overlayClassName:f,__experimentalHideHeader:!0},c),(0,s.createElement)(a_,{spacing:8},(0,s.createElement)(ah,null,i),(0,s.createElement)(Ip,{direction:"row",justify:"flex-end"},(0,s.createElement)($n,{variant:"tertiary",onClick:g(o)},b),(0,s.createElement)($n,{variant:"primary",onClick:g(r)},w)))))}),"ConfirmDialog"),NS=n(2652),LS=n.n(NS);n(2797);function FS(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function jS(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function BS(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}let VS=0;function HS(){}function WS(e,t){if(!e)return;const n=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!FS(e))throw new TypeError("Invalid target");for(var u,c,d=document.scrollingElement||document.documentElement,f=[],p=e;FS(p)&&l(p);){if((p=null==(c=(u=p).parentElement)?u.getRootNode().host||null:c)===d){f.push(p);break}null!=p&&p===document.body&&BS(p)&&!BS(document.documentElement)||null!=p&&BS(p,s)&&f.push(p)}for(var h=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),b=y.height,w=y.width,_=y.top,x=y.right,E=y.bottom,k=y.left,S="start"===o||"nearest"===o?_:"end"===o?E:_+b/2,C="center"===i?k+w/2:"end"===i?x:k,P=[],O=0;O=0&&k>=0&&E<=m&&x<=h&&_>=A&&E<=N&&k>=L&&x<=R)return P;var F=getComputedStyle(M),j=parseInt(F.borderLeftWidth,10),B=parseInt(F.borderTopWidth,10),z=parseInt(F.borderRightWidth,10),V=parseInt(F.borderBottomWidth,10),H=0,W=0,U="offsetWidth"in M?M.offsetWidth-M.clientWidth-j-z:0,$="offsetHeight"in M?M.offsetHeight-M.clientHeight-B-V:0,K="offsetWidth"in M?0===M.offsetWidth?0:D/M.offsetWidth:0,G="offsetHeight"in M?0===M.offsetHeight?0:T/M.offsetHeight:0;if(d===M)H="start"===o?S:"end"===o?S-m:"nearest"===o?zS(g,g+m,m,B,V,g+S,g+S+b,b):S-m/2,W="start"===i?C:"center"===i?C-h/2:"end"===i?C-h:zS(v,v+h,h,j,z,v+C,v+C+w,w),H=Math.max(0,H+g),W=Math.max(0,W+v);else{H="start"===o?S-A-B:"end"===o?S-N+V+$:"nearest"===o?zS(A,N,T,B,V+$,S,S+b,b):S-(A+T/2)+$/2,W="start"===i?C-L-j:"center"===i?C-(L+D/2)+U/2:"end"===i?C-R+z+U:zS(L,R,D,j,z+U,C,C+w,w);var q=M.scrollLeft,Y=M.scrollTop;S+=Y-(H=Math.max(0,Math.min(Y+H/G,M.scrollHeight-T/G+$))),C+=q-(W=Math.max(0,Math.min(q+W/K,M.scrollWidth-D/K+U)))}P.push({el:M,top:H,left:W})}return P}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function US(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function $S(e,t){let n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a{n=null,e(...i)}),t)}return o.cancel=r,o}function KS(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function GS(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}}function qS(){return String(VS++)}function YS(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function XS(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=ZS(t,r)?t[r]:e[r],n)),{})}function ZS(e,t){return void 0!==e[t]}function JS(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function QS(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;const i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=eC(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function eC(e,t,n,r,o){const i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let e=t+1;e=0;e--)if(!r(e).hasAttribute("disabled"))return e;return o?e>0?eC(1,0,n,r,!1):eC(-1,n-1,n,r,!1):-1}function tC(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(US(t,e,n)||r&&US(t,n.document.activeElement,n))))}const nC=$S((e=>{oC(e).textContent=""}),500);function rC(e,t){const n=oC(t);e&&(n.textContent=e,nC(t))}function oC(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const iC={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function aC(e,t,n){const{props:r,type:o}=e,i={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:o,type:i}=t,a=`on${fC(e)}Change`;o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]({type:i,...r})}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])})),r.onStateChange&&Object.keys(i).length&&r.onStateChange({type:o,...i})}const sC=$S(((e,t)=>{rC(e(),t)}),200),lC="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?b.useLayoutEffect:b.useEffect;function uC(e){let{id:t=`downshift-${qS()}`,labelId:n,menuId:r,getItemId:o,toggleButtonId:i,inputId:a}=e;return(0,b.useRef)({labelId:n||`${t}-label`,menuId:r||`${t}-menu`,getItemId:o||(e=>`${t}-item-${e}`),toggleButtonId:i||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function cC(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function dC(e){return/^\S{1}$/.test(e)}function fC(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function pC(e){const t=(0,b.useRef)(e);return t.current=e,t}function hC(e,t,n){const r=(0,b.useRef)(),o=(0,b.useRef)(),i=(0,b.useCallback)(((t,n)=>{o.current=n,t=XS(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[a,s]=(0,b.useReducer)(i,t),l=pC(n),u=(0,b.useCallback)((e=>s({props:l.current,...e})),[l]),c=o.current;return(0,b.useEffect)((()=>{c&&r.current&&r.current!==a&&aC(c,XS(r.current,c.props),a),r.current=a}),[a,n,c]),[a,u]}function mC(e,t,n){const[r,o]=hC(e,t,n);return[XS(r,n),o]}const vC={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:WS,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function gC(e,t,n){void 0===n&&(n=iC);const r=e[`default${fC(t)}`];return void 0!==r?r:n[t]}function yC(e,t,n){void 0===n&&(n=iC);const r=e[t];if(void 0!==r)return r;const o=e[`initial${fC(t)}`];return void 0!==o?o:gC(e,t,n)}function bC(e){const t=yC(e,"selectedItem"),n=yC(e,"isOpen"),r=yC(e,"highlightedIndex"),o=yC(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function wC(e,t,n,r){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:l}=t;return 0===o.length?-1:void 0!==i&&l===i?i:void 0!==a?a:s?0===n?o.indexOf(s):QS(n,o.indexOf(s),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function _C(e,t,n,r){const o=(0,b.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,b.useEffect)((()=>{const i=()=>{o.current.isMouseDown=!0},a=i=>{o.current.isMouseDown=!1,e&&!tC(i.target,t.map((e=>e.current)),n)&&r()},s=()=>{o.current.isTouchMove=!1},l=()=>{o.current.isTouchMove=!0},u=i=>{!e||o.current.isTouchMove||tC(i.target,t.map((e=>e.current)),n,!1)||r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",l),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",u)}}),[e,n]),o}let xC=()=>HS;function EC(e,t,n){let{isInitialMount:r,highlightedIndex:o,items:i,environment:a,...s}=n;(0,b.useEffect)((()=>{r||sC((()=>e({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length,...s})),a.document)}),t)}function kC(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:o,menuElement:i,scrollIntoView:a}=e;const s=(0,b.useRef)(!0);return lC((()=>{t<0||!n||!Object.keys(r.current).length||(!1===s.current?s.current=!0:a(o(t),i))}),[t]),s}let SC=HS;function CC(e,t,n){const{type:r,props:o}=t;let i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:wC(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:wC(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:gC(o,"highlightedIndex"),isOpen:gC(o,"isOpen"),selectedItem:gC(o,"selectedItem"),inputValue:gC(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}function PC(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex,a=t.toLowerCase(),s=0;s=0&&{selectedItem:r.items[a]}}}break;case 13:i={highlightedIndex:wC(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:i={highlightedIndex:wC(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:i={isOpen:gC(r,"isOpen"),highlightedIndex:gC(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case 3:i={highlightedIndex:eC(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case 4:i={highlightedIndex:eC(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:i={isOpen:!1,highlightedIndex:-1};break;case 7:{const n=t.key,o=`${e.inputValue}${n}`,a=PC({keysSoFar:o,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});i={inputValue:o,...a>=0&&{highlightedIndex:a}}}break;case 0:i={highlightedIndex:QS(o?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 1:i={highlightedIndex:QS(o?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case 20:i={selectedItem:t.selectedItem};break;default:return CC(e,t,IC)}return{...e,...i}}function DC(e){void 0===e&&(e={}),MC(e,DC);const t={...OC,...e},{items:n,scrollIntoView:r,environment:o,initialIsOpen:i,defaultIsOpen:a,itemToString:s,getA11ySelectionMessage:l,getA11yStatusMessage:u}=t,c=bC(t),[d,f]=mC(TC,c,t),{isOpen:p,highlightedIndex:h,selectedItem:m,inputValue:v}=d,g=(0,b.useRef)(null),y=(0,b.useRef)(null),w=(0,b.useRef)({}),_=(0,b.useRef)(!0),x=(0,b.useRef)(null),E=uC(t),k=(0,b.useRef)(),S=(0,b.useRef)(!0),C=pC({state:d,props:t}),P=(0,b.useCallback)((e=>w.current[E.getItemId(e)]),[E]);EC(u,[p,h,v,n],{isInitialMount:S.current,previousResultCount:k.current,items:n,environment:o,itemToString:s,...d}),EC(l,[m],{isInitialMount:S.current,previousResultCount:k.current,items:n,environment:o,itemToString:s,...d});const O=kC({menuElement:y.current,highlightedIndex:h,isOpen:p,itemRefs:w,scrollIntoView:r,getItemNodeFromIndex:P});(0,b.useEffect)((()=>(x.current=$S((e=>{e({type:21,inputValue:""})}),500),()=>{x.current.cancel()})),[]),(0,b.useEffect)((()=>{v&&x.current(f)}),[f,v]),SC({isInitialMount:S.current,props:t,state:d}),(0,b.useEffect)((()=>{S.current?(i||a||p)&&y.current&&y.current.focus():p?y.current&&y.current.focus():o.document.activeElement===y.current&&g.current&&(_.current=!1,g.current.focus())}),[p]),(0,b.useEffect)((()=>{S.current||(k.current=n.length)}));const M=_C(p,[y,g],o,(()=>{f({type:8})})),I=xC();(0,b.useEffect)((()=>{S.current=!1}),[]),(0,b.useEffect)((()=>{p||(w.current={})}),[p]);const T=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:13,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:14,getItemNodeFromIndex:P,shiftKey:e.shiftKey})}})),[f,P]),D=(0,b.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:0,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},ArrowUp(e){e.preventDefault(),f({type:1,getItemNodeFromIndex:P,shiftKey:e.shiftKey})},Home(e){e.preventDefault(),f({type:3,getItemNodeFromIndex:P})},End(e){e.preventDefault(),f({type:4,getItemNodeFromIndex:P})},Escape(){f({type:2})},Enter(e){e.preventDefault(),f({type:5})}," "(e){e.preventDefault(),f({type:6})}})),[f,P]),A=(0,b.useCallback)((()=>{f({type:16})}),[f]),R=(0,b.useCallback)((()=>{f({type:18})}),[f]),N=(0,b.useCallback)((()=>{f({type:17})}),[f]),L=(0,b.useCallback)((e=>{f({type:19,highlightedIndex:e})}),[f]),F=(0,b.useCallback)((e=>{f({type:20,selectedItem:e})}),[f]),j=(0,b.useCallback)((()=>{f({type:22})}),[f]),B=(0,b.useCallback)((e=>{f({type:21,inputValue:e})}),[f]),z=(0,b.useCallback)((e=>({id:E.labelId,htmlFor:E.toggleButtonId,...e})),[E]),V=(0,b.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",onKeyDown:o,onBlur:i,ref:a,...s}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;const u=C.current.state;return I("getMenuProps",l,r,y),{[r]:GS(a,(e=>{y.current=e})),id:E.menuId,role:"listbox","aria-labelledby":E.labelId,tabIndex:-1,...u.isOpen&&u.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(u.highlightedIndex)},onMouseLeave:KS(n,(()=>{f({type:9})})),onKeyDown:KS(o,(e=>{const t=JS(e);t&&D[t]?D[t](e):dC(t)&&f({type:7,key:t,getItemNodeFromIndex:P})})),onBlur:KS(i,(()=>{if(!1===_.current)return void(_.current=!0);!M.current.isMouseDown&&f({type:8})})),...s}}),[f,C,D,M,I,E,P]),H=(0,b.useCallback)((function(e,t){let{onClick:n,onKeyDown:r,refKey:o="ref",ref:i,...a}=void 0===e?{}:e,{suppressRefError:s=!1}=void 0===t?{}:t;const l=()=>{f({type:12})},u=e=>{const t=JS(e);t&&T[t]?T[t](e):dC(t)&&f({type:15,key:t,getItemNodeFromIndex:P})},c={[o]:GS(i,(e=>{g.current=e})),id:E.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":C.current.state.isOpen,"aria-labelledby":`${E.labelId} ${E.toggleButtonId}`,...a};return a.disabled||(c.onClick=KS(n,l),c.onKeyDown=KS(r,u)),I("getToggleButtonProps",s,o,g),c}),[f,C,T,I,E,P]),W=(0,b.useCallback)((function(e){let{item:t,index:n,onMouseMove:r,onClick:o,refKey:i="ref",ref:a,disabled:s,...l}=void 0===e?{}:e;const{state:u,props:c}=C.current,d=()=>{f({type:11,index:n})},p=cC(n,t,c.items);if(p<0)throw new Error("Pass either item or item index in getItemProps!");const h={disabled:s,role:"option","aria-selected":`${p===u.highlightedIndex}`,id:E.getItemId(p),[i]:GS(a,(e=>{e&&(w.current[E.getItemId(p)]=e)})),...l};return s||(h.onClick=KS(o,d)),h.onMouseMove=KS(r,(()=>{n!==u.highlightedIndex&&(O.current=!1,f({type:10,index:n,disabled:s}))})),h}),[f,C,O,E]);return{getToggleButtonProps:H,getLabelProps:z,getMenuProps:V,getItemProps:W,toggleMenu:A,openMenu:N,closeMenu:R,setHighlightedIndex:L,selectItem:F,reset:j,setInputValue:B,highlightedIndex:h,isOpen:p,selectedItem:m,inputValue:v}}DC.stateChangeTypes=IC;LS().array.isRequired,LS().func,LS().func,LS().func,LS().bool,LS().number,LS().number,LS().number,LS().bool,LS().bool,LS().bool,LS().any,LS().any,LS().any,LS().string,LS().string,LS().string,LS().string,LS().string,LS().string,LS().func,LS().string,LS().string,LS().func,LS().func,LS().func,LS().func,LS().func,LS().func,LS().shape({addEventListener:LS().func,removeEventListener:LS().func,document:LS().shape({getElementById:LS().func,activeElement:LS().any,body:LS().any})});LS().array,LS().array,LS().array,LS().func,LS().func,LS().func,LS().number,LS().number,LS().number,LS().func,LS().func,LS().string,LS().string,LS().shape({addEventListener:LS().func,removeEventListener:LS().func,document:LS().shape({getElementById:LS().func,activeElement:LS().any,body:LS().any})});const AC=e=>null==e?void 0:e.name,RC=(e,t)=>{let{selectedItem:n}=e,{type:r,changes:o,props:{items:i}}=t;switch(r){case DC.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:i[n?Math.min(i.indexOf(n)+1,i.length-1):0]};case DC.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:i[n?Math.max(i.indexOf(n)-1,0):i.length-1]};default:return o}};function NC(e){var t;let{__next36pxDefaultSize:n=!1,className:r,hideLabelFromVision:o,label:i,describedBy:l,options:u,onChange:f,value:p}=e;const{getLabelProps:h,getToggleButtonProps:m,getMenuProps:v,getItemProps:g,isOpen:y,highlightedIndex:b,selectedItem:w}=DC({initialSelectedItem:u[0],items:u,itemToString:AC,onSelectedItemChange:f,...null!=p?{selectedItem:p}:void 0,stateReducer:RC});const _=v({className:"components-custom-select-control__menu","aria-hidden":!y}),x=(0,s.useCallback)((e=>{var t;e.stopPropagation(),null==_||null===(t=_.onKeyDown)||void 0===t||t.call(_,e)}),[_]);return null!==(t=_["aria-activedescendant"])&&void 0!==t&&t.startsWith("downshift-null")&&delete _["aria-activedescendant"],(0,s.createElement)("div",{className:c()("components-custom-select-control",r)},o?(0,s.createElement)(Wn,a({as:"label"},h()),i):(0,s.createElement)("label",h({className:"components-custom-select-control__label"}),i),(0,s.createElement)($n,m({"aria-label":i,"aria-labelledby":void 0,className:c()("components-custom-select-control__button",{"is-next-36px-default-size":n}),isSmall:!n,describedBy:l||(w?(0,d.sprintf)((0,d.__)("Currently selected: %s"),w.name):(0,d.__)("No selection"))}),AC(w),(0,s.createElement)(wg,{icon:_g,className:c()("components-custom-select-control__button-icon",{"is-next-36px-default-size":n}),size:18})),(0,s.createElement)("ul",a({},_,{onKeyDown:x}),y&&u.map(((e,t)=>(0,s.createElement)("li",g({item:e,index:t,key:e.key,className:c()(e.className,"components-custom-select-control__item",{"is-highlighted":t===b,"has-hint":!!e.__experimentalHint,"is-next-36px-default-size":n}),style:e.style}),e.name,e.__experimentalHint&&(0,s.createElement)("span",{className:"components-custom-select-control__item-hint"},e.__experimentalHint),e===w&&(0,s.createElement)(wg,{icon:o_,className:"components-custom-select-control__item-icon"}))))))}n(4185);var LC=n(6292),FC=n.n(LC),jC=n(6302);const BC="dddd, LL";function zC(e){let{day:t,events:n=[]}=e;const r=(0,s.useRef)();return(0,s.useEffect)((()=>{var e;if(null==r||null===(e=r.current)||void 0===e||!e.parentNode)return;const{parentNode:o}=r.current,i=FC()(t).format(BC);if(!n.length)return void o.setAttribute("aria-label",i);const a=(0,d.sprintf)((0,d._n)("%1$s. There is %2$d event.","%1$s. There are %2$d events.",n.length),i,n.length);o.setAttribute("aria-label",a)}),[n.length]),(0,s.createElement)("div",{ref:r,className:c()("components-datetime__date__day",{"has-events":null==n?void 0:n.length})},t.format("D"))}var VC=function(e){let{currentDate:t,onChange:n,events:r,isInvalidDate:o,onMonthPreviewed:i}=e;const a=(0,s.useRef)(),l=e=>{null==i||i(e.toISOString()),u()},u=()=>{if(!a.current)return;const{ownerDocument:e}=a.current,{activeElement:t}=e;if(!t||!a.current.contains(e.activeElement)){const e=a.current.querySelector(".DayPicker_focusRegion");if(!e)return;e.focus()}},c=e=>null!=r&&r.length?r.filter((t=>e.isSame(t.date,"day"))):[],f=(e=>null===e?null:e?FC()(e):FC()())(t);return(0,s.createElement)("div",{className:"components-datetime__date",ref:a},(0,s.createElement)(jC.Z,{date:f,daySize:30,focused:!0,hideKeyboardShortcutsPanel:!0,key:`datepicker-controller-${f?f.format("MM-YYYY"):"null"}`,noBorder:!0,numberOfMonths:1,onDateChange:e=>{const r=t?FC()(t):FC()(),o={hours:r.hours(),minutes:r.minutes(),seconds:0};n(e.set(o).format("YYYY-MM-DDTHH:mm:ss")),u()},transitionDuration:0,weekDayFormat:"ddd",dayAriaLabelFormat:BC,isRTL:(0,d.isRTL)(),isOutsideRange:e=>o&&o(e.toDate()),onPrevMonthClick:l,onNextMonthClick:l,renderDayContents:e=>(0,s.createElement)(zC,{day:e,events:c(e)})}))},HC=window.wp.date;var WC=()=>{const{timezone:e}=(0,HC.__experimentalGetSettings)(),t=(new Date).getTimezoneOffset()/60*-1;if(Number(e.offset)===t)return null;const n=e.offset>=0?"+":"",r=""!==e.abbr&&isNaN(e.abbr)?e.abbr:`UTC${n}${e.offset}`,o="UTC"===e.string?(0,d.__)("Coordinated Universal Time"):`(${r}) ${e.string.replace("_"," ")}`;return(0,s.createElement)(Ur,{position:"top center",text:o},(0,s.createElement)("div",{className:"components-datetime__timezone"},r))};function UC(e,t){return t?(e%12+12)%24:e%12}function $C(e){let{as:t,value:n,onUpdate:r,className:o,...i}=e;return(0,s.createElement)(t||"input",{key:n,defaultValue:n,onBlur:function(e){const{target:t}=e;if(n===t.value)return;const o=parseInt(t.value,10);!(0,l.isInteger)(o)||void 0!==i.max&&o>i.max||void 0!==i.min&&oFC()(n).startOf("minutes")));(0,s.useEffect)((()=>{i(n?FC()(n).startOf("minutes"):FC()())}),[n]);const{day:a,month:l,year:u,minutes:f,hours:p,am:h}=(0,s.useMemo)((()=>({day:o.format("DD"),month:o.format("MM"),year:o.format("YYYY"),minutes:o.format("mm"),hours:o.format(t?"hh":"HH"),am:o.format("H")<=11?"AM":"PM"})),[o,t]);function m(e){i(e),r(e.format("YYYY-MM-DDTHH:mm:ss"))}function v(e,n){let r=n;"hours"===e&&t&&(r=UC(n,"PM"===h));m(o.clone()[e](r))}function g(e){return()=>{if(h===e)return;const t=parseInt(p,10);m(o.clone().hours(UC(t,"PM"===e)))}}const y=(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-day"},(0,s.createElement)($C,{"aria-label":(0,d.__)("Day"),className:"components-datetime__time-field-day-input",type:"number",name:"date",value:a,step:1,min:1,max:31,onUpdate:v})),b=(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-month"},(0,s.createElement)($C,{as:"select","aria-label":(0,d.__)("Month"),className:"components-datetime__time-field-month-select",name:"month",value:l,onUpdate:(e,t)=>v(e,t-1)},(0,s.createElement)("option",{value:"01"},(0,d.__)("January")),(0,s.createElement)("option",{value:"02"},(0,d.__)("February")),(0,s.createElement)("option",{value:"03"},(0,d.__)("March")),(0,s.createElement)("option",{value:"04"},(0,d.__)("April")),(0,s.createElement)("option",{value:"05"},(0,d.__)("May")),(0,s.createElement)("option",{value:"06"},(0,d.__)("June")),(0,s.createElement)("option",{value:"07"},(0,d.__)("July")),(0,s.createElement)("option",{value:"08"},(0,d.__)("August")),(0,s.createElement)("option",{value:"09"},(0,d.__)("September")),(0,s.createElement)("option",{value:"10"},(0,d.__)("October")),(0,s.createElement)("option",{value:"11"},(0,d.__)("November")),(0,s.createElement)("option",{value:"12"},(0,d.__)("December")))),w=t?(0,s.createElement)(s.Fragment,null,b,y):(0,s.createElement)(s.Fragment,null,y,b);return(0,s.createElement)("div",{className:c()("components-datetime__time")},(0,s.createElement)("fieldset",null,(0,s.createElement)("legend",{className:"components-datetime__time-legend invisible"},(0,d.__)("Date")),(0,s.createElement)("div",{className:"components-datetime__time-wrapper"},w,(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-year"},(0,s.createElement)($C,{"aria-label":(0,d.__)("Year"),className:"components-datetime__time-field-year-input",type:"number",name:"year",step:1,min:0,max:9999,value:u,onUpdate:v})))),(0,s.createElement)("fieldset",null,(0,s.createElement)("legend",{className:"components-datetime__time-legend invisible"},(0,d.__)("Time")),(0,s.createElement)("div",{className:"components-datetime__time-wrapper"},(0,s.createElement)("div",{className:"components-datetime__time-field components-datetime__time-field-time"},(0,s.createElement)($C,{"aria-label":(0,d.__)("Hours"),className:"components-datetime__time-field-hours-input",type:"number",name:"hours",step:1,min:t?1:0,max:t?12:23,value:p,onUpdate:v}),(0,s.createElement)("span",{className:"components-datetime__time-separator","aria-hidden":"true"},":"),(0,s.createElement)($C,{"aria-label":(0,d.__)("Minutes"),className:"components-datetime__time-field-minutes-input",type:"number",name:"minutes",step:1,min:0,max:59,value:f,onUpdate:v})),t&&(0,s.createElement)(Zx,{className:"components-datetime__time-field components-datetime__time-field-am-pm"},(0,s.createElement)($n,{variant:"AM"===h?"primary":"secondary",onClick:g("AM"),className:"components-datetime__time-am-button"},(0,d.__)("AM")),(0,s.createElement)($n,{variant:"PM"===h?"primary":"secondary",onClick:g("PM"),className:"components-datetime__time-pm-button"},(0,d.__)("PM"))),(0,s.createElement)(WC,null))))};var GC=(0,s.forwardRef)((function(e,t){let{currentDate:n,is12Hour:r,isInvalidDate:o,onMonthPreviewed:i=l.noop,onChange:a,events:u}=e;const[c,f]=(0,s.useState)(!1);return(0,s.createElement)("div",{ref:t,className:"components-datetime"},!c&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(KC,{currentTime:n,onChange:a,is12Hour:r}),(0,s.createElement)(VC,{currentDate:n,onChange:a,isInvalidDate:o,events:u,onMonthPreviewed:i})),c&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"components-datetime__calendar-help"},(0,s.createElement)("h4",null,(0,d.__)("Click to Select")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,d.__)("Click the right or left arrows to select other months in the past or the future.")),(0,s.createElement)("li",null,(0,d.__)("Click the desired day to select it."))),(0,s.createElement)("h4",null,(0,d.__)("Navigating with a keyboard")),(0,s.createElement)("ul",null,(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d._x)("Enter","keyboard button")},"↵")," ",(0,s.createElement)("span",null,(0,d.__)("Select the date in focus."))),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Left and Right Arrows")},"←/→")," ",(0,d.__)("Move backward (left) or forward (right) by one day.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Up and Down Arrows")},"↑/↓")," ",(0,d.__)("Move backward (up) or forward (down) by one week.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Page Up and Page Down")},(0,d.__)("PgUp/PgDn"))," ",(0,d.__)("Move backward (PgUp) or forward (PgDn) by one month.")),(0,s.createElement)("li",null,(0,s.createElement)("abbr",{"aria-label":(0,d.__)("Home and End")},(0,d.__)("Home/End"))," ",(0,d.__)("Go to the first (Home) or last (End) day of a week."))))),(0,s.createElement)("div",{className:"components-datetime__buttons"},!c&&n&&(0,s.createElement)($n,{className:"components-datetime__date-reset-button",variant:"link",onClick:()=>a(null)},(0,d.__)("Reset")),(0,s.createElement)($n,{className:"components-datetime__date-help-toggle",variant:"link",onClick:function(){f(!c)}},c?(0,d.__)("Close"):(0,d.__)("Calendar Help"))))}));var qC=[{name:(0,d._x)("None","Size of a UI element"),slug:"none"},{name:(0,d._x)("Small","Size of a UI element"),slug:"small"},{name:(0,d._x)("Medium","Size of a UI element"),slug:"medium"},{name:(0,d._x)("Large","Size of a UI element"),slug:"large"},{name:(0,d._x)("Extra Large","Size of a UI element"),slug:"xlarge"}];var YC=function(e){const{label:t,value:n,sizes:r=qC,icon:o,onChange:i,className:a=""}=e,u=(0,s.createElement)(s.Fragment,null,o&&(0,s.createElement)(He,{icon:o}),t);return(0,s.createElement)(Sg,{className:c()(a,"block-editor-dimension-control"),label:u,hideLabelFromVision:!1,value:n,onChange:e=>{const t=((e,t)=>e.find((e=>t===e.slug)))(r,e);t&&n!==t.slug?(0,l.isFunction)(i)&&i(t.slug):i(void 0)},options:(e=>{const t=e.map((e=>{let{name:t,slug:n}=e;return{label:t,value:n}}));return[{label:(0,d.__)("Default"),value:""}].concat(t)})(r)})};const XC=zn("div",{target:"e1ac3xxk0"})({name:"u2jump",styles:"position:relative;pointer-events:none;&::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;}*{pointer-events:none;}"}),ZC=(0,s.createContext)(!1),{Consumer:JC,Provider:QC}=ZC,eP=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];function tP(e){let{className:t,children:n,isDisabled:r=!0,...o}=e;const i=(0,s.useRef)(null),u=()=>{i.current&&Re.focus.focusable.find(i.current).forEach((e=>{(0,l.includes)(eP,e.nodeName)&&e.setAttribute("disabled",""),"A"===e.nodeName&&e.setAttribute("tabindex","-1");const t=e.getAttribute("tabindex");null!==t&&"-1"!==t&&e.removeAttribute("tabindex"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},d=(0,s.useCallback)((0,l.debounce)(u,void 0,{leading:!0}),[]);return(0,s.useLayoutEffect)((()=>{if(!r)return;let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}}),[]),r?(0,s.createElement)(QC,{value:!0},(0,s.createElement)(XC,a({ref:i,className:c()(t,"components-disabled")},o),n)):(0,s.createElement)(QC,{value:!1},n)}tP.Context=ZC,tP.Consumer=JC;var nP=tP;const rP="is-dragging-components-draggable";function oP(e){let{children:t,onDragStart:n,onDragOver:r,onDragEnd:o,cloneClassname:i,elementId:a,transferData:u,__experimentalTransferDataType:c="text",__experimentalDragComponent:d}=e;const f=(0,s.useRef)(null),p=(0,s.useRef)((()=>{}));return(0,s.useEffect)((()=>()=>{p.current()}),[]),(0,s.createElement)(s.Fragment,null,t({onDraggableStart:function(e){const{ownerDocument:t}=e.target;e.dataTransfer.setData(c,JSON.stringify(u));const o=t.createElement("div");o.style.top=0,o.style.left=0;const s=t.createElement("div");"function"==typeof e.dataTransfer.setDragImage&&(s.classList.add("components-draggable__invisible-drag-image"),t.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0)),o.classList.add("components-draggable__clone"),i&&o.classList.add(i);let d=0,h=0;if(f.current){d=e.clientX,h=e.clientY,o.style.transform=`translate( ${d}px, ${h}px )`;const n=t.createElement("div");n.innerHTML=f.current.innerHTML,o.appendChild(n),t.body.appendChild(o)}else{const e=t.getElementById(a),n=e.getBoundingClientRect(),r=e.parentNode,i=parseInt(n.top,10),s=parseInt(n.left,10);o.style.width=`${n.width+0}px`;const l=e.cloneNode(!0);l.id=`clone-${a}`,d=s-0,h=i-0,o.style.transform=`translate( ${d}px, ${h}px )`,Array.from(l.querySelectorAll("iframe")).forEach((e=>e.parentNode.removeChild(e))),o.appendChild(l),r.appendChild(o)}let m=e.clientX,v=e.clientY;const g=(0,l.throttle)((function(e){if(m===e.clientX&&v===e.clientY)return;const t=d+e.clientX-m,n=h+e.clientY-v;o.style.transform=`translate( ${t}px, ${n}px )`,m=e.clientX,v=e.clientY,d=t,h=n,r&&r(e)}),16);let y;t.addEventListener("dragover",g),t.body.classList.add(rP),e.persist(),n&&(y=setTimeout((()=>n(e)))),p.current=()=>{o&&o.parentNode&&o.parentNode.removeChild(o),s&&s.parentNode&&s.parentNode.removeChild(s),t.body.classList.remove(rP),t.removeEventListener("dragover",g),clearTimeout(y)}},onDraggableEnd:function(e){e.preventDefault(),p.current(),o&&o(e)}}),d&&(0,s.createElement)("div",{className:"components-draggable-drag-component-root",style:{display:"none"},ref:f},d))}var iP=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));function aP(){var e=(0,b.useRef)(!1);return Qi((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var sP=function(e){var t=e.children,n=e.initial,r=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=pa(lP),l=vl(),u=(0,b.useMemo)((function(){return{id:l,initial:n,isPresent:r,custom:i,onExitComplete:function(e){var t,n;s.set(e,!0);try{for(var r=zi(s.values()),i=r.next();!i.done;i=r.next()){if(!i.value)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}null==o||o()},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),a?void 0:[r]);return(0,b.useMemo)((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[r]),b.useEffect((function(){!r&&!s.size&&(null==o||o())}),[r]),b.createElement(Zi.Provider,{value:u},t)};function lP(){return new Map}var uP=function(e){return e.key||""};var cP=function(e){var t=e.children,n=e.custom,r=e.initial,o=void 0===r||r,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=void 0===s||s,u=Vi(function(){var e=aP(),t=Vi((0,b.useState)(0),2),n=t[0],r=t[1],o=(0,b.useCallback)((function(){e.current&&r(n+1)}),[n]);return[(0,b.useCallback)((function(){return Wu.postRender(o)}),[o]),n]}(),1),c=u[0],d=(0,b.useContext)(va).forceRender;d&&(c=d);var f=aP(),p=function(e){var t=[];return b.Children.forEach(e,(function(e){(0,b.isValidElement)(e)&&t.push(e)})),t}(t),h=p,m=new Set,v=(0,b.useRef)(h),g=(0,b.useRef)(new Map).current,y=(0,b.useRef)(!0);if(Qi((function(){y.current=!1,function(e,t){e.forEach((function(e){var n=uP(e);t.set(n,e)}))}(p,g),v.current=h})),el((function(){y.current=!0,g.clear(),m.clear()})),y.current)return b.createElement(b.Fragment,null,h.map((function(e){return b.createElement(sP,{key:uP(e),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:l},e)})));h=Hi([],Vi(h),!1);for(var w=v.current.map(uP),_=p.map(uP),x=w.length,E=0;E1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),b.createElement(b.Fragment,null,m.size?h:h.map((function(e){return(0,b.cloneElement)(e)})))};function dP(e){let{className:t,label:n,onFilesDrop:r,onHTMLDrop:o,onDrop:i}=e;const[a,u]=(0,s.useState)(),[p,h]=(0,s.useState)(),[m,v]=(0,s.useState)(),g=(0,f.__experimentalUseDropZone)({onDrop(e){const t=(0,Re.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n&&o?o(n):t.length&&r?r(t):i&&i(e)},onDragStart(e){u(!0);let t="default";(0,l.includes)(e.dataTransfer.types,"text/html")?t="html":((0,l.includes)(e.dataTransfer.types,"Files")||(0,Re.getFilesFromDataTransfer)(e.dataTransfer).length>0)&&(t="file"),v(t)},onDragEnd(){u(!1),v()},onDragEnter(){h(!0)},onDragLeave(){h(!1)}}),y=(0,f.useReducedMotion)();let b;const w={hidden:{scaleY:0,opacity:0},show:{scaleY:1,opacity:1,transition:{type:"tween",duration:.2,delay:.1,delayChildren:.2}},exit:{scaleY:1,opacity:0,transition:{duration:.3,delayChildren:0}}},_={hidden:{opacity:0,scale:.75},show:{opacity:1,scale:1},exit:{opacity:0,scale:.9}};p&&(b=(0,s.createElement)(lp.div,{variants:w,initial:y?"show":"hidden",animate:"show",exit:y?"show":"exit",className:"components-drop-zone__content"},(0,s.createElement)(lp.div,{variants:_},(0,s.createElement)(wg,{icon:iP,className:"components-drop-zone__content-icon"}),(0,s.createElement)("span",{className:"components-drop-zone__content-text"},n||(0,d.__)("Drop files to upload")))));const x=c()("components-drop-zone",t,{"is-active":(a||p)&&("file"===m&&r||"html"===m&&o||"default"===m&&i),"is-dragging-over-document":a,"is-dragging-over-element":p,[`is-dragging-${m}`]:!!m});return(0,s.createElement)("div",{ref:g,className:x},y?b:(0,s.createElement)(cP,null,b))}function fP(e){let{children:t}=e;return ze()("wp.components.DropZoneProvider",{since:"5.8",hint:"wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code."}),t}var pP=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}));var hP=function(e){let{fill:t}=e;return t?(0,s.createElement)("span",{className:"components-swatch",style:{background:t}}):(0,s.createElement)(He,{icon:pP})};function mP(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"90deg";const n=100/e.length,r=e.map(((e,t)=>`${e} ${t*n}%, ${e} ${(t+1)*n}%`)).join(", ");return`linear-gradient( ${t}, ${r} )`}Co([Po]);var vP=function(e){let{values:t}=e;return(0,s.createElement)(hP,{fill:t&&mP(t,"135deg")})};function gP(e){let{label:t,value:n,colors:r,disableCustomColors:o,enableAlpha:i,onChange:a}=e;const[l,u]=(0,s.useState)(!1);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)($n,{className:"components-color-list-picker__swatch-button",icon:(0,s.createElement)(hP,{fill:n}),onClick:()=>u((e=>!e))},t),l&&(0,s.createElement)(p_,{className:"components-color-list-picker__color-picker",colors:r,value:n,clearable:!1,onChange:a,disableCustomColors:o,enableAlpha:i}))}var yP=function(e){let{colors:t,labels:n,value:r=[],disableCustomColors:o,enableAlpha:i,onChange:a}=e;return(0,s.createElement)("div",{className:"components-color-list-picker"},n.map(((e,n)=>(0,s.createElement)(gP,{key:n,label:e,value:r[n],colors:t,disableCustomColors:o,enableAlpha:i,onChange:e=>{const t=r.slice();t[n]=e,a(t)}}))))};const bP=["#333","#CCC"];function wP(e){let{value:t,onChange:n}=e;const r=!!t,o=r?t:bP,i=mP(o),a=(l=o).map(((e,t)=>({position:100*t/(l.length-1),color:e})));var l;return(0,s.createElement)(Pk,{disableInserter:!0,background:i,hasGradient:r,value:a,onChange:e=>{const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>{let{color:t}=e;return t}))}(e);n(t)}})}var _P=function(e){let{clearable:t=!0,colorPalette:n,duotonePalette:r,disableCustomColors:o,disableCustomDuotone:i,value:a,onChange:u}=e;const[c,f]=(0,s.useMemo)((()=>{return!(e=n)||e.length<2?["#000","#fff"]:e.map((e=>{let{color:t}=e;return{color:t,brightness:ko(t).brightness()}})).reduce(((e,t)=>{let[n,r]=e;return[t.brightness<=n.brightness?t:n,t.brightness>=r.brightness?t:r]}),[{brightness:1},{brightness:0}]).map((e=>{let{color:t}=e;return t}));var e}),[n]);return(0,s.createElement)(i_,{options:r.map((e=>{let{colors:t,slug:n,name:r}=e;const o={background:mP(t,"135deg"),color:"transparent"},i=null!=r?r:(0,d.sprintf)((0,d.__)("Duotone code: %s"),n),c=r?(0,d.sprintf)((0,d.__)("Duotone: %s"),r):i,f=(0,l.isEqual)(t,a);return(0,s.createElement)(i_.Option,{key:n,value:t,isSelected:f,"aria-label":c,tooltipText:i,style:o,onClick:()=>{u(f?void 0:t)}})})),actions:!!t&&(0,s.createElement)(i_.ButtonAction,{onClick:()=>u(void 0)},(0,d.__)("Clear"))},!o&&!i&&(0,s.createElement)(wP,{value:a,onChange:u}),!i&&(0,s.createElement)(yP,{labels:[(0,d.__)("Shadows"),(0,d.__)("Highlights")],colors:n,value:a,disableCustomColors:o,enableAlpha:!0,onChange:e=>{e[0]||(e[0]=c),e[1]||(e[1]=f);const t=e.length>=2?e:void 0;u(t)}}))};var xP=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));const EP=zn(wg,{target:"etxm6pv0"})({name:"rvs7bx",styles:"width:1em;height:1em;margin:0;vertical-align:middle;fill:currentColor"});var kP=(0,s.forwardRef)((function(e,t){let{href:n,children:r,className:o,rel:i="",...u}=e;i=(0,l.uniq)((0,l.compact)([...i.split(" "),"external","noreferrer","noopener"])).join(" ");const f=c()("components-external-link",o);return(0,s.createElement)("a",a({},u,{className:f,href:n,target:"_blank",rel:i,ref:t}),r,(0,s.createElement)(Wn,{as:"span"},(0,d.__)("(opens in a new tab)")),(0,s.createElement)(EP,{icon:xP,className:"components-external-link__icon"}))})),SP=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place"],CP=([].concat(SP,["size"]),SP),PP=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal"],OP=[].concat(PP,["hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_initialFocusRef","unstable_finalFocusRef","unstable_orphan","unstable_autoFocusOnShow","unstable_autoFocusOnHide"]),MP=PP,IP=V({name:"Button",compose:me,keys:[],useProps:function(e,t){var n=t.ref,r=v(t,["ref"]),o=(0,b.useRef)(null),i=(0,b.useState)(void 0),a=i[0],s=i[1],l=(0,b.useState)("button"),u=l[0],c=l[1];return(0,b.useEffect)((function(){var e=o.current;e&&(te(e)||("A"!==e.tagName&&s("button"),c(void 0)))}),[]),m({ref:W(o,n),role:a,type:u},r)}}),TP=(B({as:"button",memo:!0,useHook:IP}),V({name:"Disclosure",compose:IP,keys:Vb,useProps:function(e,t){var n=t.onClick,r=t["aria-controls"],o=v(t,["onClick","aria-controls"]),i=q(n),a=r?r+" "+e.baseId:e.baseId,s=(0,b.useCallback)((function(t){var n,r;null===(n=i.current)||void 0===n||n.call(i,t),t.defaultPrevented||null===(r=e.toggle)||void 0===r||r.call(e)}),[e.toggle]);return m({"aria-expanded":!!e.visible,"aria-controls":a,onClick:s},o)}})),DP=(B({as:"button",memo:!0,useHook:TP}),V({name:"DialogDisclosure",compose:TP,keys:MP,useProps:function(e,t){var n=t.ref,r=t.onClick,o=v(t,["ref","onClick"]),i=(0,b.useRef)(null),a=q(r),s=(0,b.useState)(!1),l=s[0],u=s[1],c=e.unstable_disclosureRef;G((function(){var t=i.current;c&&!c.current&&(c.current=t);var n=!(null!=c&&c.current)||c.current===t;u(!!e.visible&&n)}),[e.visible,c]);var d=(0,b.useCallback)((function(e){var t;null===(t=a.current)||void 0===t||t.call(a,e),e.defaultPrevented||c&&(c.current=e.currentTarget)}),[c]);return m({ref:W(i,n),"aria-haspopup":"dialog","aria-expanded":l,onClick:d},o)}})),AP=(B({as:"button",memo:!0,useHook:DP}),V({name:"PopoverDisclosure",compose:DP,keys:CP,useProps:function(e,t){var n=t.ref,r=v(t,["ref"]);return m({ref:W(e.unstable_referenceRef,n)},r)}})),RP=B({as:"button",memo:!0,useHook:AP});const NP=(0,s.createContext)({});var LP=n(235),FP=n.n(LP);function jP(e,t){var n=(0,b.useRef)(!1);(0,b.useEffect)((function(){if(n.current)return e();n.current=!0}),t)}function BP(e,t){var n=e.indexOf(t);return function(e,t){return-1===t?e:[].concat(e.slice(0,t),e.slice(t+1))}(e,n)}var zP=(0,b.createContext)(null);var VP=!1;if("undefined"!=typeof window){var HP={get passive(){VP=!0}};window.addEventListener("testPassive",null,HP),window.removeEventListener("testPassive",null,HP)}var WP="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),UP=[],$P=!1,KP=-1,GP=void 0,qP=void 0,YP=function(e){return UP.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},XP=function(e){var t=e||window.event;return!!YP(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},ZP=function(){void 0!==qP&&(document.body.style.paddingRight=qP,qP=void 0),void 0!==GP&&(document.body.style.overflow=GP,GP=void 0)},JP=function(e,t){if(e){if(!UP.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};UP=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?XP(e):e.stopPropagation())}(t,e)},$P||(document.addEventListener("touchmove",XP,VP?{passive:!1}:void 0),$P=!0)):function(e){if(void 0===qP){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(qP=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===GP&&(GP=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")};var QP=(0,b.createContext)(void 0);function eO(e,t){var n=Boolean(t.preventBodyScroll&&t.visible);(0,b.useEffect)((function(){var t=e.current;if(t&&n)return JP(t,{reserveScrollBarGap:!0}),function(){var e;(e=t)?(UP=UP.filter((function(t){return t.targetElement!==e})),WP?(e.ontouchstart=null,e.ontouchmove=null,$P&&0===UP.length&&(document.removeEventListener("touchmove",XP,VP?{passive:!1}:void 0),$P=!1)):UP.length||ZP()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}}),[e,n])}function tO(e,t){var n=(0,b.useRef)(null);return(0,b.useEffect)((function(){var r=e.current;r&&t.visible&&(n.current=function(e,t){if("closest"in e)return e.closest(t);do{if(re(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}(r,Gb.__selector))}),[e,t.visible]),n}function nO(e){null!=e.parentNode&&e.parentNode.removeChild(e)}var rO="__reakit-focus-trap";function oO(e,t,n){var r=tO(e,n),o=n.visible&&n.modal,i=(0,b.useRef)(null),a=(0,b.useRef)(null);(0,b.useEffect)((function(){if(o){var e=r.current;if(e){if(!i.current){var t=U(e);i.current=t.createElement("div"),i.current.className=rO,i.current.tabIndex=0,i.current.style.position="fixed",i.current.setAttribute("aria-hidden","true")}return a.current||(a.current=i.current.cloneNode()),e.insertAdjacentElement("beforebegin",i.current),e.insertAdjacentElement("afterend",a.current),function(){i.current&&nO(i.current),a.current&&nO(a.current)}}}}),[r,o]),(0,b.useEffect)((function(){var n=i.current,r=a.current;if(o&&n&&r){var s=function(n){var o=e.current;if(o&&!t.length){n.preventDefault();var i=n.target===r?le(o):function(e,t){var n=se(e,t);return n[n.length-1]||null}(o);i?i.focus():o.focus()}};return n.addEventListener("focus",s),r.addEventListener("focus",s),function(){n.removeEventListener("focus",s),r.removeEventListener("focus",s)}}}),[e,t,o])}function iO(e,t,n){var r=n.unstable_autoFocusOnHide&&!n.visible,o=!(!n.animated||!n.animating);jP((function(){var i;if(r&&!o&&!function(e){var t=e.current;if(!t)return!1;var n=X(t);return!(!n||Z(t,n)||!ae(n)&&"true"!==n.getAttribute("data-dialog"))}(e)){var a=(null===(i=n.unstable_finalFocusRef)||void 0===i?void 0:i.current)||t.current;if(a){if(a.id){var s=U(a).querySelector("[aria-activedescendant='"+a.id+"']");if(s)return void Se(s)}Se(a)}else;}}),[r,o,e,t])}var aO=(0,b.createContext)({});function sO(e,t,n,r,o,i,a){var s=q(o);(0,b.useEffect)((function(){if(i){var o=function(r){if(s.current){var o,i=e.current,a=t.current,l=r.target;if(i)if(function(e){var t=U(e);return"HTML"===e.tagName||Z(t.body,e)}(l))if(!Z(i,l))if(!a||!function(e,t){return Z(t,e)}(l,a))if(!(null===(o=l.classList)||void 0===o?void 0:o.contains(rO))&&!n.some(function(e){return function(t){var n=t.current;if(!n)return!1;if(Z(n,e))return!0;var r=U(n).querySelector('[data-dialog-ref="'+n.id+'"]');return!!r&&Z(r,e)}}(l)))s.current(r)}},l=U(e.current);return l.addEventListener(r,o,a),function(){return l.removeEventListener(r,o,a)}}}),[e,t,n,r,i,s])}function lO(e,t,n,r){var o=function(e,t){var n=(0,b.useRef)();return(0,b.useEffect)((function(){if(t.visible&&t.hideOnClickOutside){var r=U(e.current),o=function(e){n.current=e.target};return r.addEventListener("mousedown",o),function(){return r.removeEventListener("mousedown",o)}}}),[t.visible,t.hideOnClickOutside,e]),n}(e,r);sO(e,t,n,"click",(function(e){var t;o.current===e.target&&(null===(t=r.hide)||void 0===t||t.call(r))}),r.visible&&r.hideOnClickOutside),sO(e,t,n,"focusin",(function(t){var n,o=U(e.current);t.target!==o&&t.target!==o.body&&(null===(n=r.hide)||void 0===n||n.call(r))}),r.visible&&r.hideOnClickOutside)}function uO(e,t){(0,b.useEffect)((function(){var n=e.current;if(t.visible&&n){var r=new MutationObserver((function(e){if(e[0].target===n){var t,r=U(n),o=X(n);o!==r.body&&(t=o,Array.isArray(t)?t.length:A(t)?Object.keys(t).length:null!=t&&""!==t)||n.focus()}}));return r.observe(n,{childList:!0,subtree:!0}),function(){r.disconnect()}}}),[t.visible,e])}function cO(e){return e&&e.tagName&&"HTML"!==e.tagName&&e!==U(e).body}var dO=V({name:"Dialog",compose:Hb,keys:OP,useOptions:function(e){var t=e.modal,n=void 0===t||t,r=e.hideOnEsc,o=void 0===r||r,i=e.hideOnClickOutside,a=void 0===i||i,s=e.preventBodyScroll,l=void 0===s?n:s,u=e.unstable_autoFocusOnShow,c=void 0===u||u,d=e.unstable_autoFocusOnHide,f=void 0===d||d,p=e.unstable_orphan;return m({modal:n,hideOnEsc:o,hideOnClickOutside:a,preventBodyScroll:n&&l,unstable_autoFocusOnShow:c,unstable_autoFocusOnHide:f,unstable_orphan:n&&p},v(e,["modal","hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_autoFocusOnShow","unstable_autoFocusOnHide","unstable_orphan"]))},useProps:function(e,t){var n=t.ref,r=t.onKeyDown,o=t.onBlur,i=t.wrapElement,a=t.tabIndex,s=v(t,["ref","onKeyDown","onBlur","wrapElement","tabIndex"]),l=(0,b.useRef)(null),u=(0,b.useContext)(QP),c=u&&u===e.baseId,d=function(e,t){var n=(0,b.useRef)(null),r=!(!t.animated||!t.animating);return(0,b.useEffect)((function(){if(!t.visible&&!r){var o=function(e){var r=e.target;"focus"in r&&(n.current=r,t.unstable_disclosureRef&&(t.unstable_disclosureRef.current=r))},i=U(e.current);return i.addEventListener("focusin",o),function(){return i.removeEventListener("focusin",o)}}}),[t.visible,r,t.unstable_disclosureRef,e]),(0,b.useEffect)((function(){var e;if(t.visible&&!r){var o=function(e){var t=e.currentTarget;te(t)&&(e.preventDefault(),t.focus())},i=(null===(e=t.unstable_disclosureRef)||void 0===e?void 0:e.current)||n.current;return null==i||i.addEventListener("mousedown",o),function(){return null==i?void 0:i.removeEventListener("mousedown",o)}}}),[t.visible,r,t.unstable_disclosureRef]),t.unstable_disclosureRef||n}(l,e),f=q(r),p=q(o),h=function(e,t){var n=(0,b.useReducer)((function(e){return e+1}),0),r=n[0],o=n[1];return G((function(){var n=e.current;t.visible&&r&&(cO(X(n))||null==n||n.focus())}),[r,e]),(0,b.useCallback)((function(e){t.visible&&(cO(xi(e))||o())}),[t.visible])}(l,e),g=function(e,t){var n=(0,b.useContext)(aO),r=(0,b.useState)([]),o=r[0],i=r[1],a=(0,b.useState)(o),s=a[0],l=a[1],u=(0,b.useCallback)((function(e){var t;null===(t=n.addDialog)||void 0===t||t.call(n,e),i((function(t){return[].concat(t,[e])}))}),[n.addDialog]),c=(0,b.useCallback)((function(e){var t;null===(t=n.removeDialog)||void 0===t||t.call(n,e),i((function(t){return BP(t,e)}))}),[n.removeDialog]),d=(0,b.useCallback)((function(e){var t;null===(t=n.showDialog)||void 0===t||t.call(n,e),l((function(t){return[].concat(t,[e])}))}),[n.showDialog]),f=(0,b.useCallback)((function(e){var t;null===(t=n.hideDialog)||void 0===t||t.call(n,e),l((function(t){return BP(t,e)}))}),[n.hideDialog]);(0,b.useEffect)((function(){var r;if(!t.unstable_orphan)return null===(r=n.addDialog)||void 0===r||r.call(n,e),function(){var t;null===(t=n.removeDialog)||void 0===t||t.call(n,e)}}),[t.unstable_orphan,n.addDialog,e,n.removeDialog]),(0,b.useEffect)((function(){var r;if(!t.unstable_orphan&&t.modal&&t.visible)return null===(r=n.showDialog)||void 0===r||r.call(n,e),function(){var t;null===(t=n.hideDialog)||void 0===t||t.call(n,e)}}),[t.unstable_orphan,t.modal,t.visible,n.showDialog,e,n.hideDialog]),(0,b.useEffect)((function(){var e;!1===n.visible&&t.visible&&!t.unstable_orphan&&(null===(e=t.hide)||void 0===e||e.call(t))}),[n.visible,t.visible,t.hide,t.unstable_orphan]);var p=(0,b.useMemo)((function(){return{visible:t.visible,addDialog:u,removeDialog:c,showDialog:d,hideDialog:f}}),[t.visible,u,c,d,f]);return{dialogs:o,visibleModals:s,wrap:(0,b.useCallback)((function(e){return(0,b.createElement)(aO.Provider,{value:p},e)}),[p])}}(l,e),y=g.dialogs,w=g.visibleModals,_=g.wrap,x=!(!e.modal||w.length)||void 0;eO(l,e),oO(l,w,e),uO(l,e),function(e,t,n){var r=n.unstable_initialFocusRef,o=n.visible&&n.unstable_autoFocusOnShow,i=!(!n.animated||!n.animating);jP((function(){var n=e.current;if(o&&n&&!i&&!t.some((function(e){return e.current&&!e.current.hidden})))if(null!=r&&r.current)r.current.focus({preventScroll:!0});else{Se(le(n,!0)||n,{preventScroll:!0,isActive:function(){return J(n)}})}}),[e,o,i,t,r])}(l,y,e),iO(l,d,e),lO(l,d,y,e),function(e,t,n){var r=function(r){return sO(e,{current:null},t,r,(function(e){e.stopPropagation(),e.preventDefault()}),n.visible&&n.modal,!0)};r("mouseover"),r("mousemove"),r("mouseout")}(l,y,e);var E=(0,b.useCallback)((function(t){var n;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||"Escape"===t.key&&e.hideOnEsc&&e.hide&&(t.stopPropagation(),e.hide())}),[e.hideOnEsc,e.hide]),k=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),h(e)}),[h]),S=(0,b.useCallback)((function(t){return t=_(t),e.modal&&!c&&(t=(0,b.createElement)(Gb,null,t)),i&&(t=i(t)),(0,b.createElement)(zP.Provider,{value:null},t)}),[_,e.modal,c,i]);return m({ref:W(l,n),role:"dialog",tabIndex:null!=a?a:-1,"aria-modal":x,"data-dialog":!0,onKeyDown:E,onBlur:k,wrapElement:S},s)}}),fO=(B({as:"div",useHook:dO,useCreateElement:function(e,t,n){return M(e,t,n)}}),V({name:"Popover",compose:dO,keys:SP,useOptions:function(e){var t=e.modal;return m({modal:void 0!==t&&t},v(e,["modal"]))},useProps:function(e,t){var n=t.ref,r=t.style,o=v(t,["ref","style"]);return m({ref:W(e.unstable_popoverRef,n),style:m(m({},e.unstable_popoverStyles),r)},o)}}));const pO=zn(B({as:"div",useHook:fO,useCreateElement:function(e,t,n){return M(e,t,n)}}),{target:"e1vtu5161"})("z-index:",1e4,";box-sizing:border-box;opacity:0;outline:none;position:relative;transform-origin:center center;transition:opacity ",Up.transitionDurationFastest," linear;width:100%;&[data-enter]{opacity:1;}&::before,&::after{display:none;}"),hO=zn(IE,{target:"e1vtu5160"})(jE.selector,"{max-height:80vh;}");const mO=On((function(e,t){const{children:n,elevation:r,maxWidth:o,style:i={},...l}=Pn(e,"FlyoutContent"),{label:u,flyoutState:c}=(0,s.useContext)(NP);if(!c)throw new Error("`FlyoutContent` must only be used inside a `Flyout`.");const d=c.visible||c.animating;return(0,s.createElement)(pO,a({"aria-label":u,style:{maxWidth:o,...i}},l,c),d&&(0,s.createElement)(hO,{elevation:r,ref:t},n))}),"FlyoutContent");var vO=mO;const gO=On((function(e,t){const{children:n,elevation:r,label:o,maxWidth:i,onVisibleChange:l,trigger:u,flyoutState:c,...d}=function(e){const{animated:t=!0,animationDuration:n=160,baseId:r,elevation:o=5,id:i,maxWidth:a=360,placement:s,state:l,visible:u,...c}=Pn(e,"Flyout"),d=Rb({animated:t?n:void 0,baseId:r||i,placement:s,visible:u,...c}),f=l||d;return{...c,elevation:o,maxWidth:a,flyoutState:f}}(e),p=function(e){let{onResize:t}=e;const[n,r]=FP()();return(0,f.useIsomorphicLayoutEffect)((()=>{null==t||t()}),[r.width,r.height]),n}({onResize:c.unstable_update}),h=`flyout-${c.baseId}`,m=o||h,v=(0,s.useMemo)((()=>({label:m,flyoutState:c})),[m,c]),g=(0,s.useCallback)((e=>(0,s.cloneElement)(u,e)),[u]);return zm((()=>{null==l||l(c.visible)}),[c.visible]),(0,s.createElement)(NP.Provider,{value:v},u&&(0,s.createElement)(RP,a({},c,{ref:u.ref},u.props),g),(0,s.createElement)(Gb,null,(0,s.createElement)(vO,a({ref:t},d,{elevation:r,maxWidth:i}),p,n)))}),"Flyout");var yO=gO;const bO=zn("div",{target:"e11wezi78"})({name:"1g31405",styles:"background-color:transparent;box-sizing:border-box;text-align:center;width:100%"}),wO=zn("div",{target:"e11wezi77"})({name:"v0nrlz",styles:"align-items:center;box-sizing:border-box;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.2 );cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;img,video{box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}"}),_O=zn("div",{target:"e11wezi76"})("background:",Bo.lightGray[300],";box-sizing:border-box;height:170px;max-width:280px;min-width:200px;width:100%;"),xO=zn(I_,{target:"e11wezi75"})({name:"1pzk433",styles:"width:100px"}),EO=zn(Ip,{target:"e11wezi74"})({name:"ox4xcy",styles:"max-width:320px;padding:1em 0"}),kO=zn("div",{target:"e11wezi73"})("box-sizing:border-box;left:50%;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );transition:opacity 120ms linear;z-index:1;",(e=>{let{isActive:t}=e;return t&&"\n\t\topacity: 1;\n\t"}),";"),SO=zn("div",{target:"e11wezi72"})({name:"1sy4ch9",styles:"box-sizing:border-box;background:white;box-shadow:0 0 2px rgba( 0, 0, 0, 0.6 );position:absolute;opacity:0.4;transform:translateZ( 0 )"}),CO=zn(SO,{target:"e11wezi71"})({name:"1qp910y",styles:"height:1px;left:0;right:0"}),PO=zn(SO,{target:"e11wezi70"})({name:"1oz3zka",styles:"width:1px;top:0;bottom:0"}),OO={top:0,left:0,bottom:0,right:0,width:0,height:0},MO=["avi","mpg","mpeg","mov","mp4","m4v","ogg","ogv","webm","wmv"];function IO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(".");return t[t.length-1]}function TO(e){return Math.round(100*e)}function DO(e){let{onChange:t=l.noop,percentages:n={x:.5,y:.5}}=e;const r=TO(n.x),o=TO(n.y),i=(e,r)=>{const o=parseInt(e,10);isNaN(o)||t({...n,[r]:o/100})};return(0,s.createElement)(EO,{className:"focal-point-picker__controls"},(0,s.createElement)(AO,{label:(0,d.__)("Left"),value:[r,"%"].join(""),onChange:e=>i(e,"x"),dragDirection:"e"}),(0,s.createElement)(AO,{label:(0,d.__)("Top"),value:[o,"%"].join(""),onChange:e=>i(e,"y"),dragDirection:"s"}))}function AO(e){return(0,s.createElement)(xO,a({className:"focal-point-picker__controls-position-unit-control",labelPosition:"top",max:100,min:0,units:[{value:"%",label:"%"}]},e))}const RO=zn("div",{target:"eas61re3"})("background-color:transparent;box-sizing:border-box;cursor:grab;height:30px;margin:-15px 0 0 -15px;opacity:0.8;position:absolute;user-select:none;width:30px;will-change:transform;z-index:10000;",(e=>{let{isDragging:t}=e;return t&&"cursor: grabbing;"}),";"),NO=zn(i.SVG,{target:"eas61re2"})({name:"qkx60y",styles:"display:block;height:100%;left:0;position:absolute;top:0;width:100%"}),LO=zn(i.Path,{target:"eas61re1"})({name:"1b3qpiw",styles:"fill:white"}),FO=zn(i.Path,{target:"eas61re0"})("fill:",Bo.blue.wordpress[700],";fill:",Bo.ui.theme,";");function jO(e){let{coordinates:t={left:"50%",top:"50%"},...n}=e;const r=c()("components-focal-point-picker__icon_container"),o={left:t.left,top:t.top};return(0,s.createElement)(RO,a({},n,{className:r,style:o}),(0,s.createElement)(NO,{className:"components-focal-point-picker__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30"},(0,s.createElement)(LO,{className:"components-focal-point-picker__icon-outline",d:"M15 1C7.3 1 1 7.3 1 15s6.3 14 14 14 14-6.3 14-14S22.7 1 15 1zm0 22c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z"}),(0,s.createElement)(FO,{className:"components-focal-point-picker__icon-fill",d:"M15 3C8.4 3 3 8.4 3 15s5.4 12 12 12 12-5.4 12-12S21.6 3 15 3zm0 22C9.5 25 5 20.5 5 15S9.5 5 15 5s10 4.5 10 10-4.5 10-10 10z"})))}const{clearTimeout:BO,setTimeout:zO}="undefined"!=typeof window?window:{};function VO(e){let{bounds:t={},value:n,...r}=e;const o=function(e){const[t,n]=(0,s.useState)(!1);return zm((()=>{n(!0);const e=zO((()=>{n(!1)}),600);return()=>BO(e)}),[e]),{isActive:t}}(n),i={width:t.width,height:t.height};return(0,s.createElement)(kO,a({},r,o,{className:"components-focal-point-picker__grid",style:i}),(0,s.createElement)(CO,{style:{top:"33%"}}),(0,s.createElement)(CO,{style:{top:"66%"}}),(0,s.createElement)(PO,{style:{left:"33%"}}),(0,s.createElement)(PO,{style:{left:"66%"}}))}function HO(e){let{alt:t,autoPlay:n,src:r,onLoad:o=l.noop,mediaRef:i,muted:u=!0,...c}=e;if(!r)return(0,s.createElement)(WO,{className:"components-focal-point-picker__media components-focal-point-picker__media--placeholder",onLoad:o,mediaRef:i});const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!e&&MO.includes(IO(e))}(r);return d?(0,s.createElement)("video",a({},c,{autoPlay:n,className:"components-focal-point-picker__media components-focal-point-picker__media--video",loop:!0,muted:u,onLoadedData:o,ref:i,src:r})):(0,s.createElement)("img",a({},c,{alt:t,className:"components-focal-point-picker__media components-focal-point-picker__media--image",onLoad:o,ref:i,src:r}))}function WO(e){let{mediaRef:t,onLoad:n=l.noop,...r}=e;const o=(0,s.useRef)(n);return(0,s.useLayoutEffect)((()=>{window.requestAnimationFrame((()=>{o.current()}))}),[]),(0,s.createElement)(_O,a({ref:t},r))}class UO extends s.Component{constructor(e){super(...arguments),this.state={isDragging:!1,bounds:OO,percentages:e.value},this.containerRef=(0,s.createRef)(),this.mediaRef=(0,s.createRef)(),this.onMouseDown=this.startDrag.bind(this),this.onMouseUp=this.stopDrag.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseMove=this.doDrag.bind(this),this.ifDraggingStop=()=>{this.state.isDragging&&this.stopDrag()},this.onChangeAtControls=e=>{this.updateValue(e,(()=>{this.props.onChange(this.state.percentages)}))},this.updateBounds=this.updateBounds.bind(this),this.updateValue=this.updateValue.bind(this)}componentDidMount(){const{defaultView:e}=this.containerRef.current.ownerDocument;e.addEventListener("resize",this.updateBounds),this.updateBounds()}componentDidUpdate(e){e.url!==this.props.url&&this.ifDraggingStop();const{isDragging:t,percentages:{x:n,y:r}}=this.state,{value:o}=this.props;t||o.x===n&&o.y===r||this.setState({percentages:this.props.value})}componentWillUnmount(){const{defaultView:e}=this.containerRef.current.ownerDocument;e.removeEventListener("resize",this.updateBounds),this.ifDraggingStop()}calculateBounds(){const e=OO;if(!this.mediaRef.current)return e;if(0===this.mediaRef.current.clientWidth||0===this.mediaRef.current.clientHeight)return e;const t=this.mediaRef.current.clientWidth,n=this.mediaRef.current.clientHeight,r=this.pickerDimensions(),o=r.width/t,i=r.height/n;return i>=o?(e.width=e.right=r.width,e.height=n*o,e.top=(r.height-e.height)/2,e.bottom=e.top+e.height):(e.height=e.bottom=r.height,e.width=t*i,e.left=(r.width-e.width)/2,e.right=e.left+e.width),e}updateValue(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;const i=null!==(e=null===(t=(n=this.props).resolvePoint)||void 0===t?void 0:t.call(n,r))&&void 0!==e?e:r,{x:a,y:s}=i,l={x:parseFloat(a).toFixed(2),y:parseFloat(s).toFixed(2)};this.setState({percentages:l},o)}updateBounds(){this.setState({bounds:this.calculateBounds()})}startDrag(e){var t,n;e.persist(),this.containerRef.current.focus(),this.setState({isDragging:!0});const{ownerDocument:r}=this.containerRef.current;r.addEventListener("mouseup",this.onMouseUp),r.addEventListener("mousemove",this.onMouseMove);const o=this.getValueFromPoint({x:e.pageX,y:e.pageY},e.shiftKey);this.updateValue(o),null===(t=(n=this.props).onDragStart)||void 0===t||t.call(n,o,e)}stopDrag(e){var t,n;const{ownerDocument:r}=this.containerRef.current;r.removeEventListener("mouseup",this.onMouseUp),r.removeEventListener("mousemove",this.onMouseMove),this.setState({isDragging:!1},(()=>{this.props.onChange(this.state.percentages)})),null===(t=(n=this.props).onDragEnd)||void 0===t||t.call(n,e)}onKeyDown(e){const{keyCode:t,shiftKey:n}=e;if(![ev.UP,ev.DOWN,ev.LEFT,ev.RIGHT].includes(t))return;e.preventDefault();const r={...this.state.percentages},o=n?.1:.01,i=t===ev.UP||t===ev.LEFT?-1*o:o,a=t===ev.UP||t===ev.DOWN?"y":"x",s=parseFloat(r[a])+i;r[a]=Bv(s,0,1,o),this.updateValue(r,(()=>{this.props.onChange(this.state.percentages)}))}doDrag(e){var t,n;e.preventDefault();const r=this.getValueFromPoint({x:e.pageX,y:e.pageY},e.shiftKey);this.updateValue(r),null===(t=(n=this.props).onDrag)||void 0===t||t.call(n,r,e)}getValueFromPoint(e,t){const{bounds:n}=this.state,r=this.pickerDimensions(),o={left:e.x-r.left,top:e.y-r.top},i=Math.max(n.left,Math.min(o.left,n.right)),a=Math.max(n.top,Math.min(o.top,n.bottom));let s=(i-n.left)/(r.width-2*n.left),l=(a-n.top)/(r.height-2*n.top);const u=t?.1:.01;return s=Bv(s,0,1,u),l=Bv(l,0,1,u),{x:s,y:l}}pickerDimensions(){const e=this.containerRef.current;if(!e)return{width:0,height:0,left:0,top:0};const{clientHeight:t,clientWidth:n}=e,{top:r,left:o}=e.getBoundingClientRect();return{width:n,height:t,top:r+document.body.scrollTop,left:o}}iconCoordinates(){const{bounds:e,percentages:{x:t,y:n}}=this.state;if(void 0===e.left||void 0===e.top)return{left:"50%",top:"50%"};const{width:r,height:o}=this.pickerDimensions();return{left:t*(r-2*e.left)+e.left,top:n*(o-2*e.top)+e.top}}render(){const{autoPlay:e,className:t,help:n,instanceId:r,label:o,url:i}=this.props,{bounds:a,isDragging:l,percentages:u}=this.state,f=this.iconCoordinates(),p=c()("components-focal-point-picker-control",t),h=`inspector-focal-point-picker-control-${r}`;return(0,s.createElement)(gv,{label:o,id:h,help:n,className:p},(0,s.createElement)(bO,{className:"components-focal-point-picker-wrapper"},(0,s.createElement)(wO,{className:"components-focal-point-picker",onKeyDown:this.onKeyDown,onMouseDown:this.onMouseDown,onBlur:this.ifDraggingStop,ref:this.containerRef,role:"button",tabIndex:"-1"},(0,s.createElement)(VO,{bounds:a,value:u.x+u.y}),(0,s.createElement)(HO,{alt:(0,d.__)("Media preview"),autoPlay:e,mediaRef:this.mediaRef,onLoad:this.updateBounds,src:i}),(0,s.createElement)(jO,{coordinates:f,isDragging:l}))),(0,s.createElement)(DO,{percentages:u,onChange:this.onChangeAtControls}))}}UO.defaultProps={autoPlay:!0,value:{x:.5,y:.5},url:null};var $O=(0,f.withInstanceId)(UO);function KO(e){let{iframeRef:t,...n}=e;const r=(0,f.useMergeRefs)([t,(0,f.useFocusableIframe)()]);return ze()("wp.components.FocusableIframe",{since:"5.9",alternative:"wp.compose.useFocusableIframe"}),(0,s.createElement)("iframe",a({ref:r},n))}function GO(e){void 0===e&&(e={});var t=Yo(e),n=t.state,r=t.loop,o=void 0===r||r,i=v(t,["state","loop"]),a=(0,b.useState)(n),s=a[0],l=a[1],u=gi(m(m({},i),{},{loop:o}));return m(m({},u),{},{state:s,setState:l})}var qO=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],YO=[].concat(qO,["value","checked","unstable_checkOnFocus"]),XO=B({as:"div",useHook:V({name:"RadioGroup",compose:Ci,keys:qO,useProps:function(e,t){return m({role:"radiogroup"},t)}}),useCreateElement:function(e,t,n){return M(e,t,n)}});const ZO=Xr("background:",Bo.ui.background,";border:1px solid;border-color:",Bo.ui.border,";border-radius:",Up.controlBorderRadius,";display:inline-flex;min-height:",Up.controlHeight,";min-width:0;padding:2px;position:relative;transition:transform ",Up.transitionDurationFastest," linear;",zo("transition")," &:hover{border-color:",Bo.ui.borderHover,";}&:focus-within{border-color:",Bo.ui.borderFocus,";box-shadow:",Up.controlBoxShadowFocus,";outline:none;z-index:1;}",""),JO={name:"7whenc",styles:"display:flex;width:100%"},QO=zn("div",{target:"eakva830"})("background:",Bo.gray[900],";border-radius:",Up.controlBorderRadius,";box-shadow:",Up.toggleGroupControlBackdropBoxShadow,";left:0;position:absolute;top:2px;bottom:2px;transition:transform ",Up.transitionDurationFast," ease;",zo("transition")," z-index:1;");var eM=(0,s.memo)((function(e){let{containerRef:t,containerWidth:n,isAdaptiveWidth:r,state:o}=e;const[i,a]=(0,s.useState)(0),[l,u]=(0,s.useState)(0),[c,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{const e=null==t?void 0:t.current;if(!e)return;const n=e.querySelector(`[data-value="${o}"]`);if(p(!!n),!n)return;const r=window.setTimeout((()=>{const{width:t,x:r}=n.getBoundingClientRect(),{x:o}=e.getBoundingClientRect();a(r-o-1),u(t)}),100);let i;return c||(i=window.requestAnimationFrame((()=>{d(!0)}))),()=>{window.clearTimeout(r),window.cancelAnimationFrame(i)}}),[c,t,n,o,r]),f?(0,s.createElement)(QO,{role:"presentation",style:{transform:`translateX(${i}px)`,transition:c?void 0:"none",width:l}}):null}));const tM=(0,s.createContext)({});var nM=tM;const rM=()=>{};const oM=On((function e(t,n){const{className:r,isAdaptiveWidth:o=!1,isBlock:i=!1,label:l,hideLabelFromVision:u=!1,help:c,onChange:d=rM,value:p,children:h,...m}=Pn(t,"ToggleGroupControl"),v=Cn(),g=(0,s.useRef)(),[y,b]=FP()(),w=GO({baseId:(0,f.useInstanceId)(e,"toggle-group-control").toString(),state:p}),_=(0,f.usePrevious)(p);zm((()=>{_!==w.state&&d(w.state)}),[w.state]),zm((()=>{p!==w.state&&w.setState(p)}),[p]);const x=(0,s.useMemo)((()=>v(ZO,i&&JO,"medium",r)),[r,v,i]);return(0,s.createElement)(gv,{help:c},(0,s.createElement)(nM.Provider,{value:{...w,isBlock:!o}},!u&&(0,s.createElement)("div",null,(0,s.createElement)(gv.VisualLabel,null,l)),(0,s.createElement)(XO,a({},w,{"aria-label":l,as:Hn,className:x},m,{ref:(0,f.useMergeRefs)([g,n])}),y,(0,s.createElement)(eM,a({},w,{containerRef:g,containerWidth:b.width,isAdaptiveWidth:o})),h)))}),"ToggleGroupControl");var iM=oM;function aM(e){return void 0!==e.checked?e.checked:void 0!==e.value&&e.state===e.value}function sM(e,t){var n=Me(e,"change");Object.defineProperties(n,{type:{value:"change"},target:{value:e},currentTarget:{value:e}}),null==t||t(n)}var lM=V({name:"Radio",compose:De,keys:YO,useOptions:function(e,t){var n,r=t.value,o=t.checked,i=e.unstable_clickOnEnter,a=void 0!==i&&i,s=e.unstable_checkOnFocus,l=void 0===s||s,u=v(e,["unstable_clickOnEnter","unstable_checkOnFocus"]);return m(m({checked:o,unstable_clickOnEnter:a,unstable_checkOnFocus:l},u),{},{value:null!=(n=u.value)?n:r})},useProps:function(e,t){var n=t.ref,r=t.onChange,o=t.onClick,i=v(t,["ref","onChange","onClick"]),a=(0,b.useRef)(null),s=(0,b.useState)(!0),l=s[0],u=s[1],c=aM(e),d=q(e.currentId===e.id),f=q(r),p=q(o);!function(e){var t=(0,b.useState)((function(){return aM(e)}))[0],n=(0,b.useState)(e.currentId)[0],r=e.id,o=e.setCurrentId;(0,b.useEffect)((function(){t&&r&&n!==r&&(null==o||o(r))}),[t,r,o,n])}(e),(0,b.useEffect)((function(){var e=a.current;e&&("INPUT"===e.tagName&&"radio"===e.type||u(!1))}),[]);var h=(0,b.useCallback)((function(t){var n,r;null===(n=f.current)||void 0===n||n.call(f,t),t.defaultPrevented||e.disabled||null===(r=e.setState)||void 0===r||r.call(e,e.value)}),[e.disabled,e.setState,e.value]),g=(0,b.useCallback)((function(e){var t;null===(t=p.current)||void 0===t||t.call(p,e),e.defaultPrevented||l||sM(e.currentTarget,h)}),[h,l]);return(0,b.useEffect)((function(){var t=a.current;t&&e.unstable_moves&&d.current&&e.unstable_checkOnFocus&&sM(t,h)}),[e.unstable_moves,e.unstable_checkOnFocus,h]),m({ref:W(a,n),role:l?void 0:"radio",type:l?"radio":void 0,value:l?e.value:void 0,name:l?e.baseId:void 0,"aria-checked":c,checked:c,onChange:h,onClick:g},i)}}),uM=B({as:"input",memo:!0,useHook:lM});const cM=zn("div",{target:"et6ln9s1"})({name:"sln1fl",styles:"display:inline-flex;max-width:100%;min-width:0;position:relative"}),dM={name:"82a6rk",styles:"flex:1"},fM=Xr("align-items:center;appearance:none;background:transparent;border:none;border-radius:",Up.controlBorderRadius,";color:",Bo.gray[700],";fill:currentColor;cursor:pointer;display:flex;font-family:inherit;height:100%;justify-content:center;line-height:100%;outline:none;padding:0 12px;position:relative;text-align:center;transition:background ",Up.transitionDurationFast," linear,color ",Up.transitionDurationFast," linear,font-weight 60ms linear;",zo("transition")," user-select:none;width:100%;z-index:2;&::-moz-focus-inner{border:0;}&:active{background:",Up.toggleGroupControlBackgroundColor,";}",""),pM=Xr("color:",Bo.white,";&:active{background:transparent;}",""),hM=zn("div",{target:"et6ln9s0"})("font-size:",Up.fontSize,";line-height:1;"),mM={name:"1qsuvl4",styles:"background:transparent"},vM=Xr("min-height:",Up.controlHeight,";",""),{ButtonContentView:gM,LabelView:yM}=o,bM=e=>{let{showTooltip:t,text:n,children:r}=e;return t&&n?(0,s.createElement)(Ur,{text:n,position:"top center"},r):(0,s.createElement)(s.Fragment,null,r)};const wM=On((function e(t,n){const r=(0,s.useContext)(tM),o=Pn({...t,id:(0,f.useInstanceId)(e,r.baseId||"toggle-group-control-option-base")},"ToggleGroupControlOptionBase"),{className:i,isBlock:l=!1,value:u,children:c,showTooltip:d=!1,...p}={...r,...o},h=p.state===u,m=Cn(),v=m(l&&dM),g=m(fM,i,h&&pM);return(0,s.createElement)(yM,{className:v,"data-active":h},(0,s.createElement)(bM,{showTooltip:d,text:p["aria-label"]},(0,s.createElement)(uM,a({},p,{as:"button","aria-label":p["aria-label"],className:g,"data-value":u,ref:n,value:u}),(0,s.createElement)(gM,null,c))))}),"ToggleGroupControlOptionBase");var _M=wM;function xM(e){const{label:t,...n}=e,r=n["aria-label"]||t;return(0,s.createElement)(_M,a({},n,{"aria-label":r}),t)}const EM={slug:"default",name:(0,d.__)("Default")},kM="custom",SM={slug:kM,name:(0,d.__)("Custom")},CM=["1","2","3","4","5"];function PM(e){const[t,n]=`${e}`.match(/[\d\.]+|\D+/g);return!isNaN(parseFloat(t))&&isFinite(t)?[t,n]:[]}function OM(e){return/^[\d\.]+(px|em|rem|vw|vh|%)?$/i.test(e)}function MM(e,t,n,r){return n&&!t.length?null:e?function(e,t){return[EM,...e,...t?[]:[SM]].map((e=>{let{slug:t,name:n,size:r}=e;return{key:t,name:n,size:r,__experimentalHint:r&&OM(r)&&parseFloat(r)}}))}(t,n):function(e,t){return e.map(((e,n)=>{let{slug:r,size:o,name:i}=e,a=t?CM[n]:o;if(!t&&"string"==typeof o){const[e]=PM(o);a=e}return{key:r,value:o,label:a,name:i}}))}(t,r)}var IM=(0,s.forwardRef)((function(e,t){var n,r;let{fallbackFontSize:o,fontSizes:i=[],disableCustomFontSizes:l=!1,onChange:u,value:c,withSlider:f=!1,withReset:p=!0}=e;const h=[typeof c,typeof(null==i||null===(n=i[0])||void 0===n?void 0:n.size)].includes("string"),m=h?parseInt(c):c,v="number"==typeof c||(null==c||null===(r=c.endsWith)||void 0===r?void 0:r.call(c,"px")),g=E_({availableUnits:["px","em","rem"]}),y=i.some((e=>{let{size:t}=e;return!OM(t)})),b=i.length>5,w=(0,s.useMemo)((()=>MM(b,i,l,y)),[b,i,l,y]),_=function(e,t){return t?e.find((e=>e.size===t))||SM:EM}(i,c),x=_.slug===kM,[E,k]=(0,s.useState)(!l&&x),S=(0,s.useMemo)((()=>{if(E)return`(${(0,d.__)("Custom")})`;if(x)return OM(c)&&`(${c})`;if(b)return OM(null==_?void 0:_.size)&&`(${null==_?void 0:_.size})`;let e=_.name;if(!y&&"string"==typeof _.size){const[,t]=PM(_.size);e+=`(${t})`}return e}),[E,null==_?void 0:_.slug,c,x,y]);if(!w)return null;const C=(0,d.sprintf)((0,d.__)("Currently selected font size: %s"),_.name),P="components-font-size-picker";return(0,s.createElement)("fieldset",a({className:P},t?{}:{ref:t}),(0,s.createElement)(Wn,{as:"legend"},(0,d.__)("Font size")),(0,s.createElement)(Ip,{justify:"space-between",className:`${P}__header`},(0,s.createElement)(gp,null,(0,d.__)("Size"),S&&(0,s.createElement)("span",{className:`${P}__header__hint`},S)),!l&&(0,s.createElement)(gp,null,(0,s.createElement)($n,{label:E?(0,d.__)("Use size preset"):(0,d.__)("Set custom size"),icon:hg,onClick:()=>{k(!E)},isPressed:E,isSmall:!0}))),(0,s.createElement)("div",{className:`${P}__controls`},!!i.length&&b&&!E&&(0,s.createElement)(NC,{className:`${P}__select`,label:(0,d.__)("Font size"),hideLabelFromVision:!0,describedBy:C,options:w,value:w.find((e=>e.key===_.slug)),onChange:e=>{let{selectedItem:t}=e;u(h?t.size:Number(t.size)),t.key===kM&&k(!0)}}),!b&&!E&&(0,s.createElement)(iM,{label:(0,d.__)("Font size"),hideLabelFromVision:!0,value:c,onChange:e=>{u(h?e:Number(e))},isBlock:!0},w.map((e=>(0,s.createElement)(xM,{key:e.key,value:e.value,label:e.label,"aria-label":e.name,showTooltip:!0})))),!f&&!l&&E&&(0,s.createElement)(Ip,{justify:"space-between",className:`${P}__custom-size-control`},(0,s.createElement)(gp,{isBlock:!0},(0,s.createElement)(I_,{label:(0,d.__)("Custom"),labelPosition:"top",hideLabelFromVision:!0,value:c,onChange:e=>{0!==parseFloat(e)&&e?u(h?e:parseInt(e,10)):u(void 0)},units:h?g:[]})),p&&(0,s.createElement)(gp,{isBlock:!0},(0,s.createElement)($n,{className:"components-color-palette__clear",disabled:void 0===c,onClick:()=>{u(void 0)},isSmall:!0,variant:"secondary"},(0,d.__)("Reset"))))),f&&(0,s.createElement)(ry,{className:`${P}__custom-input`,label:(0,d.__)("Custom Size"),value:v&&m||"",initialPosition:o,onChange:e=>{u(h?e+"px":e)},min:12,max:100}))}));var TM=function(e){let{accept:t,children:n,multiple:r=!1,onChange:o,onClick:i,render:l,...u}=e;const c=(0,s.useRef)(),d=()=>{c.current.click()},f=l?l({openFileDialog:d}):(0,s.createElement)($n,a({onClick:d},u),n);return(0,s.createElement)("div",{className:"components-form-file-upload"},f,(0,s.createElement)("input",{type:"file",ref:c,multiple:r,style:{display:"none"},accept:t,onChange:o,onClick:i,"data-testid":"form-file-upload-input"}))};var DM=function(e){let{className:t,checked:n,id:r,disabled:o,onChange:i=l.noop,...u}=e;const d=c()("components-form-toggle",t,{"is-checked":n,"is-disabled":o});return(0,s.createElement)("span",{className:d},(0,s.createElement)("input",a({className:"components-form-toggle__input",id:r,type:"checkbox",checked:n,onChange:i,disabled:o},u)),(0,s.createElement)("span",{className:"components-form-toggle__track"}),(0,s.createElement)("span",{className:"components-form-toggle__thumb"}))};function AM(e){let{value:t,status:n,title:r,displayTransform:o,isBorderless:i=!1,disabled:a=!1,onClickRemove:u=l.noop,onMouseEnter:p,onMouseLeave:h,messages:m,termPosition:v,termsCount:g}=e;const y=(0,f.useInstanceId)(AM),b=c()("components-form-token-field__token",{"is-error":"error"===n,"is-success":"success"===n,"is-validating":"validating"===n,"is-borderless":i,"is-disabled":a}),w=o(t),_=(0,d.sprintf)((0,d.__)("%1$s (%2$s of %3$s)"),w,v,g);return(0,s.createElement)("span",{className:b,onMouseEnter:p,onMouseLeave:h,title:r},(0,s.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${y}`},(0,s.createElement)(Wn,{as:"span"},_),(0,s.createElement)("span",{"aria-hidden":"true"},w)),(0,s.createElement)($n,{className:"components-form-token-field__remove-token",icon:Mv,onClick:!a&&(()=>u({value:t})),label:m.remove,"aria-describedby":`components-form-token-field__token-text-${y}`}))}var RM=(0,f.createHigherOrderComponent)((e=>t=>(0,s.createElement)(e,a({},t,{speak:nv.speak,debouncedSpeak:(0,f.useDebounce)(nv.speak,500)}))),"withSpokenMessages");const NM={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class LM extends s.Component{constructor(){super(...arguments),this.state=NM,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:n}=this.props,r=!wr()(t,e.suggestions);(r||n!==e.value)&&this.updateSuggestions(r)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(NM)}onKeyDown(e){let t=!1;if(!e.defaultPrevented){switch(e.keyCode){case ev.BACKSPACE:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case ev.ENTER:t=this.addCurrentToken();break;case ev.LEFT:t=this.handleLeftArrowKey();break;case ev.UP:t=this.handleUpArrowKey();break;case ev.RIGHT:t=this.handleRightArrowKey();break;case ev.DOWN:t=this.handleDownArrowKey();break;case ev.DELETE:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case ev.SPACE:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case ev.ESCAPE:t=this.handleEscapeKey(e)}t&&e.preventDefault()}}onKeyPress(e){let t=!1;if(44===e.charCode)t=this.handleCommaKey();t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,n=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,r=t.split(n),o=(0,l.last)(r)||"";r.length>1&&this.addNewTokens(r.slice(0,-1)),this.setState({incompleteTokenValue:o},this.updateSuggestions),this.props.onInputChange(o)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0}))),!0}handleDownArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0}))),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState(((t,n)=>({inputOffsetFromEnd:n.value.length-Math.max(e,-1)-1})))}moveInputBeforePreviousToken(){this.setState(((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)})))}moveInputAfterNextToken(){this.setState((e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)})))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e!this.valueContainsToken(e))));if(t.length>0){const e=(0,l.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:n}=this.props;n(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter((t=>this.getTokenValue(t)!==this.getTokenValue(e)));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.incompleteTokenValue,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.suggestions,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.value,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.props.maxSuggestions,o=(arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.props.saveTransform)(e);const i=[],a=[];return 0===o.length?t=(0,l.difference)(t,n):(o=o.toLocaleLowerCase(),(0,l.each)(t,(e=>{const t=e.toLocaleLowerCase().indexOf(o);-1===n.indexOf(e)&&(0===t?i.push(e):t>0&&a.push(e))})),t=i.concat(a)),(0,l.take)(t,r)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return(0,l.some)(this.props.value,(t=>this.getTokenValue(e)===this.getTokenValue(t)))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:n}=this.state,r=n.trim().length>1,o=this.getMatchingSuggestions(n),i=o.length>0,a={isExpanded:t||r&&i};if(e&&(a.selectedSuggestionIndex=-1,a.selectedSuggestionScroll=!1),this.setState(a),r){const{debouncedSpeak:e}=this.props;e(i?(0,d.sprintf)((0,d._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",o.length),o.length):(0,d.__)("No results."),"assertive")}}renderTokensAndInput(){const e=(0,l.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,n){const r=this.getTokenValue(e),o=e.status?e.status:void 0,i=t+1,a=n.length;return(0,s.createElement)(AM,{key:"token-"+r,value:r,status:o,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==o&&this.props.disabled,messages:this.props.messages,termsCount:a,termPosition:i})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:n,placeholder:r,value:o,instanceId:i}=this.props;let a={instanceId:i,autoCapitalize:e,autoComplete:t,placeholder:0===o.length?r:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return n&&o.length>=n||(a={...a,onChange:this.onInputChange}),(0,s.createElement)(yS,a)}render(){const{disabled:e,label:t=(0,d.__)("Add item"),instanceId:n,className:r,__experimentalShowHowTo:o}=this.props,{isExpanded:i}=this.state,a=c()(r,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let l={className:"components-form-token-field",tabIndex:"-1"};const u=this.getMatchingSuggestions();return e||(l=Object.assign({},l,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),(0,s.createElement)("div",l,(0,s.createElement)("label",{htmlFor:`components-form-token-input-${n}`,className:"components-form-token-field__label"},t),(0,s.createElement)("div",{ref:this.bindTokensAndInput,className:a,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),i&&(0,s.createElement)(ES,{instanceId:n,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:u,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),o&&(0,s.createElement)("p",{id:`components-form-token-suggestions-howto-${n}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?(0,d.__)("Separate with commas, spaces, or the Enter key."):(0,d.__)("Separate with commas or the Enter key.")))}}LM.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:l.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:(0,d.__)("Item added."),removed:(0,d.__)("Item removed."),remove:(0,d.__)("Remove item"),__experimentalInvalid:(0,d.__)("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0};var FM=RM((0,f.withInstanceId)(LM));const jM=e=>{let{isSelected:t}=e;return(0,s.createElement)(i.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Circle,{cx:"4",cy:"4",r:"4",fill:t?"#419ECD":"#E1E3E6"}))};function BM(e){let{currentPage:t,numberOfPages:n,setCurrentPage:r}=e;return(0,s.createElement)("ul",{className:"components-guide__page-control","aria-label":(0,d.__)("Guide controls")},(0,l.times)(n,(e=>(0,s.createElement)("li",{key:e,"aria-current":e===t?"step":void 0},(0,s.createElement)($n,{key:e,icon:(0,s.createElement)(jM,{isSelected:e===t}),"aria-label":(0,d.sprintf)((0,d.__)("Page %1$d of %2$d"),e+1,n),onClick:()=>r(e)})))))}function zM(e){let{children:t,className:n,contentLabel:r,finishButtonText:o,onFinish:i,pages:a=[]}=e;const l=(0,s.useRef)(),[u,f]=(0,s.useState)(0);(0,s.useEffect)((()=>{s.Children.count(t)&&ze()("Passing children to ",{since:"5.5",alternative:"the `pages` prop"})}),[t]),(0,s.useEffect)((()=>{var e,t;null===(e=Re.focus.tabbable.find(l.current))||void 0===e||null===(t=e[0])||void 0===t||t.focus()}),[u]),s.Children.count(t)&&(a=s.Children.map(t,(e=>({content:e}))));const p=u>0,h=u{p&&f(u-1)},v=()=>{h&&f(u+1)};return 0===a.length?null:(0,s.createElement)(DS,{className:c()("components-guide",n),contentLabel:r,onRequestClose:i,onKeyDown:e=>{e.keyCode===ev.LEFT?m():e.keyCode===ev.RIGHT&&v()},ref:l},(0,s.createElement)("div",{className:"components-guide__container"},(0,s.createElement)("div",{className:"components-guide__page"},a[u].image,a.length>1&&(0,s.createElement)(BM,{currentPage:u,numberOfPages:a.length,setCurrentPage:f}),a[u].content),(0,s.createElement)("div",{className:"components-guide__footer"},p&&(0,s.createElement)($n,{className:"components-guide__back-button",onClick:m},(0,d.__)("Previous")),h&&(0,s.createElement)($n,{className:"components-guide__forward-button",onClick:v},(0,d.__)("Next")),!h&&(0,s.createElement)($n,{className:"components-guide__finish-button",onClick:i},o||(0,d.__)("Finish")))))}function VM(e){return(0,s.useEffect)((()=>{ze()("",{since:"5.5",alternative:"the `pages` prop in "})}),[]),(0,s.createElement)("div",e)}var HM=(0,s.forwardRef)((function(e,t){let{labelPosition:n,size:r,tooltip:o,label:i,...l}=e;return ze()("wp.components.IconButton",{since:"5.4",alternative:"wp.components.Button",version:"6.2"}),(0,s.createElement)($n,a({},l,{ref:t,tooltipPosition:n,iconSize:r,showTooltip:void 0!==o?!!o:void 0,label:o||i}))}));var WM=On((function(e,t){const{role:n,wrapperClassName:r,...o}=function(e){const{as:t,className:n,onClick:r,role:o="listitem",size:i,...a}=Pn(e,"Item"),{spacedAround:l,size:u}=hk(),c=i||u,d=t||(void 0!==r?"button":"div"),f=Cn(),p=(0,s.useMemo)((()=>f("button"===d&&ek,fk[c]||fk.medium,nk,l&&ak,n)),[d,n,f,c,l]),h=f(tk);return{as:d,className:p,onClick:r,wrapperClassName:h,role:o,...a}}(e);return(0,s.createElement)("div",{role:n,className:r},(0,s.createElement)(Hn,a({},o,{ref:t})))}),"Item");function UM(e){let{target:t,callback:n,shortcut:r,bindGlobal:o,eventName:i}=e;return(0,f.useKeyboardShortcut)(r,n,{bindGlobal:o,target:t,eventName:i}),null}var $M=function(e){let{children:t,shortcuts:n,bindGlobal:r,eventName:o}=e;const i=(0,s.useRef)(),a=(0,l.map)(n,((e,t)=>(0,s.createElement)(UM,{key:t,shortcut:t,callback:e,bindGlobal:r,eventName:o,target:i})));return s.Children.count(t)?(0,s.createElement)("div",{ref:i},a,t):a};var KM=function e(t){const{children:n,className:r="",label:o,hideSeparator:i}=t,a=(0,f.useInstanceId)(e);if(!s.Children.count(n))return null;const l=`components-menu-group-label-${a}`,u=c()(r,"components-menu-group",{"has-hidden-separator":i});return(0,s.createElement)("div",{className:u},o&&(0,s.createElement)("div",{className:"components-menu-group__label",id:l,"aria-hidden":"true"},o),(0,s.createElement)("div",{role:"group","aria-labelledby":o?l:null},n))};var GM=(0,s.forwardRef)((function(e,t){let{children:n,info:r,className:o,icon:i,iconPosition:u="right",shortcut:d,isSelected:f,role:p="menuitem",...h}=e;return o=c()("components-menu-item__button",o),r&&(n=(0,s.createElement)("span",{className:"components-menu-item__info-wrapper"},(0,s.createElement)("span",{className:"components-menu-item__item"},n),(0,s.createElement)("span",{className:"components-menu-item__info"},r))),i&&!(0,l.isString)(i)&&(i=(0,s.cloneElement)(i,{className:c()("components-menu-items__item-icon",{"has-icon-right":"right"===u})})),(0,s.createElement)($n,a({ref:t,"aria-checked":"menuitemcheckbox"===p||"menuitemradio"===p?f:void 0,role:p,icon:"left"===u?i:void 0,className:o},h),(0,s.createElement)("span",{className:"components-menu-item__item"},n),(0,s.createElement)(jr,{className:"components-menu-item__shortcut",shortcut:d}),i&&"right"===u&&(0,s.createElement)(He,{icon:i}))}));function qM(e){let{choices:t=[],onHover:n=l.noop,onSelect:r,value:o}=e;return t.map((e=>{const t=o===e.value;return(0,s.createElement)(GM,{key:e.value,role:"menuitemradio",icon:t&&o_,info:e.info,isSelected:t,shortcut:e.shortcut,className:"components-menu-items-choice",onClick:()=>{t||r(e.value)},onMouseEnter:()=>n(e.value),onMouseLeave:()=>n(null),"aria-label":e["aria-label"]},e.label)}))}var YM=(0,s.forwardRef)((function(e,t){let{eventToOffset:n,...r}=e;return(0,s.createElement)(Yk,a({ref:t,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:e=>{const{keyCode:t,shiftKey:r}=e;return ev.TAB===t?r?-1:1:n?n(e):void 0}},r))}));const XM="root",ZM=(0,s.createContext)({activeItem:void 0,activeMenu:XM,setActiveMenu:l.noop,isMenuEmpty:l.noop,navigationTree:{items:{},getItem:l.noop,addItem:l.noop,removeItem:l.noop,menus:{},getMenu:l.noop,addMenu:l.noop,removeMenu:l.noop,childMenu:{},traverseMenu:l.noop,isMenuEmpty:l.noop}}),JM=()=>(0,s.useContext)(ZM);var QM=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));var eI=(0,s.forwardRef)((function e(t,n){let{className:r,onChange:o,onKeyDown:i,value:a,label:l,placeholder:u=(0,d.__)("Search"),hideLabelFromVision:p=!0,help:h,onClose:m}=t;const v=(0,f.useInstanceId)(e),g=function(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((e=>{e&&("function"==typeof e?e(r.current):e.current=r.current)}))}),[t]),r}(n),y=`components-search-control-${v}`;return(0,s.createElement)(gv,{label:l,id:y,hideLabelFromVision:p,help:h,className:c()(r,"components-search-control")},(0,s.createElement)("div",{className:"components-search-control__input-wrapper"},(0,s.createElement)("input",{ref:g,className:"components-search-control__input",id:y,type:"search",placeholder:u,onChange:e=>o(e.target.value),onKeyDown:i,autoComplete:"off",value:a||""}),(0,s.createElement)("div",{className:"components-search-control__icon"},m?(0,s.createElement)($n,{icon:Mv,label:(0,d.__)("Close search"),onClick:m}):a?(0,s.createElement)($n,{icon:Mv,label:(0,d.__)("Reset search"),onClick:()=>{o(""),g.current.focus()}}):(0,s.createElement)(wg,{icon:QM}))))}));const tI=zn("div",{target:"ejwewyf11"})("width:100%;box-sizing:border-box;padding:0 ",_p(4),";overflow:hidden;"),nI=zn("div",{target:"ejwewyf10"})("margin-top:",_p(6),";margin-bottom:",_p(6),";display:flex;flex-direction:column;ul{padding:0;margin:0;list-style:none;}.components-navigation__back-button{margin-bottom:",_p(6),";}.components-navigation__group+.components-navigation__group{margin-top:",_p(6),";}"),rI=zn($n,{target:"ejwewyf9"})({name:"26l0q2",styles:"&.is-tertiary{color:inherit;opacity:0.7;&:hover:not( :disabled ){opacity:1;box-shadow:none;color:inherit;}&:active:not( :disabled ){background:transparent;opacity:1;color:inherit;}}"}),oI=zn("div",{target:"ejwewyf8"})({name:"1aubja5",styles:"overflow:hidden;width:100%"}),iI=zn("span",{target:"ejwewyf7"})("height:",_p(6),";.components-button.is-small{color:inherit;opacity:0.7;margin-right:",_p(1),";padding:0;&:active:not( :disabled ){background:none;opacity:1;color:inherit;}&:hover:not( :disabled ){box-shadow:none;opacity:1;color:inherit;}}"),aI=zn(eI,{target:"ejwewyf6"})({name:"za3n3e",styles:"input[type='search'].components-search-control__input{margin:0;background:#303030;color:#fff;&:focus{background:#434343;color:#fff;}&::placeholder{color:rgba( 255, 255, 255, 0.6 );}}svg{fill:white;}.components-button.has-icon{padding:0;min-width:auto;}"}),sI=zn(l_,{target:"ejwewyf5"})("min-height:",_p(12),";align-items:center;color:inherit;display:flex;justify-content:space-between;margin-bottom:",_p(2),";padding:",(()=>(0,d.isRTL)()?`${_p(1)} ${_p(4)} ${_p(1)} ${_p(2)}`:`${_p(1)} ${_p(2)} ${_p(1)} ${_p(4)}`),";"),lI=zn("li",{target:"ejwewyf4"})("border-radius:2px;color:inherit;margin-bottom:0;>button,>a.components-button,>a{width:100%;color:inherit;opacity:0.7;padding:",_p(2)," ",_p(4),";",Op({textAlign:"left"},{textAlign:"right"})," &:hover,&:focus:not( [aria-disabled='true'] ):active,&:active:not( [aria-disabled='true'] ):active{color:inherit;opacity:1;}}&.is-active{background-color:",jo.theme,";color:",Mo.white,";>button,>a{color:",Mo.white,";opacity:1;}}>svg path{color:",Io.lightGray.ui,";}"),uI=zn("div",{target:"ejwewyf3"})("display:flex;align-items:center;height:auto;min-height:40px;margin:0;padding:",_p(1.5)," ",_p(4),";font-weight:400;line-height:20px;width:100%;color:inherit;opacity:0.7;"),cI=zn("span",{target:"ejwewyf2"})("display:flex;margin-right:",_p(2),";"),dI=zn("span",{target:"ejwewyf1"})("margin-left:",(()=>(0,d.isRTL)()?"0":_p(2)),";margin-right:",(()=>(0,d.isRTL)()?_p(2):"0"),";display:inline-flex;padding:",_p(1)," ",_p(3),";border-radius:2px;animation:fade-in 250ms ease-out;@keyframes fade-in{from{opacity:0;}to{opacity:1;}}",zo("animation"),";"),fI=zn(ah,{target:"ejwewyf0"})((()=>(0,d.isRTL)()?"margin-left: auto;":"margin-right: auto;")," font-size:14px;line-height:20px;color:inherit;"),pI=()=>{const[e,t]=(0,s.useState)({});return{nodes:e,getNode:t=>e[t],addNode:(e,n)=>t((t=>({...t,[e]:(0,l.omit)(n,"children")}))),removeNode:e=>t((t=>(0,l.omit)(t,e)))}};function hI(e){let{activeItem:t,activeMenu:n=XM,children:r,className:o,onActivateMenu:i=l.noop}=e;const[a,u]=(0,s.useState)(n),[f,p]=(0,s.useState)(),h=(()=>{const{nodes:e,getNode:t,addNode:n,removeNode:r}=pI(),{nodes:o,getNode:i,addNode:a,removeNode:l}=pI(),[u,c]=(0,s.useState)({}),d=e=>u[e]||[],f=(e,t)=>{const n=[];let r,o=[e];for(;o.length>0&&(r=i(o.shift()),!r||n.includes(r.menu)||(n.push(r.menu),o=[...o,...d(r.menu)],!1!==t(r))););};return{items:e,getItem:t,addItem:n,removeItem:r,menus:o,getMenu:i,addMenu:(e,t)=>{c((n=>{const r={...n};return r[t.parentMenu]||(r[t.parentMenu]=[]),r[t.parentMenu].push(e),r})),a(e,t)},removeMenu:l,childMenu:u,traverseMenu:f,isMenuEmpty:e=>{let t=!0;return f(e,(e=>{if(!e.isEmpty)return t=!1,!1})),t}}})(),m=(0,d.isRTL)()?"right":"left",v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;h.getMenu(e)&&(p(t),u(e),i(e))},g=(0,s.useRef)(!1);(0,s.useEffect)((()=>{g.current||(g.current=!0)}),[]),(0,s.useEffect)((()=>{n!==a&&v(n)}),[n]);const y={activeItem:t,activeMenu:a,setActiveMenu:v,navigationTree:h},b=c()("components-navigation",o),w=Or({type:"slide-in",origin:f});return(0,s.createElement)(tI,{className:b},(0,s.createElement)("div",{key:a,className:c()({[w]:g.current&&f})},(0,s.createElement)(ZM.Provider,{value:y},r)))}var mI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));var vI=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));var gI=(0,s.forwardRef)((function(e,t){var n;let{backButtonLabel:r,className:o,href:i,onClick:a,parentMenu:l}=e;const{setActiveMenu:u,navigationTree:f}=JM(),p=c()("components-navigation__back-button",o),h=null===(n=f.getMenu(l))||void 0===n?void 0:n.title,m=(0,d.isRTL)()?mI:vI;return(0,s.createElement)(rI,{className:p,href:i,variant:"tertiary",ref:t,onClick:e=>{"function"==typeof a&&a(e);const t=(0,d.isRTL)()?"left":"right";l&&!e.defaultPrevented&&u(l,t)}},(0,s.createElement)(wg,{icon:m}),r||h||(0,d.__)("Back"))}));const yI=(0,s.createContext)({group:void 0});function bI(e){let{children:t,className:n,title:r}=e;const[o]=(0,s.useState)((0,l.uniqueId)("group-")),{navigationTree:{items:i}}=JM(),a={group:o};if(!(0,l.find)(i,{group:o,_isVisible:!0}))return(0,s.createElement)(yI.Provider,{value:a},t);const u=`components-navigation__group-title-${o}`,d=c()("components-navigation__group",n);return(0,s.createElement)(yI.Provider,{value:a},(0,s.createElement)("li",{className:d},r&&(0,s.createElement)(sI,{className:"components-navigation__group-title",id:u,level:3},r),(0,s.createElement)("ul",{"aria-labelledby":u,role:"group"},t)))}function wI(e){const{badge:t,title:n}=e;return(0,s.createElement)(s.Fragment,null,n&&(0,s.createElement)(fI,{className:"components-navigation__item-title",variant:"body.small",as:"span"},n),t&&(0,s.createElement)(dI,{className:"components-navigation__item-badge"},t))}const _I=(0,s.createContext)({menu:void 0,search:""}),xI=()=>(0,s.useContext)(_I),EI=e=>(0,l.deburr)(e).replace(/^\//,"").toLowerCase(),kI=(e,t)=>{const{activeMenu:n,navigationTree:{addItem:r,removeItem:o}}=JM(),{group:i}=(0,s.useContext)(yI),{menu:a,search:l}=xI();(0,s.useEffect)((()=>{const s=n===a,u=!l||((e,t)=>-1!==EI(e).indexOf(EI(t)))(t.title,l);return r(e,{...t,group:i,menu:a,_isVisible:s&&u}),()=>{o(e)}}),[n,l])};function SI(e){var t;const{children:n,className:r,...o}=e,[i]=(0,s.useState)((0,l.uniqueId)("item-"));kI(i,e);const{navigationTree:u}=JM();if(null===(t=u.getItem(i))||void 0===t||!t._isVisible)return null;const d=c()("components-navigation__item",r);return(0,s.createElement)(lI,a({className:d},o),n)}function CI(e){const{badge:t,children:n,className:r,href:o,item:i,navigateToMenu:u,onClick:f=l.noop,title:p,icon:h,hideIfTargetMenuEmpty:m,isText:v,...g}=e,{activeItem:y,setActiveMenu:b,navigationTree:{isMenuEmpty:w}}=JM();if(m&&u&&w(u))return null;const _=i&&y===i,x=c()(r,{"is-active":_}),E=(0,d.isRTL)()?vI:mI,k=n?e:{...e,onClick:void 0},S=v?g:{as:$n,href:o,onClick:e=>{u&&b(u),f(e)},"aria-current":_?"page":void 0,...g};return(0,s.createElement)(SI,a({},k,{className:x}),n||(0,s.createElement)(uI,S,h&&(0,s.createElement)(cI,null,(0,s.createElement)(wg,{icon:h})),(0,s.createElement)(wI,{title:p,badge:t}),u&&(0,s.createElement)(wg,{icon:E})))}var PI=RM((function(e){let{debouncedSpeak:t,onCloseSearch:n,onSearch:r,search:o,title:i}=e;const{navigationTree:{items:a}}=JM(),{menu:u}=xI(),c=(0,s.useRef)();(0,s.useEffect)((()=>{const e=setTimeout((()=>{c.current.focus()}),100);return()=>{clearTimeout(e)}}),[]),(0,s.useEffect)((()=>{if(!o)return;const e=(0,l.filter)(a,"_isVisible").length,n=(0,d.sprintf)((0,d._n)("%d result found.","%d results found.",e),e);t(n)}),[a,o]);const f=()=>{r(""),n()},p=`components-navigation__menu-title-search-${u}`,h=(0,d.sprintf)((0,d.__)("Search %s"),null==i?void 0:i.toLowerCase()).trim();return(0,s.createElement)("div",{className:"components-navigation__menu-title-search"},(0,s.createElement)(aI,{autoComplete:"off",className:"components-navigation__menu-search-input",id:p,onChange:e=>r(e),onKeyDown:function(e){e.keyCode!==ev.ESCAPE||e.defaultPrevented||(e.preventDefault(),f())},placeholder:h,onClose:f,ref:c,type:"search",value:o}))}));function OI(e){let{hasSearch:t,onSearch:n,search:r,title:o,titleAction:i}=e;const[a,l]=(0,s.useState)(!1),{menu:u}=xI(),c=(0,s.useRef)();if(!o)return null;const f=`components-navigation__menu-title-${u}`,p=(0,d.sprintf)((0,d.__)("Search in %s"),o);return(0,s.createElement)(oI,{className:"components-navigation__menu-title"},!a&&(0,s.createElement)(sI,{as:"h2",className:"components-navigation__menu-title-heading",level:3},(0,s.createElement)("span",{id:f},o),(t||i)&&(0,s.createElement)(iI,null,i,t&&(0,s.createElement)($n,{isSmall:!0,variant:"tertiary",label:p,onClick:()=>l(!0),ref:c},(0,s.createElement)(wg,{icon:QM})))),a&&(0,s.createElement)("div",{className:Or({type:"slide-in",origin:"left"})},(0,s.createElement)(PI,{onCloseSearch:()=>{l(!1),setTimeout((()=>{c.current.focus()}),100)},onSearch:n,search:r,title:o})))}function MI(e){let{search:t}=e;const{navigationTree:{items:n}}=JM(),r=(0,l.filter)(n,"_isVisible").length;return!t||r?null:(0,s.createElement)(lI,null,(0,s.createElement)(uI,null,(0,d.__)("No results found.")," "))}function II(e){const{backButtonLabel:t,children:n,className:r,hasSearch:o,menu:i=XM,onBackButtonClick:a,onSearch:l,parentMenu:u,search:d,isSearchDebouncing:f,title:p,titleAction:h}=e,[m,v]=(0,s.useState)("");(e=>{const{navigationTree:{addMenu:t,removeMenu:n}}=JM(),r=e.menu||XM;(0,s.useEffect)((()=>(t(r,{...e,menu:r}),()=>{n(r)})),[])})(e);const{activeMenu:g}=JM(),y={menu:i,search:m};if(g!==i)return(0,s.createElement)(_I.Provider,{value:y},n);const b=!!l,w=b?d:m,_=b?l:v,x=`components-navigation__menu-title-${i}`,E=c()("components-navigation__menu",r);return(0,s.createElement)(_I.Provider,{value:y},(0,s.createElement)(nI,{className:E},(u||a)&&(0,s.createElement)(gI,{backButtonLabel:t,parentMenu:u,onClick:a}),p&&(0,s.createElement)(OI,{hasSearch:o,onSearch:_,search:w,title:p,titleAction:h}),(0,s.createElement)(Xk,null,(0,s.createElement)("ul",{"aria-labelledby":x},n,w&&!f&&(0,s.createElement)(MI,{search:w})))))}const TI=(0,s.createContext)({location:{},goTo:()=>{},goBack:()=>{}});var DI={name:"15bx5k",styles:"overflow-x:hidden"};const AI=On((function(e,t){const{initialPath:n,children:r,className:o,...i}=Pn(e,"NavigatorProvider"),[l,u]=(0,s.useState)([{path:n}]),c=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u([...l,{...t,path:e,isBack:!1}])}),[l]),d=(0,s.useCallback)((()=>{l.length>1&&u([...l.slice(0,-2),{...l[l.length-2],isBack:!0}])}),[l]),f=(0,s.useMemo)((()=>({location:{...l[l.length-1],isInitial:1===l.length},goTo:c,goBack:d})),[l,c,d]),p=Cn(),h=(0,s.useMemo)((()=>p(DI,o)),[o,p]);return(0,s.createElement)(Hn,a({ref:t,className:h},i),(0,s.createElement)(TI.Provider,{value:f},r))}),"NavigatorProvider");var RI=AI,NI=window.wp.escapeHtml;var LI={name:"14x3t6z",styles:"overflow-x:auto;max-height:100%"};const FI=On((function(e,t){const{children:n,className:r,path:o,...i}=Pn(e,"NavigatorScreen"),l=(0,f.useReducedMotion)(),{location:u}=(0,s.useContext)(TI),c=u.path===(0,NI.escapeAttribute)(o),p=(0,s.useRef)(null),h=(0,f.usePrevious)(u),m=Cn(),v=(0,s.useMemo)((()=>m(LI,r)),[r,m]),g=u.isInitial&&!u.isBack;(0,s.useEffect)((()=>{if(g||!c||!p.current)return;let e=null;if(u.isBack&&null!=h&&h.focusTargetSelector&&(e=p.current.querySelector(h.focusTargetSelector)),!e){const t=Re.focus.tabbable.find(p.current)[0];e=null!=t?t:p.current}e.focus()}),[g,c]);const y=(0,f.useMergeRefs)([t,p]);if(!c)return null;if(l)return(0,s.createElement)(Hn,a({ref:y,className:v},i),n);const b={opacity:1,transition:{delay:0,duration:.14,ease:"easeInOut"},x:0},w={opacity:0,x:(0,d.isRTL)()&&u.isBack||!(0,d.isRTL)()&&!u.isBack?50:-50},_={animate:b,exit:{delay:0,opacity:0,x:!(0,d.isRTL)()&&u.isBack||(0,d.isRTL)()&&!u.isBack?50:-50,transition:{duration:.14,ease:"easeInOut"}},initial:w};return(0,s.createElement)(lp.div,a({ref:y,className:v},i,_),n)}),"NavigatorScreen");var jI=FI;var BI=function(){const{location:e,goTo:t,goBack:n}=(0,s.useContext)(TI);return{location:e,goTo:t,goBack:n}};var zI=On((function(e,t){const n=function(e){const{path:t,onClick:n,as:r=$n,attributeName:o="id",...i}=Pn(e,"NavigatorButton"),a=(0,NI.escapeAttribute)(t),{goTo:l}=BI();return{as:r,onClick:(0,s.useCallback)((e=>{var t,r;e.preventDefault(),l(a,{focusTargetSelector:(t=o,r=a,`[${t}="${r}"]`)}),null==n||n(e)}),[l,n]),...i,[o]:a}}(e);return(0,s.createElement)(Hn,a({ref:t},n))}),"NavigatorButton");var VI=On((function(e,t){const n=function(e){const{onClick:t,as:n=$n,...r}=Pn(e,"NavigatorBackButton"),{goBack:o}=BI();return{as:n,onClick:(0,s.useCallback)((e=>{e.preventDefault(),o(),null==t||t(e)}),[o,t]),...r}}(e);return(0,s.createElement)(Hn,a({ref:t},n))}),"NavigatorBackButton");function HI(e){switch(e){case"success":case"warning":case"info":return"polite";default:return"assertive"}}var WI=function(e){let{className:t,status:n="info",children:r,spokenMessage:o=r,onRemove:i=l.noop,isDismissible:a=!0,actions:u=[],politeness:f=HI(n),__unstableHTML:p,onDismiss:h=l.noop}=e;!function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,nv.speak)(n,t)}),[n,t])}(o,f);const m=c()(t,"components-notice","is-"+n,{"is-dismissible":a});return p&&(r=(0,s.createElement)(s.RawHTML,null,r)),(0,s.createElement)("div",{className:m},(0,s.createElement)("div",{className:"components-notice__content"},r,(0,s.createElement)("div",{className:"components-notice__actions"},u.map(((e,t)=>{let{className:n,label:r,isPrimary:o,variant:i,noDefaultClasses:a=!1,onClick:l,url:u}=e,d=i;return"primary"===i||a||(d=u?"link":"secondary"),void 0===d&&o&&(d="primary"),(0,s.createElement)($n,{key:t,href:u,variant:d,onClick:u?void 0:l,className:c()("components-notice__action",n)},r)})))),a&&(0,s.createElement)($n,{className:"components-notice__dismiss",icon:Ne,label:(0,d.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),h(),i()},showTooltip:!1}))};var UI=function(e){let{notices:t,onRemove:n=l.noop,className:r,children:o}=e;const i=e=>()=>n(e);return r=c()("components-notice-list",r),(0,s.createElement)("div",{className:r},o,[...t].reverse().map((e=>(0,s.createElement)(WI,a({},(0,l.omit)(e,["content"]),{key:e.id,onRemove:i(e.id)}),e.content))))};var $I=function(e){let{label:t,children:n}=e;return(0,s.createElement)("div",{className:"components-panel__header"},t&&(0,s.createElement)("h2",null,t),n)};var KI=(0,s.forwardRef)((function(e,t){let{header:n,className:r,children:o}=e;const i=c()(r,"components-panel");return(0,s.createElement)("div",{className:i,ref:t},n&&(0,s.createElement)($I,{label:n}),o)}));var GI=(0,s.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,s.createElement)(i.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));const qI=(0,s.forwardRef)(((e,t)=>{let{isOpened:n,icon:r,title:o,...i}=e;return o?(0,s.createElement)("h2",{className:"components-panel__body-title"},(0,s.createElement)($n,a({className:"components-panel__body-toggle","aria-expanded":n,ref:t},i),(0,s.createElement)("span",{"aria-hidden":"true"},(0,s.createElement)(He,{className:"components-panel__arrow",icon:n?GI:_g})),o,r&&(0,s.createElement)(He,{icon:r,className:"components-panel__icon",size:20}))):null})),YI=(0,s.forwardRef)((function(e,t){let{buttonProps:n={},children:r,className:o,icon:i,initialOpen:u,onToggle:d=l.noop,opened:p,title:h,scrollAfterOpen:m=!0}=e;const[v,g]=Pg(p,{initial:void 0===u||u}),y=(0,s.useRef)(),b=(0,f.useReducedMotion)()?"auto":"smooth",w=(0,s.useRef)();w.current=m,zm((()=>{var e;v&&w.current&&null!==(e=y.current)&&void 0!==e&&e.scrollIntoView&&y.current.scrollIntoView({inline:"nearest",block:"nearest",behavior:b})}),[v,b]);const _=c()("components-panel__body",o,{"is-opened":v});return(0,s.createElement)("div",{className:_,ref:(0,f.useMergeRefs)([y,t])},(0,s.createElement)(qI,a({icon:i,isOpened:v,onClick:e=>{e.preventDefault();const t=!v;g(t),d(t)},title:h},n)),"function"==typeof r?r({opened:v}):v&&r)}));YI.displayName="PanelBody";var XI=YI;const ZI=(0,s.forwardRef)(((e,t)=>{let{className:n,children:r}=e;return(0,s.createElement)("div",{className:c()("components-panel__row",n),ref:t},r)}));var JI=ZI;var QI=function(e){let{icon:t,children:n,label:r,instructions:o,className:i,notices:l,preview:u,isColumnLayout:d,...p}=e;const[h,{width:m}]=(0,f.useResizeObserver)();let v;"number"==typeof m&&(v={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});const g=c()("components-placeholder",i,v),y=c()("components-placeholder__fieldset",{"is-column-layout":d});return(0,s.createElement)("div",a({},p,{className:g}),h,l,u&&(0,s.createElement)("div",{className:"components-placeholder__preview"},u),(0,s.createElement)("div",{className:"components-placeholder__label"},(0,s.createElement)(He,{icon:t}),r),(0,s.createElement)("fieldset",{className:y},!!o&&(0,s.createElement)("legend",{className:"components-placeholder__instructions"},o),n))};function eT(e){const t=e.map((e=>({children:[],parent:null,...e}))),n=(0,l.groupBy)(t,"parent");if(n.null&&n.null.length)return t;const r=e=>e.map((e=>{const t=n[e.id];return{...e,children:t&&t.length?r(t):[]}}));return r(n[0]||[])}function tT(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,l.flatMap)(e,(e=>[{value:e.id,label:(0,l.repeat)(" ",3*t)+(0,l.unescape)(e.name)},...tT(e.children||[],t+1)]))}function nT(e){let{label:t,noOptionLabel:n,onChange:r,selectedId:o,tree:i,...u}=e;const c=(0,s.useMemo)((()=>(0,l.compact)([n&&{value:"",label:n},...tT(i)])),[n,i]);return(0,s.createElement)(Sg,a({label:t,options:c,onChange:r,value:o},u))}function rT(e){let{label:t,noOptionLabel:n,categoriesList:r,selectedCategoryId:o,onChange:i,...l}=e;const u=(0,s.useMemo)((()=>eT(r)),[r]);return(0,s.createElement)(nT,a({label:t,noOptionLabel:n,onChange:i,tree:u,selectedId:o},l))}function oT(e){let{label:t,noOptionLabel:n,authorList:r,selectedAuthorId:o,onChange:i}=e;if(!r)return null;const a=eT(r);return(0,s.createElement)(nT,{label:t,noOptionLabel:n,onChange:i,tree:a,selectedId:o})}const iT=1,aT=100;function sT(e){let{authorList:t,selectedAuthorId:n,categoriesList:r,selectedCategoryId:o,categorySuggestions:i,selectedCategories:a,numberOfItems:l,order:u,orderBy:c,maxItems:f=aT,minItems:p=iT,onCategoryChange:h,onAuthorChange:m,onNumberOfItemsChange:v,onOrderChange:g,onOrderByChange:y}=e;return[g&&y&&(0,s.createElement)(Sg,{key:"query-controls-order-select",label:(0,d.__)("Order by"),value:`${c}/${u}`,options:[{label:(0,d.__)("Newest to oldest"),value:"date/desc"},{label:(0,d.__)("Oldest to newest"),value:"date/asc"},{label:(0,d.__)("A → Z"),value:"title/asc"},{label:(0,d.__)("Z → A"),value:"title/desc"}],onChange:e=>{const[t,n]=e.split("/");n!==u&&g(n),t!==c&&y(t)}}),r&&h&&(0,s.createElement)(rT,{key:"query-controls-category-select",categoriesList:r,label:(0,d.__)("Category"),noOptionLabel:(0,d.__)("All"),selectedCategoryId:o,onChange:h}),i&&h&&(0,s.createElement)(FM,{key:"query-controls-categories-select",label:(0,d.__)("Categories"),value:a&&a.map((e=>({id:e.id,value:e.name||e.value}))),suggestions:Object.keys(i),onChange:h,maxSuggestions:20}),m&&(0,s.createElement)(oT,{key:"query-controls-author-select",authorList:t,label:(0,d.__)("Author"),noOptionLabel:(0,d.__)("All"),selectedAuthorId:n,onChange:m}),v&&(0,s.createElement)(ry,{key:"query-controls-range-control",label:(0,d.__)("Number of items"),value:l,onChange:v,min:p,max:f,required:!0})]}var lT=(0,s.createContext)({state:null,setState:()=>{}});var uT=(0,s.forwardRef)((function(e,t){let{children:n,value:r,...o}=e;const i=(0,s.useContext)(lT),l=i.state===r;return(0,s.createElement)(uM,a({ref:t,as:$n,variant:l?"primary":"secondary",value:r},i,o),n||r)}));var cT=(0,s.forwardRef)((function(e,t){let{label:n,checked:r,defaultChecked:o,disabled:i,onChange:l,...u}=e;const c=GO({state:o,baseId:u.id}),d={...c,disabled:i,state:null!=r?r:c.state,setState:null!=l?l:c.setState};return(0,s.createElement)(lT.Provider,{value:d},(0,s.createElement)(XO,a({ref:t,as:Zx,"aria-label":n},c,u)))}));function dT(e){let{label:t,className:n,selected:r,help:o,onChange:i,hideLabelFromVision:u,options:d=[],...p}=e;const h=`inspector-radio-control-${(0,f.useInstanceId)(dT)}`,m=e=>i(e.target.value);return!(0,l.isEmpty)(d)&&(0,s.createElement)(gv,{label:t,id:h,hideLabelFromVision:u,help:o,className:c()(n,"components-radio-control")},d.map(((e,t)=>(0,s.createElement)("div",{key:`${h}-${t}`,className:"components-radio-control__option"},(0,s.createElement)("input",a({id:`${h}-${t}`,className:"components-radio-control__input",type:"radio",name:h,value:e.value,onChange:m,checked:e.value===r,"aria-describedby":o?`${h}__help`:void 0},p)),(0,s.createElement)("label",{htmlFor:`${h}-${t}`},e.label)))))}var fT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pT=function(){return pT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{c||(f(!1),h(!1))};(0,s.useEffect)((()=>{if(!(null!==m||null!==v))return;const e=m!==y.current,t=v!==g.current;if(e||t){if(m&&!y.current&&v&&!g.current)return y.current=m,void(g.current=v);e&&(f(!0),y.current=m),t&&(h(!0),g.current=v),r({width:m,height:v}),b.current&&DT(b.current),b.current=AT(w,n)}}),[m,v]);const _=function(e){let{axis:t,height:n,moveX:r=!1,moveY:o=!1,position:i=RT.bottom,showPx:a=!1,width:s}=e;if(!r&&!o)return;if(i===RT.corner)return`${s} x ${n}`;const l=a?" px":"";if(t){if("x"===t&&r)return`${s}${l}`;if("y"===t&&o)return`${n}${l}`}if(r&&o)return`${s} x ${n}`;if(r)return`${s}${l}`;if(o)return`${n}${l}`;return}({axis:t,height:v,moveX:d,moveY:p,position:o,showPx:i,width:m});return{label:_,resizeListener:a}}const LT=zn("div",{target:"ekdag503"})({name:"1cd7zoc",styles:"bottom:0;box-sizing:border-box;left:0;pointer-events:none;position:absolute;right:0;top:0"}),FT=zn("div",{target:"ekdag502"})({name:"ajymcs",styles:"align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity 120ms linear"}),jT=zn("div",{target:"ekdag501"})("background:",Bo.ui.border,";border-radius:2px;box-sizing:border-box;font-size:12px;color:",Bo.ui.textDark,";padding:4px 8px;position:relative;"),BT=zn(ah,{target:"ekdag500"})("&&&{color:",Bo.ui.textDark,";display:block;font-size:13px;line-height:1.4;white-space:nowrap;}");const zT=(0,s.forwardRef)((function(e,t){let{label:n,position:r=RT.corner,zIndex:o=1e3,...i}=e;const l=!!n,u=r===RT.bottom,c=r===RT.corner;if(!l)return null;let f={opacity:l?1:void 0,zIndex:o},p={};return u&&(f={...f,position:"absolute",bottom:-10,left:"50%",transform:"translate(-50%, 0)"},p={transform:"translate(0, 100%)"}),c&&(f={...f,position:"absolute",top:4,right:(0,d.isRTL)()?void 0:4,left:(0,d.isRTL)()?4:void 0}),(0,s.createElement)(FT,a({"aria-hidden":"true",className:"components-resizable-tooltip__tooltip-wrapper",ref:t,style:f},i),(0,s.createElement)(jT,{className:"components-resizable-tooltip__tooltip",style:p},(0,s.createElement)(BT,{as:"span"},n)))}));var VT=zT;const HT=(0,s.forwardRef)((function(e,t){let{axis:n,className:r,fadeTimeout:o=180,isVisible:i=!0,labelRef:u,onResize:d=l.noop,position:f=RT.bottom,showPx:p=!0,zIndex:h=1e3,...m}=e;const{label:v,resizeListener:g}=NT({axis:n,fadeTimeout:o,onResize:d,showPx:p,position:f});if(!i)return null;const y=c()("components-resize-tooltip",r);return(0,s.createElement)(LT,a({"aria-hidden":"true",className:y,ref:t},m),g,(0,s.createElement)(VT,{"aria-hidden":m["aria-hidden"],label:v,position:f,ref:u,zIndex:h}))}));var WT=HT;const UT="components-resizable-box__handle",$T="components-resizable-box__side-handle",KT="components-resizable-box__corner-handle",GT={top:c()(UT,$T,"components-resizable-box__handle-top"),right:c()(UT,$T,"components-resizable-box__handle-right"),bottom:c()(UT,$T,"components-resizable-box__handle-bottom"),left:c()(UT,$T,"components-resizable-box__handle-left"),topLeft:c()(UT,KT,"components-resizable-box__handle-top","components-resizable-box__handle-left"),topRight:c()(UT,KT,"components-resizable-box__handle-top","components-resizable-box__handle-right"),bottomRight:c()(UT,KT,"components-resizable-box__handle-bottom","components-resizable-box__handle-right"),bottomLeft:c()(UT,KT,"components-resizable-box__handle-bottom","components-resizable-box__handle-left")},qT={width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},YT={top:qT,right:qT,bottom:qT,left:qT,topLeft:qT,topRight:qT,bottomRight:qT,bottomLeft:qT};var XT=(0,s.forwardRef)((function(e,t){let{className:n,children:r,showHandle:o=!0,__experimentalShowTooltip:i=!1,__experimentalTooltipProps:l={},...u}=e;return(0,s.createElement)(TT,a({className:c()("components-resizable-box__container",o&&"has-show-handle",n),handleClasses:GT,handleStyles:YT,ref:t},u),r,i&&(0,s.createElement)(WT,l))}));var ZT=function(e){let{naturalWidth:t,naturalHeight:n,children:r,isInline:o=!1}=e;const[i,{width:a}]=(0,f.useResizeObserver)();if(1!==s.Children.count(r))return null;const l={paddingBottom:t0&&void 0!==arguments[0]&&arguments[0];if(!h())return;const{contentDocument:a,ownerDocument:u}=l.current,{body:c}=a;if(!e&&null!==c.getAttribute("data-resizable-iframe-connected"))return;const d=(0,s.createElement)("html",{lang:u.documentElement.lang,className:r},(0,s.createElement)("head",null,(0,s.createElement)("title",null,n),(0,s.createElement)("style",{dangerouslySetInnerHTML:{__html:QT}}),o.map(((e,t)=>(0,s.createElement)("style",{key:t,dangerouslySetInnerHTML:{__html:e}})))),(0,s.createElement)("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:r},(0,s.createElement)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,s.createElement)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:JT}}),i.map((e=>(0,s.createElement)("script",{key:e,src:e})))));a.open(),a.write(""+(0,s.renderToString)(d)),a.close()}return(0,s.useEffect)((()=>{function e(){m(!1)}function t(e){const t=l.current;if(!t||t.contentWindow!==e.source)return;let n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}"resize"===n.action&&(c(n.width),p(n.height))}m();const{ownerDocument:n}=l.current,{defaultView:r}=n;return l.current.addEventListener("load",e,!1),r.addEventListener("message",t),()=>{var n;null===(n=l.current)||void 0===n||n.removeEventListener("load",e,!1),r.addEventListener("message",t)}}),[]),(0,s.useEffect)((()=>{m()}),[n,r,o,i]),(0,s.useEffect)((()=>{m(!0)}),[t]),(0,s.createElement)("iframe",{ref:(0,f.useMergeRefs)([l,(0,f.useFocusableIframe)()]),title:n,className:"components-sandbox",sandbox:"allow-scripts allow-same-origin allow-presentation",onFocus:a,width:Math.ceil(u),height:Math.ceil(d)})}var tD=(0,s.forwardRef)((function(e,t){let{className:n,children:r,spokenMessage:o=r,politeness:i="polite",actions:a=[],onRemove:u=l.noop,icon:f=null,explicitDismiss:p=!1,onDismiss:h=l.noop,listRef:m}=e;function v(e){e&&e.preventDefault&&e.preventDefault(),m.current.focus(),h(),u()}h=h||l.noop,function(e,t){const n="string"==typeof e?e:(0,s.renderToString)(e);(0,s.useEffect)((()=>{n&&(0,nv.speak)(n,t)}),[n,t])}(o,i),(0,s.useEffect)((()=>{const e=setTimeout((()=>{p||(h(),u())}),1e4);return()=>clearTimeout(e)}),[h,u]);const g=c()(n,"components-snackbar",{"components-snackbar-explicit-dismiss":!!p});a&&a.length>1&&("undefined"!=typeof process&&process.env,a=[a[0]]);const y=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return(0,s.createElement)("div",{ref:t,className:g,onClick:p?l.noop:v,tabIndex:"0",role:p?"":"button",onKeyPress:p?l.noop:v,"aria-label":p?"":(0,d.__)("Dismiss this notice")},(0,s.createElement)("div",{className:y},f&&(0,s.createElement)("div",{className:"components-snackbar__icon"},f),r,a.map(((e,t)=>{let{label:n,onClick:r,url:o}=e;return(0,s.createElement)($n,{key:t,href:o,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),u(),t&&t(e)}(e,r),className:"components-snackbar__action"},n)})),p&&(0,s.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:v,onKeyPress:v},"✕")))}));const nD={init:{height:0,opacity:0},open:{height:"auto",opacity:1,transition:{height:{stiffness:1e3,velocity:-100}}},exit:{opacity:0,transition:{duration:.5}}},rD={init:!1,open:!1,exit:!1};var oD=function(e){let{notices:t,className:n,children:r,onRemove:o=l.noop}=e;const i=(0,s.useRef)(),u=(0,f.useReducedMotion)();n=c()("components-snackbar-list",n);const d=e=>()=>o(e.id);return(0,s.createElement)("div",{className:n,tabIndex:-1,ref:i},r,(0,s.createElement)(cP,null,t.map((e=>(0,s.createElement)(lp.div,{layout:!u,initial:"init",animate:"open",exit:"exit",key:e.id,variants:u?rD:nD},(0,s.createElement)("div",{className:"components-snackbar-list__notice-container"},(0,s.createElement)(tD,a({},(0,l.omit)(e,["content"]),{onRemove:d(e),listRef:i}),e.content)))))))};const iD=(function(){var e=Xr.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}})` from { transform: rotate(0deg); } to { transform: rotate(360deg); } - `,aD=Vn("svg",{target:"e1bj2jdf2"})("width:",$p.spinnerSize,"px;height:",$p.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:var( --wp-admin-theme-color );overflow:visible;"),sD={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},lD=Vn("circle",{target:"e1bj2jdf1"})(sD,";stroke:",zo.gray[300],";"),uD=Vn("path",{target:"e1bj2jdf0"})(sD,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",iD,";");function cD(e){let{className:t,...n}=e;return(0,s.createElement)(aD,a({className:c()("components-spinner",t),viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false"},n),(0,s.createElement)(lD,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,s.createElement)(uD,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"}))}var dD=On((function(e,t){const n=OE(e);return(0,s.createElement)(Wn,a({},n,{ref:t}))}),"Surface");const fD=e=>{let{tabId:t,onClick:n,children:r,selected:o,...i}=e;return(0,s.createElement)(Kn,a({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:t,onClick:n},i),r)};function pD(e){var t;let{className:n,children:r,tabs:o,initialTabName:i,orientation:a="horizontal",activeClass:u="is-active",onSelect:d=l.noop}=e;const p=(0,f.useInstanceId)(pD,"tab-panel"),[h,m]=(0,s.useState)(null),v=e=>{m(e),d(e)},g=(0,l.find)(o,{name:h}),y=`${p}-${null!==(t=null==g?void 0:g.name)&&void 0!==t?t:"none"}`;return(0,s.useEffect)((()=>{(0,l.find)(o,{name:h})||m(i||(o.length>0?o[0].name:null))}),[o]),(0,s.createElement)("div",{className:n},(0,s.createElement)(Xk,{role:"tablist",orientation:a,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},o.map((e=>(0,s.createElement)(fD,{className:c()("components-tab-panel__tabs-item",e.className,{[u]:e.name===h}),tabId:`${p}-${e.name}`,"aria-controls":`${p}-${e.name}-view`,selected:e.name===h,key:e.name,onClick:(0,l.partial)(v,e.name)},e.title)))),g&&(0,s.createElement)("div",{key:y,"aria-labelledby":y,role:"tabpanel",id:`${y}-view`,className:"components-tab-panel__tab-content"},r(g)))}var hD=(0,s.forwardRef)((function e(t,n){let{label:r,hideLabelFromVision:o,value:i,help:l,className:u,onChange:c,type:d="text",...p}=t;const h=`inspector-text-control-${(0,f.useInstanceId)(e)}`;return(0,s.createElement)(gv,{label:r,hideLabelFromVision:o,id:h,help:l,className:u},(0,s.createElement)("input",a({className:"components-text-control__input",type:d,id:h,value:i,onChange:e=>c(e.target.value),"aria-describedby":l?h+"__help":void 0,ref:n},p)))}));const mD=Zr("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",$p.radiusBlockUi,";border:",$p.borderWidth," solid ",zo.ui.border,";",""),vD=Zr("border-color:var( --wp-admin-theme-color );box-shadow:0 0 0 calc( ",$p.borderWidthFocus," - ",$p.borderWidth," ) var( --wp-admin-theme-color );outline:2px solid transparent;","");var gD={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"};const yD=Zr("font-family:",lv("default.fontFamily"),";padding:6px 8px;",mD,";font-size:",lv("mobileTextMinFontSize"),";line-height:normal;",`@media (min-width: ${gD["small"]})`,"{font-size:",lv("default.fontSize"),";line-height:normal;}&:focus{",vD,";}&::-webkit-input-placeholder{color:",zo.darkGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",zo.darkGray.placeholder,";}&:-ms-input-placeholder{color:",zo.darkGray.placeholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",zo.lightGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",zo.lightGray.placeholder,";}&:-ms-input-placeholder{color:",zo.lightGray.placeholder,";}}","");const bD=Vn("textarea",{target:"ebk7yr50"})("width:100%;",yD,";");function wD(e){let{label:t,hideLabelFromVision:n,value:r,help:o,onChange:i,rows:l=4,className:u,...c}=e;const d=`inspector-textarea-control-${(0,f.useInstanceId)(wD)}`;return(0,s.createElement)(gv,{label:t,hideLabelFromVision:n,id:d,help:o,className:u},(0,s.createElement)(bD,a({className:"components-textarea-control__input",id:d,rows:l,onChange:e=>i(e.target.value),"aria-describedby":o?d+"__help":void 0,value:r},c)))}var _D=e=>{let{text:t="",highlight:n=""}=e;const r=n.trim();if(!r)return t;const o=new RegExp(`(${(0,l.escapeRegExp)(r)})`,"gi");return(0,s.createInterpolateElement)(t.replace(o,"$&"),{mark:(0,s.createElement)("mark",null)})};var xD=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}));var ED=function(e){return(0,s.createElement)("div",{className:"components-tip"},(0,s.createElement)(wg,{icon:xD}),(0,s.createElement)("p",null,e.children))};function kD(e){let{label:t,checked:n,help:r,className:o,onChange:i,disabled:a}=e;const u=`inspector-toggle-control-${(0,f.useInstanceId)(kD)}`;let d,p;return r&&(d=u+"__help",p=(0,l.isFunction)(r)?r(n):r),(0,s.createElement)(gv,{id:u,help:p,className:c()("components-toggle-control",o)},(0,s.createElement)(DM,{id:u,checked:n,onChange:function(e){i(e.target.checked)},"aria-describedby":d,disabled:a}),(0,s.createElement)("label",{htmlFor:u,className:"components-toggle-control__label"},t))}function SD(e){const{icon:t,...n}=e;return(0,s.createElement)(_M,n,(0,s.createElement)(wg,{icon:t}))}var CD=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],PD=CD,OD=B({as:"button",memo:!0,useHook:V({name:"ToolbarItem",compose:De,keys:PD})});var MD=(0,s.createContext)();var ID=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useContext)(MD);if("function"!=typeof n&&!r)return"undefined"!=typeof process&&process.env,null;const l={...o,ref:t,"data-toolbar-item":!0};return i?(0,s.createElement)(OD,a({},i,l,{as:r}),n):r?(0,s.createElement)(r,l,n):n(l)}));var TD=e=>(0,s.createElement)("div",{className:e.className},e.children);var DD=(0,s.forwardRef)((function(e,t){let{containerClassName:n,className:r,extraProps:o,children:i,title:l,isActive:u,isDisabled:d,...f}=e;return(0,s.useContext)(MD)?(0,s.createElement)(ID,a({className:c()("components-toolbar-button",r)},o,f,{ref:t}),(e=>(0,s.createElement)(Kn,a({label:l,isPressed:u,disabled:d},e),i))):(0,s.createElement)(TD,{className:n},(0,s.createElement)(Kn,a({ref:t,icon:f.icon,label:l,shortcut:f.shortcut,"data-subscript":f.subscript,onClick:e=>{e.stopPropagation(),f.onClick&&f.onClick(e)},className:c()("components-toolbar__control",r),isPressed:u,disabled:d,"data-toolbar-item":!0},o,f),i))}));var AD=e=>{let{className:t,children:n,...r}=e;return(0,s.createElement)("div",a({className:t},r),n)};var RD=function(e){let{controls:t=[],toggleProps:n,...r}=e;const o=e=>(0,s.createElement)(Jk,a({controls:t,toggleProps:{...e,"data-toolbar-item":!0}},r));return(0,s.useContext)(MD)?(0,s.createElement)(ID,n,o):o(n)};var ND=function(e){let{controls:t=[],children:n,className:r,isCollapsed:o,title:i,...u}=e;const d=(0,s.useContext)(MD);if(!(t&&t.length||n))return null;const f=c()(d?"components-toolbar-group":"components-toolbar",r);let p=t;return Array.isArray(p[0])||(p=[p]),o?(0,s.createElement)(RD,a({label:i,controls:p,className:f,children:n},u)):(0,s.createElement)(AD,a({className:f},u),(0,l.flatMap)(p,((e,t)=>e.map(((e,n)=>(0,s.createElement)(DD,a({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),n)};var LD=V({name:"Toolbar",compose:Pi,keys:CD,useProps:function(e,t){return m({role:"toolbar","aria-orientation":e.orientation},t)}}),FD=B({as:"div",useHook:LD,useCreateElement:function(e,t,n){return M(e,t,n)}});var jD=(0,s.forwardRef)((function(e,t){let{label:n,...r}=e;const o=function(e){void 0===e&&(e={});var t=Xo(e),n=t.orientation;return yi(m({orientation:void 0===n?"horizontal":n},v(t,["orientation"])))}({loop:!0,baseId:r.id,rtl:(0,d.isRTL)()});return(0,s.createElement)(MD.Provider,{value:o},(0,s.createElement)(FD,a({ref:t,"aria-label":n},o,r)))}));var BD=(0,s.forwardRef)((function(e,t){let{className:n,label:r,...o}=e;if(!r)return ze()("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,s.createElement)(ND,a({},o,{className:n}));const i=c()("components-accessible-toolbar",n);return(0,s.createElement)(jD,a({className:i,label:r,ref:t},o))}));var zD=(0,s.forwardRef)((function(e,t){return(0,s.useContext)(MD)?(0,s.createElement)(ID,a({ref:t},e.toggleProps),(t=>(0,s.createElement)(Jk,a({},e,{popoverProps:{isAlternate:!0,...e.popoverProps},toggleProps:t})))):(0,s.createElement)(Jk,e)}));const VD={spacing:Zr("column-gap:",xp(4),";row-gap:",xp(6),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},HD=Zr(VD.spacing,";border-top:",$p.borderWidth," solid ",zo.gray[300],";margin-top:-1px;padding:",xp(4),";",""),WD={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},UD=Zr(VD.item.fullWidth," gap:",xp(2),";.components-dropdown-menu{margin:",xp(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",xp(6),";}",""),$D={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},KD=Zr(VD.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",uv,"{margin-bottom:0;",cv,":last-child{margin-bottom:0;}}",hv,"{margin-bottom:0;}&& ",xh,"{label{line-height:1.4em;}}.components-custom-select-control__label,",fv,"{line-height:1.4em;}",""),GD={name:"eivff4",styles:"display:none"},qD={name:"16gsvie",styles:"min-width:200px"},YD=()=>{},XD=(0,s.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:YD,deregisterPanelItem:YD,flagItemCustomization:YD,areAllOptionalControlsHidden:!0}),ZD=()=>(0,s.useContext)(XD);const JD=()=>{},QD=e=>{let{items:t,onClose:n,toggleItem:r}=e;return t.length?(0,s.createElement)(KM,null,t.map((e=>{let[t,o]=e;const i=o?YE:o_,a=o?(0,d.sprintf)((0,d.__)("Reset %s"),t):void 0;return(0,s.createElement)(GM,{key:t,icon:i,isSelected:!0,disabled:!o,label:a,onClick:()=>{r(t),n()},role:"menuitemcheckbox"},t)}))):null},eA=e=>{let{items:t,onClose:n,toggleItem:r}=e;return t.length?(0,s.createElement)(KM,null,t.map((e=>{let[t,o]=e;const i=o?(0,d.sprintf)((0,d.__)("Hide and reset %s"),t):(0,d.sprintf)((0,d.__)("Show %s"),t);return(0,s.createElement)(GM,{key:t,icon:o&&o_,isSelected:o,label:i,onClick:()=>{r(t),n()},role:"menuitemcheckbox"},t)}))):null},tA=On(((e,t)=>{const{areAllOptionalControlsHidden:n,dropdownMenuClassName:r,hasMenuItems:o,headingClassName:i,label:l,menuItems:u,resetAll:c,toggleItem:f,...p}=function(e){const{className:t,...n}=Pn(e,"ToolsPanelHeader"),r=Cn(),o=(0,s.useMemo)((()=>r(UD,t)),[t,r]),i=(0,s.useMemo)((()=>r(qD)),[r]),a=(0,s.useMemo)((()=>r($D)),[r]),{menuItems:l,hasMenuItems:u,areAllOptionalControlsHidden:c}=ZD();return{...n,areAllOptionalControlsHidden:c,dropdownMenuClassName:i,hasMenuItems:u,headingClassName:a,menuItems:l,className:o}}(e);if(!l)return null;const h=Object.entries((null==u?void 0:u.default)||{}),m=Object.entries((null==u?void 0:u.optional)||{}),v=n?JE:QE,g=n?(0,d._x)("View and add options","Button label to reveal tool panel options"):(0,d._x)("View options","Button label to reveal tool panel options");return(0,s.createElement)(bg,a({},p,{ref:t}),(0,s.createElement)(l_,{level:2,className:i},l),o&&(0,s.createElement)(Jk,{icon:v,label:g,menuProps:{className:r},toggleProps:{isSmall:!0}},(e=>{let{onClose:t=JD}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(QD,{items:h,onClose:t,toggleItem:f}),(0,s.createElement)(eA,{items:m,onClose:t,toggleItem:f}),(0,s.createElement)(KM,null,(0,s.createElement)(GM,{variant:"tertiary",onClick:()=>{c(),t()}},(0,d.__)("Reset all"))))})))}),"ToolsPanelHeader");var nA=tA;const rA=e=>{let{panelItems:t,shouldReset:n,currentMenuItems:r}=e;const o={default:{},optional:{}};return t.forEach((e=>{var t;let{hasValue:i,isShownByDefault:a,label:s}=e;const l=a?"default":"optional",u=null==r||null===(t=r[l])||void 0===t?void 0:t[s],c=void 0!==u?u:i();o[l][s]=!n&&c})),o},oA=e=>e&&0===Object.keys(e).length;function iA(e){const{className:t,resetAll:n,panelId:r,hasInnerWrapper:o,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l,...u}=Pn(e,"ToolsPanel"),c=(0,s.useRef)(!1),d=c.current;(0,s.useEffect)((()=>{d&&(c.current=!1)}),[d]);const[f,p]=(0,s.useState)([]),h=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e.label));return-1!==r&&n.splice(r,1),[...n,e]}))}),[p]),m=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e));return-1!==r&&n.splice(r,1),n}))}),[p]),[v,g]=(0,s.useState)({default:{},optional:{}});(0,s.useEffect)((()=>{g((e=>rA({panelItems:f,shouldReset:!1,currentMenuItems:e})))}),[rA,f,g]);const y=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";g((n=>({...n,[t]:{...n[t],[e]:!0}})))}),[g]),[b,w]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(oA(null==v?void 0:v.default)&&!oA(null==v?void 0:v.optional)){const e=!Object.entries(v.optional).some((e=>{let[,t]=e;return t}));w(e)}}),[v,w]);const _=Cn(),x=(0,s.useMemo)((()=>{const e=o&&Zr(">div:not( :first-of-type ){display:grid;grid-template-columns:",`repeat( ${2}, 1fr )`,";",VD.spacing," ",VD.item.fullWidth,";}","");const n=oA(null==v?void 0:v.default)&&b&&WD;return _(HD,e,n,t)}),[b,t,_,o,v]),E=(0,s.useCallback)((e=>{const t=f.find((t=>t.label===e));if(!t)return;const n=t.isShownByDefault?"default":"optional",r={...v,[n]:{...v[n],[e]:!v[n][e]}};g(r)}),[v,f,g]),k=(0,s.useCallback)((()=>{if("function"==typeof n){c.current=!0;const e=[];f.forEach((t=>{t.resetAllFilter&&e.push(t.resetAllFilter)})),n(e)}const e=rA({panelItems:f,shouldReset:!0});g(e)}),[rA,c.current,f,n,g]),S=e=>{const t=v.optional||{},n=e.find((e=>e.isShownByDefault||!!t[e.label]));return null==n?void 0:n.label},C=S(f),P=S([...f].reverse());return{...u,panelContext:(0,s.useMemo)((()=>({areAllOptionalControlsHidden:b,deregisterPanelItem:m,firstDisplayedItem:C,flagItemCustomization:y,hasMenuItems:!!f.length,isResetting:c.current,lastDisplayedItem:P,menuItems:v,panelId:r,registerPanelItem:h,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l})),[b,m,C,y,c.current,P,v,r,f,h,i,a,l]),resetAllItems:k,toggleItem:E,className:x}}var aA=On(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:l,...u}=iA(e);return(0,s.createElement)(j_,a({},u,{columns:2,ref:t}),(0,s.createElement)(XD.Provider,{value:o},(0,s.createElement)(nA,{label:r,resetAll:i,toggleItem:l}),n))}),"ToolsPanel");var sA=On(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){var t,n;const{className:r,hasValue:o,isShownByDefault:i,label:a,panelId:l,resetAllFilter:u,onDeselect:c,onSelect:d,...p}=Pn(e,"ToolsPanelItem"),{panelId:h,menuItems:m,registerPanelItem:v,deregisterPanelItem:g,flagItemCustomization:y,isResetting:b,shouldRenderPlaceholderItems:w,firstDisplayedItem:_,lastDisplayedItem:x,__experimentalFirstVisibleItemClass:E,__experimentalLastVisibleItemClass:k}=ZD(),S=(0,s.useCallback)(o,[l]),C=(0,s.useCallback)(u,[l]),P=(0,f.usePrevious)(h),O=h===l||null===h;(0,s.useEffect)((()=>(O&&null!==P&&v({hasValue:S,isShownByDefault:i,label:a,resetAllFilter:C,panelId:l}),()=>{(null===P&&h||h===l)&&g(a)})),[h,O,i,a,S,l,P,C]);const M=o(),I=(0,f.usePrevious)(M);(0,s.useEffect)((()=>{i&&M&&!I&&y(a)}),[M,I,i,a]);const T=i?"default":"optional",D=null==m||null===(t=m[T])||void 0===t?void 0:t[a],A=(0,f.usePrevious)(D);(0,s.useEffect)((()=>{!b&&O&&(!D||M||A||null==d||d(),!D&&A&&(null==c||c()))}),[O,D,b,M,A]);const R=i?void 0!==(null==m||null===(n=m[T])||void 0===n?void 0:n[a]):D,N=Cn(),L=(0,s.useMemo)((()=>N(KD,w&&!R&&GD,r,_===a&&E,x===a&&k)),[R,w,r,N,_,x,E,k]);return{...p,isShown:R,shouldRenderPlaceholder:w,className:L}}(e);return r?(0,s.createElement)(Wn,a({},i,{ref:t}),n):o?(0,s.createElement)(Wn,a({},i,{ref:t})):null}),"ToolsPanelItem");const lA=(0,s.createContext)(),uA=lA.Provider;function cA(e){let{children:t}=e;const[n,r]=(0,s.useState)(),o=(0,s.useMemo)((()=>({lastFocusedElement:n,setLastFocusedElement:r})),[n]);return(0,s.createElement)(uA,{value:o},t)}function dA(e){const t=Re.focus.focusable.find(e,{sequential:!0});if(t&&t.length)return t.filter((t=>t.closest('[role="row"]')===e))}var fA=(0,s.forwardRef)((function(e,t){let{children:n,onExpandRow:r=(()=>{}),onCollapseRow:o=(()=>{}),onFocusRow:i=(()=>{}),...u}=e;const c=(0,s.useCallback)((e=>{const{keyCode:t,metaKey:n,ctrlKey:a,altKey:s}=e;if(n||a||s||!(0,l.includes)([ev.UP,ev.DOWN,ev.LEFT,ev.RIGHT,ev.HOME,ev.END],t))return;e.stopPropagation();const{activeElement:u}=document,{currentTarget:c}=e;if(!c.contains(u))return;const d=u.closest('[role="row"]'),f=dA(d),p=f.indexOf(u),h=0===p,m=h&&"false"===d.getAttribute("aria-expanded")&&t===ev.RIGHT;if((0,l.includes)([ev.LEFT,ev.RIGHT],t)){let n;if(n=t===ev.LEFT?Math.max(0,p-1):Math.min(p+1,f.length-1),h){if(t===ev.LEFT){var v,g,y;if("true"===d.getAttribute("aria-expanded"))return o(d),void e.preventDefault();const t=Math.max(parseInt(null!==(v=null==d?void 0:d.getAttribute("aria-level"))&&void 0!==v?v:1,10)-1,1),n=Array.from(c.querySelectorAll('[role="row"]'));let r=d;for(let e=n.indexOf(d);e>=0;e--)if(parseInt(n[e].getAttribute("aria-level"),10)===t){r=n[e];break}null===(g=dA(r))||void 0===g||null===(y=g[0])||void 0===y||y.focus()}if(t===ev.RIGHT){if("false"===d.getAttribute("aria-expanded"))return r(d),void e.preventDefault();const t=dA(d);var b;if(t.length>0)null===(b=t[t.length-1])||void 0===b||b.focus()}return void e.preventDefault()}if(m)return;f[n].focus(),e.preventDefault()}else if((0,l.includes)([ev.UP,ev.DOWN],t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(d);let o;if(o=t===ev.UP?Math.max(0,r-1):Math.min(r+1,n.length-1),o===r)return void e.preventDefault();const a=dA(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(p,a.length-1)].focus(),i(e,d,n[o]),e.preventDefault()}else if((0,l.includes)([ev.HOME,ev.END],t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(d);let o;if(o=t===ev.HOME?0:n.length-1,o===r)return void e.preventDefault();const a=dA(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(p,a.length-1)].focus(),i(e,d,n[o]),e.preventDefault()}}),[r,o,i]);return(0,s.createElement)(cA,null,(0,s.createElement)("table",a({},u,{role:"treegrid",onKeyDown:c,ref:t}),(0,s.createElement)("tbody",null,n)))}));var pA=(0,s.forwardRef)((function(e,t){let{children:n,level:r,positionInSet:o,setSize:i,isExpanded:l,...u}=e;return(0,s.createElement)("tr",a({},u,{ref:t,role:"row","aria-level":r,"aria-posinset":o,"aria-setsize":i,"aria-expanded":l}),n)})),hA=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useRef)(),a=t||i,{lastFocusedElement:l,setLastFocusedElement:u}=(0,s.useContext)(lA);let c;l&&(c=l===a.current?0:-1);const d={ref:a,tabIndex:c,onFocus:e=>u(e.target),...o};return"function"==typeof n?n(d):(0,s.createElement)(r,d,n)})),mA=(0,s.forwardRef)((function(e,t){let{children:n,...r}=e;return(0,s.createElement)(hA,a({ref:t},r),n)})),vA=(0,s.forwardRef)((function(e,t){let{children:n,withoutGridItem:r=!1,...o}=e;return(0,s.createElement)("td",a({},o,{role:"gridcell"}),r?n:(0,s.createElement)(mA,{ref:t},n))}));function gA(e){e.stopPropagation()}var yA=(0,s.forwardRef)(((e,t)=>{let{children:n,...r}=e;return ze()("wp.components.IsolatedEventContainer",{since:"5.7"}),(0,s.createElement)("div",a({},r,{ref:t,onMouseDown:gA}),n)}));const bA=Vn("div",{target:"ebn2ljm1"})({name:"5ob2ly",styles:"display:flex;position:relative"}),wA=Vn("div",{target:"ebn2ljm0"})((e=>{let{isLayered:t,offsetAmount:n}=e;return Zr(t?Mp({marginLeft:n})():Mp({right:-1*n})(),"","")})," ",(e=>{let{isLayered:t}=e;return t?_A:xA})," ",(e=>{let{zIndex:t}=e;return Zr({zIndex:t},"","")}),";"),_A={name:"a4hmbt",styles:"position:absolute"},xA={name:"bjn8wh",styles:"position:relative"};var EA=On((function(e,t){const{children:n,className:r,isLayered:o=!0,isReversed:i=!1,offset:l=0,...u}=Pn(e,"ZStack"),c=gg(n),d=c.length-1,f=c.map(((e,t)=>{const n=i?d-t:t,r=l*t,a=(0,s.isValidElement)(e)?e.key:t;return(0,s.createElement)(wA,{isLayered:o,offsetAmount:r,zIndex:n,key:a},e)}));return(0,s.createElement)(bA,a({},u,{className:r,ref:t}),f)}),"ZStack");const kA={previous:[{modifier:"ctrlShift",character:"`"},{modifier:"access",character:"p"}],next:[{modifier:"ctrl",character:"`"},{modifier:"access",character:"n"}]};function SA(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kA;const t=(0,s.useRef)(),[n,r]=(0,s.useState)(!1);function o(e){const n=Array.from(t.current.querySelectorAll('[role="region"]'));if(!n.length)return;let o=n[0];const i=n.indexOf(t.current.ownerDocument.activeElement);if(-1!==i){let t=i+e;t=-1===t?n.length-1:t,t=t===n.length?0:t,o=n[t]}o.focus(),r(!0)}const i=(0,f.useRefEffect)((e=>{function t(){r(!1)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[r]);return{ref:(0,f.useMergeRefs)([t,i]),className:n?"is-focusing-regions":"",onKeyDown(t){e.previous.some((e=>{let{modifier:n,character:r}=e;return ev.isKeyboardEvent[n](t,r)}))?o(-1):e.next.some((e=>{let{modifier:n,character:r}=e;return ev.isKeyboardEvent[n](t,r)}))&&o(1)}}}var CA=(0,f.createHigherOrderComponent)((e=>t=>{let{shortcuts:n,...r}=t;return(0,s.createElement)("div",SA(n),(0,s.createElement)(e,r))}),"navigateRegions");var PA=(0,f.createHigherOrderComponent)((e=>function(t){const n=(0,f.useConstrainedTabbing)();return(0,s.createElement)("div",{ref:n,tabIndex:"-1"},(0,s.createElement)(e,t))}),"withConstrainedTabbing"),OA=e=>(0,f.createHigherOrderComponent)((t=>class extends s.Component{constructor(){super(...arguments),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){const{grabStylesCompleted:t,fallbackStyles:n}=this.state;if(this.nodeRef&&!t){const t=e(this.nodeRef,this.props);(0,l.isEqual)(t,n)||this.setState({fallbackStyles:t,grabStylesCompleted:!!(0,l.every)(t)})}}render(){const e=(0,s.createElement)(t,a({},this.props,this.state.fallbackStyles));return this.props.node?e:(0,s.createElement)("div",{ref:this.bindRef}," ",e," ")}}),"withFallbackStyles"),MA=window.wp.hooks;function IA(e){return(0,f.createHigherOrderComponent)((t=>{const n="core/with-filters/"+e;let r;class o extends s.Component{constructor(){super(...arguments),void 0===r&&(r=(0,MA.applyFilters)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,MA.addAction)("hookRemoved",n,a),(0,MA.addAction)("hookAdded",n,a))}componentWillUnmount(){o.instances=(0,l.without)(o.instances,this),0===o.instances.length&&((0,MA.removeAction)("hookRemoved",n),(0,MA.removeAction)("hookAdded",n))}render(){return(0,s.createElement)(r,this.props)}}o.instances=[];const i=(0,l.debounce)((()=>{r=(0,MA.applyFilters)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function a(t){t===e&&i()}return o}),"withFilters")}var TA=(0,f.createHigherOrderComponent)((e=>{const t=function(){let{onFocusReturn:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>n=>{const r=(0,f.useFocusReturn)(e);return(0,s.createElement)("div",{ref:r},(0,s.createElement)(t,n))}};if((n=e)instanceof s.Component||"function"==typeof n){const n=e;return t()(n)}var n;return t(e)}),"withFocusReturn");const DA=e=>{let{children:t}=e;return ze()("wp.components.FocusReturnProvider component",{since:"5.7",hint:"This provider is not used anymore. You can just remove it from your codebase"}),t};var AA=(0,f.createHigherOrderComponent)((e=>{function t(t,r){const[o,i]=(0,s.useState)([]),l=(0,s.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:pr()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),u={...t,noticeList:o,noticeOperations:l,noticeUI:o.length>0&&(0,s.createElement)(UI,{className:"components-with-notices-ui",notices:o,onRemove:l.removeNotice})};return n?(0,s.createElement)(e,a({},u,{ref:r})):(0,s.createElement)(e,u)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,s.forwardRef)(t)):t}))}(),(window.wp=window.wp||{}).components=r}(); \ No newline at end of file + `,aD=zn("svg",{target:"e1bj2jdf2"})("width:",Up.spinnerSize,"px;height:",Up.spinnerSize,"px;display:inline-block;margin:5px 11px 0;position:relative;color:var( --wp-admin-theme-color );overflow:visible;"),sD={name:"9s4963",styles:"fill:transparent;stroke-width:1.5px"},lD=zn("circle",{target:"e1bj2jdf1"})(sD,";stroke:",Bo.gray[300],";"),uD=zn("path",{target:"e1bj2jdf0"})(sD,";stroke:currentColor;stroke-linecap:round;transform-origin:50% 50%;animation:1.4s linear infinite both ",iD,";");function cD(e){let{className:t,...n}=e;return(0,s.createElement)(aD,a({className:c()("components-spinner",t),viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",role:"presentation",focusable:"false"},n),(0,s.createElement)(lD,{cx:"50",cy:"50",r:"50",vectorEffect:"non-scaling-stroke"}),(0,s.createElement)(uD,{d:"m 50 0 a 50 50 0 0 1 50 50",vectorEffect:"non-scaling-stroke"}))}var dD=On((function(e,t){const n=OE(e);return(0,s.createElement)(Hn,a({},n,{ref:t}))}),"Surface");const fD=e=>{let{tabId:t,onClick:n,children:r,selected:o,...i}=e;return(0,s.createElement)($n,a({role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:t,onClick:n},i),r)};function pD(e){var t;let{className:n,children:r,tabs:o,initialTabName:i,orientation:a="horizontal",activeClass:u="is-active",onSelect:d=l.noop}=e;const p=(0,f.useInstanceId)(pD,"tab-panel"),[h,m]=(0,s.useState)(null),v=e=>{m(e),d(e)},g=(0,l.find)(o,{name:h}),y=`${p}-${null!==(t=null==g?void 0:g.name)&&void 0!==t?t:"none"}`;return(0,s.useEffect)((()=>{(0,l.find)(o,{name:h})||m(i||(o.length>0?o[0].name:null))}),[o]),(0,s.createElement)("div",{className:n},(0,s.createElement)(Xk,{role:"tablist",orientation:a,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},o.map((e=>(0,s.createElement)(fD,{className:c()("components-tab-panel__tabs-item",e.className,{[u]:e.name===h}),tabId:`${p}-${e.name}`,"aria-controls":`${p}-${e.name}-view`,selected:e.name===h,key:e.name,onClick:(0,l.partial)(v,e.name)},e.title)))),g&&(0,s.createElement)("div",{key:y,"aria-labelledby":y,role:"tabpanel",id:`${y}-view`,className:"components-tab-panel__tab-content"},r(g)))}var hD=(0,s.forwardRef)((function e(t,n){let{label:r,hideLabelFromVision:o,value:i,help:l,className:u,onChange:c,type:d="text",...p}=t;const h=`inspector-text-control-${(0,f.useInstanceId)(e)}`;return(0,s.createElement)(gv,{label:r,hideLabelFromVision:o,id:h,help:l,className:u},(0,s.createElement)("input",a({className:"components-text-control__input",type:d,id:h,value:i,onChange:e=>c(e.target.value),"aria-describedby":l?h+"__help":void 0,ref:n},p)))}));const mD=Xr("box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:",Up.radiusBlockUi,";border:",Up.borderWidth," solid ",Bo.ui.border,";",""),vD=Xr("border-color:var( --wp-admin-theme-color );box-shadow:0 0 0 calc( ",Up.borderWidthFocus," - ",Up.borderWidth," ) var( --wp-admin-theme-color );outline:2px solid transparent;","");var gD={huge:"1440px",wide:"1280px","x-large":"1080px",large:"960px",medium:"782px",small:"600px",mobile:"480px","zoomed-in":"280px"};const yD=Xr("font-family:",lv("default.fontFamily"),";padding:6px 8px;",mD,";font-size:",lv("mobileTextMinFontSize"),";line-height:normal;",`@media (min-width: ${gD["small"]})`,"{font-size:",lv("default.fontSize"),";line-height:normal;}&:focus{",vD,";}&::-webkit-input-placeholder{color:",Bo.darkGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Bo.darkGray.placeholder,";}&:-ms-input-placeholder{color:",Bo.darkGray.placeholder,";}.is-dark-theme &{&::-webkit-input-placeholder{color:",Bo.lightGray.placeholder,";}&::-moz-placeholder{opacity:1;color:",Bo.lightGray.placeholder,";}&:-ms-input-placeholder{color:",Bo.lightGray.placeholder,";}}","");const bD=zn("textarea",{target:"ebk7yr50"})("width:100%;",yD,";");function wD(e){let{label:t,hideLabelFromVision:n,value:r,help:o,onChange:i,rows:l=4,className:u,...c}=e;const d=`inspector-textarea-control-${(0,f.useInstanceId)(wD)}`;return(0,s.createElement)(gv,{label:t,hideLabelFromVision:n,id:d,help:o,className:u},(0,s.createElement)(bD,a({className:"components-textarea-control__input",id:d,rows:l,onChange:e=>i(e.target.value),"aria-describedby":o?d+"__help":void 0,value:r},c)))}var _D=e=>{let{text:t="",highlight:n=""}=e;const r=n.trim();if(!r)return t;const o=new RegExp(`(${(0,l.escapeRegExp)(r)})`,"gi");return(0,s.createInterpolateElement)(t.replace(o,"$&"),{mark:(0,s.createElement)("mark",null)})};var xD=(0,s.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(i.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}));var ED=function(e){return(0,s.createElement)("div",{className:"components-tip"},(0,s.createElement)(wg,{icon:xD}),(0,s.createElement)("p",null,e.children))};function kD(e){let{label:t,checked:n,help:r,className:o,onChange:i,disabled:a}=e;const u=`inspector-toggle-control-${(0,f.useInstanceId)(kD)}`;let d,p;return r&&(d=u+"__help",p=(0,l.isFunction)(r)?r(n):r),(0,s.createElement)(gv,{id:u,help:p,className:c()("components-toggle-control",o)},(0,s.createElement)(DM,{id:u,checked:n,onChange:function(e){i(e.target.checked)},"aria-describedby":d,disabled:a}),(0,s.createElement)("label",{htmlFor:u,className:"components-toggle-control__label"},t))}function SD(e){const{icon:t,...n}=e;return(0,s.createElement)(_M,n,(0,s.createElement)(wg,{icon:t}))}var CD=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],PD=CD,OD=B({as:"button",memo:!0,useHook:V({name:"ToolbarItem",compose:De,keys:PD})});var MD=(0,s.createContext)();var ID=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useContext)(MD);if("function"!=typeof n&&!r)return"undefined"!=typeof process&&process.env,null;const l={...o,ref:t,"data-toolbar-item":!0};return i?(0,s.createElement)(OD,a({},i,l,{as:r}),n):r?(0,s.createElement)(r,l,n):n(l)}));var TD=e=>(0,s.createElement)("div",{className:e.className},e.children);var DD=(0,s.forwardRef)((function(e,t){let{containerClassName:n,className:r,extraProps:o,children:i,title:l,isActive:u,isDisabled:d,...f}=e;return(0,s.useContext)(MD)?(0,s.createElement)(ID,a({className:c()("components-toolbar-button",r)},o,f,{ref:t}),(e=>(0,s.createElement)($n,a({label:l,isPressed:u,disabled:d},e),i))):(0,s.createElement)(TD,{className:n},(0,s.createElement)($n,a({ref:t,icon:f.icon,label:l,shortcut:f.shortcut,"data-subscript":f.subscript,onClick:e=>{e.stopPropagation(),f.onClick&&f.onClick(e)},className:c()("components-toolbar__control",r),isPressed:u,disabled:d,"data-toolbar-item":!0},o,f),i))}));var AD=e=>{let{className:t,children:n,...r}=e;return(0,s.createElement)("div",a({className:t},r),n)};var RD=function(e){let{controls:t=[],toggleProps:n,...r}=e;const o=e=>(0,s.createElement)(Jk,a({controls:t,toggleProps:{...e,"data-toolbar-item":!0}},r));return(0,s.useContext)(MD)?(0,s.createElement)(ID,n,o):o(n)};var ND=function(e){let{controls:t=[],children:n,className:r,isCollapsed:o,title:i,...u}=e;const d=(0,s.useContext)(MD);if(!(t&&t.length||n))return null;const f=c()(d?"components-toolbar-group":"components-toolbar",r);let p=t;return Array.isArray(p[0])||(p=[p]),o?(0,s.createElement)(RD,a({label:i,controls:p,className:f,children:n},u)):(0,s.createElement)(AD,a({className:f},u),(0,l.flatMap)(p,((e,t)=>e.map(((e,n)=>(0,s.createElement)(DD,a({key:[t,n].join(),containerClassName:t>0&&0===n?"has-left-divider":null},e)))))),n)};var LD=V({name:"Toolbar",compose:Ci,keys:CD,useProps:function(e,t){return m({role:"toolbar","aria-orientation":e.orientation},t)}}),FD=B({as:"div",useHook:LD,useCreateElement:function(e,t,n){return M(e,t,n)}});var jD=(0,s.forwardRef)((function(e,t){let{label:n,...r}=e;const o=function(e){void 0===e&&(e={});var t=Yo(e),n=t.orientation;return gi(m({orientation:void 0===n?"horizontal":n},v(t,["orientation"])))}({loop:!0,baseId:r.id,rtl:(0,d.isRTL)()});return(0,s.createElement)(MD.Provider,{value:o},(0,s.createElement)(FD,a({ref:t,"aria-label":n},o,r)))}));var BD=(0,s.forwardRef)((function(e,t){let{className:n,label:r,...o}=e;if(!r)return ze()("Using Toolbar without label prop",{since:"5.6",alternative:"ToolbarGroup component",link:"https://developer.wordpress.org/block-editor/components/toolbar/"}),(0,s.createElement)(ND,a({},o,{className:n}));const i=c()("components-accessible-toolbar",n);return(0,s.createElement)(jD,a({className:i,label:r,ref:t},o))}));var zD=(0,s.forwardRef)((function(e,t){return(0,s.useContext)(MD)?(0,s.createElement)(ID,a({ref:t},e.toggleProps),(t=>(0,s.createElement)(Jk,a({},e,{popoverProps:{isAlternate:!0,...e.popoverProps},toggleProps:t})))):(0,s.createElement)(Jk,e)}));const VD={spacing:Xr("column-gap:",_p(4),";row-gap:",_p(6),";",""),item:{fullWidth:{name:"18iuzk9",styles:"grid-column:1/-1"}}},HD=Xr(VD.spacing,";border-top:",Up.borderWidth," solid ",Bo.gray[300],";margin-top:-1px;padding:",_p(4),";",""),WD={name:"huufmu",styles:">div:not( :first-of-type ){display:none;}"},UD=Xr(VD.item.fullWidth," gap:",_p(2),";.components-dropdown-menu{margin:",_p(-1)," 0;line-height:0;}&&&& .components-dropdown-menu__toggle{padding:0;min-width:",_p(6),";}",""),$D={name:"1pmxm02",styles:"font-size:inherit;font-weight:500;line-height:normal;&&{margin:0;}"},KD=Xr(VD.item.fullWidth,"&>div,&>fieldset{padding-bottom:0;margin-bottom:0;max-width:100%;}&& ",uv,"{margin-bottom:0;",cv,":last-child{margin-bottom:0;}}",hv,"{margin-bottom:0;}&& ",_h,"{label{line-height:1.4em;}}.components-custom-select-control__label,",fv,"{line-height:1.4em;}",""),GD={name:"eivff4",styles:"display:none"},qD={name:"16gsvie",styles:"min-width:200px"},YD=()=>{},XD=(0,s.createContext)({menuItems:{default:{},optional:{}},hasMenuItems:!1,isResetting:!1,shouldRenderPlaceholderItems:!1,registerPanelItem:YD,deregisterPanelItem:YD,flagItemCustomization:YD,areAllOptionalControlsHidden:!0}),ZD=()=>(0,s.useContext)(XD);const JD=()=>{},QD=e=>{let{items:t,onClose:n,toggleItem:r}=e;return t.length?(0,s.createElement)(KM,null,t.map((e=>{let[t,o]=e;const i=o?YE:o_,a=o?(0,d.sprintf)((0,d.__)("Reset %s"),t):void 0;return(0,s.createElement)(GM,{key:t,icon:i,isSelected:!0,disabled:!o,label:a,onClick:()=>{r(t),n()},role:"menuitemcheckbox"},t)}))):null},eA=e=>{let{items:t,onClose:n,toggleItem:r}=e;return t.length?(0,s.createElement)(KM,null,t.map((e=>{let[t,o]=e;const i=o?(0,d.sprintf)((0,d.__)("Hide and reset %s"),t):(0,d.sprintf)((0,d.__)("Show %s"),t);return(0,s.createElement)(GM,{key:t,icon:o&&o_,isSelected:o,label:i,onClick:()=>{r(t),n()},role:"menuitemcheckbox"},t)}))):null},tA=On(((e,t)=>{const{areAllOptionalControlsHidden:n,dropdownMenuClassName:r,hasMenuItems:o,headingClassName:i,label:l,menuItems:u,resetAll:c,toggleItem:f,...p}=function(e){const{className:t,...n}=Pn(e,"ToolsPanelHeader"),r=Cn(),o=(0,s.useMemo)((()=>r(UD,t)),[t,r]),i=(0,s.useMemo)((()=>r(qD)),[r]),a=(0,s.useMemo)((()=>r($D)),[r]),{menuItems:l,hasMenuItems:u,areAllOptionalControlsHidden:c}=ZD();return{...n,areAllOptionalControlsHidden:c,dropdownMenuClassName:i,hasMenuItems:u,headingClassName:a,menuItems:l,className:o}}(e);if(!l)return null;const h=Object.entries((null==u?void 0:u.default)||{}),m=Object.entries((null==u?void 0:u.optional)||{}),v=n?JE:QE,g=n?(0,d._x)("View and add options","Button label to reveal tool panel options"):(0,d._x)("View options","Button label to reveal tool panel options");return(0,s.createElement)(bg,a({},p,{ref:t}),(0,s.createElement)(l_,{level:2,className:i},l),o&&(0,s.createElement)(Jk,{icon:v,label:g,menuProps:{className:r},toggleProps:{isSmall:!0}},(e=>{let{onClose:t=JD}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(QD,{items:h,onClose:t,toggleItem:f}),(0,s.createElement)(eA,{items:m,onClose:t,toggleItem:f}),(0,s.createElement)(KM,null,(0,s.createElement)(GM,{variant:"tertiary",onClick:()=>{c(),t()}},(0,d.__)("Reset all"))))})))}),"ToolsPanelHeader");var nA=tA;const rA=e=>{let{panelItems:t,shouldReset:n,currentMenuItems:r}=e;const o={default:{},optional:{}};return t.forEach((e=>{var t;let{hasValue:i,isShownByDefault:a,label:s}=e;const l=a?"default":"optional",u=null==r||null===(t=r[l])||void 0===t?void 0:t[s],c=void 0!==u?u:i();o[l][s]=!n&&c})),o},oA=e=>e&&0===Object.keys(e).length;function iA(e){const{className:t,resetAll:n,panelId:r,hasInnerWrapper:o,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l,...u}=Pn(e,"ToolsPanel"),c=(0,s.useRef)(!1),d=c.current;(0,s.useEffect)((()=>{d&&(c.current=!1)}),[d]);const[f,p]=(0,s.useState)([]),h=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e.label));return-1!==r&&n.splice(r,1),[...n,e]}))}),[p]),m=(0,s.useCallback)((e=>{p((t=>{const n=[...t],r=n.findIndex((t=>t.label===e));return-1!==r&&n.splice(r,1),n}))}),[p]),[v,g]=(0,s.useState)({default:{},optional:{}});(0,s.useEffect)((()=>{g((e=>rA({panelItems:f,shouldReset:!1,currentMenuItems:e})))}),[rA,f,g]);const y=(0,s.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";g((n=>({...n,[t]:{...n[t],[e]:!0}})))}),[g]),[b,w]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(oA(null==v?void 0:v.default)&&!oA(null==v?void 0:v.optional)){const e=!Object.entries(v.optional).some((e=>{let[,t]=e;return t}));w(e)}}),[v,w]);const _=Cn(),x=(0,s.useMemo)((()=>{const e=o&&Xr(">div:not( :first-of-type ){display:grid;grid-template-columns:",`repeat( ${2}, 1fr )`,";",VD.spacing," ",VD.item.fullWidth,";}","");const n=oA(null==v?void 0:v.default)&&b&&WD;return _(HD,e,n,t)}),[b,t,_,o,v]),E=(0,s.useCallback)((e=>{const t=f.find((t=>t.label===e));if(!t)return;const n=t.isShownByDefault?"default":"optional",r={...v,[n]:{...v[n],[e]:!v[n][e]}};g(r)}),[v,f,g]),k=(0,s.useCallback)((()=>{if("function"==typeof n){c.current=!0;const e=[];f.forEach((t=>{t.resetAllFilter&&e.push(t.resetAllFilter)})),n(e)}const e=rA({panelItems:f,shouldReset:!0});g(e)}),[rA,c.current,f,n,g]),S=e=>{const t=v.optional||{},n=e.find((e=>e.isShownByDefault||!!t[e.label]));return null==n?void 0:n.label},C=S(f),P=S([...f].reverse());return{...u,panelContext:(0,s.useMemo)((()=>({areAllOptionalControlsHidden:b,deregisterPanelItem:m,firstDisplayedItem:C,flagItemCustomization:y,hasMenuItems:!!f.length,isResetting:c.current,lastDisplayedItem:P,menuItems:v,panelId:r,registerPanelItem:h,shouldRenderPlaceholderItems:i,__experimentalFirstVisibleItemClass:a,__experimentalLastVisibleItemClass:l})),[b,m,C,y,c.current,P,v,r,f,h,i,a,l]),resetAllItems:k,toggleItem:E,className:x}}var aA=On(((e,t)=>{const{children:n,label:r,panelContext:o,resetAllItems:i,toggleItem:l,...u}=iA(e);return(0,s.createElement)(j_,a({},u,{columns:2,ref:t}),(0,s.createElement)(XD.Provider,{value:o},(0,s.createElement)(nA,{label:r,resetAll:i,toggleItem:l}),n))}),"ToolsPanel");var sA=On(((e,t)=>{const{children:n,isShown:r,shouldRenderPlaceholder:o,...i}=function(e){var t,n;const{className:r,hasValue:o,isShownByDefault:i,label:a,panelId:l,resetAllFilter:u,onDeselect:c,onSelect:d,...p}=Pn(e,"ToolsPanelItem"),{panelId:h,menuItems:m,registerPanelItem:v,deregisterPanelItem:g,flagItemCustomization:y,isResetting:b,shouldRenderPlaceholderItems:w,firstDisplayedItem:_,lastDisplayedItem:x,__experimentalFirstVisibleItemClass:E,__experimentalLastVisibleItemClass:k}=ZD(),S=(0,s.useCallback)(o,[l]),C=(0,s.useCallback)(u,[l]),P=(0,f.usePrevious)(h),O=h===l||null===h;(0,s.useEffect)((()=>(O&&null!==P&&v({hasValue:S,isShownByDefault:i,label:a,resetAllFilter:C,panelId:l}),()=>{(null===P&&h||h===l)&&g(a)})),[h,O,i,a,S,l,P,C]);const M=o(),I=(0,f.usePrevious)(M);(0,s.useEffect)((()=>{i&&M&&!I&&y(a)}),[M,I,i,a]);const T=i?"default":"optional",D=null==m||null===(t=m[T])||void 0===t?void 0:t[a],A=(0,f.usePrevious)(D);(0,s.useEffect)((()=>{!b&&O&&(!D||M||A||null==d||d(),!D&&A&&(null==c||c()))}),[O,D,b,M,A]);const R=i?void 0!==(null==m||null===(n=m[T])||void 0===n?void 0:n[a]):D,N=Cn(),L=(0,s.useMemo)((()=>N(KD,w&&!R&&GD,r,_===a&&E,x===a&&k)),[R,w,r,N,_,x,E,k]);return{...p,isShown:R,shouldRenderPlaceholder:w,className:L}}(e);return r?(0,s.createElement)(Hn,a({},i,{ref:t}),n):o?(0,s.createElement)(Hn,a({},i,{ref:t})):null}),"ToolsPanelItem");const lA=(0,s.createContext)(),uA=lA.Provider;function cA(e){let{children:t}=e;const[n,r]=(0,s.useState)(),o=(0,s.useMemo)((()=>({lastFocusedElement:n,setLastFocusedElement:r})),[n]);return(0,s.createElement)(uA,{value:o},t)}function dA(e){const t=Re.focus.focusable.find(e,{sequential:!0});if(t&&t.length)return t.filter((t=>t.closest('[role="row"]')===e))}var fA=(0,s.forwardRef)((function(e,t){let{children:n,onExpandRow:r=(()=>{}),onCollapseRow:o=(()=>{}),onFocusRow:i=(()=>{}),...u}=e;const c=(0,s.useCallback)((e=>{const{keyCode:t,metaKey:n,ctrlKey:a,altKey:s}=e;if(n||a||s||!(0,l.includes)([ev.UP,ev.DOWN,ev.LEFT,ev.RIGHT,ev.HOME,ev.END],t))return;e.stopPropagation();const{activeElement:u}=document,{currentTarget:c}=e;if(!c.contains(u))return;const d=u.closest('[role="row"]'),f=dA(d),p=f.indexOf(u),h=0===p,m=h&&"false"===d.getAttribute("aria-expanded")&&t===ev.RIGHT;if((0,l.includes)([ev.LEFT,ev.RIGHT],t)){let n;if(n=t===ev.LEFT?Math.max(0,p-1):Math.min(p+1,f.length-1),h){if(t===ev.LEFT){var v,g,y;if("true"===d.getAttribute("aria-expanded"))return o(d),void e.preventDefault();const t=Math.max(parseInt(null!==(v=null==d?void 0:d.getAttribute("aria-level"))&&void 0!==v?v:1,10)-1,1),n=Array.from(c.querySelectorAll('[role="row"]'));let r=d;for(let e=n.indexOf(d);e>=0;e--)if(parseInt(n[e].getAttribute("aria-level"),10)===t){r=n[e];break}null===(g=dA(r))||void 0===g||null===(y=g[0])||void 0===y||y.focus()}if(t===ev.RIGHT){if("false"===d.getAttribute("aria-expanded"))return r(d),void e.preventDefault();const t=dA(d);var b;if(t.length>0)null===(b=t[t.length-1])||void 0===b||b.focus()}return void e.preventDefault()}if(m)return;f[n].focus(),e.preventDefault()}else if((0,l.includes)([ev.UP,ev.DOWN],t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(d);let o;if(o=t===ev.UP?Math.max(0,r-1):Math.min(r+1,n.length-1),o===r)return void e.preventDefault();const a=dA(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(p,a.length-1)].focus(),i(e,d,n[o]),e.preventDefault()}else if((0,l.includes)([ev.HOME,ev.END],t)){const n=Array.from(c.querySelectorAll('[role="row"]')),r=n.indexOf(d);let o;if(o=t===ev.HOME?0:n.length-1,o===r)return void e.preventDefault();const a=dA(n[o]);if(!a||!a.length)return void e.preventDefault();a[Math.min(p,a.length-1)].focus(),i(e,d,n[o]),e.preventDefault()}}),[r,o,i]);return(0,s.createElement)(cA,null,(0,s.createElement)("table",a({},u,{role:"treegrid",onKeyDown:c,ref:t}),(0,s.createElement)("tbody",null,n)))}));var pA=(0,s.forwardRef)((function(e,t){let{children:n,level:r,positionInSet:o,setSize:i,isExpanded:l,...u}=e;return(0,s.createElement)("tr",a({},u,{ref:t,role:"row","aria-level":r,"aria-posinset":o,"aria-setsize":i,"aria-expanded":l}),n)})),hA=(0,s.forwardRef)((function(e,t){let{children:n,as:r,...o}=e;const i=(0,s.useRef)(),a=t||i,{lastFocusedElement:l,setLastFocusedElement:u}=(0,s.useContext)(lA);let c;l&&(c=l===a.current?0:-1);const d={ref:a,tabIndex:c,onFocus:e=>u(e.target),...o};return"function"==typeof n?n(d):(0,s.createElement)(r,d,n)})),mA=(0,s.forwardRef)((function(e,t){let{children:n,...r}=e;return(0,s.createElement)(hA,a({ref:t},r),n)})),vA=(0,s.forwardRef)((function(e,t){let{children:n,withoutGridItem:r=!1,...o}=e;return(0,s.createElement)("td",a({},o,{role:"gridcell"}),r?n:(0,s.createElement)(mA,{ref:t},n))}));function gA(e){e.stopPropagation()}var yA=(0,s.forwardRef)(((e,t)=>{let{children:n,...r}=e;return ze()("wp.components.IsolatedEventContainer",{since:"5.7"}),(0,s.createElement)("div",a({},r,{ref:t,onMouseDown:gA}),n)}));const bA=zn("div",{target:"ebn2ljm1"})({name:"5ob2ly",styles:"display:flex;position:relative"}),wA=zn("div",{target:"ebn2ljm0"})((e=>{let{isLayered:t,offsetAmount:n}=e;return Xr(t?Op({marginLeft:n})():Op({right:-1*n})(),"","")})," ",(e=>{let{isLayered:t}=e;return t?_A:xA})," ",(e=>{let{zIndex:t}=e;return Xr({zIndex:t},"","")}),";"),_A={name:"a4hmbt",styles:"position:absolute"},xA={name:"bjn8wh",styles:"position:relative"};var EA=On((function(e,t){const{children:n,className:r,isLayered:o=!0,isReversed:i=!1,offset:l=0,...u}=Pn(e,"ZStack"),c=gg(n),d=c.length-1,f=c.map(((e,t)=>{const n=i?d-t:t,r=l*t,a=(0,s.isValidElement)(e)?e.key:t;return(0,s.createElement)(wA,{isLayered:o,offsetAmount:r,zIndex:n,key:a},e)}));return(0,s.createElement)(bA,a({},u,{className:r,ref:t}),f)}),"ZStack");const kA={previous:[{modifier:"ctrlShift",character:"`"},{modifier:"access",character:"p"}],next:[{modifier:"ctrl",character:"`"},{modifier:"access",character:"n"}]};function SA(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kA;const t=(0,s.useRef)(),[n,r]=(0,s.useState)(!1);function o(e){const n=Array.from(t.current.querySelectorAll('[role="region"]'));if(!n.length)return;let o=n[0];const i=n.indexOf(t.current.ownerDocument.activeElement);if(-1!==i){let t=i+e;t=-1===t?n.length-1:t,t=t===n.length?0:t,o=n[t]}o.focus(),r(!0)}const i=(0,f.useRefEffect)((e=>{function t(){r(!1)}return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[r]);return{ref:(0,f.useMergeRefs)([t,i]),className:n?"is-focusing-regions":"",onKeyDown(t){e.previous.some((e=>{let{modifier:n,character:r}=e;return ev.isKeyboardEvent[n](t,r)}))?o(-1):e.next.some((e=>{let{modifier:n,character:r}=e;return ev.isKeyboardEvent[n](t,r)}))&&o(1)}}}var CA=(0,f.createHigherOrderComponent)((e=>t=>{let{shortcuts:n,...r}=t;return(0,s.createElement)("div",SA(n),(0,s.createElement)(e,r))}),"navigateRegions");var PA=(0,f.createHigherOrderComponent)((e=>function(t){const n=(0,f.useConstrainedTabbing)();return(0,s.createElement)("div",{ref:n,tabIndex:"-1"},(0,s.createElement)(e,t))}),"withConstrainedTabbing"),OA=e=>(0,f.createHigherOrderComponent)((t=>class extends s.Component{constructor(){super(...arguments),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){const{grabStylesCompleted:t,fallbackStyles:n}=this.state;if(this.nodeRef&&!t){const t=e(this.nodeRef,this.props);(0,l.isEqual)(t,n)||this.setState({fallbackStyles:t,grabStylesCompleted:!!(0,l.every)(t)})}}render(){const e=(0,s.createElement)(t,a({},this.props,this.state.fallbackStyles));return this.props.node?e:(0,s.createElement)("div",{ref:this.bindRef}," ",e," ")}}),"withFallbackStyles"),MA=window.wp.hooks;function IA(e){return(0,f.createHigherOrderComponent)((t=>{const n="core/with-filters/"+e;let r;class o extends s.Component{constructor(){super(...arguments),void 0===r&&(r=(0,MA.applyFilters)(e,t))}componentDidMount(){o.instances.push(this),1===o.instances.length&&((0,MA.addAction)("hookRemoved",n,a),(0,MA.addAction)("hookAdded",n,a))}componentWillUnmount(){o.instances=(0,l.without)(o.instances,this),0===o.instances.length&&((0,MA.removeAction)("hookRemoved",n),(0,MA.removeAction)("hookAdded",n))}render(){return(0,s.createElement)(r,this.props)}}o.instances=[];const i=(0,l.debounce)((()=>{r=(0,MA.applyFilters)(e,t),o.instances.forEach((e=>{e.forceUpdate()}))}),16);function a(t){t===e&&i()}return o}),"withFilters")}var TA=(0,f.createHigherOrderComponent)((e=>{const t=function(){let{onFocusReturn:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>n=>{const r=(0,f.useFocusReturn)(e);return(0,s.createElement)("div",{ref:r},(0,s.createElement)(t,n))}};if((n=e)instanceof s.Component||"function"==typeof n){const n=e;return t()(n)}var n;return t(e)}),"withFocusReturn");const DA=e=>{let{children:t}=e;return ze()("wp.components.FocusReturnProvider component",{since:"5.7",hint:"This provider is not used anymore. You can just remove it from your codebase"}),t};var AA=(0,f.createHigherOrderComponent)((e=>{function t(t,r){const[o,i]=(0,s.useState)([]),l=(0,s.useMemo)((()=>{const e=e=>{const t=e.id?e:{...e,id:fr()};i((e=>[...e,t]))};return{createNotice:e,createErrorNotice:t=>{e({status:"error",content:t})},removeNotice:e=>{i((t=>t.filter((t=>t.id!==e))))},removeAllNotices:()=>{i([])}}}),[]),u={...t,noticeList:o,noticeOperations:l,noticeUI:o.length>0&&(0,s.createElement)(UI,{className:"components-with-notices-ui",notices:o,onRemove:l.removeNotice})};return n?(0,s.createElement)(e,a({},u,{ref:r})):(0,s.createElement)(e,u)}let n;const{render:r}=e;return"function"==typeof r?(n=!0,(0,s.forwardRef)(t)):t}))}(),(window.wp=window.wp||{}).components=r}(); \ No newline at end of file diff --git a/wp-includes/js/dist/data.js b/wp-includes/js/dist/data.js index 1058f39cbf..e7cbce7c6b 100644 --- a/wp-includes/js/dist/data.js +++ b/wp-includes/js/dist/data.js @@ -1256,15 +1256,6 @@ function applyMiddleware() { }; } -/* - * This is a dummy function to check if the function name has been altered by minification. - * If the function has been minified and NODE_ENV !== 'production', warn the user. - */ - -function isCrushed() {} - -if (false) {} - // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js diff --git a/wp-includes/js/dist/redux-routine.js b/wp-includes/js/dist/redux-routine.js index f035ae1dc0..4fcacd8465 100644 --- a/wp-includes/js/dist/redux-routine.js +++ b/wp-includes/js/dist/redux-routine.js @@ -123,7 +123,7 @@ exports["default"] = [promise, fork, join, race, subscribe]; /***/ }), -/***/ 7961: +/***/ 1575: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { @@ -274,7 +274,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); -var _builtin = __webpack_require__(7961); +var _builtin = __webpack_require__(1575); var _builtin2 = _interopRequireDefault(_builtin); diff --git a/wp-includes/js/dist/redux-routine.min.js b/wp-includes/js/dist/redux-routine.min.js index 99d19955c3..4bd17da30f 100644 --- a/wp-includes/js/dist/redux-routine.min.js +++ b/wp-includes/js/dist/redux-routine.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(){"use strict";var r={9025:function(r,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.race=t.join=t.fork=t.promise=void 0;var e=c(n(9681)),u=n(7783),o=c(n(2451));function c(r){return r&&r.__esModule?r:{default:r}}var f=t.promise=function(r,t,n,u,o){return!!e.default.promise(r)&&(r.then(t,o),!0)},a=new Map,i=t.fork=function(r,t,n){if(!e.default.fork(r))return!1;var c=Symbol("fork"),f=(0,o.default)();a.set(c,f),n(r.iterator.apply(null,r.args),(function(r){return f.dispatch(r)}),(function(r){return f.dispatch((0,u.error)(r))}));var i=f.subscribe((function(){i(),a.delete(c)}));return t(c),!0},l=t.join=function(r,t,n,u,o){if(!e.default.join(r))return!1;var c,f=a.get(r.task);return f?c=f.subscribe((function(r){c(),t(r)})):o("join error : task not found"),!0},s=t.race=function(r,t,n,u,o){if(!e.default.race(r))return!1;var c,f=!1,a=function(r,n,e){f||(f=!0,r[n]=e,t(r))},i=function(r){f||o(r)};return e.default.array(r.competitors)?(c=r.competitors.map((function(){return!1})),r.competitors.forEach((function(r,t){n(r,(function(r){return a(c,t,r)}),i)}))):function(){var t=Object.keys(r.competitors).reduce((function(r,t){return r[t]=!1,r}),{});Object.keys(r.competitors).forEach((function(e){n(r.competitors[e],(function(r){return a(t,e,r)}),i)}))}(),!0};t.default=[f,i,l,s,function(r,t){if(!e.default.subscribe(r))return!1;if(!e.default.channel(r.channel))throw new Error('the first argument of "subscribe" must be a valid channel');var n=r.channel.subscribe((function(r){n&&n(),t(r)}));return!0}]},7961:function(r,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.array=t.object=t.error=t.any=void 0;var e,u=n(9681),o=(e=u)&&e.__esModule?e:{default:e};var c=t.any=function(r,t,n,e){return e(r),!0},f=t.error=function(r,t,n,e,u){return!!o.default.error(r)&&(u(r.error),!0)},a=t.object=function(r,t,n,e,u){if(!o.default.all(r)||!o.default.obj(r.value))return!1;var c={},f=Object.keys(r.value),a=0,i=!1;return f.map((function(t){n(r.value[t],(function(r){return function(r,t){i||(c[r]=t,++a===f.length&&e(c))}(t,r)}),(function(r){return function(r,t){i||(i=!0,u(t))}(0,r)}))})),!0},i=t.array=function(r,t,n,e,u){if(!o.default.all(r)||!o.default.array(r.value))return!1;var c=[],f=0,a=!1;return r.value.map((function(t,o){n(t,(function(t){return function(t,n){a||(c[t]=n,++f===r.value.length&&e(c))}(o,t)}),(function(r){return function(r,t){a||(a=!0,u(t))}(0,r)}))})),!0},l=t.iterator=function(r,t,n,e,u){return!!o.default.iterator(r)&&(n(r,t,u),!0)};t.default=[f,l,i,a,c]},2165:function(r,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.cps=t.call=void 0;var e,u=n(9681),o=(e=u)&&e.__esModule?e:{default:e};var c=t.call=function(r,t,n,e,u){if(!o.default.call(r))return!1;try{t(r.func.apply(r.context,r.args))}catch(r){u(r)}return!0},f=t.cps=function(r,t,n,e,u){var c;return!!o.default.cps(r)&&((c=r.func).call.apply(c,[null].concat(function(r){if(Array.isArray(r)){for(var t=0,n=Array(r.length);t1?t-1:0),e=1;e1?t-1:0),e=1;e2?n-2:0),u=2;u1?t-1:0),e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const e=(0,u.map)(r,((r,t)=>(n,e,u,c,a)=>{if(!f(n,t))return!1;const i=r(n);return o(i)?i.then(c,a):c(i),!0})),a=(r,t)=>!!c(r)&&(n(r),t(),!0);e.push(a);const i=(0,t.create)(e);return r=>new Promise(((t,e)=>i(r,(r=>{c(r)&&n(r),t(r)}),e)))}function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=>{const e=a(t,n.dispatch);return t=>n=>r(n)?e(n):t(n)}}}(),(window.wp=window.wp||{}).reduxRoutine=e.default}(); \ No newline at end of file +!function(){"use strict";var r={9025:function(r,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.race=t.join=t.fork=t.promise=void 0;var e=c(n(9681)),u=n(7783),o=c(n(2451));function c(r){return r&&r.__esModule?r:{default:r}}var f=t.promise=function(r,t,n,u,o){return!!e.default.promise(r)&&(r.then(t,o),!0)},a=new Map,i=t.fork=function(r,t,n){if(!e.default.fork(r))return!1;var c=Symbol("fork"),f=(0,o.default)();a.set(c,f),n(r.iterator.apply(null,r.args),(function(r){return f.dispatch(r)}),(function(r){return f.dispatch((0,u.error)(r))}));var i=f.subscribe((function(){i(),a.delete(c)}));return t(c),!0},l=t.join=function(r,t,n,u,o){if(!e.default.join(r))return!1;var c,f=a.get(r.task);return f?c=f.subscribe((function(r){c(),t(r)})):o("join error : task not found"),!0},s=t.race=function(r,t,n,u,o){if(!e.default.race(r))return!1;var c,f=!1,a=function(r,n,e){f||(f=!0,r[n]=e,t(r))},i=function(r){f||o(r)};return e.default.array(r.competitors)?(c=r.competitors.map((function(){return!1})),r.competitors.forEach((function(r,t){n(r,(function(r){return a(c,t,r)}),i)}))):function(){var t=Object.keys(r.competitors).reduce((function(r,t){return r[t]=!1,r}),{});Object.keys(r.competitors).forEach((function(e){n(r.competitors[e],(function(r){return a(t,e,r)}),i)}))}(),!0};t.default=[f,i,l,s,function(r,t){if(!e.default.subscribe(r))return!1;if(!e.default.channel(r.channel))throw new Error('the first argument of "subscribe" must be a valid channel');var n=r.channel.subscribe((function(r){n&&n(),t(r)}));return!0}]},1575:function(r,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.array=t.object=t.error=t.any=void 0;var e,u=n(9681),o=(e=u)&&e.__esModule?e:{default:e};var c=t.any=function(r,t,n,e){return e(r),!0},f=t.error=function(r,t,n,e,u){return!!o.default.error(r)&&(u(r.error),!0)},a=t.object=function(r,t,n,e,u){if(!o.default.all(r)||!o.default.obj(r.value))return!1;var c={},f=Object.keys(r.value),a=0,i=!1;return f.map((function(t){n(r.value[t],(function(r){return function(r,t){i||(c[r]=t,++a===f.length&&e(c))}(t,r)}),(function(r){return function(r,t){i||(i=!0,u(t))}(0,r)}))})),!0},i=t.array=function(r,t,n,e,u){if(!o.default.all(r)||!o.default.array(r.value))return!1;var c=[],f=0,a=!1;return r.value.map((function(t,o){n(t,(function(t){return function(t,n){a||(c[t]=n,++f===r.value.length&&e(c))}(o,t)}),(function(r){return function(r,t){a||(a=!0,u(t))}(0,r)}))})),!0},l=t.iterator=function(r,t,n,e,u){return!!o.default.iterator(r)&&(n(r,t,u),!0)};t.default=[f,l,i,a,c]},2165:function(r,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.cps=t.call=void 0;var e,u=n(9681),o=(e=u)&&e.__esModule?e:{default:e};var c=t.call=function(r,t,n,e,u){if(!o.default.call(r))return!1;try{t(r.func.apply(r.context,r.args))}catch(r){u(r)}return!0},f=t.cps=function(r,t,n,e,u){var c;return!!o.default.cps(r)&&((c=r.func).call.apply(c,[null].concat(function(r){if(Array.isArray(r)){for(var t=0,n=Array(r.length);t1?t-1:0),e=1;e1?t-1:0),e=1;e2?n-2:0),u=2;u1?t-1:0),e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const e=(0,u.map)(r,((r,t)=>(n,e,u,c,a)=>{if(!f(n,t))return!1;const i=r(n);return o(i)?i.then(c,a):c(i),!0})),a=(r,t)=>!!c(r)&&(n(r),t(),!0);e.push(a);const i=(0,t.create)(e);return r=>new Promise(((t,e)=>i(r,(r=>{c(r)&&n(r),t(r)}),e)))}function i(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=>{const e=a(t,n.dispatch);return t=>n=>r(n)?e(n):t(n)}}}(),(window.wp=window.wp||{}).reduxRoutine=e.default}(); \ No newline at end of file