From 17a8987c7b41fe1d5111988ec6655a01455a0aa3 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Wed, 18 Sep 2024 22:07:14 +0200 Subject: [PATCH 001/159] Make venue-taxonomy visible on event posts, within REST responses. --- includes/core/classes/class-venue.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/core/classes/class-venue.php b/includes/core/classes/class-venue.php index cf45b0553..55fa2d089 100644 --- a/includes/core/classes/class-venue.php +++ b/includes/core/classes/class-venue.php @@ -230,6 +230,8 @@ public function register_taxonomy(): void { 'show_in_rest' => true, ) ); + // It is neccessary to make this taxonomy visible on event posts, within REST responses. + register_taxonomy_for_object_type( self::TAXONOMY, Event::POST_TYPE ); } /** From ef35c6811d6540ca384126b6a79853a1d2e98ad9 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 00:43:15 +0200 Subject: [PATCH 002/159] Bring hookable block-patterns into place (as preparation, still disabled) --- docs/developer/blocks/README.md | 6 ++ .../blocks/hookable-patterns/README.md | 41 ++++++++++++ includes/core/classes/class-block.php | 66 +++++++++++++++++++ includes/core/classes/class-event-setup.php | 1 + includes/core/classes/class-venue.php | 1 + 5 files changed, 115 insertions(+) create mode 100644 docs/developer/blocks/README.md create mode 100644 docs/developer/blocks/hookable-patterns/README.md diff --git a/docs/developer/blocks/README.md b/docs/developer/blocks/README.md new file mode 100644 index 000000000..a1b9b1775 --- /dev/null +++ b/docs/developer/blocks/README.md @@ -0,0 +1,6 @@ +# Blocks in GatherPress + +1. All blocks in general (LINK to /docs/user/...) +2. Hookable patterns for events & venues + 2.1 Add to or Remove blocks from the post type block templates +3. \ No newline at end of file diff --git a/docs/developer/blocks/hookable-patterns/README.md b/docs/developer/blocks/hookable-patterns/README.md new file mode 100644 index 000000000..dc1b33067 --- /dev/null +++ b/docs/developer/blocks/hookable-patterns/README.md @@ -0,0 +1,41 @@ +# Hookable patterns for events & venues + +GatherPress uses block-patterns to set up new created events or venues. + +Whenever you create e.g. a new event post, it gets pre-poulated with a set of blocks, curated within a block-pattern named `gatherpress/event-template`. + +This is basically an almost empty pattern by registration, but... + +- it gets all necessary blocks hooked in via the Block Hooks API +- blocks can be added or removed easily by plugins + +GatherPress combines four of such block-patterns to curate the creation of: + +- [New Events](#new-event) +- [New Venues](#new-venue) +- [New Event Queries within any post](#new-event-queries-within-any-post) +- [Venue Details within any post](#venue-details-within-any-post) + +## New Event + +GatherPress adds the following blocks by default into a new created event: + +- A block-pattern named `gatherpress/event-template`. + + +## New Venue + +A new created venue will have the following blocks prepared by default: + +- A block-pattern named `gatherpress/venue-template` + - A block-pattern named `gatherpress/venue-details`, which keeps detailed information about a selected venue in the shape of blocks + +## New Event Queries within any post + +## Venue Details within any post + +### Ressources + +- [@wordpress/hooks - Block Editor Handbook | Developer.WordPress.org](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-hooks/) +- [#devnote - Introducing Block Hooks for dynamic blocks - Make WordPress Core](https://make.wordpress.org/core/2023/10/15/introducing-block-hooks-for-dynamic-blocks/) +- [Exploring the Block Hooks API in WordPress 6.5 - WordPress Developer Blog](https://developer.wordpress.org/news/2024/03/25/exploring-the-block-hooks-api-in-wordpress-6-5/) \ No newline at end of file diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index a20b606cf..3ed3bd436 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -49,6 +49,7 @@ protected function __construct() { * @return void */ protected function setup_hooks(): void { + add_action( 'init', array( $this, 'register_block_patterns' ), 10 ); // Priority 11 needed for block.json translations of title and description. add_action( 'init', array( $this, 'register_blocks' ), 11 ); } @@ -72,4 +73,69 @@ public function register_blocks(): void { ); } } + + + /** + * Register custom block patterns. + * + * This method ... + * + * @since 1.0.0 + * + * @return void + */ + public function register_block_patterns(): void { + + /** + * Made to be used with the 'template' parameter + * when registering the 'gatherpress_event' post type. + */ + \register_block_pattern( + 'gatherpress/event-template', + array( + 'title' => 'Invisible Event Template Block Pattern', + // Even this paragraph seems useless, it's not. + // It is the entry point for all our hooked blocks + // and as such absolutely important! + 'content' => '', // Other blocks are hooked-in here. + 'inserter' => false, + 'source' => 'plugin', + ) + ); + + /** + * Made to be used with the 'template' parameter + * when registering the 'gatherpress_venue' post type. + */ + \register_block_pattern( + 'gatherpress/venue-template', + array( + 'title' => 'Invisible Venue Template Block Pattern', + // Even this paragraph seems useless, it's not. + // It is the entry point for all our hooked blocks + // and as such absolutely important! + 'content' => '

', // Other blocks are hooked-in here. + 'inserter' => false, + 'source' => 'plugin', + ) + ); + + /** + * Mainly for use with the 'venue-details' block, + * which is a group block under the hood + * and uses this pattern as innerBlocks template. + */ + \register_block_pattern( + 'gatherpress/venue-details', + array( + 'title' => 'Invisible Venue Details Block Pattern', + // Even this post-title seems useless, it's not. + // It is the entry point for all our hooked blocks + // and as such absolutely important! + 'content' => '', // Other blocks are hooked-in here. + 'inserter' => false, + 'source' => 'plugin', + ) + ); + } } diff --git a/includes/core/classes/class-event-setup.php b/includes/core/classes/class-event-setup.php index 0a94f3448..9f550060b 100644 --- a/includes/core/classes/class-event-setup.php +++ b/includes/core/classes/class-event-setup.php @@ -128,6 +128,7 @@ public function register_post_type(): void { ), ), array( 'gatherpress/rsvp-response' ), + // The future! // array( 'core/pattern', array( 'slug' => 'gatherpress/event-template' ) ), // phpcs:ignore Squiz.PHP.CommentedOutCode.Found ! ), 'menu_position' => 4, 'supports' => array( diff --git a/includes/core/classes/class-venue.php b/includes/core/classes/class-venue.php index 55fa2d089..b6edc7d86 100644 --- a/includes/core/classes/class-venue.php +++ b/includes/core/classes/class-venue.php @@ -132,6 +132,7 @@ public function register_post_type(): void { 'menu_icon' => 'dashicons-location', 'template' => array( array( 'gatherpress/venue' ), + // The future! // array( 'core/pattern', array( 'slug' => 'gatherpress/venue-template' ) ), // phpcs:ignore Squiz.PHP.CommentedOutCode.Found ! ), 'has_archive' => true, 'rewrite' => array( From 3dcf8c529746aad2ad3f8b54125094831b981ee7 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 00:59:33 +0200 Subject: [PATCH 003/159] Import PluginDocumentSettingPanel from wordpress/editor package (The former source was deprecated in 6.6) --- src/panels/event-settings/index.js | 2 +- src/panels/venue-settings/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/event-settings/index.js b/src/panels/event-settings/index.js index 3f487965c..f45c449c1 100644 --- a/src/panels/event-settings/index.js +++ b/src/panels/event-settings/index.js @@ -8,7 +8,7 @@ import { __experimentalVStack as VStack, } from '@wordpress/components'; import { registerPlugin } from '@wordpress/plugins'; -import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; +import { PluginDocumentSettingPanel } from '@wordpress/editor'; /** * Internal dependencies. diff --git a/src/panels/venue-settings/index.js b/src/panels/venue-settings/index.js index a18c55fd0..402c4691c 100644 --- a/src/panels/venue-settings/index.js +++ b/src/panels/venue-settings/index.js @@ -8,7 +8,7 @@ import { __experimentalVStack as VStack, } from '@wordpress/components'; import { registerPlugin } from '@wordpress/plugins'; -import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; +import { PluginDocumentSettingPanel } from '@wordpress/editor'; /** * Internal dependencies. From 5c2160ca27bb5343f5fa7408b14adb2af9f89b51 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 01:40:07 +0200 Subject: [PATCH 004/159] NEW slots into document sidebar for event & venue post type --- docs/developer/blocks/README.md | 6 ++-- docs/developer/blocks/slot-fills/README.md | 32 ++++++++++++++++++++++ src/panels/event-settings/index.js | 4 +++ src/panels/event-settings/slot.js | 17 ++++++++++++ src/panels/venue-settings/index.js | 4 +++ src/panels/venue-settings/slot.js | 17 ++++++++++++ 6 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 docs/developer/blocks/slot-fills/README.md create mode 100644 src/panels/event-settings/slot.js create mode 100644 src/panels/venue-settings/slot.js diff --git a/docs/developer/blocks/README.md b/docs/developer/blocks/README.md index a1b9b1775..f626e2f7d 100644 --- a/docs/developer/blocks/README.md +++ b/docs/developer/blocks/README.md @@ -1,6 +1,6 @@ # Blocks in GatherPress 1. All blocks in general (LINK to /docs/user/...) -2. Hookable patterns for events & venues - 2.1 Add to or Remove blocks from the post type block templates -3. \ No newline at end of file +2. [Hookable patterns for events & venues](./hookable-patterns/) + - Add to or Remove blocks from the post type block templates +3. [Slots & fills in GatherPress Admin UI](./slot-fills/) diff --git a/docs/developer/blocks/slot-fills/README.md b/docs/developer/blocks/slot-fills/README.md new file mode 100644 index 000000000..74e06931c --- /dev/null +++ b/docs/developer/blocks/slot-fills/README.md @@ -0,0 +1,32 @@ +# Slots & fills in GatherPress Admin UI + +Similar to the hookable patterns, GatherPress provides multiple ways to modify its admin user-interface using slots and fills. + +## Available Slots + +- `EventPluginDocumentSettings` A slot that has all settings related to an event. +- `VenuePluginDocumentSettings` A slot that has all settings related to a venue. + +All slots will be rendered into the `PluginDocumentSettingPanel` imported from the `@wordpress/editor` package. This panel is shown in the document sidebar for the event and venue post types [in both the post and site editor][devnote]. + + +## Add or remove UI elemnts + +```js +export default function GatherPressAwesomeFill() { + return ( + <> + +

A note that will be seen in the document sidebar under "Event settings".

+
+ + ); +} +``` + + +### Ressources + +- [Unified Extensibility APIs in 6.6][devnote] + +[devnote]: https://make.wordpress.org/core/2024/06/18/editor-unified-extensibility-apis-in-6-6/ "#devnote - Editor: Unified Extensibility APIs in 6.6 – Make WordPress Core" \ No newline at end of file diff --git a/src/panels/event-settings/index.js b/src/panels/event-settings/index.js index f45c449c1..cc8dd6e3e 100644 --- a/src/panels/event-settings/index.js +++ b/src/panels/event-settings/index.js @@ -22,6 +22,7 @@ import MaxAttendanceLimitPanel from './max-attendance-limit'; import NotifyMembersPanel from './notify-members'; import OnlineEventLinkPanel from './online-link'; import VenueSelectorPanel from './venue-selector'; +import { EventPluginDocumentSettings } from './slot.js'; /** * A settings panel for event-specific settings in the block editor. @@ -44,6 +45,9 @@ const EventSettings = () => { initialOpen={true} className="gatherpress-event-settings" > + {/* Extendable entry point for "Event Settings" panel. */} + + diff --git a/src/panels/event-settings/slot.js b/src/panels/event-settings/slot.js new file mode 100644 index 000000000..2085fbf62 --- /dev/null +++ b/src/panels/event-settings/slot.js @@ -0,0 +1,17 @@ +/** + * Defines an extensibility slot for the "Event Settings" panel. + */ + +/** + * WordPress dependencies + */ +import { createSlotFill, PanelRow } from '@wordpress/components'; + +export const { Fill, Slot } = createSlotFill('EventPluginDocumentSettings'); +export const EventPluginDocumentSettings = ({ children, className }) => ( + + {children} + +); + +EventPluginDocumentSettings.Slot = Slot; \ No newline at end of file diff --git a/src/panels/venue-settings/index.js b/src/panels/venue-settings/index.js index 402c4691c..15952ab4a 100644 --- a/src/panels/venue-settings/index.js +++ b/src/panels/venue-settings/index.js @@ -15,6 +15,7 @@ import { PluginDocumentSettingPanel } from '@wordpress/editor'; */ import { isVenuePostType } from '../../helpers/venue'; import VenueInformationPanel from './venue-information'; +import { VenuePluginDocumentSettings } from './slot.js'; /** * VenueSettings Component @@ -35,6 +36,9 @@ const VenueSettings = () => { initialOpen={true} className="gatherpress-venue-settings" > + {/* Extendable entry point for "Venue Settings" panel. */} + + diff --git a/src/panels/venue-settings/slot.js b/src/panels/venue-settings/slot.js new file mode 100644 index 000000000..88626110d --- /dev/null +++ b/src/panels/venue-settings/slot.js @@ -0,0 +1,17 @@ +/** + * Defines as extensibility slot for the "Venue Settings" panel. + */ + +/** + * WordPress dependencies + */ +import { createSlotFill, PanelRow } from '@wordpress/components'; + +export const { Fill, Slot } = createSlotFill('VenuePluginDocumentSettings'); +export const VenuePluginDocumentSettings = ({ children, className }) => ( + + {children} + +); + +VenuePluginDocumentSettings.Slot = Slot; \ No newline at end of file From 27e780e52c1d58f9164a54b782cc9410ccdc571d Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 01:48:12 +0200 Subject: [PATCH 005/159] Fill the venue slot into the event slot by default --- docs/developer/blocks/slot-fills/README.md | 4 ++++ src/panels/event-settings/index.js | 2 +- src/panels/venue-settings/fill.js | 24 ++++++++++++++++++++++ src/panels/venue-settings/index.js | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 src/panels/venue-settings/fill.js diff --git a/docs/developer/blocks/slot-fills/README.md b/docs/developer/blocks/slot-fills/README.md index 74e06931c..6fc71c446 100644 --- a/docs/developer/blocks/slot-fills/README.md +++ b/docs/developer/blocks/slot-fills/README.md @@ -9,6 +9,10 @@ Similar to the hookable patterns, GatherPress provides multiple ways to modify i All slots will be rendered into the `PluginDocumentSettingPanel` imported from the `@wordpress/editor` package. This panel is shown in the document sidebar for the event and venue post types [in both the post and site editor][devnote]. +## Fills by GatherPress + +- `VenuePluginFill` loads the `VenuePluginDocumentSettings` slot into the `EventPluginDocumentSettings` slot, so that venue changes can be made from within an event context. + ## Add or remove UI elemnts diff --git a/src/panels/event-settings/index.js b/src/panels/event-settings/index.js index cc8dd6e3e..dfe9482c2 100644 --- a/src/panels/event-settings/index.js +++ b/src/panels/event-settings/index.js @@ -22,7 +22,7 @@ import MaxAttendanceLimitPanel from './max-attendance-limit'; import NotifyMembersPanel from './notify-members'; import OnlineEventLinkPanel from './online-link'; import VenueSelectorPanel from './venue-selector'; -import { EventPluginDocumentSettings } from './slot.js'; +import { EventPluginDocumentSettings } from './slot'; /** * A settings panel for event-specific settings in the block editor. diff --git a/src/panels/venue-settings/fill.js b/src/panels/venue-settings/fill.js new file mode 100644 index 000000000..eaa3ab457 --- /dev/null +++ b/src/panels/venue-settings/fill.js @@ -0,0 +1,24 @@ +/** + * Fill the "Venue Settings" slot into the "Event Settings" slot by default, + * so that venue changes can be made from within an event context. + */ + +/** + * WordPress dependencies + */ +import { Fill } from '@wordpress/components'; + +/** + * Internal dependencies + */ +import { VenuePluginDocumentSettings } from './slot'; + +export default function VenuePluginFill() { + return ( + <> + + + + + ); +} diff --git a/src/panels/venue-settings/index.js b/src/panels/venue-settings/index.js index 15952ab4a..8696e022c 100644 --- a/src/panels/venue-settings/index.js +++ b/src/panels/venue-settings/index.js @@ -15,7 +15,7 @@ import { PluginDocumentSettingPanel } from '@wordpress/editor'; */ import { isVenuePostType } from '../../helpers/venue'; import VenueInformationPanel from './venue-information'; -import { VenuePluginDocumentSettings } from './slot.js'; +import { VenuePluginDocumentSettings } from './slot'; /** * VenueSettings Component From 9f2944776ee5a6cdb3b5dac694da32e9b8ac5bde Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 03:00:55 +0200 Subject: [PATCH 006/159] Update docs on used wp core Block Hooks API --- docs/developer/blocks/hookable-patterns/README.md | 11 ++++++----- includes/core/classes/class-block.php | 9 ++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/developer/blocks/hookable-patterns/README.md b/docs/developer/blocks/hookable-patterns/README.md index dc1b33067..6e41d0609 100644 --- a/docs/developer/blocks/hookable-patterns/README.md +++ b/docs/developer/blocks/hookable-patterns/README.md @@ -1,13 +1,14 @@ # Hookable patterns for events & venues -GatherPress uses block-patterns to set up new created events or venues. +GatherPress registers multiple invisible block-patterns, that are used as template properties of the main post types. -Whenever you create e.g. a new event post, it gets pre-poulated with a set of blocks, curated within a block-pattern named `gatherpress/event-template`. +Patterns allow to be filtered by the (upgraded since WordPress 6.5) Block Hooks API. Making use of this API brings some advantages, which are at least: -This is basically an almost empty pattern by registration, but... +- GatherPress' blocks can be easily moved, modified or removed by extenders via standardised core code +- GatherPress provides central entry points for plugin developers to hook in own blocks, to extend GatherPress +- GatherPress' blocks will provide their hooking code themself, which keeps concerns separate and code clean -- it gets all necessary blocks hooked in via the Block Hooks API -- blocks can be added or removed easily by plugins +For example when you create a new event post, it gets pre-poulated with a set of blocks, curated within a block-pattern named `gatherpress/event-template`. GatherPress combines four of such block-patterns to curate the creation of: diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 3ed3bd436..555091a95 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -88,7 +88,8 @@ public function register_block_patterns(): void { /** * Made to be used with the 'template' parameter - * when registering the 'gatherpress_event' post type. + * when registering the 'gatherpress_event' post type + * and will not be visible to the editor at any point. */ \register_block_pattern( 'gatherpress/event-template', @@ -105,7 +106,8 @@ public function register_block_patterns(): void { /** * Made to be used with the 'template' parameter - * when registering the 'gatherpress_venue' post type. + * when registering the 'gatherpress_venue' post type + * and will not be visible to the editor at any point. */ \register_block_pattern( 'gatherpress/venue-template', @@ -123,7 +125,8 @@ public function register_block_patterns(): void { /** * Mainly for use with the 'venue-details' block, * which is a group block under the hood - * and uses this pattern as innerBlocks template. + * and uses this pattern as innerBlocks template, + * it will not be visible to the editor at any point. */ \register_block_pattern( 'gatherpress/venue-details', From 60342e31cb73d4101ca0dfd0f154a849020eebf9 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 03:13:02 +0200 Subject: [PATCH 007/159] Update docs on used slots & fills --- docs/developer/blocks/slot-fills/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/developer/blocks/slot-fills/README.md b/docs/developer/blocks/slot-fills/README.md index 6fc71c446..67497bc14 100644 --- a/docs/developer/blocks/slot-fills/README.md +++ b/docs/developer/blocks/slot-fills/README.md @@ -1,6 +1,12 @@ # Slots & fills in GatherPress Admin UI -Similar to the hookable patterns, GatherPress provides multiple ways to modify its admin user-interface using slots and fills. +Similar to the central entry points for blocks – GatherPress' [hookable-patterns](./../hookable-patterns/), the plugin provides central administrative entry-points within the post- and site-editor for all block settings. + +GatherPress keeps relevant post data about the currently edited venue or event post within slot inside the `InseptorControls` panel, specific for each post type. These open slots are used by GatherPress itself and can be filled externally. + +Every slot belongs to one of each post type. Additionally the venue-slot will be added to the event-slot automatically. + +Every GatherPress block with own administrative sidebar-elements registers a fill for either the venue- or the events-slot. Plugin developers should provide their additions to GatherPress within the slots as well, which will help keeping the overall admin interface clean & consistent. ## Available Slots From 499413bfb42a5fe79e35034570931f6c41488988 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 04:11:24 +0200 Subject: [PATCH 008/159] Fix for CS --- docs/developer/blocks/hookable-patterns/README.md | 2 +- docs/developer/blocks/slot-fills/README.md | 2 +- includes/core/classes/class-block.php | 5 +++-- src/panels/event-settings/slot.js | 2 +- src/panels/venue-settings/slot.js | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/developer/blocks/hookable-patterns/README.md b/docs/developer/blocks/hookable-patterns/README.md index 6e41d0609..b6b00a227 100644 --- a/docs/developer/blocks/hookable-patterns/README.md +++ b/docs/developer/blocks/hookable-patterns/README.md @@ -39,4 +39,4 @@ A new created venue will have the following blocks prepared by default: - [@wordpress/hooks - Block Editor Handbook | Developer.WordPress.org](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-hooks/) - [#devnote - Introducing Block Hooks for dynamic blocks - Make WordPress Core](https://make.wordpress.org/core/2023/10/15/introducing-block-hooks-for-dynamic-blocks/) -- [Exploring the Block Hooks API in WordPress 6.5 - WordPress Developer Blog](https://developer.wordpress.org/news/2024/03/25/exploring-the-block-hooks-api-in-wordpress-6-5/) \ No newline at end of file +- [Exploring the Block Hooks API in WordPress 6.5 - WordPress Developer Blog](https://developer.wordpress.org/news/2024/03/25/exploring-the-block-hooks-api-in-wordpress-6-5/) diff --git a/docs/developer/blocks/slot-fills/README.md b/docs/developer/blocks/slot-fills/README.md index 67497bc14..581dfb21f 100644 --- a/docs/developer/blocks/slot-fills/README.md +++ b/docs/developer/blocks/slot-fills/README.md @@ -39,4 +39,4 @@ export default function GatherPressAwesomeFill() { - [Unified Extensibility APIs in 6.6][devnote] -[devnote]: https://make.wordpress.org/core/2024/06/18/editor-unified-extensibility-apis-in-6-6/ "#devnote - Editor: Unified Extensibility APIs in 6.6 – Make WordPress Core" \ No newline at end of file +[devnote]: https://make.wordpress.org/core/2024/06/18/editor-unified-extensibility-apis-in-6-6/ "#devnote - Editor: Unified Extensibility APIs in 6.6 – Make WordPress Core" diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 555091a95..252beb654 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -76,11 +76,12 @@ public function register_blocks(): void { /** - * Register custom block patterns. + * Register block patterns. * - * This method ... + * This method registers multiple different block-patterns for GatherPress. * * @since 1.0.0 + * @see https://developer.wordpress.org/reference/functions/register_block_pattern/ * * @return void */ diff --git a/src/panels/event-settings/slot.js b/src/panels/event-settings/slot.js index 2085fbf62..0c0285cca 100644 --- a/src/panels/event-settings/slot.js +++ b/src/panels/event-settings/slot.js @@ -14,4 +14,4 @@ export const EventPluginDocumentSettings = ({ children, className }) => ( ); -EventPluginDocumentSettings.Slot = Slot; \ No newline at end of file +EventPluginDocumentSettings.Slot = Slot; diff --git a/src/panels/venue-settings/slot.js b/src/panels/venue-settings/slot.js index 88626110d..4f92d6efb 100644 --- a/src/panels/venue-settings/slot.js +++ b/src/panels/venue-settings/slot.js @@ -14,4 +14,4 @@ export const VenuePluginDocumentSettings = ({ children, className }) => ( ); -VenuePluginDocumentSettings.Slot = Slot; \ No newline at end of file +VenuePluginDocumentSettings.Slot = Slot; From 0a4cffe2c1b902b6c7060ae4f7ef208a4c3baaaa Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 04:18:22 +0200 Subject: [PATCH 009/159] Fix typos --- docs/developer/blocks/hookable-patterns/README.md | 2 +- docs/developer/blocks/slot-fills/README.md | 4 ++-- includes/core/classes/class-venue.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/developer/blocks/hookable-patterns/README.md b/docs/developer/blocks/hookable-patterns/README.md index b6b00a227..1863d79fe 100644 --- a/docs/developer/blocks/hookable-patterns/README.md +++ b/docs/developer/blocks/hookable-patterns/README.md @@ -35,7 +35,7 @@ A new created venue will have the following blocks prepared by default: ## Venue Details within any post -### Ressources +### Resources - [@wordpress/hooks - Block Editor Handbook | Developer.WordPress.org](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-hooks/) - [#devnote - Introducing Block Hooks for dynamic blocks - Make WordPress Core](https://make.wordpress.org/core/2023/10/15/introducing-block-hooks-for-dynamic-blocks/) diff --git a/docs/developer/blocks/slot-fills/README.md b/docs/developer/blocks/slot-fills/README.md index 581dfb21f..5b52e5628 100644 --- a/docs/developer/blocks/slot-fills/README.md +++ b/docs/developer/blocks/slot-fills/README.md @@ -20,7 +20,7 @@ All slots will be rendered into the `PluginDocumentSettingPanel` imported from t - `VenuePluginFill` loads the `VenuePluginDocumentSettings` slot into the `EventPluginDocumentSettings` slot, so that venue changes can be made from within an event context. -## Add or remove UI elemnts +## Add or remove UI elements ```js export default function GatherPressAwesomeFill() { @@ -35,7 +35,7 @@ export default function GatherPressAwesomeFill() { ``` -### Ressources +### Resources - [Unified Extensibility APIs in 6.6][devnote] diff --git a/includes/core/classes/class-venue.php b/includes/core/classes/class-venue.php index b6edc7d86..d8f348188 100644 --- a/includes/core/classes/class-venue.php +++ b/includes/core/classes/class-venue.php @@ -231,7 +231,7 @@ public function register_taxonomy(): void { 'show_in_rest' => true, ) ); - // It is neccessary to make this taxonomy visible on event posts, within REST responses. + // It is necessary to make this taxonomy visible on event posts, within REST responses. register_taxonomy_for_object_type( self::TAXONOMY, Event::POST_TYPE ); } From a5d66bbc6d2b9b778c38ef902d8e95b45bf8188f Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 04:23:09 +0200 Subject: [PATCH 010/159] Fill the venue slot into the event slot by default (2/2) --- src/panels/venue-settings/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/panels/venue-settings/index.js b/src/panels/venue-settings/index.js index 8696e022c..bbdbc5b1e 100644 --- a/src/panels/venue-settings/index.js +++ b/src/panels/venue-settings/index.js @@ -16,6 +16,7 @@ import { PluginDocumentSettingPanel } from '@wordpress/editor'; import { isVenuePostType } from '../../helpers/venue'; import VenueInformationPanel from './venue-information'; import { VenuePluginDocumentSettings } from './slot'; +import VenuePluginFill from './fill'; /** * VenueSettings Component @@ -60,6 +61,10 @@ registerPlugin('gatherpress-venue-settings', { render: VenueSettings, }); +registerPlugin('gatherpress-venue-settings-at-events', { + render: VenuePluginFill, +}); + /** * Toggle Venue Settings Panel * From c8227c1bd99031cf3c90758891f9658a972d1751 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 04:36:55 +0200 Subject: [PATCH 011/159] Fix typo "standardised" should be "standardized" --- docs/developer/blocks/hookable-patterns/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/blocks/hookable-patterns/README.md b/docs/developer/blocks/hookable-patterns/README.md index 1863d79fe..2d8f11b4f 100644 --- a/docs/developer/blocks/hookable-patterns/README.md +++ b/docs/developer/blocks/hookable-patterns/README.md @@ -4,7 +4,7 @@ GatherPress registers multiple invisible block-patterns, that are used as templa Patterns allow to be filtered by the (upgraded since WordPress 6.5) Block Hooks API. Making use of this API brings some advantages, which are at least: -- GatherPress' blocks can be easily moved, modified or removed by extenders via standardised core code +- GatherPress' blocks can be easily moved, modified or removed by extenders via standardized core code - GatherPress provides central entry points for plugin developers to hook in own blocks, to extend GatherPress - GatherPress' blocks will provide their hooking code themself, which keeps concerns separate and code clean From 9a27b0d51d8b78178a0ba95a7387eadbcb61bace Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 05:10:41 +0200 Subject: [PATCH 012/159] Make event query respect ORDERBY, ORDER and 'inclusive running events' --- includes/core/classes/class-event-query.php | 103 +++++++++++++++----- 1 file changed, 78 insertions(+), 25 deletions(-) diff --git a/includes/core/classes/class-event-query.php b/includes/core/classes/class-event-query.php index f59092a5b..fe97aa0b9 100644 --- a/includes/core/classes/class-event-query.php +++ b/includes/core/classes/class-event-query.php @@ -53,7 +53,7 @@ protected function __construct() { */ protected function setup_hooks(): void { add_action( 'pre_get_posts', array( $this, 'prepare_event_query_before_execution' ) ); - add_filter( 'posts_clauses', array( $this, 'adjust_admin_event_sorting' ) ); + add_filter( 'posts_clauses', array( $this, 'adjust_admin_event_sorting' ), 10, 2 ); } /** @@ -231,10 +231,10 @@ static function () use ( $page_id ) { switch ( $events_query ) { case 'upcoming': remove_filter( 'posts_clauses', array( $this, 'adjust_sorting_for_past_events' ) ); - add_filter( 'posts_clauses', array( $this, 'adjust_sorting_for_upcoming_events' ) ); + add_filter( 'posts_clauses', array( $this, 'adjust_sorting_for_upcoming_events' ), 10, 2 ); break; case 'past': - add_filter( 'posts_clauses', array( $this, 'adjust_sorting_for_past_events' ) ); + add_filter( 'posts_clauses', array( $this, 'adjust_sorting_for_past_events' ), 10, 2 ); remove_filter( 'posts_clauses', array( $this, 'adjust_sorting_for_upcoming_events' ) ); break; default: @@ -249,13 +249,23 @@ static function () use ( $page_id ) { * This method modifies the SQL query pieces, including join, where, orderby, etc., to adjust the sorting criteria * for upcoming events in the query. It ensures that events are ordered by their start datetime in ascending order. * + * @see https://developer.wordpress.org/reference/hooks/posts_clauses/ + * * @since 1.0.0 * - * @param array $query_pieces An array containing pieces of the SQL query. + * @param array $query_pieces An array containing pieces of the SQL query. + * @param WP_Query $query The WP_Query instance (passed by reference). * @return array The modified SQL query pieces with adjusted sorting criteria for upcoming events. */ - public function adjust_sorting_for_upcoming_events( array $query_pieces ): array { - return $this->adjust_event_sql( $query_pieces, 'upcoming', 'ASC' ); + public function adjust_sorting_for_upcoming_events( array $query_pieces, WP_Query $query ): array { + + return $this->adjust_event_sql( + $query_pieces, + 'upcoming', + $query->get( 'order' ), + $query->get( 'orderby' ), + (bool) $query->get( 'include_unfinished' ) + ); } /** @@ -264,12 +274,18 @@ public function adjust_sorting_for_upcoming_events( array $query_pieces ): array * This method modifies the SQL query pieces, including join, where, orderby, etc., to adjust the sorting criteria * for past events in the query. It ensures that events are ordered by their start datetime in the desired order. * - * @param array $query_pieces An array containing pieces of the SQL query. - * + * @param array $query_pieces An array containing pieces of the SQL query. + * @param WP_Query $query The WP_Query instance (passed by reference). * @return array The modified SQL query pieces with adjusted sorting criteria for past events. */ - public function adjust_sorting_for_past_events( array $query_pieces ): array { - return $this->adjust_event_sql( $query_pieces, 'past' ); + public function adjust_sorting_for_past_events( array $query_pieces, WP_Query $query ): array { + return $this->adjust_event_sql( + $query_pieces, + 'past', + $query->get( 'order' ), + $query->get( 'orderby' ), + (bool) $query->get( 'include_unfinished' ) + ); } /** @@ -280,18 +296,17 @@ public function adjust_sorting_for_past_events( array $query_pieces ): array { * * @since 1.0.0 * - * @param array $query_pieces An array containing pieces of the SQL query. + * @param array $query_pieces An array containing pieces of the SQL query. + * @param WP_Query $query The WP_Query instance (passed by reference). * @return array The modified SQL query pieces with adjusted sorting criteria. */ - public function adjust_admin_event_sorting( array $query_pieces ): array { + public function adjust_admin_event_sorting( array $query_pieces, WP_Query $query ): array { if ( ! is_admin() ) { return $query_pieces; } - global $wp_query; - - if ( 'datetime' === $wp_query->get( 'orderby' ) ) { - $query_pieces = $this->adjust_event_sql( $query_pieces, 'all', $wp_query->get( 'order' ) ); + if ( 'datetime' === $query->get( 'orderby' ) ) { + $query_pieces = $this->adjust_event_sql( $query_pieces, 'all', $query->get( 'order' ) ); } return $query_pieces; @@ -304,14 +319,26 @@ public function adjust_admin_event_sorting( array $query_pieces ): array { * the `gatherpress_events` table in the database join. It allows querying events based on different * criteria such as upcoming or past events and specifying the event order (DESC or ASC). * + * @see https://developer.wordpress.org/reference/hooks/posts_join/ + * @see https://developer.wordpress.org/reference/hooks/posts_orderby/ + * @see https://developer.wordpress.org/reference/hooks/posts_where/ + * * @since 1.0.0 * - * @param array $pieces An array of query pieces, including join, where, orderby, and more. - * @param string $type The type of events to query (options: 'all', 'upcoming', 'past'). - * @param string $order The event order ('DESC' for descending or 'ASC' for ascending). + * @param array $pieces An array of query pieces, including join, where, orderby, and more. + * @param string $type The type of events to query (options: 'all', 'upcoming', 'past') (Default: 'all'). + * @param string $order The event order ('DESC' for descending or 'ASC' for ascending) (Default: 'DESC'). + * @param string[]|string $order_by List or singular string of ORDERBY statement(s) (Default: ['datetime']). + * @param bool $inclusive Whether to include currently running events in the query (Default: true). * @return array An array containing adjusted SQL clauses for the Event query. */ - public function adjust_event_sql( array $pieces, string $type = 'all', string $order = 'DESC' ): array { + public function adjust_event_sql( + array $pieces, + string $type = 'all', + string $order = 'DESC', + array|string $order_by = array( 'datetime' ), + bool $inclusive = true + ): array { global $wpdb; $defaults = array( @@ -324,13 +351,37 @@ public function adjust_event_sql( array $pieces, string $type = 'all', string $o 'limits' => '', ); $pieces = array_merge( $defaults, $pieces ); - $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix ); + $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix ); // Could also be (just) $wpdb->{gatherpress_events}. $pieces['join'] .= ' LEFT JOIN ' . esc_sql( $table ) . ' ON ' . esc_sql( $wpdb->posts ) . '.ID=' . esc_sql( $table ) . '.post_id'; $order = strtoupper( $order ); - if ( in_array( $order, array( 'DESC', 'ASC' ), true ) ) { - $pieces['orderby'] = sprintf( esc_sql( $table ) . '.datetime_start_gmt %s', esc_sql( $order ) ); + + // ORDERBY is an array, which allows to orderby multiple values. + // Currently it is only allowed to order events by ONE value. + $order_by = ( is_array( $order_by ) ) ? $order_by[0] : $order_by; + switch ( strtolower( $order_by ) ) { + case 'id': + $pieces['orderby'] = sprintf( esc_sql( $wpdb->posts ) . '.ID %s', esc_sql( $order ) ); + break; + + case 'title': + $pieces['orderby'] = sprintf( esc_sql( $wpdb->posts ) . '.post_name %s', esc_sql( $order ) ); + break; + + case 'modified': + $pieces['orderby'] = sprintf( esc_sql( $wpdb->posts ) . '.post_modified_gmt %s', esc_sql( $order ) ); + break; + + case 'rand': + $pieces['orderby'] = esc_sql( 'RAND()' ); + break; + + case 'datetime': + default: + $pieces['orderby'] = sprintf( esc_sql( $table ) . '.datetime_start_gmt %s', esc_sql( $order ) ); + break; + } } if ( 'all' === $type ) { @@ -339,10 +390,12 @@ public function adjust_event_sql( array $pieces, string $type = 'all', string $o $current = gmdate( Event::DATETIME_FORMAT, time() ); + $column = ( ( $inclusive && 'upcoming' === $type ) || ( ! $inclusive && 'past' === $type ) ) ? 'datetime_end_gmt' : 'datetime_start_gmt'; + if ( 'upcoming' === $type ) { - $pieces['where'] .= $wpdb->prepare( ' AND %i.datetime_end_gmt >= %s', $table, $current ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnsupportedIdentifierPlaceholder + $pieces['where'] .= $wpdb->prepare( ' AND %i.%i >= %s', $table, $column, $current ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnsupportedIdentifierPlaceholder } elseif ( 'past' === $type ) { - $pieces['where'] .= $wpdb->prepare( ' AND %i.datetime_end_gmt < %s', $table, $current ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnsupportedIdentifierPlaceholder + $pieces['where'] .= $wpdb->prepare( ' AND %i.%i < %s', $table, $column, $current ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnsupportedIdentifierPlaceholder } return $pieces; From 6d5631d9fc48e91889972064c31f66ab8a777d8a Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 05:19:26 +0200 Subject: [PATCH 013/159] Remove the union return type declarations to become compatible with PHP 7.4 --- includes/core/classes/class-event-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-event-query.php b/includes/core/classes/class-event-query.php index fe97aa0b9..e6c482cce 100644 --- a/includes/core/classes/class-event-query.php +++ b/includes/core/classes/class-event-query.php @@ -336,7 +336,7 @@ public function adjust_event_sql( array $pieces, string $type = 'all', string $order = 'DESC', - array|string $order_by = array( 'datetime' ), + $order_by = array( 'datetime' ), bool $inclusive = true ): array { global $wpdb; From 0209441bc8bc4e60564c53b5e7152403d9852702 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 19 Sep 2024 14:36:48 +0200 Subject: [PATCH 014/159] Add nneded 2nd argument wp_query to func call --- .../includes/core/classes/class-test-event-query.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-query.php b/test/unit/php/includes/core/classes/class-test-event-query.php index 56e82e1cc..3a03cd83c 100644 --- a/test/unit/php/includes/core/classes/class-test-event-query.php +++ b/test/unit/php/includes/core/classes/class-test-event-query.php @@ -200,19 +200,19 @@ public function test_get_events_list(): void { */ public function test_adjust_admin_event_sorting(): void { $instance = Event_Query::get_instance(); + global $wp_query; $this->mock->user( false, 'admin' ); - $response = $instance->adjust_admin_event_sorting( array() ); + $response = $instance->adjust_admin_event_sorting( array(), $wp_query ); $this->assertEmpty( $response, 'Failed to assert array is not empty' ); $this->mock->user( true, 'admin' ); // Set 'orderby' admin query to 'datetime'. - global $wp_query; $wp_query->set( 'orderby', 'datetime' ); // Run function with empty array passed as 'pieces' argument. - $response = $instance->adjust_admin_event_sorting( array() ); + $response = $instance->adjust_admin_event_sorting( array(), $wp_query ); // Assert that an array was generated from the adjustsql argument. todo: make this test more meaningful. $this->assertNotEmpty( $response, 'Failed to assert array is empty' ); @@ -239,11 +239,11 @@ public function test_adjust_event_sql(): void { $retval = $instance->adjust_event_sql( array(), 'past', 'desc' ); $this->assertStringContainsString( 'DESC', $retval['orderby'] ); - $this->assertStringContainsString( "AND `{$table}`.datetime_end_gmt <", $retval['where'] ); + $this->assertStringContainsString( "AND `{$table}`.`datetime_end_gmt` <", $retval['where'] ); $retval = $instance->adjust_event_sql( array(), 'upcoming', 'ASC' ); $this->assertStringContainsString( 'ASC', $retval['orderby'] ); - $this->assertStringContainsString( "AND `{$table}`.datetime_end_gmt >=", $retval['where'] ); + $this->assertStringContainsString( "AND `{$table}`.`datetime_end_gmt` >=", $retval['where'] ); } } From e46b8e1e8653ba3c2825c72e52d1e3f9bec2bbda Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:20:15 +0200 Subject: [PATCH 015/159] NEW method get_datetime_comparison_column() --- includes/core/classes/class-event-query.php | 28 ++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/includes/core/classes/class-event-query.php b/includes/core/classes/class-event-query.php index e6c482cce..b0736d6d1 100644 --- a/includes/core/classes/class-event-query.php +++ b/includes/core/classes/class-event-query.php @@ -390,7 +390,7 @@ public function adjust_event_sql( $current = gmdate( Event::DATETIME_FORMAT, time() ); - $column = ( ( $inclusive && 'upcoming' === $type ) || ( ! $inclusive && 'past' === $type ) ) ? 'datetime_end_gmt' : 'datetime_start_gmt'; + $column = $this->get_datetime_comparison_column( $type, $inclusive ); if ( 'upcoming' === $type ) { $pieces['where'] .= $wpdb->prepare( ' AND %i.%i >= %s', $table, $column, $current ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnsupportedIdentifierPlaceholder @@ -400,4 +400,30 @@ public function adjust_event_sql( return $pieces; } + + /** + * Determine which db column to compare against, + * based on the type of event query (either upcoming or past) + * and if started but unfinished events should be included. + * + * @param string $type The type of events to query (options: 'all', 'upcoming', 'past') (Can not be 'all' anymore). + * @param bool $inclusive Whether to include currently running events in the query. + * + * @return string Name of the DB column, which content to compare against the current time. + */ + protected static function get_datetime_comparison_column( string $type, bool $inclusive ) : string { + if ( + // Upcoming events, including ones that are running. + ( $inclusive && 'upcoming' === $type ) || + // Past events, that are finished already. + ( ! $inclusive && 'past' === $type ) + ) { + return 'datetime_end_gmt'; + } + + // All others, means: + // - Upcoming events, without running events. + // - Past events, that are still running. + return 'datetime_start_gmt'; + } } From 401d35acb33ea518d9591ea5a4d3e19d9391fe56 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:36:57 +0200 Subject: [PATCH 016/159] Fix for CS --- includes/core/classes/class-event-query.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-event-query.php b/includes/core/classes/class-event-query.php index b0736d6d1..de5f2412e 100644 --- a/includes/core/classes/class-event-query.php +++ b/includes/core/classes/class-event-query.php @@ -389,8 +389,7 @@ public function adjust_event_sql( } $current = gmdate( Event::DATETIME_FORMAT, time() ); - - $column = $this->get_datetime_comparison_column( $type, $inclusive ); + $column = $this->get_datetime_comparison_column( $type, $inclusive ); if ( 'upcoming' === $type ) { $pieces['where'] .= $wpdb->prepare( ' AND %i.%i >= %s', $table, $column, $current ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnsupportedIdentifierPlaceholder @@ -411,7 +410,7 @@ public function adjust_event_sql( * * @return string Name of the DB column, which content to compare against the current time. */ - protected static function get_datetime_comparison_column( string $type, bool $inclusive ) : string { + protected static function get_datetime_comparison_column( string $type, bool $inclusive ): string { if ( // Upcoming events, including ones that are running. ( $inclusive && 'upcoming' === $type ) || From 6a9919f7474ed43dc95f56cd3dff0a67325d938d Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:37:06 +0200 Subject: [PATCH 017/159] Fix unit test --- .../php/includes/core/classes/class-test-event-query.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-query.php b/test/unit/php/includes/core/classes/class-test-event-query.php index 3a03cd83c..96bfeee6a 100644 --- a/test/unit/php/includes/core/classes/class-test-event-query.php +++ b/test/unit/php/includes/core/classes/class-test-event-query.php @@ -236,7 +236,12 @@ public function test_adjust_event_sql(): void { $this->assertStringContainsString( 'DESC', $retval['orderby'] ); $this->assertEmpty( $retval['where'] ); - $retval = $instance->adjust_event_sql( array(), 'past', 'desc' ); + $retval = $instance->adjust_event_sql( array(), 'past', 'desc' ); // inclusive will be TRUE by default + + $this->assertStringContainsString( 'DESC', $retval['orderby'] ); + $this->assertStringContainsString( "AND `{$table}`.`datetime_start_gmt` <", $retval['where'] ); + + $retval = $instance->adjust_event_sql( array(), 'past', 'desc', 'datetime', false ); $this->assertStringContainsString( 'DESC', $retval['orderby'] ); $this->assertStringContainsString( "AND `{$table}`.`datetime_end_gmt` <", $retval['where'] ); From 7c95790fcbc1a796f64d0f8b8c43b01544c17015 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:40:12 +0200 Subject: [PATCH 018/159] Fix for CS --- test/unit/php/includes/core/classes/class-test-event-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-query.php b/test/unit/php/includes/core/classes/class-test-event-query.php index 96bfeee6a..cb935c75e 100644 --- a/test/unit/php/includes/core/classes/class-test-event-query.php +++ b/test/unit/php/includes/core/classes/class-test-event-query.php @@ -236,7 +236,7 @@ public function test_adjust_event_sql(): void { $this->assertStringContainsString( 'DESC', $retval['orderby'] ); $this->assertEmpty( $retval['where'] ); - $retval = $instance->adjust_event_sql( array(), 'past', 'desc' ); // inclusive will be TRUE by default + $retval = $instance->adjust_event_sql( array(), 'past', 'desc' ); // inclusive will be TRUE by default. $this->assertStringContainsString( 'DESC', $retval['orderby'] ); $this->assertStringContainsString( "AND `{$table}`.`datetime_start_gmt` <", $retval['where'] ); From 84a18fa19f7043749d05d06159462cb14f2c862c Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:53:22 +0200 Subject: [PATCH 019/159] Remove default prio of 10 --- includes/core/classes/class-block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 252beb654..ac39c7ffb 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -49,7 +49,7 @@ protected function __construct() { * @return void */ protected function setup_hooks(): void { - add_action( 'init', array( $this, 'register_block_patterns' ), 10 ); + add_action( 'init', array( $this, 'register_block_patterns' ) ); // Priority 11 needed for block.json translations of title and description. add_action( 'init', array( $this, 'register_blocks' ), 11 ); } From 77b36fdd4ef50078a46c40e7b7955ded5d971083 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:55:36 +0200 Subject: [PATCH 020/159] Add l10n --- includes/core/classes/class-block.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index ac39c7ffb..ae9622b08 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -95,7 +95,7 @@ public function register_block_patterns(): void { \register_block_pattern( 'gatherpress/event-template', array( - 'title' => 'Invisible Event Template Block Pattern', + 'title' => __( 'Invisible Event Template Block Pattern', 'gatherpress' ), // Even this paragraph seems useless, it's not. // It is the entry point for all our hooked blocks // and as such absolutely important! @@ -113,7 +113,7 @@ public function register_block_patterns(): void { \register_block_pattern( 'gatherpress/venue-template', array( - 'title' => 'Invisible Venue Template Block Pattern', + 'title' => __( 'Invisible Venue Template Block Pattern', 'gatherpress' ), // Even this paragraph seems useless, it's not. // It is the entry point for all our hooked blocks // and as such absolutely important! @@ -132,7 +132,7 @@ public function register_block_patterns(): void { \register_block_pattern( 'gatherpress/venue-details', array( - 'title' => 'Invisible Venue Details Block Pattern', + 'title' => __( 'Invisible Venue Details Block Pattern', 'gatherpress' ), // Even this post-title seems useless, it's not. // It is the entry point for all our hooked blocks // and as such absolutely important! From d3a1dfee83271a47b9809db2c278c0458410a358 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 01:56:13 +0200 Subject: [PATCH 021/159] Use global fn without leading "\" --- includes/core/classes/class-block.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index ae9622b08..d2a0ce44e 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -92,7 +92,7 @@ public function register_block_patterns(): void { * when registering the 'gatherpress_event' post type * and will not be visible to the editor at any point. */ - \register_block_pattern( + register_block_pattern( 'gatherpress/event-template', array( 'title' => __( 'Invisible Event Template Block Pattern', 'gatherpress' ), @@ -110,7 +110,7 @@ public function register_block_patterns(): void { * when registering the 'gatherpress_venue' post type * and will not be visible to the editor at any point. */ - \register_block_pattern( + register_block_pattern( 'gatherpress/venue-template', array( 'title' => __( 'Invisible Venue Template Block Pattern', 'gatherpress' ), @@ -129,7 +129,7 @@ public function register_block_patterns(): void { * and uses this pattern as innerBlocks template, * it will not be visible to the editor at any point. */ - \register_block_pattern( + register_block_pattern( 'gatherpress/venue-details', array( 'title' => __( 'Invisible Venue Details Block Pattern', 'gatherpress' ), From f749adbf774d83e1ce6e818f8c567f9d07c734ee Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 06:09:17 +0200 Subject: [PATCH 022/159] Register & require_once block variations --- includes/core/classes/class-block.php | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index d2a0ce44e..55ad9f2d4 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -50,6 +50,7 @@ protected function __construct() { */ protected function setup_hooks(): void { add_action( 'init', array( $this, 'register_block_patterns' ) ); + add_action( 'init', array( $this, 'register_block_variations' ) ); // Priority 11 needed for block.json translations of title and description. add_action( 'init', array( $this, 'register_blocks' ), 11 ); } @@ -74,6 +75,35 @@ public function register_blocks(): void { } } + public function register_block_variations(): void { + foreach ( $this->get_block_variations() as $block ) { + $name = $this->get_classname_from_foldername( $block ); + require_once sprintf( '%1$s/build/variations/%2$s/class-%2$s.php', GATHERPRESS_CORE_PATH, $block ); + $name::get_instance(); + } + } + + protected static function get_block_variations(): array { + $blocks_directory = sprintf( '%1$s/build/variations/', GATHERPRESS_CORE_PATH ); + $blocks = array_diff( scandir( $blocks_directory ), array( '..', '.' ) ); + + return $blocks; // maybe cache in var. + } + + /** + * Get class name from folder name. + * + * @param string $foldername + * + * @return string + */ + protected static function get_classname_from_foldername( string $foldername ) : string { + return join( '\\', array( + __CLASS__, + ucwords( str_replace( '-', '_', $foldername ), '_' ) + )); + } + /** * Register block patterns. From cb45d0415b2ca276cec4d86f9bec5b8e61ce4330 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 06:10:09 +0200 Subject: [PATCH 023/159] Include variations in webpack config & copy all php classes to build --- webpack.config.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 33798f2c6..28bbfed76 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,15 +1,41 @@ /** * External Dependencies */ -const path = require('path'); +const fs = require('fs'); +const path = require('path'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); /** * WordPress Dependencies */ const defaultConfig = require('@wordpress/scripts/config/webpack.config.js'); +function getVariationEntries() { + const variationsDir = path.resolve(process.cwd(), 'src', 'variations'); + const entries = {}; + + const variationDirs = fs.readdirSync(variationsDir); + for (const variation of variationDirs) { + const variationPath = path.join(variationsDir, variation); + entries[`variations/${variation}/index`] = path.join(variationPath, 'index.js'); + }; + return entries; +} + module.exports = { ...defaultConfig, + plugins: [ + ...defaultConfig.plugins, + new CopyWebpackPlugin({ + patterns: [ + { + from: 'variations/**/class-*.php', + to: '[path][name][ext]', + context: 'src', + }, + ], + }), + ], entry: { ...defaultConfig.entry(), admin_style: path.resolve(process.cwd(), 'src', 'admin.scss'), @@ -24,6 +50,8 @@ module.exports = { ), profile: path.resolve(process.cwd(), 'src/profile', 'index.js'), profile_style: path.resolve(process.cwd(), 'src/profile', 'style.scss'), + // 'variations/add-to-calendar/index': path.resolve(process.cwd(), 'src/variations/add-to-calendar', 'index.js'), + ...getVariationEntries(), }, module: { ...defaultConfig.module, From 8a3ee5f59289e62e4936775bd842e9533fa26163 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 06:14:26 +0200 Subject: [PATCH 024/159] Add TEST block-variation (to illustrate the idea) --- .../add-to-calendar/class-add-to-calendar.php | 61 +++++++++++++++++++ .../add-to-calendar/index.asset.php | 1 + build/variations/add-to-calendar/index.js | 0 .../add-to-calendar/class-add-to-calendar.php | 61 +++++++++++++++++++ src/variations/add-to-calendar/index.js | 0 5 files changed, 123 insertions(+) create mode 100644 build/variations/add-to-calendar/class-add-to-calendar.php create mode 100644 build/variations/add-to-calendar/index.asset.php create mode 100644 build/variations/add-to-calendar/index.js create mode 100644 src/variations/add-to-calendar/class-add-to-calendar.php create mode 100644 src/variations/add-to-calendar/index.js diff --git a/build/variations/add-to-calendar/class-add-to-calendar.php b/build/variations/add-to-calendar/class-add-to-calendar.php new file mode 100644 index 000000000..457d3bf73 --- /dev/null +++ b/build/variations/add-to-calendar/class-add-to-calendar.php @@ -0,0 +1,61 @@ +setup_hooks(); + } + + /** + * Set up hooks for various purposes. + * + * This method adds hooks for different purposes as needed. + * + * @since 1.0.0 + * + * @return void + */ + protected function setup_hooks(): void { + // wp_die('variation test end.'); + + // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); + // add_action( 'init', array( $this, 'register_blocks_styles' ) ); + } + +} diff --git a/build/variations/add-to-calendar/index.asset.php b/build/variations/add-to-calendar/index.asset.php new file mode 100644 index 000000000..f53453333 --- /dev/null +++ b/build/variations/add-to-calendar/index.asset.php @@ -0,0 +1 @@ + array(), 'version' => '31d6cfe0d16ae931b73c'); diff --git a/build/variations/add-to-calendar/index.js b/build/variations/add-to-calendar/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/src/variations/add-to-calendar/class-add-to-calendar.php b/src/variations/add-to-calendar/class-add-to-calendar.php new file mode 100644 index 000000000..457d3bf73 --- /dev/null +++ b/src/variations/add-to-calendar/class-add-to-calendar.php @@ -0,0 +1,61 @@ +setup_hooks(); + } + + /** + * Set up hooks for various purposes. + * + * This method adds hooks for different purposes as needed. + * + * @since 1.0.0 + * + * @return void + */ + protected function setup_hooks(): void { + // wp_die('variation test end.'); + + // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); + // add_action( 'init', array( $this, 'register_blocks_styles' ) ); + } + +} diff --git a/src/variations/add-to-calendar/index.js b/src/variations/add-to-calendar/index.js new file mode 100644 index 000000000..e69de29bb From 7ff1c5fbba55719a46ffe08dc707270928cee8cd Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 21 Sep 2024 08:34:49 +0200 Subject: [PATCH 025/159] NEW Block_Variation Trait --- includes/core/classes/class-block.php | 6 +- .../classes/traits/class-block-variation.php | 153 ++++++++++++++++++ .../add-to-calendar/class-add-to-calendar.php | 8 +- 3 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 includes/core/classes/traits/class-block-variation.php diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 55ad9f2d4..0500e81f1 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -49,8 +49,10 @@ protected function __construct() { * @return void */ protected function setup_hooks(): void { + + // Priority 9 needed to allow the Block_Variation(s) to register their assets on init:10, without worries. + add_action( 'init', array( $this, 'register_block_variations' ), 9 ); add_action( 'init', array( $this, 'register_block_patterns' ) ); - add_action( 'init', array( $this, 'register_block_variations' ) ); // Priority 11 needed for block.json translations of title and description. add_action( 'init', array( $this, 'register_blocks' ), 11 ); } @@ -92,6 +94,8 @@ protected static function get_block_variations(): array { /** * Get class name from folder name. + * + * @todo maybe better in the Utility class? * * @param string $foldername * diff --git a/includes/core/classes/traits/class-block-variation.php b/includes/core/classes/traits/class-block-variation.php new file mode 100644 index 000000000..053991804 --- /dev/null +++ b/includes/core/classes/traits/class-block-variation.php @@ -0,0 +1,153 @@ +get_foldername_from_classname(), + ] + ) + ); + } + + + +/** + * Register a new script and sets translated strings for the script. + * + * @throws \Error If build-files doesn't exist errors out in local environments and writes to error_log otherwise. + * + * @param string $asset Slug of the block to register scripts and translations for. + * + * @return void + */ +protected function register_asset( string $asset ): void { + + $script_asset_path = sprintf( '%1$s/build/variations/%2$s/index.asset.php', GATHERPRESS_CORE_PATH, $asset ); + // wp_die($script_asset_path); + if ( ! \file_exists( $script_asset_path ) ) { + $error_message = "You need to run `npm start` or `npm run build` for the '$asset' block-asset first."; + if ( \in_array( wp_get_environment_type(), [ 'local', 'development' ], true ) ) { + throw new \Error( esc_html( $error_message ) ); + } else { + // Should write to the \error_log( $error_message ); if possible. + return; + } + } + + $index_js = "build/$asset/index.js"; + $script_asset = require $script_asset_path; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable + \wp_register_script( + "gatherpress--$asset", + plugins_url( $index_js, GATHERPRESS_CORE_FILE ), + $script_asset['dependencies'], + $script_asset['version'], + true + ); + + wp_set_script_translations( + "gatherpress--$asset", + 'gatherpress' + ); + + // $index_css = "build/$asset/$asset.css"; + // \wp_register_style( + // "gatherpress--$asset", + // plugins_url( $index_css, __FILE__ ), + // [ 'wp-block-buttons','wp-block-button','global-styles' ], + // time(), + // 'screen' + // ); + +} + + +/** + * Enqueue all scripts. + * + * @return void + */ +protected function enqueue_assets(): void { + \array_map( + array( $this, 'enqueue_asset' ), + \array_merge( + // get_editor_assets(), + [ + $this->get_foldername_from_classname(), + ] + ) + ); +} + +/** + * Enqueue a script. + * + * @param string $asset Slug of the block to load the frontend scripts for. + * + * @return void + */ +protected function enqueue_asset( string $asset ): void { + wp_enqueue_script( "gatherpress--$asset" ); + wp_enqueue_style( "gatherpress--$asset" ); +} + + + /** + * Get foldername from classname. + * + * @todo maybe better in the Utility class? + * + * @param string $classname + * + * @return string + */ + protected static function get_foldername_from_classname( string $classname = __CLASS__ ) : string { + $current_class = explode( + '\\', + $classname + ); + return strtolower( str_replace( + '_', + '-', + array_pop( + $current_class + ) + )); + } +} diff --git a/src/variations/add-to-calendar/class-add-to-calendar.php b/src/variations/add-to-calendar/class-add-to-calendar.php index 457d3bf73..2ad2d9862 100644 --- a/src/variations/add-to-calendar/class-add-to-calendar.php +++ b/src/variations/add-to-calendar/class-add-to-calendar.php @@ -13,7 +13,7 @@ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore -use GatherPress\Core\Traits\Singleton; +use GatherPress\Core\Traits\Block_Variation; // Could potentially use a ... // use GatherPress\Core\Traits\Block_Variation; @@ -27,9 +27,9 @@ */ class Add_To_Calendar { /** - * Enforces a single instance of this class. + * */ - use Singleton; + use Block_Variation; /** * Class constructor. @@ -52,6 +52,8 @@ protected function __construct() { * @return void */ protected function setup_hooks(): void { + // $this->register(); + $this->register_and_enqueue_assets(); // wp_die('variation test end.'); // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); From fb0da1cb49da4e8d5a85ac96334a30989bfcbdf4 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Wed, 25 Sep 2024 13:15:56 +0200 Subject: [PATCH 026/159] Fix error: 'copy-webpack-plugin' should be listed in the project's dependencies. --- package-lock.json | 165 +++++++++++++++++++++++++++++++++++----------- package.json | 1 + 2 files changed, 128 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2410d54da..7d1ea72ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "@wp-playground/cli": "^0.9.32", "classnames": "^2.5.1", "clsx": "^2.1.1", + "copy-webpack-plugin": "^12.0.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", @@ -4481,6 +4482,18 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -8850,6 +8863,74 @@ "dev": true, "license": "MIT" }, + "node_modules/@wordpress/scripts/node_modules/copy-webpack-plugin": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz", + "integrity": "sha512-xFVltahqlsRcyyJqQbDY6EYTtyQZF9rf+JPjwHObLdPFMEISqkFkr7mFoVOC6BfYS/dNThyoQKvziugm+OnwBg==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.7", + "glob-parent": "^6.0.1", + "globby": "^12.0.2", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" + }, + "engines": { + "node": ">= 12.20.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/@wordpress/scripts/node_modules/copy-webpack-plugin/node_modules/array-union": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz", + "integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@wordpress/scripts/node_modules/copy-webpack-plugin/node_modules/globby": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", + "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", + "dev": true, + "dependencies": { + "array-union": "^3.0.1", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.7", + "ignore": "^5.1.9", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@wordpress/scripts/node_modules/copy-webpack-plugin/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@wordpress/scripts/node_modules/css-loader": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.11.0.tgz", @@ -9974,19 +10055,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz", - "integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", @@ -11799,21 +11867,20 @@ "dev": true }, "node_modules/copy-webpack-plugin": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz", - "integrity": "sha512-xFVltahqlsRcyyJqQbDY6EYTtyQZF9rf+JPjwHObLdPFMEISqkFkr7mFoVOC6BfYS/dNThyoQKvziugm+OnwBg==", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz", + "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==", "dev": true, - "license": "MIT", "dependencies": { - "fast-glob": "^3.2.7", + "fast-glob": "^3.3.2", "glob-parent": "^6.0.1", - "globby": "^12.0.2", + "globby": "^14.0.0", "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0" + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" }, "engines": { - "node": ">= 12.20.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", @@ -15452,32 +15519,30 @@ } }, "node_modules/globby": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", - "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", "dev": true, - "license": "MIT", "dependencies": { - "array-union": "^3.0.1", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.7", - "ignore": "^5.1.9", - "merge2": "^1.4.1", - "slash": "^4.0.0" + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "node_modules/globby/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -15485,6 +15550,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globjoin": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", @@ -27148,6 +27225,18 @@ "node": ">=4" } }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", diff --git a/package.json b/package.json index 387918f38..6a7a1ab7e 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@wp-playground/cli": "^0.9.32", "classnames": "^2.5.1", "clsx": "^2.1.1", + "copy-webpack-plugin": "^12.0.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", From 190a84ce2cbcff0281328d224a143d77fd219cbf Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Wed, 25 Sep 2024 14:00:04 +0200 Subject: [PATCH 027/159] Fix for CS --- .../add-to-calendar/class-add-to-calendar.php | 27 +-- includes/core/classes/class-block.php | 30 ++- .../classes/traits/class-block-variation.php | 192 +++++++++--------- .../add-to-calendar/class-add-to-calendar.php | 23 +-- webpack.config.js | 23 ++- 5 files changed, 154 insertions(+), 141 deletions(-) diff --git a/build/variations/add-to-calendar/class-add-to-calendar.php b/build/variations/add-to-calendar/class-add-to-calendar.php index 457d3bf73..5f5ed4921 100644 --- a/build/variations/add-to-calendar/class-add-to-calendar.php +++ b/build/variations/add-to-calendar/class-add-to-calendar.php @@ -1,8 +1,7 @@ register_and_enqueue_assets(); - // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); - // add_action( 'init', array( $this, 'register_blocks_styles' ) ); + // phpcs:disable Squiz.PHP.CommentedOutCode.Found + // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); + // add_action( 'init', array( $this, 'register_blocks_styles' ) ); //. + // phpcs:enable Squiz.PHP.CommentedOutCode.Found } - } diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 0500e81f1..fa4e27737 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -77,6 +77,11 @@ public function register_blocks(): void { } } + /** + * Require files & instantiate block-variation classes. + * + * @return void + */ public function register_block_variations(): void { foreach ( $this->get_block_variations() as $block ) { $name = $this->get_classname_from_foldername( $block ); @@ -85,6 +90,11 @@ public function register_block_variations(): void { } } + /** + * Get list of all block variations based on the build directory. + * + * @return string[] List of block-variations foldernames. + */ protected static function get_block_variations(): array { $blocks_directory = sprintf( '%1$s/build/variations/', GATHERPRESS_CORE_PATH ); $blocks = array_diff( scandir( $blocks_directory ), array( '..', '.' ) ); @@ -94,21 +104,23 @@ protected static function get_block_variations(): array { /** * Get class name from folder name. - * + * * @todo maybe better in the Utility class? * - * @param string $foldername + * @param string $foldername String with name of a folder. * - * @return string + * @return string Class name that reflects the given foldername. */ - protected static function get_classname_from_foldername( string $foldername ) : string { - return join( '\\', array( - __CLASS__, - ucwords( str_replace( '-', '_', $foldername ), '_' ) - )); + protected static function get_classname_from_foldername( string $foldername ): string { + return join( + '\\', + array( + __CLASS__, + ucwords( str_replace( '-', '_', $foldername ), '_' ), + ) + ); } - /** * Register block patterns. * diff --git a/includes/core/classes/traits/class-block-variation.php b/includes/core/classes/traits/class-block-variation.php index 053991804..459312a89 100644 --- a/includes/core/classes/traits/class-block-variation.php +++ b/includes/core/classes/traits/class-block-variation.php @@ -1,6 +1,6 @@ get_foldername_from_classname(), - ] - ) + array( $this->get_foldername_from_classname() ) ); } + /** + * Enqueue all assets. + * + * @return void + */ + public function enqueue_assets(): void { + \array_map( + array( $this, 'enqueue_asset' ), + array( $this->get_foldername_from_classname() ) + ); + } -/** - * Register a new script and sets translated strings for the script. - * - * @throws \Error If build-files doesn't exist errors out in local environments and writes to error_log otherwise. - * - * @param string $asset Slug of the block to register scripts and translations for. - * - * @return void - */ -protected function register_asset( string $asset ): void { - - $script_asset_path = sprintf( '%1$s/build/variations/%2$s/index.asset.php', GATHERPRESS_CORE_PATH, $asset ); - // wp_die($script_asset_path); - if ( ! \file_exists( $script_asset_path ) ) { - $error_message = "You need to run `npm start` or `npm run build` for the '$asset' block-asset first."; - if ( \in_array( wp_get_environment_type(), [ 'local', 'development' ], true ) ) { - throw new \Error( esc_html( $error_message ) ); - } else { - // Should write to the \error_log( $error_message ); if possible. - return; + + /** + * Register a new script and sets translated strings for the script. + * + * @throws \Error If build-files doesn't exist errors out in local environments and writes to error_log otherwise. + * + * @param string $asset Slug of the block to register scripts and translations for. + * + * @return void + */ + protected function register_asset( string $asset ): void { + + $asset_path = sprintf( '%1$s/build/variations/%2$s', GATHERPRESS_CORE_PATH, $asset ); + $script_asset_path = sprintf( '%1$s/index.asset.php', $asset_path ); + $style_asset_path = sprintf( '%1$s/index.css', $asset_path ); + + if ( ! \file_exists( $script_asset_path ) ) { + $error_message = "You need to run `npm start` or `npm run build` for the '$asset' block-asset first."; + if ( \in_array( wp_get_environment_type(), array( 'local', 'development' ), true ) ) { + throw new \Error( esc_html( $error_message ) ); + } else { + // Should write to the \error_log( $error_message ); if possible. + return; + } } - } - $index_js = "build/$asset/index.js"; - $script_asset = require $script_asset_path; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable - \wp_register_script( - "gatherpress--$asset", - plugins_url( $index_js, GATHERPRESS_CORE_FILE ), - $script_asset['dependencies'], - $script_asset['version'], - true - ); - - wp_set_script_translations( - "gatherpress--$asset", - 'gatherpress' - ); - - // $index_css = "build/$asset/$asset.css"; - // \wp_register_style( - // "gatherpress--$asset", - // plugins_url( $index_css, __FILE__ ), - // [ 'wp-block-buttons','wp-block-button','global-styles' ], - // time(), - // 'screen' - // ); + $index_js = "build/variations/$asset/index.js"; + $script_asset = require $script_asset_path; + \wp_register_script( + "gatherpress--$asset", + plugins_url( $index_js, GATHERPRESS_CORE_FILE ), + $script_asset['dependencies'], + $script_asset['version'], + true + ); -} + wp_set_script_translations( + "gatherpress--$asset", + 'gatherpress' + ); + if ( \file_exists( $style_asset_path ) ) { + $index_css = "build/variations/$asset/index.css"; + \wp_register_style( + "gatherpress--$asset", + plugins_url( $index_css, GATHERPRESS_CORE_FILE ), + array( 'global-styles' ), + $script_asset['version'], + 'screen' + ); + } + } -/** - * Enqueue all scripts. - * - * @return void - */ -protected function enqueue_assets(): void { - \array_map( - array( $this, 'enqueue_asset' ), - \array_merge( - // get_editor_assets(), - [ - $this->get_foldername_from_classname(), - ] - ) - ); -} -/** - * Enqueue a script. - * - * @param string $asset Slug of the block to load the frontend scripts for. - * - * @return void - */ -protected function enqueue_asset( string $asset ): void { - wp_enqueue_script( "gatherpress--$asset" ); - wp_enqueue_style( "gatherpress--$asset" ); -} + /** + * Enqueue a script. + * + * @param string $asset Slug of the block to load the frontend scripts for. + * + * @return void + */ + protected function enqueue_asset( string $asset ): void { + wp_enqueue_script( "gatherpress--$asset" ); + + if ( wp_style_is( $asset, 'registered' ) ) { + wp_enqueue_style( "gatherpress--$asset" ); + } + } /** * Get foldername from classname. - * + * * @todo maybe better in the Utility class? * - * @param string $classname + * @param string $classname Class to get the foldername from. * - * @return string + * @return string String with name of a folder. */ - protected static function get_foldername_from_classname( string $classname = __CLASS__ ) : string { + protected static function get_foldername_from_classname( string $classname = __CLASS__ ): string { $current_class = explode( '\\', $classname ); - return strtolower( str_replace( - '_', - '-', - array_pop( - $current_class + return strtolower( + str_replace( + '_', + '-', + array_pop( + $current_class + ) ) - )); + ); } } diff --git a/src/variations/add-to-calendar/class-add-to-calendar.php b/src/variations/add-to-calendar/class-add-to-calendar.php index 2ad2d9862..5f5ed4921 100644 --- a/src/variations/add-to-calendar/class-add-to-calendar.php +++ b/src/variations/add-to-calendar/class-add-to-calendar.php @@ -1,8 +1,7 @@ register(); $this->register_and_enqueue_assets(); - // wp_die('variation test end.'); - // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); - // add_action( 'init', array( $this, 'register_blocks_styles' ) ); + // phpcs:disable Squiz.PHP.CommentedOutCode.Found + // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); + // add_action( 'init', array( $this, 'register_blocks_styles' ) ); //. + // phpcs:enable Squiz.PHP.CommentedOutCode.Found } - } diff --git a/webpack.config.js b/webpack.config.js index 28bbfed76..e33271078 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,8 +1,8 @@ /** * External Dependencies */ -const fs = require('fs'); -const path = require('path'); +const fs = require('fs'); +const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); /** @@ -17,8 +17,11 @@ function getVariationEntries() { const variationDirs = fs.readdirSync(variationsDir); for (const variation of variationDirs) { const variationPath = path.join(variationsDir, variation); - entries[`variations/${variation}/index`] = path.join(variationPath, 'index.js'); - }; + entries[`variations/${variation}/index`] = path.join( + variationPath, + 'index.js' + ); + } return entries; } @@ -28,13 +31,13 @@ module.exports = { ...defaultConfig.plugins, new CopyWebpackPlugin({ patterns: [ - { - from: 'variations/**/class-*.php', - to: '[path][name][ext]', - context: 'src', - }, + { + from: 'variations/**/class-*.php', + to: '[path][name][ext]', + context: 'src', + }, ], - }), + }), ], entry: { ...defaultConfig.entry(), From eb37089da76c394a5787096e00220a228935e0c4 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 27 Sep 2024 19:34:04 +0200 Subject: [PATCH 028/159] Increase "Requires at least:" up to 6.6 due to changes from 3dcf8c529746aad2ad3f8b54125094831b981ee7 --- gatherpress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatherpress.php b/gatherpress.php index 3ff5c9704..b391c2daf 100644 --- a/gatherpress.php +++ b/gatherpress.php @@ -7,7 +7,7 @@ * Author URI: https://gatherpress.org/ * Version: 0.31.0-alpha * Requires PHP: 7.4 - * Requires at least: 6.4 + * Requires at least: 6.6 * Text Domain: gatherpress * Domain Path: /languages * License: GNU General Public License v2.0 or later From 66d287944559a0108e12c6f2a78c4301929164cc Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 27 Sep 2024 23:37:20 +0200 Subject: [PATCH 029/159] NEW docs about unit tests --- docs/contributor/unit-tests/README.md | 89 +++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 docs/contributor/unit-tests/README.md diff --git a/docs/contributor/unit-tests/README.md b/docs/contributor/unit-tests/README.md new file mode 100644 index 000000000..4edbfed87 --- /dev/null +++ b/docs/contributor/unit-tests/README.md @@ -0,0 +1,89 @@ +# PHP Unit tests + +GatherPress allows to run **automated & manual php unit tests**, while sharing the same, `wp-env` based, setup. + +## Automated tests + +Check the results of the [*phpunit-tests action workflow*](https://github.com/GatherPress/gatherpress/actions/workflows/phpunit-tests.yml) at `https://github.com/GatherPress/gatherpress/actions/workflows/phpunit-tests.yml`. + +## Manual tests + +The unittest-setup can also be used to manually run the test suite. In general, only a `wp-env` instance is needed. + +### Install dependencies + +To run the unit tests you will have to install the requirements using the following commands: + +```bash +composer install +``` + +> [!NOTE] +> You also need to use Node.js 20 or later + +Install the dependencies to create the Playground testing instance, using the following command: + +```bash +npm ci --legacy-peer-deps +``` + +### Start the Environment + +A call to `npm run test:unit:php` will automatically setup a `wp-env` powered WordPress instance, already prepared to mount GatherPress from the current directory. + +So while there is no technical need to start `wp-env` manually on its own, you might want to do so for any reason. If the environment is already running, the unit tests will run against that existing instance. You might want to start it with this command: + + +```bash +npm run wp-env -- start +``` + +The testing website is reachable at `http://127.0.0.1:8889`, the user is `admin` and the password is `password`. + +### Run the unit tests + +To run the full suite with all unit tests, use the command: + +```bash +npm run test:unit:php +``` + +To run only specific tests, you can call `npm run test:unit:php`: + +- with the `--filter` argument, + to execute all tests in `test/unit/php/includes/core/classes/class-test-event-query.php` for example: + + ```bash + npm run test:unit:php -- --filter 'Test_Event_Query' + ``` + +- with the `--group` argument, to execute all tests which share the same `@group` declaration, for example all tests related to `/ical` and `/feed/ical` endpoints of events & venues: + + ```bash + npm run test:unit:php -- --group endpoints + ``` + +- or with any other of [phpunit's command-line options](https://docs.phpunit.de/en/10.5/textui.html#command-line-options). + +## Resources + +### PMC Unit Test Framework + +GatherPress uses the *PMC Unit Test Framework* because it: + +> [...] provide[s] common utilities and data mocking for unit tests in a WordPress environment. + +> This plugin was originally written for internal use at Penske Media [...] Our hope is that other teams find this plugin as useful as we do when writing unit tests in WordPress. +> +> https://github.com/penske-media-corp/pmc-unit-test + +* [Installation](https://github.com/penske-media-corp/pmc-unit-test/tree/main?tab=readme-ov-file#installation) +* [Usage](https://github.com/penske-media-corp/pmc-unit-test/tree/main?tab=readme-ov-file#usage) +* [Data Mocking Overview](https://github.com/penske-media-corp/pmc-unit-test/blob/main/src/mocks/README.md) + * [$this->mock->http()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-http.md) + * [$this->mock->input()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-input.md) + * [$this->mock->mail()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-mail.md) + * [$this->mock->post()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-post.md) + * [$this->mock->post()->is_amp()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-post.md) + * [$this->mock->user()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-user.md) + * [$this->mock->wp()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-wp.md) \ No newline at end of file From 3e4bf7e7ea5066d987a1fcc236c3bf9803549dea Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 27 Sep 2024 23:38:51 +0200 Subject: [PATCH 030/159] Fix port number for wp-env --- docs/developer/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/README.md b/docs/developer/README.md index 96c35b6e2..286b36c27 100644 --- a/docs/developer/README.md +++ b/docs/developer/README.md @@ -65,7 +65,7 @@ cd gatherpress wp-env start ``` -You should then see that a development site has been configured for you on localhost port 2003 +You should then see that a development site has been configured for you on localhost port 8889 ![Development Site Login](../media/wp-env.json-startup.png) From ad87d1fe19e22dd3a0ce29ee9af6c24af0e27502 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 27 Sep 2024 23:50:05 +0200 Subject: [PATCH 031/159] Add & use "--fix" script for md:docs --- docs/contributor/unit-tests/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/contributor/unit-tests/README.md b/docs/contributor/unit-tests/README.md index 4edbfed87..b33309d0f 100644 --- a/docs/contributor/unit-tests/README.md +++ b/docs/contributor/unit-tests/README.md @@ -75,15 +75,15 @@ GatherPress uses the *PMC Unit Test Framework* because it: > This plugin was originally written for internal use at Penske Media [...] Our hope is that other teams find this plugin as useful as we do when writing unit tests in WordPress. > -> https://github.com/penske-media-corp/pmc-unit-test - -* [Installation](https://github.com/penske-media-corp/pmc-unit-test/tree/main?tab=readme-ov-file#installation) -* [Usage](https://github.com/penske-media-corp/pmc-unit-test/tree/main?tab=readme-ov-file#usage) -* [Data Mocking Overview](https://github.com/penske-media-corp/pmc-unit-test/blob/main/src/mocks/README.md) - * [$this->mock->http()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-http.md) - * [$this->mock->input()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-input.md) - * [$this->mock->mail()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-mail.md) - * [$this->mock->post()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-post.md) - * [$this->mock->post()->is_amp()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-post.md) - * [$this->mock->user()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-user.md) - * [$this->mock->wp()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-wp.md) \ No newline at end of file +> + +- [Installation](https://github.com/penske-media-corp/pmc-unit-test/tree/main?tab=readme-ov-file#installation) +- [Usage](https://github.com/penske-media-corp/pmc-unit-test/tree/main?tab=readme-ov-file#usage) +- [Data Mocking Overview](https://github.com/penske-media-corp/pmc-unit-test/blob/main/src/mocks/README.md) + - [$this->mock->http()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-http.md) + - [$this->mock->input()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-input.md) + - [$this->mock->mail()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-mail.md) + - [$this->mock->post()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-post.md) + - [$this->mock->post()->is_amp()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-post.md) + - [$this->mock->user()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-user.md) + - [$this->mock->wp()](https://github.com/penske-media-corp/pmc-unit-test/blob/main/docs/mock-wp.md) From 6b842d01a70259315aaeadda71443cfc203b8f85 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Mon, 30 Sep 2024 11:39:33 -0400 Subject: [PATCH 032/159] Update tested to latest. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 947cdfaf0..9c0dfd8a5 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # GatherPress Stable tag: 0.31.0-alpha -Tested up to: 6.6.1 +Tested up to: 6.6.2 License: GPL v2 or later Tags: events, event, meetup, community Contributors: mauteri, hrmervin, patricia70, carstenbach, jmarx75, stephenerdelyi, calebthedev, pbrocks From c2a12ea5732b183873aefecd703193bdab9a88cf Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 02:18:13 +0200 Subject: [PATCH 033/159] NEW static analyze test PHPStan (for WordPress) --- .distignore | 2 + .gitignore | 1 + composer.json | 3 +- composer.lock | 247 +++++++++++++++++++++++++++++++++++++++++++++- phpstan.neon.dist | 20 ++++ 5 files changed, 271 insertions(+), 2 deletions(-) create mode 100644 phpstan.neon.dist diff --git a/.distignore b/.distignore index 47ccea3c3..9065e1a5b 100755 --- a/.distignore +++ b/.distignore @@ -27,6 +27,8 @@ package-lock.json phpcs.xml phpcs.xml.dist phpcs.ruleset.xml +phpstan.neon +phpstan.neon.dist phpunit.xml phpunit.xml.dist playwright.config.js diff --git a/.gitignore b/.gitignore index 6aa213174..95070a5dc 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ typings # Composer # ########## vendor +phpstan.neon # .wp-env # ########## diff --git a/composer.json b/composer.json index 6ee451593..22198f88d 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ "wp-coding-standards/wpcs": "*", "phpcompatibility/phpcompatibility-wp": "*", "phpunit/phpunit": "*", - "yoast/phpunit-polyfills": "*" + "yoast/phpunit-polyfills": "*", + "szepeviktor/phpstan-wordpress": "^1.3" }, "suggest": { "wp-cli/wp-cli-bundle": "Combines the most common WP-CLI commands, including the wp-cli/i18n-command which should be used to create translation-files." diff --git a/composer.lock b/composer.lock index ddb98007a..cc56c924a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4392128689f0f8df116afe7925bd51c3", + "content-hash": "a0329d7079caf0254604e8149663aa90", "packages": [ { "name": "hamcrest/hamcrest-php", @@ -552,6 +552,54 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v6.6.2", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc", + "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc", + "shasum": "" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^4.13", + "php": "^7.4 || ^8.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^5.4.1", + "phpstan/phpstan": "^1.10.49", + "phpunit/phpunit": "^9.5", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.2" + }, + "time": "2024-09-30T07:10:48+00:00" + }, { "name": "phpcompatibility/php-compatibility", "version": "9.3.5", @@ -892,6 +940,64 @@ ], "time": "2023-12-08T14:50:00+00:00" }, + { + "name": "phpstan/phpstan", + "version": "1.12.5", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17", + "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2024-09-26T12:45:22+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "9.2.30", @@ -2358,6 +2464,145 @@ ], "time": "2024-01-11T20:47:48+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "szepeviktor/phpstan-wordpress", + "version": "v1.3.5", + "source": { + "type": "git", + "url": "https://github.com/szepeviktor/phpstan-wordpress.git", + "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/7f8cfe992faa96b6a33bbd75c7bace98864161e7", + "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", + "phpstan/phpstan": "^1.10.31", + "symfony/polyfill-php73": "^1.12.0" + }, + "require-dev": { + "composer/composer": "^2.1.14", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/phpstan-strict-rules": "^1.2", + "phpunit/phpunit": "^8.0 || ^9.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" + }, + "suggest": { + "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "SzepeViktor\\PHPStan\\WordPress\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress extensions for PHPStan", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.5" + }, + "time": "2024-06-28T22:27:19+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.2", diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 000000000..015a47d55 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,20 @@ +includes: + - vendor/szepeviktor/phpstan-wordpress/extension.neon +parameters: + + # the analysis level, from 0 (loose) to 8 (strict) + # https://phpstan.org/user-guide/rule-levels + level: 5 + + paths: + - includes/ + + excludePaths: + - vendor/ + + ignoreErrors: + - '#^Constant GATHERPRESS_CORE_FILE not found\.$#' + - '#^Constant GATHERPRESS_CORE_PATH not found\.$#' + - '#^Constant GATHERPRESS_CORE_URL not found\.$#' + - '#^Constant GATHERPRESS_REST_NAMESPACE not found\.$#' + - '#^Constant GATHERPRESS_REQUIRES_PHP not found\.$#' From c9517dff03c938dff4c8ce3563ea36f1e8a99cc2 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 02:19:12 +0200 Subject: [PATCH 034/159] NEW Github actions workflowe to run PHPStan --- .github/workflows/phpstan-tests.yml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/phpstan-tests.yml diff --git a/.github/workflows/phpstan-tests.yml b/.github/workflows/phpstan-tests.yml new file mode 100644 index 000000000..74584e725 --- /dev/null +++ b/.github/workflows/phpstan-tests.yml @@ -0,0 +1,44 @@ +name: PHPStan Tests +on: + push: + branches: + - main + pull_request: + paths: + - '.github/workflows/phpstan-tests.yml' + - 'includes/**' + # - 'test/unit/php**' + # - '*.php' + - 'phpstan.neon.dist' + - 'composer.*' +jobs: + test-phpstan: + name: PHPStan for WordPress + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + # phpstan requires PHP 7.1+. + php-version: 7.4 + extensions: dom, iconv, json, libxml, zip + coverage: none + tools: cs2pr + + - name: Composer Install + run: composer install --optimize-autoloader --prefer-dist + + - name: Log debug information + run: | + git --version + php --version + composer --version + + - name: Running PHPStan Analyze + if: ${{ success() || failure() }} + run: | + vendor/bin/phpstan --version + vendor/bin/phpstan analyze -vv --memory-limit=2G --error-format=checkstyle | cs2pr From 05d247ced8e502c8eba64caa5a50e56244ea47e1 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 02:19:58 +0200 Subject: [PATCH 035/159] Minor fix to prevent phpdoc.parseError --- includes/core/classes/traits/class-singleton.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/classes/traits/class-singleton.php b/includes/core/classes/traits/class-singleton.php index c207100fc..4c6f08808 100644 --- a/includes/core/classes/traits/class-singleton.php +++ b/includes/core/classes/traits/class-singleton.php @@ -27,9 +27,9 @@ trait Singleton { * The single instance of the class. * * @since 1.0.0 - * @var ?self|null The instance of the class. + * @var self|null The instance of the class or null if not instantiated. */ - private static $instance = null; + private static ?self $instance = null; /** * Get the instance of the Singleton class. From 63b20e638069c70076e814389e69adb1ab064baf Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 03:31:52 +0200 Subject: [PATCH 036/159] Use additional bleedingEdge config --- phpstan.neon.dist | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 015a47d55..572248d75 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,16 +1,32 @@ includes: - vendor/szepeviktor/phpstan-wordpress/extension.neon + # Bleeding edge offers a preview of the next major version. + # When you enable Bleeding edge in your configuration file, you will get new rules, + # behaviour, and bug fixes that will be enabled for everyone later + # when the next PHPStan’s major version is released. + - phar://phpstan.phar/conf/bleedingEdge.neon + parameters: +# bootstrapFiles: +# - vendor/pmc/unit-test/src/classes/autoloader.php +# - vendor/autoload.php +# - gatherpress.php + + parallel: + maximumNumberOfProcesses: 1 + processTimeout: 300.0 - # the analysis level, from 0 (loose) to 8 (strict) + # the analysis level, from 0 (loose) to 9 (strict) # https://phpstan.org/user-guide/rule-levels level: 5 paths: - includes/ +# - test/ - excludePaths: - - vendor/ +# excludePaths: +# analyse: +# - vendor/ ignoreErrors: - '#^Constant GATHERPRESS_CORE_FILE not found\.$#' From 9f674b13acdae8f55c63a0865ec598f92923ecba Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 06:16:44 +0200 Subject: [PATCH 037/159] NEW test for get_datetime_comparison_column() method --- .../core/classes/class-test-event-query.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-event-query.php b/test/unit/php/includes/core/classes/class-test-event-query.php index cb935c75e..a78f367f6 100644 --- a/test/unit/php/includes/core/classes/class-test-event-query.php +++ b/test/unit/php/includes/core/classes/class-test-event-query.php @@ -14,6 +14,7 @@ use GatherPress\Core\Topic; use GatherPress\Core\Venue; use PMC\Unit_Test\Base; +use PMC\Unit_Test\Utility; /** * Class Test_Event_Query. @@ -251,4 +252,38 @@ public function test_adjust_event_sql(): void { $this->assertStringContainsString( 'ASC', $retval['orderby'] ); $this->assertStringContainsString( "AND `{$table}`.`datetime_end_gmt` >=", $retval['where'] ); } + + /** + * Coverage for get_datetime_comparison_column method. + * + * @covers ::get_datetime_comparison_column + * + * @return void + */ + public function test_get_datetime_comparison_column(): void { + + $instance = Event_Query::get_instance(); + + $this->assertSame( + 'datetime_end_gmt', + Utility::invoke_hidden_method( $instance, 'get_datetime_comparison_column', array( 'upcoming', true ) ), + 'Failed to assert, that inclusive, upcoming events should be ordered by datetime_end_gmt.' + ); + $this->assertSame( + 'datetime_start_gmt', + Utility::invoke_hidden_method( $instance, 'get_datetime_comparison_column', array( 'upcoming', false ) ), + 'Failed to assert, that non-inclusive, upcoming events should be ordered by datetime_start_gmt.' + ); + + $this->assertSame( + 'datetime_start_gmt', + Utility::invoke_hidden_method( $instance, 'get_datetime_comparison_column', array( 'past', true ) ), + 'Failed to assert, that inclusive, past events should be ordered by datetime_start_gmt.' + ); + $this->assertSame( + 'datetime_end_gmt', + Utility::invoke_hidden_method( $instance, 'get_datetime_comparison_column', array( 'past', false ) ), + 'Failed to assert, that non-inclusive, past events should be ordered by datetime_end_gmt.' + ); + } } From d69a5bb15c7db238685a967ba58697e781738795 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 10:56:16 +0200 Subject: [PATCH 038/159] NEW assertions for adjust_event_sql() method --- .../core/classes/class-test-event-query.php | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-query.php b/test/unit/php/includes/core/classes/class-test-event-query.php index a78f367f6..6953f661a 100644 --- a/test/unit/php/includes/core/classes/class-test-event-query.php +++ b/test/unit/php/includes/core/classes/class-test-event-query.php @@ -234,23 +234,39 @@ public function test_adjust_event_sql(): void { $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix, Event::POST_TYPE ); $retval = $instance->adjust_event_sql( array(), 'all', 'DESC' ); - $this->assertStringContainsString( 'DESC', $retval['orderby'] ); + $this->assertStringContainsString( '.datetime_start_gmt DESC', $retval['orderby'] ); $this->assertEmpty( $retval['where'] ); $retval = $instance->adjust_event_sql( array(), 'past', 'desc' ); // inclusive will be TRUE by default. - $this->assertStringContainsString( 'DESC', $retval['orderby'] ); + $this->assertStringContainsString( '.datetime_start_gmt DESC', $retval['orderby'] ); $this->assertStringContainsString( "AND `{$table}`.`datetime_start_gmt` <", $retval['where'] ); $retval = $instance->adjust_event_sql( array(), 'past', 'desc', 'datetime', false ); - $this->assertStringContainsString( 'DESC', $retval['orderby'] ); + $this->assertStringContainsString( '.datetime_start_gmt DESC', $retval['orderby'] ); $this->assertStringContainsString( "AND `{$table}`.`datetime_end_gmt` <", $retval['where'] ); $retval = $instance->adjust_event_sql( array(), 'upcoming', 'ASC' ); - $this->assertStringContainsString( 'ASC', $retval['orderby'] ); + $this->assertStringContainsString( '.datetime_start_gmt ASC', $retval['orderby'] ); $this->assertStringContainsString( "AND `{$table}`.`datetime_end_gmt` >=", $retval['where'] ); + + $retval = $instance->adjust_event_sql( array(), 'past', 'desc', 'id', false ); + + $this->assertStringContainsString( '.ID DESC', $retval['orderby'] ); + + $retval = $instance->adjust_event_sql( array(), 'past', 'desc', 'title', false ); + + $this->assertStringContainsString( '.post_name DESC', $retval['orderby'] ); + + $retval = $instance->adjust_event_sql( array(), 'past', 'desc', 'modified', false ); + + $this->assertStringContainsString( '.post_modified_gmt DESC', $retval['orderby'] ); + + $retval = $instance->adjust_event_sql( array(), 'upcoming', 'desc', 'rand', false ); + + $this->assertStringContainsString( 'RAND()', $retval['orderby'] ); } /** From 11a1bd06d29e0a8b72605eaa9ab156043a210507 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 11:16:49 +0200 Subject: [PATCH 039/159] NEW hooks to assert --- .../php/includes/core/classes/class-test-block.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index 88ed29c52..85a9309b7 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -30,6 +30,18 @@ class Test_Block extends Base { public function test_setup_hooks(): void { $instance = Block::get_instance(); $hooks = array( + array( + 'type' => 'action', + 'name' => 'init', + 'priority' => 9, + 'callback' => array( $instance, 'register_block_variations' ), + ), + array( + 'type' => 'action', + 'name' => 'init', + 'priority' => 10, + 'callback' => array( $instance, 'register_block_patterns' ), + ), array( 'type' => 'action', 'name' => 'init', From ee4243aa9c18aa89311e237116816b7222fe0c19 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 11:17:53 +0200 Subject: [PATCH 040/159] Reduce to relevant values before return --- includes/core/classes/class-block.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index fa4e27737..39439e0bf 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -97,7 +97,12 @@ public function register_block_variations(): void { */ protected static function get_block_variations(): array { $blocks_directory = sprintf( '%1$s/build/variations/', GATHERPRESS_CORE_PATH ); - $blocks = array_diff( scandir( $blocks_directory ), array( '..', '.' ) ); + $blocks = array_values( + array_diff( + scandir( $blocks_directory ), + array( '..', '.' ) + ) + ); return $blocks; // maybe cache in var. } From 9b998415777513e475d7cc7e3c4c3de30d93b7e1 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 11:18:38 +0200 Subject: [PATCH 041/159] NEW test for get_block_variations() method --- .../core/classes/class-test-block.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index 85a9309b7..0166591ce 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -83,4 +83,23 @@ public function test_register_blocks(): void { $this->assertSame( $blocks, $expected ); } + + /** + * Coverage for get_block_variations. + * + * @covers ::get_block_variations + * + * @return void + */ + public function test_get_block_variations(): void { + $instance = Block::get_instance(); + + $this->assertSame( + array( + 'add-to-calendar' + ), + Utility::invoke_hidden_method( $instance, 'get_block_variations' ), + 'Failed to assert, to get all block variations from the "/src" directory.' + ); + } } From e5b8ea2bbc0e300f391920d5beadbd5ace8ad849 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 11:40:24 +0200 Subject: [PATCH 042/159] NEW unittest group "blocks" --- test/unit/php/includes/core/classes/class-test-block.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index 0166591ce..2892c51f0 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -17,6 +17,7 @@ * Class Test_Block. * * @coversDefaultClass \GatherPress\Core\Block + * @group blocks */ class Test_Block extends Base { /** From 52ef72149f0c07aea1a1444303947864c0ae0f68 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 11:47:33 +0200 Subject: [PATCH 043/159] (WIP) NEW test for register_block_variations() method --- .../core/classes/class-test-block.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index 2892c51f0..83cc07e5d 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -85,6 +85,28 @@ public function test_register_blocks(): void { $this->assertSame( $blocks, $expected ); } + /** + * Coverage for register_block_variations. + * + * @covers ::register_block_variations + * + * @return void + */ + public function test_register_block_variations(): void { + $this->assertFalse( + class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), + 'Failed to assert Add_To_Calendar singelton does not yet exist.' + ); + + // Register our block variations. + $instance->register_block_variations(); + + $this->assertTrue( + class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), + 'Failed to assert Add_To_Calendar singelton does exist.' + ); + } + /** * Coverage for get_block_variations. * @@ -103,4 +125,22 @@ public function test_get_block_variations(): void { 'Failed to assert, to get all block variations from the "/src" directory.' ); } + + /** + * Coverage for get_classname_from_foldername. + * + * @covers ::get_classname_from_foldername + * + * @return void + */ + public function test_get_classname_from_foldername(): void { + $instance = Block::get_instance(); + $this->assertSame( + '', + Utility::invoke_hidden_method( $instance, 'get_classname_from_foldername', array( __DIR__ ) ), + 'Failed to assert, to get class name from foldername.' + ); + } + + } From f5acaf739d8ea14fbb6e488dbde88d7d5844527f Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 12:35:17 +0200 Subject: [PATCH 044/159] NEW test to check for the existence of pattern slugs in developer docs --- .../includes/core/classes/class-test-block.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index 83cc07e5d..f39038c62 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -142,5 +142,21 @@ public function test_get_classname_from_foldername(): void { ); } - + /** + * Coverage for existence of pattern slugs in developer docs. + * + * @return void + */ + public function test_docs_contain_patterns(): void { + + $doc_file = file_get_contents( sprintf( + '%s/docs/%s', + GATHERPRESS_CORE_PATH, + 'developer/blocks/hookable-patterns/README.md' + ) ); + $this->assertStringContainsString( '`gatherpress/event-template`', $doc_file ); + $this->assertStringContainsString( '`gatherpress/event-details`', $doc_file ); + $this->assertStringContainsString( '`gatherpress/venue-template`', $doc_file ); + $this->assertStringContainsString( '`gatherpress/venue-details`', $doc_file ); + } } From 527b5cec305119e68d7e2cbf146fdab247e69b23 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 12:51:56 +0200 Subject: [PATCH 045/159] NEW test for register_block_patterns() method --- .../core/classes/class-test-block.php | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index f39038c62..1f6108854 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -11,6 +11,7 @@ use GatherPress\Core\Block; use PMC\Unit_Test\Base; use PMC\Unit_Test\Utility; +use WP_Block_Patterns_Registry; use WP_Block_Type_Registry; /** @@ -142,6 +143,34 @@ public function test_get_classname_from_foldername(): void { ); } + /** + * Coverage for register_block_patterns. + * + * @covers ::register_block_patterns + * + * @return void + */ + public function test_register_block_patterns(): void { + $instance = Block::get_instance(); + $block_patterns = array( + 'gatherpress/event-template', + // 'gatherpress/event-details', + 'gatherpress/venue-template', + 'gatherpress/venue-details', + ); + $block_pattern_registry = WP_Block_Patterns_Registry::get_instance(); + + // Clear out registered block patterns. + Utility::set_and_get_hidden_property( $block_pattern_registry, 'registered_patterns', array() ); + + // Register our block patterns. + $instance->register_block_patterns(); + + $expected = wp_list_pluck( $block_pattern_registry->get_all_registered(), 'name' ); + + $this->assertSame( $block_patterns, $expected ); + } + /** * Coverage for existence of pattern slugs in developer docs. * @@ -154,8 +183,9 @@ public function test_docs_contain_patterns(): void { GATHERPRESS_CORE_PATH, 'developer/blocks/hookable-patterns/README.md' ) ); + $this->assertStringContainsString( '`gatherpress/event-template`', $doc_file ); - $this->assertStringContainsString( '`gatherpress/event-details`', $doc_file ); + // $this->assertStringContainsString( '`gatherpress/event-details`', $doc_file ); $this->assertStringContainsString( '`gatherpress/venue-template`', $doc_file ); $this->assertStringContainsString( '`gatherpress/venue-details`', $doc_file ); } From 76c237c3c44e1ba41d0ba6dad64e549c6df90039 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 12:56:52 +0200 Subject: [PATCH 046/159] Fix for CS --- .../core/classes/class-test-block.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index 1f6108854..eb4c624a8 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -96,7 +96,7 @@ public function test_register_blocks(): void { public function test_register_block_variations(): void { $this->assertFalse( class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), - 'Failed to assert Add_To_Calendar singelton does not yet exist.' + 'Failed to assert Add_To_Calendar singleton does not yet exist.' ); // Register our block variations. @@ -104,7 +104,7 @@ class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), $this->assertTrue( class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), - 'Failed to assert Add_To_Calendar singelton does exist.' + 'Failed to assert Add_To_Calendar singleton does exist.' ); } @@ -120,7 +120,7 @@ public function test_get_block_variations(): void { $this->assertSame( array( - 'add-to-calendar' + 'add-to-calendar', ), Utility::invoke_hidden_method( $instance, 'get_block_variations' ), 'Failed to assert, to get all block variations from the "/src" directory.' @@ -151,10 +151,9 @@ public function test_get_classname_from_foldername(): void { * @return void */ public function test_register_block_patterns(): void { - $instance = Block::get_instance(); - $block_patterns = array( + $instance = Block::get_instance(); + $block_patterns = array( 'gatherpress/event-template', - // 'gatherpress/event-details', 'gatherpress/venue-template', 'gatherpress/venue-details', ); @@ -177,15 +176,16 @@ public function test_register_block_patterns(): void { * @return void */ public function test_docs_contain_patterns(): void { - - $doc_file = file_get_contents( sprintf( - '%s/docs/%s', - GATHERPRESS_CORE_PATH, - 'developer/blocks/hookable-patterns/README.md' - ) ); + + $doc_file = file_get_contents( // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents + sprintf( + '%s/docs/%s', + GATHERPRESS_CORE_PATH, + 'developer/blocks/hookable-patterns/README.md' + ) + ); $this->assertStringContainsString( '`gatherpress/event-template`', $doc_file ); - // $this->assertStringContainsString( '`gatherpress/event-details`', $doc_file ); $this->assertStringContainsString( '`gatherpress/venue-template`', $doc_file ); $this->assertStringContainsString( '`gatherpress/venue-details`', $doc_file ); } From f18a2c19d47101e5a77ccc772cc918f4f8ac42fc Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 13:01:53 +0200 Subject: [PATCH 047/159] NEW assertion --- test/unit/php/includes/core/classes/class-test-block.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index eb4c624a8..ee0c354b1 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -137,10 +137,15 @@ public function test_get_block_variations(): void { public function test_get_classname_from_foldername(): void { $instance = Block::get_instance(); $this->assertSame( - '', + '', // @todo Handling a string with slashes, like __DIR__. Utility::invoke_hidden_method( $instance, 'get_classname_from_foldername', array( __DIR__ ) ), 'Failed to assert, to get class name from foldername.' ); + $this->assertSame( + 'Unit_Test', + Utility::invoke_hidden_method( $instance, 'get_classname_from_foldername', array( 'unit-test' ) ), + 'Failed to assert, to get class name from foldername.' + ); } /** From 689e6da1b4634aca3091d3d156e8e1d58ef37912 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 13:39:23 +0200 Subject: [PATCH 048/159] (failing) NEW test for register_block_variations() method --- .../includes/core/classes/class-test-block.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index ee0c354b1..c4bed4eff 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -94,18 +94,19 @@ public function test_register_blocks(): void { * @return void */ public function test_register_block_variations(): void { - $this->assertFalse( - class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), - 'Failed to assert Add_To_Calendar singleton does not yet exist.' - ); + $block_instance = Utility::get_hidden_static_property( 'GatherPress\Core\Block\Add_To_Calendar', 'instance' ); + // var_export(Utility::has_property('GatherPress\Core\Block\Add_To_Calendar', 'instance') ); + + // Assert that it's still null (meaning the singleton is not instantiated). + $this->assertNull( $block_instance, 'Failed to assert, the block-variation singleton should not be instantiated yet.' ); + + $instance = Block::get_instance(); // Register our block variations. $instance->register_block_variations(); - $this->assertTrue( - class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ), - 'Failed to assert Add_To_Calendar singleton does exist.' - ); + // Assert that it's still null (meaning the singleton is not instantiated). + // $this->assertNotNull($block_instance, 'Failed to assert, the block-variation singleton should be instantiated now.'); } /** From d2b4d1bf715def4b7b9fb676eab1b38aec906bea Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Tue, 1 Oct 2024 15:01:14 +0200 Subject: [PATCH 049/159] New and 100% tests for Topic class --- .../core/classes/class-test-topic.php | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 test/unit/php/includes/core/classes/class-test-topic.php diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php new file mode 100644 index 000000000..5aa69a1d0 --- /dev/null +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -0,0 +1,108 @@ + 'action', + 'name' => 'init', + 'priority' => 10, + 'callback' => array( $instance, 'register_taxonomy' ), + ), + ); + + $this->assert_hooks( $hooks, $instance ); + } + + /** + * Coverage for register_taxonomy method. + * + * @covers ::register_taxonomy + * + * @return void + */ + public function test_register_taxonomy(): void { + $instance = Topic::get_instance(); + + unregister_taxonomy( Topic::TAXONOMY ); + + $this->assertFalse( taxonomy_exists( Topic::TAXONOMY ), 'Failed to assert that taxonomy does not exist.' ); + + $instance->register_taxonomy(); + + $this->assertTrue( taxonomy_exists( Topic::TAXONOMY ), 'Failed to assert that taxonomy exists.' ); + } + + /** + * Coverage for get_localized_taxonomy_slug method. + * + * @covers ::get_localized_taxonomy_slug + * + * @return void + */ + public function test_get_localized_taxonomy_slug(): void { + $instance = Topic::get_instance(); + + $this->assertSame( + 'topic', + $instance->get_localized_taxonomy_slug(), + 'Failed to assert english taxonomy slug is "topic".' + ); + + /** + * Instead of loading additional languages into the unit test suite, + * we just filter the translated value, to mock different languages. + * + * Filters text with its translation based on context information for a domain. + * + * @param string $translation Translated text. + * @param string $text Text to translate. + * @param string $context Context information for the translators. + * @return string Translated text. + */ + add_filter( + 'gettext_with_context_gatherpress', + function ( string $translation, string $text, string $context ): string { + if ( 'topic' !== $text || 'Taxonomy Slug' !== $context ) { + return $translation; + } + return 'Ünit Tést'; + }, + 10, + 3 + ); + + $this->assertSame( + 'unit-test', + $instance->get_localized_taxonomy_slug(), + 'Failed to assert taxonomy slug is "unit-test".' + ); + } +} From 6dab970947a48b9f7c09c066f06855b98119b0b0 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:09:47 +0200 Subject: [PATCH 050/159] Fix: Parameter #1 $version1 of function version_compare expects string, int<50207, max> given. --- includes/core/requirements-check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/requirements-check.php b/includes/core/requirements-check.php index 0f2c2f674..0d1786973 100644 --- a/includes/core/requirements-check.php +++ b/includes/core/requirements-check.php @@ -14,7 +14,7 @@ $gatherpress_activation = true; // Check the PHP version to ensure compatibility with the plugin. -if ( version_compare( PHP_VERSION_ID, GATHERPRESS_REQUIRES_PHP, '<' ) ) { +if ( version_compare( PHP_VERSION, GATHERPRESS_REQUIRES_PHP, '<' ) ) { add_action( 'admin_notices', static function () { From 7bdf65a6d2c6f518c4a0ab27c2235777e752a184 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:13:33 +0200 Subject: [PATCH 051/159] Fix: Parameter #1 $term_id of function wp_update_term expects int, string given. --- includes/core/classes/class-venue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-venue.php b/includes/core/classes/class-venue.php index 7022e287f..c6c546d17 100644 --- a/includes/core/classes/class-venue.php +++ b/includes/core/classes/class-venue.php @@ -331,7 +331,7 @@ public function maybe_update_term_slug( int $post_id, WP_Post $post_after, WP_Po } else { // Update the existing term with the new name and slug. wp_update_term( - $term['term_id'], + intval( $term['term_id'] ), self::TAXONOMY, array( 'name' => $title, From 90b8a0b75edb1a550b91adff05e8e5379b201fb9 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:21:41 +0200 Subject: [PATCH 052/159] Fix: Path in require_once() "./wp-admin/includes/upgrade.php" is not a file or it does not exist. --- phpstan.neon.dist | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 572248d75..152175c51 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -34,3 +34,8 @@ parameters: - '#^Constant GATHERPRESS_CORE_URL not found\.$#' - '#^Constant GATHERPRESS_REST_NAMESPACE not found\.$#' - '#^Constant GATHERPRESS_REQUIRES_PHP not found\.$#' + + # core/classes/class-setup.php + # + # A dev-only error, which can occur if the gatherpress is symlinked into a WP instance or called via wp-env or Playground. + - '#^Path in require_once\(\) "\./wp-admin/includes/upgrade\.php" is not a file or it does not exist\.$#' From ffeecba01f047db7ca95381841aa7212fe6285d8 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:25:43 +0200 Subject: [PATCH 053/159] Fix: Call to sprintf contains 1 placeholder, 2 values given. --- includes/core/classes/class-event-setup.php | 2 +- includes/core/classes/class-setup.php | 2 +- test/unit/php/includes/core/classes/class-test-event-query.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-event-setup.php b/includes/core/classes/class-event-setup.php index 0a94f3448..3b4365203 100644 --- a/includes/core/classes/class-event-setup.php +++ b/includes/core/classes/class-event-setup.php @@ -329,7 +329,7 @@ public function delete_event( int $post_id ): void { return; } - $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix, Event::POST_TYPE ); + $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix ); $wpdb->delete( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $table, diff --git a/includes/core/classes/class-setup.php b/includes/core/classes/class-setup.php index 9752ea043..e1d2eb4b3 100644 --- a/includes/core/classes/class-setup.php +++ b/includes/core/classes/class-setup.php @@ -331,7 +331,7 @@ public function on_site_create( WP_Site $new_site ): void { public function on_site_delete( array $tables ): array { global $wpdb; - $tables[] = sprintf( Event::TABLE_FORMAT, $wpdb->prefix, Event::POST_TYPE ); + $tables[] = sprintf( Event::TABLE_FORMAT, $wpdb->prefix ); return $tables; } diff --git a/test/unit/php/includes/core/classes/class-test-event-query.php b/test/unit/php/includes/core/classes/class-test-event-query.php index 56e82e1cc..164ffbdec 100644 --- a/test/unit/php/includes/core/classes/class-test-event-query.php +++ b/test/unit/php/includes/core/classes/class-test-event-query.php @@ -230,7 +230,7 @@ public function test_adjust_event_sql(): void { $instance = Event_Query::get_instance(); - $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix, Event::POST_TYPE ); + $table = sprintf( Event::TABLE_FORMAT, $wpdb->prefix ); $retval = $instance->adjust_event_sql( array(), 'all', 'DESC' ); $this->assertStringContainsString( 'DESC', $retval['orderby'] ); From dd691e4aa07c3f24603581706356ed76d494f4d3 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:28:00 +0200 Subject: [PATCH 054/159] Fix: Parameter #1 $new_blog_id of function switch_to_blog expects int, string given. --- includes/core/classes/class-setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-setup.php b/includes/core/classes/class-setup.php index e1d2eb4b3..74779eb4d 100644 --- a/includes/core/classes/class-setup.php +++ b/includes/core/classes/class-setup.php @@ -310,7 +310,7 @@ public function add_online_event_term(): void { */ public function on_site_create( WP_Site $new_site ): void { if ( is_plugin_active_for_network( 'gatherpress/gatherpress.php' ) ) { - switch_to_blog( $new_site->blog_id ); + switch_to_blog( intval( $new_site->blog_id ) ); $this->create_tables(); restore_current_blog(); } From 3a571561860f519a45fa82c9bb7d5c448a5f07ff Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:29:16 +0200 Subject: [PATCH 055/159] Fix: Parameter #1 $term_id of function wp_update_term expects int, string given. --- includes/core/classes/class-setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-setup.php b/includes/core/classes/class-setup.php index 74779eb4d..f1e9763ef 100644 --- a/includes/core/classes/class-setup.php +++ b/includes/core/classes/class-setup.php @@ -285,7 +285,7 @@ public function add_online_event_term(): void { ); } else { wp_update_term( - $term['term_id'], + intval( $term['term_id'] ), Venue::TAXONOMY, array( 'name' => $term_name, From e4ea84565d71eaa7027f34d71f0098e376e4ec86 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:45:08 +0200 Subject: [PATCH 056/159] Fix: Variable $suffix might not be defined. --- includes/core/classes/class-settings.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/core/classes/class-settings.php b/includes/core/classes/class-settings.php index d42643bc1..e809c1119 100644 --- a/includes/core/classes/class-settings.php +++ b/includes/core/classes/class-settings.php @@ -725,8 +725,6 @@ public function urlrewrite_preview( string $name, string $value ): void { $suffix = _x( 'sample-topic-term', 'sample topic term slug', 'gatherpress' ); break; - default: - break; } Utility::render_template( sprintf( '%s/includes/templates/admin/settings/partials/urlrewrite-preview.php', GATHERPRESS_CORE_PATH ), From 684d1ec78fbe3cc62ac84da98a69b5aca1076e71 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:46:49 +0200 Subject: [PATCH 057/159] Fix & Unit test: Method GatherPress\Core\Settings::sort_sub_pages_by_priority() should return int but returns bool. --- includes/core/classes/class-settings.php | 3 +- .../core/classes/class-test-settings.php | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/includes/core/classes/class-settings.php b/includes/core/classes/class-settings.php index e809c1119..92d04e054 100644 --- a/includes/core/classes/class-settings.php +++ b/includes/core/classes/class-settings.php @@ -614,7 +614,7 @@ public function sort_sub_pages_by_priority( array $first, array $second ): int { $first['priority'] = isset( $first['priority'] ) ? intval( $first['priority'] ) : 10; $second['priority'] = isset( $second['priority'] ) ? intval( $second['priority'] ) : 10; - return ( $first['priority'] > $second['priority'] ); + return $first['priority'] <=> $second['priority']; } /** @@ -724,7 +724,6 @@ public function urlrewrite_preview( string $name, string $value ): void { case 'gatherpress_general[urls][topics]': $suffix = _x( 'sample-topic-term', 'sample topic term slug', 'gatherpress' ); break; - } Utility::render_template( sprintf( '%s/includes/templates/admin/settings/partials/urlrewrite-preview.php', GATHERPRESS_CORE_PATH ), diff --git a/test/unit/php/includes/core/classes/class-test-settings.php b/test/unit/php/includes/core/classes/class-test-settings.php index 6483d8ee8..6d338a606 100644 --- a/test/unit/php/includes/core/classes/class-test-settings.php +++ b/test/unit/php/includes/core/classes/class-test-settings.php @@ -329,4 +329,34 @@ public function test_get_sub_pages(): void { 'Failed to assert that credits is last key.' ); } + + /** + * Coverage for sort_sub_pages_by_priority method. + * + * @covers ::sort_sub_pages_by_priority + * + * @return void + */ + public function test_sort_sub_pages_by_priority(): void { + $instance = Settings::get_instance(); + $sub_pages = $instance->get_sub_pages(); + + $this->assertSame( + -1, + $instance->sort_sub_pages_by_priority( array( 'priority' => 2 ), array( 'priority' => 42 ) ), + 'Failed to assert that it returns a negative number while the first sub-page has a lower priority.' + ); + + $this->assertSame( + 1, + $instance->sort_sub_pages_by_priority( array( 'priority' => 42 ), array( 'priority' => 2 ) ), + 'Failed to assert that it returns a positive number while the second sub-page has a lower priority.' + ); + + $this->assertSame( + 0, + $instance->sort_sub_pages_by_priority( array( 'priority' => 42 ), array( 'priority' => 42 ) ), + 'Failed to assert that it returns 0 while their priorities are equal.' + ); + } } From 968ac3b056382c8436c3f76950ac476638706226 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 03:57:09 +0200 Subject: [PATCH 058/159] Fix: Parameter #3 $group of function wp_cache_set expects string, int given. --- includes/core/classes/class-rsvp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 4da755339..317da70c2 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -496,7 +496,7 @@ static function ( $response ) use ( $status ) { $retval[ $status ]['count'] = count( $retval[ $status ]['responses'] ) + $guests; } - wp_cache_set( $cache_key, $retval, 15 * MINUTE_IN_SECONDS ); + wp_cache_set( $cache_key, $retval, '', 15 * MINUTE_IN_SECONDS ); return $retval; } From 3242163db44d281b8ca2ca1806d4af952c7910ae Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 05:17:40 +0200 Subject: [PATCH 059/159] Parameter #2 $callback of function usort expects callable(array, array): int, array{$this(GatherPress\Core\Rsvp), 'sort_by_timestamp'} given. --- includes/core/classes/class-rsvp.php | 8 +++++--- .../includes/core/classes/class-test-rsvp.php | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 317da70c2..dbcc83366 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -542,9 +542,11 @@ static function ( $role ) { * * @param array $first First response to compare in the sort. * @param array $second Second response to compare in the sort. - * @return bool True if the first response's timestamp is earlier than the second response's timestamp; otherwise, false. + * @return int Returns a negative number if the first response's timestamp is earlier, + * a positive number if the second response's timestamp is earlier, + * or 0 if both are equal. */ - public function sort_by_timestamp( array $first, array $second ): bool { - return ( strtotime( $first['timestamp'] ) > strtotime( $second['timestamp'] ) ); + public function sort_by_timestamp( array $first, array $second ): int { + return strtotime( $first['timestamp'] ) <=> strtotime( $second['timestamp'] ); } } diff --git a/test/unit/php/includes/core/classes/class-test-rsvp.php b/test/unit/php/includes/core/classes/class-test-rsvp.php index f94bc115a..fc1158917 100644 --- a/test/unit/php/includes/core/classes/class-test-rsvp.php +++ b/test/unit/php/includes/core/classes/class-test-rsvp.php @@ -344,13 +344,22 @@ public function test_sort_by_timestamp(): void { $newer = array( 'timestamp' => '2023-05-11 08:30:00' ); $older = array( 'timestamp' => '2022-05-11 08:30:00' ); - $this->assertTrue( + $this->assertSame( + -1, + $rsvp->sort_by_timestamp( $older, $newer ), + 'Failed to assert that it returns a negative number while the first response\'s timestamp is earlier.' + ); + + $this->assertSame( + 1, $rsvp->sort_by_timestamp( $newer, $older ), - 'Failed to assert correct sorting of timestamp.' + 'Failed to assert that it returns a positive number while the second response\'s timestamp is earlier.' ); - $this->assertFalse( - $rsvp->sort_by_timestamp( $older, $newer ), - 'Failed to assert correct sorting of timestamp.' + + $this->assertSame( + 0, + $rsvp->sort_by_timestamp( $newer, $newer ), + 'Failed to assert that it returns 0 while both response\'s timestamps are equal.' ); } } From 2ed2443f11130a3057e6c1e68d18611424158cf2 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 05:42:29 +0200 Subject: [PATCH 060/159] Revert "Fix: Parameter #3 $group of function wp_cache_set expects string, int given." This reverts commit 968ac3b056382c8436c3f76950ac476638706226. --- includes/core/classes/class-rsvp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index dbcc83366..7d30bbb6c 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -496,7 +496,7 @@ static function ( $response ) use ( $status ) { $retval[ $status ]['count'] = count( $retval[ $status ]['responses'] ) + $guests; } - wp_cache_set( $cache_key, $retval, '', 15 * MINUTE_IN_SECONDS ); + wp_cache_set( $cache_key, $retval, 15 * MINUTE_IN_SECONDS ); return $retval; } From c86472d9e4ee480ce3c1a9c29cb051649be36129 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 14:49:08 +0200 Subject: [PATCH 061/159] Fix: One or more @ param tags has an invalid name or invalid syntax. --- includes/core/classes/class-import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-import.php b/includes/core/classes/class-import.php index afb2d3ef8..dcdb74105 100644 --- a/includes/core/classes/class-import.php +++ b/includes/core/classes/class-import.php @@ -86,7 +86,7 @@ public function prepare( array $post_data_raw ): array { * * @since 1.0.0 * - * @param {array} $post_data_raw Unprocessesd 'gatherpress_event' post being imported. + * @param array $post_data_raw Unprocessesd 'gatherpress_event' post being imported. */ do_action( 'gatherpress_import', $post_data_raw ); } From 0d4b8fdd5a74a615072a343d37ab2a0524802447 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 14:51:25 +0200 Subject: [PATCH 062/159] Fix: Callback expects 1 parameter, $accepted_args is set to 2. --- includes/core/classes/class-export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-export.php b/includes/core/classes/class-export.php index aac01eeb8..bc4ebd2a4 100644 --- a/includes/core/classes/class-export.php +++ b/includes/core/classes/class-export.php @@ -73,7 +73,7 @@ protected function setup_hooks(): void { * @return void */ public function export(): void { - add_action( 'the_post', array( $this, 'prepare' ), 10, 2 ); + add_action( 'the_post', array( $this, 'prepare' ) ); add_filter( 'wxr_export_skip_postmeta', array( $this, 'extend' ), 10, 3 ); } From b237d927dc56e637d0c3373008ae8dec81802ffe Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 15:05:08 +0200 Subject: [PATCH 063/159] Fix: Expression on left side of ?? is not nullable. (Because get_permalink returns FALSE, not NULL if it fails) --- includes/core/classes/class-event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 66e491363..2a26988f8 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -412,7 +412,7 @@ public function get_venue_information(): array { $venue_information['full_address'] = $venue_meta->fullAddress ?? ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $venue_information['phone_number'] = $venue_meta->phoneNumber ?? ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $venue_information['website'] = $venue_meta->website ?? ''; - $venue_information['permalink'] = get_permalink( $venue->ID ) ?? ''; + $venue_information['permalink'] = get_permalink( $venue->ID ) ?: ''; } return $venue_information; From f0e15db18b811eea7ae487050f32a93de0bb6d09 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 15:08:53 +0200 Subject: [PATCH 064/159] Fix: Parameter #1 $string of function str_pad expects string, int given. --- includes/core/classes/class-event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 2a26988f8..67cdab58d 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -525,8 +525,8 @@ protected function get_yahoo_calendar_link(): string { $duration = ( ( strtotime( $diff_end ) - strtotime( $diff_start ) ) / 60 / 60 ); $full = intval( $duration ); $fraction = ( $duration - $full ); - $hours = str_pad( intval( $duration ), 2, '0', STR_PAD_LEFT ); - $minutes = str_pad( intval( $fraction * 60 ), 2, '0', STR_PAD_LEFT ); + $hours = str_pad( strval( $duration ), 2, '0', STR_PAD_LEFT ); + $minutes = str_pad( strval( $fraction * 60 ), 2, '0', STR_PAD_LEFT ); $venue = $this->get_venue_information(); $location = $venue['name']; $description = $this->get_calendar_description(); From 40364b5f42716931a7cb487986bf0dbd2cdee400 Mon Sep 17 00:00:00 2001 From: Anthony Skelton Date: Thu, 3 Oct 2024 09:06:04 -0700 Subject: [PATCH 065/159] Fixes Sidebar and Event/Venue Panels opening by default * Removes the initialOpen property from PluginDocumentSettingPanel, this slotfill does not allow the property * Updates the dependency the PluginDocumentSettingPanel is loaded from. It was moved to '@wordpress/editor' * Updates the function to ensure the Event and Venue settings are opened by default. Uses a domReady and first checks if the panel is open, and if it is not then dispatches a toggleEditorPanelOpened() to open the panel. * Updates the main domReady in the editor.js file. Removes the duplicate opening of the event settings panel and only checks and opens the general sidebar. --- build/editor.asset.php | 2 +- build/editor.js | 2 +- build/panels.asset.php | 2 +- build/panels.js | 4 ++-- src/editor.js | 34 +++++++++--------------------- src/panels/event-settings/index.js | 31 +++++++++++++++++++-------- src/panels/venue-settings/index.js | 29 +++++++++++++++++++------ 7 files changed, 59 insertions(+), 45 deletions(-) diff --git a/build/editor.asset.php b/build/editor.asset.php index 78488352f..14909e6e5 100644 --- a/build/editor.asset.php +++ b/build/editor.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-blocks', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '78fc112bbc2194a14d45'); + array('moment', 'react-jsx-runtime', 'wp-blocks', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'eb33377ea4f6094e38cc'); diff --git a/build/editor.js b/build/editor.js index dfab7182d..c3638eaa6 100644 --- a/build/editor.js +++ b/build/editor.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var a in s)e.o(s,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:s[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var s=e.n(t);const a=window.wp.data,r=window.moment;var i=e.n(r);const n=window.wp.i18n;function o(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function d(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),a=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[a]=t}window.wp.element,window.wp.date,window.ReactJSXRuntime;const c="YYYY-MM-DD HH:mm:ss",m=i().tz(p()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(c),l=i().tz(m,p()).add(2,"hours").format(c),u=[{label:(0,n.__)("1 hour","gatherpress"),value:1},{label:(0,n.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,n.__)("2 hours","gatherpress"),value:2},{label:(0,n.__)("3 hours","gatherpress"),value:3},{label:(0,n.__)("Set an end time…","gatherpress"),value:!1}];function p(e=o("eventDetails.dateTime.timezone")){return i().tz.zone(e)?e:(0,n.__)("GMT","gatherpress")}function T(){const e=i().tz(o("eventDetails.dateTime.datetime_end"),p());return"gatherpress_event"===(0,a.select)("core/editor")?.getCurrentPostType()&&i().tz(p()).valueOf()>e.valueOf()}let _=!1;function v(){const e="gatherpress_event_communication",t=(0,a.dispatch)("core/notices"),s=(0,a.select)("core/editor").isSavingPost(),r=(0,a.select)("core/editor").isAutosavingPost();"publish"!==(0,a.select)("core/editor").getEditedPostAttribute("status")||"gatherpress_event"!==(0,a.select)("core/editor")?.getCurrentPostType()||!s||r||T()||_||(_=!0,t.removeNotice(e),t.createNotice("success",(0,n.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{((e,t="")=>{for(const[s,a]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:a});dispatchEvent(r)}})({setOpen:!0})},label:(0,n.__)("Compose Message","gatherpress")}]})),s||(_=!1)}const g=window.wp.blocks,h={dateTimeStart:o("eventDetails.dateTime.datetime_start")?o("eventDetails.dateTime.datetime_start"):m,dateTimeEnd:o("eventDetails.dateTime.datetime_end")?o("eventDetails.dateTime.datetime_end"):l,duration:u.find((e=>{return t=e.value,i().tz(function(){let e=o("eventDetails.dateTime.datetime_start");return e=""!==e?i().tz(e,p()).format(c):m,d("eventDetails.dateTime.datetime_start",e),e}(),p()).add(t,"hours").format(c)===function(){let e=o("eventDetails.dateTime.datetime_end");return e=""!==e?i().tz(e,p()).format(c):l,d("eventDetails.dateTime.datetime_end",e),e}();var t}))?.value||!1,timezone:o("eventDetails.dateTime.timezone")},E={setDateTimeStart:e=>(d("eventDetails.dateTime.datetime_start",e),{type:"SET_DATETIME_START",dateTimeStart:e}),setDateTimeEnd:e=>(d("eventDetails.dateTime.datetime_end",e),{type:"SET_DATETIME_END",dateTimeEnd:e}),setDuration:e=>({type:"SET_DURATION",duration:e}),setTimezone:e=>(d("eventDetails.dateTime.timezone",e),{type:"SET_TIMEZONE",timezone:e})},D=(0,a.createReduxStore)("gatherpress/datetime",{reducer:(e=h,t)=>{switch(t.type){case"SET_DATETIME_START":return{...e,dateTimeStart:t.dateTimeStart};case"SET_DATETIME_END":return{...e,dateTimeEnd:t.dateTimeEnd};case"SET_DURATION":return{...e,duration:t.duration};case"SET_TIMEZONE":return{...e,timezone:t.timezone};default:return e}},actions:E,selectors:{getDateTimeStart:e=>e.dateTimeStart,getDateTimeEnd:e=>e.dateTimeEnd,getDuration:e=>e.duration,getTimezone:e=>e.timezone}});(0,a.register)(D),s()((()=>{const e=(0,a.select)("core/edit-post");if(!e)return;const t=(0,a.dispatch)("core/edit-post");e.isEditorSidebarOpened()?(t.openGeneralSidebar("edit-post/document"),t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")):(t.openGeneralSidebar(),t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")),(0,a.subscribe)(v),function(){const e="gatherpress_event_past",t=(0,a.dispatch)("core/notices");t.removeNotice(e),T()&&t.createNotice("warning",(0,n.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}()})),s()((()=>{Object.keys(o("misc.unregisterBlocks")).forEach((e=>{const t=o("misc.unregisterBlocks")[e];t&&void 0!==(0,g.getBlockType)(t)&&(0,g.unregisterBlockType)(t)}))}))})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var i in a)e.o(a,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:a[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;var a=e.n(t);const i=window.wp.data,s=window.moment;var r=e.n(s);const n=window.wp.i18n;function o(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function d(e,t){if("object"!=typeof GatherPress)return;const a=e.split("."),i=a.pop();a.reduce(((e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:e[t]={}}),GatherPress)[i]=t}window.wp.element,window.wp.date,window.ReactJSXRuntime;const c="YYYY-MM-DD HH:mm:ss",m=r().tz(T()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(c),u=r().tz(m,T()).add(2,"hours").format(c),l=[{label:(0,n.__)("1 hour","gatherpress"),value:1},{label:(0,n.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,n.__)("2 hours","gatherpress"),value:2},{label:(0,n.__)("3 hours","gatherpress"),value:3},{label:(0,n.__)("Set an end time…","gatherpress"),value:!1}];function T(e=o("eventDetails.dateTime.timezone")){return r().tz.zone(e)?e:(0,n.__)("GMT","gatherpress")}function p(){const e=r().tz(o("eventDetails.dateTime.datetime_end"),T());return"gatherpress_event"===(0,i.select)("core/editor")?.getCurrentPostType()&&r().tz(T()).valueOf()>e.valueOf()}let _=!1;function v(){const e="gatherpress_event_communication",t=(0,i.dispatch)("core/notices"),a=(0,i.select)("core/editor").isSavingPost(),s=(0,i.select)("core/editor").isAutosavingPost();"publish"!==(0,i.select)("core/editor").getEditedPostAttribute("status")||"gatherpress_event"!==(0,i.select)("core/editor")?.getCurrentPostType()||!a||s||p()||_||(_=!0,t.removeNotice(e),t.createNotice("success",(0,n.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{((e,t="")=>{for(const[a,i]of Object.entries(e)){let e=a;t&&(e+="_"+String(t));const s=new CustomEvent(e,{detail:i});dispatchEvent(s)}})({setOpen:!0})},label:(0,n.__)("Compose Message","gatherpress")}]})),a||(_=!1)}const h=window.wp.blocks,E={dateTimeStart:o("eventDetails.dateTime.datetime_start")?o("eventDetails.dateTime.datetime_start"):m,dateTimeEnd:o("eventDetails.dateTime.datetime_end")?o("eventDetails.dateTime.datetime_end"):u,duration:l.find((e=>{return t=e.value,r().tz(function(){let e=o("eventDetails.dateTime.datetime_start");return e=""!==e?r().tz(e,T()).format(c):m,d("eventDetails.dateTime.datetime_start",e),e}(),T()).add(t,"hours").format(c)===function(){let e=o("eventDetails.dateTime.datetime_end");return e=""!==e?r().tz(e,T()).format(c):u,d("eventDetails.dateTime.datetime_end",e),e}();var t}))?.value||!1,timezone:o("eventDetails.dateTime.timezone")},g={setDateTimeStart:e=>(d("eventDetails.dateTime.datetime_start",e),{type:"SET_DATETIME_START",dateTimeStart:e}),setDateTimeEnd:e=>(d("eventDetails.dateTime.datetime_end",e),{type:"SET_DATETIME_END",dateTimeEnd:e}),setDuration:e=>({type:"SET_DURATION",duration:e}),setTimezone:e=>(d("eventDetails.dateTime.timezone",e),{type:"SET_TIMEZONE",timezone:e})},D=(0,i.createReduxStore)("gatherpress/datetime",{reducer:(e=E,t)=>{switch(t.type){case"SET_DATETIME_START":return{...e,dateTimeStart:t.dateTimeStart};case"SET_DATETIME_END":return{...e,dateTimeEnd:t.dateTimeEnd};case"SET_DURATION":return{...e,duration:t.duration};case"SET_TIMEZONE":return{...e,timezone:t.timezone};default:return e}},actions:g,selectors:{getDateTimeStart:e=>e.dateTimeStart,getDateTimeEnd:e=>e.dateTimeEnd,getDuration:e=>e.duration,getTimezone:e=>e.timezone}});(0,i.register)(D),a()((()=>{const e=(0,i.select)("core/edit-post"),t=(0,i.dispatch)("core/edit-post");e&&t&&(e.isEditorSidebarOpened("edit-post/document")||t.openGeneralSidebar("edit-post/document"),(0,i.subscribe)(v),function(){const e="gatherpress_event_past",t=(0,i.dispatch)("core/notices");t.removeNotice(e),p()&&t.createNotice("warning",(0,n.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}())})),a()((()=>{Object.keys(o("misc.unregisterBlocks")).forEach((e=>{const t=o("misc.unregisterBlocks")[e];t&&void 0!==(0,h.getBlockType)(t)&&(0,h.unregisterBlockType)(t)}))}))})(); \ No newline at end of file diff --git a/build/panels.asset.php b/build/panels.asset.php index ebed91ed7..9a5e4188b 100644 --- a/build/panels.asset.php +++ b/build/panels.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c6c09a92287f347e9ae0'); + array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'd92b459db2bb69605022'); diff --git a/build/panels.js b/build/panels.js index 0f9f51927..960600f09 100644 --- a/build/panels.js +++ b/build/panels.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.data,n=window.wp.components,r=window.wp.plugins,a=window.wp.editPost,i=window.moment;var o=e.n(i);const l=window.wp.element;function c(){(0,s.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function u(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const m=window.wp.date,p=window.ReactJSXRuntime,g="YYYY-MM-DD HH:mm:ss",h=o().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),_=(o().tz(h,f()).add(2,"hours").format(g),[{label:(0,t.__)("1 hour","gatherpress"),value:1},{label:(0,t.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,t.__)("2 hours","gatherpress"),value:2},{label:(0,t.__)("3 hours","gatherpress"),value:3},{label:(0,t.__)("Set an end time…","gatherpress"),value:!1}]);function v(e){return o().tz(function(){let e=d("eventDetails.dateTime.datetime_start");return e=""!==e?o().tz(e,f()).format(g):h,u("eventDetails.dateTime.datetime_start",e),e}(),f()).add(e,"hours").format(g)}function x(){return D(d("settings.dateFormat"))+" "+D(d("settings.timeFormat"))}function f(e=d("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function j(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function b(e,t=null,s=null){!function(e,t=null){const s=o().tz(d("eventDetails.dateTime.datetime_end"),f()).valueOf(),n=o().tz(e,f()).valueOf();n>=s&&S(o().tz(n,f()).add(2,"hours").format(g),t)}(e,s),u("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),c()}function S(e,t=null,s=null){!function(e,t=null){const s=o().tz(d("eventDetails.dateTime.datetime_start"),f()).valueOf(),n=o().tz(e,f()).valueOf();n<=s&&b(o().tz(n,f()).subtract(2,"hours").format(g),t)}(e,s),u("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),c()}function D(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map(((e,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}function P(){const e=o().tz(d("eventDetails.dateTime.datetime_end"),f());return"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&o().tz(f()).valueOf()>e.valueOf()}function T(){const e="gatherpress_event_past",n=(0,s.dispatch)("core/notices");n.removeNotice(e),P()&&n.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const w=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);a&&(i=d("settings.enableAnonymousRsvp"));const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_anonymous_rsvp:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{u(e)}})},C=()=>(0,p.jsx)("section",{children:(0,p.jsx)(w,{})}),E=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);a&&(i=d("settings.enableInitialDecline"));const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_initial_decline:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{u(e)}})},y=()=>(0,p.jsx)("section",{children:(0,p.jsx)(E,{})}),k=()=>{const{dateTimeStart:e,duration:r}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:a,setDateTimeEnd:i}=(0,s.useDispatch)("gatherpress/datetime"),c=(0,m.getSettings)(),d=/a(?!\\)/i.test(c.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,l.useEffect)((()=>{a(o().tz(e,f()).format(g)),r&&i(v(r)),T()}),[e,r,a,i]),(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{direction:"column",gap:"1",children:[(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)("h3",{style:{marginBottom:0},children:(0,p.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Date & time start","gatherpress")})})}),(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,p.jsx)(n.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:o().tz(e,f()).format(x())}),renderContent:()=>(0,p.jsx)(n.DateTimePicker,{currentDate:e,onChange:e=>{b(e,a,i)},is12Hour:d})})})]})})},z=()=>{const{dateTimeEnd:e}=(0,s.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:r,setDateTimeStart:a}=(0,s.useDispatch)("gatherpress/datetime"),i=(0,m.getSettings)(),c=/a(?!\\)/i.test(i.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,l.useEffect)((()=>{r(o().tz(e,f()).format(g)),T()})),(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{direction:"column",gap:"1",children:[(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)("h3",{style:{marginBottom:0},children:(0,p.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("Date & time end","gatherpress")})})}),(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,p.jsx)(n.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:o().tz(e,f()).format(x())}),renderContent:()=>(0,p.jsx)(n.DateTimePicker,{currentDate:e,onChange:e=>S(e,r,a),is12Hour:c})})})]})})},N=()=>{const{timezone:e}=(0,s.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:r}=(0,s.useDispatch)("gatherpress/datetime"),a=d("misc.timezoneChoices");return(0,l.useEffect)((()=>{r(d("eventDetails.dateTime.timezone"))}),[r]),(0,p.jsx)(n.PanelRow,{children:(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:j(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),s+n+r}return e}(e),r(e),c()},__nexthasnomarginbottom:!0,children:Object.keys(a).map((e=>(0,p.jsx)("optgroup",{label:e,children:Object.keys(a[e]).map((t=>(0,p.jsx)("option",{value:t,children:a[e][t]},t)))},e)))})})},O=()=>{const{duration:e}=(0,s.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),r=(0,s.useDispatch)(),{setDateTimeEnd:a,setDuration:i}=r("gatherpress/datetime");return(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Duration","gatherpress"),value:!!_.some((t=>t.value===e))&&e,options:_,onChange:e=>{(e="false"!==e&&parseFloat(e))&&a(v(e)),i(e)},__nexthasnomarginbottom:!0})},A=()=>{const e=(0,s.useDispatch)("core/editor").editPost;let t=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:n,dateTimeEnd:r,duration:a,timezone:i}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:c}=(0,s.useDispatch)("gatherpress/datetime");return(0,l.useEffect)((()=>{const s=JSON.stringify({...t,dateTimeStart:o().tz(n,i).format(g),dateTimeEnd:o().tz(r,i).format(g),timezone:i});e({meta:{gatherpress_datetime:s}})}),[n,r,i,t,e,c,a]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("section",{children:(0,p.jsx)(k,{})}),(0,p.jsx)("section",{children:a?(0,p.jsx)(O,{}):(0,p.jsx)(z,{})}),(0,p.jsx)("section",{children:(0,p.jsx)(N,{})})]})},F=()=>(0,p.jsx)(A,{}),M=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);a&&(i=d("settings.maxGuestLimit")),!1===i&&(i=0);const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_guest_limit:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{u(e)}})},Y=()=>(0,p.jsx)("section",{children:(0,p.jsx)(M,{})}),L=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);a&&(i=d("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_attendance_limit:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{u(e)}}),(0,p.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},R=()=>(0,p.jsx)("section",{children:(0,p.jsx)(L,{})}),I=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:n});dispatchEvent(r)}},$=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}},G=()=>"publish"===(0,s.select)("core/editor").getEditedPostAttribute("status")&&!P()&&(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,p.jsx)(n.Button,{variant:"secondary",onClick:()=>I({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),H=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,l.useState)(a);return $({setOnlineEventLink:o},d("eventDetails.postId")),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),I({setOnlineEventLink:t},d("eventDetails.postId")),r()})(t)}})},B=()=>(0,p.jsx)("section",{children:(0,p.jsx)(H,{})}),J=()=>{const[e,r]=(0,l.useState)(""),[a,i]=(0,l.useState)(""),[o,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(""),[m,g]=(0,l.useState)(!1),[h,_]=(0,l.useState)(""),[v,x]=(0,l.useState)(""),[f,j]=(0,l.useState)(""),b=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:S}=(0,s.useDispatch)("core/editor"),D=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",D))),T=P?.slug.replace(/^_/,""),[w,C]=(0,l.useState)(""),E=D+":"+w,y=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:w})));(0,l.useEffect)((()=>{var e,s,n,a,o,l;let d={};if(w&&Array.isArray(y)){var m;const e=null!==(m=y[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var p;e&&(d=JSON.parse(e),d.name=null!==(p=y[0]?.title.rendered)&&void 0!==p?p:"")}const g=null!==(e=d?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(s=d?.fullAddress)&&void 0!==s?s:"",v=null!==(n=d?.phoneNumber)&&void 0!==n?n:"",f=null!==(a=d?.website)&&void 0!==a?a:"",b=null!==(o=d?.latitude)&&void 0!==o?o:"0",S=null!==(l=d?.longitude)&&void 0!==l?l:"0";T&&C(T),j(E?String(E):""),r(g),i(h),c(v),u(f),_(b),x(S),I({setName:g,setFullAddress:h,setPhoneNumber:v,setWebsite:f,setLatitude:b,setLongitude:S,setIsOnlineEventTerm:"online-event"===w})}),[w,y,T,E]);let k=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return k?(k=k.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),k.unshift({value:":",label:(0,t.__)("Choose a venue","gatherpress")})):k=[],(0,p.jsx)(n.PanelRow,{children:(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:f,onChange:e=>{(e=>{j(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];b({_gatherpress_venue:t}),C(e[1]),S()})(e)},options:k})})},W=()=>(0,p.jsx)("section",{children:(0,p.jsx)(J,{})});(0,r.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,p.jsx)(a.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),initialOpen:!0,className:"gatherpress-event-settings",children:(0,p.jsxs)(n.__experimentalVStack,{spacing:4,children:[(0,p.jsx)(F,{}),(0,p.jsx)(W,{}),(0,p.jsx)(B,{}),(0,p.jsx)(Y,{}),(0,p.jsx)(R,{}),(0,p.jsx)(C,{}),(0,p.jsx)(y,{}),(0,p.jsx)(G,{})]})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings");const V=window.wp.compose,U=()=>{var e,r,a;const i=(0,s.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...c,...e});i({meta:{gatherpress_venue_information:t}})};let c=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));c=c?JSON.parse(c):{};const[d,u]=(0,l.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[m,g]=(0,l.useState)(null!==(r=c.phoneNumber)&&void 0!==r?r:""),[h,_]=(0,l.useState)(null!==(a=c.website)&&void 0!==a?a:"");$({setFullAddress:u,setPhoneNumber:g,setWebsite:_});const v=(0,l.useRef)(o),x=(0,l.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${d}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:s})}))}),[d]),f=(0,V.useDebounce)(x,300);return(0,l.useEffect)((()=>{v.current=o}),[o]),(0,l.useEffect)((()=>{f()}),[d,f]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:d,onChange:e=>{I({setFullAddress:e}),o({fullAddress:e})}}),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:m,onChange:e=>{I({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Website","gatherpress"),value:h,type:"url",onChange:e=>{I({setWebsite:e}),o({website:e})}})]})},X=()=>(0,p.jsx)("section",{children:(0,p.jsx)(U,{})});(0,r.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,p.jsx)(a.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gatherpress-venue-settings",children:(0,p.jsx)(n.__experimentalVStack,{spacing:6,children:(0,p.jsx)(X,{})})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.domReady;var r=e.n(s);const n=window.wp.data,a=window.wp.components,i=window.wp.plugins,o=window.wp.editor,l=window.moment;var c=e.n(l);const d=window.wp.element;function u(){(0,n.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function m(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function p(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),r=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[r]=t}const g=window.wp.date,h=window.ReactJSXRuntime,_="YYYY-MM-DD HH:mm:ss",v=c().tz(b()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),x=(c().tz(v,b()).add(2,"hours").format(_),[{label:(0,t.__)("1 hour","gatherpress"),value:1},{label:(0,t.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,t.__)("2 hours","gatherpress"),value:2},{label:(0,t.__)("3 hours","gatherpress"),value:3},{label:(0,t.__)("Set an end time…","gatherpress"),value:!1}]);function f(e){return c().tz(function(){let e=m("eventDetails.dateTime.datetime_start");return e=""!==e?c().tz(e,b()).format(_):v,p("eventDetails.dateTime.datetime_start",e),e}(),b()).add(e,"hours").format(_)}function j(){return w(m("settings.dateFormat"))+" "+w(m("settings.timeFormat"))}function b(e=m("eventDetails.dateTime.timezone")){return c().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function D(e,t=null,s=null){!function(e,t=null){const s=c().tz(m("eventDetails.dateTime.datetime_end"),b()).valueOf(),r=c().tz(e,b()).valueOf();r>=s&&P(c().tz(r,b()).add(2,"hours").format(_),t)}(e,s),p("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),u()}function P(e,t=null,s=null){!function(e,t=null){const s=c().tz(m("eventDetails.dateTime.datetime_start"),b()).valueOf(),r=c().tz(e,b()).valueOf();r<=s&&D(c().tz(r,b()).subtract(2,"hours").format(_),t)}(e,s),p("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),u()}function w(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map(((e,s,r)=>{const n=r[s-1];return e in t&&"\\"!==n?t[e]:e})).join("")}function T(){const e=c().tz(m("eventDetails.dateTime.datetime_end"),b());return"gatherpress_event"===(0,n.select)("core/editor")?.getCurrentPostType()&&c().tz(b()).valueOf()>e.valueOf()}function C(){const e="gatherpress_event_past",s=(0,n.dispatch)("core/notices");s.removeNotice(e),T()&&s.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const E=()=>{const{editPost:e,unlockPostSaving:s}=(0,n.useDispatch)("core/editor"),r=(0,n.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);r&&(i=m("settings.enableAnonymousRsvp"));const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const r={gatherpress_enable_anonymous_rsvp:Number(t)};l(t),e({meta:r}),s()}),[e,s]);return(0,d.useEffect)((()=>{r&&0!==i&&c(i)}),[r,i,c]),(0,h.jsx)(a.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{c(e)}})},y=()=>(0,h.jsx)("section",{children:(0,h.jsx)(E,{})}),k=()=>{const{editPost:e,unlockPostSaving:s}=(0,n.useDispatch)("core/editor"),r=(0,n.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);r&&(i=m("settings.enableInitialDecline"));const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const r={gatherpress_enable_initial_decline:Number(t)};l(t),e({meta:r}),s()}),[e,s]);return(0,d.useEffect)((()=>{r&&0!==i&&c(i)}),[r,i,c]),(0,h.jsx)(a.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{c(e)}})},z=()=>(0,h.jsx)("section",{children:(0,h.jsx)(k,{})}),N=()=>{const{dateTimeStart:e,duration:s}=(0,n.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:r,setDateTimeEnd:i}=(0,n.useDispatch)("gatherpress/datetime"),o=(0,g.getSettings)(),l=/a(?!\\)/i.test(o.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,d.useEffect)((()=>{r(c().tz(e,b()).format(_)),s&&i(f(s)),C()}),[e,s,r,i]),(0,h.jsx)(a.PanelRow,{children:(0,h.jsxs)(a.Flex,{direction:"column",gap:"1",children:[(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)("h3",{style:{marginBottom:0},children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Date & time start","gatherpress")})})}),(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(a.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:c().tz(e,b()).format(j())}),renderContent:()=>(0,h.jsx)(a.DateTimePicker,{currentDate:e,onChange:e=>{D(e,r,i)},is12Hour:l})})})]})})},O=()=>{const{dateTimeEnd:e}=(0,n.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:s,setDateTimeStart:r}=(0,n.useDispatch)("gatherpress/datetime"),i=(0,g.getSettings)(),o=/a(?!\\)/i.test(i.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,d.useEffect)((()=>{s(c().tz(e,b()).format(_)),C()})),(0,h.jsx)(a.PanelRow,{children:(0,h.jsxs)(a.Flex,{direction:"column",gap:"1",children:[(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)("h3",{style:{marginBottom:0},children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("Date & time end","gatherpress")})})}),(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(a.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:c().tz(e,b()).format(j())}),renderContent:()=>(0,h.jsx)(a.DateTimePicker,{currentDate:e,onChange:e=>P(e,s,r),is12Hour:o})})})]})})},A=()=>{const{timezone:e}=(0,n.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:s}=(0,n.useDispatch)("gatherpress/datetime"),r=m("misc.timezoneChoices");return(0,d.useEffect)((()=>{s(m("eventDetails.dateTime.timezone"))}),[s]),(0,h.jsx)(a.PanelRow,{children:(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:S(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const r=e.replace(t,"$2").padStart(2,"0");let n=e.replace(t,"$3");return""===n&&(n=":00"),n=n.replace(".25",":15").replace(".5",":30").replace(".75",":45"),s+r+n}return e}(e),s(e),u()},__nexthasnomarginbottom:!0,children:Object.keys(r).map((e=>(0,h.jsx)("optgroup",{label:e,children:Object.keys(r[e]).map((t=>(0,h.jsx)("option",{value:t,children:r[e][t]},t)))},e)))})})},F=()=>{const{duration:e}=(0,n.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),s=(0,n.useDispatch)(),{setDateTimeEnd:r,setDuration:i}=s("gatherpress/datetime");return(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Duration","gatherpress"),value:!!x.some((t=>t.value===e))&&e,options:x,onChange:e=>{(e="false"!==e&&parseFloat(e))&&r(f(e)),i(e)},__nexthasnomarginbottom:!0})},M=()=>{const e=(0,n.useDispatch)("core/editor").editPost;let t=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:s,dateTimeEnd:r,duration:a,timezone:i}=(0,n.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:o}=(0,n.useDispatch)("gatherpress/datetime");return(0,d.useEffect)((()=>{const n=JSON.stringify({...t,dateTimeStart:c().tz(s,i).format(_),dateTimeEnd:c().tz(r,i).format(_),timezone:i});e({meta:{gatherpress_datetime:n}})}),[s,r,i,t,e,o,a]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("section",{children:(0,h.jsx)(N,{})}),(0,h.jsx)("section",{children:a?(0,h.jsx)(F,{}):(0,h.jsx)(O,{})}),(0,h.jsx)("section",{children:(0,h.jsx)(A,{})})]})},Y=()=>(0,h.jsx)(M,{}),L=()=>{const{editPost:e,unlockPostSaving:s}=(0,n.useDispatch)("core/editor"),r=(0,n.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);r&&(i=m("settings.maxGuestLimit")),!1===i&&(i=0);const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const r={gatherpress_max_guest_limit:Number(t)};l(t),e({meta:r}),s()}),[e,s]);return(0,d.useEffect)((()=>{r&&0!==i&&c(i)}),[r,i,c]),(0,h.jsx)(a.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{c(e)}})},R=()=>(0,h.jsx)("section",{children:(0,h.jsx)(L,{})}),I=()=>{const{editPost:e,unlockPostSaving:s}=(0,n.useDispatch)("core/editor"),r=(0,n.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);r&&(i=m("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const r={gatherpress_max_attendance_limit:Number(t)};l(t),e({meta:r}),s()}),[e,s]);return(0,d.useEffect)((()=>{r&&0!==i&&c(i)}),[r,i,c]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{c(e)}}),(0,h.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},$=()=>(0,h.jsx)("section",{children:(0,h.jsx)(I,{})}),G=(e,t="")=>{for(const[s,r]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const n=new CustomEvent(e,{detail:r});dispatchEvent(n)}},H=(e,t="")=>{for(const[s,r]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}},B=()=>"publish"===(0,n.select)("core/editor").getEditedPostAttribute("status")&&!T()&&(0,h.jsxs)("section",{children:[(0,h.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,h.jsx)(a.Button,{variant:"secondary",onClick:()=>G({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),J=()=>{const{editPost:e,unlockPostSaving:s}=(0,n.useDispatch)("core/editor"),r=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,d.useState)(r);return H({setOnlineEventLink:o},m("eventDetails.postId")),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),G({setOnlineEventLink:t},m("eventDetails.postId")),s()})(t)}})},W=()=>(0,h.jsx)("section",{children:(0,h.jsx)(J,{})}),V=()=>{const[e,s]=(0,d.useState)(""),[r,i]=(0,d.useState)(""),[o,l]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),[m,p]=(0,d.useState)(!1),[g,_]=(0,d.useState)(""),[v,x]=(0,d.useState)(""),[f,j]=(0,d.useState)(""),b=(0,n.useDispatch)("core/editor").editPost,{unlockPostSaving:S}=(0,n.useDispatch)("core/editor"),D=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,n.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",D))),w=P?.slug.replace(/^_/,""),[T,C]=(0,d.useState)(""),E=D+":"+T,y=(0,n.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:T})));(0,d.useEffect)((()=>{var e,r,n,a,o,c;let d={};if(T&&Array.isArray(y)){var m;const e=null!==(m=y[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var p;e&&(d=JSON.parse(e),d.name=null!==(p=y[0]?.title.rendered)&&void 0!==p?p:"")}const g=null!==(e=d?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(r=d?.fullAddress)&&void 0!==r?r:"",v=null!==(n=d?.phoneNumber)&&void 0!==n?n:"",f=null!==(a=d?.website)&&void 0!==a?a:"",b=null!==(o=d?.latitude)&&void 0!==o?o:"0",S=null!==(c=d?.longitude)&&void 0!==c?c:"0";w&&C(w),j(E?String(E):""),s(g),i(h),l(v),u(f),_(b),x(S),G({setName:g,setFullAddress:h,setPhoneNumber:v,setWebsite:f,setLatitude:b,setLongitude:S,setIsOnlineEventTerm:"online-event"===T})}),[T,y,w,E]);let k=(0,n.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return k?(k=k.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),k.unshift({value:":",label:(0,t.__)("Choose a venue","gatherpress")})):k=[],(0,h.jsx)(a.PanelRow,{children:(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:f,onChange:e=>{(e=>{j(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];b({_gatherpress_venue:t}),C(e[1]),S()})(e)},options:k})})},U=()=>(0,h.jsx)("section",{children:(0,h.jsx)(V,{})});(0,i.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,n.select)("core/editor")?.getCurrentPostType()&&(0,h.jsx)(o.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),className:"gatherpress-event-settings",children:(0,h.jsxs)(a.__experimentalVStack,{spacing:4,children:[(0,h.jsx)(Y,{}),(0,h.jsx)(U,{}),(0,h.jsx)(W,{}),(0,h.jsx)(R,{}),(0,h.jsx)($,{}),(0,h.jsx)(y,{}),(0,h.jsx)(z,{}),(0,h.jsx)(B,{})]})})}),r()((()=>{const e=(0,n.select)("core/edit-post"),t=(0,n.dispatch)("core/editor");e&&t&&(e.isEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")||t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings"))}));const X=window.wp.compose,Z=()=>{var e,s,r;const i=(0,n.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...l,...e});i({meta:{gatherpress_venue_information:t}})};let l=(0,n.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));l=l?JSON.parse(l):{};const[c,u]=(0,d.useState)(null!==(e=l.fullAddress)&&void 0!==e?e:""),[m,p]=(0,d.useState)(null!==(s=l.phoneNumber)&&void 0!==s?s:""),[g,_]=(0,d.useState)(null!==(r=l.website)&&void 0!==r?r:"");H({setFullAddress:u,setPhoneNumber:p,setWebsite:_});const v=(0,d.useRef)(o),x=(0,d.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${c}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ +(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:s})}))}),[c]),f=(0,X.useDebounce)(x,300);return(0,d.useEffect)((()=>{v.current=o}),[o]),(0,d.useEffect)((()=>{f()}),[c,f]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:c,onChange:e=>{G({setFullAddress:e}),o({fullAddress:e})}}),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:m,onChange:e=>{G({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Website","gatherpress"),value:g,type:"url",onChange:e=>{G({setWebsite:e}),o({website:e})}})]})},q=()=>(0,h.jsx)("section",{children:(0,h.jsx)(Z,{})});(0,i.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,n.select)("core/editor")?.getCurrentPostType()&&(0,h.jsx)(o.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),className:"gatherpress-venue-settings",children:(0,h.jsx)(a.__experimentalVStack,{spacing:6,children:(0,h.jsx)(q,{})})})}),r()((()=>{const e=(0,n.select)("core/edit-post"),t=(0,n.dispatch)("core/editor");e&&t&&(e.isEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")||t.toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings"))}))})(); \ No newline at end of file diff --git a/src/editor.js b/src/editor.js index 18d2517be..4382a951d 100644 --- a/src/editor.js +++ b/src/editor.js @@ -15,42 +15,28 @@ import { getFromGlobal } from './helpers/globals'; /** * Ensure Panels are Open for Events * - * This script ensures that specific panels related to Events are open in the WordPress block editor. + * This script ensures that the editor sidebar is open in the WordPress block editor. * It uses the `domReady` function to ensure the DOM is ready before execution. - * If the editor sidebar is not open, it opens the general sidebar, toggles the editor panel for event settings, - * and displays a notice for past events using the `hasEventPastNotice` function. + * If the editor sidebar is not open, it opens the general sidebar, and displays a + * notice for past events using the `hasEventPastNotice` function. * * @since 1.0.0 */ // Execute the following code when the DOM is ready. domReady(() => { - // Retrieve the 'core/edit-post' object from the 'select' function. - const selectPost = select('core/edit-post'); - // Exit early if 'core/edit-post' is not available. - if (!selectPost) { + const selectEditPost = select('core/edit-post'); + const dispatchEditPost = dispatch('core/edit-post'); + + if ( ! selectEditPost || ! dispatchEditPost ) { return; } - // Retrieve the 'core/edit-post' object from the 'dispatch' function. - const dispatchPost = dispatch('core/edit-post'); - - // Check if the editor sidebar is open. - const isEditorSidebarOpened = selectPost.isEditorSidebarOpened(); + const isEditorSidebarOpened = selectEditPost.isEditorSidebarOpened('edit-post/document'); - // If the editor sidebar is not open, open the general sidebar and toggle the editor panel for event settings. - if (!isEditorSidebarOpened) { - dispatchPost.openGeneralSidebar(); - dispatchPost.toggleEditorPanelOpened( - 'gatherpress-event-settings/gatherpress-event-settings' - ); - } else { - // If the editor sidebar is open, open the general sidebar for the 'edit-post/document' panel. - dispatchPost.openGeneralSidebar('edit-post/document'); - dispatchPost.toggleEditorPanelOpened( - 'gatherpress-event-settings/gatherpress-event-settings' - ); + if ( ! isEditorSidebarOpened ) { + dispatchEditPost.openGeneralSidebar('edit-post/document'); } subscribe(triggerEventCommunication); diff --git a/src/panels/event-settings/index.js b/src/panels/event-settings/index.js index 3f487965c..58d51ff15 100644 --- a/src/panels/event-settings/index.js +++ b/src/panels/event-settings/index.js @@ -2,13 +2,14 @@ * WordPress dependencies. */ import { __ } from '@wordpress/i18n'; -import { dispatch } from '@wordpress/data'; +import domReady from "@wordpress/dom-ready"; +import { dispatch, select } from '@wordpress/data'; import { // eslint-disable-next-line @wordpress/no-unsafe-wp-apis __experimentalVStack as VStack, } from '@wordpress/components'; import { registerPlugin } from '@wordpress/plugins'; -import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; +import { PluginDocumentSettingPanel } from '@wordpress/editor'; /** * Internal dependencies. @@ -41,7 +42,6 @@ const EventSettings = () => { @@ -76,14 +76,27 @@ registerPlugin('gatherpress-event-settings', { /** * Toggles the visibility of the 'gatherpress-event-settings' panel in the Block Editor. * - * This function uses the `dispatch` function from the `@wordpress/data` package - * to toggle the visibility of the 'gatherpress-event-settings' panel in the Block Editor. - * The panel is identified by the string 'gatherpress-event-settings/gatherpress-event-settings'. + * This function ensures that the 'gatherpress-event-settings' panel is open in the WordPress + * block editor. It uses the `domReady` function to ensure the DOM is ready before execution. + * If the 'gatherpress-event-settings' panel is not open, it opens the panel using the + * `toggleEditorPanelOpened` function. * * @since 1.0.0 * * @return {void} */ -dispatch('core/edit-post').toggleEditorPanelOpened( - 'gatherpress-event-settings/gatherpress-event-settings' -); +domReady( () => { + + const selectEditPost = select('core/edit-post'); + const dispatchEditor = dispatch('core/editor'); + + if ( ! selectEditPost || ! dispatchEditor ) { + return; + } + + const isEventSettingsPanelOpen = selectEditPost.isEditorPanelOpened('gatherpress-event-settings/gatherpress-event-settings'); + + if ( ! isEventSettingsPanelOpen ) { + dispatchEditor.toggleEditorPanelOpened('gatherpress-event-settings/gatherpress-event-settings'); + } +}) diff --git a/src/panels/venue-settings/index.js b/src/panels/venue-settings/index.js index a18c55fd0..ed4e14f4b 100644 --- a/src/panels/venue-settings/index.js +++ b/src/panels/venue-settings/index.js @@ -2,13 +2,14 @@ * WordPress dependencies. */ import { __ } from '@wordpress/i18n'; -import { dispatch } from '@wordpress/data'; +import domReady from '@wordpress/dom-ready'; +import { dispatch, select } from '@wordpress/data'; import { // eslint-disable-next-line @wordpress/no-unsafe-wp-apis __experimentalVStack as VStack, } from '@wordpress/components'; import { registerPlugin } from '@wordpress/plugins'; -import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; +import { PluginDocumentSettingPanel } from '@wordpress/editor'; /** * Internal dependencies. @@ -32,7 +33,6 @@ const VenueSettings = () => { @@ -59,12 +59,27 @@ registerPlugin('gatherpress-venue-settings', { /** * Toggle Venue Settings Panel * - * This function dispatches an action to toggle the visibility of the Venue Settings panel in the Block Editor. + * This script ensures that the venue settings panel is open in the WordPress block editor. + * It uses the `domReady` function to ensure the DOM is ready before execution. + * If the venue settings panel is not open, it opens the venue settings panel using + * the `toggleEditorPanelOpened` function. * * @since 1.0.0 * * @return {void} */ -dispatch('core/edit-post').toggleEditorPanelOpened( - 'gatherpress-venue-settings/gatherpress-venue-settings' -); +domReady( () => { + + const selectEditPost = select('core/edit-post'); + const dispatchEditor = dispatch('core/editor'); + + if ( ! selectEditPost || ! dispatchEditor ) { + return; + } + + const isVenuePanelOpened = selectEditPost.isEditorPanelOpened('gatherpress-venue-settings/gatherpress-venue-settings'); + + if ( ! isVenuePanelOpened ) { + dispatchEditor.toggleEditorPanelOpened('gatherpress-venue-settings/gatherpress-venue-settings'); + } +}) From b754286d32520863694c2fd510d03fbdb4abffbe Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 22:50:40 +0200 Subject: [PATCH 066/159] Fix: Class WP_Comment referenced with incorrect case: WP_comment. --- includes/core/classes/class-rsvp-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-rsvp-query.php b/includes/core/classes/class-rsvp-query.php index 974bf3c2a..905b312ed 100644 --- a/includes/core/classes/class-rsvp-query.php +++ b/includes/core/classes/class-rsvp-query.php @@ -15,7 +15,7 @@ defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore use GatherPress\Core\Traits\Singleton; -use WP_comment; +use WP_Comment; use WP_Comment_Query; use WP_Tax_Query; From 4125173ee6e9b17efc9585761432556ad760aa26 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 22:58:46 +0200 Subject: [PATCH 067/159] Fix: Filter callback return statement is missing. Because 'pre_get_comments' is an action, not a filter. --- includes/core/classes/class-rsvp-query.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-rsvp-query.php b/includes/core/classes/class-rsvp-query.php index 905b312ed..a0af41639 100644 --- a/includes/core/classes/class-rsvp-query.php +++ b/includes/core/classes/class-rsvp-query.php @@ -54,7 +54,7 @@ protected function __construct() { * @return void */ protected function setup_hooks(): void { - add_filter( 'pre_get_comments', array( $this, 'exclude_rsvp_from_comment_query' ) ); + add_action( 'pre_get_comments', array( $this, 'exclude_rsvp_from_comment_query' ) ); add_filter( 'comments_clauses', array( $this, 'taxonomy_query' ), 10, 2 ); } @@ -107,11 +107,11 @@ public function get_rsvps( array $args ): array { // Never allow count-only return, we always want array. $args['count'] = false; - remove_filter( 'pre_get_comments', array( $this, 'exclude_rsvp_from_comment_query' ) ); + remove_action( 'pre_get_comments', array( $this, 'exclude_rsvp_from_comment_query' ) ); $rsvps = get_comments( $args ); - add_filter( 'pre_get_comments', array( $this, 'exclude_rsvp_from_comment_query' ) ); + add_action( 'pre_get_comments', array( $this, 'exclude_rsvp_from_comment_query' ) ); return (array) $rsvps; } From 511330de56a4b05b2d1334817f292ab40b535b70 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 22:59:45 +0200 Subject: [PATCH 068/159] Ignore CS warning: Universal.Operators.DisallowShortTernary.Found --- includes/core/classes/class-event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 67cdab58d..37fee8c86 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -412,7 +412,7 @@ public function get_venue_information(): array { $venue_information['full_address'] = $venue_meta->fullAddress ?? ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $venue_information['phone_number'] = $venue_meta->phoneNumber ?? ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $venue_information['website'] = $venue_meta->website ?? ''; - $venue_information['permalink'] = get_permalink( $venue->ID ) ?: ''; + $venue_information['permalink'] = get_permalink( $venue->ID ) ?: ''; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found } return $venue_information; From 33fcfeb46992657ce8d88b5d64c3c8a8fd79f116 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 23:05:05 +0200 Subject: [PATCH 069/159] Fix: Instanceof between WP_Comment_Query and WP_Comment_Query will always evaluate to true. --- includes/core/classes/class-rsvp-query.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/core/classes/class-rsvp-query.php b/includes/core/classes/class-rsvp-query.php index a0af41639..0153de33d 100644 --- a/includes/core/classes/class-rsvp-query.php +++ b/includes/core/classes/class-rsvp-query.php @@ -153,13 +153,10 @@ public function get_rsvp( array $args ): ?WP_Comment { * * @since 1.0.0 * - * @param WP_Comment_Query $query The comment query object. + * @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference). * @return void */ - public function exclude_rsvp_from_comment_query( $query ) { - if ( ! $query instanceof WP_Comment_Query ) { - return; - } + public function exclude_rsvp_from_comment_query( WP_Comment_Query $query ) { $current_comment_types = $query->query_vars['type']; From df75ff940ac14448f035e6e224fd1fb53462f6e7 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 23:13:13 +0200 Subject: [PATCH 070/159] Fix: Access to an undefined property WP_Comment_Query::$tax_query. --- includes/core/classes/class-rsvp-query.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/core/classes/class-rsvp-query.php b/includes/core/classes/class-rsvp-query.php index 0153de33d..505641be0 100644 --- a/includes/core/classes/class-rsvp-query.php +++ b/includes/core/classes/class-rsvp-query.php @@ -67,17 +67,17 @@ protected function setup_hooks(): void { * @since 1.0.0 * * @param array $clauses The clauses for the query. - * @param WP_Comment_Query $comment_query The comment query object. + * @param WP_Comment_Query $comment_query Current instance of WP_Comment_Query (passed by reference). * @return array Modified query clauses. */ public function taxonomy_query( array $clauses, WP_Comment_Query $comment_query ): array { global $wpdb; if ( ! empty( $comment_query->query_vars['tax_query'] ) ) { - $comment_query->tax_query = new WP_Tax_Query( $comment_query->query_vars['tax_query'] ); - $pieces = $comment_query->tax_query->get_sql( $wpdb->comments, 'comment_ID' ); - $clauses['join'] .= $pieces['join']; - $clauses['where'] .= $pieces['where']; + $comment_tax_query = new WP_Tax_Query( $comment_query->query_vars['tax_query'] ); + $pieces = $comment_tax_query->get_sql( $wpdb->comments, 'comment_ID' ); + $clauses['join'] .= $pieces['join']; + $clauses['where'] .= $pieces['where']; } return $clauses; From 8b82f0fa00226ee9badb1b296531e7a01a423d12 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Thu, 3 Oct 2024 23:40:15 +0200 Subject: [PATCH 071/159] Fix: Function wxr_cdata not found. (https://github.com/szepeviktor/phpstan-wordpress/issues/241) --- .distignore | 1 + phpstan.neon.dist | 5 +++-- phpstan.stubs | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 phpstan.stubs diff --git a/.distignore b/.distignore index 9065e1a5b..4f2b58537 100755 --- a/.distignore +++ b/.distignore @@ -29,6 +29,7 @@ phpcs.xml.dist phpcs.ruleset.xml phpstan.neon phpstan.neon.dist +phpstan.stubs phpunit.xml phpunit.xml.dist playwright.config.js diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 152175c51..6620347d4 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,11 +7,12 @@ includes: - phar://phpstan.phar/conf/bleedingEdge.neon parameters: -# bootstrapFiles: + bootstrapFiles: + # Constants, functions, etc. used by GatherPress + - phpstan.stubs # - vendor/pmc/unit-test/src/classes/autoloader.php # - vendor/autoload.php # - gatherpress.php - parallel: maximumNumberOfProcesses: 1 processTimeout: 300.0 diff --git a/phpstan.stubs b/phpstan.stubs new file mode 100644 index 000000000..613c19716 --- /dev/null +++ b/phpstan.stubs @@ -0,0 +1,17 @@ + Date: Fri, 4 Oct 2024 01:30:13 +0200 Subject: [PATCH 072/159] Add shortcut to run phpstan Which is way more performant: vendor/bin/phpstan analyze -vv --memory-limit=2G Elapsed time: 5 seconds Used memory: 663.28 MB Elapsed time: 10 seconds Used memory: 1.08 GB composer test:phpstan (which runs `vendor/bin/phpstan analyze -vv --memory-limit=2G` under the hood) Elapsed time: Used memory: 70.5 MB --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 22198f88d..55cb65467 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source", "lint": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --report=summary,source", "lint:errors": "@lint -n", - "test": "@php ./vendor/phpunit/phpunit/phpunit" + "test": "@php ./vendor/phpunit/phpunit/phpunit", + "test:phpstan": "@php ./vendor/bin/phpstan analyze -vv --memory-limit=2G" }, "config": { "allow-plugins": { From ca595d57ed52ce04f8f51040d435e2bc1de284b9 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 01:37:28 +0200 Subject: [PATCH 073/159] Fix: Variable $option might not be defined. --- includes/templates/admin/settings/fields/select.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/templates/admin/settings/fields/select.php b/includes/templates/admin/settings/fields/select.php index a847bdb65..5b5558308 100644 --- a/includes/templates/admin/settings/fields/select.php +++ b/includes/templates/admin/settings/fields/select.php @@ -10,6 +10,7 @@ * @param string $name The name attribute for the input field. * @param string $label The label text displayed next to the checkbox. * @param string $option The option name in which the field value is stored. + * @param string $options The options for the select field. * @param mixed $value The current value of the checkbox (boolean or equivalent). * @param string $description Optional. The description or tooltip text for the field. */ @@ -17,7 +18,7 @@ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore -if ( ! isset( $name, $label, $options, $options['items'], $value, $description ) ) { +if ( ! isset( $name, $label, $option, $options, $options['items'], $value, $description ) ) { return; } ?> From 6f36dc1a1606d4d8917583d2e5d47932dd680851 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 01:54:44 +0200 Subject: [PATCH 074/159] Fix: Result of function selected (void) is used. AND (Parameter #1 (void) of echo cannot be converted to string.) which was a false positive. --- includes/templates/admin/settings/fields/select.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/templates/admin/settings/fields/select.php b/includes/templates/admin/settings/fields/select.php index 5b5558308..9bee92139 100644 --- a/includes/templates/admin/settings/fields/select.php +++ b/includes/templates/admin/settings/fields/select.php @@ -28,7 +28,7 @@ $gatherpress_label ) : ?> - Date: Fri, 4 Oct 2024 02:00:29 +0200 Subject: [PATCH 075/159] Fix: Expression on left side of ?? is not nullable. --- includes/core/classes/class-assets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/classes/class-assets.php b/includes/core/classes/class-assets.php index 347c595fb..0182415c3 100644 --- a/includes/core/classes/class-assets.php +++ b/includes/core/classes/class-assets.php @@ -104,8 +104,8 @@ protected function setup_hooks(): void { * @return void */ public function add_global_object(): void { - ?> - + // phpcs:ignore Universal.Operators.DisallowShortTernary.Found ?> + Date: Fri, 4 Oct 2024 02:03:43 +0200 Subject: [PATCH 076/159] Fix: Expression "$blocks" on a separate line does not do anything. --- includes/core/classes/class-assets.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/core/classes/class-assets.php b/includes/core/classes/class-assets.php index 0182415c3..766bc6c85 100644 --- a/includes/core/classes/class-assets.php +++ b/includes/core/classes/class-assets.php @@ -385,7 +385,6 @@ protected function unregister_blocks(): array { switch ( get_post_type() ) { case Event::POST_TYPE: - $blocks; break; case Venue::POST_TYPE: $blocks = array( From e58785e5ddabcf6cd446f00e2b498c1c3cbd95d2 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 02:11:50 +0200 Subject: [PATCH 077/159] Fix: Parameter #1 $comment_id of function get_comment_meta expects int, string given. AND Parameter #1 $object_ids of function wp_get_object_terms expects array|int, string given. --- includes/core/classes/class-rsvp.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 7d30bbb6c..390631624 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -137,9 +137,9 @@ public function get( int $user_id ): array { if ( ! empty( $rsvp ) ) { $data['id'] = $rsvp->user_id; $data['timestamp'] = $rsvp->comment_date; - $data['anonymous'] = intval( get_comment_meta( $rsvp->comment_ID, 'gatherpress_rsvp_anonymous', true ) ); - $data['guests'] = intval( get_comment_meta( $rsvp->comment_ID, 'gatherpress_rsvp_guests', true ) ); - $terms = wp_get_object_terms( $rsvp->comment_ID, self::TAXONOMY ); + $data['anonymous'] = intval( get_comment_meta( intval( $rsvp->comment_ID ), 'gatherpress_rsvp_anonymous', true ) ); + $data['guests'] = intval( get_comment_meta( intval( $rsvp->comment_ID ), 'gatherpress_rsvp_guests', true ) ); + $terms = wp_get_object_terms( intval( $rsvp->comment_ID ), self::TAXONOMY ); if ( ! empty( $terms ) && is_array( $terms ) ) { $data['status'] = $terms[0]->slug; From 0ad3a3e80cb76893bf8b71e91051508372d3f1bc Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 02:15:38 +0200 Subject: [PATCH 078/159] Fix: Call to function is_wp_error() with int|string|false will always evaluate to false. --- includes/core/classes/class-rsvp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 390631624..fc1674269 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -239,7 +239,7 @@ public function save( int $user_id, string $status, int $anonymous = 0, int $gue wp_update_comment( $args ); } - if ( is_wp_error( $comment_id ) || empty( $comment_id ) ) { + if ( empty( $comment_id ) ) { return $data; } From 9d967fb6cf0473fd1c95d9b887a5cf9e6e0e6b4e Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 02:22:54 +0200 Subject: [PATCH 079/159] Fix: Offset 'approved' on array{approved: int, awaiting_moderation: int, spam: int, trash: int, post-trashed: int, total_comments: int, all: int} on left side of ?? always exists and is not nullable. --- includes/core/classes/class-rsvp-setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-rsvp-setup.php b/includes/core/classes/class-rsvp-setup.php index 81b774a1d..7720350d8 100644 --- a/includes/core/classes/class-rsvp-setup.php +++ b/includes/core/classes/class-rsvp-setup.php @@ -98,6 +98,6 @@ public function adjust_comments_number( int $comments_number, int $post_id ): in $comment_count = get_comment_count( $post_id ); - return $comment_count['approved'] ?? 0; + return $comment_count['approved']; } } From 64f02715045ed5ad7a2bf822b9e14ffd5c7f4669 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 02:28:32 +0200 Subject: [PATCH 080/159] Fix: Property WP_Query::$queried_object_id (int) does not accept string. --- includes/core/classes/class-event-query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/classes/class-event-query.php b/includes/core/classes/class-event-query.php index 0a93f6802..f00f38eaa 100644 --- a/includes/core/classes/class-event-query.php +++ b/includes/core/classes/class-event-query.php @@ -196,14 +196,14 @@ public function prepare_event_query_before_execution( WP_Query $query ): void { $query->is_post_type_archive = array( Event::POST_TYPE ); // This will force a page to behave like an archive page. Use -1 as that is not a valid ID. - $query->queried_object_id = '-1'; + $query->queried_object_id = -1; // Option adjustments for page_for_posts and show_on_front to force archive page. add_filter( 'pre_option', static function ( $pre, $option ) { if ( 'page_for_posts' === $option ) { - return '-1'; + return -1; } if ( 'show_on_front' === $option ) { From 2c3585cc6930cb3a523ec18d9fa7c54fb4d714ea Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 02:31:01 +0200 Subject: [PATCH 081/159] Fix: Property WP_Query::$is_post_type_archive (bool) does not accept array. --- includes/core/classes/class-event-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-event-query.php b/includes/core/classes/class-event-query.php index f00f38eaa..4295136c6 100644 --- a/includes/core/classes/class-event-query.php +++ b/includes/core/classes/class-event-query.php @@ -193,7 +193,7 @@ public function prepare_event_query_before_execution( WP_Query $query ): void { $query->is_page = false; $query->is_singular = false; $query->is_archive = true; - $query->is_post_type_archive = array( Event::POST_TYPE ); + $query->is_post_type_archive = true; // This will force a page to behave like an archive page. Use -1 as that is not a valid ID. $query->queried_object_id = -1; From ea4466ed814cb8b24f1a565e5f0960b3c6910b2e Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 08:23:54 -0400 Subject: [PATCH 082/159] Fix wp_cache_set argument. --- includes/core/classes/class-rsvp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index fc1674269..f25dc7d0c 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -496,7 +496,7 @@ static function ( $response ) use ( $status ) { $retval[ $status ]['count'] = count( $retval[ $status ]['responses'] ) + $guests; } - wp_cache_set( $cache_key, $retval, 15 * MINUTE_IN_SECONDS ); + wp_cache_set( $cache_key, $retval, '', 15 * MINUTE_IN_SECONDS ); return $retval; } From 30599f2e3105018edf4b57212ac50e91b38b196e Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 08:56:52 -0400 Subject: [PATCH 083/159] Fix return on method, fix cache bug, update unit tests. --- gatherpress.php | 1 + .../core/classes/class-event-rest-api.php | 35 ++++++++++++++----- includes/core/classes/class-rsvp.php | 6 ++-- .../classes/class-test-event-rest-api.php | 2 +- .../includes/core/classes/class-test-rsvp.php | 3 ++ 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/gatherpress.php b/gatherpress.php index 5cceb802e..4f039fe97 100644 --- a/gatherpress.php +++ b/gatherpress.php @@ -22,6 +22,7 @@ defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore // Constants. +define( 'GATHERPRESS_CACHE', 'gatherpress_cache' ); define( 'GATHERPRESS_CORE_FILE', __FILE__ ); define( 'GATHERPRESS_CORE_PATH', __DIR__ ); define( 'GATHERPRESS_CORE_URL', plugin_dir_url( __FILE__ ) ); diff --git a/includes/core/classes/class-event-rest-api.php b/includes/core/classes/class-event-rest-api.php index 54c49adb1..bab6a1f2c 100644 --- a/includes/core/classes/class-event-rest-api.php +++ b/includes/core/classes/class-event-rest-api.php @@ -57,7 +57,7 @@ protected function __construct() { */ protected function setup_hooks(): void { add_action( 'rest_api_init', array( $this, 'register_endpoints' ) ); - add_action( 'gatherpress_send_emails', array( $this, 'send_emails' ), 10, 3 ); + add_action( 'gatherpress_send_emails', array( $this, 'handle_email_send_action' ), 10, 3 ); add_filter( sprintf( 'rest_prepare_%s', Event::POST_TYPE ), array( $this, 'prepare_event_data' ) ); } @@ -231,19 +231,35 @@ public function email( WP_REST_Request $request ): WP_REST_Response { } /** - * Send event-related emails to selected members. + * Hooked method to trigger the sending of related emails. * - * This method is responsible for sending event-related emails to specific members. It first checks if the given - * `$post_id` corresponds to an event post type, and if not, it returns early. Then, it retrieves a list of members - * to send the email to and constructs the email subject, body, and headers. Finally, it sends the email to each - * selected member. + * This method hooks into a WordPress action, triggering the `send_emails` method to send emails to selected members. + * It doesn't return any value, as it's intended to be called by an action hook. * * @since 1.0.0 * - * @param int $post_id Event Post ID. + * @param int $post_id Post ID. * @param array $send Members to send the email to. * @param string $message Optional message to include in the email. - * @return bool + * @return void + */ + public function handle_email_send_action( int $post_id, array $send, string $message ): void { + $this->send_emails( $post_id, $send, $message ); + } + + /** + * Send emails to selected members. + * + * This method is responsible for sending emails to specific members. It checks if the given + * `$post_id` corresponds to a specific post type, retrieves the list of members to email, and sends the email with + * the appropriate subject, body, and headers. + * + * @since 1.0.0 + * + * @param int $post_id Post ID. + * @param array $send Members to send the email to. + * @param string $message Optional message to include in the email. + * @return bool True if emails were successfully sent, false otherwise. */ public function send_emails( int $post_id, array $send, string $message ): bool { if ( Event::POST_TYPE !== get_post_type( $post_id ) ) { @@ -252,12 +268,13 @@ public function send_emails( int $post_id, array $send, string $message ): bool // Keep the currently logged-in user. $current_user = wp_get_current_user(); + $members = $this->get_members( $send, $post_id ); - $members = $this->get_members( $send, $post_id ); foreach ( $members as $member ) { if ( '0' === get_user_meta( $member->ID, 'gatherpress_event_updates_opt_in', true ) ) { continue; } + if ( $member->user_email ) { $to = $member->user_email; $switched_locale = switch_to_user_locale( $member->ID ); diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index f25dc7d0c..14fea7d12 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -277,7 +277,7 @@ public function save( int $user_id, string $status, int $anonymous = 0, int $gue 'anonymous' => intval( $anonymous ), ); - wp_cache_delete( sprintf( self::CACHE_KEY, $post_id ) ); + wp_cache_delete( sprintf( self::CACHE_KEY, $post_id ), GATHERPRESS_CACHE ); if ( ! $limit_reached ) { $this->check_waiting_list(); @@ -383,7 +383,7 @@ public function attending_limit_reached( array $current_response, int $guests = public function responses(): array { $post_id = $this->event->ID; $cache_key = sprintf( self::CACHE_KEY, $post_id ); - $retval = wp_cache_get( $cache_key ); + $retval = wp_cache_get( $cache_key, GATHERPRESS_CACHE ); $rsvp_query = Rsvp_Query::get_instance(); // @todo add testing with cache. @@ -496,7 +496,7 @@ static function ( $response ) use ( $status ) { $retval[ $status ]['count'] = count( $retval[ $status ]['responses'] ) + $guests; } - wp_cache_set( $cache_key, $retval, '', 15 * MINUTE_IN_SECONDS ); + wp_cache_set( $cache_key, $retval, GATHERPRESS_CACHE, 15 * MINUTE_IN_SECONDS ); return $retval; } diff --git a/test/unit/php/includes/core/classes/class-test-event-rest-api.php b/test/unit/php/includes/core/classes/class-test-event-rest-api.php index d26f28b3b..4a4cbb315 100644 --- a/test/unit/php/includes/core/classes/class-test-event-rest-api.php +++ b/test/unit/php/includes/core/classes/class-test-event-rest-api.php @@ -42,7 +42,7 @@ public function test_setup_hooks(): void { 'type' => 'action', 'name' => 'gatherpress_send_emails', 'priority' => 10, - 'callback' => array( $instance, 'send_emails' ), + 'callback' => array( $instance, 'handle_email_send_action' ), ), array( 'type' => 'filter', diff --git a/test/unit/php/includes/core/classes/class-test-rsvp.php b/test/unit/php/includes/core/classes/class-test-rsvp.php index fc1158917..b95c8400c 100644 --- a/test/unit/php/includes/core/classes/class-test-rsvp.php +++ b/test/unit/php/includes/core/classes/class-test-rsvp.php @@ -265,6 +265,9 @@ public function test_responses(): void { wp_delete_user( $user_id_2 ); + // User will remain while cached until it expires. + wp_cache_delete( sprintf( Rsvp::CACHE_KEY, $post->ID ), GATHERPRESS_CACHE ); + $responses = $rsvp->responses(); $this->assertEmpty( From b47a6cacc60abfa8a4e1a490acae39109c20aa2a Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 09:10:59 -0400 Subject: [PATCH 084/159] Small fixes. --- includes/core/classes/class-assets.php | 4 ++-- includes/core/classes/class-event.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/core/classes/class-assets.php b/includes/core/classes/class-assets.php index 766bc6c85..057414a4b 100644 --- a/includes/core/classes/class-assets.php +++ b/includes/core/classes/class-assets.php @@ -104,8 +104,8 @@ protected function setup_hooks(): void { * @return void */ public function add_global_object(): void { - // phpcs:ignore Universal.Operators.DisallowShortTernary.Found ?> - + ?> + fullAddress ?? ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $venue_information['phone_number'] = $venue_meta->phoneNumber ?? ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase $venue_information['website'] = $venue_meta->website ?? ''; - $venue_information['permalink'] = get_permalink( $venue->ID ) ?: ''; // phpcs:ignore Universal.Operators.DisallowShortTernary.Found + $venue_information['permalink'] = (string) get_permalink( $venue->ID ); } return $venue_information; From aa69812154ac846f5e35e18afa65de879825d095 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 09:14:28 -0400 Subject: [PATCH 085/159] Name change. --- gatherpress.php | 2 +- includes/core/classes/class-rsvp.php | 6 +++--- test/unit/php/includes/core/classes/class-test-rsvp.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gatherpress.php b/gatherpress.php index 4f039fe97..b5c9df735 100644 --- a/gatherpress.php +++ b/gatherpress.php @@ -22,7 +22,7 @@ defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore // Constants. -define( 'GATHERPRESS_CACHE', 'gatherpress_cache' ); +define( 'GATHERPRESS_CACHE_GROUP', 'gatherpress_cache' ); define( 'GATHERPRESS_CORE_FILE', __FILE__ ); define( 'GATHERPRESS_CORE_PATH', __DIR__ ); define( 'GATHERPRESS_CORE_URL', plugin_dir_url( __FILE__ ) ); diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 14fea7d12..80de2772e 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -277,7 +277,7 @@ public function save( int $user_id, string $status, int $anonymous = 0, int $gue 'anonymous' => intval( $anonymous ), ); - wp_cache_delete( sprintf( self::CACHE_KEY, $post_id ), GATHERPRESS_CACHE ); + wp_cache_delete( sprintf( self::CACHE_KEY, $post_id ), GATHERPRESS_CACHE_GROUP ); if ( ! $limit_reached ) { $this->check_waiting_list(); @@ -383,7 +383,7 @@ public function attending_limit_reached( array $current_response, int $guests = public function responses(): array { $post_id = $this->event->ID; $cache_key = sprintf( self::CACHE_KEY, $post_id ); - $retval = wp_cache_get( $cache_key, GATHERPRESS_CACHE ); + $retval = wp_cache_get( $cache_key, GATHERPRESS_CACHE_GROUP ); $rsvp_query = Rsvp_Query::get_instance(); // @todo add testing with cache. @@ -496,7 +496,7 @@ static function ( $response ) use ( $status ) { $retval[ $status ]['count'] = count( $retval[ $status ]['responses'] ) + $guests; } - wp_cache_set( $cache_key, $retval, GATHERPRESS_CACHE, 15 * MINUTE_IN_SECONDS ); + wp_cache_set( $cache_key, $retval, GATHERPRESS_CACHE_GROUP, 15 * MINUTE_IN_SECONDS ); return $retval; } diff --git a/test/unit/php/includes/core/classes/class-test-rsvp.php b/test/unit/php/includes/core/classes/class-test-rsvp.php index b95c8400c..a77078d02 100644 --- a/test/unit/php/includes/core/classes/class-test-rsvp.php +++ b/test/unit/php/includes/core/classes/class-test-rsvp.php @@ -266,7 +266,7 @@ public function test_responses(): void { wp_delete_user( $user_id_2 ); // User will remain while cached until it expires. - wp_cache_delete( sprintf( Rsvp::CACHE_KEY, $post->ID ), GATHERPRESS_CACHE ); + wp_cache_delete( sprintf( Rsvp::CACHE_KEY, $post->ID ), GATHERPRESS_CACHE_GROUP ); $responses = $rsvp->responses(); From c615cd534f9ae61901b0699a0398ec829acafceb Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 09:17:31 -0400 Subject: [PATCH 086/159] Add ignore. --- phpstan.neon.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 6620347d4..ea3324760 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -30,6 +30,7 @@ parameters: # - vendor/ ignoreErrors: + - '#^Constant GATHERPRESS_CACHE_GROUP not found\.$#' - '#^Constant GATHERPRESS_CORE_FILE not found\.$#' - '#^Constant GATHERPRESS_CORE_PATH not found\.$#' - '#^Constant GATHERPRESS_CORE_URL not found\.$#' From 98f22ebc49bba345b9581b13df96273d3153dfae Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 12:00:42 -0400 Subject: [PATCH 087/159] Get ready for 0.31.0 --- gatherpress.php | 4 ++-- includes/data/credits.php | 49 +++++++++++++++++++++++++-------------- package-lock.json | 4 ++-- package.json | 2 +- readme.md | 2 +- 5 files changed, 37 insertions(+), 24 deletions(-) diff --git a/gatherpress.php b/gatherpress.php index 5cceb802e..3d6c44f37 100644 --- a/gatherpress.php +++ b/gatherpress.php @@ -5,9 +5,9 @@ * Description: Powering Communities with WordPress. * Author: The GatherPress Community * Author URI: https://gatherpress.org/ - * Version: 0.31.0-alpha + * Version: 0.31.0 * Requires PHP: 7.4 - * Requires at least: 6.4 + * Requires at least: 6.6 * Text Domain: gatherpress * License: GNU General Public License v2.0 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/includes/data/credits.php b/includes/data/credits.php index 9b8703e1b..1a5fbe4e3 100644 --- a/includes/data/credits.php +++ b/includes/data/credits.php @@ -4,7 +4,7 @@ defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore return array ( - 'version' => '0.31.0-alpha', + 'version' => '0.31.0', 'project-leaders' => array ( 0 => @@ -118,6 +118,19 @@ 'contributors' => array ( 0 => + array ( + 'id' => 13378646, + 'name' => 'Anthony Skelton', + 'link' => 'https://profiles.wordpress.org/author/ajskelton/', + 'slug' => 'ajskelton', + 'avatar_urls' => + array ( + 24 => '//www.gravatar.com/avatar/71105d55fdc63b9e87d0094e642c7976?s=24&r=g&d=mm', + 48 => '//www.gravatar.com/avatar/71105d55fdc63b9e87d0094e642c7976?s=48&r=g&d=mm', + 96 => '//www.gravatar.com/avatar/71105d55fdc63b9e87d0094e642c7976?s=96&r=g&d=mm', + ), + ), + 1 => array ( 'id' => 14040242, 'name' => 'Cameron Barrett', @@ -130,7 +143,7 @@ 96 => '//www.gravatar.com/avatar/1e12bb14c1bf783f1560e082e55b0481?s=96&r=g&d=mm', ), ), - 1 => + 2 => array ( 'id' => 2451432, 'name' => 'Courtney Robertson', @@ -143,7 +156,7 @@ 96 => '//www.gravatar.com/avatar/03ff681abf60368b6ce5f5edcf9be310?s=96&r=g&d=mm', ), ), - 2 => + 3 => array ( 'id' => 5876920, 'name' => 'Abhishek Deshpande', @@ -156,7 +169,7 @@ 96 => '//www.gravatar.com/avatar/dd0f1b658cad711cdbcc1ffe4cfefd47?s=96&r=g&d=mm', ), ), - 3 => + 4 => array ( 'id' => 11704207, 'name' => 'hauvong', @@ -169,7 +182,7 @@ 96 => '//www.gravatar.com/avatar/b3bb6b6a8a28be5c130db072cd4b553e?s=96&r=g&d=mm', ), ), - 4 => + 5 => array ( 'id' => 9330583, 'name' => 'Javier Casares', @@ -182,7 +195,7 @@ 96 => '//www.gravatar.com/avatar/958902e8d0fda24dd28189b0508c661a?s=96&r=g&d=mm', ), ), - 5 => + 6 => array ( 'id' => 5645739, 'name' => 'Jeffrey Paul', @@ -195,7 +208,7 @@ 96 => '//www.gravatar.com/avatar/8ac4ec4b1f9cb342e59ed5127f050d24?s=96&r=g&d=mm', ), ), - 6 => + 7 => array ( 'id' => 14671153, 'name' => 'JordanPak', @@ -208,7 +221,7 @@ 96 => '//www.gravatar.com/avatar/6a8ec9fee1e8bd1da62a7c8a6753b46f?s=96&r=g&d=mm', ), ), - 7 => + 8 => array ( 'id' => 21213947, 'name' => 'Bill Van Pelt', @@ -221,7 +234,7 @@ 96 => '//www.gravatar.com/avatar/66ad6f626fb27b53499b0a240f46a8bf?s=96&r=g&d=mm', ), ), - 8 => + 9 => array ( 'id' => 18639594, 'name' => 'Steve Mosby', @@ -234,7 +247,7 @@ 96 => '//www.gravatar.com/avatar/62a3f0c3953c7f0d04b0d54cf286c600?s=96&r=g&d=mm', ), ), - 9 => + 10 => array ( 'id' => 23135308, 'name' => 'Matheus Zimmermann Galdino', @@ -247,7 +260,7 @@ 96 => '//www.gravatar.com/avatar/0ae3d93c557b425bea6bffd6a53a77f6?s=96&r=g&d=mm', ), ), - 10 => + 11 => array ( 'id' => 11146216, 'name' => 'meagan hanes', @@ -260,7 +273,7 @@ 96 => '//www.gravatar.com/avatar/052d4e778920f20d9f6611bf5c027528?s=96&r=g&d=mm', ), ), - 11 => + 12 => array ( 'id' => 13234268, 'name' => 'Michelle Frechette', @@ -273,7 +286,7 @@ 96 => '//www.gravatar.com/avatar/c6711ad7886201b5e585c96535f2229d?s=96&r=g&d=mm', ), ), - 12 => + 13 => array ( 'id' => 14692152, 'name' => 'Laura Byrne', @@ -286,7 +299,7 @@ 96 => '//www.gravatar.com/avatar/9210ecea04529656ea99064634ac636b?s=96&r=g&d=mm', ), ), - 13 => + 14 => array ( 'id' => 13994457, 'name' => 'Nilo Velez', @@ -299,7 +312,7 @@ 96 => '//www.gravatar.com/avatar/82a67d2d011ae384612fe6441576cdf5?s=96&r=g&d=mm', ), ), - 14 => + 15 => array ( 'id' => 15490728, 'name' => 'Jason Lawton', @@ -312,7 +325,7 @@ 96 => '//www.gravatar.com/avatar/ec5ec8357fa89bb2671bf1ab61b2546b?s=96&r=g&d=mm', ), ), - 15 => + 16 => array ( 'id' => 20932248, 'name' => 'prashantabellad', @@ -325,7 +338,7 @@ 96 => '//www.gravatar.com/avatar/57794a51302818489f91bb191adddc40?s=96&r=g&d=mm', ), ), - 16 => + 17 => array ( 'id' => 21156948, 'name' => 'Prayag Mankar', @@ -338,7 +351,7 @@ 96 => '//www.gravatar.com/avatar/ddc43fb192c5a9c58e16c0ccab85b81f?s=96&r=g&d=mm', ), ), - 17 => + 18 => array ( 'id' => 368236, 'name' => 'Pascal Birchler', diff --git a/package-lock.json b/package-lock.json index bc618ef66..58d10e518 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gatherpress", - "version": "0.31.0-alpha", + "version": "0.31.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gatherpress", - "version": "0.31.0-alpha", + "version": "0.31.0", "license": "GPL-2.0-or-later", "devDependencies": { "@jest/globals": "^29.7.0", diff --git a/package.json b/package.json index 17a256c28..f73e9fec8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gatherpress", - "version": "0.31.0-alpha", + "version": "0.31.0", "description": "Powering Communities with WordPress", "author": "", "license": "GPL-2.0-or-later", diff --git a/readme.md b/readme.md index 9c0dfd8a5..d5ea2ed66 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # GatherPress -Stable tag: 0.31.0-alpha +Stable tag: 0.31.0 Tested up to: 6.6.2 License: GPL v2 or later Tags: events, event, meetup, community From 808b39dc6978630a7c866484630bbe23b585ed6c Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 12:12:01 -0400 Subject: [PATCH 088/159] Add lastname to typos list. --- .typos.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.typos.toml b/.typos.toml index f65380464..206e8584e 100644 --- a/.typos.toml +++ b/.typos.toml @@ -37,3 +37,4 @@ extend-ignore-re = [ # [default.extend-words] # bellow = "below" # toi = "toi" +# Skelton = "Skelton" From fea949a640a07226a682ffe0a1571f8e7d93c52f Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 12:13:45 -0400 Subject: [PATCH 089/159] Fix. --- .typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 206e8584e..f02c073e8 100644 --- a/.typos.toml +++ b/.typos.toml @@ -35,6 +35,6 @@ extend-ignore-re = [ # Case insensitive, matches inside word. # [default.extend-words] +"Skelton" = "Skelton" # bellow = "below" # toi = "toi" -# Skelton = "Skelton" From 6e8411305b78460f9f9b072e19c3b61468475372 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 12:19:27 -0400 Subject: [PATCH 090/159] JS lint cleanup. --- src/editor.js | 8 ++++---- src/panels/event-settings/index.js | 19 +++++++++++-------- src/panels/venue-settings/index.js | 17 ++++++++++------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/editor.js b/src/editor.js index 4382a951d..bd3ccc85a 100644 --- a/src/editor.js +++ b/src/editor.js @@ -25,17 +25,17 @@ import { getFromGlobal } from './helpers/globals'; // Execute the following code when the DOM is ready. domReady(() => { - const selectEditPost = select('core/edit-post'); const dispatchEditPost = dispatch('core/edit-post'); - if ( ! selectEditPost || ! dispatchEditPost ) { + if (!selectEditPost || !dispatchEditPost) { return; } - const isEditorSidebarOpened = selectEditPost.isEditorSidebarOpened('edit-post/document'); + const isEditorSidebarOpened = + selectEditPost.isEditorSidebarOpened('edit-post/document'); - if ( ! isEditorSidebarOpened ) { + if (!isEditorSidebarOpened) { dispatchEditPost.openGeneralSidebar('edit-post/document'); } diff --git a/src/panels/event-settings/index.js b/src/panels/event-settings/index.js index 58d51ff15..39cef13fc 100644 --- a/src/panels/event-settings/index.js +++ b/src/panels/event-settings/index.js @@ -2,7 +2,7 @@ * WordPress dependencies. */ import { __ } from '@wordpress/i18n'; -import domReady from "@wordpress/dom-ready"; +import domReady from '@wordpress/dom-ready'; import { dispatch, select } from '@wordpress/data'; import { // eslint-disable-next-line @wordpress/no-unsafe-wp-apis @@ -85,18 +85,21 @@ registerPlugin('gatherpress-event-settings', { * * @return {void} */ -domReady( () => { - +domReady(() => { const selectEditPost = select('core/edit-post'); const dispatchEditor = dispatch('core/editor'); - if ( ! selectEditPost || ! dispatchEditor ) { + if (!selectEditPost || !dispatchEditor) { return; } - const isEventSettingsPanelOpen = selectEditPost.isEditorPanelOpened('gatherpress-event-settings/gatherpress-event-settings'); + const isEventSettingsPanelOpen = selectEditPost.isEditorPanelOpened( + 'gatherpress-event-settings/gatherpress-event-settings' + ); - if ( ! isEventSettingsPanelOpen ) { - dispatchEditor.toggleEditorPanelOpened('gatherpress-event-settings/gatherpress-event-settings'); + if (!isEventSettingsPanelOpen) { + dispatchEditor.toggleEditorPanelOpened( + 'gatherpress-event-settings/gatherpress-event-settings' + ); } -}) +}); diff --git a/src/panels/venue-settings/index.js b/src/panels/venue-settings/index.js index ed4e14f4b..bd60c4d56 100644 --- a/src/panels/venue-settings/index.js +++ b/src/panels/venue-settings/index.js @@ -68,18 +68,21 @@ registerPlugin('gatherpress-venue-settings', { * * @return {void} */ -domReady( () => { - +domReady(() => { const selectEditPost = select('core/edit-post'); const dispatchEditor = dispatch('core/editor'); - if ( ! selectEditPost || ! dispatchEditor ) { + if (!selectEditPost || !dispatchEditor) { return; } - const isVenuePanelOpened = selectEditPost.isEditorPanelOpened('gatherpress-venue-settings/gatherpress-venue-settings'); + const isVenuePanelOpened = selectEditPost.isEditorPanelOpened( + 'gatherpress-venue-settings/gatherpress-venue-settings' + ); - if ( ! isVenuePanelOpened ) { - dispatchEditor.toggleEditorPanelOpened('gatherpress-venue-settings/gatherpress-venue-settings'); + if (!isVenuePanelOpened) { + dispatchEditor.toggleEditorPanelOpened( + 'gatherpress-venue-settings/gatherpress-venue-settings' + ); } -}) +}); From 864c10a6d17ddcbababc54d3f594edf4e4137e01 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 12:33:14 -0400 Subject: [PATCH 091/159] Small adjustments. --- .../core/classes/class-test-topic.php | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php index 5aa69a1d0..4a3c315dd 100644 --- a/test/unit/php/includes/core/classes/class-test-topic.php +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -8,8 +8,6 @@ namespace GatherPress\Tests\Core; -use GatherPress\Core\Event; -use GatherPress\Core\Rsvp; use GatherPress\Core\Topic; use PMC\Unit_Test\Base; @@ -76,6 +74,13 @@ public function test_get_localized_taxonomy_slug(): void { 'Failed to assert english taxonomy slug is "topic".' ); + $filter = static function ( string $translation, string $text, string $context ): string { + if ( 'topic' !== $text || 'Taxonomy Slug' !== $context ) { + return $translation; + } + return 'Ünit Tést'; + }; + /** * Instead of loading additional languages into the unit test suite, * we just filter the translated value, to mock different languages. @@ -87,22 +92,14 @@ public function test_get_localized_taxonomy_slug(): void { * @param string $context Context information for the translators. * @return string Translated text. */ - add_filter( - 'gettext_with_context_gatherpress', - function ( string $translation, string $text, string $context ): string { - if ( 'topic' !== $text || 'Taxonomy Slug' !== $context ) { - return $translation; - } - return 'Ünit Tést'; - }, - 10, - 3 - ); + add_filter( 'gettext_with_context_gatherpress', $filter, 10, 3 ); $this->assertSame( 'unit-test', $instance->get_localized_taxonomy_slug(), 'Failed to assert taxonomy slug is "unit-test".' ); + + remove_filter( 'gettext_with_context_gatherpress', $filter ); } } From 2de9b140cb01aebe13302225dc4c4bee5a87d664 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Fri, 4 Oct 2024 12:35:36 -0400 Subject: [PATCH 092/159] PHPCS fixes. --- test/unit/php/includes/core/classes/class-test-topic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php index 4a3c315dd..df59b779e 100644 --- a/test/unit/php/includes/core/classes/class-test-topic.php +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -92,7 +92,7 @@ public function test_get_localized_taxonomy_slug(): void { * @param string $context Context information for the translators. * @return string Translated text. */ - add_filter( 'gettext_with_context_gatherpress', $filter, 10, 3 ); + add_filter( 'gettext_with_context_gatherpress', $filter, 10, 3 ); $this->assertSame( 'unit-test', @@ -100,6 +100,6 @@ public function test_get_localized_taxonomy_slug(): void { 'Failed to assert taxonomy slug is "unit-test".' ); - remove_filter( 'gettext_with_context_gatherpress', $filter ); + remove_filter( 'gettext_with_context_gatherpress', $filter ); } } From ffa2fb8761d66fd97e5e997ead9586e8ea64e071 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 22:42:00 +0200 Subject: [PATCH 093/159] Group unit-tests under 'migrate' --- test/unit/php/includes/core/classes/class-test-export.php | 1 + test/unit/php/includes/core/classes/class-test-import.php | 1 + test/unit/php/includes/core/classes/class-test-migrate.php | 1 + 3 files changed, 3 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index 0259921e8..7601a0d31 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -16,6 +16,7 @@ * Class Test_Export. * * @coversDefaultClass \GatherPress\Core\Export + * @group migrate */ class Test_Export extends Base { /** diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 738bc7084..2329693c8 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -15,6 +15,7 @@ * Class Test_Import. * * @coversDefaultClass \GatherPress\Core\Import + * @group migrate */ class Test_Import extends Base { /** diff --git a/test/unit/php/includes/core/classes/class-test-migrate.php b/test/unit/php/includes/core/classes/class-test-migrate.php index 73e38b73c..527546935 100644 --- a/test/unit/php/includes/core/classes/class-test-migrate.php +++ b/test/unit/php/includes/core/classes/class-test-migrate.php @@ -15,6 +15,7 @@ * Class Test_Migrate. * * @coversDefaultClass \GatherPress\Core\Migrate + * @group migrate */ class Test_Migrate extends Base { /** From 83002c4017185bb8b19c82ef26ec8318dca576cd Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 23:00:44 +0200 Subject: [PATCH 094/159] NEW test for prepare() method --- .../core/classes/class-test-import.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 2329693c8..3c21eacb9 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -8,6 +8,7 @@ namespace GatherPress\Tests\Core; +use GatherPress\Core\Event; use GatherPress\Core\Import; use PMC\Unit_Test\Base; @@ -45,4 +46,34 @@ public function test_setup_hooks(): void { $this->assert_hooks( $hooks, $instance ); } + + /** + * Coverage for prepare. + * + * @covers ::prepare + * + * @return void + */ + public function test_prepare(): void { + $instance = Import::get_instance(); + + $post_data_raw = array(); + $instance->prepare( $post_data_raw ); + + $this->assertFinite( + 0, + did_action('gatherpress_import'), + 'Failed to assert that the import was not prepared for non-validating post data.' + ); + + $post_data_raw = array( 'post_type' => Event::POST_TYPE ); + $instance->prepare( $post_data_raw ); + + $this->assertFinite( + 1, + did_action('gatherpress_import'), + 'Failed to assert that the import was prepared for valid post data.' + ); + } + } From 1a294cbd0423c38a28316b9ce8553baba5e15823 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 23:01:11 +0200 Subject: [PATCH 095/159] NEW test for validate() method --- .../core/classes/class-test-import.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 3c21eacb9..392ef6e52 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -11,6 +11,7 @@ use GatherPress\Core\Event; use GatherPress\Core\Import; use PMC\Unit_Test\Base; +use PMC\Unit_Test\Utility; /** * Class Test_Import. @@ -76,4 +77,26 @@ public function test_prepare(): void { ); } + /** + * Coverage for validate. + * + * @covers ::validate + * + * @return void + */ + public function test_validate(): void { + $instance = Import::get_instance(); + + $post_data_raw = array(); + $this->assertFalse( + Utility::invoke_hidden_method( $instance, 'validate', array( $post_data_raw ) ), + 'Failed to assert that validation fails for non-validating post data.' + ); + + $post_data_raw = array( 'post_type' => Event::POST_TYPE ); + $this->assertTrue( + Utility::invoke_hidden_method( $instance, 'validate', array( $post_data_raw ) ), + 'Failed to assert that validation passes for valid post data.' + ); + } } From 9ce8047ec8ff52496f0b0eba72a9c7b599c1a8ca Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Fri, 4 Oct 2024 23:01:40 +0200 Subject: [PATCH 096/159] NEW test for extend() method --- .../core/classes/class-test-import.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 392ef6e52..8a633f1f2 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -99,4 +99,28 @@ public function test_validate(): void { 'Failed to assert that validation passes for valid post data.' ); } + + /** + * Coverage for extend. + * + * @covers ::extend + * + * @return void + */ + public function test_extend(): void { + $instance = Import::get_instance(); + + $this->assertFalse( + has_filter( 'add_post_metadata', array( $instance, 'run') ), + 'Failed to assert that the "add_post_metadata" filter is not already added.' + ); + + $instance->extend(); + + $this->assertSame( + 10, + has_filter( 'add_post_metadata', array( $instance, 'run') ), + 'Failed to assert that the "add_post_metadata" filter was added.' + ); + } } From 1292c95c5d38c3aaaec599c0e63893fda7e7eb51 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 00:43:43 +0200 Subject: [PATCH 097/159] Cast input for $event->save_datetimes as array, if not already done --- includes/core/classes/class-import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-import.php b/includes/core/classes/class-import.php index dcdb74105..0cf9b42ac 100644 --- a/includes/core/classes/class-import.php +++ b/includes/core/classes/class-import.php @@ -176,6 +176,6 @@ public function run( ?bool $check, int $object_id, string $meta_key, $meta_value public function datetimes_callback( int $post_id, $data ): void { $event = new Event( $post_id ); - $event->save_datetimes( maybe_unserialize( $data ) ); + $event->save_datetimes( (array) maybe_unserialize( $data ) ); } } From ad66c118a6ca35f15998495c5c399d5859785a70 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 00:44:22 +0200 Subject: [PATCH 098/159] NEW test for run() method --- .../core/classes/class-test-import.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 8a633f1f2..43b4a05cb 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -123,4 +123,33 @@ public function test_extend(): void { 'Failed to assert that the "add_post_metadata" filter was added.' ); } + + /** + * Coverage for run. + * + * @covers ::run + * + * @return void + */ + public function test_run(): void { + $instance = Import::get_instance(); + + // Defined for readablity, + // parameters are unrelated to the method under test. + $check = true; + $object_id = 0; + $meta_value = 'data'; + $unique = true; + + $this->assertNull( + $instance->run( $check, $object_id, 'unit-test', $meta_value, $unique ), + 'Failed to assert that the import would not run for non-existing post_meta keys.' + ); + + $this->assertFalse( + $instance->run( $check, $object_id, 'gatherpress_datetimes', $meta_value, $unique ), + 'Failed to assert that the import would run for existing, valid post_meta keys.' + ); + } + } From a0020bd3fd6f42489b831fb5cb6e92080903edc3 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 00:44:41 +0200 Subject: [PATCH 099/159] NEW test for datetimes_callback() method --- .../core/classes/class-test-import.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 43b4a05cb..86201126a 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -152,4 +152,56 @@ public function test_run(): void { ); } + /** + * Coverage for datetimes_callback. + * + * @covers ::datetimes_callback + * + * @return void + */ + public function test_datetimes_callback(): void { + $instance = Import::get_instance(); + + $post = $this->mock->post( + array( + 'post_title' => 'Unit Test Event', + 'post_type' => 'gatherpress_event', + 'post_content' => 'Unit Test description.', + ) + )->get(); + $event = new Event( $post->ID ); + + $instance->datetimes_callback( $post->ID, 0 ); + $this->assertSame( + array( + 'datetime_start' => '', + 'datetime_start_gmt' => '', + 'datetime_end' => '', + 'datetime_end_gmt' => '', + 'timezone' => '+00:00', + ), + $event->get_datetime() + ); + + $meta_data_value = array( + 'post_id' => $post->ID, + 'datetime_start' => '2020-05-11 15:00:00', + 'datetime_end' => '2020-05-12 17:00:00', + 'timezone' => 'America/New_York', + ); + $instance->datetimes_callback( $post->ID, $meta_data_value ); + + $expect = array( + 'datetime_start' => '2020-05-11 15:00:00', + 'datetime_start_gmt' => '2020-05-11 19:00:00', + 'datetime_end' => '2020-05-12 17:00:00', + 'datetime_end_gmt' => '2020-05-12 21:00:00', + 'timezone' => 'America/New_York', + ); + + $this->assertSame( + $expect, + $event->get_datetime() + ); + } } From 286aded9952bc002eb3fb28d3368efeb86bcf210 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 00:55:59 +0200 Subject: [PATCH 100/159] Fix typo "readablity" should be "readability" --- test/unit/php/includes/core/classes/class-test-import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 86201126a..7754bbee6 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -134,7 +134,7 @@ public function test_extend(): void { public function test_run(): void { $instance = Import::get_instance(); - // Defined for readablity, + // Defined for readability, // parameters are unrelated to the method under test. $check = true; $object_id = 0; From 09f73846290d10aeaf5fa4418f41fac6a005ba2a Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 00:56:50 +0200 Subject: [PATCH 101/159] Fix for CS --- test/unit/php/includes/core/classes/class-test-import.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-import.php b/test/unit/php/includes/core/classes/class-test-import.php index 7754bbee6..2d401b860 100644 --- a/test/unit/php/includes/core/classes/class-test-import.php +++ b/test/unit/php/includes/core/classes/class-test-import.php @@ -63,7 +63,7 @@ public function test_prepare(): void { $this->assertFinite( 0, - did_action('gatherpress_import'), + did_action( 'gatherpress_import' ), 'Failed to assert that the import was not prepared for non-validating post data.' ); @@ -72,7 +72,7 @@ public function test_prepare(): void { $this->assertFinite( 1, - did_action('gatherpress_import'), + did_action( 'gatherpress_import' ), 'Failed to assert that the import was prepared for valid post data.' ); } @@ -111,7 +111,7 @@ public function test_extend(): void { $instance = Import::get_instance(); $this->assertFalse( - has_filter( 'add_post_metadata', array( $instance, 'run') ), + has_filter( 'add_post_metadata', array( $instance, 'run' ) ), 'Failed to assert that the "add_post_metadata" filter is not already added.' ); @@ -119,7 +119,7 @@ public function test_extend(): void { $this->assertSame( 10, - has_filter( 'add_post_metadata', array( $instance, 'run') ), + has_filter( 'add_post_metadata', array( $instance, 'run' ) ), 'Failed to assert that the "add_post_metadata" filter was added.' ); } From 9874ec2324a80889d3fca57f1f9de1fc873f3b80 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 01:05:16 +0200 Subject: [PATCH 102/159] Use stubs instead of ignoring constants, for type-safety --- phpstan.neon.dist | 7 ------- phpstan.stubs | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index ea3324760..7b68bb94f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -30,13 +30,6 @@ parameters: # - vendor/ ignoreErrors: - - '#^Constant GATHERPRESS_CACHE_GROUP not found\.$#' - - '#^Constant GATHERPRESS_CORE_FILE not found\.$#' - - '#^Constant GATHERPRESS_CORE_PATH not found\.$#' - - '#^Constant GATHERPRESS_CORE_URL not found\.$#' - - '#^Constant GATHERPRESS_REST_NAMESPACE not found\.$#' - - '#^Constant GATHERPRESS_REQUIRES_PHP not found\.$#' - # core/classes/class-setup.php # # A dev-only error, which can occur if the gatherpress is symlinked into a WP instance or called via wp-env or Playground. diff --git a/phpstan.stubs b/phpstan.stubs index 613c19716..1553225f9 100644 --- a/phpstan.stubs +++ b/phpstan.stubs @@ -5,6 +5,14 @@ */ namespace { + + define( 'GATHERPRESS_CACHE_GROUP', ''); + define( 'GATHERPRESS_CORE_FILE', './gatherpress.php'); + define( 'GATHERPRESS_CORE_PATH', '.'); + define( 'GATHERPRESS_CORE_URL', ''); + define( 'GATHERPRESS_REST_NAMESPACE', ''); + define( 'GATHERPRESS_REQUIRES_PHP', ''); + /** * Used in includes/core/classes/class-export.php * From 588aa2521616a0de7564d42c779765c0fd4f006c Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 01:06:06 +0200 Subject: [PATCH 103/159] Clean up configuration (from unused stuff) --- phpstan.neon.dist | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 7b68bb94f..39eaf25ad 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -10,9 +10,7 @@ parameters: bootstrapFiles: # Constants, functions, etc. used by GatherPress - phpstan.stubs -# - vendor/pmc/unit-test/src/classes/autoloader.php -# - vendor/autoload.php -# - gatherpress.php + parallel: maximumNumberOfProcesses: 1 processTimeout: 300.0 @@ -23,11 +21,6 @@ parameters: paths: - includes/ -# - test/ - -# excludePaths: -# analyse: -# - vendor/ ignoreErrors: # core/classes/class-setup.php From b14992683a95ad953700b79684ec804979d16e45 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:38:45 +0200 Subject: [PATCH 104/159] Use 'Singular Name' instead of (a new string) '... slug' --- includes/core/classes/class-event-setup.php | 2 +- includes/core/classes/class-topic.php | 2 +- includes/core/classes/class-venue.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/core/classes/class-event-setup.php b/includes/core/classes/class-event-setup.php index 3b4365203..c6b6f9379 100644 --- a/includes/core/classes/class-event-setup.php +++ b/includes/core/classes/class-event-setup.php @@ -164,7 +164,7 @@ public function register_post_type(): void { */ public static function get_localized_post_type_slug(): string { $switched_locale = switch_to_locale( get_locale() ); - $slug = _x( 'event', 'Post Type Slug', 'gatherpress' ); + $slug = _x( 'Event', 'Post Type Singular Name', 'gatherpress' ); $slug = sanitize_title( $slug, '', 'save' ); if ( $switched_locale ) { restore_previous_locale(); diff --git a/includes/core/classes/class-topic.php b/includes/core/classes/class-topic.php index afbf70b62..326c4916e 100644 --- a/includes/core/classes/class-topic.php +++ b/includes/core/classes/class-topic.php @@ -123,7 +123,7 @@ public function register_taxonomy(): void { */ public static function get_localized_taxonomy_slug(): string { $switched_locale = switch_to_locale( get_locale() ); - $slug = _x( 'topic', 'Taxonomy Slug', 'gatherpress' ); + $slug = _x( 'Topic', 'Taxonomy Singular Name', 'gatherpress' ); $slug = sanitize_title( $slug, '', 'save' ); if ( $switched_locale ) { restore_previous_locale(); diff --git a/includes/core/classes/class-venue.php b/includes/core/classes/class-venue.php index c6c546d17..da09c88e5 100644 --- a/includes/core/classes/class-venue.php +++ b/includes/core/classes/class-venue.php @@ -157,8 +157,8 @@ public function register_post_type(): void { */ public static function get_localized_post_type_slug(): string { $switched_locale = switch_to_locale( get_locale() ); - $slug = _x( 'venue', 'Post Type Slug', 'gatherpress' ); - $slug = sanitize_title( $slug ); + $slug = _x( 'Venue', 'Post Type Singular Name', 'gatherpress' ); + $slug = sanitize_title( $slug, 'save' ); if ( $switched_locale ) { restore_previous_locale(); From bc76134ba976f5c39c1371c491021c68660563f3 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:39:15 +0200 Subject: [PATCH 105/159] Fix translation context --- includes/core/classes/class-topic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/classes/class-topic.php b/includes/core/classes/class-topic.php index 326c4916e..fa71e01cd 100644 --- a/includes/core/classes/class-topic.php +++ b/includes/core/classes/class-topic.php @@ -79,8 +79,8 @@ public function register_taxonomy(): void { Event::POST_TYPE, array( 'labels' => array( - 'name' => _x( 'Topics', 'taxonomy general name', 'gatherpress' ), - 'singular_name' => _x( 'Topic', 'taxonomy singular name', 'gatherpress' ), + 'name' => _x( 'Topics', 'Taxonomy General Name', 'gatherpress' ), + 'singular_name' => _x( 'Topic', 'Taxonomy Singular Name', 'gatherpress' ), 'search_items' => __( 'Search Topics', 'gatherpress' ), 'all_items' => __( 'All Topics', 'gatherpress' ), 'view_item' => __( 'View Topic', 'gatherpress' ), From a65d71c873ec3e7fab808b18b0c6d22420dcf7a9 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:40:21 +0200 Subject: [PATCH 106/159] Follow changed method & little clean up --- .../php/includes/core/classes/class-test-topic.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php index df59b779e..578d5086b 100644 --- a/test/unit/php/includes/core/classes/class-test-topic.php +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -66,16 +66,17 @@ public function test_register_taxonomy(): void { * @return void */ public function test_get_localized_taxonomy_slug(): void { - $instance = Topic::get_instance(); $this->assertSame( 'topic', - $instance->get_localized_taxonomy_slug(), + Topic::get_localized_taxonomy_slug(), 'Failed to assert english taxonomy slug is "topic".' ); - + + // This also checks that the taxonomy is still registered with the same 'Taxonomy Singular Name' label, + // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { - if ( 'topic' !== $text || 'Taxonomy Slug' !== $context ) { + if ( 'Topic' !== $text || 'Taxonomy Singular Name' !== $context ) { return $translation; } return 'Ünit Tést'; @@ -96,7 +97,7 @@ public function test_get_localized_taxonomy_slug(): void { $this->assertSame( 'unit-test', - $instance->get_localized_taxonomy_slug(), + Topic::get_localized_taxonomy_slug(), 'Failed to assert taxonomy slug is "unit-test".' ); From c7ade8eb6b19dae3e138175de9a3011353d48fba Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:40:52 +0200 Subject: [PATCH 107/159] NEW test for get_localized_post_type_slug() method --- .../core/classes/class-test-event-setup.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-event-setup.php b/test/unit/php/includes/core/classes/class-test-event-setup.php index 789eff79e..e813ceecb 100644 --- a/test/unit/php/includes/core/classes/class-test-event-setup.php +++ b/test/unit/php/includes/core/classes/class-test-event-setup.php @@ -113,6 +113,52 @@ public function test_register_post_type(): void { $this->assertTrue( post_type_exists( Event::POST_TYPE ), 'Failed to assert that post type exists.' ); } + /** + * Coverage for get_localized_post_type_slug method. + * + * @covers ::get_localized_post_type_slug + * + * @return void + */ + public function test_get_localized_post_type_slug(): void { + + $this->assertSame( + 'event', + Event_Setup::get_localized_post_type_slug(), + 'Failed to assert english post type slug is "event".' + ); + + // This also checks that the post type is still registered with the same 'Post Type Singular Name' label, + // which is used by the method under test and the test itself. + $filter = static function ( string $translation, string $text, string $context ): string { + if ( 'Event' !== $text || 'Post Type Singular Name' !== $context ) { + return $translation; + } + return 'Ünit Tést'; + }; + + /** + * Instead of loading additional languages into the unit test suite, + * we just filter the translated value, to mock different languages. + * + * Filters text with its translation based on context information for a domain. + * + * @param string $translation Translated text. + * @param string $text Text to translate. + * @param string $context Context information for the translators. + * @return string Translated text. + */ + add_filter( 'gettext_with_context_gatherpress', $filter, 10, 3 ); + + $this->assertSame( + 'unit-test', + Event_Setup::get_localized_post_type_slug(), + 'Failed to assert the post type slug is "unit-test".' + ); + + remove_filter( 'gettext_with_context_gatherpress', $filter ); + } + /** * Coverage for register_post_meta method. * From 38eed72d87908a0e295d297b7e20d6922ad3e058 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:41:11 +0200 Subject: [PATCH 108/159] Updated test for get_localized_post_type_slug() method --- .../core/classes/class-test-venue.php | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-venue.php b/test/unit/php/includes/core/classes/class-test-venue.php index 3b14905b0..e3ae656c2 100644 --- a/test/unit/php/includes/core/classes/class-test-venue.php +++ b/test/unit/php/includes/core/classes/class-test-venue.php @@ -100,8 +100,38 @@ public function test_get_localized_post_type_slug(): void { $this->assertSame( 'venue', Venue::get_localized_post_type_slug(), - 'Failed to assert that post type slug is same.' + 'Failed to assert english post type slug is "venue".' ); + + // This also checks that the post type is still registered with the same 'Post Type Singular Name' label, + // which is used by the method under test and the test itself. + $filter = static function ( string $translation, string $text, string $context ): string { + if ( 'Venue' !== $text || 'Post Type Singular Name' !== $context ) { + return $translation; + } + return 'Ünit Tést'; + }; + + /** + * Instead of loading additional languages into the unit test suite, + * we just filter the translated value, to mock different languages. + * + * Filters text with its translation based on context information for a domain. + * + * @param string $translation Translated text. + * @param string $text Text to translate. + * @param string $context Context information for the translators. + * @return string Translated text. + */ + add_filter( 'gettext_with_context_gatherpress', $filter, 10, 3 ); + + $this->assertSame( + 'unit-test', + Venue::get_localized_post_type_slug(), + 'Failed to assert the post type slug is "unit-test".' + ); + + remove_filter( 'gettext_with_context_gatherpress', $filter ); } /** From 0580545d3519837cdc26a50f38c6c6eaddbf7269 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:49:38 +0200 Subject: [PATCH 109/159] Fix for CS --- test/unit/php/includes/core/classes/class-test-event-setup.php | 2 +- test/unit/php/includes/core/classes/class-test-topic.php | 2 +- test/unit/php/includes/core/classes/class-test-venue.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-setup.php b/test/unit/php/includes/core/classes/class-test-event-setup.php index e813ceecb..a54e7aed5 100644 --- a/test/unit/php/includes/core/classes/class-test-event-setup.php +++ b/test/unit/php/includes/core/classes/class-test-event-setup.php @@ -127,7 +127,7 @@ public function test_get_localized_post_type_slug(): void { Event_Setup::get_localized_post_type_slug(), 'Failed to assert english post type slug is "event".' ); - + // This also checks that the post type is still registered with the same 'Post Type Singular Name' label, // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php index 578d5086b..b5e6b0fd1 100644 --- a/test/unit/php/includes/core/classes/class-test-topic.php +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -72,7 +72,7 @@ public function test_get_localized_taxonomy_slug(): void { Topic::get_localized_taxonomy_slug(), 'Failed to assert english taxonomy slug is "topic".' ); - + // This also checks that the taxonomy is still registered with the same 'Taxonomy Singular Name' label, // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { diff --git a/test/unit/php/includes/core/classes/class-test-venue.php b/test/unit/php/includes/core/classes/class-test-venue.php index e3ae656c2..39590efa4 100644 --- a/test/unit/php/includes/core/classes/class-test-venue.php +++ b/test/unit/php/includes/core/classes/class-test-venue.php @@ -102,7 +102,7 @@ public function test_get_localized_post_type_slug(): void { Venue::get_localized_post_type_slug(), 'Failed to assert english post type slug is "venue".' ); - + // This also checks that the post type is still registered with the same 'Post Type Singular Name' label, // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { From 8008259a561c65d2a8b9a737299f366f88ce88a8 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 02:59:43 +0200 Subject: [PATCH 110/159] New test for validate() method --- .../core/classes/class-test-export.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index 7601a0d31..f0f43156f 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -11,6 +11,7 @@ use GatherPress\Core\Event; use GatherPress\Core\Export; use PMC\Unit_Test\Base; +use PMC\Unit_Test\Utility; /** * Class Test_Export. @@ -41,6 +42,35 @@ public function test_setup_hooks(): void { $this->assert_hooks( $hooks, $instance ); } + /** + * Coverage for validate. + * + * @covers ::validate + * + * @return void + */ + public function test_validate(): void { + $instance = Export::get_instance(); + + $post = $this->mock->post()->get(); + $this->assertFalse( + Utility::invoke_hidden_method( $instance, 'validate', array( $post ) ), + 'Failed to assert that validation fails for non-validating post data.' + ); + + $post = $this->mock->post( + array( + 'post_title' => 'Unit Test Event', + 'post_type' => 'gatherpress_event', + 'post_content' => 'Unit Test description.', + ) + )->get(); + $this->assertTrue( + Utility::invoke_hidden_method( $instance, 'validate', array( $post ) ), + 'Failed to assert that validation passes for valid post data.' + ); + } + /** * Coverage for datetime_callback method. * From edd27ddeedf84cb58abed8f5b0d3a3b058e25006 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 03:02:34 +0200 Subject: [PATCH 111/159] Change method order in file (not in logic) --- includes/core/classes/class-export.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/core/classes/class-export.php b/includes/core/classes/class-export.php index bc4ebd2a4..5f50253fe 100644 --- a/includes/core/classes/class-export.php +++ b/includes/core/classes/class-export.php @@ -96,6 +96,18 @@ public function prepare( WP_Post $post ): void { } } + /** + * Checks if the currently exported post is of type 'gatherpress_event'. + * + * @since 1.0.0 + * + * @param WP_Post $post Current meta key. + * @return bool True, when the currently exported post is of type 'gatherpress_event', false otherwise. + */ + protected function validate( WP_Post $post ): bool { + return ( Event::POST_TYPE === $post->post_type ); + } + /** * Extend WordPress' native Export * @@ -137,18 +149,6 @@ public function extend( bool $skip, string $meta_key, object $meta ): bool { return $skip; } - /** - * Checks if the currently exported post is of type 'gatherpress_event'. - * - * @since 1.0.0 - * - * @param WP_Post $post Current meta key. - * @return bool True, when the currently exported post is of type 'gatherpress_event', false otherwise. - */ - protected function validate( WP_Post $post ): bool { - return ( Event::POST_TYPE === $post->post_type ); - } - /** * Exports all custom data. * From 8d2bd2087b585856628465ca1cb2af077cdc489e Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 03:47:54 +0200 Subject: [PATCH 112/159] New test for extend() method --- includes/core/classes/class-export.php | 6 ++- .../core/classes/class-test-export.php | 46 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/includes/core/classes/class-export.php b/includes/core/classes/class-export.php index 5f50253fe..e653d7bc8 100644 --- a/includes/core/classes/class-export.php +++ b/includes/core/classes/class-export.php @@ -185,7 +185,11 @@ public function run( WP_Post $post ): void { * @since 1.0.0 */ public function render( array $callbacks, string $key, WP_Post $post ) { - if ( ! isset( $callbacks['export_callback'] ) || ! is_callable( $callbacks['export_callback'] ) ) { + if ( + ! isset( $callbacks['export_callback'] ) || + ! is_callable( $callbacks['export_callback'] ) || + ! function_exists( 'wxr_cdata' ) + ) { return; } diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index f0f43156f..89570d579 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -71,6 +71,52 @@ public function test_validate(): void { ); } + /** + * Coverage for extend. + * + * @covers ::extend + * + * @return void + */ + public function test_extend(): void { + $instance = Export::get_instance(); + + $post_id = $this->mock->post()->get()->post_id; + $meta_key = ''; + $meta = (object) [ + "post_id" => $post_id + ]; + $this->assertTrue( + $instance->extend( true, $meta_key, $meta ), + 'Failed to assert the method accepts wether to "skip" saving the current post meta, independent from the data to save.' + ); + $this->assertFalse( + $instance->extend( false, $meta_key, $meta ), + 'Failed to assert the method accepts wether to "skip" saving the current post meta, independent from the data to save.' + ); + + $skip = false; + $meta_key = Export::POST_META; + + $this->assertSame( + 'gatherpress_extend_export', + $meta_key, + 'Failed to assert the post meta key hasn\'t changed.' + ); + + // Add temporary marker. + add_post_meta( $post_id, $meta_key, 'temp-unit-test' ); + + $this->assertTrue( + $instance->extend( $skip, $meta_key, $meta ), + 'Failed to assert the method returns true, even with false given, because the "meta_key" matches.' + ); + $this->assertFalse( + get_post_meta( $post_id, $meta_key ), + 'Failed to assert the temporary marker was deleted from post meta.' + ); + } + /** * Coverage for datetime_callback method. * From c26e816be940b7af9bebb11fa4f9d48a7c75ce10 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 03:53:54 +0200 Subject: [PATCH 113/159] New test for export() method --- .../core/classes/class-test-export.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index 89570d579..760fc5452 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -42,6 +42,40 @@ public function test_setup_hooks(): void { $this->assert_hooks( $hooks, $instance ); } + /** + * Coverage for export. + * + * @covers ::export + * + * @return void + */ + public function test_export(): void { + $instance = Export::get_instance(); + + $this->assertFalse( + has_action( 'the_post', array( $instance, 'prepare' ) ), + 'Failed to assert that the "the_post" action is not already added.' + ); + $this->assertFalse( + has_filter( 'wxr_export_skip_postmeta', array( $instance, 'extend' ) ), + 'Failed to assert that the "wxr_export_skip_postmeta" filter is not already added.' + ); + + $instance->export(); + + $this->assertSame( + 10, + has_action( 'the_post', array( $instance, 'prepare' ) ), + 'Failed to assert that the "the_post" action was added.' + ); + + $this->assertSame( + 10, + has_filter( 'wxr_export_skip_postmeta', array( $instance, 'extend' ) ), + 'Failed to assert that the "wxr_export_skip_postmeta" filter was added.' + ); + } + /** * Coverage for validate. * From 09a6560a7eac48f01a5a72f322d136e6f337d1cd Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 03:54:26 +0200 Subject: [PATCH 114/159] Fix for CS --- test/unit/php/includes/core/classes/class-test-export.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index 760fc5452..e776c60e4 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -117,9 +117,9 @@ public function test_extend(): void { $post_id = $this->mock->post()->get()->post_id; $meta_key = ''; - $meta = (object) [ - "post_id" => $post_id - ]; + $meta = (object) array( + 'post_id' => $post_id, + ); $this->assertTrue( $instance->extend( true, $meta_key, $meta ), 'Failed to assert the method accepts wether to "skip" saving the current post meta, independent from the data to save.' From c91ee1fbe8dd78ef0128c7bf6585f66e31a4a316 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 03:58:42 +0200 Subject: [PATCH 115/159] Fix typo "wether" should be "whether" --- test/unit/php/includes/core/classes/class-test-export.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index e776c60e4..17dd9242a 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -122,11 +122,11 @@ public function test_extend(): void { ); $this->assertTrue( $instance->extend( true, $meta_key, $meta ), - 'Failed to assert the method accepts wether to "skip" saving the current post meta, independent from the data to save.' + 'Failed to assert the method accepts whether to "skip" saving the current post meta, independent from the data to save.' ); $this->assertFalse( $instance->extend( false, $meta_key, $meta ), - 'Failed to assert the method accepts wether to "skip" saving the current post meta, independent from the data to save.' + 'Failed to assert the method accepts whether to "skip" saving the current post meta, independent from the data to save.' ); $skip = false; From 704bbc7df0a5dae87696d73d3b3f8e6d1ee4850c Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 15:49:12 +0200 Subject: [PATCH 116/159] Add tests with different user_locale set --- .../core/classes/class-test-event-setup.php | 25 ++++++++++++++++++- .../core/classes/class-test-topic.php | 25 ++++++++++++++++++- .../core/classes/class-test-venue.php | 25 ++++++++++++++++++- 3 files changed, 72 insertions(+), 3 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-setup.php b/test/unit/php/includes/core/classes/class-test-event-setup.php index a54e7aed5..eb4eb3974 100644 --- a/test/unit/php/includes/core/classes/class-test-event-setup.php +++ b/test/unit/php/includes/core/classes/class-test-event-setup.php @@ -125,9 +125,32 @@ public function test_get_localized_post_type_slug(): void { $this->assertSame( 'event', Event_Setup::get_localized_post_type_slug(), - 'Failed to assert english post type slug is "event".' + 'Failed to assert English post type slug is "event".' ); + $user_id = $this->factory->user->create(); + update_user_meta( $user_id, 'locale', 'es_ES' ); + switch_to_user_locale( $user_id ); + + // @todo This assertion CAN NOT FAIL, + // until real translations do exist in the wp-env instance. + // Because WordPress doesn't have any translation files to load, + // it will return the string in English. + $this->assertSame( + 'event', + Event_Setup::get_localized_post_type_slug(), + 'Failed to assert post type slug is "event", even the locale is not English anymore.' + ); + // But at least the restoring of the user locale can be tested, without .po files. + $this->assertSame( + 'es_ES', + determine_locale(), + 'Failed to assert locale was reset to Spanish, after switching to ~ and restoring from English.' + ); + + // Restore default locale for following tests. + switch_to_locale( 'en_US' ); + // This also checks that the post type is still registered with the same 'Post Type Singular Name' label, // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php index b5e6b0fd1..cc16b2097 100644 --- a/test/unit/php/includes/core/classes/class-test-topic.php +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -70,9 +70,32 @@ public function test_get_localized_taxonomy_slug(): void { $this->assertSame( 'topic', Topic::get_localized_taxonomy_slug(), - 'Failed to assert english taxonomy slug is "topic".' + 'Failed to assert English taxonomy slug is "topic".' ); + $user_id = $this->factory->user->create(); + update_user_meta( $user_id, 'locale', 'es_ES' ); + switch_to_user_locale( $user_id ); + + // @todo This assertion CAN NOT FAIL, + // until real translations do exist in the wp-env instance. + // Because WordPress doesn't have any translation files to load, + // it will return the string in English. + $this->assertSame( + 'topic', + Topic::get_localized_taxonomy_slug(), + 'Failed to assert taxonomy slug is "topic", even the locale is not English anymore.' + ); + // But at least the restoring of the user locale can be tested, without .po files. + $this->assertSame( + 'es_ES', + determine_locale(), + 'Failed to assert locale was reset to Spanish, after switching to ~ and restoring from English.' + ); + + // Restore default locale for following tests. + switch_to_locale( 'en_US' ); + // This also checks that the taxonomy is still registered with the same 'Taxonomy Singular Name' label, // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { diff --git a/test/unit/php/includes/core/classes/class-test-venue.php b/test/unit/php/includes/core/classes/class-test-venue.php index 39590efa4..a3332175f 100644 --- a/test/unit/php/includes/core/classes/class-test-venue.php +++ b/test/unit/php/includes/core/classes/class-test-venue.php @@ -100,9 +100,32 @@ public function test_get_localized_post_type_slug(): void { $this->assertSame( 'venue', Venue::get_localized_post_type_slug(), - 'Failed to assert english post type slug is "venue".' + 'Failed to assert English post type slug is "venue".' ); + $user_id = $this->factory->user->create(); + update_user_meta( $user_id, 'locale', 'es_ES' ); + switch_to_user_locale( $user_id ); + + // @todo This assertion CAN NOT FAIL, + // until real translations do exist in the wp-env instance. + // Because WordPress doesn't have any translation files to load, + // it will return the string in English. + $this->assertSame( + 'venue', + Venue::get_localized_post_type_slug(), + 'Failed to assert post type slug is "venue", even the locale is not English anymore.' + ); + // But at least the restoring of the user locale can be tested, without .po files. + $this->assertSame( + 'es_ES', + determine_locale(), + 'Failed to assert locale was reset to Spanish, after switching to ~ and restoring from English.' + ); + + // Restore default locale for following tests. + switch_to_locale( 'en_US' ); + // This also checks that the post type is still registered with the same 'Post Type Singular Name' label, // which is used by the method under test and the test itself. $filter = static function ( string $translation, string $text, string $context ): string { From d3ce176c669e273bc1958005d066f7148ad2aba8 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 15:51:07 +0200 Subject: [PATCH 117/159] Fix for CS --- .../php/includes/core/classes/class-test-event-setup.php | 8 ++++---- test/unit/php/includes/core/classes/class-test-topic.php | 8 ++++---- test/unit/php/includes/core/classes/class-test-venue.php | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/unit/php/includes/core/classes/class-test-event-setup.php b/test/unit/php/includes/core/classes/class-test-event-setup.php index eb4eb3974..6ef020dfb 100644 --- a/test/unit/php/includes/core/classes/class-test-event-setup.php +++ b/test/unit/php/includes/core/classes/class-test-event-setup.php @@ -128,14 +128,14 @@ public function test_get_localized_post_type_slug(): void { 'Failed to assert English post type slug is "event".' ); - $user_id = $this->factory->user->create(); + $user_id = $this->factory->user->create(); update_user_meta( $user_id, 'locale', 'es_ES' ); switch_to_user_locale( $user_id ); // @todo This assertion CAN NOT FAIL, - // until real translations do exist in the wp-env instance. - // Because WordPress doesn't have any translation files to load, - // it will return the string in English. + // until real translations do exist in the wp-env instance. + // Because WordPress doesn't have any translation files to load, + // it will return the string in English. $this->assertSame( 'event', Event_Setup::get_localized_post_type_slug(), diff --git a/test/unit/php/includes/core/classes/class-test-topic.php b/test/unit/php/includes/core/classes/class-test-topic.php index cc16b2097..37bcb1685 100644 --- a/test/unit/php/includes/core/classes/class-test-topic.php +++ b/test/unit/php/includes/core/classes/class-test-topic.php @@ -73,14 +73,14 @@ public function test_get_localized_taxonomy_slug(): void { 'Failed to assert English taxonomy slug is "topic".' ); - $user_id = $this->factory->user->create(); + $user_id = $this->factory->user->create(); update_user_meta( $user_id, 'locale', 'es_ES' ); switch_to_user_locale( $user_id ); // @todo This assertion CAN NOT FAIL, - // until real translations do exist in the wp-env instance. - // Because WordPress doesn't have any translation files to load, - // it will return the string in English. + // until real translations do exist in the wp-env instance. + // Because WordPress doesn't have any translation files to load, + // it will return the string in English. $this->assertSame( 'topic', Topic::get_localized_taxonomy_slug(), diff --git a/test/unit/php/includes/core/classes/class-test-venue.php b/test/unit/php/includes/core/classes/class-test-venue.php index a3332175f..ef7a9415d 100644 --- a/test/unit/php/includes/core/classes/class-test-venue.php +++ b/test/unit/php/includes/core/classes/class-test-venue.php @@ -103,14 +103,14 @@ public function test_get_localized_post_type_slug(): void { 'Failed to assert English post type slug is "venue".' ); - $user_id = $this->factory->user->create(); + $user_id = $this->factory->user->create(); update_user_meta( $user_id, 'locale', 'es_ES' ); switch_to_user_locale( $user_id ); // @todo This assertion CAN NOT FAIL, - // until real translations do exist in the wp-env instance. - // Because WordPress doesn't have any translation files to load, - // it will return the string in English. + // until real translations do exist in the wp-env instance. + // Because WordPress doesn't have any translation files to load, + // it will return the string in English. $this->assertSame( 'venue', Venue::get_localized_post_type_slug(), From 1c062cca686201f6c8777c59ca2cba6fbbb1efca Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 18:25:11 +0200 Subject: [PATCH 118/159] New test for prepare() method --- .../core/classes/class-test-export.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index 17dd9242a..86125c8a7 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -76,6 +76,52 @@ public function test_export(): void { ); } + /** + * Coverage for prepare. + * + * @covers ::prepare + * + * @return void + */ + public function test_prepare(): void { + $instance = Export::get_instance(); + $post = $this->mock->post()->get(); + + + $this->assertEmpty( + get_post_meta( $post->ID, Export::POST_META, true ), + 'Failed to assert the post meta "gatherpress_extend_export" didn\'t exist yet.' + ); + + // Run method under test with a post. + $instance->prepare( $post ); + + $this->assertEmpty( + get_post_meta( $post->ID, Export::POST_META, true ), + 'Failed to assert the post meta "gatherpress_extend_export" wasn\'t saved for a regular post.' + ); + + $post = $this->mock->post( + array( + 'post_title' => 'Unit Test Event', + 'post_type' => 'gatherpress_event', + 'post_content' => 'Unit Test description.', + ) + )->get(); + + // Run method under test with a gatherpress_event. + $instance->prepare( $post ); + + $this->assertSame( + '1', + get_post_meta( $post->ID, Export::POST_META, true ), + 'Failed to assert the post meta "gatherpress_extend_export" was saved.' + ); + + // Clean up for later tests. + delete_post_meta( $post->ID, Export::POST_META ); + } + /** * Coverage for validate. * From 7492cf6e806eee3bada19741afb53648ffce64ac Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 19:26:18 +0200 Subject: [PATCH 119/159] New test for run() & render() methods --- .../core/classes/class-test-export.php | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/test/unit/php/includes/core/classes/class-test-export.php b/test/unit/php/includes/core/classes/class-test-export.php index 86125c8a7..8b38f9401 100644 --- a/test/unit/php/includes/core/classes/class-test-export.php +++ b/test/unit/php/includes/core/classes/class-test-export.php @@ -87,7 +87,6 @@ public function test_prepare(): void { $instance = Export::get_instance(); $post = $this->mock->post()->get(); - $this->assertEmpty( get_post_meta( $post->ID, Export::POST_META, true ), 'Failed to assert the post meta "gatherpress_extend_export" didn\'t exist yet.' @@ -197,6 +196,51 @@ public function test_extend(): void { ); } + /** + * Coverage for run & render. + * + * @covers ::run + * @covers ::render + * + * @return void + */ + public function test_run_and_render(): void { + + $export = Export::get_instance(); + $post = $this->mock->post( + array( + 'post_title' => 'Unit Test Event', + 'post_type' => 'gatherpress_event', + 'post_content' => 'Unit Test description.', + ) + )->get(); + $event = new Event( $post->ID ); + $params = array( + 'datetime_start' => '2020-05-11 15:00:00', + 'datetime_end' => '2020-05-12 17:00:00', + 'timezone' => 'America/New_York', + ); + $event->save_datetimes( $params ); + + if ( ! function_exists( 'export_wp' ) ) { + require_once ABSPATH . 'wp-admin/includes/export.php'; + } + + $output = Utility::buffer_and_return( 'export_wp', array( array( 'content' => 'gatherpress_event' ) ) ); + + $this->assertStringContainsString( '', $output ); + $this->assertStringContainsString( '', $output ); + + $this->assertStringContainsString( '', $output ); + $this->assertStringContainsString( '', $output ); + + $this->assertStringContainsString( '', $output ); + $this->assertStringContainsString( '', $output ); + + $this->assertStringContainsString( '', $output ); + $this->assertStringContainsString( '', $output ); + } + /** * Coverage for datetime_callback method. * From 25fb97da8c3d8e41a0f14d0465a27641be0b927a Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 23:46:32 +0200 Subject: [PATCH 120/159] Autoload one singleton per block variation --- includes/core/classes/class-autoloader.php | 1 + includes/core/classes/class-block.php | 25 ++++++++++------- .../core/classes/class-test-block.php | 28 ++++++++----------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/includes/core/classes/class-autoloader.php b/includes/core/classes/class-autoloader.php index b1edef7f6..9616f622a 100644 --- a/includes/core/classes/class-autoloader.php +++ b/includes/core/classes/class-autoloader.php @@ -87,6 +87,7 @@ static function ( string $class_string = '' ): void { array_unshift( $structure, 'includes' ); switch ( $class_type ) { + case 'blocks': case 'commands': case 'settings': case 'traits': diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 39439e0bf..fb7bd551f 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -84,9 +84,19 @@ public function register_blocks(): void { */ public function register_block_variations(): void { foreach ( $this->get_block_variations() as $block ) { - $name = $this->get_classname_from_foldername( $block ); - require_once sprintf( '%1$s/build/variations/%2$s/class-%2$s.php', GATHERPRESS_CORE_PATH, $block ); - $name::get_instance(); + // Prepare namespaced class-name + // in the following shape: "GatherPress\Core\Blocks\Block_Variation" (example). + $name = join( + '\\', + array( + __NAMESPACE__, + 'Blocks', + $this->get_classname_from_foldername( $block ), + ) + ); + if ( class_exists( $name ) ) { + $name::get_instance(); + } } } @@ -117,13 +127,8 @@ protected static function get_block_variations(): array { * @return string Class name that reflects the given foldername. */ protected static function get_classname_from_foldername( string $foldername ): string { - return join( - '\\', - array( - __CLASS__, - ucwords( str_replace( '-', '_', $foldername ), '_' ), - ) - ); + $foldername = basename( $foldername ); + return ucwords( str_replace( '-', '_', $foldername ), '_' ); } /** diff --git a/test/unit/php/includes/core/classes/class-test-block.php b/test/unit/php/includes/core/classes/class-test-block.php index c4bed4eff..d90517102 100644 --- a/test/unit/php/includes/core/classes/class-test-block.php +++ b/test/unit/php/includes/core/classes/class-test-block.php @@ -92,22 +92,22 @@ public function test_register_blocks(): void { * @covers ::register_block_variations * * @return void - */ + public function test_register_block_variations(): void { - $block_instance = Utility::get_hidden_static_property( 'GatherPress\Core\Block\Add_To_Calendar', 'instance' ); - // var_export(Utility::has_property('GatherPress\Core\Block\Add_To_Calendar', 'instance') ); + // $block_instance = Utility::get_hidden_static_property( 'GatherPress\Core\Blocks\Add_To_Calendar', 'instance' ); + // // var_export(Utility::has_property('GatherPress\Core\Block\Add_To_Calendar', 'instance') ); - // Assert that it's still null (meaning the singleton is not instantiated). - $this->assertNull( $block_instance, 'Failed to assert, the block-variation singleton should not be instantiated yet.' ); + // // Assert that it's still null (meaning the singleton is not instantiated). + // $this->assertNull( $block_instance, 'Failed to assert, the block-variation singleton should not be instantiated yet.' ); - $instance = Block::get_instance(); - // Register our block variations. - $instance->register_block_variations(); + // $instance = Block::get_instance(); + // // Register our block variations. + // $instance->register_block_variations(); // Assert that it's still null (meaning the singleton is not instantiated). // $this->assertNotNull($block_instance, 'Failed to assert, the block-variation singleton should be instantiated now.'); - } + } */ /** * Coverage for get_block_variations. @@ -121,7 +121,7 @@ public function test_get_block_variations(): void { $this->assertSame( array( - 'add-to-calendar', + // 'add-to-calendar', ), Utility::invoke_hidden_method( $instance, 'get_block_variations' ), 'Failed to assert, to get all block variations from the "/src" directory.' @@ -137,14 +137,10 @@ public function test_get_block_variations(): void { */ public function test_get_classname_from_foldername(): void { $instance = Block::get_instance(); - $this->assertSame( - '', // @todo Handling a string with slashes, like __DIR__. - Utility::invoke_hidden_method( $instance, 'get_classname_from_foldername', array( __DIR__ ) ), - 'Failed to assert, to get class name from foldername.' - ); + $this->assertSame( 'Unit_Test', - Utility::invoke_hidden_method( $instance, 'get_classname_from_foldername', array( 'unit-test' ) ), + Utility::invoke_hidden_method( $instance, 'get_classname_from_foldername', array( '/src/variations/unit-test' ) ), 'Failed to assert, to get class name from foldername.' ); } From 0e0bd98989be336ac8f48ab1dbb296c93553615a Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sat, 5 Oct 2024 23:50:41 +0200 Subject: [PATCH 121/159] Remove example block-variation --- .../add-to-calendar/class-add-to-calendar.php | 56 ------------------- .../add-to-calendar/index.asset.php | 1 - build/variations/add-to-calendar/index.js | 0 .../add-to-calendar/class-add-to-calendar.php | 56 ------------------- src/variations/add-to-calendar/index.js | 0 5 files changed, 113 deletions(-) delete mode 100644 build/variations/add-to-calendar/class-add-to-calendar.php delete mode 100644 build/variations/add-to-calendar/index.asset.php delete mode 100644 build/variations/add-to-calendar/index.js delete mode 100644 src/variations/add-to-calendar/class-add-to-calendar.php delete mode 100644 src/variations/add-to-calendar/index.js diff --git a/build/variations/add-to-calendar/class-add-to-calendar.php b/build/variations/add-to-calendar/class-add-to-calendar.php deleted file mode 100644 index 5f5ed4921..000000000 --- a/build/variations/add-to-calendar/class-add-to-calendar.php +++ /dev/null @@ -1,56 +0,0 @@ -setup_hooks(); - } - - /** - * Set up hooks for various purposes. - * - * This method adds hooks for different purposes as needed. - * - * @since 1.0.0 - * - * @return void - */ - protected function setup_hooks(): void { - $this->register_and_enqueue_assets(); - - // phpcs:disable Squiz.PHP.CommentedOutCode.Found - // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); - // add_action( 'init', array( $this, 'register_blocks_styles' ) ); //. - // phpcs:enable Squiz.PHP.CommentedOutCode.Found - } -} diff --git a/build/variations/add-to-calendar/index.asset.php b/build/variations/add-to-calendar/index.asset.php deleted file mode 100644 index f53453333..000000000 --- a/build/variations/add-to-calendar/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '31d6cfe0d16ae931b73c'); diff --git a/build/variations/add-to-calendar/index.js b/build/variations/add-to-calendar/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/variations/add-to-calendar/class-add-to-calendar.php b/src/variations/add-to-calendar/class-add-to-calendar.php deleted file mode 100644 index 5f5ed4921..000000000 --- a/src/variations/add-to-calendar/class-add-to-calendar.php +++ /dev/null @@ -1,56 +0,0 @@ -setup_hooks(); - } - - /** - * Set up hooks for various purposes. - * - * This method adds hooks for different purposes as needed. - * - * @since 1.0.0 - * - * @return void - */ - protected function setup_hooks(): void { - $this->register_and_enqueue_assets(); - - // phpcs:disable Squiz.PHP.CommentedOutCode.Found - // add_action( 'init', array( $this, 'register_block_bindings_sources' ) ); - // add_action( 'init', array( $this, 'register_blocks_styles' ) ); //. - // phpcs:enable Squiz.PHP.CommentedOutCode.Found - } -} diff --git a/src/variations/add-to-calendar/index.js b/src/variations/add-to-calendar/index.js deleted file mode 100644 index e69de29bb..000000000 From 85c8d42ef96e5aeb075d3ca3614043a0c8ba4df5 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:08:37 +0200 Subject: [PATCH 122/159] npm uninstall copy-webpack-plugin --- package-lock.json | 93 ----------------------------------------------- package.json | 1 - webpack.config.js | 14 ------- 3 files changed, 108 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d1ea72ae..2a25c30c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,6 @@ "@wp-playground/cli": "^0.9.32", "classnames": "^2.5.1", "clsx": "^2.1.1", - "copy-webpack-plugin": "^12.0.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", @@ -4482,18 +4481,6 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -11866,30 +11853,6 @@ "integrity": "sha512-Q4+qBFnN4bwGwvtXXzbp4P/4iNk0MaiGAzvQ8OiMtlLjkIKjmNN689uVzShSM0908q7GoFHXIPx4zi75ocoaHw==", "dev": true }, - "node_modules/copy-webpack-plugin": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz", - "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==", - "dev": true, - "dependencies": { - "fast-glob": "^3.3.2", - "glob-parent": "^6.0.1", - "globby": "^14.0.0", - "normalize-path": "^3.0.0", - "schema-utils": "^4.2.0", - "serialize-javascript": "^6.0.2" - }, - "engines": { - "node": ">= 18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - } - }, "node_modules/core-js": { "version": "3.37.1", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", @@ -15518,50 +15481,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", - "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby/node_modules/path-type": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", - "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby/node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globjoin": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", @@ -27225,18 +27144,6 @@ "node": ">=4" } }, - "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", diff --git a/package.json b/package.json index 6a7a1ab7e..387918f38 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,6 @@ "@wp-playground/cli": "^0.9.32", "classnames": "^2.5.1", "clsx": "^2.1.1", - "copy-webpack-plugin": "^12.0.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.1", diff --git a/webpack.config.js b/webpack.config.js index e33271078..b82a7b9ec 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,6 @@ */ const fs = require('fs'); const path = require('path'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); /** * WordPress Dependencies @@ -27,18 +26,6 @@ function getVariationEntries() { module.exports = { ...defaultConfig, - plugins: [ - ...defaultConfig.plugins, - new CopyWebpackPlugin({ - patterns: [ - { - from: 'variations/**/class-*.php', - to: '[path][name][ext]', - context: 'src', - }, - ], - }), - ], entry: { ...defaultConfig.entry(), admin_style: path.resolve(process.cwd(), 'src', 'admin.scss'), @@ -53,7 +40,6 @@ module.exports = { ), profile: path.resolve(process.cwd(), 'src/profile', 'index.js'), profile_style: path.resolve(process.cwd(), 'src/profile', 'style.scss'), - // 'variations/add-to-calendar/index': path.resolve(process.cwd(), 'src/variations/add-to-calendar', 'index.js'), ...getVariationEntries(), }, module: { From 1506d6e2b0661fa9498e16926fc27cb058253991 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:09:02 +0200 Subject: [PATCH 123/159] Check if folder exists before processing --- includes/core/classes/class-block.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index fb7bd551f..6e791890d 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -107,6 +107,10 @@ public function register_block_variations(): void { */ protected static function get_block_variations(): array { $blocks_directory = sprintf( '%1$s/build/variations/', GATHERPRESS_CORE_PATH ); + if ( ! file_exists( $blocks_directory ) ) { + return array(); + } + $blocks = array_values( array_diff( scandir( $blocks_directory ), From 76c5268ab29f6f439927083e3b4aba0e12326912 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:09:29 +0200 Subject: [PATCH 124/159] BUILD --- build/panels.asset.php | 2 +- build/panels.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/panels.asset.php b/build/panels.asset.php index ebed91ed7..ca2c872bd 100644 --- a/build/panels.asset.php +++ b/build/panels.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c6c09a92287f347e9ae0'); + array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'fb515e0dde267500b94a'); diff --git a/build/panels.js b/build/panels.js index 0f9f51927..87cff82ab 100644 --- a/build/panels.js +++ b/build/panels.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.data,n=window.wp.components,r=window.wp.plugins,a=window.wp.editPost,i=window.moment;var o=e.n(i);const l=window.wp.element;function c(){(0,s.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function u(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const m=window.wp.date,p=window.ReactJSXRuntime,g="YYYY-MM-DD HH:mm:ss",h=o().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),_=(o().tz(h,f()).add(2,"hours").format(g),[{label:(0,t.__)("1 hour","gatherpress"),value:1},{label:(0,t.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,t.__)("2 hours","gatherpress"),value:2},{label:(0,t.__)("3 hours","gatherpress"),value:3},{label:(0,t.__)("Set an end time…","gatherpress"),value:!1}]);function v(e){return o().tz(function(){let e=d("eventDetails.dateTime.datetime_start");return e=""!==e?o().tz(e,f()).format(g):h,u("eventDetails.dateTime.datetime_start",e),e}(),f()).add(e,"hours").format(g)}function x(){return D(d("settings.dateFormat"))+" "+D(d("settings.timeFormat"))}function f(e=d("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function j(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function b(e,t=null,s=null){!function(e,t=null){const s=o().tz(d("eventDetails.dateTime.datetime_end"),f()).valueOf(),n=o().tz(e,f()).valueOf();n>=s&&S(o().tz(n,f()).add(2,"hours").format(g),t)}(e,s),u("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),c()}function S(e,t=null,s=null){!function(e,t=null){const s=o().tz(d("eventDetails.dateTime.datetime_start"),f()).valueOf(),n=o().tz(e,f()).valueOf();n<=s&&b(o().tz(n,f()).subtract(2,"hours").format(g),t)}(e,s),u("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),c()}function D(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map(((e,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}function P(){const e=o().tz(d("eventDetails.dateTime.datetime_end"),f());return"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&o().tz(f()).valueOf()>e.valueOf()}function T(){const e="gatherpress_event_past",n=(0,s.dispatch)("core/notices");n.removeNotice(e),P()&&n.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const w=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);a&&(i=d("settings.enableAnonymousRsvp"));const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_anonymous_rsvp:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{u(e)}})},C=()=>(0,p.jsx)("section",{children:(0,p.jsx)(w,{})}),E=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);a&&(i=d("settings.enableInitialDecline"));const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_initial_decline:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{u(e)}})},y=()=>(0,p.jsx)("section",{children:(0,p.jsx)(E,{})}),k=()=>{const{dateTimeStart:e,duration:r}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:a,setDateTimeEnd:i}=(0,s.useDispatch)("gatherpress/datetime"),c=(0,m.getSettings)(),d=/a(?!\\)/i.test(c.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,l.useEffect)((()=>{a(o().tz(e,f()).format(g)),r&&i(v(r)),T()}),[e,r,a,i]),(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{direction:"column",gap:"1",children:[(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)("h3",{style:{marginBottom:0},children:(0,p.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Date & time start","gatherpress")})})}),(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,p.jsx)(n.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:o().tz(e,f()).format(x())}),renderContent:()=>(0,p.jsx)(n.DateTimePicker,{currentDate:e,onChange:e=>{b(e,a,i)},is12Hour:d})})})]})})},z=()=>{const{dateTimeEnd:e}=(0,s.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:r,setDateTimeStart:a}=(0,s.useDispatch)("gatherpress/datetime"),i=(0,m.getSettings)(),c=/a(?!\\)/i.test(i.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,l.useEffect)((()=>{r(o().tz(e,f()).format(g)),T()})),(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{direction:"column",gap:"1",children:[(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)("h3",{style:{marginBottom:0},children:(0,p.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("Date & time end","gatherpress")})})}),(0,p.jsx)(n.FlexItem,{children:(0,p.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,p.jsx)(n.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:o().tz(e,f()).format(x())}),renderContent:()=>(0,p.jsx)(n.DateTimePicker,{currentDate:e,onChange:e=>S(e,r,a),is12Hour:c})})})]})})},N=()=>{const{timezone:e}=(0,s.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:r}=(0,s.useDispatch)("gatherpress/datetime"),a=d("misc.timezoneChoices");return(0,l.useEffect)((()=>{r(d("eventDetails.dateTime.timezone"))}),[r]),(0,p.jsx)(n.PanelRow,{children:(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:j(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),s+n+r}return e}(e),r(e),c()},__nexthasnomarginbottom:!0,children:Object.keys(a).map((e=>(0,p.jsx)("optgroup",{label:e,children:Object.keys(a[e]).map((t=>(0,p.jsx)("option",{value:t,children:a[e][t]},t)))},e)))})})},O=()=>{const{duration:e}=(0,s.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),r=(0,s.useDispatch)(),{setDateTimeEnd:a,setDuration:i}=r("gatherpress/datetime");return(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Duration","gatherpress"),value:!!_.some((t=>t.value===e))&&e,options:_,onChange:e=>{(e="false"!==e&&parseFloat(e))&&a(v(e)),i(e)},__nexthasnomarginbottom:!0})},A=()=>{const e=(0,s.useDispatch)("core/editor").editPost;let t=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:n,dateTimeEnd:r,duration:a,timezone:i}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:c}=(0,s.useDispatch)("gatherpress/datetime");return(0,l.useEffect)((()=>{const s=JSON.stringify({...t,dateTimeStart:o().tz(n,i).format(g),dateTimeEnd:o().tz(r,i).format(g),timezone:i});e({meta:{gatherpress_datetime:s}})}),[n,r,i,t,e,c,a]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("section",{children:(0,p.jsx)(k,{})}),(0,p.jsx)("section",{children:a?(0,p.jsx)(O,{}):(0,p.jsx)(z,{})}),(0,p.jsx)("section",{children:(0,p.jsx)(N,{})})]})},F=()=>(0,p.jsx)(A,{}),M=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);a&&(i=d("settings.maxGuestLimit")),!1===i&&(i=0);const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_guest_limit:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{u(e)}})},Y=()=>(0,p.jsx)("section",{children:(0,p.jsx)(M,{})}),L=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);a&&(i=d("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_attendance_limit:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{u(e)}}),(0,p.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},R=()=>(0,p.jsx)("section",{children:(0,p.jsx)(L,{})}),I=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:n});dispatchEvent(r)}},$=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}},G=()=>"publish"===(0,s.select)("core/editor").getEditedPostAttribute("status")&&!P()&&(0,p.jsxs)("section",{children:[(0,p.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,p.jsx)(n.Button,{variant:"secondary",onClick:()=>I({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),H=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,l.useState)(a);return $({setOnlineEventLink:o},d("eventDetails.postId")),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),I({setOnlineEventLink:t},d("eventDetails.postId")),r()})(t)}})},B=()=>(0,p.jsx)("section",{children:(0,p.jsx)(H,{})}),J=()=>{const[e,r]=(0,l.useState)(""),[a,i]=(0,l.useState)(""),[o,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(""),[m,g]=(0,l.useState)(!1),[h,_]=(0,l.useState)(""),[v,x]=(0,l.useState)(""),[f,j]=(0,l.useState)(""),b=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:S}=(0,s.useDispatch)("core/editor"),D=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",D))),T=P?.slug.replace(/^_/,""),[w,C]=(0,l.useState)(""),E=D+":"+w,y=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:w})));(0,l.useEffect)((()=>{var e,s,n,a,o,l;let d={};if(w&&Array.isArray(y)){var m;const e=null!==(m=y[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var p;e&&(d=JSON.parse(e),d.name=null!==(p=y[0]?.title.rendered)&&void 0!==p?p:"")}const g=null!==(e=d?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(s=d?.fullAddress)&&void 0!==s?s:"",v=null!==(n=d?.phoneNumber)&&void 0!==n?n:"",f=null!==(a=d?.website)&&void 0!==a?a:"",b=null!==(o=d?.latitude)&&void 0!==o?o:"0",S=null!==(l=d?.longitude)&&void 0!==l?l:"0";T&&C(T),j(E?String(E):""),r(g),i(h),c(v),u(f),_(b),x(S),I({setName:g,setFullAddress:h,setPhoneNumber:v,setWebsite:f,setLatitude:b,setLongitude:S,setIsOnlineEventTerm:"online-event"===w})}),[w,y,T,E]);let k=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return k?(k=k.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),k.unshift({value:":",label:(0,t.__)("Choose a venue","gatherpress")})):k=[],(0,p.jsx)(n.PanelRow,{children:(0,p.jsx)(n.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:f,onChange:e=>{(e=>{j(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];b({_gatherpress_venue:t}),C(e[1]),S()})(e)},options:k})})},W=()=>(0,p.jsx)("section",{children:(0,p.jsx)(J,{})});(0,r.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,p.jsx)(a.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),initialOpen:!0,className:"gatherpress-event-settings",children:(0,p.jsxs)(n.__experimentalVStack,{spacing:4,children:[(0,p.jsx)(F,{}),(0,p.jsx)(W,{}),(0,p.jsx)(B,{}),(0,p.jsx)(Y,{}),(0,p.jsx)(R,{}),(0,p.jsx)(C,{}),(0,p.jsx)(y,{}),(0,p.jsx)(G,{})]})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings");const V=window.wp.compose,U=()=>{var e,r,a;const i=(0,s.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...c,...e});i({meta:{gatherpress_venue_information:t}})};let c=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));c=c?JSON.parse(c):{};const[d,u]=(0,l.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[m,g]=(0,l.useState)(null!==(r=c.phoneNumber)&&void 0!==r?r:""),[h,_]=(0,l.useState)(null!==(a=c.website)&&void 0!==a?a:"");$({setFullAddress:u,setPhoneNumber:g,setWebsite:_});const v=(0,l.useRef)(o),x=(0,l.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${d}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:s})}))}),[d]),f=(0,V.useDebounce)(x,300);return(0,l.useEffect)((()=>{v.current=o}),[o]),(0,l.useEffect)((()=>{f()}),[d,f]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:d,onChange:e=>{I({setFullAddress:e}),o({fullAddress:e})}}),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:m,onChange:e=>{I({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,p.jsx)(n.TextControl,{label:(0,t.__)("Website","gatherpress"),value:h,type:"url",onChange:e=>{I({setWebsite:e}),o({website:e})}})]})},X=()=>(0,p.jsx)("section",{children:(0,p.jsx)(U,{})});(0,r.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,p.jsx)(a.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gatherpress-venue-settings",children:(0,p.jsx)(n.__experimentalVStack,{spacing:6,children:(0,p.jsx)(X,{})})})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.data,n=window.wp.components,r=window.wp.plugins,a=window.wp.editor,i=window.moment;var o=e.n(i);const l=window.wp.element;function c(){(0,s.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function u(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const m=window.wp.date,g=window.ReactJSXRuntime,p="YYYY-MM-DD HH:mm:ss",h=o().tz(j()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(p),_=(o().tz(h,j()).add(2,"hours").format(p),[{label:(0,t.__)("1 hour","gatherpress"),value:1},{label:(0,t.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,t.__)("2 hours","gatherpress"),value:2},{label:(0,t.__)("3 hours","gatherpress"),value:3},{label:(0,t.__)("Set an end time…","gatherpress"),value:!1}]);function x(e){return o().tz(function(){let e=d("eventDetails.dateTime.datetime_start");return e=""!==e?o().tz(e,j()).format(p):h,u("eventDetails.dateTime.datetime_start",e),e}(),j()).add(e,"hours").format(p)}function v(){return D(d("settings.dateFormat"))+" "+D(d("settings.timeFormat"))}function j(e=d("eventDetails.dateTime.timezone")){return o().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function f(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function S(e,t=null,s=null){!function(e,t=null){const s=o().tz(d("eventDetails.dateTime.datetime_end"),j()).valueOf(),n=o().tz(e,j()).valueOf();n>=s&&b(o().tz(n,j()).add(2,"hours").format(p),t)}(e,s),u("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),c()}function b(e,t=null,s=null){!function(e,t=null){const s=o().tz(d("eventDetails.dateTime.datetime_start"),j()).valueOf(),n=o().tz(e,j()).valueOf();n<=s&&S(o().tz(n,j()).subtract(2,"hours").format(p),t)}(e,s),u("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),c()}function D(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map(((e,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}function P(){const e=o().tz(d("eventDetails.dateTime.datetime_end"),j());return"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&o().tz(j()).valueOf()>e.valueOf()}function w(){const e="gatherpress_event_past",n=(0,s.dispatch)("core/notices");n.removeNotice(e),P()&&n.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const T=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);a&&(i=d("settings.enableAnonymousRsvp"));const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_anonymous_rsvp:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,g.jsx)(n.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{u(e)}})},C=()=>(0,g.jsx)("section",{children:(0,g.jsx)(T,{})}),E=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);a&&(i=d("settings.enableInitialDecline"));const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_enable_initial_decline:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,g.jsx)(n.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{u(e)}})},N=()=>(0,g.jsx)("section",{children:(0,g.jsx)(E,{})}),y=()=>{const{dateTimeStart:e,duration:r}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:a,setDateTimeEnd:i}=(0,s.useDispatch)("gatherpress/datetime"),c=(0,m.getSettings)(),d=/a(?!\\)/i.test(c.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,l.useEffect)((()=>{a(o().tz(e,j()).format(p)),r&&i(x(r)),w()}),[e,r,a,i]),(0,g.jsx)(n.PanelRow,{children:(0,g.jsxs)(n.Flex,{direction:"column",gap:"1",children:[(0,g.jsx)(n.FlexItem,{children:(0,g.jsx)("h3",{style:{marginBottom:0},children:(0,g.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Date & time start","gatherpress")})})}),(0,g.jsx)(n.FlexItem,{children:(0,g.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,g.jsx)(n.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:o().tz(e,j()).format(v())}),renderContent:()=>(0,g.jsx)(n.DateTimePicker,{currentDate:e,onChange:e=>{S(e,a,i)},is12Hour:d})})})]})})},k=()=>{const{dateTimeEnd:e}=(0,s.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:r,setDateTimeStart:a}=(0,s.useDispatch)("gatherpress/datetime"),i=(0,m.getSettings)(),c=/a(?!\\)/i.test(i.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,l.useEffect)((()=>{r(o().tz(e,j()).format(p)),w()})),(0,g.jsx)(n.PanelRow,{children:(0,g.jsxs)(n.Flex,{direction:"column",gap:"1",children:[(0,g.jsx)(n.FlexItem,{children:(0,g.jsx)("h3",{style:{marginBottom:0},children:(0,g.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("Date & time end","gatherpress")})})}),(0,g.jsx)(n.FlexItem,{children:(0,g.jsx)(n.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,g.jsx)(n.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:o().tz(e,j()).format(v())}),renderContent:()=>(0,g.jsx)(n.DateTimePicker,{currentDate:e,onChange:e=>b(e,r,a),is12Hour:c})})})]})})},z=()=>{const{timezone:e}=(0,s.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:r}=(0,s.useDispatch)("gatherpress/datetime"),a=d("misc.timezoneChoices");return(0,l.useEffect)((()=>{r(d("eventDetails.dateTime.timezone"))}),[r]),(0,g.jsx)(n.PanelRow,{children:(0,g.jsx)(n.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:f(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),s+n+r}return e}(e),r(e),c()},__nexthasnomarginbottom:!0,children:Object.keys(a).map((e=>(0,g.jsx)("optgroup",{label:e,children:Object.keys(a[e]).map((t=>(0,g.jsx)("option",{value:t,children:a[e][t]},t)))},e)))})})},O=()=>{const{duration:e}=(0,s.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),r=(0,s.useDispatch)(),{setDateTimeEnd:a,setDuration:i}=r("gatherpress/datetime");return(0,g.jsx)(n.SelectControl,{label:(0,t.__)("Duration","gatherpress"),value:!!_.some((t=>t.value===e))&&e,options:_,onChange:e=>{(e="false"!==e&&parseFloat(e))&&a(x(e)),i(e)},__nexthasnomarginbottom:!0})},A=()=>{const e=(0,s.useDispatch)("core/editor").editPost;let t=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:n,dateTimeEnd:r,duration:a,timezone:i}=(0,s.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:c}=(0,s.useDispatch)("gatherpress/datetime");return(0,l.useEffect)((()=>{const s=JSON.stringify({...t,dateTimeStart:o().tz(n,i).format(p),dateTimeEnd:o().tz(r,i).format(p),timezone:i});e({meta:{gatherpress_datetime:s}})}),[n,r,i,t,e,c,a]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("section",{children:(0,g.jsx)(y,{})}),(0,g.jsx)("section",{children:a?(0,g.jsx)(O,{}):(0,g.jsx)(k,{})}),(0,g.jsx)("section",{children:(0,g.jsx)(z,{})})]})},F=()=>(0,g.jsx)(A,{}),M=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);a&&(i=d("settings.maxGuestLimit")),!1===i&&(i=0);const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_guest_limit:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,g.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{u(e)}})},Y=()=>(0,g.jsx)("section",{children:(0,g.jsx)(M,{})}),R=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);a&&(i=d("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,c]=(0,l.useState)(i),u=(0,l.useCallback)((t=>{const s={gatherpress_max_attendance_limit:Number(t)};c(t),e({meta:s}),r()}),[e,r]);return(0,l.useEffect)((()=>{a&&0!==i&&u(i)}),[a,i,u]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{u(e)}}),(0,g.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},L=()=>(0,g.jsx)("section",{children:(0,g.jsx)(R,{})}),I=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:n});dispatchEvent(r)}},$=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}},G=()=>"publish"===(0,s.select)("core/editor").getEditedPostAttribute("status")&&!P()&&(0,g.jsxs)("section",{children:[(0,g.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,g.jsx)(n.Button,{variant:"secondary",onClick:()=>I({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),H=()=>{const{editPost:e,unlockPostSaving:r}=(0,s.useDispatch)("core/editor"),a=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,l.useState)(a);return $({setOnlineEventLink:o},d("eventDetails.postId")),(0,g.jsx)(n.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),I({setOnlineEventLink:t},d("eventDetails.postId")),r()})(t)}})},B=()=>(0,g.jsx)("section",{children:(0,g.jsx)(H,{})}),J=()=>{const[e,r]=(0,l.useState)(""),[a,i]=(0,l.useState)(""),[o,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(""),[m,p]=(0,l.useState)(!1),[h,_]=(0,l.useState)(""),[x,v]=(0,l.useState)(""),[j,f]=(0,l.useState)(""),S=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:b}=(0,s.useDispatch)("core/editor"),D=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",D))),w=P?.slug.replace(/^_/,""),[T,C]=(0,l.useState)(""),E=D+":"+T,N=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:T})));(0,l.useEffect)((()=>{var e,s,n,a,o,l;let d={};if(T&&Array.isArray(N)){var m;const e=null!==(m=N[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var g;e&&(d=JSON.parse(e),d.name=null!==(g=N[0]?.title.rendered)&&void 0!==g?g:"")}const p=null!==(e=d?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(s=d?.fullAddress)&&void 0!==s?s:"",x=null!==(n=d?.phoneNumber)&&void 0!==n?n:"",j=null!==(a=d?.website)&&void 0!==a?a:"",S=null!==(o=d?.latitude)&&void 0!==o?o:"0",b=null!==(l=d?.longitude)&&void 0!==l?l:"0";w&&C(w),f(E?String(E):""),r(p),i(h),c(x),u(j),_(S),v(b),I({setName:p,setFullAddress:h,setPhoneNumber:x,setWebsite:j,setLatitude:S,setLongitude:b,setIsOnlineEventTerm:"online-event"===T})}),[T,N,w,E]);let y=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return y?(y=y.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),y.unshift({value:":",label:(0,t.__)("Choose a venue","gatherpress")})):y=[],(0,g.jsx)(n.PanelRow,{children:(0,g.jsx)(n.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:j,onChange:e=>{(e=>{f(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];S({_gatherpress_venue:t}),C(e[1]),b()})(e)},options:y})})},V=()=>(0,g.jsx)("section",{children:(0,g.jsx)(J,{})}),{Fill:W,Slot:U}=(0,n.createSlotFill)("EventPluginDocumentSettings"),X=({children:e,className:t})=>(0,g.jsx)(W,{children:(0,g.jsx)(n.PanelRow,{className:t,children:e})});X.Slot=U,(0,r.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,g.jsxs)(a.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),initialOpen:!0,className:"gatherpress-event-settings",children:[(0,g.jsx)(X.Slot,{}),(0,g.jsxs)(n.__experimentalVStack,{spacing:4,children:[(0,g.jsx)(F,{}),(0,g.jsx)(V,{}),(0,g.jsx)(B,{}),(0,g.jsx)(Y,{}),(0,g.jsx)(L,{}),(0,g.jsx)(C,{}),(0,g.jsx)(N,{}),(0,g.jsx)(G,{})]})]})}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings");const Z=window.wp.compose,q=()=>{var e,r,a;const i=(0,s.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...c,...e});i({meta:{gatherpress_venue_information:t}})};let c=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));c=c?JSON.parse(c):{};const[d,u]=(0,l.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[m,p]=(0,l.useState)(null!==(r=c.phoneNumber)&&void 0!==r?r:""),[h,_]=(0,l.useState)(null!==(a=c.website)&&void 0!==a?a:"");$({setFullAddress:u,setPhoneNumber:p,setWebsite:_});const x=(0,l.useRef)(o),v=(0,l.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${d}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ +(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),x.current({latitude:e,longitude:s})}))}),[d]),j=(0,Z.useDebounce)(v,300);return(0,l.useEffect)((()=>{x.current=o}),[o]),(0,l.useEffect)((()=>{j()}),[d,j]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:d,onChange:e=>{I({setFullAddress:e}),o({fullAddress:e})}}),(0,g.jsx)(n.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:m,onChange:e=>{I({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,g.jsx)(n.TextControl,{label:(0,t.__)("Website","gatherpress"),value:h,type:"url",onChange:e=>{I({setWebsite:e}),o({website:e})}})]})},K=()=>(0,g.jsx)("section",{children:(0,g.jsx)(q,{})}),{Fill:Q,Slot:ee}=(0,n.createSlotFill)("VenuePluginDocumentSettings"),te=({children:e,className:t})=>(0,g.jsx)(Q,{children:(0,g.jsx)(n.PanelRow,{className:t,children:e})});te.Slot=ee,(0,r.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()&&(0,g.jsxs)(a.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gatherpress-venue-settings",children:[(0,g.jsx)(te.Slot,{}),(0,g.jsx)(n.__experimentalVStack,{spacing:6,children:(0,g.jsx)(K,{})})]})}),(0,r.registerPlugin)("gatherpress-venue-settings-at-events",{render:function(){return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(n.Fill,{name:"EventPluginDocumentSettings",children:(0,g.jsx)(te.Slot,{})})})}}),(0,s.dispatch)("core/edit-post").toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")})(); \ No newline at end of file From 8a8b92c9bf6b465c957ece3ace96e74f80d39e2c Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:15:29 +0200 Subject: [PATCH 125/159] Fix for CS --- includes/core/classes/class-block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/classes/class-block.php b/includes/core/classes/class-block.php index 6e791890d..26a980686 100644 --- a/includes/core/classes/class-block.php +++ b/includes/core/classes/class-block.php @@ -111,7 +111,7 @@ protected static function get_block_variations(): array { return array(); } - $blocks = array_values( + $blocks = array_values( array_diff( scandir( $blocks_directory ), array( '..', '.' ) From 1c60c653d1e4a304ec33e4b9e603fdaf79ddeae3 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:18:39 +0200 Subject: [PATCH 126/159] Make sure to keep this folder (to avoid errors until the first block-var arrives) --- src/variations/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/variations/.keep diff --git a/src/variations/.keep b/src/variations/.keep new file mode 100644 index 000000000..e69de29bb From 2d62c2731de28bdd3246067662b418e8ec350206 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:30:08 +0200 Subject: [PATCH 127/159] Fix error due to non-existing variations folder --- src/variations/.keep | 0 webpack.config.js | 4 ++++ 2 files changed, 4 insertions(+) delete mode 100644 src/variations/.keep diff --git a/src/variations/.keep b/src/variations/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/webpack.config.js b/webpack.config.js index b82a7b9ec..d79975195 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,6 +13,10 @@ function getVariationEntries() { const variationsDir = path.resolve(process.cwd(), 'src', 'variations'); const entries = {}; + if ( ! fs.existsSync(variationsDir) ) { + return entries; + } + const variationDirs = fs.readdirSync(variationsDir); for (const variation of variationDirs) { const variationPath = path.join(variationsDir, variation); From d50c6361d1b3e5de809239e78235065bef4faa2e Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:33:08 +0200 Subject: [PATCH 128/159] Fix for CS --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index d79975195..a736f4783 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,7 +13,7 @@ function getVariationEntries() { const variationsDir = path.resolve(process.cwd(), 'src', 'variations'); const entries = {}; - if ( ! fs.existsSync(variationsDir) ) { + if (!fs.existsSync(variationsDir)) { return entries; } From e4a54d1b74240103735ea77818d038f41fe82110 Mon Sep 17 00:00:00 2001 From: Carsten Bach Date: Sun, 6 Oct 2024 00:36:36 +0200 Subject: [PATCH 129/159] Ignore phpstan-error until first block-variation is in place. --- phpstan.neon.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 39eaf25ad..ff8bbd0b1 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -27,3 +27,5 @@ parameters: # # A dev-only error, which can occur if the gatherpress is symlinked into a WP instance or called via wp-env or Playground. - '#^Path in require_once\(\) "\./wp-admin/includes/upgrade\.php" is not a file or it does not exist\.$#' + # Ignore until first block-variation is in place. + - '#^Trait GatherPress\\Core\\Traits\\Block_Variation is used zero times and is not analysed\.$#' From 417d25a7c6652732f41569d5da2d90812d46e865 Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Thu, 10 Oct 2024 11:43:14 -0400 Subject: [PATCH 130/159] Prepping next version 0.32.0. --- .nvmrc | 2 +- build/images/layers-2x.8f2c4d11.png | Bin 0 -> 1259 bytes build/images/layers.416d9136.png | Bin 0 -> 696 bytes build/images/marker-icon-2x.680f69f3.png | Bin 0 -> 2464 bytes build/images/marker-icon.2b3e1faf.png | Bin 0 -> 1466 bytes build/images/marker-shadow.a0c6cc14.png | Bin 0 -> 618 bytes package-lock.json | 47 ++++------------- package.json | 5 +- webpack.config.js | 63 +++++++++++------------ 9 files changed, 45 insertions(+), 72 deletions(-) create mode 100644 build/images/layers-2x.8f2c4d11.png create mode 100644 build/images/layers.416d9136.png create mode 100644 build/images/marker-icon-2x.680f69f3.png create mode 100644 build/images/marker-icon.2b3e1faf.png create mode 100644 build/images/marker-shadow.a0c6cc14.png diff --git a/.nvmrc b/.nvmrc index 80a9956e1..67e145bf0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.16.0 +v20.18.0 diff --git a/build/images/layers-2x.8f2c4d11.png b/build/images/layers-2x.8f2c4d11.png new file mode 100644 index 0000000000000000000000000000000000000000..200c333dca9652ac4cba004d609e5af4eee168c1 GIT binary patch literal 1259 zcmVFhCYNy;#0irRPomHqW|G1C*;4?@4#E?jH>?v@U%cy?3dQAc-DchXVErpOh~ z-jbon+tNbnl6hoEb;)TVk+%hTDDi_G%i3*RZ&15!$Fjr^f;Ke&A@|?=`2&+{zr+3a z{D*=t(`AXyS%X7N z%a#RZw6vD^t_rnM`L4E>m=U&R!A-&}nZIi$BOPvkhrCuUe@BN~-lRD)f44;J%TwgE zcze8u!PQ_NR7?o(NylLXVTfDO zxs5=@|GsYEsNo4M#nT%N!UE(?dnS)t2+{ELYAFp*3=iF=|EQnTp`#vlSXuGVraYo? z+RCzXo6h3qA8{KG?S4nE(lM+;Eb4nT3XV;7gcAxUi5m)`k5tv}cPy()8ZR3TLW3I- zAS^}cq-IJvL7a4RgR!yk@~RT%$lA7{L5ES*hyx)M4(yxI$Ub(4f)K|^v1>zvwQY!_ zIrWw8q9GS^!Dp~}+?mbnB6jDF8mVlbQ!jFKDY;w=7;XO{9bq7>LXGK24WA`;rL)_Z z)&j}pbV(;6gY;VMhbxgvn`X;6x}VUEE-7 z%)7j-%t8S=ZL3yc)HbXDAqJZvBTPoiW_A-+a8m3_Z?v{DN7Tnr#O_VUMT0UBt$;p` zDh6JbGHN8JJ*JN%y2%msb97@_S>9!%Egwk;?PEkU9ntz&3uR}%Fj5d$JHQbQb3}a{ zSzFT^#n=VInPpcAS}CNxj?_ zVscANk5Cfz(51EI1pz};AWWb|kgbYNb4wCEGUn3+eMUMV?1-{=I4TlmLJMot@rd07 zZuo2hk1ccu{YmGkcYdWAVdk{Z4Nm?^cTD&}jGm+Q1SYIXMwmG*oO*83&#>l%nbR`G zhh=lZ%xIb7kU3#;TBbfECrnC9P=-XpL|TG2BoZdj61*XiFbW8?1Z_wp%#;>${SUIy V$8qr;L*)Pf002ovPDHLkV1hYLS~36t literal 0 HcmV?d00001 diff --git a/build/images/layers.416d9136.png b/build/images/layers.416d9136.png new file mode 100644 index 0000000000000000000000000000000000000000..1a72e5784b2b456eac5d7670738db80697af3377 GIT binary patch literal 696 zcmV;p0!RIcP)*@&l2<6p=!C&s@#ZL+%BQvF&b?w6S%wp=I>1QHj7AP5C)IWy#b znXXB;g;j=$a-tW89K%FbDceHVq&unY*Wx3L#=EGWH=rjqnp|4c_Ulec!ql3#G-5ZF zVlbBA@XP=)C8U&+Lrc)S4O5%1$&{(;7R^K(CSnvSr$v;+B$8q&7Bf|h$#PARo1^%M zf1H^nG-EiXVXr07OH(*8R)xa|FD;lXUlg_-%)~ZGsL2cX0NXaAzN2q%jqLRR6ruVk8`Jb7n#{`T;o@`F= z#3YcynIR^s83UNF3D!f5m#Mg)NJ24&Qfrqb&_z=yF;=B)#9Iq7u-@^O!(mW{D;qvr zPc)gVb%aowtS8m@ElL4A9G>w#ffQ~q{i&_i)*6f^)Sz|C?C>zb4Uo?H<-&Hz@a?J; z$ml@zGygWofb9$ZBj6aLjpLhsT2AzjOu=-*u_gSCUYnU^5s62$4H-fe}gSR(=wKRaTHh!@*b)YV6mo|a4Fn6Rgc&Rpk zvn_X|3VY?v=>nJ{slE^V1GaGWk}m@aIWGIpghbfPh8m@aIWEo_%AZI>==moIFVE^L=C zZJ91?mo03UEp3-BY?wBGur6$uD{Yr9Y?m%SHF8Fk1pc(Nva%QJ+{FLkalfypz3&M|||Fn`7|g3c~4(nXHKFmRnwn$J#_$xE8i z|Ns9!kC;(oC1qQk>LMp3_a2(odYyMT@>voX=UI)k>1cJdn;gjmJ-|6v4nb1Oryh)eQMwHP(i@!36%vGJyFK(JTj?Vb{{C=jx&)@1l zlFmnw%0`&bqruifkkHKC=vbiAM3&E`#Mv>2%tw;VK8?_|&E89cs{a1}$J*!f_xd-C z&F%B|oxRgPlh0F!txkxrQjNA`m9~?&&|jw4W0<`_iNHsX$VQXVK!B}Xkh4>av|f_8 zLY2?t?ejE=%(TnfV5iqOjm?d;&qI~ZGl|SzU77a)002XDQchC<95+*MjE@82?VLm= z3xf6%Vd@99z|q|-ua5l3kJxvZwan-8K1cPiwQAtlcNX~ZqLeoMB+a;7)WA|O#HOB% zg6SX;754xD1{Fy}K~#8Ntklac&zTpadXZ& zC*_=T&g7hfbI$R?v%9?sknIb97gJOJ=`-8YyS3ndqN+Jm+x33!p&Hc@@L$w))s2@N ztv~i}Emc?DykgwFWwma($8+~b>l?tqj$dh13R^nMZnva9 zn0Vflzv2Dvp`oVQw{Guby~i`JGbyBGTEC{y>yzCkg>K&CIeQ$u;lyQ+M{O~gEJ^)Z zrF3p)^>|uT;57}WY&IRwyOQ=dq%Az}_t=_hKowP!Z79q0;@Zu(SWEJJcHY+5T6I({ zw)wj*SNi4wrd+POUfZe4gF77vW?j zoFS}|r2n&$U9Y!S4VEOyN}OpZZi|?cr1VcE_tHsDQgp-ga(SwkBrkCm{|*-yb=}ZW zvcYvLvfA90TPn|!-TuYJV<6`}+RJeRgP3EA=qQcF9k0*#*{f&I_pjam%I6Dd#YE|G zqB!R}tW-K!wV1w+4JcFA_s6~=@9F&j8`u$-ifLN3vK;`lvaA-`jRn_}(8|)!3?-}I zvFi{H;@A$gEZYh?%|Qr_y#*UkOPjwiRCsJQ>mb6h5yGIk6C5_XA=8T?IBfm_?+P0; zhhUs)-(0R*H<&Kku(1>#cGtOpk&Z&kQcw&SJv-4VY<+;=8hYnoX zfNJMCa9)^5Z0;2dCUk;x-%#yS!I~Jr3pNuI!g_tHz!$hKwt1GL~sFvx)3u4TA zv>CLGdQtoZ7Du7ctJRfTqY;FPxs1G{ZJ?73D5J@OO{6BHcPbk{_mjg&p2QFeke%QI zlAJ-kvjuwy1<5D-6>su68A+i998aSZNnQX)+Q}6(GK-C%8G-!1bOJBONU{gT%IOOE z;Yk24YC@^lFW77>r6x7eS1Omc;8=GUp#&zLQ&L{ zv8$hGC`wp~$9pR>f%-_Ps3>YhzP(+vC(E*zr1CVO8ChN^MI-VGMX7+|(r!SGZ9gd5 zzO9sQd>sm|f1|X&oh=8lOzd6+ITvo zCXInR?>RZ#>Hb*PO=7dI!dZ(wY4O}ZGv zdfQFio7+0~PN*RFCZGM6@9-o~y*@?;k00NvOsw54t1^tt{*ATMs^2j}4Wp=4t3RH* z_+8b`F-{E=0sOgM<;VHTo!Ij3u zmmI`2?K7g(GOcGA)@h?$SW&pwHdtj1n57PLI8&6RHhx4R%Q7b z^JEqR)@06V!pbS*@D_ZyRMo_LlT}r{#sXOx4kM-V<_V{!5SSuM^SIVCA37|nY7LWQ zZA#B1h4l`6asz=Lvax_#GMRX|NF>=$=p{Qn0i@ExX1jGhy@B8a*_uR+ODEbVi8ObL zezG?azy>E~S~dl43&8<$(2H}P&*tuBdESUP83KQ?8B z?K(!uS>H1wlWQz;qOfB`T#TZ=EoSp~vZ5XtCvwm1h*Ex6mzTsn_y@_=xREIslV-%- zpdWkEzMjeNOGWrSM32gpBt27*O29NdhGzuDgYxcf`Jjjqw@B;Vmdb@fxdhCRi`Kg> zmUTr$=&@#i!%F4Q6mb&4QKfR^95KJ!<6~fqx-f^66AV!|ywG{6D^Vay-3b99>XOe# e-I|>x8~*?ZhF3snGbtJX0000cOl4 literal 0 HcmV?d00001 diff --git a/build/images/marker-icon.2b3e1faf.png b/build/images/marker-icon.2b3e1faf.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 GIT binary patch literal 1466 zcmV;r1x5OaP)P001cn1^@s6z>|W`000GnNklGNuHDcIX17Zdjl&3`L?0sTjIws<{((Dh&g-s0<@jYQyl?D*X^?%13;ml^gy> ziMrY_^1WI=(g@LMizu=zCoA>C`6|QEq1eV92k*7m>G65*&@&6)aC&e}G zI)pf-Za|N`DT&Cn1J|o`19mumxW~hiKiKyc-P`S@q)rdTo84@QI@;0yXrG%9uhI>A zG5QHb6s4=<6xy{1 z@NMxEkryp{LS44%z$3lP^cX!9+2-;CTt3wM4(k*#C{aiIiLuB>jJj;KPhPzIC00bL zU3a#;aJld94lCW=`4&aAy8M7PY=HQ>O%$YEP4c4UY#CRxfgbE~(|uiI=YS8q;O9y6 zmIkXzR`}p7ti|PrM3a}WMnR=3NVnWdAAR>b9X@)DKL6=YsvmH%?I24wdq?Gh54_;# z$?_LvgjEdspdQlft#4CQ z`2Zyvy?*)N1Ftw|{_hakhG9WjS?Az@I@+IZ8JbWewR!XUK4&6346+d#~gsE0SY(LX8&JfY>Aj)RxGy96nwhs2rv zzW6pTnMpFkDSkT*a*6Dx|u@ds6ISVn0@^RmIsKZ5Y;bazbc;tTSq(kg(=481ODrPyNB6n z-$+U}(w$m6U6H$w17Bw+wDaFIe~GvNMYvnw31MpY0eQKT9l>SU``8k7w4)z!GZKMI z#_cEKq7k~i%nlK@6c-K?+R;B#5$?T#YpKD`t_4bAs^#E+@5QW$@OX3*`;(#{U^d-vY)&xEE>n5lYl&T?Amke9$Lam@{1K@O ze*LXqlKQHiv=gx+V^Cbb2?z@ISBQ*3amF;9UJ3SBg(N|710TLamQmYZ&Qjn2LuO<* zCZlB4n%@pc&7NNnY1}x+NWpHlq`OJEo|`aYN9<`RBUB+79g;>dgb6YlfN#kGL?lO_ z!6~M^7sOnbsUkKk<@Ysie&`G>ruxH&Mgy&8;i=A zB9OO!xR{AyODw>DS-q5YM{0ExFEAzt zm>RdS+ssW(-8|?xr0(?$vBVB*%(xDLtq3Hf0I5yFm<_g=W2`QWAax{1rWVH=I!VrP zs(rTFX@W#t$hXNvbgX`gK&^w_YD;CQ!B@e0QbLIWaKAXQe2-kkloo;{iF#6}z!4=W zi$giRj1{ zt;2w`VSCF#WE&*ev7jpsC=6175@(~nTE2;7M-L((0bH@yG}-TB$R~WXd?tA$s3|%y zA`9$sA(>F%J3ioz<-LJl*^o1|w84l>HBR`>3l9c8$5Xr@xCiIQ7{x$fMCzOk_-M=% z+{a_Q#;42`#KfUte@$NT77uaTz?b-fBe)1s5XE$yA79fm?KqM^VgLXD07*qoM6N<$ Ef<_J(9smFU literal 0 HcmV?d00001 diff --git a/package-lock.json b/package-lock.json index 58d10e518..611946a95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@wordpress/element": "^6.4.0", "@wordpress/env": "^10.5.0", "@wordpress/eslint-plugin": "^20.1.0", + "@wordpress/interactivity": "^6.9.0", "@wordpress/notices": "^5.4.0", "@wordpress/plugins": "^7.4.0", "@wordpress/scripts": "^28.4.0", @@ -3777,9 +3778,9 @@ } }, "node_modules/@preact/signals-core": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.7.0.tgz", - "integrity": "sha512-bEZLgmJGSBVP5PUPDowhPW3bVdMmp9Tr5OEl+SQK+8Tv9T7UsIfyN905cfkmmeqw8z4xp8T6zrl4M1uj9+HAfg==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@preact/signals-core/-/signals-core-1.8.0.tgz", + "integrity": "sha512-OBvUsRZqNmjzCZXWLxkZfhcgT+Fk8DDcT/8vD6a1xhDemodyy87UJRJfASMuSD8FaAIeGgGm85ydXhm7lr4fyA==", "dev": true, "license": "MIT", "funding": { @@ -8209,14 +8210,13 @@ } }, "node_modules/@wordpress/interactivity": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-6.4.0.tgz", - "integrity": "sha512-TCKGf3qt7nvK4E18LZQkZ7C/bHS2UhMM0RizExPZuZlo2rSqm7VHvsLl/1yumDOt7ZOP8I/5ZX8WjDIx5nyGpg==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@wordpress/interactivity/-/interactivity-6.9.0.tgz", + "integrity": "sha512-8L+Tanr04FtJ8wGU9ykaasuU7h+9bOo6xwRscRUW4N5lia/CUSXJgJUWuaLeNLyeWFbarzhCNsj3UzRa5lbsJA==", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { "@preact/signals": "^1.2.2", - "deepsignal": "^1.4.0", "preact": "^10.19.3" }, "engines": { @@ -12557,33 +12557,6 @@ "node": ">=0.10.0" } }, - "node_modules/deepsignal": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/deepsignal/-/deepsignal-1.5.0.tgz", - "integrity": "sha512-bFywDpBUUWMs576H2dgLFLLFuQ/UWXbzHfKD98MZTfGsl7+twIzvz4ihCNrRrZ/Emz3kqJaNIAp5eBWUEWhnAw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@preact/signals": "^1.1.4", - "@preact/signals-core": "^1.5.1", - "@preact/signals-react": "^1.3.8 || ^2.0.0", - "preact": "^10.16.0" - }, - "peerDependenciesMeta": { - "@preact/signals": { - "optional": true - }, - "@preact/signals-core": { - "optional": true - }, - "@preact/signals-react": { - "optional": true - }, - "preact": { - "optional": true - } - } - }, "node_modules/default-gateway": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", @@ -22923,9 +22896,9 @@ "license": "MIT" }, "node_modules/preact": { - "version": "10.23.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.23.1.tgz", - "integrity": "sha512-O5UdRsNh4vdZaTieWe3XOgSpdMAmkIYBCT3VhQDlKrzyCm8lUYsk0fmVEvoQQifoOjFRTaHZO69ylrzTW2BH+A==", + "version": "10.24.2", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.2.tgz", + "integrity": "sha512-1cSoF0aCC8uaARATfrlz4VCBqE8LwZwRfLgkxJOQwAlQt6ayTmi0D9OF7nXid1POI5SZidFuG9CnlXbDfLqY/Q==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index f73e9fec8..5b2569092 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@wordpress/element": "^6.4.0", "@wordpress/env": "^10.5.0", "@wordpress/eslint-plugin": "^20.1.0", + "@wordpress/interactivity": "^6.9.0", "@wordpress/notices": "^5.4.0", "@wordpress/plugins": "^7.4.0", "@wordpress/scripts": "^28.4.0", @@ -64,7 +65,7 @@ "stylelint-scss": "^6.4.1" }, "scripts": { - "build": "wp-scripts build", + "build": "wp-scripts build --experimental-modules", "check-engines": "wp-scripts check-engines", "check-licenses": "wp-scripts check-licenses", "format": "wp-scripts format", @@ -79,7 +80,7 @@ "lint:pkg-json": "wp-scripts lint-pkg-json", "packages-update": "wp-scripts packages-update", "plugin-zip": "wp-scripts plugin-zip", - "start": "wp-scripts start", + "start": "wp-scripts start --experimental-modules", "screenshots:wporg": "WP_BASE_URL='http://127.0.0.1:9400/' wp-scripts test-playwright --config .github/scripts/wordpress-org-screenshots/playwright.config.ts", "screenshots:wporg:debug": "npm run screenshots:wporg -- --debug", "screenshots:wporg:ui": "npm run screenshots:wporg -- --ui", diff --git a/webpack.config.js b/webpack.config.js index 33798f2c6..766ffe4a8 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,39 +8,38 @@ const path = require('path'); */ const defaultConfig = require('@wordpress/scripts/config/webpack.config.js'); -module.exports = { +module.exports = [ ...defaultConfig, - entry: { - ...defaultConfig.entry(), - admin_style: path.resolve(process.cwd(), 'src', 'admin.scss'), - editor: path.resolve(process.cwd(), 'src', 'editor.js'), - panels: path.resolve(process.cwd(), 'src/panels', 'index.js'), - modals: path.resolve(process.cwd(), 'src/modals', 'index.js'), - settings: path.resolve(process.cwd(), 'src/settings', 'index.js'), - settings_style: path.resolve( - process.cwd(), - 'src/settings', - 'style.scss' - ), - profile: path.resolve(process.cwd(), 'src/profile', 'index.js'), - profile_style: path.resolve(process.cwd(), 'src/profile', 'style.scss'), - }, - module: { - ...defaultConfig.module, - rules: [ - ...defaultConfig.module.rules.filter( + { + ...defaultConfig[0], + entry: { + ...defaultConfig[0].entry(), + admin_style: path.resolve(process.cwd(), 'src', 'admin.scss'), + editor: path.resolve(process.cwd(), 'src', 'editor.js'), + panels: path.resolve(process.cwd(), 'src/panels', 'index.js'), + modals: path.resolve(process.cwd(), 'src/modals', 'index.js'), + settings: path.resolve(process.cwd(), 'src/settings', 'index.js'), + settings_style: path.resolve(process.cwd(), 'src/settings', 'style.scss'), + profile: path.resolve(process.cwd(), 'src/profile', 'index.js'), + profile_style: path.resolve(process.cwd(), 'src/profile', 'style.scss'), + }, + module: { + ...defaultConfig[0].module, + rules: [ + ...defaultConfig[0].module.rules.filter( (rule) => - !/\.(bmp|png|jpe?g|gif|webp)$/i.test(rule.test.toString()) - ), - ...[ - { - test: /\.(bmp|png|jpe?g|gif|webp)$/i, - type: 'asset/resource', - generator: { - filename: 'images/[name][ext]', + !/\\\.\(bmp\|png\|jpe\?g\|gif\|webp\)\$/i.test(rule.test.toString()) + ), + ...[ + { + test: /\.(bmp|png|jpe?g|gif|webp)$/i, + type: 'asset/resource', + generator: { + filename: 'images/[name][ext]', + }, }, - }, + ], ], - ], - }, -}; + }, + } +]; From d474c8570458375195ca19e9b2f2e58172bd62cf Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Thu, 10 Oct 2024 13:51:38 -0400 Subject: [PATCH 131/159] Updated version; worked on cleaning up packages and removing packages not used. --- build/272.js | 2 +- build/481.js | 2 +- build/567-rtl.css | 1 + build/567.css | 1 + build/567.js | 1 + build/980.js | 2 +- build/blocks/add-to-calendar/index.asset.php | 2 +- build/blocks/add-to-calendar/index.js | 2 +- build/blocks/event-date/index.asset.php | 2 +- build/blocks/event-date/index.js | 4 +- .../blocks/events-list/events-list.asset.php | 2 +- build/blocks/events-list/events-list.js | 10 +- build/blocks/events-list/index.asset.php | 2 +- build/blocks/events-list/index.js | 10 +- build/blocks/online-event/index.asset.php | 2 +- build/blocks/online-event/index.js | 2 +- .../online-event/online-event.asset.php | 2 +- build/blocks/online-event/online-event.js | 2 +- build/blocks/rsvp-response/index.asset.php | 2 +- build/blocks/rsvp-response/index.js | 2 +- build/blocks/rsvp/index.asset.php | 2 +- build/blocks/rsvp/index.js | 10 +- build/blocks/rsvp/rsvp.asset.php | 2 +- build/blocks/rsvp/rsvp.js | 10 +- build/blocks/venue/index.asset.php | 2 +- build/blocks/venue/index.js | 6 +- build/blocks/venue/venue.asset.php | 2 +- build/blocks/venue/venue.js | 4 +- ..._leaflet_dist_images_marker-icon-2x_png.js | 16 + ...s_leaflet_dist_images_marker-shadow_png.js | 14 + .../node_modules_leaflet_dist_leaflet_css.js | 17 + build/profile_style.asset.php | 2 +- build/profile_style.js | 2 +- build/settings_style.asset.php | 2 +- build/settings_style.js | 2 +- ...ode_modules_leaflet_dist_leaflet-src_js.js | 14525 ++++++++++++++++ ...e_modules_leaflet_dist_leaflet_css-rtl.css | 646 + ...-node_modules_leaflet_dist_leaflet_css.css | 648 + gatherpress.php | 2 +- includes/data/credits.php | 2 +- package-lock.json | 11352 ++++++------ package.json | 65 +- readme.md | 2 +- webpack.config.js | 2 +- 44 files changed, 21915 insertions(+), 5477 deletions(-) create mode 100644 build/567-rtl.css create mode 100644 build/567.css create mode 100644 build/567.js create mode 100644 build/node_modules_leaflet_dist_images_marker-icon-2x_png.js create mode 100644 build/node_modules_leaflet_dist_images_marker-shadow_png.js create mode 100644 build/node_modules_leaflet_dist_leaflet_css.js create mode 100644 build/vendors-node_modules_leaflet_dist_leaflet-src_js.js create mode 100644 build/vendors-node_modules_leaflet_dist_leaflet_css-rtl.css create mode 100644 build/vendors-node_modules_leaflet_dist_leaflet_css.css diff --git a/build/272.js b/build/272.js index 458d392fc..a1cc4c4e8 100644 --- a/build/272.js +++ b/build/272.js @@ -1 +1 @@ -"use strict";(globalThis.webpackChunkgatherpress=globalThis.webpackChunkgatherpress||[]).push([[272],{1272:(s,e,a)=>{s.exports=a.p+"images/marker-icon-2x.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkgatherpress=self.webpackChunkgatherpress||[]).push([[272],{1272:(e,s,p)=>{e.exports=p.p+"images/marker-icon-2x.png"}}]); \ No newline at end of file diff --git a/build/481.js b/build/481.js index cdd399f6b..b8c4aa420 100644 --- a/build/481.js +++ b/build/481.js @@ -1 +1 @@ -(globalThis.webpackChunkgatherpress=globalThis.webpackChunkgatherpress||[]).push([[481],{3481:function(t,i){!function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e0?Math.floor(t):Math.ceil(t)};function O(t,i,e){return t instanceof k?t:f(t)?new k(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new k(t.x,t.y):new k(t,i,e)}function A(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=R(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=R(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng1,Ct=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,i),window.removeEventListener("testPassiveEventSupport",h,i)}catch(t){}return t}(),Zt=!!document.createElement("canvas").getContext,St=!(!document.createElementNS||!Y("svg").createSVGRect),kt=!!St&&((J=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(J.firstChild&&J.firstChild.namespaceURI)),Et=!St&&function(){try{var t=document.createElement("div");t.innerHTML='';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function Ot(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var At={ie:Q,ielt9:tt,edge:it,webkit:et,android:nt,android23:ot,androidStock:rt,opera:at,chrome:ht,gecko:lt,safari:ut,phantom:ct,opera12:_t,win:dt,ie3d:pt,webkit3d:mt,gecko3d:ft,any3d:gt,mobile:vt,mobileWebkit:yt,mobileWebkit3d:xt,msPointer:wt,pointer:bt,touch:Lt,touchNative:Pt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:Zt,svg:St,vml:Et,inlineSvg:kt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Bt=At.msPointer?"MSPointerDown":"pointerdown",It=At.msPointer?"MSPointerMove":"pointermove",Rt=At.msPointer?"MSPointerUp":"pointerup",Nt=At.msPointer?"MSPointerCancel":"pointercancel",Dt={touchstart:Bt,touchmove:It,touchend:Rt,touchcancel:Nt},jt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&Ni(i),Gt(t,i)},touchmove:Gt,touchend:Gt,touchcancel:Gt},Ht={},Wt=!1;function Ft(t,i,e){return"touchstart"===i&&(Wt||(document.addEventListener(Bt,Ut,!0),document.addEventListener(It,Vt,!0),document.addEventListener(Rt,qt,!0),document.addEventListener(Nt,qt,!0),Wt=!0)),jt[i]?(e=jt[i].bind(this,e),t.addEventListener(Dt[i],e,!1),e):(console.warn("wrong event specified:",i),h)}function Ut(t){Ht[t.pointerId]=t}function Vt(t){Ht[t.pointerId]&&(Ht[t.pointerId]=t)}function qt(t){delete Ht[t.pointerId]}function Gt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Ht)i.touches.push(Ht[e]);i.changedTouches=[i],t(i)}}var Kt=200;var Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function li(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function ui(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ci(t,i){if(void 0!==t.classList)for(var e=c(i),n=0,o=e.length;n0?2*window.devicePixelRatio:1;function Fi(t){return At.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Wi:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Ui(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var Vi={__proto__:null,on:Ci,off:Si,stopPropagation:Bi,disableScrollPropagation:Ii,disableClickPropagation:Ri,preventDefault:Ni,stop:Di,getPropagationPath:ji,getMousePosition:Hi,getWheelDelta:Fi,isExternalTarget:Ui,addListener:Ci,removeListener:Si},qi=S.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=yi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=T(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;ithis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,R(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=O((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=B([r.min.add(e),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var l=s.subtract(a.getCenter()),u=a.extend(s).getSize().subtract(h);o.x+=l.x<0?-u.x:u.x,o.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(o),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new N(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ri(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(M(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ri(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=si("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new I(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=R(t),e=O(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),l=B(this.project(a,n),this.project(r,n)).getSize(),u=At.any3d?this.options.zoomSnap:1,c=h.x/l.x,_=h.y/l.y,d=i?Math.max(c,_):Math.min(c,_);return n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=i?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new k(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new A(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(D(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(O(t),i)},layerPointToLatLng:function(t){var i=O(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(D(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(D(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,i){return this.options.crs.distance(D(t),D(i))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(D(t)))},mouseEventToContainerPoint:function(t){return Hi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=ni(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Ci(i,"scroll",this._onScroll,this),this._containerId=s(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&At.any3d,ci(t,"leaflet-container"+(At.touch?" leaflet-touch":"")+(At.retina?" leaflet-retina":"")+(At.ielt9?" leaflet-oldie":"")+(At.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=oi(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),vi(this._mapPane,new k(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ci(t.markerPane,"leaflet-zoom-hide"),ci(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,e){vi(this._mapPane,new k(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var o=this._zoom!==i;this._moveStart(o,e)._move(t,i)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var o=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((o||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return M(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){vi(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var i=t?Si:Ci;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),At.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){M(this._resizeRequest),this._resizeRequest=T((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,a=!1;r;){if((e=this._targets[s(r)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(o&&!Ui(r,t))break;if(n.push(e),o)break}if(r===this._container)break;r=r.parentNode}return n.length||a||o||!this.listens(i,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&Pi(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(t,e);if(n){for(var r=[],a=0;a0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=At.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_i(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=si("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=ti,e=this._proxy.style[i];gi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ri(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();gi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o)||(T((function(){this._moveStart(!0,e.noMoveStart||!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,e,o){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Ki=C.extend({options:{position:"topright"},initialize:function(t){_(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Yi=function(t){return new Ki(t)};Gi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=si("div",i+"control-container",this._container);function n(n,o){var s=i+n+" "+i+o;t[n+o]=si("div",s,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ri(this._controlCorners[t]);ri(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Xi=Ki.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(s(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+s(this),n),this._layerControlInputs.push(i),i.layerId=s(t.layer),Ci(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return e.appendChild(r),r.appendChild(i),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Ci(t,"click",Ni),this.expand();var i=this;setTimeout((function(){Si(t,"click",Ni),i._preventClick=!1}))}}),Ji=Ki.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Ri(s),Ci(s,"click",Di),Ci(s,"click",o,this),Ci(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ci(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ci(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});Gi.mergeOptions({zoomControl:!0}),Gi.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ji,this.addControl(this.zoomControl))}));var $i=Ki.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;o>5280?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),Qi=Ki.extend({options:{position:"bottomright",prefix:''+(At.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){_(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=si("div","leaflet-control-attribution"),Ri(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' ')}}});Gi.mergeOptions({attributionControl:!0}),Gi.addInitHook((function(){this.options.attributionControl&&(new Qi).addTo(this)}));Ki.Layers=Xi,Ki.Zoom=Ji,Ki.Scale=$i,Ki.Attribution=Qi,Yi.layers=function(t,i,e){return new Xi(t,i,e)},Yi.zoom=function(t){return new Ji(t)},Yi.scale=function(t){return new $i(t)},Yi.attribution=function(t){return new Qi(t)};var te=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});te.addTo=function(t,i){return t.addHandler(i,this),this};var ie={Events:Z},ee=At.touch?"touchstart mousedown":"mousedown",ne=S.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){_(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(Ci(this._dragStartTarget,ee,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ne._dragging===this&&this.finishDrag(!0),Si(this._dragStartTarget,ee,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ui(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ne._dragging===this&&this.finishDrag();else if(!(ne._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ne._dragging=this,this._preventOutline&&Pi(this._element),wi(),Yt(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,e=Ti(this._element);this._startPoint=new k(i.clientX,i.clientY),this._startPos=yi(this._element),this._parentScale=Mi(e);var n="mousedown"===t.type;Ci(document,n?"mousemove":"touchmove",this._onMove,this),Ci(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new k(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)i&&(e.push(t[n]),o=n);return oh&&(s=r,h=a);h>e&&(i[s]=1,ce(t,i,e,n,s),ce(t,i,e,s,o))}function _e(t,i,e,n,o){var s,r,a,h=n?ae:pe(t,e),l=pe(i,e);for(ae=l;;){if(!(h|l))return[t,i];if(h&l)return!1;a=pe(r=de(t,i,s=h||l,e,o),e),s===h?(t=r,h=a):(i=r,l=a)}}function de(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,l=n.min,u=n.max;return 8&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):4&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):2&e?(s=u.x,r=t.y+h*(u.x-t.x)/a):1&e&&(s=l.x,r=t.y+h*(l.x-t.x)/a),new k(s,r,o)}function pe(t,i){var e=0;return t.xi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function me(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function fe(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,l=a*a+h*h;return l>0&&((o=((t.x-s)*a+(t.y-r)*h)/l)>1?(s=e.x,r=e.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new k(s,r)}function ge(t){return!f(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ve(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ge(t)}function ye(t,i){var e,n,o,s,r,a,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");ge(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=D([0,0]),c=R(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=re(t));var _=t.length,d=[];for(e=0;e<_;e++){var p=D(t[e]);d.push(i.project(D([p.lat-u.lat,p.lng-u.lng])))}for(e=0,n=0;e<_-1;e++)n+=d[e].distanceTo(d[e+1])/2;if(0===n)l=d[0];else for(e=0,s=0;e<_-1;e++)if(r=d[e],a=d[e+1],(s+=o=r.distanceTo(a))>n){h=(s-n)/o,l=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var m=i.unproject(O(l));return D([m.lat+u.lat,m.lng+u.lng])}var xe={__proto__:null,simplify:le,pointToSegmentDistance:ue,closestPointOnSegment:function(t,i,e){return fe(t,i,e)},clipSegment:_e,_getEdgeIntersection:de,_getBitCode:pe,_sqClosestPointOnSegment:fe,isFlat:ge,_flat:ve,polylineCenter:ye},we={project:function(t){return new k(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new A([-180,-90],[180,90])},be={R:6378137,R_MINOR:6356752.314245179,bounds:new A([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-e*Math.log(Math.max(a,1e-10)),new k(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=l=Math.PI/2-2*Math.atan(r*i)-a;return new N(a*e,t.x*e/n)}},Pe={__proto__:null,LonLat:we,Mercator:be,SphericalMercator:U},Le=i({},W,{code:"EPSG:3395",projection:be,transformation:function(){var t=.5/(Math.PI*be.R);return q(t,.5,-t,.5)}()}),Te=i({},W,{code:"EPSG:4326",projection:we,transformation:q(1/180,1,-1/180,.5)}),Me=i({},H,{projection:we,transformation:q(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});H.Earth=W,H.EPSG3395=Le,H.EPSG3857=G,H.EPSG900913=K,H.EPSG4326=Te,H.Simple=Me;var ze=S.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});Gi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=s(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=s(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return s(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?f(t)?t:[t]:[]).length;ithis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&i[0]instanceof N&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Re.prototype._setLatLngs.call(this,t),ge(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ge(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new k(i,i);if(t=new A(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||Re.prototype._containsPoint.call(this,t,!0)}});var De=Ze.extend({initialize:function(t,i){_(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=f(t)?t:t.features;if(o){for(i=0,e=o.length;i0&&o.push(o[0].slice()),o}function qe(t,e){return t.feature?i({},t.feature,{geometry:e}):Ge(e)}function Ge(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ke={toGeoJSON:function(t){return qe(this,{type:"Point",coordinates:Ue(this.getLatLng(),t)})}};function Ye(t,i){return new De(t,i)}Oe.include(Ke),Ie.include(Ke),Be.include(Ke),Re.include({toGeoJSON:function(t){var i=!ge(this._latlngs);return qe(this,{type:(i?"Multi":"")+"LineString",coordinates:Ve(this._latlngs,i?1:0,!1,t)})}}),Ne.include({toGeoJSON:function(t){var i=!ge(this._latlngs),e=i&&!ge(this._latlngs[0]),n=Ve(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),qe(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),Ce.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(e){i.push(e.toGeoJSON(t).geometry.coordinates)})),qe(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var o=i.toGeoJSON(t);if(e)n.push(o.geometry);else{var s=Ge(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}})),e?qe(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Xe=Ye,Je=ze.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=R(i),_(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ci(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ri(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&hi(this._image),this},bringToBack:function(){return this._map&&li(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:si("img");ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=h,i.onmousemove=h,i.onload=n(this.fire,this,"load"),i.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;gi(this._image,e,i)},_reset:function(){var t=this._image,i=new A(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();vi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){mi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),$e=Je.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:si("video");if(ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=h,i.onmousemove=h,i.onloadeddata=n(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),o=[],s=0;s0?o:[i.src]}else{f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var r=0;ro?(i.height=o+"px",ci(t,s)):_i(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();vi(this._container,i.add(e))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,i=parseInt(oi(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,o=new k(this._containerLeft,-e-this._containerBottom);o._add(yi(this._container));var s=t.layerPointToContainerPoint(o),r=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||r),h=O(this.options.autoPanPaddingBottomRight||r),l=t.getSize(),u=0,c=0;s.x+n+h.x>l.x&&(u=s.x+n-l.x+h.x),s.x-u-a.x<0&&(u=s.x-a.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(u||c)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Gi.mergeOptions({closePopupOnClick:!0}),Gi.include({openPopup:function(t,i,e){return this._initOverlay(en,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ze.include({bindPopup:function(t,i){return this._popup=this._initOverlay(en,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Ze||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Di(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Ae?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var nn=tn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){tn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){tn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=tn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,l=o.offsetHeight,u=O(this.options.offset),c=this._getAnchor();"top"===a?(i=h/2,e=l):"bottom"===a?(i=h/2,e=0):"center"===a?(i=h/2,e=l/2):"right"===a?(i=0,e=l/2):"left"===a?(i=h,e=l/2):r.xthis.options.maxZoom||en&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new k(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new k(_,c);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort((function(t,i){return t.distanceTo(s)-i.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(_=0;_e.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new I(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=h,t.onmousemove=h,At.ielt9&&this.options.opacity<1&&mi(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&T(n(this._tileReady,this,t,null,s)),vi(s,e),this._tiles[o]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var o=this._tileCoordsToKey(t);(e=this._tiles[o])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),M(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),At.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new A(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var rn=sn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=_(this,i)).detectRetina&&At.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return Ci(e,"load",n(this._tileOnLoad,this,i,e)),Ci(e,"error",n(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e={r:At.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,i){At.ielt9?setTimeout(n(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=h,i.onerror=h,!i.complete)){i.src=v;var e=this._tiles[t].coords;ri(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",v),sn.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==v))return sn.prototype._tileReady.call(this,t,i,e)}});function an(t,i){return new rn(t,i)}var hn=rn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=_(this,e)).detectRetina&&At.retina?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,rn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=B(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===Te?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=rn.prototype.getTileUrl.call(this,t);return a+d(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});rn.WMS=hn,an.wms=function(t,i){return new hn(t,i)};var ln=ze.extend({options:{padding:.1},initialize:function(t){_(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ci(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,i),s=n.multiplyBy(-e).add(o).subtract(this._map._getNewPixelOrigin(t,i));At.any3d?gi(this._container,s,e):vi(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new A(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),un=ln.extend({options:{tolerance:0},getEvents:function(){var t=ln.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ln.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ci(t,"mousemove",this._onMouseMove,this),Ci(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ci(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){M(this._redrawRequest),delete this._ctx,ri(this._container),Si(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ln.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=At.retina?2:1;vi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",At.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ln.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),o=[];for(e=0;e')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),pn={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ln.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=dn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=dn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[s(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=dn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=f(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=dn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){li(t._container)}},mn=At.vml?dn:Y,fn=ln.extend({_initContainer:function(){this._container=mn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=mn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){ln.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=mn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,X(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){li(t._path)}});function gn(t){return At.svg||At.vml?new fn(t):null}At.vml&&fn.include(pn),Gi.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&cn(t)||gn(t)}});var vn=Ne.extend({initialize:function(t,i){Ne.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fn.create=mn,fn.pointsToPath=X,De.geometryToLayer=je,De.coordsToLatLng=We,De.coordsToLatLngs=Fe,De.latLngToCoords=Ue,De.latLngsToCoords=Ve,De.getFeature=qe,De.asFeature=Ge,Gi.mergeOptions({boxZoom:!0});var yn=te.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ci(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Yt(),wi(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ci(document,{contextmenu:Di,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new A(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Xt(),bi(),Si(document,{contextmenu:Di,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var i=new I(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Gi.addInitHook("addHandler","boxZoom",yn),Gi.mergeOptions({doubleClickZoom:!0});var xn=te.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Gi.addInitHook("addHandler","doubleClickZoom",xn),Gi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var wn=te.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ne(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=R(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.xi.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)0?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});Gi.addInitHook("addHandler","scrollWheelZoom",Pn);Gi.mergeOptions({tapHold:At.touchNative&&At.safari&&At.mobile,tapTolerance:15});var Ln=te.extend({addHooks:function(){Ci(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Si(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new k(i.clientX,i.clientY),this._holdTimeout=setTimeout(n((function(){this._cancel(),this._isTapValid()&&(Ci(document,"touchend",Ni),Ci(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Ci(document,"touchend touchcancel contextmenu",this._cancel,this),Ci(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Si(document,"touchend",Ni),Si(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Si(document,"touchend touchcancel contextmenu",this._cancel,this),Si(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new k(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});Gi.addInitHook("addHandler","tapHold",Ln),Gi.mergeOptions({touchZoom:At.touch,bounceAtZoomLimits:!0});var Tn=te.extend({addHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),Ci(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_i(this._map._container,"leaflet-touch-zoom"),Si(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Ci(document,"touchmove",this._onTouchMove,this),Ci(document,"touchend touchcancel",this._onTouchEnd,this),Ni(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),o=i.mouseEventToContainerPoint(t.touches[1]),s=e.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoomi.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=e._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),M(this._animRequest);var a=n(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(a,this,!0),Ni(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,M(this._animRequest),Si(document,"touchmove",this._onTouchMove,this),Si(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Gi.addInitHook("addHandler","touchZoom",Tn),Gi.BoxZoom=yn,Gi.DoubleClickZoom=xn,Gi.Drag=wn,Gi.Keyboard=bn,Gi.ScrollWheelZoom=Pn,Gi.TapHold=Ln,Gi.TouchZoom=Tn,t.Bounds=A,t.Browser=At,t.CRS=H,t.Canvas=un,t.Circle=Ie,t.CircleMarker=Be,t.Class=C,t.Control=Ki,t.DivIcon=on,t.DivOverlay=tn,t.DomEvent=Vi,t.DomUtil=zi,t.Draggable=ne,t.Evented=S,t.FeatureGroup=Ze,t.GeoJSON=De,t.GridLayer=sn,t.Handler=te,t.Icon=Se,t.ImageOverlay=Je,t.LatLng=N,t.LatLngBounds=I,t.Layer=ze,t.LayerGroup=Ce,t.LineUtil=xe,t.Map=Gi,t.Marker=Oe,t.Mixin=ie,t.Path=Ae,t.Point=k,t.PolyUtil=he,t.Polygon=Ne,t.Polyline=Re,t.Popup=en,t.PosAnimation=qi,t.Projection=Pe,t.Rectangle=vn,t.Renderer=ln,t.SVG=fn,t.SVGOverlay=Qe,t.TileLayer=rn,t.Tooltip=nn,t.Transformation=V,t.Util=z,t.VideoOverlay=$e,t.bind=n,t.bounds=B,t.canvas=cn,t.circle=function(t,i,e){return new Ie(t,i,e)},t.circleMarker=function(t,i){return new Be(t,i)},t.control=Yi,t.divIcon=function(t){return new on(t)},t.extend=i,t.featureGroup=function(t,i){return new Ze(t,i)},t.geoJSON=Ye,t.geoJson=Xe,t.gridLayer=function(t){return new sn(t)},t.icon=function(t){return new Se(t)},t.imageOverlay=function(t,i,e){return new Je(t,i,e)},t.latLng=D,t.latLngBounds=R,t.layerGroup=function(t,i){return new Ce(t,i)},t.map=function(t,i){return new Gi(t,i)},t.marker=function(t,i){return new Oe(t,i)},t.point=O,t.polygon=function(t,i){return new Ne(t,i)},t.polyline=function(t,i){return new Re(t,i)},t.popup=function(t,i){return new en(t,i)},t.rectangle=function(t,i){return new vn(t,i)},t.setOptions=_,t.stamp=s,t.svg=gn,t.svgOverlay=function(t,i,e){return new Qe(t,i,e)},t.tileLayer=an,t.tooltip=function(t,i){return new nn(t,i)},t.transformation=q,t.version="1.9.4",t.videoOverlay=function(t,i,e){return new $e(t,i,e)};var Mn=window.L;t.noConflict=function(){return window.L=Mn,this},window.L=t}(i)}}]); \ No newline at end of file +(self.webpackChunkgatherpress=self.webpackChunkgatherpress||[]).push([[481],{3481:function(t,i){!function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e0?Math.floor(t):Math.ceil(t)};function O(t,i,e){return t instanceof k?t:f(t)?new k(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new k(t.x,t.y):new k(t,i,e)}function A(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=R(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=R(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng1,Ct=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,i),window.removeEventListener("testPassiveEventSupport",h,i)}catch(t){}return t}(),Zt=!!document.createElement("canvas").getContext,St=!(!document.createElementNS||!Y("svg").createSVGRect),kt=!!St&&((J=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(J.firstChild&&J.firstChild.namespaceURI)),Et=!St&&function(){try{var t=document.createElement("div");t.innerHTML='';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function Ot(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var At={ie:Q,ielt9:tt,edge:it,webkit:et,android:nt,android23:ot,androidStock:rt,opera:at,chrome:ht,gecko:lt,safari:ut,phantom:ct,opera12:_t,win:dt,ie3d:pt,webkit3d:mt,gecko3d:ft,any3d:gt,mobile:vt,mobileWebkit:yt,mobileWebkit3d:xt,msPointer:wt,pointer:bt,touch:Lt,touchNative:Pt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:Zt,svg:St,vml:Et,inlineSvg:kt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Bt=At.msPointer?"MSPointerDown":"pointerdown",It=At.msPointer?"MSPointerMove":"pointermove",Rt=At.msPointer?"MSPointerUp":"pointerup",Nt=At.msPointer?"MSPointerCancel":"pointercancel",Dt={touchstart:Bt,touchmove:It,touchend:Rt,touchcancel:Nt},jt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&Ri(i),Gt(t,i)},touchmove:Gt,touchend:Gt,touchcancel:Gt},Ht={},Wt=!1;function Ft(t,i,e){return"touchstart"===i&&(Wt||(document.addEventListener(Bt,Ut,!0),document.addEventListener(It,Vt,!0),document.addEventListener(Rt,qt,!0),document.addEventListener(Nt,qt,!0),Wt=!0)),jt[i]?(e=jt[i].bind(this,e),t.addEventListener(Dt[i],e,!1),e):(console.warn("wrong event specified:",i),h)}function Ut(t){Ht[t.pointerId]=t}function Vt(t){Ht[t.pointerId]&&(Ht[t.pointerId]=t)}function qt(t){delete Ht[t.pointerId]}function Gt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Ht)i.touches.push(Ht[e]);i.changedTouches=[i],t(i)}}var Kt,Yt,Xt,Jt,$t,Qt=mi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ti=mi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ii="webkitTransition"===ti||"OTransition"===ti?ti+"End":"transitionend";function ei(t){return"string"==typeof t?document.getElementById(t):t}function ni(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function oi(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function si(t){var i=t.parentNode;i&&i.removeChild(t)}function ri(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ai(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function hi(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=di(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ui(t,i){if(void 0!==t.classList)for(var e=c(i),n=0,o=e.length;n0?2*window.devicePixelRatio:1;function Wi(t){return At.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Hi:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Fi(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var Ui={__proto__:null,on:zi,off:Zi,stopPropagation:Ai,disableScrollPropagation:Bi,disableClickPropagation:Ii,preventDefault:Ri,stop:Ni,getPropagationPath:Di,getMousePosition:ji,getWheelDelta:Wi,isExternalTarget:Fi,addListener:zi,removeListener:Zi},Vi=S.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=vi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=T(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;ithis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,R(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=O((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=B([r.min.add(e),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var l=s.subtract(a.getCenter()),u=a.extend(s).getSize().subtract(h);o.x+=l.x<0?-u.x:u.x,o.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(o),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new N(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),si(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(M(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)si(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=oi("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new I(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=R(t),e=O(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),l=B(this.project(a,n),this.project(r,n)).getSize(),u=At.any3d?this.options.zoomSnap:1,c=h.x/l.x,_=h.y/l.y,d=i?Math.max(c,_):Math.min(c,_);return n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=i?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new k(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new A(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(D(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(O(t),i)},layerPointToLatLng:function(t){var i=O(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(D(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(D(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,i){return this.options.crs.distance(D(t),D(i))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(D(t)))},mouseEventToContainerPoint:function(t){return ji(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=ei(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");zi(i,"scroll",this._onScroll,this),this._containerId=s(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&At.any3d,ui(t,"leaflet-container"+(At.touch?" leaflet-touch":"")+(At.retina?" leaflet-retina":"")+(At.ielt9?" leaflet-oldie":"")+(At.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=ni(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),gi(this._mapPane,new k(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ui(t.markerPane,"leaflet-zoom-hide"),ui(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,e){gi(this._mapPane,new k(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var o=this._zoom!==i;this._moveStart(o,e)._move(t,i)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var o=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((o||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return M(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){gi(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var i=t?Zi:zi;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),At.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){M(this._resizeRequest),this._resizeRequest=T((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,a=!1;r;){if((e=this._targets[s(r)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(o&&!Fi(r,t))break;if(n.push(e),o)break}if(r===this._container)break;r=r.parentNode}return n.length||a||o||!this.listens(i,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&bi(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(t,e);if(n){for(var r=[],a=0;a0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=At.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ci(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=oi("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=Qt,e=this._proxy.style[i];fi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){si(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();fi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o)||(T((function(){this._moveStart(!0,e.noMoveStart||!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,e,o){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ui(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ci(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Gi=C.extend({options:{position:"topright"},initialize:function(t){_(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ui(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(si(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ki=function(t){return new Gi(t)};qi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=oi("div",i+"control-container",this._container);function n(n,o){var s=i+n+" "+i+o;t[n+o]=oi("div",s,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)si(this._controlCorners[t]);si(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Yi=Gi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(s(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+s(this),n),this._layerControlInputs.push(i),i.layerId=s(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return e.appendChild(r),r.appendChild(i),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,zi(t,"click",Ri),this.expand();var i=this;setTimeout((function(){Zi(t,"click",Ri),i._preventClick=!1}))}}),Xi=Gi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=oi("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=oi("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Ii(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";ci(this._zoomInButton,i),ci(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ui(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ui(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});qi.mergeOptions({zoomControl:!0}),qi.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Xi,this.addControl(this.zoomControl))}));var Ji=Gi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=oi("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=oi("div",i,e)),t.imperial&&(this._iScale=oi("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;o>5280?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),$i=Gi.extend({options:{position:"bottomright",prefix:''+(At.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){_(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=oi("div","leaflet-control-attribution"),Ii(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' ')}}});qi.mergeOptions({attributionControl:!0}),qi.addInitHook((function(){this.options.attributionControl&&(new $i).addTo(this)}));Gi.Layers=Yi,Gi.Zoom=Xi,Gi.Scale=Ji,Gi.Attribution=$i,Ki.layers=function(t,i,e){return new Yi(t,i,e)},Ki.zoom=function(t){return new Xi(t)},Ki.scale=function(t){return new Ji(t)},Ki.attribution=function(t){return new $i(t)};var Qi=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Qi.addTo=function(t,i){return t.addHandler(i,this),this};var te={Events:Z},ie=At.touch?"touchstart mousedown":"mousedown",ee=S.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){_(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,ie,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ee._dragging===this&&this.finishDrag(!0),Zi(this._dragStartTarget,ie,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!li(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ee._dragging===this&&this.finishDrag();else if(!(ee._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ee._dragging=this,this._preventOutline&&bi(this._element),xi(),Kt(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,e=Li(this._element);this._startPoint=new k(i.clientX,i.clientY),this._startPos=vi(this._element),this._parentScale=Ti(e);var n="mousedown"===t.type;zi(document,n?"mousemove":"touchmove",this._onMove,this),zi(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new k(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)i&&(e.push(t[n]),o=n);return oh&&(s=r,h=a);h>e&&(i[s]=1,ue(t,i,e,n,s),ue(t,i,e,s,o))}function ce(t,i,e,n,o){var s,r,a,h=n?re:de(t,e),l=de(i,e);for(re=l;;){if(!(h|l))return[t,i];if(h&l)return!1;a=de(r=_e(t,i,s=h||l,e,o),e),s===h?(t=r,h=a):(i=r,l=a)}}function _e(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,l=n.min,u=n.max;return 8&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):4&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):2&e?(s=u.x,r=t.y+h*(u.x-t.x)/a):1&e&&(s=l.x,r=t.y+h*(l.x-t.x)/a),new k(s,r,o)}function de(t,i){var e=0;return t.xi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function pe(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function me(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,l=a*a+h*h;return l>0&&((o=((t.x-s)*a+(t.y-r)*h)/l)>1?(s=e.x,r=e.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new k(s,r)}function fe(t){return!f(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ge(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),fe(t)}function ve(t,i){var e,n,o,s,r,a,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");fe(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=D([0,0]),c=R(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=se(t));var _=t.length,d=[];for(e=0;e<_;e++){var p=D(t[e]);d.push(i.project(D([p.lat-u.lat,p.lng-u.lng])))}for(e=0,n=0;e<_-1;e++)n+=d[e].distanceTo(d[e+1])/2;if(0===n)l=d[0];else for(e=0,s=0;e<_-1;e++)if(r=d[e],a=d[e+1],(s+=o=r.distanceTo(a))>n){h=(s-n)/o,l=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var m=i.unproject(O(l));return D([m.lat+u.lat,m.lng+u.lng])}var ye={__proto__:null,simplify:he,pointToSegmentDistance:le,closestPointOnSegment:function(t,i,e){return me(t,i,e)},clipSegment:ce,_getEdgeIntersection:_e,_getBitCode:de,_sqClosestPointOnSegment:me,isFlat:fe,_flat:ge,polylineCenter:ve},xe={project:function(t){return new k(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new A([-180,-90],[180,90])},we={R:6378137,R_MINOR:6356752.314245179,bounds:new A([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-e*Math.log(Math.max(a,1e-10)),new k(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=l=Math.PI/2-2*Math.atan(r*i)-a;return new N(a*e,t.x*e/n)}},be={__proto__:null,LonLat:xe,Mercator:we,SphericalMercator:U},Pe=i({},W,{code:"EPSG:3395",projection:we,transformation:function(){var t=.5/(Math.PI*we.R);return q(t,.5,-t,.5)}()}),Le=i({},W,{code:"EPSG:4326",projection:xe,transformation:q(1/180,1,-1/180,.5)}),Te=i({},H,{projection:xe,transformation:q(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});H.Earth=W,H.EPSG3395=Pe,H.EPSG3857=G,H.EPSG900913=K,H.EPSG4326=Le,H.Simple=Te;var Me=S.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});qi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=s(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=s(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return s(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?f(t)?t:[t]:[]).length;ithis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&i[0]instanceof N&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Ie.prototype._setLatLngs.call(this,t),fe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return fe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new k(i,i);if(t=new A(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||Ie.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){_(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=f(t)?t:t.features;if(o){for(i=0,e=o.length;i0&&o.push(o[0].slice()),o}function Ve(t,e){return t.feature?i({},t.feature,{geometry:e}):qe(e)}function qe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ge={toGeoJSON:function(t){return Ve(this,{type:"Point",coordinates:Fe(this.getLatLng(),t)})}};function Ke(t,i){return new Ne(t,i)}Ee.include(Ge),Be.include(Ge),Ae.include(Ge),Ie.include({toGeoJSON:function(t){var i=!fe(this._latlngs);return Ve(this,{type:(i?"Multi":"")+"LineString",coordinates:Ue(this._latlngs,i?1:0,!1,t)})}}),Re.include({toGeoJSON:function(t){var i=!fe(this._latlngs),e=i&&!fe(this._latlngs[0]),n=Ue(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Ve(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),ze.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(e){i.push(e.toGeoJSON(t).geometry.coordinates)})),Ve(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var o=i.toGeoJSON(t);if(e)n.push(o.geometry);else{var s=qe(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}})),e?Ve(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Ye=Ke,Xe=Me.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=R(i),_(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ui(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){si(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ai(this._image),this},bringToBack:function(){return this._map&&hi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:oi("img");ui(i,"leaflet-image-layer"),this._zoomAnimated&&ui(i,"leaflet-zoom-animated"),this.options.className&&ui(i,this.options.className),i.onselectstart=h,i.onmousemove=h,i.onload=n(this.fire,this,"load"),i.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;fi(this._image,e,i)},_reset:function(){var t=this._image,i=new A(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();gi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){pi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Je=Xe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:oi("video");if(ui(i,"leaflet-image-layer"),this._zoomAnimated&&ui(i,"leaflet-zoom-animated"),this.options.className&&ui(i,this.options.className),i.onselectstart=h,i.onmousemove=h,i.onloadeddata=n(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),o=[],s=0;s0?o:[i.src]}else{f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var r=0;ro?(i.height=o+"px",ui(t,s)):ci(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();gi(this._container,i.add(e))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,i=parseInt(ni(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,o=new k(this._containerLeft,-e-this._containerBottom);o._add(vi(this._container));var s=t.layerPointToContainerPoint(o),r=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||r),h=O(this.options.autoPanPaddingBottomRight||r),l=t.getSize(),u=0,c=0;s.x+n+h.x>l.x&&(u=s.x+n-l.x+h.x),s.x-u-a.x<0&&(u=s.x-a.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(u||c)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qi.mergeOptions({closePopupOnClick:!0}),qi.include({openPopup:function(t,i,e){return this._initOverlay(tn,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Me.include({bindPopup:function(t,i){return this._popup=this._initOverlay(tn,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Ce||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ni(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Oe?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oi("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,l=o.offsetHeight,u=O(this.options.offset),c=this._getAnchor();"top"===a?(i=h/2,e=l):"bottom"===a?(i=h/2,e=0):"center"===a?(i=h/2,e=l/2):"right"===a?(i=0,e=l/2):"left"===a?(i=h,e=l/2):r.xthis.options.maxZoom||en&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new k(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new k(_,c);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort((function(t,i){return t.distanceTo(s)-i.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(_=0;_e.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new I(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(si(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ui(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=h,t.onmousemove=h,At.ielt9&&this.options.opacity<1&&pi(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&T(n(this._tileReady,this,t,null,s)),gi(s,e),this._tiles[o]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var o=this._tileCoordsToKey(t);(e=this._tiles[o])&&(e.loaded=+new Date,this._map._fadeAnimated?(pi(e.el,0),M(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ui(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),At.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new A(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=_(this,i)).detectRetina&&At.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return zi(e,"load",n(this._tileOnLoad,this,i,e)),zi(e,"error",n(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e={r:At.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,i){At.ielt9?setTimeout(n(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=h,i.onerror=h,!i.complete)){i.src=v;var e=this._tiles[t].coords;si(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",v),on.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==v))return on.prototype._tileReady.call(this,t,i,e)}});function rn(t,i){return new sn(t,i)}var an=sn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=_(this,e)).detectRetina&&At.retina?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,sn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=B(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===Le?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=sn.prototype.getTileUrl.call(this,t);return a+d(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});sn.WMS=an,rn.wms=function(t,i){return new an(t,i)};var hn=Me.extend({options:{padding:.1},initialize:function(t){_(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ui(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,i),s=n.multiplyBy(-e).add(o).subtract(this._map._getNewPixelOrigin(t,i));At.any3d?fi(this._container,s,e):gi(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new A(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ln=hn.extend({options:{tolerance:0},getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");zi(t,"mousemove",this._onMouseMove,this),zi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),zi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){M(this._redrawRequest),delete this._ctx,si(this._container),Zi(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){hn.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=At.retina?2:1;gi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",At.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){hn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),o=[];for(e=0;e')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),dn={_initContainer:function(){this._container=oi("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ui(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;si(i),t.removeInteractiveTarget(i),delete this._layers[s(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=f(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ai(t._container)},_bringToBack:function(t){hi(t._container)}},pn=At.vml?cn:Y,mn=hn.extend({_initContainer:function(){this._container=pn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){si(this._container),Zi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){hn.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),gi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=pn("path");t.options.className&&ui(i,t.options.className),t.options.interactive&&ui(i,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){si(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,X(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ai(t._path)},_bringToBack:function(t){hi(t._path)}});function fn(t){return At.svg||At.vml?new mn(t):null}At.vml&&mn.include(dn),qi.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&un(t)||fn(t)}});var gn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});mn.create=pn,mn.pointsToPath=X,Ne.geometryToLayer=De,Ne.coordsToLatLng=He,Ne.coordsToLatLngs=We,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,qi.mergeOptions({boxZoom:!0});var vn=Qi.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Zi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){si(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Kt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oi("div","leaflet-zoom-box",this._container),ui(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new A(this._point,this._startPoint),e=i.getSize();gi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(si(this._box),ci(this._container,"leaflet-crosshair")),Yt(),wi(),Zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var i=new I(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});qi.addInitHook("addHandler","boxZoom",vn),qi.mergeOptions({doubleClickZoom:!0});var yn=Qi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});qi.addInitHook("addHandler","doubleClickZoom",yn),qi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var xn=Qi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ee(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ui(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ci(this._map._container,"leaflet-grab"),ci(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=R(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.xi.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)0?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});qi.addInitHook("addHandler","scrollWheelZoom",bn);qi.mergeOptions({tapHold:At.touchNative&&At.safari&&At.mobile,tapTolerance:15});var Pn=Qi.extend({addHooks:function(){zi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Zi(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new k(i.clientX,i.clientY),this._holdTimeout=setTimeout(n((function(){this._cancel(),this._isTapValid()&&(zi(document,"touchend",Ri),zi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),zi(document,"touchend touchcancel contextmenu",this._cancel,this),zi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Zi(document,"touchend",Ri),Zi(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Zi(document,"touchend touchcancel contextmenu",this._cancel,this),Zi(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new k(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});qi.addInitHook("addHandler","tapHold",Pn),qi.mergeOptions({touchZoom:At.touch,bounceAtZoomLimits:!0});var Ln=Qi.extend({addHooks:function(){ui(this._map._container,"leaflet-touch-zoom"),zi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),Zi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),zi(document,"touchmove",this._onTouchMove,this),zi(document,"touchend touchcancel",this._onTouchEnd,this),Ri(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),o=i.mouseEventToContainerPoint(t.touches[1]),s=e.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoomi.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=e._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),M(this._animRequest);var a=n(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(a,this,!0),Ri(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,M(this._animRequest),Zi(document,"touchmove",this._onTouchMove,this),Zi(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});qi.addInitHook("addHandler","touchZoom",Ln),qi.BoxZoom=vn,qi.DoubleClickZoom=yn,qi.Drag=xn,qi.Keyboard=wn,qi.ScrollWheelZoom=bn,qi.TapHold=Pn,qi.TouchZoom=Ln,t.Bounds=A,t.Browser=At,t.CRS=H,t.Canvas=ln,t.Circle=Be,t.CircleMarker=Ae,t.Class=C,t.Control=Gi,t.DivIcon=nn,t.DivOverlay=Qe,t.DomEvent=Ui,t.DomUtil=Mi,t.Draggable=ee,t.Evented=S,t.FeatureGroup=Ce,t.GeoJSON=Ne,t.GridLayer=on,t.Handler=Qi,t.Icon=Ze,t.ImageOverlay=Xe,t.LatLng=N,t.LatLngBounds=I,t.Layer=Me,t.LayerGroup=ze,t.LineUtil=ye,t.Map=qi,t.Marker=Ee,t.Mixin=te,t.Path=Oe,t.Point=k,t.PolyUtil=ae,t.Polygon=Re,t.Polyline=Ie,t.Popup=tn,t.PosAnimation=Vi,t.Projection=be,t.Rectangle=gn,t.Renderer=hn,t.SVG=mn,t.SVGOverlay=$e,t.TileLayer=sn,t.Tooltip=en,t.Transformation=V,t.Util=z,t.VideoOverlay=Je,t.bind=n,t.bounds=B,t.canvas=un,t.circle=function(t,i,e){return new Be(t,i,e)},t.circleMarker=function(t,i){return new Ae(t,i)},t.control=Ki,t.divIcon=function(t){return new nn(t)},t.extend=i,t.featureGroup=function(t,i){return new Ce(t,i)},t.geoJSON=Ke,t.geoJson=Ye,t.gridLayer=function(t){return new on(t)},t.icon=function(t){return new Ze(t)},t.imageOverlay=function(t,i,e){return new Xe(t,i,e)},t.latLng=D,t.latLngBounds=R,t.layerGroup=function(t,i){return new ze(t,i)},t.map=function(t,i){return new qi(t,i)},t.marker=function(t,i){return new Ee(t,i)},t.point=O,t.polygon=function(t,i){return new Re(t,i)},t.polyline=function(t,i){return new Ie(t,i)},t.popup=function(t,i){return new tn(t,i)},t.rectangle=function(t,i){return new gn(t,i)},t.setOptions=_,t.stamp=s,t.svg=fn,t.svgOverlay=function(t,i,e){return new $e(t,i,e)},t.tileLayer=rn,t.tooltip=function(t,i){return new en(t,i)},t.transformation=q,t.version="1.9.4",t.videoOverlay=function(t,i,e){return new Je(t,i,e)};var Tn=window.L;t.noConflict=function(){return window.L=Tn,this},window.L=t}(i)}}]); \ No newline at end of file diff --git a/build/567-rtl.css b/build/567-rtl.css new file mode 100644 index 000000000..5301f3c0b --- /dev/null +++ b/build/567-rtl.css @@ -0,0 +1 @@ +.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{right:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:100% 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-height:none!important;max-width:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important;padding:0;width:auto}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{left:0}.leaflet-bottom{bottom:0}.leaflet-left{right:0}.leaflet-control{clear:both;float:right}.leaflet-right .leaflet-control{float:left}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-right:10px}.leaflet-right .leaflet-control{margin-left:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:100% 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:focus,.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-right-radius:2px;border-top-left-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(images/layers.png);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 6px 6px 10px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-left:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -6px 5px -10px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;line-height:1.4;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:focus,.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;height:.6669em;vertical-align:baseline!important;width:1em}.leaflet-left .leaflet-control-scale{margin-right:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:hsla(0,0%,100%,.8);border:2px solid #777;border-top:none;box-sizing:border-box;line-height:1.1;padding:2px 5px 1px;text-shadow:-1px 1px #fff;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:right}.leaflet-popup-content{font-size:13px;font-size:1.08333em;line-height:1.3;margin:13px 20px 13px 24px;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{height:20px;right:50%;margin-right:-20px;margin-top:-1px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;pointer-events:auto;transform:rotate(-45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#757575;font:16px/24px Tahoma,Verdana,sans-serif;height:24px;position:absolute;left:0;text-align:center;text-decoration:none;top:0;width:24px}.leaflet-container a.leaflet-popup-close-button:focus,.leaflet-container a.leaflet-popup-close-button:hover{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{right:50%;margin-right:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-right:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-right:-6px}.leaflet-tooltip-right{margin-right:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-right-color:#fff;margin-left:-12px;left:0}.leaflet-tooltip-right:before{border-left-color:#fff;right:0;margin-right:-12px}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}} diff --git a/build/567.css b/build/567.css new file mode 100644 index 000000000..62920bb99 --- /dev/null +++ b/build/567.css @@ -0,0 +1 @@ +.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{left:0;position:absolute;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{height:1600px;-webkit-transform-origin:0 0;width:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-height:none!important;max-width:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-height:none!important;max-width:none!important;padding:0;width:auto}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;height:0;width:0;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{height:1px;width:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{pointer-events:visiblePainted;pointer-events:auto;position:relative;z-index:800}.leaflet-bottom,.leaflet-top{pointer-events:none;position:absolute;z-index:1000}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{clear:both;float:left}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:hsla(0,0%,100%,.5);border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.65)}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;color:#000;display:block;height:26px;line-height:26px;text-align:center;text-decoration:none;width:26px}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:focus,.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.leaflet-bar a.leaflet-disabled{background-color:#f4f4f4;color:#bbb;cursor:default}.leaflet-touch .leaflet-bar a{height:30px;line-height:30px;width:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.4)}.leaflet-control-layers-toggle{background-image:url(images/layers.png);height:36px;width:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{height:44px;width:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{background:#fff;color:#333;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{overflow-x:hidden;overflow-y:scroll;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;line-height:1.4;padding:0 5px}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:focus,.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;height:.6669em;vertical-align:baseline!important;width:1em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{background:hsla(0,0%,100%,.8);border:2px solid #777;border-top:none;box-sizing:border-box;line-height:1.1;padding:2px 5px 1px;text-shadow:1px 1px #fff;white-space:nowrap}.leaflet-control-scale-line:not(:first-child){border-bottom:none;border-top:2px solid #777;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:2px solid rgba(0,0,0,.2)}.leaflet-popup{margin-bottom:20px;position:absolute;text-align:center}.leaflet-popup-content-wrapper{border-radius:12px;padding:1px;text-align:left}.leaflet-popup-content{font-size:13px;font-size:1.08333em;line-height:1.3;margin:13px 24px 13px 20px;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{height:20px;left:50%;margin-left:-20px;margin-top:-1px;overflow:hidden;pointer-events:none;position:absolute;width:40px}.leaflet-popup-tip{height:17px;margin:-10px auto 0;padding:1px;pointer-events:auto;transform:rotate(45deg);width:17px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4);color:#333}.leaflet-container a.leaflet-popup-close-button{background:transparent;border:none;color:#757575;font:16px/24px Tahoma,Verdana,sans-serif;height:24px;position:absolute;right:0;text-align:center;text-decoration:none;top:0;width:24px}.leaflet-container a.leaflet-popup-close-button:focus,.leaflet-container a.leaflet-popup-close-button:hover{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678);margin:0 auto;width:24px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{background-color:#fff;border:1px solid #fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.4);color:#222;padding:6px;pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{background:transparent;border:6px solid transparent;content:"";pointer-events:none;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{border-top-color:#fff;bottom:0;margin-bottom:-12px}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-left:-6px;margin-top:-12px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;left:0;margin-left:-12px}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}} diff --git a/build/567.js b/build/567.js new file mode 100644 index 000000000..bb0c09c28 --- /dev/null +++ b/build/567.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgatherpress=self.webpackChunkgatherpress||[]).push([[567],{5567:(e,s,r)=>{r.r(s)}}]); \ No newline at end of file diff --git a/build/980.js b/build/980.js index 081cd3caa..d1f13bab3 100644 --- a/build/980.js +++ b/build/980.js @@ -1 +1 @@ -"use strict";(globalThis.webpackChunkgatherpress=globalThis.webpackChunkgatherpress||[]).push([[980],{8980:(s,e,a)=>{s.exports=a.p+"images/marker-shadow.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkgatherpress=self.webpackChunkgatherpress||[]).push([[980],{8980:(e,s,p)=>{e.exports=p.p+"images/marker-shadow.png"}}]); \ No newline at end of file diff --git a/build/blocks/add-to-calendar/index.asset.php b/build/blocks/add-to-calendar/index.asset.php index f349cdb5b..18a74edbd 100644 --- a/build/blocks/add-to-calendar/index.asset.php +++ b/build/blocks/add-to-calendar/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '754b4dfa4e592032751e'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => 'd363e7f0b415ef3e95a3'); diff --git a/build/blocks/add-to-calendar/index.js b/build/blocks/add-to-calendar/index.js index fb807ba9d..712c440bd 100644 --- a/build/blocks/add-to-calendar/index.js +++ b/build/blocks/add-to-calendar/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,r={6892:()=>{const e=window.wp.blocks,r=window.wp.i18n,t=window.wp.blockEditor,s=window.wp.components,n=window.ReactJSXRuntime,i=e=>{const{isSelected:r}=e,t=r?"none":"block";return(0,n.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,n.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:t}})]})},o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/add-to-calendar","version":"1.0.2","title":"Add to Calendar","category":"gatherpress","icon":"calendar","example":{},"description":"Allows a member to add an event to their preferred calendar.","attributes":{"blockId":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./add-to-calendar.js","render":"file:./render.php"}');(0,e.registerBlockType)(o,{edit:()=>{const e=(0,t.useBlockProps)();return(0,n.jsx)("div",{...e,children:(0,n.jsx)(i,{children:(0,n.jsxs)(s.Flex,{justify:"normal",align:"center",gap:"4",children:[(0,n.jsx)(s.FlexItem,{display:"flex",className:"gatherpress-event-date__icon",children:(0,n.jsx)(s.Icon,{icon:"calendar"})}),(0,n.jsx)(s.FlexItem,{children:(0,n.jsx)("a",{href:"#",children:(0,r.__)("Add to calendar","gatherpress")})})]})})})},save:()=>null})}},t={};function s(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return r[e](i,i.exports,s),i.exports}s.m=r,e=[],s.O=(r,t,n,i)=>{if(!t){var o=1/0;for(c=0;c=i)&&Object.keys(s.O).every((e=>s.O[e](t[l])))?t.splice(l--,1):(a=!1,i0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[t,n,i]},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={181:0,129:0};s.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[o,a,l]=t,d=0;if(o.some((r=>0!==e[r]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var c=l(s)}for(r&&r(t);ds(6892)));n=s.O(n)})(); \ No newline at end of file +(()=>{"use strict";var e,r={6892:()=>{const e=window.wp.blocks,r=window.wp.i18n,t=window.wp.blockEditor,s=window.wp.components,n=window.ReactJSXRuntime,i=e=>{const{isSelected:r}=e,t=r?"none":"block";return(0,n.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,n.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:t}})]})},o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/add-to-calendar","version":"1.0.2","title":"Add to Calendar","category":"gatherpress","icon":"calendar","example":{},"description":"Allows a member to add an event to their preferred calendar.","attributes":{"blockId":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./add-to-calendar.js","render":"file:./render.php"}');(0,e.registerBlockType)(o,{edit:()=>{const e=(0,t.useBlockProps)();return(0,n.jsx)("div",{...e,children:(0,n.jsx)(i,{children:(0,n.jsxs)(s.Flex,{justify:"normal",align:"center",gap:"4",children:[(0,n.jsx)(s.FlexItem,{display:"flex",className:"gatherpress-event-date__icon",children:(0,n.jsx)(s.Icon,{icon:"calendar"})}),(0,n.jsx)(s.FlexItem,{children:(0,n.jsx)("a",{href:"#",children:(0,r.__)("Add to calendar","gatherpress")})})]})})})},save:()=>null})}},t={};function s(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return r[e](i,i.exports,s),i.exports}s.m=r,e=[],s.O=(r,t,n,i)=>{if(!t){var o=1/0;for(c=0;c=i)&&Object.keys(s.O).every((e=>s.O[e](t[l])))?t.splice(l--,1):(a=!1,i0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[t,n,i]},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={181:0,129:0};s.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,o=t[0],a=t[1],l=t[2],d=0;if(o.some((r=>0!==e[r]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var c=l(s)}for(r&&r(t);ds(6892)));n=s.O(n)})(); \ No newline at end of file diff --git a/build/blocks/event-date/index.asset.php b/build/blocks/event-date/index.asset.php index fb38a8c07..31e534b02 100644 --- a/build/blocks/event-date/index.asset.php +++ b/build/blocks/event-date/index.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '2a87e9e9bf69563aeae1'); + array('moment', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => 'fbdfb147c6c684a7d803'); diff --git a/build/blocks/event-date/index.js b/build/blocks/event-date/index.js index 46ed97a5b..757439f21 100644 --- a/build/blocks/event-date/index.js +++ b/build/blocks/event-date/index.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e,t={750:(e,t,r)=>{const n=window.wp.blocks,a=window.moment;var s=r.n(a);function i(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;te&&e[t]),GatherPress)}function f(e,t){if("object"!=typeof GatherPress)return;const r=e.split("."),n=r.pop();r.reduce(((e,t)=>{var r;return null!==(r=e[t])&&void 0!==r?r:e[t]={}}),GatherPress)[n]=t}const x=window.wp.date,v=window.ReactJSXRuntime,_="YYYY-MM-DD HH:mm:ss",T=s().tz(b()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),D=(s().tz(T,b()).add(2,"hours").format(_),[{label:(0,l.__)("1 hour","gatherpress"),value:1},{label:(0,l.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,l.__)("2 hours","gatherpress"),value:2},{label:(0,l.__)("3 hours","gatherpress"),value:3},{label:(0,l.__)("Set an end time…","gatherpress"),value:!1}]);function j(e){return s().tz(function(){let e=g("eventDetails.dateTime.datetime_start");return e=""!==e?s().tz(e,b()).format(_):T,f("eventDetails.dateTime.datetime_start",e),e}(),b()).add(e,"hours").format(_)}function z(){return k(g("settings.dateFormat"))+" "+k(g("settings.timeFormat"))}function b(e=g("eventDetails.dateTime.timezone")){return s().tz.zone(e)?e:(0,l.__)("GMT","gatherpress")}function w(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,r=e.replace(t,"$1");return r!==e?"UTC"+r+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function S(e,t=null,r=null){!function(e,t=null){const r=s().tz(g("eventDetails.dateTime.datetime_end"),b()).valueOf(),n=s().tz(e,b()).valueOf();n>=r&&y(s().tz(n,b()).add(2,"hours").format(_),t)}(e,r),f("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),p()}function y(e,t=null,r=null){!function(e,t=null){const r=s().tz(g("eventDetails.dateTime.datetime_start"),b()).valueOf(),n=s().tz(e,b()).valueOf();n<=r&&S(s().tz(n,b()).subtract(2,"hours").format(_),t)}(e,r),f("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),p()}function k(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map(((e,r,n)=>{const a=n[r-1];return e in t&&"\\"!==a?t[e]:e})).join("")}function C(){const e="gatherpress_event_past",t=(0,m.dispatch)("core/notices");t.removeNotice(e),function(){const e=s().tz(g("eventDetails.dateTime.datetime_end"),b());return"gatherpress_event"===(0,m.select)("core/editor")?.getCurrentPostType()&&s().tz(b()).valueOf()>e.valueOf()}()&&t.createNotice("warning",(0,l.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const O=()=>{const{dateTimeStart:e,duration:t}=(0,m.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:r,setDateTimeEnd:n}=(0,m.useDispatch)("gatherpress/datetime"),a=(0,x.getSettings)(),i=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u.useEffect)((()=>{r(s().tz(e,b()).format(_)),t&&n(j(t)),C()}),[e,t,r,n]),(0,v.jsx)(c.PanelRow,{children:(0,v.jsxs)(c.Flex,{direction:"column",gap:"1",children:[(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)("h3",{style:{marginBottom:0},children:(0,v.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,l.__)("Date & time start","gatherpress")})})}),(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:r})=>(0,v.jsx)(c.Button,{id:"gatherpress-datetime-start",onClick:r,"aria-expanded":t,isLink:!0,children:s().tz(e,b()).format(z())}),renderContent:()=>(0,v.jsx)(c.DateTimePicker,{currentDate:e,onChange:e=>{S(e,r,n)},is12Hour:i})})})]})})},E=()=>{const{dateTimeEnd:e}=(0,m.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:t,setDateTimeStart:r}=(0,m.useDispatch)("gatherpress/datetime"),n=(0,x.getSettings)(),a=/a(?!\\)/i.test(n.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u.useEffect)((()=>{t(s().tz(e,b()).format(_)),C()})),(0,v.jsx)(c.PanelRow,{children:(0,v.jsxs)(c.Flex,{direction:"column",gap:"1",children:[(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)("h3",{style:{marginBottom:0},children:(0,v.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,l.__)("Date & time end","gatherpress")})})}),(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:r})=>(0,v.jsx)(c.Button,{id:"gatherpress-datetime-end",onClick:r,"aria-expanded":t,isLink:!0,children:s().tz(e,b()).format(z())}),renderContent:()=>(0,v.jsx)(c.DateTimePicker,{currentDate:e,onChange:e=>y(e,t,r),is12Hour:a})})})]})})},P=()=>{const{timezone:e}=(0,m.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:t}=(0,m.useDispatch)("gatherpress/datetime"),r=g("misc.timezoneChoices");return(0,u.useEffect)((()=>{t(g("eventDetails.dateTime.timezone"))}),[t]),(0,v.jsx)(c.PanelRow,{children:(0,v.jsx)(c.SelectControl,{label:(0,l.__)("Time Zone","gatherpress"),value:w(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,r=e.replace(t,"$1");if(r!==e){const n=e.replace(t,"$2").padStart(2,"0");let a=e.replace(t,"$3");return""===a&&(a=":00"),a=a.replace(".25",":15").replace(".5",":30").replace(".75",":45"),r+n+a}return e}(e),t(e),p()},__nexthasnomarginbottom:!0,children:Object.keys(r).map((e=>(0,v.jsx)("optgroup",{label:e,children:Object.keys(r[e]).map((t=>(0,v.jsx)("option",{value:t,children:r[e][t]},t)))},e)))})})},F=()=>{const{duration:e}=(0,m.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),t=(0,m.useDispatch)(),{setDateTimeEnd:r,setDuration:n}=t("gatherpress/datetime");return(0,v.jsx)(c.SelectControl,{label:(0,l.__)("Duration","gatherpress"),value:!!D.some((t=>t.value===e))&&e,options:D,onChange:e=>{(e="false"!==e&&parseFloat(e))&&r(j(e)),n(e)},__nexthasnomarginbottom:!0})},M=()=>{const e=(0,m.useDispatch)("core/editor").editPost;let t=(0,m.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:r,dateTimeEnd:n,duration:a,timezone:i}=(0,m.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:o}=(0,m.useDispatch)("gatherpress/datetime");return(0,u.useEffect)((()=>{const a=JSON.stringify({...t,dateTimeStart:s().tz(r,i).format(_),dateTimeEnd:s().tz(n,i).format(_),timezone:i});e({meta:{gatherpress_datetime:a}})}),[r,n,i,t,e,o,a]),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("section",{children:(0,v.jsx)(O,{})}),(0,v.jsx)("section",{children:a?(0,v.jsx)(F,{}):(0,v.jsx)(E,{})}),(0,v.jsx)("section",{children:(0,v.jsx)(P,{})})]})},Y=(e,t,r)=>{const n=k(g("settings.dateFormat")),a=k(g("settings.timeFormat")),i=g("settings.showTimezone")?"z":"",o=n+" "+a;r=b(r);let d=n+" "+a+" "+i;return s().tz(e,r).format(n)===s().tz(t,r).format(n)&&(d=a+" "+i),(0,l.sprintf)(/* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ /* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ -(0,l.__)("%1$s to %2$s %3$s","gatherpress"),s().tz(e,r).format(o),s().tz(t,r).format(d),function(e){return e=b(e),(0,l.__)("GMT","gatherpress")!==e?"":function(e=""){return e.replace(":","")}(g("eventDetails.dateTime.timezone"))}(r))},$=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gatherpress/event-date","version":"2.0.0","title":"Event Date","category":"gatherpress","icon":"clock","example":{"viewportWidth":350},"description":"Displays the date and time for an event.","attributes":{"eventEnd":{"type":"string"},"eventStart":{"type":"string"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","render":"file:./render.php"}');(0,n.registerBlockType)($,{edit:({attributes:{textAlign:e},setAttributes:t})=>{const r=(0,d.useBlockProps)({className:o({[`has-text-align-${e}`]:e})}),{dateTimeStart:n,dateTimeEnd:a,timezone:s}=(0,m.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),timezone:e("gatherpress/datetime").getTimezone()})),[]);return(0,v.jsxs)("div",{...r,children:[(0,v.jsx)(d.BlockControls,{children:(0,v.jsx)(d.AlignmentToolbar,{value:e,onChange:e=>t({textAlign:e})})}),Y(n,a,s),h()&&(0,v.jsx)(d.InspectorControls,{children:(0,v.jsx)(c.PanelBody,{children:(0,v.jsx)(c.__experimentalVStack,{spacing:4,children:(0,v.jsx)(M,{})})})})]})},save:()=>null})}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.m=t,e=[],n.O=(t,r,a,s)=>{if(!r){var i=1/0;for(c=0;c=s)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(o=!1,s0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[r,a,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={532:0,4:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var a,s,[i,o,l]=r,d=0;if(i.some((t=>0!==e[t]))){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(l)var c=l(n)}for(t&&t(r);dn(750)));a=n.O(a)})(); \ No newline at end of file +(()=>{"use strict";var e,t={750:(e,t,r)=>{const n=window.wp.blocks,a=window.moment;var s=r.n(a);function i(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;te&&e[t]),GatherPress)}function f(e,t){if("object"!=typeof GatherPress)return;const r=e.split("."),n=r.pop();r.reduce(((e,t)=>{var r;return null!==(r=e[t])&&void 0!==r?r:e[t]={}}),GatherPress)[n]=t}const x=window.wp.date,v=window.ReactJSXRuntime,_="YYYY-MM-DD HH:mm:ss",T=s().tz(w()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),D=(s().tz(T,w()).add(2,"hours").format(_),[{label:(0,l.__)("1 hour","gatherpress"),value:1},{label:(0,l.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,l.__)("2 hours","gatherpress"),value:2},{label:(0,l.__)("3 hours","gatherpress"),value:3},{label:(0,l.__)("Set an end time…","gatherpress"),value:!1}]);function j(e){return s().tz(function(){let e=g("eventDetails.dateTime.datetime_start");return e=""!==e?s().tz(e,w()).format(_):T,f("eventDetails.dateTime.datetime_start",e),e}(),w()).add(e,"hours").format(_)}function z(){return k(g("settings.dateFormat"))+" "+k(g("settings.timeFormat"))}function w(e=g("eventDetails.dateTime.timezone")){return s().tz.zone(e)?e:(0,l.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,r=e.replace(t,"$1");return r!==e?"UTC"+r+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function b(e,t=null,r=null){!function(e,t=null){const r=s().tz(g("eventDetails.dateTime.datetime_end"),w()).valueOf(),n=s().tz(e,w()).valueOf();n>=r&&y(s().tz(n,w()).add(2,"hours").format(_),t)}(e,r),f("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),p()}function y(e,t=null,r=null){!function(e,t=null){const r=s().tz(g("eventDetails.dateTime.datetime_start"),w()).valueOf(),n=s().tz(e,w()).valueOf();n<=r&&b(s().tz(n,w()).subtract(2,"hours").format(_),t)}(e,r),f("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),p()}function k(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map(((e,r,n)=>{const a=n[r-1];return e in t&&"\\"!==a?t[e]:e})).join("")}function C(){const e="gatherpress_event_past",t=(0,m.dispatch)("core/notices");t.removeNotice(e),function(){const e=s().tz(g("eventDetails.dateTime.datetime_end"),w());return"gatherpress_event"===(0,m.select)("core/editor")?.getCurrentPostType()&&s().tz(w()).valueOf()>e.valueOf()}()&&t.createNotice("warning",(0,l.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const O=()=>{const{dateTimeStart:e,duration:t}=(0,m.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:r,setDateTimeEnd:n}=(0,m.useDispatch)("gatherpress/datetime"),a=(0,x.getSettings)(),i=/a(?!\\)/i.test(a.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u.useEffect)((()=>{r(s().tz(e,w()).format(_)),t&&n(j(t)),C()}),[e,t,r,n]),(0,v.jsx)(c.PanelRow,{children:(0,v.jsxs)(c.Flex,{direction:"column",gap:"1",children:[(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)("h3",{style:{marginBottom:0},children:(0,v.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,l.__)("Date & time start","gatherpress")})})}),(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:r})=>(0,v.jsx)(c.Button,{id:"gatherpress-datetime-start",onClick:r,"aria-expanded":t,isLink:!0,children:s().tz(e,w()).format(z())}),renderContent:()=>(0,v.jsx)(c.DateTimePicker,{currentDate:e,onChange:e=>{b(e,r,n)},is12Hour:i})})})]})})},E=()=>{const{dateTimeEnd:e}=(0,m.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:t,setDateTimeStart:r}=(0,m.useDispatch)("gatherpress/datetime"),n=(0,x.getSettings)(),a=/a(?!\\)/i.test(n.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u.useEffect)((()=>{t(s().tz(e,w()).format(_)),C()})),(0,v.jsx)(c.PanelRow,{children:(0,v.jsxs)(c.Flex,{direction:"column",gap:"1",children:[(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)("h3",{style:{marginBottom:0},children:(0,v.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,l.__)("Date & time end","gatherpress")})})}),(0,v.jsx)(c.FlexItem,{children:(0,v.jsx)(c.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:r})=>(0,v.jsx)(c.Button,{id:"gatherpress-datetime-end",onClick:r,"aria-expanded":t,isLink:!0,children:s().tz(e,w()).format(z())}),renderContent:()=>(0,v.jsx)(c.DateTimePicker,{currentDate:e,onChange:e=>y(e,t,r),is12Hour:a})})})]})})},P=()=>{const{timezone:e}=(0,m.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:t}=(0,m.useDispatch)("gatherpress/datetime"),r=g("misc.timezoneChoices");return(0,u.useEffect)((()=>{t(g("eventDetails.dateTime.timezone"))}),[t]),(0,v.jsx)(c.PanelRow,{children:(0,v.jsx)(c.SelectControl,{label:(0,l.__)("Time Zone","gatherpress"),value:S(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,r=e.replace(t,"$1");if(r!==e){const n=e.replace(t,"$2").padStart(2,"0");let a=e.replace(t,"$3");return""===a&&(a=":00"),a=a.replace(".25",":15").replace(".5",":30").replace(".75",":45"),r+n+a}return e}(e),t(e),p()},__nexthasnomarginbottom:!0,children:Object.keys(r).map((e=>(0,v.jsx)("optgroup",{label:e,children:Object.keys(r[e]).map((t=>(0,v.jsx)("option",{value:t,children:r[e][t]},t)))},e)))})})},F=()=>{const{duration:e}=(0,m.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),t=(0,m.useDispatch)(),{setDateTimeEnd:r,setDuration:n}=t("gatherpress/datetime");return(0,v.jsx)(c.SelectControl,{label:(0,l.__)("Duration","gatherpress"),value:!!D.some((t=>t.value===e))&&e,options:D,onChange:e=>{(e="false"!==e&&parseFloat(e))&&r(j(e)),n(e)},__nexthasnomarginbottom:!0})},M=()=>{const e=(0,m.useDispatch)("core/editor").editPost;let t=(0,m.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:r,dateTimeEnd:n,duration:a,timezone:i}=(0,m.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:o}=(0,m.useDispatch)("gatherpress/datetime");return(0,u.useEffect)((()=>{const a=JSON.stringify({...t,dateTimeStart:s().tz(r,i).format(_),dateTimeEnd:s().tz(n,i).format(_),timezone:i});e({meta:{gatherpress_datetime:a}})}),[r,n,i,t,e,o,a]),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("section",{children:(0,v.jsx)(O,{})}),(0,v.jsx)("section",{children:a?(0,v.jsx)(F,{}):(0,v.jsx)(E,{})}),(0,v.jsx)("section",{children:(0,v.jsx)(P,{})})]})},Y=(e,t,r)=>{const n=k(g("settings.dateFormat")),a=k(g("settings.timeFormat")),i=g("settings.showTimezone")?"z":"",o=n+" "+a;r=w(r);let d=n+" "+a+" "+i;return s().tz(e,r).format(n)===s().tz(t,r).format(n)&&(d=a+" "+i),(0,l.sprintf)(/* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ /* translators: %1$s: datetime start, %2$s: datetime end, %3$s timezone. */ +(0,l.__)("%1$s to %2$s %3$s","gatherpress"),s().tz(e,r).format(o),s().tz(t,r).format(d),function(e){return e=w(e),(0,l.__)("GMT","gatherpress")!==e?"":function(e=""){return e.replace(":","")}(g("eventDetails.dateTime.timezone"))}(r))},$=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gatherpress/event-date","version":"2.0.0","title":"Event Date","category":"gatherpress","icon":"clock","example":{"viewportWidth":350},"description":"Displays the date and time for an event.","attributes":{"eventEnd":{"type":"string"},"eventStart":{"type":"string"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","render":"file:./render.php"}');(0,n.registerBlockType)($,{edit:({attributes:{textAlign:e},setAttributes:t})=>{const r=(0,d.useBlockProps)({className:o({[`has-text-align-${e}`]:e})}),{dateTimeStart:n,dateTimeEnd:a,timezone:s}=(0,m.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),timezone:e("gatherpress/datetime").getTimezone()})),[]);return(0,v.jsxs)("div",{...r,children:[(0,v.jsx)(d.BlockControls,{children:(0,v.jsx)(d.AlignmentToolbar,{value:e,onChange:e=>t({textAlign:e})})}),Y(n,a,s),h()&&(0,v.jsx)(d.InspectorControls,{children:(0,v.jsx)(c.PanelBody,{children:(0,v.jsx)(c.__experimentalVStack,{spacing:4,children:(0,v.jsx)(M,{})})})})]})},save:()=>null})}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.m=t,e=[],n.O=(t,r,a,s)=>{if(!r){var i=1/0;for(c=0;c=s)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(o=!1,s0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[r,a,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={532:0,4:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var a,s,i=r[0],o=r[1],l=r[2],d=0;if(i.some((t=>0!==e[t]))){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(l)var c=l(n)}for(t&&t(r);dn(750)));a=n.O(a)})(); \ No newline at end of file diff --git a/build/blocks/events-list/events-list.asset.php b/build/blocks/events-list/events-list.asset.php index f33f1232a..a6c74ad50 100644 --- a/build/blocks/events-list/events-list.asset.php +++ b/build/blocks/events-list/events-list.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'c0e0d5fe46659d5a0d72'); + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '32836f434d415163a581'); diff --git a/build/blocks/events-list/events-list.js b/build/blocks/events-list/events-list.js index 955e77086..3e852f549 100644 --- a/build/blocks/events-list/events-list.js +++ b/build/blocks/events-list/events-list.js @@ -1,5 +1,5 @@ -(()=>{var e={5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?E(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?E(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?E(e.children):[];var a=new h(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return a.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var a,l=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(y=d(y,{key:y.key||m})),o.push(c(y,v,m));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(v.name,b,w),v,m))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if(n.trim&&_)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),l}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==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:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,a=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,a=!1;function l(){a=!0}function c(){if(a){if(a=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,a=n[0],l=n[n.length-1],c=i();if(e===c){if(!s)return;o=l}if(l!==c||s||(o=a),a===c&&s&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?l:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(o,a))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9788));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const o=window.wp.element,r=window.wp.components,i=window.wp.i18n;var s=n(442);const a=s.default||s;var l=n(312),c=n.n(l),u=n(1609);const d=Math.min,p=Math.max,f=Math.round,h=Math.floor,m=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function _(e){return e.split("-")[1]}function x(e){return"x"===e?"y":"x"}function E(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function O(e){return x(S(e))}function C(e){return e.replace(/start|end/g,(e=>y[e]))}function T(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function N(e,t,n){let{reference:o,floating:r}=e;const i=S(t),s=O(t),a=E(s),l=w(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(_(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),h=k(f),m=a[p?"floating"===d?"reference":"floating":d],v=A(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-_.top+h.top)/w.y,bottom:(_.bottom-v.bottom+h.bottom)/w.y,left:(v.left-_.left+h.left)/w.x,right:(_.right-v.right+h.right)/w.x}}function j(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function M(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return e instanceof Node||e instanceof P(e).Node}function D(e){return e instanceof Element||e instanceof P(e).Element}function I(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function H(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function B(e){return["table","td","th"].includes(j(e))}function U(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function W(e){const t=z(),n=D(e)?q(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function V(e){return["html","body","#document"].includes(j(e))}function q(e){return P(e).getComputedStyle(e)}function $(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||F(e)&&e.host||M(e);return F(t)?t.host:t}function X(e){const t=G(e);return V(t)?e.ownerDocument?e.ownerDocument.body:e.body:I(t)&&H(t)?t:X(t)}function Y(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=X(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=P(r);return i?t.concat(s,s.visualViewport||[],H(r)?r:[],s.frameElement&&n?Y(s.frameElement):[]):t.concat(r,Y(r,[],n))}function K(e){const t=q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=I(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=f(n)!==i||f(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Z(e){return D(e)?e:e.contextElement}function J(e){const t=Z(e);if(!I(t))return m(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=K(t);let s=(i?f(n.width):n.width)/o,a=(i?f(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Q=m(0);function ee(e){const t=P(e);return z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Q}function te(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Z(e);let s=m(1);t&&(o?D(o)&&(s=J(o)):s=J(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P(e))&&t}(i,n,o)?ee(i):m(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=P(i),t=o&&D(o)?P(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=J(r),t=r.getBoundingClientRect(),o=q(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=P(r),r=n.frameElement}}return A({width:u,height:d,x:l,y:c})}function ne(e){return te(M(e)).left+$(e).scrollLeft}function oe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=P(e),o=M(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const e=z();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)o=function(e){const t=M(e),n=$(e),o=e.ownerDocument.body,r=p(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=p(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ne(e);const a=-n.scrollTop;return"rtl"===q(o).direction&&(s+=p(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(M(e));else if(D(t))o=function(e,t){const n=te(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=I(e)?J(e):m(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ee(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return A(o)}function re(e,t){const n=G(e);return!(n===t||!D(n)||V(n))&&("fixed"===q(n).position||re(n,t))}function ie(e,t,n){const o=I(t),r=M(t),i="fixed"===n,s=te(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=m(0);if(o||!o&&!i)if(("body"!==j(t)||H(r))&&(a=$(t)),o){const e=te(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=ne(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function se(e){return"static"===q(e).position}function ae(e,t){return I(e)&&"fixed"!==q(e).position?t?t(e):e.offsetParent:null}function le(e,t){const n=P(e);if(U(e))return n;if(!I(e)){let t=G(e);for(;t&&!V(t);){if(D(t)&&!se(t))return t;t=G(t)}return n}let o=ae(e,t);for(;o&&B(o)&&se(o);)o=ae(o,t);return o&&V(o)&&se(o)&&!W(o)?n:o||function(e){let t=G(e);for(;I(t)&&!V(t);){if(W(t))return t;if(U(t))return null;t=G(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=M(o),a=!!t&&U(t.floating);if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=m(1);const u=m(0),d=I(o);if((d||!d&&!i)&&(("body"!==j(o)||H(s))&&(l=$(o)),I(o))){const e=te(o);c=J(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:M,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?U(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Y(e,[],!1).filter((e=>D(e)&&"body"!==j(e))),r=null;const i="fixed"===q(e).position;let s=i?G(e):e;for(;D(s)&&!V(s);){const t=q(s),n=W(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||H(s)&&!n&&re(e,s))?o=o.filter((e=>e!==s)):r=t,s=G(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],a=i.reduce(((e,n)=>{const o=oe(t,n,r);return e.top=p(o.top,e.top),e.right=d(o.right,e.right),e.bottom=d(o.bottom,e.bottom),e.left=p(o.left,e.left),e}),oe(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,n=this.getDimensions,o=await n(e.floating);return{reference:ie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=K(e);return{width:t,height:n}},getScale:J,isElement:D,isRTL:function(e){return"rtl"===q(e).direction}};const ue=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=w(n),a=_(n),l="y"===S(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(f="end"===a?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},de=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=b(e,t),c={x:n,y:o},u=await R(t,l),d=S(w(r)),p=x(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=g(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o}}}}},pe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(r),g=S(a),x=w(a)===a,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),A=p||(x||!m?[T(a)]:function(e){const t=T(e);return[C(e),t,C(t)]}(a)),N="none"!==h;!p&&N&&A.push(...function(e,t,n,o){const r=_(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(w(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(C)))),i}(a,m,h,k));const j=[a,...A],P=await R(t,v),M=[];let L=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&M.push(P[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=_(e),r=O(e),i=E(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=T(s)),[s,T(s)]}(r,s,k);M.push(P[e[0]],P[e[1]])}if(L=[...L,{placement:r,overflows:M}],!M.every((e=>e<=0))){var D,I;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(I=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(N){const t=S(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},fe=(e,t,n)=>{const o=new Map,r={platform:ce,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=N(c,o,l),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=s;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:a}=e,{element:l,padding:u=0}=b(c,e)||{};if(null==l)return{};const p=k(u),f={x:t,y:n},h=O(o),m=E(h),v=await i.getDimensions(l),y="y"===h,w=y?"top":"left",x=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=r.reference[m]+r.reference[h]-f[h]-r.floating[m],T=f[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let N=A?A[S]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=s.floating[S]||r.floating[m]);const R=C/2-T/2,j=N/2-v[m]/2-1,P=d(p[w],j),M=d(p[x],j),L=P,D=N-v[m]-M,I=N/2-v[m]/2+R,F=g(L,I,D),H=!a.arrow&&null!=_(o)&&I!==F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):fe(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},ge=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),be=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},we=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,_e=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>_e(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!we(e)||!we(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>_e(e[n],t[n])))},xe=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Ee=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(xe(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Se="undefined"!=typeof window?u.useLayoutEffect:u.useEffect,Oe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ce={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Te=(0,u.createContext)({getTooltipData:()=>Ce});function ke(e="DEFAULT_TOOLTIP_ID"){return(0,u.useContext)(Te).getTooltipData(e)}var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Ne={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Re=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:s,place:a="top",offset:l=10,events:c=["hover"],openOnClick:f=!1,positionStrategy:m="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:j,afterShow:P,afterHide:L,content:D,contentWrapperRef:I,isOpen:F,defaultIsOpen:H=!1,setIsOpen:B,activeAnchor:U,setActiveAnchor:W,border:z,opacity:V,arrowColor:q,role:$="tooltip"})=>{var G;const X=(0,u.useRef)(null),K=(0,u.useRef)(null),J=(0,u.useRef)(null),Q=(0,u.useRef)(null),ee=(0,u.useRef)(null),[ne,oe]=(0,u.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[re,ie]=(0,u.useState)(!1),[se,ae]=(0,u.useState)(!1),[le,ce]=(0,u.useState)(null),ue=(0,u.useRef)(!1),de=(0,u.useRef)(null),{anchorRefs:pe,setActiveAnchor:fe}=ke(t),me=(0,u.useRef)(!1),[ve,ge]=(0,u.useState)([]),we=(0,u.useRef)(!1),xe=f||c.includes("click"),Ce=xe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Te=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&xe&&Object.assign(Te,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Re=k?{...k}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!k&&xe&&Object.assign(Re,{mouseleave:!1,blur:!1,mouseout:!1});const je=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ce||!1};N&&(Object.assign(Te,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Re,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(je,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Se((()=>(we.current=!0,()=>{we.current=!1})),[]);const Pe=e=>{we.current&&(e&&ae(!0),setTimeout((()=>{we.current&&(null==B||B(e),void 0===F&&ie(e))}),10))};(0,u.useEffect)((()=>{if(void 0===F)return()=>null;F&&ae(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,u.useEffect)((()=>{if(re!==ue.current)if(Oe(ee),ue.current=re,re)null==P||P();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{ae(!1),ce(null),null==L||L()}),e+25)}}),[re]);const Me=e=>{oe((t=>_e(t,e)?t:e))},Le=(e=g)=>{Oe(J),se?Pe(!0):J.current=setTimeout((()=>{Pe(!0)}),e)},De=(e=b)=>{Oe(Q),Q.current=setTimeout((()=>{me.current||Pe(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void fe({current:null});g?Le():Pe(!0),W(n),fe({current:n}),Oe(Q)},Fe=()=>{E?De(b||100):b?De():Pe(!1),Oe(J)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ye({place:null!==(n=null==le?void 0:le.place)&&void 0!==n?n:a,offset:l,elementReference:o,tooltipReference:X.current,tooltipArrowReference:K.current,strategy:m,middlewares:v,border:z}).then((e=>{Me(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),de.current=n},Ue=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=X.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ve].some((e=>null==e?void 0:e.contains(n)))||(Pe(!1),Oe(J)))},We=be(Ie,50,!0),ze=be(Fe,50,!0),Ve=e=>{ze.cancel(),We(e)},qe=()=>{We.cancel(),ze()},$e=(0,u.useCallback)((()=>{var e,t;const n=null!==(e=null==le?void 0:le.position)&&void 0!==e?e:j;n?He(n):w?de.current&&He(de.current):(null==U?void 0:U.isConnected)&&ye({place:null!==(t=null==le?void 0:le.place)&&void 0!==t?t:a,offset:l,elementReference:U,tooltipReference:X.current,tooltipArrowReference:K.current,strategy:m,middlewares:v,border:z}).then((e=>{we.current&&Me(e)}))}),[re,U,D,R,a,null==le?void 0:le.place,l,m,j,null==le?void 0:le.position,w]);(0,u.useEffect)((()=>{var e,t;const n=new Set(pe);ve.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&n.add({current:o});const r=()=>{Pe(!1)},s=Ee(U),a=Ee(X.current);je.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let l=null;je.resize?window.addEventListener("resize",r):U&&X.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Z(e),u=r||i?[...c?Y(c):[],...Y(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=M(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const v={rootMargin:-h(u)+"px "+-h(r.clientWidth-(c+f))+"px "+-h(r.clientHeight-(u+m))+"px "+-h(c)+"px",threshold:p(0,d(1,l))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!y)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}y=!1}try{o=new IntersectionObserver(g,{...v,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,v)}o.observe(e)}(!0),i}(c,n):null;let m,v=-1,y=null;s&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),c&&!l&&y.observe(c),y.observe(t));let g=l?te(e):null;return l&&function t(){const o=te(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==f||f(),null==(e=y)||e.disconnect(),y=null,l&&cancelAnimationFrame(m)}}(U,X.current,$e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Pe(!1)};je.escape&&window.addEventListener("keydown",c),je.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],f=e=>{re&&(null==e?void 0:e.target)===U||Ie(e)},m=e=>{re&&(null==e?void 0:e.target)===U&&Fe()},v=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Te).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:Ve}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:qe}):y.includes(e)&&u.push({event:e,listener:m}))})),w&&u.push({event:"pointermove",listener:Be});const g=()=>{me.current=!0},b=()=>{me.current=!1,Fe()};return E&&!Ce&&(null===(e=X.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;je.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),je.resize?window.removeEventListener("resize",r):null==l||l(),je.clickOutsideAnchor&&window.removeEventListener("click",Ue),je.escape&&window.removeEventListener("keydown",c),E&&!Ce&&(null===(e=X.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=X.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[U,$e,se,pe,ve,T,k,A,xe,g,b]),(0,u.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==le?void 0:le.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(U){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,U))&&(ae(!1),Pe(!1),W(null),Oe(J),Oe(Q),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&ge((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,s,null==le?void 0:le.anchorSelect,U]),(0,u.useEffect)((()=>{$e()}),[$e]),(0,u.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>$e()))}));return e.observe(I.current),()=>{e.disconnect()}}),[D,null==I?void 0:I.current]),(0,u.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ve,t];U&&n.includes(U)||W(null!==(e=ve[0])&&void 0!==e?e:t)}),[i,ve,U]),(0,u.useEffect)((()=>(H&&Pe(!0),()=>{Oe(J),Oe(Q)})),[]),(0,u.useEffect)((()=>{var e;let n=null!==(e=null==le?void 0:le.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,s,null==le?void 0:le.anchorSelect]),(0,u.useEffect)((()=>{J.current&&(Oe(J),Le(g))}),[g]);const Ge=null!==(G=null==le?void 0:le.content)&&void 0!==G?G:D,Xe=re&&Object.keys(ne.tooltipStyles).length>0;return(0,u.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Le(e.delay):Pe(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):Pe(!1)},activeAnchor:U,place:ne.place,isOpen:Boolean(se&&!_&&Ge&&Xe)}))),se&&!_&&Ge?u.createElement(y,{id:t,role:$,className:he("react-tooltip",Ae.tooltip,Ne.tooltip,Ne[r],n,`react-tooltip__place-${ne.place}`,Ae[Xe?"show":"closing"],Xe?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Ae.fixed,E&&Ae.clickable),onTransitionEnd:e=>{Oe(ee),re||"opacity"!==e.propertyName||(ae(!1),ce(null),null==L||L())},style:{...R,...ne.tooltipStyles,opacity:void 0!==V&&Xe?V:void 0},ref:X},Ge,u.createElement(y,{className:he("react-tooltip-arrow",Ae.arrow,Ne.arrow,o,x&&Ae.noArrow),style:{...ne.tooltipArrowStyles,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:K})):null},je=({content:e})=>u.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Pe=u.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:s,classNameArrow:a,variant:l="dark",place:c="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:j,isOpen:P,defaultIsOpen:M=!1,disableStyleInjection:L=!1,border:D,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,role:W="tooltip"},z)=>{const[V,q]=(0,u.useState)(o),[$,G]=(0,u.useState)(r),[X,Y]=(0,u.useState)(c),[K,Z]=(0,u.useState)(l),[J,Q]=(0,u.useState)(d),[ee,te]=(0,u.useState)(g),[ne,oe]=(0,u.useState)(b),[re,ie]=(0,u.useState)(w),[se,ae]=(0,u.useState)(_),[le,ce]=(0,u.useState)(p),[ue,de]=(0,u.useState)(h),[pe,fe]=(0,u.useState)(v),[me,ve]=(0,u.useState)(null),[ye,be]=(0,u.useState)(null),we=(0,u.useRef)(L),{anchorRefs:_e,activeAnchor:xe}=ke(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Se=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:c)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:r)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:l)},offset:e=>{Q(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{te(null===e?g:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{ae(null===e?_:"true"===e)},"class-name":e=>{ve(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,u.useEffect)((()=>{q(o)}),[o]),(0,u.useEffect)((()=>{G(r)}),[r]),(0,u.useEffect)((()=>{Y(c)}),[c]),(0,u.useEffect)((()=>{Z(l)}),[l]),(0,u.useEffect)((()=>{Q(d)}),[d]),(0,u.useEffect)((()=>{te(g)}),[g]),(0,u.useEffect)((()=>{oe(b)}),[b]),(0,u.useEffect)((()=>{ie(w)}),[w]),(0,u.useEffect)((()=>{ae(_)}),[_]),(0,u.useEffect)((()=>{fe(v)}),[v]),(0,u.useEffect)((()=>{we.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,u.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,u.useEffect)((()=>{var o;const r=new Set(_e);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(o=null!=ye?ye:s)&&void 0!==o?o:xe.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(a);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Ee(a);Se(e),l.observe(a,c)}return()=>{l.disconnect()}}),[_e,xe,ye,t,n]),(0,u.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!ge("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!ge("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Oe=f;const Ce=(0,u.useRef)(null);if(i){const e=i({content:(null==ye?void 0:ye.getAttribute("data-tooltip-content"))||V||null,activeAnchor:ye});Oe=e?u.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else V&&(Oe=V);$&&(Oe=u.createElement(je,{content:$}));const Te={forwardRef:z,id:e,anchorId:t,anchorSelect:n,className:he(s,me),classNameArrow:a,content:Oe,contentWrapperRef:Ce,place:X,variant:K,offset:J,wrapper:le,events:ue,openOnClick:m,positionStrategy:pe,middlewares:y,delayShow:ee,delayHide:ne,float:re,hidden:se,noArrow:x,clickable:E,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:j,isOpen:P,defaultIsOpen:M,border:D,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,activeAnchor:ye,setActiveAnchor:e=>be(e),role:W};return u.createElement(Re,{...Te})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ve({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ve({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Me=window.wp.apiFetch;var Le=n.n(Me);const De=window.ReactJSXRuntime,Ie=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,i._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,i._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,i._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,De.jsxs)("div",{className:"gatherpress-status__response",children:[(0,De.jsx)("span",{className:n[e][t].icon}),(0,De.jsx)("strong",{children:n[e][t].text})]})};function Fe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const He=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:s,enableInitialDecline:l,maxGuestLimit:u})=>{const[d,p]=(0,o.useState)(t.status),[f,h]=(0,o.useState)(Number(t.anonymous)),[m,v]=(0,o.useState)(t.guests),[y,g]=(0,o.useState)("hidden"),[b,w]=(0,o.useState)("false"),[_,x]=(0,o.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&c().setAppElement(".gatherpress-enabled");const E=e=>{e.preventDefault(),x(!1)},S=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Le()({path:Fe("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Fe("misc.nonce")}}).then((e=>{if(e.success){p(e.status),v(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&E(t)}}))},O=e=>{switch(e){case"attending":return(0,i.__)("You're attending","gatherpress");case"waiting_list":return(0,i.__)("You're wait listed","gatherpress");case"not_attending":return(0,i.__)("You're not attending","gatherpress")}return(0,i.__)("RSVP to this event","gatherpress")},C=()=>(0,De.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,De.jsx)("div",{className:"gatherpress-modal__header",children:(0,i.__)("Login Required","gatherpress")}),(0,De.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,De.jsx)("div",{className:"gatherpress-modal__text",children:a((0,i.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ -(0,i.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,i._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==Fe("urls.registrationUrl")&&(0,De.jsx)("div",{className:"gatherpress-modal__text",children:a((0,i.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ -(0,i.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,i._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,De.jsx)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,De.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,De.jsx)("a",{href:"#",onClick:E,className:"gatherpress-buttons__button wp-block-button__link",children:(0,i.__)("Close","gatherpress")})})})]}),T=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,i.__)("Attend","gatherpress")):(t="not_attending",n=(0,i._x)("Not Attending","action of not attending","gatherpress")),(0,De.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,De.jsx)("div",{className:"gatherpress-modal__header",children:O(d)?O(d):(0,De.jsx)(r.Spinner,{})}),(0,De.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,De.jsx)("div",{className:"gatherpress-modal__text",children:a((0,i.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ -(0,i.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);v(t),S(e,d,f,t,!1)},defaultValue:m})]}),s&&(0,De.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,De.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);h(t),S(e,d,t,0,!1)},checked:f}),(0,De.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,i.__)("Only admins will see your identity.","gatherpress"),children:(0,i.__)("List me as anonymous.","gatherpress")}),(0,De.jsx)(Pe,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,De.jsxs)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,De.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,De.jsx)("a",{href:"#",onClick:e=>S(e,t,f,"not_attending"!==t?m:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,De.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,De.jsx)("a",{href:"#",onClick:E,className:"gatherpress-buttons__button wp-block-button__link",children:(0,i.__)("Close","gatherpress")})})]}),l&&"no_status"===d&&1!==f?(0,De.jsx)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,De.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,De.jsx)("a",{href:"#",onClick:e=>S(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,i._x)("Not Attending","Responded Status","gatherpress")})})}):(0,De.jsx)(De.Fragment,{})]})};return(0,De.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,De.jsxs)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,De.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,De.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":b,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(g("hidden"===y?"show":"hidden"),w("false"===b?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),x(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,i.__)("Edit RSVP","gatherpress")}return(0,i.__)("RSVP","gatherpress")})(d)})}),(0,De.jsxs)(c(),{isOpen:_,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,i.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,De.jsx)(C,{}),0!==t.length&&(0,De.jsx)(T,{status:d})]})]}),"no_status"!==d&&(0,De.jsxs)("div",{className:"gatherpress-status",children:[(0,De.jsx)(Ie,{type:n,status:d}),0{const[i,s]=(0,o.useState)(r);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},e);let a="";return"object"==typeof i&&void 0!==i[t]&&(r=[...i[t].responses],n&&(r=r.splice(0,n)),a=r.map(((e,t)=>{const{name:n,photo:o}=e;return(0,De.jsx)("figure",{className:"gatherpress-rsvp-response__member-avatar",children:(0,De.jsx)("img",{alt:n,title:n,src:o})},t)}))),(0,De.jsx)(De.Fragment,{children:a})},Ue=e=>{const{type:t,event:n,eventOptions:o}=e,r="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,i=a(n[r]),s="gatherpress-events-list";let l="location";const c=n.venue?.is_online_event;return c&&(l="video-alt2"),(0,De.jsxs)("div",{className:`${s}`,children:[(0,De.jsx)("div",{className:`${s}__header`,children:(0,De.jsxs)("div",{className:`${s}__info`,children:[o.showFeaturedImage&&(0,De.jsx)("figure",{className:`${s}__image`,children:(0,De.jsx)("a",{href:n.permalink,children:i})}),(0,De.jsx)("div",{className:`${s}__datetime`,children:(0,De.jsx)("strong",{children:n.datetime_start})}),(0,De.jsx)("div",{className:`${s}__title`,children:(0,De.jsx)("a",{href:n.permalink,children:a(n.title)})}),n.venue&&o.showVenue&&(0,De.jsxs)("div",{className:`${s}__venue`,children:[(0,De.jsx)("span",{className:`dashicons dashicons-${l}`}),!c&&(0,De.jsx)("a",{href:n.venue.permalink,children:a(n.venue.name)}),c&&(0,De.jsx)("span",{children:a(n.venue.name)})]}),o.showDescription&&(0,De.jsx)("div",{className:`${s}__content`,children:(0,De.jsx)("div",{className:`${s}__excerpt`,children:a((u=n.excerpt,u.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))})})]})}),(0,De.jsxs)("div",{className:`${s}__footer`,children:[o.showRsvpResponse&&(0,De.jsx)("div",{className:"gatherpress-rsvp-response__items",children:(0,De.jsx)(Be,{postId:n.ID,value:"attending",responses:n.responses,limit:"3"})}),"upcoming"===t&&o.showRsvp&&(0,De.jsx)(He,{postId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.gatherpress_enable_anonymous_rsvp,enableInitialDecline:n.gatherpress_enable_initial_decline}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,De.jsx)(Ie,{type:t,status:n.current_user?.status})]})]});var u},We=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:s,type:a,topics:l,venues:c}=e,[u,d]=(0,o.useState)([]),[p,f]=(0,o.useState)(!1),h=u.map((e=>(0,De.jsx)(Ue,{eventOptions:t,type:a,event:e},e.ID)));return(0,o.useEffect)((()=>{let e="",t="";"object"==typeof l&&(e=l.map((e=>e.slug))?.join(",")),"object"==typeof c&&(t=c.map((e=>e.slug))?.join(","));const o=Fe("urls.eventRestApi")+`/events-list?event_list_type=${a}&max_number=${n}&datetime_format=${s}&topics=${e}&venues=${t}`;Fe("misc.isUserLoggedIn")?Le()({path:o}).then((e=>{f(!0),d(e)})):fetch(o).then((e=>e.json())).then((e=>{f(!0),d(e)}))}),[d,n,s,a,l,c]),(0,De.jsxs)("div",{className:`gatherpress-${a}-events-list`,children:[!p&&(0,De.jsx)(r.Spinner,{}),p&&0===u.length&&(()=>{const e="upcoming"===a?(0,i.__)("There are no upcoming events.","gatherpress"):(0,i.__)("There are no past events.","gatherpress");return(0,De.jsx)("div",{className:`gatherpress-${a}-events__no_events_message`,children:e})})(),p&&h]})};t()((()=>{const e=document.querySelectorAll('[data-gatherpress_block_name="events-list"]');for(let a=0;a{var e={5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?E(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?E(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?E(e.children):[];var a=new h(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return a.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var a,l=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(y=d(y,{key:y.key||m})),o.push(c(y,v,m));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(v.name,b,w),v,m))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if(n.trim&&_)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),l}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==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:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,a=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,a=!1;function l(){a=!0}function c(){if(a){if(a=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,a=n[0],l=n[n.length-1],c=i();if(e===c){if(!s)return;o=l}if(l!==c||s||(o=a),a===c&&s&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?l:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(o,a))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n};var r=o(n(9788))},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const o=window.wp.element,r=window.wp.components,i=window.wp.i18n;var s=n(442);const a=s.default||s;var l=n(312),c=n.n(l),u=n(1609);const d=Math.min,p=Math.max,f=Math.round,h=Math.floor,m=e=>({x:e,y:e}),v={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function g(e,t,n){return p(e,d(t,n))}function b(e,t){return"function"==typeof e?e(t):e}function w(e){return e.split("-")[0]}function _(e){return e.split("-")[1]}function x(e){return"x"===e?"y":"x"}function E(e){return"y"===e?"height":"width"}function S(e){return["top","bottom"].includes(w(e))?"y":"x"}function O(e){return x(S(e))}function C(e){return e.replace(/start|end/g,(e=>y[e]))}function T(e){return e.replace(/left|right|bottom|top/g,(e=>v[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function N(e,t,n){let{reference:o,floating:r}=e;const i=S(t),s=O(t),a=E(s),l=w(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(_(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=b(t,e),h=k(f),m=a[p?"floating"===d?"reference":"floating":d],v=A(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},_=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-_.top+h.top)/w.y,bottom:(_.bottom-v.bottom+h.bottom)/w.y,left:(v.left-_.left+h.left)/w.x,right:(_.right-v.right+h.right)/w.x}}function j(){return"undefined"!=typeof window}function P(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return!!j()&&(e instanceof Node||e instanceof M(e).Node)}function I(e){return!!j()&&(e instanceof Element||e instanceof M(e).Element)}function F(e){return!!j()&&(e instanceof HTMLElement||e instanceof M(e).HTMLElement)}function H(e){return!(!j()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function U(e){return["table","td","th"].includes(P(e))}function W(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function z(e){const t=V(),n=I(e)?$(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function q(e){return["html","body","#document"].includes(P(e))}function $(e){return M(e).getComputedStyle(e)}function G(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if("html"===P(e))return e;const t=e.assignedSlot||e.parentNode||H(e)&&e.host||L(e);return H(t)?t.host:t}function Y(e){const t=X(e);return q(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&B(t)?t:Y(t)}function K(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Y(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=M(r);if(i){const e=Z(s);return t.concat(s,s.visualViewport||[],B(r)?r:[],e&&n?K(e):[])}return t.concat(r,K(r,[],n))}function Z(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J(e){const t=$(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=F(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=f(n)!==i||f(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Q(e){return I(e)?e:e.contextElement}function ee(e){const t=Q(e);if(!F(t))return m(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=J(t);let s=(i?f(n.width):n.width)/o,a=(i?f(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const te=m(0);function ne(e){const t=M(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:te}function oe(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Q(e);let s=m(1);t&&(o?I(o)&&(s=ee(o)):s=ee(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==M(e))&&t}(i,n,o)?ne(i):m(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=M(i),t=o&&I(o)?M(o):o;let n=e,r=Z(n);for(;r&&o&&t!==n;){const e=ee(r),t=r.getBoundingClientRect(),o=$(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=M(r),r=Z(n)}}return A({width:u,height:d,x:l,y:c})}function re(e,t){const n=G(e).scrollLeft;return t?t.left+n:oe(L(e)).left+n}function ie(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=M(e),o=L(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const e=V();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)o=function(e){const t=L(e),n=G(e),o=e.ownerDocument.body,r=p(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=p(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+re(e);const a=-n.scrollTop;return"rtl"===$(o).direction&&(s+=p(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(L(e));else if(I(t))o=function(e,t){const n=oe(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=F(e)?ee(e):m(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ne(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return A(o)}function se(e,t){const n=X(e);return!(n===t||!I(n)||q(n))&&("fixed"===$(n).position||se(n,t))}function ae(e,t,n){const o=F(t),r=L(t),i="fixed"===n,s=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=m(0);if(o||!o&&!i)if(("body"!==P(t)||B(r))&&(a=G(t)),o){const e=oe(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=re(r));let c=0,u=0;if(r&&!o&&!i){const e=r.getBoundingClientRect();u=e.top+a.scrollTop,c=e.left+a.scrollLeft-re(r,e)}return{x:s.left+a.scrollLeft-l.x-c,y:s.top+a.scrollTop-l.y-u,width:s.width,height:s.height}}function le(e){return"static"===$(e).position}function ce(e,t){if(!F(e)||"fixed"===$(e).position)return null;if(t)return t(e);let n=e.offsetParent;return L(e)===n&&(n=n.ownerDocument.body),n}function ue(e,t){const n=M(e);if(W(e))return n;if(!F(e)){let t=X(e);for(;t&&!q(t);){if(I(t)&&!le(t))return t;t=X(t)}return n}let o=ce(e,t);for(;o&&U(o)&&le(o);)o=ce(o,t);return o&&q(o)&&le(o)&&!z(o)?n:o||function(e){let t=X(e);for(;F(t)&&!q(t);){if(z(t))return t;if(W(t))return null;t=X(t)}return null}(e)||n}const de={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=L(o),a=!!t&&W(t.floating);if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=m(1);const u=m(0),d=F(o);if((d||!d&&!i)&&(("body"!==P(o)||B(s))&&(l=G(o)),F(o))){const e=oe(o);c=ee(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?W(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=K(e,[],!1).filter((e=>I(e)&&"body"!==P(e))),r=null;const i="fixed"===$(e).position;let s=i?X(e):e;for(;I(s)&&!q(s);){const t=$(s),n=z(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||B(s)&&!n&&se(e,s))?o=o.filter((e=>e!==s)):r=t,s=X(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],a=i.reduce(((e,n)=>{const o=ie(t,n,r);return e.top=p(o.top,e.top),e.right=d(o.right,e.right),e.bottom=d(o.bottom,e.bottom),e.left=p(o.left,e.left),e}),ie(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ue,getElementRects:async function(e){const t=this.getOffsetParent||ue,n=this.getDimensions,o=await n(e.floating);return{reference:ae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=J(e);return{width:t,height:n}},getScale:ee,isElement:I,isRTL:function(e){return"rtl"===$(e).direction}};const pe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=w(n),a=_(n),l="y"===S(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=b(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(f="end"===a?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},fe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=b(e,t),c={x:n,y:o},u=await R(t,l),d=S(w(r)),p=x(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=g(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=g(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[p]:i,[d]:s}}}}}},he=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=b(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=w(r),g=S(a),x=w(a)===a,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),A=p||(x||!m?[T(a)]:function(e){const t=T(e);return[C(e),t,C(t)]}(a)),N="none"!==h;!p&&N&&A.push(...function(e,t,n,o){const r=_(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(w(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(C)))),i}(a,m,h,k));const j=[a,...A],P=await R(t,v),M=[];let L=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&M.push(P[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=_(e),r=O(e),i=E(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=T(s)),[s,T(s)]}(r,s,k);M.push(P[e[0]],P[e[1]])}if(L=[...L,{placement:r,overflows:M}],!M.every((e=>e<=0))){var D,I;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(I=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(N){const t=S(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},me=(e,t,n)=>{const o=new Map,r={platform:de,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=N(c,o,l),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=s;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:a}=e,{element:l,padding:u=0}=b(c,e)||{};if(null==l)return{};const p=k(u),f={x:t,y:n},h=O(o),m=E(h),v=await i.getDimensions(l),y="y"===h,w=y?"top":"left",x=y?"bottom":"right",S=y?"clientHeight":"clientWidth",C=r.reference[m]+r.reference[h]-f[h]-r.floating[m],T=f[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let N=A?A[S]:0;N&&await(null==i.isElement?void 0:i.isElement(A))||(N=s.floating[S]||r.floating[m]);const R=C/2-T/2,j=N/2-v[m]/2-1,P=d(p[w],j),M=d(p[x],j),L=P,D=N-v[m]-M,I=N/2-v[m]/2+R,F=g(L,I,D),H=!a.arrow&&null!=_(o)&&I!==F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):me(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},we=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_e=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},xe=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ee=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ee(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!xe(e)||!xe(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>Ee(e[n],t[n])))},Se=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Oe=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Se(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ce="undefined"!=typeof window?u.useLayoutEffect:u.useEffect,Te=e=>{e.current&&(clearTimeout(e.current),e.current=null)},ke={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Ae=(0,u.createContext)({getTooltipData:()=>ke});function Ne(e="DEFAULT_TOOLTIP_ID"){return(0,u.useContext)(Ae).getTooltipData(e)}var Re={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},je={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Pe=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:s,place:a="top",offset:l=10,events:c=["hover"],openOnClick:f=!1,positionStrategy:m="absolute",middlewares:v,wrapper:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:j,afterShow:P,afterHide:M,disableTooltip:D,content:I,contentWrapperRef:F,isOpen:H,defaultIsOpen:B=!1,setIsOpen:U,activeAnchor:W,setActiveAnchor:z,border:V,opacity:q,arrowColor:$,role:G="tooltip"})=>{var X;const Y=(0,u.useRef)(null),Z=(0,u.useRef)(null),J=(0,u.useRef)(null),ee=(0,u.useRef)(null),te=(0,u.useRef)(null),[ne,re]=(0,u.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[ie,se]=(0,u.useState)(!1),[ae,le]=(0,u.useState)(!1),[ce,ue]=(0,u.useState)(null),de=(0,u.useRef)(!1),pe=(0,u.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=Ne(t),me=(0,u.useRef)(!1),[ye,ge]=(0,u.useState)([]),we=(0,u.useRef)(!1),xe=f||c.includes("click"),Se=xe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),ke=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&xe&&Object.assign(ke,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ae=k?{...k}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!k&&xe&&Object.assign(Ae,{mouseleave:!1,blur:!1,mouseout:!1});const Pe=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Se||!1};N&&(Object.assign(ke,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ae,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Pe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ce((()=>(we.current=!0,()=>{we.current=!1})),[]);const Me=e=>{we.current&&(e&&le(!0),setTimeout((()=>{we.current&&(null==U||U(e),void 0===H&&se(e))}),10))};(0,u.useEffect)((()=>{if(void 0===H)return()=>null;H&&le(!0);const e=setTimeout((()=>{se(H)}),10);return()=>{clearTimeout(e)}}),[H]),(0,u.useEffect)((()=>{if(ie!==de.current)if(Te(te),de.current=ie,ie)null==P||P();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{le(!1),ue(null),null==M||M()}),e+25)}}),[ie]);const Le=e=>{re((t=>Ee(t,e)?t:e))},De=(e=g)=>{Te(J),ae?Me(!0):J.current=setTimeout((()=>{Me(!0)}),e)},Ie=(e=b)=>{Te(ee),ee.current=setTimeout((()=>{me.current||Me(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return z(null),void he({current:null});g?De():Me(!0),z(n),he({current:n}),Te(ee)},He=()=>{E?Ie(b||100):b?Ie():Me(!1),Te(J)},Be=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};be({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:a,offset:l,elementReference:o,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:m,middlewares:v,border:V}).then((e=>{Le(e)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),pe.current=n},We=e=>{var t;if(!ie)return;const n=e.target;n.isConnected&&((null===(t=Y.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ye].some((e=>null==e?void 0:e.contains(n)))||(Me(!1),Te(J)))},ze=_e(Fe,50,!0),Ve=_e(He,50,!0),qe=e=>{Ve.cancel(),ze(e)},$e=()=>{ze.cancel(),Ve()},Ge=(0,u.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:j;n?Be(n):w?pe.current&&Be(pe.current):(null==W?void 0:W.isConnected)&&be({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:a,offset:l,elementReference:W,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:m,middlewares:v,border:V}).then((e=>{we.current&&Le(e)}))}),[ie,W,I,R,a,null==ce?void 0:ce.place,l,m,j,null==ce?void 0:ce.position,w]);(0,u.useEffect)((()=>{var e,t;const n=new Set(fe);ye.forEach((e=>{(null==D?void 0:D(e))||n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&!(null==D?void 0:D(o))&&n.add({current:o});const r=()=>{Me(!1)},s=Oe(W),a=Oe(Y.current);Pe.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let l=null;Pe.resize?window.addEventListener("resize",r):W&&Y.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=Q(e),u=r||i?[...c?K(c):[],...K(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&a?function(e,t){let n,o=null;const r=L(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const v={rootMargin:-h(u)+"px "+-h(r.clientWidth-(c+f))+"px "+-h(r.clientHeight-(u+m))+"px "+-h(c)+"px",threshold:p(0,d(1,l))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!y)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}y=!1}try{o=new IntersectionObserver(g,{...v,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,v)}o.observe(e)}(!0),i}(c,n):null;let m,v=-1,y=null;s&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&y&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),c&&!l&&y.observe(c),y.observe(t));let g=l?oe(e):null;return l&&function t(){const o=oe(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==f||f(),null==(e=y)||e.disconnect(),y=null,l&&cancelAnimationFrame(m)}}(W,Y.current,Ge,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Me(!1)};Pe.escape&&window.addEventListener("keydown",c),Pe.clickOutsideAnchor&&window.addEventListener("click",We);const u=[],f=e=>{ie&&(null==e?void 0:e.target)===W||Fe(e)},m=e=>{ie&&(null==e?void 0:e.target)===W&&He()},v=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(ke).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:qe}):y.includes(e)&&u.push({event:e,listener:f}))})),Object.entries(Ae).forEach((([e,t])=>{t&&(v.includes(e)?u.push({event:e,listener:$e}):y.includes(e)&&u.push({event:e,listener:m}))})),w&&u.push({event:"pointermove",listener:Ue});const g=()=>{me.current=!0},b=()=>{me.current=!1,He()};return E&&!Se&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Pe.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Pe.resize?window.removeEventListener("resize",r):null==l||l(),Pe.clickOutsideAnchor&&window.removeEventListener("click",We),Pe.escape&&window.removeEventListener("keydown",c),E&&!Se&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Ge,ae,fe,ye,T,k,A,xe,g,b]),(0,u.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(le(!1),Me(!1),z(null),Te(J),Te(ee),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&ge((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,s,null==ce?void 0:ce.anchorSelect,W]),(0,u.useEffect)((()=>{Ge()}),[Ge]),(0,u.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ge()))}));return e.observe(F.current),()=>{e.disconnect()}}),[I,null==F?void 0:F.current]),(0,u.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ye,t];W&&n.includes(W)||z(null!==(e=ye[0])&&void 0!==e?e:t)}),[i,ye,W]),(0,u.useEffect)((()=>(B&&Me(!0),()=>{Te(J),Te(ee)})),[]),(0,u.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,s,null==ce?void 0:ce.anchorSelect]),(0,u.useEffect)((()=>{J.current&&(Te(J),De(g))}),[g]);const Xe=null!==(X=null==ce?void 0:ce.content)&&void 0!==X?X:I,Ye=ie&&Object.keys(ne.tooltipStyles).length>0;return(0,u.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Me(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):Me(!1)},activeAnchor:W,place:ne.place,isOpen:Boolean(ae&&!_&&Xe&&Ye)}))),ae&&!_&&Xe?u.createElement(y,{id:t,role:G,className:ve("react-tooltip",Re.tooltip,je.tooltip,je[r],n,`react-tooltip__place-${ne.place}`,Re[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Re.fixed,E&&Re.clickable),onTransitionEnd:e=>{Te(te),ie||"opacity"!==e.propertyName||(le(!1),ue(null),null==M||M())},style:{...R,...ne.tooltipStyles,opacity:void 0!==q&&Ye?q:void 0},ref:Y},Xe,u.createElement(y,{className:ve("react-tooltip-arrow",Re.arrow,je.arrow,o,x&&Re.noArrow),style:{...ne.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:Z})):null},Me=({content:e})=>u.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Le=u.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:s,classNameArrow:a,variant:l="dark",place:c="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N=!1,style:R,position:j,isOpen:P,defaultIsOpen:M=!1,disableStyleInjection:L=!1,border:D,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,disableTooltip:W,role:z="tooltip"},V)=>{const[q,$]=(0,u.useState)(o),[G,X]=(0,u.useState)(r),[Y,K]=(0,u.useState)(c),[Z,J]=(0,u.useState)(l),[Q,ee]=(0,u.useState)(d),[te,ne]=(0,u.useState)(g),[oe,re]=(0,u.useState)(b),[ie,se]=(0,u.useState)(w),[ae,le]=(0,u.useState)(_),[ce,ue]=(0,u.useState)(p),[de,pe]=(0,u.useState)(h),[fe,he]=(0,u.useState)(v),[me,ye]=(0,u.useState)(null),[ge,be]=(0,u.useState)(null),_e=(0,u.useRef)(L),{anchorRefs:xe,activeAnchor:Ee}=Ne(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:o)},html:e=>{X(null!=e?e:r)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:l)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ne(null===e?g:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{se(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,u.useEffect)((()=>{$(o)}),[o]),(0,u.useEffect)((()=>{X(r)}),[r]),(0,u.useEffect)((()=>{K(c)}),[c]),(0,u.useEffect)((()=>{J(l)}),[l]),(0,u.useEffect)((()=>{ee(d)}),[d]),(0,u.useEffect)((()=>{ne(g)}),[g]),(0,u.useEffect)((()=>{re(b)}),[b]),(0,u.useEffect)((()=>{se(w)}),[w]),(0,u.useEffect)((()=>{le(_)}),[_]),(0,u.useEffect)((()=>{he(v)}),[v]),(0,u.useEffect)((()=>{_e.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,u.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,u.useEffect)((()=>{var o;const r=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(o=null!=ge?ge:s)&&void 0!==o?o:Ee.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(a);Oe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Se(a);Oe(e),l.observe(a,c)}return()=>{l.disconnect()}}),[xe,Ee,ge,t,n]),(0,u.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!we("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!we("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Ce=f;const Te=(0,u.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||q||null,activeAnchor:ge});Ce=e?u.createElement("div",{ref:Te,className:"react-tooltip-content-wrapper"},e):null}else q&&(Ce=q);G&&(Ce=u.createElement(Me,{content:G}));const ke={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:ve(s,me),classNameArrow:a,content:Ce,contentWrapperRef:Te,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:m,positionStrategy:fe,middlewares:y,delayShow:te,delayHide:oe,float:ie,hidden:ae,noArrow:x,clickable:E,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:R,position:j,isOpen:P,defaultIsOpen:M,border:D,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,disableTooltip:W,activeAnchor:ge,setActiveAnchor:e=>be(e),role:z};return u.createElement(Pe,{...ke})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ge({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ge({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const De=window.wp.apiFetch;var Ie=n.n(De);const Fe=window.ReactJSXRuntime,He=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,i._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,i._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,i._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,i._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,Fe.jsxs)("div",{className:"gatherpress-status__response",children:[(0,Fe.jsx)("span",{className:n[e][t].icon}),(0,Fe.jsx)("strong",{children:n[e][t].text})]})};function Be(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Ue=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:s,enableInitialDecline:l,maxGuestLimit:u})=>{const[d,p]=(0,o.useState)(t.status),[f,h]=(0,o.useState)(Number(t.anonymous)),[m,v]=(0,o.useState)(t.guests),[y,g]=(0,o.useState)("hidden"),[b,w]=(0,o.useState)("false"),[_,x]=(0,o.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&c().setAppElement(".gatherpress-enabled");const E=e=>{e.preventDefault(),x(!1)},S=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Ie()({path:Be("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Be("misc.nonce")}}).then((e=>{if(e.success){p(e.status),v(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&E(t)}}))},O=e=>{switch(e){case"attending":return(0,i.__)("You're attending","gatherpress");case"waiting_list":return(0,i.__)("You're wait listed","gatherpress");case"not_attending":return(0,i.__)("You're not attending","gatherpress")}return(0,i.__)("RSVP to this event","gatherpress")},C=()=>(0,Fe.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__header",children:(0,i.__)("Login Required","gatherpress")}),(0,Fe.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:a((0,i.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ +(0,i.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,i._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==Be("urls.registrationUrl")&&(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:a((0,i.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ +(0,i.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,i._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,Fe.jsx)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:E,className:"gatherpress-buttons__button wp-block-button__link",children:(0,i.__)("Close","gatherpress")})})})]}),T=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,i.__)("Attend","gatherpress")):(t="not_attending",n=(0,i._x)("Not Attending","action of not attending","gatherpress")),(0,Fe.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__header",children:O(d)?O(d):(0,Fe.jsx)(r.Spinner,{})}),(0,Fe.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:a((0,i.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ +(0,i.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);v(t),S(e,d,f,t,!1)},defaultValue:m})]}),s&&(0,Fe.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,Fe.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);h(t),S(e,d,t,0,!1)},checked:f}),(0,Fe.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,i.__)("Only admins will see your identity.","gatherpress"),children:(0,i.__)("List me as anonymous.","gatherpress")}),(0,Fe.jsx)(Le,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,Fe.jsxs)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,Fe.jsx)("a",{href:"#",onClick:e=>S(e,t,f,"not_attending"!==t?m:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:E,className:"gatherpress-buttons__button wp-block-button__link",children:(0,i.__)("Close","gatherpress")})})]}),l&&"no_status"===d&&1!==f?(0,Fe.jsx)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:e=>S(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,i._x)("Not Attending","Responded Status","gatherpress")})})}):(0,Fe.jsx)(Fe.Fragment,{})]})};return(0,Fe.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,Fe.jsxs)(r.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":b,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(g("hidden"===y?"show":"hidden"),w("false"===b?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),x(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,i.__)("Edit RSVP","gatherpress")}return(0,i.__)("RSVP","gatherpress")})(d)})}),(0,Fe.jsxs)(c(),{isOpen:_,onRequestClose:E,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,i.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,Fe.jsx)(C,{}),0!==t.length&&(0,Fe.jsx)(T,{status:d})]})]}),"no_status"!==d&&(0,Fe.jsxs)("div",{className:"gatherpress-status",children:[(0,Fe.jsx)(He,{type:n,status:d}),0{const[i,s]=(0,o.useState)(r);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},e);let a="";return"object"==typeof i&&void 0!==i[t]&&(r=[...i[t].responses],n&&(r=r.splice(0,n)),a=r.map(((e,t)=>{const{name:n,photo:o}=e;return(0,Fe.jsx)("figure",{className:"gatherpress-rsvp-response__member-avatar",children:(0,Fe.jsx)("img",{alt:n,title:n,src:o})},t)}))),(0,Fe.jsx)(Fe.Fragment,{children:a})},ze=e=>{const{type:t,event:n,eventOptions:o}=e,r="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,i=a(n[r]),s="gatherpress-events-list";let l="location";const c=n.venue?.is_online_event;return c&&(l="video-alt2"),(0,Fe.jsxs)("div",{className:`${s}`,children:[(0,Fe.jsx)("div",{className:`${s}__header`,children:(0,Fe.jsxs)("div",{className:`${s}__info`,children:[o.showFeaturedImage&&(0,Fe.jsx)("figure",{className:`${s}__image`,children:(0,Fe.jsx)("a",{href:n.permalink,children:i})}),(0,Fe.jsx)("div",{className:`${s}__datetime`,children:(0,Fe.jsx)("strong",{children:n.datetime_start})}),(0,Fe.jsx)("div",{className:`${s}__title`,children:(0,Fe.jsx)("a",{href:n.permalink,children:a(n.title)})}),n.venue&&o.showVenue&&(0,Fe.jsxs)("div",{className:`${s}__venue`,children:[(0,Fe.jsx)("span",{className:`dashicons dashicons-${l}`}),!c&&(0,Fe.jsx)("a",{href:n.venue.permalink,children:a(n.venue.name)}),c&&(0,Fe.jsx)("span",{children:a(n.venue.name)})]}),o.showDescription&&(0,Fe.jsx)("div",{className:`${s}__content`,children:(0,Fe.jsx)("div",{className:`${s}__excerpt`,children:a((u=n.excerpt,u.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))})})]})}),(0,Fe.jsxs)("div",{className:`${s}__footer`,children:[o.showRsvpResponse&&(0,Fe.jsx)("div",{className:"gatherpress-rsvp-response__items",children:(0,Fe.jsx)(We,{postId:n.ID,value:"attending",responses:n.responses,limit:"3"})}),"upcoming"===t&&o.showRsvp&&(0,Fe.jsx)(Ue,{postId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.gatherpress_enable_anonymous_rsvp,enableInitialDecline:n.gatherpress_enable_initial_decline}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,Fe.jsx)(He,{type:t,status:n.current_user?.status})]})]});var u},Ve=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:s,type:a,topics:l,venues:c}=e,[u,d]=(0,o.useState)([]),[p,f]=(0,o.useState)(!1),h=u.map((e=>(0,Fe.jsx)(ze,{eventOptions:t,type:a,event:e},e.ID)));return(0,o.useEffect)((()=>{let e="",t="";"object"==typeof l&&(e=l.map((e=>e.slug))?.join(",")),"object"==typeof c&&(t=c.map((e=>e.slug))?.join(","));const o=Be("urls.eventRestApi")+`/events-list?event_list_type=${a}&max_number=${n}&datetime_format=${s}&topics=${e}&venues=${t}`;Be("misc.isUserLoggedIn")?Ie()({path:o}).then((e=>{f(!0),d(e)})):fetch(o).then((e=>e.json())).then((e=>{f(!0),d(e)}))}),[d,n,s,a,l,c]),(0,Fe.jsxs)("div",{className:`gatherpress-${a}-events-list`,children:[!p&&(0,Fe.jsx)(r.Spinner,{}),p&&0===u.length&&(()=>{const e="upcoming"===a?(0,i.__)("There are no upcoming events.","gatherpress"):(0,i.__)("There are no past events.","gatherpress");return(0,Fe.jsx)("div",{className:`gatherpress-${a}-events__no_events_message`,children:e})})(),p&&h]})};t()((()=>{const e=document.querySelectorAll('[data-gatherpress_block_name="events-list"]');for(let a=0;a array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '97b565c364ee272e7701'); + array('lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4842db94aa23d20de87e'); diff --git a/build/blocks/events-list/index.js b/build/blocks/events-list/index.js index 3d6d9f8e7..2eb706e72 100644 --- a/build/blocks/events-list/index.js +++ b/build/blocks/events-list/index.js @@ -1,5 +1,5 @@ -(()=>{var e,t={8937:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.lodash;var i=n(6942),s=n.n(i),a=n(442);const l=a.default||a,c=window.wp.i18n,u=window.wp.blockEditor,d=window.wp.components,p=window.wp.coreData,f=window.wp.data,h=window.wp.element;var m=n(312),v=n.n(m),y=n(1609);const g=Math.min,b=Math.max,w=Math.round,_=Math.floor,x=e=>({x:e,y:e}),S={left:"right",right:"left",bottom:"top",top:"bottom"},O={start:"end",end:"start"};function E(e,t,n){return b(e,g(t,n))}function C(e,t){return"function"==typeof e?e(t):e}function k(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function R(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(k(e))?"y":"x"}function j(e){return A(N(e))}function P(e){return e.replace(/start|end/g,(e=>O[e]))}function L(e){return e.replace(/left|right|bottom|top/g,(e=>S[e]))}function D(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function M(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function I(e,t,n){let{reference:o,floating:r}=e;const i=N(t),s=j(t),a=R(s),l=k(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(T(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function F(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=C(t,e),h=D(f),m=a[p?"floating"===d?"reference":"floating":d],v=M(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=M(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}function H(e){return W(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function U(e){var t;return null==(t=(W(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function W(e){return e instanceof Node||e instanceof B(e).Node}function V(e){return e instanceof Element||e instanceof B(e).Element}function z(e){return e instanceof HTMLElement||e instanceof B(e).HTMLElement}function q(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof B(e).ShadowRoot)}function $(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function G(e){return["table","td","th"].includes(H(e))}function X(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Y(e){const t=K(),n=V(e)?J(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function K(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Z(e){return["html","body","#document"].includes(H(e))}function J(e){return B(e).getComputedStyle(e)}function Q(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ee(e){if("html"===H(e))return e;const t=e.assignedSlot||e.parentNode||q(e)&&e.host||U(e);return q(t)?t.host:t}function te(e){const t=ee(e);return Z(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&$(t)?t:te(t)}function ne(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=te(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=B(r);return i?t.concat(s,s.visualViewport||[],$(r)?r:[],s.frameElement&&n?ne(s.frameElement):[]):t.concat(r,ne(r,[],n))}function oe(e){const t=J(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=z(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=w(n)!==i||w(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function re(e){return V(e)?e:e.contextElement}function ie(e){const t=re(e);if(!z(t))return x(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=oe(t);let s=(i?w(n.width):n.width)/o,a=(i?w(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const se=x(0);function ae(e){const t=B(e);return K()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:se}function le(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=re(e);let s=x(1);t&&(o?V(o)&&(s=ie(o)):s=ie(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==B(e))&&t}(i,n,o)?ae(i):x(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=B(i),t=o&&V(o)?B(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=ie(r),t=r.getBoundingClientRect(),o=J(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=B(r),r=n.frameElement}}return M({width:u,height:d,x:l,y:c})}function ce(e){return le(U(e)).left+Q(e).scrollLeft}function ue(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=B(e),o=U(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const e=K();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)o=function(e){const t=U(e),n=Q(e),o=e.ownerDocument.body,r=b(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=b(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ce(e);const a=-n.scrollTop;return"rtl"===J(o).direction&&(s+=b(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(U(e));else if(V(t))o=function(e,t){const n=le(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=z(e)?ie(e):x(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ae(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return M(o)}function de(e,t){const n=ee(e);return!(n===t||!V(n)||Z(n))&&("fixed"===J(n).position||de(n,t))}function pe(e,t,n){const o=z(t),r=U(t),i="fixed"===n,s=le(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=x(0);if(o||!o&&!i)if(("body"!==H(t)||$(r))&&(a=Q(t)),o){const e=le(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=ce(r));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function fe(e){return"static"===J(e).position}function he(e,t){return z(e)&&"fixed"!==J(e).position?t?t(e):e.offsetParent:null}function me(e,t){const n=B(e);if(X(e))return n;if(!z(e)){let t=ee(e);for(;t&&!Z(t);){if(V(t)&&!fe(t))return t;t=ee(t)}return n}let o=he(e,t);for(;o&&G(o)&&fe(o);)o=he(o,t);return o&&Z(o)&&fe(o)&&!Y(o)?n:o||function(e){let t=ee(e);for(;z(t)&&!Z(t);){if(Y(t))return t;if(X(t))return null;t=ee(t)}return null}(e)||n}const ve={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=U(o),a=!!t&&X(t.floating);if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=x(1);const u=x(0),d=z(o);if((d||!d&&!i)&&(("body"!==H(o)||$(s))&&(l=Q(o)),z(o))){const e=le(o);c=ie(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:U,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?X(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=ne(e,[],!1).filter((e=>V(e)&&"body"!==H(e))),r=null;const i="fixed"===J(e).position;let s=i?ee(e):e;for(;V(s)&&!Z(s);){const t=J(s),n=Y(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||$(s)&&!n&&de(e,s))?o=o.filter((e=>e!==s)):r=t,s=ee(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],a=i.reduce(((e,n)=>{const o=ue(t,n,r);return e.top=b(o.top,e.top),e.right=g(o.right,e.right),e.bottom=g(o.bottom,e.bottom),e.left=b(o.left,e.left),e}),ue(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:me,getElementRects:async function(e){const t=this.getOffsetParent||me,n=this.getDimensions,o=await n(e.floating);return{reference:pe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=oe(e);return{width:t,height:n}},getScale:ie,isElement:V,isRTL:function(e){return"rtl"===J(e).direction}};const ye=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=k(n),a=T(n),l="y"===N(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=C(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(f="end"===a?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},ge=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),c={x:n,y:o},u=await F(t,l),d=N(k(r)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o}}}}},be=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=C(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=k(r),g=N(a),b=k(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(b||!m?[L(a)]:function(e){const t=L(e);return[P(e),t,P(t)]}(a)),x="none"!==h;!p&&x&&_.push(...function(e,t,n,o){const r=T(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(k(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(P)))),i}(a,m,h,w));const S=[a,..._],O=await F(t,v),E=[];let A=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&E.push(O[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=T(e),r=j(e),i=R(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,w);E.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:r,overflows:E}],!E.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(M=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var I;const e=null==(I=A.filter((e=>{if(x){const t=N(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},we=(e,t,n)=>{const o=new Map,r={platform:ve,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=I(c,o,l),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=s;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:a}=e,{element:l,padding:u=0}=C(c,e)||{};if(null==l)return{};const d=D(u),p={x:t,y:n},f=j(o),h=R(f),m=await i.getDimensions(l),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",_=r.reference[h]+r.reference[f]-p[f]-r.floating[h],x=p[f]-r.reference[f],S=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let O=S?S[w]:0;O&&await(null==i.isElement?void 0:i.isElement(S))||(O=s.floating[w]||r.floating[h]);const k=_/2-x/2,A=O/2-m[h]/2-1,N=g(d[y],A),P=g(d[b],A),L=N,M=O-m[h]-P,I=O/2-m[h]/2+k,F=E(L,I,M),H=!a.arrow&&null!=T(o)&&I!==F&&r.reference[h]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):we(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Oe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Ee=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},Ce=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ke=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ke(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Ce(e)||!Ce(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>ke(e[n],t[n])))},Te=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Ae=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Te(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Re="undefined"!=typeof window?y.useLayoutEffect:y.useEffect,Ne=e=>{e.current&&(clearTimeout(e.current),e.current=null)},je={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Pe=(0,y.createContext)({getTooltipData:()=>je});function Le(e="DEFAULT_TOOLTIP_ID"){return(0,y.useContext)(Pe).getTooltipData(e)}var De={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Me={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ie=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:s,anchorSelect:a,place:l="top",offset:c=10,events:u=["hover"],openOnClick:d=!1,positionStrategy:p="absolute",middlewares:f,wrapper:h,delayShow:m=0,delayHide:v=0,float:w=!1,hidden:x=!1,noArrow:S=!1,clickable:O=!1,closeOnEsc:E=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:j,position:P,afterShow:L,afterHide:D,content:M,contentWrapperRef:I,isOpen:F,defaultIsOpen:H=!1,setIsOpen:B,activeAnchor:W,setActiveAnchor:V,border:z,opacity:q,arrowColor:$,role:G="tooltip"})=>{var X;const Y=(0,y.useRef)(null),K=(0,y.useRef)(null),Z=(0,y.useRef)(null),J=(0,y.useRef)(null),Q=(0,y.useRef)(null),[ee,te]=(0,y.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[oe,ie]=(0,y.useState)(!1),[se,ae]=(0,y.useState)(!1),[ce,ue]=(0,y.useState)(null),de=(0,y.useRef)(!1),pe=(0,y.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=Le(t),me=(0,y.useRef)(!1),[ve,ye]=(0,y.useState)([]),ge=(0,y.useRef)(!1),be=d||u.includes("click"),we=be||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),_e=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&be&&Object.assign(_e,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const xe=A?{...A}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!A&&be&&Object.assign(xe,{mouseleave:!1,blur:!1,mouseout:!1});const Oe=R?{...R}:{escape:E||!1,scroll:C||!1,resize:k||!1,clickOutsideAnchor:we||!1};N&&(Object.assign(_e,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(xe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Oe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Re((()=>(ge.current=!0,()=>{ge.current=!1})),[]);const Ce=e=>{ge.current&&(e&&ae(!0),setTimeout((()=>{ge.current&&(null==B||B(e),void 0===F&&ie(e))}),10))};(0,y.useEffect)((()=>{if(void 0===F)return()=>null;F&&ae(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,y.useEffect)((()=>{if(oe!==de.current)if(Ne(Q),de.current=oe,oe)null==L||L();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();Q.current=setTimeout((()=>{ae(!1),ue(null),null==D||D()}),e+25)}}),[oe]);const Te=e=>{te((t=>ke(t,e)?t:e))},je=(e=m)=>{Ne(Z),se?Ce(!0):Z.current=setTimeout((()=>{Ce(!0)}),e)},Pe=(e=v)=>{Ne(J),J.current=setTimeout((()=>{me.current||Ce(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return V(null),void he({current:null});m?je():Ce(!0),V(n),he({current:n}),Ne(J)},Fe=()=>{O?Pe(v||100):v?Pe():Ce(!1),Ne(Z)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Se({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:l,offset:c,elementReference:o,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:p,middlewares:f,border:z}).then((e=>{Te(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),pe.current=n},Ue=e=>{var t;if(!oe)return;const n=e.target;n.isConnected&&((null===(t=Y.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...ve].some((e=>null==e?void 0:e.contains(n)))||(Ce(!1),Ne(Z)))},We=Ee(Ie,50,!0),Ve=Ee(Fe,50,!0),ze=e=>{Ve.cancel(),We(e)},qe=()=>{We.cancel(),Ve()},$e=(0,y.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:P;n?He(n):w?pe.current&&He(pe.current):(null==W?void 0:W.isConnected)&&Se({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:l,offset:c,elementReference:W,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:p,middlewares:f,border:z}).then((e=>{ge.current&&Te(e)}))}),[oe,W,M,j,l,null==ce?void 0:ce.place,c,p,P,null==ce?void 0:ce.position,w]);(0,y.useEffect)((()=>{var e,t;const n=new Set(fe);ve.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${s}']`);o&&n.add({current:o});const r=()=>{Ce(!1)},i=Ae(W),a=Ae(Y.current);Oe.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let l=null;Oe.resize?window.addEventListener("resize",r):W&&Y.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=re(e),u=r||i?[...c?ne(c):[],...ne(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,o=null;const r=U(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const f={rootMargin:-_(u)+"px "+-_(r.clientWidth-(c+d))+"px "+-_(r.clientHeight-(u+p))+"px "+-_(c)+"px",threshold:b(0,g(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{o=new IntersectionObserver(m,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;s&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?le(e):null;return l&&function t(){const o=le(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(W,Y.current,$e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ce(!1)};Oe.escape&&window.addEventListener("keydown",c),Oe.clickOutsideAnchor&&window.addEventListener("click",Ue);const u=[],d=e=>{oe&&(null==e?void 0:e.target)===W||Ie(e)},p=e=>{oe&&(null==e?void 0:e.target)===W&&Fe()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(_e).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:ze}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(xe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:qe}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:Be});const m=()=>{me.current=!0},v=()=>{me.current=!1,Fe()};return O&&!we&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Oe.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Oe.resize?window.removeEventListener("resize",r):null==l||l(),Oe.clickOutsideAnchor&&window.removeEventListener("click",Ue),Oe.escape&&window.removeEventListener("keydown",c),O&&!we&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,$e,se,fe,ve,T,A,R,be,m,v]),(0,y.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(ae(!1),Ce(!1),V(null),Ne(Z),Ne(J),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&ye((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,a,null==ce?void 0:ce.anchorSelect,W]),(0,y.useEffect)((()=>{$e()}),[$e]),(0,y.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>$e()))}));return e.observe(I.current),()=>{e.disconnect()}}),[M,null==I?void 0:I.current]),(0,y.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...ve,t];W&&n.includes(W)||V(null!==(e=ve[0])&&void 0!==e?e:t)}),[s,ve,W]),(0,y.useEffect)((()=>(H&&Ce(!0),()=>{Ne(Z),Ne(J)})),[]),(0,y.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ye(e)}catch(e){ye([])}}),[t,a,null==ce?void 0:ce.anchorSelect]),(0,y.useEffect)((()=>{Z.current&&(Ne(Z),je(m))}),[m]);const Ge=null!==(X=null==ce?void 0:ce.content)&&void 0!==X?X:M,Xe=oe&&Object.keys(ee.tooltipStyles).length>0;return(0,y.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?je(e.delay):Ce(!0)},close:e=>{(null==e?void 0:e.delay)?Pe(e.delay):Ce(!1)},activeAnchor:W,place:ee.place,isOpen:Boolean(se&&!x&&Ge&&Xe)}))),se&&!x&&Ge?y.createElement(h,{id:t,role:G,className:i("react-tooltip",De.tooltip,Me.tooltip,Me[r],n,`react-tooltip__place-${ee.place}`,De[Xe?"show":"closing"],Xe?"react-tooltip__show":"react-tooltip__closing","fixed"===p&&De.fixed,O&&De.clickable),onTransitionEnd:e=>{Ne(Q),oe||"opacity"!==e.propertyName||(ae(!1),ue(null),null==D||D())},style:{...j,...ee.tooltipStyles,opacity:void 0!==q&&Xe?q:void 0},ref:Y},Ge,y.createElement(h,{className:i("react-tooltip-arrow",De.arrow,Me.arrow,o,S&&De.noArrow),style:{...ee.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:K})):null},Fe=({content:e})=>y.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),He=y.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:s,className:a,classNameArrow:l,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:g,delayShow:b=0,delayHide:w=0,float:_=!1,hidden:x=!1,noArrow:S=!1,clickable:O=!1,closeOnEsc:E=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N=!1,style:j,position:P,isOpen:L,defaultIsOpen:D=!1,disableStyleInjection:M=!1,border:I,opacity:F,arrowColor:H,setIsOpen:B,afterShow:U,afterHide:W,role:V="tooltip"},z)=>{const[q,$]=(0,y.useState)(o),[G,X]=(0,y.useState)(r),[Y,K]=(0,y.useState)(u),[Z,J]=(0,y.useState)(c),[Q,ee]=(0,y.useState)(d),[te,ne]=(0,y.useState)(b),[oe,re]=(0,y.useState)(w),[ie,se]=(0,y.useState)(_),[ae,le]=(0,y.useState)(x),[ce,ue]=(0,y.useState)(p),[de,pe]=(0,y.useState)(h),[fe,he]=(0,y.useState)(v),[me,ve]=(0,y.useState)(null),[ye,ge]=(0,y.useState)(null),be=(0,y.useRef)(M),{anchorRefs:we,activeAnchor:_e}=Le(e),xe=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:u)},content:e=>{$(null!=e?e:o)},html:e=>{X(null!=e?e:r)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{ne(null===e?b:Number(e))},"delay-hide":e=>{re(null===e?w:Number(e))},float:e=>{se(null===e?_:"true"===e)},hidden:e=>{le(null===e?x:"true"===e)},"class-name":e=>{ve(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,y.useEffect)((()=>{$(o)}),[o]),(0,y.useEffect)((()=>{X(r)}),[r]),(0,y.useEffect)((()=>{K(u)}),[u]),(0,y.useEffect)((()=>{J(c)}),[c]),(0,y.useEffect)((()=>{ee(d)}),[d]),(0,y.useEffect)((()=>{ne(b)}),[b]),(0,y.useEffect)((()=>{re(w)}),[w]),(0,y.useEffect)((()=>{se(_)}),[_]),(0,y.useEffect)((()=>{le(x)}),[x]),(0,y.useEffect)((()=>{he(v)}),[v]),(0,y.useEffect)((()=>{be.current!==M&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[M]),(0,y.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===M,disableBase:M}}))}),[]),(0,y.useEffect)((()=>{var o;const r=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(o=null!=ye?ye:s)&&void 0!==o?o:_e.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=xe(a);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=xe(a);Se(e),l.observe(a,c)}return()=>{l.disconnect()}}),[we,_e,ye,t,n]),(0,y.useEffect)((()=>{(null==j?void 0:j.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),I&&!Oe("border",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`border\`.`),(null==j?void 0:j.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!Oe("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`)}),[]);let Ee=f;const Ce=(0,y.useRef)(null);if(s){const e=s({content:(null==ye?void 0:ye.getAttribute("data-tooltip-content"))||q||null,activeAnchor:ye});Ee=e?y.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else q&&(Ee=q);G&&(Ee=y.createElement(Fe,{content:G}));const ke={forwardRef:z,id:e,anchorId:t,anchorSelect:n,className:i(a,me),classNameArrow:l,content:Ee,contentWrapperRef:Ce,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:m,positionStrategy:fe,middlewares:g,delayShow:te,delayHide:oe,float:ie,hidden:ae,noArrow:S,clickable:O,closeOnEsc:E,closeOnScroll:C,closeOnResize:k,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:j,position:P,isOpen:L,defaultIsOpen:D,border:I,opacity:F,arrowColor:H,setIsOpen:B,afterShow:U,afterHide:W,activeAnchor:ye,setActiveAnchor:e=>ge(e),role:V};return y.createElement(Ie,{...ke})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||xe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||xe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Be=window.wp.apiFetch;var Ue=n.n(Be);const We=window.ReactJSXRuntime,Ve=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,c._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,c._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,c._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,We.jsxs)("div",{className:"gatherpress-status__response",children:[(0,We.jsx)("span",{className:n[e][t].icon}),(0,We.jsx)("strong",{children:n[e][t].text})]})};function ze(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const qe=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:o,enableInitialDecline:r,maxGuestLimit:i})=>{const[s,a]=(0,h.useState)(t.status),[u,p]=(0,h.useState)(Number(t.anonymous)),[f,m]=(0,h.useState)(t.guests),[y,g]=(0,h.useState)("hidden"),[b,w]=(0,h.useState)("false"),[_,x]=(0,h.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&v().setAppElement(".gatherpress-enabled");const S=e=>{e.preventDefault(),x(!1)},O=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Ue()({path:ze("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:ze("misc.nonce")}}).then((e=>{if(e.success){a(e.status),m(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&S(t)}}))},E=e=>{switch(e){case"attending":return(0,c.__)("You're attending","gatherpress");case"waiting_list":return(0,c.__)("You're wait listed","gatherpress");case"not_attending":return(0,c.__)("You're not attending","gatherpress")}return(0,c.__)("RSVP to this event","gatherpress")},C=()=>(0,We.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,We.jsx)("div",{className:"gatherpress-modal__header",children:(0,c.__)("Login Required","gatherpress")}),(0,We.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,We.jsx)("div",{className:"gatherpress-modal__text",children:l((0,c.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ -(0,c.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,c._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==ze("urls.registrationUrl")&&(0,We.jsx)("div",{className:"gatherpress-modal__text",children:l((0,c.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ -(0,c.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,c._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,We.jsx)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,We.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,We.jsx)("a",{href:"#",onClick:S,className:"gatherpress-buttons__button wp-block-button__link",children:(0,c.__)("Close","gatherpress")})})})]}),k=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,c.__)("Attend","gatherpress")):(t="not_attending",n=(0,c._x)("Not Attending","action of not attending","gatherpress")),(0,We.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,We.jsx)("div",{className:"gatherpress-modal__header",children:E(s)?E(s):(0,We.jsx)(d.Spinner,{})}),(0,We.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,We.jsx)("div",{className:"gatherpress-modal__text",children:l((0,c.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ -(0,c.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);m(t),O(e,s,u,t,!1)},defaultValue:f})]}),o&&(0,We.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,We.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);p(t),O(e,s,t,0,!1)},checked:u}),(0,We.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,c.__)("Only admins will see your identity.","gatherpress"),children:(0,c.__)("List me as anonymous.","gatherpress")}),(0,We.jsx)(He,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,We.jsxs)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,We.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,We.jsx)("a",{href:"#",onClick:e=>O(e,t,u,"not_attending"!==t?f:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,We.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,We.jsx)("a",{href:"#",onClick:S,className:"gatherpress-buttons__button wp-block-button__link",children:(0,c.__)("Close","gatherpress")})})]}),r&&"no_status"===s&&1!==u?(0,We.jsx)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,We.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,We.jsx)("a",{href:"#",onClick:e=>O(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,c._x)("Not Attending","Responded Status","gatherpress")})})}):(0,We.jsx)(We.Fragment,{})]})};return(0,We.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,We.jsxs)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,We.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,We.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":b,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(g("hidden"===y?"show":"hidden"),w("false"===b?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),x(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,c.__)("Edit RSVP","gatherpress")}return(0,c.__)("RSVP","gatherpress")})(s)})}),(0,We.jsxs)(v(),{isOpen:_,onRequestClose:S,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,c.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,We.jsx)(C,{}),0!==t.length&&(0,We.jsx)(k,{status:s})]})]}),"no_status"!==s&&(0,We.jsxs)("div",{className:"gatherpress-status",children:[(0,We.jsx)(Ve,{type:n,status:s}),0{const[r,i]=(0,h.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:i},e);let s="";return"object"==typeof r&&void 0!==r[t]&&(o=[...r[t].responses],n&&(o=o.splice(0,n)),s=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,We.jsx)("figure",{className:"gatherpress-rsvp-response__member-avatar",children:(0,We.jsx)("img",{alt:n,title:n,src:o})},t)}))),(0,We.jsx)(We.Fragment,{children:s})},Ge=e=>{const{type:t,event:n,eventOptions:o}=e,r="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,i=l(n[r]),s="gatherpress-events-list";let a="location";const c=n.venue?.is_online_event;return c&&(a="video-alt2"),(0,We.jsxs)("div",{className:`${s}`,children:[(0,We.jsx)("div",{className:`${s}__header`,children:(0,We.jsxs)("div",{className:`${s}__info`,children:[o.showFeaturedImage&&(0,We.jsx)("figure",{className:`${s}__image`,children:(0,We.jsx)("a",{href:n.permalink,children:i})}),(0,We.jsx)("div",{className:`${s}__datetime`,children:(0,We.jsx)("strong",{children:n.datetime_start})}),(0,We.jsx)("div",{className:`${s}__title`,children:(0,We.jsx)("a",{href:n.permalink,children:l(n.title)})}),n.venue&&o.showVenue&&(0,We.jsxs)("div",{className:`${s}__venue`,children:[(0,We.jsx)("span",{className:`dashicons dashicons-${a}`}),!c&&(0,We.jsx)("a",{href:n.venue.permalink,children:l(n.venue.name)}),c&&(0,We.jsx)("span",{children:l(n.venue.name)})]}),o.showDescription&&(0,We.jsx)("div",{className:`${s}__content`,children:(0,We.jsx)("div",{className:`${s}__excerpt`,children:l((u=n.excerpt,u.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))})})]})}),(0,We.jsxs)("div",{className:`${s}__footer`,children:[o.showRsvpResponse&&(0,We.jsx)("div",{className:"gatherpress-rsvp-response__items",children:(0,We.jsx)($e,{postId:n.ID,value:"attending",responses:n.responses,limit:"3"})}),"upcoming"===t&&o.showRsvp&&(0,We.jsx)(qe,{postId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.gatherpress_enable_anonymous_rsvp,enableInitialDecline:n.gatherpress_enable_initial_decline}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,We.jsx)(Ve,{type:t,status:n.current_user?.status})]})]});var u},Xe=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:o,type:r,topics:i,venues:s}=e,[a,l]=(0,h.useState)([]),[u,p]=(0,h.useState)(!1),f=a.map((e=>(0,We.jsx)(Ge,{eventOptions:t,type:r,event:e},e.ID)));return(0,h.useEffect)((()=>{let e="",t="";"object"==typeof i&&(e=i.map((e=>e.slug))?.join(",")),"object"==typeof s&&(t=s.map((e=>e.slug))?.join(","));const a=ze("urls.eventRestApi")+`/events-list?event_list_type=${r}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`;ze("misc.isUserLoggedIn")?Ue()({path:a}).then((e=>{p(!0),l(e)})):fetch(a).then((e=>e.json())).then((e=>{p(!0),l(e)}))}),[l,n,o,r,i,s]),(0,We.jsxs)("div",{className:`gatherpress-${r}-events-list`,children:[!u&&(0,We.jsx)(d.Spinner,{}),u&&0===a.length&&(()=>{const e="upcoming"===r?(0,c.__)("There are no upcoming events.","gatherpress"):(0,c.__)("There are no past events.","gatherpress");return(0,We.jsx)("div",{className:`gatherpress-${r}-events__no_events_message`,children:e})})(),u&&f]})},Ye=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,We.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,We.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},Ke=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.1","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"datetimeFormat":{"type":"string","default":"D, M j, Y, g:i a T"},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(Ke,{edit:e=>{var t,n,o;const{attributes:i,setAttributes:a}=e,h=(0,u.useBlockProps)(),{topics:m,venues:v}=i,{topicsList:y}=(0,f.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{topicsList:t("taxonomy","gatherpress_topic",{per_page:-1,context:"view"})}}),[]),{venueList:g}=(0,f.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{venueList:t("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})}}),[]),b=null!==(t=y?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},w=null!==(n=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)(u.InspectorControls,{children:[(0,We.jsxs)(d.PanelBody,{children:[(0,We.jsx)("p",{children:(0,c.__)("Event List type","gatherpress")}),(0,We.jsxs)(d.ButtonGroup,{className:"block-editor-block-styles__variants",children:[(0,We.jsx)(d.Button,{className:s()("block-editor-block-styles__item",{"is-active":"upcoming"===i.type}),variant:"secondary",label:(0,c.__)("Upcoming","gatherpress"),onClick:()=>{a({type:"upcoming"})},children:(0,We.jsx)(d.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0,children:(0,c.__)("Upcoming","gatherpress")})}),(0,We.jsx)(d.Button,{className:s()("block-editor-block-styles__item",{"is-active":"past"===i.type}),variant:"secondary",label:(0,c.__)("Past","gatherpress"),onClick:()=>{a({type:"past"})},children:(0,We.jsx)(d.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0,children:(0,c.__)("Past","gatherpress")})})]})]}),(0,We.jsxs)(d.PanelBody,{children:[(0,We.jsx)(d.TextControl,{label:(0,c.__)("Date & time format","gatherpress"),value:i.datetimeFormat,help:l((0,c.__)('For more information read the Documentation on date and time formatting.',"gatherpress")),onChange:e=>a({datetimeFormat:e})}),(0,We.jsx)(d.RangeControl,{label:(0,c.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(i.maxNumberOfEvents,10),onChange:e=>a({maxNumberOfEvents:e})}),(0,We.jsx)(d.FormTokenField,{label:(0,c.__)("Topics","gatherpress"),value:m&&m.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(b),onChange:e=>{if(e.some((e=>"string"==typeof e&&!b[e])))return;const t=e.map((e=>"string"==typeof e?b[e]:e));if((0,r.includes)(t,null))return!1;a({topics:t})},maxSuggestions:20},"query-controls-topics-select"),(0,We.jsx)(d.FormTokenField,{label:(0,c.__)("Venues","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(w),onChange:e=>{if(e.some((e=>"string"==typeof e&&!w[e])))return;const t=e.map((e=>"string"==typeof e?w[e]:e));if((0,r.includes)(t,null))return!1;a({venues:t})},maxSuggestions:20},"query-controls-venues-select")]}),(0,We.jsxs)(d.PanelBody,{children:[(0,We.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide All RSVP Responses","gatherpress"),help:i.eventOptions.showRsvpResponse?(0,c.__)("Show All RSVP Responses","gatherpress"):(0,c.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=i.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{a({eventOptions:{...i.eventOptions,showRsvpResponse:e}})}}),(0,We.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide My RSVP Response"),help:i.eventOptions.showRsvp?(0,c.__)("Show My RSVP Response"):(0,c.__)("Hide My RSVP Response"),checked:i.eventOptions.showRsvp,onChange:e=>{a({eventOptions:{...i.eventOptions,showRsvp:e}})}}),(0,We.jsx)(d.SelectControl,{label:(0,c.__)("Image Size Options","gatherpress"),value:i.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>a({eventOptions:{...i.eventOptions,imageSize:e}})}),(0,We.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide Featured Image","gatherpress"),help:i.eventOptions.showFeaturedImage?(0,c.__)("Show Featured Image","gatherpress"):(0,c.__)("Hide Featured Image","gatherpress"),checked:i.eventOptions.showFeaturedImage,onChange:e=>{a({eventOptions:{...i.eventOptions,showFeaturedImage:e}})}}),(0,We.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide Description","gatherpress"),help:i.eventOptions.showDescription?(0,c.__)("Show Description","gatherpress"):(0,c.__)("Hide Description","gatherpress"),checked:i.eventOptions.showDescription,onChange:e=>{a({eventOptions:{...i.eventOptions,showDescription:e}})}}),(0,We.jsx)(d.TextControl,{label:(0,c.__)("Description Limit"),help:(0,c.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(i.eventOptions.descriptionLimit),onChange:e=>a({eventOptions:{...i.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,We.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Event Venue"),help:i.eventOptions.showVenue?(0,c.__)("Show Event Venue"):(0,c.__)("Hide Event Venue"),checked:i.eventOptions.showVenue,onChange:e=>{a({eventOptions:{...i.eventOptions,showVenue:e}})}})]})]}),(0,We.jsx)("div",{...h,children:(0,We.jsx)(Ye,{children:(0,We.jsx)(Xe,{eventOptions:i.eventOptions,maxNumberOfEvents:i.maxNumberOfEvents,datetimeFormat:i.datetimeFormat,type:i.type,topics:i.topics,venues:i.venues})})})]})},save:()=>null})},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?S(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?S(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?S(e.children):[];var a=new h(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function S(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return a.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var a,l=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(y=d(y,{key:y.key||m})),o.push(c(y,v,m));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(v.name,b,w),v,m))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if(n.trim&&_)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),l}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==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:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,a=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,a=!1;function l(){a=!0}function c(){if(a){if(a=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,a=n[0],l=n[n.length-1],c=i();if(e===c){if(!s)return;o=l}if(l!==c||s||(o=a),a===c&&s&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?l:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(o,a))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9788));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={105:0,149:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var u=l(o)}for(t&&t(n);co(8937)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={8937:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.lodash;var i=n(6942),s=n.n(i),a=n(442);const l=a.default||a,c=window.wp.i18n,u=window.wp.blockEditor,d=window.wp.components,p=window.wp.coreData,f=window.wp.data,h=window.wp.element;var m=n(312),v=n.n(m),y=n(1609);const g=Math.min,b=Math.max,w=Math.round,_=Math.floor,x=e=>({x:e,y:e}),S={left:"right",right:"left",bottom:"top",top:"bottom"},O={start:"end",end:"start"};function E(e,t,n){return b(e,g(t,n))}function C(e,t){return"function"==typeof e?e(t):e}function k(e){return e.split("-")[0]}function T(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function R(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(k(e))?"y":"x"}function j(e){return A(N(e))}function P(e){return e.replace(/start|end/g,(e=>O[e]))}function L(e){return e.replace(/left|right|bottom|top/g,(e=>S[e]))}function D(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function M(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function I(e,t,n){let{reference:o,floating:r}=e;const i=N(t),s=j(t),a=R(s),l=k(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(T(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function F(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=C(t,e),h=D(f),m=a[p?"floating"===d?"reference":"floating":d],v=M(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=M(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}function H(){return"undefined"!=typeof window}function B(e){return V(e)?(e.nodeName||"").toLowerCase():"#document"}function U(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function W(e){var t;return null==(t=(V(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function V(e){return!!H()&&(e instanceof Node||e instanceof U(e).Node)}function z(e){return!!H()&&(e instanceof Element||e instanceof U(e).Element)}function q(e){return!!H()&&(e instanceof HTMLElement||e instanceof U(e).HTMLElement)}function $(e){return!(!H()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof U(e).ShadowRoot)}function G(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Q(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function X(e){return["table","td","th"].includes(B(e))}function Y(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function K(e){const t=Z(),n=z(e)?Q(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function J(e){return["html","body","#document"].includes(B(e))}function Q(e){return U(e).getComputedStyle(e)}function ee(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function te(e){if("html"===B(e))return e;const t=e.assignedSlot||e.parentNode||$(e)&&e.host||W(e);return $(t)?t.host:t}function ne(e){const t=te(e);return J(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&G(t)?t:ne(t)}function oe(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=ne(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=U(r);if(i){const e=re(s);return t.concat(s,s.visualViewport||[],G(r)?r:[],e&&n?oe(e):[])}return t.concat(r,oe(r,[],n))}function re(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ie(e){const t=Q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=q(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=w(n)!==i||w(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function se(e){return z(e)?e:e.contextElement}function ae(e){const t=se(e);if(!q(t))return x(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=ie(t);let s=(i?w(n.width):n.width)/o,a=(i?w(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const le=x(0);function ce(e){const t=U(e);return Z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ue(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=se(e);let s=x(1);t&&(o?z(o)&&(s=ae(o)):s=ae(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==U(e))&&t}(i,n,o)?ce(i):x(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=U(i),t=o&&z(o)?U(o):o;let n=e,r=re(n);for(;r&&o&&t!==n;){const e=ae(r),t=r.getBoundingClientRect(),o=Q(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=U(r),r=re(n)}}return M({width:u,height:d,x:l,y:c})}function de(e,t){const n=ee(e).scrollLeft;return t?t.left+n:ue(W(e)).left+n}function pe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=U(e),o=W(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const e=Z();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)o=function(e){const t=W(e),n=ee(e),o=e.ownerDocument.body,r=b(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=b(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+de(e);const a=-n.scrollTop;return"rtl"===Q(o).direction&&(s+=b(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(W(e));else if(z(t))o=function(e,t){const n=ue(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=q(e)?ae(e):x(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ce(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return M(o)}function fe(e,t){const n=te(e);return!(n===t||!z(n)||J(n))&&("fixed"===Q(n).position||fe(n,t))}function he(e,t,n){const o=q(t),r=W(t),i="fixed"===n,s=ue(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=x(0);if(o||!o&&!i)if(("body"!==B(t)||G(r))&&(a=ee(t)),o){const e=ue(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=de(r));let c=0,u=0;if(r&&!o&&!i){const e=r.getBoundingClientRect();u=e.top+a.scrollTop,c=e.left+a.scrollLeft-de(r,e)}return{x:s.left+a.scrollLeft-l.x-c,y:s.top+a.scrollTop-l.y-u,width:s.width,height:s.height}}function me(e){return"static"===Q(e).position}function ve(e,t){if(!q(e)||"fixed"===Q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return W(e)===n&&(n=n.ownerDocument.body),n}function ye(e,t){const n=U(e);if(Y(e))return n;if(!q(e)){let t=te(e);for(;t&&!J(t);){if(z(t)&&!me(t))return t;t=te(t)}return n}let o=ve(e,t);for(;o&&X(o)&&me(o);)o=ve(o,t);return o&&J(o)&&me(o)&&!K(o)?n:o||function(e){let t=te(e);for(;q(t)&&!J(t);){if(K(t))return t;if(Y(t))return null;t=te(t)}return null}(e)||n}const ge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=W(o),a=!!t&&Y(t.floating);if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=x(1);const u=x(0),d=q(o);if((d||!d&&!i)&&(("body"!==B(o)||G(s))&&(l=ee(o)),q(o))){const e=ue(o);c=ae(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:W,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?Y(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=oe(e,[],!1).filter((e=>z(e)&&"body"!==B(e))),r=null;const i="fixed"===Q(e).position;let s=i?te(e):e;for(;z(s)&&!J(s);){const t=Q(s),n=K(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||G(s)&&!n&&fe(e,s))?o=o.filter((e=>e!==s)):r=t,s=te(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],a=i.reduce(((e,n)=>{const o=pe(t,n,r);return e.top=b(o.top,e.top),e.right=g(o.right,e.right),e.bottom=g(o.bottom,e.bottom),e.left=b(o.left,e.left),e}),pe(t,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ye,getElementRects:async function(e){const t=this.getOffsetParent||ye,n=this.getDimensions,o=await n(e.floating);return{reference:he(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ie(e);return{width:t,height:n}},getScale:ae,isElement:z,isRTL:function(e){return"rtl"===Q(e).direction}};const be=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=k(n),a=T(n),l="y"===N(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=C(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(f="end"===a?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},we=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=C(e,t),c={x:n,y:o},u=await F(t,l),d=N(k(r)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[p]:i,[d]:s}}}}}},_e=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=C(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=k(r),g=N(a),b=k(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=p||(b||!m?[L(a)]:function(e){const t=L(e);return[P(e),t,P(t)]}(a)),x="none"!==h;!p&&x&&_.push(...function(e,t,n,o){const r=T(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(k(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(P)))),i}(a,m,h,w));const S=[a,..._],O=await F(t,v),E=[];let A=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&E.push(O[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=T(e),r=j(e),i=R(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,w);E.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:r,overflows:E}],!E.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(M=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var I;const e=null==(I=A.filter((e=>{if(x){const t=N(e.placement);return t===g||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},xe=(e,t,n)=>{const o=new Map,r={platform:ge,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=I(c,o,l),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const l=s;return n?(l.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:a}=e,{element:l,padding:u=0}=C(c,e)||{};if(null==l)return{};const d=D(u),p={x:t,y:n},f=j(o),h=R(f),m=await i.getDimensions(l),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",_=r.reference[h]+r.reference[f]-p[f]-r.floating[h],x=p[f]-r.reference[f],S=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let O=S?S[w]:0;O&&await(null==i.isElement?void 0:i.isElement(S))||(O=s.floating[w]||r.floating[h]);const k=_/2-x/2,A=O/2-m[h]/2-1,N=g(d[y],A),P=g(d[b],A),L=N,M=O-m[h]-P,I=O/2-m[h]/2+k,F=E(L,I,M),H=!a.arrow&&null!=T(o)&&I!==F&&r.reference[h]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:a},{x:l,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let p=0;if(a){const e=`${a}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=l?`${l}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):xe(e,t,{placement:"bottom",strategy:i,middleware:l}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Ce=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},Te=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ae=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ae(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Te(e)||!Te(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>Ae(e[n],t[n])))},Re=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Ne=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Re(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},je="undefined"!=typeof window?y.useLayoutEffect:y.useEffect,Pe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Le={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},De=(0,y.createContext)({getTooltipData:()=>Le});function Me(e="DEFAULT_TOOLTIP_ID"){return(0,y.useContext)(De).getTooltipData(e)}var Ie={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Fe={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const He=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:s,anchorSelect:a,place:l="top",offset:c=10,events:u=["hover"],openOnClick:d=!1,positionStrategy:p="absolute",middlewares:f,wrapper:h,delayShow:m=0,delayHide:v=0,float:w=!1,hidden:x=!1,noArrow:S=!1,clickable:O=!1,closeOnEsc:E=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:j,position:P,afterShow:L,afterHide:D,disableTooltip:M,content:I,contentWrapperRef:F,isOpen:H,defaultIsOpen:B=!1,setIsOpen:U,activeAnchor:V,setActiveAnchor:z,border:q,opacity:$,arrowColor:G,role:X="tooltip"})=>{var Y;const K=(0,y.useRef)(null),Z=(0,y.useRef)(null),J=(0,y.useRef)(null),Q=(0,y.useRef)(null),ee=(0,y.useRef)(null),[te,ne]=(0,y.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[re,ie]=(0,y.useState)(!1),[ae,le]=(0,y.useState)(!1),[ce,de]=(0,y.useState)(null),pe=(0,y.useRef)(!1),fe=(0,y.useRef)(null),{anchorRefs:he,setActiveAnchor:me}=Me(t),ve=(0,y.useRef)(!1),[ye,ge]=(0,y.useState)([]),be=(0,y.useRef)(!1),we=d||u.includes("click"),_e=we||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),xe=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&we&&Object.assign(xe,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Se=A?{...A}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!A&&we&&Object.assign(Se,{mouseleave:!1,blur:!1,mouseout:!1});const Oe=R?{...R}:{escape:E||!1,scroll:C||!1,resize:k||!1,clickOutsideAnchor:_e||!1};N&&(Object.assign(xe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Se,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Oe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),je((()=>(be.current=!0,()=>{be.current=!1})),[]);const Ce=e=>{be.current&&(e&&le(!0),setTimeout((()=>{be.current&&(null==U||U(e),void 0===H&&ie(e))}),10))};(0,y.useEffect)((()=>{if(void 0===H)return()=>null;H&&le(!0);const e=setTimeout((()=>{ie(H)}),10);return()=>{clearTimeout(e)}}),[H]),(0,y.useEffect)((()=>{if(re!==pe.current)if(Pe(ee),pe.current=re,re)null==L||L();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{le(!1),de(null),null==D||D()}),e+25)}}),[re]);const Te=e=>{ne((t=>Ae(t,e)?t:e))},Re=(e=m)=>{Pe(J),ae?Ce(!0):J.current=setTimeout((()=>{Ce(!0)}),e)},Le=(e=v)=>{Pe(Q),Q.current=setTimeout((()=>{ve.current||Ce(!1)}),e)},De=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return z(null),void me({current:null});m?Re():Ce(!0),z(n),me({current:n}),Pe(Q)},He=()=>{O?Le(v||100):v?Le():Ce(!1),Pe(J)},Be=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Ee({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:l,offset:c,elementReference:o,tooltipReference:K.current,tooltipArrowReference:Z.current,strategy:p,middlewares:f,border:q}).then((e=>{Te(e)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),fe.current=n},We=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...ye].some((e=>null==e?void 0:e.contains(n)))||(Ce(!1),Pe(J)))},Ve=ke(De,50,!0),ze=ke(He,50,!0),qe=e=>{ze.cancel(),Ve(e)},$e=()=>{Ve.cancel(),ze()},Ge=(0,y.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:P;n?Be(n):w?fe.current&&Be(fe.current):(null==V?void 0:V.isConnected)&&Ee({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:l,offset:c,elementReference:V,tooltipReference:K.current,tooltipArrowReference:Z.current,strategy:p,middlewares:f,border:q}).then((e=>{be.current&&Te(e)}))}),[re,V,I,j,l,null==ce?void 0:ce.place,c,p,P,null==ce?void 0:ce.position,w]);(0,y.useEffect)((()=>{var e,t;const n=new Set(he);ye.forEach((e=>{(null==M?void 0:M(e))||n.add({current:e})}));const o=document.querySelector(`[id='${s}']`);o&&!(null==M?void 0:M(o))&&n.add({current:o});const r=()=>{Ce(!1)},i=Ne(V),a=Ne(K.current);Oe.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let l=null;Oe.resize?window.addEventListener("resize",r):V&&K.current&&(l=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=se(e),u=r||i?[...c?oe(c):[],...oe(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,o=null;const r=W(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(a||t(),!d||!p)return;const f={rootMargin:-_(u)+"px "+-_(r.clientWidth-(c+d))+"px "+-_(r.clientHeight-(u+p))+"px "+-_(c)+"px",threshold:b(0,g(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{o=new IntersectionObserver(m,{...f,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;s&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?ue(e):null;return l&&function t(){const o=ue(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(V,K.current,Ge,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ce(!1)};Oe.escape&&window.addEventListener("keydown",c),Oe.clickOutsideAnchor&&window.addEventListener("click",We);const u=[],d=e=>{re&&(null==e?void 0:e.target)===V||De(e)},p=e=>{re&&(null==e?void 0:e.target)===V&&He()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(xe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:qe}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Se).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:$e}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:Ue});const m=()=>{ve.current=!0},v=()=>{ve.current=!1,He()};return O&&!_e&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Oe.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Oe.resize?window.removeEventListener("resize",r):null==l||l(),Oe.clickOutsideAnchor&&window.removeEventListener("click",We),Oe.escape&&window.removeEventListener("keydown",c),O&&!_e&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",v)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[V,Ge,ae,he,ye,T,A,R,we,m,v]),(0,y.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:a)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(V){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,V))&&(le(!1),Ce(!1),z(null),Pe(J),Pe(Q),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&ge((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,a,null==ce?void 0:ce.anchorSelect,V]),(0,y.useEffect)((()=>{Ge()}),[Ge]),(0,y.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ge()))}));return e.observe(F.current),()=>{e.disconnect()}}),[I,null==F?void 0:F.current]),(0,y.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...ye,t];V&&n.includes(V)||z(null!==(e=ye[0])&&void 0!==e?e:t)}),[s,ye,V]),(0,y.useEffect)((()=>(B&&Ce(!0),()=>{Pe(J),Pe(Q)})),[]),(0,y.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:a;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,a,null==ce?void 0:ce.anchorSelect]),(0,y.useEffect)((()=>{J.current&&(Pe(J),Re(m))}),[m]);const Xe=null!==(Y=null==ce?void 0:ce.content)&&void 0!==Y?Y:I,Ye=re&&Object.keys(te.tooltipStyles).length>0;return(0,y.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}de(null!=e?e:null),(null==e?void 0:e.delay)?Re(e.delay):Ce(!0)},close:e=>{(null==e?void 0:e.delay)?Le(e.delay):Ce(!1)},activeAnchor:V,place:te.place,isOpen:Boolean(ae&&!x&&Xe&&Ye)}))),ae&&!x&&Xe?y.createElement(h,{id:t,role:X,className:i("react-tooltip",Ie.tooltip,Fe.tooltip,Fe[r],n,`react-tooltip__place-${te.place}`,Ie[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===p&&Ie.fixed,O&&Ie.clickable),onTransitionEnd:e=>{Pe(ee),re||"opacity"!==e.propertyName||(le(!1),de(null),null==D||D())},style:{...j,...te.tooltipStyles,opacity:void 0!==$&&Ye?$:void 0},ref:K},Xe,y.createElement(h,{className:i("react-tooltip-arrow",Ie.arrow,Fe.arrow,o,S&&Ie.noArrow),style:{...te.tooltipArrowStyles,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0},ref:Z})):null},Be=({content:e})=>y.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Ue=y.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:s,className:a,classNameArrow:l,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:g,delayShow:b=0,delayHide:w=0,float:_=!1,hidden:x=!1,noArrow:S=!1,clickable:O=!1,closeOnEsc:E=!1,closeOnScroll:C=!1,closeOnResize:k=!1,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N=!1,style:j,position:P,isOpen:L,defaultIsOpen:D=!1,disableStyleInjection:M=!1,border:I,opacity:F,arrowColor:H,setIsOpen:B,afterShow:U,afterHide:W,disableTooltip:V,role:z="tooltip"},q)=>{const[$,G]=(0,y.useState)(o),[X,Y]=(0,y.useState)(r),[K,Z]=(0,y.useState)(u),[J,Q]=(0,y.useState)(c),[ee,te]=(0,y.useState)(d),[ne,oe]=(0,y.useState)(b),[re,ie]=(0,y.useState)(w),[se,ae]=(0,y.useState)(_),[le,ce]=(0,y.useState)(x),[ue,de]=(0,y.useState)(p),[pe,fe]=(0,y.useState)(h),[he,me]=(0,y.useState)(v),[ve,ye]=(0,y.useState)(null),[ge,be]=(0,y.useState)(null),we=(0,y.useRef)(M),{anchorRefs:_e,activeAnchor:xe}=Me(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:u)},content:e=>{G(null!=e?e:o)},html:e=>{Y(null!=e?e:r)},variant:e=>{var t;Q(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{te(null===e?d:Number(e))},wrapper:e=>{var t;de(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:h)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:v)},"delay-show":e=>{oe(null===e?b:Number(e))},"delay-hide":e=>{ie(null===e?w:Number(e))},float:e=>{ae(null===e?_:"true"===e)},hidden:e=>{ce(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,y.useEffect)((()=>{G(o)}),[o]),(0,y.useEffect)((()=>{Y(r)}),[r]),(0,y.useEffect)((()=>{Z(u)}),[u]),(0,y.useEffect)((()=>{Q(c)}),[c]),(0,y.useEffect)((()=>{te(d)}),[d]),(0,y.useEffect)((()=>{oe(b)}),[b]),(0,y.useEffect)((()=>{ie(w)}),[w]),(0,y.useEffect)((()=>{ae(_)}),[_]),(0,y.useEffect)((()=>{ce(x)}),[x]),(0,y.useEffect)((()=>{me(v)}),[v]),(0,y.useEffect)((()=>{we.current!==M&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[M]),(0,y.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===M,disableBase:M}}))}),[]),(0,y.useEffect)((()=>{var o;const r=new Set(_e);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const a=null!==(o=null!=ge?ge:s)&&void 0!==o?o:xe.current,l=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(a);Oe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Se(a);Oe(e),l.observe(a,c)}return()=>{l.disconnect()}}),[_e,xe,ge,t,n]),(0,y.useEffect)((()=>{(null==j?void 0:j.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),I&&!Ce("border",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`border\`.`),(null==j?void 0:j.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!Ce("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`)}),[]);let Ee=f;const ke=(0,y.useRef)(null);if(s){const e=s({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||$||null,activeAnchor:ge});Ee=e?y.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else $&&(Ee=$);X&&(Ee=y.createElement(Be,{content:X}));const Te={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:i(a,ve),classNameArrow:l,content:Ee,contentWrapperRef:ke,place:K,variant:J,offset:ee,wrapper:ue,events:pe,openOnClick:m,positionStrategy:he,middlewares:g,delayShow:ne,delayHide:re,float:se,hidden:le,noArrow:S,clickable:O,closeOnEsc:E,closeOnScroll:C,closeOnResize:k,openEvents:T,closeEvents:A,globalCloseEvents:R,imperativeModeOnly:N,style:j,position:P,isOpen:L,defaultIsOpen:D,border:I,opacity:F,arrowColor:H,setIsOpen:B,afterShow:U,afterHide:W,disableTooltip:V,activeAnchor:ge,setActiveAnchor:e=>be(e),role:z};return y.createElement(He,{...Te})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||Oe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||Oe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const We=window.wp.apiFetch;var Ve=n.n(We);const ze=window.ReactJSXRuntime,qe=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,c._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,c._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,c._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,c._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,ze.jsxs)("div",{className:"gatherpress-status__response",children:[(0,ze.jsx)("span",{className:n[e][t].icon}),(0,ze.jsx)("strong",{children:n[e][t].text})]})};function $e(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const Ge=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:o,enableInitialDecline:r,maxGuestLimit:i})=>{const[s,a]=(0,h.useState)(t.status),[u,p]=(0,h.useState)(Number(t.anonymous)),[f,m]=(0,h.useState)(t.guests),[y,g]=(0,h.useState)("hidden"),[b,w]=(0,h.useState)("false"),[_,x]=(0,h.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&v().setAppElement(".gatherpress-enabled");const S=e=>{e.preventDefault(),x(!1)},O=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Ve()({path:$e("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:$e("misc.nonce")}}).then((e=>{if(e.success){a(e.status),m(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&S(t)}}))},E=e=>{switch(e){case"attending":return(0,c.__)("You're attending","gatherpress");case"waiting_list":return(0,c.__)("You're wait listed","gatherpress");case"not_attending":return(0,c.__)("You're not attending","gatherpress")}return(0,c.__)("RSVP to this event","gatherpress")},C=()=>(0,ze.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,ze.jsx)("div",{className:"gatherpress-modal__header",children:(0,c.__)("Login Required","gatherpress")}),(0,ze.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,ze.jsx)("div",{className:"gatherpress-modal__text",children:l((0,c.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ +(0,c.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,c._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==$e("urls.registrationUrl")&&(0,ze.jsx)("div",{className:"gatherpress-modal__text",children:l((0,c.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ +(0,c.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,c._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,ze.jsx)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,ze.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,ze.jsx)("a",{href:"#",onClick:S,className:"gatherpress-buttons__button wp-block-button__link",children:(0,c.__)("Close","gatherpress")})})})]}),k=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,c.__)("Attend","gatherpress")):(t="not_attending",n=(0,c._x)("Not Attending","action of not attending","gatherpress")),(0,ze.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,ze.jsx)("div",{className:"gatherpress-modal__header",children:E(s)?E(s):(0,ze.jsx)(d.Spinner,{})}),(0,ze.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,ze.jsx)("div",{className:"gatherpress-modal__text",children:l((0,c.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ +(0,c.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);m(t),O(e,s,u,t,!1)},defaultValue:f})]}),o&&(0,ze.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,ze.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);p(t),O(e,s,t,0,!1)},checked:u}),(0,ze.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,c.__)("Only admins will see your identity.","gatherpress"),children:(0,c.__)("List me as anonymous.","gatherpress")}),(0,ze.jsx)(Ue,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,ze.jsxs)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,ze.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,ze.jsx)("a",{href:"#",onClick:e=>O(e,t,u,"not_attending"!==t?f:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,ze.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,ze.jsx)("a",{href:"#",onClick:S,className:"gatherpress-buttons__button wp-block-button__link",children:(0,c.__)("Close","gatherpress")})})]}),r&&"no_status"===s&&1!==u?(0,ze.jsx)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,ze.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,ze.jsx)("a",{href:"#",onClick:e=>O(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,c._x)("Not Attending","Responded Status","gatherpress")})})}):(0,ze.jsx)(ze.Fragment,{})]})};return(0,ze.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,ze.jsxs)(d.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,ze.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,ze.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":b,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(g("hidden"===y?"show":"hidden"),w("false"===b?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),x(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,c.__)("Edit RSVP","gatherpress")}return(0,c.__)("RSVP","gatherpress")})(s)})}),(0,ze.jsxs)(v(),{isOpen:_,onRequestClose:S,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,c.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,ze.jsx)(C,{}),0!==t.length&&(0,ze.jsx)(k,{status:s})]})]}),"no_status"!==s&&(0,ze.jsxs)("div",{className:"gatherpress-status",children:[(0,ze.jsx)(qe,{type:n,status:s}),0{const[r,i]=(0,h.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:i},e);let s="";return"object"==typeof r&&void 0!==r[t]&&(o=[...r[t].responses],n&&(o=o.splice(0,n)),s=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,ze.jsx)("figure",{className:"gatherpress-rsvp-response__member-avatar",children:(0,ze.jsx)("img",{alt:n,title:n,src:o})},t)}))),(0,ze.jsx)(ze.Fragment,{children:s})},Ye=e=>{const{type:t,event:n,eventOptions:o}=e,r="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,i=l(n[r]),s="gatherpress-events-list";let a="location";const c=n.venue?.is_online_event;return c&&(a="video-alt2"),(0,ze.jsxs)("div",{className:`${s}`,children:[(0,ze.jsx)("div",{className:`${s}__header`,children:(0,ze.jsxs)("div",{className:`${s}__info`,children:[o.showFeaturedImage&&(0,ze.jsx)("figure",{className:`${s}__image`,children:(0,ze.jsx)("a",{href:n.permalink,children:i})}),(0,ze.jsx)("div",{className:`${s}__datetime`,children:(0,ze.jsx)("strong",{children:n.datetime_start})}),(0,ze.jsx)("div",{className:`${s}__title`,children:(0,ze.jsx)("a",{href:n.permalink,children:l(n.title)})}),n.venue&&o.showVenue&&(0,ze.jsxs)("div",{className:`${s}__venue`,children:[(0,ze.jsx)("span",{className:`dashicons dashicons-${a}`}),!c&&(0,ze.jsx)("a",{href:n.venue.permalink,children:l(n.venue.name)}),c&&(0,ze.jsx)("span",{children:l(n.venue.name)})]}),o.showDescription&&(0,ze.jsx)("div",{className:`${s}__content`,children:(0,ze.jsx)("div",{className:`${s}__excerpt`,children:l((u=n.excerpt,u.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))})})]})}),(0,ze.jsxs)("div",{className:`${s}__footer`,children:[o.showRsvpResponse&&(0,ze.jsx)("div",{className:"gatherpress-rsvp-response__items",children:(0,ze.jsx)(Xe,{postId:n.ID,value:"attending",responses:n.responses,limit:"3"})}),"upcoming"===t&&o.showRsvp&&(0,ze.jsx)(Ge,{postId:n.ID,currentUser:n.current_user,type:t,enableAnonymousRsvp:n.gatherpress_enable_anonymous_rsvp,enableInitialDecline:n.gatherpress_enable_initial_decline}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,ze.jsx)(qe,{type:t,status:n.current_user?.status})]})]});var u},Ke=e=>{const{eventOptions:t,maxNumberOfEvents:n,datetimeFormat:o,type:r,topics:i,venues:s}=e,[a,l]=(0,h.useState)([]),[u,p]=(0,h.useState)(!1),f=a.map((e=>(0,ze.jsx)(Ye,{eventOptions:t,type:r,event:e},e.ID)));return(0,h.useEffect)((()=>{let e="",t="";"object"==typeof i&&(e=i.map((e=>e.slug))?.join(",")),"object"==typeof s&&(t=s.map((e=>e.slug))?.join(","));const a=$e("urls.eventRestApi")+`/events-list?event_list_type=${r}&max_number=${n}&datetime_format=${o}&topics=${e}&venues=${t}`;$e("misc.isUserLoggedIn")?Ve()({path:a}).then((e=>{p(!0),l(e)})):fetch(a).then((e=>e.json())).then((e=>{p(!0),l(e)}))}),[l,n,o,r,i,s]),(0,ze.jsxs)("div",{className:`gatherpress-${r}-events-list`,children:[!u&&(0,ze.jsx)(d.Spinner,{}),u&&0===a.length&&(()=>{const e="upcoming"===r?(0,c.__)("There are no upcoming events.","gatherpress"):(0,c.__)("There are no past events.","gatherpress");return(0,ze.jsx)("div",{className:`gatherpress-${r}-events__no_events_message`,children:e})})(),u&&f]})},Ze=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,ze.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,ze.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},Je=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.1","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"datetimeFormat":{"type":"string","default":"D, M j, Y, g:i a T"},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(Je,{edit:e=>{var t,n,o;const{attributes:i,setAttributes:a}=e,h=(0,u.useBlockProps)(),{topics:m,venues:v}=i,{topicsList:y}=(0,f.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{topicsList:t("taxonomy","gatherpress_topic",{per_page:-1,context:"view"})}}),[]),{venueList:g}=(0,f.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{venueList:t("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})}}),[]),b=null!==(t=y?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},w=null!==(n=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsxs)(u.InspectorControls,{children:[(0,ze.jsxs)(d.PanelBody,{children:[(0,ze.jsx)("p",{children:(0,c.__)("Event List type","gatherpress")}),(0,ze.jsxs)(d.ButtonGroup,{className:"block-editor-block-styles__variants",children:[(0,ze.jsx)(d.Button,{className:s()("block-editor-block-styles__item",{"is-active":"upcoming"===i.type}),variant:"secondary",label:(0,c.__)("Upcoming","gatherpress"),onClick:()=>{a({type:"upcoming"})},children:(0,ze.jsx)(d.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0,children:(0,c.__)("Upcoming","gatherpress")})}),(0,ze.jsx)(d.Button,{className:s()("block-editor-block-styles__item",{"is-active":"past"===i.type}),variant:"secondary",label:(0,c.__)("Past","gatherpress"),onClick:()=>{a({type:"past"})},children:(0,ze.jsx)(d.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0,children:(0,c.__)("Past","gatherpress")})})]})]}),(0,ze.jsxs)(d.PanelBody,{children:[(0,ze.jsx)(d.TextControl,{label:(0,c.__)("Date & time format","gatherpress"),value:i.datetimeFormat,help:l((0,c.__)('For more information read the Documentation on date and time formatting.',"gatherpress")),onChange:e=>a({datetimeFormat:e})}),(0,ze.jsx)(d.RangeControl,{label:(0,c.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(i.maxNumberOfEvents,10),onChange:e=>a({maxNumberOfEvents:e})}),(0,ze.jsx)(d.FormTokenField,{label:(0,c.__)("Topics","gatherpress"),value:m&&m.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(b),onChange:e=>{if(e.some((e=>"string"==typeof e&&!b[e])))return;const t=e.map((e=>"string"==typeof e?b[e]:e));if((0,r.includes)(t,null))return!1;a({topics:t})},maxSuggestions:20},"query-controls-topics-select"),(0,ze.jsx)(d.FormTokenField,{label:(0,c.__)("Venues","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(w),onChange:e=>{if(e.some((e=>"string"==typeof e&&!w[e])))return;const t=e.map((e=>"string"==typeof e?w[e]:e));if((0,r.includes)(t,null))return!1;a({venues:t})},maxSuggestions:20},"query-controls-venues-select")]}),(0,ze.jsxs)(d.PanelBody,{children:[(0,ze.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide All RSVP Responses","gatherpress"),help:i.eventOptions.showRsvpResponse?(0,c.__)("Show All RSVP Responses","gatherpress"):(0,c.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=i.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{a({eventOptions:{...i.eventOptions,showRsvpResponse:e}})}}),(0,ze.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide My RSVP Response"),help:i.eventOptions.showRsvp?(0,c.__)("Show My RSVP Response"):(0,c.__)("Hide My RSVP Response"),checked:i.eventOptions.showRsvp,onChange:e=>{a({eventOptions:{...i.eventOptions,showRsvp:e}})}}),(0,ze.jsx)(d.SelectControl,{label:(0,c.__)("Image Size Options","gatherpress"),value:i.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>a({eventOptions:{...i.eventOptions,imageSize:e}})}),(0,ze.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide Featured Image","gatherpress"),help:i.eventOptions.showFeaturedImage?(0,c.__)("Show Featured Image","gatherpress"):(0,c.__)("Hide Featured Image","gatherpress"),checked:i.eventOptions.showFeaturedImage,onChange:e=>{a({eventOptions:{...i.eventOptions,showFeaturedImage:e}})}}),(0,ze.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Hide Description","gatherpress"),help:i.eventOptions.showDescription?(0,c.__)("Show Description","gatherpress"):(0,c.__)("Hide Description","gatherpress"),checked:i.eventOptions.showDescription,onChange:e=>{a({eventOptions:{...i.eventOptions,showDescription:e}})}}),(0,ze.jsx)(d.TextControl,{label:(0,c.__)("Description Limit"),help:(0,c.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(i.eventOptions.descriptionLimit),onChange:e=>a({eventOptions:{...i.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,ze.jsx)(d.ToggleControl,{label:(0,c.__)("Show/Event Venue"),help:i.eventOptions.showVenue?(0,c.__)("Show Event Venue"):(0,c.__)("Hide Event Venue"),checked:i.eventOptions.showVenue,onChange:e=>{a({eventOptions:{...i.eventOptions,showVenue:e}})}})]})]}),(0,ze.jsx)("div",{...h,children:(0,ze.jsx)(Ze,{children:(0,ze.jsx)(Ke,{eventOptions:i.eventOptions,maxNumberOfEvents:i.maxNumberOfEvents,datetimeFormat:i.datetimeFormat,type:i.type,topics:i.topics,venues:i.venues})})})]})},save:()=>null})},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function v(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?S(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?S(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?S(e.children):[];var a=new h(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function S(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),a.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return a.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,a=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var a,l=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||a,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(y=d(y,{key:y.key||m})),o.push(c(y,v,m));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(w=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(v.name,b,w),v,m))}else{var _=!v.data.trim().length;if(_&&v.parent&&!(0,s.canTextBeChildOfNode)(v.parent))continue;if(n.trim&&_)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return y("property missing ':'");var o=g(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),l}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==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:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,a=n?{}:i.content,l=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(f.default),a.default.instanceOf(p.SafeHTMLCollection),a.default.instanceOf(p.SafeNodeList),a.default.arrayOf(a.default.instanceOf(f.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return s=t||s},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=l(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,a=!1;function l(){a=!0}function c(){if(a){if(a=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,a=n[0],l=n[n.length-1],c=i();if(e===c){if(!s)return;o=l}if(l!==c||s||(o=a),a===c&&s&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?l:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:l,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(i,l)).replace(o,a))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n};var r=o(n(9788))},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={105:0,149:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,s=n[0],a=n[1],l=n[2],c=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var u=l(o)}for(t&&t(n);co(8937)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/online-event/index.asset.php b/build/blocks/online-event/index.asset.php index 96a236db2..c93ce5ef4 100644 --- a/build/blocks/online-event/index.asset.php +++ b/build/blocks/online-event/index.asset.php @@ -1 +1 @@ - array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '120d638313cd180d9338'); + array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '1196756c1c15c226a71e'); diff --git a/build/blocks/online-event/index.js b/build/blocks/online-event/index.js index 7a10d905a..ff51d7138 100644 --- a/build/blocks/online-event/index.js +++ b/build/blocks/online-event/index.js @@ -1 +1 @@ -(()=>{var e,t={7520:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.wp.blockEditor,l=window.wp.components,i=window.wp.data,s=window.React,c=Math.min,a=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function v(e,t,n){return a(e,c(t,n))}function h(e,t){return"function"==typeof e?e(t):e}function y(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function b(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(y(e))?"y":"x"}function _(e){return w(x(e))}function E(e){return e.replace(/start|end/g,(e=>m[e]))}function S(e){return e.replace(/left|right|bottom|top/g,(e=>p[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function O(e,t,n){let{reference:o,floating:r}=e;const l=x(t),i=_(t),s=b(i),c=y(t),a="y"===l,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(c){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(g(t)){case"start":p[i]-=f*(n&&a?-1:1);break;case"end":p[i]+=f*(n&&a?-1:1)}return p}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=h(t,e),m=k(p),v=s[f?"floating"===d?"reference":"floating":d],y=A(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(v)))||n?v:v.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:c})),g="floating"===d?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(w))&&await(null==l.getScale?void 0:l.getScale(w))||{x:1,y:1},x=A(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:w,strategy:c}):g);return{top:(y.top-x.top+m.top)/b.y,bottom:(x.bottom-y.bottom+m.bottom)/b.y,left:(y.left-x.left+m.left)/b.x,right:(x.right-y.right+m.right)/b.x}}function T(e){return j(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function C(e){var t;return null==(t=(j(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function j(e){return e instanceof Node||e instanceof L(e).Node}function D(e){return e instanceof Element||e instanceof L(e).Element}function N(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function P(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}function I(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function B(e){return["table","td","th"].includes(T(e))}function $(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function F(e){const t=H(),n=D(e)?W(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function H(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function z(e){return["html","body","#document"].includes(T(e))}function W(e){return L(e).getComputedStyle(e)}function M(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function V(e){if("html"===T(e))return e;const t=e.assignedSlot||e.parentNode||P(e)&&e.host||C(e);return P(t)?t.host:t}function q(e){const t=V(e);return z(t)?e.ownerDocument?e.ownerDocument.body:e.body:N(t)&&I(t)?t:q(t)}function K(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=q(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=L(r);return l?t.concat(i,i.visualViewport||[],I(r)?r:[],i.frameElement&&n?K(i.frameElement):[]):t.concat(r,K(r,[],n))}function X(e){const t=W(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=N(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=u(n)!==l||u(o)!==i;return s&&(n=l,o=i),{width:n,height:o,$:s}}function G(e){return D(e)?e:e.contextElement}function Y(e){const t=G(e);if(!N(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=X(t);let i=(l?u(n.width):n.width)/o,s=(l?u(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const J=f(0);function U(e){const t=L(e);return H()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function Z(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=G(e);let i=f(1);t&&(o?D(o)&&(i=Y(o)):i=Y(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==L(e))&&t}(l,n,o)?U(l):f(0);let c=(r.left+s.x)/i.x,a=(r.top+s.y)/i.y,u=r.width/i.x,d=r.height/i.y;if(l){const e=L(l),t=o&&D(o)?L(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=Y(r),t=r.getBoundingClientRect(),o=W(r),l=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,a*=e.y,u*=e.x,d*=e.y,c+=l,a+=i,n=L(r),r=n.frameElement}}return A({width:u,height:d,x:c,y:a})}function Q(e){return Z(C(e)).left+M(e).scrollLeft}function ee(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=L(e),o=C(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){l=r.width,i=r.height;const e=H();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:l,height:i,x:s,y:c}}(e,n);else if("document"===t)o=function(e){const t=C(e),n=M(e),o=e.ownerDocument.body,r=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Q(e);const s=-n.scrollTop;return"rtl"===W(o).direction&&(i+=a(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:i,y:s}}(C(e));else if(D(t))o=function(e,t){const n=Z(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=N(e)?Y(e):f(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=U(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return A(o)}function te(e,t){const n=V(e);return!(n===t||!D(n)||z(n))&&("fixed"===W(n).position||te(n,t))}function ne(e,t,n){const o=N(t),r=C(t),l="fixed"===n,i=Z(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const c=f(0);if(o||!o&&!l)if(("body"!==T(t)||I(r))&&(s=M(t)),o){const e=Z(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Q(r));return{x:i.left+s.scrollLeft-c.x,y:i.top+s.scrollTop-c.y,width:i.width,height:i.height}}function oe(e){return"static"===W(e).position}function re(e,t){return N(e)&&"fixed"!==W(e).position?t?t(e):e.offsetParent:null}function le(e,t){const n=L(e);if($(e))return n;if(!N(e)){let t=V(e);for(;t&&!z(t);){if(D(t)&&!oe(t))return t;t=V(t)}return n}let o=re(e,t);for(;o&&B(o)&&oe(o);)o=re(o,t);return o&&z(o)&&oe(o)&&!F(o)?n:o||function(e){let t=V(e);for(;N(t)&&!z(t);){if(F(t))return t;if($(t))return null;t=V(t)}return null}(e)||n}const ie={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const l="fixed"===r,i=C(o),s=!!t&&$(t.floating);if(o===i||s&&l)return n;let c={scrollLeft:0,scrollTop:0},a=f(1);const u=f(0),d=N(o);if((d||!d&&!l)&&(("body"!==T(o)||I(i))&&(c=M(o)),N(o))){const e=Z(o);a=Y(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+u.x,y:n.y*a.y-c.scrollTop*a.y+u.y}},getDocumentElement:C,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[..."clippingAncestors"===n?$(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=K(e,[],!1).filter((e=>D(e)&&"body"!==T(e))),r=null;const l="fixed"===W(e).position;let i=l?V(e):e;for(;D(i)&&!z(i);){const t=W(i),n=F(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||I(i)&&!n&&te(e,i))?o=o.filter((e=>e!==i)):r=t,i=V(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=l[0],s=l.reduce(((e,n)=>{const o=ee(t,n,r);return e.top=a(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=a(o.left,e.left),e}),ee(t,i,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,n=this.getDimensions,o=await n(e.floating);return{reference:ne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=X(e);return{width:t,height:n}},getScale:Y,isElement:D,isRTL:function(e){return"rtl"===W(e).direction}};const se=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:l,placement:i,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=y(n),s=g(n),c="y"===x(n),a=["left","top"].includes(i)?-1:1,u=l&&c?-1:1,d=h(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),c?{x:p*u,y:f*a}:{x:f*a,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:l+c.y,data:{...c,placement:i}}}}},ce=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=h(e,t),a={x:n,y:o},u=await R(t,c),d=x(y(r)),f=w(d);let p=a[f],m=a[d];if(l){const e="y"===f?"bottom":"right";p=v(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";m=v(m+u["y"===d?"top":"left"],m,m-u[e])}const g=s.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},ae=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...w}=h(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const k=y(r),A=x(s),O=y(s)===s,T=await(null==c.isRTL?void 0:c.isRTL(a.floating)),L=f||(O||!v?[S(s)]:function(e){const t=S(e);return[E(e),t,E(t)]}(s)),C="none"!==m;!f&&C&&L.push(...function(e,t,n,o){const r=g(e);let l=function(e,t,n){const o=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?l:i;default:return[]}}(y(e),"start"===n,o);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(E)))),l}(s,v,m,T));const j=[s,...L],D=await R(t,w),N=[];let P=(null==(o=l.flip)?void 0:o.overflows)||[];if(u&&N.push(D[k]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=g(e),r=_(e),l=b(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=S(i)),[i,S(i)]}(r,i,T);N.push(D[e[0]],D[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var I,B;const e=((null==(I=l.flip)?void 0:I.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(B=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:B.placement;if(!n)switch(p){case"bestFit":{var $;const e=null==($=P.filter((e=>{if(C){const t=x(e.placement);return t===A||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},ue=(e,t,n)=>{const o=new Map,r={platform:ie,...n},l={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,s=l.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=O(a,o,c),f=o,p={},m=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=i;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:l,elements:i,middlewareData:s}=e,{element:a,padding:d=0}=h(u,e)||{};if(null==a)return{};const f=k(d),p={x:t,y:n},m=_(o),y=b(m),w=await l.getDimensions(a),x="y"===m,E=x?"top":"left",S=x?"bottom":"right",A=x?"clientHeight":"clientWidth",O=r.reference[y]+r.reference[m]-p[m]-r.floating[y],R=p[m]-r.reference[m],T=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a));let L=T?T[A]:0;L&&await(null==l.isElement?void 0:l.isElement(T))||(L=i.floating[A]||r.floating[y]);const C=O/2-R/2,j=L/2-w[y]/2-1,D=c(f[E],j),N=c(f[S],j),P=D,I=L-w[y]-N,B=L/2-w[y]/2+C,$=v(P,B,I),F=!s.arrow&&null!=g(o)&&B!==$&&r.reference[y]/2-(B{var r,l;const i={left:`${e}px`,top:`${t}px`,border:s},{x:c,y:a}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==l?l:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):ue(e,t,{placement:"bottom",strategy:l,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},ve=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),he=(e,t,n)=>{let o=null;const r=function(...r){const l=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(l,t)),n||(o&&clearTimeout(o),o=setTimeout(l,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},ye=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ge=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ge(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!ye(e)||!ye(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>ge(e[n],t[n])))},we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},be=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},xe="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,_e=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ee={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Se=(0,s.createContext)({getTooltipData:()=>Ee});function ke(e="DEFAULT_TOOLTIP_ID"){return(0,s.useContext)(Se).getTooltipData(e)}var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Oe={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Re=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:l,anchorSelect:i,place:u="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:h,wrapper:y,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:k=!1,closeOnResize:A=!1,openEvents:O,closeEvents:R,globalCloseEvents:T,imperativeModeOnly:L,style:j,position:D,afterShow:N,afterHide:P,content:I,contentWrapperRef:B,isOpen:$,defaultIsOpen:F=!1,setIsOpen:H,activeAnchor:z,setActiveAnchor:W,border:M,opacity:V,arrowColor:q,role:X="tooltip"})=>{var Y;const J=(0,s.useRef)(null),U=(0,s.useRef)(null),Q=(0,s.useRef)(null),ee=(0,s.useRef)(null),te=(0,s.useRef)(null),[ne,oe]=(0,s.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:u}),[re,le]=(0,s.useState)(!1),[ie,se]=(0,s.useState)(!1),[ce,ae]=(0,s.useState)(null),ue=(0,s.useRef)(!1),fe=(0,s.useRef)(null),{anchorRefs:pe,setActiveAnchor:ve}=ke(t),ye=(0,s.useRef)(!1),[we,Ee]=(0,s.useState)([]),Se=(0,s.useRef)(!1),Re=m||p.includes("click"),Te=Re||(null==O?void 0:O.click)||(null==O?void 0:O.dblclick)||(null==O?void 0:O.mousedown),Le=O?{...O}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!O&&Re&&Object.assign(Le,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ce=R?{...R}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!R&&Re&&Object.assign(Ce,{mouseleave:!1,blur:!1,mouseout:!1});const je=T?{...T}:{escape:S||!1,scroll:k||!1,resize:A||!1,clickOutsideAnchor:Te||!1};L&&(Object.assign(Le,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ce,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(je,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),xe((()=>(Se.current=!0,()=>{Se.current=!1})),[]);const De=e=>{Se.current&&(e&&se(!0),setTimeout((()=>{Se.current&&(null==H||H(e),void 0===$&&le(e))}),10))};(0,s.useEffect)((()=>{if(void 0===$)return()=>null;$&&se(!0);const e=setTimeout((()=>{le($)}),10);return()=>{clearTimeout(e)}}),[$]),(0,s.useEffect)((()=>{if(re!==ue.current)if(_e(te),ue.current=re,re)null==N||N();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{se(!1),ae(null),null==P||P()}),e+25)}}),[re]);const Ne=e=>{oe((t=>ge(t,e)?t:e))},Pe=(e=g)=>{_e(Q),ie?De(!0):Q.current=setTimeout((()=>{De(!0)}),e)},Ie=(e=w)=>{_e(ee),ee.current=setTimeout((()=>{ye.current||De(!1)}),e)},Be=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void ve({current:null});g?Pe():De(!0),W(n),ve({current:n}),_e(ee)},$e=()=>{E?Ie(w||100):w?Ie():De(!1),_e(Q)},Fe=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};me({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:u,offset:f,elementReference:o,tooltipReference:J.current,tooltipArrowReference:U.current,strategy:v,middlewares:h,border:M}).then((e=>{Ne(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Fe(n),fe.current=n},ze=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=J.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...we].some((e=>null==e?void 0:e.contains(n)))||(De(!1),_e(Q)))},We=he(Be,50,!0),Me=he($e,50,!0),Ve=e=>{Me.cancel(),We(e)},qe=()=>{We.cancel(),Me()},Ke=(0,s.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:D;n?Fe(n):b?fe.current&&Fe(fe.current):(null==z?void 0:z.isConnected)&&me({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:u,offset:f,elementReference:z,tooltipReference:J.current,tooltipArrowReference:U.current,strategy:v,middlewares:h,border:M}).then((e=>{Se.current&&Ne(e)}))}),[re,z,I,j,u,null==ce?void 0:ce.place,f,v,D,null==ce?void 0:ce.position,b]);(0,s.useEffect)((()=>{var e,t;const n=new Set(pe);we.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&n.add({current:o});const r=()=>{De(!1)},i=be(z),s=be(J.current);je.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let u=null;je.resize?window.addEventListener("resize",r):z&&J.current&&(u=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=G(e),p=r||l?[...f?K(f):[],...K(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));const m=f&&s?function(e,t){let n,o=null;const r=C(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),l();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(s||t(),!m||!v)return;const h={rootMargin:-d(p)+"px "+-d(r.clientWidth-(f+m))+"px "+-d(r.clientHeight-(p+v))+"px "+-d(f)+"px",threshold:a(0,c(1,u))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==u){if(!y)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}y=!1}try{o=new IntersectionObserver(g,{...h,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,h)}o.observe(e)}(!0),l}(f,n):null;let v,h=-1,y=null;i&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),f&&!u&&y.observe(f),y.observe(t));let g=u?Z(e):null;return u&&function t(){const o=Z(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,v=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==m||m(),null==(e=y)||e.disconnect(),y=null,u&&cancelAnimationFrame(v)}}(z,J.current,Ke,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&De(!1)};je.escape&&window.addEventListener("keydown",f),je.clickOutsideAnchor&&window.addEventListener("click",ze);const p=[],m=e=>{re&&(null==e?void 0:e.target)===z||Be(e)},v=e=>{re&&(null==e?void 0:e.target)===z&&$e()},h=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Le).forEach((([e,t])=>{t&&(h.includes(e)?p.push({event:e,listener:Ve}):y.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Ce).forEach((([e,t])=>{t&&(h.includes(e)?p.push({event:e,listener:qe}):y.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"pointermove",listener:He});const g=()=>{ye.current=!0},w=()=>{ye.current=!1,$e()};return E&&!Te&&(null===(e=J.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=J.current)||void 0===t||t.addEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;je.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),je.resize?window.removeEventListener("resize",r):null==u||u(),je.clickOutsideAnchor&&window.removeEventListener("click",ze),je.escape&&window.removeEventListener("keydown",f),E&&!Te&&(null===(e=J.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=J.current)||void 0===t||t.removeEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[z,Ke,ie,pe,we,O,R,T,Re,g,w]),(0,s.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:i)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(z){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,z))&&(se(!1),De(!1),W(null),_e(Q),_e(ee),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Ee((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,i,null==ce?void 0:ce.anchorSelect,z]),(0,s.useEffect)((()=>{Ke()}),[Ke]),(0,s.useEffect)((()=>{if(!(null==B?void 0:B.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ke()))}));return e.observe(B.current),()=>{e.disconnect()}}),[I,null==B?void 0:B.current]),(0,s.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...we,t];z&&n.includes(z)||W(null!==(e=we[0])&&void 0!==e?e:t)}),[l,we,z]),(0,s.useEffect)((()=>(F&&De(!0),()=>{_e(Q),_e(ee)})),[]),(0,s.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:i;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));Ee(e)}catch(e){Ee([])}}),[t,i,null==ce?void 0:ce.anchorSelect]),(0,s.useEffect)((()=>{Q.current&&(_e(Q),Pe(g))}),[g]);const Xe=null!==(Y=null==ce?void 0:ce.content)&&void 0!==Y?Y:I,Ge=re&&Object.keys(ne.tooltipStyles).length>0;return(0,s.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ae(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):De(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):De(!1)},activeAnchor:z,place:ne.place,isOpen:Boolean(ie&&!x&&Xe&&Ge)}))),ie&&!x&&Xe?s.createElement(y,{id:t,role:X,className:de("react-tooltip",Ae.tooltip,Oe.tooltip,Oe[r],n,`react-tooltip__place-${ne.place}`,Ae[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&Ae.fixed,E&&Ae.clickable),onTransitionEnd:e=>{_e(te),re||"opacity"!==e.propertyName||(se(!1),ae(null),null==P||P())},style:{...j,...ne.tooltipStyles,opacity:void 0!==V&&Ge?V:void 0},ref:J},Xe,s.createElement(y,{className:de("react-tooltip-arrow",Ae.arrow,Oe.arrow,o,_&&Ae.noArrow),style:{...ne.tooltipArrowStyles,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:U})):null},Te=({content:e})=>s.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Le=s.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:l,className:i,classNameArrow:c,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:h="absolute",middlewares:y,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:k=!1,closeOnResize:A=!1,openEvents:O,closeEvents:R,globalCloseEvents:T,imperativeModeOnly:L=!1,style:C,position:j,isOpen:D,defaultIsOpen:N=!1,disableStyleInjection:P=!1,border:I,opacity:B,arrowColor:$,setIsOpen:F,afterShow:H,afterHide:z,role:W="tooltip"},M)=>{const[V,q]=(0,s.useState)(o),[K,X]=(0,s.useState)(r),[G,Y]=(0,s.useState)(u),[J,U]=(0,s.useState)(a),[Z,Q]=(0,s.useState)(d),[ee,te]=(0,s.useState)(g),[ne,oe]=(0,s.useState)(w),[re,le]=(0,s.useState)(b),[ie,se]=(0,s.useState)(x),[ce,ae]=(0,s.useState)(f),[ue,fe]=(0,s.useState)(m),[pe,me]=(0,s.useState)(h),[he,ye]=(0,s.useState)(null),[ge,we]=(0,s.useState)(null),be=(0,s.useRef)(P),{anchorRefs:xe,activeAnchor:_e}=ke(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Se=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{X(null!=e?e:r)},variant:e=>{var t;U(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{Q(null===e?d:Number(e))},wrapper:e=>{var t;ae(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:m)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{te(null===e?g:Number(e))},"delay-hide":e=>{oe(null===e?w:Number(e))},float:e=>{le(null===e?b:"true"===e)},hidden:e=>{se(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,s.useEffect)((()=>{q(o)}),[o]),(0,s.useEffect)((()=>{X(r)}),[r]),(0,s.useEffect)((()=>{Y(u)}),[u]),(0,s.useEffect)((()=>{U(a)}),[a]),(0,s.useEffect)((()=>{Q(d)}),[d]),(0,s.useEffect)((()=>{te(g)}),[g]),(0,s.useEffect)((()=>{oe(w)}),[w]),(0,s.useEffect)((()=>{le(b)}),[b]),(0,s.useEffect)((()=>{se(x)}),[x]),(0,s.useEffect)((()=>{me(h)}),[h]),(0,s.useEffect)((()=>{be.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[P]),(0,s.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}))}),[]),(0,s.useEffect)((()=>{var o;const r=new Set(xe);let l=n;if(!l&&e&&(l=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const s=null!==(o=null!=ge?ge:i)&&void 0!==o?o:_e.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(s);Se(n)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Ee(s);Se(e),c.observe(s,a)}return()=>{c.disconnect()}}),[xe,_e,ge,t,n]),(0,s.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),I&&!ve("border",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),B&&!ve("opacity",`${B}`)&&console.warn(`[react-tooltip] "${B}" is not a valid \`opacity\`.`)}),[]);let Ae=p;const Oe=(0,s.useRef)(null);if(l){const e=l({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||V||null,activeAnchor:ge});Ae=e?s.createElement("div",{ref:Oe,className:"react-tooltip-content-wrapper"},e):null}else V&&(Ae=V);K&&(Ae=s.createElement(Te,{content:K}));const Le={forwardRef:M,id:e,anchorId:t,anchorSelect:n,className:de(i,he),classNameArrow:c,content:Ae,contentWrapperRef:Oe,place:G,variant:J,offset:Z,wrapper:ce,events:ue,openOnClick:v,positionStrategy:pe,middlewares:y,delayShow:ee,delayHide:ne,float:re,hidden:ie,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:k,closeOnResize:A,openEvents:O,closeEvents:R,globalCloseEvents:T,imperativeModeOnly:L,style:C,position:j,isOpen:D,defaultIsOpen:N,border:I,opacity:B,arrowColor:$,setIsOpen:F,afterShow:H,afterHide:z,activeAnchor:ge,setActiveAnchor:e=>we(e),role:W};return s.createElement(Re,{...Le})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||pe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||pe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ce=window.wp.i18n,je=window.wp.element,De=(e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}};function Ne(){const e=(0,i.select)("core/editor")?.getCurrentPostType();return"gatherpress_event"===e||"gatherpress_venue"===e}function Pe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const Ie=window.ReactJSXRuntime,Be=({onlineEventLinkDefault:e=""})=>{const t=(0,Ce.__)("Online event","gatherpress"),[n,o]=(0,je.useState)(e);return De({setOnlineEventLink:o},Pe("eventDetails.postId")),(0,Ie.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,Ie.jsx)(l.FlexItem,{display:"flex",children:(0,Ie.jsx)(l.Icon,{icon:"video-alt2"})}),(0,Ie.jsxs)(l.FlexItem,{children:[!n&&(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,Ce.__)("Link available for attendees only.","gatherpress"),children:t}),(0,Ie.jsx)(Le,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,Ie.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})},$e=()=>{const{editPost:e,unlockPostSaving:t}=(0,i.useDispatch)("core/editor"),n=(0,i.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[o,r]=(0,je.useState)(n);return De({setOnlineEventLink:r},Pe("eventDetails.postId")),(0,Ie.jsx)(l.TextControl,{label:(0,Ce.__)("Online event link","gatherpress"),value:o,placeholder:(0,Ce.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),r(n),((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setOnlineEventLink:n},Pe("eventDetails.postId")),t()})(n)}})},Fe=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,Ie.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,Ie.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},He=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/online-event","version":"1.0.1","title":"Online Event","category":"gatherpress","icon":"video-alt2","example":{},"description":"Utilized for virtual events, offering the capability to share a direct link to an event.","attributes":{"blockId":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./online-event.js","render":"file:./render.php"}');(0,o.registerBlockType)(He,{edit:({isSelected:e})=>{const t=(0,r.useBlockProps)(),n=(0,i.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));return(0,Ie.jsxs)(Ie.Fragment,{children:[Ne()&&(0,Ie.jsx)(r.InspectorControls,{children:(0,Ie.jsx)(l.PanelBody,{children:(0,Ie.jsx)(l.PanelRow,{children:(0,Ie.jsx)($e,{})})})}),(0,Ie.jsx)("div",{...t,children:(0,Ie.jsx)(Fe,{isSelected:e,children:(0,Ie.jsx)(Be,{onlineEventLinkDefault:n})})})]})},save:()=>null})},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=l)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(s=!1,l0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,r,l]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={495:0,791:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[i,s,c]=n,a=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(c)var u=c(o)}for(t&&t(n);ao(7520)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={7520:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.wp.blockEditor,l=window.wp.components,i=window.wp.data,s=window.React,c=Math.min,a=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function v(e,t,n){return a(e,c(t,n))}function h(e,t){return"function"==typeof e?e(t):e}function y(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function b(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(y(e))?"y":"x"}function _(e){return w(x(e))}function E(e){return e.replace(/start|end/g,(e=>m[e]))}function S(e){return e.replace(/left|right|bottom|top/g,(e=>p[e]))}function A(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function k(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function O(e,t,n){let{reference:o,floating:r}=e;const l=x(t),i=_(t),s=b(i),c=y(t),a="y"===l,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(c){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(g(t)){case"start":p[i]-=f*(n&&a?-1:1);break;case"end":p[i]+=f*(n&&a?-1:1)}return p}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=h(t,e),m=A(p),v=s[f?"floating"===d?"reference":"floating":d],y=k(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(v)))||n?v:v.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:c})),g="floating"===d?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(w))&&await(null==l.getScale?void 0:l.getScale(w))||{x:1,y:1},x=k(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:w,strategy:c}):g);return{top:(y.top-x.top+m.top)/b.y,bottom:(x.bottom-y.bottom+m.bottom)/b.y,left:(y.left-x.left+m.left)/b.x,right:(x.right-y.right+m.right)/b.x}}function T(){return"undefined"!=typeof window}function L(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function C(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return!!T()&&(e instanceof Node||e instanceof C(e).Node)}function N(e){return!!T()&&(e instanceof Element||e instanceof C(e).Element)}function P(e){return!!T()&&(e instanceof HTMLElement||e instanceof C(e).HTMLElement)}function I(e){return!(!T()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof C(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=M(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function $(e){return["table","td","th"].includes(L(e))}function F(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function H(e){const t=z(),n=N(e)?M(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function W(e){return["html","body","#document"].includes(L(e))}function M(e){return C(e).getComputedStyle(e)}function V(e){return N(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===L(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||j(e);return I(t)?t.host:t}function K(e){const t=q(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:P(t)&&B(t)?t:K(t)}function X(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=K(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=C(r);if(l){const e=G(i);return t.concat(i,i.visualViewport||[],B(r)?r:[],e&&n?X(e):[])}return t.concat(r,X(r,[],n))}function G(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Y(e){const t=M(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=P(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=u(n)!==l||u(o)!==i;return s&&(n=l,o=i),{width:n,height:o,$:s}}function J(e){return N(e)?e:e.contextElement}function U(e){const t=J(e);if(!P(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=Y(t);let i=(l?u(n.width):n.width)/o,s=(l?u(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Z=f(0);function Q(e){const t=C(e);return z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Z}function ee(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=J(e);let i=f(1);t&&(o?N(o)&&(i=U(o)):i=U(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==C(e))&&t}(l,n,o)?Q(l):f(0);let c=(r.left+s.x)/i.x,a=(r.top+s.y)/i.y,u=r.width/i.x,d=r.height/i.y;if(l){const e=C(l),t=o&&N(o)?C(o):o;let n=e,r=G(n);for(;r&&o&&t!==n;){const e=U(r),t=r.getBoundingClientRect(),o=M(r),l=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,a*=e.y,u*=e.x,d*=e.y,c+=l,a+=i,n=C(r),r=G(n)}}return k({width:u,height:d,x:c,y:a})}function te(e,t){const n=V(e).scrollLeft;return t?t.left+n:ee(j(e)).left+n}function ne(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=C(e),o=j(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){l=r.width,i=r.height;const e=z();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:l,height:i,x:s,y:c}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=V(e),o=e.ownerDocument.body,r=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+te(e);const s=-n.scrollTop;return"rtl"===M(o).direction&&(i+=a(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:i,y:s}}(j(e));else if(N(t))o=function(e,t){const n=ee(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=P(e)?U(e):f(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=Q(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return k(o)}function oe(e,t){const n=q(e);return!(n===t||!N(n)||W(n))&&("fixed"===M(n).position||oe(n,t))}function re(e,t,n){const o=P(t),r=j(t),l="fixed"===n,i=ee(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const c=f(0);if(o||!o&&!l)if(("body"!==L(t)||B(r))&&(s=V(t)),o){const e=ee(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=te(r));let a=0,u=0;if(r&&!o&&!l){const e=r.getBoundingClientRect();u=e.top+s.scrollTop,a=e.left+s.scrollLeft-te(r,e)}return{x:i.left+s.scrollLeft-c.x-a,y:i.top+s.scrollTop-c.y-u,width:i.width,height:i.height}}function le(e){return"static"===M(e).position}function ie(e,t){if(!P(e)||"fixed"===M(e).position)return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function se(e,t){const n=C(e);if(F(e))return n;if(!P(e)){let t=q(e);for(;t&&!W(t);){if(N(t)&&!le(t))return t;t=q(t)}return n}let o=ie(e,t);for(;o&&$(o)&&le(o);)o=ie(o,t);return o&&W(o)&&le(o)&&!H(o)?n:o||function(e){let t=q(e);for(;P(t)&&!W(t);){if(H(t))return t;if(F(t))return null;t=q(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const l="fixed"===r,i=j(o),s=!!t&&F(t.floating);if(o===i||s&&l)return n;let c={scrollLeft:0,scrollTop:0},a=f(1);const u=f(0),d=P(o);if((d||!d&&!l)&&(("body"!==L(o)||B(i))&&(c=V(o)),P(o))){const e=ee(o);a=U(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+u.x,y:n.y*a.y-c.scrollTop*a.y+u.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[..."clippingAncestors"===n?F(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=X(e,[],!1).filter((e=>N(e)&&"body"!==L(e))),r=null;const l="fixed"===M(e).position;let i=l?q(e):e;for(;N(i)&&!W(i);){const t=M(i),n=H(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||B(i)&&!n&&oe(e,i))?o=o.filter((e=>e!==i)):r=t,i=q(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=l[0],s=l.reduce(((e,n)=>{const o=ne(t,n,r);return e.top=a(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=a(o.left,e.left),e}),ne(t,i,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:se,getElementRects:async function(e){const t=this.getOffsetParent||se,n=this.getDimensions,o=await n(e.floating);return{reference:re(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Y(e);return{width:t,height:n}},getScale:U,isElement:N,isRTL:function(e){return"rtl"===M(e).direction}};const ae=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:l,placement:i,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=y(n),s=g(n),c="y"===x(n),a=["left","top"].includes(i)?-1:1,u=l&&c?-1:1,d=h(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),c?{x:p*u,y:f*a}:{x:f*a,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:l+c.y,data:{...c,placement:i}}}}},ue=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=h(e,t),a={x:n,y:o},u=await R(t,c),d=x(y(r)),f=w(d);let p=a[f],m=a[d];if(l){const e="y"===f?"bottom":"right";p=v(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";m=v(m+u["y"===d?"top":"left"],m,m-u[e])}const g=s.fn({...t,[f]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:l,[d]:i}}}}}},de=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...w}=h(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const A=y(r),k=x(s),O=y(s)===s,T=await(null==c.isRTL?void 0:c.isRTL(a.floating)),L=f||(O||!v?[S(s)]:function(e){const t=S(e);return[E(e),t,E(t)]}(s)),C="none"!==m;!f&&C&&L.push(...function(e,t,n,o){const r=g(e);let l=function(e,t,n){const o=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?l:i;default:return[]}}(y(e),"start"===n,o);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(E)))),l}(s,v,m,T));const j=[s,...L],D=await R(t,w),N=[];let P=(null==(o=l.flip)?void 0:o.overflows)||[];if(u&&N.push(D[A]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=g(e),r=_(e),l=b(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=S(i)),[i,S(i)]}(r,i,T);N.push(D[e[0]],D[e[1]])}if(P=[...P,{placement:r,overflows:N}],!N.every((e=>e<=0))){var I,B;const e=((null==(I=l.flip)?void 0:I.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(B=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:B.placement;if(!n)switch(p){case"bestFit":{var $;const e=null==($=P.filter((e=>{if(C){const t=x(e.placement);return t===k||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},fe=(e,t,n)=>{const o=new Map,r={platform:ce,...n},l={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,s=l.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=O(a,o,c),f=o,p={},m=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=i;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:l,elements:i,middlewareData:s}=e,{element:a,padding:d=0}=h(u,e)||{};if(null==a)return{};const f=A(d),p={x:t,y:n},m=_(o),y=b(m),w=await l.getDimensions(a),x="y"===m,E=x?"top":"left",S=x?"bottom":"right",k=x?"clientHeight":"clientWidth",O=r.reference[y]+r.reference[m]-p[m]-r.floating[y],R=p[m]-r.reference[m],T=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a));let L=T?T[k]:0;L&&await(null==l.isElement?void 0:l.isElement(T))||(L=i.floating[k]||r.floating[y]);const C=O/2-R/2,j=L/2-w[y]/2-1,D=c(f[E],j),N=c(f[S],j),P=D,I=L-w[y]-N,B=L/2-w[y]/2+C,$=v(P,B,I),F=!s.arrow&&null!=g(o)&&B!==$&&r.reference[y]/2-(B{var r,l;const i={left:`${e}px`,top:`${t}px`,border:s},{x:c,y:a}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==l?l:"bottom",d=s&&{borderBottom:s,borderRight:s};let f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):fe(e,t,{placement:"bottom",strategy:l,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},ye=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ge=(e,t,n)=>{let o=null;const r=function(...r){const l=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(l,t)),n||(o&&clearTimeout(o),o=setTimeout(l,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},we=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,be=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>be(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!we(e)||!we(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>be(e[n],t[n])))},xe=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},_e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(xe(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ee="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,Se=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ke=(0,s.createContext)({getTooltipData:()=>Ae});function Oe(e="DEFAULT_TOOLTIP_ID"){return(0,s.useContext)(ke).getTooltipData(e)}var Re={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Te={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Le=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:l,anchorSelect:i,place:u="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:h,wrapper:y,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:k=!1,openEvents:O,closeEvents:R,globalCloseEvents:T,imperativeModeOnly:L,style:C,position:D,afterShow:N,afterHide:P,disableTooltip:I,content:B,contentWrapperRef:$,isOpen:F,defaultIsOpen:H=!1,setIsOpen:z,activeAnchor:W,setActiveAnchor:M,border:V,opacity:q,arrowColor:K,role:G="tooltip"})=>{var Y;const U=(0,s.useRef)(null),Z=(0,s.useRef)(null),Q=(0,s.useRef)(null),te=(0,s.useRef)(null),ne=(0,s.useRef)(null),[oe,re]=(0,s.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:u}),[le,ie]=(0,s.useState)(!1),[se,ce]=(0,s.useState)(!1),[ae,ue]=(0,s.useState)(null),de=(0,s.useRef)(!1),fe=(0,s.useRef)(null),{anchorRefs:me,setActiveAnchor:ve}=Oe(t),ye=(0,s.useRef)(!1),[we,xe]=(0,s.useState)([]),Ae=(0,s.useRef)(!1),ke=m||p.includes("click"),Le=ke||(null==O?void 0:O.click)||(null==O?void 0:O.dblclick)||(null==O?void 0:O.mousedown),Ce=O?{...O}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!O&&ke&&Object.assign(Ce,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const je=R?{...R}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!R&&ke&&Object.assign(je,{mouseleave:!1,blur:!1,mouseout:!1});const De=T?{...T}:{escape:S||!1,scroll:A||!1,resize:k||!1,clickOutsideAnchor:Le||!1};L&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(je,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(De,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ee((()=>(Ae.current=!0,()=>{Ae.current=!1})),[]);const Ne=e=>{Ae.current&&(e&&ce(!0),setTimeout((()=>{Ae.current&&(null==z||z(e),void 0===F&&ie(e))}),10))};(0,s.useEffect)((()=>{if(void 0===F)return()=>null;F&&ce(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,s.useEffect)((()=>{if(le!==de.current)if(Se(ne),de.current=le,le)null==N||N();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ne.current=setTimeout((()=>{ce(!1),ue(null),null==P||P()}),e+25)}}),[le]);const Pe=e=>{re((t=>be(t,e)?t:e))},Ie=(e=g)=>{Se(Q),se?Ne(!0):Q.current=setTimeout((()=>{Ne(!0)}),e)},Be=(e=w)=>{Se(te),te.current=setTimeout((()=>{ye.current||Ne(!1)}),e)},$e=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return M(null),void ve({current:null});g?Ie():Ne(!0),M(n),ve({current:n}),Se(te)},Fe=()=>{E?Be(w||100):w?Be():Ne(!1),Se(Q)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};he({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:u,offset:f,elementReference:o,tooltipReference:U.current,tooltipArrowReference:Z.current,strategy:v,middlewares:h,border:V}).then((e=>{Pe(e)}))},ze=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),fe.current=n},We=e=>{var t;if(!le)return;const n=e.target;n.isConnected&&((null===(t=U.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${l}']`),...we].some((e=>null==e?void 0:e.contains(n)))||(Ne(!1),Se(Q)))},Me=ge($e,50,!0),Ve=ge(Fe,50,!0),qe=e=>{Ve.cancel(),Me(e)},Ke=()=>{Me.cancel(),Ve()},Xe=(0,s.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:D;n?He(n):b?fe.current&&He(fe.current):(null==W?void 0:W.isConnected)&&he({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:u,offset:f,elementReference:W,tooltipReference:U.current,tooltipArrowReference:Z.current,strategy:v,middlewares:h,border:V}).then((e=>{Ae.current&&Pe(e)}))}),[le,W,B,C,u,null==ae?void 0:ae.place,f,v,D,null==ae?void 0:ae.position,b]);(0,s.useEffect)((()=>{var e,t;const n=new Set(me);we.forEach((e=>{(null==I?void 0:I(e))||n.add({current:e})}));const o=document.querySelector(`[id='${l}']`);o&&!(null==I?void 0:I(o))&&n.add({current:o});const r=()=>{Ne(!1)},i=_e(W),s=_e(U.current);De.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r));let u=null;De.resize?window.addEventListener("resize",r):W&&U.current&&(u=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=J(e),p=r||l?[...f?X(f):[],...X(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));const m=f&&s?function(e,t){let n,o=null;const r=j(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),l();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(s||t(),!m||!v)return;const h={rootMargin:-d(p)+"px "+-d(r.clientWidth-(f+m))+"px "+-d(r.clientHeight-(p+v))+"px "+-d(f)+"px",threshold:a(0,c(1,u))||1};let y=!0;function g(e){const t=e[0].intersectionRatio;if(t!==u){if(!y)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}y=!1}try{o=new IntersectionObserver(g,{...h,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,h)}o.observe(e)}(!0),l}(f,n):null;let v,h=-1,y=null;i&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),f&&!u&&y.observe(f),y.observe(t));let g=u?ee(e):null;return u&&function t(){const o=ee(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,v=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==m||m(),null==(e=y)||e.disconnect(),y=null,u&&cancelAnimationFrame(v)}}(W,U.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&Ne(!1)};De.escape&&window.addEventListener("keydown",f),De.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],m=e=>{le&&(null==e?void 0:e.target)===W||$e(e)},v=e=>{le&&(null==e?void 0:e.target)===W&&Fe()},h=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(h.includes(e)?p.push({event:e,listener:qe}):y.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(je).forEach((([e,t])=>{t&&(h.includes(e)?p.push({event:e,listener:Ke}):y.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"pointermove",listener:ze});const g=()=>{ye.current=!0},w=()=>{ye.current=!1,Fe()};return E&&!Le&&(null===(e=U.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=U.current)||void 0===t||t.addEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;De.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r)),De.resize?window.removeEventListener("resize",r):null==u||u(),De.clickOutsideAnchor&&window.removeEventListener("click",We),De.escape&&window.removeEventListener("keydown",f),E&&!Le&&(null===(e=U.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=U.current)||void 0===t||t.removeEventListener("mouseleave",w)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Xe,se,me,we,O,R,T,ke,g,w]),(0,s.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:i)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(ce(!1),Ne(!1),M(null),Se(Q),Se(te),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&xe((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,i,null==ae?void 0:ae.anchorSelect,W]),(0,s.useEffect)((()=>{Xe()}),[Xe]),(0,s.useEffect)((()=>{if(!(null==$?void 0:$.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe($.current),()=>{e.disconnect()}}),[B,null==$?void 0:$.current]),(0,s.useEffect)((()=>{var e;const t=document.querySelector(`[id='${l}']`),n=[...we,t];W&&n.includes(W)||M(null!==(e=we[0])&&void 0!==e?e:t)}),[l,we,W]),(0,s.useEffect)((()=>(H&&Ne(!0),()=>{Se(Q),Se(te)})),[]),(0,s.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:i;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));xe(e)}catch(e){xe([])}}),[t,i,null==ae?void 0:ae.anchorSelect]),(0,s.useEffect)((()=>{Q.current&&(Se(Q),Ie(g))}),[g]);const Ge=null!==(Y=null==ae?void 0:ae.content)&&void 0!==Y?Y:B,Ye=le&&Object.keys(oe.tooltipStyles).length>0;return(0,s.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?Ie(e.delay):Ne(!0)},close:e=>{(null==e?void 0:e.delay)?Be(e.delay):Ne(!1)},activeAnchor:W,place:oe.place,isOpen:Boolean(se&&!x&&Ge&&Ye)}))),se&&!x&&Ge?s.createElement(y,{id:t,role:G,className:pe("react-tooltip",Re.tooltip,Te.tooltip,Te[r],n,`react-tooltip__place-${oe.place}`,Re[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&Re.fixed,E&&Re.clickable),onTransitionEnd:e=>{Se(ne),le||"opacity"!==e.propertyName||(ce(!1),ue(null),null==P||P())},style:{...C,...oe.tooltipStyles,opacity:void 0!==q&&Ye?q:void 0},ref:U},Ge,s.createElement(y,{className:pe("react-tooltip-arrow",Re.arrow,Te.arrow,o,_&&Re.noArrow),style:{...oe.tooltipArrowStyles,background:K?`linear-gradient(to right bottom, transparent 50%, ${K} 50%)`:void 0},ref:Z})):null},Ce=({content:e})=>s.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),je=s.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:l,className:i,classNameArrow:c,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:h="absolute",middlewares:y,delayShow:g=0,delayHide:w=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:k=!1,openEvents:O,closeEvents:R,globalCloseEvents:T,imperativeModeOnly:L=!1,style:C,position:j,isOpen:D,defaultIsOpen:N=!1,disableStyleInjection:P=!1,border:I,opacity:B,arrowColor:$,setIsOpen:F,afterShow:H,afterHide:z,disableTooltip:W,role:M="tooltip"},V)=>{const[q,K]=(0,s.useState)(o),[X,G]=(0,s.useState)(r),[Y,J]=(0,s.useState)(u),[U,Z]=(0,s.useState)(a),[Q,ee]=(0,s.useState)(d),[te,ne]=(0,s.useState)(g),[oe,re]=(0,s.useState)(w),[le,ie]=(0,s.useState)(b),[se,ce]=(0,s.useState)(x),[ae,ue]=(0,s.useState)(f),[de,fe]=(0,s.useState)(m),[me,ve]=(0,s.useState)(h),[he,ge]=(0,s.useState)(null),[we,be]=(0,s.useState)(null),xe=(0,s.useRef)(P),{anchorRefs:_e,activeAnchor:Ee}=Oe(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ae=e=>{const t={place:e=>{var t;J(null!==(t=e)&&void 0!==t?t:u)},content:e=>{K(null!=e?e:o)},html:e=>{G(null!=e?e:r)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:m)},"position-strategy":e=>{var t;ve(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{ne(null===e?g:Number(e))},"delay-hide":e=>{re(null===e?w:Number(e))},float:e=>{ie(null===e?b:"true"===e)},hidden:e=>{ce(null===e?x:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,s.useEffect)((()=>{K(o)}),[o]),(0,s.useEffect)((()=>{G(r)}),[r]),(0,s.useEffect)((()=>{J(u)}),[u]),(0,s.useEffect)((()=>{Z(a)}),[a]),(0,s.useEffect)((()=>{ee(d)}),[d]),(0,s.useEffect)((()=>{ne(g)}),[g]),(0,s.useEffect)((()=>{re(w)}),[w]),(0,s.useEffect)((()=>{ie(b)}),[b]),(0,s.useEffect)((()=>{ce(x)}),[x]),(0,s.useEffect)((()=>{ve(h)}),[h]),(0,s.useEffect)((()=>{xe.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[P]),(0,s.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}))}),[]),(0,s.useEffect)((()=>{var o;const r=new Set(_e);let l=n;if(!l&&e&&(l=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const s=null!==(o=null!=we?we:i)&&void 0!==o?o:Ee.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(s);Ae(n)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Se(s);Ae(e),c.observe(s,a)}return()=>{c.disconnect()}}),[_e,Ee,we,t,n]),(0,s.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),I&&!ye("border",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),B&&!ye("opacity",`${B}`)&&console.warn(`[react-tooltip] "${B}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Re=(0,s.useRef)(null);if(l){const e=l({content:(null==we?void 0:we.getAttribute("data-tooltip-content"))||q||null,activeAnchor:we});ke=e?s.createElement("div",{ref:Re,className:"react-tooltip-content-wrapper"},e):null}else q&&(ke=q);X&&(ke=s.createElement(Ce,{content:X}));const Te={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:pe(i,he),classNameArrow:c,content:ke,contentWrapperRef:Re,place:Y,variant:U,offset:Q,wrapper:ae,events:de,openOnClick:v,positionStrategy:me,middlewares:y,delayShow:te,delayHide:oe,float:le,hidden:se,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:A,closeOnResize:k,openEvents:O,closeEvents:R,globalCloseEvents:T,imperativeModeOnly:L,style:C,position:j,isOpen:D,defaultIsOpen:N,border:I,opacity:B,arrowColor:$,setIsOpen:F,afterShow:H,afterHide:z,disableTooltip:W,activeAnchor:we,setActiveAnchor:e=>be(e),role:M};return s.createElement(Le,{...Te})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ve({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ve({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const De=window.wp.i18n,Ne=window.wp.element,Pe=(e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}};function Ie(){const e=(0,i.select)("core/editor")?.getCurrentPostType();return"gatherpress_event"===e||"gatherpress_venue"===e}function Be(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const $e=window.ReactJSXRuntime,Fe=({onlineEventLinkDefault:e=""})=>{const t=(0,De.__)("Online event","gatherpress"),[n,o]=(0,Ne.useState)(e);return Pe({setOnlineEventLink:o},Be("eventDetails.postId")),(0,$e.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,$e.jsx)(l.FlexItem,{display:"flex",children:(0,$e.jsx)(l.Icon,{icon:"video-alt2"})}),(0,$e.jsxs)(l.FlexItem,{children:[!n&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,De.__)("Link available for attendees only.","gatherpress"),children:t}),(0,$e.jsx)(je,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,$e.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})},He=()=>{const{editPost:e,unlockPostSaving:t}=(0,i.useDispatch)("core/editor"),n=(0,i.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[o,r]=(0,Ne.useState)(n);return Pe({setOnlineEventLink:r},Be("eventDetails.postId")),(0,$e.jsx)(l.TextControl,{label:(0,De.__)("Online event link","gatherpress"),value:o,placeholder:(0,De.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),r(n),((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setOnlineEventLink:n},Be("eventDetails.postId")),t()})(n)}})},ze=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,$e.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,$e.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},We=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/online-event","version":"1.0.1","title":"Online Event","category":"gatherpress","icon":"video-alt2","example":{},"description":"Utilized for virtual events, offering the capability to share a direct link to an event.","attributes":{"blockId":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./online-event.js","render":"file:./render.php"}');(0,o.registerBlockType)(We,{edit:({isSelected:e})=>{const t=(0,r.useBlockProps)(),n=(0,i.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));return(0,$e.jsxs)($e.Fragment,{children:[Ie()&&(0,$e.jsx)(r.InspectorControls,{children:(0,$e.jsx)(l.PanelBody,{children:(0,$e.jsx)(l.PanelRow,{children:(0,$e.jsx)(He,{})})})}),(0,$e.jsx)("div",{...t,children:(0,$e.jsx)(ze,{isSelected:e,children:(0,$e.jsx)(Fe,{onlineEventLinkDefault:n})})})]})},save:()=>null})},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=l)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(s=!1,l0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,r,l]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={495:0,791:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,i=n[0],s=n[1],c=n[2],a=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(c)var u=c(o)}for(t&&t(n);ao(7520)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/online-event/online-event.asset.php b/build/blocks/online-event/online-event.asset.php index d73096021..3c4e6b19b 100644 --- a/build/blocks/online-event/online-event.asset.php +++ b/build/blocks/online-event/online-event.asset.php @@ -1 +1 @@ - array('react', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'eefd96d7d3ced019a949'); + array('react', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '2b9111b895d3b05a8ece'); diff --git a/build/blocks/online-event/online-event.js b/build/blocks/online-event/online-event.js index 07db8d162..09a09b1a0 100644 --- a/build/blocks/online-event/online-event.js +++ b/build/blocks/online-event/online-event.js @@ -1 +1 @@ -(()=>{var e={6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const o=window.wp.element,r=window.React,l=Math.min,i=Math.max,s=Math.round,c=Math.floor,a=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t,n){return i(e,l(t,n))}function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function y(e){return"y"===e?"height":"width"}function w(e){return["top","bottom"].includes(m(e))?"y":"x"}function g(e){return h(w(e))}function b(e){return e.replace(/start|end/g,(e=>d[e]))}function x(e){return e.replace(/left|right|bottom|top/g,(e=>u[e]))}function _(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function E(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function S(e,t,n){let{reference:o,floating:r}=e;const l=w(t),i=g(t),s=y(i),c=m(t),a="y"===l,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(c){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(v(t)){case"start":p[i]-=f*(n&&a?-1:1);break;case"end":p[i]+=f*(n&&a?-1:1)}return p}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=p(t,e),v=_(m),h=s[f?"floating"===d?"reference":"floating":d],y=E(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(h)))||n?h:h.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:c})),w="floating"===d?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,g=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(g))&&await(null==l.getScale?void 0:l.getScale(g))||{x:1,y:1},x=E(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:g,strategy:c}):w);return{top:(y.top-x.top+v.top)/b.y,bottom:(x.bottom-y.bottom+v.bottom)/b.y,left:(y.left-x.left+v.left)/b.x,right:(x.right-y.right+v.right)/b.x}}function R(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function k(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return e instanceof Node||e instanceof O(e).Node}function T(e){return e instanceof Element||e instanceof O(e).Element}function C(e){return e instanceof HTMLElement||e instanceof O(e).HTMLElement}function j(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof O(e).ShadowRoot)}function D(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=F(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function N(e){return["table","td","th"].includes(R(e))}function I(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function P(e){const t=$(),n=T(e)?F(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function $(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function B(e){return["html","body","#document"].includes(R(e))}function F(e){return O(e).getComputedStyle(e)}function H(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function W(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||j(e)&&e.host||k(e);return j(t)?t.host:t}function z(e){const t=W(e);return B(t)?e.ownerDocument?e.ownerDocument.body:e.body:C(t)&&D(t)?t:z(t)}function M(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=z(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=O(r);return l?t.concat(i,i.visualViewport||[],D(r)?r:[],i.frameElement&&n?M(i.frameElement):[]):t.concat(r,M(r,[],n))}function q(e){const t=F(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=C(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=s(n)!==l||s(o)!==i;return c&&(n=l,o=i),{width:n,height:o,$:c}}function V(e){return T(e)?e:e.contextElement}function K(e){const t=V(e);if(!C(t))return a(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=q(t);let i=(l?s(n.width):n.width)/o,c=(l?s(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),c&&Number.isFinite(c)||(c=1),{x:i,y:c}}const X=a(0);function G(e){const t=O(e);return $()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:X}function Y(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=V(e);let i=a(1);t&&(o?T(o)&&(i=K(o)):i=K(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==O(e))&&t}(l,n,o)?G(l):a(0);let c=(r.left+s.x)/i.x,u=(r.top+s.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(l){const e=O(l),t=o&&T(o)?O(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=K(r),t=r.getBoundingClientRect(),o=F(r),l=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=l,u+=i,n=O(r),r=n.frameElement}}return E({width:d,height:f,x:c,y:u})}function J(e){return Y(k(e)).left+H(e).scrollLeft}function Z(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=O(e),o=k(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){l=r.width,i=r.height;const e=$();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:l,height:i,x:s,y:c}}(e,n);else if("document"===t)o=function(e){const t=k(e),n=H(e),o=e.ownerDocument.body,r=i(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=i(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+J(e);const c=-n.scrollTop;return"rtl"===F(o).direction&&(s+=i(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:s,y:c}}(k(e));else if(T(t))o=function(e,t){const n=Y(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=C(e)?K(e):a(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=G(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return E(o)}function U(e,t){const n=W(e);return!(n===t||!T(n)||B(n))&&("fixed"===F(n).position||U(n,t))}function Q(e,t,n){const o=C(t),r=k(t),l="fixed"===n,i=Y(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const c=a(0);if(o||!o&&!l)if(("body"!==R(t)||D(r))&&(s=H(t)),o){const e=Y(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=J(r));return{x:i.left+s.scrollLeft-c.x,y:i.top+s.scrollTop-c.y,width:i.width,height:i.height}}function ee(e){return"static"===F(e).position}function te(e,t){return C(e)&&"fixed"!==F(e).position?t?t(e):e.offsetParent:null}function ne(e,t){const n=O(e);if(I(e))return n;if(!C(e)){let t=W(e);for(;t&&!B(t);){if(T(t)&&!ee(t))return t;t=W(t)}return n}let o=te(e,t);for(;o&&N(o)&&ee(o);)o=te(o,t);return o&&B(o)&&ee(o)&&!P(o)?n:o||function(e){let t=W(e);for(;C(t)&&!B(t);){if(P(t))return t;if(I(t))return null;t=W(t)}return null}(e)||n}const oe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const l="fixed"===r,i=k(o),s=!!t&&I(t.floating);if(o===i||s&&l)return n;let c={scrollLeft:0,scrollTop:0},u=a(1);const d=a(0),f=C(o);if((f||!f&&!l)&&(("body"!==R(o)||D(i))&&(c=H(o)),C(o))){const e=Y(o);u=K(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}},getDocumentElement:k,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[..."clippingAncestors"===n?I(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=M(e,[],!1).filter((e=>T(e)&&"body"!==R(e))),r=null;const l="fixed"===F(e).position;let i=l?W(e):e;for(;T(i)&&!B(i);){const t=F(i),n=P(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||D(i)&&!n&&U(e,i))?o=o.filter((e=>e!==i)):r=t,i=W(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],c=s[0],a=s.reduce(((e,n)=>{const o=Z(t,n,r);return e.top=i(o.top,e.top),e.right=l(o.right,e.right),e.bottom=l(o.bottom,e.bottom),e.left=i(o.left,e.left),e}),Z(t,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ne,getElementRects:async function(e){const t=this.getOffsetParent||ne,n=this.getDimensions,o=await n(e.floating);return{reference:Q(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=q(e);return{width:t,height:n}},getScale:K,isElement:T,isRTL:function(e){return"rtl"===F(e).direction}};const re=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:l,placement:i,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=m(n),s=v(n),c="y"===w(n),a=["left","top"].includes(i)?-1:1,u=l&&c?-1:1,d=p(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof y&&(h="end"===s?-1*y:y),c?{x:h*u,y:f*a}:{x:f*a,y:h*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:l+c.y,data:{...c,placement:i}}}}},le=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=p(e,t),a={x:n,y:o},u=await A(t,c),d=w(m(r)),v=h(d);let y=a[v],g=a[d];if(l){const e="y"===v?"bottom":"right";y=f(y+u["y"===v?"top":"left"],y,y-u[e])}if(i){const e="y"===d?"bottom":"right";g=f(g+u["y"===d?"top":"left"],g,g-u[e])}const b=s.fn({...t,[v]:y,[d]:g});return{...b,data:{x:b.x-n,y:b.y-o}}}}},ie=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:E=!0,...S}=p(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const R=m(r),O=w(s),k=m(s)===s,L=await(null==c.isRTL?void 0:c.isRTL(a.floating)),T=f||(k||!E?[x(s)]:function(e){const t=x(e);return[b(e),t,b(t)]}(s)),C="none"!==_;!f&&C&&T.push(...function(e,t,n,o){const r=v(e);let l=function(e,t,n){const o=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?l:i;default:return[]}}(m(e),"start"===n,o);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(b)))),l}(s,E,_,L));const j=[s,...T],D=await A(t,S),N=[];let I=(null==(o=l.flip)?void 0:o.overflows)||[];if(u&&N.push(D[R]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=v(e),r=g(e),l=y(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=x(i)),[i,x(i)]}(r,i,L);N.push(D[e[0]],D[e[1]])}if(I=[...I,{placement:r,overflows:N}],!N.every((e=>e<=0))){var P,$;const e=((null==(P=l.flip)?void 0:P.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==($=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:$.placement;if(!n)switch(h){case"bestFit":{var B;const e=null==(B=I.filter((e=>{if(C){const t=w(e.placement);return t===O||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:B[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},se=(e,t,n)=>{const o=new Map,r={platform:oe,...n},l={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,s=l.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=S(a,o,c),f=o,p={},m=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:c}=e,{element:a,padding:d=0}=p(u,e)||{};if(null==a)return{};const m=_(d),h={x:t,y:n},w=g(o),b=y(w),x=await i.getDimensions(a),E="y"===w,S=E?"top":"left",A=E?"bottom":"right",R=E?"clientHeight":"clientWidth",O=r.reference[b]+r.reference[w]-h[w]-r.floating[b],k=h[w]-r.reference[w],L=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let T=L?L[R]:0;T&&await(null==i.isElement?void 0:i.isElement(L))||(T=s.floating[R]||r.floating[b]);const C=O/2-k/2,j=T/2-x[b]/2-1,D=l(m[S],j),N=l(m[A],j),I=D,P=T-x[b]-N,$=T/2-x[b]/2+C,B=f(I,$,P),F=!c.arrow&&null!=v(o)&&$!==B&&r.reference[b]/2-(${var r,l;const i={left:`${e}px`,top:`${t}px`,border:c},{x:s,y:a}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==l?l:"bottom",d=c&&{borderBottom:c,borderRight:c};let f=0;if(c){const e=`${c}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):se(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},fe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),pe=(e,t,n)=>{let o=null;const r=function(...r){const l=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(l,t)),n||(o&&clearTimeout(o),o=setTimeout(l,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},me=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ve=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ve(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!me(e)||!me(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>ve(e[n],t[n])))},he=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ye=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(he(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},we="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,ge=e=>{e.current&&(clearTimeout(e.current),e.current=null)},be={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},xe=(0,r.createContext)({getTooltipData:()=>be});function _e(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(xe).getTooltipData(e)}var Ee={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Se={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ae=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:s="dark",anchorId:a,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:h,wrapper:y,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:O,closeEvents:L,globalCloseEvents:T,imperativeModeOnly:C,style:j,position:D,afterShow:N,afterHide:I,content:P,contentWrapperRef:$,isOpen:B,defaultIsOpen:F=!1,setIsOpen:H,activeAnchor:W,setActiveAnchor:z,border:q,opacity:K,arrowColor:X,role:G="tooltip"})=>{var J;const Z=(0,r.useRef)(null),U=(0,r.useRef)(null),Q=(0,r.useRef)(null),ee=(0,r.useRef)(null),te=(0,r.useRef)(null),[ne,oe]=(0,r.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:d}),[re,le]=(0,r.useState)(!1),[ie,se]=(0,r.useState)(!1),[ae,ue]=(0,r.useState)(null),fe=(0,r.useRef)(!1),me=(0,r.useRef)(null),{anchorRefs:he,setActiveAnchor:be}=_e(t),xe=(0,r.useRef)(!1),[Ae,Re]=(0,r.useState)([]),Oe=(0,r.useRef)(!1),ke=m||p.includes("click"),Le=ke||(null==O?void 0:O.click)||(null==O?void 0:O.dblclick)||(null==O?void 0:O.mousedown),Te=O?{...O}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!O&&ke&&Object.assign(Te,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ce=L?{...L}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!L&&ke&&Object.assign(Ce,{mouseleave:!1,blur:!1,mouseout:!1});const je=T?{...T}:{escape:S||!1,scroll:A||!1,resize:R||!1,clickOutsideAnchor:Le||!1};C&&(Object.assign(Te,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ce,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(je,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),we((()=>(Oe.current=!0,()=>{Oe.current=!1})),[]);const De=e=>{Oe.current&&(e&&se(!0),setTimeout((()=>{Oe.current&&(null==H||H(e),void 0===B&&le(e))}),10))};(0,r.useEffect)((()=>{if(void 0===B)return()=>null;B&&se(!0);const e=setTimeout((()=>{le(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,r.useEffect)((()=>{if(re!==fe.current)if(ge(te),fe.current=re,re)null==N||N();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{se(!1),ue(null),null==I||I()}),e+25)}}),[re]);const Ne=e=>{oe((t=>ve(t,e)?t:e))},Ie=(e=w)=>{ge(Q),ie?De(!0):Q.current=setTimeout((()=>{De(!0)}),e)},Pe=(e=g)=>{ge(ee),ee.current=setTimeout((()=>{xe.current||De(!1)}),e)},$e=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return z(null),void be({current:null});w?Ie():De(!0),z(n),be({current:n}),ge(ee)},Be=()=>{E?Pe(g||100):g?Pe():De(!1),ge(Q)},Fe=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};de({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:d,offset:f,elementReference:o,tooltipReference:Z.current,tooltipArrowReference:U.current,strategy:v,middlewares:h,border:q}).then((e=>{Ne(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Fe(n),me.current=n},We=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=Z.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${a}']`),...Ae].some((e=>null==e?void 0:e.contains(n)))||(De(!1),ge(Q)))},ze=pe($e,50,!0),Me=pe(Be,50,!0),qe=e=>{Me.cancel(),ze(e)},Ve=()=>{ze.cancel(),Me()},Ke=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:D;n?Fe(n):b?me.current&&Fe(me.current):(null==W?void 0:W.isConnected)&&de({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:d,offset:f,elementReference:W,tooltipReference:Z.current,tooltipArrowReference:U.current,strategy:v,middlewares:h,border:q}).then((e=>{Oe.current&&Ne(e)}))}),[re,W,P,j,d,null==ae?void 0:ae.place,f,v,D,null==ae?void 0:ae.position,b]);(0,r.useEffect)((()=>{var e,t;const n=new Set(he);Ae.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${a}']`);o&&n.add({current:o});const r=()=>{De(!1)},s=ye(W),u=ye(Z.current);je.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==u||u.addEventListener("scroll",r));let d=null;je.resize?window.addEventListener("resize",r):W&&Z.current&&(d=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=o,f=V(e),p=r||s?[...f?M(f):[],...M(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));const m=f&&u?function(e,t){let n,o=null;const r=k(e);function s(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function a(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),s();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(u||t(),!m||!v)return;const h={rootMargin:-c(p)+"px "+-c(r.clientWidth-(f+m))+"px "+-c(r.clientHeight-(p+v))+"px "+-c(f)+"px",threshold:i(0,l(1,d))||1};let y=!0;function w(e){const t=e[0].intersectionRatio;if(t!==d){if(!y)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}y=!1}try{o=new IntersectionObserver(w,{...h,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(w,h)}o.observe(e)}(!0),s}(f,n):null;let v,h=-1,y=null;a&&(y=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),f&&!d&&y.observe(f),y.observe(t));let w=d?Y(e):null;return d&&function t(){const o=Y(e);!w||o.x===w.x&&o.y===w.y&&o.width===w.width&&o.height===w.height||n(),w=o,v=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(v)}}(W,Z.current,Ke,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&De(!1)};je.escape&&window.addEventListener("keydown",f),je.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],m=e=>{re&&(null==e?void 0:e.target)===W||$e(e)},v=e=>{re&&(null==e?void 0:e.target)===W&&Be()},h=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(Te).forEach((([e,t])=>{t&&(h.includes(e)?p.push({event:e,listener:qe}):y.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(Ce).forEach((([e,t])=>{t&&(h.includes(e)?p.push({event:e,listener:Ve}):y.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"pointermove",listener:He});const w=()=>{xe.current=!0},g=()=>{xe.current=!1,Be()};return E&&!Le&&(null===(e=Z.current)||void 0===e||e.addEventListener("mouseenter",w),null===(t=Z.current)||void 0===t||t.addEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;je.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==u||u.removeEventListener("scroll",r)),je.resize?window.removeEventListener("resize",r):null==d||d(),je.clickOutsideAnchor&&window.removeEventListener("click",We),je.escape&&window.removeEventListener("keydown",f),E&&!Le&&(null===(e=Z.current)||void 0===e||e.removeEventListener("mouseenter",w),null===(t=Z.current)||void 0===t||t.removeEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Ke,ie,he,Ae,O,L,T,ke,w,g]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:u)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(se(!1),De(!1),z(null),ge(Q),ge(ee),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Re((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,u,null==ae?void 0:ae.anchorSelect,W]),(0,r.useEffect)((()=>{Ke()}),[Ke]),(0,r.useEffect)((()=>{if(!(null==$?void 0:$.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ke()))}));return e.observe($.current),()=>{e.disconnect()}}),[P,null==$?void 0:$.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${a}']`),n=[...Ae,t];W&&n.includes(W)||z(null!==(e=Ae[0])&&void 0!==e?e:t)}),[a,Ae,W]),(0,r.useEffect)((()=>(F&&De(!0),()=>{ge(Q),ge(ee)})),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:u;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));Re(e)}catch(e){Re([])}}),[t,u,null==ae?void 0:ae.anchorSelect]),(0,r.useEffect)((()=>{Q.current&&(ge(Q),Ie(w))}),[w]);const Xe=null!==(J=null==ae?void 0:ae.content)&&void 0!==J?J:P,Ge=re&&Object.keys(ne.tooltipStyles).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?Ie(e.delay):De(!0)},close:e=>{(null==e?void 0:e.delay)?Pe(e.delay):De(!1)},activeAnchor:W,place:ne.place,isOpen:Boolean(ie&&!x&&Xe&&Ge)}))),ie&&!x&&Xe?r.createElement(y,{id:t,role:G,className:ce("react-tooltip",Ee.tooltip,Se.tooltip,Se[s],n,`react-tooltip__place-${ne.place}`,Ee[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&Ee.fixed,E&&Ee.clickable),onTransitionEnd:e=>{ge(te),re||"opacity"!==e.propertyName||(se(!1),ue(null),null==I||I())},style:{...j,...ne.tooltipStyles,opacity:void 0!==K&&Ge?K:void 0},ref:Z},Xe,r.createElement(y,{className:ce("react-tooltip-arrow",Ee.arrow,Se.arrow,o,_&&Ee.noArrow),style:{...ne.tooltipArrowStyles,background:X?`linear-gradient(to right bottom, transparent 50%, ${X} 50%)`:void 0},ref:U})):null},Re=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Oe=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:l,render:i,className:s,classNameArrow:c,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:h="absolute",middlewares:y,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:O,closeEvents:k,globalCloseEvents:L,imperativeModeOnly:T=!1,style:C,position:j,isOpen:D,defaultIsOpen:N=!1,disableStyleInjection:I=!1,border:P,opacity:$,arrowColor:B,setIsOpen:F,afterShow:H,afterHide:W,role:z="tooltip"},M)=>{const[q,V]=(0,r.useState)(o),[K,X]=(0,r.useState)(l),[G,Y]=(0,r.useState)(u),[J,Z]=(0,r.useState)(a),[U,Q]=(0,r.useState)(d),[ee,te]=(0,r.useState)(w),[ne,oe]=(0,r.useState)(g),[re,le]=(0,r.useState)(b),[ie,se]=(0,r.useState)(x),[ae,ue]=(0,r.useState)(f),[de,pe]=(0,r.useState)(m),[me,ve]=(0,r.useState)(h),[he,ye]=(0,r.useState)(null),[we,ge]=(0,r.useState)(null),be=(0,r.useRef)(I),{anchorRefs:xe,activeAnchor:Ee}=_e(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:u)},content:e=>{V(null!=e?e:o)},html:e=>{X(null!=e?e:l)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{Q(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:m)},"position-strategy":e=>{var t;ve(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{te(null===e?w:Number(e))},"delay-hide":e=>{oe(null===e?g:Number(e))},float:e=>{le(null===e?b:"true"===e)},hidden:e=>{se(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{V(o)}),[o]),(0,r.useEffect)((()=>{X(l)}),[l]),(0,r.useEffect)((()=>{Y(u)}),[u]),(0,r.useEffect)((()=>{Z(a)}),[a]),(0,r.useEffect)((()=>{Q(d)}),[d]),(0,r.useEffect)((()=>{te(w)}),[w]),(0,r.useEffect)((()=>{oe(g)}),[g]),(0,r.useEffect)((()=>{le(b)}),[b]),(0,r.useEffect)((()=>{se(x)}),[x]),(0,r.useEffect)((()=>{ve(h)}),[h]),(0,r.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(xe);let l=n;if(!l&&e&&(l=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const s=null!==(o=null!=we?we:i)&&void 0!==o?o:Ee.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(s);Oe(n)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Se(s);Oe(e),c.observe(s,a)}return()=>{c.disconnect()}}),[xe,Ee,we,t,n]),(0,r.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),P&&!fe("border",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),$&&!fe("opacity",`${$}`)&&console.warn(`[react-tooltip] "${$}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Le=(0,r.useRef)(null);if(i){const e=i({content:(null==we?void 0:we.getAttribute("data-tooltip-content"))||q||null,activeAnchor:we});ke=e?r.createElement("div",{ref:Le,className:"react-tooltip-content-wrapper"},e):null}else q&&(ke=q);K&&(ke=r.createElement(Re,{content:K}));const Te={forwardRef:M,id:e,anchorId:t,anchorSelect:n,className:ce(s,he),classNameArrow:c,content:ke,contentWrapperRef:Le,place:G,variant:J,offset:U,wrapper:ae,events:de,openOnClick:v,positionStrategy:me,middlewares:y,delayShow:ee,delayHide:ne,float:re,hidden:ie,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:A,closeOnResize:R,openEvents:O,closeEvents:k,globalCloseEvents:L,imperativeModeOnly:T,style:C,position:j,isOpen:D,defaultIsOpen:N,border:P,opacity:$,arrowColor:B,setIsOpen:F,afterShow:H,afterHide:W,activeAnchor:we,setActiveAnchor:e=>ge(e),role:z};return r.createElement(Ae,{...Te})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ue({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ue({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const ke=window.wp.i18n,Le=window.wp.components;window.wp.data;const Te=window.ReactJSXRuntime,Ce=({onlineEventLinkDefault:e=""})=>{const t=(0,ke.__)("Online event","gatherpress"),[n,r]=(0,o.useState)(e);return((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setOnlineEventLink:r},function(){if("object"==typeof GatherPress)return"eventDetails.postId".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()),(0,Te.jsxs)(Le.Flex,{justify:"normal",gap:"3",children:[(0,Te.jsx)(Le.FlexItem,{display:"flex",children:(0,Te.jsx)(Le.Icon,{icon:"video-alt2"})}),(0,Te.jsxs)(Le.FlexItem,{children:[!n&&(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,ke.__)("Link available for attendees only.","gatherpress"),children:t}),(0,Te.jsx)(Oe,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,Te.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};t()((()=>{const e=document.querySelectorAll('[data-gatherpress_block_name="online-event"]');for(let n=0;n{var e={6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const o=window.wp.element,r=window.React,l=Math.min,i=Math.max,s=Math.round,c=Math.floor,a=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t,n){return i(e,l(t,n))}function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function w(e){return["top","bottom"].includes(m(e))?"y":"x"}function g(e){return y(w(e))}function b(e){return e.replace(/start|end/g,(e=>d[e]))}function x(e){return e.replace(/left|right|bottom|top/g,(e=>u[e]))}function _(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function E(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function S(e,t,n){let{reference:o,floating:r}=e;const l=w(t),i=g(t),s=h(i),c=m(t),a="y"===l,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(c){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(v(t)){case"start":p[i]-=f*(n&&a?-1:1);break;case"end":p[i]+=f*(n&&a?-1:1)}return p}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=p(t,e),v=_(m),y=s[f?"floating"===d?"reference":"floating":d],h=E(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(y)))||n?y:y.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:c})),w="floating"===d?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,g=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),b=await(null==l.isElement?void 0:l.isElement(g))&&await(null==l.getScale?void 0:l.getScale(g))||{x:1,y:1},x=E(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:g,strategy:c}):w);return{top:(h.top-x.top+v.top)/b.y,bottom:(x.bottom-h.bottom+v.bottom)/b.y,left:(h.left-x.left+v.left)/b.x,right:(x.right-h.right+v.right)/b.x}}function R(){return"undefined"!=typeof window}function O(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function T(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function k(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return!!R()&&(e instanceof Node||e instanceof T(e).Node)}function C(e){return!!R()&&(e instanceof Element||e instanceof T(e).Element)}function j(e){return!!R()&&(e instanceof HTMLElement||e instanceof T(e).HTMLElement)}function D(e){return!(!R()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof T(e).ShadowRoot)}function N(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function I(e){return["table","td","th"].includes(O(e))}function P(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function $(e){const t=B(),n=C(e)?H(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function B(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function F(e){return["html","body","#document"].includes(O(e))}function H(e){return T(e).getComputedStyle(e)}function W(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||D(e)&&e.host||k(e);return D(t)?t.host:t}function M(e){const t=z(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&N(t)?t:M(t)}function q(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=M(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=T(r);if(l){const e=V(i);return t.concat(i,i.visualViewport||[],N(r)?r:[],e&&n?q(e):[])}return t.concat(r,q(r,[],n))}function V(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K(e){const t=H(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=j(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=s(n)!==l||s(o)!==i;return c&&(n=l,o=i),{width:n,height:o,$:c}}function X(e){return C(e)?e:e.contextElement}function G(e){const t=X(e);if(!j(t))return a(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=K(t);let i=(l?s(n.width):n.width)/o,c=(l?s(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),c&&Number.isFinite(c)||(c=1),{x:i,y:c}}const Y=a(0);function J(e){const t=T(e);return B()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function Z(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=X(e);let i=a(1);t&&(o?C(o)&&(i=G(o)):i=G(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==T(e))&&t}(l,n,o)?J(l):a(0);let c=(r.left+s.x)/i.x,u=(r.top+s.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(l){const e=T(l),t=o&&C(o)?T(o):o;let n=e,r=V(n);for(;r&&o&&t!==n;){const e=G(r),t=r.getBoundingClientRect(),o=H(r),l=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=l,u+=i,n=T(r),r=V(n)}}return E({width:d,height:f,x:c,y:u})}function U(e,t){const n=W(e).scrollLeft;return t?t.left+n:Z(k(e)).left+n}function Q(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=T(e),o=k(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){l=r.width,i=r.height;const e=B();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:l,height:i,x:s,y:c}}(e,n);else if("document"===t)o=function(e){const t=k(e),n=W(e),o=e.ownerDocument.body,r=i(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=i(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+U(e);const c=-n.scrollTop;return"rtl"===H(o).direction&&(s+=i(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:s,y:c}}(k(e));else if(C(t))o=function(e,t){const n=Z(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=j(e)?G(e):a(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=J(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return E(o)}function ee(e,t){const n=z(e);return!(n===t||!C(n)||F(n))&&("fixed"===H(n).position||ee(n,t))}function te(e,t,n){const o=j(t),r=k(t),l="fixed"===n,i=Z(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const c=a(0);if(o||!o&&!l)if(("body"!==O(t)||N(r))&&(s=W(t)),o){const e=Z(t,!0,l,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=U(r));let u=0,d=0;if(r&&!o&&!l){const e=r.getBoundingClientRect();d=e.top+s.scrollTop,u=e.left+s.scrollLeft-U(r,e)}return{x:i.left+s.scrollLeft-c.x-u,y:i.top+s.scrollTop-c.y-d,width:i.width,height:i.height}}function ne(e){return"static"===H(e).position}function oe(e,t){if(!j(e)||"fixed"===H(e).position)return null;if(t)return t(e);let n=e.offsetParent;return k(e)===n&&(n=n.ownerDocument.body),n}function re(e,t){const n=T(e);if(P(e))return n;if(!j(e)){let t=z(e);for(;t&&!F(t);){if(C(t)&&!ne(t))return t;t=z(t)}return n}let o=oe(e,t);for(;o&&I(o)&&ne(o);)o=oe(o,t);return o&&F(o)&&ne(o)&&!$(o)?n:o||function(e){let t=z(e);for(;j(t)&&!F(t);){if($(t))return t;if(P(t))return null;t=z(t)}return null}(e)||n}const le={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const l="fixed"===r,i=k(o),s=!!t&&P(t.floating);if(o===i||s&&l)return n;let c={scrollLeft:0,scrollTop:0},u=a(1);const d=a(0),f=j(o);if((f||!f&&!l)&&(("body"!==O(o)||N(i))&&(c=W(o)),j(o))){const e=Z(o);u=G(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}},getDocumentElement:k,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[..."clippingAncestors"===n?P(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=q(e,[],!1).filter((e=>C(e)&&"body"!==O(e))),r=null;const l="fixed"===H(e).position;let i=l?z(e):e;for(;C(i)&&!F(i);){const t=H(i),n=$(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||N(i)&&!n&&ee(e,i))?o=o.filter((e=>e!==i)):r=t,i=z(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],c=s[0],a=s.reduce(((e,n)=>{const o=Q(t,n,r);return e.top=i(o.top,e.top),e.right=l(o.right,e.right),e.bottom=l(o.bottom,e.bottom),e.left=i(o.left,e.left),e}),Q(t,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:re,getElementRects:async function(e){const t=this.getOffsetParent||re,n=this.getDimensions,o=await n(e.floating);return{reference:te(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=K(e);return{width:t,height:n}},getScale:G,isElement:C,isRTL:function(e){return"rtl"===H(e).direction}};const ie=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:l,placement:i,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:o,elements:r}=e,l=await(null==o.isRTL?void 0:o.isRTL(r.floating)),i=m(n),s=v(n),c="y"===w(n),a=["left","top"].includes(i)?-1:1,u=l&&c?-1:1,d=p(t,e);let{mainAxis:f,crossAxis:y,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(y="end"===s?-1*h:h),c?{x:y*u,y:f*a}:{x:f*a,y:y*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:l+c.y,data:{...c,placement:i}}}}},se=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=p(e,t),a={x:n,y:o},u=await A(t,c),d=w(m(r)),v=y(d);let h=a[v],g=a[d];if(l){const e="y"===v?"bottom":"right";h=f(h+u["y"===v?"top":"left"],h,h-u[e])}if(i){const e="y"===d?"bottom":"right";g=f(g+u["y"===d?"top":"left"],g,g-u[e])}const b=s.fn({...t,[v]:h,[d]:g});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[v]:l,[d]:i}}}}}},ce=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:E=!0,...S}=p(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const R=m(r),O=w(s),T=m(s)===s,k=await(null==c.isRTL?void 0:c.isRTL(a.floating)),L=f||(T||!E?[x(s)]:function(e){const t=x(e);return[b(e),t,b(t)]}(s)),C="none"!==_;!f&&C&&L.push(...function(e,t,n,o){const r=v(e);let l=function(e,t,n){const o=["left","right"],r=["right","left"],l=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?l:i;default:return[]}}(m(e),"start"===n,o);return r&&(l=l.map((e=>e+"-"+r)),t&&(l=l.concat(l.map(b)))),l}(s,E,_,k));const j=[s,...L],D=await A(t,S),N=[];let I=(null==(o=l.flip)?void 0:o.overflows)||[];if(u&&N.push(D[R]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=v(e),r=g(e),l=h(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=x(i)),[i,x(i)]}(r,i,k);N.push(D[e[0]],D[e[1]])}if(I=[...I,{placement:r,overflows:N}],!N.every((e=>e<=0))){var P,$;const e=((null==(P=l.flip)?void 0:P.index)||0)+1,t=j[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==($=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:$.placement;if(!n)switch(y){case"bestFit":{var B;const e=null==(B=I.filter((e=>{if(C){const t=w(e.placement);return t===O||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:B[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},ae=(e,t,n)=>{const o=new Map,r={platform:le,...n},l={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,s=l.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=S(a,o,c),f=o,p={},m=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:c}=e,{element:a,padding:d=0}=p(u,e)||{};if(null==a)return{};const m=_(d),y={x:t,y:n},w=g(o),b=h(w),x=await i.getDimensions(a),E="y"===w,S=E?"top":"left",A=E?"bottom":"right",R=E?"clientHeight":"clientWidth",O=r.reference[b]+r.reference[w]-y[w]-r.floating[b],T=y[w]-r.reference[w],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let L=k?k[R]:0;L&&await(null==i.isElement?void 0:i.isElement(k))||(L=s.floating[R]||r.floating[b]);const C=O/2-T/2,j=L/2-x[b]/2-1,D=l(m[S],j),N=l(m[A],j),I=D,P=L-x[b]-N,$=L/2-x[b]/2+C,B=f(I,$,P),F=!c.arrow&&null!=v(o)&&$!==B&&r.reference[b]/2-(${var r,l;const i={left:`${e}px`,top:`${t}px`,border:c},{x:s,y:a}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(l={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==l?l:"bottom",d=c&&{borderBottom:c,borderRight:c};let f=0;if(c){const e=`${c}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:i,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):ae(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},me=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ve=(e,t,n)=>{let o=null;const r=function(...r){const l=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(l,t)),n||(o&&clearTimeout(o),o=setTimeout(l,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},ye=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,he=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>he(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!ye(e)||!ye(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>he(e[n],t[n])))},we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ge=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},be="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,xe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},_e={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Ee=(0,r.createContext)({getTooltipData:()=>_e});function Se(e="DEFAULT_TOOLTIP_ID"){return(0,r.useContext)(Ee).getTooltipData(e)}var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Oe=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:s="dark",anchorId:a,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:m=!1,positionStrategy:v="absolute",middlewares:y,wrapper:h,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:O,closeEvents:T,globalCloseEvents:L,imperativeModeOnly:C,style:j,position:D,afterShow:N,afterHide:I,disableTooltip:P,content:$,contentWrapperRef:B,isOpen:F,defaultIsOpen:H=!1,setIsOpen:W,activeAnchor:z,setActiveAnchor:M,border:V,opacity:K,arrowColor:G,role:Y="tooltip"})=>{var J;const U=(0,r.useRef)(null),Q=(0,r.useRef)(null),ee=(0,r.useRef)(null),te=(0,r.useRef)(null),ne=(0,r.useRef)(null),[oe,re]=(0,r.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:d}),[le,ie]=(0,r.useState)(!1),[se,ce]=(0,r.useState)(!1),[ae,de]=(0,r.useState)(null),fe=(0,r.useRef)(!1),me=(0,r.useRef)(null),{anchorRefs:ye,setActiveAnchor:we}=Se(t),_e=(0,r.useRef)(!1),[Ee,Oe]=(0,r.useState)([]),Te=(0,r.useRef)(!1),ke=m||p.includes("click"),Le=ke||(null==O?void 0:O.click)||(null==O?void 0:O.dblclick)||(null==O?void 0:O.mousedown),Ce=O?{...O}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!O&&ke&&Object.assign(Ce,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const je=T?{...T}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!T&&ke&&Object.assign(je,{mouseleave:!1,blur:!1,mouseout:!1});const De=L?{...L}:{escape:S||!1,scroll:A||!1,resize:R||!1,clickOutsideAnchor:Le||!1};C&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(je,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(De,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),be((()=>(Te.current=!0,()=>{Te.current=!1})),[]);const Ne=e=>{Te.current&&(e&&ce(!0),setTimeout((()=>{Te.current&&(null==W||W(e),void 0===F&&ie(e))}),10))};(0,r.useEffect)((()=>{if(void 0===F)return()=>null;F&&ce(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,r.useEffect)((()=>{if(le!==fe.current)if(xe(ne),fe.current=le,le)null==N||N();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ne.current=setTimeout((()=>{ce(!1),de(null),null==I||I()}),e+25)}}),[le]);const Ie=e=>{re((t=>he(t,e)?t:e))},Pe=(e=w)=>{xe(ee),se?Ne(!0):ee.current=setTimeout((()=>{Ne(!0)}),e)},$e=(e=g)=>{xe(te),te.current=setTimeout((()=>{_e.current||Ne(!1)}),e)},Be=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return M(null),void we({current:null});w?Pe():Ne(!0),M(n),we({current:n}),xe(te)},Fe=()=>{E?$e(g||100):g?$e():Ne(!1),xe(ee)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};pe({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:d,offset:f,elementReference:o,tooltipReference:U.current,tooltipArrowReference:Q.current,strategy:v,middlewares:y,border:V}).then((e=>{Ie(e)}))},We=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),me.current=n},ze=e=>{var t;if(!le)return;const n=e.target;n.isConnected&&((null===(t=U.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${a}']`),...Ee].some((e=>null==e?void 0:e.contains(n)))||(Ne(!1),xe(ee)))},Me=ve(Be,50,!0),qe=ve(Fe,50,!0),Ve=e=>{qe.cancel(),Me(e)},Ke=()=>{Me.cancel(),qe()},Xe=(0,r.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:D;n?He(n):b?me.current&&He(me.current):(null==z?void 0:z.isConnected)&&pe({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:d,offset:f,elementReference:z,tooltipReference:U.current,tooltipArrowReference:Q.current,strategy:v,middlewares:y,border:V}).then((e=>{Te.current&&Ie(e)}))}),[le,z,$,j,d,null==ae?void 0:ae.place,f,v,D,null==ae?void 0:ae.position,b]);(0,r.useEffect)((()=>{var e,t;const n=new Set(ye);Ee.forEach((e=>{(null==P?void 0:P(e))||n.add({current:e})}));const o=document.querySelector(`[id='${a}']`);o&&!(null==P?void 0:P(o))&&n.add({current:o});const r=()=>{Ne(!1)},s=ge(z),u=ge(U.current);De.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==u||u.addEventListener("scroll",r));let d=null;De.resize?window.addEventListener("resize",r):z&&U.current&&(d=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=o,f=X(e),p=r||s?[...f?q(f):[],...q(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));const m=f&&u?function(e,t){let n,o=null;const r=k(e);function s(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function a(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),s();const{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(u||t(),!m||!v)return;const y={rootMargin:-c(p)+"px "+-c(r.clientWidth-(f+m))+"px "+-c(r.clientHeight-(p+v))+"px "+-c(f)+"px",threshold:i(0,l(1,d))||1};let h=!0;function w(e){const t=e[0].intersectionRatio;if(t!==d){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{o=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(w,y)}o.observe(e)}(!0),s}(f,n):null;let v,y=-1,h=null;a&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),f&&!d&&h.observe(f),h.observe(t));let w=d?Z(e):null;return d&&function t(){const o=Z(e);!w||o.x===w.x&&o.y===w.y&&o.width===w.width&&o.height===w.height||n(),w=o,v=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==m||m(),null==(e=h)||e.disconnect(),h=null,d&&cancelAnimationFrame(v)}}(z,U.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&Ne(!1)};De.escape&&window.addEventListener("keydown",f),De.clickOutsideAnchor&&window.addEventListener("click",ze);const p=[],m=e=>{le&&(null==e?void 0:e.target)===z||Be(e)},v=e=>{le&&(null==e?void 0:e.target)===z&&Fe()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Ve}):h.includes(e)&&p.push({event:e,listener:m}))})),Object.entries(je).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Ke}):h.includes(e)&&p.push({event:e,listener:v}))})),b&&p.push({event:"pointermove",listener:We});const w=()=>{_e.current=!0},g=()=>{_e.current=!1,Fe()};return E&&!Le&&(null===(e=U.current)||void 0===e||e.addEventListener("mouseenter",w),null===(t=U.current)||void 0===t||t.addEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;De.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==u||u.removeEventListener("scroll",r)),De.resize?window.removeEventListener("resize",r):null==d||d(),De.clickOutsideAnchor&&window.removeEventListener("click",ze),De.escape&&window.removeEventListener("keydown",f),E&&!Le&&(null===(e=U.current)||void 0===e||e.removeEventListener("mouseenter",w),null===(t=U.current)||void 0===t||t.removeEventListener("mouseleave",g)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[z,Xe,se,ye,Ee,O,T,L,ke,w,g]),(0,r.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:u)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(z){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,z))&&(ce(!1),Ne(!1),M(null),xe(ee),xe(te),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Oe((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,u,null==ae?void 0:ae.anchorSelect,z]),(0,r.useEffect)((()=>{Xe()}),[Xe]),(0,r.useEffect)((()=>{if(!(null==B?void 0:B.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(B.current),()=>{e.disconnect()}}),[$,null==B?void 0:B.current]),(0,r.useEffect)((()=>{var e;const t=document.querySelector(`[id='${a}']`),n=[...Ee,t];z&&n.includes(z)||M(null!==(e=Ee[0])&&void 0!==e?e:t)}),[a,Ee,z]),(0,r.useEffect)((()=>(H&&Ne(!0),()=>{xe(ee),xe(te)})),[]),(0,r.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:u;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));Oe(e)}catch(e){Oe([])}}),[t,u,null==ae?void 0:ae.anchorSelect]),(0,r.useEffect)((()=>{ee.current&&(xe(ee),Pe(w))}),[w]);const Ge=null!==(J=null==ae?void 0:ae.content)&&void 0!==J?J:$,Ye=le&&Object.keys(oe.tooltipStyles).length>0;return(0,r.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}de(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):Ne(!0)},close:e=>{(null==e?void 0:e.delay)?$e(e.delay):Ne(!1)},activeAnchor:z,place:oe.place,isOpen:Boolean(se&&!x&&Ge&&Ye)}))),se&&!x&&Ge?r.createElement(h,{id:t,role:Y,className:ue("react-tooltip",Ae.tooltip,Re.tooltip,Re[s],n,`react-tooltip__place-${oe.place}`,Ae[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===v&&Ae.fixed,E&&Ae.clickable),onTransitionEnd:e=>{xe(ne),le||"opacity"!==e.propertyName||(ce(!1),de(null),null==I||I())},style:{...j,...oe.tooltipStyles,opacity:void 0!==K&&Ye?K:void 0},ref:U},Ge,r.createElement(h,{className:ue("react-tooltip-arrow",Ae.arrow,Re.arrow,o,_&&Ae.noArrow),style:{...oe.tooltipArrowStyles,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0},ref:Q})):null},Te=({content:e})=>r.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),ke=r.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:l,render:i,className:s,classNameArrow:c,variant:a="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:m=["hover"],openOnClick:v=!1,positionStrategy:y="absolute",middlewares:h,delayShow:w=0,delayHide:g=0,float:b=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:A=!1,closeOnResize:R=!1,openEvents:O,closeEvents:T,globalCloseEvents:k,imperativeModeOnly:L=!1,style:C,position:j,isOpen:D,defaultIsOpen:N=!1,disableStyleInjection:I=!1,border:P,opacity:$,arrowColor:B,setIsOpen:F,afterShow:H,afterHide:W,disableTooltip:z,role:M="tooltip"},q)=>{const[V,K]=(0,r.useState)(o),[X,G]=(0,r.useState)(l),[Y,J]=(0,r.useState)(u),[Z,U]=(0,r.useState)(a),[Q,ee]=(0,r.useState)(d),[te,ne]=(0,r.useState)(w),[oe,re]=(0,r.useState)(g),[le,ie]=(0,r.useState)(b),[se,ce]=(0,r.useState)(x),[ae,de]=(0,r.useState)(f),[fe,pe]=(0,r.useState)(m),[ve,ye]=(0,r.useState)(y),[he,we]=(0,r.useState)(null),[ge,be]=(0,r.useState)(null),xe=(0,r.useRef)(I),{anchorRefs:_e,activeAnchor:Ee}=Se(e),Ae=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Re=e=>{const t={place:e=>{var t;J(null!==(t=e)&&void 0!==t?t:u)},content:e=>{K(null!=e?e:o)},html:e=>{G(null!=e?e:l)},variant:e=>{var t;U(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;de(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:m)},"position-strategy":e=>{var t;ye(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ne(null===e?w:Number(e))},"delay-hide":e=>{re(null===e?g:Number(e))},float:e=>{ie(null===e?b:"true"===e)},hidden:e=>{ce(null===e?x:"true"===e)},"class-name":e=>{we(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,r.useEffect)((()=>{K(o)}),[o]),(0,r.useEffect)((()=>{G(l)}),[l]),(0,r.useEffect)((()=>{J(u)}),[u]),(0,r.useEffect)((()=>{U(a)}),[a]),(0,r.useEffect)((()=>{ee(d)}),[d]),(0,r.useEffect)((()=>{ne(w)}),[w]),(0,r.useEffect)((()=>{re(g)}),[g]),(0,r.useEffect)((()=>{ie(b)}),[b]),(0,r.useEffect)((()=>{ce(x)}),[x]),(0,r.useEffect)((()=>{ye(y)}),[y]),(0,r.useEffect)((()=>{xe.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,r.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,r.useEffect)((()=>{var o;const r=new Set(_e);let l=n;if(!l&&e&&(l=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),l)try{document.querySelectorAll(l).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`)}const i=document.querySelector(`[id='${t}']`);if(i&&r.add({current:i}),!r.size)return()=>null;const s=null!==(o=null!=ge?ge:i)&&void 0!==o?o:Ee.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ae(s);Re(n)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Ae(s);Re(e),c.observe(s,a)}return()=>{c.disconnect()}}),[_e,Ee,ge,t,n]),(0,r.useEffect)((()=>{(null==C?void 0:C.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),P&&!me("border",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`),(null==C?void 0:C.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),$&&!me("opacity",`${$}`)&&console.warn(`[react-tooltip] "${$}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Le=(0,r.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||V||null,activeAnchor:ge});ke=e?r.createElement("div",{ref:Le,className:"react-tooltip-content-wrapper"},e):null}else V&&(ke=V);X&&(ke=r.createElement(Te,{content:X}));const Ce={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:ue(s,he),classNameArrow:c,content:ke,contentWrapperRef:Le,place:Y,variant:Z,offset:Q,wrapper:ae,events:fe,openOnClick:v,positionStrategy:ve,middlewares:h,delayShow:te,delayHide:oe,float:le,hidden:se,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:A,closeOnResize:R,openEvents:O,closeEvents:T,globalCloseEvents:k,imperativeModeOnly:L,style:C,position:j,isOpen:D,defaultIsOpen:N,border:P,opacity:$,arrowColor:B,setIsOpen:F,afterShow:H,afterHide:W,disableTooltip:z,activeAnchor:ge,setActiveAnchor:e=>be(e),role:M};return r.createElement(Oe,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||fe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||fe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Le=window.wp.i18n,Ce=window.wp.components;window.wp.data;const je=window.ReactJSXRuntime,De=({onlineEventLinkDefault:e=""})=>{const t=(0,Le.__)("Online event","gatherpress"),[n,r]=(0,o.useState)(e);return((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setOnlineEventLink:r},function(){if("object"==typeof GatherPress)return"eventDetails.postId".split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}()),(0,je.jsxs)(Ce.Flex,{justify:"normal",gap:"3",children:[(0,je.jsx)(Ce.FlexItem,{display:"flex",children:(0,je.jsx)(Ce.Icon,{icon:"video-alt2"})}),(0,je.jsxs)(Ce.FlexItem,{children:[!n&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,Le.__)("Link available for attendees only.","gatherpress"),children:t}),(0,je.jsx)(ke,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,je.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};t()((()=>{const e=document.querySelectorAll('[data-gatherpress_block_name="online-event"]');for(let n=0;n array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '1dfd2576a31f517fef45'); + array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '94657e92928e2e24a9d3'); diff --git a/build/blocks/rsvp-response/index.js b/build/blocks/rsvp-response/index.js index b53100347..3adac366f 100644 --- a/build/blocks/rsvp-response/index.js +++ b/build/blocks/rsvp-response/index.js @@ -1,2 +1,2 @@ (()=>{"use strict";var e,s={8474:(e,s,t)=>{const r=window.wp.blocks,n=window.wp.blockEditor,a=window.wp.components,i=window.wp.element,o=window.wp.i18n,l=window.wp.data,p=(e,s="")=>{for(const[t,r]of Object.entries(e)){let e=t;s&&(e+="_"+String(s)),addEventListener(e,(e=>{r(e.detail)}),!1)}};function c(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,s)=>e&&e[s]),GatherPress)}const d=window.ReactJSXRuntime,u=({item:e,activeItem:s=!1,count:t,onTitleClick:r,defaultLimit:n})=>{const{title:a,value:o}=e,l=!(0===t&&"attending"!==o),p=s?"span":"a",u=c("eventDetails.postId"),v=t>n;return(0,i.useEffect)((()=>{s&&((e,s="")=>{for(const[t,r]of Object.entries(e)){let e=t;s&&(e+="_"+String(s));const n=new CustomEvent(e,{detail:r});dispatchEvent(n)}})({setRsvpSeeAllLink:v},u)})),l?(0,d.jsxs)("div",{className:"gatherpress-rsvp-response__navigation-item",children:[(0,d.jsx)(p,{className:"gatherpress-rsvp-response__anchor","data-item":o,"data-toggle":"tab",href:"#",role:"tab","aria-controls":`#gatherpress-rsvp-${o}`,onClick:e=>r(e,o),children:a}),(0,d.jsxs)("span",{className:"gatherpress-rsvp-response__count",children:["(",t,")"]})]}):""},v=({items:e,activeValue:s,onTitleClick:r,defaultLimit:n})=>{var a;const o={all:0,attending:0,not_attending:0,waiting_list:0},l=null!==(a=c("eventDetails.responses"))&&void 0!==a?a:{};for(const[e,s]of Object.entries(l))o[e]=s.count;const[v,h]=(0,i.useState)(o),[g,m]=(0,i.useState)(!1),[_,f]=(0,i.useState)(!0),x=_?"span":"a";p({setRsvpCount:h},c("eventDetails.postId"));let j=0;const b=e.map(((e,t)=>{const a=e.value===s;return a&&(j=t),(0,d.jsx)(u,{item:e,count:v[e.value],activeItem:a,onTitleClick:r,defaultLimit:n},t)}));return(0,i.useEffect)((()=>{t.g.document.addEventListener("click",(({target:e})=>{e.closest(".gatherpress-rsvp-response__navigation-active")||m(!1)})),t.g.document.addEventListener("keydown",(({key:e})=>{"Escape"===e&&m(!1)}))})),(0,i.useEffect)((()=>{0===v.not_attending&&0===v.waiting_list?f(!0):f(!1)}),[v]),(0,d.jsxs)("div",{className:"gatherpress-rsvp-response__navigation-wrapper",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(x,{href:"#",className:"gatherpress-rsvp-response__navigation-active",onClick:e=>(e=>{e.preventDefault(),m(!g)})(e),children:e[j].title})," ",(0,d.jsxs)("span",{children:["(",v[s],")"]})]}),!_&&g&&(0,d.jsx)("nav",{className:"gatherpress-rsvp-response__navigation",children:b})]})},h=({items:e,activeValue:s,onTitleClick:t,rsvpLimit:r,setRsvpLimit:n,defaultLimit:a})=>{let l;l=!1===r?(0,o.__)("See fewer","gatherpress"):(0,o.__)("See all","gatherpress");let u=!1;const h=c("eventDetails.responses");var g;h&&h[s]&&(u=(null!==(g=c("eventDetails.responses")[s].count)&&void 0!==g?g:0)>a);const[m,_]=(0,i.useState)(u);return p({setRsvpSeeAllLink:_},c("eventDetails.postId")),(0,d.jsxs)("div",{className:"gatherpress-rsvp-response__header",children:[(0,d.jsx)("div",{className:"dashicons dashicons-groups"}),(0,d.jsx)(v,{items:e,activeValue:s,onTitleClick:t,defaultLimit:a}),m&&(0,d.jsx)("div",{className:"gatherpress-rsvp-response__see-all",children:(0,d.jsx)("a",{href:"#",onClick:e=>(e=>{e.preventDefault(),n(!1===r&&a)})(e),children:l})})]})},g=({value:e,limit:s,responses:t=[]})=>{let r="";return"object"==typeof t&&void 0!==t[e]&&(t=[...t[e].responses],s&&(t=t.splice(0,s)),r=t.map(((e,s)=>{const{profile:t,name:r,photo:n,role:a}=e,{guests:i}=e;return(0,d.jsxs)("div",{className:"gatherpress-rsvp-response__item",children:[(0,d.jsx)("figure",{className:"gatherpress-rsvp-response__member-avatar",children:""!==t?(0,d.jsx)("a",{href:t,children:(0,d.jsx)("img",{alt:r,title:r,src:n})}):(0,d.jsx)("img",{alt:r,title:r,src:n})}),(0,d.jsxs)("div",{className:"gatherpress-rsvp-response__member-info",children:[(0,d.jsx)("div",{className:"gatherpress-rsvp-response__member-name",children:""!==t?(0,d.jsx)("a",{href:t,title:r,children:r}):(0,d.jsx)("span",{children:r})}),(0,d.jsx)("div",{className:"gatherpress-rsvp-response__member-role",children:a}),0!==i&&(0,d.jsx)("small",{className:"gatherpress-rsvp-response__guests",children:(0,o.sprintf)(/* translators: %d: Number of guests. */ /* translators: %d: Number of guests. */ -(0,o._n)("+%d guest","+%d guests",i,"gatherpress"),i)})]})]},s)}))),(0,d.jsxs)(d.Fragment,{children:["attending"===e&&0===r.length&&(0,d.jsx)("div",{className:"gatherpress-rsvp-response__no-responses",children:!1===c("eventDetails.hasEventPast")?(0,o.__)("No one is attending this event yet.","gatherpress"):(0,o.__)("No one went to this event.","gatherpress")}),r]})},m=({items:e,activeValue:s,limit:t=!1})=>{const r=c("eventDetails.postId"),[n,a]=(0,i.useState)(c("eventDetails.responses"));p({setRsvpResponse:a},r);const o=e.map(((e,r)=>{const{value:a}=e;return a===s?(0,d.jsx)("div",{className:"gatherpress-rsvp-response__items",id:`gatherpress-rsvp-${a}`,role:"tabpanel","aria-labelledby":`gatherpress-rsvp-${a}-tab`,children:(0,d.jsx)(g,{value:a,limit:t,responses:n})},r):""}));return(0,d.jsx)("div",{className:"gatherpress-rsvp-response__content",children:o})},_=({defaultStatus:e="attending"})=>{const s=c("eventDetails.hasEventPast"),t=[{title:!1===s?(0,o._x)("Attending","Responded Status","gatherpress"):(0,o._x)("Went","Responded Status","gatherpress"),value:"attending"},{title:!1===s?(0,o._x)("Waiting List","Responded Status","gatherpress"):(0,o._x)("Wait Listed","Responded Status","gatherpress"),value:"waiting_list"},{title:!1===s?(0,o._x)("Not Attending","Responded Status","gatherpress"):(0,o._x)("Didn't Go","Responded Status","gatherpress"),value:"not_attending"}],[r,n]=(0,i.useState)(e),[a,l]=(0,i.useState)(8);return p({setRsvpStatus:n},c("eventDetails.postId")),t.some((e=>e.value===r))||n(e),(0,d.jsxs)("div",{className:"gatherpress-rsvp-response",children:[(0,d.jsx)(h,{items:t,activeValue:r,onTitleClick:(e,s)=>{e.preventDefault(),n(s)},rsvpLimit:a,setRsvpLimit:l,defaultLimit:8}),(0,d.jsx)(m,{items:t,activeValue:r,limit:a})]})},f=window.wp.apiFetch;var x=t.n(f);const j=window.wp.coreData,b=({defaultStatus:e,setDefaultStatus:s})=>{var t;const r=c("eventDetails.responses"),n=c("eventDetails.postId"),[p,u]=(0,i.useState)(r),v=p[e].responses,{userList:h}=(0,l.useSelect)((e=>{const{getEntityRecords:s}=e(j.store);return{userList:s("root","user",{per_page:-1})}}),[]),g=null!==(t=h?.reduce(((e,s)=>({...e,[s.username]:s})),{}))&&void 0!==t?t:{},m=(e,s="attending")=>{x()({path:c("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:n,status:s,user_id:e,_wpnonce:c("misc.nonce")}}).then((e=>{u(e.responses),function(e,s){if("object"!=typeof GatherPress)return;const t="eventDetails.responses".split("."),r=t.pop();t.reduce(((e,s)=>{var t;return null!==(t=e[s])&&void 0!==t?t:e[s]={}}),GatherPress)[r]=s}(0,e.responses)}))};return(0,d.jsxs)("div",{className:"gatherpress-rsvp-response",children:[(0,d.jsx)(a.SelectControl,{label:(0,o.__)("Status","gatherpress"),value:e,options:[{label:(0,o._x)("Attending","List Status","gatherpress"),value:"attending"},{label:(0,o._x)("Waiting List","List Status","gatherpress"),value:"waiting_list"},{label:(0,o._x)("Not Attending","List Status","gatherpress"),value:"not_attending"}],onChange:e=>s(e)}),(0,d.jsx)(a.FormTokenField,{label:(0,o.__)("Members","gatherpress"),value:v&&v.map((e=>({id:e.id,value:e.name}))),tokenizeOnSpace:!0,onChange:async s=>{s.length>v.length?s.forEach((s=>{g[s]&&m(g[s].id,e)})):v.forEach((e=>{!1===s.some((s=>s.id===e.id))&&m(e.id,"no_status")}))},suggestions:Object.keys(g),maxSuggestions:20},"query-controls-topics-select")]})},w=e=>{const{isSelected:s}=e,t=s?"none":"block";return(0,d.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,d.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:t}})]})},S=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp-response","version":"1.0.1","title":"RSVP Response","category":"gatherpress","icon":"groups","example":{},"description":"Displays a list of members who have confirmed their attendance for an event.","attributes":{"blockId":{"type":"string"},"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp-response.js","render":"file:./render.php"}');(0,r.registerBlockType)(S,{edit:()=>{const e=(0,l.select)("core").canUser("create","posts"),s=(0,n.useBlockProps)(),[t,r]=(0,i.useState)(!1),[p,c]=(0,i.useState)("attending");return(0,d.jsxs)("div",{...s,children:[t&&(0,d.jsx)(b,{defaultStatus:p,setDefaultStatus:c}),!t&&(0,d.jsx)(w,{children:(0,d.jsx)(_,{defaultStatus:p})}),e&&(0,d.jsx)(n.BlockControls,{children:(0,d.jsx)(a.ToolbarGroup,{children:(0,d.jsx)(a.ToolbarButton,{label:(0,o.__)("Edit","gatherpress"),text:t?(0,o.__)("Preview","gatherpress"):(0,o.__)("Edit","gatherpress"),onClick:e=>{e.preventDefault(),r(!t)}})})})]})},save:()=>null})}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return s[e](a,a.exports,r),a.exports}r.m=s,e=[],r.O=(s,t,n,a)=>{if(!t){var i=1/0;for(c=0;c=a)&&Object.keys(r.O).every((e=>r.O[e](t[l])))?t.splice(l--,1):(o=!1,a0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[t,n,a]},r.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return r.d(s,{a:s}),s},r.d=(e,s)=>{for(var t in s)r.o(s,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={788:0,556:0};r.O.j=s=>0===e[s];var s=(s,t)=>{var n,a,[i,o,l]=t,p=0;if(i.some((s=>0!==e[s]))){for(n in o)r.o(o,n)&&(r.m[n]=o[n]);if(l)var c=l(r)}for(s&&s(t);pr(8474)));n=r.O(n)})(); \ No newline at end of file +(0,o._n)("+%d guest","+%d guests",i,"gatherpress"),i)})]})]},s)}))),(0,d.jsxs)(d.Fragment,{children:["attending"===e&&0===r.length&&(0,d.jsx)("div",{className:"gatherpress-rsvp-response__no-responses",children:!1===c("eventDetails.hasEventPast")?(0,o.__)("No one is attending this event yet.","gatherpress"):(0,o.__)("No one went to this event.","gatherpress")}),r]})},m=({items:e,activeValue:s,limit:t=!1})=>{const r=c("eventDetails.postId"),[n,a]=(0,i.useState)(c("eventDetails.responses"));p({setRsvpResponse:a},r);const o=e.map(((e,r)=>{const{value:a}=e;return a===s?(0,d.jsx)("div",{className:"gatherpress-rsvp-response__items",id:`gatherpress-rsvp-${a}`,role:"tabpanel","aria-labelledby":`gatherpress-rsvp-${a}-tab`,children:(0,d.jsx)(g,{value:a,limit:t,responses:n})},r):""}));return(0,d.jsx)("div",{className:"gatherpress-rsvp-response__content",children:o})},_=({defaultStatus:e="attending"})=>{const s=c("eventDetails.hasEventPast"),t=[{title:!1===s?(0,o._x)("Attending","Responded Status","gatherpress"):(0,o._x)("Went","Responded Status","gatherpress"),value:"attending"},{title:!1===s?(0,o._x)("Waiting List","Responded Status","gatherpress"):(0,o._x)("Wait Listed","Responded Status","gatherpress"),value:"waiting_list"},{title:!1===s?(0,o._x)("Not Attending","Responded Status","gatherpress"):(0,o._x)("Didn't Go","Responded Status","gatherpress"),value:"not_attending"}],[r,n]=(0,i.useState)(e),[a,l]=(0,i.useState)(8);return p({setRsvpStatus:n},c("eventDetails.postId")),t.some((e=>e.value===r))||n(e),(0,d.jsxs)("div",{className:"gatherpress-rsvp-response",children:[(0,d.jsx)(h,{items:t,activeValue:r,onTitleClick:(e,s)=>{e.preventDefault(),n(s)},rsvpLimit:a,setRsvpLimit:l,defaultLimit:8}),(0,d.jsx)(m,{items:t,activeValue:r,limit:a})]})},f=window.wp.apiFetch;var x=t.n(f);const j=window.wp.coreData,b=({defaultStatus:e,setDefaultStatus:s})=>{var t;const r=c("eventDetails.responses"),n=c("eventDetails.postId"),[p,u]=(0,i.useState)(r),v=p[e].responses,{userList:h}=(0,l.useSelect)((e=>{const{getEntityRecords:s}=e(j.store);return{userList:s("root","user",{per_page:-1})}}),[]),g=null!==(t=h?.reduce(((e,s)=>({...e,[s.username]:s})),{}))&&void 0!==t?t:{},m=(e,s="attending")=>{x()({path:c("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:n,status:s,user_id:e,_wpnonce:c("misc.nonce")}}).then((e=>{u(e.responses),function(e,s){if("object"!=typeof GatherPress)return;const t="eventDetails.responses".split("."),r=t.pop();t.reduce(((e,s)=>{var t;return null!==(t=e[s])&&void 0!==t?t:e[s]={}}),GatherPress)[r]=s}(0,e.responses)}))};return(0,d.jsxs)("div",{className:"gatherpress-rsvp-response",children:[(0,d.jsx)(a.SelectControl,{label:(0,o.__)("Status","gatherpress"),value:e,options:[{label:(0,o._x)("Attending","List Status","gatherpress"),value:"attending"},{label:(0,o._x)("Waiting List","List Status","gatherpress"),value:"waiting_list"},{label:(0,o._x)("Not Attending","List Status","gatherpress"),value:"not_attending"}],onChange:e=>s(e)}),(0,d.jsx)(a.FormTokenField,{label:(0,o.__)("Members","gatherpress"),value:v&&v.map((e=>({id:e.id,value:e.name}))),tokenizeOnSpace:!0,onChange:async s=>{s.length>v.length?s.forEach((s=>{g[s]&&m(g[s].id,e)})):v.forEach((e=>{!1===s.some((s=>s.id===e.id))&&m(e.id,"no_status")}))},suggestions:Object.keys(g),maxSuggestions:20},"query-controls-topics-select")]})},w=e=>{const{isSelected:s}=e,t=s?"none":"block";return(0,d.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,d.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:t}})]})},S=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp-response","version":"1.0.1","title":"RSVP Response","category":"gatherpress","icon":"groups","example":{},"description":"Displays a list of members who have confirmed their attendance for an event.","attributes":{"blockId":{"type":"string"},"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp-response.js","render":"file:./render.php"}');(0,r.registerBlockType)(S,{edit:()=>{const e=(0,l.select)("core").canUser("create","posts"),s=(0,n.useBlockProps)(),[t,r]=(0,i.useState)(!1),[p,c]=(0,i.useState)("attending");return(0,d.jsxs)("div",{...s,children:[t&&(0,d.jsx)(b,{defaultStatus:p,setDefaultStatus:c}),!t&&(0,d.jsx)(w,{children:(0,d.jsx)(_,{defaultStatus:p})}),e&&(0,d.jsx)(n.BlockControls,{children:(0,d.jsx)(a.ToolbarGroup,{children:(0,d.jsx)(a.ToolbarButton,{label:(0,o.__)("Edit","gatherpress"),text:t?(0,o.__)("Preview","gatherpress"):(0,o.__)("Edit","gatherpress"),onClick:e=>{e.preventDefault(),r(!t)}})})})]})},save:()=>null})}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return s[e](a,a.exports,r),a.exports}r.m=s,e=[],r.O=(s,t,n,a)=>{if(!t){var i=1/0;for(c=0;c=a)&&Object.keys(r.O).every((e=>r.O[e](t[l])))?t.splice(l--,1):(o=!1,a0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[t,n,a]},r.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return r.d(s,{a:s}),s},r.d=(e,s)=>{for(var t in s)r.o(s,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={788:0,556:0};r.O.j=s=>0===e[s];var s=(s,t)=>{var n,a,i=t[0],o=t[1],l=t[2],p=0;if(i.some((s=>0!==e[s]))){for(n in o)r.o(o,n)&&(r.m[n]=o[n]);if(l)var c=l(r)}for(s&&s(t);pr(8474)));n=r.O(n)})(); \ No newline at end of file diff --git a/build/blocks/rsvp/index.asset.php b/build/blocks/rsvp/index.asset.php index 3780207d7..adbb1218d 100644 --- a/build/blocks/rsvp/index.asset.php +++ b/build/blocks/rsvp/index.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3b137897829338f9530a'); + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '34e21d75e332e2e50be5'); diff --git a/build/blocks/rsvp/index.js b/build/blocks/rsvp/index.js index 9e1f75786..07d864250 100644 --- a/build/blocks/rsvp/index.js +++ b/build/blocks/rsvp/index.js @@ -1,5 +1,5 @@ -(()=>{var e,t={765:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.wp.blockEditor;var i=n(312),s=n.n(i),l=n(442);const a=l.default||l;var c=n(1609);const u=Math.min,d=Math.max,p=Math.round,f=Math.floor,h=e=>({x:e,y:e}),m={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function v(e,t,n){return d(e,u(t,n))}function g(e,t){return"function"==typeof e?e(t):e}function b(e){return e.split("-")[0]}function w(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function x(e){return"y"===e?"height":"width"}function E(e){return["top","bottom"].includes(b(e))?"y":"x"}function S(e){return _(E(e))}function O(e){return e.replace(/start|end/g,(e=>y[e]))}function C(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function A(e,t,n){let{reference:o,floating:r}=e;const i=E(t),s=S(t),l=x(s),a=b(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let f;switch(a){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(w(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=g(t,e),h=k(f),m=l[p?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:a}):v);return{top:(y.top-_.top+h.top)/w.y,bottom:(_.bottom-y.bottom+h.bottom)/w.y,left:(y.left-_.left+h.left)/w.x,right:(_.right-y.right+h.right)/w.x}}function N(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return e instanceof Node||e instanceof P(e).Node}function L(e){return e instanceof Element||e instanceof P(e).Element}function D(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function B(e){return["table","td","th"].includes(N(e))}function H(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function U(e){const t=W(),n=L(e)?z(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function W(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function V(e){return["html","body","#document"].includes(N(e))}function z(e){return P(e).getComputedStyle(e)}function q(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||j(e);return I(t)?t.host:t}function G(e){const t=$(e);return V(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&F(t)?t:G(t)}function X(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=G(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=P(r);return i?t.concat(s,s.visualViewport||[],F(r)?r:[],s.frameElement&&n?X(s.frameElement):[]):t.concat(r,X(r,[],n))}function Y(e){const t=z(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=D(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,l=p(n)!==i||p(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function K(e){return L(e)?e:e.contextElement}function Z(e){const t=K(e);if(!D(t))return h(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Y(t);let s=(i?p(n.width):n.width)/o,l=(i?p(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const J=h(0);function Q(e){const t=P(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function ee(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=K(e);let s=h(1);t&&(o?L(o)&&(s=Z(o)):s=Z(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P(e))&&t}(i,n,o)?Q(i):h(0);let a=(r.left+l.x)/s.x,c=(r.top+l.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=P(i),t=o&&L(o)?P(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=Z(r),t=r.getBoundingClientRect(),o=z(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,n=P(r),r=n.frameElement}}return T({width:u,height:d,x:a,y:c})}function te(e){return ee(j(e)).left+q(e).scrollLeft}function ne(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=P(e),o=j(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;const e=W();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=q(e),o=e.ownerDocument.body,r=d(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=d(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+te(e);const l=-n.scrollTop;return"rtl"===z(o).direction&&(s+=d(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:l}}(j(e));else if(L(t))o=function(e,t){const n=ee(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=D(e)?Z(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Q(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return T(o)}function oe(e,t){const n=$(e);return!(n===t||!L(n)||V(n))&&("fixed"===z(n).position||oe(n,t))}function re(e,t,n){const o=D(t),r=j(t),i="fixed"===n,s=ee(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=h(0);if(o||!o&&!i)if(("body"!==N(t)||F(r))&&(l=q(t)),o){const e=ee(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=te(r));return{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function ie(e){return"static"===z(e).position}function se(e,t){return D(e)&&"fixed"!==z(e).position?t?t(e):e.offsetParent:null}function le(e,t){const n=P(e);if(H(e))return n;if(!D(e)){let t=$(e);for(;t&&!V(t);){if(L(t)&&!ie(t))return t;t=$(t)}return n}let o=se(e,t);for(;o&&B(o)&&ie(o);)o=se(o,t);return o&&V(o)&&ie(o)&&!U(o)?n:o||function(e){let t=$(e);for(;D(t)&&!V(t);){if(U(t))return t;if(H(t))return null;t=$(t)}return null}(e)||n}const ae={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=j(o),l=!!t&&H(t.floating);if(o===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=h(1);const u=h(0),d=D(o);if((d||!d&&!i)&&(("body"!==N(o)||F(s))&&(a=q(o)),D(o))){const e=ee(o);c=Z(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?H(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=X(e,[],!1).filter((e=>L(e)&&"body"!==N(e))),r=null;const i="fixed"===z(e).position;let s=i?$(e):e;for(;L(s)&&!V(s);){const t=z(s),n=U(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||F(s)&&!n&&oe(e,s))?o=o.filter((e=>e!==s)):r=t,s=$(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],l=i.reduce(((e,n)=>{const o=ne(t,n,r);return e.top=d(o.top,e.top),e.right=u(o.right,e.right),e.bottom=u(o.bottom,e.bottom),e.left=d(o.left,e.left),e}),ne(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,n=this.getDimensions,o=await n(e.floating);return{reference:re(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Y(e);return{width:t,height:n}},getScale:Z,isElement:L,isRTL:function(e){return"rtl"===z(e).direction}};const ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=b(n),l=w(n),a="y"===E(n),c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=g(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(f="end"===l?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},ue=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=g(e,t),c={x:n,y:o},u=await R(t,a),d=E(b(r)),p=_(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=v(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=v(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o}}}}},de=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=g(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=b(r),_=E(l),k=b(l)===l,T=await(null==a.isRTL?void 0:a.isRTL(c.floating)),A=p||(k||!m?[C(l)]:function(e){const t=C(e);return[O(e),t,O(t)]}(l)),N="none"!==h;!p&&N&&A.push(...function(e,t,n,o){const r=w(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(b(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(O)))),i}(l,m,h,T));const P=[l,...A],j=await R(t,y),M=[];let L=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&M.push(j[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=w(e),r=S(e),i=x(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=C(s)),[s,C(s)]}(r,s,T);M.push(j[e[0]],j[e[1]])}if(L=[...L,{placement:r,overflows:M}],!M.every((e=>e<=0))){var D,I;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(I=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(N){const t=E(e.placement);return t===_||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},pe=(e,t,n)=>{const o=new Map,r={platform:ae,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=A(c,o,a),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:l}=e,{element:a,padding:d=0}=g(c,e)||{};if(null==a)return{};const p=k(d),f={x:t,y:n},h=S(o),m=x(h),y=await i.getDimensions(a),b="y"===h,_=b?"top":"left",E=b?"bottom":"right",O=b?"clientHeight":"clientWidth",C=r.reference[m]+r.reference[h]-f[h]-r.floating[m],T=f[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let R=A?A[O]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=s.floating[O]||r.floating[m]);const N=C/2-T/2,P=R/2-y[m]/2-1,j=u(p[_],P),M=u(p[E],P),L=j,D=R-y[m]-M,I=R/2-y[m]/2+N,F=v(L,I,D),B=!l.arrow&&null!=w(o)&&I!==F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:l},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=l&&{borderBottom:l,borderRight:l};let p=0;if(l){const e=`${l}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):pe(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},ve=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ge=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},be=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,we=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>we(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!be(e)||!be(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>we(e[n],t[n])))},_e=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},xe=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(_e(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ee="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,Se=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Oe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Ce=(0,c.createContext)({getTooltipData:()=>Oe});function ke(e="DEFAULT_TOOLTIP_ID"){return(0,c.useContext)(Ce).getTooltipData(e)}var Te={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Ae={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Re=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:s,place:l="top",offset:a=10,events:p=["hover"],openOnClick:h=!1,positionStrategy:m="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:k,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,afterShow:M,afterHide:L,content:D,contentWrapperRef:I,isOpen:F,defaultIsOpen:B=!1,setIsOpen:H,activeAnchor:U,setActiveAnchor:W,border:V,opacity:z,arrowColor:q,role:$="tooltip"})=>{var G;const Y=(0,c.useRef)(null),Z=(0,c.useRef)(null),J=(0,c.useRef)(null),Q=(0,c.useRef)(null),te=(0,c.useRef)(null),[ne,oe]=(0,c.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[re,ie]=(0,c.useState)(!1),[se,le]=(0,c.useState)(!1),[ae,ce]=(0,c.useState)(null),ue=(0,c.useRef)(!1),de=(0,c.useRef)(null),{anchorRefs:pe,setActiveAnchor:he}=ke(t),me=(0,c.useRef)(!1),[ve,be]=(0,c.useState)([]),_e=(0,c.useRef)(!1),Oe=h||p.includes("click"),Ce=Oe||(null==k?void 0:k.click)||(null==k?void 0:k.dblclick)||(null==k?void 0:k.mousedown),Re=k?{...k}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!k&&Oe&&Object.assign(Re,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ne=T?{...T}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!T&&Oe&&Object.assign(Ne,{mouseleave:!1,blur:!1,mouseout:!1});const Pe=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ce||!1};R&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ne,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Pe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ee((()=>(_e.current=!0,()=>{_e.current=!1})),[]);const je=e=>{_e.current&&(e&&le(!0),setTimeout((()=>{_e.current&&(null==H||H(e),void 0===F&&ie(e))}),10))};(0,c.useEffect)((()=>{if(void 0===F)return()=>null;F&&le(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,c.useEffect)((()=>{if(re!==ue.current)if(Se(te),ue.current=re,re)null==M||M();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{le(!1),ce(null),null==L||L()}),e+25)}}),[re]);const Me=e=>{oe((t=>we(t,e)?t:e))},Le=(e=g)=>{Se(J),se?je(!0):J.current=setTimeout((()=>{je(!0)}),e)},De=(e=b)=>{Se(Q),Q.current=setTimeout((()=>{me.current||je(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void he({current:null});g?Le():je(!0),W(n),he({current:n}),Se(Q)},Fe=()=>{E?De(b||100):b?De():je(!1),Se(J)},Be=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ye({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:l,offset:a,elementReference:o,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:m,middlewares:y,border:V}).then((e=>{Me(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),de.current=n},Ue=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=Y.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ve].some((e=>null==e?void 0:e.contains(n)))||(je(!1),Se(J)))},We=ge(Ie,50,!0),Ve=ge(Fe,50,!0),ze=e=>{Ve.cancel(),We(e)},qe=()=>{We.cancel(),Ve()},$e=(0,c.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:P;n?Be(n):w?de.current&&Be(de.current):(null==U?void 0:U.isConnected)&&ye({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:l,offset:a,elementReference:U,tooltipReference:Y.current,tooltipArrowReference:Z.current,strategy:m,middlewares:y,border:V}).then((e=>{_e.current&&Me(e)}))}),[re,U,D,N,l,null==ae?void 0:ae.place,a,m,P,null==ae?void 0:ae.position,w]);(0,c.useEffect)((()=>{var e,t;const n=new Set(pe);ve.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&n.add({current:o});const r=()=>{je(!1)},s=xe(U),l=xe(Y.current);Pe.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r));let a=null;Pe.resize?window.addEventListener("resize",r):U&&Y.current&&(a=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,c=K(e),p=r||i?[...c?X(c):[],...X(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=c&&l?function(e,t){let n,o=null;const r=j(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const{left:c,top:p,width:h,height:m}=e.getBoundingClientRect();if(l||t(),!h||!m)return;const y={rootMargin:-f(p)+"px "+-f(r.clientWidth-(c+h))+"px "+-f(r.clientHeight-(p+m))+"px "+-f(c)+"px",threshold:d(0,u(1,a))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==a){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(c,n):null;let m,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),c&&!a&&v.observe(c),v.observe(t));let g=a?ee(e):null;return a&&function t(){const o=ee(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==h||h(),null==(e=v)||e.disconnect(),v=null,a&&cancelAnimationFrame(m)}}(U,Y.current,$e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&je(!1)};Pe.escape&&window.addEventListener("keydown",c),Pe.clickOutsideAnchor&&window.addEventListener("click",Ue);const p=[],h=e=>{re&&(null==e?void 0:e.target)===U||Ie(e)},m=e=>{re&&(null==e?void 0:e.target)===U&&Fe()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:ze}):v.includes(e)&&p.push({event:e,listener:h}))})),Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:qe}):v.includes(e)&&p.push({event:e,listener:m}))})),w&&p.push({event:"pointermove",listener:He});const g=()=>{me.current=!0},b=()=>{me.current=!1,Fe()};return E&&!Ce&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Pe.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r)),Pe.resize?window.removeEventListener("resize",r):null==a||a(),Pe.clickOutsideAnchor&&window.removeEventListener("click",Ue),Pe.escape&&window.removeEventListener("keydown",c),E&&!Ce&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[U,$e,se,pe,ve,k,T,A,Oe,g,b]),(0,c.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(U){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,U))&&(le(!1),je(!1),W(null),Se(J),Se(Q),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&be((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,s,null==ae?void 0:ae.anchorSelect,U]),(0,c.useEffect)((()=>{$e()}),[$e]),(0,c.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>$e()))}));return e.observe(I.current),()=>{e.disconnect()}}),[D,null==I?void 0:I.current]),(0,c.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ve,t];U&&n.includes(U)||W(null!==(e=ve[0])&&void 0!==e?e:t)}),[i,ve,U]),(0,c.useEffect)((()=>(B&&je(!0),()=>{Se(J),Se(Q)})),[]),(0,c.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));be(e)}catch(e){be([])}}),[t,s,null==ae?void 0:ae.anchorSelect]),(0,c.useEffect)((()=>{J.current&&(Se(J),Le(g))}),[g]);const Ge=null!==(G=null==ae?void 0:ae.content)&&void 0!==G?G:D,Xe=re&&Object.keys(ne.tooltipStyles).length>0;return(0,c.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Le(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):je(!1)},activeAnchor:U,place:ne.place,isOpen:Boolean(se&&!_&&Ge&&Xe)}))),se&&!_&&Ge?c.createElement(v,{id:t,role:$,className:fe("react-tooltip",Te.tooltip,Ae.tooltip,Ae[r],n,`react-tooltip__place-${ne.place}`,Te[Xe?"show":"closing"],Xe?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Te.fixed,E&&Te.clickable),onTransitionEnd:e=>{Se(te),re||"opacity"!==e.propertyName||(le(!1),ce(null),null==L||L())},style:{...N,...ne.tooltipStyles,opacity:void 0!==z&&Xe?z:void 0},ref:Y},Ge,c.createElement(v,{className:fe("react-tooltip-arrow",Te.arrow,Ae.arrow,o,x&&Te.noArrow),style:{...ne.tooltipArrowStyles,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Z})):null},Ne=({content:e})=>c.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Pe=c.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:s,classNameArrow:l,variant:a="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:k,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:j,defaultIsOpen:M=!1,disableStyleInjection:L=!1,border:D,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,role:W="tooltip"},V)=>{const[z,q]=(0,c.useState)(o),[$,G]=(0,c.useState)(r),[X,Y]=(0,c.useState)(u),[K,Z]=(0,c.useState)(a),[J,Q]=(0,c.useState)(d),[ee,te]=(0,c.useState)(g),[ne,oe]=(0,c.useState)(b),[re,ie]=(0,c.useState)(w),[se,le]=(0,c.useState)(_),[ae,ce]=(0,c.useState)(p),[ue,de]=(0,c.useState)(h),[pe,he]=(0,c.useState)(y),[me,ye]=(0,c.useState)(null),[ge,be]=(0,c.useState)(null),we=(0,c.useRef)(L),{anchorRefs:_e,activeAnchor:xe}=ke(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Se=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:r)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{Q(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?g:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,c.useEffect)((()=>{q(o)}),[o]),(0,c.useEffect)((()=>{G(r)}),[r]),(0,c.useEffect)((()=>{Y(u)}),[u]),(0,c.useEffect)((()=>{Z(a)}),[a]),(0,c.useEffect)((()=>{Q(d)}),[d]),(0,c.useEffect)((()=>{te(g)}),[g]),(0,c.useEffect)((()=>{oe(b)}),[b]),(0,c.useEffect)((()=>{ie(w)}),[w]),(0,c.useEffect)((()=>{le(_)}),[_]),(0,c.useEffect)((()=>{he(y)}),[y]),(0,c.useEffect)((()=>{we.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,c.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,c.useEffect)((()=>{var o;const r=new Set(_e);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const l=null!==(o=null!=ge?ge:s)&&void 0!==o?o:xe.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(l);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(l){const e=Ee(l);Se(e),a.observe(l,c)}return()=>{a.disconnect()}}),[_e,xe,ge,t,n]),(0,c.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!ve("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!ve("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Oe=f;const Ce=(0,c.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||z||null,activeAnchor:ge});Oe=e?c.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else z&&(Oe=z);$&&(Oe=c.createElement(Ne,{content:$}));const Te={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:fe(s,me),classNameArrow:l,content:Oe,contentWrapperRef:Ce,place:X,variant:K,offset:J,wrapper:ae,events:ue,openOnClick:m,positionStrategy:pe,middlewares:v,delayShow:ee,delayHide:ne,float:re,hidden:se,noArrow:x,clickable:E,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:k,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:j,defaultIsOpen:M,border:D,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,activeAnchor:ge,setActiveAnchor:e=>be(e),role:W};return c.createElement(Re,{...Te})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||me({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const je=window.wp.element,Me=window.wp.i18n,Le=window.wp.components,De=window.wp.apiFetch;var Ie=n.n(De);const Fe=window.ReactJSXRuntime,Be=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Me._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Me._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Me._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,Fe.jsxs)("div",{className:"gatherpress-status__response",children:[(0,Fe.jsx)("span",{className:n[e][t].icon}),(0,Fe.jsx)("strong",{children:n[e][t].text})]})};function He(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Ue=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:o,enableInitialDecline:r,maxGuestLimit:i})=>{const[l,c]=(0,je.useState)(t.status),[u,d]=(0,je.useState)(Number(t.anonymous)),[p,f]=(0,je.useState)(t.guests),[h,m]=(0,je.useState)("hidden"),[y,v]=(0,je.useState)("false"),[g,b]=(0,je.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&s().setAppElement(".gatherpress-enabled");const w=e=>{e.preventDefault(),b(!1)},_=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Ie()({path:He("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:He("misc.nonce")}}).then((e=>{if(e.success){c(e.status),f(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&w(t)}}))},x=e=>{switch(e){case"attending":return(0,Me.__)("You're attending","gatherpress");case"waiting_list":return(0,Me.__)("You're wait listed","gatherpress");case"not_attending":return(0,Me.__)("You're not attending","gatherpress")}return(0,Me.__)("RSVP to this event","gatherpress")},E=()=>(0,Fe.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__header",children:(0,Me.__)("Login Required","gatherpress")}),(0,Fe.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:a((0,Me.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ -(0,Me.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,Me._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==He("urls.registrationUrl")&&(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:a((0,Me.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ -(0,Me.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,Me._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,Fe.jsx)(Le.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:w,className:"gatherpress-buttons__button wp-block-button__link",children:(0,Me.__)("Close","gatherpress")})})})]}),S=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,Me.__)("Attend","gatherpress")):(t="not_attending",n=(0,Me._x)("Not Attending","action of not attending","gatherpress")),(0,Fe.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__header",children:x(l)?x(l):(0,Fe.jsx)(Le.Spinner,{})}),(0,Fe.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:a((0,Me.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ -(0,Me.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);f(t),_(e,l,u,t,!1)},defaultValue:p})]}),o&&(0,Fe.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,Fe.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);d(t),_(e,l,t,0,!1)},checked:u}),(0,Fe.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,Me.__)("Only admins will see your identity.","gatherpress"),children:(0,Me.__)("List me as anonymous.","gatherpress")}),(0,Fe.jsx)(Pe,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,Fe.jsxs)(Le.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,Fe.jsx)("a",{href:"#",onClick:e=>_(e,t,u,"not_attending"!==t?p:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:w,className:"gatherpress-buttons__button wp-block-button__link",children:(0,Me.__)("Close","gatherpress")})})]}),r&&"no_status"===l&&1!==u?(0,Fe.jsx)(Le.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:e=>_(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,Me._x)("Not Attending","Responded Status","gatherpress")})})}):(0,Fe.jsx)(Fe.Fragment,{})]})};return(0,Fe.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,Fe.jsxs)(Le.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":y,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(m("hidden"===h?"show":"hidden"),v("false"===y?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),b(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Me.__)("Edit RSVP","gatherpress")}return(0,Me.__)("RSVP","gatherpress")})(l)})}),(0,Fe.jsxs)(s(),{isOpen:g,onRequestClose:w,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Me.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,Fe.jsx)(E,{}),0!==t.length&&(0,Fe.jsx)(S,{status:l})]})]}),"no_status"!==l&&(0,Fe.jsxs)("div",{className:"gatherpress-status",children:[(0,Fe.jsx)(Be,{type:n,status:l}),0{const{isSelected:t}=e,n=t?"none":"block";return(0,Fe.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,Fe.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},Ve=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp","version":"1.0.1","title":"RSVP","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp.js","render":"file:./render.php"}');(0,o.registerBlockType)(Ve,{edit:()=>{const e=(0,r.useBlockProps)(),t=He("eventDetails.postId"),n=He("eventDetails.currentUser");return(0,Fe.jsx)("div",{...e,children:(0,Fe.jsx)(We,{children:(0,Fe.jsx)(Ue,{postId:t,currentUser:n,type:"upcoming"})})})},save:()=>null})},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?E(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?E(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?E(e.children):[];var l=new h(o);o.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),l.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=a(e).querySelectorAll(p);return l.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=a(e,r).querySelector(r)).childNodes;var y}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,l=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var l,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],l={reset:!0,submit:!0};function a(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||l,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};a(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,w),y,m))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,s.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&_)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var l=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(s),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(l),a}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==l){var a=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+a+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(a.returnFocus(n.props.preventScroll),a.teardownScopedFocus()):a.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(a.setupScopedFocus(n.node),a.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,l=n?{}:i.content,a=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(p.SafeHTMLCollection),l.default.instanceOf(p.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=a,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function a(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=a,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",a,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",a),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",a),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",a),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,l=!1;function a(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,l=n[0],a=n[n.length-1],c=i();if(e===c){if(!s)return;o=a}if(a!==c||s||(o=l),l===c&&s&&(o=a),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?a:l).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:l,SAME:a,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,a):e.replace(i,a)).replace(o,l))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9788));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[a])))?n.splice(a--,1):(l=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={662:0,394:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,l,a]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(a)var u=a(o)}for(t&&t(n);co(765)));r=o.O(r)})(); \ No newline at end of file +(()=>{var e,t={765:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.wp.blockEditor;var i=n(312),s=n.n(i),l=n(442);const a=l.default||l;var c=n(1609);const u=Math.min,d=Math.max,p=Math.round,f=Math.floor,h=e=>({x:e,y:e}),m={left:"right",right:"left",bottom:"top",top:"bottom"},y={start:"end",end:"start"};function v(e,t,n){return d(e,u(t,n))}function g(e,t){return"function"==typeof e?e(t):e}function b(e){return e.split("-")[0]}function w(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function x(e){return"y"===e?"height":"width"}function E(e){return["top","bottom"].includes(b(e))?"y":"x"}function S(e){return _(E(e))}function O(e){return e.replace(/start|end/g,(e=>y[e]))}function C(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function A(e,t,n){let{reference:o,floating:r}=e;const i=E(t),s=S(t),l=x(s),a=b(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let f;switch(a){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(w(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function R(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=g(t,e),h=k(f),m=l[p?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:a}):v);return{top:(y.top-_.top+h.top)/w.y,bottom:(_.bottom-y.bottom+h.bottom)/w.y,left:(y.left-_.left+h.left)/w.x,right:(_.right-y.right+h.right)/w.x}}function N(){return"undefined"!=typeof window}function P(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function M(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return!!N()&&(e instanceof Node||e instanceof j(e).Node)}function D(e){return!!N()&&(e instanceof Element||e instanceof j(e).Element)}function I(e){return!!N()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function F(e){return!(!N()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function H(e){return["table","td","th"].includes(P(e))}function U(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function W(e){const t=V(),n=D(e)?q(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function V(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function z(e){return["html","body","#document"].includes(P(e))}function q(e){return j(e).getComputedStyle(e)}function $(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===P(e))return e;const t=e.assignedSlot||e.parentNode||F(e)&&e.host||M(e);return F(t)?t.host:t}function X(e){const t=G(e);return z(t)?e.ownerDocument?e.ownerDocument.body:e.body:I(t)&&B(t)?t:X(t)}function Y(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=X(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=j(r);if(i){const e=K(s);return t.concat(s,s.visualViewport||[],B(r)?r:[],e&&n?Y(e):[])}return t.concat(r,Y(r,[],n))}function K(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Z(e){const t=q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=I(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,l=p(n)!==i||p(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function J(e){return D(e)?e:e.contextElement}function Q(e){const t=J(e);if(!I(t))return h(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Z(t);let s=(i?p(n.width):n.width)/o,l=(i?p(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ee=h(0);function te(e){const t=j(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ee}function ne(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=J(e);let s=h(1);t&&(o?D(o)&&(s=Q(o)):s=Q(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==j(e))&&t}(i,n,o)?te(i):h(0);let a=(r.left+l.x)/s.x,c=(r.top+l.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=j(i),t=o&&D(o)?j(o):o;let n=e,r=K(n);for(;r&&o&&t!==n;){const e=Q(r),t=r.getBoundingClientRect(),o=q(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,n=j(r),r=K(n)}}return T({width:u,height:d,x:a,y:c})}function oe(e,t){const n=$(e).scrollLeft;return t?t.left+n:ne(M(e)).left+n}function re(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=j(e),o=M(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;const e=V();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t)o=function(e){const t=M(e),n=$(e),o=e.ownerDocument.body,r=d(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=d(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+oe(e);const l=-n.scrollTop;return"rtl"===q(o).direction&&(s+=d(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:l}}(M(e));else if(D(t))o=function(e,t){const n=ne(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=I(e)?Q(e):h(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=te(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return T(o)}function ie(e,t){const n=G(e);return!(n===t||!D(n)||z(n))&&("fixed"===q(n).position||ie(n,t))}function se(e,t,n){const o=I(t),r=M(t),i="fixed"===n,s=ne(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=h(0);if(o||!o&&!i)if(("body"!==P(t)||B(r))&&(l=$(t)),o){const e=ne(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=oe(r));let c=0,u=0;if(r&&!o&&!i){const e=r.getBoundingClientRect();u=e.top+l.scrollTop,c=e.left+l.scrollLeft-oe(r,e)}return{x:s.left+l.scrollLeft-a.x-c,y:s.top+l.scrollTop-a.y-u,width:s.width,height:s.height}}function le(e){return"static"===q(e).position}function ae(e,t){if(!I(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return M(e)===n&&(n=n.ownerDocument.body),n}function ce(e,t){const n=j(e);if(U(e))return n;if(!I(e)){let t=G(e);for(;t&&!z(t);){if(D(t)&&!le(t))return t;t=G(t)}return n}let o=ae(e,t);for(;o&&H(o)&&le(o);)o=ae(o,t);return o&&z(o)&&le(o)&&!W(o)?n:o||function(e){let t=G(e);for(;I(t)&&!z(t);){if(W(t))return t;if(U(t))return null;t=G(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=M(o),l=!!t&&U(t.floating);if(o===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=h(1);const u=h(0),d=I(o);if((d||!d&&!i)&&(("body"!==P(o)||B(s))&&(a=$(o)),I(o))){const e=ne(o);c=Q(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:M,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?U(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Y(e,[],!1).filter((e=>D(e)&&"body"!==P(e))),r=null;const i="fixed"===q(e).position;let s=i?G(e):e;for(;D(s)&&!z(s);){const t=q(s),n=W(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||B(s)&&!n&&ie(e,s))?o=o.filter((e=>e!==s)):r=t,s=G(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],l=i.reduce(((e,n)=>{const o=re(t,n,r);return e.top=d(o.top,e.top),e.right=u(o.right,e.right),e.bottom=u(o.bottom,e.bottom),e.left=d(o.left,e.left),e}),re(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ce,getElementRects:async function(e){const t=this.getOffsetParent||ce,n=this.getDimensions,o=await n(e.floating);return{reference:se(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Z(e);return{width:t,height:n}},getScale:Q,isElement:D,isRTL:function(e){return"rtl"===q(e).direction}};const de=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=b(n),l=w(n),a="y"===E(n),c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=g(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(f="end"===l?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},pe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=g(e,t),c={x:n,y:o},u=await R(t,a),d=E(b(r)),p=_(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=v(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=v(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[p]:i,[d]:s}}}}}},fe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=g(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=b(r),_=E(l),k=b(l)===l,T=await(null==a.isRTL?void 0:a.isRTL(c.floating)),A=p||(k||!m?[C(l)]:function(e){const t=C(e);return[O(e),t,O(t)]}(l)),N="none"!==h;!p&&N&&A.push(...function(e,t,n,o){const r=w(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(b(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(O)))),i}(l,m,h,T));const P=[l,...A],j=await R(t,y),M=[];let L=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&M.push(j[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=w(e),r=S(e),i=x(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=C(s)),[s,C(s)]}(r,s,T);M.push(j[e[0]],j[e[1]])}if(L=[...L,{placement:r,overflows:M}],!M.every((e=>e<=0))){var D,I;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(I=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(N){const t=E(e.placement);return t===_||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},he=(e,t,n)=>{const o=new Map,r={platform:ue,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=A(c,o,a),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:l}=e,{element:a,padding:d=0}=g(c,e)||{};if(null==a)return{};const p=k(d),f={x:t,y:n},h=S(o),m=x(h),y=await i.getDimensions(a),b="y"===h,_=b?"top":"left",E=b?"bottom":"right",O=b?"clientHeight":"clientWidth",C=r.reference[m]+r.reference[h]-f[h]-r.floating[m],T=f[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let R=A?A[O]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=s.floating[O]||r.floating[m]);const N=C/2-T/2,P=R/2-y[m]/2-1,j=u(p[_],P),M=u(p[E],P),L=j,D=R-y[m]-M,I=R/2-y[m]/2+N,F=v(L,I,D),B=!l.arrow&&null!=w(o)&&I!==F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:l},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=l&&{borderBottom:l,borderRight:l};let p=0;if(l){const e=`${l}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):he(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},be=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),we=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},_e=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,xe=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>xe(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!_e(e)||!_e(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>xe(e[n],t[n])))},Ee=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Se=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ee(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Oe="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,Ce=e=>{e.current&&(clearTimeout(e.current),e.current=null)},ke={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Te=(0,c.createContext)({getTooltipData:()=>ke});function Ae(e="DEFAULT_TOOLTIP_ID"){return(0,c.useContext)(Te).getTooltipData(e)}var Re={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Ne={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Pe=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:s,place:l="top",offset:a=10,events:p=["hover"],openOnClick:h=!1,positionStrategy:m="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:k,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,afterShow:j,afterHide:L,disableTooltip:D,content:I,contentWrapperRef:F,isOpen:B,defaultIsOpen:H=!1,setIsOpen:U,activeAnchor:W,setActiveAnchor:V,border:z,opacity:q,arrowColor:$,role:G="tooltip"})=>{var X;const K=(0,c.useRef)(null),Z=(0,c.useRef)(null),Q=(0,c.useRef)(null),ee=(0,c.useRef)(null),te=(0,c.useRef)(null),[oe,re]=(0,c.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[ie,se]=(0,c.useState)(!1),[le,ae]=(0,c.useState)(!1),[ce,ue]=(0,c.useState)(null),de=(0,c.useRef)(!1),pe=(0,c.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=Ae(t),ye=(0,c.useRef)(!1),[ve,be]=(0,c.useState)([]),_e=(0,c.useRef)(!1),Ee=h||p.includes("click"),ke=Ee||(null==k?void 0:k.click)||(null==k?void 0:k.dblclick)||(null==k?void 0:k.mousedown),Te=k?{...k}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!k&&Ee&&Object.assign(Te,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Pe=T?{...T}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!T&&Ee&&Object.assign(Pe,{mouseleave:!1,blur:!1,mouseout:!1});const je=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:ke||!1};R&&(Object.assign(Te,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(je,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Oe((()=>(_e.current=!0,()=>{_e.current=!1})),[]);const Me=e=>{_e.current&&(e&&ae(!0),setTimeout((()=>{_e.current&&(null==U||U(e),void 0===B&&se(e))}),10))};(0,c.useEffect)((()=>{if(void 0===B)return()=>null;B&&ae(!0);const e=setTimeout((()=>{se(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,c.useEffect)((()=>{if(ie!==de.current)if(Ce(te),de.current=ie,ie)null==j||j();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{ae(!1),ue(null),null==L||L()}),e+25)}}),[ie]);const Le=e=>{re((t=>xe(t,e)?t:e))},De=(e=g)=>{Ce(Q),le?Me(!0):Q.current=setTimeout((()=>{Me(!0)}),e)},Ie=(e=b)=>{Ce(ee),ee.current=setTimeout((()=>{ye.current||Me(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return V(null),void he({current:null});g?De():Me(!0),V(n),he({current:n}),Ce(ee)},Be=()=>{E?Ie(b||100):b?Ie():Me(!1),Ce(Q)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ge({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:l,offset:a,elementReference:o,tooltipReference:K.current,tooltipArrowReference:Z.current,strategy:m,middlewares:y,border:z}).then((e=>{Le(e)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),pe.current=n},We=e=>{var t;if(!ie)return;const n=e.target;n.isConnected&&((null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ve].some((e=>null==e?void 0:e.contains(n)))||(Me(!1),Ce(Q)))},Ve=we(Fe,50,!0),ze=we(Be,50,!0),qe=e=>{ze.cancel(),Ve(e)},$e=()=>{Ve.cancel(),ze()},Ge=(0,c.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:P;n?He(n):w?pe.current&&He(pe.current):(null==W?void 0:W.isConnected)&&ge({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:l,offset:a,elementReference:W,tooltipReference:K.current,tooltipArrowReference:Z.current,strategy:m,middlewares:y,border:z}).then((e=>{_e.current&&Le(e)}))}),[ie,W,I,N,l,null==ce?void 0:ce.place,a,m,P,null==ce?void 0:ce.position,w]);(0,c.useEffect)((()=>{var e,t;const n=new Set(fe);ve.forEach((e=>{(null==D?void 0:D(e))||n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&!(null==D?void 0:D(o))&&n.add({current:o});const r=()=>{Me(!1)},s=Se(W),l=Se(K.current);je.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r));let a=null;je.resize?window.addEventListener("resize",r):W&&K.current&&(a=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,c=J(e),p=r||i?[...c?Y(c):[],...Y(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=c&&l?function(e,t){let n,o=null;const r=M(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const{left:c,top:p,width:h,height:m}=e.getBoundingClientRect();if(l||t(),!h||!m)return;const y={rootMargin:-f(p)+"px "+-f(r.clientWidth-(c+h))+"px "+-f(r.clientHeight-(p+m))+"px "+-f(c)+"px",threshold:d(0,u(1,a))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==a){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(c,n):null;let m,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),c&&!a&&v.observe(c),v.observe(t));let g=a?ne(e):null;return a&&function t(){const o=ne(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==h||h(),null==(e=v)||e.disconnect(),v=null,a&&cancelAnimationFrame(m)}}(W,K.current,Ge,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Me(!1)};je.escape&&window.addEventListener("keydown",c),je.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],h=e=>{ie&&(null==e?void 0:e.target)===W||Fe(e)},m=e=>{ie&&(null==e?void 0:e.target)===W&&Be()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Te).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:qe}):v.includes(e)&&p.push({event:e,listener:h}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:$e}):v.includes(e)&&p.push({event:e,listener:m}))})),w&&p.push({event:"pointermove",listener:Ue});const g=()=>{ye.current=!0},b=()=>{ye.current=!1,Be()};return E&&!ke&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;je.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r)),je.resize?window.removeEventListener("resize",r):null==a||a(),je.clickOutsideAnchor&&window.removeEventListener("click",We),je.escape&&window.removeEventListener("keydown",c),E&&!ke&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Ge,le,fe,ve,k,T,A,Ee,g,b]),(0,c.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(ae(!1),Me(!1),V(null),Ce(Q),Ce(ee),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&be((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,s,null==ce?void 0:ce.anchorSelect,W]),(0,c.useEffect)((()=>{Ge()}),[Ge]),(0,c.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ge()))}));return e.observe(F.current),()=>{e.disconnect()}}),[I,null==F?void 0:F.current]),(0,c.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ve,t];W&&n.includes(W)||V(null!==(e=ve[0])&&void 0!==e?e:t)}),[i,ve,W]),(0,c.useEffect)((()=>(H&&Me(!0),()=>{Ce(Q),Ce(ee)})),[]),(0,c.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));be(e)}catch(e){be([])}}),[t,s,null==ce?void 0:ce.anchorSelect]),(0,c.useEffect)((()=>{Q.current&&(Ce(Q),De(g))}),[g]);const Xe=null!==(X=null==ce?void 0:ce.content)&&void 0!==X?X:I,Ye=ie&&Object.keys(oe.tooltipStyles).length>0;return(0,c.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Me(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):Me(!1)},activeAnchor:W,place:oe.place,isOpen:Boolean(le&&!_&&Xe&&Ye)}))),le&&!_&&Xe?c.createElement(v,{id:t,role:G,className:me("react-tooltip",Re.tooltip,Ne.tooltip,Ne[r],n,`react-tooltip__place-${oe.place}`,Re[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Re.fixed,E&&Re.clickable),onTransitionEnd:e=>{Ce(te),ie||"opacity"!==e.propertyName||(ae(!1),ue(null),null==L||L())},style:{...N,...oe.tooltipStyles,opacity:void 0!==q&&Ye?q:void 0},ref:K},Xe,c.createElement(v,{className:me("react-tooltip-arrow",Re.arrow,Ne.arrow,o,x&&Re.noArrow),style:{...oe.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:Z})):null},je=({content:e})=>c.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Me=c.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:s,classNameArrow:l,variant:a="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:k,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:j,defaultIsOpen:M=!1,disableStyleInjection:L=!1,border:D,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,disableTooltip:W,role:V="tooltip"},z)=>{const[q,$]=(0,c.useState)(o),[G,X]=(0,c.useState)(r),[Y,K]=(0,c.useState)(u),[Z,J]=(0,c.useState)(a),[Q,ee]=(0,c.useState)(d),[te,ne]=(0,c.useState)(g),[oe,re]=(0,c.useState)(b),[ie,se]=(0,c.useState)(w),[le,ae]=(0,c.useState)(_),[ce,ue]=(0,c.useState)(p),[de,pe]=(0,c.useState)(h),[fe,he]=(0,c.useState)(y),[ye,ve]=(0,c.useState)(null),[ge,we]=(0,c.useState)(null),_e=(0,c.useRef)(L),{anchorRefs:xe,activeAnchor:Ee}=Ae(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:u)},content:e=>{$(null!=e?e:o)},html:e=>{X(null!=e?e:r)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ne(null===e?g:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{se(null===e?w:"true"===e)},hidden:e=>{ae(null===e?_:"true"===e)},"class-name":e=>{ve(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,c.useEffect)((()=>{$(o)}),[o]),(0,c.useEffect)((()=>{X(r)}),[r]),(0,c.useEffect)((()=>{K(u)}),[u]),(0,c.useEffect)((()=>{J(a)}),[a]),(0,c.useEffect)((()=>{ee(d)}),[d]),(0,c.useEffect)((()=>{ne(g)}),[g]),(0,c.useEffect)((()=>{re(b)}),[b]),(0,c.useEffect)((()=>{se(w)}),[w]),(0,c.useEffect)((()=>{ae(_)}),[_]),(0,c.useEffect)((()=>{he(y)}),[y]),(0,c.useEffect)((()=>{_e.current!==L&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[L]),(0,c.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===L,disableBase:L}}))}),[]),(0,c.useEffect)((()=>{var o;const r=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const l=null!==(o=null!=ge?ge:s)&&void 0!==o?o:Ee.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(l);Oe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(l){const e=Se(l);Oe(e),a.observe(l,c)}return()=>{a.disconnect()}}),[xe,Ee,ge,t,n]),(0,c.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!be("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!be("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Ce=f;const ke=(0,c.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||q||null,activeAnchor:ge});Ce=e?c.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else q&&(Ce=q);G&&(Ce=c.createElement(je,{content:G}));const Te={forwardRef:z,id:e,anchorId:t,anchorSelect:n,className:me(s,ye),classNameArrow:l,content:Ce,contentWrapperRef:ke,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:m,positionStrategy:fe,middlewares:v,delayShow:te,delayHide:oe,float:ie,hidden:le,noArrow:x,clickable:E,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:k,closeEvents:T,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:j,defaultIsOpen:M,border:D,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,disableTooltip:W,activeAnchor:ge,setActiveAnchor:e=>we(e),role:V};return c.createElement(Pe,{...Te})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ve({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ve({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Le=window.wp.element,De=window.wp.i18n,Ie=window.wp.components,Fe=window.wp.apiFetch;var Be=n.n(Fe);const He=window.ReactJSXRuntime,Ue=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,De._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,De._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,De._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,De._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,De._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,De._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,De._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,He.jsxs)("div",{className:"gatherpress-status__response",children:[(0,He.jsx)("span",{className:n[e][t].icon}),(0,He.jsx)("strong",{children:n[e][t].text})]})};function We(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Ve=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:o,enableInitialDecline:r,maxGuestLimit:i})=>{const[l,c]=(0,Le.useState)(t.status),[u,d]=(0,Le.useState)(Number(t.anonymous)),[p,f]=(0,Le.useState)(t.guests),[h,m]=(0,Le.useState)("hidden"),[y,v]=(0,Le.useState)("false"),[g,b]=(0,Le.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&s().setAppElement(".gatherpress-enabled");const w=e=>{e.preventDefault(),b(!1)},_=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Be()({path:We("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:We("misc.nonce")}}).then((e=>{if(e.success){c(e.status),f(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&w(t)}}))},x=e=>{switch(e){case"attending":return(0,De.__)("You're attending","gatherpress");case"waiting_list":return(0,De.__)("You're wait listed","gatherpress");case"not_attending":return(0,De.__)("You're not attending","gatherpress")}return(0,De.__)("RSVP to this event","gatherpress")},E=()=>(0,He.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,He.jsx)("div",{className:"gatherpress-modal__header",children:(0,De.__)("Login Required","gatherpress")}),(0,He.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,He.jsx)("div",{className:"gatherpress-modal__text",children:a((0,De.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ +(0,De.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,De._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==We("urls.registrationUrl")&&(0,He.jsx)("div",{className:"gatherpress-modal__text",children:a((0,De.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ +(0,De.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,De._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,He.jsx)(Ie.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,He.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,He.jsx)("a",{href:"#",onClick:w,className:"gatherpress-buttons__button wp-block-button__link",children:(0,De.__)("Close","gatherpress")})})})]}),S=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,De.__)("Attend","gatherpress")):(t="not_attending",n=(0,De._x)("Not Attending","action of not attending","gatherpress")),(0,He.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,He.jsx)("div",{className:"gatherpress-modal__header",children:x(l)?x(l):(0,He.jsx)(Ie.Spinner,{})}),(0,He.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,He.jsx)("div",{className:"gatherpress-modal__text",children:a((0,De.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ +(0,De.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);f(t),_(e,l,u,t,!1)},defaultValue:p})]}),o&&(0,He.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,He.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);d(t),_(e,l,t,0,!1)},checked:u}),(0,He.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,De.__)("Only admins will see your identity.","gatherpress"),children:(0,De.__)("List me as anonymous.","gatherpress")}),(0,He.jsx)(Me,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,He.jsxs)(Ie.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,He.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,He.jsx)("a",{href:"#",onClick:e=>_(e,t,u,"not_attending"!==t?p:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,He.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,He.jsx)("a",{href:"#",onClick:w,className:"gatherpress-buttons__button wp-block-button__link",children:(0,De.__)("Close","gatherpress")})})]}),r&&"no_status"===l&&1!==u?(0,He.jsx)(Ie.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,He.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,He.jsx)("a",{href:"#",onClick:e=>_(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,De._x)("Not Attending","Responded Status","gatherpress")})})}):(0,He.jsx)(He.Fragment,{})]})};return(0,He.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,He.jsxs)(Ie.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,He.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,He.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":y,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(m("hidden"===h?"show":"hidden"),v("false"===y?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),b(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,De.__)("Edit RSVP","gatherpress")}return(0,De.__)("RSVP","gatherpress")})(l)})}),(0,He.jsxs)(s(),{isOpen:g,onRequestClose:w,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,De.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,He.jsx)(E,{}),0!==t.length&&(0,He.jsx)(S,{status:l})]})]}),"no_status"!==l&&(0,He.jsxs)("div",{className:"gatherpress-status",children:[(0,He.jsx)(Ue,{type:n,status:l}),0{const{isSelected:t}=e,n=t?"none":"block";return(0,He.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,He.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})},qe=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp","version":"1.0.1","title":"RSVP","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp.js","render":"file:./render.php"}');(0,o.registerBlockType)(qe,{edit:()=>{const e=(0,r.useBlockProps)(),t=We("eventDetails.postId"),n=We("eventDetails.currentUser");return(0,He.jsx)("div",{...e,children:(0,He.jsx)(ze,{children:(0,He.jsx)(Ve,{postId:t,currentUser:n,type:"upcoming"})})})},save:()=>null})},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?E(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?E(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?E(e.children):[];var l=new h(o);o.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),l.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=a(e).querySelectorAll(p);return l.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=a(e,r).querySelector(r)).childNodes;var y}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,l=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var l,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],l={reset:!0,submit:!0};function a(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||l,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};a(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,w),y,m))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,s.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&_)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var l=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(s),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(l),a}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==l){var a=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+a+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(a.returnFocus(n.props.preventScroll),a.teardownScopedFocus()):a.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(a.setupScopedFocus(n.node),a.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,l=n?{}:i.content,a=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(p.SafeHTMLCollection),l.default.instanceOf(p.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=a,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function a(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=a,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",a,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",a),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",a),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",a),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,l=!1;function a(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,l=n[0],a=n[n.length-1],c=i();if(e===c){if(!s)return;o=a}if(a!==c||s||(o=l),l===c&&s&&(o=a),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?a:l).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:l,SAME:a,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,a):e.replace(i,a)).replace(o,l))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n};var r=o(n(9788))},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var s=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[a])))?n.splice(a--,1):(l=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={662:0,394:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,s=n[0],l=n[1],a=n[2],c=0;if(s.some((t=>0!==e[t]))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(a)var u=a(o)}for(t&&t(n);co(765)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/rsvp/rsvp.asset.php b/build/blocks/rsvp/rsvp.asset.php index c866849a5..eaa0b873f 100644 --- a/build/blocks/rsvp/rsvp.asset.php +++ b/build/blocks/rsvp/rsvp.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '680566d16c88772cbf7c'); + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'a739b00e9b9ec0d3e2d7'); diff --git a/build/blocks/rsvp/rsvp.js b/build/blocks/rsvp/rsvp.js index 759a23c1e..a490640da 100644 --- a/build/blocks/rsvp/rsvp.js +++ b/build/blocks/rsvp/rsvp.js @@ -1,5 +1,5 @@ -(()=>{var e={5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?E(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?E(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?E(e.children):[];var l=new h(o);o.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),l.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=a(e).querySelectorAll(p);return l.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=a(e,r).querySelector(r)).childNodes;var y}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,l=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var l,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],l={reset:!0,submit:!0};function a(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||l,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};a(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,w),y,m))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,s.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&_)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var l=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(s),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(l),a}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==l){var a=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+a+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(a.returnFocus(n.props.preventScroll),a.teardownScopedFocus()):a.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(a.setupScopedFocus(n.node),a.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,l=n?{}:i.content,a=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(p.SafeHTMLCollection),l.default.instanceOf(p.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=a,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function a(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=a,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",a,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",a),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",a),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",a),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,l=!1;function a(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,l=n[0],a=n[n.length-1],c=i();if(e===c){if(!s)return;o=a}if(a!==c||s||(o=l),l===c&&s&&(o=a),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?a:l).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:l,SAME:a,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,a):e.replace(i,a)).replace(o,l))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(9788));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const o=window.wp.element;var r=n(312),i=n.n(r),s=n(442);const l=s.default||s;var a=n(1609);const c=Math.min,u=Math.max,d=Math.round,p=Math.floor,f=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function y(e,t,n){return u(e,c(t,n))}function v(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function b(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(g(e))?"y":"x"}function E(e){return w(x(e))}function S(e){return e.replace(/start|end/g,(e=>m[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>h[e]))}function C(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function k(e,t,n){let{reference:o,floating:r}=e;const i=x(t),s=E(t),l=_(s),a=g(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let f;switch(a){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(b(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=v(t,e),h=C(f),m=l[p?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),g="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:b,strategy:a}):g);return{top:(y.top-_.top+h.top)/w.y,bottom:(_.bottom-y.bottom+h.bottom)/w.y,left:(y.left-_.left+h.left)/w.x,right:(_.right-y.right+h.right)/w.x}}function R(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return e instanceof Node||e instanceof N(e).Node}function j(e){return e instanceof Element||e instanceof N(e).Element}function D(e){return e instanceof HTMLElement||e instanceof N(e).HTMLElement}function L(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function I(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function F(e){return["table","td","th"].includes(R(e))}function H(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function B(e){const t=U(),n=j(e)?z(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function U(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function W(e){return["html","body","#document"].includes(R(e))}function z(e){return N(e).getComputedStyle(e)}function V(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||L(e)&&e.host||P(e);return L(t)?t.host:t}function $(e){const t=q(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&I(t)?t:$(t)}function G(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=$(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=N(r);return i?t.concat(s,s.visualViewport||[],I(r)?r:[],s.frameElement&&n?G(s.frameElement):[]):t.concat(r,G(r,[],n))}function X(e){const t=z(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=D(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,l=d(n)!==i||d(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function Y(e){return j(e)?e:e.contextElement}function K(e){const t=Y(e);if(!D(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=X(t);let s=(i?d(n.width):n.width)/o,l=(i?d(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const Z=f(0);function J(e){const t=N(e);return U()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Z}function Q(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Y(e);let s=f(1);t&&(o?j(o)&&(s=K(o)):s=K(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==N(e))&&t}(i,n,o)?J(i):f(0);let a=(r.left+l.x)/s.x,c=(r.top+l.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=N(i),t=o&&j(o)?N(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=K(r),t=r.getBoundingClientRect(),o=z(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,n=N(r),r=n.frameElement}}return T({width:u,height:d,x:a,y:c})}function ee(e){return Q(P(e)).left+V(e).scrollLeft}function te(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=N(e),o=P(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;const e=U();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t)o=function(e){const t=P(e),n=V(e),o=e.ownerDocument.body,r=u(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=u(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ee(e);const l=-n.scrollTop;return"rtl"===z(o).direction&&(s+=u(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:l}}(P(e));else if(j(t))o=function(e,t){const n=Q(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=D(e)?K(e):f(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=J(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return T(o)}function ne(e,t){const n=q(e);return!(n===t||!j(n)||W(n))&&("fixed"===z(n).position||ne(n,t))}function oe(e,t,n){const o=D(t),r=P(t),i="fixed"===n,s=Q(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=f(0);if(o||!o&&!i)if(("body"!==R(t)||I(r))&&(l=V(t)),o){const e=Q(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=ee(r));return{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function re(e){return"static"===z(e).position}function ie(e,t){return D(e)&&"fixed"!==z(e).position?t?t(e):e.offsetParent:null}function se(e,t){const n=N(e);if(H(e))return n;if(!D(e)){let t=q(e);for(;t&&!W(t);){if(j(t)&&!re(t))return t;t=q(t)}return n}let o=ie(e,t);for(;o&&F(o)&&re(o);)o=ie(o,t);return o&&W(o)&&re(o)&&!B(o)?n:o||function(e){let t=q(e);for(;D(t)&&!W(t);){if(B(t))return t;if(H(t))return null;t=q(t)}return null}(e)||n}const le={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=P(o),l=!!t&&H(t.floating);if(o===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=f(1);const u=f(0),d=D(o);if((d||!d&&!i)&&(("body"!==R(o)||I(s))&&(a=V(o)),D(o))){const e=Q(o);c=K(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?H(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=G(e,[],!1).filter((e=>j(e)&&"body"!==R(e))),r=null;const i="fixed"===z(e).position;let s=i?q(e):e;for(;j(s)&&!W(s);){const t=z(s),n=B(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||I(s)&&!n&&ne(e,s))?o=o.filter((e=>e!==s)):r=t,s=q(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],l=i.reduce(((e,n)=>{const o=te(t,n,r);return e.top=u(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=u(o.left,e.left),e}),te(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:se,getElementRects:async function(e){const t=this.getOffsetParent||se,n=this.getDimensions,o=await n(e.floating);return{reference:oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=X(e);return{width:t,height:n}},getScale:K,isElement:j,isRTL:function(e){return"rtl"===z(e).direction}};const ae=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=g(n),l=b(n),a="y"===x(n),c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=v(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(f="end"===l?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},ce=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=v(e,t),c={x:n,y:o},u=await A(t,a),d=x(g(r)),p=w(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=y(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=y(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o}}}}},ue=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=v(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=g(r),C=x(l),T=g(l)===l,k=await(null==a.isRTL?void 0:a.isRTL(c.floating)),R=p||(T||!m?[O(l)]:function(e){const t=O(e);return[S(e),t,S(t)]}(l)),N="none"!==h;!p&&N&&R.push(...function(e,t,n,o){const r=b(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(g(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(S)))),i}(l,m,h,k));const P=[l,...R],M=await A(t,y),j=[];let D=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&j.push(M[w]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=b(e),r=E(e),i=_(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=O(s)),[s,O(s)]}(r,s,k);j.push(M[e[0]],M[e[1]])}if(D=[...D,{placement:r,overflows:j}],!j.every((e=>e<=0))){var L,I;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(I=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=D.filter((e=>{if(N){const t=x(e.placement);return t===C||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},de=(e,t,n)=>{const o=new Map,r={platform:le,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=k(c,o,a),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:l}=e,{element:a,padding:d=0}=v(u,e)||{};if(null==a)return{};const p=C(d),f={x:t,y:n},h=E(o),m=_(h),g=await i.getDimensions(a),w="y"===h,x=w?"top":"left",S=w?"bottom":"right",O=w?"clientHeight":"clientWidth",T=r.reference[m]+r.reference[h]-f[h]-r.floating[m],k=f[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let R=A?A[O]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=s.floating[O]||r.floating[m]);const N=T/2-k/2,P=R/2-g[m]/2-1,M=c(p[x],P),j=c(p[S],P),D=M,L=R-g[m]-j,I=R/2-g[m]/2+N,F=y(D,I,L),H=!l.arrow&&null!=b(o)&&I!==F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:l},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=l&&{borderBottom:l,borderRight:l};let p=0;if(l){const e=`${l}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):de(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},ye=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ve=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},ge=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,be=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>be(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!ge(e)||!ge(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>be(e[n],t[n])))},we=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},_e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(we(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},xe="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,Ee=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Se={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Oe=(0,a.createContext)({getTooltipData:()=>Se});function Ce(e="DEFAULT_TOOLTIP_ID"){return(0,a.useContext)(Oe).getTooltipData(e)}var Te={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},ke={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ae=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:s,place:l="top",offset:d=10,events:f=["hover"],openOnClick:h=!1,positionStrategy:m="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:M,afterShow:j,afterHide:D,content:L,contentWrapperRef:I,isOpen:F,defaultIsOpen:H=!1,setIsOpen:B,activeAnchor:U,setActiveAnchor:W,border:z,opacity:V,arrowColor:q,role:$="tooltip"})=>{var X;const K=(0,a.useRef)(null),Z=(0,a.useRef)(null),J=(0,a.useRef)(null),ee=(0,a.useRef)(null),te=(0,a.useRef)(null),[ne,oe]=(0,a.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[re,ie]=(0,a.useState)(!1),[se,le]=(0,a.useState)(!1),[ae,ce]=(0,a.useState)(null),ue=(0,a.useRef)(!1),de=(0,a.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=Ce(t),ye=(0,a.useRef)(!1),[ge,we]=(0,a.useState)([]),Se=(0,a.useRef)(!1),Oe=h||f.includes("click"),Ae=Oe||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Re=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&Oe&&Object.assign(Re,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ne=k?{...k}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!k&&Oe&&Object.assign(Ne,{mouseleave:!1,blur:!1,mouseout:!1});const Pe=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Ae||!1};R&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ne,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Pe,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),xe((()=>(Se.current=!0,()=>{Se.current=!1})),[]);const Me=e=>{Se.current&&(e&&le(!0),setTimeout((()=>{Se.current&&(null==B||B(e),void 0===F&&ie(e))}),10))};(0,a.useEffect)((()=>{if(void 0===F)return()=>null;F&&le(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,a.useEffect)((()=>{if(re!==ue.current)if(Ee(te),ue.current=re,re)null==j||j();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{le(!1),ce(null),null==D||D()}),e+25)}}),[re]);const je=e=>{oe((t=>be(t,e)?t:e))},De=(e=g)=>{Ee(J),se?Me(!0):J.current=setTimeout((()=>{Me(!0)}),e)},Le=(e=b)=>{Ee(ee),ee.current=setTimeout((()=>{ye.current||Me(!1)}),e)},Ie=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void he({current:null});g?De():Me(!0),W(n),he({current:n}),Ee(ee)},Fe=()=>{E?Le(b||100):b?Le():Me(!1),Ee(J)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};me({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:l,offset:d,elementReference:o,tooltipReference:K.current,tooltipArrowReference:Z.current,strategy:m,middlewares:y,border:z}).then((e=>{je(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),de.current=n},Ue=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ge].some((e=>null==e?void 0:e.contains(n)))||(Me(!1),Ee(J)))},We=ve(Ie,50,!0),ze=ve(Fe,50,!0),Ve=e=>{ze.cancel(),We(e)},qe=()=>{We.cancel(),ze()},$e=(0,a.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:M;n?He(n):w?de.current&&He(de.current):(null==U?void 0:U.isConnected)&&me({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:l,offset:d,elementReference:U,tooltipReference:K.current,tooltipArrowReference:Z.current,strategy:m,middlewares:y,border:z}).then((e=>{Se.current&&je(e)}))}),[re,U,L,N,l,null==ae?void 0:ae.place,d,m,M,null==ae?void 0:ae.position,w]);(0,a.useEffect)((()=>{var e,t;const n=new Set(fe);ge.forEach((e=>{n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&n.add({current:o});const r=()=>{Me(!1)},s=_e(U),l=_e(K.current);Pe.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r));let a=null;Pe.resize?window.addEventListener("resize",r):U&&K.current&&(a=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,d=Y(e),f=r||i?[...d?G(d):[],...G(t)]:[];f.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=d&&l?function(e,t){let n,o=null;const r=P(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const{left:d,top:f,width:h,height:m}=e.getBoundingClientRect();if(l||t(),!h||!m)return;const y={rootMargin:-p(f)+"px "+-p(r.clientWidth-(d+h))+"px "+-p(r.clientHeight-(f+m))+"px "+-p(d)+"px",threshold:u(0,c(1,a))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==a){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(d,n):null;let m,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),d&&!a&&v.observe(d),v.observe(t));let g=a?Q(e):null;return a&&function t(){const o=Q(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==h||h(),null==(e=v)||e.disconnect(),v=null,a&&cancelAnimationFrame(m)}}(U,K.current,$e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const d=e=>{"Escape"===e.key&&Me(!1)};Pe.escape&&window.addEventListener("keydown",d),Pe.clickOutsideAnchor&&window.addEventListener("click",Ue);const f=[],h=e=>{re&&(null==e?void 0:e.target)===U||Ie(e)},m=e=>{re&&(null==e?void 0:e.target)===U&&Fe()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:Ve}):v.includes(e)&&f.push({event:e,listener:h}))})),Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:qe}):v.includes(e)&&f.push({event:e,listener:m}))})),w&&f.push({event:"pointermove",listener:Be});const g=()=>{ye.current=!0},b=()=>{ye.current=!1,Fe()};return E&&!Ae&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Pe.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r)),Pe.resize?window.removeEventListener("resize",r):null==a||a(),Pe.clickOutsideAnchor&&window.removeEventListener("click",Ue),Pe.escape&&window.removeEventListener("keydown",d),E&&!Ae&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[U,$e,se,fe,ge,T,k,A,Oe,g,b]),(0,a.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(U){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,U))&&(le(!1),Me(!1),W(null),Ee(J),Ee(ee),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&we((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,s,null==ae?void 0:ae.anchorSelect,U]),(0,a.useEffect)((()=>{$e()}),[$e]),(0,a.useEffect)((()=>{if(!(null==I?void 0:I.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>$e()))}));return e.observe(I.current),()=>{e.disconnect()}}),[L,null==I?void 0:I.current]),(0,a.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ge,t];U&&n.includes(U)||W(null!==(e=ge[0])&&void 0!==e?e:t)}),[i,ge,U]),(0,a.useEffect)((()=>(H&&Me(!0),()=>{Ee(J),Ee(ee)})),[]),(0,a.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));we(e)}catch(e){we([])}}),[t,s,null==ae?void 0:ae.anchorSelect]),(0,a.useEffect)((()=>{J.current&&(Ee(J),De(g))}),[g]);const Ge=null!==(X=null==ae?void 0:ae.content)&&void 0!==X?X:L,Xe=re&&Object.keys(ne.tooltipStyles).length>0;return(0,a.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Me(!0)},close:e=>{(null==e?void 0:e.delay)?Le(e.delay):Me(!1)},activeAnchor:U,place:ne.place,isOpen:Boolean(se&&!_&&Ge&&Xe)}))),se&&!_&&Ge?a.createElement(v,{id:t,role:$,className:pe("react-tooltip",Te.tooltip,ke.tooltip,ke[r],n,`react-tooltip__place-${ne.place}`,Te[Xe?"show":"closing"],Xe?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Te.fixed,E&&Te.clickable),onTransitionEnd:e=>{Ee(te),re||"opacity"!==e.propertyName||(le(!1),ce(null),null==D||D())},style:{...N,...ne.tooltipStyles,opacity:void 0!==V&&Xe?V:void 0},ref:K},Ge,a.createElement(v,{className:pe("react-tooltip-arrow",Te.arrow,ke.arrow,o,x&&Te.noArrow),style:{...ne.tooltipArrowStyles,background:q?`linear-gradient(to right bottom, transparent 50%, ${q} 50%)`:void 0},ref:Z})):null},Re=({content:e})=>a.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Ne=a.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:s,classNameArrow:l,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:M,defaultIsOpen:j=!1,disableStyleInjection:D=!1,border:L,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,role:W="tooltip"},z)=>{const[V,q]=(0,a.useState)(o),[$,G]=(0,a.useState)(r),[X,Y]=(0,a.useState)(u),[K,Z]=(0,a.useState)(c),[J,Q]=(0,a.useState)(d),[ee,te]=(0,a.useState)(g),[ne,oe]=(0,a.useState)(b),[re,ie]=(0,a.useState)(w),[se,le]=(0,a.useState)(_),[ae,ce]=(0,a.useState)(p),[ue,de]=(0,a.useState)(h),[fe,he]=(0,a.useState)(y),[me,ve]=(0,a.useState)(null),[ge,be]=(0,a.useState)(null),we=(0,a.useRef)(D),{anchorRefs:_e,activeAnchor:xe}=Ce(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Se=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:u)},content:e=>{q(null!=e?e:o)},html:e=>{G(null!=e?e:r)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{Q(null===e?d:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?g:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{le(null===e?_:"true"===e)},"class-name":e=>{ve(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,a.useEffect)((()=>{q(o)}),[o]),(0,a.useEffect)((()=>{G(r)}),[r]),(0,a.useEffect)((()=>{Y(u)}),[u]),(0,a.useEffect)((()=>{Z(c)}),[c]),(0,a.useEffect)((()=>{Q(d)}),[d]),(0,a.useEffect)((()=>{te(g)}),[g]),(0,a.useEffect)((()=>{oe(b)}),[b]),(0,a.useEffect)((()=>{ie(w)}),[w]),(0,a.useEffect)((()=>{le(_)}),[_]),(0,a.useEffect)((()=>{he(y)}),[y]),(0,a.useEffect)((()=>{we.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,a.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,a.useEffect)((()=>{var o;const r=new Set(_e);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const l=null!==(o=null!=ge?ge:s)&&void 0!==o?o:xe.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(l);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(l){const e=Ee(l);Se(e),a.observe(l,c)}return()=>{a.disconnect()}}),[_e,xe,ge,t,n]),(0,a.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),L&&!ye("border",`${L}`)&&console.warn(`[react-tooltip] "${L}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!ye("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Oe=f;const Te=(0,a.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||V||null,activeAnchor:ge});Oe=e?a.createElement("div",{ref:Te,className:"react-tooltip-content-wrapper"},e):null}else V&&(Oe=V);$&&(Oe=a.createElement(Re,{content:$}));const ke={forwardRef:z,id:e,anchorId:t,anchorSelect:n,className:pe(s,me),classNameArrow:l,content:Oe,contentWrapperRef:Te,place:X,variant:K,offset:J,wrapper:ae,events:ue,openOnClick:m,positionStrategy:fe,middlewares:v,delayShow:ee,delayHide:ne,float:re,hidden:se,noArrow:x,clickable:E,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:M,defaultIsOpen:j,border:L,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,activeAnchor:ge,setActiveAnchor:e=>be(e),role:W};return a.createElement(Ae,{...ke})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||he({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||he({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Pe=window.wp.i18n,Me=window.wp.components,je=window.wp.apiFetch;var De=n.n(je);const Le=window.ReactJSXRuntime,Ie=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Pe._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Pe._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Pe._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Pe._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Pe._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Pe._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Pe._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,Le.jsxs)("div",{className:"gatherpress-status__response",children:[(0,Le.jsx)("span",{className:n[e][t].icon}),(0,Le.jsx)("strong",{children:n[e][t].text})]})};function Fe(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const He=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:r,enableInitialDecline:s,maxGuestLimit:a})=>{const[c,u]=(0,o.useState)(t.status),[d,p]=(0,o.useState)(Number(t.anonymous)),[f,h]=(0,o.useState)(t.guests),[m,y]=(0,o.useState)("hidden"),[v,g]=(0,o.useState)("false"),[b,w]=(0,o.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&i().setAppElement(".gatherpress-enabled");const _=e=>{e.preventDefault(),w(!1)},x=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),De()({path:Fe("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Fe("misc.nonce")}}).then((e=>{if(e.success){u(e.status),h(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&_(t)}}))},E=e=>{switch(e){case"attending":return(0,Pe.__)("You're attending","gatherpress");case"waiting_list":return(0,Pe.__)("You're wait listed","gatherpress");case"not_attending":return(0,Pe.__)("You're not attending","gatherpress")}return(0,Pe.__)("RSVP to this event","gatherpress")},S=()=>(0,Le.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Le.jsx)("div",{className:"gatherpress-modal__header",children:(0,Pe.__)("Login Required","gatherpress")}),(0,Le.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Le.jsx)("div",{className:"gatherpress-modal__text",children:l((0,Pe.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ -(0,Pe.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,Pe._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==Fe("urls.registrationUrl")&&(0,Le.jsx)("div",{className:"gatherpress-modal__text",children:l((0,Pe.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ -(0,Pe.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,Pe._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,Le.jsx)(Me.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Le.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Le.jsx)("a",{href:"#",onClick:_,className:"gatherpress-buttons__button wp-block-button__link",children:(0,Pe.__)("Close","gatherpress")})})})]}),O=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,Pe.__)("Attend","gatherpress")):(t="not_attending",n=(0,Pe._x)("Not Attending","action of not attending","gatherpress")),(0,Le.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Le.jsx)("div",{className:"gatherpress-modal__header",children:E(c)?E(c):(0,Le.jsx)(Me.Spinner,{})}),(0,Le.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Le.jsx)("div",{className:"gatherpress-modal__text",children:l((0,Pe.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ -(0,Pe.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);h(t),x(e,c,d,t,!1)},defaultValue:f})]}),r&&(0,Le.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,Le.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);p(t),x(e,c,t,0,!1)},checked:d}),(0,Le.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,Pe.__)("Only admins will see your identity.","gatherpress"),children:(0,Pe.__)("List me as anonymous.","gatherpress")}),(0,Le.jsx)(Ne,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,Le.jsxs)(Me.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Le.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,Le.jsx)("a",{href:"#",onClick:e=>x(e,t,d,"not_attending"!==t?f:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,Le.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Le.jsx)("a",{href:"#",onClick:_,className:"gatherpress-buttons__button wp-block-button__link",children:(0,Pe.__)("Close","gatherpress")})})]}),s&&"no_status"===c&&1!==d?(0,Le.jsx)(Me.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Le.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Le.jsx)("a",{href:"#",onClick:e=>x(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,Pe._x)("Not Attending","Responded Status","gatherpress")})})}):(0,Le.jsx)(Le.Fragment,{})]})};return(0,Le.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,Le.jsxs)(Me.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Le.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Le.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":v,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(y("hidden"===m?"show":"hidden"),g("false"===v?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),w(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Pe.__)("Edit RSVP","gatherpress")}return(0,Pe.__)("RSVP","gatherpress")})(c)})}),(0,Le.jsxs)(i(),{isOpen:b,onRequestClose:_,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Pe.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,Le.jsx)(S,{}),0!==t.length&&(0,Le.jsx)(O,{status:c})]})]}),"no_status"!==c&&(0,Le.jsxs)("div",{className:"gatherpress-status",children:[(0,Le.jsx)(Ie,{type:n,status:c}),0{const e=document.querySelectorAll('[data-gatherpress_block_name="rsvp"]'),t=!0===Fe("eventDetails.hasEventPast")?"past":"upcoming";for(let n=0;n{var e={5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),s=n(6957);r(n(6957),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,o=new s.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=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])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,s.isTag)(e)}function v(e){return e.type===s.ElementType.CDATA}function g(e){return e.type===s.ElementType.Text}function b(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function _(e){return e.type===s.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?E(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?E(e.children):[];var s=new f(o);o.forEach((function(e){return e.parent=s})),n=s}else if(_(e)){o=t?E(e.children):[];var l=new h(o);o.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return s.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),l.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=a(e).querySelectorAll(p);return l.test(e)&&s.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=a(e,r).querySelector(r)).childNodes;var y}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,s=//i,l=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,r.default)(e),null,n)};var r=o(n(5496)),i=n(7731),s=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var l,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(i.includes(f)&&s.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],s=["input","select","textarea"],l={reset:!0,submit:!0};function a(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||s.returnFirstArg,u=n.library||l,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};a(g)?((0,s.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,w),y,m))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,s.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&_)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),s=n(4958),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function a(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,s.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var s=o(n(308));t.domToReact=s.default;var l=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!s.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,l)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(n(5229)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(_(),!g(i))return v("property missing ':'");var o=g(s),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(l),a}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==l){var a=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+a+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>s}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(a.returnFocus(n.props.preventScroll),a.teardownScopedFocus()):a.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(a.setupScopedFocus(n.node),a.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,s=i&&i().ownerDocument||document;r&&d.add(s.body,r),o&&d.add(s.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,s=e.children,l=n?{}:i.content,a=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(p.SafeHTMLCollection),l.default.instanceOf(p.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")}))),s=null},t.log=function(){},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=a,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=a(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){s=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function a(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,s],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(i.parentElement&&i.parentElement.removeChild(i),s.parentElement&&s.parentElement.removeChild(s))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var s in o)r(i,o[s]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=a,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",a,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",a),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",a),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",a),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],s=null,l=!1;function a(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,r.default)(s)[0]||s).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,s=t.shiftKey,l=n[0],a=n[n.length-1],c=i();if(e===c){if(!s)return;o=a}if(a!==c||s||(o=l),l===c&&s&&(o=a),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=s?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=s?a:l).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,s=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,s);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:l,SAME:a,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,a):e.replace(i,a)).replace(o,l))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n};var r=o(n(9788))},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.domReady;var t=n.n(e);const o=window.wp.element;var r=n(312),i=n.n(r),s=n(442);const l=s.default||s;var a=n(1609);const c=Math.min,u=Math.max,d=Math.round,p=Math.floor,f=e=>({x:e,y:e}),h={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function y(e,t,n){return u(e,c(t,n))}function v(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function b(e){return e.split("-")[1]}function w(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(g(e))?"y":"x"}function E(e){return w(x(e))}function S(e){return e.replace(/start|end/g,(e=>m[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>h[e]))}function C(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function k(e,t,n){let{reference:o,floating:r}=e;const i=x(t),s=E(t),l=_(s),a=g(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let f;switch(a){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(b(t)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function A(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=v(t,e),h=C(f),m=l[p?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),g="floating"===d?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},_=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:b,strategy:a}):g);return{top:(y.top-_.top+h.top)/w.y,bottom:(_.bottom-y.bottom+h.bottom)/w.y,left:(y.left-_.left+h.left)/w.x,right:(_.right-y.right+h.right)/w.x}}function R(){return"undefined"!=typeof window}function N(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return!!R()&&(e instanceof Node||e instanceof P(e).Node)}function D(e){return!!R()&&(e instanceof Element||e instanceof P(e).Element)}function L(e){return!!R()&&(e instanceof HTMLElement||e instanceof P(e).HTMLElement)}function I(e){return!(!R()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function F(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function H(e){return["table","td","th"].includes(N(e))}function B(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function U(e){const t=W(),n=D(e)?V(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function W(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function z(e){return["html","body","#document"].includes(N(e))}function V(e){return P(e).getComputedStyle(e)}function q(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||j(e);return I(t)?t.host:t}function G(e){const t=$(e);return z(t)?e.ownerDocument?e.ownerDocument.body:e.body:L(t)&&F(t)?t:G(t)}function X(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=G(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=P(r);if(i){const e=Y(s);return t.concat(s,s.visualViewport||[],F(r)?r:[],e&&n?X(e):[])}return t.concat(r,X(r,[],n))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K(e){const t=V(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=L(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,l=d(n)!==i||d(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function Z(e){return D(e)?e:e.contextElement}function J(e){const t=Z(e);if(!L(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=K(t);let s=(i?d(n.width):n.width)/o,l=(i?d(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const Q=f(0);function ee(e){const t=P(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Q}function te(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Z(e);let s=f(1);t&&(o?D(o)&&(s=J(o)):s=J(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P(e))&&t}(i,n,o)?ee(i):f(0);let a=(r.left+l.x)/s.x,c=(r.top+l.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const e=P(i),t=o&&D(o)?P(o):o;let n=e,r=Y(n);for(;r&&o&&t!==n;){const e=J(r),t=r.getBoundingClientRect(),o=V(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=s,n=P(r),r=Y(n)}}return T({width:u,height:d,x:a,y:c})}function ne(e,t){const n=q(e).scrollLeft;return t?t.left+n:te(j(e)).left+n}function oe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=P(e),o=j(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,l=0,a=0;if(r){i=r.width,s=r.height;const e=W();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:l,y:a}}(e,n);else if("document"===t)o=function(e){const t=j(e),n=q(e),o=e.ownerDocument.body,r=u(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=u(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ne(e);const l=-n.scrollTop;return"rtl"===V(o).direction&&(s+=u(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:l}}(j(e));else if(D(t))o=function(e,t){const n=te(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=L(e)?J(e):f(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=ee(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return T(o)}function re(e,t){const n=$(e);return!(n===t||!D(n)||z(n))&&("fixed"===V(n).position||re(n,t))}function ie(e,t,n){const o=L(t),r=j(t),i="fixed"===n,s=te(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=f(0);if(o||!o&&!i)if(("body"!==N(t)||F(r))&&(l=q(t)),o){const e=te(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=ne(r));let c=0,u=0;if(r&&!o&&!i){const e=r.getBoundingClientRect();u=e.top+l.scrollTop,c=e.left+l.scrollLeft-ne(r,e)}return{x:s.left+l.scrollLeft-a.x-c,y:s.top+l.scrollTop-a.y-u,width:s.width,height:s.height}}function se(e){return"static"===V(e).position}function le(e,t){if(!L(e)||"fixed"===V(e).position)return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function ae(e,t){const n=P(e);if(B(e))return n;if(!L(e)){let t=$(e);for(;t&&!z(t);){if(D(t)&&!se(t))return t;t=$(t)}return n}let o=le(e,t);for(;o&&H(o)&&se(o);)o=le(o,t);return o&&z(o)&&se(o)&&!U(o)?n:o||function(e){let t=$(e);for(;L(t)&&!z(t);){if(U(t))return t;if(B(t))return null;t=$(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=j(o),l=!!t&&B(t.floating);if(o===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=f(1);const u=f(0),d=L(o);if((d||!d&&!i)&&(("body"!==N(o)||F(s))&&(a=q(o)),L(o))){const e=te(o);c=J(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?B(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=X(e,[],!1).filter((e=>D(e)&&"body"!==N(e))),r=null;const i="fixed"===V(e).position;let s=i?$(e):e;for(;D(s)&&!z(s);){const t=V(s),n=U(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||F(s)&&!n&&re(e,s))?o=o.filter((e=>e!==s)):r=t,s=$(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],l=i.reduce(((e,n)=>{const o=oe(t,n,r);return e.top=u(o.top,e.top),e.right=c(o.right,e.right),e.bottom=c(o.bottom,e.bottom),e.left=u(o.left,e.left),e}),oe(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ae,getElementRects:async function(e){const t=this.getOffsetParent||ae,n=this.getDimensions,o=await n(e.floating);return{reference:ie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=K(e);return{width:t,height:n}},getScale:J,isElement:D,isRTL:function(e){return"rtl"===V(e).direction}};const ue=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=g(n),l=b(n),a="y"===x(n),c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=v(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(f="end"===l?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},de=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=v(e,t),c={x:n,y:o},u=await A(t,a),d=x(g(r)),p=w(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=y(f+u["y"===p?"top":"left"],f,f-u[e])}if(s){const e="y"===d?"bottom":"right";h=y(h+u["y"===d?"top":"left"],h,h-u[e])}const m=l.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[p]:i,[d]:s}}}}}},pe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=v(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const w=g(r),C=x(l),T=g(l)===l,k=await(null==a.isRTL?void 0:a.isRTL(c.floating)),R=p||(T||!m?[O(l)]:function(e){const t=O(e);return[S(e),t,S(t)]}(l)),N="none"!==h;!p&&N&&R.push(...function(e,t,n,o){const r=b(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}(g(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(S)))),i}(l,m,h,k));const P=[l,...R],j=await A(t,y),M=[];let D=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&M.push(j[w]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=b(e),r=E(e),i=_(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=O(s)),[s,O(s)]}(r,s,k);M.push(j[e[0]],j[e[1]])}if(D=[...D,{placement:r,overflows:M}],!M.every((e=>e<=0))){var L,I;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(I=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=D.filter((e=>{if(N){const t=x(e.placement);return t===C||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},fe=(e,t,n)=>{const o=new Map,r={platform:ce,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=k(c,o,a),p=o,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const a=s;return n?(a.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:s,middlewareData:l}=e,{element:a,padding:d=0}=v(u,e)||{};if(null==a)return{};const p=C(d),f={x:t,y:n},h=E(o),m=_(h),g=await i.getDimensions(a),w="y"===h,x=w?"top":"left",S=w?"bottom":"right",O=w?"clientHeight":"clientWidth",T=r.reference[m]+r.reference[h]-f[h]-r.floating[m],k=f[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let R=A?A[O]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=s.floating[O]||r.floating[m]);const N=T/2-k/2,P=R/2-g[m]/2-1,j=c(p[x],P),M=c(p[S],P),D=j,L=R-g[m]-M,I=R/2-g[m]/2+N,F=y(D,I,L),H=!l.arrow&&null!=b(o)&&I!==F&&r.reference[m]/2-(I{var r,i;const s={left:`${e}px`,top:`${t}px`,border:l},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=l&&{borderBottom:l,borderRight:l};let p=0;if(l){const e=`${l}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):fe(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},ge=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),be=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},we=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,_e=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>_e(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!we(e)||!we(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>_e(e[n],t[n])))},xe=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Ee=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(xe(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Se="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,Oe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ce={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Te=(0,a.createContext)({getTooltipData:()=>Ce});function ke(e="DEFAULT_TOOLTIP_ID"){return(0,a.useContext)(Te).getTooltipData(e)}var Ae={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Ne=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:s,place:l="top",offset:d=10,events:f=["hover"],openOnClick:h=!1,positionStrategy:m="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,afterShow:M,afterHide:D,disableTooltip:L,content:I,contentWrapperRef:F,isOpen:H,defaultIsOpen:B=!1,setIsOpen:U,activeAnchor:W,setActiveAnchor:z,border:V,opacity:q,arrowColor:$,role:G="tooltip"})=>{var Y;const K=(0,a.useRef)(null),J=(0,a.useRef)(null),Q=(0,a.useRef)(null),ee=(0,a.useRef)(null),ne=(0,a.useRef)(null),[oe,re]=(0,a.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:l}),[ie,se]=(0,a.useState)(!1),[le,ae]=(0,a.useState)(!1),[ce,ue]=(0,a.useState)(null),de=(0,a.useRef)(!1),pe=(0,a.useRef)(null),{anchorRefs:fe,setActiveAnchor:me}=ke(t),ye=(0,a.useRef)(!1),[ge,we]=(0,a.useState)([]),xe=(0,a.useRef)(!1),Ce=h||f.includes("click"),Te=Ce||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&Ce&&Object.assign(Ne,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Pe=k?{...k}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!k&&Ce&&Object.assign(Pe,{mouseleave:!1,blur:!1,mouseout:!1});const je=A?{...A}:{escape:S||!1,scroll:O||!1,resize:C||!1,clickOutsideAnchor:Te||!1};R&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(je,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Se((()=>(xe.current=!0,()=>{xe.current=!1})),[]);const Me=e=>{xe.current&&(e&&ae(!0),setTimeout((()=>{xe.current&&(null==U||U(e),void 0===H&&se(e))}),10))};(0,a.useEffect)((()=>{if(void 0===H)return()=>null;H&&ae(!0);const e=setTimeout((()=>{se(H)}),10);return()=>{clearTimeout(e)}}),[H]),(0,a.useEffect)((()=>{if(ie!==de.current)if(Oe(ne),de.current=ie,ie)null==M||M();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ne.current=setTimeout((()=>{ae(!1),ue(null),null==D||D()}),e+25)}}),[ie]);const De=e=>{re((t=>_e(t,e)?t:e))},Le=(e=g)=>{Oe(Q),le?Me(!0):Q.current=setTimeout((()=>{Me(!0)}),e)},Ie=(e=b)=>{Oe(ee),ee.current=setTimeout((()=>{ye.current||Me(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return z(null),void me({current:null});g?Le():Me(!0),z(n),me({current:n}),Oe(ee)},He=()=>{E?Ie(b||100):b?Ie():Me(!1),Oe(Q)},Be=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ve({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:l,offset:d,elementReference:o,tooltipReference:K.current,tooltipArrowReference:J.current,strategy:m,middlewares:y,border:V}).then((e=>{De(e)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),pe.current=n},We=e=>{var t;if(!ie)return;const n=e.target;n.isConnected&&((null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ge].some((e=>null==e?void 0:e.contains(n)))||(Me(!1),Oe(Q)))},ze=be(Fe,50,!0),Ve=be(He,50,!0),qe=e=>{Ve.cancel(),ze(e)},$e=()=>{ze.cancel(),Ve()},Ge=(0,a.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:P;n?Be(n):w?pe.current&&Be(pe.current):(null==W?void 0:W.isConnected)&&ve({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:l,offset:d,elementReference:W,tooltipReference:K.current,tooltipArrowReference:J.current,strategy:m,middlewares:y,border:V}).then((e=>{xe.current&&De(e)}))}),[ie,W,I,N,l,null==ce?void 0:ce.place,d,m,P,null==ce?void 0:ce.position,w]);(0,a.useEffect)((()=>{var e,t;const n=new Set(fe);ge.forEach((e=>{(null==L?void 0:L(e))||n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&!(null==L?void 0:L(o))&&n.add({current:o});const r=()=>{Me(!1)},s=Ee(W),l=Ee(K.current);je.scroll&&(window.addEventListener("scroll",r),null==s||s.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r));let a=null;je.resize?window.addEventListener("resize",r):W&&K.current&&(a=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,d=Z(e),f=r||i?[...d?X(d):[],...X(t)]:[];f.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=d&&l?function(e,t){let n,o=null;const r=j(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),i();const{left:d,top:f,width:h,height:m}=e.getBoundingClientRect();if(l||t(),!h||!m)return;const y={rootMargin:-p(f)+"px "+-p(r.clientWidth-(d+h))+"px "+-p(r.clientHeight-(f+m))+"px "+-p(d)+"px",threshold:u(0,c(1,a))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==a){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(d,n):null;let m,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),d&&!a&&v.observe(d),v.observe(t));let g=a?te(e):null;return a&&function t(){const o=te(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==h||h(),null==(e=v)||e.disconnect(),v=null,a&&cancelAnimationFrame(m)}}(W,K.current,Ge,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const d=e=>{"Escape"===e.key&&Me(!1)};je.escape&&window.addEventListener("keydown",d),je.clickOutsideAnchor&&window.addEventListener("click",We);const f=[],h=e=>{ie&&(null==e?void 0:e.target)===W||Fe(e)},m=e=>{ie&&(null==e?void 0:e.target)===W&&He()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:qe}):v.includes(e)&&f.push({event:e,listener:h}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?f.push({event:e,listener:$e}):v.includes(e)&&f.push({event:e,listener:m}))})),w&&f.push({event:"pointermove",listener:Ue});const g=()=>{ye.current=!0},b=()=>{ye.current=!1,He()};return E&&!Te&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;je.scroll&&(window.removeEventListener("scroll",r),null==s||s.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r)),je.resize?window.removeEventListener("resize",r):null==a||a(),je.clickOutsideAnchor&&window.removeEventListener("click",We),je.escape&&window.removeEventListener("keydown",d),E&&!Te&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",b)),f.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Ge,le,fe,ge,T,k,A,Ce,g,b]),(0,a.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:s)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(ae(!1),Me(!1),z(null),Oe(Q),Oe(ee),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&we((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,s,null==ce?void 0:ce.anchorSelect,W]),(0,a.useEffect)((()=>{Ge()}),[Ge]),(0,a.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ge()))}));return e.observe(F.current),()=>{e.disconnect()}}),[I,null==F?void 0:F.current]),(0,a.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ge,t];W&&n.includes(W)||z(null!==(e=ge[0])&&void 0!==e?e:t)}),[i,ge,W]),(0,a.useEffect)((()=>(B&&Me(!0),()=>{Oe(Q),Oe(ee)})),[]),(0,a.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:s;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));we(e)}catch(e){we([])}}),[t,s,null==ce?void 0:ce.anchorSelect]),(0,a.useEffect)((()=>{Q.current&&(Oe(Q),Le(g))}),[g]);const Xe=null!==(Y=null==ce?void 0:ce.content)&&void 0!==Y?Y:I,Ye=ie&&Object.keys(oe.tooltipStyles).length>0;return(0,a.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?Le(e.delay):Me(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):Me(!1)},activeAnchor:W,place:oe.place,isOpen:Boolean(le&&!_&&Xe&&Ye)}))),le&&!_&&Xe?a.createElement(v,{id:t,role:G,className:he("react-tooltip",Ae.tooltip,Re.tooltip,Re[r],n,`react-tooltip__place-${oe.place}`,Ae[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Ae.fixed,E&&Ae.clickable),onTransitionEnd:e=>{Oe(ne),ie||"opacity"!==e.propertyName||(ae(!1),ue(null),null==D||D())},style:{...N,...oe.tooltipStyles,opacity:void 0!==q&&Ye?q:void 0},ref:K},Xe,a.createElement(v,{className:he("react-tooltip-arrow",Ae.arrow,Re.arrow,o,x&&Ae.noArrow),style:{...oe.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:J})):null},Pe=({content:e})=>a.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),je=a.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:s,classNameArrow:l,variant:c="dark",place:u="top",offset:d=10,wrapper:p="div",children:f=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:_=!1,noArrow:x=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:O=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:j,defaultIsOpen:M=!1,disableStyleInjection:D=!1,border:L,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,disableTooltip:W,role:z="tooltip"},V)=>{const[q,$]=(0,a.useState)(o),[G,X]=(0,a.useState)(r),[Y,K]=(0,a.useState)(u),[Z,J]=(0,a.useState)(c),[Q,ee]=(0,a.useState)(d),[te,ne]=(0,a.useState)(g),[oe,re]=(0,a.useState)(b),[ie,se]=(0,a.useState)(w),[le,ae]=(0,a.useState)(_),[ce,ue]=(0,a.useState)(p),[de,pe]=(0,a.useState)(h),[fe,me]=(0,a.useState)(y),[ye,ve]=(0,a.useState)(null),[be,we]=(0,a.useState)(null),_e=(0,a.useRef)(D),{anchorRefs:xe,activeAnchor:Ee}=ke(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Oe=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:u)},content:e=>{$(null!=e?e:o)},html:e=>{X(null!=e?e:r)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:h)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ne(null===e?g:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{se(null===e?w:"true"===e)},hidden:e=>{ae(null===e?_:"true"===e)},"class-name":e=>{ve(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,a.useEffect)((()=>{$(o)}),[o]),(0,a.useEffect)((()=>{X(r)}),[r]),(0,a.useEffect)((()=>{K(u)}),[u]),(0,a.useEffect)((()=>{J(c)}),[c]),(0,a.useEffect)((()=>{ee(d)}),[d]),(0,a.useEffect)((()=>{ne(g)}),[g]),(0,a.useEffect)((()=>{re(b)}),[b]),(0,a.useEffect)((()=>{se(w)}),[w]),(0,a.useEffect)((()=>{ae(_)}),[_]),(0,a.useEffect)((()=>{me(y)}),[y]),(0,a.useEffect)((()=>{_e.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,a.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,a.useEffect)((()=>{var o;const r=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${t}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const l=null!==(o=null!=be?be:s)&&void 0!==o?o:Ee.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!l||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(l);Oe(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(l){const e=Se(l);Oe(e),a.observe(l,c)}return()=>{a.disconnect()}}),[xe,Ee,be,t,n]),(0,a.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),L&&!ge("border",`${L}`)&&console.warn(`[react-tooltip] "${L}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!ge("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Ce=f;const Te=(0,a.useRef)(null);if(i){const e=i({content:(null==be?void 0:be.getAttribute("data-tooltip-content"))||q||null,activeAnchor:be});Ce=e?a.createElement("div",{ref:Te,className:"react-tooltip-content-wrapper"},e):null}else q&&(Ce=q);G&&(Ce=a.createElement(Pe,{content:G}));const Ae={forwardRef:V,id:e,anchorId:t,anchorSelect:n,className:he(s,ye),classNameArrow:l,content:Ce,contentWrapperRef:Te,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:m,positionStrategy:fe,middlewares:v,delayShow:te,delayHide:oe,float:ie,hidden:le,noArrow:x,clickable:E,closeOnEsc:S,closeOnScroll:O,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:j,defaultIsOpen:M,border:L,opacity:I,arrowColor:F,setIsOpen:H,afterShow:B,afterHide:U,disableTooltip:W,activeAnchor:be,setActiveAnchor:e=>we(e),role:z};return a.createElement(Ne,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ye({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ye({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Me=window.wp.i18n,De=window.wp.components,Le=window.wp.apiFetch;var Ie=n.n(Le);const Fe=window.ReactJSXRuntime,He=({type:e="upcoming",status:t="no_status"})=>{const n={upcoming:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Me._x)("Attending","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,Me._x)("Waiting List","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Not Attending","Responded Status","gatherpress")},no_status:{icon:"",text:""}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,Me._x)("Went","Responded Status","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Didn't Go","Responded Status","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Didn't Go","Responded Status","gatherpress")},no_status:{icon:"dashicons dashicons-dismiss",text:(0,Me._x)("Didn't Go","Responded Status","gatherpress")}}};return(0,Fe.jsxs)("div",{className:"gatherpress-status__response",children:[(0,Fe.jsx)("span",{className:n[e][t].icon}),(0,Fe.jsx)("strong",{children:n[e][t].text})]})};function Be(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Ue=({postId:e,currentUser:t="",type:n,enableAnonymousRsvp:r,enableInitialDecline:s,maxGuestLimit:a})=>{const[c,u]=(0,o.useState)(t.status),[d,p]=(0,o.useState)(Number(t.anonymous)),[f,h]=(0,o.useState)(t.guests),[m,y]=(0,o.useState)("hidden"),[v,g]=(0,o.useState)("false"),[b,w]=(0,o.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&i().setAppElement(".gatherpress-enabled");const _=e=>{e.preventDefault(),w(!1)},x=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),Ie()({path:Be("urls.eventRestApi")+"/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:Be("misc.nonce")}}).then((e=>{if(e.success){u(e.status),h(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&_(t)}}))},E=e=>{switch(e){case"attending":return(0,Me.__)("You're attending","gatherpress");case"waiting_list":return(0,Me.__)("You're wait listed","gatherpress");case"not_attending":return(0,Me.__)("You're not attending","gatherpress")}return(0,Me.__)("RSVP to this event","gatherpress")},S=()=>(0,Fe.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__header",children:(0,Me.__)("Login Required","gatherpress")}),(0,Fe.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:l((0,Me.sprintf)(/* translators: %s: 'Login' (hyperlinked) */ /* translators: %s: 'Login' (hyperlinked) */ +(0,Me.__)("You must %s to RSVP to events.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t${(0,Me._x)("Login","Context: You must ~ to RSVP to events.","gatherpress")}\n\t\t\t\t\t\t\t\t`))}),""!==Be("urls.registrationUrl")&&(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:l((0,Me.sprintf)(/* translators: %s: 'Register' (hyperlinked) */ /* translators: %s: 'Register' (hyperlinked) */ +(0,Me.__)("%s if you do not have an account.","gatherpress"),`\n\t\t\t\t\t\t\t\t\t\t${(0,Me._x)("Register","Context: ~ if you do not have an account.","gatherpress")}\n\t\t\t\t\t\t\t\t\t`))})]}),(0,Fe.jsx)(De.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:_,className:"gatherpress-buttons__button wp-block-button__link",children:(0,Me.__)("Close","gatherpress")})})})]}),O=({status:e})=>{let t="",n="";return"not_attending"===e||"no_status"===e?(t="attending",n=(0,Me.__)("Attend","gatherpress")):(t="not_attending",n=(0,Me._x)("Not Attending","action of not attending","gatherpress")),(0,Fe.jsxs)("div",{className:"gatherpress-modal gatherpress-modal__rsvp",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__header",children:E(c)?E(c):(0,Fe.jsx)(De.Spinner,{})}),(0,Fe.jsxs)("div",{className:"gatherpress-modal__content",children:[(0,Fe.jsx)("div",{className:"gatherpress-modal__text",children:l((0,Me.sprintf)(/* translators: %s: button label. */ /* translators: %s: button label. */ +(0,Me.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))}),0{const t=Number(e.target.value);h(t),x(e,c,d,t,!1)},defaultValue:f})]}),r&&(0,Fe.jsxs)("div",{className:"gatherpress-modal__anonymous",children:[(0,Fe.jsx)("input",{id:"gatherpress-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);p(t),x(e,c,t,0,!1)},checked:d}),(0,Fe.jsx)("label",{htmlFor:"gatherpress-anonymous",tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-anonymous-tooltip","data-tooltip-content":(0,Me.__)("Only admins will see your identity.","gatherpress"),children:(0,Me.__)("List me as anonymous.","gatherpress")}),(0,Fe.jsx)(je,{id:"gatherpress-anonymous-tooltip"})]})]}),(0,Fe.jsxs)(De.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button is-style-outline",children:(0,Fe.jsx)("a",{href:"#",onClick:e=>x(e,t,d,"not_attending"!==t?f:0,"not_attending"===t),className:"gatherpress-buttons__button wp-block-button__link",children:n})}),(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:_,className:"gatherpress-buttons__button wp-block-button__link",children:(0,Me.__)("Close","gatherpress")})})]}),s&&"no_status"===c&&1!==d?(0,Fe.jsx)(De.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",onClick:e=>x(e,"not_attending",null),className:"gatherpress-buttons__text-link",children:(0,Me._x)("Not Attending","Responded Status","gatherpress")})})}):(0,Fe.jsx)(Fe.Fragment,{})]})};return(0,Fe.jsxs)("div",{className:"gatherpress-rsvp",children:[(0,Fe.jsxs)(De.ButtonGroup,{className:"gatherpress-buttons wp-block-buttons",children:[(0,Fe.jsx)("div",{className:"gatherpress-buttons__container wp-block-button",children:(0,Fe.jsx)("a",{href:"#",className:"gatherpress-buttons__button wp-block-button__link wp-element-button","aria-expanded":v,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(y("hidden"===m?"show":"hidden"),g("false"===v?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),w(!0)})(e),children:(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,Me.__)("Edit RSVP","gatherpress")}return(0,Me.__)("RSVP","gatherpress")})(c)})}),(0,Fe.jsxs)(i(),{isOpen:b,onRequestClose:_,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,Me.__)("Edit RSVP","gatherpress"),children:[0===t.length&&(0,Fe.jsx)(S,{}),0!==t.length&&(0,Fe.jsx)(O,{status:c})]})]}),"no_status"!==c&&(0,Fe.jsxs)("div",{className:"gatherpress-status",children:[(0,Fe.jsx)(He,{type:n,status:c}),0{const e=document.querySelectorAll('[data-gatherpress_block_name="rsvp"]'),t=!0===Be("eventDetails.hasEventPast")?"past":"upcoming";for(let n=0;n array('moment', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '48c337124ea797af392b'); + array('moment', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '71228a7012d22acde9e7'); diff --git a/build/blocks/venue/index.js b/build/blocks/venue/index.js index 8705ba9a9..89b12a6eb 100644 --- a/build/blocks/venue/index.js +++ b/build/blocks/venue/index.js @@ -1,3 +1,3 @@ -(()=>{var e,t,n,r,o,i={7701:(e,t,n)=>{"use strict";const r=window.wp.blocks,o=window.wp.i18n,i=window.wp.blockEditor,l=window.wp.components,s=window.wp.data,a=window.wp.element,c=window.ReactJSXRuntime,u=e=>{const{zoom:t,type:n,className:r,location:o,height:i}=e,l={border:0,height:i,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:o,z:t||10,t:n||"m",output:"embed"}).toString();return(0,c.jsx)("iframe",{src:s,style:l,className:r,title:o})};function d(){const e=(0,s.select)("core/editor")?.getCurrentPostType();return"gatherpress_event"===e||"gatherpress_venue"===e}function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const f=e=>{const{zoom:t=10,className:r,location:i,height:l=300,latitude:s,longitude:u}=e,[d,f]=(0,a.useState)(null),h={height:l};return(0,a.useEffect)((()=>{(async()=>{const{default:e}=await n.e(481).then(n.t.bind(n,3481,23));await n.e(535).then(n.bind(n,1535)),await n.e(272).then(n.t.bind(n,1272,17)),await n.e(980).then(n.t.bind(n,8980,17)),f(e)})()}),[]),(0,a.useEffect)((()=>{if(!d||!s||!u)return;const e=d.map("map").setView([s,u],t);return d.Icon.Default.imagePath=p("urls.pluginUrl")+"build/images/",d.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,o.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ -(0,o.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),d.marker([s,u]).addTo(e).bindPopup(i),()=>{e.remove()}}),[d,s,i,u,t]),d&&s&&u?(0,c.jsx)("div",{className:r,id:"map",style:h}):null},h=e=>{const t=(0,s.select)("core")?.canUser("create","posts"),n=Boolean((0,s.select)("core/edit-post")),{zoom:r,type:o,className:i,latitude:l,longitude:a}=e;let{location:d,height:h}=e;h||(h=300),!t||n||d||(d="660 4th Street #119 San Francisco CA 94107, USA");const m=p("settings.mapPlatform");return d&&m?"google"===m?(0,c.jsx)(u,{location:d,className:i,zoom:r,type:o,height:h}):"osm"===m?(0,c.jsx)(f,{location:d,latitude:l,longitude:a,className:i,zoom:r,height:h}):(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(c.Fragment,{})};var m=n(1609);const g=Math.min,v=Math.max,y=Math.round,b=Math.floor,w=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function E(e,t,n){return v(e,g(t,n))}function S(e,t){return"function"==typeof e?e(t):e}function T(e){return e.split("-")[0]}function k(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function O(e){return"y"===e?"height":"width"}function C(e){return["top","bottom"].includes(T(e))?"y":"x"}function j(e){return A(C(e))}function N(e){return e.replace(/start|end/g,(e=>_[e]))}function P(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function R(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function L(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function I(e,t,n){let{reference:r,floating:o}=e;const i=C(t),l=j(t),s=O(l),a=T(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(a){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(k(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function D(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=S(t,e),h=R(f),m=s[p?"floating"===d?"reference":"floating":d],g=L(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=L(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function M(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function B(e){return e instanceof Node||e instanceof F(e).Node}function H(e){return e instanceof Element||e instanceof F(e).Element}function V(e){return e instanceof HTMLElement||e instanceof F(e).HTMLElement}function W(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof F(e).ShadowRoot)}function q(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $(e){return["table","td","th"].includes(M(e))}function U(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function X(e){const t=G(),n=H(e)?K(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function G(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Y(e){return["html","body","#document"].includes(M(e))}function K(e){return F(e).getComputedStyle(e)}function Z(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||W(e)&&e.host||z(e);return W(t)?t.host:t}function Q(e){const t=J(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:V(t)&&q(t)?t:Q(t)}function ee(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Q(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=F(o);return i?t.concat(l,l.visualViewport||[],q(o)?o:[],l.frameElement&&n?ee(l.frameElement):[]):t.concat(o,ee(o,[],n))}function te(e){const t=K(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=V(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=y(n)!==i||y(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function ne(e){return H(e)?e:e.contextElement}function re(e){const t=ne(e);if(!V(t))return w(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=te(t);let l=(i?y(n.width):n.width)/r,s=(i?y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const oe=w(0);function ie(e){const t=F(e);return G()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oe}function le(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ne(e);let l=w(1);t&&(r?H(r)&&(l=re(r)):l=re(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==F(e))&&t}(i,n,r)?ie(i):w(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=F(i),t=r&&H(r)?F(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=re(o),t=o.getBoundingClientRect(),r=K(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=l,n=F(o),o=n.frameElement}}return L({width:u,height:d,x:a,y:c})}function se(e){return le(z(e)).left+Z(e).scrollLeft}function ae(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=F(e),r=z(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const e=G();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){const t=z(e),n=Z(e),r=e.ownerDocument.body,o=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+se(e);const s=-n.scrollTop;return"rtl"===K(r).direction&&(l+=v(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(z(e));else if(H(t))r=function(e,t){const n=le(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=V(e)?re(e):w(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ie(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return L(r)}function ce(e,t){const n=J(e);return!(n===t||!H(n)||Y(n))&&("fixed"===K(n).position||ce(n,t))}function ue(e,t,n){const r=V(t),o=z(t),i="fixed"===n,l=le(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=w(0);if(r||!r&&!i)if(("body"!==M(t)||q(o))&&(s=Z(t)),r){const e=le(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=se(o));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function de(e){return"static"===K(e).position}function pe(e,t){return V(e)&&"fixed"!==K(e).position?t?t(e):e.offsetParent:null}function fe(e,t){const n=F(e);if(U(e))return n;if(!V(e)){let t=J(e);for(;t&&!Y(t);){if(H(t)&&!de(t))return t;t=J(t)}return n}let r=pe(e,t);for(;r&&$(r)&&de(r);)r=pe(r,t);return r&&Y(r)&&de(r)&&!X(r)?n:r||function(e){let t=J(e);for(;V(t)&&!Y(t);){if(X(t))return t;if(U(t))return null;t=J(t)}return null}(e)||n}const he={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=z(r),s=!!t&&U(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),d=V(r);if((d||!d&&!i)&&(("body"!==M(r)||q(l))&&(a=Z(r)),V(r))){const e=le(r);c=re(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?U(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=ee(e,[],!1).filter((e=>H(e)&&"body"!==M(e))),o=null;const i="fixed"===K(e).position;let l=i?J(e):e;for(;H(l)&&!Y(l);){const t=K(l),n=X(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||q(l)&&!n&&ce(e,l))?r=r.filter((e=>e!==l)):o=t,l=J(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],s=i.reduce(((e,n)=>{const r=ae(t,n,o);return e.top=v(r.top,e.top),e.right=g(r.right,e.right),e.bottom=g(r.bottom,e.bottom),e.left=v(r.left,e.left),e}),ae(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:fe,getElementRects:async function(e){const t=this.getOffsetParent||fe,n=this.getDimensions,r=await n(e.floating);return{reference:ue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=te(e);return{width:t,height:n}},getScale:re,isElement:H,isRTL:function(e){return"rtl"===K(e).direction}};const me=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=T(n),s=k(n),a="y"===C(n),c=["left","top"].includes(l)?-1:1,u=i&&a?-1:1,d=S(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},ge=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=S(e,t),c={x:n,y:r},u=await D(t,a),d=C(T(o)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},ve=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=S(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=T(o),y=C(s),b=T(s)===s,w=await(null==a.isRTL?void 0:a.isRTL(c.floating)),x=p||(b||!m?[P(s)]:function(e){const t=P(e);return[N(e),t,N(t)]}(s)),_="none"!==h;!p&&_&&x.push(...function(e,t,n,r){const o=k(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(T(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(N)))),i}(s,m,h,w));const E=[s,...x],A=await D(t,g),R=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&R.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=k(e),o=j(e),i=O(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=P(l)),[l,P(l)]}(o,l,w);R.push(A[e[0]],A[e[1]])}if(L=[...L,{placement:o,overflows:R}],!R.every((e=>e<=0))){var I,M;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(M=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(_){const t=C(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},ye=(e,t,n)=>{const r=new Map,o={platform:he,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=I(c,r,a),p=r,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:s}=e,{element:a,padding:u=0}=S(c,e)||{};if(null==a)return{};const d=R(u),p={x:t,y:n},f=j(r),h=O(f),m=await i.getDimensions(a),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],_=p[f]-o.reference[f],T=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let A=T?T[w]:0;A&&await(null==i.isElement?void 0:i.isElement(T))||(A=l.floating[w]||o.floating[h]);const C=x/2-_/2,N=A/2-m[h]/2-1,P=g(d[y],N),L=g(d[b],N),I=P,D=A-m[h]-L,M=A/2-m[h]/2+C,F=E(I,M,D),z=!s.arrow&&null!=k(r)&&M!==F&&o.reference[h]/2-(M{var o,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let p=0;if(s){const e=`${s}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):ye(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Ee=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Se=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},Te=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ke=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ke(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Te(e)||!Te(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>ke(e[n],t[n])))},Ae=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Oe=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ae(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ce="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,je=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ne={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Pe=(0,m.createContext)({getTooltipData:()=>Ne});function Re(e="DEFAULT_TOOLTIP_ID"){return(0,m.useContext)(Pe).getTooltipData(e)}var Le={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Ie={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const De=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:s="top",offset:a=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:d="absolute",middlewares:p,wrapper:f,delayShow:h=0,delayHide:y=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j,style:N,position:P,afterShow:R,afterHide:L,content:I,contentWrapperRef:D,isOpen:M,defaultIsOpen:F=!1,setIsOpen:B,activeAnchor:H,setActiveAnchor:V,border:W,opacity:q,arrowColor:$,role:U="tooltip"})=>{var X;const G=(0,m.useRef)(null),Y=(0,m.useRef)(null),K=(0,m.useRef)(null),Z=(0,m.useRef)(null),J=(0,m.useRef)(null),[Q,te]=(0,m.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[re,oe]=(0,m.useState)(!1),[ie,se]=(0,m.useState)(!1),[ae,ce]=(0,m.useState)(null),ue=(0,m.useRef)(!1),de=(0,m.useRef)(null),{anchorRefs:pe,setActiveAnchor:fe}=Re(t),he=(0,m.useRef)(!1),[me,ge]=(0,m.useState)([]),ve=(0,m.useRef)(!1),ye=u||c.includes("click"),we=ye||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),xe=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&ye&&Object.assign(xe,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ee=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&ye&&Object.assign(Ee,{mouseleave:!1,blur:!1,mouseout:!1});const Te=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:we||!1};j&&(Object.assign(xe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ee,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Te,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ce((()=>(ve.current=!0,()=>{ve.current=!1})),[]);const Ae=e=>{ve.current&&(e&&se(!0),setTimeout((()=>{ve.current&&(null==B||B(e),void 0===M&&oe(e))}),10))};(0,m.useEffect)((()=>{if(void 0===M)return()=>null;M&&se(!0);const e=setTimeout((()=>{oe(M)}),10);return()=>{clearTimeout(e)}}),[M]),(0,m.useEffect)((()=>{if(re!==ue.current)if(je(J),ue.current=re,re)null==R||R();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();J.current=setTimeout((()=>{se(!1),ce(null),null==L||L()}),e+25)}}),[re]);const Ne=e=>{te((t=>ke(t,e)?t:e))},Pe=(e=h)=>{je(K),ie?Ae(!0):K.current=setTimeout((()=>{Ae(!0)}),e)},De=(e=y)=>{je(Z),Z.current=setTimeout((()=>{he.current||Ae(!1)}),e)},Me=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return V(null),void fe({current:null});h?Pe():Ae(!0),V(n),fe({current:n}),je(Z)},Fe=()=>{E?De(y||100):y?De():Ae(!1),je(K)},ze=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};_e({place:null!==(n=null==ae?void 0:ae.place)&&void 0!==n?n:s,offset:a,elementReference:r,tooltipReference:G.current,tooltipArrowReference:Y.current,strategy:d,middlewares:p,border:W}).then((e=>{Ne(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ze(n),de.current=n},He=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...me].some((e=>null==e?void 0:e.contains(n)))||(Ae(!1),je(K)))},Ve=Se(Me,50,!0),We=Se(Fe,50,!0),qe=e=>{We.cancel(),Ve(e)},$e=()=>{Ve.cancel(),We()},Ue=(0,m.useCallback)((()=>{var e,t;const n=null!==(e=null==ae?void 0:ae.position)&&void 0!==e?e:P;n?ze(n):w?de.current&&ze(de.current):(null==H?void 0:H.isConnected)&&_e({place:null!==(t=null==ae?void 0:ae.place)&&void 0!==t?t:s,offset:a,elementReference:H,tooltipReference:G.current,tooltipArrowReference:Y.current,strategy:d,middlewares:p,border:W}).then((e=>{ve.current&&Ne(e)}))}),[re,H,I,N,s,null==ae?void 0:ae.place,a,d,P,null==ae?void 0:ae.position,w]);(0,m.useEffect)((()=>{var e,t;const n=new Set(pe);me.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r});const o=()=>{Ae(!1)},l=Oe(H),s=Oe(G.current);Te.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==s||s.addEventListener("scroll",o));let a=null;Te.resize?window.addEventListener("resize",o):H&&G.current&&(a=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=ne(e),u=o||i?[...c?ee(c):[],...ee(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=z(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-b(u)+"px "+-b(o.clientWidth-(c+d))+"px "+-b(o.clientHeight-(u+p))+"px "+-b(c)+"px",threshold:v(0,g(1,a))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==a){if(!h)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;l&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!a&&h.observe(c),h.observe(t));let m=a?le(e):null;return a&&function t(){const r=le(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(p)}}(H,G.current,Ue,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ae(!1)};Te.escape&&window.addEventListener("keydown",c),Te.clickOutsideAnchor&&window.addEventListener("click",He);const u=[],d=e=>{re&&(null==e?void 0:e.target)===H||Me(e)},p=e=>{re&&(null==e?void 0:e.target)===H&&Fe()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(xe).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:qe}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ee).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:$e}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:Be});const m=()=>{he.current=!0},y=()=>{he.current=!1,Fe()};return E&&!we&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Te.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==s||s.removeEventListener("scroll",o)),Te.resize?window.removeEventListener("resize",o):null==a||a(),Te.clickOutsideAnchor&&window.removeEventListener("click",He),Te.escape&&window.removeEventListener("keydown",c),E&&!we&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[H,Ue,ie,pe,me,A,O,C,ye,h,y]),(0,m.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(H){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,H))&&(se(!1),Ae(!1),V(null),je(K),je(Z),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ge((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==ae?void 0:ae.anchorSelect,H]),(0,m.useEffect)((()=>{Ue()}),[Ue]),(0,m.useEffect)((()=>{if(!(null==D?void 0:D.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ue()))}));return e.observe(D.current),()=>{e.disconnect()}}),[I,null==D?void 0:D.current]),(0,m.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...me,t];H&&n.includes(H)||V(null!==(e=me[0])&&void 0!==e?e:t)}),[i,me,H]),(0,m.useEffect)((()=>(F&&Ae(!0),()=>{je(K),je(Z)})),[]),(0,m.useEffect)((()=>{var e;let n=null!==(e=null==ae?void 0:ae.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,l,null==ae?void 0:ae.anchorSelect]),(0,m.useEffect)((()=>{K.current&&(je(K),Pe(h))}),[h]);const Xe=null!==(X=null==ae?void 0:ae.content)&&void 0!==X?X:I,Ge=re&&Object.keys(Q.tooltipStyles).length>0;return(0,m.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):Ae(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):Ae(!1)},activeAnchor:H,place:Q.place,isOpen:Boolean(ie&&!x&&Xe&&Ge)}))),ie&&!x&&Xe?m.createElement(f,{id:t,role:U,className:be("react-tooltip",Le.tooltip,Ie.tooltip,Ie[o],n,`react-tooltip__place-${Q.place}`,Le[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===d&&Le.fixed,E&&Le.clickable),onTransitionEnd:e=>{je(J),re||"opacity"!==e.propertyName||(se(!1),ce(null),null==L||L())},style:{...N,...Q.tooltipStyles,opacity:void 0!==q&&Ge?q:void 0},ref:G},Xe,m.createElement(f,{className:be("react-tooltip-arrow",Le.arrow,Ie.arrow,r,_&&Le.noArrow),style:{...Q.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:Y})):null},Me=({content:e})=>m.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Fe=m.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:s,variant:a="dark",place:c="top",offset:u=10,wrapper:d="div",children:p=null,events:f=["hover"],openOnClick:h=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j=!1,style:N,position:P,isOpen:R,defaultIsOpen:L=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,role:V="tooltip"},W)=>{const[q,$]=(0,m.useState)(r),[U,X]=(0,m.useState)(o),[G,Y]=(0,m.useState)(c),[K,Z]=(0,m.useState)(a),[J,Q]=(0,m.useState)(u),[ee,te]=(0,m.useState)(y),[ne,re]=(0,m.useState)(b),[oe,ie]=(0,m.useState)(w),[le,se]=(0,m.useState)(x),[ae,ce]=(0,m.useState)(d),[ue,de]=(0,m.useState)(f),[pe,fe]=(0,m.useState)(g),[he,me]=(0,m.useState)(null),[ge,ve]=(0,m.useState)(null),ye=(0,m.useRef)(I),{anchorRefs:we,activeAnchor:xe}=Re(e),_e=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Se=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:r)},html:e=>{X(null!=e?e:o)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{Q(null===e?u:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:d)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:f)},"position-strategy":e=>{var t;fe(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{te(null===e?y:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{se(null===e?x:"true"===e)},"class-name":e=>{me(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,m.useEffect)((()=>{$(r)}),[r]),(0,m.useEffect)((()=>{X(o)}),[o]),(0,m.useEffect)((()=>{Y(c)}),[c]),(0,m.useEffect)((()=>{Z(a)}),[a]),(0,m.useEffect)((()=>{Q(u)}),[u]),(0,m.useEffect)((()=>{te(y)}),[y]),(0,m.useEffect)((()=>{re(b)}),[b]),(0,m.useEffect)((()=>{ie(w)}),[w]),(0,m.useEffect)((()=>{se(x)}),[x]),(0,m.useEffect)((()=>{fe(g)}),[g]),(0,m.useEffect)((()=>{ye.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,m.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,m.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const s=null!==(r=null!=ge?ge:l)&&void 0!==r?r:xe.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=_e(s);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(s){const e=_e(s);Se(e),a.observe(s,c)}return()=>{a.disconnect()}}),[we,xe,ge,t,n]),(0,m.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Ee("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Ee("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Te=p;const ke=(0,m.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||q||null,activeAnchor:ge});Te=e?m.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else q&&(Te=q);U&&(Te=m.createElement(Me,{content:U}));const Ae={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:be(l,he),classNameArrow:s,content:Te,contentWrapperRef:ke,place:G,variant:K,offset:J,wrapper:ae,events:ue,openOnClick:h,positionStrategy:pe,middlewares:v,delayShow:ee,delayHide:ne,float:oe,hidden:le,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j,style:N,position:P,isOpen:R,defaultIsOpen:L,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,activeAnchor:ge,setActiveAnchor:e=>ve(e),role:V};return m.createElement(De,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||xe({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||xe({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const ze=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const o=new CustomEvent(e,{detail:r});dispatchEvent(o)}},Be=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}},He=({onlineEventLinkDefault:e=""})=>{const t=(0,o.__)("Online event","gatherpress"),[n,r]=(0,a.useState)(e);return Be({setOnlineEventLink:r},p("eventDetails.postId")),(0,c.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,c.jsx)(l.FlexItem,{display:"flex",children:(0,c.jsx)(l.Icon,{icon:"video-alt2"})}),(0,c.jsxs)(l.FlexItem,{children:[!n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,o.__)("Link available for attendees only.","gatherpress"),children:t}),(0,c.jsx)(Fe,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,c.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};var Ve=n(442);const We=Ve.default||Ve,qe=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,c.jsxs)(c.Fragment,{children:[(e||t)&&(0,c.jsxs)(l.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"location"})}),(0,c.jsxs)(l.FlexItem,{children:[e&&(0,c.jsx)("div",{className:"gatherpress-venue__name",children:(0,c.jsx)("strong",{children:We(e)})}),t&&(0,c.jsx)("div",{className:"gatherpress-venue__full-address",children:We(t)})]})]}),(n||r)&&(0,c.jsxs)(l.Flex,{justify:"normal",gap:"8",children:[n&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"phone"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"admin-site-alt3"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__website",children:(0,c.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),$e=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:o=!1,onlineEventLink:i=""})=>(0,c.jsxs)(c.Fragment,{children:[!o&&(0,c.jsx)(qe,{name:e,fullAddress:t,phoneNumber:n,website:r}),o&&(0,c.jsx)(He,{onlineEventLinkDefault:i})]}),Ue=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,c.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,c.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})};function Xe(){return"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()}const Ge=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(""),[i,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(""),[f,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),x=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:_}=(0,s.useDispatch)("core/editor"),E=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),S=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",E))),T=S?.slug.replace(/^_/,""),[k,A]=(0,a.useState)(""),O=E+":"+k,C=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:k})));(0,a.useEffect)((()=>{var e,n,i,l,s,a;let c={};if(k&&Array.isArray(C)){var d;const e=null!==(d=C[0]?.meta?.gatherpress_venue_information)&&void 0!==d?d:"{}";var f;e&&(c=JSON.parse(e),c.name=null!==(f=C[0]?.title.rendered)&&void 0!==f?f:"")}const h=null!==(e=c?.name)&&void 0!==e?e:(0,o.__)("No venue selected.","gatherpress"),m=null!==(n=c?.fullAddress)&&void 0!==n?n:"",v=null!==(i=c?.phoneNumber)&&void 0!==i?i:"",b=null!==(l=c?.website)&&void 0!==l?l:"",x=null!==(s=c?.latitude)&&void 0!==s?s:"0",_=null!==(a=c?.longitude)&&void 0!==a?a:"0";T&&A(T),w(O?String(O):""),t(h),r(m),u(v),p(b),g(x),y(_),ze({setName:h,setFullAddress:m,setPhoneNumber:v,setWebsite:b,setLatitude:x,setLongitude:_,setIsOnlineEventTerm:"online-event"===k})}),[k,C,T,O]);let j=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return j?(j=j.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),j.unshift({value:":",label:(0,o.__)("Choose a venue","gatherpress")})):j=[],(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.SelectControl,{label:(0,o.__)("Venue Selector","gatherpress"),value:b,onChange:e=>{(e=>{w(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];x({_gatherpress_venue:t}),A(e[1]),_()})(e)},options:j})})},Ye=window.wp.compose,Ke=()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,i=e=>{const t=JSON.stringify({...u,...e});r({meta:{gatherpress_venue_information:t}})};let u=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));u=u?JSON.parse(u):{};const[d,p]=(0,a.useState)(null!==(e=u.fullAddress)&&void 0!==e?e:""),[f,h]=(0,a.useState)(null!==(t=u.phoneNumber)&&void 0!==t?t:""),[m,g]=(0,a.useState)(null!==(n=u.website)&&void 0!==n?n:"");Be({setFullAddress:p,setPhoneNumber:h,setWebsite:g});const v=(0,a.useRef)(i),y=(0,a.useCallback)((()=>{let e=null,t=null;fetch(`https://nominatim.openstreetmap.org/search?q=${d}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,o.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,o.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((n=>{n.features.length>0&&(e=n.features[0].geometry.coordinates[1],t=n.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:t})}))}),[d]),b=(0,Ye.useDebounce)(y,300);return(0,a.useEffect)((()=>{v.current=i}),[i]),(0,a.useEffect)((()=>{b()}),[d,b]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.TextControl,{label:(0,o.__)("Full Address","gatherpress"),value:d,onChange:e=>{ze({setFullAddress:e}),i({fullAddress:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Phone Number","gatherpress"),value:f,onChange:e=>{ze({setPhoneNumber:e}),i({phoneNumber:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Website","gatherpress"),value:m,type:"url",onChange:e=>{ze({setWebsite:e}),i({website:e})}})]})},Ze=()=>(0,c.jsx)("section",{children:(0,c.jsx)(Ke,{})}),Je=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[r,i]=(0,a.useState)(n);return Be({setOnlineEventLink:i},p("eventDetails.postId")),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Online event link","gatherpress"),value:r,placeholder:(0,o.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),i(n),ze({setOnlineEventLink:n},p("eventDetails.postId")),t()})(n)}})},Qe=window.moment;var et=n.n(Qe);window.wp.date;const tt="YYYY-MM-DD HH:mm:ss",nt=et().tz(rt()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(tt);function rt(e=p("eventDetails.dateTime.timezone")){return et().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}et().tz(nt,rt()).add(2,"hours").format(tt),(0,o.__)("1 hour","gatherpress"),(0,o.__)("1.5 hours","gatherpress"),(0,o.__)("2 hours","gatherpress"),(0,o.__)("3 hours","gatherpress"),(0,o.__)("Set an end time…","gatherpress");const ot=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.1.0","title":"Venue","category":"gatherpress","icon":"location","example":{},"description":"Provides information about an event venue.","attributes":{"mapShow":{"type":"boolean","default":true},"mapAlign":{"type":"string","default":""},"mapZoomLevel":{"type":"number","default":10},"mapType":{"type":"string","default":"m"},"mapHeight":{"type":"number","default":300}},"supports":{"align":["wide"],"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./venue.js","viewStyle":"file:./venue.css","render":"file:./render.php"}');(0,r.registerBlockType)(ot,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapZoomLevel:r,mapType:u,mapHeight:f}=e,[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[x,_]=(0,a.useState)(""),[E,S]=(0,a.useState)(""),[T,k]=(0,a.useState)(""),[A,O]=(0,a.useState)(!1),C=(0,i.useBlockProps)(),j=p("settings.mapPlatform"),N=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));let{mapShow:P}=e,R=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_venue_information));return R=R?JSON.parse(R):{},P&&v&&(P=!0),P&&!d()&&(P=!0),Be({setName:g,setFullAddress:y,setPhoneNumber:S,setWebsite:k,setIsOnlineEventTerm:O,setLatitude:w,setLongitude:_}),(0,a.useEffect)((()=>{Xe()&&(y(R.fullAddress),S(R.phoneNumber),k(R.website),w(R.latitude),_(R.longitude),g(v||E||T?"":(0,o.__)("Add venue information.","gatherpress"))),"gatherpress_event"!==(0,s.select)("core/editor")?.getCurrentPostType()&&d()||g(v||E||T?"":(0,o.__)("No venue selected.","gatherpress"))}),[R.fullAddress,R.phoneNumber,R.website,R.latitude,R.longitude,v,E,T,b,x]),(0,a.useEffect)((()=>{const e=new Event("resize");window.dispatchEvent(e)}),[f]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(i.InspectorControls,{children:[d()&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Venue settings","gatherpress"),initialOpen:!0,children:[(0,c.jsxs)(l.PanelRow,{children:[!Xe()&&(0,c.jsx)(Ge,{}),Xe()&&(0,c.jsx)(Ze,{})]}),A&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(Je,{})})]}),!A&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Map settings","gatherpress"),initialOpen:!0,children:[(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Show map on venue","gatherpress")}),(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:P?(0,o.__)("Display the map","gatherpress"):(0,o.__)("Hide the map","gatherpress"),checked:P,onChange:e=>{t({mapShow:e})}})}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Zoom level","gatherpress"),beforeIcon:"search",value:r,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),"google"===j&&(0,c.jsx)(l.RadioControl,{label:(0,o.__)("Map type","gatherpress"),selected:u,options:[{label:(0,o.__)("Roadmap","gatherpress"),value:"m"},{label:(0,o.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3})]})]}),(0,c.jsx)("div",{...C,children:(0,c.jsx)(Ue,{isSelected:n,children:(0,c.jsxs)("div",{className:"gatherpress-venue",children:[(0,c.jsx)($e,{name:m,fullAddress:v,phoneNumber:E,website:T,isOnlineEventTerm:A,onlineEventLink:N}),P&&!A&&(0,c.jsx)(h,{location:v,latitude:b,longitude:x,zoom:r,type:u,height:f})]})})})]})},save:()=>{}})},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function y(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function _(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?E(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?E(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return _(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return l.test(e)||null===(t=null==(g=h.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=h.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),h.querySelectorAll(n);case r:case o:var m=a(e).querySelectorAll(p);return s.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(g=a(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,s=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],s={reset:!0,submit:!0};function a(e){return r.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),r.push(c(v,g,m));continue}}if("text"!==g.type){var y=g,b={};a(y)?((0,l.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(p(g.name,b,w),g,m))}else{var x=!g.data.trim().length;if(x&&g.parent&&!(0,l.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&x)continue;r.push(c(g.data,g,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var s=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function _(){var e=h(),n=y(o);if(n){if(x(),!y(i))return v("property missing ':'");var r=y(l),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),a}}return b(),function(){var e,t=[];for(w(t);e=_();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:a,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,a):e.replace(i,a)).replace(r,s))}},1133:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(9788));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(s.O).every((e=>s.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".js",s.miniCssF=e=>e+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="gatherpress:",s.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var l,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),a&&document.head.appendChild(l)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={908:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{535:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,s=n&&n.target&&n.target.href||t,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+s+")");a.name="ChunkLoadError",a.code="CSS_CHUNK_LOAD_FAILED",a.type=l,a.request=s,i.parentNode&&i.parentNode.removeChild(i),o(a)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={908:0,812:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(812!=t){var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),l=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+t,t)}else e[t]=0},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,l,a]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in l)s.o(l,r)&&(s.m[r]=l[r]);if(a)var u=a(s)}for(t&&t(n);cs(7701)));a=s.O(a)})(); \ No newline at end of file +(()=>{var e,t,n,r,o,i={7701:(e,t,n)=>{"use strict";const r=window.wp.blocks,o=window.wp.i18n,i=window.wp.blockEditor,l=window.wp.components,s=window.wp.data,a=window.wp.element,c=window.ReactJSXRuntime,u=e=>{const{zoom:t,type:n,className:r,location:o,height:i}=e,l={border:0,height:i,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:o,z:t||10,t:n||"m",output:"embed"}).toString();return(0,c.jsx)("iframe",{src:s,style:l,className:r,title:o})};function d(){const e=(0,s.select)("core/editor")?.getCurrentPostType();return"gatherpress_event"===e||"gatherpress_venue"===e}function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const f=e=>{const{zoom:t=10,className:r,location:i,height:l=300,latitude:s,longitude:u}=e,[d,f]=(0,a.useState)(null),h={height:l};return(0,a.useEffect)((()=>{(async()=>{const{default:e}=await n.e(481).then(n.t.bind(n,3481,23));await n.e(567).then(n.bind(n,5567)),await n.e(272).then(n.t.bind(n,1272,17)),await n.e(980).then(n.t.bind(n,8980,17)),f(e)})()}),[]),(0,a.useEffect)((()=>{if(!d||!s||!u)return;const e=d.map("map").setView([s,u],t);return d.Icon.Default.imagePath=p("urls.pluginUrl")+"build/images/",d.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,o.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ +(0,o.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),d.marker([s,u]).addTo(e).bindPopup(i),()=>{e.remove()}}),[d,s,i,u,t]),d&&s&&u?(0,c.jsx)("div",{className:r,id:"map",style:h}):null},h=e=>{const t=(0,s.select)("core")?.canUser("create","posts"),n=Boolean((0,s.select)("core/edit-post")),{zoom:r,type:o,className:i,latitude:l,longitude:a}=e;let{location:d,height:h}=e;h||(h=300),!t||n||d||(d="660 4th Street #119 San Francisco CA 94107, USA");const m=p("settings.mapPlatform");return d&&m?"google"===m?(0,c.jsx)(u,{location:d,className:i,zoom:r,type:o,height:h}):"osm"===m?(0,c.jsx)(f,{location:d,latitude:l,longitude:a,className:i,zoom:r,height:h}):(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(c.Fragment,{})};var m=n(1609);const g=Math.min,v=Math.max,y=Math.round,b=Math.floor,w=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function E(e,t,n){return v(e,g(t,n))}function S(e,t){return"function"==typeof e?e(t):e}function T(e){return e.split("-")[0]}function k(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function O(e){return"y"===e?"height":"width"}function C(e){return["top","bottom"].includes(T(e))?"y":"x"}function j(e){return A(C(e))}function N(e){return e.replace(/start|end/g,(e=>_[e]))}function P(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function R(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function L(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function I(e,t,n){let{reference:r,floating:o}=e;const i=C(t),l=j(t),s=O(l),a=T(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(a){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(k(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function D(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=S(t,e),h=R(f),m=s[p?"floating"===d?"reference":"floating":d],g=L(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=L(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function M(){return"undefined"!=typeof window}function F(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function B(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return!!M()&&(e instanceof Node||e instanceof z(e).Node)}function V(e){return!!M()&&(e instanceof Element||e instanceof z(e).Element)}function W(e){return!!M()&&(e instanceof HTMLElement||e instanceof z(e).HTMLElement)}function q(e){return!(!M()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof z(e).ShadowRoot)}function $(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function U(e){return["table","td","th"].includes(F(e))}function X(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function G(e){const t=Y(),n=V(e)?Z(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function K(e){return["html","body","#document"].includes(F(e))}function Z(e){return z(e).getComputedStyle(e)}function J(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if("html"===F(e))return e;const t=e.assignedSlot||e.parentNode||q(e)&&e.host||B(e);return q(t)?t.host:t}function ee(e){const t=Q(e);return K(t)?e.ownerDocument?e.ownerDocument.body:e.body:W(t)&&$(t)?t:ee(t)}function te(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ee(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=z(o);if(i){const e=ne(l);return t.concat(l,l.visualViewport||[],$(o)?o:[],e&&n?te(e):[])}return t.concat(o,te(o,[],n))}function ne(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function re(e){const t=Z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=W(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=y(n)!==i||y(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function oe(e){return V(e)?e:e.contextElement}function ie(e){const t=oe(e);if(!W(t))return w(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=re(t);let l=(i?y(n.width):n.width)/r,s=(i?y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const le=w(0);function se(e){const t=z(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ae(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=oe(e);let l=w(1);t&&(r?V(r)&&(l=ie(r)):l=ie(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==z(e))&&t}(i,n,r)?se(i):w(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=z(i),t=r&&V(r)?z(r):r;let n=e,o=ne(n);for(;o&&r&&t!==n;){const e=ie(o),t=o.getBoundingClientRect(),r=Z(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=l,n=z(o),o=ne(n)}}return L({width:u,height:d,x:a,y:c})}function ce(e,t){const n=J(e).scrollLeft;return t?t.left+n:ae(B(e)).left+n}function ue(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=z(e),r=B(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const e=Y();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){const t=B(e),n=J(e),r=e.ownerDocument.body,o=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ce(e);const s=-n.scrollTop;return"rtl"===Z(r).direction&&(l+=v(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(B(e));else if(V(t))r=function(e,t){const n=ae(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=W(e)?ie(e):w(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=se(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return L(r)}function de(e,t){const n=Q(e);return!(n===t||!V(n)||K(n))&&("fixed"===Z(n).position||de(n,t))}function pe(e,t,n){const r=W(t),o=B(t),i="fixed"===n,l=ae(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=w(0);if(r||!r&&!i)if(("body"!==F(t)||$(o))&&(s=J(t)),r){const e=ae(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ce(o));let c=0,u=0;if(o&&!r&&!i){const e=o.getBoundingClientRect();u=e.top+s.scrollTop,c=e.left+s.scrollLeft-ce(o,e)}return{x:l.left+s.scrollLeft-a.x-c,y:l.top+s.scrollTop-a.y-u,width:l.width,height:l.height}}function fe(e){return"static"===Z(e).position}function he(e,t){if(!W(e)||"fixed"===Z(e).position)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function me(e,t){const n=z(e);if(X(e))return n;if(!W(e)){let t=Q(e);for(;t&&!K(t);){if(V(t)&&!fe(t))return t;t=Q(t)}return n}let r=he(e,t);for(;r&&U(r)&&fe(r);)r=he(r,t);return r&&K(r)&&fe(r)&&!G(r)?n:r||function(e){let t=Q(e);for(;W(t)&&!K(t);){if(G(t))return t;if(X(t))return null;t=Q(t)}return null}(e)||n}const ge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=B(r),s=!!t&&X(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),d=W(r);if((d||!d&&!i)&&(("body"!==F(r)||$(l))&&(a=J(r)),W(r))){const e=ae(r);c=ie(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:B,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?X(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=te(e,[],!1).filter((e=>V(e)&&"body"!==F(e))),o=null;const i="fixed"===Z(e).position;let l=i?Q(e):e;for(;V(l)&&!K(l);){const t=Z(l),n=G(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||$(l)&&!n&&de(e,l))?r=r.filter((e=>e!==l)):o=t,l=Q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],s=i.reduce(((e,n)=>{const r=ue(t,n,o);return e.top=v(r.top,e.top),e.right=g(r.right,e.right),e.bottom=g(r.bottom,e.bottom),e.left=v(r.left,e.left),e}),ue(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:me,getElementRects:async function(e){const t=this.getOffsetParent||me,n=this.getDimensions,r=await n(e.floating);return{reference:pe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=re(e);return{width:t,height:n}},getScale:ie,isElement:V,isRTL:function(e){return"rtl"===Z(e).direction}};const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=T(n),s=k(n),a="y"===C(n),c=["left","top"].includes(l)?-1:1,u=i&&a?-1:1,d=S(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},ye=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=S(e,t),c={x:n,y:r},u=await D(t,a),d=C(T(o)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:l}}}}}},be=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=S(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=T(o),y=C(s),b=T(s)===s,w=await(null==a.isRTL?void 0:a.isRTL(c.floating)),x=p||(b||!m?[P(s)]:function(e){const t=P(e);return[N(e),t,N(t)]}(s)),_="none"!==h;!p&&_&&x.push(...function(e,t,n,r){const o=k(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(T(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(N)))),i}(s,m,h,w));const E=[s,...x],A=await D(t,g),R=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&R.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=k(e),o=j(e),i=O(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=P(l)),[l,P(l)]}(o,l,w);R.push(A[e[0]],A[e[1]])}if(L=[...L,{placement:o,overflows:R}],!R.every((e=>e<=0))){var I,M;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(M=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=L.filter((e=>{if(_){const t=C(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},we=(e,t,n)=>{const r=new Map,o={platform:ge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=I(c,r,a),p=r,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:s}=e,{element:a,padding:u=0}=S(c,e)||{};if(null==a)return{};const d=R(u),p={x:t,y:n},f=j(r),h=O(f),m=await i.getDimensions(a),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],_=p[f]-o.reference[f],T=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let A=T?T[w]:0;A&&await(null==i.isElement?void 0:i.isElement(T))||(A=l.floating[w]||o.floating[h]);const C=x/2-_/2,N=A/2-m[h]/2-1,P=g(d[y],N),L=g(d[b],N),I=P,D=A-m[h]-L,M=A/2-m[h]/2+C,F=E(I,M,D),z=!s.arrow&&null!=k(r)&&M!==F&&o.reference[h]/2-(M{var o,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let p=0;if(s){const e=`${s}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):we(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Te=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},Ae=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Oe=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Oe(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Ae(e)||!Ae(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Oe(e[n],t[n])))},Ce=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},je=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Ce(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ne="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,Pe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Re={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Le=(0,m.createContext)({getTooltipData:()=>Re});function Ie(e="DEFAULT_TOOLTIP_ID"){return(0,m.useContext)(Le).getTooltipData(e)}var De={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Me={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Fe=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:s="top",offset:a=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:d="absolute",middlewares:p,wrapper:f,delayShow:h=0,delayHide:y=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j,style:N,position:P,afterShow:R,afterHide:L,disableTooltip:I,content:D,contentWrapperRef:M,isOpen:F,defaultIsOpen:z=!1,setIsOpen:H,activeAnchor:V,setActiveAnchor:W,border:q,opacity:$,arrowColor:U,role:X="tooltip"})=>{var G;const Y=(0,m.useRef)(null),K=(0,m.useRef)(null),Z=(0,m.useRef)(null),J=(0,m.useRef)(null),Q=(0,m.useRef)(null),[ee,ne]=(0,m.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[re,ie]=(0,m.useState)(!1),[le,se]=(0,m.useState)(!1),[ce,ue]=(0,m.useState)(null),de=(0,m.useRef)(!1),pe=(0,m.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=Ie(t),me=(0,m.useRef)(!1),[ge,ve]=(0,m.useState)([]),ye=(0,m.useRef)(!1),be=u||c.includes("click"),we=be||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),_e=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&be&&Object.assign(_e,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ee=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&be&&Object.assign(Ee,{mouseleave:!1,blur:!1,mouseout:!1});const Te=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:we||!1};j&&(Object.assign(_e,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ee,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Te,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ne((()=>(ye.current=!0,()=>{ye.current=!1})),[]);const Ae=e=>{ye.current&&(e&&se(!0),setTimeout((()=>{ye.current&&(null==H||H(e),void 0===F&&ie(e))}),10))};(0,m.useEffect)((()=>{if(void 0===F)return()=>null;F&&se(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,m.useEffect)((()=>{if(re!==de.current)if(Pe(Q),de.current=re,re)null==R||R();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();Q.current=setTimeout((()=>{se(!1),ue(null),null==L||L()}),e+25)}}),[re]);const Ce=e=>{ne((t=>Oe(t,e)?t:e))},Re=(e=h)=>{Pe(Z),le?Ae(!0):Z.current=setTimeout((()=>{Ae(!0)}),e)},Le=(e=y)=>{Pe(J),J.current=setTimeout((()=>{me.current||Ae(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void he({current:null});h?Re():Ae(!0),W(n),he({current:n}),Pe(J)},ze=()=>{E?Le(y||100):y?Le():Ae(!1),Pe(Z)},Be=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Se({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:s,offset:a,elementReference:r,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:d,middlewares:p,border:q}).then((e=>{Ce(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),pe.current=n},Ve=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=Y.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ge].some((e=>null==e?void 0:e.contains(n)))||(Ae(!1),Pe(Z)))},We=ke(Fe,50,!0),qe=ke(ze,50,!0),$e=e=>{qe.cancel(),We(e)},Ue=()=>{We.cancel(),qe()},Xe=(0,m.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:P;n?Be(n):w?pe.current&&Be(pe.current):(null==V?void 0:V.isConnected)&&Se({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:s,offset:a,elementReference:V,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:d,middlewares:p,border:q}).then((e=>{ye.current&&Ce(e)}))}),[re,V,D,N,s,null==ce?void 0:ce.place,a,d,P,null==ce?void 0:ce.position,w]);(0,m.useEffect)((()=>{var e,t;const n=new Set(fe);ge.forEach((e=>{(null==I?void 0:I(e))||n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&!(null==I?void 0:I(r))&&n.add({current:r});const o=()=>{Ae(!1)},l=je(V),s=je(Y.current);Te.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==s||s.addEventListener("scroll",o));let a=null;Te.resize?window.addEventListener("resize",o):V&&Y.current&&(a=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=oe(e),u=o||i?[...c?te(c):[],...te(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=B(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-b(u)+"px "+-b(o.clientWidth-(c+d))+"px "+-b(o.clientHeight-(u+p))+"px "+-b(c)+"px",threshold:v(0,g(1,a))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==a){if(!h)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;l&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!a&&h.observe(c),h.observe(t));let m=a?ae(e):null;return a&&function t(){const r=ae(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(p)}}(V,Y.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ae(!1)};Te.escape&&window.addEventListener("keydown",c),Te.clickOutsideAnchor&&window.addEventListener("click",Ve);const u=[],d=e=>{re&&(null==e?void 0:e.target)===V||Fe(e)},p=e=>{re&&(null==e?void 0:e.target)===V&&ze()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(_e).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:$e}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ee).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ue}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:He});const m=()=>{me.current=!0},y=()=>{me.current=!1,ze()};return E&&!we&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Te.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==s||s.removeEventListener("scroll",o)),Te.resize?window.removeEventListener("resize",o):null==a||a(),Te.clickOutsideAnchor&&window.removeEventListener("click",Ve),Te.escape&&window.removeEventListener("keydown",c),E&&!we&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[V,Xe,le,fe,ge,A,O,C,be,h,y]),(0,m.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(V){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,V))&&(se(!1),Ae(!1),W(null),Pe(Z),Pe(J),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ve((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==ce?void 0:ce.anchorSelect,V]),(0,m.useEffect)((()=>{Xe()}),[Xe]),(0,m.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,m.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ge,t];V&&n.includes(V)||W(null!==(e=ge[0])&&void 0!==e?e:t)}),[i,ge,V]),(0,m.useEffect)((()=>(z&&Ae(!0),()=>{Pe(Z),Pe(J)})),[]),(0,m.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ve(e)}catch(e){ve([])}}),[t,l,null==ce?void 0:ce.anchorSelect]),(0,m.useEffect)((()=>{Z.current&&(Pe(Z),Re(h))}),[h]);const Ge=null!==(G=null==ce?void 0:ce.content)&&void 0!==G?G:D,Ye=re&&Object.keys(ee.tooltipStyles).length>0;return(0,m.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?Re(e.delay):Ae(!0)},close:e=>{(null==e?void 0:e.delay)?Le(e.delay):Ae(!1)},activeAnchor:V,place:ee.place,isOpen:Boolean(le&&!x&&Ge&&Ye)}))),le&&!x&&Ge?m.createElement(f,{id:t,role:X,className:xe("react-tooltip",De.tooltip,Me.tooltip,Me[o],n,`react-tooltip__place-${ee.place}`,De[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===d&&De.fixed,E&&De.clickable),onTransitionEnd:e=>{Pe(Q),re||"opacity"!==e.propertyName||(se(!1),ue(null),null==L||L())},style:{...N,...ee.tooltipStyles,opacity:void 0!==$&&Ye?$:void 0},ref:Y},Ge,m.createElement(f,{className:xe("react-tooltip-arrow",De.arrow,Me.arrow,r,_&&De.noArrow),style:{...ee.tooltipArrowStyles,background:U?`linear-gradient(to right bottom, transparent 50%, ${U} 50%)`:void 0},ref:K})):null},ze=({content:e})=>m.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Be=m.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:s,variant:a="dark",place:c="top",offset:u=10,wrapper:d="div",children:p=null,events:f=["hover"],openOnClick:h=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j=!1,style:N,position:P,isOpen:R,defaultIsOpen:L=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,disableTooltip:V,role:W="tooltip"},q)=>{const[$,U]=(0,m.useState)(r),[X,G]=(0,m.useState)(o),[Y,K]=(0,m.useState)(c),[Z,J]=(0,m.useState)(a),[Q,ee]=(0,m.useState)(u),[te,ne]=(0,m.useState)(y),[re,oe]=(0,m.useState)(b),[ie,le]=(0,m.useState)(w),[se,ae]=(0,m.useState)(x),[ce,ue]=(0,m.useState)(d),[de,pe]=(0,m.useState)(f),[fe,he]=(0,m.useState)(g),[me,ge]=(0,m.useState)(null),[ve,ye]=(0,m.useState)(null),be=(0,m.useRef)(I),{anchorRefs:we,activeAnchor:_e}=Ie(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{U(null!=e?e:r)},html:e=>{G(null!=e?e:o)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{ee(null===e?u:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:d)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:f)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{ne(null===e?y:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{le(null===e?w:"true"===e)},hidden:e=>{ae(null===e?x:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,m.useEffect)((()=>{U(r)}),[r]),(0,m.useEffect)((()=>{G(o)}),[o]),(0,m.useEffect)((()=>{K(c)}),[c]),(0,m.useEffect)((()=>{J(a)}),[a]),(0,m.useEffect)((()=>{ee(u)}),[u]),(0,m.useEffect)((()=>{ne(y)}),[y]),(0,m.useEffect)((()=>{oe(b)}),[b]),(0,m.useEffect)((()=>{le(w)}),[w]),(0,m.useEffect)((()=>{ae(x)}),[x]),(0,m.useEffect)((()=>{he(g)}),[g]),(0,m.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,m.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,m.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const s=null!==(r=null!=ve?ve:l)&&void 0!==r?r:_e.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(s);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(s){const e=Ee(s);Se(e),a.observe(s,c)}return()=>{a.disconnect()}}),[we,_e,ve,t,n]),(0,m.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Te("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Te("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Ae=(0,m.useRef)(null);if(i){const e=i({content:(null==ve?void 0:ve.getAttribute("data-tooltip-content"))||$||null,activeAnchor:ve});ke=e?m.createElement("div",{ref:Ae,className:"react-tooltip-content-wrapper"},e):null}else $&&(ke=$);X&&(ke=m.createElement(ze,{content:X}));const Oe={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:xe(l,me),classNameArrow:s,content:ke,contentWrapperRef:Ae,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:h,positionStrategy:fe,middlewares:v,delayShow:te,delayHide:re,float:ie,hidden:se,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:j,style:N,position:P,isOpen:R,defaultIsOpen:L,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,disableTooltip:V,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return m.createElement(Fe,{...Oe})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||Ee({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||Ee({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const He=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const o=new CustomEvent(e,{detail:r});dispatchEvent(o)}},Ve=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}},We=({onlineEventLinkDefault:e=""})=>{const t=(0,o.__)("Online event","gatherpress"),[n,r]=(0,a.useState)(e);return Ve({setOnlineEventLink:r},p("eventDetails.postId")),(0,c.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,c.jsx)(l.FlexItem,{display:"flex",children:(0,c.jsx)(l.Icon,{icon:"video-alt2"})}),(0,c.jsxs)(l.FlexItem,{children:[!n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,o.__)("Link available for attendees only.","gatherpress"),children:t}),(0,c.jsx)(Be,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,c.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};var qe=n(442);const $e=qe.default||qe,Ue=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,c.jsxs)(c.Fragment,{children:[(e||t)&&(0,c.jsxs)(l.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"location"})}),(0,c.jsxs)(l.FlexItem,{children:[e&&(0,c.jsx)("div",{className:"gatherpress-venue__name",children:(0,c.jsx)("strong",{children:$e(e)})}),t&&(0,c.jsx)("div",{className:"gatherpress-venue__full-address",children:$e(t)})]})]}),(n||r)&&(0,c.jsxs)(l.Flex,{justify:"normal",gap:"8",children:[n&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"phone"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"admin-site-alt3"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__website",children:(0,c.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Xe=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:o=!1,onlineEventLink:i=""})=>(0,c.jsxs)(c.Fragment,{children:[!o&&(0,c.jsx)(Ue,{name:e,fullAddress:t,phoneNumber:n,website:r}),o&&(0,c.jsx)(We,{onlineEventLinkDefault:i})]}),Ge=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,c.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,c.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})};function Ye(){return"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()}const Ke=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(""),[i,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(""),[f,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),x=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:_}=(0,s.useDispatch)("core/editor"),E=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),S=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",E))),T=S?.slug.replace(/^_/,""),[k,A]=(0,a.useState)(""),O=E+":"+k,C=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:k})));(0,a.useEffect)((()=>{var e,n,i,l,s,a;let c={};if(k&&Array.isArray(C)){var d;const e=null!==(d=C[0]?.meta?.gatherpress_venue_information)&&void 0!==d?d:"{}";var f;e&&(c=JSON.parse(e),c.name=null!==(f=C[0]?.title.rendered)&&void 0!==f?f:"")}const h=null!==(e=c?.name)&&void 0!==e?e:(0,o.__)("No venue selected.","gatherpress"),m=null!==(n=c?.fullAddress)&&void 0!==n?n:"",v=null!==(i=c?.phoneNumber)&&void 0!==i?i:"",b=null!==(l=c?.website)&&void 0!==l?l:"",x=null!==(s=c?.latitude)&&void 0!==s?s:"0",_=null!==(a=c?.longitude)&&void 0!==a?a:"0";T&&A(T),w(O?String(O):""),t(h),r(m),u(v),p(b),g(x),y(_),He({setName:h,setFullAddress:m,setPhoneNumber:v,setWebsite:b,setLatitude:x,setLongitude:_,setIsOnlineEventTerm:"online-event"===k})}),[k,C,T,O]);let j=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return j?(j=j.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),j.unshift({value:":",label:(0,o.__)("Choose a venue","gatherpress")})):j=[],(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.SelectControl,{label:(0,o.__)("Venue Selector","gatherpress"),value:b,onChange:e=>{(e=>{w(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];x({_gatherpress_venue:t}),A(e[1]),_()})(e)},options:j})})},Ze=window.wp.compose,Je=()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,i=e=>{const t=JSON.stringify({...u,...e});r({meta:{gatherpress_venue_information:t}})};let u=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));u=u?JSON.parse(u):{};const[d,p]=(0,a.useState)(null!==(e=u.fullAddress)&&void 0!==e?e:""),[f,h]=(0,a.useState)(null!==(t=u.phoneNumber)&&void 0!==t?t:""),[m,g]=(0,a.useState)(null!==(n=u.website)&&void 0!==n?n:"");Ve({setFullAddress:p,setPhoneNumber:h,setWebsite:g});const v=(0,a.useRef)(i),y=(0,a.useCallback)((()=>{let e=null,t=null;fetch(`https://nominatim.openstreetmap.org/search?q=${d}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,o.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ +(0,o.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((n=>{n.features.length>0&&(e=n.features[0].geometry.coordinates[1],t=n.features[0].geometry.coordinates[0]),v.current({latitude:e,longitude:t})}))}),[d]),b=(0,Ze.useDebounce)(y,300);return(0,a.useEffect)((()=>{v.current=i}),[i]),(0,a.useEffect)((()=>{b()}),[d,b]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.TextControl,{label:(0,o.__)("Full Address","gatherpress"),value:d,onChange:e=>{He({setFullAddress:e}),i({fullAddress:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Phone Number","gatherpress"),value:f,onChange:e=>{He({setPhoneNumber:e}),i({phoneNumber:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Website","gatherpress"),value:m,type:"url",onChange:e=>{He({setWebsite:e}),i({website:e})}})]})},Qe=()=>(0,c.jsx)("section",{children:(0,c.jsx)(Je,{})}),et=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[r,i]=(0,a.useState)(n);return Ve({setOnlineEventLink:i},p("eventDetails.postId")),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Online event link","gatherpress"),value:r,placeholder:(0,o.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),i(n),He({setOnlineEventLink:n},p("eventDetails.postId")),t()})(n)}})},tt=window.moment;var nt=n.n(tt);window.wp.date;const rt="YYYY-MM-DD HH:mm:ss",ot=nt().tz(it()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(rt);function it(e=p("eventDetails.dateTime.timezone")){return nt().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}nt().tz(ot,it()).add(2,"hours").format(rt),(0,o.__)("1 hour","gatherpress"),(0,o.__)("1.5 hours","gatherpress"),(0,o.__)("2 hours","gatherpress"),(0,o.__)("3 hours","gatherpress"),(0,o.__)("Set an end time…","gatherpress");const lt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.1.0","title":"Venue","category":"gatherpress","icon":"location","example":{},"description":"Provides information about an event venue.","attributes":{"mapShow":{"type":"boolean","default":true},"mapAlign":{"type":"string","default":""},"mapZoomLevel":{"type":"number","default":10},"mapType":{"type":"string","default":"m"},"mapHeight":{"type":"number","default":300}},"supports":{"align":["wide"],"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./venue.js","viewStyle":"file:./venue.css","render":"file:./render.php"}');(0,r.registerBlockType)(lt,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapZoomLevel:r,mapType:u,mapHeight:f}=e,[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[x,_]=(0,a.useState)(""),[E,S]=(0,a.useState)(""),[T,k]=(0,a.useState)(""),[A,O]=(0,a.useState)(!1),C=(0,i.useBlockProps)(),j=p("settings.mapPlatform"),N=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));let{mapShow:P}=e,R=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_venue_information));return R=R?JSON.parse(R):{},P&&v&&(P=!0),P&&!d()&&(P=!0),Ve({setName:g,setFullAddress:y,setPhoneNumber:S,setWebsite:k,setIsOnlineEventTerm:O,setLatitude:w,setLongitude:_}),(0,a.useEffect)((()=>{Ye()&&(y(R.fullAddress),S(R.phoneNumber),k(R.website),w(R.latitude),_(R.longitude),g(v||E||T?"":(0,o.__)("Add venue information.","gatherpress"))),"gatherpress_event"!==(0,s.select)("core/editor")?.getCurrentPostType()&&d()||g(v||E||T?"":(0,o.__)("No venue selected.","gatherpress"))}),[R.fullAddress,R.phoneNumber,R.website,R.latitude,R.longitude,v,E,T,b,x]),(0,a.useEffect)((()=>{const e=new Event("resize");window.dispatchEvent(e)}),[f]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(i.InspectorControls,{children:[d()&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Venue settings","gatherpress"),initialOpen:!0,children:[(0,c.jsxs)(l.PanelRow,{children:[!Ye()&&(0,c.jsx)(Ke,{}),Ye()&&(0,c.jsx)(Qe,{})]}),A&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(et,{})})]}),!A&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Map settings","gatherpress"),initialOpen:!0,children:[(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Show map on venue","gatherpress")}),(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:P?(0,o.__)("Display the map","gatherpress"):(0,o.__)("Hide the map","gatherpress"),checked:P,onChange:e=>{t({mapShow:e})}})}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Zoom level","gatherpress"),beforeIcon:"search",value:r,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),"google"===j&&(0,c.jsx)(l.RadioControl,{label:(0,o.__)("Map type","gatherpress"),selected:u,options:[{label:(0,o.__)("Roadmap","gatherpress"),value:"m"},{label:(0,o.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3})]})]}),(0,c.jsx)("div",{...C,children:(0,c.jsx)(Ge,{isSelected:n,children:(0,c.jsxs)("div",{className:"gatherpress-venue",children:[(0,c.jsx)(Xe,{name:m,fullAddress:v,phoneNumber:E,website:T,isOnlineEventTerm:A,onlineEventLink:N}),P&&!A&&(0,c.jsx)(h,{location:v,latitude:b,longitude:x,zoom:r,type:u,height:f})]})})})]})},save:()=>{}})},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=a,t.default=a},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function y(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function _(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?E(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?E(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return _(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return l.test(e)||null===(t=null==(g=h.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=h.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),h.querySelectorAll(n);case r:case o:var m=a(e).querySelectorAll(p);return s.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(g=a(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,s=//i,a=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;a=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],s={reset:!0,submit:!0};function a(e){return r.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),r.push(c(v,g,m));continue}}if("text"!==g.type){var y=g,b={};a(y)?((0,l.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(p(g.name,b,w),g,m))}else{var x=!g.data.trim().length;if(x&&g.parent&&!(0,l.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&x)continue;r.push(c(g.data,g,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var s=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=a.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function _(){var e=h(),n=y(o);if(n){if(x(),!y(i))return v("property missing ':'");var r=y(l),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),a}}return b(),function(){var e,t=[];for(w(t);e=_();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:a,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===a?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,a):e.replace(i,a)).replace(r,s))}},1133:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n};var o=r(n(9788))},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(s.O).every((e=>s.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".js?v="+{272:"994bd196dfd027e187df",481:"de7be60ececa79e28206",567:"88f6f2972bcfeb27e623",980:"ea1eff5ee6fe2438881e"}[e],s.miniCssF=e=>e+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="gatherpress:",s.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var l,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),a&&document.head.appendChild(l)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={908:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{567:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,s=n&&n.target&&n.target.href||t,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+s+")");a.name="ChunkLoadError",a.code="CSS_CHUNK_LOAD_FAILED",a.type=l,a.request=s,i.parentNode&&i.parentNode.removeChild(i),o(a)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={908:0,812:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(812!=t){var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),l=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+t,t)}else e[t]=0},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,i=n[0],l=n[1],a=n[2],c=0;if(i.some((t=>0!==e[t]))){for(r in l)s.o(l,r)&&(s.m[r]=l[r]);if(a)var u=a(s)}for(t&&t(n);cs(7701)));a=s.O(a)})(); \ No newline at end of file diff --git a/build/blocks/venue/venue.asset.php b/build/blocks/venue/venue.asset.php index d414962aa..e171fc860 100644 --- a/build/blocks/venue/venue.asset.php +++ b/build/blocks/venue/venue.asset.php @@ -1 +1 @@ - array('react', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'ac43be418ed67d7ea96a'); + array('react', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'f1a0db9e615d4c2f9bb7'); diff --git a/build/blocks/venue/venue.js b/build/blocks/venue/venue.js index 442308f79..f2137bd03 100644 --- a/build/blocks/venue/venue.js +++ b/build/blocks/venue/venue.js @@ -1,2 +1,2 @@ -(()=>{var e,t,n,r,o={5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);o(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=h;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function y(e){return(0,l.isTag)(e)}function g(e){return e.type===l.ElementType.CDATA}function v(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var r=t?_(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(g(e)){r=t?_(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?_(e.children):[];var a=new h(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var h=c(e);return l.test(e)||null===(t=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case r:case o:var m=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return p?p(e):(y=s(e,o).querySelector(o)).childNodes;var y}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,h="object"==typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var a,s=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=s(f);if(p){var h=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,h&&h.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,h=t.length,m=0;m1&&(g=d(g,{key:g.key||m})),r.push(c(g,y,m));continue}}if("text"!==y.type){var v=y,b={};s(v)?((0,l.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(f(y.name,b,w),y,m))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&x)continue;r.push(c(y.data,y,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=s.source}m.prototype.content=e;var y=[];function g(t){var n=new Error(s.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=f,n.source=e,!s.silent)throw n;y.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){v(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function E(){var e=h(),n=v(o);if(n){if(x(),!v(i))return g("property missing ':'");var r=v(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(r,a))}},1133:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(9788));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);l.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,l.d(o,i),o},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>e+".js",l.miniCssF=e=>e+".css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="gatherpress:",l.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var a,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={233:0};l.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{535:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=l.miniCssF(e),o=l.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",l.nc&&(i.nonce=l.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,a=n&&n.target&&n.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+a+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=l,s.request=a,i.parentNode&&i.parentNode.removeChild(i),o(s)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={233:0};l.f.j=(t,n)=>{var r=l.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=l.p+l.u(t),a=new Error;l.l(i,(n=>{if(l.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in a)l.o(a,r)&&(l.m[r]=a[r]);s&&s(l)}for(t&&t(n);c{"use strict";const e=window.wp.domReady;var t=l.n(e);const n=window.wp.element,r=window.wp.data,o=window.ReactJSXRuntime,i=e=>{const{zoom:t,type:n,className:r,location:i,height:l}=e,a={border:0,height:l,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:i,z:t||10,t:n||"m",output:"embed"}).toString();return(0,o.jsx)("iframe",{src:s,style:a,className:r,title:i})},a=window.wp.i18n;function s(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const c=e=>{const{zoom:t=10,className:r,location:i,height:c=300,latitude:u,longitude:d}=e,[f,p]=(0,n.useState)(null),h={height:c};return(0,n.useEffect)((()=>{(async()=>{const{default:e}=await l.e(481).then(l.t.bind(l,3481,23));await l.e(535).then(l.bind(l,1535)),await l.e(272).then(l.t.bind(l,1272,17)),await l.e(980).then(l.t.bind(l,8980,17)),p(e)})()}),[]),(0,n.useEffect)((()=>{if(!f||!u||!d)return;const e=f.map("map").setView([u,d],t);return f.Icon.Default.imagePath=s("urls.pluginUrl")+"build/images/",f.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,a.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ -(0,a.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),f.marker([u,d]).addTo(e).bindPopup(i),()=>{e.remove()}}),[f,u,i,d,t]),f&&u&&d?(0,o.jsx)("div",{className:r,id:"map",style:h}):null},u=e=>{const t=(0,r.select)("core")?.canUser("create","posts"),n=Boolean((0,r.select)("core/edit-post")),{zoom:l,type:a,className:u,latitude:d,longitude:f}=e;let{location:p,height:h}=e;h||(h=300),!t||n||p||(p="660 4th Street #119 San Francisco CA 94107, USA");const m=s("settings.mapPlatform");return p&&m?"google"===m?(0,o.jsx)(i,{location:p,className:u,zoom:l,type:a,height:h}):"osm"===m?(0,o.jsx)(c,{location:p,latitude:d,longitude:f,className:u,zoom:l,height:h}):(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(o.Fragment,{})};var d=l(1609);const f=Math.min,p=Math.max,h=Math.round,m=Math.floor,y=e=>({x:e,y:e}),g={left:"right",right:"left",bottom:"top",top:"bottom"},v={start:"end",end:"start"};function b(e,t,n){return p(e,f(t,n))}function w(e,t){return"function"==typeof e?e(t):e}function x(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function S(e){return"y"===e?"height":"width"}function T(e){return["top","bottom"].includes(x(e))?"y":"x"}function k(e){return _(T(e))}function A(e){return e.replace(/start|end/g,(e=>v[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>g[e]))}function C(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function N(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function R(e,t,n){let{reference:r,floating:o}=e;const i=T(t),l=k(t),a=S(l),s=x(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(E(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function L(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=w(t,e),h=C(p),m=a[f?"floating"===d?"reference":"floating":d],y=N(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=N(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:s}):g);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function j(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function I(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return e instanceof Node||e instanceof P(e).Node}function M(e){return e instanceof Element||e instanceof P(e).Element}function F(e){return e instanceof HTMLElement||e instanceof P(e).HTMLElement}function z(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(j(e))}function V(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function q(e){const t=W(),n=M(e)?$(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function W(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(j(e))}function $(e){return P(e).getComputedStyle(e)}function X(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||z(e)&&e.host||I(e);return z(t)?t.host:t}function K(e){const t=G(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&B(t)?t:K(t)}function Y(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=K(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=P(o);return i?t.concat(l,l.visualViewport||[],B(o)?o:[],l.frameElement&&n?Y(l.frameElement):[]):t.concat(o,Y(o,[],n))}function Z(e){const t=$(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=F(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=h(n)!==i||h(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function J(e){return M(e)?e:e.contextElement}function Q(e){const t=J(e);if(!F(t))return y(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Z(t);let l=(i?h(n.width):n.width)/r,a=(i?h(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ee=y(0);function te(e){const t=P(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ee}function ne(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=J(e);let l=y(1);t&&(r?M(r)&&(l=Q(r)):l=Q(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==P(e))&&t}(i,n,r)?te(i):y(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=P(i),t=r&&M(r)?P(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Q(o),t=o.getBoundingClientRect(),r=$(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=l,n=P(o),o=n.frameElement}}return N({width:u,height:d,x:s,y:c})}function re(e){return ne(I(e)).left+X(e).scrollLeft}function oe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=P(e),r=I(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=W();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=I(e),n=X(e),r=e.ownerDocument.body,o=p(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=p(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+re(e);const a=-n.scrollTop;return"rtl"===$(r).direction&&(l+=p(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(I(e));else if(M(t))r=function(e,t){const n=ne(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=F(e)?Q(e):y(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=te(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return N(r)}function ie(e,t){const n=G(e);return!(n===t||!M(n)||U(n))&&("fixed"===$(n).position||ie(n,t))}function le(e,t,n){const r=F(t),o=I(t),i="fixed"===n,l=ne(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=y(0);if(r||!r&&!i)if(("body"!==j(t)||B(o))&&(a=X(t)),r){const e=ne(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=re(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function ae(e){return"static"===$(e).position}function se(e,t){return F(e)&&"fixed"!==$(e).position?t?t(e):e.offsetParent:null}function ce(e,t){const n=P(e);if(V(e))return n;if(!F(e)){let t=G(e);for(;t&&!U(t);){if(M(t)&&!ae(t))return t;t=G(t)}return n}let r=se(e,t);for(;r&&H(r)&&ae(r);)r=se(r,t);return r&&U(r)&&ae(r)&&!q(r)?n:r||function(e){let t=G(e);for(;F(t)&&!U(t);){if(q(t))return t;if(V(t))return null;t=G(t)}return null}(e)||n}const ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=I(r),a=!!t&&V(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),d=F(r);if((d||!d&&!i)&&(("body"!==j(r)||B(l))&&(s=X(r)),F(r))){const e=ne(r);c=Q(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?V(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter((e=>M(e)&&"body"!==j(e))),o=null;const i="fixed"===$(e).position;let l=i?G(e):e;for(;M(l)&&!U(l);){const t=$(l),n=q(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||B(l)&&!n&&ie(e,l))?r=r.filter((e=>e!==l)):o=t,l=G(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=p(r.top,e.top),e.right=f(r.right,e.right),e.bottom=f(r.bottom,e.bottom),e.left=p(r.left,e.left),e}),oe(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ce,getElementRects:async function(e){const t=this.getOffsetParent||ce,n=this.getDimensions,r=await n(e.floating);return{reference:le(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Z(e);return{width:t,height:n}},getScale:Q,isElement:M,isRTL:function(e){return"rtl"===$(e).direction}};const de=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=x(n),a=E(n),s="y"===T(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=w(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},fe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=w(e,t),c={x:n,y:r},u=await L(t,s),d=T(x(o)),f=_(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=b(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";h=b(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},pe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=w(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=x(o),v=T(a),b=x(a)===a,_=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=f||(b||!m?[O(a)]:function(e){const t=O(e);return[A(e),t,A(t)]}(a)),N="none"!==h;!f&&N&&C.push(...function(e,t,n,r){const o=E(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(x(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(A)))),i}(a,m,h,_));const R=[a,...C],j=await L(t,y),P=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(j[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=E(e),o=k(e),i=S(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(o,l,_);P.push(j[e[0]],j[e[1]])}if(I=[...I,{placement:o,overflows:P}],!P.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(M=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var F;const e=null==(F=I.filter((e=>{if(N){const t=T(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},he=(e,t,n)=>{const r=new Map,o={platform:ue,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=R(c,r,s),f=r,p={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=w(c,e)||{};if(null==s)return{};const d=C(u),p={x:t,y:n},h=k(r),m=S(h),y=await i.getDimensions(s),g="y"===h,v=g?"top":"left",x=g?"bottom":"right",_=g?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[h]-p[h]-o.floating[m],A=p[h]-o.reference[h],O=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=O?O[_]:0;N&&await(null==i.isElement?void 0:i.isElement(O))||(N=l.floating[_]||o.floating[m]);const R=T/2-A/2,L=N/2-y[m]/2-1,j=f(d[v],L),P=f(d[x],L),I=j,D=N-y[m]-P,M=N/2-y[m]/2+R,F=b(I,M,D),z=!a.arrow&&null!=E(r)&&M!==F&&o.reference[m]/2-(M{var o,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let f=0;if(a){const e=`${a}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):he(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},be=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),we=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},xe=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ee=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ee(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!xe(e)||!xe(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Ee(e[n],t[n])))},_e=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},Se=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(_e(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Te="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,ke=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Oe=(0,d.createContext)({getTooltipData:()=>Ae});function Ce(e="DEFAULT_TOOLTIP_ID"){return(0,d.useContext)(Oe).getTooltipData(e)}var Ne={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Re={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Le=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:a="top",offset:s=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:h="absolute",middlewares:y,wrapper:g,delayShow:v=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:L,afterShow:j,afterHide:P,content:D,contentWrapperRef:M,isOpen:F,defaultIsOpen:z=!1,setIsOpen:B,activeAnchor:H,setActiveAnchor:V,border:q,opacity:W,arrowColor:U,role:$="tooltip"})=>{var X;const G=(0,d.useRef)(null),K=(0,d.useRef)(null),Z=(0,d.useRef)(null),Q=(0,d.useRef)(null),ee=(0,d.useRef)(null),[te,re]=(0,d.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[oe,ie]=(0,d.useState)(!1),[le,ae]=(0,d.useState)(!1),[se,ce]=(0,d.useState)(null),ue=(0,d.useRef)(!1),de=(0,d.useRef)(null),{anchorRefs:fe,setActiveAnchor:pe}=Ce(t),he=(0,d.useRef)(!1),[ye,ge]=(0,d.useState)([]),be=(0,d.useRef)(!1),xe=u||c.includes("click"),_e=xe||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Ae=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&xe&&Object.assign(Ae,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Oe=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&xe&&Object.assign(Oe,{mouseleave:!1,blur:!1,mouseout:!1});const Le=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:_e||!1};N&&(Object.assign(Ae,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Oe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Le,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Te((()=>(be.current=!0,()=>{be.current=!1})),[]);const je=e=>{be.current&&(e&&ae(!0),setTimeout((()=>{be.current&&(null==B||B(e),void 0===F&&ie(e))}),10))};(0,d.useEffect)((()=>{if(void 0===F)return()=>null;F&&ae(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,d.useEffect)((()=>{if(oe!==ue.current)if(ke(ee),ue.current=oe,oe)null==j||j();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();ee.current=setTimeout((()=>{ae(!1),ce(null),null==P||P()}),e+25)}}),[oe]);const Pe=e=>{re((t=>Ee(t,e)?t:e))},Ie=(e=v)=>{ke(Z),le?je(!0):Z.current=setTimeout((()=>{je(!0)}),e)},De=(e=b)=>{ke(Q),Q.current=setTimeout((()=>{he.current||je(!1)}),e)},Me=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return V(null),void pe({current:null});v?Ie():je(!0),V(n),pe({current:n}),ke(Q)},Fe=()=>{_?De(b||100):b?De():je(!1),ke(Z)},ze=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ve({place:null!==(n=null==se?void 0:se.place)&&void 0!==n?n:a,offset:s,elementReference:r,tooltipReference:G.current,tooltipArrowReference:K.current,strategy:h,middlewares:y,border:q}).then((e=>{Pe(e)}))},Be=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ze(n),de.current=n},He=e=>{var t;if(!oe)return;const n=e.target;n.isConnected&&((null===(t=G.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ye].some((e=>null==e?void 0:e.contains(n)))||(je(!1),ke(Z)))},Ve=we(Me,50,!0),qe=we(Fe,50,!0),We=e=>{qe.cancel(),Ve(e)},Ue=()=>{Ve.cancel(),qe()},$e=(0,d.useCallback)((()=>{var e,t;const n=null!==(e=null==se?void 0:se.position)&&void 0!==e?e:L;n?ze(n):w?de.current&&ze(de.current):(null==H?void 0:H.isConnected)&&ve({place:null!==(t=null==se?void 0:se.place)&&void 0!==t?t:a,offset:s,elementReference:H,tooltipReference:G.current,tooltipArrowReference:K.current,strategy:h,middlewares:y,border:q}).then((e=>{be.current&&Pe(e)}))}),[oe,H,D,R,a,null==se?void 0:se.place,s,h,L,null==se?void 0:se.position,w]);(0,d.useEffect)((()=>{var e,t;const n=new Set(fe);ye.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r});const o=()=>{je(!1)},l=Se(H),a=Se(G.current);Le.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let s=null;Le.resize?window.addEventListener("resize",o):H&&G.current&&(s=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=J(e),u=o||i?[...c?Y(c):[],...Y(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=I(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const y={rootMargin:-m(u)+"px "+-m(o.clientWidth-(c+d))+"px "+-m(o.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,f(1,s))||1};let g=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{r=new IntersectionObserver(v,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,y)}r.observe(e)}(!0),i}(c,n):null;let h,y=-1,g=null;l&&(g=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),n()})),c&&!s&&g.observe(c),g.observe(t));let v=s?ne(e):null;return s&&function t(){const r=ne(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(h)}}(H,G.current,$e,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&je(!1)};Le.escape&&window.addEventListener("keydown",c),Le.clickOutsideAnchor&&window.addEventListener("click",He);const u=[],d=e=>{oe&&(null==e?void 0:e.target)===H||Me(e)},h=e=>{oe&&(null==e?void 0:e.target)===H&&Fe()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],g=["click","dblclick","mousedown","mouseup"];Object.entries(Ae).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:We}):g.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Oe).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:Ue}):g.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"pointermove",listener:Be});const v=()=>{he.current=!0},b=()=>{he.current=!1,Fe()};return _&&!_e&&(null===(e=G.current)||void 0===e||e.addEventListener("mouseenter",v),null===(t=G.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Le.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),Le.resize?window.removeEventListener("resize",o):null==s||s(),Le.clickOutsideAnchor&&window.removeEventListener("click",He),Le.escape&&window.removeEventListener("keydown",c),_&&!_e&&(null===(e=G.current)||void 0===e||e.removeEventListener("mouseenter",v),null===(t=G.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[H,$e,le,fe,ye,A,O,C,xe,v,b]),(0,d.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(H){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,H))&&(ae(!1),je(!1),V(null),ke(Z),ke(Q),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ge((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==se?void 0:se.anchorSelect,H]),(0,d.useEffect)((()=>{$e()}),[$e]),(0,d.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>$e()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,d.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ye,t];H&&n.includes(H)||V(null!==(e=ye[0])&&void 0!==e?e:t)}),[i,ye,H]),(0,d.useEffect)((()=>(z&&je(!0),()=>{ke(Z),ke(Q)})),[]),(0,d.useEffect)((()=>{var e;let n=null!==(e=null==se?void 0:se.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ge(e)}catch(e){ge([])}}),[t,l,null==se?void 0:se.anchorSelect]),(0,d.useEffect)((()=>{Z.current&&(ke(Z),Ie(v))}),[v]);const Xe=null!==(X=null==se?void 0:se.content)&&void 0!==X?X:D,Ge=oe&&Object.keys(te.tooltipStyles).length>0;return(0,d.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ce(null!=e?e:null),(null==e?void 0:e.delay)?Ie(e.delay):je(!0)},close:e=>{(null==e?void 0:e.delay)?De(e.delay):je(!1)},activeAnchor:H,place:te.place,isOpen:Boolean(le&&!x&&Xe&&Ge)}))),le&&!x&&Xe?d.createElement(g,{id:t,role:$,className:me("react-tooltip",Ne.tooltip,Re.tooltip,Re[o],n,`react-tooltip__place-${te.place}`,Ne[Ge?"show":"closing"],Ge?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Ne.fixed,_&&Ne.clickable),onTransitionEnd:e=>{ke(ee),oe||"opacity"!==e.propertyName||(ae(!1),ce(null),null==P||P())},style:{...R,...te.tooltipStyles,opacity:void 0!==W&&Ge?W:void 0},ref:G},Xe,d.createElement(g,{className:me("react-tooltip-arrow",Ne.arrow,Re.arrow,r,E&&Ne.noArrow),style:{...te.tooltipArrowStyles,background:U?`linear-gradient(to right bottom, transparent 50%, ${U} 50%)`:void 0},ref:K})):null},je=({content:e})=>d.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Pe=d.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:g,delayShow:v=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N=!1,style:R,position:L,isOpen:j,defaultIsOpen:P=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,role:V="tooltip"},q)=>{const[W,U]=(0,d.useState)(r),[$,X]=(0,d.useState)(o),[G,K]=(0,d.useState)(c),[Y,Z]=(0,d.useState)(s),[J,Q]=(0,d.useState)(u),[ee,te]=(0,d.useState)(v),[ne,re]=(0,d.useState)(b),[oe,ie]=(0,d.useState)(w),[le,ae]=(0,d.useState)(x),[se,ce]=(0,d.useState)(f),[ue,de]=(0,d.useState)(h),[fe,pe]=(0,d.useState)(y),[he,ye]=(0,d.useState)(null),[ge,ve]=(0,d.useState)(null),we=(0,d.useRef)(I),{anchorRefs:xe,activeAnchor:Ee}=Ce(e),_e=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{U(null!=e?e:r)},html:e=>{X(null!=e?e:o)},variant:e=>{var t;Z(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{Q(null===e?u:Number(e))},wrapper:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");de(null!=t?t:h)},"position-strategy":e=>{var t;pe(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{te(null===e?v:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{ie(null===e?w:"true"===e)},hidden:e=>{ae(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,d.useEffect)((()=>{U(r)}),[r]),(0,d.useEffect)((()=>{X(o)}),[o]),(0,d.useEffect)((()=>{K(c)}),[c]),(0,d.useEffect)((()=>{Z(s)}),[s]),(0,d.useEffect)((()=>{Q(u)}),[u]),(0,d.useEffect)((()=>{te(v)}),[v]),(0,d.useEffect)((()=>{re(b)}),[b]),(0,d.useEffect)((()=>{ie(w)}),[w]),(0,d.useEffect)((()=>{ae(x)}),[x]),(0,d.useEffect)((()=>{pe(y)}),[y]),(0,d.useEffect)((()=>{we.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,d.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,d.useEffect)((()=>{var r;const o=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(r=null!=ge?ge:l)&&void 0!==r?r:Ee.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=_e(a);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=_e(a);Se(e),s.observe(a,c)}return()=>{s.disconnect()}}),[xe,Ee,ge,t,n]),(0,d.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!be("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!be("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let Te=p;const ke=(0,d.useRef)(null);if(i){const e=i({content:(null==ge?void 0:ge.getAttribute("data-tooltip-content"))||W||null,activeAnchor:ge});Te=e?d.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else W&&(Te=W);$&&(Te=d.createElement(je,{content:$}));const Ae={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:me(l,he),classNameArrow:a,content:Te,contentWrapperRef:ke,place:G,variant:Y,offset:J,wrapper:se,events:ue,openOnClick:m,positionStrategy:fe,middlewares:g,delayShow:ee,delayHide:ne,float:oe,hidden:le,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:L,isOpen:j,defaultIsOpen:P,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,activeAnchor:ge,setActiveAnchor:e=>ve(e),role:V};return d.createElement(Le,{...Ae})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||ge({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||ge({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Ie=window.wp.components,De=({onlineEventLinkDefault:e=""})=>{const t=(0,a.__)("Online event","gatherpress"),[r,i]=(0,n.useState)(e);return((e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}})({setOnlineEventLink:i},s("eventDetails.postId")),(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"3",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",children:(0,o.jsx)(Ie.Icon,{icon:"video-alt2"})}),(0,o.jsxs)(Ie.FlexItem,{children:[!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,a.__)("Link available for attendees only.","gatherpress"),children:t}),(0,o.jsx)(Pe,{id:"gatherpress-online-event-tooltip"})]}),r&&(0,o.jsx)("a",{href:r,rel:"noreferrer",target:"_blank",children:t})]})]})};var Me=l(442);const Fe=Me.default||Me,ze=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,o.jsxs)(o.Fragment,{children:[(e||t)&&(0,o.jsxs)(Ie.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"location"})}),(0,o.jsxs)(Ie.FlexItem,{children:[e&&(0,o.jsx)("div",{className:"gatherpress-venue__name",children:(0,o.jsx)("strong",{children:Fe(e)})}),t&&(0,o.jsx)("div",{className:"gatherpress-venue__full-address",children:Fe(t)})]})]}),(n||r)&&(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"8",children:[n&&(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"phone"})}),(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsxs)(Ie.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Ie.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Ie.Icon,{icon:"admin-site-alt3"})}),(0,o.jsx)(Ie.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__website",children:(0,o.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Be=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,o.jsxs)(o.Fragment,{children:[!i&&(0,o.jsx)(ze,{name:e,fullAddress:t,phoneNumber:n,website:r}),i&&(0,o.jsx)(De,{onlineEventLinkDefault:l})]});t()((()=>{let e=document.querySelectorAll('[data-gatherpress_block_name="venue"]');for(let c=0;c{var e,t,n,r,o={5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);o(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new l.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new l.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=h;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function y(e){return(0,l.isTag)(e)}function g(e){return e.type===l.ElementType.CDATA}function v(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var r=t?_(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(g(e)){r=t?_(e.children):[];var l=new p(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?_(e.children):[];var a=new h(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function _(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var h=c(e);return l.test(e)||null===(t=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case r:case o:var m=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return p?p(e):(y=s(e,o).querySelector(o)).childNodes;var y}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,h="object"==typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var a,s=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=s(f);if(p){var h=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,h&&h.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return r.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,h=t.length,m=0;m1&&(g=d(g,{key:g.key||m})),r.push(c(g,y,m));continue}}if("text"!==y.type){var v=y,b={};s(v)?((0,l.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(f(y.name,b,w),y,m))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&x)continue;r.push(c(y.data,y,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,a)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=s.source}m.prototype.content=e;var y=[];function g(t){var n=new Error(s.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=f,n.source=e,!s.silent)throw n;y.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function b(){v(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function E(){var e=h(),n=v(o);if(n){if(x(),!v(i))return g("property missing ':'");var r=v(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(r,a))}},1133:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n};var o=r(n(9788))},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);l.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,l.d(o,i),o},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,n)=>(l.f[n](e,t),t)),[])),l.u=e=>e+".js?v="+{272:"994bd196dfd027e187df",481:"de7be60ececa79e28206",567:"88f6f2972bcfeb27e623",980:"ea1eff5ee6fe2438881e"}[e],l.miniCssF=e=>e+".css",l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="gatherpress:",l.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var a,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}},l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={233:0};l.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{567:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=l.miniCssF(e),o=l.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",l.nc&&(i.nonce=l.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,a=n&&n.target&&n.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+a+")");s.name="ChunkLoadError",s.code="CSS_CHUNK_LOAD_FAILED",s.type=l,s.request=a,i.parentNode&&i.parentNode.removeChild(i),o(s)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={233:0};l.f.j=(t,n)=>{var r=l.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=l.p+l.u(t),a=new Error;l.l(i,(n=>{if(l.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,i=n[0],a=n[1],s=n[2],c=0;if(i.some((t=>0!==e[t]))){for(r in a)l.o(a,r)&&(l.m[r]=a[r]);s&&s(l)}for(t&&t(n);c{"use strict";const e=window.wp.domReady;var t=l.n(e);const n=window.wp.element,r=window.wp.data,o=window.ReactJSXRuntime,i=e=>{const{zoom:t,type:n,className:r,location:i,height:l}=e,a={border:0,height:l,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:i,z:t||10,t:n||"m",output:"embed"}).toString();return(0,o.jsx)("iframe",{src:s,style:a,className:r,title:i})},a=window.wp.i18n;function s(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const c=e=>{const{zoom:t=10,className:r,location:i,height:c=300,latitude:u,longitude:d}=e,[f,p]=(0,n.useState)(null),h={height:c};return(0,n.useEffect)((()=>{(async()=>{const{default:e}=await l.e(481).then(l.t.bind(l,3481,23));await l.e(567).then(l.bind(l,5567)),await l.e(272).then(l.t.bind(l,1272,17)),await l.e(980).then(l.t.bind(l,8980,17)),p(e)})()}),[]),(0,n.useEffect)((()=>{if(!f||!u||!d)return;const e=f.map("map").setView([u,d],t);return f.Icon.Default.imagePath=s("urls.pluginUrl")+"build/images/",f.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,a.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ +(0,a.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),f.marker([u,d]).addTo(e).bindPopup(i),()=>{e.remove()}}),[f,u,i,d,t]),f&&u&&d?(0,o.jsx)("div",{className:r,id:"map",style:h}):null},u=e=>{const t=(0,r.select)("core")?.canUser("create","posts"),n=Boolean((0,r.select)("core/edit-post")),{zoom:l,type:a,className:u,latitude:d,longitude:f}=e;let{location:p,height:h}=e;h||(h=300),!t||n||p||(p="660 4th Street #119 San Francisco CA 94107, USA");const m=s("settings.mapPlatform");return p&&m?"google"===m?(0,o.jsx)(i,{location:p,className:u,zoom:l,type:a,height:h}):"osm"===m?(0,o.jsx)(c,{location:p,latitude:d,longitude:f,className:u,zoom:l,height:h}):(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(o.Fragment,{})};var d=l(1609);const f=Math.min,p=Math.max,h=Math.round,m=Math.floor,y=e=>({x:e,y:e}),g={left:"right",right:"left",bottom:"top",top:"bottom"},v={start:"end",end:"start"};function b(e,t,n){return p(e,f(t,n))}function w(e,t){return"function"==typeof e?e(t):e}function x(e){return e.split("-")[0]}function E(e){return e.split("-")[1]}function _(e){return"x"===e?"y":"x"}function S(e){return"y"===e?"height":"width"}function T(e){return["top","bottom"].includes(x(e))?"y":"x"}function k(e){return _(T(e))}function A(e){return e.replace(/start|end/g,(e=>v[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>g[e]))}function C(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function N(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function R(e,t,n){let{reference:r,floating:o}=e;const i=T(t),l=k(t),a=S(l),s=x(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(E(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function L(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=w(t,e),h=C(p),m=a[f?"floating"===d?"reference":"floating":d],y=N(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=N(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:s}):g);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function j(){return"undefined"!=typeof window}function P(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return!!j()&&(e instanceof Node||e instanceof I(e).Node)}function F(e){return!!j()&&(e instanceof Element||e instanceof I(e).Element)}function B(e){return!!j()&&(e instanceof HTMLElement||e instanceof I(e).HTMLElement)}function z(e){return!(!j()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof I(e).ShadowRoot)}function H(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function V(e){return["table","td","th"].includes(P(e))}function q(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function W(e){const t=U(),n=F(e)?X(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function U(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $(e){return["html","body","#document"].includes(P(e))}function X(e){return I(e).getComputedStyle(e)}function G(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if("html"===P(e))return e;const t=e.assignedSlot||e.parentNode||z(e)&&e.host||D(e);return z(t)?t.host:t}function Y(e){const t=K(e);return $(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&H(t)?t:Y(t)}function Z(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Y(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=I(o);if(i){const e=J(l);return t.concat(l,l.visualViewport||[],H(o)?o:[],e&&n?Z(e):[])}return t.concat(o,Z(o,[],n))}function J(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q(e){const t=X(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=B(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=h(n)!==i||h(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function ee(e){return F(e)?e:e.contextElement}function te(e){const t=ee(e);if(!B(t))return y(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Q(t);let l=(i?h(n.width):n.width)/r,a=(i?h(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const ne=y(0);function re(e){const t=I(e);return U()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ne}function oe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ee(e);let l=y(1);t&&(r?F(r)&&(l=te(r)):l=te(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==I(e))&&t}(i,n,r)?re(i):y(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=I(i),t=r&&F(r)?I(r):r;let n=e,o=J(n);for(;o&&r&&t!==n;){const e=te(o),t=o.getBoundingClientRect(),r=X(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=l,n=I(o),o=J(n)}}return N({width:u,height:d,x:s,y:c})}function ie(e,t){const n=G(e).scrollLeft;return t?t.left+n:oe(D(e)).left+n}function le(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=I(e),r=D(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=U();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=D(e),n=G(e),r=e.ownerDocument.body,o=p(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=p(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ie(e);const a=-n.scrollTop;return"rtl"===X(r).direction&&(l+=p(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(D(e));else if(F(t))r=function(e,t){const n=oe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=B(e)?te(e):y(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=re(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return N(r)}function ae(e,t){const n=K(e);return!(n===t||!F(n)||$(n))&&("fixed"===X(n).position||ae(n,t))}function se(e,t,n){const r=B(t),o=D(t),i="fixed"===n,l=oe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=y(0);if(r||!r&&!i)if(("body"!==P(t)||H(o))&&(a=G(t)),r){const e=oe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=ie(o));let c=0,u=0;if(o&&!r&&!i){const e=o.getBoundingClientRect();u=e.top+a.scrollTop,c=e.left+a.scrollLeft-ie(o,e)}return{x:l.left+a.scrollLeft-s.x-c,y:l.top+a.scrollTop-s.y-u,width:l.width,height:l.height}}function ce(e){return"static"===X(e).position}function ue(e,t){if(!B(e)||"fixed"===X(e).position)return null;if(t)return t(e);let n=e.offsetParent;return D(e)===n&&(n=n.ownerDocument.body),n}function de(e,t){const n=I(e);if(q(e))return n;if(!B(e)){let t=K(e);for(;t&&!$(t);){if(F(t)&&!ce(t))return t;t=K(t)}return n}let r=ue(e,t);for(;r&&V(r)&&ce(r);)r=ue(r,t);return r&&$(r)&&ce(r)&&!W(r)?n:r||function(e){let t=K(e);for(;B(t)&&!$(t);){if(W(t))return t;if(q(t))return null;t=K(t)}return null}(e)||n}const fe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=D(r),a=!!t&&q(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=y(1);const u=y(0),d=B(r);if((d||!d&&!i)&&(("body"!==P(r)||H(l))&&(s=G(r)),B(r))){const e=oe(r);c=te(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:D,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?q(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Z(e,[],!1).filter((e=>F(e)&&"body"!==P(e))),o=null;const i="fixed"===X(e).position;let l=i?K(e):e;for(;F(l)&&!$(l);){const t=X(l),n=W(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||H(l)&&!n&&ae(e,l))?r=r.filter((e=>e!==l)):o=t,l=K(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=le(t,n,o);return e.top=p(r.top,e.top),e.right=f(r.right,e.right),e.bottom=f(r.bottom,e.bottom),e.left=p(r.left,e.left),e}),le(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:de,getElementRects:async function(e){const t=this.getOffsetParent||de,n=this.getDimensions,r=await n(e.floating);return{reference:se(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Q(e);return{width:t,height:n}},getScale:te,isElement:F,isRTL:function(e){return"rtl"===X(e).direction}};const pe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=x(n),a=E(n),s="y"===T(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=w(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},he=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=w(e,t),c={x:n,y:r},u=await L(t,s),d=T(x(o)),f=_(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=b(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";h=b(h+u["y"===d?"top":"left"],h,h-u[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:l}}}}}},me=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=w(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=x(o),v=T(a),b=x(a)===a,_=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=f||(b||!m?[O(a)]:function(e){const t=O(e);return[A(e),t,A(t)]}(a)),N="none"!==h;!f&&N&&C.push(...function(e,t,n,r){const o=E(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(x(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(A)))),i}(a,m,h,_));const R=[a,...C],j=await L(t,y),P=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(j[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=E(e),o=k(e),i=S(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(o,l,_);P.push(j[e[0]],j[e[1]])}if(I=[...I,{placement:o,overflows:P}],!P.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(M=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(p){case"bestFit":{var F;const e=null==(F=I.filter((e=>{if(N){const t=T(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},ye=(e,t,n)=>{const r=new Map,o={platform:fe,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=R(c,r,s),f=r,p={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const s=l;return n?(s.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:a}=e,{element:s,padding:u=0}=w(c,e)||{};if(null==s)return{};const d=C(u),p={x:t,y:n},h=k(r),m=S(h),y=await i.getDimensions(s),g="y"===h,v=g?"top":"left",x=g?"bottom":"right",_=g?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[h]-p[h]-o.floating[m],A=p[h]-o.reference[h],O=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let N=O?O[_]:0;N&&await(null==i.isElement?void 0:i.isElement(O))||(N=l.floating[_]||o.floating[m]);const R=T/2-A/2,L=N/2-y[m]/2-1,j=f(d[v],L),P=f(d[x],L),I=j,D=N-y[m]-P,M=N/2-y[m]/2+R,F=b(I,M,D),B=!a.arrow&&null!=E(r)&&M!==F&&o.reference[m]/2-(M{var o,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let f=0;if(a){const e=`${a}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):ye(e,t,{placement:"bottom",strategy:i,middleware:s}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},xe=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),Ee=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},_e=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Se=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Se(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!_e(e)||!_e(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Se(e[n],t[n])))},Te=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},ke=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Te(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ae="undefined"!=typeof window?d.useLayoutEffect:d.useEffect,Oe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Ce={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Ne=(0,d.createContext)({getTooltipData:()=>Ce});function Re(e="DEFAULT_TOOLTIP_ID"){return(0,d.useContext)(Ne).getTooltipData(e)}var Le={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},je={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Pe=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:a="top",offset:s=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:h="absolute",middlewares:y,wrapper:g,delayShow:v=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:L,afterShow:j,afterHide:P,disableTooltip:I,content:M,contentWrapperRef:F,isOpen:B,defaultIsOpen:z=!1,setIsOpen:H,activeAnchor:V,setActiveAnchor:q,border:W,opacity:U,arrowColor:$,role:X="tooltip"})=>{var G;const K=(0,d.useRef)(null),Y=(0,d.useRef)(null),J=(0,d.useRef)(null),Q=(0,d.useRef)(null),te=(0,d.useRef)(null),[ne,re]=(0,d.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:a}),[ie,le]=(0,d.useState)(!1),[ae,se]=(0,d.useState)(!1),[ce,ue]=(0,d.useState)(null),de=(0,d.useRef)(!1),fe=(0,d.useRef)(null),{anchorRefs:pe,setActiveAnchor:he}=Re(t),me=(0,d.useRef)(!1),[ye,ve]=(0,d.useState)([]),be=(0,d.useRef)(!1),xe=u||c.includes("click"),_e=xe||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),Te=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&xe&&Object.assign(Te,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ce=O?{...O}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!O&&xe&&Object.assign(Ce,{mouseleave:!1,blur:!1,mouseout:!1});const Ne=C?{...C}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:_e||!1};N&&(Object.assign(Te,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ce,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ne,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ae((()=>(be.current=!0,()=>{be.current=!1})),[]);const Pe=e=>{be.current&&(e&&se(!0),setTimeout((()=>{be.current&&(null==H||H(e),void 0===B&&le(e))}),10))};(0,d.useEffect)((()=>{if(void 0===B)return()=>null;B&&se(!0);const e=setTimeout((()=>{le(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,d.useEffect)((()=>{if(ie!==de.current)if(Oe(te),de.current=ie,ie)null==j||j();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();te.current=setTimeout((()=>{se(!1),ue(null),null==P||P()}),e+25)}}),[ie]);const Ie=e=>{re((t=>Se(t,e)?t:e))},De=(e=v)=>{Oe(J),ae?Pe(!0):J.current=setTimeout((()=>{Pe(!0)}),e)},Me=(e=b)=>{Oe(Q),Q.current=setTimeout((()=>{me.current||Pe(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return q(null),void he({current:null});v?De():Pe(!0),q(n),he({current:n}),Oe(Q)},Be=()=>{_?Me(b||100):b?Me():Pe(!1),Oe(J)},ze=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};we({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:a,offset:s,elementReference:r,tooltipReference:K.current,tooltipArrowReference:Y.current,strategy:h,middlewares:y,border:W}).then((e=>{Ie(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ze(n),fe.current=n},Ve=e=>{var t;if(!ie)return;const n=e.target;n.isConnected&&((null===(t=K.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ye].some((e=>null==e?void 0:e.contains(n)))||(Pe(!1),Oe(J)))},qe=Ee(Fe,50,!0),We=Ee(Be,50,!0),Ue=e=>{We.cancel(),qe(e)},$e=()=>{qe.cancel(),We()},Xe=(0,d.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:L;n?ze(n):w?fe.current&&ze(fe.current):(null==V?void 0:V.isConnected)&&we({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:a,offset:s,elementReference:V,tooltipReference:K.current,tooltipArrowReference:Y.current,strategy:h,middlewares:y,border:W}).then((e=>{be.current&&Ie(e)}))}),[ie,V,M,R,a,null==ce?void 0:ce.place,s,h,L,null==ce?void 0:ce.position,w]);(0,d.useEffect)((()=>{var e,t;const n=new Set(pe);ye.forEach((e=>{(null==I?void 0:I(e))||n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&!(null==I?void 0:I(r))&&n.add({current:r});const o=()=>{Pe(!1)},l=ke(V),a=ke(K.current);Ne.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==a||a.addEventListener("scroll",o));let s=null;Ne.resize?window.addEventListener("resize",o):V&&K.current&&(s=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ee(e),u=o||i?[...c?Z(c):[],...Z(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=D(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const y={rootMargin:-m(u)+"px "+-m(o.clientWidth-(c+d))+"px "+-m(o.clientHeight-(u+h))+"px "+-m(c)+"px",threshold:p(0,f(1,s))||1};let g=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}g=!1}try{r=new IntersectionObserver(v,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,y)}r.observe(e)}(!0),i}(c,n):null;let h,y=-1,g=null;l&&(g=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=g)||e.observe(t)}))),n()})),c&&!s&&g.observe(c),g.observe(t));let v=s?oe(e):null;return s&&function t(){const r=oe(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=g)||e.disconnect(),g=null,s&&cancelAnimationFrame(h)}}(V,K.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Pe(!1)};Ne.escape&&window.addEventListener("keydown",c),Ne.clickOutsideAnchor&&window.addEventListener("click",Ve);const u=[],d=e=>{ie&&(null==e?void 0:e.target)===V||Fe(e)},h=e=>{ie&&(null==e?void 0:e.target)===V&&Be()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],g=["click","dblclick","mousedown","mouseup"];Object.entries(Te).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:Ue}):g.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ce).forEach((([e,t])=>{t&&(y.includes(e)?u.push({event:e,listener:$e}):g.includes(e)&&u.push({event:e,listener:h}))})),w&&u.push({event:"pointermove",listener:He});const v=()=>{me.current=!0},b=()=>{me.current=!1,Be()};return _&&!_e&&(null===(e=K.current)||void 0===e||e.addEventListener("mouseenter",v),null===(t=K.current)||void 0===t||t.addEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Ne.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==a||a.removeEventListener("scroll",o)),Ne.resize?window.removeEventListener("resize",o):null==s||s(),Ne.clickOutsideAnchor&&window.removeEventListener("click",Ve),Ne.escape&&window.removeEventListener("keydown",c),_&&!_e&&(null===(e=K.current)||void 0===e||e.removeEventListener("mouseenter",v),null===(t=K.current)||void 0===t||t.removeEventListener("mouseleave",b)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[V,Xe,ae,pe,ye,A,O,C,xe,v,b]),(0,d.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(V){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,V))&&(se(!1),Pe(!1),q(null),Oe(J),Oe(Q),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ve((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==ce?void 0:ce.anchorSelect,V]),(0,d.useEffect)((()=>{Xe()}),[Xe]),(0,d.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(F.current),()=>{e.disconnect()}}),[M,null==F?void 0:F.current]),(0,d.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ye,t];V&&n.includes(V)||q(null!==(e=ye[0])&&void 0!==e?e:t)}),[i,ye,V]),(0,d.useEffect)((()=>(z&&Pe(!0),()=>{Oe(J),Oe(Q)})),[]),(0,d.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ve(e)}catch(e){ve([])}}),[t,l,null==ce?void 0:ce.anchorSelect]),(0,d.useEffect)((()=>{J.current&&(Oe(J),De(v))}),[v]);const Ge=null!==(G=null==ce?void 0:ce.content)&&void 0!==G?G:M,Ke=ie&&Object.keys(ne.tooltipStyles).length>0;return(0,d.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?De(e.delay):Pe(!0)},close:e=>{(null==e?void 0:e.delay)?Me(e.delay):Pe(!1)},activeAnchor:V,place:ne.place,isOpen:Boolean(ae&&!x&&Ge&&Ke)}))),ae&&!x&&Ge?d.createElement(g,{id:t,role:X,className:ge("react-tooltip",Le.tooltip,je.tooltip,je[o],n,`react-tooltip__place-${ne.place}`,Le[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===h&&Le.fixed,_&&Le.clickable),onTransitionEnd:e=>{Oe(te),ie||"opacity"!==e.propertyName||(se(!1),ue(null),null==P||P())},style:{...R,...ne.tooltipStyles,opacity:void 0!==U&&Ke?U:void 0},ref:K},Ge,d.createElement(g,{className:ge("react-tooltip-arrow",Le.arrow,je.arrow,r,E&&Le.noArrow),style:{...ne.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:Y})):null},Ie=({content:e})=>d.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),De=d.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:a,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:g,delayShow:v=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:_=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N=!1,style:R,position:L,isOpen:j,defaultIsOpen:P=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:B,afterShow:z,afterHide:H,disableTooltip:V,role:q="tooltip"},W)=>{const[U,$]=(0,d.useState)(r),[X,G]=(0,d.useState)(o),[K,Y]=(0,d.useState)(c),[Z,J]=(0,d.useState)(s),[Q,ee]=(0,d.useState)(u),[te,ne]=(0,d.useState)(v),[re,oe]=(0,d.useState)(b),[ie,le]=(0,d.useState)(w),[ae,se]=(0,d.useState)(x),[ce,ue]=(0,d.useState)(f),[de,fe]=(0,d.useState)(h),[pe,he]=(0,d.useState)(y),[me,ye]=(0,d.useState)(null),[ve,be]=(0,d.useState)(null),we=(0,d.useRef)(I),{anchorRefs:Ee,activeAnchor:_e}=Re(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Te=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:r)},html:e=>{G(null!=e?e:o)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{ee(null===e?u:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:h)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ne(null===e?v:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{le(null===e?w:"true"===e)},hidden:e=>{se(null===e?x:"true"===e)},"class-name":e=>{ye(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,d.useEffect)((()=>{$(r)}),[r]),(0,d.useEffect)((()=>{G(o)}),[o]),(0,d.useEffect)((()=>{Y(c)}),[c]),(0,d.useEffect)((()=>{J(s)}),[s]),(0,d.useEffect)((()=>{ee(u)}),[u]),(0,d.useEffect)((()=>{ne(v)}),[v]),(0,d.useEffect)((()=>{oe(b)}),[b]),(0,d.useEffect)((()=>{le(w)}),[w]),(0,d.useEffect)((()=>{se(x)}),[x]),(0,d.useEffect)((()=>{he(y)}),[y]),(0,d.useEffect)((()=>{we.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,d.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,d.useEffect)((()=>{var r;const o=new Set(Ee);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(r=null!=ve?ve:l)&&void 0!==r?r:_e.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(a);Te(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Se(a);Te(e),s.observe(a,c)}return()=>{s.disconnect()}}),[Ee,_e,ve,t,n]),(0,d.useEffect)((()=>{(null==R?void 0:R.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!xe("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==R?void 0:R.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!xe("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Ae=(0,d.useRef)(null);if(i){const e=i({content:(null==ve?void 0:ve.getAttribute("data-tooltip-content"))||U||null,activeAnchor:ve});ke=e?d.createElement("div",{ref:Ae,className:"react-tooltip-content-wrapper"},e):null}else U&&(ke=U);X&&(ke=d.createElement(Ie,{content:X}));const Oe={forwardRef:W,id:e,anchorId:t,anchorSelect:n,className:ge(l,me),classNameArrow:a,content:ke,contentWrapperRef:Ae,place:K,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:m,positionStrategy:pe,middlewares:g,delayShow:te,delayHide:re,float:ie,hidden:ae,noArrow:E,clickable:_,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:O,globalCloseEvents:C,imperativeModeOnly:N,style:R,position:L,isOpen:j,defaultIsOpen:P,border:D,opacity:M,arrowColor:F,setIsOpen:B,afterShow:z,afterHide:H,disableTooltip:V,activeAnchor:ve,setActiveAnchor:e=>be(e),role:q};return d.createElement(Pe,{...Oe})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||be({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||be({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const Me=window.wp.components,Fe=({onlineEventLinkDefault:e=""})=>{const t=(0,a.__)("Online event","gatherpress"),[r,i]=(0,n.useState)(e);return((e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}})({setOnlineEventLink:i},s("eventDetails.postId")),(0,o.jsxs)(Me.Flex,{justify:"normal",gap:"3",children:[(0,o.jsx)(Me.FlexItem,{display:"flex",children:(0,o.jsx)(Me.Icon,{icon:"video-alt2"})}),(0,o.jsxs)(Me.FlexItem,{children:[!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,a.__)("Link available for attendees only.","gatherpress"),children:t}),(0,o.jsx)(De,{id:"gatherpress-online-event-tooltip"})]}),r&&(0,o.jsx)("a",{href:r,rel:"noreferrer",target:"_blank",children:t})]})]})};var Be=l(442);const ze=Be.default||Be,He=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,o.jsxs)(o.Fragment,{children:[(e||t)&&(0,o.jsxs)(Me.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,o.jsx)(Me.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Me.Icon,{icon:"location"})}),(0,o.jsxs)(Me.FlexItem,{children:[e&&(0,o.jsx)("div",{className:"gatherpress-venue__name",children:(0,o.jsx)("strong",{children:ze(e)})}),t&&(0,o.jsx)("div",{className:"gatherpress-venue__full-address",children:ze(t)})]})]}),(n||r)&&(0,o.jsxs)(Me.Flex,{justify:"normal",gap:"8",children:[n&&(0,o.jsx)(Me.FlexItem,{children:(0,o.jsxs)(Me.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Me.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Me.Icon,{icon:"phone"})}),(0,o.jsx)(Me.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,o.jsx)(Me.FlexItem,{children:(0,o.jsxs)(Me.Flex,{justify:"normal",gap:"4",children:[(0,o.jsx)(Me.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,o.jsx)(Me.Icon,{icon:"admin-site-alt3"})}),(0,o.jsx)(Me.FlexItem,{children:(0,o.jsx)("div",{className:"gatherpress-venue__website",children:(0,o.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Ve=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:i=!1,onlineEventLink:l=""})=>(0,o.jsxs)(o.Fragment,{children:[!i&&(0,o.jsx)(He,{name:e,fullAddress:t,phoneNumber:n,website:r}),i&&(0,o.jsx)(Fe,{onlineEventLinkDefault:l})]});t()((()=>{let e=document.querySelectorAll('[data-gatherpress_block_name="venue"]');for(let c=0;c { + +module.exports = __webpack_require__.p + "images/marker-icon-2x.png"; + +/***/ }) + +}]); }) + +}]); \ No newline at end of file diff --git a/build/node_modules_leaflet_dist_images_marker-shadow_png.js b/build/node_modules_leaflet_dist_images_marker-shadow_png.js new file mode 100644 index 000000000..b77c64557 --- /dev/null +++ b/build/node_modules_leaflet_dist_images_marker-shadow_png.js @@ -0,0 +1,14 @@ +"use strict"; +(self["webpackChunkgatherpress"] = self["webpackChunkgatherpress"] || []).push([["node_modules_leaflet_dist_images_marker-shadow_png"],{ + +/***/ "./node_modules/leaflet/dist/images/marker-shadow.png": +/*!************************************************************!*\ + !*** ./node_modules/leaflet/dist/images/marker-shadow.png ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +module.exports = __webpack_require__.p + "images/marker-shadow.png"; + +/***/ }) + +}]); \ No newline at end of file diff --git a/build/node_modules_leaflet_dist_leaflet_css.js b/build/node_modules_leaflet_dist_leaflet_css.js new file mode 100644 index 000000000..162ff7db8 --- /dev/null +++ b/build/node_modules_leaflet_dist_leaflet_css.js @@ -0,0 +1,17 @@ +"use strict"; +(self["webpackChunkgatherpress"] = self["webpackChunkgatherpress"] || []).push([["node_modules_leaflet_dist_leaflet_css"],{ + +/***/ "./node_modules/leaflet/dist/leaflet.css": +/*!***********************************************!*\ + !*** ./node_modules/leaflet/dist/leaflet.css ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }) + +}]); +//# sourceMappingURL=node_modules_leaflet_dist_leaflet_css.js.map?v=9705a50f3239fb4bf2f7 \ No newline at end of file diff --git a/build/profile_style.asset.php b/build/profile_style.asset.php index 3f9a49084..2d54075af 100644 --- a/build/profile_style.asset.php +++ b/build/profile_style.asset.php @@ -1 +1 @@ - array(), 'version' => '15d01c9dc99209264b1e'); + array(), 'version' => 'b22085380615508e848f'); diff --git a/build/profile_style.js b/build/profile_style.js index a1d338b51..16ac8fb68 100644 --- a/build/profile_style.js +++ b/build/profile_style.js @@ -1 +1 @@ -(()=>{"use strict";var r,e={9724:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var s=1/0;for(p=0;p=n)&&Object.keys(t.O).every((r=>t.O[r](o[l])))?o.splice(l--,1):(i=!1,n0&&r[p-1][2]>n;p--)r[p]=r[p-1];r[p]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={604:0,739:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[s,i,l]=o,v=0;if(s.some((e=>0!==r[e]))){for(a in i)t.o(i,a)&&(t.m[a]=i[a]);if(l)var p=l(t)}for(e&&e(o);vt(9724)));a=t.O(a)})(); \ No newline at end of file +(()=>{"use strict";var r,e={9488:()=>{}},t={};function o(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.m=e,r=[],o.O=(e,t,a,n)=>{if(!t){var s=1/0;for(f=0;f=n)&&Object.keys(o.O).every((r=>o.O[r](t[v])))?t.splice(v--,1):(i=!1,n0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[t,a,n]},o.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={604:0,739:0};o.O.j=e=>0===r[e];var e=(e,t)=>{var a,n,s=t[0],i=t[1],v=t[2],p=0;if(s.some((e=>0!==r[e]))){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(v)var f=v(o)}for(e&&e(t);po(9488)));a=o.O(a)})(); \ No newline at end of file diff --git a/build/settings_style.asset.php b/build/settings_style.asset.php index fabc2e186..475d83ed3 100644 --- a/build/settings_style.asset.php +++ b/build/settings_style.asset.php @@ -1 +1 @@ - array(), 'version' => '9c37901c158173551201'); + array(), 'version' => '84778738e904eca6ddf2'); diff --git a/build/settings_style.js b/build/settings_style.js index 98f6063f1..d6fd1dd92 100644 --- a/build/settings_style.js +++ b/build/settings_style.js @@ -1 +1 @@ -(()=>{"use strict";var r,e={4818:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var s=1/0;for(p=0;p=n)&&Object.keys(t.O).every((r=>t.O[r](o[l])))?o.splice(l--,1):(i=!1,n0&&r[p-1][2]>n;p--)r[p]=r[p-1];r[p]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={506:0,835:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[s,i,l]=o,v=0;if(s.some((e=>0!==r[e]))){for(a in i)t.o(i,a)&&(t.m[a]=i[a]);if(l)var p=l(t)}for(e&&e(o);vt(4818)));a=t.O(a)})(); \ No newline at end of file +(()=>{"use strict";var r,e={8518:()=>{}},t={};function o(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.m=e,r=[],o.O=(e,t,a,n)=>{if(!t){var s=1/0;for(f=0;f=n)&&Object.keys(o.O).every((r=>o.O[r](t[v])))?t.splice(v--,1):(i=!1,n0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[t,a,n]},o.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={506:0,835:0};o.O.j=e=>0===r[e];var e=(e,t)=>{var a,n,s=t[0],i=t[1],v=t[2],p=0;if(s.some((e=>0!==r[e]))){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(v)var f=v(o)}for(e&&e(t);po(8518)));a=o.O(a)})(); \ No newline at end of file diff --git a/build/vendors-node_modules_leaflet_dist_leaflet-src_js.js b/build/vendors-node_modules_leaflet_dist_leaflet-src_js.js new file mode 100644 index 000000000..5c6704283 --- /dev/null +++ b/build/vendors-node_modules_leaflet_dist_leaflet-src_js.js @@ -0,0 +1,14525 @@ +(self["webpackChunkgatherpress"] = self["webpackChunkgatherpress"] || []).push([["vendors-node_modules_leaflet_dist_leaflet-src_js"],{ + +/***/ "./node_modules/leaflet/dist/leaflet-src.js": +/*!**************************************************!*\ + !*** ./node_modules/leaflet/dist/leaflet-src.js ***! + \**************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ + +(function (global, factory) { + true ? factory(exports) : + 0; +})(this, (function (exports) { 'use strict'; + + var version = "1.9.4"; + + /* + * @namespace Util + * + * Various utility functions, used by Leaflet internally. + */ + + // @function extend(dest: Object, src?: Object): Object + // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut. + function extend(dest) { + var i, j, len, src; + + for (j = 1, len = arguments.length; j < len; j++) { + src = arguments[j]; + for (i in src) { + dest[i] = src[i]; + } + } + return dest; + } + + // @function create(proto: Object, properties?: Object): Object + // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create) + var create$2 = Object.create || (function () { + function F() {} + return function (proto) { + F.prototype = proto; + return new F(); + }; + })(); + + // @function bind(fn: Function, …): Function + // Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). + // Has a `L.bind()` shortcut. + function bind(fn, obj) { + var slice = Array.prototype.slice; + + if (fn.bind) { + return fn.bind.apply(fn, slice.call(arguments, 1)); + } + + var args = slice.call(arguments, 2); + + return function () { + return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments); + }; + } + + // @property lastId: Number + // Last unique ID used by [`stamp()`](#util-stamp) + var lastId = 0; + + // @function stamp(obj: Object): Number + // Returns the unique ID of an object, assigning it one if it doesn't have it. + function stamp(obj) { + if (!('_leaflet_id' in obj)) { + obj['_leaflet_id'] = ++lastId; + } + return obj._leaflet_id; + } + + // @function throttle(fn: Function, time: Number, context: Object): Function + // Returns a function which executes function `fn` with the given scope `context` + // (so that the `this` keyword refers to `context` inside `fn`'s code). The function + // `fn` will be called no more than one time per given amount of `time`. The arguments + // received by the bound function will be any arguments passed when binding the + // function, followed by any arguments passed when invoking the bound function. + // Has an `L.throttle` shortcut. + function throttle(fn, time, context) { + var lock, args, wrapperFn, later; + + later = function () { + // reset lock and call if queued + lock = false; + if (args) { + wrapperFn.apply(context, args); + args = false; + } + }; + + wrapperFn = function () { + if (lock) { + // called too soon, queue to call later + args = arguments; + + } else { + // call and lock until later + fn.apply(context, arguments); + setTimeout(later, time); + lock = true; + } + }; + + return wrapperFn; + } + + // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number + // Returns the number `num` modulo `range` in such a way so it lies within + // `range[0]` and `range[1]`. The returned value will be always smaller than + // `range[1]` unless `includeMax` is set to `true`. + function wrapNum(x, range, includeMax) { + var max = range[1], + min = range[0], + d = max - min; + return x === max && includeMax ? x : ((x - min) % d + d) % d + min; + } + + // @function falseFn(): Function + // Returns a function which always returns `false`. + function falseFn() { return false; } + + // @function formatNum(num: Number, precision?: Number|false): Number + // Returns the number `num` rounded with specified `precision`. + // The default `precision` value is 6 decimal places. + // `false` can be passed to skip any processing (can be useful to avoid round-off errors). + function formatNum(num, precision) { + if (precision === false) { return num; } + var pow = Math.pow(10, precision === undefined ? 6 : precision); + return Math.round(num * pow) / pow; + } + + // @function trim(str: String): String + // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) + function trim(str) { + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); + } + + // @function splitWords(str: String): String[] + // Trims and splits the string on whitespace and returns the array of parts. + function splitWords(str) { + return trim(str).split(/\s+/); + } + + // @function setOptions(obj: Object, options: Object): Object + // Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut. + function setOptions(obj, options) { + if (!Object.prototype.hasOwnProperty.call(obj, 'options')) { + obj.options = obj.options ? create$2(obj.options) : {}; + } + for (var i in options) { + obj.options[i] = options[i]; + } + return obj.options; + } + + // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String + // Converts an object into a parameter URL string, e.g. `{a: "foo", b: "bar"}` + // translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will + // be appended at the end. If `uppercase` is `true`, the parameter names will + // be uppercased (e.g. `'?A=foo&B=bar'`) + function getParamString(obj, existingUrl, uppercase) { + var params = []; + for (var i in obj) { + params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i])); + } + return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); + } + + var templateRe = /\{ *([\w_ -]+) *\}/g; + + // @function template(str: String, data: Object): String + // Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'` + // and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string + // `('Hello foo, bar')`. You can also specify functions instead of strings for + // data values — they will be evaluated passing `data` as an argument. + function template(str, data) { + return str.replace(templateRe, function (str, key) { + var value = data[key]; + + if (value === undefined) { + throw new Error('No value provided for variable ' + str); + + } else if (typeof value === 'function') { + value = value(data); + } + return value; + }); + } + + // @function isArray(obj): Boolean + // Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) + var isArray = Array.isArray || function (obj) { + return (Object.prototype.toString.call(obj) === '[object Array]'); + }; + + // @function indexOf(array: Array, el: Object): Number + // Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) + function indexOf(array, el) { + for (var i = 0; i < array.length; i++) { + if (array[i] === el) { return i; } + } + return -1; + } + + // @property emptyImageUrl: String + // Data URI string containing a base64-encoded empty GIF image. + // Used as a hack to free memory from unused images on WebKit-powered + // mobile devices (by setting image `src` to this string). + var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; + + // inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/ + + function getPrefixed(name) { + return window['webkit' + name] || window['moz' + name] || window['ms' + name]; + } + + var lastTime = 0; + + // fallback for IE 7-8 + function timeoutDefer(fn) { + var time = +new Date(), + timeToCall = Math.max(0, 16 - (time - lastTime)); + + lastTime = time + timeToCall; + return window.setTimeout(fn, timeToCall); + } + + var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer; + var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || + getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); }; + + // @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number + // Schedules `fn` to be executed when the browser repaints. `fn` is bound to + // `context` if given. When `immediate` is set, `fn` is called immediately if + // the browser doesn't have native support for + // [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame), + // otherwise it's delayed. Returns a request ID that can be used to cancel the request. + function requestAnimFrame(fn, context, immediate) { + if (immediate && requestFn === timeoutDefer) { + fn.call(context); + } else { + return requestFn.call(window, bind(fn, context)); + } + } + + // @function cancelAnimFrame(id: Number): undefined + // Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame). + function cancelAnimFrame(id) { + if (id) { + cancelFn.call(window, id); + } + } + + var Util = { + __proto__: null, + extend: extend, + create: create$2, + bind: bind, + get lastId () { return lastId; }, + stamp: stamp, + throttle: throttle, + wrapNum: wrapNum, + falseFn: falseFn, + formatNum: formatNum, + trim: trim, + splitWords: splitWords, + setOptions: setOptions, + getParamString: getParamString, + template: template, + isArray: isArray, + indexOf: indexOf, + emptyImageUrl: emptyImageUrl, + requestFn: requestFn, + cancelFn: cancelFn, + requestAnimFrame: requestAnimFrame, + cancelAnimFrame: cancelAnimFrame + }; + + // @class Class + // @aka L.Class + + // @section + // @uninheritable + + // Thanks to John Resig and Dean Edwards for inspiration! + + function Class() {} + + Class.extend = function (props) { + + // @function extend(props: Object): Function + // [Extends the current class](#class-inheritance) given the properties to be included. + // Returns a Javascript function that is a class constructor (to be called with `new`). + var NewClass = function () { + + setOptions(this); + + // call the constructor + if (this.initialize) { + this.initialize.apply(this, arguments); + } + + // call all constructor hooks + this.callInitHooks(); + }; + + var parentProto = NewClass.__super__ = this.prototype; + + var proto = create$2(parentProto); + proto.constructor = NewClass; + + NewClass.prototype = proto; + + // inherit parent's statics + for (var i in this) { + if (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') { + NewClass[i] = this[i]; + } + } + + // mix static properties into the class + if (props.statics) { + extend(NewClass, props.statics); + } + + // mix includes into the prototype + if (props.includes) { + checkDeprecatedMixinEvents(props.includes); + extend.apply(null, [proto].concat(props.includes)); + } + + // mix given properties into the prototype + extend(proto, props); + delete proto.statics; + delete proto.includes; + + // merge options + if (proto.options) { + proto.options = parentProto.options ? create$2(parentProto.options) : {}; + extend(proto.options, props.options); + } + + proto._initHooks = []; + + // add method for calling all hooks + proto.callInitHooks = function () { + + if (this._initHooksCalled) { return; } + + if (parentProto.callInitHooks) { + parentProto.callInitHooks.call(this); + } + + this._initHooksCalled = true; + + for (var i = 0, len = proto._initHooks.length; i < len; i++) { + proto._initHooks[i].call(this); + } + }; + + return NewClass; + }; + + + // @function include(properties: Object): this + // [Includes a mixin](#class-includes) into the current class. + Class.include = function (props) { + var parentOptions = this.prototype.options; + extend(this.prototype, props); + if (props.options) { + this.prototype.options = parentOptions; + this.mergeOptions(props.options); + } + return this; + }; + + // @function mergeOptions(options: Object): this + // [Merges `options`](#class-options) into the defaults of the class. + Class.mergeOptions = function (options) { + extend(this.prototype.options, options); + return this; + }; + + // @function addInitHook(fn: Function): this + // Adds a [constructor hook](#class-constructor-hooks) to the class. + Class.addInitHook = function (fn) { // (Function) || (String, args...) + var args = Array.prototype.slice.call(arguments, 1); + + var init = typeof fn === 'function' ? fn : function () { + this[fn].apply(this, args); + }; + + this.prototype._initHooks = this.prototype._initHooks || []; + this.prototype._initHooks.push(init); + return this; + }; + + function checkDeprecatedMixinEvents(includes) { + /* global L: true */ + if (typeof L === 'undefined' || !L || !L.Mixin) { return; } + + includes = isArray(includes) ? includes : [includes]; + + for (var i = 0; i < includes.length; i++) { + if (includes[i] === L.Mixin.Events) { + console.warn('Deprecated include of L.Mixin.Events: ' + + 'this property will be removed in future releases, ' + + 'please inherit from L.Evented instead.', new Error().stack); + } + } + } + + /* + * @class Evented + * @aka L.Evented + * @inherits Class + * + * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event). + * + * @example + * + * ```js + * map.on('click', function(e) { + * alert(e.latlng); + * } ); + * ``` + * + * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: + * + * ```js + * function onClick(e) { ... } + * + * map.on('click', onClick); + * map.off('click', onClick); + * ``` + */ + + var Events = { + /* @method on(type: String, fn: Function, context?: Object): this + * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`). + * + * @alternative + * @method on(eventMap: Object): this + * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` + */ + on: function (types, fn, context) { + + // types can be a map of types/handlers + if (typeof types === 'object') { + for (var type in types) { + // we don't process space-separated events here for performance; + // it's a hot path since Layer uses the on(obj) syntax + this._on(type, types[type], fn); + } + + } else { + // types can be a string of space-separated words + types = splitWords(types); + + for (var i = 0, len = types.length; i < len; i++) { + this._on(types[i], fn, context); + } + } + + return this; + }, + + /* @method off(type: String, fn?: Function, context?: Object): this + * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener. + * + * @alternative + * @method off(eventMap: Object): this + * Removes a set of type/listener pairs. + * + * @alternative + * @method off: this + * Removes all listeners to all events on the object. This includes implicitly attached events. + */ + off: function (types, fn, context) { + + if (!arguments.length) { + // clear all listeners if called without arguments + delete this._events; + + } else if (typeof types === 'object') { + for (var type in types) { + this._off(type, types[type], fn); + } + + } else { + types = splitWords(types); + + var removeAll = arguments.length === 1; + for (var i = 0, len = types.length; i < len; i++) { + if (removeAll) { + this._off(types[i]); + } else { + this._off(types[i], fn, context); + } + } + } + + return this; + }, + + // attach listener (without syntactic sugar now) + _on: function (type, fn, context, _once) { + if (typeof fn !== 'function') { + console.warn('wrong listener type: ' + typeof fn); + return; + } + + // check if fn already there + if (this._listens(type, fn, context) !== false) { + return; + } + + if (context === this) { + // Less memory footprint. + context = undefined; + } + + var newListener = {fn: fn, ctx: context}; + if (_once) { + newListener.once = true; + } + + this._events = this._events || {}; + this._events[type] = this._events[type] || []; + this._events[type].push(newListener); + }, + + _off: function (type, fn, context) { + var listeners, + i, + len; + + if (!this._events) { + return; + } + + listeners = this._events[type]; + if (!listeners) { + return; + } + + if (arguments.length === 1) { // remove all + if (this._firingCount) { + // Set all removed listeners to noop + // so they are not called if remove happens in fire + for (i = 0, len = listeners.length; i < len; i++) { + listeners[i].fn = falseFn; + } + } + // clear all listeners for a type if function isn't specified + delete this._events[type]; + return; + } + + if (typeof fn !== 'function') { + console.warn('wrong listener type: ' + typeof fn); + return; + } + + // find fn and remove it + var index = this._listens(type, fn, context); + if (index !== false) { + var listener = listeners[index]; + if (this._firingCount) { + // set the removed listener to noop so that's not called if remove happens in fire + listener.fn = falseFn; + + /* copy array in case events are being fired */ + this._events[type] = listeners = listeners.slice(); + } + listeners.splice(index, 1); + } + }, + + // @method fire(type: String, data?: Object, propagate?: Boolean): this + // Fires an event of the specified type. You can optionally provide a data + // object — the first argument of the listener function will contain its + // properties. The event can optionally be propagated to event parents. + fire: function (type, data, propagate) { + if (!this.listens(type, propagate)) { return this; } + + var event = extend({}, data, { + type: type, + target: this, + sourceTarget: data && data.sourceTarget || this + }); + + if (this._events) { + var listeners = this._events[type]; + if (listeners) { + this._firingCount = (this._firingCount + 1) || 1; + for (var i = 0, len = listeners.length; i < len; i++) { + var l = listeners[i]; + // off overwrites l.fn, so we need to copy fn to a var + var fn = l.fn; + if (l.once) { + this.off(type, fn, l.ctx); + } + fn.call(l.ctx || this, event); + } + + this._firingCount--; + } + } + + if (propagate) { + // propagate the event to parents (set with addEventParent) + this._propagateEvent(event); + } + + return this; + }, + + // @method listens(type: String, propagate?: Boolean): Boolean + // @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean + // Returns `true` if a particular event type has any listeners attached to it. + // The verification can optionally be propagated, it will return `true` if parents have the listener attached to it. + listens: function (type, fn, context, propagate) { + if (typeof type !== 'string') { + console.warn('"string" type argument expected'); + } + + // we don't overwrite the input `fn` value, because we need to use it for propagation + var _fn = fn; + if (typeof fn !== 'function') { + propagate = !!fn; + _fn = undefined; + context = undefined; + } + + var listeners = this._events && this._events[type]; + if (listeners && listeners.length) { + if (this._listens(type, _fn, context) !== false) { + return true; + } + } + + if (propagate) { + // also check parents for listeners if event propagates + for (var id in this._eventParents) { + if (this._eventParents[id].listens(type, fn, context, propagate)) { return true; } + } + } + return false; + }, + + // returns the index (number) or false + _listens: function (type, fn, context) { + if (!this._events) { + return false; + } + + var listeners = this._events[type] || []; + if (!fn) { + return !!listeners.length; + } + + if (context === this) { + // Less memory footprint. + context = undefined; + } + + for (var i = 0, len = listeners.length; i < len; i++) { + if (listeners[i].fn === fn && listeners[i].ctx === context) { + return i; + } + } + return false; + + }, + + // @method once(…): this + // Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed. + once: function (types, fn, context) { + + // types can be a map of types/handlers + if (typeof types === 'object') { + for (var type in types) { + // we don't process space-separated events here for performance; + // it's a hot path since Layer uses the on(obj) syntax + this._on(type, types[type], fn, true); + } + + } else { + // types can be a string of space-separated words + types = splitWords(types); + + for (var i = 0, len = types.length; i < len; i++) { + this._on(types[i], fn, context, true); + } + } + + return this; + }, + + // @method addEventParent(obj: Evented): this + // Adds an event parent - an `Evented` that will receive propagated events + addEventParent: function (obj) { + this._eventParents = this._eventParents || {}; + this._eventParents[stamp(obj)] = obj; + return this; + }, + + // @method removeEventParent(obj: Evented): this + // Removes an event parent, so it will stop receiving propagated events + removeEventParent: function (obj) { + if (this._eventParents) { + delete this._eventParents[stamp(obj)]; + } + return this; + }, + + _propagateEvent: function (e) { + for (var id in this._eventParents) { + this._eventParents[id].fire(e.type, extend({ + layer: e.target, + propagatedFrom: e.target + }, e), true); + } + } + }; + + // aliases; we should ditch those eventually + + // @method addEventListener(…): this + // Alias to [`on(…)`](#evented-on) + Events.addEventListener = Events.on; + + // @method removeEventListener(…): this + // Alias to [`off(…)`](#evented-off) + + // @method clearAllEventListeners(…): this + // Alias to [`off()`](#evented-off) + Events.removeEventListener = Events.clearAllEventListeners = Events.off; + + // @method addOneTimeEventListener(…): this + // Alias to [`once(…)`](#evented-once) + Events.addOneTimeEventListener = Events.once; + + // @method fireEvent(…): this + // Alias to [`fire(…)`](#evented-fire) + Events.fireEvent = Events.fire; + + // @method hasEventListeners(…): Boolean + // Alias to [`listens(…)`](#evented-listens) + Events.hasEventListeners = Events.listens; + + var Evented = Class.extend(Events); + + /* + * @class Point + * @aka L.Point + * + * Represents a point with `x` and `y` coordinates in pixels. + * + * @example + * + * ```js + * var point = L.point(200, 300); + * ``` + * + * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent: + * + * ```js + * map.panBy([200, 300]); + * map.panBy(L.point(200, 300)); + * ``` + * + * Note that `Point` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + + function Point(x, y, round) { + // @property x: Number; The `x` coordinate of the point + this.x = (round ? Math.round(x) : x); + // @property y: Number; The `y` coordinate of the point + this.y = (round ? Math.round(y) : y); + } + + var trunc = Math.trunc || function (v) { + return v > 0 ? Math.floor(v) : Math.ceil(v); + }; + + Point.prototype = { + + // @method clone(): Point + // Returns a copy of the current point. + clone: function () { + return new Point(this.x, this.y); + }, + + // @method add(otherPoint: Point): Point + // Returns the result of addition of the current and the given points. + add: function (point) { + // non-destructive, returns a new point + return this.clone()._add(toPoint(point)); + }, + + _add: function (point) { + // destructive, used directly for performance in situations where it's safe to modify existing point + this.x += point.x; + this.y += point.y; + return this; + }, + + // @method subtract(otherPoint: Point): Point + // Returns the result of subtraction of the given point from the current. + subtract: function (point) { + return this.clone()._subtract(toPoint(point)); + }, + + _subtract: function (point) { + this.x -= point.x; + this.y -= point.y; + return this; + }, + + // @method divideBy(num: Number): Point + // Returns the result of division of the current point by the given number. + divideBy: function (num) { + return this.clone()._divideBy(num); + }, + + _divideBy: function (num) { + this.x /= num; + this.y /= num; + return this; + }, + + // @method multiplyBy(num: Number): Point + // Returns the result of multiplication of the current point by the given number. + multiplyBy: function (num) { + return this.clone()._multiplyBy(num); + }, + + _multiplyBy: function (num) { + this.x *= num; + this.y *= num; + return this; + }, + + // @method scaleBy(scale: Point): Point + // Multiply each coordinate of the current point by each coordinate of + // `scale`. In linear algebra terms, multiply the point by the + // [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation) + // defined by `scale`. + scaleBy: function (point) { + return new Point(this.x * point.x, this.y * point.y); + }, + + // @method unscaleBy(scale: Point): Point + // Inverse of `scaleBy`. Divide each coordinate of the current point by + // each coordinate of `scale`. + unscaleBy: function (point) { + return new Point(this.x / point.x, this.y / point.y); + }, + + // @method round(): Point + // Returns a copy of the current point with rounded coordinates. + round: function () { + return this.clone()._round(); + }, + + _round: function () { + this.x = Math.round(this.x); + this.y = Math.round(this.y); + return this; + }, + + // @method floor(): Point + // Returns a copy of the current point with floored coordinates (rounded down). + floor: function () { + return this.clone()._floor(); + }, + + _floor: function () { + this.x = Math.floor(this.x); + this.y = Math.floor(this.y); + return this; + }, + + // @method ceil(): Point + // Returns a copy of the current point with ceiled coordinates (rounded up). + ceil: function () { + return this.clone()._ceil(); + }, + + _ceil: function () { + this.x = Math.ceil(this.x); + this.y = Math.ceil(this.y); + return this; + }, + + // @method trunc(): Point + // Returns a copy of the current point with truncated coordinates (rounded towards zero). + trunc: function () { + return this.clone()._trunc(); + }, + + _trunc: function () { + this.x = trunc(this.x); + this.y = trunc(this.y); + return this; + }, + + // @method distanceTo(otherPoint: Point): Number + // Returns the cartesian distance between the current and the given points. + distanceTo: function (point) { + point = toPoint(point); + + var x = point.x - this.x, + y = point.y - this.y; + + return Math.sqrt(x * x + y * y); + }, + + // @method equals(otherPoint: Point): Boolean + // Returns `true` if the given point has the same coordinates. + equals: function (point) { + point = toPoint(point); + + return point.x === this.x && + point.y === this.y; + }, + + // @method contains(otherPoint: Point): Boolean + // Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values). + contains: function (point) { + point = toPoint(point); + + return Math.abs(point.x) <= Math.abs(this.x) && + Math.abs(point.y) <= Math.abs(this.y); + }, + + // @method toString(): String + // Returns a string representation of the point for debugging purposes. + toString: function () { + return 'Point(' + + formatNum(this.x) + ', ' + + formatNum(this.y) + ')'; + } + }; + + // @factory L.point(x: Number, y: Number, round?: Boolean) + // Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values. + + // @alternative + // @factory L.point(coords: Number[]) + // Expects an array of the form `[x, y]` instead. + + // @alternative + // @factory L.point(coords: Object) + // Expects a plain object of the form `{x: Number, y: Number}` instead. + function toPoint(x, y, round) { + if (x instanceof Point) { + return x; + } + if (isArray(x)) { + return new Point(x[0], x[1]); + } + if (x === undefined || x === null) { + return x; + } + if (typeof x === 'object' && 'x' in x && 'y' in x) { + return new Point(x.x, x.y); + } + return new Point(x, y, round); + } + + /* + * @class Bounds + * @aka L.Bounds + * + * Represents a rectangular area in pixel coordinates. + * + * @example + * + * ```js + * var p1 = L.point(10, 10), + * p2 = L.point(40, 60), + * bounds = L.bounds(p1, p2); + * ``` + * + * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: + * + * ```js + * otherBounds.intersects([[10, 10], [40, 60]]); + * ``` + * + * Note that `Bounds` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + + function Bounds(a, b) { + if (!a) { return; } + + var points = b ? [a, b] : a; + + for (var i = 0, len = points.length; i < len; i++) { + this.extend(points[i]); + } + } + + Bounds.prototype = { + // @method extend(point: Point): this + // Extends the bounds to contain the given point. + + // @alternative + // @method extend(otherBounds: Bounds): this + // Extend the bounds to contain the given bounds + extend: function (obj) { + var min2, max2; + if (!obj) { return this; } + + if (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) { + min2 = max2 = toPoint(obj); + } else { + obj = toBounds(obj); + min2 = obj.min; + max2 = obj.max; + + if (!min2 || !max2) { return this; } + } + + // @property min: Point + // The top left corner of the rectangle. + // @property max: Point + // The bottom right corner of the rectangle. + if (!this.min && !this.max) { + this.min = min2.clone(); + this.max = max2.clone(); + } else { + this.min.x = Math.min(min2.x, this.min.x); + this.max.x = Math.max(max2.x, this.max.x); + this.min.y = Math.min(min2.y, this.min.y); + this.max.y = Math.max(max2.y, this.max.y); + } + return this; + }, + + // @method getCenter(round?: Boolean): Point + // Returns the center point of the bounds. + getCenter: function (round) { + return toPoint( + (this.min.x + this.max.x) / 2, + (this.min.y + this.max.y) / 2, round); + }, + + // @method getBottomLeft(): Point + // Returns the bottom-left point of the bounds. + getBottomLeft: function () { + return toPoint(this.min.x, this.max.y); + }, + + // @method getTopRight(): Point + // Returns the top-right point of the bounds. + getTopRight: function () { // -> Point + return toPoint(this.max.x, this.min.y); + }, + + // @method getTopLeft(): Point + // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)). + getTopLeft: function () { + return this.min; // left, top + }, + + // @method getBottomRight(): Point + // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)). + getBottomRight: function () { + return this.max; // right, bottom + }, + + // @method getSize(): Point + // Returns the size of the given bounds + getSize: function () { + return this.max.subtract(this.min); + }, + + // @method contains(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle contains the given one. + // @alternative + // @method contains(point: Point): Boolean + // Returns `true` if the rectangle contains the given point. + contains: function (obj) { + var min, max; + + if (typeof obj[0] === 'number' || obj instanceof Point) { + obj = toPoint(obj); + } else { + obj = toBounds(obj); + } + + if (obj instanceof Bounds) { + min = obj.min; + max = obj.max; + } else { + min = max = obj; + } + + return (min.x >= this.min.x) && + (max.x <= this.max.x) && + (min.y >= this.min.y) && + (max.y <= this.max.y); + }, + + // @method intersects(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle intersects the given bounds. Two bounds + // intersect if they have at least one point in common. + intersects: function (bounds) { // (Bounds) -> Boolean + bounds = toBounds(bounds); + + var min = this.min, + max = this.max, + min2 = bounds.min, + max2 = bounds.max, + xIntersects = (max2.x >= min.x) && (min2.x <= max.x), + yIntersects = (max2.y >= min.y) && (min2.y <= max.y); + + return xIntersects && yIntersects; + }, + + // @method overlaps(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle overlaps the given bounds. Two bounds + // overlap if their intersection is an area. + overlaps: function (bounds) { // (Bounds) -> Boolean + bounds = toBounds(bounds); + + var min = this.min, + max = this.max, + min2 = bounds.min, + max2 = bounds.max, + xOverlaps = (max2.x > min.x) && (min2.x < max.x), + yOverlaps = (max2.y > min.y) && (min2.y < max.y); + + return xOverlaps && yOverlaps; + }, + + // @method isValid(): Boolean + // Returns `true` if the bounds are properly initialized. + isValid: function () { + return !!(this.min && this.max); + }, + + + // @method pad(bufferRatio: Number): Bounds + // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. + // For example, a ratio of 0.5 extends the bounds by 50% in each direction. + // Negative values will retract the bounds. + pad: function (bufferRatio) { + var min = this.min, + max = this.max, + heightBuffer = Math.abs(min.x - max.x) * bufferRatio, + widthBuffer = Math.abs(min.y - max.y) * bufferRatio; + + + return toBounds( + toPoint(min.x - heightBuffer, min.y - widthBuffer), + toPoint(max.x + heightBuffer, max.y + widthBuffer)); + }, + + + // @method equals(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle is equivalent to the given bounds. + equals: function (bounds) { + if (!bounds) { return false; } + + bounds = toBounds(bounds); + + return this.min.equals(bounds.getTopLeft()) && + this.max.equals(bounds.getBottomRight()); + }, + }; + + + // @factory L.bounds(corner1: Point, corner2: Point) + // Creates a Bounds object from two corners coordinate pairs. + // @alternative + // @factory L.bounds(points: Point[]) + // Creates a Bounds object from the given array of points. + function toBounds(a, b) { + if (!a || a instanceof Bounds) { + return a; + } + return new Bounds(a, b); + } + + /* + * @class LatLngBounds + * @aka L.LatLngBounds + * + * Represents a rectangular geographical area on a map. + * + * @example + * + * ```js + * var corner1 = L.latLng(40.712, -74.227), + * corner2 = L.latLng(40.774, -74.125), + * bounds = L.latLngBounds(corner1, corner2); + * ``` + * + * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: + * + * ```js + * map.fitBounds([ + * [40.712, -74.227], + * [40.774, -74.125] + * ]); + * ``` + * + * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range. + * + * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + + function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[]) + if (!corner1) { return; } + + var latlngs = corner2 ? [corner1, corner2] : corner1; + + for (var i = 0, len = latlngs.length; i < len; i++) { + this.extend(latlngs[i]); + } + } + + LatLngBounds.prototype = { + + // @method extend(latlng: LatLng): this + // Extend the bounds to contain the given point + + // @alternative + // @method extend(otherBounds: LatLngBounds): this + // Extend the bounds to contain the given bounds + extend: function (obj) { + var sw = this._southWest, + ne = this._northEast, + sw2, ne2; + + if (obj instanceof LatLng) { + sw2 = obj; + ne2 = obj; + + } else if (obj instanceof LatLngBounds) { + sw2 = obj._southWest; + ne2 = obj._northEast; + + if (!sw2 || !ne2) { return this; } + + } else { + return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this; + } + + if (!sw && !ne) { + this._southWest = new LatLng(sw2.lat, sw2.lng); + this._northEast = new LatLng(ne2.lat, ne2.lng); + } else { + sw.lat = Math.min(sw2.lat, sw.lat); + sw.lng = Math.min(sw2.lng, sw.lng); + ne.lat = Math.max(ne2.lat, ne.lat); + ne.lng = Math.max(ne2.lng, ne.lng); + } + + return this; + }, + + // @method pad(bufferRatio: Number): LatLngBounds + // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. + // For example, a ratio of 0.5 extends the bounds by 50% in each direction. + // Negative values will retract the bounds. + pad: function (bufferRatio) { + var sw = this._southWest, + ne = this._northEast, + heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio, + widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio; + + return new LatLngBounds( + new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer), + new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer)); + }, + + // @method getCenter(): LatLng + // Returns the center point of the bounds. + getCenter: function () { + return new LatLng( + (this._southWest.lat + this._northEast.lat) / 2, + (this._southWest.lng + this._northEast.lng) / 2); + }, + + // @method getSouthWest(): LatLng + // Returns the south-west point of the bounds. + getSouthWest: function () { + return this._southWest; + }, + + // @method getNorthEast(): LatLng + // Returns the north-east point of the bounds. + getNorthEast: function () { + return this._northEast; + }, + + // @method getNorthWest(): LatLng + // Returns the north-west point of the bounds. + getNorthWest: function () { + return new LatLng(this.getNorth(), this.getWest()); + }, + + // @method getSouthEast(): LatLng + // Returns the south-east point of the bounds. + getSouthEast: function () { + return new LatLng(this.getSouth(), this.getEast()); + }, + + // @method getWest(): Number + // Returns the west longitude of the bounds + getWest: function () { + return this._southWest.lng; + }, + + // @method getSouth(): Number + // Returns the south latitude of the bounds + getSouth: function () { + return this._southWest.lat; + }, + + // @method getEast(): Number + // Returns the east longitude of the bounds + getEast: function () { + return this._northEast.lng; + }, + + // @method getNorth(): Number + // Returns the north latitude of the bounds + getNorth: function () { + return this._northEast.lat; + }, + + // @method contains(otherBounds: LatLngBounds): Boolean + // Returns `true` if the rectangle contains the given one. + + // @alternative + // @method contains (latlng: LatLng): Boolean + // Returns `true` if the rectangle contains the given point. + contains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean + if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) { + obj = toLatLng(obj); + } else { + obj = toLatLngBounds(obj); + } + + var sw = this._southWest, + ne = this._northEast, + sw2, ne2; + + if (obj instanceof LatLngBounds) { + sw2 = obj.getSouthWest(); + ne2 = obj.getNorthEast(); + } else { + sw2 = ne2 = obj; + } + + return (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) && + (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng); + }, + + // @method intersects(otherBounds: LatLngBounds): Boolean + // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common. + intersects: function (bounds) { + bounds = toLatLngBounds(bounds); + + var sw = this._southWest, + ne = this._northEast, + sw2 = bounds.getSouthWest(), + ne2 = bounds.getNorthEast(), + + latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat), + lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng); + + return latIntersects && lngIntersects; + }, + + // @method overlaps(otherBounds: LatLngBounds): Boolean + // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area. + overlaps: function (bounds) { + bounds = toLatLngBounds(bounds); + + var sw = this._southWest, + ne = this._northEast, + sw2 = bounds.getSouthWest(), + ne2 = bounds.getNorthEast(), + + latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat), + lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng); + + return latOverlaps && lngOverlaps; + }, + + // @method toBBoxString(): String + // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data. + toBBoxString: function () { + return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(','); + }, + + // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean + // Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number. + equals: function (bounds, maxMargin) { + if (!bounds) { return false; } + + bounds = toLatLngBounds(bounds); + + return this._southWest.equals(bounds.getSouthWest(), maxMargin) && + this._northEast.equals(bounds.getNorthEast(), maxMargin); + }, + + // @method isValid(): Boolean + // Returns `true` if the bounds are properly initialized. + isValid: function () { + return !!(this._southWest && this._northEast); + } + }; + + // TODO International date line? + + // @factory L.latLngBounds(corner1: LatLng, corner2: LatLng) + // Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle. + + // @alternative + // @factory L.latLngBounds(latlngs: LatLng[]) + // Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds). + function toLatLngBounds(a, b) { + if (a instanceof LatLngBounds) { + return a; + } + return new LatLngBounds(a, b); + } + + /* @class LatLng + * @aka L.LatLng + * + * Represents a geographical point with a certain latitude and longitude. + * + * @example + * + * ``` + * var latlng = L.latLng(50.5, 30.5); + * ``` + * + * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent: + * + * ``` + * map.panTo([50, 30]); + * map.panTo({lon: 30, lat: 50}); + * map.panTo({lat: 50, lng: 30}); + * map.panTo(L.latLng(50, 30)); + * ``` + * + * Note that `LatLng` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + + function LatLng(lat, lng, alt) { + if (isNaN(lat) || isNaN(lng)) { + throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')'); + } + + // @property lat: Number + // Latitude in degrees + this.lat = +lat; + + // @property lng: Number + // Longitude in degrees + this.lng = +lng; + + // @property alt: Number + // Altitude in meters (optional) + if (alt !== undefined) { + this.alt = +alt; + } + } + + LatLng.prototype = { + // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean + // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number. + equals: function (obj, maxMargin) { + if (!obj) { return false; } + + obj = toLatLng(obj); + + var margin = Math.max( + Math.abs(this.lat - obj.lat), + Math.abs(this.lng - obj.lng)); + + return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin); + }, + + // @method toString(): String + // Returns a string representation of the point (for debugging purposes). + toString: function (precision) { + return 'LatLng(' + + formatNum(this.lat, precision) + ', ' + + formatNum(this.lng, precision) + ')'; + }, + + // @method distanceTo(otherLatLng: LatLng): Number + // Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines). + distanceTo: function (other) { + return Earth.distance(this, toLatLng(other)); + }, + + // @method wrap(): LatLng + // Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees. + wrap: function () { + return Earth.wrapLatLng(this); + }, + + // @method toBounds(sizeInMeters: Number): LatLngBounds + // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`. + toBounds: function (sizeInMeters) { + var latAccuracy = 180 * sizeInMeters / 40075017, + lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); + + return toLatLngBounds( + [this.lat - latAccuracy, this.lng - lngAccuracy], + [this.lat + latAccuracy, this.lng + lngAccuracy]); + }, + + clone: function () { + return new LatLng(this.lat, this.lng, this.alt); + } + }; + + + + // @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng + // Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude). + + // @alternative + // @factory L.latLng(coords: Array): LatLng + // Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead. + + // @alternative + // @factory L.latLng(coords: Object): LatLng + // Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead. + + function toLatLng(a, b, c) { + if (a instanceof LatLng) { + return a; + } + if (isArray(a) && typeof a[0] !== 'object') { + if (a.length === 3) { + return new LatLng(a[0], a[1], a[2]); + } + if (a.length === 2) { + return new LatLng(a[0], a[1]); + } + return null; + } + if (a === undefined || a === null) { + return a; + } + if (typeof a === 'object' && 'lat' in a) { + return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt); + } + if (b === undefined) { + return null; + } + return new LatLng(a, b, c); + } + + /* + * @namespace CRS + * @crs L.CRS.Base + * Object that defines coordinate reference systems for projecting + * geographical points into pixel (screen) coordinates and back (and to + * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See + * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system). + * + * Leaflet defines the most usual CRSs by default. If you want to use a + * CRS not defined by default, take a look at the + * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. + * + * Note that the CRS instances do not inherit from Leaflet's `Class` object, + * and can't be instantiated. Also, new classes can't inherit from them, + * and methods can't be added to them with the `include` function. + */ + + var CRS = { + // @method latLngToPoint(latlng: LatLng, zoom: Number): Point + // Projects geographical coordinates into pixel coordinates for a given zoom. + latLngToPoint: function (latlng, zoom) { + var projectedPoint = this.projection.project(latlng), + scale = this.scale(zoom); + + return this.transformation._transform(projectedPoint, scale); + }, + + // @method pointToLatLng(point: Point, zoom: Number): LatLng + // The inverse of `latLngToPoint`. Projects pixel coordinates on a given + // zoom into geographical coordinates. + pointToLatLng: function (point, zoom) { + var scale = this.scale(zoom), + untransformedPoint = this.transformation.untransform(point, scale); + + return this.projection.unproject(untransformedPoint); + }, + + // @method project(latlng: LatLng): Point + // Projects geographical coordinates into coordinates in units accepted for + // this CRS (e.g. meters for EPSG:3857, for passing it to WMS services). + project: function (latlng) { + return this.projection.project(latlng); + }, + + // @method unproject(point: Point): LatLng + // Given a projected coordinate returns the corresponding LatLng. + // The inverse of `project`. + unproject: function (point) { + return this.projection.unproject(point); + }, + + // @method scale(zoom: Number): Number + // Returns the scale used when transforming projected coordinates into + // pixel coordinates for a particular zoom. For example, it returns + // `256 * 2^zoom` for Mercator-based CRS. + scale: function (zoom) { + return 256 * Math.pow(2, zoom); + }, + + // @method zoom(scale: Number): Number + // Inverse of `scale()`, returns the zoom level corresponding to a scale + // factor of `scale`. + zoom: function (scale) { + return Math.log(scale / 256) / Math.LN2; + }, + + // @method getProjectedBounds(zoom: Number): Bounds + // Returns the projection's bounds scaled and transformed for the provided `zoom`. + getProjectedBounds: function (zoom) { + if (this.infinite) { return null; } + + var b = this.projection.bounds, + s = this.scale(zoom), + min = this.transformation.transform(b.min, s), + max = this.transformation.transform(b.max, s); + + return new Bounds(min, max); + }, + + // @method distance(latlng1: LatLng, latlng2: LatLng): Number + // Returns the distance between two geographical coordinates. + + // @property code: String + // Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`) + // + // @property wrapLng: Number[] + // An array of two numbers defining whether the longitude (horizontal) coordinate + // axis wraps around a given range and how. Defaults to `[-180, 180]` in most + // geographical CRSs. If `undefined`, the longitude axis does not wrap around. + // + // @property wrapLat: Number[] + // Like `wrapLng`, but for the latitude (vertical) axis. + + // wrapLng: [min, max], + // wrapLat: [min, max], + + // @property infinite: Boolean + // If true, the coordinate space will be unbounded (infinite in both axes) + infinite: false, + + // @method wrapLatLng(latlng: LatLng): LatLng + // Returns a `LatLng` where lat and lng has been wrapped according to the + // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds. + wrapLatLng: function (latlng) { + var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng, + lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat, + alt = latlng.alt; + + return new LatLng(lat, lng, alt); + }, + + // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds + // Returns a `LatLngBounds` with the same size as the given one, ensuring + // that its center is within the CRS's bounds. + // Only accepts actual `L.LatLngBounds` instances, not arrays. + wrapLatLngBounds: function (bounds) { + var center = bounds.getCenter(), + newCenter = this.wrapLatLng(center), + latShift = center.lat - newCenter.lat, + lngShift = center.lng - newCenter.lng; + + if (latShift === 0 && lngShift === 0) { + return bounds; + } + + var sw = bounds.getSouthWest(), + ne = bounds.getNorthEast(), + newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift), + newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift); + + return new LatLngBounds(newSw, newNe); + } + }; + + /* + * @namespace CRS + * @crs L.CRS.Earth + * + * Serves as the base for CRS that are global such that they cover the earth. + * Can only be used as the base for other CRS and cannot be used directly, + * since it does not have a `code`, `projection` or `transformation`. `distance()` returns + * meters. + */ + + var Earth = extend({}, CRS, { + wrapLng: [-180, 180], + + // Mean Earth Radius, as recommended for use by + // the International Union of Geodesy and Geophysics, + // see https://rosettacode.org/wiki/Haversine_formula + R: 6371000, + + // distance between two geographical points using spherical law of cosines approximation + distance: function (latlng1, latlng2) { + var rad = Math.PI / 180, + lat1 = latlng1.lat * rad, + lat2 = latlng2.lat * rad, + sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2), + sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2), + a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon, + c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); + return this.R * c; + } + }); + + /* + * @namespace Projection + * @projection L.Projection.SphericalMercator + * + * Spherical Mercator projection — the most common projection for online maps, + * used by almost all free and commercial tile providers. Assumes that Earth is + * a sphere. Used by the `EPSG:3857` CRS. + */ + + var earthRadius = 6378137; + + var SphericalMercator = { + + R: earthRadius, + MAX_LATITUDE: 85.0511287798, + + project: function (latlng) { + var d = Math.PI / 180, + max = this.MAX_LATITUDE, + lat = Math.max(Math.min(max, latlng.lat), -max), + sin = Math.sin(lat * d); + + return new Point( + this.R * latlng.lng * d, + this.R * Math.log((1 + sin) / (1 - sin)) / 2); + }, + + unproject: function (point) { + var d = 180 / Math.PI; + + return new LatLng( + (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d, + point.x * d / this.R); + }, + + bounds: (function () { + var d = earthRadius * Math.PI; + return new Bounds([-d, -d], [d, d]); + })() + }; + + /* + * @class Transformation + * @aka L.Transformation + * + * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` + * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing + * the reverse. Used by Leaflet in its projections code. + * + * @example + * + * ```js + * var transformation = L.transformation(2, 5, -1, 10), + * p = L.point(1, 2), + * p2 = transformation.transform(p), // L.point(7, 8) + * p3 = transformation.untransform(p2); // L.point(1, 2) + * ``` + */ + + + // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number) + // Creates a `Transformation` object with the given coefficients. + function Transformation(a, b, c, d) { + if (isArray(a)) { + // use array properties + this._a = a[0]; + this._b = a[1]; + this._c = a[2]; + this._d = a[3]; + return; + } + this._a = a; + this._b = b; + this._c = c; + this._d = d; + } + + Transformation.prototype = { + // @method transform(point: Point, scale?: Number): Point + // Returns a transformed point, optionally multiplied by the given scale. + // Only accepts actual `L.Point` instances, not arrays. + transform: function (point, scale) { // (Point, Number) -> Point + return this._transform(point.clone(), scale); + }, + + // destructive transform (faster) + _transform: function (point, scale) { + scale = scale || 1; + point.x = scale * (this._a * point.x + this._b); + point.y = scale * (this._c * point.y + this._d); + return point; + }, + + // @method untransform(point: Point, scale?: Number): Point + // Returns the reverse transformation of the given point, optionally divided + // by the given scale. Only accepts actual `L.Point` instances, not arrays. + untransform: function (point, scale) { + scale = scale || 1; + return new Point( + (point.x / scale - this._b) / this._a, + (point.y / scale - this._d) / this._c); + } + }; + + // factory L.transformation(a: Number, b: Number, c: Number, d: Number) + + // @factory L.transformation(a: Number, b: Number, c: Number, d: Number) + // Instantiates a Transformation object with the given coefficients. + + // @alternative + // @factory L.transformation(coefficients: Array): Transformation + // Expects an coefficients array of the form + // `[a: Number, b: Number, c: Number, d: Number]`. + + function toTransformation(a, b, c, d) { + return new Transformation(a, b, c, d); + } + + /* + * @namespace CRS + * @crs L.CRS.EPSG3857 + * + * The most common CRS for online maps, used by almost all free and commercial + * tile providers. Uses Spherical Mercator projection. Set in by default in + * Map's `crs` option. + */ + + var EPSG3857 = extend({}, Earth, { + code: 'EPSG:3857', + projection: SphericalMercator, + + transformation: (function () { + var scale = 0.5 / (Math.PI * SphericalMercator.R); + return toTransformation(scale, 0.5, -scale, 0.5); + }()) + }); + + var EPSG900913 = extend({}, EPSG3857, { + code: 'EPSG:900913' + }); + + // @namespace SVG; @section + // There are several static functions which can be called without instantiating L.SVG: + + // @function create(name: String): SVGElement + // Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement), + // corresponding to the class name passed. For example, using 'line' will return + // an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement). + function svgCreate(name) { + return document.createElementNS('http://www.w3.org/2000/svg', name); + } + + // @function pointsToPath(rings: Point[], closed: Boolean): String + // Generates a SVG path string for multiple rings, with each ring turning + // into "M..L..L.." instructions + function pointsToPath(rings, closed) { + var str = '', + i, j, len, len2, points, p; + + for (i = 0, len = rings.length; i < len; i++) { + points = rings[i]; + + for (j = 0, len2 = points.length; j < len2; j++) { + p = points[j]; + str += (j ? 'L' : 'M') + p.x + ' ' + p.y; + } + + // closes the ring for polygons; "x" is VML syntax + str += closed ? (Browser.svg ? 'z' : 'x') : ''; + } + + // SVG complains about empty path strings + return str || 'M0 0'; + } + + /* + * @namespace Browser + * @aka L.Browser + * + * A namespace with static properties for browser/feature detection used by Leaflet internally. + * + * @example + * + * ```js + * if (L.Browser.ielt9) { + * alert('Upgrade your browser, dude!'); + * } + * ``` + */ + + var style = document.documentElement.style; + + // @property ie: Boolean; `true` for all Internet Explorer versions (not Edge). + var ie = 'ActiveXObject' in window; + + // @property ielt9: Boolean; `true` for Internet Explorer versions less than 9. + var ielt9 = ie && !document.addEventListener; + + // @property edge: Boolean; `true` for the Edge web browser. + var edge = 'msLaunchUri' in navigator && !('documentMode' in document); + + // @property webkit: Boolean; + // `true` for webkit-based browsers like Chrome and Safari (including mobile versions). + var webkit = userAgentContains('webkit'); + + // @property android: Boolean + // **Deprecated.** `true` for any browser running on an Android platform. + var android = userAgentContains('android'); + + // @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3. + var android23 = userAgentContains('android 2') || userAgentContains('android 3'); + + /* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */ + var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit + // @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome) + var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window); + + // @property opera: Boolean; `true` for the Opera browser + var opera = !!window.opera; + + // @property chrome: Boolean; `true` for the Chrome browser. + var chrome = !edge && userAgentContains('chrome'); + + // @property gecko: Boolean; `true` for gecko-based browsers like Firefox. + var gecko = userAgentContains('gecko') && !webkit && !opera && !ie; + + // @property safari: Boolean; `true` for the Safari browser. + var safari = !chrome && userAgentContains('safari'); + + var phantom = userAgentContains('phantom'); + + // @property opera12: Boolean + // `true` for the Opera browser supporting CSS transforms (version 12 or later). + var opera12 = 'OTransition' in style; + + // @property win: Boolean; `true` when the browser is running in a Windows platform + var win = navigator.platform.indexOf('Win') === 0; + + // @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms. + var ie3d = ie && ('transition' in style); + + // @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms. + var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23; + + // @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms. + var gecko3d = 'MozPerspective' in style; + + // @property any3d: Boolean + // `true` for all browsers supporting CSS transforms. + var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom; + + // @property mobile: Boolean; `true` for all browsers running in a mobile device. + var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile'); + + // @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device. + var mobileWebkit = mobile && webkit; + + // @property mobileWebkit3d: Boolean + // `true` for all webkit-based browsers in a mobile device supporting CSS transforms. + var mobileWebkit3d = mobile && webkit3d; + + // @property msPointer: Boolean + // `true` for browsers implementing the Microsoft touch events model (notably IE10). + var msPointer = !window.PointerEvent && window.MSPointerEvent; + + // @property pointer: Boolean + // `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx). + var pointer = !!(window.PointerEvent || msPointer); + + // @property touchNative: Boolean + // `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events). + // **This does not necessarily mean** that the browser is running in a computer with + // a touchscreen, it only means that the browser is capable of understanding + // touch events. + var touchNative = 'ontouchstart' in window || !!window.TouchEvent; + + // @property touch: Boolean + // `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events. + // Note: pointer events will be preferred (if available), and processed for all `touch*` listeners. + var touch = !window.L_NO_TOUCH && (touchNative || pointer); + + // @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device. + var mobileOpera = mobile && opera; + + // @property mobileGecko: Boolean + // `true` for gecko-based browsers running in a mobile device. + var mobileGecko = mobile && gecko; + + // @property retina: Boolean + // `true` for browsers on a high-resolution "retina" screen or on any screen when browser's display zoom is more than 100%. + var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1; + + // @property passiveEvents: Boolean + // `true` for browsers that support passive events. + var passiveEvents = (function () { + var supportsPassiveOption = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function () { // eslint-disable-line getter-return + supportsPassiveOption = true; + } + }); + window.addEventListener('testPassiveEventSupport', falseFn, opts); + window.removeEventListener('testPassiveEventSupport', falseFn, opts); + } catch (e) { + // Errors can safely be ignored since this is only a browser support test. + } + return supportsPassiveOption; + }()); + + // @property canvas: Boolean + // `true` when the browser supports [``](https://developer.mozilla.org/docs/Web/API/Canvas_API). + var canvas$1 = (function () { + return !!document.createElement('canvas').getContext; + }()); + + // @property svg: Boolean + // `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG). + var svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect); + + var inlineSvg = !!svg$1 && (function () { + var div = document.createElement('div'); + div.innerHTML = ''; + return (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg'; + })(); + + // @property vml: Boolean + // `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language). + var vml = !svg$1 && (function () { + try { + var div = document.createElement('div'); + div.innerHTML = ''; + + var shape = div.firstChild; + shape.style.behavior = 'url(#default#VML)'; + + return shape && (typeof shape.adj === 'object'); + + } catch (e) { + return false; + } + }()); + + + // @property mac: Boolean; `true` when the browser is running in a Mac platform + var mac = navigator.platform.indexOf('Mac') === 0; + + // @property mac: Boolean; `true` when the browser is running in a Linux platform + var linux = navigator.platform.indexOf('Linux') === 0; + + function userAgentContains(str) { + return navigator.userAgent.toLowerCase().indexOf(str) >= 0; + } + + + var Browser = { + ie: ie, + ielt9: ielt9, + edge: edge, + webkit: webkit, + android: android, + android23: android23, + androidStock: androidStock, + opera: opera, + chrome: chrome, + gecko: gecko, + safari: safari, + phantom: phantom, + opera12: opera12, + win: win, + ie3d: ie3d, + webkit3d: webkit3d, + gecko3d: gecko3d, + any3d: any3d, + mobile: mobile, + mobileWebkit: mobileWebkit, + mobileWebkit3d: mobileWebkit3d, + msPointer: msPointer, + pointer: pointer, + touch: touch, + touchNative: touchNative, + mobileOpera: mobileOpera, + mobileGecko: mobileGecko, + retina: retina, + passiveEvents: passiveEvents, + canvas: canvas$1, + svg: svg$1, + vml: vml, + inlineSvg: inlineSvg, + mac: mac, + linux: linux + }; + + /* + * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices. + */ + + var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown'; + var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove'; + var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup'; + var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel'; + var pEvent = { + touchstart : POINTER_DOWN, + touchmove : POINTER_MOVE, + touchend : POINTER_UP, + touchcancel : POINTER_CANCEL + }; + var handle = { + touchstart : _onPointerStart, + touchmove : _handlePointer, + touchend : _handlePointer, + touchcancel : _handlePointer + }; + var _pointers = {}; + var _pointerDocListener = false; + + // Provides a touch events wrapper for (ms)pointer events. + // ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890 + + function addPointerListener(obj, type, handler) { + if (type === 'touchstart') { + _addPointerDocListener(); + } + if (!handle[type]) { + console.warn('wrong event specified:', type); + return falseFn; + } + handler = handle[type].bind(this, handler); + obj.addEventListener(pEvent[type], handler, false); + return handler; + } + + function removePointerListener(obj, type, handler) { + if (!pEvent[type]) { + console.warn('wrong event specified:', type); + return; + } + obj.removeEventListener(pEvent[type], handler, false); + } + + function _globalPointerDown(e) { + _pointers[e.pointerId] = e; + } + + function _globalPointerMove(e) { + if (_pointers[e.pointerId]) { + _pointers[e.pointerId] = e; + } + } + + function _globalPointerUp(e) { + delete _pointers[e.pointerId]; + } + + function _addPointerDocListener() { + // need to keep track of what pointers and how many are active to provide e.touches emulation + if (!_pointerDocListener) { + // we listen document as any drags that end by moving the touch off the screen get fired there + document.addEventListener(POINTER_DOWN, _globalPointerDown, true); + document.addEventListener(POINTER_MOVE, _globalPointerMove, true); + document.addEventListener(POINTER_UP, _globalPointerUp, true); + document.addEventListener(POINTER_CANCEL, _globalPointerUp, true); + + _pointerDocListener = true; + } + } + + function _handlePointer(handler, e) { + if (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; } + + e.touches = []; + for (var i in _pointers) { + e.touches.push(_pointers[i]); + } + e.changedTouches = [e]; + + handler(e); + } + + function _onPointerStart(handler, e) { + // IE10 specific: MsTouch needs preventDefault. See #2000 + if (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) { + preventDefault(e); + } + _handlePointer(handler, e); + } + + /* + * Extends the event handling code with double tap support for mobile browsers. + * + * Note: currently most browsers fire native dblclick, with only a few exceptions + * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386) + */ + + function makeDblclick(event) { + // in modern browsers `type` cannot be just overridden: + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only + var newEvent = {}, + prop, i; + for (i in event) { + prop = event[i]; + newEvent[i] = prop && prop.bind ? prop.bind(event) : prop; + } + event = newEvent; + newEvent.type = 'dblclick'; + newEvent.detail = 2; + newEvent.isTrusted = false; + newEvent._simulated = true; // for debug purposes + return newEvent; + } + + var delay = 200; + function addDoubleTapListener(obj, handler) { + // Most browsers handle double tap natively + obj.addEventListener('dblclick', handler); + + // On some platforms the browser doesn't fire native dblclicks for touch events. + // It seems that in all such cases `detail` property of `click` event is always `1`. + // So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed. + var last = 0, + detail; + function simDblclick(e) { + if (e.detail !== 1) { + detail = e.detail; // keep in sync to avoid false dblclick in some cases + return; + } + + if (e.pointerType === 'mouse' || + (e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) { + + return; + } + + // When clicking on an , the browser generates a click on its + //