Version Description
Download this release
Release Info
Developer | itthinx |
Plugin | Groups |
Version | 2.11.0 |
Comparing to | |
See all releases |
Code changes from version 2.10.0 to 2.11.0
- COPYRIGHT.txt +3 -3
- changelog.txt +17 -0
- css/groups_admin.css +8 -8
- groups.php +6 -6
- legacy/access/class-groups-access-meta-boxes-legacy.php +10 -5
- legacy/admin/class-groups-admin-post-columns-legacy.php +1 -1
- legacy/admin/groups-admin-options-legacy.php +1 -1
- lib/access/class-groups-access-meta-boxes.php +10 -5
- lib/access/class-groups-post-access.php +18 -1
- lib/admin/class-groups-admin-notice.php +1 -1
- lib/admin/class-groups-admin-post-columns.php +1 -1
- lib/admin/class-groups-admin-posts.php +11 -2
- lib/admin/class-groups-admin-user-profile.php +15 -3
- lib/admin/class-groups-admin-users.php +7 -3
- lib/admin/groups-admin-add-ons.php +16 -16
- lib/admin/groups-admin-capabilities-remove.php +1 -1
- lib/admin/groups-admin-groups-add.php +5 -2
- lib/admin/groups-admin-groups-edit.php +1 -1
- lib/admin/groups-admin-groups-remove.php +1 -1
- lib/admin/groups-admin-groups.php +2 -2
- lib/admin/groups-admin-options.php +1 -1
- lib/blocks/.gitignore +3 -3
- lib/blocks/dist/blocks.build.js +1 -1
- lib/blocks/package.json +14 -0
- lib/blocks/src/blocks.js +5 -4
- lib/blocks/src/blocks/groups-member/block.js +103 -125
- lib/blocks/src/blocks/groups-member/editor.scss +38 -38
- lib/blocks/src/blocks/groups-non-member/block.js +143 -93
- lib/blocks/src/blocks/groups-non-member/editor.scss +38 -38
- lib/blocks/src/class-groups-blocks.php +51 -15
- lib/blocks/src/common.scss +6 -0
- lib/core/class-groups-help.php +3 -3
- lib/core/wp-init.php +23 -1
- lib/wp/class-groups-wordpress.php +40 -6
- readme.txt +10 -10
COPYRIGHT.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
Groups
|
3 |
|
4 |
-
Copyright 2011-
|
5 |
|
6 |
The files COPYRIGHT.txt and LICENSE.txt as well as ALL NOTICES IN THE
|
7 |
HEADERS OF ALL FILES MUST BE KEPT INTACT.
|
@@ -27,7 +27,7 @@
|
|
27 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28 |
|
29 |
|
30 |
-
Visit
|
31 |
|
32 |
-
Plugin page:
|
33 |
|
1 |
|
2 |
Groups
|
3 |
|
4 |
+
Copyright 2011-2020 "kento" (Karim Rahimpur) www.itthinx.com
|
5 |
|
6 |
The files COPYRIGHT.txt and LICENSE.txt as well as ALL NOTICES IN THE
|
7 |
HEADERS OF ALL FILES MUST BE KEPT INTACT.
|
27 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
28 |
|
29 |
|
30 |
+
Visit https://www.itthinx.com/ for help, general info and fun.
|
31 |
|
32 |
+
Plugin page: https://www.itthinx.com/plugins/groups
|
33 |
|
changelog.txt
CHANGED
@@ -1,5 +1,22 @@
|
|
1 |
== Groups by itthinx - changelog.txt
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 2.10.0 =
|
4 |
* WordPress 5.4 compatible.
|
5 |
* Removed an alternative call to the deprecated wp_cache_reset() and preferrably calling wp_cache_init() when wp_cache_switch_to_blog() is not available.
|
1 |
== Groups by itthinx - changelog.txt
|
2 |
|
3 |
+
= 2.11.0 =
|
4 |
+
* WordPress 5.5 compatible.
|
5 |
+
* Minimum WordPress version 5.2 is required.
|
6 |
+
* Fixed PHP 7.4 compatibility - Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated.
|
7 |
+
* Fixed protected entries appear on taxonomy archives when access restrictions for the Post type are not enabled.
|
8 |
+
* Fixed use of deprecated wp.editor and replaced with use of wp.blockEditor in Groups Member Block.
|
9 |
+
* Fixed use of deprecated wp.editor and replaced with use of wp.blockEditor in Groups Non-member Block.
|
10 |
+
* Added missing package.json etc. to Groups blocks sources.
|
11 |
+
* Block code reviewed, fixed formatting, added more documentation and cleaned up.
|
12 |
+
* Added classes to div wrappers that contain block content rendered.
|
13 |
+
* Modified the user_has_cap filter priority so that it kicks in as late as possible.
|
14 |
+
* Added the groups_user_has_cap filter which allows to further process after Groups has handled the user_has_cap filter.
|
15 |
+
* Fixed issues with backslashes displayed when part of a group or capability name.
|
16 |
+
* Added the groups_get_table_prefix filter.
|
17 |
+
* Fixed layout issues with the add-ons containers.
|
18 |
+
* Updated links to point to secure URLs where applicable.
|
19 |
+
|
20 |
= 2.10.0 =
|
21 |
* WordPress 5.4 compatible.
|
22 |
* Removed an alternative call to the deprecated wp_cache_reset() and preferrably calling wp_cache_init() when wp_cache_switch_to_blog() is not available.
|
css/groups_admin.css
CHANGED
@@ -205,14 +205,14 @@ div.capability.edit label {
|
|
205 |
float: right;
|
206 |
padding: 1em;
|
207 |
margin: 1em;
|
208 |
-
background-color: #
|
209 |
border-radius: 4px;
|
210 |
-
color: #
|
211 |
-
border: 1px solid #
|
212 |
width: 256px;
|
213 |
}
|
214 |
#groups-extensions-box a.close {
|
215 |
-
color: #
|
216 |
line-height: 18px;
|
217 |
position: absolute;
|
218 |
right: 6px;
|
@@ -292,14 +292,14 @@ div.capability.edit label {
|
|
292 |
.groups-admin-add-ons {
|
293 |
margin: 10px 20px 0 2px;
|
294 |
}
|
295 |
-
.groups-admin-add-ons ul {
|
296 |
list-style: none;
|
297 |
-
display:
|
|
|
298 |
padding: 0;
|
299 |
overflow: hidden;
|
300 |
}
|
301 |
-
.groups-admin-add-ons li {
|
302 |
-
float: left;
|
303 |
margin: 0 1em 1em 0;
|
304 |
padding: 8px;
|
305 |
vertical-align: top;
|
205 |
float: right;
|
206 |
padding: 1em;
|
207 |
margin: 1em;
|
208 |
+
background-color: #fff;
|
209 |
border-radius: 4px;
|
210 |
+
color: #111;
|
211 |
+
border: 1px solid #999;
|
212 |
width: 256px;
|
213 |
}
|
214 |
#groups-extensions-box a.close {
|
215 |
+
color: #999;
|
216 |
line-height: 18px;
|
217 |
position: absolute;
|
218 |
right: 6px;
|
292 |
.groups-admin-add-ons {
|
293 |
margin: 10px 20px 0 2px;
|
294 |
}
|
295 |
+
.groups-admin-add-ons ul.add-ons {
|
296 |
list-style: none;
|
297 |
+
display: flex;
|
298 |
+
flex-wrap: wrap;
|
299 |
padding: 0;
|
300 |
overflow: hidden;
|
301 |
}
|
302 |
+
.groups-admin-add-ons ul.add-ons li.add-on {
|
|
|
303 |
margin: 0 1em 1em 0;
|
304 |
padding: 8px;
|
305 |
vertical-align: top;
|
groups.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* groups.php
|
4 |
*
|
5 |
-
* Copyright (c) 2011-
|
6 |
*
|
7 |
* This code is released under the GNU General Public License.
|
8 |
* See COPYRIGHT.txt and LICENSE.txt.
|
@@ -19,12 +19,12 @@
|
|
19 |
* @since groups 1.0.0
|
20 |
*
|
21 |
* Plugin Name: Groups
|
22 |
-
* Plugin URI:
|
23 |
* Description: Groups provides group-based user membership management, group-based capabilities and content access control.
|
24 |
-
* Version: 2.
|
25 |
* Author: itthinx
|
26 |
-
* Author URI:
|
27 |
-
* Donate-Link:
|
28 |
* Text Domain: groups
|
29 |
* Domain Path: /languages
|
30 |
* License: GPLv3
|
@@ -32,7 +32,7 @@
|
|
32 |
if ( !defined( 'ABSPATH' ) ) {
|
33 |
exit;
|
34 |
}
|
35 |
-
define( 'GROUPS_CORE_VERSION', '2.
|
36 |
define( 'GROUPS_FILE', __FILE__ );
|
37 |
if ( !defined( 'GROUPS_CORE_DIR' ) ) {
|
38 |
define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
2 |
/**
|
3 |
* groups.php
|
4 |
*
|
5 |
+
* Copyright (c) 2011-2020 "kento" Karim Rahimpur www.itthinx.com
|
6 |
*
|
7 |
* This code is released under the GNU General Public License.
|
8 |
* See COPYRIGHT.txt and LICENSE.txt.
|
19 |
* @since groups 1.0.0
|
20 |
*
|
21 |
* Plugin Name: Groups
|
22 |
+
* Plugin URI: https://www.itthinx.com/plugins/groups
|
23 |
* Description: Groups provides group-based user membership management, group-based capabilities and content access control.
|
24 |
+
* Version: 2.11.0
|
25 |
* Author: itthinx
|
26 |
+
* Author URI: https://www.itthinx.com
|
27 |
+
* Donate-Link: https://www.itthinx.com/shop/
|
28 |
* Text Domain: groups
|
29 |
* Domain Path: /languages
|
30 |
* License: GPLv3
|
32 |
if ( !defined( 'ABSPATH' ) ) {
|
33 |
exit;
|
34 |
}
|
35 |
+
define( 'GROUPS_CORE_VERSION', '2.11.0' );
|
36 |
define( 'GROUPS_FILE', __FILE__ );
|
37 |
if ( !defined( 'GROUPS_CORE_DIR' ) ) {
|
38 |
define( 'GROUPS_CORE_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
legacy/access/class-groups-access-meta-boxes-legacy.php
CHANGED
@@ -250,7 +250,7 @@ class Groups_Access_Meta_Boxes_Legacy {
|
|
250 |
$post_type
|
251 |
);
|
252 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $capability->capability_id ), $selected ? ' selected="selected" ': '' );
|
253 |
-
$output .= wp_filter_nohtml_kses( $capability->capability );
|
254 |
if ( $show_groups ) {
|
255 |
if ( count( $group_names ) > 0 ) {
|
256 |
$output .= ' ';
|
@@ -344,8 +344,13 @@ class Groups_Access_Meta_Boxes_Legacy {
|
|
344 |
// considered to be empty at this stage. This is so we don't end up
|
345 |
// having save_post() invoked twice when the post is not empty.
|
346 |
if ( $maybe_empty ) {
|
347 |
-
$post_id =
|
348 |
-
if ( $
|
|
|
|
|
|
|
|
|
|
|
349 |
self::save_post( $post_id );
|
350 |
}
|
351 |
}
|
@@ -522,7 +527,7 @@ class Groups_Access_Meta_Boxes_Legacy {
|
|
522 |
// $output .= '<li>';
|
523 |
// $output .= '<label>';
|
524 |
// $output .= '<input name="attachments[' . $post->ID . '][' . self::CAPABILITY . '][]" ' . $checked . ' type="checkbox" value="' . esc_attr( $capability->capability_id ) . '" />';
|
525 |
-
// $output .= wp_filter_nohtml_kses( $capability->capability );
|
526 |
// $output .= '</label>';
|
527 |
// $output .= '</li>';
|
528 |
// }
|
@@ -567,7 +572,7 @@ class Groups_Access_Meta_Boxes_Legacy {
|
|
567 |
$label_title = __( 'No groups grant access through this capability. To grant access to group members using this capability, you should assign it to a group and enable the capability for access restriction.', 'groups' );
|
568 |
}
|
569 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $capability->capability_id ), in_array( $capability->capability, $read_caps ) ? ' selected="selected" ' : '' );
|
570 |
-
$output .= wp_filter_nohtml_kses( $capability->capability );
|
571 |
if ( $show_groups ) {
|
572 |
if ( count( $group_names ) > 0 ) {
|
573 |
$output .= ' ';
|
250 |
$post_type
|
251 |
);
|
252 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $capability->capability_id ), $selected ? ' selected="selected" ': '' );
|
253 |
+
$output .= stripslashes( wp_filter_nohtml_kses( $capability->capability ) );
|
254 |
if ( $show_groups ) {
|
255 |
if ( count( $group_names ) > 0 ) {
|
256 |
$output .= ' ';
|
344 |
// considered to be empty at this stage. This is so we don't end up
|
345 |
// having save_post() invoked twice when the post is not empty.
|
346 |
if ( $maybe_empty ) {
|
347 |
+
$post_id = null;
|
348 |
+
if ( !empty( $postarr['ID'] ) ) {
|
349 |
+
$post_id = intval( $postarr['ID'] );
|
350 |
+
} else if ( !empty( $postarr['post_ID'] ) ) {
|
351 |
+
$post_id = intval( $postarr['post_ID'] );
|
352 |
+
}
|
353 |
+
if ( $post_id !== null ) {
|
354 |
self::save_post( $post_id );
|
355 |
}
|
356 |
}
|
527 |
// $output .= '<li>';
|
528 |
// $output .= '<label>';
|
529 |
// $output .= '<input name="attachments[' . $post->ID . '][' . self::CAPABILITY . '][]" ' . $checked . ' type="checkbox" value="' . esc_attr( $capability->capability_id ) . '" />';
|
530 |
+
// $output .= stripslashes( wp_filter_nohtml_kses( $capability->capability ) );
|
531 |
// $output .= '</label>';
|
532 |
// $output .= '</li>';
|
533 |
// }
|
572 |
$label_title = __( 'No groups grant access through this capability. To grant access to group members using this capability, you should assign it to a group and enable the capability for access restriction.', 'groups' );
|
573 |
}
|
574 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $capability->capability_id ), in_array( $capability->capability, $read_caps ) ? ' selected="selected" ' : '' );
|
575 |
+
$output .= stripslashes( wp_filter_nohtml_kses( $capability->capability ) );
|
576 |
if ( $show_groups ) {
|
577 |
if ( count( $group_names ) > 0 ) {
|
578 |
$output .= ' ';
|
legacy/admin/class-groups-admin-post-columns-legacy.php
CHANGED
@@ -99,7 +99,7 @@ class Groups_Admin_Post_Columns_Legacy {
|
|
99 |
if ( $capability = Groups_Capability::read_by_capability( $valid_read_cap ) ) {
|
100 |
if ( in_array( $valid_read_cap, $read_caps ) ) {
|
101 |
$output .= '<li>';
|
102 |
-
$output .= wp_strip_all_tags( $capability->capability );
|
103 |
$output .= '</li>';
|
104 |
}
|
105 |
}
|
99 |
if ( $capability = Groups_Capability::read_by_capability( $valid_read_cap ) ) {
|
100 |
if ( in_array( $valid_read_cap, $read_caps ) ) {
|
101 |
$output .= '<li>';
|
102 |
+
$output .= stripslashes( wp_strip_all_tags( $capability->capability ) );
|
103 |
$output .= '</li>';
|
104 |
}
|
105 |
}
|
legacy/admin/groups-admin-options-legacy.php
CHANGED
@@ -72,7 +72,7 @@ function groups_admin_options_legacy( $legacy_switched ) {
|
|
72 |
if ( $capability->capability == Groups_Post_Access_Legacy::READ_POST_CAPABILITY ) {
|
73 |
$selected .= ' disabled="disabled" ';
|
74 |
}
|
75 |
-
printf( '<option value="%s" %s>%s</option>', esc_attr( $capability->capability_id ), $selected, wp_filter_nohtml_kses( $capability->capability ) );
|
76 |
}
|
77 |
echo '</select>';
|
78 |
echo '</div>'; // .select-capability-container
|
72 |
if ( $capability->capability == Groups_Post_Access_Legacy::READ_POST_CAPABILITY ) {
|
73 |
$selected .= ' disabled="disabled" ';
|
74 |
}
|
75 |
+
printf( '<option value="%s" %s>%s</option>', esc_attr( $capability->capability_id ), $selected, stripslashes( wp_filter_nohtml_kses( $capability->capability ) ) );
|
76 |
}
|
77 |
echo '</select>';
|
78 |
echo '</div>'; // .select-capability-container
|
lib/access/class-groups-access-meta-boxes.php
CHANGED
@@ -238,7 +238,7 @@ class Groups_Access_Meta_Boxes {
|
|
238 |
$output .= '<option value=""></option>';
|
239 |
foreach( $groups as $group ) {
|
240 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $group->group_id ), in_array( $group->group_id, $groups_read ) ? ' selected="selected" ' : '' );
|
241 |
-
$output .= wp_filter_nohtml_kses( $group->name );
|
242 |
$output .= '</option>';
|
243 |
}
|
244 |
$output .= '</select>';
|
@@ -298,8 +298,13 @@ class Groups_Access_Meta_Boxes {
|
|
298 |
// considered to be empty at this stage. This is so we don't end up
|
299 |
// having save_post() invoked twice when the post is not empty.
|
300 |
if ( $maybe_empty ) {
|
301 |
-
$post_id =
|
302 |
-
if ( $
|
|
|
|
|
|
|
|
|
|
|
303 |
self::save_post( $post_id );
|
304 |
}
|
305 |
}
|
@@ -473,7 +478,7 @@ class Groups_Access_Meta_Boxes {
|
|
473 |
$output .= '<option value=""></option>';
|
474 |
foreach( $groups as $group ) {
|
475 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $group->group_id ), in_array( $group->group_id, $groups_read ) ? ' selected="selected" ' : '' );
|
476 |
-
$output .= wp_filter_nohtml_kses( $group->name );
|
477 |
$output .= '</option>';
|
478 |
}
|
479 |
$output .= '</select>';
|
@@ -489,7 +494,7 @@ class Groups_Access_Meta_Boxes {
|
|
489 |
$output .= '<p class="description">';
|
490 |
$output .= __( 'The attachment page is restricted to authorized users, but due to technical limitations, the file can still be accessed directly via its URL.', 'groups' );
|
491 |
$output .= ' ';
|
492 |
-
$output .= sprintf( __( 'Please use <a href="%s" target="_blank">Groups File Access</a> for files that require complete protection.', 'groups' ), esc_url( '
|
493 |
$output .= '</p>';
|
494 |
|
495 |
$form_fields['groups_read'] = array(
|
238 |
$output .= '<option value=""></option>';
|
239 |
foreach( $groups as $group ) {
|
240 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $group->group_id ), in_array( $group->group_id, $groups_read ) ? ' selected="selected" ' : '' );
|
241 |
+
$output .= stripslashes( wp_filter_nohtml_kses( $group->name ) );
|
242 |
$output .= '</option>';
|
243 |
}
|
244 |
$output .= '</select>';
|
298 |
// considered to be empty at this stage. This is so we don't end up
|
299 |
// having save_post() invoked twice when the post is not empty.
|
300 |
if ( $maybe_empty ) {
|
301 |
+
$post_id = null;
|
302 |
+
if ( !empty( $postarr['ID'] ) ) {
|
303 |
+
$post_id = intval( $postarr['ID'] );
|
304 |
+
} else if ( !empty( $postarr['post_ID'] ) ) {
|
305 |
+
$post_id = intval( $postarr['post_ID'] );
|
306 |
+
}
|
307 |
+
if ( $post_id !== null ) {
|
308 |
self::save_post( $post_id );
|
309 |
}
|
310 |
}
|
478 |
$output .= '<option value=""></option>';
|
479 |
foreach( $groups as $group ) {
|
480 |
$output .= sprintf( '<option value="%s" %s>', esc_attr( $group->group_id ), in_array( $group->group_id, $groups_read ) ? ' selected="selected" ' : '' );
|
481 |
+
$output .= stripslashes( wp_filter_nohtml_kses( $group->name ) );
|
482 |
$output .= '</option>';
|
483 |
}
|
484 |
$output .= '</select>';
|
494 |
$output .= '<p class="description">';
|
495 |
$output .= __( 'The attachment page is restricted to authorized users, but due to technical limitations, the file can still be accessed directly via its URL.', 'groups' );
|
496 |
$output .= ' ';
|
497 |
+
$output .= sprintf( __( 'Please use <a href="%s" target="_blank">Groups File Access</a> for files that require complete protection.', 'groups' ), esc_url( 'https://www.itthinx.com/shop/groups-file-access/' ) );
|
498 |
$output .= '</p>';
|
499 |
|
500 |
$form_fields['groups_read'] = array(
|
lib/access/class-groups-post-access.php
CHANGED
@@ -239,6 +239,23 @@ class Groups_Post_Access {
|
|
239 |
$where,
|
240 |
$query
|
241 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
if ( 'any' == $post_types ) {
|
243 |
// we need to filter in this case as it affects any post type
|
244 |
} else if ( !empty( $post_types ) && is_array( $post_types ) ) {
|
@@ -740,7 +757,7 @@ class Groups_Post_Access {
|
|
740 |
'post_type' => $type,
|
741 |
'post_status' => $post_status,
|
742 |
'numberposts' => -1, // all
|
743 |
-
'suppress_filters' => 0, // don't
|
744 |
'orderby' => 'none', // Important! Don't waste time here.
|
745 |
'no_found_rows' => true, // performance, omit unnecessary SQL_CALC_FOUND_ROWS in query here
|
746 |
'nopaging' => true // no paging is needed, in case it would affect performance
|
239 |
$where,
|
240 |
$query
|
241 |
);
|
242 |
+
|
243 |
+
// If post_types is empty and we have a term page (AKA taxonomy archive),
|
244 |
+
// try to retrieve the post type from the taxonomy:
|
245 |
+
if ( empty( $post_types ) ) {
|
246 |
+
if ( $query->is_tax() ) {
|
247 |
+
$queried_object = $query->get_queried_object();
|
248 |
+
if ( $queried_object instanceof WP_Term ) {
|
249 |
+
$taxonomy = get_taxonomy( $queried_object->taxonomy );
|
250 |
+
if ( $taxonomy !== false ) {
|
251 |
+
if ( property_exists( $taxonomy, 'object_type' ) ) { // object_type property since WP 4.7.0
|
252 |
+
$post_types = $taxonomy->object_type;
|
253 |
+
}
|
254 |
+
}
|
255 |
+
}
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
if ( 'any' == $post_types ) {
|
260 |
// we need to filter in this case as it affects any post type
|
261 |
} else if ( !empty( $post_types ) && is_array( $post_types ) ) {
|
757 |
'post_type' => $type,
|
758 |
'post_status' => $post_status,
|
759 |
'numberposts' => -1, // all
|
760 |
+
'suppress_filters' => 0, // don't suppress filters as we need to get restrictions taken into account
|
761 |
'orderby' => 'none', // Important! Don't waste time here.
|
762 |
'no_found_rows' => true, // performance, omit unnecessary SQL_CALC_FOUND_ROWS in query here
|
763 |
'nopaging' => true // no paging is needed, in case it would affect performance
|
lib/admin/class-groups-admin-notice.php
CHANGED
@@ -141,7 +141,7 @@ class Groups_Admin_Notice {
|
|
141 |
$output .= '<p>';
|
142 |
$output .= sprintf(
|
143 |
'<a class="button button-primary" href="%s" target="_blank">%s</a>',
|
144 |
-
esc_url( '
|
145 |
__( 'Yes, here we go!', 'groups' )
|
146 |
);
|
147 |
$output .= ' ';
|
141 |
$output .= '<p>';
|
142 |
$output .= sprintf(
|
143 |
'<a class="button button-primary" href="%s" target="_blank">%s</a>',
|
144 |
+
esc_url( 'https://wordpress.org/support/view/plugin-reviews/groups?filter=5#postform' ),
|
145 |
__( 'Yes, here we go!', 'groups' )
|
146 |
);
|
147 |
$output .= ' ';
|
lib/admin/class-groups-admin-post-columns.php
CHANGED
@@ -115,7 +115,7 @@ class Groups_Admin_Post_Columns {
|
|
115 |
$groups = Groups_Group::get_groups( array( 'order_by' => 'name', 'order' => 'ASC', 'include' => $groups_read ) );
|
116 |
if ( ( count( $groups ) > 0 ) ) {
|
117 |
foreach( $groups as $group ) {
|
118 |
-
$entries[] = wp_strip_all_tags( $group->name );
|
119 |
}
|
120 |
}
|
121 |
}
|
115 |
$groups = Groups_Group::get_groups( array( 'order_by' => 'name', 'order' => 'ASC', 'include' => $groups_read ) );
|
116 |
if ( ( count( $groups ) > 0 ) ) {
|
117 |
foreach( $groups as $group ) {
|
118 |
+
$entries[] = stripslashes( wp_strip_all_tags( $group->name ) );
|
119 |
}
|
120 |
}
|
121 |
}
|
lib/admin/class-groups-admin-posts.php
CHANGED
@@ -160,7 +160,12 @@ class Groups_Admin_Posts {
|
|
160 |
$groups = Groups_Group::get_groups( array( 'order_by' => 'name', 'order' => 'ASC' ) );
|
161 |
foreach( $groups as $group ) {
|
162 |
$selected = in_array( $group->group_id, $previous_selected ) ? ' selected="selected" ' : '';
|
163 |
-
$output .= sprintf(
|
|
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
$output .= '</select>';
|
166 |
$output .= '</div>';
|
@@ -233,7 +238,11 @@ class Groups_Admin_Posts {
|
|
233 |
);
|
234 |
|
235 |
foreach( $groups as $group ) {
|
236 |
-
$output .= sprintf(
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
$output .= '</select>';
|
239 |
$output .= '</div>'; // .groups-groups-container
|
160 |
$groups = Groups_Group::get_groups( array( 'order_by' => 'name', 'order' => 'ASC' ) );
|
161 |
foreach( $groups as $group ) {
|
162 |
$selected = in_array( $group->group_id, $previous_selected ) ? ' selected="selected" ' : '';
|
163 |
+
$output .= sprintf(
|
164 |
+
'<option value="%s" %s >%s</option>',
|
165 |
+
esc_attr( $group->group_id ),
|
166 |
+
esc_attr( $selected ),
|
167 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) )
|
168 |
+
);
|
169 |
}
|
170 |
$output .= '</select>';
|
171 |
$output .= '</div>';
|
238 |
);
|
239 |
|
240 |
foreach( $groups as $group ) {
|
241 |
+
$output .= sprintf(
|
242 |
+
'<option value="%s" >%s</option>',
|
243 |
+
esc_attr( $group->group_id ),
|
244 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) )
|
245 |
+
);
|
246 |
}
|
247 |
$output .= '</select>';
|
248 |
$output .= '</div>'; // .groups-groups-container
|
lib/admin/class-groups-admin-user-profile.php
CHANGED
@@ -81,7 +81,11 @@ class Groups_Admin_User_Profile {
|
|
81 |
esc_attr( __( 'Choose groups …', 'groups' ) )
|
82 |
);
|
83 |
foreach( $groups as $group ) {
|
84 |
-
$output .= sprintf(
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
$output .= '</select>';
|
87 |
$output .= Groups_UIE::render_select( '#user-groups' );
|
@@ -140,7 +144,10 @@ class Groups_Admin_User_Profile {
|
|
140 |
usort( $groups, array( __CLASS__, 'by_group_name' ) );
|
141 |
$output .= '<ul>';
|
142 |
foreach( $groups as $group ) {
|
143 |
-
$output .=
|
|
|
|
|
|
|
144 |
}
|
145 |
$output .= '</ul>';
|
146 |
}
|
@@ -171,7 +178,12 @@ class Groups_Admin_User_Profile {
|
|
171 |
);
|
172 |
foreach( $groups as $group ) {
|
173 |
$is_member = Groups_User_Group::read( $user->ID, $group->group_id ) ? true : false;
|
174 |
-
$output .= sprintf(
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
$output .= '</select>';
|
177 |
$output .= Groups_UIE::render_select( '#user-groups' );
|
81 |
esc_attr( __( 'Choose groups …', 'groups' ) )
|
82 |
);
|
83 |
foreach( $groups as $group ) {
|
84 |
+
$output .= sprintf(
|
85 |
+
'<option value="%d">%s</option>',
|
86 |
+
Groups_Utility::id( $group->group_id ),
|
87 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) )
|
88 |
+
);
|
89 |
}
|
90 |
$output .= '</select>';
|
91 |
$output .= Groups_UIE::render_select( '#user-groups' );
|
144 |
usort( $groups, array( __CLASS__, 'by_group_name' ) );
|
145 |
$output .= '<ul>';
|
146 |
foreach( $groups as $group ) {
|
147 |
+
$output .=
|
148 |
+
'<li>' .
|
149 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) ) .
|
150 |
+
'</li>';
|
151 |
}
|
152 |
$output .= '</ul>';
|
153 |
}
|
178 |
);
|
179 |
foreach( $groups as $group ) {
|
180 |
$is_member = Groups_User_Group::read( $user->ID, $group->group_id ) ? true : false;
|
181 |
+
$output .= sprintf(
|
182 |
+
'<option value="%d" %s>%s</option>',
|
183 |
+
Groups_Utility::id( $group->group_id ),
|
184 |
+
$is_member ? ' selected="selected" ' : '',
|
185 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) )
|
186 |
+
);
|
187 |
}
|
188 |
$output .= '</select>';
|
189 |
$output .= Groups_UIE::render_select( '#user-groups' );
|
lib/admin/class-groups-admin-users.php
CHANGED
@@ -197,7 +197,7 @@ class Groups_Admin_Users {
|
|
197 |
'<option value="%d" %s>%s</option>',
|
198 |
Groups_Utility::id( $group->group_id ),
|
199 |
$is_member ? ' selected="selected" ' : '',
|
200 |
-
wp_filter_nohtml_kses( $group->name )
|
201 |
);
|
202 |
}
|
203 |
$groups_select .= '</select>';
|
@@ -271,7 +271,11 @@ class Groups_Admin_Users {
|
|
271 |
'<option value="%d" %s>%s</option>',
|
272 |
Groups_Utility::id( $group->group_id ),
|
273 |
$selected ? ' selected="selected" ' : '',
|
274 |
-
sprintf(
|
|
|
|
|
|
|
|
|
275 |
);
|
276 |
}
|
277 |
$output .= '</select>';
|
@@ -376,7 +380,7 @@ class Groups_Admin_Users {
|
|
376 |
$output = '<ul>';
|
377 |
foreach( $groups as $group ) {
|
378 |
$output .= '<li>';
|
379 |
-
$output .= wp_filter_nohtml_kses( $group->name );
|
380 |
$output .= '</li>';
|
381 |
}
|
382 |
$output .= '</ul>';
|
197 |
'<option value="%d" %s>%s</option>',
|
198 |
Groups_Utility::id( $group->group_id ),
|
199 |
$is_member ? ' selected="selected" ' : '',
|
200 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) )
|
201 |
);
|
202 |
}
|
203 |
$groups_select .= '</select>';
|
271 |
'<option value="%d" %s>%s</option>',
|
272 |
Groups_Utility::id( $group->group_id ),
|
273 |
$selected ? ' selected="selected" ' : '',
|
274 |
+
sprintf(
|
275 |
+
'%s <span class="count">(%s)</span>',
|
276 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) ),
|
277 |
+
esc_html( $user_count )
|
278 |
+
)
|
279 |
);
|
280 |
}
|
281 |
$output .= '</select>';
|
380 |
$output = '<ul>';
|
381 |
foreach( $groups as $group ) {
|
382 |
$output .= '<li>';
|
383 |
+
$output .= stripslashes( wp_filter_nohtml_kses( $group->name ) );
|
384 |
$output .= '</li>';
|
385 |
}
|
386 |
$output .= '</ul>';
|
lib/admin/groups-admin-add-ons.php
CHANGED
@@ -54,84 +54,84 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
|
|
54 |
'title' => 'Groups File Access',
|
55 |
'content' => 'Groups File Access is a WordPress plugin that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.',
|
56 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-file-access.png',
|
57 |
-
'url' => '
|
58 |
'index' => 100
|
59 |
),
|
60 |
'groups-forums' => array(
|
61 |
'title' => 'Groups Forums',
|
62 |
'content' => 'Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.',
|
63 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-forums.png',
|
64 |
-
'url' => '
|
65 |
'index' => 100
|
66 |
),
|
67 |
'groups-gravity-forms' => array(
|
68 |
'title' => 'Groups Gravity Forms',
|
69 |
'content' => 'This extension integrates Groups with Gravity Forms. It allows to add users to groups automatically, based on form submissions.',
|
70 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-gravity-forms.png',
|
71 |
-
'url' => '
|
72 |
'index' => 100
|
73 |
),
|
74 |
'groups-import-export' => array(
|
75 |
'title' => 'Groups Import Export',
|
76 |
'content' => 'This is an extension for Groups, providing import and export facilities. Users can be imported and assigned to groups in bulk from a text file. Users can be exported in bulk, including all users or users that belong to specific groups.',
|
77 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-import-export.png',
|
78 |
-
'url' => '
|
79 |
'index' => 100
|
80 |
),
|
81 |
'groups-newsletters' => array(
|
82 |
'title' => 'Groups Newsletters',
|
83 |
'content' => 'Newsletter Campaigns for Subscribers and Groups. Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns.',
|
84 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-newsletters.png',
|
85 |
-
'url' => '
|
86 |
'index' => 100
|
87 |
),
|
88 |
'groups-paypal' => array(
|
89 |
'title' => 'Groups PayPal',
|
90 |
'content' => 'Sell memberships and subscriptions with Groups and PayPal.',
|
91 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-paypal.png',
|
92 |
-
'url' => '
|
93 |
'index' => 10
|
94 |
),
|
95 |
'groups-restrict-categories' => array(
|
96 |
'title' => 'Groups Restrict Categories',
|
97 |
'content' => 'Access restrictions for categories and tags, also supporting custom post types and taxonomies.',
|
98 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-categories.png',
|
99 |
-
'url' => '
|
100 |
'index' => 10
|
101 |
),
|
102 |
'groups-restrict-comments-pro' => array(
|
103 |
'title' => 'Groups Restrict Comments Pro',
|
104 |
'content' => 'This extension allows to restrict who can post or read comments based on a user’s group membership.',
|
105 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-comments-pro.png',
|
106 |
-
'url' => '
|
107 |
'index' => 100
|
108 |
),
|
109 |
'groups-woocommerce' => array(
|
110 |
'title' => 'Groups WooCommerce',
|
111 |
'content' => 'This extension allows you to sell memberships with WooCommerce.',
|
112 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-woocommerce.png',
|
113 |
-
'url' => '
|
114 |
'index' => 20
|
115 |
),
|
116 |
'widgets-control-pro' => array(
|
117 |
'title' => 'Widgets Control Pro',
|
118 |
'content' => 'An advanced Widget toolbox that adds visibility management and helps to control where widgets are shown efficiently. Show or hide widgets based on a user’s group membership.',
|
119 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/widgets-control-pro.png',
|
120 |
-
'url' => '
|
121 |
'index' => 20
|
122 |
),
|
123 |
'woocommerce-group-coupons' => array(
|
124 |
'title' => 'WooCommerce Group Coupons',
|
125 |
'content' => 'This extension allows to limit the validity of coupons based on groups and roles.',
|
126 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-group-coupons.png',
|
127 |
-
'url' => '
|
128 |
'index' => 100
|
129 |
),
|
130 |
'woocommerce-groups-newsletters' => array(
|
131 |
'title' => 'WooCommerce Groups Newsletters',
|
132 |
'content' => 'The WooCommerce Groups Newsletters extension lets customers subscribe to newsletters at checkout.',
|
133 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-groups-newsletters.png',
|
134 |
-
'url' => '
|
135 |
'index' => 100
|
136 |
),
|
137 |
);
|
@@ -162,28 +162,28 @@ function groups_admin_add_ons_content( $params = array( 'offset' => 0 ) ) {
|
|
162 |
'title' => 'Affiliates Pro',
|
163 |
'content' => 'Boost Sales with Affiliate Marketing for your WordPress site.',
|
164 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-pro.png',
|
165 |
-
'url' => '
|
166 |
'index' => 100
|
167 |
),
|
168 |
'affiliates-enterprise' => array(
|
169 |
'title' => 'Affiliates Enterprise',
|
170 |
'content' => 'Affiliates Enterprise provides an affiliate management system for sellers, shops and developers, who want to boost sales with their own affiliate program. Features affiliate campaigns, tracking pixels and multiple tiers.',
|
171 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-enterprise.png',
|
172 |
-
'url' => '
|
173 |
'index' => 100
|
174 |
),
|
175 |
'woocommerce-product-search' => array(
|
176 |
'title' => 'WooCommerce Product Search',
|
177 |
'content' => 'The essential extension for every WooCommerce Store! The perfect Search Engine for your store helps your customers to find and buy the right products quickly.',
|
178 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-product-search.png',
|
179 |
-
'url' => '
|
180 |
'index' => 100
|
181 |
),
|
182 |
'woocommerce-sales-analysis' => array(
|
183 |
'title' => 'Sales Analysis for WooCommerce',
|
184 |
'content' => 'Sales Analysis for Managers and Marketers. Get in-depth views on fundamental Business Intelligence. Focused on sales and net revenue trends, regional analysis, product market, and customer trends.',
|
185 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-sales-analysis.png',
|
186 |
-
'url' => '
|
187 |
'index' => 100
|
188 |
),
|
189 |
);
|
54 |
'title' => 'Groups File Access',
|
55 |
'content' => 'Groups File Access is a WordPress plugin that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.',
|
56 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-file-access.png',
|
57 |
+
'url' => 'https://www.itthinx.com/shop/groups-file-access/',
|
58 |
'index' => 100
|
59 |
),
|
60 |
'groups-forums' => array(
|
61 |
'title' => 'Groups Forums',
|
62 |
'content' => 'Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.',
|
63 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-forums.png',
|
64 |
+
'url' => 'https://www.itthinx.com/shop/groups-forums/',
|
65 |
'index' => 100
|
66 |
),
|
67 |
'groups-gravity-forms' => array(
|
68 |
'title' => 'Groups Gravity Forms',
|
69 |
'content' => 'This extension integrates Groups with Gravity Forms. It allows to add users to groups automatically, based on form submissions.',
|
70 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-gravity-forms.png',
|
71 |
+
'url' => 'https://www.itthinx.com/shop/groups-gravity-forms/',
|
72 |
'index' => 100
|
73 |
),
|
74 |
'groups-import-export' => array(
|
75 |
'title' => 'Groups Import Export',
|
76 |
'content' => 'This is an extension for Groups, providing import and export facilities. Users can be imported and assigned to groups in bulk from a text file. Users can be exported in bulk, including all users or users that belong to specific groups.',
|
77 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-import-export.png',
|
78 |
+
'url' => 'https://www.itthinx.com/shop/groups-import-export/',
|
79 |
'index' => 100
|
80 |
),
|
81 |
'groups-newsletters' => array(
|
82 |
'title' => 'Groups Newsletters',
|
83 |
'content' => 'Newsletter Campaigns for Subscribers and Groups. Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns.',
|
84 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-newsletters.png',
|
85 |
+
'url' => 'https://www.itthinx.com/shop/groups-newsletters/',
|
86 |
'index' => 100
|
87 |
),
|
88 |
'groups-paypal' => array(
|
89 |
'title' => 'Groups PayPal',
|
90 |
'content' => 'Sell memberships and subscriptions with Groups and PayPal.',
|
91 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-paypal.png',
|
92 |
+
'url' => 'https://www.itthinx.com/shop/groups-paypal/',
|
93 |
'index' => 10
|
94 |
),
|
95 |
'groups-restrict-categories' => array(
|
96 |
'title' => 'Groups Restrict Categories',
|
97 |
'content' => 'Access restrictions for categories and tags, also supporting custom post types and taxonomies.',
|
98 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-categories.png',
|
99 |
+
'url' => 'https://www.itthinx.com/shop/groups-restrict-categories/',
|
100 |
'index' => 10
|
101 |
),
|
102 |
'groups-restrict-comments-pro' => array(
|
103 |
'title' => 'Groups Restrict Comments Pro',
|
104 |
'content' => 'This extension allows to restrict who can post or read comments based on a user’s group membership.',
|
105 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-restrict-comments-pro.png',
|
106 |
+
'url' => 'https://www.itthinx.com/shop/groups-restrict-comments-pro/',
|
107 |
'index' => 100
|
108 |
),
|
109 |
'groups-woocommerce' => array(
|
110 |
'title' => 'Groups WooCommerce',
|
111 |
'content' => 'This extension allows you to sell memberships with WooCommerce.',
|
112 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/groups-woocommerce.png',
|
113 |
+
'url' => 'https://www.itthinx.com/shop/groups-woocommerce/',
|
114 |
'index' => 20
|
115 |
),
|
116 |
'widgets-control-pro' => array(
|
117 |
'title' => 'Widgets Control Pro',
|
118 |
'content' => 'An advanced Widget toolbox that adds visibility management and helps to control where widgets are shown efficiently. Show or hide widgets based on a user’s group membership.',
|
119 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/widgets-control-pro.png',
|
120 |
+
'url' => 'https://www.itthinx.com/shop/widgets-control-pro/',
|
121 |
'index' => 20
|
122 |
),
|
123 |
'woocommerce-group-coupons' => array(
|
124 |
'title' => 'WooCommerce Group Coupons',
|
125 |
'content' => 'This extension allows to limit the validity of coupons based on groups and roles.',
|
126 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-group-coupons.png',
|
127 |
+
'url' => 'https://www.itthinx.com/shop/woocommerce-group-coupons/',
|
128 |
'index' => 100
|
129 |
),
|
130 |
'woocommerce-groups-newsletters' => array(
|
131 |
'title' => 'WooCommerce Groups Newsletters',
|
132 |
'content' => 'The WooCommerce Groups Newsletters extension lets customers subscribe to newsletters at checkout.',
|
133 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-groups-newsletters.png',
|
134 |
+
'url' => 'https://www.itthinx.com/shop/woocommerce-groups-newsletters/',
|
135 |
'index' => 100
|
136 |
),
|
137 |
);
|
162 |
'title' => 'Affiliates Pro',
|
163 |
'content' => 'Boost Sales with Affiliate Marketing for your WordPress site.',
|
164 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-pro.png',
|
165 |
+
'url' => 'https://www.itthinx.com/shop/affiliates-pro/',
|
166 |
'index' => 100
|
167 |
),
|
168 |
'affiliates-enterprise' => array(
|
169 |
'title' => 'Affiliates Enterprise',
|
170 |
'content' => 'Affiliates Enterprise provides an affiliate management system for sellers, shops and developers, who want to boost sales with their own affiliate program. Features affiliate campaigns, tracking pixels and multiple tiers.',
|
171 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/affiliates-enterprise.png',
|
172 |
+
'url' => 'https://www.itthinx.com/shop/affiliates-enterprise/',
|
173 |
'index' => 100
|
174 |
),
|
175 |
'woocommerce-product-search' => array(
|
176 |
'title' => 'WooCommerce Product Search',
|
177 |
'content' => 'The essential extension for every WooCommerce Store! The perfect Search Engine for your store helps your customers to find and buy the right products quickly.',
|
178 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-product-search.png',
|
179 |
+
'url' => 'https://www.itthinx.com/shop/woocommerce-product-search/',
|
180 |
'index' => 100
|
181 |
),
|
182 |
'woocommerce-sales-analysis' => array(
|
183 |
'title' => 'Sales Analysis for WooCommerce',
|
184 |
'content' => 'Sales Analysis for Managers and Marketers. Get in-depth views on fundamental Business Intelligence. Focused on sales and net revenue trends, regional analysis, product market, and customer trends.',
|
185 |
'image' => GROUPS_PLUGIN_URL . 'images/add-ons/woocommerce-sales-analysis.png',
|
186 |
+
'url' => 'https://www.itthinx.com/shop/woocommerce-sales-analysis/',
|
187 |
'index' => 100
|
188 |
),
|
189 |
);
|
lib/admin/groups-admin-capabilities-remove.php
CHANGED
@@ -142,7 +142,7 @@ function groups_admin_capabilities_bulk_remove() {
|
|
142 |
$output .= '<input id="capability_ids" name="capability_ids[]" type="hidden" value="' . esc_attr( intval( $capability->capability_id ) ) . '"/>';
|
143 |
$output .= '<ul>';
|
144 |
$output .= '<li>';
|
145 |
-
$output .= sprintf( __( '<strong>%s</strong>', 'groups' ), wp_filter_nohtml_kses( $capability->capability ) );
|
146 |
$output .= '</li>';
|
147 |
$output .= '</ul>';
|
148 |
}
|
142 |
$output .= '<input id="capability_ids" name="capability_ids[]" type="hidden" value="' . esc_attr( intval( $capability->capability_id ) ) . '"/>';
|
143 |
$output .= '<ul>';
|
144 |
$output .= '<li>';
|
145 |
+
$output .= sprintf( __( '<strong>%s</strong>', 'groups' ), stripslashes( wp_filter_nohtml_kses( $capability->capability ) ) );
|
146 |
$output .= '</li>';
|
147 |
$output .= '</ul>';
|
148 |
}
|
lib/admin/groups-admin-groups-add.php
CHANGED
@@ -50,7 +50,10 @@ function groups_admin_groups_add() {
|
|
50 |
$parent_select .= '<option value="">--</option>';
|
51 |
$groups = $wpdb->get_results( "SELECT * FROM $group_table" );
|
52 |
foreach ( $groups as $group ) {
|
53 |
-
$parent_select .=
|
|
|
|
|
|
|
54 |
}
|
55 |
$parent_select .= '</select>';
|
56 |
|
@@ -100,7 +103,7 @@ function groups_admin_groups_add() {
|
|
100 |
__( 'Choose capabilities …', 'groups' )
|
101 |
);
|
102 |
foreach( $capabilities as $capability ) {
|
103 |
-
$output .= sprintf( '<option value="%s">%s</option>', esc_attr( $capability->capability_id ), wp_filter_nohtml_kses( $capability->capability ) );
|
104 |
}
|
105 |
$output .= '</select>';
|
106 |
$output .= '</label>';
|
50 |
$parent_select .= '<option value="">--</option>';
|
51 |
$groups = $wpdb->get_results( "SELECT * FROM $group_table" );
|
52 |
foreach ( $groups as $group ) {
|
53 |
+
$parent_select .=
|
54 |
+
'<option value="' . esc_attr( $group->group_id ) . '">' .
|
55 |
+
stripslashes( wp_filter_nohtml_kses( $group->name ) ) .
|
56 |
+
'</option>';
|
57 |
}
|
58 |
$parent_select .= '</select>';
|
59 |
|
103 |
__( 'Choose capabilities …', 'groups' )
|
104 |
);
|
105 |
foreach( $capabilities as $capability ) {
|
106 |
+
$output .= sprintf( '<option value="%s">%s</option>', esc_attr( $capability->capability_id ), stripslashes( wp_filter_nohtml_kses( $capability->capability ) ) );
|
107 |
}
|
108 |
$output .= '</select>';
|
109 |
$output .= '</label>';
|
lib/admin/groups-admin-groups-edit.php
CHANGED
@@ -121,7 +121,7 @@ function groups_admin_groups_edit( $group_id ) {
|
|
121 |
);
|
122 |
foreach( $capabilities as $capability ) {
|
123 |
$selected = in_array( $capability->capability_id, $group_capabilities_array ) ? ' selected="selected" ' : '';
|
124 |
-
$output .= sprintf( '<option value="%s" %s>%s</option>', esc_attr( $capability->capability_id ), $selected, wp_filter_nohtml_kses( $capability->capability ) );
|
125 |
}
|
126 |
$output .= '</select>';
|
127 |
$output .= '</label>';
|
121 |
);
|
122 |
foreach( $capabilities as $capability ) {
|
123 |
$selected = in_array( $capability->capability_id, $group_capabilities_array ) ? ' selected="selected" ' : '';
|
124 |
+
$output .= sprintf( '<option value="%s" %s>%s</option>', esc_attr( $capability->capability_id ), $selected, stripslashes( wp_filter_nohtml_kses( $capability->capability ) ) );
|
125 |
}
|
126 |
$output .= '</select>';
|
127 |
$output .= '</label>';
|
lib/admin/groups-admin-groups-remove.php
CHANGED
@@ -146,7 +146,7 @@ function groups_admin_groups_bulk_remove() {
|
|
146 |
$output .= '<input id="group_ids" name="group_ids[]" type="hidden" value="' . esc_attr( intval( $group->group_id ) ) . '"/>';
|
147 |
$output .= '<ul>';
|
148 |
$output .= '<li>';
|
149 |
-
$output .= sprintf( __( '<strong>%s</strong>', 'groups' ), wp_filter_nohtml_kses( $group->name ) );
|
150 |
$output .= '</li>';
|
151 |
$output .= '</ul>';
|
152 |
}
|
146 |
$output .= '<input id="group_ids" name="group_ids[]" type="hidden" value="' . esc_attr( intval( $group->group_id ) ) . '"/>';
|
147 |
$output .= '<ul>';
|
148 |
$output .= '<li>';
|
149 |
+
$output .= sprintf( __( '<strong>%s</strong>', 'groups' ), stripslashes( wp_filter_nohtml_kses( $group->name ) ) );
|
150 |
$output .= '</li>';
|
151 |
$output .= '</ul>';
|
152 |
}
|
lib/admin/groups-admin-groups.php
CHANGED
@@ -362,7 +362,7 @@ function groups_admin_groups() {
|
|
362 |
esc_attr( __( 'Capabilities …', 'groups' ) )
|
363 |
);
|
364 |
foreach( $capabilities as $capability ) {
|
365 |
-
$capabilities_select .= sprintf( '<option value="%s">%s</option>', esc_attr( $capability->capability_id ), wp_filter_nohtml_kses( $capability->capability ) );
|
366 |
}
|
367 |
$capabilities_select .= '</select>';
|
368 |
$capabilities_select .= Groups_UIE::render_select( '.select.capability' );
|
@@ -526,7 +526,7 @@ function groups_admin_groups() {
|
|
526 |
}
|
527 |
$output .= sprintf( '<span class="%s">', $class );
|
528 |
if ( isset( $group_capability->capability ) && isset( $group_capability->capability->capability ) ) {
|
529 |
-
$output .= wp_filter_nohtml_kses( $group_capability->capability->capability );
|
530 |
}
|
531 |
$output .= '</span>';
|
532 |
$output .= '</li>';
|
362 |
esc_attr( __( 'Capabilities …', 'groups' ) )
|
363 |
);
|
364 |
foreach( $capabilities as $capability ) {
|
365 |
+
$capabilities_select .= sprintf( '<option value="%s">%s</option>', esc_attr( $capability->capability_id ), stripslashes( wp_filter_nohtml_kses( $capability->capability ) ) );
|
366 |
}
|
367 |
$capabilities_select .= '</select>';
|
368 |
$capabilities_select .= Groups_UIE::render_select( '.select.capability' );
|
526 |
}
|
527 |
$output .= sprintf( '<span class="%s">', $class );
|
528 |
if ( isset( $group_capability->capability ) && isset( $group_capability->capability->capability ) ) {
|
529 |
+
$output .= stripslashes( wp_filter_nohtml_kses( $group_capability->capability->capability ) );
|
530 |
}
|
531 |
$output .= '</span>';
|
532 |
$output .= '</li>';
|
lib/admin/groups-admin-options.php
CHANGED
@@ -175,7 +175,7 @@ function groups_admin_options() {
|
|
175 |
$dismiss_url = wp_nonce_url( add_query_arg( 'dismiss-groups-extensions-box', '1', admin_url( 'admin.php?page=groups-admin-options' ) ), 'dismiss-box', 'groups-extensions-box-nonce' );
|
176 |
$extensions_box =
|
177 |
'<div id="groups-extensions-box">' .
|
178 |
-
__( 'Enhanced functionality is available via official <a href="
|
179 |
sprintf( '<a class="close" href="%s">x</a>', esc_url( $dismiss_url ) ) .
|
180 |
'</div>';
|
181 |
}
|
175 |
$dismiss_url = wp_nonce_url( add_query_arg( 'dismiss-groups-extensions-box', '1', admin_url( 'admin.php?page=groups-admin-options' ) ), 'dismiss-box', 'groups-extensions-box-nonce' );
|
176 |
$extensions_box =
|
177 |
'<div id="groups-extensions-box">' .
|
178 |
+
__( 'Enhanced functionality is available via official <a href="https://www.itthinx.com/shop/">Extensions</a> for Groups.', 'groups' ) .
|
179 |
sprintf( '<a class="close" href="%s">x</a>', esc_url( $dismiss_url ) ) .
|
180 |
'</div>';
|
181 |
}
|
lib/blocks/.gitignore
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
node_modules/
|
2 |
-
package.json
|
3 |
package-lock.json
|
4 |
-
src/common.scss
|
5 |
-
blocks.style.build.css
|
6 |
|
7 |
## Uncomment line below if you prefer to
|
8 |
## keep compiled files out of version control
|
1 |
node_modules/
|
2 |
+
# package.json
|
3 |
package-lock.json
|
4 |
+
# src/common.scss
|
5 |
+
# blocks.style.build.css
|
6 |
|
7 |
## Uncomment line below if you prefer to
|
8 |
## keep compiled files out of version control
|
lib/blocks/dist/blocks.build.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=14)}([function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):g=-1,h.length&&u())}function u(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++g<t;)d&&d[g].run();g=-1,t=h.length}d=null,m=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function l(){}var c,p,f=e.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],m=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||m||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){e.exports=React},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r=n(8);e.exports=n(28)(r.isElement,!0)}else e.exports=n(31)()}).call(t,n(0))},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){u(e,t,n[t])})}return e}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function h(e,t){if(null==e)return{};var n,r,o=d(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?m(e):t}function v(e){return b(e)||y(e)||E()}function b(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function y(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function O(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function w(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push("".concat(O(e,i)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}function C(e,t,n){if(n){var r=n(e,t);if("string"===typeof r)return r}return e}function x(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function S(e){return x(e)?window.pageYOffset:e.scrollTop}function A(e,t){if(x(e))return void window.scrollTo(0,t);e.scrollTop=t}function k(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}function F(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function D(e,t){function n(){s+=u;var t=F(s,i,a,r);A(e,t),s<r?Z()(n):o(e)}var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q,i=S(e),a=t-i,u=10,s=0;n()}function M(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?A(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&A(e,Math.max(t.offsetTop-o,0))}function P(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function N(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function I(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,u=e.theme,s=u.spacing,l=k(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var p=l.getBoundingClientRect(),f=p.height,d=n.getBoundingClientRect(),h=d.bottom,m=d.height,g=d.top,v=n.offsetParent.getBoundingClientRect(),b=v.top,y=window.innerHeight,E=S(l),O=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),C=b-w,x=y-g,F=C+E,M=f-E-g,P=h-y+E+O,N=E+g-w;switch(o){case"auto":case"bottom":if(x>=m)return{placement:"bottom",maxHeight:t};if(M>=m&&!a)return i&&D(l,P,160),{placement:"bottom",maxHeight:t};if(!a&&M>=r||a&&x>=r){i&&D(l,P,160);return{placement:"bottom",maxHeight:a?x-O:M-O}}if("auto"===o||a){var I=t,T=a?C:F;return T>=r&&(I=Math.min(T-O-s.controlHeight,t)),{placement:"top",maxHeight:I}}if("bottom"===o)return A(l,P),{placement:"bottom",maxHeight:t};break;case"top":if(C>=m)return{placement:"top",maxHeight:t};if(F>=m&&!a)return i&&D(l,N,160),{placement:"top",maxHeight:t};if(!a&&F>=r||a&&C>=r){var L=t;return(!a&&F>=r||a&&C>=r)&&(L=a?C-w:F-w),i&&D(l,N,160),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}function T(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}function L(e,t){if(e===t)return!0;if(e&&t&&"object"==r(e)&&"object"==r(t)){var n,o,i,a=he(e),u=he(t);if(a&&u){if((o=e.length)!=t.length)return!1;for(n=o;0!==n--;)if(!L(e[n],t[n]))return!1;return!0}if(a!=u)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return e.toString()==t.toString();var f=me(e);if((o=f.length)!==me(t).length)return!1;for(n=o;0!==n--;)if(!ge.call(t,f[n]))return!1;for(n=o;0!==n--;)if(("_owner"!==(i=f[n])||!e.$$typeof)&&!L(e[i],t[i]))return!1;return!0}return e!==e&&t!==t}function _(e,t){try{return L(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function V(e){e.preventDefault()}function R(e){e.stopPropagation()}function j(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function B(){return"ontouchstart"in window||navigator.maxTouchPoints}var U=n(1),W=n.n(U),H=n(18),z=n(19),G=n(3),$=(n.n(G),n(2)),q=n.n($),Y=n(32),Z=n.n(Y),X=n(34),J=n.n(X),K=n(35),Q=(n.n(K),function(){}),ee=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[]},te=function(e){return"auto"===e?"bottom":e},ne=function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return t={label:"menu"},u(t,T(n),"100%"),u(t,"backgroundColor",a.neutral0),u(t,"borderRadius",o),u(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),u(t,"marginBottom",i.menuGutter),u(t,"marginTop",i.menuGutter),u(t,"position","absolute"),u(t,"width","100%"),u(t,"zIndex",1),t},re=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),u(m(m(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,u=t.menuShouldScrollIntoView,s=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===a,p=u&&!c,f=I({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:p,isFixedPosition:c,theme:s});l&&l(f),n.setState(f)}}),u(m(m(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||te(e);return l({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return c(t,e),a(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(U.Component);u(re,"contextTypes",{getPortalPlacement:q.a.func});var oe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,u=r(Object(z.a)(o("menu",e)),{menu:!0},n);return W.a.createElement("div",s({className:u},a,{ref:i}),t)},ie=function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},ae=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return W.a.createElement("div",{className:r(Object(z.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},ue=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},se=ue,le=ue,ce=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};ce.defaultProps={children:"No options"};var pe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};pe.defaultProps={children:"Loading..."};var fe=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},de=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{placement:null}),u(m(m(n)),"getPortalPlacement",function(e){var t=e.placement;t!==te(n.props.menuPlacement)&&n.setState({placement:t})}),n}return c(t,e),a(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,u="fixed"===i;if(!t&&!u||!r)return null;var s=this.state.placement||te(o),l=P(r),c=u?0:window.pageYOffset,p=l[s]+c,f={offset:p,position:i,rect:l},d=W.a.createElement("div",{className:Object(z.a)(a("menuPortal",f))},n);return t?Object(G.createPortal)(d,t):d}}]),t}(U.Component);u(de,"childContextTypes",{getPortalPlacement:q.a.func});var he=Array.isArray,me=Object.keys,ge=Object.prototype.hasOwnProperty,ve=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],be=function(e){for(var t=0;t<ve.length;t++)e=e.replace(ve[t].letters,ve[t].base);return e},ye=function(e){return e.replace(/^\s+|\s+$/g,"")},Ee=function(e){return"".concat(e.label," ").concat(e.value)},Oe=function(e){return W.a.createElement("span",s({className:Object(z.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},we=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,h(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return W.a.createElement("input",s({ref:t},n,{className:Object(z.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(U.Component),Ce=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(G.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(U.Component),xe=["boxSizing","height","overflow","paddingRight","position"],Se={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"},Ae=!("undefined"===typeof window||!window.document||!window.document.createElement),ke=0,Fe=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"originalStyles",{}),u(m(m(n)),"listenerOptions",{capture:!1,passive:!1}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;if(Ae){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&xe.forEach(function(t){var n=i&&i[t];e.originalStyles[t]=n}),n&&ke<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,u=document.body?document.body.clientWidth:0,s=window.innerWidth-u+a||0;Object.keys(Se).forEach(function(e){var t=Se[e];i&&(i[e]=t)}),i&&(i.paddingRight="".concat(s,"px"))}o&&B()&&(o.addEventListener("touchmove",V,this.listenerOptions),r&&(r.addEventListener("touchstart",j,this.listenerOptions),r.addEventListener("touchmove",R,this.listenerOptions))),ke+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(Ae){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;ke=Math.max(ke-1,0),n&&ke<1&&xe.forEach(function(t){var n=e.originalStyles[t];i&&(i[t]=n)}),o&&B()&&(o.removeEventListener("touchmove",V,this.listenerOptions),r&&(r.removeEventListener("touchstart",j,this.listenerOptions),r.removeEventListener("touchmove",R,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(U.Component);u(Fe,"defaultProps",{accountForScrollbars:!0});var De=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{touchScrollTarget:null}),u(m(m(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),u(m(m(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?W.a.createElement("div",null,W.a.createElement("div",{onClick:this.blurSelectInput,className:Object(z.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),W.a.createElement(Ce,{innerRef:this.getScrollTarget},t),r?W.a.createElement(Fe,{touchScrollTarget:r}):null):t}}]),t}(U.PureComponent),Me=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"isBottom",!1),u(m(m(n)),"isTop",!1),u(m(m(n)),"scrollTarget",void 0),u(m(m(n)),"touchStart",void 0),u(m(m(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),u(m(m(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,u=r.onTopLeave,s=n.scrollTarget,l=s.scrollTop,c=s.scrollHeight,p=s.clientHeight,f=n.scrollTarget,d=t>0,h=c-p-l,m=!1;h>t&&n.isBottom&&(i&&i(e),n.isBottom=!1),d&&n.isTop&&(u&&u(e),n.isTop=!1),d&&t>h?(o&&!n.isBottom&&o(e),f.scrollTop=c,m=!0,n.isBottom=!0):!d&&-t>l&&(a&&!n.isTop&&a(e),f.scrollTop=0,m=!0,n.isTop=!0),m&&n.cancelScroll(e)}),u(m(m(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),u(m(m(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),u(m(m(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),u(m(m(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"===typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"===typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"===typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"===typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return W.a.createElement(Ce,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(U.Component),Pe=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=h(e,["isEnabled"]);return t?W.a.createElement(Me,n):this.props.children}}]),t}(U.Component);u(Pe,"defaultProps",{isEnabled:!0});var Ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Ie=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return r?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.")}},Te=function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},Le=function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},_e=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")},Ve=function(e){return e.label},Re=function(e){return e.label},je=function(e){return e.value},Be=function(e){return!!e.isDisabled},Ue=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},We=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,u=e.isRtl;return W.a.createElement("div",s({className:r(Object(z.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":u},n)},i),t)},He=function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},ze=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return W.a.createElement("div",{className:r(Object(z.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(U.Component),Ge=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},$e=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return W.a.createElement("div",{className:r(Object(z.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},qe=function(e){var t=e.size,n=h(e,["size"]);return W.a.createElement("svg",s({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(z.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},Ye=function(e){return W.a.createElement(qe,s({size:20},e),W.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ze=function(e){return W.a.createElement(qe,s({size:20},e),W.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Xe=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Je=Xe,Ke=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({},i,{className:r(Object(z.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||W.a.createElement(Ze,null))},Qe=Xe,et=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({},i,{className:r(Object(z.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||W.a.createElement(Ye,null))},tt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},nt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return W.a.createElement("span",s({},o,{className:n(Object(z.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},rt=!1,ot=function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},it=function(e){var t=e.color,n=e.delay,r=e.offset;return W.a.createElement("span",{className:Object(z.a)({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},at=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,u=e.theme.colors,l=i?u.neutral80:u.neutral20;return rt||(Object(z.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),rt=!0),W.a.createElement("div",s({},o,{className:n(Object(z.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),W.a.createElement(it,{color:l,delay:0,offset:a}),W.a.createElement(it,{color:l,delay:160,offset:!0}),W.a.createElement(it,{color:l,delay:320,offset:!a}))};at.defaultProps={size:4};var ut=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},st=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,u=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return W.a.createElement("div",s({ref:u,className:n(Object(z.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":c},o)},l),t)},lt=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},ct=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,u=e.label,l=e.theme,c=e.selectProps;return W.a.createElement("div",{className:r(Object(z.a)(o("group",e)),{group:!0},n)},W.a.createElement(i,s({},a,{selectProps:c,theme:l,getStyles:o,cx:r}),u),W.a.createElement("div",null,t))},pt=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},ft=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=(e.selectProps,h(e,["className","cx","getStyles","theme","selectProps"]));return W.a.createElement("div",s({className:n(Object(z.a)(r("groupHeading",l({theme:o},i))),{"group-heading":!0},t)},i))},dt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},ht=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},mt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,u=e.theme,c=(e.selectProps,h(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return W.a.createElement("div",{className:Object(z.a)(r("input",l({theme:u},c)))},W.a.createElement(J.a,s({className:n(null,{input:!0},t),inputRef:o,inputStyle:ht(i),disabled:a},c)))},gt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},vt=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},bt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},yt=function(e){var t=e.children,n=e.innerProps;return W.a.createElement("div",n,t)},Et=yt,Ot=yt,wt=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return W.a.createElement("div",n,t||W.a.createElement(Ye,{size:14}))}}]),t}(U.Component),Ct=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,u=e.innerProps,s=e.isDisabled,c=e.removeProps,p=e.selectProps,f=r.Container,d=r.Label,h=r.Remove,m=l({className:o(Object(z.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),g={className:o(Object(z.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},v=l({className:o(Object(z.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},c);return W.a.createElement(f,{data:i,innerProps:m,selectProps:p},W.a.createElement(d,{data:i,innerProps:g,selectProps:p},t),W.a.createElement(h,{data:i,innerProps:v,selectProps:p}))}}]),t}(U.Component);u(Ct,"defaultProps",{cropWithEllipsis:!0});var xt=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},St=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,u=e.isSelected,l=e.innerRef,c=e.innerProps;return W.a.createElement("div",s({ref:l,className:r(Object(z.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":u},n)},c),t)},At=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},kt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},Ft=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},Dt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return W.a.createElement("div",s({className:r(Object(z.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},Mt={ClearIndicator:et,Control:st,DropdownIndicator:Ke,DownChevron:Ze,CrossIcon:Ye,Group:ct,GroupHeading:ft,IndicatorsContainer:$e,IndicatorSeparator:nt,Input:mt,LoadingIndicator:at,Menu:oe,MenuList:ae,MenuPortal:de,LoadingMessage:pe,NoOptionsMessage:ce,MultiValue:Ct,MultiValueContainer:Et,MultiValueLabel:Ot,MultiValueRemove:wt,Option:St,Placeholder:kt,SelectContainer:We,SingleValue:Dt,ValueContainer:ze},Pt=function(e){return l({},Mt,e.components)},Nt={clearIndicator:Qe,container:Ue,control:ut,dropdownIndicator:Je,group:lt,groupHeading:pt,indicatorsContainer:Ge,indicatorSeparator:tt,input:dt,loadingIndicator:ot,loadingMessage:le,menu:ne,menuList:ie,menuPortal:fe,multiValue:gt,multiValueLabel:vt,multiValueRemove:bt,noOptionsMessage:se,option:xt,placeholder:At,singleValue:Ft,valueContainer:He},It={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Tt={baseUnit:4,controlHeight:38,menuGutter:8},Lt={borderRadius:4,colors:It,spacing:Tt},_t={backspaceRemovesValue:!0,blurInputOnSelect:N(),captureMenuScroll:!N(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=l({ignoreCase:!0,ignoreAccents:!0,stringify:Ee,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,u=r.trim,s=r.matchFrom,c=u?ye(n):n,p=u?ye(a(t)):a(t);return o&&(c=c.toLowerCase(),p=p.toLowerCase()),i&&(c=be(c),p=be(p)),"start"===s?p.substr(0,c.length)===c:p.indexOf(c)>-1}}(),formatGroupLabel:Ve,getOptionLabel:Re,getOptionValue:je,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Be,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Vt=1,Rt=function(e){function t(e){var n;o(this,t),n=g(this,p(t).call(this,e)),u(m(m(n)),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),u(m(m(n)),"blockOptionHover",!1),u(m(m(n)),"isComposing",!1),u(m(m(n)),"clearFocusValueOnUpdate",!1),u(m(m(n)),"commonProps",void 0),u(m(m(n)),"components",void 0),u(m(m(n)),"hasGroups",!1),u(m(m(n)),"initialTouchX",0),u(m(m(n)),"initialTouchY",0),u(m(m(n)),"inputIsHiddenAfterUpdate",void 0),u(m(m(n)),"instancePrefix",""),u(m(m(n)),"openAfterFocus",!1),u(m(m(n)),"scrollToFocusedOptionOnUpdate",!1),u(m(m(n)),"userIsDragging",void 0),u(m(m(n)),"controlRef",null),u(m(m(n)),"getControlRef",function(e){n.controlRef=e}),u(m(m(n)),"focusedOptionRef",null),u(m(m(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),u(m(m(n)),"menuListRef",null),u(m(m(n)),"getMenuListRef",function(e){n.menuListRef=e}),u(m(m(n)),"inputRef",null),u(m(m(n)),"getInputRef",function(e){n.inputRef=e}),u(m(m(n)),"cacheComponents",function(e){n.components=Pt({components:e})}),u(m(m(n)),"focus",n.focusInput),u(m(m(n)),"blur",n.blurInput),u(m(m(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,l({},t,{name:r.name}))}),u(m(m(n)),"setValue",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=n.props,i=o.closeMenuOnSelect,a=o.isMulti;n.onInputChange("",{action:"set-value"}),i&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),u(m(m(n)),"selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,i=n.state.selectValue;if(o)if(n.isOptionSelected(e,i)){var a=n.getOptionValue(e);n.setValue(i.filter(function(e){return n.getOptionValue(e)!==a}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(v(i),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()}),u(m(m(n)),"removeValue",function(e){var t=n.state.selectValue,r=n.getOptionValue(e);n.onChange(t.filter(function(e){return n.getOptionValue(e)!==r}),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()}),u(m(m(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),u(m(m(n)),"popValue",function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})}),u(m(m(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),u(m(m(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),u(m(m(n)),"getStyles",function(e,t){var r=Nt[e](t);r.boxSizing="border-box";var o=n.props.styles[e];return o?o(r,t):r}),u(m(m(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),u(m(m(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}}),u(m(m(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Ie(t,r)})}),u(m(m(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Ne(t,l({},r,{label:n.props["aria-label"]}))})}),u(m(m(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),u(m(m(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),u(m(m(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),u(m(m(n)),"onDropdownIndicatorMouseDown",function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!n.props.isDisabled){var t=n.props,r=t.isMulti,o=t.menuIsOpen;n.focusInput(),o?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}}),u(m(m(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),u(m(m(n)),"onScroll",function(e){"boolean"===typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&x(e.target)&&n.props.onMenuClose():"function"===typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),u(m(m(n)),"onCompositionStart",function(){n.isComposing=!0}),u(m(m(n)),"onCompositionEnd",function(){n.isComposing=!1}),u(m(m(n)),"onTouchStart",function(e){var t=e.touches,r=t.item(0);r&&(n.initialTouchX=r.clientX,n.initialTouchY=r.clientY,n.userIsDragging=!1)}),u(m(m(n)),"onTouchMove",function(e){var t=e.touches,r=t.item(0);if(r){var o=Math.abs(r.clientX-n.initialTouchX),i=Math.abs(r.clientY-n.initialTouchY);n.userIsDragging=o>5||i>5}}),u(m(m(n)),"onTouchEnd",function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)}),u(m(m(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),u(m(m(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),u(m(m(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),u(m(m(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),u(m(m(n)),"onInputFocus",function(e){var t=n.props,r=t.isSearchable,o=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1}),u(m(m(n)),"onInputBlur",function(e){if(n.menuListRef&&n.menuListRef.contains(document.activeElement))return void n.inputRef.focus();n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1})}),u(m(m(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),u(m(m(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),u(m(m(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,u=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=n.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!s&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)n.removeValue(m);else{if(!o)return;r?n.popValue():u&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!l||!p||!h||f&&n.isOptionSelected(h,g))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):u&&i&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=Object(H.a)(n.cacheComponents,_).bind(m(m(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Vt);var i=ee(r),a=n.buildMenuOptions(e,i);return n.state.menuOptions=a,n.state.selectValue=i,n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=ee(e.value),a=this.buildMenuOptions(e,i),u=this.getNextFocusedValue(i),s=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&M(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=t.isFocused,i=this.props.isMulti,a="first"===e?0:n.focusable.length-1;if(!i){var u=n.focusable.indexOf(r[0]);u>-1&&(a=u)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var u=i.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u<s&&(l=u+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:i[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions,i=o.focusable;if(i.length){var a=0,u=i.indexOf(r);r||(u=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=u>0?u-1:i.length-1:"down"===e?a=(u+1)%i.length:"pageup"===e?(a=u-t)<0&&(a=0):"pagedown"===e?(a=u+t)>i.length-1&&(a=i.length-1):"last"===e&&(a=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Be(i[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Lt):l({},Lt,this.props.theme):Lt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue(),p=function(){return l};return{cx:w.bind(null,i),clearValue:e,getStyles:t,getValue:p,hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue,o=r.indexOf(n);if(o>-1){if(e.indexOf(n)>-1)return n;if(o<e.length)return e[o]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"===typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"===typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:u,type:"option",value:s}}};return i.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options,i=o.map(function(t,n){var o=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(i.length){var u="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:u,data:t,options:i})}}else{var s=a(t,"".concat(r));s&&(e.render.push(s),e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,u=i.menuIsOpen,s=i.inputValue,l=i.screenReaderStatus,c=r?Te({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&u?Le({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",f=_e({inputValue:s,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(p," ").concat(f," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,u=this.state.inputIsHidden,l=r||this.getElementId("input");if(!n)return W.a.createElement(we,{id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Q,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},p=this.commonProps,f=p.cx,d=p.theme,h=p.selectProps;return W.a.createElement(a,s({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:f,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:i,theme:d,type:"text",value:o},c))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,u=t.Placeholder,l=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue,y=g.isFocused;if(!this.hasValue()||!p)return h?null:W.a.createElement(u,s({},l,{key:"placeholder",isDisabled:f,isFocused:y}),m);if(d){return v.map(function(t){var a=t===b;return W.a.createElement(n,s({},l,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:f,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))})}if(h)return null;var E=v[0];return W.a.createElement(a,s({},l,{data:E,isDisabled:f}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;var a={"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return W.a.createElement(n,s({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,u=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,p=this.commonProps,f=this.state,d=f.focusedOption,m=f.menuOptions,g=this.props,v=g.captureMenuScroll,b=g.inputValue,y=g.isLoading,E=g.loadingMessage,O=g.minMenuHeight,w=g.maxMenuHeight,C=g.menuIsOpen,x=g.menuPlacement,S=g.menuPosition,A=g.menuPortalTarget,k=g.menuShouldBlockScroll,F=g.menuShouldScrollIntoView,D=g.noOptionsMessage,M=g.onMenuScrollToTop,P=g.onMenuScrollToBottom;if(!C)return null;var N,I=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,W.a.createElement(c,s({},p,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())N=m.render.map(function(t){if("group"===t.type){var o=(t.type,h(t,["type"])),i="".concat(t.key,"-heading");return W.a.createElement(n,s({},p,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return I(e)}))}if("option"===t.type)return I(t)});else if(y){var T=E({inputValue:b});if(null===T)return null;N=W.a.createElement(u,p,T)}else{var L=D({inputValue:b});if(null===L)return null;N=W.a.createElement(l,p,L)}var _={minMenuHeight:O,maxMenuHeight:w,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:F},V=W.a.createElement(re,s({},p,_),function(t){var n=t.ref,r=t.placerProps,a=r.placement,u=r.maxHeight;return W.a.createElement(o,s({},p,_,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:a}),W.a.createElement(Pe,{isEnabled:v,onTopArrive:M,onBottomArrive:P},W.a.createElement(De,{isEnabled:k},W.a.createElement(i,s({},p,{innerRef:e.getMenuListRef,isLoading:y,maxHeight:u}),N))))});return A||"fixed"===S?W.a.createElement(a,s({},p,{appendTo:A,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),V):V}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var u=a.map(function(t){return e.getOptionValue(t)}).join(n);return W.a.createElement("input",{name:i,type:"hidden",value:u})}var s=a.length>0?a.map(function(t,n){return W.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):W.a.createElement("input",{name:i,type:"hidden"});return W.a.createElement("div",null,s)}var l=a[0]?this.getOptionValue(a[0]):"";return W.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?W.a.createElement(Oe,{"aria-live":"assertive"},W.a.createElement("p",{id:"aria-selection-event"},"\xa0",this.state.ariaLiveSelection),W.a.createElement("p",{id:"aria-context"},"\xa0",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,u=i.id,l=i.isDisabled,c=i.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return W.a.createElement(r,s({},f,{className:a,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),W.a.createElement(t,s({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:c}),W.a.createElement(o,s({},f,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),W.a.createElement(n,s({},f,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(U.Component);u(Rt,"defaultProps",_t);var jt={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Bt=function(e){var t,n;return n=t=function(t){function n(){var e,t;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=g(this,(e=p(n)).call.apply(e,[this].concat(i))),u(m(m(t)),"select",void 0),u(m(m(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),u(m(m(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e})}),u(m(m(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),u(m(m(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),u(m(m(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return c(n,t),a(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"===typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,h(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return W.a.createElement(e,s({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(U.Component),u(t,"defaultProps",jt),n},Ut={cacheOptions:!1,defaultOptions:!1,filterOption:null},Wt=function(e){var t,n;return n=t=function(t){function n(e){var t;return o(this,n),t=g(this,p(n).call(this)),u(m(m(t)),"select",void 0),u(m(m(t)),"lastRequest",void 0),u(m(m(t)),"mounted",!1),u(m(m(t)),"optionsCache",{}),u(m(m(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,i=r.onInputChange,a=C(e,n,i);if(!a)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var u=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(a,function(e){t.mounted&&(e&&(t.optionsCache[a]=e),u===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))})})}return a}),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:"undefined"!==typeof e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return c(n,t),a(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}})}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"===typeof r.then&&r.then(t,function(){return t()})}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,h(n,["loadOptions"])),o=this.state,i=o.defaultOptions,a=o.inputValue,u=o.isLoading,l=o.loadedInputValue,c=o.loadedOptions,p=o.passEmptyOptions,f=p?[]:a&&l?c:i||[];return W.a.createElement(e,s({},r,{ref:function(e){t.select=e},options:f,isLoading:u,onInputChange:this.handleInputChange}))}}]),n}(U.Component),u(t,"defaultProps",Ut),n},Ht=Bt(Rt),zt=(Wt(Ht),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n}),Gt={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return zt(e,t)})||n.some(function(t){return zt(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},$t=l({allowCreateWhileLoading:!1,createOptionPosition:"last"},Gt),qt=function(e){var t,n;return n=t=function(t){function n(e){var t;o(this,n),t=g(this,p(n).call(this,e)),u(m(m(t)),"select",void 0),u(m(m(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,u=r.onChange,s=r.onCreateOption,l=r.value;if("select-option"!==n.action)return u(e,n);var c=t.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==c)u(e,n);else if(s)s(i);else{var f=o(i,i),d={action:"create-option"};a?u([].concat(v(ee(l)),[f]),d):u(f,d)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return c(n,t),a(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,u=e.isValidNewOption,s=e.value,l=e.options||[],c=this.state.newOption;c=u(i,ee(s),l)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?l:"first"===n?[c].concat(v(l)):[].concat(v(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=s({},this.props),r=this.state.options;return W.a.createElement(e,s({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(U.Component),u(t,"defaultProps",$t),n},Yt=qt(Rt),Zt=(Bt(Yt),qt(Rt)),Xt=Bt(Zt),Jt=(Wt(Xt),function(e){return function(t){var n=(t.in,t.onExited,t.appear,t.enter,t.exit,h(t,["in","onExited","appear","enter","exit"]));return W.a.createElement(e,n)}}),Kt=function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,h(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return W.a.createElement(K.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:l({},a[e])};return W.a.createElement(t,s({innerProps:n},i))})},Qt=260,en=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"duration",Qt),u(m(m(n)),"rafID",void 0),u(m(m(n)),"state",{width:"auto"}),u(m(m(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),u(m(m(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect(),r=t.width;n.setState({width:r})}))}),u(m(m(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),u(m(m(n)),"getTransition",function(e){return n.transition[e]}),n}return c(t,e),a(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,o=this.state.width;return W.a.createElement(K.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=l({},e.getStyle(o),e.getTransition(t));return W.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(U.Component),tn=function(e){return function(t){var n=t.in,r=t.onExited,o=h(t,["in","onExited"]);return W.a.createElement(en,{in:n,onExited:r},W.a.createElement(e,s({cropWithEllipsis:n},o)))}},nn=function(e){return function(t){return W.a.createElement(Kt,s({component:e,duration:t.isMulti?Qt:1},t))}},rn=function(e){return function(t){return W.a.createElement(Kt,s({component:e},t))}},on=function(e){return function(t){return W.a.createElement(K.TransitionGroup,s({component:e},t))}},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Pt({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,i=t.SingleValue,a=t.ValueContainer,u=h(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return l({Input:Jt(n),MultiValue:tn(r),Placeholder:nn(o),SingleValue:rn(i),ValueContainer:on(a)},u)},un=an(),sn=(un.Input,un.MultiValue,un.Placeholder,un.SingleValue,un.ValueContainer,Object(H.a)(an,_),Bt(Rt));t.a=sn},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t){"production"===t.env.NODE_ENV?e.exports=n(26):e.exports=n(27)}).call(t,n(0))},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(){}t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),s=r(n(1)),l=r(n(3)),c=n(10),p=n(11),f="unmounted";t.UNMOUNTED=f;var d="exited";t.EXITED=d;var h="entering";t.ENTERING=h;var m="entered";t.ENTERED=m;t.EXITING="exiting";var g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=d,r.appearStatus=h):o=m:o=t.unmountOnExit||t.mountOnEnter?f:d,r.state={status:o},r.nextCallback=null,r}i(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:d}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==m&&(t=h):n!==h&&n!==m||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=l.default.findDOMNode(this);t===h?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===d&&this.setState({status:f})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;if(!t&&!r)return void this.safeSetState({status:m},function(){n.props.onEntered(e)});this.props.onEnter(e,o),this.safeSetState({status:h},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:m},function(){n.props.onEntered(e,o)})})})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n)return void this.safeSetState({status:d},function(){t.props.onExited(e)});this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:d},function(){t.props.onExited(e)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;if(!e||r)return void setTimeout(this.nextCallback,0);this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,r=o(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var i=s.default.Children.only(n);return s.default.cloneElement(i,r)},t}(s.default.Component);g.contextTypes={transitionGroup:u.object},g.childContextTypes={transitionGroup:function(){}},g.propTypes="production"!==e.env.NODE_ENV?{children:u.oneOfType([u.func.isRequired,u.element.isRequired]).isRequired,in:u.bool,mountOnEnter:u.bool,unmountOnExit:u.bool,appear:u.bool,enter:u.bool,exit:u.bool,timeout:function(e){var t=p.timeoutsShape;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.apply(void 0,[e].concat(r))},addEndListener:u.func,onEnter:u.func,onEntering:u.func,onEntered:u.func,onExit:u.func,onExiting:u.func,onExited:u.func}:{},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:a,onEntering:a,onEntered:a,onExit:a,onExiting:a,onExited:a},g.UNMOUNTED=0,g.EXITED=1,g.ENTERING=2,g.ENTERED=3,g.EXITING=4;var v=(0,c.polyfill)(g);t.default=v}).call(t,n(0))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){function t(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}this.setState(t.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(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,a=null,u=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?u="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\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=r,t.componentWillReceiveProps=o),"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 c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(2)),o="production"!==e.env.NODE_ENV?r.default.oneOfType([r.default.number,r.default.shape({enter:r.default.number,exit:r.default.number,appear:r.default.number}).isRequired]):null;t.timeoutsShape=o;var i="production"!==e.env.NODE_ENV?r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,exit:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterDone:r.default.string,enterActive:r.default.string,exit:r.default.string,exitDone:r.default.string,exitActive:r.default.string})]):null;t.classNamesShape=i}).call(t,n(0))},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.__esModule=!0,t.default=void 0;var l=o(n(2)),c=o(n(1)),p=n(10),f=n(42),d=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},h={component:"div",childFactory:function(e){return e}},m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o=r.handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}u(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,f.getInitialChildMapping)(e,r):(0,f.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,f.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=a({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=i(e,["component","childFactory"]),o=d(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:c.default.createElement(t,r,o)},t}(c.default.Component);m.childContextTypes={transitionGroup:l.default.object.isRequired},m.propTypes="production"!==r.env.NODE_ENV?{component:l.default.any,children:l.default.node,appear:l.default.bool,enter:l.default.bool,exit:l.default.bool,childFactory:l.default.func}:{},m.defaultProps=h;var g=(0,p.polyfill)(m);t.default=g,e.exports=t.default}).call(t,n(0))},function(e,t,n){var r,o;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===o)for(var u in r)i.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(15),n(44);wp.blocks.updateCategory("groups",{icon:wp.element.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#7392cf"},wp.element.createElement("path",{d:"M 5.14,2.85 C 5.11,2.85 5.09,2.87 5.09,2.90 5.09,2.93 5.11,2.96 5.14,2.96 5.17,2.96 5.19,2.93 5.19,2.90 5.19,2.87 5.17,2.85 5.14,2.85 Z M 1.53,1.64 C 1.49,1.64 1.45,1.68 1.45,1.72 1.45,1.76 1.49,1.80 1.53,1.80 1.58,1.80 1.61,1.76 1.61,1.72 1.61,1.68 1.58,1.64 1.53,1.64 Z M 4.17,1.24 C 4.09,1.24 4.03,1.30 4.03,1.37 4.03,1.44 4.09,1.50 4.17,1.50 4.24,1.50 4.30,1.44 4.30,1.37 4.30,1.30 4.24,1.24 4.17,1.24 Z M 16.67,16.32 C 16.55,16.32 16.45,16.41 16.45,16.53 16.45,16.65 16.55,16.74 16.67,16.74 16.79,16.74 16.88,16.65 16.88,16.53 16.88,16.41 16.79,16.32 16.67,16.32 Z M 3.97,4.68 C 3.78,4.68 3.63,4.83 3.63,5.02 3.63,5.21 3.78,5.37 3.97,5.37 4.16,5.37 4.32,5.21 4.32,5.02 4.32,4.83 4.16,4.68 3.97,4.68 Z M 13.28,8.84 C 12.97,8.84 12.72,9.09 12.72,9.40 12.72,9.71 12.97,9.96 13.28,9.96 13.59,9.96 13.84,9.71 13.84,9.40 13.84,9.09 13.59,8.84 13.28,8.84 Z M 16.63,11.50 C 16.13,11.50 15.73,11.90 15.73,12.40 15.73,12.90 16.13,13.30 16.63,13.30 17.13,13.30 17.53,12.90 17.53,12.40 17.53,11.90 17.13,11.50 16.63,11.50 Z M 8.57,1.55 C 7.26,1.55 6.21,2.60 6.21,3.91 6.21,5.21 7.26,6.27 8.57,6.27 9.87,6.27 10.93,5.21 10.93,3.91 10.93,2.60 9.87,1.55 8.57,1.55 Z M 15.30,1.07 C 13.19,1.07 11.48,2.78 11.48,4.89 11.48,7.00 13.19,8.71 15.30,8.71 17.41,8.71 19.12,7.00 19.12,4.89 19.12,2.78 17.41,1.07 15.30,1.07 Z M 7.25,6.76 C 3.84,6.76 1.07,9.52 1.07,12.94 1.07,16.35 3.84,19.12 7.25,19.12 10.66,19.12 13.43,16.35 13.43,12.94 13.43,9.52 10.66,6.76 7.25,6.76 Z"}))})},function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(6),a=n(13),u=n.n(a),s=n(43),l=(n.n(s),wp),c=l.apiFetch,p=wp.i18n.__,f=wp.data,d=f.registerStore,h=f.withSelect,m=wp.blocks.registerBlockType,g=wp.editor,v=g.InspectorControls,b=g.InnerBlocks,y=wp.components,E=y.PanelBody,O=y.PanelRow,w=y.Spinner,C={groups:{}},x={setGroups:function(e){return{type:"SET_GROUPS",groups:e}},receiveGroups:function(e){return{type:"RECEIVE_GROUPS",path:e}}},S=(d("groups/groups-blocks",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments[1];switch(t.type){case"SET_GROUPS":return Object.assign({},e,{groups:t.groups})}return e},actions:x,selectors:{receiveGroups:function(e){return e.groups}},controls:{RECEIVE_GROUPS:function(e){return c({path:e.path})}},resolvers:{receiveGroups:o.a.mark(function e(t){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.receiveGroups("/groups/groups-blocks/groups/");case 2:return n=e.sent,e.abrupt("return",x.setGroups(n));case 4:case"end":return e.stop()}},e,this)})}}),wp.element.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "})));m("groups/groups-member",{title:p("Groups Member Block","groups"),description:p("Show content for group members","groups"),icon:S,category:"groups",keywords:[p("groups","groups"),p("access","groups"),p("members","groups")],attributes:{groups_select:{type:"string",default:null}},edit:h(function(e){return{groups:e("groups/groups-blocks").receiveGroups()}})(function(e){var t=e.attributes.groups_select,n=e.groups,r=e.className,o=e.setAttributes,a=e.isSelected,s=function(e){return o({groups_select:JSON.stringify(e)})},l=[];return null!==t&&(l=JSON.parse(t)),n.length?[wp.element.createElement(v,null,wp.element.createElement(E,{title:p("Select Groups","groups"),className:"block-inspector"},wp.element.createElement(O,null,wp.element.createElement("label",{htmlFor:"block-groups",className:"groups-inspector__label"},p("Content will be shown to users that are members of these groups:","groups")," ")," ")," ",wp.element.createElement(O,null,wp.element.createElement(i.a,{className:"groups-inspector__control",name:"block-groups",value:l,onChange:s,options:n,isClearable:!0,isMulti:"true"}))," ")," "),wp.element.createElement("div",{className:a?u()(r)+"__selected":e.className},wp.element.createElement("div",{className:u()(r)+"__inner-block"},wp.element.createElement(b,null))," ")]:wp.element.createElement("p",{className:r},wp.element.createElement(w,null),p("Loading...","groups")," ")}),save:function(e){return wp.element.createElement("div",null,wp.element.createElement(b.Content,null))}})},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(17),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),u=new d(r||[]);return a._invoke=l(e,n,u),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function i(){}function a(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,i,a){var u=r(e[n],e,o);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){s.value=e,i(s)},a)}a(u.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=S;return function(i,a){if(o===k)throw new Error("Generator is already running");if(o===F){if("throw"===i)throw a;return m()}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=c(u,n);if(s){if(s===D)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===S)throw o=F,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=k;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?F:A,l.arg===D)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=F,n.method="throw",n.arg=l.arg)}}}function c(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,c(e,t),"throw"===t.method))return D;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return D}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,D;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,D):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,D)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e){var t=e[E];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},E=y.iterator||"@@iterator",O=y.asyncIterator||"@@asyncIterator",w=y.toStringTag||"@@toStringTag",C="object"===typeof e,x=t.regeneratorRuntime;if(x)return void(C&&(e.exports=x));x=t.regeneratorRuntime=C?e.exports:{},x.wrap=n;var S="suspendedStart",A="suspendedYield",k="executing",F="completed",D={},M={};M[E]=function(){return this};var P=Object.getPrototypeOf,N=P&&P(P(h([])));N&&N!==v&&b.call(N,E)&&(M=N);var I=a.prototype=o.prototype=Object.create(M);i.prototype=I.constructor=a,a.constructor=i,a[w]=i.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,w in e||(e[w]="GeneratorFunction")),e.prototype=Object.create(I),e},x.awrap=function(e){return{__await:e}},u(s.prototype),s.prototype[O]=function(){return this},x.AsyncIterator=s,x.async=function(e,t,r,o){var i=new s(n(e,t,r,o));return x.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},u(I),I[w]="Generator",I[E]=function(){return this},I.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),u=b.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,D):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),D},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),D}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;f(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),D}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function o(e,t){void 0===t&&(t=r);var n,o,i=[],a=!1;return function(){for(var r=arguments.length,u=new Array(r),s=0;s<r;s++)u[s]=arguments[s];return a&&n===this&&t(u,i)?o:(o=e.apply(this,u),a=!0,n=this,i=u,o)}}t.a=o},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u});var r=n(20),o="undefined"!==typeof e?e:{},i=Object(r.a)(o),a=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),u=(i.keyframes,i.css);i.sheet,i.caches}).call(t,n(7))},function(e,t,n){"use strict";(function(e){function r(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function o(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}function i(t,n){function r(e){w+=e,y&&A.insert(e,M)}function o(t,n){if(null==t)return"";switch(typeof t){case"boolean":return"";case"function":if(void 0!==t.__emotion_styles){var r=t.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==e.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==e.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),o.call(this,void 0===this?t():t(this.mergedProps,this.context),n);case"object":return i.call(this,t);default:var a=S.registered[t];return!1===n&&void 0!==a?a:t}}function i(t){if(P.has(t))return P.get(t);var n="";return Array.isArray(t)?t.forEach(function(e){n+=o.call(this,e,!1)},this):Object.keys(t).forEach(function(r){if("object"!==typeof t[r])void 0!==S.registered[t[r]]?n+=r+"{"+S.registered[t[r]]+"}":n+=d(r)+":"+h(r,t[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==e.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(t[r])&&"string"===typeof t[r][0]&&void 0===S.registered[t[r][0]]?t[r].forEach(function(e){n+=d(r)+":"+h(r,e)+";"}):n+=r+"{"+o.call(this,t[r],!1)+"}"}},this),P.set(t,n),n}function a(e,t){void 0===S.inserted[F]&&(w="",k(e,t),S.inserted[F]=w)}function u(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==S.registered[t]?e.push(t):n+=t+" "}),n}function c(e,t){var n=[],r=u(n,e);return n.length<2?e:r+R(n,t)}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(b(t))}function m(e){S.inserted[e]=!0}function g(e){e.forEach(m)}function v(){y&&(A.flush(),A.inject()),S.inserted={},S.registered={}}if(void 0!==t.__SECRET_EMOTION__)return t.__SECRET_EMOTION__;void 0===n&&(n={});var O=n.key||"css";if("production"!==e.env.NODE_ENV&&/[^a-z-]/.test(O))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+O+'" was passed');var w,C,x=p()(r);void 0!==n.prefix&&(C={prefix:n.prefix});var S={registered:{},inserted:{},nonce:n.nonce,key:O},A=new E(n);y&&A.inject();var k=new l.a(C);k.use(n.stylisPlugins)(x);var F,D,M="",P=new WeakMap,N=/label:\s*([^\s;\n{]+)\s*;/g,I=function(e,t){return Object(s.a)(e+t)+t};if("production"!==e.env.NODE_ENV){var T=I,L=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;I=function(e,t){return T(e.replace(L,function(e){return M=e,""}),t)}}var _=function(e){var t=!0,n="",r="";null==e||void 0===e.raw?(t=!1,n+=o.call(this,e,!1)):n+=e[0];for(var i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return a.forEach(function(r,i){n+=o.call(this,r,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[i+1]&&(n+=e[i+1])},this),D=n,n=n.replace(N,function(e,t){return r+="-"+t,""}),F=I(n,r),n};if("production"!==e.env.NODE_ENV){var V=k;k=function(e,t){V(e,t),M=""}}var R=function(){var e=_.apply(this,arguments),t=O+"-"+F;return void 0===S.registered[t]&&(S.registered[t]=D),a("."+t,e),t},j=function(){var e=_.apply(this,arguments),t="animation-"+F;return a("","@keyframes "+t+"{"+e+"}"),t},B=function(){a("",_.apply(this,arguments))};if(y){var U=document.querySelectorAll("[data-emotion-"+O+"]");Array.prototype.forEach.call(U,function(e){A.tags[0].parentNode.insertBefore(e,A.tags[0]),e.getAttribute("data-emotion-"+O).split(" ").forEach(m)})}var W={flush:v,hydrate:g,cx:f,merge:c,getRegisteredStyles:u,injectGlobal:B,keyframes:j,css:R,sheet:A,caches:S};return t.__SECRET_EMOTION__=W,W}var a=n(21),u=n(22),s=n(23),l=n(24),c=n(25),p=n.n(c),f=/[A-Z]|^ms/g,d=Object(a.a)(function(e){return e.replace(f,"-$&").toLowerCase()}),h=function(e,t){return null==t||"boolean"===typeof t?"":1===u.a[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==e.env.NODE_ENV){var m=/(attr|calc|counters?|url)\(/,g=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],v=h;h=function(e,t){return"content"===e&&("string"!==typeof t||-1===g.indexOf(t)&&!m.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),v(e,t)}}var b=function t(n){for(var r=n.length,o=0,i="";o<r;o++){var a=n[o];if(null!=a){var u=void 0;switch(typeof a){case"boolean":break;case"function":"production"!==e.env.NODE_ENV&&console.error("Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\nPlease call the function before passing it to cx."),u=t([a()]);break;case"object":if(Array.isArray(a))u=t(a);else{u="";for(var s in a)a[s]&&s&&(u&&(u+=" "),u+=s)}break;default:u=a}u&&(i&&(i+=" "),i+=u)}}return i},y="undefined"!==typeof document,E=function(){function t(t){this.isSpeedy="production"===e.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=t}var n=t.prototype;return n.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=o(this.opts),this.injected=!0},n.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},n.insert=function(t,n){if(this.isSpeedy){var i=this.tags[this.tags.length-1],a=r(i);try{a.insertRule(t,a.cssRules.length)}catch(n){"production"!==e.env.NODE_ENV&&console.warn("illegal rule",t)}}else{var u=o(this.opts);this.tags.push(u),u.appendChild(document.createTextNode(t+(n||"")))}++this.ctr%65e3===0&&this.tags.push(o(this.opts))},n.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1},t}();t.a=i}).call(t,n(0))},function(e,t,n){"use strict";function r(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}t.a=r},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};t.a=r},function(e,t,n){"use strict";function r(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),t^=t>>>24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^t,n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r^=255&e.charCodeAt(o),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)}return r^=r>>>13,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>15,(r>>>0).toString(36)}t.a=r},function(e,t,n){"use strict";function r(e){function t(e,r,s,l,c){for(var d,h,m,g,v,O=0,C=0,x=0,S=0,A=0,k=0,I=m=d=0,L=0,V=0,R=0,j=0,B=s.length,U=B-1,W="",H="",z="",G="";L<B;){if(h=s.charCodeAt(L),L===U&&0!==C+S+x+O&&(0!==C&&(h=47===C?10:47),S=x=O=0,B++,U++),0===C+S+x+O){if(L===U&&(0<V&&(W=W.replace(f,"")),0<W.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:W+=s.charAt(L)}h=59}switch(h){case 123:for(W=W.trim(),d=W.charCodeAt(0),m=1,j=++L;L<B;){switch(h=s.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(h=s.charCodeAt(L+1)){case 42:case 47:e:{for(I=L+1;I<U;++I)switch(s.charCodeAt(I)){case 47:if(42===h&&42===s.charCodeAt(I-1)&&L+2!==I){L=I+1;break e}break;case 10:if(47===h){L=I+1;break e}}L=I}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<U&&s.charCodeAt(L)!==h;);}if(0===m)break;L++}switch(m=s.substring(j,L),0===d&&(d=(W=W.replace(p,"").trim()).charCodeAt(0)),d){case 64:switch(0<V&&(W=W.replace(f,"")),h=W.charCodeAt(1)){case 100:case 109:case 115:case 45:V=r;break;default:V=N}if(m=t(r,V,m,h,c+1),j=m.length,0<T&&(V=n(N,W,R),v=u(3,m,V,r,D,F,j,h,c,l),W=V.join(""),void 0!==v&&0===(j=(m=v.trim()).length)&&(h=0,m="")),0<j)switch(h){case 115:W=W.replace(w,a);case 100:case 109:case 45:m=W+"{"+m+"}";break;case 107:W=W.replace(b,"$1 $2"),m=W+"{"+m+"}",m=1===P||2===P&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=W+m,112===l&&(H+=m,m="")}else m="";break;default:m=t(r,n(r,W,R),m,l,c+1)}z+=m,m=R=V=I=d=0,W="",h=s.charCodeAt(++L);break;case 125:case 59:if(W=(0<V?W.replace(f,""):W).trim(),1<(j=W.length))switch(0===I&&(45===(d=W.charCodeAt(0))||96<d&&123>d)&&(j=(W=W.replace(" ",":")).length),0<T&&void 0!==(v=u(1,W,r,e,D,F,H.length,l,c,l))&&0===(j=(W=v.trim()).length)&&(W="\0\0"),d=W.charCodeAt(0),h=W.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){G+=W+s.charAt(L);break}default:58!==W.charCodeAt(j-1)&&(H+=o(W,d,h,W.charCodeAt(2)))}R=V=I=d=0,W="",h=s.charCodeAt(++L)}}switch(h){case 13:case 10:47===C?C=0:0===1+d&&107!==l&&0<W.length&&(V=1,W+="\0"),0<T*_&&u(0,W,r,e,D,F,H.length,l,c,l),F=1,D++;break;case 59:case 125:if(0===C+S+x+O){F++;break}default:switch(F++,g=s.charAt(L),h){case 9:case 32:if(0===S+O+C)switch(A){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===S+C+O&&(V=R=1,g="\f"+g);break;case 108:if(0===S+C+O+M&&0<I)switch(L-I){case 2:112===A&&58===s.charCodeAt(L-3)&&(M=A);case 8:111===k&&(M=k)}break;case 58:0===S+C+O&&(I=L);break;case 44:0===C+x+S+O&&(V=1,g+="\r");break;case 34:case 39:0===C&&(S=S===h?0:0===S?h:S);break;case 91:0===S+C+x&&O++;break;case 93:0===S+C+x&&O--;break;case 41:0===S+C+O&&x--;break;case 40:if(0===S+C+O){if(0===d)switch(2*A+3*k){case 533:break;default:d=1}x++}break;case 64:0===C+x+S+O+I+m&&(m=1);break;case 42:case 47:if(!(0<S+O+x))switch(C){case 0:switch(2*h+3*s.charCodeAt(L+1)){case 235:C=47;break;case 220:j=L,C=42}break;case 42:47===h&&42===A&&j+2!==L&&(33===s.charCodeAt(j+2)&&(H+=s.substring(j,L+1)),g="",C=0)}}0===C&&(W+=g)}k=A,A=h,L++}if(0<(j=H.length)){if(V=r,0<T&&void 0!==(v=u(2,H,V,e,D,F,j,l,c,l))&&0===(H=v).length)return G+H+z;if(H=V.join(",")+"{"+H+"}",0!==P*M){switch(2!==P||i(H,2)||(M=0),M){case 111:H=H.replace(E,":-moz-$1")+H;break;case 112:H=H.replace(y,"::-webkit-input-$1")+H.replace(y,"::-moz-$1")+H.replace(y,":-ms-input-$1")+H}M=0}}return G+H+z}function n(e,t,n){var o=t.trim().split(g);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";u<i;++u)t[u]=r(e,t[u],n).trim();break;default:var s=u=0;for(t=[];u<i;++u)for(var l=0;l<a;++l)t[s++]=r(e[l]+" ",o[u],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",u=2*t+3*n+4*r;if(944===u){e=a.indexOf(":",9)+1;var s=a.substring(e,a.length-1).trim();return s=a.substring(0,e).trim()+s+";",1===P||2===P&&i(s,1)?"-webkit-"+s+s:s}if(0===P||2===P&&!i(a,1))return a;switch(u){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(k,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(s=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+s+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(s=a.substring(13).trim(),t=s.indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=a.replace(O,"tb");break;case 232:s=a.replace(O,"tb-rl");break;case 220:s=a.replace(O,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+s+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim(),u=s.charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102<u?"inline-":"")+"box")+";"+a.replace(s,"-webkit-"+s)+";"+a.replace(s,"-ms-"+s+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return s=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+s+"-ms-flex-"+s+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(s,"-webkit-"+s)+a.replace(s,"-moz-"+s.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),L(2!==t?r:r.replace(S,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(C," or ($1)").substring(4):"("+t+")"}function u(e,t,n,r,o,i,a,u,s,l){for(var p,f=0,d=t;f<T;++f)switch(p=I[f].call(c,e,d,n,r,o,i,a,u,s,l)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){switch(e){case void 0:case null:T=I.length=0;break;default:switch(e.constructor){case Array:for(var t=0,n=e.length;t<n;++t)s(e[t]);break;case Function:I[T++]=e;break;case Boolean:_=0|!!e}}return s}function l(e){return e=e.prefix,void 0!==e&&(L=null,e?"function"!==typeof e?P=1:(P=2,L=e):P=0),l}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),V=r,r=[V],0<T){var o=u(-1,n,r,r,D,F,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(N,r,n,0,0);return 0<T&&void 0!==(o=u(-2,i,r,r,D,F,i.length,0,0,0))&&(i=o),V="",M=0,F=D=1,i}var p=/^\0+/g,f=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,m=/([,: ])(transform)/g,g=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,E=/:(read-only)/g,O=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,x=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,F=1,D=1,M=0,P=1,N=[],I=[],T=0,L=null,_=0,V="";return c.use=s,c.set=l,void 0!==e&&l(e),c}t.a=r},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,u,s,l,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}})},function(e,t,n){"use strict";function r(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case d:case h:case s:case c:case l:case g:return e;default:switch(e=e&&e.$$typeof){case f:case m:case p:return e;default:return t}}case b:case v:case u:return t}}}function o(e){return r(e)===h}Object.defineProperty(t,"__esModule",{value:!0});var i="function"===typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,u=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,p=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.concurrent_mode"):60111,m=i?Symbol.for("react.forward_ref"):60112,g=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.memo"):60115,b=i?Symbol.for("react.lazy"):60116;t.typeOf=r,t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=f,t.ContextProvider=p,t.Element=a,t.ForwardRef=m,t.Fragment=s,t.Lazy=b,t.Memo=v,t.Portal=u,t.Profiler=c,t.StrictMode=l,t.Suspense=g,t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===s||e===h||e===c||e===l||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===p||e.$$typeof===f||e.$$typeof===m)},t.isAsyncMode=function(e){return o(e)||r(e)===d},t.isConcurrentMode=o,t.isContextConsumer=function(e){return r(e)===f},t.isContextProvider=function(e){return r(e)===p},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return r(e)===m},t.isFragment=function(e){return r(e)===s},t.isLazy=function(e){return r(e)===b},t.isMemo=function(e){return r(e)===v},t.isPortal=function(e){return r(e)===u},t.isProfiler=function(e){return r(e)===c},t.isStrictMode=function(e){return r(e)===l},t.isSuspense=function(e){return r(e)===g}},function(e,t,n){"use strict";(function(e){"production"!==e.env.NODE_ENV&&function(){function e(e){return"string"===typeof e||"function"===typeof e||e===y||e===S||e===O||e===E||e===k||"object"===typeof e&&null!==e&&(e.$$typeof===D||e.$$typeof===F||e.$$typeof===w||e.$$typeof===C||e.$$typeof===A)}function n(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case v:var n=e.type;switch(n){case x:case S:case y:case O:case E:case k:return n;default:var r=n&&n.$$typeof;switch(r){case C:case A:case w:return r;default:return t}}case D:case F:case b:return t}}}function r(e){return $||($=!0,N(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),o(e)||n(e)===x}function o(e){return n(e)===S}function i(e){return n(e)===C}function a(e){return n(e)===w}function u(e){return"object"===typeof e&&null!==e&&e.$$typeof===v}function s(e){return n(e)===A}function l(e){return n(e)===y}function c(e){return n(e)===D}function p(e){return n(e)===F}function f(e){return n(e)===b}function d(e){return n(e)===O}function h(e){return n(e)===E}function m(e){return n(e)===k}Object.defineProperty(t,"__esModule",{value:!0});var g="function"===typeof Symbol&&Symbol.for,v=g?Symbol.for("react.element"):60103,b=g?Symbol.for("react.portal"):60106,y=g?Symbol.for("react.fragment"):60107,E=g?Symbol.for("react.strict_mode"):60108,O=g?Symbol.for("react.profiler"):60114,w=g?Symbol.for("react.provider"):60109,C=g?Symbol.for("react.context"):60110,x=g?Symbol.for("react.async_mode"):60111,S=g?Symbol.for("react.concurrent_mode"):60111,A=g?Symbol.for("react.forward_ref"):60112,k=g?Symbol.for("react.suspense"):60113,F=g?Symbol.for("react.memo"):60115,D=g?Symbol.for("react.lazy"):60116,M=function(){},P=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!==typeof console&&console.warn(i);try{throw new Error(i)}catch(e){}};M=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarning(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];P.apply(void 0,[t].concat(r))}};var N=M,I=x,T=S,L=C,_=w,V=v,R=A,j=y,B=D,U=F,W=b,H=O,z=E,G=k,$=!1;t.typeOf=n,t.AsyncMode=I,t.ConcurrentMode=T,t.ContextConsumer=L,t.ContextProvider=_,t.Element=V,t.ForwardRef=R,t.Fragment=j,t.Lazy=B,t.Memo=U,t.Portal=W,t.Profiler=H,t.StrictMode=z,t.Suspense=G,t.isValidElementType=e,t.isAsyncMode=r,t.isConcurrentMode=o,t.isContextConsumer=i,t.isContextProvider=a,t.isElement=u,t.isForwardRef=s,t.isFragment=l,t.isLazy=c,t.isMemo=p,t.isPortal=f,t.isProfiler=d,t.isStrictMode=h,t.isSuspense=m}()}).call(t,n(0))},function(e,t,n){"use strict";(function(t){function r(){return null}var o=n(8),i=n(29),a=n(4),u=n(30),s=Function.call.bind(Object.prototype.hasOwnProperty),l=function(){};"production"!==t.env.NODE_ENV&&(l=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,n){function c(e){var t=e&&(F&&e[F]||e[D]);if("function"===typeof t)return t}function p(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function d(e){function r(r,u,s,c,p,d,h){if(c=c||M,d=d||s,h!==a){if(n){var m=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 m.name="Invariant Violation",m}if("production"!==t.env.NODE_ENV&&"undefined"!==typeof console){var g=c+":"+s;!o[g]&&i<3&&(l("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[g]=!0,i++)}}return null==u[s]?r?new f(null===u[s]?"The "+p+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(u,s,c,p,d)}if("production"!==t.env.NODE_ENV)var o={},i=0;var u=r.bind(null,!1);return u.isRequired=r.bind(null,!0),u}function h(e){function t(t,n,r,o,i,a){var u=t[n];if(x(u)!==e)return new f("Invalid "+o+" `"+i+"` of type `"+S(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return d(t)}function m(e){function t(t,n,r,o,i){if("function"!==typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){return new f("Invalid "+o+" `"+i+"` of type `"+x(u)+"` supplied to `"+r+"`, expected an array.")}for(var s=0;s<u.length;s++){var l=e(u,s,r,o,i+"["+s+"]",a);if(l instanceof Error)return l}return null}return d(t)}function g(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||M;return new f("Invalid "+o+" `"+i+"` of type `"+k(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return d(t)}function v(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(p(a,e[u]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===S(t)?String(t):t});return new f("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}return Array.isArray(e)?d(n):("production"!==t.env.NODE_ENV&&l(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)}function b(e){function t(t,n,r,o,i){if("function"!==typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],l=x(u);if("object"!==l)return new f("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var c in u)if(s(u,c)){var p=e(u,c,r,o,i+"."+c,a);if(p instanceof Error)return p}return null}return d(t)}function y(e){function n(t,n,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(t,n,r,o,i,a))return null}return new f("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&l("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var o=0;o<e.length;o++){var i=e[o];if("function"!==typeof i)return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(i)+" at index "+o+"."),r}return d(n)}function E(e){function t(t,n,r,o,i){var u=t[n],s=x(u);if("object"!==s)return new f("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var p=c(u,l,r,o,i+"."+l,a);if(p)return p}}return null}return d(t)}function O(e){function t(t,n,r,o,u){var s=t[n],l=x(s);if("object"!==l)return new f("Invalid "+o+" `"+u+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");var c=i({},t[n],e);for(var p in c){var d=e[p];if(!d)return new f("Invalid "+o+" `"+u+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(s,p,r,o,u+"."+p,a);if(h)return h}return null}return d(t)}function w(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(w);if(null===t||e(t))return!0;var n=c(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!w(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!w(i[1]))return!1}return!0;default:return!1}}function C(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function x(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":C(t,e)?"symbol":t}function S(e){if("undefined"===typeof e||null===e)return""+e;var t=x(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function A(e){var t=S(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function k(e){return e.constructor&&e.constructor.name?e.constructor.name:M}var F="function"===typeof Symbol&&Symbol.iterator,D="@@iterator",M="<<anonymous>>",P={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:function(){return d(r)}(),arrayOf:m,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new f("Invalid "+o+" `"+i+"` of type `"+x(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return d(t)}(),elementType:function(){function e(e,t,n,r,i){var a=e[t];if(!o.isValidElementType(a)){return new f("Invalid "+r+" `"+i+"` of type `"+x(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}return null}return d(e)}(),instanceOf:g,node:function(){function e(e,t,n,r,o){return w(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return d(e)}(),objectOf:b,oneOf:v,oneOfType:y,shape:E,exact:O};return f.prototype=Error.prototype,P.checkPropTypes=u,P.resetWarningCache=u.resetWarningCache,P.PropTypes=P,P}}).call(t,n(0))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,s=r(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)i.call(n,c)&&(s[c]=n[c]);if(o){u=o(n);for(var p=0;p<u.length;p++)a.call(n,u[p])&&(s[u[p]]=n[u[p]])}}return s}},function(e,t,n){"use strict";(function(t){function r(e,n,r,s,l){if("production"!==t.env.NODE_ENV)for(var c in e)if(u(e,c)){var p;try{if("function"!==typeof e[c]){var f=Error((s||"React class")+": "+r+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.");throw f.name="Invariant Violation",f}p=e[c](n,c,s,r,null,i)}catch(e){p=e}if(!p||p instanceof Error||o((s||"React class")+": type specification of "+r+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in a)){a[p.message]=!0;var d=l?l():"";o("Failed "+r+" type: "+p.message+(null!=d?d:""))}}}var o=function(){};if("production"!==t.env.NODE_ENV){var i=n(4),a={},u=Function.call.bind(Object.prototype.hasOwnProperty);o=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}r.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(a={})},e.exports=r}).call(t,n(0))},function(e,t,n){"use strict";function r(){}function o(){}var i=n(4);o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array: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:o,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){(function(t){for(var r=n(33),o="undefined"===typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",u=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],l=0;!u&&l<i.length;l++)u=o[i[l]+"Request"+a],s=o[i[l]+"Cancel"+a]||o[i[l]+"CancelRequest"+a];if(!u||!s){var c=0,p=0,f=[];u=function(e){if(0===f.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return f.push({handle:++p,callback:e,cancelled:!1}),p},s=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return u.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=u,e.cancelAnimationFrame=s}}).call(t,n(7))},function(e,t,n){(function(t){(function(){var n,r,o,i,a,u;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},i=n(),u=1e9*t.uptime(),a=i-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(t,n(0))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(2),d=r(f),h={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},m=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],g=function(e){return m.forEach(function(t){return delete e[t]}),e},v=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},b=!("undefined"===typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),y=function(){return b?"_"+Math.random().toString(36).substr(2,12):void 0},E=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"===typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||y()},n}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||y()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"===typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(v(e,this.sizer),this.placeHolderSizer&&v(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&"undefined"!==typeof this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2;e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0,e<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return b&&e?p.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!==e&&void 0!==e?e:t}),t=s({},this.props.style);t.display||(t.display="inline-block");var n=s({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=o(this.props,[]);return g(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,p.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),p.default.createElement("input",s({},r,{ref:this.inputRef})),p.default.createElement("div",{ref:this.sizerRef,style:h},e),this.props.placeholder?p.default.createElement("div",{ref:this.placeHolderSizerRef,style:h},this.props.placeholder):null)}}]),t}(c.Component);E.propTypes={className:d.default.string,defaultValue:d.default.any,extraWidth:d.default.oneOfType([d.default.number,d.default.string]),id:d.default.string,injectStyles:d.default.bool,inputClassName:d.default.string,inputRef:d.default.func,inputStyle:d.default.object,minWidth:d.default.oneOfType([d.default.number,d.default.string]),onAutosize:d.default.func,onChange:d.default.func,placeholder:d.default.string,placeholderIsMinWidth:d.default.bool,style:d.default.object,value:d.default.any},E.defaultProps={minWidth:1,injectStyles:!0},t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=r(n(36)),i=r(n(41)),a=r(n(12)),u=r(n(9));e.exports={Transition:u.default,TransitionGroup:a.default,ReplaceTransition:i.default,CSSTransition:o.default}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}t.__esModule=!0,t.default=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),s=o(n(37)),l=o(n(40)),c=o(n(1)),p=o(n(9)),f=n(11),d=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,s.default)(e,t)})},h=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,l.default)(e,t)})},m=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,t.onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter"),o=r.className;t.removeClasses(e,"exit"),d(e,o),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter"),o=r.activeClassName;t.reflowAndAddClass(e,o),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,i=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),d(e,i),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit"),r=n.className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),d(e,r),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit"),r=n.activeClassName;t.reflowAndAddClass(e,r),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit"),r=n.doneClassName;t.removeClasses(e,"exit"),d(e,r),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,o=r&&n?n+"-":"",i=r?o+e:n[e];return{className:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}a(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&h(e,r),o&&h(e,o),i&&h(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,d(e,t))},n.render=function(){var e=i({},this.props);return delete e.classNames,c.default.createElement(p.default,i({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(c.default.Component);m.defaultProps={classNames:""},m.propTypes="production"!==r.env.NODE_ENV?i({},p.default.propTypes,{classNames:f.classNamesShape,onEnter:u.func,onEntering:u.func,onEntered:u.func,onExit:u.func,onExiting:u.func,onExited:u.func}):{};var g=m;t.default=g,e.exports=t.default}).call(t,n(0))},function(e,t,n){"use strict";function r(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}var o=n(38);t.__esModule=!0,t.default=r;var i=o(n(39));e.exports=t.default},function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"===typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}t.__esModule=!0,t.default=void 0;var u=o(n(2)),s=o(n(1)),l=n(3),c=o(n(12)),p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,t.handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}a(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=s.default.Children.toArray(o)[t];i.props[e]&&(r=i.props)[e].apply(r,n),this.props[e]&&this.props[e]((0,l.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,r=i(e,["children","in"]),o=s.default.Children.toArray(t),a=o[0],u=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,s.default.createElement(c.default,r,n?s.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):s.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(s.default.Component);p.propTypes="production"!==r.env.NODE_ENV?{in:u.default.bool.isRequired,children:function(e,t){return 2!==s.default.Children.count(e[t])?new Error('"'+t+'" must be exactly two transition components.'):null}}:{};var f=p;t.default=f,e.exports=t.default}).call(t,n(0))},function(e,t,n){"use strict";function r(e,t){var n=function(e){return t&&(0,s.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&s.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function o(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,u={};for(var s in t){if(r[s])for(a=0;a<r[s].length;a++){var l=r[s][a];u[r[s][a]]=n(l)}u[s]=n(s)}for(a=0;a<o.length;a++)u[o[a]]=n(o[a]);return u}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}function a(e,t){return r(e.children,function(n){return(0,s.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})}function u(e,t,n){var a=r(e.children),u=o(t,a);return Object.keys(u).forEach(function(r){var o=u[r];if((0,s.isValidElement)(o)){var l=r in t,c=r in a,p=t[r],f=(0,s.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,s.isValidElement)(p)&&(u[r]=(0,s.cloneElement)(o,{onExited:n.bind(null,o),in:p.props.in,exit:i(o,"exit",e),enter:i(o,"enter",e)})):u[r]=(0,s.cloneElement)(o,{in:!1}):u[r]=(0,s.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:i(o,"exit",e),enter:i(o,"enter",e)})}}),u}t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=o,t.getInitialChildMapping=a,t.getNextChildMapping=u;var s=n(1)},function(e,t){},function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(6),a=n(13),u=n.n(a),s=n(45),l=(n.n(s),wp),c=l.apiFetch,p=wp.i18n.__,f=wp.data,d=f.registerStore,h=f.withSelect,m=wp.blocks.registerBlockType,g=wp.editor,v=g.InspectorControls,b=g.InnerBlocks,y=wp.components,E=y.PanelBody,O=y.PanelRow,w=y.Spinner,C={groups:{}},x={setGroups:function(e){return{type:"SET_GROUPS",groups:e}},receiveGroups:function(e){return{type:"RECEIVE_GROUPS",path:e}}},S=(d("groups/groups-blocks",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments[1];switch(t.type){case"SET_GROUPS":return Object.assign({},e,{groups:t.groups})}return e},actions:x,selectors:{receiveGroups:function(e){return e.groups}},controls:{RECEIVE_GROUPS:function(e){return c({path:e.path})}},resolvers:{receiveGroups:o.a.mark(function e(t){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.receiveGroups("/groups/groups-blocks/groups/");case 2:return n=e.sent,e.abrupt("return",x.setGroups(n));case 4:case"end":return e.stop()}},e,this)})}}),wp.element.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "})));m("groups/groups-non-member",{title:p("Groups Non-member Block","groups"),description:p("Hide content from group members","groups"),icon:S,category:"groups",keywords:[p("groups","groups"),p("access","groups"),p("members","groups")],attributes:{groups_select:{type:"string",default:null}},edit:h(function(e){return{groups:e("groups/groups-blocks").receiveGroups()}})(function(e){var t=e.attributes.groups_select,n=e.groups,r=e.className,o=e.setAttributes,a=e.isSelected,s=function(e){return o({groups_select:JSON.stringify(e)})},l=[];return null!==t&&(l=JSON.parse(t)),n.length?[wp.element.createElement(v,null,wp.element.createElement(E,{title:p("Select Groups","groups"),className:"block-inspector"},wp.element.createElement(O,null,wp.element.createElement("label",{htmlFor:"block-groups",className:"groups-inspector__label"},p("Content will be shown to users that are not members of these groups:","groups"))),wp.element.createElement(O,null,wp.element.createElement(i.a,{className:"groups-inspector__control",name:"block-groups",value:l,onChange:s,options:n,isClearable:!0,isMulti:"true"})))),wp.element.createElement("div",{className:a?u()(r)+"__selected":e.className},wp.element.createElement("div",{className:u()(r)+"__inner-block"},wp.element.createElement(b,null)))]:wp.element.createElement("p",{className:r},wp.element.createElement(w,null),p("Loading...","groups"))}),save:function(e){return wp.element.createElement("div",null,wp.element.createElement(b.Content,null))}})},function(e,t){}]);
|
1 |
+
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=14)}([function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):g=-1,h.length&&u())}function u(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++g<t;)d&&d[g].run();g=-1,t=h.length}d=null,m=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function l(){}var c,p,f=e.exports={};!function(){try{c="function"===typeof setTimeout?setTimeout:n}catch(e){c=n}try{p="function"===typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],m=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||m||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){e.exports=React},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r=n(8);e.exports=n(28)(r.isElement,!0)}else e.exports=n(31)()}).call(t,n(0))},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){u(e,t,n[t])})}return e}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function h(e,t){if(null==e)return{};var n,r,o=d(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?m(e):t}function v(e){return b(e)||y(e)||E()}function b(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function y(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function O(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function C(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push("".concat(O(e,i)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}function w(e,t,n){if(n){var r=n(e,t);if("string"===typeof r)return r}return e}function x(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function S(e){return x(e)?window.pageYOffset:e.scrollTop}function A(e,t){if(x(e))return void window.scrollTo(0,t);e.scrollTop=t}function k(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}function F(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function D(e,t){function n(){s+=u;var t=F(s,i,a,r);A(e,t),s<r?Z()(n):o(e)}var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q,i=S(e),a=t-i,u=10,s=0;n()}function M(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?A(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&A(e,Math.max(t.offsetTop-o,0))}function N(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function P(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function I(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,u=e.theme,s=u.spacing,l=k(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var p=l.getBoundingClientRect(),f=p.height,d=n.getBoundingClientRect(),h=d.bottom,m=d.height,g=d.top,v=n.offsetParent.getBoundingClientRect(),b=v.top,y=window.innerHeight,E=S(l),O=parseInt(getComputedStyle(n).marginBottom,10),C=parseInt(getComputedStyle(n).marginTop,10),w=b-C,x=y-g,F=w+E,M=f-E-g,N=h-y+E+O,P=E+g-C;switch(o){case"auto":case"bottom":if(x>=m)return{placement:"bottom",maxHeight:t};if(M>=m&&!a)return i&&D(l,N,160),{placement:"bottom",maxHeight:t};if(!a&&M>=r||a&&x>=r){i&&D(l,N,160);return{placement:"bottom",maxHeight:a?x-O:M-O}}if("auto"===o||a){var I=t,T=a?w:F;return T>=r&&(I=Math.min(T-O-s.controlHeight,t)),{placement:"top",maxHeight:I}}if("bottom"===o)return A(l,N),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(F>=m&&!a)return i&&D(l,P,160),{placement:"top",maxHeight:t};if(!a&&F>=r||a&&w>=r){var L=t;return(!a&&F>=r||a&&w>=r)&&(L=a?w-C:F-C),i&&D(l,P,160),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}function T(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}function L(e,t){if(e===t)return!0;if(e&&t&&"object"==r(e)&&"object"==r(t)){var n,o,i,a=he(e),u=he(t);if(a&&u){if((o=e.length)!=t.length)return!1;for(n=o;0!==n--;)if(!L(e[n],t[n]))return!1;return!0}if(a!=u)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,p=t instanceof RegExp;if(c!=p)return!1;if(c&&p)return e.toString()==t.toString();var f=me(e);if((o=f.length)!==me(t).length)return!1;for(n=o;0!==n--;)if(!ge.call(t,f[n]))return!1;for(n=o;0!==n--;)if(("_owner"!==(i=f[n])||!e.$$typeof)&&!L(e[i],t[i]))return!1;return!0}return e!==e&&t!==t}function _(e,t){try{return L(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function V(e){e.preventDefault()}function R(e){e.stopPropagation()}function j(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function B(){return"ontouchstart"in window||navigator.maxTouchPoints}var U=n(1),W=n.n(U),H=n(18),$=n(19),z=n(3),G=(n.n(z),n(2)),q=n.n(G),Y=n(32),Z=n.n(Y),X=n(34),J=n.n(X),K=n(35),Q=(n.n(K),function(){}),ee=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[]},te=function(e){return"auto"===e?"bottom":e},ne=function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return t={label:"menu"},u(t,T(n),"100%"),u(t,"backgroundColor",a.neutral0),u(t,"borderRadius",o),u(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),u(t,"marginBottom",i.menuGutter),u(t,"marginTop",i.menuGutter),u(t,"position","absolute"),u(t,"width","100%"),u(t,"zIndex",1),t},re=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),u(m(m(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,u=t.menuShouldScrollIntoView,s=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===a,p=u&&!c,f=I({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:p,isFixedPosition:c,theme:s});l&&l(f),n.setState(f)}}),u(m(m(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||te(e);return l({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return c(t,e),a(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(U.Component);u(re,"contextTypes",{getPortalPlacement:q.a.func});var oe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,u=r(Object($.a)(o("menu",e)),{menu:!0},n);return W.a.createElement("div",s({className:u},a,{ref:i}),t)},ie=function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},ae=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return W.a.createElement("div",{className:r(Object($.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},ue=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},se=ue,le=ue,ce=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object($.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};ce.defaultProps={children:"No options"};var pe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object($.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};pe.defaultProps={children:"Loading..."};var fe=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},de=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{placement:null}),u(m(m(n)),"getPortalPlacement",function(e){var t=e.placement;t!==te(n.props.menuPlacement)&&n.setState({placement:t})}),n}return c(t,e),a(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,u="fixed"===i;if(!t&&!u||!r)return null;var s=this.state.placement||te(o),l=N(r),c=u?0:window.pageYOffset,p=l[s]+c,f={offset:p,position:i,rect:l},d=W.a.createElement("div",{className:Object($.a)(a("menuPortal",f))},n);return t?Object(z.createPortal)(d,t):d}}]),t}(U.Component);u(de,"childContextTypes",{getPortalPlacement:q.a.func});var he=Array.isArray,me=Object.keys,ge=Object.prototype.hasOwnProperty,ve=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],be=function(e){for(var t=0;t<ve.length;t++)e=e.replace(ve[t].letters,ve[t].base);return e},ye=function(e){return e.replace(/^\s+|\s+$/g,"")},Ee=function(e){return"".concat(e.label," ").concat(e.value)},Oe=function(e){return W.a.createElement("span",s({className:Object($.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},Ce=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,h(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return W.a.createElement("input",s({ref:t},n,{className:Object($.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(U.Component),we=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(z.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(U.Component),xe=["boxSizing","height","overflow","paddingRight","position"],Se={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"},Ae=!("undefined"===typeof window||!window.document||!window.document.createElement),ke=0,Fe=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"originalStyles",{}),u(m(m(n)),"listenerOptions",{capture:!1,passive:!1}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this;if(Ae){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&xe.forEach(function(t){var n=i&&i[t];e.originalStyles[t]=n}),n&&ke<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,u=document.body?document.body.clientWidth:0,s=window.innerWidth-u+a||0;Object.keys(Se).forEach(function(e){var t=Se[e];i&&(i[e]=t)}),i&&(i.paddingRight="".concat(s,"px"))}o&&B()&&(o.addEventListener("touchmove",V,this.listenerOptions),r&&(r.addEventListener("touchstart",j,this.listenerOptions),r.addEventListener("touchmove",R,this.listenerOptions))),ke+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(Ae){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;ke=Math.max(ke-1,0),n&&ke<1&&xe.forEach(function(t){var n=e.originalStyles[t];i&&(i[t]=n)}),o&&B()&&(o.removeEventListener("touchmove",V,this.listenerOptions),r&&(r.removeEventListener("touchstart",j,this.listenerOptions),r.removeEventListener("touchmove",R,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(U.Component);u(Fe,"defaultProps",{accountForScrollbars:!0});var De=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"state",{touchScrollTarget:null}),u(m(m(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),u(m(m(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?W.a.createElement("div",null,W.a.createElement("div",{onClick:this.blurSelectInput,className:Object($.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),W.a.createElement(we,{innerRef:this.getScrollTarget},t),r?W.a.createElement(Fe,{touchScrollTarget:r}):null):t}}]),t}(U.PureComponent),Me=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"isBottom",!1),u(m(m(n)),"isTop",!1),u(m(m(n)),"scrollTarget",void 0),u(m(m(n)),"touchStart",void 0),u(m(m(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),u(m(m(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,u=r.onTopLeave,s=n.scrollTarget,l=s.scrollTop,c=s.scrollHeight,p=s.clientHeight,f=n.scrollTarget,d=t>0,h=c-p-l,m=!1;h>t&&n.isBottom&&(i&&i(e),n.isBottom=!1),d&&n.isTop&&(u&&u(e),n.isTop=!1),d&&t>h?(o&&!n.isBottom&&o(e),f.scrollTop=c,m=!0,n.isBottom=!0):!d&&-t>l&&(a&&!n.isTop&&a(e),f.scrollTop=0,m=!0,n.isTop=!0),m&&n.cancelScroll(e)}),u(m(m(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),u(m(m(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),u(m(m(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),u(m(m(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"===typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"===typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"===typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"===typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"===typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return W.a.createElement(we,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(U.Component),Ne=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=h(e,["isEnabled"]);return t?W.a.createElement(Me,n):this.props.children}}]),t}(U.Component);u(Ne,"defaultProps",{isEnabled:!0});var Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Ie=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return r?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.")}},Te=function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},Le=function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},_e=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")},Ve=function(e){return e.label},Re=function(e){return e.label},je=function(e){return e.value},Be=function(e){return!!e.isDisabled},Ue=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},We=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,u=e.isRtl;return W.a.createElement("div",s({className:r(Object($.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":u},n)},i),t)},He=function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},$e=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return W.a.createElement("div",{className:r(Object($.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(U.Component),ze=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ge=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return W.a.createElement("div",{className:r(Object($.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},qe=function(e){var t=e.size,n=h(e,["size"]);return W.a.createElement("svg",s({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object($.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},Ye=function(e){return W.a.createElement(qe,s({size:20},e),W.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ze=function(e){return W.a.createElement(qe,s({size:20},e),W.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Xe=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Je=Xe,Ke=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({},i,{className:r(Object($.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||W.a.createElement(Ze,null))},Qe=Xe,et=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({},i,{className:r(Object($.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||W.a.createElement(Ye,null))},tt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},nt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return W.a.createElement("span",s({},o,{className:n(Object($.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},rt=!1,ot=function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},it=function(e){var t=e.color,n=e.delay,r=e.offset;return W.a.createElement("span",{className:Object($.a)({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},at=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,u=e.theme.colors,l=i?u.neutral80:u.neutral20;return rt||(Object($.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),rt=!0),W.a.createElement("div",s({},o,{className:n(Object($.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),W.a.createElement(it,{color:l,delay:0,offset:a}),W.a.createElement(it,{color:l,delay:160,offset:!0}),W.a.createElement(it,{color:l,delay:320,offset:!a}))};at.defaultProps={size:4};var ut=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},st=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,u=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return W.a.createElement("div",s({ref:u,className:n(Object($.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":c},o)},l),t)},lt=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},ct=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,u=e.label,l=e.theme,c=e.selectProps;return W.a.createElement("div",{className:r(Object($.a)(o("group",e)),{group:!0},n)},W.a.createElement(i,s({},a,{selectProps:c,theme:l,getStyles:o,cx:r}),u),W.a.createElement("div",null,t))},pt=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},ft=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=(e.selectProps,h(e,["className","cx","getStyles","theme","selectProps"]));return W.a.createElement("div",s({className:n(Object($.a)(r("groupHeading",l({theme:o},i))),{"group-heading":!0},t)},i))},dt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},ht=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},mt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,u=e.theme,c=(e.selectProps,h(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return W.a.createElement("div",{className:Object($.a)(r("input",l({theme:u},c)))},W.a.createElement(J.a,s({className:n(null,{input:!0},t),inputRef:o,inputStyle:ht(i),disabled:a},c)))},gt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},vt=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},bt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},yt=function(e){var t=e.children,n=e.innerProps;return W.a.createElement("div",n,t)},Et=yt,Ot=yt,Ct=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return W.a.createElement("div",n,t||W.a.createElement(Ye,{size:14}))}}]),t}(U.Component),wt=function(e){function t(){return o(this,t),g(this,p(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,u=e.innerProps,s=e.isDisabled,c=e.removeProps,p=e.selectProps,f=r.Container,d=r.Label,h=r.Remove,m=l({className:o(Object($.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),g={className:o(Object($.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},v=l({className:o(Object($.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},c);return W.a.createElement(f,{data:i,innerProps:m,selectProps:p},W.a.createElement(d,{data:i,innerProps:g,selectProps:p},t),W.a.createElement(h,{data:i,innerProps:v,selectProps:p}))}}]),t}(U.Component);u(wt,"defaultProps",{cropWithEllipsis:!0});var xt=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},St=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,u=e.isSelected,l=e.innerRef,c=e.innerProps;return W.a.createElement("div",s({ref:l,className:r(Object($.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":u},n)},c),t)},At=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},kt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return W.a.createElement("div",s({className:r(Object($.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},Ft=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},Dt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return W.a.createElement("div",s({className:r(Object($.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},Mt={ClearIndicator:et,Control:st,DropdownIndicator:Ke,DownChevron:Ze,CrossIcon:Ye,Group:ct,GroupHeading:ft,IndicatorsContainer:Ge,IndicatorSeparator:nt,Input:mt,LoadingIndicator:at,Menu:oe,MenuList:ae,MenuPortal:de,LoadingMessage:pe,NoOptionsMessage:ce,MultiValue:wt,MultiValueContainer:Et,MultiValueLabel:Ot,MultiValueRemove:Ct,Option:St,Placeholder:kt,SelectContainer:We,SingleValue:Dt,ValueContainer:$e},Nt=function(e){return l({},Mt,e.components)},Pt={clearIndicator:Qe,container:Ue,control:ut,dropdownIndicator:Je,group:lt,groupHeading:pt,indicatorsContainer:ze,indicatorSeparator:tt,input:dt,loadingIndicator:ot,loadingMessage:le,menu:ne,menuList:ie,menuPortal:fe,multiValue:gt,multiValueLabel:vt,multiValueRemove:bt,noOptionsMessage:se,option:xt,placeholder:At,singleValue:Ft,valueContainer:He},It={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Tt={baseUnit:4,controlHeight:38,menuGutter:8},Lt={borderRadius:4,colors:It,spacing:Tt},_t={backspaceRemovesValue:!0,blurInputOnSelect:P(),captureMenuScroll:!P(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=l({ignoreCase:!0,ignoreAccents:!0,stringify:Ee,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,u=r.trim,s=r.matchFrom,c=u?ye(n):n,p=u?ye(a(t)):a(t);return o&&(c=c.toLowerCase(),p=p.toLowerCase()),i&&(c=be(c),p=be(p)),"start"===s?p.substr(0,c.length)===c:p.indexOf(c)>-1}}(),formatGroupLabel:Ve,getOptionLabel:Re,getOptionValue:je,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Be,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Vt=1,Rt=function(e){function t(e){var n;o(this,t),n=g(this,p(t).call(this,e)),u(m(m(n)),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),u(m(m(n)),"blockOptionHover",!1),u(m(m(n)),"isComposing",!1),u(m(m(n)),"clearFocusValueOnUpdate",!1),u(m(m(n)),"commonProps",void 0),u(m(m(n)),"components",void 0),u(m(m(n)),"hasGroups",!1),u(m(m(n)),"initialTouchX",0),u(m(m(n)),"initialTouchY",0),u(m(m(n)),"inputIsHiddenAfterUpdate",void 0),u(m(m(n)),"instancePrefix",""),u(m(m(n)),"openAfterFocus",!1),u(m(m(n)),"scrollToFocusedOptionOnUpdate",!1),u(m(m(n)),"userIsDragging",void 0),u(m(m(n)),"controlRef",null),u(m(m(n)),"getControlRef",function(e){n.controlRef=e}),u(m(m(n)),"focusedOptionRef",null),u(m(m(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),u(m(m(n)),"menuListRef",null),u(m(m(n)),"getMenuListRef",function(e){n.menuListRef=e}),u(m(m(n)),"inputRef",null),u(m(m(n)),"getInputRef",function(e){n.inputRef=e}),u(m(m(n)),"cacheComponents",function(e){n.components=Nt({components:e})}),u(m(m(n)),"focus",n.focusInput),u(m(m(n)),"blur",n.blurInput),u(m(m(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,l({},t,{name:r.name}))}),u(m(m(n)),"setValue",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=n.props,i=o.closeMenuOnSelect,a=o.isMulti;n.onInputChange("",{action:"set-value"}),i&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),u(m(m(n)),"selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,i=n.state.selectValue;if(o)if(n.isOptionSelected(e,i)){var a=n.getOptionValue(e);n.setValue(i.filter(function(e){return n.getOptionValue(e)!==a}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(v(i),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()}),u(m(m(n)),"removeValue",function(e){var t=n.state.selectValue,r=n.getOptionValue(e);n.onChange(t.filter(function(e){return n.getOptionValue(e)!==r}),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()}),u(m(m(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),u(m(m(n)),"popValue",function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})}),u(m(m(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),u(m(m(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),u(m(m(n)),"getStyles",function(e,t){var r=Pt[e](t);r.boxSizing="border-box";var o=n.props.styles[e];return o?o(r,t):r}),u(m(m(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),u(m(m(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}}),u(m(m(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Ie(t,r)})}),u(m(m(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Pe(t,l({},r,{label:n.props["aria-label"]}))})}),u(m(m(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),u(m(m(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),u(m(m(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),u(m(m(n)),"onDropdownIndicatorMouseDown",function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!n.props.isDisabled){var t=n.props,r=t.isMulti,o=t.menuIsOpen;n.focusInput(),o?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}}),u(m(m(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),u(m(m(n)),"onScroll",function(e){"boolean"===typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&x(e.target)&&n.props.onMenuClose():"function"===typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),u(m(m(n)),"onCompositionStart",function(){n.isComposing=!0}),u(m(m(n)),"onCompositionEnd",function(){n.isComposing=!1}),u(m(m(n)),"onTouchStart",function(e){var t=e.touches,r=t.item(0);r&&(n.initialTouchX=r.clientX,n.initialTouchY=r.clientY,n.userIsDragging=!1)}),u(m(m(n)),"onTouchMove",function(e){var t=e.touches,r=t.item(0);if(r){var o=Math.abs(r.clientX-n.initialTouchX),i=Math.abs(r.clientY-n.initialTouchY);n.userIsDragging=o>5||i>5}}),u(m(m(n)),"onTouchEnd",function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)}),u(m(m(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),u(m(m(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),u(m(m(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),u(m(m(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),u(m(m(n)),"onInputFocus",function(e){var t=n.props,r=t.isSearchable,o=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1}),u(m(m(n)),"onInputBlur",function(e){if(n.menuListRef&&n.menuListRef.contains(document.activeElement))return void n.inputRef.focus();n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1})}),u(m(m(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),u(m(m(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),u(m(m(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,u=t.isClearable,s=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=n.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!s&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)n.removeValue(m);else{if(!o)return;r?n.popValue():u&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!l||!p||!h||f&&n.isOptionSelected(h,g))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):u&&i&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=Object(H.a)(n.cacheComponents,_).bind(m(m(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Vt);var i=ee(r),a=n.buildMenuOptions(e,i);return n.state.menuOptions=a,n.state.selectValue=i,n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=ee(e.value),a=this.buildMenuOptions(e,i),u=this.getNextFocusedValue(i),s=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&M(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=t.isFocused,i=this.props.isMulti,a="first"===e?0:n.focusable.length-1;if(!i){var u=n.focusable.indexOf(r[0]);u>-1&&(a=u)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var u=i.indexOf(a);a||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u<s&&(l=u+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:i[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions,i=o.focusable;if(i.length){var a=0,u=i.indexOf(r);r||(u=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=u>0?u-1:i.length-1:"down"===e?a=(u+1)%i.length:"pageup"===e?(a=u-t)<0&&(a=0):"pagedown"===e?(a=u+t)>i.length-1&&(a=i.length-1):"last"===e&&(a=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Be(i[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Lt):l({},Lt,this.props.theme):Lt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue(),p=function(){return l};return{cx:C.bind(null,i),clearValue:e,getStyles:t,getValue:p,hasValue:c,isMulti:a,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue,o=r.indexOf(n);if(o>-1){if(e.indexOf(n)>-1)return n;if(o<e.length)return e[o]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"===typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"===typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:u,value:s,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:u,type:"option",value:s}}};return i.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options,i=o.map(function(t,n){var o=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(i.length){var u="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:u,data:t,options:i})}}else{var s=a(t,"".concat(r));s&&(e.render.push(s),e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,u=i.menuIsOpen,s=i.inputValue,l=i.screenReaderStatus,c=r?Te({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&u?Le({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",f=_e({inputValue:s,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(p," ").concat(f," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,u=this.state.inputIsHidden,l=r||this.getElementId("input");if(!n)return W.a.createElement(Ce,{id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Q,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},p=this.commonProps,f=p.cx,d=p.theme,h=p.selectProps;return W.a.createElement(a,s({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:f,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:i,theme:d,type:"text",value:o},c))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,u=t.Placeholder,l=this.commonProps,c=this.props,p=c.controlShouldRenderValue,f=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue,y=g.isFocused;if(!this.hasValue()||!p)return h?null:W.a.createElement(u,s({},l,{key:"placeholder",isDisabled:f,isFocused:y}),m);if(d){return v.map(function(t){var a=t===b;return W.a.createElement(n,s({},l,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:f,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))})}if(h)return null;var E=v[0];return W.a.createElement(a,s({},l,{data:E,isDisabled:f}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;var a={"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return W.a.createElement(n,s({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return W.a.createElement(e,s({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,u=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,p=this.commonProps,f=this.state,d=f.focusedOption,m=f.menuOptions,g=this.props,v=g.captureMenuScroll,b=g.inputValue,y=g.isLoading,E=g.loadingMessage,O=g.minMenuHeight,C=g.maxMenuHeight,w=g.menuIsOpen,x=g.menuPlacement,S=g.menuPosition,A=g.menuPortalTarget,k=g.menuShouldBlockScroll,F=g.menuShouldScrollIntoView,D=g.noOptionsMessage,M=g.onMenuScrollToTop,N=g.onMenuScrollToBottom;if(!w)return null;var P,I=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,W.a.createElement(c,s({},p,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=m.render.map(function(t){if("group"===t.type){var o=(t.type,h(t,["type"])),i="".concat(t.key,"-heading");return W.a.createElement(n,s({},p,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return I(e)}))}if("option"===t.type)return I(t)});else if(y){var T=E({inputValue:b});if(null===T)return null;P=W.a.createElement(u,p,T)}else{var L=D({inputValue:b});if(null===L)return null;P=W.a.createElement(l,p,L)}var _={minMenuHeight:O,maxMenuHeight:C,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:F},V=W.a.createElement(re,s({},p,_),function(t){var n=t.ref,r=t.placerProps,a=r.placement,u=r.maxHeight;return W.a.createElement(o,s({},p,_,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:a}),W.a.createElement(Ne,{isEnabled:v,onTopArrive:M,onBottomArrive:N},W.a.createElement(De,{isEnabled:k},W.a.createElement(i,s({},p,{innerRef:e.getMenuListRef,isLoading:y,maxHeight:u}),P))))});return A||"fixed"===S?W.a.createElement(a,s({},p,{appendTo:A,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),V):V}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var u=a.map(function(t){return e.getOptionValue(t)}).join(n);return W.a.createElement("input",{name:i,type:"hidden",value:u})}var s=a.length>0?a.map(function(t,n){return W.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):W.a.createElement("input",{name:i,type:"hidden"});return W.a.createElement("div",null,s)}var l=a[0]?this.getOptionValue(a[0]):"";return W.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?W.a.createElement(Oe,{"aria-live":"assertive"},W.a.createElement("p",{id:"aria-selection-event"},"\xa0",this.state.ariaLiveSelection),W.a.createElement("p",{id:"aria-context"},"\xa0",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,u=i.id,l=i.isDisabled,c=i.menuIsOpen,p=this.state.isFocused,f=this.commonProps=this.getCommonProps();return W.a.createElement(r,s({},f,{className:a,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),W.a.createElement(t,s({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:c}),W.a.createElement(o,s({},f,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),W.a.createElement(n,s({},f,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(U.Component);u(Rt,"defaultProps",_t);var jt={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Bt=function(e){var t,n;return n=t=function(t){function n(){var e,t;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=g(this,(e=p(n)).call.apply(e,[this].concat(i))),u(m(m(t)),"select",void 0),u(m(m(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),u(m(m(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e})}),u(m(m(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),u(m(m(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),u(m(m(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return c(n,t),a(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"===typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,h(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return W.a.createElement(e,s({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(U.Component),u(t,"defaultProps",jt),n},Ut={cacheOptions:!1,defaultOptions:!1,filterOption:null},Wt=function(e){var t,n;return n=t=function(t){function n(e){var t;return o(this,n),t=g(this,p(n).call(this)),u(m(m(t)),"select",void 0),u(m(m(t)),"lastRequest",void 0),u(m(m(t)),"mounted",!1),u(m(m(t)),"optionsCache",{}),u(m(m(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,i=r.onInputChange,a=w(e,n,i);if(!a)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var u=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(a,function(e){t.mounted&&(e&&(t.optionsCache[a]=e),u===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))})})}return a}),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:"undefined"!==typeof e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return c(n,t),a(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}})}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"===typeof r.then&&r.then(t,function(){return t()})}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,h(n,["loadOptions"])),o=this.state,i=o.defaultOptions,a=o.inputValue,u=o.isLoading,l=o.loadedInputValue,c=o.loadedOptions,p=o.passEmptyOptions,f=p?[]:a&&l?c:i||[];return W.a.createElement(e,s({},r,{ref:function(e){t.select=e},options:f,isLoading:u,onInputChange:this.handleInputChange}))}}]),n}(U.Component),u(t,"defaultProps",Ut),n},Ht=Bt(Rt),$t=(Wt(Ht),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n}),zt={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return $t(e,t)})||n.some(function(t){return $t(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},Gt=l({allowCreateWhileLoading:!1,createOptionPosition:"last"},zt),qt=function(e){var t,n;return n=t=function(t){function n(e){var t;o(this,n),t=g(this,p(n).call(this,e)),u(m(m(t)),"select",void 0),u(m(m(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,u=r.onChange,s=r.onCreateOption,l=r.value;if("select-option"!==n.action)return u(e,n);var c=t.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==c)u(e,n);else if(s)s(i);else{var f=o(i,i),d={action:"create-option"};a?u([].concat(v(ee(l)),[f]),d):u(f,d)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return c(n,t),a(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,u=e.isValidNewOption,s=e.value,l=e.options||[],c=this.state.newOption;c=u(i,ee(s),l)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?l:"first"===n?[c].concat(v(l)):[].concat(v(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=s({},this.props),r=this.state.options;return W.a.createElement(e,s({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(U.Component),u(t,"defaultProps",Gt),n},Yt=qt(Rt),Zt=(Bt(Yt),qt(Rt)),Xt=Bt(Zt),Jt=(Wt(Xt),function(e){return function(t){var n=(t.in,t.onExited,t.appear,t.enter,t.exit,h(t,["in","onExited","appear","enter","exit"]));return W.a.createElement(e,n)}}),Kt=function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,h(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return W.a.createElement(K.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:l({},a[e])};return W.a.createElement(t,s({innerProps:n},i))})},Qt=260,en=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=g(this,(e=p(t)).call.apply(e,[this].concat(i))),u(m(m(n)),"duration",Qt),u(m(m(n)),"rafID",void 0),u(m(m(n)),"state",{width:"auto"}),u(m(m(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),u(m(m(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect(),r=t.width;n.setState({width:r})}))}),u(m(m(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),u(m(m(n)),"getTransition",function(e){return n.transition[e]}),n}return c(t,e),a(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,o=this.state.width;return W.a.createElement(K.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=l({},e.getStyle(o),e.getTransition(t));return W.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(U.Component),tn=function(e){return function(t){var n=t.in,r=t.onExited,o=h(t,["in","onExited"]);return W.a.createElement(en,{in:n,onExited:r},W.a.createElement(e,s({cropWithEllipsis:n},o)))}},nn=function(e){return function(t){return W.a.createElement(Kt,s({component:e,duration:t.isMulti?Qt:1},t))}},rn=function(e){return function(t){return W.a.createElement(Kt,s({component:e},t))}},on=function(e){return function(t){return W.a.createElement(K.TransitionGroup,s({component:e},t))}},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Nt({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,i=t.SingleValue,a=t.ValueContainer,u=h(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return l({Input:Jt(n),MultiValue:tn(r),Placeholder:nn(o),SingleValue:rn(i),ValueContainer:on(a)},u)},un=an(),sn=(un.Input,un.MultiValue,un.Placeholder,un.SingleValue,un.ValueContainer,Object(H.a)(an,_),Bt(Rt));t.a=sn},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t){"production"===t.env.NODE_ENV?e.exports=n(26):e.exports=n(27)}).call(t,n(0))},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(){}t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),s=r(n(1)),l=r(n(3)),c=n(10),p=n(11),f="unmounted";t.UNMOUNTED=f;var d="exited";t.EXITED=d;var h="entering";t.ENTERING=h;var m="entered";t.ENTERED=m;t.EXITING="exiting";var g=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=d,r.appearStatus=h):o=m:o=t.unmountOnExit||t.mountOnEnter?f:d,r.state={status:o},r.nextCallback=null,r}i(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:d}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==m&&(t=h):n!==h&&n!==m||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=l.default.findDOMNode(this);t===h?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===d&&this.setState({status:f})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;if(!t&&!r)return void this.safeSetState({status:m},function(){n.props.onEntered(e)});this.props.onEnter(e,o),this.safeSetState({status:h},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:m},function(){n.props.onEntered(e,o)})})})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n)return void this.safeSetState({status:d},function(){t.props.onExited(e)});this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:d},function(){t.props.onExited(e)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;if(!e||r)return void setTimeout(this.nextCallback,0);this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,r=o(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var i=s.default.Children.only(n);return s.default.cloneElement(i,r)},t}(s.default.Component);g.contextTypes={transitionGroup:u.object},g.childContextTypes={transitionGroup:function(){}},g.propTypes="production"!==e.env.NODE_ENV?{children:u.oneOfType([u.func.isRequired,u.element.isRequired]).isRequired,in:u.bool,mountOnEnter:u.bool,unmountOnExit:u.bool,appear:u.bool,enter:u.bool,exit:u.bool,timeout:function(e){var t=p.timeoutsShape;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.apply(void 0,[e].concat(r))},addEndListener:u.func,onEnter:u.func,onEntering:u.func,onEntered:u.func,onExit:u.func,onExiting:u.func,onExited:u.func}:{},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:a,onEntering:a,onEntered:a,onExit:a,onExiting:a,onExited:a},g.UNMOUNTED=0,g.EXITED=1,g.ENTERING=2,g.ENTERED=3,g.EXITING=4;var v=(0,c.polyfill)(g);t.default=v}).call(t,n(0))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){function t(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}this.setState(t.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(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,a=null,u=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?u="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\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=r,t.componentWillReceiveProps=o),"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 c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(2)),o="production"!==e.env.NODE_ENV?r.default.oneOfType([r.default.number,r.default.shape({enter:r.default.number,exit:r.default.number,appear:r.default.number}).isRequired]):null;t.timeoutsShape=o;var i="production"!==e.env.NODE_ENV?r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,exit:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterDone:r.default.string,enterActive:r.default.string,exit:r.default.string,exitDone:r.default.string,exitActive:r.default.string})]):null;t.classNamesShape=i}).call(t,n(0))},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.__esModule=!0,t.default=void 0;var l=o(n(2)),c=o(n(1)),p=n(10),f=n(42),d=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},h={component:"div",childFactory:function(e){return e}},m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o=r.handleExited.bind(s(s(r)));return r.state={handleExited:o,firstRender:!0},r}u(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,f.getInitialChildMapping)(e,r):(0,f.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,f.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=a({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=i(e,["component","childFactory"]),o=d(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:c.default.createElement(t,r,o)},t}(c.default.Component);m.childContextTypes={transitionGroup:l.default.object.isRequired},m.propTypes="production"!==r.env.NODE_ENV?{component:l.default.any,children:l.default.node,appear:l.default.bool,enter:l.default.bool,exit:l.default.bool,childFactory:l.default.func}:{},m.defaultProps=h;var g=(0,p.polyfill)(m);t.default=g,e.exports=t.default}).call(t,n(0))},function(e,t,n){var r,o;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===o)for(var u in r)i.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(15),n(44);wp.blocks.updateCategory("groups",{icon:wp.element.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#7392cf"},wp.element.createElement("path",{d:"M 5.14,2.85 C 5.11,2.85 5.09,2.87 5.09,2.90 5.09,2.93 5.11,2.96 5.14,2.96 5.17,2.96 5.19,2.93 5.19,2.90 5.19,2.87 5.17,2.85 5.14,2.85 Z M 1.53,1.64 C 1.49,1.64 1.45,1.68 1.45,1.72 1.45,1.76 1.49,1.80 1.53,1.80 1.58,1.80 1.61,1.76 1.61,1.72 1.61,1.68 1.58,1.64 1.53,1.64 Z M 4.17,1.24 C 4.09,1.24 4.03,1.30 4.03,1.37 4.03,1.44 4.09,1.50 4.17,1.50 4.24,1.50 4.30,1.44 4.30,1.37 4.30,1.30 4.24,1.24 4.17,1.24 Z M 16.67,16.32 C 16.55,16.32 16.45,16.41 16.45,16.53 16.45,16.65 16.55,16.74 16.67,16.74 16.79,16.74 16.88,16.65 16.88,16.53 16.88,16.41 16.79,16.32 16.67,16.32 Z M 3.97,4.68 C 3.78,4.68 3.63,4.83 3.63,5.02 3.63,5.21 3.78,5.37 3.97,5.37 4.16,5.37 4.32,5.21 4.32,5.02 4.32,4.83 4.16,4.68 3.97,4.68 Z M 13.28,8.84 C 12.97,8.84 12.72,9.09 12.72,9.40 12.72,9.71 12.97,9.96 13.28,9.96 13.59,9.96 13.84,9.71 13.84,9.40 13.84,9.09 13.59,8.84 13.28,8.84 Z M 16.63,11.50 C 16.13,11.50 15.73,11.90 15.73,12.40 15.73,12.90 16.13,13.30 16.63,13.30 17.13,13.30 17.53,12.90 17.53,12.40 17.53,11.90 17.13,11.50 16.63,11.50 Z M 8.57,1.55 C 7.26,1.55 6.21,2.60 6.21,3.91 6.21,5.21 7.26,6.27 8.57,6.27 9.87,6.27 10.93,5.21 10.93,3.91 10.93,2.60 9.87,1.55 8.57,1.55 Z M 15.30,1.07 C 13.19,1.07 11.48,2.78 11.48,4.89 11.48,7.00 13.19,8.71 15.30,8.71 17.41,8.71 19.12,7.00 19.12,4.89 19.12,2.78 17.41,1.07 15.30,1.07 Z M 7.25,6.76 C 3.84,6.76 1.07,9.52 1.07,12.94 1.07,16.35 3.84,19.12 7.25,19.12 10.66,19.12 13.43,16.35 13.43,12.94 13.43,9.52 10.66,6.76 7.25,6.76 Z"}))})},function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(6),a=n(13),u=n.n(a),s=n(43),l=(n.n(s),wp),c=l.apiFetch,p=wp.i18n.__,f=wp.data,d=f.registerStore,h=f.withSelect,m=wp.blocks.registerBlockType,g=wp.blockEditor,v=g.InspectorControls,b=g.InnerBlocks,y=wp.components,E=y.PanelBody,O=y.PanelRow,C=y.Spinner,w={groups:{}},x={setGroups:function(e){return{type:"SET_GROUPS",groups:e}},receiveGroups:function(e){return{type:"RECEIVE_GROUPS",path:e}}},S=(d("groups/groups-blocks",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments[1];switch(t.type){case"SET_GROUPS":return Object.assign({},e,{groups:t.groups})}return e},actions:x,selectors:{receiveGroups:function(e){return e.groups}},controls:{RECEIVE_GROUPS:function(e){return c({path:e.path})}},resolvers:{receiveGroups:o.a.mark(function e(t){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.receiveGroups("/groups/groups-blocks/groups/");case 2:return n=e.sent,e.abrupt("return",x.setGroups(n));case 4:case"end":return e.stop()}},e,this)})}}),wp.element.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "})));m("groups/groups-member",{title:p("Groups Member Block","groups"),description:p("Show content for group members","groups"),icon:S,category:"groups",keywords:[p("groups","groups"),p("access","groups"),p("members","groups")],attributes:{groups_select:{type:"string",default:null}},edit:h(function(e){return{groups:e("groups/groups-blocks").receiveGroups()}})(function(e){var t=e.attributes.groups_select,n=e.groups,r=e.className,o=e.setAttributes,a=e.isSelected,s=function(e){return o({groups_select:JSON.stringify(e)})},l=[];return null!==t&&(l=JSON.parse(t)),n.length?[wp.element.createElement(v,null,wp.element.createElement(E,{title:p("Select Groups","groups"),className:"block-inspector"},wp.element.createElement(O,null,wp.element.createElement("label",{htmlFor:"block-groups",className:"groups-inspector__label"},p("Content will be shown to users that are members of these groups:","groups"))),wp.element.createElement(O,null,wp.element.createElement(i.a,{className:"groups-inspector__control",name:"block-groups",value:l,onChange:s,options:n,isClearable:!0,isMulti:"true"})))),wp.element.createElement("div",{className:a?u()(r)+"__selected":e.className},wp.element.createElement("div",{className:u()(r)+"__inner-block"},wp.element.createElement(b,null)))]:wp.element.createElement("p",{className:r},wp.element.createElement(C,null),p("Loading...","groups"))}),save:function(e){return wp.element.createElement("div",null,wp.element.createElement(b.Content,null))}})},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(17),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";function n(e,t,n,r){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),u=new d(r||[]);return a._invoke=l(e,n,u),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function o(){}function i(){}function a(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(e){function t(n,o,i,a){var u=r(e[n],e,o);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===typeof l&&b.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){s.value=e,i(s)},a)}a(u.arg)}function n(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return o=o?o.then(r,r):r()}var o;this._invoke=n}function l(e,t,n){var o=S;return function(i,a){if(o===k)throw new Error("Generator is already running");if(o===F){if("throw"===i)throw a;return m()}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=c(u,n);if(s){if(s===D)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===S)throw o=F,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=k;var l=r(e,t,n);if("normal"===l.type){if(o=n.done?F:A,l.arg===D)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=F,n.method="throw",n.arg=l.arg)}}}function c(e,t){var n=e.iterator[t.method];if(n===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,c(e,t),"throw"===t.method))return D;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return D}var o=r(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,D;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,D):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,D)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e){var t=e[E];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:g,done:!0}}var g,v=Object.prototype,b=v.hasOwnProperty,y="function"===typeof Symbol?Symbol:{},E=y.iterator||"@@iterator",O=y.asyncIterator||"@@asyncIterator",C=y.toStringTag||"@@toStringTag",w="object"===typeof e,x=t.regeneratorRuntime;if(x)return void(w&&(e.exports=x));x=t.regeneratorRuntime=w?e.exports:{},x.wrap=n;var S="suspendedStart",A="suspendedYield",k="executing",F="completed",D={},M={};M[E]=function(){return this};var N=Object.getPrototypeOf,P=N&&N(N(h([])));P&&P!==v&&b.call(P,E)&&(M=P);var I=a.prototype=o.prototype=Object.create(M);i.prototype=I.constructor=a,a.constructor=i,a[C]=i.displayName="GeneratorFunction",x.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},x.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,C in e||(e[C]="GeneratorFunction")),e.prototype=Object.create(I),e},x.awrap=function(e){return{__await:e}},u(s.prototype),s.prototype[O]=function(){return this},x.AsyncIterator=s,x.async=function(e,t,r,o){var i=new s(n(e,t,r,o));return x.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},u(I),I[C]="Generator",I[E]=function(){return this},I.toString=function(){return"[object Generator]"},x.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},x.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),u=b.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&b.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,D):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),D},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),D}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;f(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=g),D}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function o(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return u&&o===this&&t(n,a)?i:(i=e.apply(this,n),u=!0,o=this,a=n,i)}void 0===t&&(t=r);var o,i,a=[],u=!1;return n}t.a=o},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u});var r=n(20),o="undefined"!==typeof e?e:{},i=Object(r.a)(o),a=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),u=(i.keyframes,i.css);i.sheet,i.caches}).call(t,n(7))},function(e,t,n){"use strict";(function(e){function r(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function o(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}function i(t,n){function r(e){C+=e,y&&A.insert(e,M)}function o(t,n){if(null==t)return"";switch(typeof t){case"boolean":return"";case"function":if(void 0!==t.__emotion_styles){var r=t.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==e.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");return r}return void 0===this&&"production"!==e.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),o.call(this,void 0===this?t():t(this.mergedProps,this.context),n);case"object":return i.call(this,t);default:var a=S.registered[t];return!1===n&&void 0!==a?a:t}}function i(t){if(N.has(t))return N.get(t);var n="";return Array.isArray(t)?t.forEach(function(e){n+=o.call(this,e,!1)},this):Object.keys(t).forEach(function(r){if("object"!==typeof t[r])void 0!==S.registered[t[r]]?n+=r+"{"+S.registered[t[r]]+"}":n+=d(r)+":"+h(r,t[r])+";";else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==e.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with babel-plugin-emotion.");Array.isArray(t[r])&&"string"===typeof t[r][0]&&void 0===S.registered[t[r][0]]?t[r].forEach(function(e){n+=d(r)+":"+h(r,e)+";"}):n+=r+"{"+o.call(this,t[r],!1)+"}"}},this),N.set(t,n),n}function a(e,t){void 0===S.inserted[F]&&(C="",k(e,t),S.inserted[F]=C)}function u(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==S.registered[t]?e.push(t):n+=t+" "}),n}function c(e,t){var n=[],r=u(n,e);return n.length<2?e:r+R(n,t)}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(b(t))}function m(e){S.inserted[e]=!0}function g(e){e.forEach(m)}function v(){y&&(A.flush(),A.inject()),S.inserted={},S.registered={}}if(void 0!==t.__SECRET_EMOTION__)return t.__SECRET_EMOTION__;void 0===n&&(n={});var O=n.key||"css";if("production"!==e.env.NODE_ENV&&/[^a-z-]/.test(O))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+O+'" was passed');var C,w,x=p()(r);void 0!==n.prefix&&(w={prefix:n.prefix});var S={registered:{},inserted:{},nonce:n.nonce,key:O},A=new E(n);y&&A.inject();var k=new l.a(w);k.use(n.stylisPlugins)(x);var F,D,M="",N=new WeakMap,P=/label:\s*([^\s;\n{]+)\s*;/g,I=function(e,t){return Object(s.a)(e+t)+t};if("production"!==e.env.NODE_ENV){var T=I,L=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;I=function(e,t){return T(e.replace(L,function(e){return M=e,""}),t)}}var _=function(e){var t=!0,n="",r="";null==e||void 0===e.raw?(t=!1,n+=o.call(this,e,!1)):n+=e[0];for(var i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return a.forEach(function(r,i){n+=o.call(this,r,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[i+1]&&(n+=e[i+1])},this),D=n,n=n.replace(P,function(e,t){return r+="-"+t,""}),F=I(n,r),n};if("production"!==e.env.NODE_ENV){var V=k;k=function(e,t){V(e,t),M=""}}var R=function(){var e=_.apply(this,arguments),t=O+"-"+F;return void 0===S.registered[t]&&(S.registered[t]=D),a("."+t,e),t},j=function(){var e=_.apply(this,arguments),t="animation-"+F;return a("","@keyframes "+t+"{"+e+"}"),t},B=function(){a("",_.apply(this,arguments))};if(y){var U=document.querySelectorAll("[data-emotion-"+O+"]");Array.prototype.forEach.call(U,function(e){A.tags[0].parentNode.insertBefore(e,A.tags[0]),e.getAttribute("data-emotion-"+O).split(" ").forEach(m)})}var W={flush:v,hydrate:g,cx:f,merge:c,getRegisteredStyles:u,injectGlobal:B,keyframes:j,css:R,sheet:A,caches:S};return t.__SECRET_EMOTION__=W,W}var a=n(21),u=n(22),s=n(23),l=n(24),c=n(25),p=n.n(c),f=/[A-Z]|^ms/g,d=Object(a.a)(function(e){return e.replace(f,"-$&").toLowerCase()}),h=function(e,t){return null==t||"boolean"===typeof t?"":1===u.a[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"};if("production"!==e.env.NODE_ENV){var m=/(attr|calc|counters?|url)\(/,g=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],v=h;h=function(e,t){return"content"===e&&("string"!==typeof t||-1===g.indexOf(t)&&!m.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`"),v(e,t)}}var b=function t(n){for(var r=n.length,o=0,i="";o<r;o++){var a=n[o];if(null!=a){var u=void 0;switch(typeof a){case"boolean":break;case"function":"production"!==e.env.NODE_ENV&&console.error("Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\nPlease call the function before passing it to cx."),u=t([a()]);break;case"object":if(Array.isArray(a))u=t(a);else{u="";for(var s in a)a[s]&&s&&(u&&(u+=" "),u+=s)}break;default:u=a}u&&(i&&(i+=" "),i+=u)}}return i},y="undefined"!==typeof document,E=function(){function t(t){this.isSpeedy="production"===e.env.NODE_ENV,this.tags=[],this.ctr=0,this.opts=t}var n=t.prototype;return n.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=o(this.opts),this.injected=!0},n.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},n.insert=function(t,n){if(this.isSpeedy){var i=this.tags[this.tags.length-1],a=r(i);try{a.insertRule(t,a.cssRules.length)}catch(n){"production"!==e.env.NODE_ENV&&console.warn("illegal rule",t)}}else{var u=o(this.opts);this.tags.push(u),u.appendChild(document.createTextNode(t+(n||"")))}++this.ctr%65e3===0&&this.tags.push(o(this.opts))},n.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1},t}();t.a=i}).call(t,n(0))},function(e,t,n){"use strict";function r(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}t.a=r},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};t.a=r},function(e,t,n){"use strict";function r(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),t^=t>>>24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^t,n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r^=255&e.charCodeAt(o),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)}return r^=r>>>13,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>15,(r>>>0).toString(36)}t.a=r},function(e,t,n){"use strict";function r(e){function t(e,r,s,l,c){for(var d,h,m,g,v,O=0,w=0,x=0,S=0,A=0,k=0,I=m=d=0,L=0,V=0,R=0,j=0,B=s.length,U=B-1,W="",H="",$="",z="";L<B;){if(h=s.charCodeAt(L),L===U&&0!==w+S+x+O&&(0!==w&&(h=47===w?10:47),S=x=O=0,B++,U++),0===w+S+x+O){if(L===U&&(0<V&&(W=W.replace(f,"")),0<W.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:W+=s.charAt(L)}h=59}switch(h){case 123:for(W=W.trim(),d=W.charCodeAt(0),m=1,j=++L;L<B;){switch(h=s.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(h=s.charCodeAt(L+1)){case 42:case 47:e:{for(I=L+1;I<U;++I)switch(s.charCodeAt(I)){case 47:if(42===h&&42===s.charCodeAt(I-1)&&L+2!==I){L=I+1;break e}break;case 10:if(47===h){L=I+1;break e}}L=I}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<U&&s.charCodeAt(L)!==h;);}if(0===m)break;L++}switch(m=s.substring(j,L),0===d&&(d=(W=W.replace(p,"").trim()).charCodeAt(0)),d){case 64:switch(0<V&&(W=W.replace(f,"")),h=W.charCodeAt(1)){case 100:case 109:case 115:case 45:V=r;break;default:V=P}if(m=t(r,V,m,h,c+1),j=m.length,0<T&&(V=n(P,W,R),v=u(3,m,V,r,D,F,j,h,c,l),W=V.join(""),void 0!==v&&0===(j=(m=v.trim()).length)&&(h=0,m="")),0<j)switch(h){case 115:W=W.replace(C,a);case 100:case 109:case 45:m=W+"{"+m+"}";break;case 107:W=W.replace(b,"$1 $2"),m=W+"{"+m+"}",m=1===N||2===N&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=W+m,112===l&&(H+=m,m="")}else m="";break;default:m=t(r,n(r,W,R),m,l,c+1)}$+=m,m=R=V=I=d=0,W="",h=s.charCodeAt(++L);break;case 125:case 59:if(W=(0<V?W.replace(f,""):W).trim(),1<(j=W.length))switch(0===I&&(45===(d=W.charCodeAt(0))||96<d&&123>d)&&(j=(W=W.replace(" ",":")).length),0<T&&void 0!==(v=u(1,W,r,e,D,F,H.length,l,c,l))&&0===(j=(W=v.trim()).length)&&(W="\0\0"),d=W.charCodeAt(0),h=W.charCodeAt(1),d){case 0:break;case 64:if(105===h||99===h){z+=W+s.charAt(L);break}default:58!==W.charCodeAt(j-1)&&(H+=o(W,d,h,W.charCodeAt(2)))}R=V=I=d=0,W="",h=s.charCodeAt(++L)}}switch(h){case 13:case 10:47===w?w=0:0===1+d&&107!==l&&0<W.length&&(V=1,W+="\0"),0<T*_&&u(0,W,r,e,D,F,H.length,l,c,l),F=1,D++;break;case 59:case 125:if(0===w+S+x+O){F++;break}default:switch(F++,g=s.charAt(L),h){case 9:case 32:if(0===S+O+w)switch(A){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===S+w+O&&(V=R=1,g="\f"+g);break;case 108:if(0===S+w+O+M&&0<I)switch(L-I){case 2:112===A&&58===s.charCodeAt(L-3)&&(M=A);case 8:111===k&&(M=k)}break;case 58:0===S+w+O&&(I=L);break;case 44:0===w+x+S+O&&(V=1,g+="\r");break;case 34:case 39:0===w&&(S=S===h?0:0===S?h:S);break;case 91:0===S+w+x&&O++;break;case 93:0===S+w+x&&O--;break;case 41:0===S+w+O&&x--;break;case 40:if(0===S+w+O){if(0===d)switch(2*A+3*k){case 533:break;default:d=1}x++}break;case 64:0===w+x+S+O+I+m&&(m=1);break;case 42:case 47:if(!(0<S+O+x))switch(w){case 0:switch(2*h+3*s.charCodeAt(L+1)){case 235:w=47;break;case 220:j=L,w=42}break;case 42:47===h&&42===A&&j+2!==L&&(33===s.charCodeAt(j+2)&&(H+=s.substring(j,L+1)),g="",w=0)}}0===w&&(W+=g)}k=A,A=h,L++}if(0<(j=H.length)){if(V=r,0<T&&void 0!==(v=u(2,H,V,e,D,F,j,l,c,l))&&0===(H=v).length)return z+H+$;if(H=V.join(",")+"{"+H+"}",0!==N*M){switch(2!==N||i(H,2)||(M=0),M){case 111:H=H.replace(E,":-moz-$1")+H;break;case 112:H=H.replace(y,"::-webkit-input-$1")+H.replace(y,"::-moz-$1")+H.replace(y,":-ms-input-$1")+H}M=0}}return z+H+$}function n(e,t,n){var o=t.trim().split(g);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var u=0;for(e=0===a?"":e[0]+" ";u<i;++u)t[u]=r(e,t[u],n).trim();break;default:var s=u=0;for(t=[];u<i;++u)for(var l=0;l<a;++l)t[s++]=r(e[l]+" ",o[u],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",u=2*t+3*n+4*r;if(944===u){e=a.indexOf(":",9)+1;var s=a.substring(e,a.length-1).trim();return s=a.substring(0,e).trim()+s+";",1===N||2===N&&i(s,1)?"-webkit-"+s+s:s}if(0===N||2===N&&!i(a,1))return a;switch(u){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(k,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(s=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+s+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(s=a.substring(13).trim(),t=s.indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=a.replace(O,"tb");break;case 232:s=a.replace(O,"tb-rl");break;case 220:s=a.replace(O,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+s+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim(),u=s.charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102<u?"inline-":"")+"box")+";"+a.replace(s,"-webkit-"+s)+";"+a.replace(s,"-ms-"+s+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return s=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+s+"-ms-flex-"+s+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(x,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(x,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(s,"-webkit-"+s)+a.replace(s,"-moz-"+s.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),L(2!==t?r:r.replace(S,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function u(e,t,n,r,o,i,a,u,s,l){for(var p,f=0,d=t;f<T;++f)switch(p=I[f].call(c,e,d,n,r,o,i,a,u,s,l)){case void 0:case!1:case!0:case null:break;default:d=p}if(d!==t)return d}function s(e){switch(e){case void 0:case null:T=I.length=0;break;default:switch(e.constructor){case Array:for(var t=0,n=e.length;t<n;++t)s(e[t]);break;case Function:I[T++]=e;break;case Boolean:_=0|!!e}}return s}function l(e){return e=e.prefix,void 0!==e&&(L=null,e?"function"!==typeof e?N=1:(N=2,L=e):N=0),l}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),V=r,r=[V],0<T){var o=u(-1,n,r,r,D,F,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(P,r,n,0,0);return 0<T&&void 0!==(o=u(-2,i,r,r,D,F,i.length,0,0,0))&&(i=o),V="",M=0,F=D=1,i}var p=/^\0+/g,f=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,m=/([,: ])(transform)/g,g=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,E=/:(read-only)/g,O=/[svh]\w+-[tblr]{2}/,C=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,F=1,D=1,M=0,N=1,P=[],I=[],T=0,L=null,_=0,V="";return c.use=s,c.set=l,void 0!==e&&l(e),c}t.a=r},function(e,t,n){!function(t){e.exports=t()}(function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,u,s,l,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}})},function(e,t,n){"use strict";function r(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case d:case h:case s:case c:case l:case g:return e;default:switch(e=e&&e.$$typeof){case f:case m:case y:case b:case p:return e;default:return t}}case u:return t}}}function o(e){return r(e)===h}var i="function"===typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,u=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,p=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.concurrent_mode"):60111,m=i?Symbol.for("react.forward_ref"):60112,g=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.suspense_list"):60120,b=i?Symbol.for("react.memo"):60115,y=i?Symbol.for("react.lazy"):60116,E=i?Symbol.for("react.block"):60121,O=i?Symbol.for("react.fundamental"):60117,C=i?Symbol.for("react.responder"):60118,w=i?Symbol.for("react.scope"):60119;t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=f,t.ContextProvider=p,t.Element=a,t.ForwardRef=m,t.Fragment=s,t.Lazy=y,t.Memo=b,t.Portal=u,t.Profiler=c,t.StrictMode=l,t.Suspense=g,t.isAsyncMode=function(e){return o(e)||r(e)===d},t.isConcurrentMode=o,t.isContextConsumer=function(e){return r(e)===f},t.isContextProvider=function(e){return r(e)===p},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return r(e)===m},t.isFragment=function(e){return r(e)===s},t.isLazy=function(e){return r(e)===y},t.isMemo=function(e){return r(e)===b},t.isPortal=function(e){return r(e)===u},t.isProfiler=function(e){return r(e)===c},t.isStrictMode=function(e){return r(e)===l},t.isSuspense=function(e){return r(e)===g},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===s||e===h||e===c||e===l||e===g||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===b||e.$$typeof===p||e.$$typeof===f||e.$$typeof===m||e.$$typeof===O||e.$$typeof===C||e.$$typeof===w||e.$$typeof===E)},t.typeOf=r},function(e,t,n){"use strict";(function(e){"production"!==e.env.NODE_ENV&&function(){function e(e){return"string"===typeof e||"function"===typeof e||e===y||e===S||e===O||e===E||e===k||e===F||"object"===typeof e&&null!==e&&(e.$$typeof===M||e.$$typeof===D||e.$$typeof===C||e.$$typeof===w||e.$$typeof===A||e.$$typeof===P||e.$$typeof===I||e.$$typeof===T||e.$$typeof===N)}function n(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case v:var n=e.type;switch(n){case x:case S:case y:case O:case E:case k:return n;default:var r=n&&n.$$typeof;switch(r){case w:case A:case M:case D:case C:return r;default:return t}}case b:return t}}}function r(e){return Y||(Y=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),o(e)||n(e)===x}function o(e){return n(e)===S}function i(e){return n(e)===w}function a(e){return n(e)===C}function u(e){return"object"===typeof e&&null!==e&&e.$$typeof===v}function s(e){return n(e)===A}function l(e){return n(e)===y}function c(e){return n(e)===M}function p(e){return n(e)===D}function f(e){return n(e)===b}function d(e){return n(e)===O}function h(e){return n(e)===E}function m(e){return n(e)===k}var g="function"===typeof Symbol&&Symbol.for,v=g?Symbol.for("react.element"):60103,b=g?Symbol.for("react.portal"):60106,y=g?Symbol.for("react.fragment"):60107,E=g?Symbol.for("react.strict_mode"):60108,O=g?Symbol.for("react.profiler"):60114,C=g?Symbol.for("react.provider"):60109,w=g?Symbol.for("react.context"):60110,x=g?Symbol.for("react.async_mode"):60111,S=g?Symbol.for("react.concurrent_mode"):60111,A=g?Symbol.for("react.forward_ref"):60112,k=g?Symbol.for("react.suspense"):60113,F=g?Symbol.for("react.suspense_list"):60120,D=g?Symbol.for("react.memo"):60115,M=g?Symbol.for("react.lazy"):60116,N=g?Symbol.for("react.block"):60121,P=g?Symbol.for("react.fundamental"):60117,I=g?Symbol.for("react.responder"):60118,T=g?Symbol.for("react.scope"):60119,L=x,_=S,V=w,R=C,j=v,B=A,U=y,W=M,H=D,$=b,z=O,G=E,q=k,Y=!1;t.AsyncMode=L,t.ConcurrentMode=_,t.ContextConsumer=V,t.ContextProvider=R,t.Element=j,t.ForwardRef=B,t.Fragment=U,t.Lazy=W,t.Memo=H,t.Portal=$,t.Profiler=z,t.StrictMode=G,t.Suspense=q,t.isAsyncMode=r,t.isConcurrentMode=o,t.isContextConsumer=i,t.isContextProvider=a,t.isElement=u,t.isForwardRef=s,t.isFragment=l,t.isLazy=c,t.isMemo=p,t.isPortal=f,t.isProfiler=d,t.isStrictMode=h,t.isSuspense=m,t.isValidElementType=e,t.typeOf=n}()}).call(t,n(0))},function(e,t,n){"use strict";(function(t){function r(){return null}var o=n(8),i=n(29),a=n(4),u=n(30),s=Function.call.bind(Object.prototype.hasOwnProperty),l=function(){};"production"!==t.env.NODE_ENV&&(l=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,n){function c(e){var t=e&&(F&&e[F]||e[D]);if("function"===typeof t)return t}function p(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function d(e){function r(r,u,s,c,p,d,h){if(c=c||M,d=d||s,h!==a){if(n){var m=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 m.name="Invariant Violation",m}if("production"!==t.env.NODE_ENV&&"undefined"!==typeof console){var g=c+":"+s;!o[g]&&i<3&&(l("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),o[g]=!0,i++)}}return null==u[s]?r?new f(null===u[s]?"The "+p+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(u,s,c,p,d)}if("production"!==t.env.NODE_ENV)var o={},i=0;var u=r.bind(null,!1);return u.isRequired=r.bind(null,!0),u}function h(e){function t(t,n,r,o,i,a){var u=t[n];if(x(u)!==e)return new f("Invalid "+o+" `"+i+"` of type `"+S(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return d(t)}function m(e){function t(t,n,r,o,i){if("function"!==typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){return new f("Invalid "+o+" `"+i+"` of type `"+x(u)+"` supplied to `"+r+"`, expected an array.")}for(var s=0;s<u.length;s++){var l=e(u,s,r,o,i+"["+s+"]",a);if(l instanceof Error)return l}return null}return d(t)}function g(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||M;return new f("Invalid "+o+" `"+i+"` of type `"+k(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}return d(t)}function v(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(p(a,e[u]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===S(t)?String(t):t});return new f("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+s+".")}return Array.isArray(e)?d(n):("production"!==t.env.NODE_ENV&&l(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)}function b(e){function t(t,n,r,o,i){if("function"!==typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],l=x(u);if("object"!==l)return new f("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var c in u)if(s(u,c)){var p=e(u,c,r,o,i+"."+c,a);if(p instanceof Error)return p}return null}return d(t)}function y(e){function n(t,n,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(t,n,r,o,i,a))return null}return new f("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&l("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var o=0;o<e.length;o++){var i=e[o];if("function"!==typeof i)return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(i)+" at index "+o+"."),r}return d(n)}function E(e){function t(t,n,r,o,i){var u=t[n],s=x(u);if("object"!==s)return new f("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var p=c(u,l,r,o,i+"."+l,a);if(p)return p}}return null}return d(t)}function O(e){function t(t,n,r,o,u){var s=t[n],l=x(s);if("object"!==l)return new f("Invalid "+o+" `"+u+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");var c=i({},t[n],e);for(var p in c){var d=e[p];if(!d)return new f("Invalid "+o+" `"+u+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=d(s,p,r,o,u+"."+p,a);if(h)return h}return null}return d(t)}function C(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(C);if(null===t||e(t))return!0;var n=c(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!C(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!C(i[1]))return!1}return!0;default:return!1}}function w(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function x(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":w(t,e)?"symbol":t}function S(e){if("undefined"===typeof e||null===e)return""+e;var t=x(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function A(e){var t=S(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function k(e){return e.constructor&&e.constructor.name?e.constructor.name:M}var F="function"===typeof Symbol&&Symbol.iterator,D="@@iterator",M="<<anonymous>>",N={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:function(){return d(r)}(),arrayOf:m,element:function(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){return new f("Invalid "+o+" `"+i+"` of type `"+x(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return d(t)}(),elementType:function(){function e(e,t,n,r,i){var a=e[t];if(!o.isValidElementType(a)){return new f("Invalid "+r+" `"+i+"` of type `"+x(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}return null}return d(e)}(),instanceOf:g,node:function(){function e(e,t,n,r,o){return C(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return d(e)}(),objectOf:b,oneOf:v,oneOfType:y,shape:E,exact:O};return f.prototype=Error.prototype,N.checkPropTypes=u,N.resetWarningCache=u.resetWarningCache,N.PropTypes=N,N}}).call(t,n(0))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,s=r(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)i.call(n,c)&&(s[c]=n[c]);if(o){u=o(n);for(var p=0;p<u.length;p++)a.call(n,u[p])&&(s[u[p]]=n[u[p]])}}return s}},function(e,t,n){"use strict";(function(t){function r(e,n,r,s,l){if("production"!==t.env.NODE_ENV)for(var c in e)if(u(e,c)){var p;try{if("function"!==typeof e[c]){var f=Error((s||"React class")+": "+r+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.");throw f.name="Invariant Violation",f}p=e[c](n,c,s,r,null,i)}catch(e){p=e}if(!p||p instanceof Error||o((s||"React class")+": type specification of "+r+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in a)){a[p.message]=!0;var d=l?l():"";o("Failed "+r+" type: "+p.message+(null!=d?d:""))}}}var o=function(){};if("production"!==t.env.NODE_ENV){var i=n(4),a={},u=Function.call.bind(Object.prototype.hasOwnProperty);o=function(e){var t="Warning: "+e;"undefined"!==typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}r.resetWarningCache=function(){"production"!==t.env.NODE_ENV&&(a={})},e.exports=r}).call(t,n(0))},function(e,t,n){"use strict";function r(){}function o(){}var i=n(4);o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array: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:o,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){(function(t){for(var r=n(33),o="undefined"===typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",u=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],l=0;!u&&l<i.length;l++)u=o[i[l]+"Request"+a],s=o[i[l]+"Cancel"+a]||o[i[l]+"CancelRequest"+a];if(!u||!s){var c=0,p=0,f=[];u=function(e){if(0===f.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return f.push({handle:++p,callback:e,cancelled:!1}),p},s=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return u.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=u,e.cancelAnimationFrame=s}}).call(t,n(7))},function(e,t,n){(function(t){(function(){var n,r,o,i,a,u;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},i=n(),u=1e9*t.uptime(),a=i-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(t,n(0))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),p=r(c),f=n(2),d=r(f),h={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},m=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],g=function(e){return m.forEach(function(t){return delete e[t]}),e},v=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},b=!("undefined"===typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),y=function(){return b?"_"+Math.random().toString(36).substr(2,12):void 0},E=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"===typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||y()},n}return u(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||y()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"===typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(v(e,this.sizer),this.placeHolderSizer&&v(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&"undefined"!==typeof this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2;e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0,e<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return b&&e?p.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!==e&&void 0!==e?e:t}),t=s({},this.props.style);t.display||(t.display="inline-block");var n=s({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=o(this.props,[]);return g(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,p.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),p.default.createElement("input",s({},r,{ref:this.inputRef})),p.default.createElement("div",{ref:this.sizerRef,style:h},e),this.props.placeholder?p.default.createElement("div",{ref:this.placeHolderSizerRef,style:h},this.props.placeholder):null)}}]),t}(c.Component);E.propTypes={className:d.default.string,defaultValue:d.default.any,extraWidth:d.default.oneOfType([d.default.number,d.default.string]),id:d.default.string,injectStyles:d.default.bool,inputClassName:d.default.string,inputRef:d.default.func,inputStyle:d.default.object,minWidth:d.default.oneOfType([d.default.number,d.default.string]),onAutosize:d.default.func,onChange:d.default.func,placeholder:d.default.string,placeholderIsMinWidth:d.default.bool,style:d.default.object,value:d.default.any},E.defaultProps={minWidth:1,injectStyles:!0},t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=r(n(36)),i=r(n(41)),a=r(n(12)),u=r(n(9));e.exports={Transition:u.default,TransitionGroup:a.default,ReplaceTransition:i.default,CSSTransition:o.default}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}t.__esModule=!0,t.default=void 0;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),s=o(n(37)),l=o(n(40)),c=o(n(1)),p=o(n(9)),f=n(11),d=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,s.default)(e,t)})},h=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,l.default)(e,t)})},m=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,t.onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter"),o=r.className;t.removeClasses(e,"exit"),d(e,o),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter"),o=r.activeClassName;t.reflowAndAddClass(e,o),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("appear").doneClassName,o=t.getClassNames("enter").doneClassName,i=n?r+" "+o:o;t.removeClasses(e,n?"appear":"enter"),d(e,i),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit"),r=n.className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),d(e,r),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit"),r=n.activeClassName;t.reflowAndAddClass(e,r),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit"),r=n.doneClassName;t.removeClasses(e,"exit"),d(e,r),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,o=r&&n?n+"-":"",i=r?o+e:n[e];return{className:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}a(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&h(e,r),o&&h(e,o),i&&h(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,d(e,t))},n.render=function(){var e=i({},this.props);return delete e.classNames,c.default.createElement(p.default,i({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(c.default.Component);m.defaultProps={classNames:""},m.propTypes="production"!==r.env.NODE_ENV?i({},p.default.propTypes,{classNames:f.classNamesShape,onEnter:u.func,onEntering:u.func,onEntered:u.func,onExit:u.func,onExiting:u.func,onExited:u.func}):{};var g=m;t.default=g,e.exports=t.default}).call(t,n(0))},function(e,t,n){"use strict";function r(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}var o=n(38);t.__esModule=!0,t.default=r;var i=o(n(39));e.exports=t.default},function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"===typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";(function(r){function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}t.__esModule=!0,t.default=void 0;var u=o(n(2)),s=o(n(1)),l=n(3),c=o(n(12)),p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,t.handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}a(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=s.default.Children.toArray(o)[t];i.props[e]&&(r=i.props)[e].apply(r,n),this.props[e]&&this.props[e]((0,l.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,r=i(e,["children","in"]),o=s.default.Children.toArray(t),a=o[0],u=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,s.default.createElement(c.default,r,n?s.default.cloneElement(a,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):s.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(s.default.Component);p.propTypes="production"!==r.env.NODE_ENV?{in:u.default.bool.isRequired,children:function(e,t){return 2!==s.default.Children.count(e[t])?new Error('"'+t+'" must be exactly two transition components.'):null}}:{};var f=p;t.default=f,e.exports=t.default}).call(t,n(0))},function(e,t,n){"use strict";function r(e,t){var n=function(e){return t&&(0,s.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&s.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function o(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,u={};for(var s in t){if(r[s])for(a=0;a<r[s].length;a++){var l=r[s][a];u[r[s][a]]=n(l)}u[s]=n(s)}for(a=0;a<o.length;a++)u[o[a]]=n(o[a]);return u}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}function a(e,t){return r(e.children,function(n){return(0,s.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})}function u(e,t,n){var a=r(e.children),u=o(t,a);return Object.keys(u).forEach(function(r){var o=u[r];if((0,s.isValidElement)(o)){var l=r in t,c=r in a,p=t[r],f=(0,s.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,s.isValidElement)(p)&&(u[r]=(0,s.cloneElement)(o,{onExited:n.bind(null,o),in:p.props.in,exit:i(o,"exit",e),enter:i(o,"enter",e)})):u[r]=(0,s.cloneElement)(o,{in:!1}):u[r]=(0,s.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:i(o,"exit",e),enter:i(o,"enter",e)})}}),u}t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=o,t.getInitialChildMapping=a,t.getNextChildMapping=u;var s=n(1)},function(e,t){},function(e,t,n){"use strict";var r=n(5),o=n.n(r),i=n(6),a=n(13),u=n.n(a),s=n(45),l=(n.n(s),wp),c=l.apiFetch,p=wp.i18n.__,f=wp.data,d=f.registerStore,h=f.withSelect,m=wp.blocks.registerBlockType,g=wp.blockEditor,v=g.InspectorControls,b=g.InnerBlocks,y=wp.components,E=y.PanelBody,O=y.PanelRow,C=y.Spinner,w={groups:{}},x={setGroups:function(e){return{type:"SET_GROUPS",groups:e}},receiveGroups:function(e){return{type:"RECEIVE_GROUPS",path:e}}},S=(d("groups/groups-blocks",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,t=arguments[1];switch(t.type){case"SET_GROUPS":return Object.assign({},e,{groups:t.groups})}return e},actions:x,selectors:{receiveGroups:function(e){return e.groups}},controls:{RECEIVE_GROUPS:function(e){return c({path:e.path})}},resolvers:{receiveGroups:o.a.mark(function e(t){var n;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.receiveGroups("/groups/groups-blocks/groups/");case 2:return n=e.sent,e.abrupt("return",x.setGroups(n));case 4:case"end":return e.stop()}},e,this)})}}),wp.element.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "})));m("groups/groups-non-member",{title:p("Groups Non-member Block","groups"),description:p("Hide content from group members","groups"),icon:S,category:"groups",keywords:[p("groups","groups"),p("access","groups"),p("members","groups")],attributes:{groups_select:{type:"string",default:null}},edit:h(function(e){return{groups:e("groups/groups-blocks").receiveGroups()}})(function(e){var t=e.attributes.groups_select,n=e.groups,r=e.className,o=e.setAttributes,a=e.isSelected,s=function(e){return o({groups_select:JSON.stringify(e)})},l=[];return null!==t&&(l=JSON.parse(t)),n.length?[wp.element.createElement(v,null,wp.element.createElement(E,{title:p("Select Groups","groups"),className:"block-inspector"},wp.element.createElement(O,null,wp.element.createElement("label",{htmlFor:"block-groups",className:"groups-inspector__label"},p("Content will be shown to users that are not members of these groups:","groups"))),wp.element.createElement(O,null,wp.element.createElement(i.a,{className:"groups-inspector__control",name:"block-groups",value:l,onChange:s,options:n,isClearable:!0,isMulti:"true"})))),wp.element.createElement("div",{className:a?u()(r)+"__selected":e.className},wp.element.createElement("div",{className:u()(r)+"__inner-block"},wp.element.createElement(b,null)))]:wp.element.createElement("p",{className:r},wp.element.createElement(C,null),p("Loading...","groups"))}),save:function(e){return wp.element.createElement("div",null,wp.element.createElement(b.Content,null))}})},function(e,t){}]);
|
lib/blocks/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "groups-blocks",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"private": true,
|
5 |
+
"scripts": {
|
6 |
+
"start": "cgb-scripts start",
|
7 |
+
"build": "cgb-scripts build",
|
8 |
+
"eject": "cgb-scripts eject"
|
9 |
+
},
|
10 |
+
"dependencies": {
|
11 |
+
"cgb-scripts": "1.14.0",
|
12 |
+
"react-select": "^2.3.0"
|
13 |
+
}
|
14 |
+
}
|
lib/blocks/src/blocks.js
CHANGED
@@ -32,12 +32,13 @@ wp.blocks.updateCategory(
|
|
32 |
height : 20,
|
33 |
viewBox: '0 0 20 20',
|
34 |
fill: '#7392cf'
|
35 |
-
|
36 |
},
|
37 |
-
wp.element.createElement(
|
|
|
38 |
{
|
39 |
-
d:"M 5.14,2.85 C 5.11,2.85 5.09,2.87 5.09,2.90 5.09,2.93 5.11,2.96 5.14,2.96 5.17,2.96 5.19,2.93 5.19,2.90 5.19,2.87 5.17,2.85 5.14,2.85 Z M 1.53,1.64 C 1.49,1.64 1.45,1.68 1.45,1.72 1.45,1.76 1.49,1.80 1.53,1.80 1.58,1.80 1.61,1.76 1.61,1.72 1.61,1.68 1.58,1.64 1.53,1.64 Z M 4.17,1.24 C 4.09,1.24 4.03,1.30 4.03,1.37 4.03,1.44 4.09,1.50 4.17,1.50 4.24,1.50 4.30,1.44 4.30,1.37 4.30,1.30 4.24,1.24 4.17,1.24 Z M 16.67,16.32 C 16.55,16.32 16.45,16.41 16.45,16.53 16.45,16.65 16.55,16.74 16.67,16.74 16.79,16.74 16.88,16.65 16.88,16.53 16.88,16.41 16.79,16.32 16.67,16.32 Z M 3.97,4.68 C 3.78,4.68 3.63,4.83 3.63,5.02 3.63,5.21 3.78,5.37 3.97,5.37 4.16,5.37 4.32,5.21 4.32,5.02 4.32,4.83 4.16,4.68 3.97,4.68 Z M 13.28,8.84 C 12.97,8.84 12.72,9.09 12.72,9.40 12.72,9.71 12.97,9.96 13.28,9.96 13.59,9.96 13.84,9.71 13.84,9.40 13.84,9.09 13.59,8.84 13.28,8.84 Z M 16.63,11.50 C 16.13,11.50 15.73,11.90 15.73,12.40 15.73,12.90 16.13,13.30 16.63,13.30 17.13,13.30 17.53,12.90 17.53,12.40 17.53,11.90 17.13,11.50 16.63,11.50 Z M 8.57,1.55 C 7.26,1.55 6.21,2.60 6.21,3.91 6.21,5.21 7.26,6.27 8.57,6.27 9.87,6.27 10.93,5.21 10.93,3.91 10.93,2.60 9.87,1.55 8.57,1.55 Z M 15.30,1.07 C 13.19,1.07 11.48,2.78 11.48,4.89 11.48,7.00 13.19,8.71 15.30,8.71 17.41,8.71 19.12,7.00 19.12,4.89 19.12,2.78 17.41,1.07 15.30,1.07 Z M 7.25,6.76 C 3.84,6.76 1.07,9.52 1.07,12.94 1.07,16.35 3.84,19.12 7.25,19.12 10.66,19.12 13.43,16.35 13.43,12.94 13.43,9.52 10.66,6.76 7.25,6.76 Z"
|
|
|
|
|
40 |
)
|
41 |
-
)
|
42 |
}
|
43 |
);
|
32 |
height : 20,
|
33 |
viewBox: '0 0 20 20',
|
34 |
fill: '#7392cf'
|
|
|
35 |
},
|
36 |
+
wp.element.createElement(
|
37 |
+
'path',
|
38 |
{
|
39 |
+
d:"M 5.14,2.85 C 5.11,2.85 5.09,2.87 5.09,2.90 5.09,2.93 5.11,2.96 5.14,2.96 5.17,2.96 5.19,2.93 5.19,2.90 5.19,2.87 5.17,2.85 5.14,2.85 Z M 1.53,1.64 C 1.49,1.64 1.45,1.68 1.45,1.72 1.45,1.76 1.49,1.80 1.53,1.80 1.58,1.80 1.61,1.76 1.61,1.72 1.61,1.68 1.58,1.64 1.53,1.64 Z M 4.17,1.24 C 4.09,1.24 4.03,1.30 4.03,1.37 4.03,1.44 4.09,1.50 4.17,1.50 4.24,1.50 4.30,1.44 4.30,1.37 4.30,1.30 4.24,1.24 4.17,1.24 Z M 16.67,16.32 C 16.55,16.32 16.45,16.41 16.45,16.53 16.45,16.65 16.55,16.74 16.67,16.74 16.79,16.74 16.88,16.65 16.88,16.53 16.88,16.41 16.79,16.32 16.67,16.32 Z M 3.97,4.68 C 3.78,4.68 3.63,4.83 3.63,5.02 3.63,5.21 3.78,5.37 3.97,5.37 4.16,5.37 4.32,5.21 4.32,5.02 4.32,4.83 4.16,4.68 3.97,4.68 Z M 13.28,8.84 C 12.97,8.84 12.72,9.09 12.72,9.40 12.72,9.71 12.97,9.96 13.28,9.96 13.59,9.96 13.84,9.71 13.84,9.40 13.84,9.09 13.59,8.84 13.28,8.84 Z M 16.63,11.50 C 16.13,11.50 15.73,11.90 15.73,12.40 15.73,12.90 16.13,13.30 16.63,13.30 17.13,13.30 17.53,12.90 17.53,12.40 17.53,11.90 17.13,11.50 16.63,11.50 Z M 8.57,1.55 C 7.26,1.55 6.21,2.60 6.21,3.91 6.21,5.21 7.26,6.27 8.57,6.27 9.87,6.27 10.93,5.21 10.93,3.91 10.93,2.60 9.87,1.55 8.57,1.55 Z M 15.30,1.07 C 13.19,1.07 11.48,2.78 11.48,4.89 11.48,7.00 13.19,8.71 15.30,8.71 17.41,8.71 19.12,7.00 19.12,4.89 19.12,2.78 17.41,1.07 15.30,1.07 Z M 7.25,6.76 C 3.84,6.76 1.07,9.52 1.07,12.94 1.07,16.35 3.84,19.12 7.25,19.12 10.66,19.12 13.43,16.35 13.43,12.94 13.43,9.52 10.66,6.76 7.25,6.76 Z"
|
40 |
+
}
|
41 |
+
)
|
42 |
)
|
|
|
43 |
}
|
44 |
);
|
lib/blocks/src/blocks/groups-member/block.js
CHANGED
@@ -24,42 +24,49 @@ import classnames from 'classnames';
|
|
24 |
// Import CSS.
|
25 |
import './editor.scss';
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
} = wp;
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
const
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
const
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
{
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
Spinner
|
54 |
-
} = wp.components; // Import PanelBody, SelectControl from wp.components.
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
const DEFAULT_STATE = {
|
58 |
-
groups:
|
59 |
-
{},
|
60 |
};
|
|
|
61 |
/**
|
62 |
-
* Actions object.
|
|
|
|
|
63 |
*/
|
64 |
const actions = {
|
65 |
// Action creator for the action called when settng a group by choosing from the options list.
|
@@ -139,18 +146,22 @@ const store = registerStore(
|
|
139 |
}
|
140 |
);
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
|
|
145 |
{
|
146 |
width: 24,
|
147 |
height: 24,
|
148 |
viewBox: '0 0 24 24'
|
149 |
},
|
150 |
-
wp.element.createElement(
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
|
|
154 |
);
|
155 |
|
156 |
/**
|
@@ -167,9 +178,11 @@ const memberIcon = wp.element.createElement( 'svg',
|
|
167 |
* registered; otherwise `undefined`.
|
168 |
*/
|
169 |
registerBlockType(
|
|
|
|
|
|
|
170 |
'groups/groups-member',
|
171 |
{
|
172 |
-
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
173 |
title: __( 'Groups Member Block', 'groups' ), // Block title.
|
174 |
description: __( 'Show content for group members', 'groups' ),
|
175 |
icon: memberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
@@ -190,13 +203,12 @@ registerBlockType(
|
|
190 |
*
|
191 |
* The "edit" property must be a valid function.
|
192 |
*
|
|
|
|
|
193 |
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
194 |
*/
|
195 |
-
|
196 |
-
// Use withSelect to inject state-derived props into a component.
|
197 |
edit: withSelect(
|
198 |
-
( select ) =>
|
199 |
-
{
|
200 |
return {
|
201 |
// Uses select() to return an object of the store's selectors. Pre-bound to pass the current state automatically.
|
202 |
groups: select( 'groups/groups-blocks' ).receiveGroups(),
|
@@ -205,94 +217,63 @@ registerBlockType(
|
|
205 |
)
|
206 |
|
207 |
(
|
208 |
-
props =>
|
209 |
-
|
210 |
const
|
211 |
{
|
212 |
-
attributes:
|
213 |
-
{
|
214 |
-
groups_select
|
215 |
-
},
|
216 |
groups,
|
217 |
className,
|
218 |
setAttributes,
|
219 |
isSelected
|
220 |
} = props;
|
|
|
221 |
const handleGroupsChange = ( groups_select ) => setAttributes(
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
let selectedGroups = [];
|
226 |
-
|
227 |
-
{
|
228 |
selectedGroups = JSON.parse( groups_select );
|
229 |
}
|
|
|
230 |
// Show if the data is not loaded yet.
|
231 |
-
if ( !groups.length )
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
<
|
238 |
-
Spinner / >
|
239 |
-
{
|
240 |
-
__( 'Loading...', 'groups' )
|
241 |
-
} <
|
242 |
-
/ p >
|
243 |
);
|
244 |
}
|
245 |
|
246 |
-
return [
|
247 |
-
InspectorControls
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
handleGroupsChange
|
273 |
-
}
|
274 |
-
options = {
|
275 |
-
groups
|
276 |
-
}
|
277 |
-
isClearable
|
278 |
-
isMulti = 'true' /
|
279 |
-
>
|
280 |
-
<
|
281 |
-
/ PanelRow > <
|
282 |
-
/ PanelBody > <
|
283 |
-
/ InspectorControls > , <
|
284 |
-
div className = {
|
285 |
-
isSelected ? ( classnames( className ) + '__selected' ) : props.className
|
286 |
-
} >
|
287 |
-
<
|
288 |
-
div className = {
|
289 |
-
classnames( className ) + '__inner-block'
|
290 |
-
} >
|
291 |
-
<
|
292 |
-
InnerBlocks / >
|
293 |
-
<
|
294 |
-
/ div > <
|
295 |
-
/ div >
|
296 |
];
|
297 |
}
|
298 |
),
|
@@ -305,14 +286,11 @@ registerBlockType(
|
|
305 |
*
|
306 |
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
307 |
*/
|
308 |
-
save: props =>
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
InnerBlocks.Content / >
|
314 |
-
<
|
315 |
-
/ div >
|
316 |
);
|
317 |
},
|
318 |
}
|
24 |
// Import CSS.
|
25 |
import './editor.scss';
|
26 |
|
27 |
+
/**
|
28 |
+
* Import apiFetch() from wp.
|
29 |
+
*/
|
30 |
+
const { apiFetch } = wp;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Import __() from wp.i18n.
|
34 |
+
*/
|
35 |
+
const { __ } = wp.i18n;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Import registerStore, withSelect from wp.data.
|
39 |
+
*/
|
40 |
+
const { registerStore, withSelect } = wp.data;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Import registerBlockType() from wp.blocks.
|
44 |
+
*/
|
45 |
+
const { registerBlockType } = wp.blocks;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Import InspectorControls, InnerBlocks from wp.blockEditor.
|
49 |
+
*
|
50 |
+
* @since 2.11.0 requires at least WordPress 5.2 as it uses wp.blockEditor instead of the deprecated wp.editor
|
51 |
+
*/
|
52 |
+
const { InspectorControls, InnerBlocks } = wp.blockEditor;
|
|
|
|
|
53 |
|
54 |
+
/**
|
55 |
+
* Import PanelBody, SelectControl from wp.components.
|
56 |
+
*/
|
57 |
+
const { PanelBody, PanelRow, Spinner } = wp.components;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Default state - no groups selected.
|
61 |
+
*/
|
62 |
const DEFAULT_STATE = {
|
63 |
+
groups: {},
|
|
|
64 |
};
|
65 |
+
|
66 |
/**
|
67 |
+
* Actions object.
|
68 |
+
* Actions are payloads of information that send data from the application to the store.
|
69 |
+
* Plain JavaScript objects.
|
70 |
*/
|
71 |
const actions = {
|
72 |
// Action creator for the action called when settng a group by choosing from the options list.
|
146 |
}
|
147 |
);
|
148 |
|
149 |
+
/**
|
150 |
+
* Icon for the Groups Member Block.
|
151 |
+
*/
|
152 |
+
const memberIcon = wp.element.createElement(
|
153 |
+
'svg',
|
154 |
{
|
155 |
width: 24,
|
156 |
height: 24,
|
157 |
viewBox: '0 0 24 24'
|
158 |
},
|
159 |
+
wp.element.createElement(
|
160 |
+
'path',
|
161 |
+
{
|
162 |
+
d: "M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "
|
163 |
+
}
|
164 |
+
)
|
165 |
);
|
166 |
|
167 |
/**
|
178 |
* registered; otherwise `undefined`.
|
179 |
*/
|
180 |
registerBlockType(
|
181 |
+
// Block name.
|
182 |
+
// Block names must be string that contains a namespace prefix.
|
183 |
+
// Example: my-plugin/my-custom-block.
|
184 |
'groups/groups-member',
|
185 |
{
|
|
|
186 |
title: __( 'Groups Member Block', 'groups' ), // Block title.
|
187 |
description: __( 'Show content for group members', 'groups' ),
|
188 |
icon: memberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
203 |
*
|
204 |
* The "edit" property must be a valid function.
|
205 |
*
|
206 |
+
* Use withSelect to inject state-derived props into a component.
|
207 |
+
*
|
208 |
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
209 |
*/
|
|
|
|
|
210 |
edit: withSelect(
|
211 |
+
( select ) => {
|
|
|
212 |
return {
|
213 |
// Uses select() to return an object of the store's selectors. Pre-bound to pass the current state automatically.
|
214 |
groups: select( 'groups/groups-blocks' ).receiveGroups(),
|
217 |
)
|
218 |
|
219 |
(
|
220 |
+
props => {
|
221 |
+
|
222 |
const
|
223 |
{
|
224 |
+
attributes: { groups_select },
|
|
|
|
|
|
|
225 |
groups,
|
226 |
className,
|
227 |
setAttributes,
|
228 |
isSelected
|
229 |
} = props;
|
230 |
+
|
231 |
const handleGroupsChange = ( groups_select ) => setAttributes(
|
232 |
+
{ groups_select: JSON.stringify( groups_select ) }
|
233 |
+
);
|
234 |
+
|
235 |
let selectedGroups = [];
|
236 |
+
|
237 |
+
if ( null !== groups_select ) {
|
238 |
selectedGroups = JSON.parse( groups_select );
|
239 |
}
|
240 |
+
|
241 |
// Show if the data is not loaded yet.
|
242 |
+
if ( !groups.length ) {
|
243 |
+
return (
|
244 |
+
<p className={ className}>
|
245 |
+
<Spinner/>
|
246 |
+
{ __( 'Loading...', 'groups' ) }
|
247 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
);
|
249 |
}
|
250 |
|
251 |
+
return [
|
252 |
+
<InspectorControls>
|
253 |
+
<PanelBody title={ __( 'Select Groups', 'groups' ) } className="block-inspector">
|
254 |
+
<PanelRow>
|
255 |
+
<label htmlFor="block-groups" className="groups-inspector__label">
|
256 |
+
{ __( 'Content will be shown to users that are members of these groups:', 'groups' ) }
|
257 |
+
</label>
|
258 |
+
</PanelRow>
|
259 |
+
<PanelRow>
|
260 |
+
<Select
|
261 |
+
className = "groups-inspector__control"
|
262 |
+
name = 'block-groups'
|
263 |
+
value = { selectedGroups }
|
264 |
+
onChange = { handleGroupsChange }
|
265 |
+
options = { groups }
|
266 |
+
isClearable
|
267 |
+
isMulti = 'true'
|
268 |
+
/>
|
269 |
+
</PanelRow>
|
270 |
+
</PanelBody>
|
271 |
+
</InspectorControls>,
|
272 |
+
<div className = { isSelected ? ( classnames( className ) + '__selected' ) : props.className }>
|
273 |
+
<div className = { classnames( className ) + '__inner-block' }>
|
274 |
+
<InnerBlocks/>
|
275 |
+
</div>
|
276 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
];
|
278 |
}
|
279 |
),
|
286 |
*
|
287 |
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
288 |
*/
|
289 |
+
save: props => {
|
290 |
+
return (
|
291 |
+
<div>
|
292 |
+
<InnerBlocks.Content/>
|
293 |
+
</div>
|
|
|
|
|
|
|
294 |
);
|
295 |
},
|
296 |
}
|
lib/blocks/src/blocks/groups-member/editor.scss
CHANGED
@@ -18,48 +18,48 @@
|
|
18 |
* @since groups 2.8.0
|
19 |
*/
|
20 |
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
18 |
* @since groups 2.8.0
|
19 |
*/
|
20 |
|
21 |
+
.groups-inspector__control {
|
22 |
+
width: 100%;
|
23 |
|
24 |
+
> div > div {
|
25 |
+
margin-top: 0px;
|
26 |
+
}
|
27 |
+
}
|
28 |
|
29 |
+
.wp-block-groups-groups-member {
|
30 |
+
border: 1px dashed #33333333;
|
31 |
+
border-radius: 2px;
|
32 |
+
padding: 0;
|
33 |
+
box-sizing: border-box;
|
34 |
+
margin: -1px;
|
35 |
|
36 |
+
&:before {
|
37 |
+
font-size: 1.618em;
|
38 |
+
content:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='black'><path d='M 14.42,9.58 C 13.75,8.91 12.95,8.57 12.00,8.57 11.05,8.57 10.25,8.91 9.58,9.58 8.91,10.25 8.57,11.05 8.57,12.00 8.57,12.95 8.91,13.75 9.58,14.42 10.25,15.09 11.05,15.43 12.00,15.43 12.95,15.43 13.75,15.09 14.42,14.42 15.09,13.75 15.43,12.95 15.43,12.00 15.43,11.05 15.09,10.25 14.42,9.58 Z M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z ' /></svg>");
|
39 |
+
display: block;
|
40 |
+
position: absolute;
|
41 |
+
top: 2px;
|
42 |
+
right: 4px;
|
43 |
+
opacity: 0.3;
|
44 |
+
}
|
45 |
+
}
|
46 |
|
47 |
+
body.rtl .wp-block-groups-groups-member::before {
|
48 |
+
left: 4px;
|
49 |
+
right: unset;
|
50 |
+
}
|
51 |
|
52 |
+
.wp-block-groups-groups-member__inner-block {
|
53 |
+
padding-left: 5px;
|
54 |
+
}
|
55 |
|
56 |
+
.wp-block-groups-groups-member__selected {
|
57 |
+
border: none;
|
58 |
+
padding: unset;
|
59 |
+
box-sizing: unset;
|
60 |
+
margin: unset;
|
61 |
|
62 |
+
&:before {
|
63 |
+
content: '';
|
64 |
+
}
|
65 |
+
}
|
lib/blocks/src/blocks/groups-non-member/block.js
CHANGED
@@ -24,19 +24,49 @@ import classnames from 'classnames';
|
|
24 |
// Import CSS.
|
25 |
import './editor.scss';
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
const {
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
const DEFAULT_STATE = {
|
36 |
groups: {},
|
37 |
};
|
|
|
38 |
/**
|
39 |
-
* Actions object.
|
|
|
|
|
40 |
*/
|
41 |
const actions = {
|
42 |
// Action creator for the action called when settng a group by choosing from the options list.
|
@@ -100,16 +130,21 @@ const store = registerStore(
|
|
100 |
}
|
101 |
);
|
102 |
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
105 |
{
|
106 |
width: 24,
|
107 |
height: 24,
|
108 |
viewBox: '0 0 24 24'
|
109 |
},
|
110 |
-
wp.element.createElement(
|
|
|
111 |
{
|
112 |
-
d:"M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "
|
|
|
113 |
)
|
114 |
);
|
115 |
|
@@ -127,9 +162,11 @@ const nonMemberIcon = wp.element.createElement('svg',
|
|
127 |
* registered; otherwise `undefined`.
|
128 |
*/
|
129 |
registerBlockType(
|
|
|
|
|
|
|
130 |
'groups/groups-non-member',
|
131 |
{
|
132 |
-
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
133 |
title: __( 'Groups Non-member Block','groups' ), // Block title.
|
134 |
description: __( 'Hide content from group members', 'groups' ),
|
135 |
icon: nonMemberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
@@ -142,87 +179,100 @@ registerBlockType(
|
|
142 |
},
|
143 |
},
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
}
|
162 |
-
)
|
163 |
-
|
164 |
-
(
|
165 |
-
props => {
|
166 |
-
const { attributes: { groups_select }, groups, className, setAttributes, isSelected } = props;
|
167 |
-
const handleGroupsChange = ( groups_select ) => setAttributes( { groups_select: JSON.stringify( groups_select ) } );
|
168 |
-
let selectedGroups = [];
|
169 |
-
if ( null !== groups_select ) {
|
170 |
-
selectedGroups = JSON.parse( groups_select );
|
171 |
}
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
{
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
}
|
|
|
181 |
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
isMulti = 'true'
|
199 |
-
/ >
|
200 |
-
< / PanelRow >
|
201 |
-
< / PanelBody >
|
202 |
-
< / InspectorControls > ,
|
203 |
-
< div className = { isSelected ? ( classnames( className ) + '__selected' ) : props.className } >
|
204 |
-
< div className = { classnames( className ) + '__inner-block' } >
|
205 |
-
< InnerBlocks / >
|
206 |
-
< / div >
|
207 |
-
< / div >
|
208 |
-
];
|
209 |
-
}
|
210 |
-
),
|
211 |
-
|
212 |
-
/**
|
213 |
-
* The save function defines the way in which the different attributes should be combined
|
214 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
215 |
-
*
|
216 |
-
* The "save" property must be specified and must be a valid function.
|
217 |
-
*
|
218 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
219 |
-
*/
|
220 |
-
save: props => {
|
221 |
-
return (
|
222 |
-
< div >
|
223 |
-
< InnerBlocks.Content / >
|
224 |
-
< / div >
|
225 |
-
);
|
226 |
-
},
|
227 |
-
}
|
228 |
);
|
24 |
// Import CSS.
|
25 |
import './editor.scss';
|
26 |
|
27 |
+
/**
|
28 |
+
* Import apiFetch() from wp.
|
29 |
+
*/
|
30 |
+
const { apiFetch } = wp;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Import __() from wp.i18n.
|
34 |
+
*/
|
35 |
+
const { __ } = wp.i18n;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Import registerStore, withSelect from wp.data.
|
39 |
+
*/
|
40 |
+
const { registerStore, withSelect } = wp.data;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Import registerBlockType() from wp.blocks.
|
44 |
+
*/
|
45 |
+
const { registerBlockType } = wp.blocks;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Import InspectorControls, InnerBlocks from wp.blockEditor.
|
49 |
+
*
|
50 |
+
* @since 2.11.0 requires at least WordPress 5.2 as it uses wp.blockEditor instead of the deprecated wp.editor
|
51 |
+
*/
|
52 |
+
const { InspectorControls, InnerBlocks } = wp.blockEditor;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Import PanelBody, SelectControl from wp.components.
|
56 |
+
*/
|
57 |
+
const { PanelBody, PanelRow, Spinner } = wp.components;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Default state - no groups selected.
|
61 |
+
*/
|
62 |
const DEFAULT_STATE = {
|
63 |
groups: {},
|
64 |
};
|
65 |
+
|
66 |
/**
|
67 |
+
* Actions object.
|
68 |
+
* Actions are payloads of information that send data from the application to the store.
|
69 |
+
* Plain JavaScript objects.
|
70 |
*/
|
71 |
const actions = {
|
72 |
// Action creator for the action called when settng a group by choosing from the options list.
|
130 |
}
|
131 |
);
|
132 |
|
133 |
+
/**
|
134 |
+
* Icon for the Groups Non-member Block.
|
135 |
+
*/
|
136 |
+
const nonMemberIcon = wp.element.createElement(
|
137 |
+
'svg',
|
138 |
{
|
139 |
width: 24,
|
140 |
height: 24,
|
141 |
viewBox: '0 0 24 24'
|
142 |
},
|
143 |
+
wp.element.createElement(
|
144 |
+
'path',
|
145 |
{
|
146 |
+
d:"M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z "
|
147 |
+
}
|
148 |
)
|
149 |
);
|
150 |
|
162 |
* registered; otherwise `undefined`.
|
163 |
*/
|
164 |
registerBlockType(
|
165 |
+
// Block name.
|
166 |
+
// Block names must be string that contains a namespace prefix.
|
167 |
+
// Example: my-plugin/my-custom-block.
|
168 |
'groups/groups-non-member',
|
169 |
{
|
|
|
170 |
title: __( 'Groups Non-member Block','groups' ), // Block title.
|
171 |
description: __( 'Hide content from group members', 'groups' ),
|
172 |
icon: nonMemberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
179 |
},
|
180 |
},
|
181 |
|
182 |
+
/**
|
183 |
+
* The edit function describes the structure of the block in the context of the editor.
|
184 |
+
* This represents what the editor will render when the block is used.
|
185 |
+
*
|
186 |
+
* The "edit" property must be a valid function.
|
187 |
+
*
|
188 |
+
* Use withSelect to inject state-derived props into a component.
|
189 |
+
*
|
190 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
191 |
+
*/
|
192 |
+
edit: withSelect(
|
193 |
+
( select ) => {
|
194 |
+
return {
|
195 |
+
// Uses select() to return an object of the store's selectors. Pre-bound to pass the current state automatically.
|
196 |
+
groups: select( 'groups/groups-blocks' ).receiveGroups(),
|
197 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
+
)
|
200 |
+
|
201 |
+
(
|
202 |
+
props => {
|
203 |
+
|
204 |
+
const {
|
205 |
+
attributes: { groups_select },
|
206 |
+
groups,
|
207 |
+
className,
|
208 |
+
setAttributes,
|
209 |
+
isSelected
|
210 |
+
} = props;
|
211 |
+
|
212 |
+
const handleGroupsChange = ( groups_select ) => setAttributes(
|
213 |
+
{ groups_select: JSON.stringify( groups_select ) }
|
214 |
);
|
215 |
+
|
216 |
+
let selectedGroups = [];
|
217 |
+
|
218 |
+
if ( null !== groups_select ) {
|
219 |
+
selectedGroups = JSON.parse( groups_select );
|
220 |
+
}
|
221 |
+
|
222 |
+
// Show if the data is not loaded yet.
|
223 |
+
if ( ! groups.length ) {
|
224 |
+
return (
|
225 |
+
<p className={className}>
|
226 |
+
<Spinner />
|
227 |
+
{ __( 'Loading...', 'groups' ) }
|
228 |
+
</p>
|
229 |
+
);
|
230 |
+
}
|
231 |
+
|
232 |
+
return [
|
233 |
+
<InspectorControls>
|
234 |
+
<PanelBody title={ __( 'Select Groups', 'groups' ) } className="block-inspector">
|
235 |
+
<PanelRow>
|
236 |
+
<label htmlFor="block-groups" className="groups-inspector__label">
|
237 |
+
{ __( 'Content will be shown to users that are not members of these groups:', 'groups' ) }
|
238 |
+
</label>
|
239 |
+
</PanelRow>
|
240 |
+
<PanelRow>
|
241 |
+
<Select
|
242 |
+
className = "groups-inspector__control"
|
243 |
+
name = 'block-groups'
|
244 |
+
value = { selectedGroups }
|
245 |
+
onChange = { handleGroupsChange }
|
246 |
+
options = { groups }
|
247 |
+
isClearable
|
248 |
+
isMulti = 'true'
|
249 |
+
/>
|
250 |
+
</PanelRow>
|
251 |
+
</PanelBody>
|
252 |
+
</InspectorControls>,
|
253 |
+
<div className={ isSelected ? ( classnames( className ) + '__selected' ) : props.className }>
|
254 |
+
<div className={ classnames( className ) + '__inner-block' }>
|
255 |
+
<InnerBlocks/>
|
256 |
+
</div>
|
257 |
+
</div>
|
258 |
+
];
|
259 |
}
|
260 |
+
),
|
261 |
|
262 |
+
/**
|
263 |
+
* The save function defines the way in which the different attributes should be combined
|
264 |
+
* into the final markup, which is then serialized by Gutenberg into post_content.
|
265 |
+
*
|
266 |
+
* The "save" property must be specified and must be a valid function.
|
267 |
+
*
|
268 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
269 |
+
*/
|
270 |
+
save: props => {
|
271 |
+
return (
|
272 |
+
<div>
|
273 |
+
<InnerBlocks.Content/>
|
274 |
+
</div>
|
275 |
+
);
|
276 |
+
},
|
277 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
);
|
lib/blocks/src/blocks/groups-non-member/editor.scss
CHANGED
@@ -18,48 +18,48 @@
|
|
18 |
* @since groups 2.8.0
|
19 |
*/
|
20 |
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
18 |
* @since groups 2.8.0
|
19 |
*/
|
20 |
|
21 |
+
.groups-inspector__control {
|
22 |
+
width: 100%;
|
23 |
|
24 |
+
> div > div {
|
25 |
+
margin-top: 0px;
|
26 |
+
}
|
27 |
+
}
|
28 |
|
29 |
+
.wp-block-groups-groups-non-member {
|
30 |
+
border: 1px dashed #33333333;
|
31 |
+
border-radius: 2px;
|
32 |
+
padding: 0;
|
33 |
+
box-sizing: border-box;
|
34 |
+
margin: -1px;
|
35 |
|
36 |
+
&:before {
|
37 |
+
font-size: 1.618em;
|
38 |
+
content:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='black'><path d='M 15.66,5.69 C 16.77,6.34 17.66,7.23 18.31,8.34 18.96,9.46 19.29,10.68 19.29,12.00 19.29,13.32 18.96,14.54 18.31,15.66 17.66,16.77 16.77,17.66 15.66,18.31 14.54,18.96 13.32,19.29 12.00,19.29 10.68,19.29 9.46,18.96 8.34,18.31 7.23,17.66 6.34,16.77 5.69,15.66 5.04,14.54 4.71,13.32 4.71,12.00 4.71,10.68 5.04,9.46 5.69,8.34 6.34,7.23 7.23,6.34 8.34,5.69 9.46,5.04 10.68,4.71 12.00,4.71 13.32,4.71 14.54,5.04 15.66,5.69 Z M 20.91,6.84 C 19.99,5.26 18.74,4.01 17.16,3.09 15.59,2.17 13.87,1.71 12.00,1.71 10.13,1.71 8.41,2.17 6.84,3.09 5.26,4.01 4.01,5.26 3.09,6.84 2.17,8.41 1.71,10.13 1.71,12.00 1.71,13.87 2.17,15.59 3.09,17.16 4.01,18.74 5.26,19.99 6.84,20.91 8.41,21.83 10.13,22.29 12.00,22.29 13.87,22.29 15.59,21.83 17.16,20.91 18.74,19.99 19.99,18.74 20.91,17.16 21.83,15.59 22.29,13.87 22.29,12.00 22.29,10.13 21.83,8.41 20.91,6.84 Z ' /></svg>");
|
39 |
+
display: block;
|
40 |
+
position: absolute;
|
41 |
+
top: 2px;
|
42 |
+
right: 4px;
|
43 |
+
opacity: 0.3;
|
44 |
+
}
|
45 |
+
}
|
46 |
|
47 |
+
body.rtl .wp-block-groups-groups-non-member::before {
|
48 |
+
left: 4px;
|
49 |
+
right: unset;
|
50 |
+
}
|
51 |
|
52 |
+
.wp-block-groups-groups-non-member__inner-block {
|
53 |
+
padding-left: 5px;
|
54 |
+
}
|
55 |
|
56 |
+
.wp-block-groups-groups-non-member__selected {
|
57 |
+
border: none;
|
58 |
+
padding: unset;
|
59 |
+
box-sizing: unset;
|
60 |
+
margin: unset;
|
61 |
|
62 |
+
&:before {
|
63 |
+
content: '';
|
64 |
+
}
|
65 |
+
}
|
lib/blocks/src/class-groups-blocks.php
CHANGED
@@ -19,23 +19,29 @@
|
|
19 |
* @since groups 2.8.0
|
20 |
*/
|
21 |
|
22 |
-
|
23 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
24 |
exit;
|
25 |
}
|
26 |
|
27 |
require_once GROUPS_ACCESS_LIB . '/class-groups-access-meta-boxes.php';
|
28 |
|
|
|
|
|
|
|
29 |
class Groups_Blocks {
|
30 |
|
31 |
-
|
|
|
|
|
32 |
public static function init() {
|
33 |
add_action( 'init', array( __CLASS__, 'groups_blocks_block_init' ) );
|
34 |
add_action( 'rest_api_init', array( __CLASS__, 'groups_rest' ) );
|
35 |
add_filter( 'block_categories', array( __CLASS__, 'groups_block_categories' ), 10, 2 );
|
36 |
}
|
37 |
|
38 |
-
|
|
|
|
|
39 |
public static function groups_rest() {
|
40 |
register_rest_route(
|
41 |
// namespace - TODO version portion, change when merging to Groups plugin.
|
@@ -56,10 +62,13 @@ class Groups_Blocks {
|
|
56 |
);
|
57 |
}
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
public static function get_groups() {
|
61 |
$groups_options = array();
|
62 |
-
|
63 |
if ( Groups_Access_Meta_Boxes::user_can_restrict() ) {
|
64 |
$include = Groups_Access_Meta_Boxes::get_user_can_restrict_group_ids();
|
65 |
$groups = Groups_Group::get_groups(
|
@@ -70,19 +79,25 @@ class Groups_Blocks {
|
|
70 |
)
|
71 |
);
|
72 |
foreach ( $groups as $key => $group ) {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
}
|
78 |
} else {
|
79 |
-
$groups_options =
|
80 |
}
|
81 |
-
|
82 |
return $groups_options;
|
83 |
}
|
84 |
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
public static function groups_block_categories( $categories, $post ) {
|
87 |
$categories = array_merge(
|
88 |
$categories,
|
@@ -96,6 +111,9 @@ class Groups_Blocks {
|
|
96 |
return $categories;
|
97 |
}
|
98 |
|
|
|
|
|
|
|
99 |
public static function groups_blocks_block_init() {
|
100 |
// Skip block registration if Gutenberg is not enabled/merged.
|
101 |
if ( ! function_exists( 'register_block_type' ) ) {
|
@@ -154,6 +172,14 @@ class Groups_Blocks {
|
|
154 |
);
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
public static function groups_member_render_content( $attributes, $content ) {
|
158 |
|
159 |
$output = '';
|
@@ -183,13 +209,22 @@ class Groups_Blocks {
|
|
183 |
}
|
184 |
}
|
185 |
}
|
|
|
186 |
if ( $show_content ) {
|
187 |
-
$output = '<div>' . $content . '</div>';
|
188 |
}
|
189 |
|
190 |
return $output;
|
191 |
}
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
public static function groups_non_member_render_content( $attributes, $content ) {
|
194 |
|
195 |
$output = '';
|
@@ -219,8 +254,9 @@ class Groups_Blocks {
|
|
219 |
}
|
220 |
}
|
221 |
}
|
|
|
222 |
if ( $show_content ) {
|
223 |
-
$output = '<div>' . $content . '</div>';
|
224 |
}
|
225 |
|
226 |
return $output;
|
19 |
* @since groups 2.8.0
|
20 |
*/
|
21 |
|
22 |
+
if ( !defined( 'ABSPATH' ) ) {
|
|
|
23 |
exit;
|
24 |
}
|
25 |
|
26 |
require_once GROUPS_ACCESS_LIB . '/class-groups-access-meta-boxes.php';
|
27 |
|
28 |
+
/**
|
29 |
+
* In charge of registering, controlling and rendering Groups' blocks.
|
30 |
+
*/
|
31 |
class Groups_Blocks {
|
32 |
|
33 |
+
/**
|
34 |
+
* Adds handlers to register blocks, REST and block categories.
|
35 |
+
*/
|
36 |
public static function init() {
|
37 |
add_action( 'init', array( __CLASS__, 'groups_blocks_block_init' ) );
|
38 |
add_action( 'rest_api_init', array( __CLASS__, 'groups_rest' ) );
|
39 |
add_filter( 'block_categories', array( __CLASS__, 'groups_block_categories' ), 10, 2 );
|
40 |
}
|
41 |
|
42 |
+
/**
|
43 |
+
* Create the REST API endpoints.
|
44 |
+
*/
|
45 |
public static function groups_rest() {
|
46 |
register_rest_route(
|
47 |
// namespace - TODO version portion, change when merging to Groups plugin.
|
62 |
);
|
63 |
}
|
64 |
|
65 |
+
/**
|
66 |
+
* Callback function to retrieve existing groups.
|
67 |
+
*
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
public static function get_groups() {
|
71 |
$groups_options = array();
|
|
|
72 |
if ( Groups_Access_Meta_Boxes::user_can_restrict() ) {
|
73 |
$include = Groups_Access_Meta_Boxes::get_user_can_restrict_group_ids();
|
74 |
$groups = Groups_Group::get_groups(
|
79 |
)
|
80 |
);
|
81 |
foreach ( $groups as $key => $group ) {
|
82 |
+
$groups_options[] = array(
|
83 |
+
'value' => $group->group_id,
|
84 |
+
'label' => $group->name,
|
85 |
+
);
|
86 |
}
|
87 |
} else {
|
88 |
+
$groups_options = esc_html__( 'You cannot set any access restrictions.', 'groups' );
|
89 |
}
|
|
|
90 |
return $groups_options;
|
91 |
}
|
92 |
|
93 |
+
/**
|
94 |
+
* Adds a new block category for 'groups' in the block editor.
|
95 |
+
*
|
96 |
+
* @param array $categories Array of block categories.
|
97 |
+
* @param WP_Post $post Post being loaded.
|
98 |
+
*
|
99 |
+
* @return array
|
100 |
+
*/
|
101 |
public static function groups_block_categories( $categories, $post ) {
|
102 |
$categories = array_merge(
|
103 |
$categories,
|
111 |
return $categories;
|
112 |
}
|
113 |
|
114 |
+
/**
|
115 |
+
* Registers our blocks.
|
116 |
+
*/
|
117 |
public static function groups_blocks_block_init() {
|
118 |
// Skip block registration if Gutenberg is not enabled/merged.
|
119 |
if ( ! function_exists( 'register_block_type' ) ) {
|
172 |
);
|
173 |
}
|
174 |
|
175 |
+
/**
|
176 |
+
* Rendering callback for our Groups Member Block.
|
177 |
+
*
|
178 |
+
* @param array $attributes
|
179 |
+
* @param string $content
|
180 |
+
*
|
181 |
+
* @return string
|
182 |
+
*/
|
183 |
public static function groups_member_render_content( $attributes, $content ) {
|
184 |
|
185 |
$output = '';
|
209 |
}
|
210 |
}
|
211 |
}
|
212 |
+
|
213 |
if ( $show_content ) {
|
214 |
+
$output = '<div class="groups-member-block-content">' . $content . '</div>';
|
215 |
}
|
216 |
|
217 |
return $output;
|
218 |
}
|
219 |
|
220 |
+
/**
|
221 |
+
* Rendering callback for our Groups Non-member Block.
|
222 |
+
*
|
223 |
+
* @param array $attributes
|
224 |
+
* @param string $content
|
225 |
+
*
|
226 |
+
* @return string
|
227 |
+
*/
|
228 |
public static function groups_non_member_render_content( $attributes, $content ) {
|
229 |
|
230 |
$output = '';
|
254 |
}
|
255 |
}
|
256 |
}
|
257 |
+
|
258 |
if ( $show_content ) {
|
259 |
+
$output = '<div class="groups-non-member-block-content">' . $content . '</div>';
|
260 |
}
|
261 |
|
262 |
return $output;
|
lib/blocks/src/common.scss
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Common SCSS
|
3 |
+
*
|
4 |
+
* Can include things like variables and mixins
|
5 |
+
* that are used across the project.
|
6 |
+
*/
|
lib/core/class-groups-help.php
CHANGED
@@ -82,7 +82,7 @@ class Groups_Help {
|
|
82 |
}
|
83 |
}
|
84 |
if ( $show_groups_help ) {
|
85 |
-
$help = '<h3><a href="
|
86 |
$help .= '<p>';
|
87 |
$help .= __( 'The complete documentation is available on the <a href="http://docs.itthinx.com/document/groups">Documentation</a> pages for Groups.', 'groups' );
|
88 |
$help .= '</p>';
|
@@ -138,11 +138,11 @@ class Groups_Help {
|
|
138 |
public static function footer( $render = true ) {
|
139 |
$footer =
|
140 |
'<span class="groups-footer">' .
|
141 |
-
__( 'Thank you for using <a href="
|
142 |
' ' .
|
143 |
sprintf(
|
144 |
__( 'Please give it a <a href="%s">★★★★★</a> rating.', 'groups' ),
|
145 |
-
esc_attr( '
|
146 |
) .
|
147 |
'</span>';
|
148 |
$footer = apply_filters( 'groups_footer', $footer );
|
82 |
}
|
83 |
}
|
84 |
if ( $show_groups_help ) {
|
85 |
+
$help = '<h3><a href="https://www.itthinx.com/plugins/groups" target="_blank">'. $help_title .'</a></h3>';
|
86 |
$help .= '<p>';
|
87 |
$help .= __( 'The complete documentation is available on the <a href="http://docs.itthinx.com/document/groups">Documentation</a> pages for Groups.', 'groups' );
|
88 |
$help .= '</p>';
|
138 |
public static function footer( $render = true ) {
|
139 |
$footer =
|
140 |
'<span class="groups-footer">' .
|
141 |
+
__( 'Thank you for using <a href="https://www.itthinx.com/plugins/groups" target="_blank">Groups</a> by <a href="https://www.itthinx.com" target="_blank">itthinx</a>.', 'groups' ) .
|
142 |
' ' .
|
143 |
sprintf(
|
144 |
__( 'Please give it a <a href="%s">★★★★★</a> rating.', 'groups' ),
|
145 |
+
esc_attr( 'https://wordpress.org/support/view/plugin-reviews/groups?filter=5#postform' )
|
146 |
) .
|
147 |
'</span>';
|
148 |
$footer = apply_filters( 'groups_footer', $footer );
|
lib/core/wp-init.php
CHANGED
@@ -145,7 +145,29 @@ require_once GROUPS_EXTRA_LIB . '/class-groups-extra.php';
|
|
145 |
*/
|
146 |
function _groups_get_tablename( $name ) {
|
147 |
global $wpdb;
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
|
151 |
/**
|
145 |
*/
|
146 |
function _groups_get_tablename( $name ) {
|
147 |
global $wpdb;
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Filters the prefix of the database table to query.
|
151 |
+
*
|
152 |
+
* @since 2.11.0
|
153 |
+
*
|
154 |
+
* @param str $wpdb->prefix The current WordPress table prefix. Allowed characters are a-z, A-Z, 0-9, the dash - and the underscore _.
|
155 |
+
*
|
156 |
+
* @return str The possibly-modified table prefix.
|
157 |
+
*/
|
158 |
+
$prefix = apply_filters( 'groups_get_table_prefix', $wpdb->prefix );
|
159 |
+
|
160 |
+
if ( is_string( $prefix ) ) {
|
161 |
+
$prefix = preg_replace( '/[^a-zA-Z0-9-_]+/', '', $prefix );
|
162 |
+
}
|
163 |
+
|
164 |
+
// use the default if the filter returned nonsense or null due to error
|
165 |
+
if ( !is_string( $prefix ) ) {
|
166 |
+
$prefix = $wpdb->prefix;
|
167 |
+
}
|
168 |
+
|
169 |
+
// Return the constructed table name.
|
170 |
+
return $prefix . GROUPS_TP . $name;
|
171 |
}
|
172 |
|
173 |
/**
|
lib/wp/class-groups-wordpress.php
CHANGED
@@ -28,9 +28,38 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
28 |
*/
|
29 |
class Groups_WordPress {
|
30 |
|
|
|
|
|
|
|
|
|
|
|
31 |
const CACHE_GROUP = 'groups';
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
const HAS_CAP = 'has_cap';
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* Hook into actions to extend user capabilities.
|
36 |
*
|
@@ -41,8 +70,8 @@ class Groups_WordPress {
|
|
41 |
*/
|
42 |
public static function init() {
|
43 |
// args: string $result, Groups_User $groups_user, string $capability
|
44 |
-
add_filter( 'groups_user_can', array( __CLASS__, 'groups_user_can' ),
|
45 |
-
add_filter( 'user_has_cap', array( __CLASS__, 'user_has_cap' ),
|
46 |
}
|
47 |
|
48 |
/**
|
@@ -77,8 +106,12 @@ class Groups_WordPress {
|
|
77 |
*/
|
78 |
public static function user_has_cap( $allcaps, $caps, $args, $user ) {
|
79 |
if ( is_array( $caps ) ) {
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
82 |
$hash = md5( json_encode( $caps ) . json_encode( $args ) );
|
83 |
$cached = Groups_Cache::get( self::HAS_CAP . '_' . $user_id . '_' . $hash, self::CACHE_GROUP );
|
84 |
|
@@ -90,16 +123,17 @@ class Groups_WordPress {
|
|
90 |
// we need to deactivate this because invoking $groups_user->can()
|
91 |
// would trigger this same function and we would end up
|
92 |
// in an infinite loop
|
93 |
-
remove_filter( 'user_has_cap', array( __CLASS__, 'user_has_cap' ),
|
94 |
foreach( $caps as $cap ) {
|
95 |
if ( $groups_user->can( $cap ) ) {
|
96 |
$allcaps[$cap] = true;
|
97 |
}
|
98 |
}
|
99 |
-
add_filter( 'user_has_cap', array( __CLASS__, 'user_has_cap' ),
|
100 |
Groups_Cache::set( self::HAS_CAP . '_' . $user_id . '_' . $hash, $allcaps, self::CACHE_GROUP );
|
101 |
}
|
102 |
}
|
|
|
103 |
return $allcaps;
|
104 |
}
|
105 |
|
28 |
*/
|
29 |
class Groups_WordPress {
|
30 |
|
31 |
+
/**
|
32 |
+
* Cache group
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
const CACHE_GROUP = 'groups';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Cache key prefix
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
const HAS_CAP = 'has_cap';
|
44 |
|
45 |
+
/**
|
46 |
+
* Filter priority: groups_user_can
|
47 |
+
*
|
48 |
+
* @var integer
|
49 |
+
*
|
50 |
+
* @since 2.11.0
|
51 |
+
*/
|
52 |
+
const GROUPS_USER_CAN_FILTER_PRIORITY = 10;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Filter priority: user_has_cap
|
56 |
+
*
|
57 |
+
* @var int
|
58 |
+
*
|
59 |
+
* @since 2.11.0
|
60 |
+
*/
|
61 |
+
const USER_HAS_CAP_FILTER_PRIORITY = PHP_INT_MAX;
|
62 |
+
|
63 |
/**
|
64 |
* Hook into actions to extend user capabilities.
|
65 |
*
|
70 |
*/
|
71 |
public static function init() {
|
72 |
// args: string $result, Groups_User $groups_user, string $capability
|
73 |
+
add_filter( 'groups_user_can', array( __CLASS__, 'groups_user_can' ), self::GROUPS_USER_CAN_FILTER_PRIORITY, 3 );
|
74 |
+
add_filter( 'user_has_cap', array( __CLASS__, 'user_has_cap' ), self::USER_HAS_CAP_FILTER_PRIORITY, 4 );
|
75 |
}
|
76 |
|
77 |
/**
|
106 |
*/
|
107 |
public static function user_has_cap( $allcaps, $caps, $args, $user ) {
|
108 |
if ( is_array( $caps ) ) {
|
109 |
+
$user_id = 0;
|
110 |
+
if ( isset( $user->ID ) ) {
|
111 |
+
$user_id = intval( $user->ID );
|
112 |
+
} else if ( isset( $args[1] ) ) {
|
113 |
+
$user_id = intval( $args[1] );
|
114 |
+
}
|
115 |
$hash = md5( json_encode( $caps ) . json_encode( $args ) );
|
116 |
$cached = Groups_Cache::get( self::HAS_CAP . '_' . $user_id . '_' . $hash, self::CACHE_GROUP );
|
117 |
|
123 |
// we need to deactivate this because invoking $groups_user->can()
|
124 |
// would trigger this same function and we would end up
|
125 |
// in an infinite loop
|
126 |
+
remove_filter( 'user_has_cap', array( __CLASS__, 'user_has_cap' ), self::USER_HAS_CAP_FILTER_PRIORITY );
|
127 |
foreach( $caps as $cap ) {
|
128 |
if ( $groups_user->can( $cap ) ) {
|
129 |
$allcaps[$cap] = true;
|
130 |
}
|
131 |
}
|
132 |
+
add_filter( 'user_has_cap', array( __CLASS__, 'user_has_cap' ), self::USER_HAS_CAP_FILTER_PRIORITY, 4 );
|
133 |
Groups_Cache::set( self::HAS_CAP . '_' . $user_id . '_' . $hash, $allcaps, self::CACHE_GROUP );
|
134 |
}
|
135 |
}
|
136 |
+
$allcaps = apply_filters( 'groups_user_has_cap', $allcaps, $caps, $args, $user );
|
137 |
return $allcaps;
|
138 |
}
|
139 |
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Groups ===
|
2 |
Contributors: itthinx, proaktion
|
3 |
-
Donate link:
|
4 |
Tags: groups, access, access control, membership, memberships, member, members, capability, capabilities, content, download, downloads, file, file access, files, paypal, permission, permissions, subscription, subscriptions, woocommerce
|
5 |
-
Requires at least:
|
6 |
-
Tested up to: 5.
|
7 |
Requires PHP: 5.6.0
|
8 |
-
Stable tag: 2.
|
9 |
License: GPLv3
|
10 |
|
11 |
Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
|
@@ -18,7 +18,7 @@ It provides group-based user membership management, group-based capabilities and
|
|
18 |
|
19 |
Groups is light-weight and offers an easy user interface, while it acts as a framework and integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.
|
20 |
|
21 |
-
Enhanced functionality is available via [Official Extensions](
|
22 |
|
23 |
### Documentation ###
|
24 |
|
@@ -89,7 +89,7 @@ Fully supports custom post types, so that access to post types such as products
|
|
89 |
|
90 |
Feedback is welcome!
|
91 |
|
92 |
-
If you need help, have problems, want to leave feedback or want to provide constructive criticism, please do so here at the [Groups Plugin](
|
93 |
|
94 |
Please try to solve problems there before you rate this plugin or say it doesn't work. There goes a _lot_ of work into providing you with free quality plugins! Please appreciate that and help with your feedback. Many thanks!
|
95 |
|
@@ -102,7 +102,7 @@ Please try to solve problems there before you rate this plugin or say it doesn't
|
|
102 |
Brazilian Portuguese translation by [Walter Jaworski](http://wjaworski.com),
|
103 |
Dutch translation by [Carsten Alsemgeest](http://presis.nl),
|
104 |
French translation by [Stéphane Passedouet](http://www.pheeric.com),
|
105 |
-
German translation by [itthinx](
|
106 |
Lithuanian translation by [Vincent G](http://www.Host1Free.com),
|
107 |
Spanish translation by [Juan Amor](http://www.lamadjinpa.es),
|
108 |
Swedish translation by [Andréas Lundgren](http://adevade.com).
|
@@ -122,7 +122,7 @@ The official documentation is located at the [Groups Documentation](http://docs.
|
|
122 |
|
123 |
= I have a question, where do I ask? =
|
124 |
|
125 |
-
For questions directly related to Groups, you can leave a comment at the [Groups Plugin](
|
126 |
|
127 |
= How do I restrict access to a post? =
|
128 |
|
@@ -170,11 +170,11 @@ The Groups plugin provides an extensive framework to handle memberships, group-b
|
|
170 |
|
171 |
The API documentation is available here: [Groups API](http://api.itthinx.com/groups).
|
172 |
|
173 |
-
Also refer to the official [Groups Plugin](
|
174 |
|
175 |
== Screenshots ==
|
176 |
|
177 |
-
See also the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages and the [Groups Plugin](
|
178 |
|
179 |
1. Groups - this is where you add and remove groups and assign capabilities to groups.
|
180 |
2. Capabilities - here you get an overview of the capabilities that are defined and you can add and remove capabilities as well.
|
1 |
=== Groups ===
|
2 |
Contributors: itthinx, proaktion
|
3 |
+
Donate link: https://www.itthinx.com/shop/
|
4 |
Tags: groups, access, access control, membership, memberships, member, members, capability, capabilities, content, download, downloads, file, file access, files, paypal, permission, permissions, subscription, subscriptions, woocommerce
|
5 |
+
Requires at least: 5.2
|
6 |
+
Tested up to: 5.5
|
7 |
Requires PHP: 5.6.0
|
8 |
+
Stable tag: 2.11.0
|
9 |
License: GPLv3
|
10 |
|
11 |
Groups is an efficient and powerful solution, providing group-based user membership management, group-based capabilities and content access control.
|
18 |
|
19 |
Groups is light-weight and offers an easy user interface, while it acts as a framework and integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.
|
20 |
|
21 |
+
Enhanced functionality is available via [Official Extensions](https://www.itthinx.com/product-category/groups/) for Groups.
|
22 |
|
23 |
### Documentation ###
|
24 |
|
89 |
|
90 |
Feedback is welcome!
|
91 |
|
92 |
+
If you need help, have problems, want to leave feedback or want to provide constructive criticism, please do so here at the [Groups Plugin](https://www.itthinx.com/plugins/groups/) page.
|
93 |
|
94 |
Please try to solve problems there before you rate this plugin or say it doesn't work. There goes a _lot_ of work into providing you with free quality plugins! Please appreciate that and help with your feedback. Many thanks!
|
95 |
|
102 |
Brazilian Portuguese translation by [Walter Jaworski](http://wjaworski.com),
|
103 |
Dutch translation by [Carsten Alsemgeest](http://presis.nl),
|
104 |
French translation by [Stéphane Passedouet](http://www.pheeric.com),
|
105 |
+
German translation by [itthinx](https://www.itthinx.com),
|
106 |
Lithuanian translation by [Vincent G](http://www.Host1Free.com),
|
107 |
Spanish translation by [Juan Amor](http://www.lamadjinpa.es),
|
108 |
Swedish translation by [Andréas Lundgren](http://adevade.com).
|
122 |
|
123 |
= I have a question, where do I ask? =
|
124 |
|
125 |
+
For questions directly related to Groups, you can leave a comment at the [Groups Plugin](https://www.itthinx.com/plugins/groups/) page.
|
126 |
|
127 |
= How do I restrict access to a post? =
|
128 |
|
170 |
|
171 |
The API documentation is available here: [Groups API](http://api.itthinx.com/groups).
|
172 |
|
173 |
+
Also refer to the official [Groups Plugin](https://www.itthinx.com/plugins/groups/) page to post your questions and the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages.
|
174 |
|
175 |
== Screenshots ==
|
176 |
|
177 |
+
See also the [Groups Documentation](http://docs.itthinx.com/document/groups/) pages and the [Groups Plugin](https://www.itthinx.com/plugin/groups/) page.
|
178 |
|
179 |
1. Groups - this is where you add and remove groups and assign capabilities to groups.
|
180 |
2. Capabilities - here you get an overview of the capabilities that are defined and you can add and remove capabilities as well.
|