Version Description
Download this release
Release Info
Developer | bordoni |
Plugin | Event Tickets |
Version | 5.5.4 |
Comparing to | |
See all releases |
Code changes from version 5.5.3 to 5.5.4
- common/lang/tribe-common-af.mo +0 -0
- common/lang/tribe-common-da_DK.mo +0 -0
- common/lang/tribe-common-en_GB.mo +0 -0
- common/lang/tribe-common-et.mo +0 -0
- common/lang/tribe-common-fi.mo +0 -0
- common/lang/tribe-common-id_ID.mo +0 -0
- common/lang/tribe-common-is_IS.mo +0 -0
- common/lang/tribe-common-lt_LT.mo +0 -0
- common/lang/tribe-common-sl_SI.mo +0 -0
- common/lang/tribe-common-sr_RS.mo +0 -0
- common/lang/tribe-common-zh_CN.mo +0 -0
- common/lang/tribe-common-zh_TW.mo +0 -0
- common/src/Tribe/Admin/Wysiwyg.php +142 -0
- common/src/Tribe/Field.php +40 -8
- common/src/resources/css/tribe-common-admin.min.css +1 -1
- common/vendor/autoload.php +1 -1
- common/vendor/autoload_52.php +1 -1
- common/vendor/composer/autoload_classmap.php +1 -0
- common/vendor/composer/autoload_real.php +4 -4
- common/vendor/composer/autoload_real_52.php +3 -3
- common/vendor/composer/autoload_static.php +6 -5
- event-tickets.php +1 -1
- lang/event-tickets-nl_NL_formal.mo +0 -0
- readme.txt +8 -2
- src/Tickets/Emails/Assets.php +33 -0
- src/Tickets/Emails/Emails_Tab.php +148 -0
- src/Tickets/Emails/Hooks.php +124 -0
- src/Tickets/Emails/Provider.php +70 -0
- src/Tickets/Emails/Settings.php +347 -0
- src/Tickets/Provider.php +4 -0
- src/Tribe/Main.php +1 -1
- src/admin-views/settings/emails/message-templates.php +22 -0
- src/admin-views/settings/emails/message-templates/list-action.php +22 -0
- src/admin-views/settings/emails/message-templates/list-icon.php +25 -0
- src/admin-views/settings/emails/message-templates/list-item.php +30 -0
- src/admin-views/settings/emails/message-templates/list-recipient.php +22 -0
- src/admin-views/settings/emails/message-templates/list-title.php +22 -0
- src/functions/emails/provider.php +31 -0
- src/modules/blocks/rsvp/template.js +12 -9
- src/modules/blocks/tickets/template.js +26 -19
- src/resources/css/tickets-admin-settings.css +75 -0
- src/resources/css/tickets-admin-settings.min.css +1 -1
- src/resources/css/tickets-admin.css +1 -1
- src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.css +6 -4
- src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.min.css +1 -1
- src/resources/js/admin/gateway/stripe/webhooks.js +15 -24
- src/resources/js/admin/tickets-commerce-settings.js +22 -32
- src/resources/js/admin/tickets-manager.js +16 -43
- src/resources/js/admin/welcome-message.js +8 -10
- src/resources/js/app/blocks.js +15 -14
- src/resources/js/app/blocks.min.js +1 -1
- src/resources/js/tickets.js +9 -0
- src/resources/js/tickets.min.js +1 -1
- src/resources/js/v2/rsvp-ari.js +18 -65
- src/resources/js/v2/rsvp-block.js +14 -41
- src/resources/js/v2/rsvp-manager.js +13 -43
- src/resources/js/v2/rsvp-tooltip.js +28 -66
- src/resources/js/v2/tickets-block.js +54 -79
- src/resources/js/v2/tickets-commerce.js +9 -27
- src/resources/js/v2/tickets-loader.js +5 -16
- src/resources/js/v2/tickets-page.js +4 -12
- src/resources/js/v2/tickets-utils.js +14 -35
- src/resources/postcss/tickets-admin.pcss +2 -2
- src/resources/postcss/tickets-admin/settings/_all.pcss +1 -0
- src/resources/postcss/tickets-admin/settings/_emails.pcss +74 -0
- src/resources/postcss/tickets-commerce/admin/gateway/stripe/webhooks.pcss +9 -5
- src/resources/postcss/tickets-tables.pcss +5 -5
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +5 -0
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +9 -4
common/lang/tribe-common-af.mo
CHANGED
Binary file
|
common/lang/tribe-common-da_DK.mo
CHANGED
Binary file
|
common/lang/tribe-common-en_GB.mo
CHANGED
Binary file
|
common/lang/tribe-common-et.mo
CHANGED
Binary file
|
common/lang/tribe-common-fi.mo
CHANGED
Binary file
|
common/lang/tribe-common-id_ID.mo
CHANGED
Binary file
|
common/lang/tribe-common-is_IS.mo
CHANGED
Binary file
|
common/lang/tribe-common-lt_LT.mo
CHANGED
Binary file
|
common/lang/tribe-common-sl_SI.mo
CHANGED
Binary file
|
common/lang/tribe-common-sr_RS.mo
CHANGED
Binary file
|
common/lang/tribe-common-zh_CN.mo
CHANGED
Binary file
|
common/lang/tribe-common-zh_TW.mo
CHANGED
Binary file
|
common/src/Tribe/Admin/Wysiwyg.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Tribe\Admin;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Admin Wysiwyg class.
|
7 |
+
*
|
8 |
+
* @since TBD
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Wysiwyg {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Unique name given to editor in case more than one is being used on the same page.
|
15 |
+
*
|
16 |
+
* @since TBD
|
17 |
+
*
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
protected $name = '';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Initial HTML of the editor.
|
24 |
+
*
|
25 |
+
* @since TBD
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
protected $value = '';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Settings to pass into the editor.
|
33 |
+
*
|
34 |
+
* @since TBD
|
35 |
+
*
|
36 |
+
* @var array
|
37 |
+
*/
|
38 |
+
protected $args = [];
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Create a new Wywiwyg object.
|
42 |
+
*
|
43 |
+
* @since TBD
|
44 |
+
*
|
45 |
+
* @param string $name Unique name given to editor.
|
46 |
+
* @param string $value Initial value/HTML.
|
47 |
+
* @param array $args Array of settings.
|
48 |
+
*
|
49 |
+
* @return void
|
50 |
+
*/
|
51 |
+
function __construct( $name, $value = '', $args = [] ) {
|
52 |
+
$this->name = $name;
|
53 |
+
$this->value = $value;
|
54 |
+
$default_args = [
|
55 |
+
'teeny' => true,
|
56 |
+
'wpautop' => true,
|
57 |
+
];
|
58 |
+
$this->args = wp_parse_args( $args, $default_args );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Filters editor buttons.
|
63 |
+
*
|
64 |
+
* @since TBD
|
65 |
+
*
|
66 |
+
* @param array $buttons Array of buttons to include.
|
67 |
+
*
|
68 |
+
* @return array Filtered array of buttons.
|
69 |
+
*/
|
70 |
+
public function filter_buttons( $buttons ) {
|
71 |
+
if (
|
72 |
+
empty( $this->args )
|
73 |
+
|| ! isset( $this->args['buttons'] )
|
74 |
+
|| empty( $this->args['buttons'] )
|
75 |
+
) {
|
76 |
+
return $buttons;
|
77 |
+
}
|
78 |
+
|
79 |
+
return $this->args['buttons'];
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Filter 2nd row of buttons.
|
84 |
+
*
|
85 |
+
* @since TBD
|
86 |
+
*
|
87 |
+
* @param array $buttons Array of buttons to include.
|
88 |
+
*
|
89 |
+
* @return array Filtered array of buttons.
|
90 |
+
*/
|
91 |
+
public function maybe_filter_buttons_2( $buttons ) {
|
92 |
+
if (
|
93 |
+
empty( $this->args ) ||
|
94 |
+
! isset( $this->args['buttons_2'] ) ||
|
95 |
+
empty( $this->args['buttons_2'] )
|
96 |
+
) {
|
97 |
+
return $buttons;
|
98 |
+
}
|
99 |
+
|
100 |
+
return $this->args['buttons_2'];
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get HTML of editor.
|
105 |
+
*
|
106 |
+
* @since TBD
|
107 |
+
*
|
108 |
+
* @return string HTML of editor
|
109 |
+
*/
|
110 |
+
public function get_html() {
|
111 |
+
// Add button filters.
|
112 |
+
add_filter( 'teeny_mce_buttons', [ $this, 'filter_buttons' ] );
|
113 |
+
add_filter( 'tiny_mce_buttons', [ $this, 'filter_buttons' ] );
|
114 |
+
add_filter( 'mce_buttons', [ $this, 'filter_buttons' ] );
|
115 |
+
add_filter( 'mce_buttons_2', [ $this, 'maybe_filter_buttons_2' ] );
|
116 |
+
|
117 |
+
// Get HTML of editor.
|
118 |
+
ob_start();
|
119 |
+
wp_editor( html_entity_decode( ( $this->value ) ), $this->name, $this->args );
|
120 |
+
$html = ob_get_clean();
|
121 |
+
|
122 |
+
// Remove button filters.
|
123 |
+
remove_filter( 'teeny_mce_buttons', [ $this, 'filter_buttons' ] );
|
124 |
+
remove_filter( 'tiny_mce_buttons', [ $this, 'filter_buttons' ] );
|
125 |
+
remove_filter( 'mce_buttons', [ $this, 'filter_buttons' ] );
|
126 |
+
remove_filter( 'mce_buttons_2', [ $this, 'maybe_filter_buttons_2' ] );
|
127 |
+
|
128 |
+
return $html;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Renders editor HTML.
|
133 |
+
*
|
134 |
+
* @since TBD
|
135 |
+
*
|
136 |
+
* @return void
|
137 |
+
*/
|
138 |
+
public function render_html() {
|
139 |
+
echo $this->get_html();
|
140 |
+
}
|
141 |
+
|
142 |
+
}
|
common/src/Tribe/Field.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
// Don't load directly
|
4 |
|
5 |
use Tribe\Admin\Settings;
|
|
|
6 |
|
7 |
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
die( '-1' );
|
@@ -58,6 +59,15 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
58 |
*/
|
59 |
public $valid_field_types;
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
/**
|
63 |
* Class constructor
|
@@ -93,6 +103,7 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
93 |
'clear_after' => true,
|
94 |
'tooltip_first' => false,
|
95 |
'allow_clear' => false,
|
|
|
96 |
];
|
97 |
|
98 |
// a list of valid field types, to prevent screwy behavior
|
@@ -115,6 +126,7 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
115 |
'email',
|
116 |
'color',
|
117 |
'image',
|
|
|
118 |
];
|
119 |
|
120 |
$this->valid_field_types = apply_filters( 'tribe_valid_field_types', $this->valid_field_types );
|
@@ -196,6 +208,7 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
196 |
$clear_after = (bool) $args['clear_after'];
|
197 |
$tooltip_first = (bool) $args['tooltip_first'];
|
198 |
$allow_clear = (bool) $args['allow_clear'];
|
|
|
199 |
|
200 |
// set the ID
|
201 |
$this->id = apply_filters( 'tribe_field_id', $id );
|
@@ -503,17 +516,11 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
503 |
* @return string the field
|
504 |
*/
|
505 |
public function wysiwyg() {
|
506 |
-
$
|
507 |
-
'teeny' => true,
|
508 |
-
'wpautop' => true,
|
509 |
-
];
|
510 |
-
ob_start();
|
511 |
-
wp_editor( html_entity_decode( ( $this->value ) ), $this->name, $settings );
|
512 |
-
$editor = ob_get_clean();
|
513 |
$field = $this->do_field_start();
|
514 |
$field .= $this->do_field_label();
|
515 |
$field .= $this->do_field_div_start();
|
516 |
-
$field .= $
|
517 |
$field .= $this->do_screen_reader_label();
|
518 |
$field .= $this->do_field_div_end();
|
519 |
$field .= $this->do_field_end();
|
@@ -781,6 +788,31 @@ if ( ! class_exists( 'Tribe__Field' ) ) {
|
|
781 |
return $field;
|
782 |
}
|
783 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
/* deprecated camelCase methods */
|
785 |
public function doField() {
|
786 |
_deprecated_function( __METHOD__, '4.3', __CLASS__ . '::do_field' );
|
3 |
// Don't load directly
|
4 |
|
5 |
use Tribe\Admin\Settings;
|
6 |
+
use Tribe\Admin\Wysiwyg;
|
7 |
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
die( '-1' );
|
59 |
*/
|
60 |
public $valid_field_types;
|
61 |
|
62 |
+
/**
|
63 |
+
* Settings array.
|
64 |
+
*
|
65 |
+
* @since TBD
|
66 |
+
*
|
67 |
+
* @var array
|
68 |
+
*/
|
69 |
+
public $settings;
|
70 |
+
|
71 |
|
72 |
/**
|
73 |
* Class constructor
|
103 |
'clear_after' => true,
|
104 |
'tooltip_first' => false,
|
105 |
'allow_clear' => false,
|
106 |
+
'settings' => [],
|
107 |
];
|
108 |
|
109 |
// a list of valid field types, to prevent screwy behavior
|
126 |
'email',
|
127 |
'color',
|
128 |
'image',
|
129 |
+
'toggle',
|
130 |
];
|
131 |
|
132 |
$this->valid_field_types = apply_filters( 'tribe_valid_field_types', $this->valid_field_types );
|
208 |
$clear_after = (bool) $args['clear_after'];
|
209 |
$tooltip_first = (bool) $args['tooltip_first'];
|
210 |
$allow_clear = (bool) $args['allow_clear'];
|
211 |
+
$settings = $args['settings'];
|
212 |
|
213 |
// set the ID
|
214 |
$this->id = apply_filters( 'tribe_field_id', $id );
|
516 |
* @return string the field
|
517 |
*/
|
518 |
public function wysiwyg() {
|
519 |
+
$mce = new Wysiwyg( $this->name, $this->value, $this->settings );
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
$field = $this->do_field_start();
|
521 |
$field .= $this->do_field_label();
|
522 |
$field .= $this->do_field_div_start();
|
523 |
+
$field .= $mce->get_html();
|
524 |
$field .= $this->do_screen_reader_label();
|
525 |
$field .= $this->do_field_div_end();
|
526 |
$field .= $this->do_field_end();
|
788 |
return $field;
|
789 |
}
|
790 |
|
791 |
+
/**
|
792 |
+
* Generate a toggle switch.
|
793 |
+
*
|
794 |
+
* @since TBD
|
795 |
+
*
|
796 |
+
* @return string the field
|
797 |
+
*/
|
798 |
+
public function toggle() {
|
799 |
+
$field = $this->do_field_start();
|
800 |
+
$field .= $this->do_field_label();
|
801 |
+
$field .= $this->do_field_div_start();
|
802 |
+
$field .= '<input type="checkbox"';
|
803 |
+
$field .= ' class="tec-admin__settings-toggle-field-input"';
|
804 |
+
$field .= $this->do_field_name();
|
805 |
+
$field .= ' value="1" ' . checked( $this->value, true, false );
|
806 |
+
$field .= $this->do_field_attributes();
|
807 |
+
$field .= '/>';
|
808 |
+
$field .= '<span class="tec-admin__settings-toggle-field-span"></span>';
|
809 |
+
$field .= $this->do_screen_reader_label();
|
810 |
+
$field .= $this->do_field_div_end();
|
811 |
+
$field .= $this->do_field_end();
|
812 |
+
|
813 |
+
return $field;
|
814 |
+
}
|
815 |
+
|
816 |
/* deprecated camelCase methods */
|
817 |
public function doField() {
|
818 |
_deprecated_function( __METHOD__, '4.3', __CLASS__ . '::do_field' );
|
common/src/resources/css/tribe-common-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.invalid input,input:out-of-range{border:2px solid red!important}.valid input{border:1px solid green}.clearfix{zoom:1}.placeholder{color:#999;cursor:text;padding:4px}input::placeholder,textarea::placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.bubble{background-color:#f9f9f9;border:1px solid #dfdfdf;border-radius:3px;border-spacing:0;padding:10px}.tribe-sticky-tooltip{color:#bbb}td.tribe_message{padding-bottom:10px!important}#tribe_thanks{float:left;margin:5px 0 0;width:200px}.tribe_brand{font-family:Georgia,serif!important;font-size:17px!important;font-weight:400;margin:8px 0}.tribe-rating{color:#3d54ff}.tribe-rating:hover{color:#1c39bb}#tribe-upgrade{background:#f6f6f6;border:1px solid #ccc;border-radius:5px;margin:20px 0 30px;padding:0 20px 20px}#tribe-upgrade .message{background-color:#ffffe0;border:1px solid #e6db55;border-radius:3px;padding:6px 12px}table.plugins .tribe-plugin-update-message{background:#d54e21;color:#fff;display:inline-table;margin:6px 0;padding:10px 12px}table.plugins .tribe-plugin-update-message h4{display:inline;font-weight:700;margin-right:8px}table.plugins .tribe-plugin-update-message h4:after{content:" \00BB "}table.plugins .tribe-plugin-update-message a{color:#fff;text-decoration:underline}.tribe-settings-form{max-width:1000px}.tribe-settings-form fieldset{clear:both;display:inline-block;padding:10px 0}.tribe-settings-form fieldset.tribe-field-license_key legend{width:auto}.tribe-settings-form legend{float:left;font-weight:700;margin-right:20px;width:220px}.tribe-settings-form .tribe-field-wrap{float:left;max-width:500px}.tribe-settings-form .tribe-field-wrap :first-child{margin-top:0}.tribe-settings-form .tribe-field-checkbox_list label,.tribe-settings-form .tribe-field-radio label{display:block;margin:5px 0 5px 20px;text-indent:-20px}.tribe-settings-form .tribe-field-checkbox_list label>p,.tribe-settings-form .tribe-field-radio label>p{margin-left:1px;text-indent:0}.tribe-settings-form .tribe-field-checkbox_list label input,.tribe-settings-form .tribe-field-radio label input{margin-right:5px}.tribe-settings-form .tribe-settings-form-wrap .description,.tribe-settings-form .tribe-settings-form-wrap fieldset,.tribe-settings-form fieldset[id^=tribe-field-geoloc_]{padding-left:12px}.tribe-settings-form .tribe-settings-form-wrap fieldset .description{margin-left:0;max-width:450px;padding-left:0}.tribe-settings-form .tribe-settings-form-wrap fieldset .tribe-style-selection{margin-bottom:18px}.tribe-settings-form .tribe-settings-form-wrap #tribe-field-stylesheetOption .description{color:#999;margin-left:1px}.tribe-settings-form .tribe-settings-form-wrap h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}.tribe-settings-form .tribe-settings-form-wrap .contained,.tribe-settings-form .tribe-settings-form-wrap .system-info,.tribe-settings-form .tribe-settings-form-wrap .tribe-sysinfo-optin-msg,.tribe-settings-form .tribe-settings-form-wrap h3+p{margin:0 0 10px;padding-left:12px}.tribe_settings .tribe-field-indent{margin-left:245px}.tribe_settings #pu_dashboard_message{display:none}.tribe_settings .tribe-errors-list{margin-left:15px}.tribe_settings .expiring-license{color:red}.tribe_settings .tribe-error{border:1px solid red}.tribe_settings .tribe-field-description{margin-bottom:0;position:relative;top:-12px}.tribe_settings #ical-link{top:-14px}#modern-tribe-info{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:8px 20px 12px}#modern-tribe-info img{margin:10px 0}#modern-tribe-info ul{list-style:disc;margin-left:20px}#modern-tribe-info ul ul{list-style:circle}.tribe-field-inline-dropdown{margin-left:0;margin-right:0}.tribe-field-inline-text{line-height:28px;margin:0 2px}.tribe-field-textarea.tribe-size-small textarea{height:60px;width:180px}.tribe-field-textarea.tribe-size-medium textarea{height:80px;width:300px}.tribe-field-textarea.tribe-size-large textarea{height:120px;width:450px}.tribe-field-email.tribe-size-small input,.tribe-field-license_key.tribe-size-small input,.tribe-field-text.tribe-size-small input{width:50px}.tribe-field-email.tribe-size-medium input,.tribe-field-license_key.tribe-size-medium input,.tribe-field-text.tribe-size-medium input{width:225px}.tribe-field-email.tribe-size-large input,.tribe-field-license_key.tribe-size-large input,.tribe-field-text.tribe-size-large input{width:450px}.tribe-field-dropdown.tribe-size-small select{width:100px}.tribe-field-dropdown.tribe-size-medium select{width:300px}.tribe-field-dropdown.tribe-size-large select{width:450px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap{max-width:600px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap .description{max-width:100%}.tribe-field-dropdown_chosen.tribe-size-small select{width:100px}.tribe-field-dropdown_chosen.tribe-size-medium select{width:200px}.tribe-field-dropdown_chosen.tribe-size-large select{width:300px}.tribe-field-wrap .tooltip:first-child{font-style:normal}.tribe-field.indent{margin-left:252px;width:75%}.tribe-field.indent legend{font-weight:400;width:auto}.tribe-field.indent .tribe-field-wrap{padding-right:12px}.tribe-field.indent.tribe-field-radio .tribe-field-wrap{clear:left;margin-top:12px}.tribe-field.light-bordered{background-color:#fff;border:1px solid #d3d3d3}.ajax-loading-license,.invalid-key,.valid-key{display:none;margin:0 5px}.ajax-loading-license{position:relative;top:5px}.key-validity{display:inline-block}.invalid-key,.optin-fail{color:red}.optin-success,.valid-key{color:green}.valid-key.service-msg{color:#b72}#additional-field-table{margin-bottom:20px}.tribe-admin-box-left{float:left;width:20%}.tribe-admin-box-left,.tribe-admin-box-right{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:0 20px 15px}.tribe-admin-box-right{float:right;width:68%}.ajax-loader{float:right;margin:10px}.tribe-arrangeable-item{border:1px solid #d3d3d3;border-radius:3px}.tribe-arrangeable-item .ui-state-default{border:none}.tribe-arrangeable-item-top{padding:6px}.tribe-arrangeable-item-top:hover{cursor:move}.tribe-arrangeable-action{float:right}.tribe-arrangeable-child{background-color:#f9f9f9;border-top:1px solid #d3d3d3;display:none;padding:25px}.tribe-arrangeable-child label{display:block;margin:0 0 7px}.tribe_events_active_filter_type_options{margin:10px 0}.tribe_events_active_filter_type_options label{margin:7px 0}#event_organizer td small,.OrganizerInfo td small{display:block;margin:0;max-width:250px}#event_organizer .organizer-email,.OrganizerInfo .organizer-email{vertical-align:top}.tribe-table-field-label{max-width:100%;width:200px}#tribe-help-general,#tribe-help-sidebar{float:left;margin-top:20px}#tribe-help-general p{margin-left:15px}#tribe-help-general ul{list-style-type:square}#tribe-help-general ol,#tribe-help-general ul{margin-bottom:20px;margin-left:35px}#tribe-help-general h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}#tribe-help-general h3~h3{margin-top:2.25em}#tribe-help-general h3+p{margin:0 0 20px;padding-left:12px}#tribe-help-general{width:65%}.tribe-help-section{padding-bottom:10px}.tribe-section-type-box{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;padding:8px 20px 12px}.tribe-section-type-box img{height:auto;margin:10px 0;max-width:300px}.tribe-section-type-box ul{list-style:disc;margin-left:20px}.tribe-section-type-box ul ul{list-style:circle}#tribe-log-controls{padding-bottom:1rem;padding-left:12px}#tribe-log-controls>div{display:inline-block;padding-right:1rem}#tribe-log-controls .working{opacity:1;transition:opacity .2s}#tribe-log-controls .working.hidden{opacity:0;transition:opacity .2s}#tribe-log-viewer,#tribe-system-info dl.support-stats,.template-updates-wrapper{background:#000;border-radius:2px;color:#888;max-height:400px;overflow:scroll;padding:10px}#tribe-system-info dl.support-stats dt,.template-updates-wrapper dt{clear:both;float:left;font-weight:700;text-transform:uppercase;width:25%}#tribe-system-info dl.support-stats dd,.template-updates-wrapper dd{margin-left:25%;padding-left:10px}.system-info-copy .system-info-copy-btn{padding:6px}.system-info-copy .system-info-copy-btn .dashicons{padding-right:10px}.template-updates-wrapper p{margin-top:0}#tribe-help-sidebar{margin:20px 0 0 3%;max-width:225px;width:32%}.tribe-help-plugin-info{border:1px solid #ccc;padding:0 12px 12px}.tribe-help-plugin-info dd,.tribe-help-plugin-info dt{display:inline;margin:0}.tribe-help-plugin-info dt{font-weight:700}.tribe-help-plugin-info dd:after{content:"";display:block;height:.4em}.tribe-help-plugin-info dd:last-child:after{height:0}.tribe-help-plugin-info+.tribe-help-plugin-info{margin-top:20px}.tribe-help-plugin-info>div{line-height:2em}.tribe-help-plugin-info .star-rating{display:inline-block;margin-left:3px;position:relative;top:-2px}.tribe-help-plugin-info .tribe-list-addons{color:#21a6cb;font-size:24px;list-style:circle inside;margin-bottom:10px;margin-top:10px;padding-left:4px}.tribe-help-plugin-info .tribe-list-addons a{font-size:13px;left:-5px;position:relative;top:-5px}.tribe-help-plugin-info .tribe-list-addons .tribe-active-addon{list-style:disc inside}.ui-widget-overlay{background:#666;filter:alpha(opacity=50);opacity:.5}.ui-widget-shadow{background:#000;border-radius:5px;filter:alpha(opacity=20);margin:-5px 0 0 -5px;opacity:.2;padding:5px}.ui-resizable{position:relative}.ui-resizable-handle{display:block;font-size:.1px;position:absolute;z-index:99999}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;left:0;top:-5px;width:100%}.ui-resizable-s{bottom:-5px;cursor:s-resize;height:7px;left:0;width:100%}.ui-resizable-e{cursor:e-resize;height:100%;right:-5px;top:0;width:7px}.ui-resizable-w{cursor:w-resize;height:100%;left:-5px;top:0;width:7px}.ui-resizable-se{bottom:1px;cursor:se-resize;height:12px;right:1px;width:12px}.ui-resizable-sw{bottom:-5px;cursor:sw-resize;height:9px;left:-5px;width:9px}.ui-resizable-nw{cursor:nw-resize;height:9px;left:-5px;top:-5px;width:9px}.ui-resizable-ne{cursor:ne-resize;height:9px;right:-5px;top:-5px;width:9px}.ui-dialog{padding:.2em;position:relative;width:375px}.ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em}.ui-dialog .ui-dialog-titlebar-close{height:18px;margin:-10px 0 0;padding:1px;position:absolute;right:.3em;top:50%;width:19px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin-left:-8px;margin-top:-8px}.ui-dialog .ui-dialog-titlebar-close:focus,.ui-dialog .ui-dialog-titlebar-close:hover{padding:0}.ui-dialog .ui-dialog-content{background:none;border:0;overflow:auto;padding:.5em 1em;zoom:1}.ui-dialog .ui-dialog-buttonpane{background-image:none;border-width:1px 0 0;margin:.5em 0 0;padding:.3em 1em .5em!important;text-align:right}.ui-dialog .ui-dialog-buttonpane button{cursor:pointer;line-height:1.4em;margin:.5em .4em!important;overflow:visible;padding:.2em .6em .3em;text-shadow:none;width:auto}.ui-dialog .ui-resizable-se{bottom:3px;height:14px;right:3px;width:14px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:none!important;text-align:center}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button .ui-button-text{display:block;line-height:1.4}#ui-datepicker-div{display:none}#tribe-loading{background:#fff;background:hsla(0,0%,100%,.8);display:none;height:100%;left:0;position:absolute;top:0;transition:all 1s linear;width:100%;z-index:4}#tribe-loading span{background:url(../images/tribe-loading.gif) 0 0 no-repeat;background-size:32px 32px;height:32px;left:50%;margin:-16px 0 0 -16px;position:absolute;top:50%;width:32px}.tribe_update_page{max-width:850px}.tribe-half-column{float:left;margin-bottom:30px;margin-right:5%;width:45%}.tribe-row:after,.tribe-row:before{content:"";display:table}.tribe-row,.tribe-row:after{clear:both}.tribe-row .tribe-half-column:last-child{margin-right:0;width:50%}.tribe_update_page h2{font-size:30px;line-height:1.2;margin-bottom:20px}.tribe_update_page h3{font-size:24px;font-weight:400;line-height:24px;margin-top:0}.tribe_update_page h4{font-size:18px;font-weight:600;line-height:18px;margin:0}.tribe_update_page p{font-size:15px}p.tribe-update-message{font-size:18px;font-weight:400}.tribe_update_page h4:before{content:"\f145";font-family:dashicons;font-size:34px;line-height:1;margin-right:5px;position:relative;top:5px}a.tribe-rating-link{text-decoration:none}.tribe-update-links{margin-top:30px}.tribe_update_page li:before{content:"\2022";padding-right:3px}.tribe_update_page .rss-widget{margin:1em 0}.tribe_update_page a.rsswidget{font-size:14px;font-weight:400;line-height:1}.tribe_update_page .rss-widget li:before{display:none}.tribe-events-widget-admin-form__input-section p{margin:0}.tribe-events-widget-admin-form__input-section h4{margin:.5em 0}.tribe-update-bar{display:inline-block}.tribe-update-bar .progress{border:1px solid #ccc;float:left;margin-right:1rem;padding:1px;width:18rem}.tribe-update-bar .progress .bar{background:#7ad03a;height:1rem;width:1%}#tribe-dialog-wrapper>div{padding:1rem}#tribe-dialog-wrapper>div .stage{display:none}#tribe-dialog-wrapper #heading{background:#fff}#tribe-dialog-wrapper label{display:block}#tribe-dialog-wrapper .select-single-container{border:1px solid #888;height:300px;overflow-y:scroll}#tribe-dialog-wrapper .select-single-container label{opacity:1;padding:3px 5px;transition:opacity .2s}#tribe-dialog-wrapper .select-single-container label:nth-child(odd){background:#fff}#tribe-dialog-wrapper .select-single-container label.selected{background:#0073aa;color:#fff;font-weight:700}#tribe-dialog-wrapper .select-single-container label input{display:none}#tribe-dialog-wrapper .select-single-container.updating label{opacity:.35;transition:opacity .2s}.ui-front{z-index:1000000}.wp-list-table.plugins .column-description .update-message{color:#d54e21}.api-check{min-height:100px;padding:1em}.api-check+.notice-dismiss:hover:before{color:#fff}.api-check:after,.api-check:before{content:"";display:table}.api-check:after{clear:both}.api-check .tribe-mascot{bottom:0;display:none;padding:0 1rem 0 0;position:absolute;right:0;top:0}.api-check .tribe-mascot img{display:inline-block;height:100%;max-height:150px;max-width:150px;vertical-align:middle;width:auto}.api-check p{line-height:1.7;margin-bottom:1em}.api-check a{text-decoration:none}.api-check a:hover{text-decoration:underline}.api-check .plugin-list{display:inline;font-weight:600;margin:0;padding:0}.api-check .plugin-list span.plugin-invalid:after{content:", "}.api-check .plugin-list span.plugin-invalid:last-of-type:after{content:""}.tribe-marketing-notice{padding:1em}.tribe-marketing-notice+.notice-dismiss:hover:before{color:#fff}.tribe-marketing-notice:after,.tribe-marketing-notice:before{content:"";display:table}.tribe-marketing-notice:after{clear:both}.tribe-marketing-notice .tribe-marketing-notice__icon{display:none;flex-shrink:0;padding:0;position:static}.tribe-marketing-notice .tribe-marketing-notice__icon img{display:inline-block;max-height:100%;max-width:none;vertical-align:middle;width:100%}.tribe-marketing-notice h3{margin-bottom:.5em;margin-top:.5em}.tribe-marketing-notice p{line-height:1.7;margin-bottom:.5em}.tribe-marketing-notice a{text-decoration:none}.tribe-marketing-notice a:hover{text-decoration:underline}.notice-tribe-banner .tribe-marketing-notice__icon{width:47px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:0;padding:1em 0}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice{min-height:50px}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice__content{align-content:center;display:flex;flex-wrap:wrap;justify-content:center;margin:auto}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice__icon{align-self:baseline;height:20px;margin:auto 14px auto 0;width:13px}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice__icon .tribe-common-c-svgicon--stellar-icon circle{stroke:#fff}.notice-tribe-banner.tribe-notice-stellar-sale .tec-stellar-sale-text{fill:#fff;height:16px;margin:unset;margin-top:.25em;stroke:#fff;width:176px}.notice-tribe-banner.tribe-notice-stellar-sale h3{font-weight:400;margin:auto 8px auto 14px;text-align:center}.notice-tribe-banner h3{color:#fff;display:block;font-size:.875rem;line-height:1.25;margin:0 0 .25rem}.notice-tribe-banner a{border-bottom:1px solid;line-height:1.25;margin:0;text-decoration:none}.notice-tribe-banner a:hover{text-decoration:none}.notice-tribe-banner a,.notice-tribe-banner p{color:#fff;display:inline-block;font-size:.875rem;line-height:1.25}.notice-tribe-banner p{display:inline-block;margin:0;padding:0}.notice-tribe-banner .tribe-marketing-notice{align-items:center;display:flex;justify-content:flex-start;margin:0 auto;min-height:65px;padding:0 .75rem;width:100%}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:100%}.notice-tribe-banner .notice-dismiss{position:static}.notice-tribe-banner .notice-dismiss:before{color:#eaf1ff}#wpcontent .notice-tribe-banner{align-items:center;background-color:#161b7d;border:0;box-shadow:none;display:flex;justify-content:flex-start;margin:0 0 16px;padding-right:0}#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale{background-color:#000}#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a{color:#d8ff00;text-transform:uppercase}#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a:active,#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a:focus,#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a:hover{color:#e6b1fc}.tribe-dropdown,.tribe-ea-dropdown{max-width:100%;width:auto}.tribe-dropdown.select2-container .selection,.tribe-ea-dropdown.select2-container .selection{margin-top:inherit}.tribe-dropdown .select2-selection--single,.tribe-ea-dropdown .select2-selection--single{height:32px}.tribe-dropdown .select2-selection--single .select2-selection__clear,.tribe-ea-dropdown .select2-selection--single .select2-selection__clear{line-height:28px}.tribe-dropdown .select2-selection--single .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--single .select2-selection__rendered{line-height:32px;padding-right:28px}.tribe-dropdown.select2-container--focus .select2-selection--single,.tribe-ea-dropdown.select2-container--focus .select2-selection--single{border-color:#5897fb;box-shadow:0 0 5px rgba(0,0,0,.1)}.tribe-dropdown.select2-container--open .select2-search__field,.tribe-ea-dropdown.select2-container--open .select2-search__field{padding:0}.tribe-dropdown.select2-container--open .select2-dropdown--below,.tribe-ea-dropdown.select2-container--open .select2-dropdown--below{border-top:1px solid #aaa;margin-top:-1px}.tribe-dropdown.select2-container--open .select2-dropdown--above,.tribe-ea-dropdown.select2-container--open .select2-dropdown--above{border-bottom:1px solid #aaa;margin-bottom:-16px}.tribe-dropdown.select2-container--open .select2-selection--single,.tribe-ea-dropdown.select2-container--open .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:#aaa}.tribe-dropdown.select2-container--open .select2-selection__arrow b,.tribe-ea-dropdown.select2-container--open .select2-selection__arrow b{transform:rotate(180deg)}.tribe-dropdown.select2-selection--single,.tribe-ea-dropdown.select2-selection--single{background-image:none;border:1px solid #ccc;border-radius:3px;overflow:hidden}.tribe-dropdown.select2-selection--single>.select2-selection__rendered,.tribe-ea-dropdown.select2-selection--single>.select2-selection__rendered{white-space:normal}.tribe-dropdown.select2-selection--single .select2-selection__arrow,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow{background:transparent;background-image:none;border-left:0;top:2px;width:26px}.tribe-dropdown.select2-selection--single .select2-selection__arrow b,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow b{background:#fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:auto;background-size:16px 16px;border:0;bottom:0;display:block;height:auto;left:0;margin:0;padding:0;right:0;top:0;width:auto}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered{background-image:none;border:1px solid #ccc;border-radius:3px;min-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline{line-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input{padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:19px;margin-top:2px;padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div{line-height:inherit}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove{left:4px;top:3px;transition-property:border,color}.select2-results .select2-results__option{color:#939393;font-weight:400;margin-bottom:0}.select2-results .select2-results__option[aria-disabled=true]{background-color:#e0e0e0}.select2-results.select2-results__option--highlighted{background-color:#efefef;color:#a1a1a1;cursor:default;display:block}.wp-core-ui .button-red{background-color:#a00;border-color:#9b2124;box-shadow:inset 0 1px 0 rgba(120,200,230,.5);color:#fff;text-decoration:none;text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red.hover,.wp-core-ui .button-red:focus,.wp-core-ui .button-red:hover{background-color:#a00;border-color:#7f1c1f;box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.3)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red:focus{border-color:#500f0e;box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-red.active,.wp-core-ui .button-red.active:focus,.wp-core-ui .button-red.active:hover,.wp-core-ui .button-red:active{background:#7f1c1f;border-color:#601312 #ae2426 #ae2426;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);color:hsla(0,0%,100%,.95);text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red-disabled,.wp-core-ui .button-red:disabled,.wp-core-ui .button-red[disabled]{background:#ba292b!important;border-color:#7f1c1f!important;box-shadow:none!important;color:#e79496!important;cursor:default;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important}.ticket_form .select2-container .select2-selection--single .select2-selection__arrow{display:none}.clear{zoom:1}.clear:after,.clear:before{content:" ";display:table}.clear:after{clear:both}.checkmark:after{border:solid #0ab152;border-width:0 3px 3px 0;content:"";display:block;height:15px;transform:rotate(45deg);width:8px}.checkmark.checkmark-right:after{float:right;margin-right:2em}.checkmark.checkmark-left:after{float:left;margin-left:2em}.checkmark.no-checkmark:after{display:none}.complete,.ok,.on,.yes,[data-status=complete],[data-status=ok],[data-status=on],[data-status=yes]{color:#0ab152}.incomplete,.ko,.no,.off,[data-status=incomplete],[data-status=ko],[data-status=no],[data-status=off]{color:#ff2500}.plugin-card-event-tickets-plus .column-downloaded,.plugin-card-event-tickets-plus .column-rating,.plugin-card-event-tickets-plus .column-updated,.plugin-card-event-tickets .column-downloaded,.plugin-card-event-tickets .column-rating,.plugin-card-event-tickets .column-updated,.plugin-card-events-calendar-pro .column-downloaded,.plugin-card-events-calendar-pro .column-rating,.plugin-card-events-calendar-pro .column-updated,.plugin-card-events-community-tickets .column-downloaded,.plugin-card-events-community-tickets .column-rating,.plugin-card-events-community-tickets .column-updated,.plugin-card-events-community .column-downloaded,.plugin-card-events-community .column-rating,.plugin-card-events-community .column-updated,.plugin-card-image-widget-plus .column-downloaded,.plugin-card-image-widget-plus .column-rating,.plugin-card-image-widget-plus .column-updated,.plugin-card-image-widget .column-downloaded,.plugin-card-image-widget .column-rating,.plugin-card-image-widget .column-updated,.plugin-card-the-events-calendar .column-downloaded,.plugin-card-the-events-calendar .column-rating,.plugin-card-the-events-calendar .column-updated,.plugin-card-tribe-eventbrite .column-downloaded,.plugin-card-tribe-eventbrite .column-rating,.plugin-card-tribe-eventbrite .column-updated,.plugin-card-tribe-filterbar .column-downloaded,.plugin-card-tribe-filterbar .column-rating,.plugin-card-tribe-filterbar .column-updated{display:none}body.tec-help,body.tribe-welcome{background-color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.tec-help .update-nag,body.tribe-welcome .update-nag{display:none}body.tec-help #wpcontent,body.tribe-welcome #wpcontent{padding:0}body.tec-help .tribe_settings,body.tribe-welcome .tribe_settings{margin:0}body.tec-help #wpfooter,body.tec-help .tribe_settings>h1,body.tribe-welcome #wpfooter,body.tribe-welcome .tribe_settings>h1{display:none}body.tec-help #wpbody-content,body.tribe-welcome #wpbody-content{padding-bottom:25px}body.tec-help .tribe-dependency-error,body.tribe-welcome .tribe-dependency-error{display:none}.tribe-events-admin-content-wrapper{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-style:normal;margin:0 auto;padding:0 0 30px;width:calc(100% - 40px)}.tribe-events-admin-card{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:0 auto 36px;padding:27px;text-align:center}.tribe-events-admin-card--2up .tribe-events-admin-card__title{max-width:260px}.tribe-events-admin-card--3up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--3up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card__button{background-color:#fff;border:none;color:#3d54ff;font-size:14px;font-weight:700;letter-spacing:1px;line-height:16px;position:absolute;right:20px;text-transform:uppercase;top:17px}.tribe-events-admin-card__button:hover{color:#161b7d}.tribe-events-admin-card__description{color:#000;font-size:14px;font-style:normal;font-weight:400;line-height:22px;margin-top:16px}.tribe-events-admin-card__image{display:block;height:100px;margin:0 auto}.tribe-events-admin-card__link{color:#3d54ff;display:inline-block;font-size:16px;font-style:normal;font-weight:700;line-height:18px;margin-top:24px;position:relative;text-decoration:none}.tribe-events-admin-card__link:hover{color:#161b7d}.tribe-events-admin-card__link:after{border-style:solid;border-width:0 0 1px;bottom:-4px;content:"";left:0;position:absolute;width:100%}.tribe-events-admin-card__title{color:#0f1031;font-size:20px;font-weight:700;line-height:23px;margin:auto}.tribe-events-admin-card-grid{max-width:1048px}input[type=checkbox].tribe-common-switch__input{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label{background:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;cursor:pointer;display:block;height:18px;outline:0;padding:3px;position:relative;transition:all .2s ease;-webkit-user-select:none;user-select:none;width:27px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after,input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{content:"";display:block;height:10px;position:relative;width:10px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after{background:#878787;border-radius:2px;content:"";left:0;transition:all .2s ease}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label::selection{background:none}input[type=checkbox].tribe-common-switch__input:checked+.tribe-common-switch__label:after{background:#2e709d;left:50%}.tribe-events-admin-header__logo-word-mark{display:inline-block;height:auto;margin:0 0 26px;vertical-align:middle;width:312px}.tribe-events-admin-header{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:45px 0 0}.tribe-events-admin-header__right-image{height:280px;position:absolute;right:0;top:0;width:auto;z-index:-1}.tribe-events-admin-header__title{font-size:48px;line-height:48px;margin:0 0 18px}.tribe-events-admin-header__description{font-size:18px;line-height:28px;margin-bottom:44px;max-width:60%}.tribe-events-admin-tab-nav{display:flex;margin:0}.tribe-events-admin-tab-nav li{cursor:pointer;font-size:16px;font-weight:500;margin-bottom:0;margin-right:30px}.tribe-events-admin-tab-nav li:hover{color:#334aff}.tribe-events-admin-tab-nav .selected{border-bottom:3px solid currentColor;color:#334aff;padding-bottom:17px}.tribe-events-admin-tab-nav li:after{background:#334aff;border-radius:100px;bottom:0;content:"";display:block;height:3px;left:0;position:absolute;right:0}.tribe-events-admin__line{border-top:1px solid #e1e1e4}.tribe-events-admin-products-description{color:#0f1031;font-size:14px;line-height:2}.tribe-events-admin-products-card{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;padding:10px 15px}.tribe-events-admin-products-card__icon{height:40px;object-fit:contain;width:40px}.tribe-events-admin-products-card__group{margin:0 20px;max-width:55%}.tribe-events-admin-products-card__group-title{color:#0f1031;font-size:16px;font-weight:700;line-height:1;margin:0}.tribe-events-admin-products-card__group-description{font-size:12px;margin-top:5px}.tribe-events-admin-products-card__button{background-color:#fff;border:1px solid #e1e1e4;border-radius:20px;color:#0f1031;font-size:12px;font-weight:700;letter-spacing:1px;line-height:16px;margin-left:auto;padding:10px 15px;text-decoration:none;text-transform:uppercase}.tribe-events-admin-products-card__button:hover{background-color:#334aff;color:#fff}.tribe-events-admin-products-card__button:active,.tribe-events-admin-products-card__button:focus{box-shadow:none;outline:none}.tribe-events-admin-products-card__button--active,.tribe-events-admin-products-card__button--active:active,.tribe-events-admin-products-card__button--active:focus,.tribe-events-admin-products-card__button--active:hover{background:rgba(61,84,255,.16);color:#334aff;cursor:not-allowed;text-transform:uppercase}.tribe-events-admin-card--1up{width:100%}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{display:block;height:152px;margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{font-size:28px;line-height:34px;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin:0;padding:0;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__link{margin:0;padding:0}.tribe-events-admin-card--faq{display:inline-block;font-size:0;height:147px;margin:0 0 0 30px;padding:24px 16px 22px 20px;width:230px}.tribe-events-admin-card--faq:first-child{margin-left:0}.tribe-events-admin-card--faq img{float:left;height:22px;width:16px}.tribe-events-admin-card--faq .tribe-events-admin-faq__question{color:#334aff;font-size:16px;line-height:19px;margin:0 0 12px 26px;text-align:left}.tribe-events-admin-card--faq .tribe-events-admin-faq__answer{font-size:13px;line-height:16px;margin-left:26px;text-align:left}.tribe-events-admin-video{border-radius:16px;height:200px;margin-bottom:72px;-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 0);overflow:hidden;-webkit-transform:rotate(.000001deg)}.tribe-events-admin-video iframe{width:100%}.tribe-events-admin-card--promo-blue{background-color:#3d54ff;background-image:url(../images/welcome/promo.jpg)}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{color:#fff;font-size:16px;margin-bottom:16px;text-align:left}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__title{color:#fff;text-align:left}.tribe-events-admin-graphic{position:absolute;right:0;top:106px;z-index:-1}.tribe-events-admin-graphic--desktop-only{display:none}.tribe-events-admin-graphic--mobile-only{display:block}.tribe-events-admin-card__form{position:relative}input[type=email].tribe-events-admin-card__input{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;font-size:14px;height:54px}input[type=email].tribe-events-admin-card__input::placeholder{color:rgba(15,16,49,.72);letter-spacing:.5px;padding-left:10px}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{margin:0 auto;max-width:1024px;width:90%}.tribe-events-admin-2col-grid{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-3col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . .";grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-4col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . . .";grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-products{margin:10px 0 0}.tribe-events-admin-quick-nav{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:40px 0 78px;padding:18px 23px 2px}.tribe-events-admin-quick-nav__link{color:#3d54ff;font-size:16px;font-weight:700;line-height:18px;text-align:center;text-decoration:none}.tribe-events-admin-quick-nav__link:hover{color:#161b7d}.tribe-events-admin-quick-nav__link-item{display:block;padding-bottom:19px}.tribe-events-admin-quick-nav__links{display:inline}.tribe-events-admin-quick-nav__title{color:rgba(15,16,49,.72);display:inline-block;font-size:14px;font-weight:400;line-height:16px;padding-bottom:14px;text-transform:uppercase}.tribe-events-admin-title{padding-top:14px}.tribe-events-admin-title__description{color:#0f1031;font-size:16px;font-weight:400;line-height:24px;max-width:584px;padding-top:15px}.tribe-events-admin-title__heading{color:#0f1031;display:inline-block;font-size:24px;font-weight:700;line-height:28px;margin:5px 0 0}.tribe-events-admin-title__logo{margin-right:8px;vertical-align:top;width:34px}.tribe-events-admin-notice{background-color:#3d54ff;height:65px}.tribe-events-admin-notice .tribe-events-admin-content-wrapper{padding-bottom:0;padding-top:8px}.tribe-events-admin-notice p{color:#fff;display:inline-block;font-family:Helvetica,sans-serif;font-size:16px;line-height:18px;margin-top:0;padding-bottom:12px;padding-left:16px;vertical-align:middle;width:calc(100% - 60px)}.tribe-events-admin-notice__logo{display:inline-block}.tribe-events-admin-tickets .tribe-events-admin-section-header{font-size:28px;line-height:32px}.tribe-events-admin-tickets .tribe-events-admin-graphic--desktop-only{width:365px}.tribe-events-admin-tickets .tribe-events-admin-graphic--mobile-only{top:230px;width:300px}.tribe-events-admin-tickets .tribe-events-admin-title__heading{margin-top:0}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:4px;width:32px}.tribe-events-admin-kb{margin:10px 0 0}.tribe-events-admin-kb-card{border:1px solid #e1e1e4;border-radius:20px}.tribe-events-admin-kb-card__image{height:auto;width:100%}.tribe-events-admin-kb-card__title{color:#0f1031;flex-grow:0;font-size:20px;font-weight:700;line-height:1.2;margin:0;padding:20px 28px 10px}.tribe-events-admin-kb-card__links{margin:0;padding:0 28px 25px}.tribe-events-admin-kb-card__links li{margin:0 0 10px}.tribe-events-admin-kb-card__links li a{color:#334aff;font-size:14px;line-height:1.2;text-decoration:none}.tribe-events-admin-kb-card__links li a:focus{box-shadow:none;outline:none}.tribe-events-admin-kb-card__links li a:hover{color:#1c39bb}.tribe-events-admin-section-header{align-items:center;color:#000;display:flex;font-weight:700;justify-content:space-between;margin:0}.tribe-events-admin-section-header h3{color:#0f1031;font-size:28px;font-weight:700;line-height:1}.tribe-events-admin-section-header a{border-bottom:2px solid;color:#334aff;font-size:14px;padding-bottom:2px;text-decoration:none}.tribe-events-admin-section-header a:focus{box-shadow:none;outline:none}.tribe-events-admin-section-header a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin-faq{margin:10px 0 0}.tribe-events-admin-faq-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-faq-card a{color:#0f1031}.tribe-events-admin-faq-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq-card a:hover{color:#1c39bb}.tribe-events-admin-faq-card__icon img{height:22px;width:16px}.tribe-events-admin-faq-card__content{margin-left:10px}.tribe-events-admin-faq__question,.tribe-events-admin-faq__question a{color:#334aff;font-size:16px;text-decoration:none}.tribe-events-admin-faq__question a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq__question a:hover{color:#1c39bb}.tribe-events-admin-faq__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin-extensions-title{color:#0f1031;font-size:16px;line-height:1.5;margin:0 0 30px;max-width:70%}.tribe-events-admin-extensions{margin:10px 0 0}.tribe-events-admin-extensions-card{border:1px solid #e1e1e4;border-radius:20px;border-top:8px solid #334aff;padding:48px 35px 24px 25px}.tribe-events-admin-extensions-card__title{font-size:20px;margin:0}.tribe-events-admin-extensions-card__title a{color:#0f1031;font-family:Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:1.2;text-decoration:none}.tribe-events-admin-extensions-card__title a:active,.tribe-events-admin-extensions-card__title a:focus,.tribe-events-admin-extensions-card__title a:hover{box-shadow:none;color:#334aff}.tribe-events-admin-extensions-card__description{color:#0f1031;font-family:Helvetica,sans-serif;font-size:14px;line-height:1.43;margin:20px 0}.tribe-events-admin-cta{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;margin:60px 0}.tribe-events-admin-cta__image{height:152px;object-fit:contain;width:auto}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:20px 0;width:100%}.tribe-events-admin-cta__content-title{color:#0f1031;font-size:28px;font-weight:700;line-height:normal;margin:0 0 10px;text-align:center}.tribe-events-admin-cta__content-subtitle{color:#0f1031;font-size:16px;line-height:1.5;margin-bottom:10px;text-align:center}.tribe-events-admin-cta__content-description a{border-bottom:2px solid;color:#334aff;font-size:16px;font-weight:700;padding-bottom:2px;text-decoration:none}.tribe-events-admin-cta__content-description a:focus{box-shadow:none;outline:none}.tribe-events-admin-cta__content-description a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin-footer-logo{display:inline-block;vertical-align:middle;width:228px}.tribe-events-admin-step{margin:10px 0 0}.tribe-events-admin-step-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-step-card a{border-bottom:2px solid;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin-step-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-step-card a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin-step-card__icon img{height:43px;margin-right:5px;width:42px}.tribe-events-admin-step-card__content{margin-left:10px}.tribe-events-admin-step__title{color:#0f1031;font-size:20px;font-weight:700;line-height:1.2;margin-bottom:10px}.tribe-events-admin-step__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin__system-information{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;margin:100px 0;position:relative}.tribe-events-admin__troubleshooting-title{color:#0f1031;font-size:28px;font-weight:700;line-height:1;margin:0}.tribe-events-admin__troubleshooting-description{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__system-information-select{display:flex;margin:30px 0 20px}.tribe-events-admin__system-information-select input[type=checkbox]{margin:0 10px 0 0}.tribe-events-admin__system-information-select label{color:#0f1031;font-size:16px;line-height:1.2}.tribe-events-admin__system-information-content small{color:#0f1031;font-size:12px;line-height:1.2}.tribe-events-admin__recent-template-changes .template-updates-wrapper,.tribe-events-admin__system-information-widget{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__recent-template-changes .template-updates-wrapper p{color:#fff;font-size:14px;line-height:1.14;margin:0}.tribe-events-admin__system-information-widget a{color:#334aff}.tribe-events-admin__system-information-widget a:hover{opacity:.8}.tribe-events-admin__recent-template-changes .template-updates-wrapper{padding:30px 0 30px 27px}.tribe-events-admin__recent-template-changes .template-updates-wrapper::-webkit-scrollbar,.tribe-events-admin__system-information-widget::-webkit-scrollbar{display:none}.tribe-events-admin__system-information-widget-copy{bottom:10px;position:absolute}.tribe-events-admin__system-information-widget-copy button{background-color:#334aff;border:none;border-radius:100px;color:#fff;cursor:pointer;font-size:16px;font-weight:700;outline:none;padding:18px 25px;text-align:center}.tribe-events-admin__system-information-widget-copy button:hover{background-color:#1c39bb}.tribe-events-admin__system-information-widget-copy button .dashicons,.tribe-events-admin__system-information-widget-copy button .dashicons-before:before{display:none}.tribe-events-admin__system-information-widget-copy button .optin-success{color:#fff;font-size:16px;font-weight:700;text-align:center}.tribe-events-admin__recent-template-changes p{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__recent-log{margin-top:50px}.tribe-events-admin__troubleshooting-event-log-wrapper label{color:#0f1031;display:block;font-size:16px;line-height:1.63;margin-bottom:10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-controls{margin:20px 0 10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;min-height:60px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer::-webkit-scrollbar{display:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log{border-bottom:2px solid;color:#334aff;font-size:16px;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin__troubleshooting-event-log-wrapper .tribe-events-admin__recent-log-filters-select-wrapper:after{display:none}.tribe-events-admin__recent-log-filters{display:flex;padding:20px 0 40px}.tribe-events-admin__recent-log-filters-field{margin-right:40px}.tribe-events-admin__recent-log-filters-select-wrapper:after{content:url(../images/help/polygon.svg);height:13px;pointer-events:none;position:absolute;right:22px;top:20px;width:14px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single{border:1px solid #e1e1e4!important;border-radius:16px;color:#0f1031;font-size:14px;line-height:1.14;padding:0 25px 0 15px!important}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls{margin-bottom:20px;padding:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:75px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-selection__clear{display:none}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow{right:5px}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:16px;border-bottom-right-radius:16px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container .select2-selection--single .select2-selection__rendered{width:100%}.tribe-events-admin__recent-log-filters-select-wrapper select.focus-visible,.tribe-events-admin__recent-log-filters-select-wrapper select:focus-visible{outline:none}.tribe-events-admin__recent-log-filters-select-wrapper select option{color:#0f1031;font-size:14px;line-height:1.14}.tribe-events-admin__ea-status{margin-top:50px}.tribe-events-admin__issues-found-card{background-color:#f3eee8;border-radius:8px;margin-bottom:20px}.tribe-events-admin__issues-found-card:last-of-type{margin-bottom:100px}.tribe-events-admin__issues-found-card-title{align-items:center;cursor:pointer;display:flex;padding:10px 20px 10px 17px;position:relative}.tribe-events-admin__issues-found-card-title img{height:21px;margin-right:14px;object-fit:contain;width:21px}.tribe-events-admin__issues-found-card-title h3{margin:0}.tribe-events-admin__issues-found-card-title span{color:#0f1031;display:block}.tribe-events-admin__issues-found-card-title i{background-image:url(../images/help/arrow-down.svg);background-position:50%;background-repeat:no-repeat;background-size:contain;height:15px;margin:12px 20px;position:absolute;right:0;top:0;transition:all .3s ease;width:15px}.tribe-events-admin__issues-found-card-title.active i{background-image:url(../images/help/arrow-up.svg);background-repeat:no-repeat;top:5px}.tribe-events-admin__issues-found-card-description{display:none;padding:0 20px 20px 55px}.tribe-events-admin__issues-found-card-description p{color:#0f1031;font-size:16px;margin:0}.tribe-events-admin__issues-found-card-description-actions{display:flex;padding:20px 0 10px}.tribe-events-admin__issues-found-card-description-actions a{border-bottom:2px solid;color:#334aff;font-size:16px;margin-right:20px;padding-bottom:5px;text-decoration:none}.tribe-events-admin__issues-found-card-description-actions a:focus{box-shadow:none;outline:none}.tribe-events-admin__issues-found-card-description-actions a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin__ea-status-table-wrapper{overflow-x:auto}.tribe-events-admin__ea-status-table{border:1px solid #e1e1e4;border-radius:16px;margin:30px 0 40px;overflow:hidden}.tribe-events-admin__ea-status-table a{border-bottom:2px solid;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin__ea-status-table a:focus{box-shadow:none;outline:none}.tribe-events-admin__ea-status-table a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin__ea-status-table tr{align-items:center;display:flex}.tribe-events-admin__ea-status-table th{color:#0f1031;font-weight:700;line-height:1.17;margin-top:10px;padding:5px 25px}.tribe-events-admin__ea-status-table td{align-items:center;color:#0f1031;display:flex;font-size:16px;line-height:1.63;padding:10px 25px;width:25%}.tribe-events-admin__ea-status-table td:nth-child(2){width:45%}.tribe-events-admin__ea-status-table td:nth-child(3){display:flex;justify-content:flex-end;width:30%}.tribe-events-admin__ea-status-table-dark{background-color:#f9f7f4}.tribe-events-admin__ea-status-table td img{height:21px;margin-right:14px;object-fit:contain;width:21px}.tec-troubleshooting,.tribe_events_page_tec-troubleshooting{background-color:#fff}#tribe-community,#tribe-ticketing{display:none}.tribe-events-admin__troubleshooting-notice{background-color:#161b7d;color:#fff;font-size:16px;line-height:1;margin-left:-1.55vw;padding:24px 0}.tribe-events-admin__troubleshooting-notice_title{margin:0 auto;max-width:1024px;padding-left:25px;width:90%}.tribe-events-admin__troubleshooting-notice_title a{border-bottom:2px solid;color:#fff;font-size:16px;line-height:1;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-notice_title a:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-notice_title a:hover{border-bottom:2px solid;color:#f3eee8}.tec-help #tec-help-community,.tec-help #tec-help-ticketing{display:none}.tec-help .tribe-events-admin-title{padding-top:25px}.tec-help .tribe-events-admin-title img{height:67px}body.tribe-welcome #fs_connect{border:1px solid #e1e1e4;border-radius:16px;box-shadow:none;box-sizing:border-box;margin-left:22px}body.tribe-welcome #fs_connect .fs-actions{background-color:transparent}body.tribe-welcome #fs_connect .fs-permissions{border-top:1px solid #e1e1e4;margin:0 16px}body.tribe-welcome #fs_connect button{background-color:#3d54ff;border-color:#3d54ff}body.tribe-welcome #fs_connect .button-secondary{background:#fff;border-color:#3d54ff;color:#3d54ff}body.tribe-welcome #fs_connect a{color:#3d54ff}body.tribe-welcome #fs_connect a:focus{box-shadow:none;outline:none}body.tribe-welcome #fs_connect a:hover{color:#161b7d}.black-friday-promo{align-items:flex-start;display:flex;flex-direction:column-reverse;justify-content:space-between}.black-friday-promo .black-friday-promo__button{background:#3d54ff;border-color:transparent;border-radius:20px;color:#fff;font-size:12px;height:34px;line-height:32px;min-height:unset;width:115px}.black-friday-promo .black-friday-promo__button:active,.black-friday-promo .black-friday-promo__button:focus,.black-friday-promo .black-friday-promo__button:hover{background:#1c39bb;border-color:transparent;color:#fff}.black-friday-promo__promo{background-position:50%;background-repeat:no-repeat;border-radius:10px;display:grid;grid-template-areas:"a b";grid-template-columns:auto 150px;height:150px;margin:10px 0;max-width:100%;width:450px}.black-friday-promo__content{grid-area:b;padding-top:8px;text-align:center}.black-friday-promo__text{color:#0f1031;font-family:monospace;font-size:16px;line-height:1;text-transform:uppercase}.black-friday-promo__branding-image{max-width:390px;width:100%}.end-of-year-sale-promo{align-items:flex-start;display:flex;flex-direction:column-reverse;justify-content:space-between}.end-of-year-sale-promo .end-of-year-sale-promo__button{background:#3d54ff;border-color:transparent;border-radius:20px;color:#fff;font-size:12px;height:34px;line-height:32px;min-height:unset;width:115px}.end-of-year-sale-promo .end-of-year-sale-promo__button:active,.end-of-year-sale-promo .end-of-year-sale-promo__button:focus,.end-of-year-sale-promo .end-of-year-sale-promo__button:hover{background:#1c39bb;border-color:transparent;color:#fff}.end-of-year-sale-promo__promo{background-color:#fff;background-position:0 0;background-repeat:no-repeat;border-radius:10px;display:grid;flex-shrink:0;grid-template-areas:"a b";grid-template-columns:auto 160px;height:150px;margin:10px 0;max-width:100%;width:460px}.end-of-year-sale-promo__content{grid-area:b;padding-top:8px;text-align:center}.end-of-year-sale-promo__text{color:#0f1031;font-family:monospace;font-size:13px;line-height:1.2;margin-bottom:8px;text-transform:uppercase}.end-of-year-sale-promo__branding-image{max-width:390px;width:100%}.tribe-common .tec-admin__upsell{display:inline-block;font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-1);font-weight:var(--tec-font-weight-regular);line-height:var(--tec-line-height-1)}.tribe-common .tec-admin__upsell-content{align-items:center;display:flex;padding:var(--tec-spacer-1);padding-right:var(--tec-spacer-2)}.tribe-common .tec-admin__upsell-icon,.tribe-common .tec-admin__upsell-icon-image{height:24px;width:24px}.tribe-common .tec-admin__upsell-text-wrap{margin-left:var(--tec-spacer-2)}.tribe-common .tec-admin__upsell-link{color:var(--tec-color-accent-primary);font-weight:var(--tec-font-weight-bold);text-decoration:none}.tribe-common .tec-admin__upsell--rounded-corners .tec-admin__upsell-content{background:var(--tec-color-accent-primary-background);border-radius:24px}.tribe-common .tec-admin__upsell--rounded-corners-text .tec-admin__upsell-text-wrap{background:rgba(51,74,255,.1);border-radius:14px;padding:var(--tec-spacer-1) var(--tec-spacer-2)}.tribe-common .tec-admin__upsell-link--dark{color:var(--tec-color-text-primary)}.tribe-common .tec-admin__upsell-link--underlined{text-decoration:underline}.tribe-field .tec-admin__settings-image-field-btn-remove{border:none;color:#3c434a;cursor:pointer;padding:0;text-decoration:underline}.tribe-field .tec-admin__settings-image-field-image-container{height:120px;position:relative}.tribe-field .tec-admin__settings-image-field-image-container img{height:auto;max-height:100%;width:auto}.tribe-field.tribe-field-color .wp-color-result.button{align-items:stretch;border-radius:var(--tec-border-radius-default);display:flex;margin:0 6px 6px 0;min-height:30px;padding:0 0 0 var(--tec-spacer-7)}.tribe-field.tribe-field-color .wp-color-result-text{background:var(--tec-color-background);border-left:1px solid var(--tec-color-border-default);font-size:var(--tec-font-size-0);line-height:30px;padding:0 var(--tec-spacer-2)}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){#tribe-loading span{background-image:url(../images/tribe-loading@2x.gif)}}@media screen and (max-width:782px){.tribe-half-column,.tribe-row .tribe-half-column:last-child{margin:0 0 20px;width:100%}input[type=email]{width:100%}.events-cal .subsubsub{float:none}.events-cal .search-box{width:98%}.events-cal #search-submit{width:100%}.events-cal .tablenav.top{display:none}}@media screen and (min-width:500px){.api-check .tribe-mascot{display:block}.api-check .notice-content{margin-right:180px}}@media screen and (min-width:320px){.tribe-marketing-notice .tribe-marketing-notice__icon{display:block}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px}}@media screen and (min-width:600px) and (max-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:145px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}}@media screen and (min-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:130px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:642px}}@media screen and (min-width:400px){.notice-tribe-banner .tribe-marketing-notice__icon{width:67px}}@media screen and (min-width:800px){.notice-tribe-banner h3{display:inline-block;font-size:1rem;margin:0 .5rem 0 0}.notice-tribe-banner a{line-height:1.5}.notice-tribe-banner a,.notice-tribe-banner p{font-size:1rem}.notice-tribe-banner p{margin:0 .5rem 0 0}.notice-tribe-banner .tribe-marketing-notice__cta{display:inline-block;margin-left:.5rem}}@media screen and (min-width:1215px){.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:992px}.tribe-welcome .notice-tribe-banner .tribe-marketing-notice{max-width:1036px}}@media screen and (min-width:710px){.tribe-events-admin-content-wrapper{width:670px}.tribe-events-admin-card--2up{display:inline-block;width:calc(50% - 20px)}.tribe-events-admin-card--2up.tribe-events-admin-card--first{margin-right:36px}.tribe-events-admin-card--2up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--2up .tribe-events-admin-card__image{height:100px;margin-bottom:12px}.tribe-events-admin-card--2up .tribe-events-admin-card__title{margin-bottom:27px;max-width:340px}.tribe-events-admin-card--3up{display:inline-block;margin-bottom:32px;width:calc(50% - 18px)}.tribe-events-admin-card--3up.tribe-events-admin-card--first{margin-right:32px}.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:0}.tribe-events-admin-card__title{font-size:20px;line-height:23px}.tribe-events-admin-card--1up{display:inline-block;margin-left:32px;width:calc(50% - 18px)}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--1up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card--no-pad{height:154px;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{display:block;margin-left:0;min-height:170px;width:100%}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{float:left;max-width:300px}.tribe-events-admin-graphic{max-width:250px;top:0}.tribe-events-admin-graphic--desktop-only{display:block}.tribe-events-admin-graphic--mobile-only{display:none}.tribe-events-admin-card__form{float:right;width:300px}input[type=email].tribe-events-admin-card__input{width:300px}.tribe-events-admin-title{padding-top:50px}.tribe-events-admin-title__description{padding-top:15px}.tribe-events-admin-title__heading{font-size:48px;line-height:55px;margin:0}.tribe-events-admin-title__logo{margin-right:14px;padding-top:5px;width:40px}.tribe-events-admin-tickets .tribe-events-admin-card__title{font-size:18px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{font-size:18px;height:66px}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:8px;padding-top:4px;width:60px}}@media screen and (min-width:1217px){.tribe-events-admin-content-wrapper{max-width:1060px;width:100%}.tribe-events-admin-card--2up{margin-right:36px;width:486px}.tribe-events-admin-card--3up{width:310px}.tribe-events-admin-card--3up.tribe-events-admin-card--first,.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:36px}.tribe-events-admin-card--3up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--1up{margin:0 0 36px;padding:33px 44px 30px;text-align:left;width:1012px}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:auto}.tribe-events-admin-card--1up .tribe-events-admin-card__image{float:left;margin:0 48px 10px 0}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{min-height:150px}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{max-width:450px}.tribe-events-admin-graphic{max-width:none}.tribe-events-admin-card__form,input[type=email].tribe-events-admin-card__input{width:365px}.tribe-events-admin-quick-nav{border-radius:100px;display:inline-block;height:54px;margin:24px 0 94px;max-width:1010px;padding:0 36px 0 0}.tribe-events-admin-quick-nav__link-item{display:inline-block;padding:18px 10px 0}.tribe-events-admin-quick-nav__title{padding:19px 6px 17px 32px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{height:auto}}@media screen and (max-width:768px){.tribe-events-admin-header__logo-word-mark{width:285px}.tribe-events-admin-header__right-image{height:160px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav li{margin-right:20px}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid currentColor;padding-bottom:10px}.tribe-events-admin-2col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-3col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta{align-items:flex-start;flex-direction:column;overflow:hidden}.tribe-events-admin-footer-logo{width:225px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}}@media screen and (max-width:480px){.tribe-events-admin-header__logo-word-mark{width:260px}.tribe-events-admin-header__right-image{height:120px}.tribe-events-admin-header__title{font-size:35px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav{border:1px solid #e1e1e4;border-radius:20px;flex-direction:column;padding:18px 22px}.tribe-events-admin-tab-nav li{margin-bottom:18px;margin-right:0}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid currentColor;padding-bottom:10px;width:fit-content}.tribe-events-admin__line{border:none}.tribe-events-admin-products-card,.tribe-events-admin-products-description{display:none}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{max-width:90%}.tribe-events-admin-2col-grid,.tribe-events-admin-3col-grid,.tribe-events-admin-4col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta__image{height:auto;width:90%}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:flex-start;padding:32px 23px 45px;width:auto}.tribe-events-admin-cta__content-title{font-size:22px;text-align:left}.tribe-events-admin-cta__content-subtitle{text-align:left}.tribe-events-admin-footer-logo{width:210px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}.tribe-events-admin__troubleshooting-notice{margin-left:-20px}.tribe-events-admin__troubleshooting-notice_title{max-width:90%}}@media screen and (min-width:1200px){.tribe-events-admin-products-card__group{max-width:47%}}@media screen and (min-width:500px) and (max-width:1080px){.tribe-events-admin-4col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}}@media screen and (min-width:768px){.tribe-events-admin-section-header{font-size:28px;line-height:1.143;margin:50px 0 21px}}@media screen and (max-width:1080px){.tribe-events-admin-cta__content-title{font-size:24px}}@media only screen and (max-width:1920px){.tribe-events-admin__system-information-widget-copy{right:20.5vw}}@media only screen and (max-width:1280px){.tribe-events-admin__system-information-widget-copy{right:22vw}}@media only screen and (max-width:768px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:30px}.tribe-events-admin__issues-found-card-title h3{max-width:90%}}@media only screen and (max-width:480px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper:after{right:25px}.tribe-events-admin__issues-found-card-title h3{max-width:80%}.tribe-events-admin__ea-status-table{overflow:scroll}.tribe-events-admin__ea-status-table td{min-width:150px}.tribe-events-admin__ea-status-table td:nth-child(2),.tribe-events-admin__ea-status-table td:nth-child(3){width:100%}}@media (min-width:1024px){.black-friday-promo{align-items:center;flex-direction:row}.black-friday-promo__branding{padding-right:10px;width:calc(100% - 450px)}.end-of-year-sale-promo{align-items:center;flex-direction:row}.end-of-year-sale-promo__branding{padding-right:10px;width:calc(100% - 460px)}}@media (max-width:525px){.end-of-year-sale-promo__promo{grid-template-areas:"a" "b";grid-template-columns:auto;margin:20px auto;padding-top:100px;width:300px}}
|
1 |
+
.invalid input,input:out-of-range{border:2px solid red!important}.valid input{border:1px solid green}.clearfix{zoom:1}.placeholder{color:#999;cursor:text;padding:4px}input::placeholder,textarea::placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.bubble{background-color:#f9f9f9;border:1px solid #dfdfdf;border-radius:3px;border-spacing:0;padding:10px}.tribe-sticky-tooltip{color:#bbb}td.tribe_message{padding-bottom:10px!important}#tribe_thanks{float:left;margin:5px 0 0;width:200px}.tribe_brand{font-family:Georgia,serif!important;font-size:17px!important;font-weight:400;margin:8px 0}.tribe-rating{color:#3d54ff}.tribe-rating:hover{color:#1c39bb}#tribe-upgrade{background:#f6f6f6;border:1px solid #ccc;border-radius:5px;margin:20px 0 30px;padding:0 20px 20px}#tribe-upgrade .message{background-color:#ffffe0;border:1px solid #e6db55;border-radius:3px;padding:6px 12px}table.plugins .tribe-plugin-update-message{background:#d54e21;color:#fff;display:inline-table;margin:6px 0;padding:10px 12px}table.plugins .tribe-plugin-update-message h4{display:inline;font-weight:700;margin-right:8px}table.plugins .tribe-plugin-update-message h4:after{content:" \00BB "}table.plugins .tribe-plugin-update-message a{color:#fff;text-decoration:underline}.tribe-settings-form{max-width:1000px}.tribe-settings-form fieldset{clear:both;display:inline-block;padding:10px 0}.tribe-settings-form fieldset.tribe-field-license_key legend{width:auto}.tribe-settings-form legend{float:left;font-weight:700;margin-right:20px;width:220px}.tribe-settings-form .tribe-field-wrap{float:left;max-width:500px}.tribe-settings-form .tribe-field-wrap :first-child{margin-top:0}.tribe-settings-form .tribe-field-checkbox_list label,.tribe-settings-form .tribe-field-radio label{display:block;margin:5px 0 5px 20px;text-indent:-20px}.tribe-settings-form .tribe-field-checkbox_list label>p,.tribe-settings-form .tribe-field-radio label>p{margin-left:1px;text-indent:0}.tribe-settings-form .tribe-field-checkbox_list label input,.tribe-settings-form .tribe-field-radio label input{margin-right:5px}.tribe-settings-form .tribe-settings-form-wrap .description,.tribe-settings-form .tribe-settings-form-wrap fieldset,.tribe-settings-form fieldset[id^=tribe-field-geoloc_]{padding-left:12px}.tribe-settings-form .tribe-settings-form-wrap fieldset .description{margin-left:0;max-width:450px;padding-left:0}.tribe-settings-form .tribe-settings-form-wrap fieldset .tribe-style-selection{margin-bottom:18px}.tribe-settings-form .tribe-settings-form-wrap #tribe-field-stylesheetOption .description{color:#999;margin-left:1px}.tribe-settings-form .tribe-settings-form-wrap h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}.tribe-settings-form .tribe-settings-form-wrap .contained,.tribe-settings-form .tribe-settings-form-wrap .system-info,.tribe-settings-form .tribe-settings-form-wrap .tribe-sysinfo-optin-msg,.tribe-settings-form .tribe-settings-form-wrap h3+p{margin:0 0 10px;padding-left:12px}.tribe_settings .tribe-field-indent{margin-left:245px}.tribe_settings #pu_dashboard_message{display:none}.tribe_settings .tribe-errors-list{margin-left:15px}.tribe_settings .expiring-license{color:red}.tribe_settings .tribe-error{border:1px solid red}.tribe_settings .tribe-field-description{margin-bottom:0;position:relative;top:-12px}.tribe_settings #ical-link{top:-14px}#modern-tribe-info{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:8px 20px 12px}#modern-tribe-info img{margin:10px 0}#modern-tribe-info ul{list-style:disc;margin-left:20px}#modern-tribe-info ul ul{list-style:circle}.tribe-field-inline-dropdown{margin-left:0;margin-right:0}.tribe-field-inline-text{line-height:28px;margin:0 2px}.tribe-field-textarea.tribe-size-small textarea{height:60px;width:180px}.tribe-field-textarea.tribe-size-medium textarea{height:80px;width:300px}.tribe-field-textarea.tribe-size-large textarea{height:120px;width:450px}.tribe-field-email.tribe-size-small input,.tribe-field-license_key.tribe-size-small input,.tribe-field-text.tribe-size-small input{width:50px}.tribe-field-email.tribe-size-medium input,.tribe-field-license_key.tribe-size-medium input,.tribe-field-text.tribe-size-medium input{width:225px}.tribe-field-email.tribe-size-large input,.tribe-field-license_key.tribe-size-large input,.tribe-field-text.tribe-size-large input{width:450px}.tribe-field-dropdown.tribe-size-small select{width:100px}.tribe-field-dropdown.tribe-size-medium select{width:300px}.tribe-field-dropdown.tribe-size-large select{width:450px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap{max-width:600px}.tribe-field-wrapped_html.tribe-size-large .tribe-field-wrap .description{max-width:100%}.tribe-field-dropdown_chosen.tribe-size-small select{width:100px}.tribe-field-dropdown_chosen.tribe-size-medium select{width:200px}.tribe-field-dropdown_chosen.tribe-size-large select{width:300px}.tribe-field-wrap .tooltip:first-child{font-style:normal}.tribe-field.indent{margin-left:252px;width:75%}.tribe-field.indent legend{font-weight:400;width:auto}.tribe-field.indent .tribe-field-wrap{padding-right:12px}.tribe-field.indent.tribe-field-radio .tribe-field-wrap{clear:left;margin-top:12px}.tribe-field.light-bordered{background-color:#fff;border:1px solid #d3d3d3}.ajax-loading-license,.invalid-key,.valid-key{display:none;margin:0 5px}.ajax-loading-license{position:relative;top:5px}.key-validity{display:inline-block}.invalid-key,.optin-fail{color:red}.optin-success,.valid-key{color:green}.valid-key.service-msg{color:#b72}#additional-field-table{margin-bottom:20px}.tribe-admin-box-left{float:left;width:20%}.tribe-admin-box-left,.tribe-admin-box-right{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;margin:20px 0;padding:0 20px 15px}.tribe-admin-box-right{float:right;width:68%}.ajax-loader{float:right;margin:10px}.tribe-arrangeable-item{border:1px solid #d3d3d3;border-radius:3px}.tribe-arrangeable-item .ui-state-default{border:none}.tribe-arrangeable-item-top{padding:6px}.tribe-arrangeable-item-top:hover{cursor:move}.tribe-arrangeable-action{float:right}.tribe-arrangeable-child{background-color:#f9f9f9;border-top:1px solid #d3d3d3;display:none;padding:25px}.tribe-arrangeable-child label{display:block;margin:0 0 7px}.tribe_events_active_filter_type_options{margin:10px 0}.tribe_events_active_filter_type_options label{margin:7px 0}#event_organizer td small,.OrganizerInfo td small{display:block;margin:0;max-width:250px}#event_organizer .organizer-email,.OrganizerInfo .organizer-email{vertical-align:top}.tribe-table-field-label{max-width:100%;width:200px}#tribe-help-general,#tribe-help-sidebar{float:left;margin-top:20px}#tribe-help-general p{margin-left:15px}#tribe-help-general ul{list-style-type:square}#tribe-help-general ol,#tribe-help-general ul{margin-bottom:20px;margin-left:35px}#tribe-help-general h3{background-color:#f9f9f9;margin-bottom:10px;padding:6px 0 6px 12px}#tribe-help-general h3~h3{margin-top:2.25em}#tribe-help-general h3+p{margin:0 0 20px;padding-left:12px}#tribe-help-general{width:65%}.tribe-help-section{padding-bottom:10px}.tribe-section-type-box{background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;padding:8px 20px 12px}.tribe-section-type-box img{height:auto;margin:10px 0;max-width:300px}.tribe-section-type-box ul{list-style:disc;margin-left:20px}.tribe-section-type-box ul ul{list-style:circle}#tribe-log-controls{padding-bottom:1rem;padding-left:12px}#tribe-log-controls>div{display:inline-block;padding-right:1rem}#tribe-log-controls .working{opacity:1;transition:opacity .2s}#tribe-log-controls .working.hidden{opacity:0;transition:opacity .2s}#tribe-log-viewer,#tribe-system-info dl.support-stats,.template-updates-wrapper{background:#000;border-radius:2px;color:#888;max-height:400px;overflow:scroll;padding:10px}#tribe-system-info dl.support-stats dt,.template-updates-wrapper dt{clear:both;float:left;font-weight:700;text-transform:uppercase;width:25%}#tribe-system-info dl.support-stats dd,.template-updates-wrapper dd{margin-left:25%;padding-left:10px}.system-info-copy .system-info-copy-btn{padding:6px}.system-info-copy .system-info-copy-btn .dashicons{padding-right:10px}.template-updates-wrapper p{margin-top:0}#tribe-help-sidebar{margin:20px 0 0 3%;max-width:225px;width:32%}.tribe-help-plugin-info{border:1px solid #ccc;padding:0 12px 12px}.tribe-help-plugin-info dd,.tribe-help-plugin-info dt{display:inline;margin:0}.tribe-help-plugin-info dt{font-weight:700}.tribe-help-plugin-info dd:after{content:"";display:block;height:.4em}.tribe-help-plugin-info dd:last-child:after{height:0}.tribe-help-plugin-info+.tribe-help-plugin-info{margin-top:20px}.tribe-help-plugin-info>div{line-height:2em}.tribe-help-plugin-info .star-rating{display:inline-block;margin-left:3px;position:relative;top:-2px}.tribe-help-plugin-info .tribe-list-addons{color:#21a6cb;font-size:24px;list-style:circle inside;margin-bottom:10px;margin-top:10px;padding-left:4px}.tribe-help-plugin-info .tribe-list-addons a{font-size:13px;left:-5px;position:relative;top:-5px}.tribe-help-plugin-info .tribe-list-addons .tribe-active-addon{list-style:disc inside}.ui-widget-overlay{background:#666;filter:alpha(opacity=50);opacity:.5}.ui-widget-shadow{background:#000;border-radius:5px;filter:alpha(opacity=20);margin:-5px 0 0 -5px;opacity:.2;padding:5px}.ui-resizable{position:relative}.ui-resizable-handle{display:block;font-size:.1px;position:absolute;z-index:99999}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;left:0;top:-5px;width:100%}.ui-resizable-s{bottom:-5px;cursor:s-resize;height:7px;left:0;width:100%}.ui-resizable-e{cursor:e-resize;height:100%;right:-5px;top:0;width:7px}.ui-resizable-w{cursor:w-resize;height:100%;left:-5px;top:0;width:7px}.ui-resizable-se{bottom:1px;cursor:se-resize;height:12px;right:1px;width:12px}.ui-resizable-sw{bottom:-5px;cursor:sw-resize;height:9px;left:-5px;width:9px}.ui-resizable-nw{cursor:nw-resize;height:9px;left:-5px;top:-5px;width:9px}.ui-resizable-ne{cursor:ne-resize;height:9px;right:-5px;top:-5px;width:9px}.ui-dialog{padding:.2em;position:relative;width:375px}.ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em}.ui-dialog .ui-dialog-titlebar-close{height:18px;margin:-10px 0 0;padding:1px;position:absolute;right:.3em;top:50%;width:19px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin-left:-8px;margin-top:-8px}.ui-dialog .ui-dialog-titlebar-close:focus,.ui-dialog .ui-dialog-titlebar-close:hover{padding:0}.ui-dialog .ui-dialog-content{background:none;border:0;overflow:auto;padding:.5em 1em;zoom:1}.ui-dialog .ui-dialog-buttonpane{background-image:none;border-width:1px 0 0;margin:.5em 0 0;padding:.3em 1em .5em!important;text-align:right}.ui-dialog .ui-dialog-buttonpane button{cursor:pointer;line-height:1.4em;margin:.5em .4em!important;overflow:visible;padding:.2em .6em .3em;text-shadow:none;width:auto}.ui-dialog .ui-resizable-se{bottom:3px;height:14px;right:3px;width:14px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:none!important;text-align:center}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button .ui-button-text{display:block;line-height:1.4}#ui-datepicker-div{display:none}#tribe-loading{background:#fff;background:hsla(0,0%,100%,.8);display:none;height:100%;left:0;position:absolute;top:0;transition:all 1s linear;width:100%;z-index:4}#tribe-loading span{background:url(../images/tribe-loading.gif) 0 0 no-repeat;background-size:32px 32px;height:32px;left:50%;margin:-16px 0 0 -16px;position:absolute;top:50%;width:32px}.tribe_update_page{max-width:850px}.tribe-half-column{float:left;margin-bottom:30px;margin-right:5%;width:45%}.tribe-row:after,.tribe-row:before{content:"";display:table}.tribe-row,.tribe-row:after{clear:both}.tribe-row .tribe-half-column:last-child{margin-right:0;width:50%}.tribe_update_page h2{font-size:30px;line-height:1.2;margin-bottom:20px}.tribe_update_page h3{font-size:24px;font-weight:400;line-height:24px;margin-top:0}.tribe_update_page h4{font-size:18px;font-weight:600;line-height:18px;margin:0}.tribe_update_page p{font-size:15px}p.tribe-update-message{font-size:18px;font-weight:400}.tribe_update_page h4:before{content:"\f145";font-family:dashicons;font-size:34px;line-height:1;margin-right:5px;position:relative;top:5px}a.tribe-rating-link{text-decoration:none}.tribe-update-links{margin-top:30px}.tribe_update_page li:before{content:"\2022";padding-right:3px}.tribe_update_page .rss-widget{margin:1em 0}.tribe_update_page a.rsswidget{font-size:14px;font-weight:400;line-height:1}.tribe_update_page .rss-widget li:before{display:none}.tribe-events-widget-admin-form__input-section p{margin:0}.tribe-events-widget-admin-form__input-section h4{margin:.5em 0}.tribe-update-bar{display:inline-block}.tribe-update-bar .progress{border:1px solid #ccc;float:left;margin-right:1rem;padding:1px;width:18rem}.tribe-update-bar .progress .bar{background:#7ad03a;height:1rem;width:1%}#tribe-dialog-wrapper>div{padding:1rem}#tribe-dialog-wrapper>div .stage{display:none}#tribe-dialog-wrapper #heading{background:#fff}#tribe-dialog-wrapper label{display:block}#tribe-dialog-wrapper .select-single-container{border:1px solid #888;height:300px;overflow-y:scroll}#tribe-dialog-wrapper .select-single-container label{opacity:1;padding:3px 5px;transition:opacity .2s}#tribe-dialog-wrapper .select-single-container label:nth-child(odd){background:#fff}#tribe-dialog-wrapper .select-single-container label.selected{background:#0073aa;color:#fff;font-weight:700}#tribe-dialog-wrapper .select-single-container label input{display:none}#tribe-dialog-wrapper .select-single-container.updating label{opacity:.35;transition:opacity .2s}.ui-front{z-index:1000000}.wp-list-table.plugins .column-description .update-message{color:#d54e21}.api-check{min-height:100px;padding:1em}.api-check+.notice-dismiss:hover:before{color:#fff}.api-check:after,.api-check:before{content:"";display:table}.api-check:after{clear:both}.api-check .tribe-mascot{bottom:0;display:none;padding:0 1rem 0 0;position:absolute;right:0;top:0}.api-check .tribe-mascot img{display:inline-block;height:100%;max-height:150px;max-width:150px;vertical-align:middle;width:auto}.api-check p{line-height:1.7;margin-bottom:1em}.api-check a{text-decoration:none}.api-check a:hover{text-decoration:underline}.api-check .plugin-list{display:inline;font-weight:600;margin:0;padding:0}.api-check .plugin-list span.plugin-invalid:after{content:", "}.api-check .plugin-list span.plugin-invalid:last-of-type:after{content:""}.tribe-marketing-notice{padding:1em}.tribe-marketing-notice+.notice-dismiss:hover:before{color:#fff}.tribe-marketing-notice:after,.tribe-marketing-notice:before{content:"";display:table}.tribe-marketing-notice:after{clear:both}.tribe-marketing-notice .tribe-marketing-notice__icon{display:none;flex-shrink:0;padding:0;position:static}.tribe-marketing-notice .tribe-marketing-notice__icon img{display:inline-block;max-height:100%;max-width:none;vertical-align:middle;width:100%}.tribe-marketing-notice h3{margin-bottom:.5em;margin-top:.5em}.tribe-marketing-notice p{line-height:1.7;margin-bottom:.5em}.tribe-marketing-notice a{text-decoration:none}.tribe-marketing-notice a:hover{text-decoration:underline}.notice-tribe-banner .tribe-marketing-notice__icon{width:47px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:0;padding:1em 0}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice{min-height:50px}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice__content{align-content:center;display:flex;flex-wrap:wrap;justify-content:center;margin:auto}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice__icon{align-self:baseline;height:20px;margin:auto 14px auto 0;width:13px}.notice-tribe-banner.tribe-notice-stellar-sale .tribe-marketing-notice__icon .tribe-common-c-svgicon--stellar-icon circle{stroke:#fff}.notice-tribe-banner.tribe-notice-stellar-sale .tec-stellar-sale-text{fill:#fff;height:16px;margin:unset;margin-top:.25em;stroke:#fff;width:176px}.notice-tribe-banner.tribe-notice-stellar-sale h3{font-weight:400;margin:auto 8px auto 14px;text-align:center}.notice-tribe-banner h3{color:#fff;display:block;font-size:.875rem;line-height:1.25;margin:0 0 .25rem}.notice-tribe-banner a{border-bottom:1px solid;line-height:1.25;margin:0;text-decoration:none}.notice-tribe-banner a:hover{text-decoration:none}.notice-tribe-banner a,.notice-tribe-banner p{color:#fff;display:inline-block;font-size:.875rem;line-height:1.25}.notice-tribe-banner p{display:inline-block;margin:0;padding:0}.notice-tribe-banner .tribe-marketing-notice{align-items:center;display:flex;justify-content:flex-start;margin:0 auto;min-height:65px;padding:0 .75rem;width:100%}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:100%}.notice-tribe-banner .notice-dismiss{position:static}.notice-tribe-banner .notice-dismiss:before{color:#eaf1ff}#wpcontent .notice-tribe-banner{align-items:center;background-color:#161b7d;border:0;box-shadow:none;display:flex;justify-content:flex-start;margin:0 0 16px;padding-right:0}#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale{background-color:#000}#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a{color:#d8ff00;text-transform:uppercase}#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a:active,#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a:focus,#wpcontent .notice-tribe-banner.tribe-notice-stellar-sale a:hover{color:#e6b1fc}.tribe-dropdown,.tribe-ea-dropdown{max-width:100%;width:auto}.tribe-dropdown.select2-container .selection,.tribe-ea-dropdown.select2-container .selection{margin-top:inherit}.tribe-dropdown .select2-selection--single,.tribe-ea-dropdown .select2-selection--single{height:32px}.tribe-dropdown .select2-selection--single .select2-selection__clear,.tribe-ea-dropdown .select2-selection--single .select2-selection__clear{line-height:28px}.tribe-dropdown .select2-selection--single .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--single .select2-selection__rendered{line-height:32px;padding-right:28px}.tribe-dropdown.select2-container--focus .select2-selection--single,.tribe-ea-dropdown.select2-container--focus .select2-selection--single{border-color:#5897fb;box-shadow:0 0 5px rgba(0,0,0,.1)}.tribe-dropdown.select2-container--open .select2-search__field,.tribe-ea-dropdown.select2-container--open .select2-search__field{padding:0}.tribe-dropdown.select2-container--open .select2-dropdown--below,.tribe-ea-dropdown.select2-container--open .select2-dropdown--below{border-top:1px solid #aaa;margin-top:-1px}.tribe-dropdown.select2-container--open .select2-dropdown--above,.tribe-ea-dropdown.select2-container--open .select2-dropdown--above{border-bottom:1px solid #aaa;margin-bottom:-16px}.tribe-dropdown.select2-container--open .select2-selection--single,.tribe-ea-dropdown.select2-container--open .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:#aaa}.tribe-dropdown.select2-container--open .select2-selection__arrow b,.tribe-ea-dropdown.select2-container--open .select2-selection__arrow b{transform:rotate(180deg)}.tribe-dropdown.select2-selection--single,.tribe-ea-dropdown.select2-selection--single{background-image:none;border:1px solid #ccc;border-radius:3px;overflow:hidden}.tribe-dropdown.select2-selection--single>.select2-selection__rendered,.tribe-ea-dropdown.select2-selection--single>.select2-selection__rendered{white-space:normal}.tribe-dropdown.select2-selection--single .select2-selection__arrow,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow{background:transparent;background-image:none;border-left:0;top:2px;width:26px}.tribe-dropdown.select2-selection--single .select2-selection__arrow b,.tribe-ea-dropdown.select2-selection--single .select2-selection__arrow b{background:#fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:auto;background-size:16px 16px;border:0;bottom:0;display:block;height:auto;left:0;margin:0;padding:0;right:0;top:0;width:auto}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered{background-image:none;border:1px solid #ccc;border-radius:3px;min-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline{line-height:25px}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-search--inline input{padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:19px;margin-top:2px;padding-bottom:0;padding-top:0}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice div{line-height:inherit}.tribe-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove,.tribe-ea-dropdown .select2-selection--multiple .select2-selection__rendered .select2-selection__choice__remove{left:4px;top:3px;transition-property:border,color}.select2-results .select2-results__option{color:#939393;font-weight:400;margin-bottom:0}.select2-results .select2-results__option[aria-disabled=true]{background-color:#e0e0e0}.select2-results.select2-results__option--highlighted{background-color:#efefef;color:#a1a1a1;cursor:default;display:block}.wp-core-ui .button-red{background-color:#a00;border-color:#9b2124;box-shadow:inset 0 1px 0 rgba(120,200,230,.5);color:#fff;text-decoration:none;text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red.hover,.wp-core-ui .button-red:focus,.wp-core-ui .button-red:hover{background-color:#a00;border-color:#7f1c1f;box-shadow:inset 0 1px 0 rgba(120,200,230,.6);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.3)}.wp-core-ui .button-red.focus,.wp-core-ui .button-red:focus{border-color:#500f0e;box-shadow:inset 0 1px 0 rgba(120,200,230,.6),1px 1px 2px rgba(0,0,0,.4)}.wp-core-ui .button-red.active,.wp-core-ui .button-red.active:focus,.wp-core-ui .button-red.active:hover,.wp-core-ui .button-red:active{background:#7f1c1f;border-color:#601312 #ae2426 #ae2426;box-shadow:inset 0 1px 0 rgba(0,0,0,.1);color:hsla(0,0%,100%,.95);text-shadow:0 1px 0 rgba(0,0,0,.1)}.wp-core-ui .button-red-disabled,.wp-core-ui .button-red:disabled,.wp-core-ui .button-red[disabled]{background:#ba292b!important;border-color:#7f1c1f!important;box-shadow:none!important;color:#e79496!important;cursor:default;text-shadow:0 -1px 0 rgba(0,0,0,.1)!important}.ticket_form .select2-container .select2-selection--single .select2-selection__arrow{display:none}.clear{zoom:1}.clear:after,.clear:before{content:" ";display:table}.clear:after{clear:both}.checkmark:after{border:solid #0ab152;border-width:0 3px 3px 0;content:"";display:block;height:15px;transform:rotate(45deg);width:8px}.checkmark.checkmark-right:after{float:right;margin-right:2em}.checkmark.checkmark-left:after{float:left;margin-left:2em}.checkmark.no-checkmark:after{display:none}.complete,.ok,.on,.yes,[data-status=complete],[data-status=ok],[data-status=on],[data-status=yes]{color:#0ab152}.incomplete,.ko,.no,.off,[data-status=incomplete],[data-status=ko],[data-status=no],[data-status=off]{color:#ff2500}.plugin-card-event-tickets-plus .column-downloaded,.plugin-card-event-tickets-plus .column-rating,.plugin-card-event-tickets-plus .column-updated,.plugin-card-event-tickets .column-downloaded,.plugin-card-event-tickets .column-rating,.plugin-card-event-tickets .column-updated,.plugin-card-events-calendar-pro .column-downloaded,.plugin-card-events-calendar-pro .column-rating,.plugin-card-events-calendar-pro .column-updated,.plugin-card-events-community-tickets .column-downloaded,.plugin-card-events-community-tickets .column-rating,.plugin-card-events-community-tickets .column-updated,.plugin-card-events-community .column-downloaded,.plugin-card-events-community .column-rating,.plugin-card-events-community .column-updated,.plugin-card-image-widget-plus .column-downloaded,.plugin-card-image-widget-plus .column-rating,.plugin-card-image-widget-plus .column-updated,.plugin-card-image-widget .column-downloaded,.plugin-card-image-widget .column-rating,.plugin-card-image-widget .column-updated,.plugin-card-the-events-calendar .column-downloaded,.plugin-card-the-events-calendar .column-rating,.plugin-card-the-events-calendar .column-updated,.plugin-card-tribe-eventbrite .column-downloaded,.plugin-card-tribe-eventbrite .column-rating,.plugin-card-tribe-eventbrite .column-updated,.plugin-card-tribe-filterbar .column-downloaded,.plugin-card-tribe-filterbar .column-rating,.plugin-card-tribe-filterbar .column-updated{display:none}body.tec-help,body.tribe-welcome{background-color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.tec-help .update-nag,body.tribe-welcome .update-nag{display:none}body.tec-help #wpcontent,body.tribe-welcome #wpcontent{padding:0}body.tec-help .tribe_settings,body.tribe-welcome .tribe_settings{margin:0}body.tec-help #wpfooter,body.tec-help .tribe_settings>h1,body.tribe-welcome #wpfooter,body.tribe-welcome .tribe_settings>h1{display:none}body.tec-help #wpbody-content,body.tribe-welcome #wpbody-content{padding-bottom:25px}body.tec-help .tribe-dependency-error,body.tribe-welcome .tribe-dependency-error{display:none}.tribe-events-admin-content-wrapper{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-style:normal;margin:0 auto;padding:0 0 30px;width:calc(100% - 40px)}.tribe-events-admin-card{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:0 auto 36px;padding:27px;text-align:center}.tribe-events-admin-card--2up .tribe-events-admin-card__title{max-width:260px}.tribe-events-admin-card--3up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--3up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card__button{background-color:#fff;border:none;color:#3d54ff;font-size:14px;font-weight:700;letter-spacing:1px;line-height:16px;position:absolute;right:20px;text-transform:uppercase;top:17px}.tribe-events-admin-card__button:hover{color:#161b7d}.tribe-events-admin-card__description{color:#000;font-size:14px;font-style:normal;font-weight:400;line-height:22px;margin-top:16px}.tribe-events-admin-card__image{display:block;height:100px;margin:0 auto}.tribe-events-admin-card__link{color:#3d54ff;display:inline-block;font-size:16px;font-style:normal;font-weight:700;line-height:18px;margin-top:24px;position:relative;text-decoration:none}.tribe-events-admin-card__link:hover{color:#161b7d}.tribe-events-admin-card__link:after{border-style:solid;border-width:0 0 1px;bottom:-4px;content:"";left:0;position:absolute;width:100%}.tribe-events-admin-card__title{color:#0f1031;font-size:20px;font-weight:700;line-height:23px;margin:auto}.tribe-events-admin-card-grid{max-width:1048px}input[type=checkbox].tribe-common-switch__input{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label{background:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;cursor:pointer;display:block;height:18px;outline:0;padding:3px;position:relative;transition:all .2s ease;-webkit-user-select:none;user-select:none;width:27px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after,input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{content:"";display:block;height:10px;position:relative;width:10px}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:after{background:#878787;border-radius:2px;content:"";left:0;transition:all .2s ease}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label:before{display:none}input[type=checkbox].tribe-common-switch__input+.tribe-common-switch__label::selection{background:none}input[type=checkbox].tribe-common-switch__input:checked+.tribe-common-switch__label:after{background:#2e709d;left:50%}.tribe-events-admin-header__logo-word-mark{display:inline-block;height:auto;margin:0 0 26px;vertical-align:middle;width:312px}.tribe-events-admin-header{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:45px 0 0}.tribe-events-admin-header__right-image{height:280px;position:absolute;right:0;top:0;width:auto;z-index:-1}.tribe-events-admin-header__title{font-size:48px;line-height:48px;margin:0 0 18px}.tribe-events-admin-header__description{font-size:18px;line-height:28px;margin-bottom:44px;max-width:60%}.tribe-events-admin-tab-nav{display:flex;margin:0}.tribe-events-admin-tab-nav li{cursor:pointer;font-size:16px;font-weight:500;margin-bottom:0;margin-right:30px}.tribe-events-admin-tab-nav li:hover{color:#334aff}.tribe-events-admin-tab-nav .selected{border-bottom:3px solid currentColor;color:#334aff;padding-bottom:17px}.tribe-events-admin-tab-nav li:after{background:#334aff;border-radius:100px;bottom:0;content:"";display:block;height:3px;left:0;position:absolute;right:0}.tribe-events-admin__line{border-top:1px solid #e1e1e4}.tribe-events-admin-products-description{color:#0f1031;font-size:14px;line-height:2}.tribe-events-admin-products-card{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;padding:10px 15px}.tribe-events-admin-products-card__icon{height:40px;object-fit:contain;width:40px}.tribe-events-admin-products-card__group{margin:0 20px;max-width:55%}.tribe-events-admin-products-card__group-title{color:#0f1031;font-size:16px;font-weight:700;line-height:1;margin:0}.tribe-events-admin-products-card__group-description{font-size:12px;margin-top:5px}.tribe-events-admin-products-card__button{background-color:#fff;border:1px solid #e1e1e4;border-radius:20px;color:#0f1031;font-size:12px;font-weight:700;letter-spacing:1px;line-height:16px;margin-left:auto;padding:10px 15px;text-decoration:none;text-transform:uppercase}.tribe-events-admin-products-card__button:hover{background-color:#334aff;color:#fff}.tribe-events-admin-products-card__button:active,.tribe-events-admin-products-card__button:focus{box-shadow:none;outline:none}.tribe-events-admin-products-card__button--active,.tribe-events-admin-products-card__button--active:active,.tribe-events-admin-products-card__button--active:focus,.tribe-events-admin-products-card__button--active:hover{background:rgba(61,84,255,.16);color:#334aff;cursor:not-allowed;text-transform:uppercase}.tribe-events-admin-card--1up{width:100%}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{display:block;height:152px;margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{font-size:28px;line-height:34px;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin:0;padding:0;text-align:left}.tribe-events-admin-card--no-pad .tribe-events-admin-card__link{margin:0;padding:0}.tribe-events-admin-card--faq{display:inline-block;font-size:0;height:147px;margin:0 0 0 30px;padding:24px 16px 22px 20px;width:230px}.tribe-events-admin-card--faq:first-child{margin-left:0}.tribe-events-admin-card--faq img{float:left;height:22px;width:16px}.tribe-events-admin-card--faq .tribe-events-admin-faq__question{color:#334aff;font-size:16px;line-height:19px;margin:0 0 12px 26px;text-align:left}.tribe-events-admin-card--faq .tribe-events-admin-faq__answer{font-size:13px;line-height:16px;margin-left:26px;text-align:left}.tribe-events-admin-video{border-radius:16px;height:200px;margin-bottom:72px;-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 0);overflow:hidden;-webkit-transform:rotate(.000001deg)}.tribe-events-admin-video iframe{width:100%}.tribe-events-admin-card--promo-blue{background-color:#3d54ff;background-image:url(../images/welcome/promo.jpg)}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{color:#fff;font-size:16px;margin-bottom:16px;text-align:left}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__title{color:#fff;text-align:left}.tribe-events-admin-graphic{position:absolute;right:0;top:106px;z-index:-1}.tribe-events-admin-graphic--desktop-only{display:none}.tribe-events-admin-graphic--mobile-only{display:block}.tribe-events-admin-card__form{position:relative}input[type=email].tribe-events-admin-card__input{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;font-size:14px;height:54px}input[type=email].tribe-events-admin-card__input::placeholder{color:rgba(15,16,49,.72);letter-spacing:.5px;padding-left:10px}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{margin:0 auto;max-width:1024px;width:90%}.tribe-events-admin-2col-grid{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-3col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . .";grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-4col-grid{display:grid;grid-gap:30px;gap:30px;grid-template-areas:". . . .";grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:1fr}.tribe-events-admin-products{margin:10px 0 0}.tribe-events-admin-quick-nav{background:#fff;border:1px solid #e1e1e4;border-radius:16px;box-sizing:border-box;display:block;margin:40px 0 78px;padding:18px 23px 2px}.tribe-events-admin-quick-nav__link{color:#3d54ff;font-size:16px;font-weight:700;line-height:18px;text-align:center;text-decoration:none}.tribe-events-admin-quick-nav__link:hover{color:#161b7d}.tribe-events-admin-quick-nav__link-item{display:block;padding-bottom:19px}.tribe-events-admin-quick-nav__links{display:inline}.tribe-events-admin-quick-nav__title{color:rgba(15,16,49,.72);display:inline-block;font-size:14px;font-weight:400;line-height:16px;padding-bottom:14px;text-transform:uppercase}.tribe-events-admin-title{padding-top:14px}.tribe-events-admin-title__description{color:#0f1031;font-size:16px;font-weight:400;line-height:24px;max-width:584px;padding-top:15px}.tribe-events-admin-title__heading{color:#0f1031;display:inline-block;font-size:24px;font-weight:700;line-height:28px;margin:5px 0 0}.tribe-events-admin-title__logo{margin-right:8px;vertical-align:top;width:34px}.tribe-events-admin-notice{background-color:#3d54ff;height:65px}.tribe-events-admin-notice .tribe-events-admin-content-wrapper{padding-bottom:0;padding-top:8px}.tribe-events-admin-notice p{color:#fff;display:inline-block;font-family:Helvetica,sans-serif;font-size:16px;line-height:18px;margin-top:0;padding-bottom:12px;padding-left:16px;vertical-align:middle;width:calc(100% - 60px)}.tribe-events-admin-notice__logo{display:inline-block}.tribe-events-admin-tickets .tribe-events-admin-section-header{font-size:28px;line-height:32px}.tribe-events-admin-tickets .tribe-events-admin-graphic--desktop-only{width:365px}.tribe-events-admin-tickets .tribe-events-admin-graphic--mobile-only{top:230px;width:300px}.tribe-events-admin-tickets .tribe-events-admin-title__heading{margin-top:0}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:4px;width:32px}.tribe-events-admin-kb{margin:10px 0 0}.tribe-events-admin-kb-card{border:1px solid #e1e1e4;border-radius:20px}.tribe-events-admin-kb-card__image{height:auto;width:100%}.tribe-events-admin-kb-card__title{color:#0f1031;flex-grow:0;font-size:20px;font-weight:700;line-height:1.2;margin:0;padding:20px 28px 10px}.tribe-events-admin-kb-card__links{margin:0;padding:0 28px 25px}.tribe-events-admin-kb-card__links li{margin:0 0 10px}.tribe-events-admin-kb-card__links li a{color:#334aff;font-size:14px;line-height:1.2;text-decoration:none}.tribe-events-admin-kb-card__links li a:focus{box-shadow:none;outline:none}.tribe-events-admin-kb-card__links li a:hover{color:#1c39bb}.tribe-events-admin-section-header{align-items:center;color:#000;display:flex;font-weight:700;justify-content:space-between;margin:0}.tribe-events-admin-section-header h3{color:#0f1031;font-size:28px;font-weight:700;line-height:1}.tribe-events-admin-section-header a{border-bottom:2px solid;color:#334aff;font-size:14px;padding-bottom:2px;text-decoration:none}.tribe-events-admin-section-header a:focus{box-shadow:none;outline:none}.tribe-events-admin-section-header a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin-faq{margin:10px 0 0}.tribe-events-admin-faq-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-faq-card a{color:#0f1031}.tribe-events-admin-faq-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq-card a:hover{color:#1c39bb}.tribe-events-admin-faq-card__icon img{height:22px;width:16px}.tribe-events-admin-faq-card__content{margin-left:10px}.tribe-events-admin-faq__question,.tribe-events-admin-faq__question a{color:#334aff;font-size:16px;text-decoration:none}.tribe-events-admin-faq__question a:focus{box-shadow:none;outline:none}.tribe-events-admin-faq__question a:hover{color:#1c39bb}.tribe-events-admin-faq__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin-extensions-title{color:#0f1031;font-size:16px;line-height:1.5;margin:0 0 30px;max-width:70%}.tribe-events-admin-extensions{margin:10px 0 0}.tribe-events-admin-extensions-card{border:1px solid #e1e1e4;border-radius:20px;border-top:8px solid #334aff;padding:48px 35px 24px 25px}.tribe-events-admin-extensions-card__title{font-size:20px;margin:0}.tribe-events-admin-extensions-card__title a{color:#0f1031;font-family:Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:1.2;text-decoration:none}.tribe-events-admin-extensions-card__title a:active,.tribe-events-admin-extensions-card__title a:focus,.tribe-events-admin-extensions-card__title a:hover{box-shadow:none;color:#334aff}.tribe-events-admin-extensions-card__description{color:#0f1031;font-family:Helvetica,sans-serif;font-size:14px;line-height:1.43;margin:20px 0}.tribe-events-admin-cta{align-items:center;border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;margin:60px 0}.tribe-events-admin-cta__image{height:152px;object-fit:contain;width:auto}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:20px 0;width:100%}.tribe-events-admin-cta__content-title{color:#0f1031;font-size:28px;font-weight:700;line-height:normal;margin:0 0 10px;text-align:center}.tribe-events-admin-cta__content-subtitle{color:#0f1031;font-size:16px;line-height:1.5;margin-bottom:10px;text-align:center}.tribe-events-admin-cta__content-description a{border-bottom:2px solid;color:#334aff;font-size:16px;font-weight:700;padding-bottom:2px;text-decoration:none}.tribe-events-admin-cta__content-description a:focus{box-shadow:none;outline:none}.tribe-events-admin-cta__content-description a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin-footer-logo{display:inline-block;vertical-align:middle;width:228px}.tribe-events-admin-step{margin:10px 0 0}.tribe-events-admin-step-card{border:1px solid #e1e1e4;border-radius:20px;display:flex;justify-content:space-between;padding:24px 15px 19px 19px}.tribe-events-admin-step-card a{border-bottom:2px solid;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin-step-card a:focus{box-shadow:none;outline:none}.tribe-events-admin-step-card a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin-step-card__icon img{height:43px;margin-right:5px;width:42px}.tribe-events-admin-step-card__content{margin-left:10px}.tribe-events-admin-step__title{color:#0f1031;font-size:20px;font-weight:700;line-height:1.2;margin-bottom:10px}.tribe-events-admin-step__answer{color:#0f1031;font-size:13px;margin-top:18px}.tribe-events-admin__system-information{display:grid;grid-gap:15px 30px;gap:15px 30px;grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;margin:100px 0;position:relative}.tribe-events-admin__troubleshooting-title{color:#0f1031;font-size:28px;font-weight:700;line-height:1;margin:0}.tribe-events-admin__troubleshooting-description{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__system-information-select{display:flex;margin:30px 0 20px}.tribe-events-admin__system-information-select input[type=checkbox]{margin:0 10px 0 0}.tribe-events-admin__system-information-select label{color:#0f1031;font-size:16px;line-height:1.2}.tribe-events-admin__system-information-content small{color:#0f1031;font-size:12px;line-height:1.2}.tribe-events-admin__recent-template-changes .template-updates-wrapper,.tribe-events-admin__system-information-widget{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__recent-template-changes .template-updates-wrapper p{color:#fff;font-size:14px;line-height:1.14;margin:0}.tribe-events-admin__system-information-widget a{color:#334aff}.tribe-events-admin__system-information-widget a:hover{opacity:.8}.tribe-events-admin__recent-template-changes .template-updates-wrapper{padding:30px 0 30px 27px}.tribe-events-admin__recent-template-changes .template-updates-wrapper::-webkit-scrollbar,.tribe-events-admin__system-information-widget::-webkit-scrollbar{display:none}.tribe-events-admin__system-information-widget-copy{bottom:10px;position:absolute}.tribe-events-admin__system-information-widget-copy button{background-color:#334aff;border:none;border-radius:100px;color:#fff;cursor:pointer;font-size:16px;font-weight:700;outline:none;padding:18px 25px;text-align:center}.tribe-events-admin__system-information-widget-copy button:hover{background-color:#1c39bb}.tribe-events-admin__system-information-widget-copy button .dashicons,.tribe-events-admin__system-information-widget-copy button .dashicons-before:before{display:none}.tribe-events-admin__system-information-widget-copy button .optin-success{color:#fff;font-size:16px;font-weight:700;text-align:center}.tribe-events-admin__recent-template-changes p{color:#0f1031;font-size:18px;line-height:1.2;line-height:1.44;margin:20px 0}.tribe-events-admin__recent-log{margin-top:50px}.tribe-events-admin__troubleshooting-event-log-wrapper label{color:#0f1031;display:block;font-size:16px;line-height:1.63;margin-bottom:10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-controls{margin:20px 0 10px}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer{background:#0f1031;border-radius:16px;color:#fff;font-size:14px;line-height:1.14;max-height:280px;min-height:60px;overflow:scroll;-ms-overflow-style:none;padding:12px 0 0 27px;scrollbar-width:none}.tribe-events-admin__troubleshooting-event-log-wrapper #tribe-log-viewer::-webkit-scrollbar{display:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log{border-bottom:2px solid;color:#334aff;font-size:16px;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-event-log-wrapper .download_log:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin__troubleshooting-event-log-wrapper .tribe-events-admin__recent-log-filters-select-wrapper:after{display:none}.tribe-events-admin__recent-log-filters{display:flex;padding:20px 0 40px}.tribe-events-admin__recent-log-filters-field{margin-right:40px}.tribe-events-admin__recent-log-filters-select-wrapper:after{content:url(../images/help/polygon.svg);height:13px;pointer-events:none;position:absolute;right:22px;top:20px;width:14px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single{border:1px solid #e1e1e4!important;border-radius:16px;color:#0f1031;font-size:14px;line-height:1.14;padding:0 25px 0 15px!important}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls{margin-bottom:20px;padding:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:75px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-selection__clear{display:none}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow{right:5px}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.tribe-events-admin__recent-log-filters-select-wrapper .select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:16px;border-bottom-right-radius:16px}.tribe-events-admin__recent-log-filters-select-wrapper .select2-container .select2-selection--single .select2-selection__rendered{width:100%}.tribe-events-admin__recent-log-filters-select-wrapper select.focus-visible,.tribe-events-admin__recent-log-filters-select-wrapper select:focus-visible{outline:none}.tribe-events-admin__recent-log-filters-select-wrapper select option{color:#0f1031;font-size:14px;line-height:1.14}.tribe-events-admin__ea-status{margin-top:50px}.tribe-events-admin__issues-found-card{background-color:#f3eee8;border-radius:8px;margin-bottom:20px}.tribe-events-admin__issues-found-card:last-of-type{margin-bottom:100px}.tribe-events-admin__issues-found-card-title{align-items:center;cursor:pointer;display:flex;padding:10px 20px 10px 17px;position:relative}.tribe-events-admin__issues-found-card-title img{height:21px;margin-right:14px;object-fit:contain;width:21px}.tribe-events-admin__issues-found-card-title h3{margin:0}.tribe-events-admin__issues-found-card-title span{color:#0f1031;display:block}.tribe-events-admin__issues-found-card-title i{background-image:url(../images/help/arrow-down.svg);background-position:50%;background-repeat:no-repeat;background-size:contain;height:15px;margin:12px 20px;position:absolute;right:0;top:0;transition:all .3s ease;width:15px}.tribe-events-admin__issues-found-card-title.active i{background-image:url(../images/help/arrow-up.svg);background-repeat:no-repeat;top:5px}.tribe-events-admin__issues-found-card-description{display:none;padding:0 20px 20px 55px}.tribe-events-admin__issues-found-card-description p{color:#0f1031;font-size:16px;margin:0}.tribe-events-admin__issues-found-card-description-actions{display:flex;padding:20px 0 10px}.tribe-events-admin__issues-found-card-description-actions a{border-bottom:2px solid;color:#334aff;font-size:16px;margin-right:20px;padding-bottom:5px;text-decoration:none}.tribe-events-admin__issues-found-card-description-actions a:focus{box-shadow:none;outline:none}.tribe-events-admin__issues-found-card-description-actions a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin__ea-status-table-wrapper{overflow-x:auto}.tribe-events-admin__ea-status-table{border:1px solid #e1e1e4;border-radius:16px;margin:30px 0 40px;overflow:hidden}.tribe-events-admin__ea-status-table a{border-bottom:2px solid;color:#334aff;padding-bottom:2px;text-decoration:none}.tribe-events-admin__ea-status-table a:focus{box-shadow:none;outline:none}.tribe-events-admin__ea-status-table a:hover{border-bottom:2px solid;color:#1c39bb}.tribe-events-admin__ea-status-table tr{align-items:center;display:flex}.tribe-events-admin__ea-status-table th{color:#0f1031;font-weight:700;line-height:1.17;margin-top:10px;padding:5px 25px}.tribe-events-admin__ea-status-table td{align-items:center;color:#0f1031;display:flex;font-size:16px;line-height:1.63;padding:10px 25px;width:25%}.tribe-events-admin__ea-status-table td:nth-child(2){width:45%}.tribe-events-admin__ea-status-table td:nth-child(3){display:flex;justify-content:flex-end;width:30%}.tribe-events-admin__ea-status-table-dark{background-color:#f9f7f4}.tribe-events-admin__ea-status-table td img{height:21px;margin-right:14px;object-fit:contain;width:21px}.tec-troubleshooting,.tribe_events_page_tec-troubleshooting{background-color:#fff}#tribe-community,#tribe-ticketing{display:none}.tribe-events-admin__troubleshooting-notice{background-color:#161b7d;color:#fff;font-size:16px;line-height:1;margin-left:-1.55vw;padding:24px 0}.tribe-events-admin__troubleshooting-notice_title{margin:0 auto;max-width:1024px;padding-left:25px;width:90%}.tribe-events-admin__troubleshooting-notice_title a{border-bottom:2px solid;color:#fff;font-size:16px;line-height:1;padding-bottom:2px;text-decoration:none}.tribe-events-admin__troubleshooting-notice_title a:focus{box-shadow:none;outline:none}.tribe-events-admin__troubleshooting-notice_title a:hover{border-bottom:2px solid;color:#f3eee8}.tec-help #tec-help-community,.tec-help #tec-help-ticketing{display:none}.tec-help .tribe-events-admin-title{padding-top:25px}.tec-help .tribe-events-admin-title img{height:67px}body.tribe-welcome #fs_connect{border:1px solid #e1e1e4;border-radius:16px;box-shadow:none;box-sizing:border-box;margin-left:22px}body.tribe-welcome #fs_connect .fs-actions{background-color:transparent}body.tribe-welcome #fs_connect .fs-permissions{border-top:1px solid #e1e1e4;margin:0 16px}body.tribe-welcome #fs_connect button{background-color:#3d54ff;border-color:#3d54ff}body.tribe-welcome #fs_connect .button-secondary{background:#fff;border-color:#3d54ff;color:#3d54ff}body.tribe-welcome #fs_connect a{color:#3d54ff}body.tribe-welcome #fs_connect a:focus{box-shadow:none;outline:none}body.tribe-welcome #fs_connect a:hover{color:#161b7d}.black-friday-promo{align-items:flex-start;display:flex;flex-direction:column-reverse;justify-content:space-between}.black-friday-promo .black-friday-promo__button{background:#3d54ff;border-color:transparent;border-radius:20px;color:#fff;font-size:12px;height:34px;line-height:32px;min-height:unset;width:115px}.black-friday-promo .black-friday-promo__button:active,.black-friday-promo .black-friday-promo__button:focus,.black-friday-promo .black-friday-promo__button:hover{background:#1c39bb;border-color:transparent;color:#fff}.black-friday-promo__promo{background-position:50%;background-repeat:no-repeat;border-radius:10px;display:grid;grid-template-areas:"a b";grid-template-columns:auto 150px;height:150px;margin:10px 0;max-width:100%;width:450px}.black-friday-promo__content{grid-area:b;padding-top:8px;text-align:center}.black-friday-promo__text{color:#0f1031;font-family:monospace;font-size:16px;line-height:1;text-transform:uppercase}.black-friday-promo__branding-image{max-width:390px;width:100%}.end-of-year-sale-promo{align-items:flex-start;display:flex;flex-direction:column-reverse;justify-content:space-between}.end-of-year-sale-promo .end-of-year-sale-promo__button{background:#3d54ff;border-color:transparent;border-radius:20px;color:#fff;font-size:12px;height:34px;line-height:32px;min-height:unset;width:115px}.end-of-year-sale-promo .end-of-year-sale-promo__button:active,.end-of-year-sale-promo .end-of-year-sale-promo__button:focus,.end-of-year-sale-promo .end-of-year-sale-promo__button:hover{background:#1c39bb;border-color:transparent;color:#fff}.end-of-year-sale-promo__promo{background-color:#fff;background-position:0 0;background-repeat:no-repeat;border-radius:10px;display:grid;flex-shrink:0;grid-template-areas:"a b";grid-template-columns:auto 160px;height:150px;margin:10px 0;max-width:100%;width:460px}.end-of-year-sale-promo__content{grid-area:b;padding-top:8px;text-align:center}.end-of-year-sale-promo__text{color:#0f1031;font-family:monospace;font-size:13px;line-height:1.2;margin-bottom:8px;text-transform:uppercase}.end-of-year-sale-promo__branding-image{max-width:390px;width:100%}.tribe-common .tec-admin__upsell{display:inline-block;font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-1);font-weight:var(--tec-font-weight-regular);line-height:var(--tec-line-height-1)}.tribe-common .tec-admin__upsell-content{align-items:center;display:flex;padding:var(--tec-spacer-1);padding-right:var(--tec-spacer-2)}.tribe-common .tec-admin__upsell-icon,.tribe-common .tec-admin__upsell-icon-image{height:24px;width:24px}.tribe-common .tec-admin__upsell-text-wrap{margin-left:var(--tec-spacer-2)}.tribe-common .tec-admin__upsell-link{color:var(--tec-color-accent-primary);font-weight:var(--tec-font-weight-bold);text-decoration:none}.tribe-common .tec-admin__upsell--rounded-corners .tec-admin__upsell-content{background:var(--tec-color-accent-primary-background);border-radius:24px}.tribe-common .tec-admin__upsell--rounded-corners-text .tec-admin__upsell-text-wrap{background:rgba(51,74,255,.1);border-radius:14px;padding:var(--tec-spacer-1) var(--tec-spacer-2)}.tribe-common .tec-admin__upsell-link--dark{color:var(--tec-color-text-primary)}.tribe-common .tec-admin__upsell-link--underlined{text-decoration:underline}.tribe-field .tec-admin__settings-image-field-btn-remove{border:none;color:#3c434a;cursor:pointer;padding:0;text-decoration:underline}.tribe-field .tec-admin__settings-image-field-image-container{height:120px;position:relative}.tribe-field .tec-admin__settings-image-field-image-container img{height:auto;max-height:100%;width:auto}.tribe-field.tribe-field-color .wp-color-result.button{align-items:stretch;border-radius:var(--tec-border-radius-default);display:flex;margin:0 6px 6px 0;min-height:30px;padding:0 0 0 var(--tec-spacer-7)}.tribe-field.tribe-field-color .wp-color-result-text{background:var(--tec-color-background);border-left:1px solid var(--tec-color-border-default);font-size:var(--tec-font-size-0);line-height:30px;padding:0 var(--tec-spacer-2)}.tribe-field .tec-admin__settings-toggle-field-span{background:var(--tec-color-text-disabled);border-radius:16px;display:inline-block;height:18px;position:relative;transition:background .4s;vertical-align:middle;width:36px;z-index:10}.tribe-field .tec-admin__settings-toggle-field-span:after,.tribe-field .tec-admin__settings-toggle-field-span:before{content:""}.tribe-field .tec-admin__settings-toggle-field-span:before{background:#c4c4c4;border-radius:50%;display:block;height:12px;left:3px;position:absolute;top:3px;transition:left .4s;width:12px}.tribe-field .tec-admin__settings-toggle-field-input{height:18px;opacity:0;position:absolute;width:36px;z-index:20}.tribe-field .tec-admin__settings-toggle-field-input:checked+.tec-admin__settings-toggle-field-span{background:#2271b1}.tribe-field .tec-admin__settings-toggle-field-input:checked+.tec-admin__settings-toggle-field-span:before{left:21px}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){#tribe-loading span{background-image:url(../images/tribe-loading@2x.gif)}}@media screen and (max-width:782px){.tribe-half-column,.tribe-row .tribe-half-column:last-child{margin:0 0 20px;width:100%}input[type=email]{width:100%}.events-cal .subsubsub{float:none}.events-cal .search-box{width:98%}.events-cal #search-submit{width:100%}.events-cal .tablenav.top{display:none}}@media screen and (min-width:500px){.api-check .tribe-mascot{display:block}.api-check .notice-content{margin-right:180px}}@media screen and (min-width:320px){.tribe-marketing-notice .tribe-marketing-notice__icon{display:block}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px}}@media screen and (min-width:600px) and (max-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:145px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}}@media screen and (min-width:782px){.tribe-marketing-notice .tribe-marketing-notice__content{margin-left:130px}.notice-tribe-banner .tribe-marketing-notice__content{margin-left:22px;padding:0}.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe-welcome .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:642px}}@media screen and (min-width:400px){.notice-tribe-banner .tribe-marketing-notice__icon{width:67px}}@media screen and (min-width:800px){.notice-tribe-banner h3{display:inline-block;font-size:1rem;margin:0 .5rem 0 0}.notice-tribe-banner a{line-height:1.5}.notice-tribe-banner a,.notice-tribe-banner p{font-size:1rem}.notice-tribe-banner p{margin:0 .5rem 0 0}.notice-tribe-banner .tribe-marketing-notice__cta{display:inline-block;margin-left:.5rem}}@media screen and (min-width:1215px){.events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice,.tribe_events_page_tribe-app-shop .notice-tribe-banner .tribe-marketing-notice{max-width:992px}.tribe-welcome .notice-tribe-banner .tribe-marketing-notice{max-width:1036px}}@media screen and (min-width:710px){.tribe-events-admin-content-wrapper{width:670px}.tribe-events-admin-card--2up{display:inline-block;width:calc(50% - 20px)}.tribe-events-admin-card--2up.tribe-events-admin-card--first{margin-right:36px}.tribe-events-admin-card--2up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--2up .tribe-events-admin-card__image{height:100px;margin-bottom:12px}.tribe-events-admin-card--2up .tribe-events-admin-card__title{margin-bottom:27px;max-width:340px}.tribe-events-admin-card--3up{display:inline-block;margin-bottom:32px;width:calc(50% - 18px)}.tribe-events-admin-card--3up.tribe-events-admin-card--first{margin-right:32px}.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:0}.tribe-events-admin-card__title{font-size:20px;line-height:23px}.tribe-events-admin-card--1up{display:inline-block;margin-left:32px;width:calc(50% - 18px)}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:71px}.tribe-events-admin-card--1up .tribe-events-admin-card__image{margin-bottom:28px}.tribe-events-admin-card--no-pad{height:154px;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{display:block;margin-left:0;min-height:170px;width:100%}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{float:left;max-width:300px}.tribe-events-admin-graphic{max-width:250px;top:0}.tribe-events-admin-graphic--desktop-only{display:block}.tribe-events-admin-graphic--mobile-only{display:none}.tribe-events-admin-card__form{float:right;width:300px}input[type=email].tribe-events-admin-card__input{width:300px}.tribe-events-admin-title{padding-top:50px}.tribe-events-admin-title__description{padding-top:15px}.tribe-events-admin-title__heading{font-size:48px;line-height:55px;margin:0}.tribe-events-admin-title__logo{margin-right:14px;padding-top:5px;width:40px}.tribe-events-admin-tickets .tribe-events-admin-card__title{font-size:18px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{font-size:18px;height:66px}.tribe-events-admin-tickets .tribe-events-admin-title__logo{margin-right:8px;padding-top:4px;width:60px}}@media screen and (min-width:1217px){.tribe-events-admin-content-wrapper{max-width:1060px;width:100%}.tribe-events-admin-card--2up{margin-right:36px;width:486px}.tribe-events-admin-card--3up{width:310px}.tribe-events-admin-card--3up.tribe-events-admin-card--first,.tribe-events-admin-card--3up.tribe-events-admin-card--middle{margin-right:36px}.tribe-events-admin-card--3up.tribe-events-admin-card--last{margin-right:0}.tribe-events-admin-card--1up{margin:0 0 36px;padding:33px 44px 30px;text-align:left;width:1012px}.tribe-events-admin-card--1up .tribe-events-admin-card__description{height:auto}.tribe-events-admin-card--1up .tribe-events-admin-card__image{float:left;margin:0 48px 10px 0}.tribe-events-admin-card--no-pad{padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__image{margin:0;padding:0}.tribe-events-admin-card--no-pad .tribe-events-admin-card__title{margin-left:50%;padding:42px 0 10px}.tribe-events-admin-card--no-pad .tribe-events-admin-card__description{margin-left:50%}.tribe-events-admin-card--promo-blue{min-height:150px}.tribe-events-admin-card--promo-blue .tribe-events-admin-card__description{max-width:450px}.tribe-events-admin-graphic{max-width:none}.tribe-events-admin-card__form,input[type=email].tribe-events-admin-card__input{width:365px}.tribe-events-admin-quick-nav{border-radius:100px;display:inline-block;height:54px;margin:24px 0 94px;max-width:1010px;padding:0 36px 0 0}.tribe-events-admin-quick-nav__link-item{display:inline-block;padding:18px 10px 0}.tribe-events-admin-quick-nav__title{padding:19px 6px 17px 32px}.tribe-events-admin-tickets .tribe-events-admin-card--2up .tribe-events-admin-card__title{height:auto}}@media screen and (max-width:768px){.tribe-events-admin-header__logo-word-mark{width:285px}.tribe-events-admin-header__right-image{height:160px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav li{margin-right:20px}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid currentColor;padding-bottom:10px}.tribe-events-admin-2col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-3col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta{align-items:flex-start;flex-direction:column;overflow:hidden}.tribe-events-admin-footer-logo{width:225px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}}@media screen and (max-width:480px){.tribe-events-admin-header__logo-word-mark{width:260px}.tribe-events-admin-header__right-image{height:120px}.tribe-events-admin-header__title{font-size:35px}.tribe-events-admin-header__description{max-width:100%}.tribe-events-admin-tab-nav{border:1px solid #e1e1e4;border-radius:20px;flex-direction:column;padding:18px 22px}.tribe-events-admin-tab-nav li{margin-bottom:18px;margin-right:0}.tribe-events-admin-tab-nav .selected{border-bottom:2px solid currentColor;padding-bottom:10px;width:fit-content}.tribe-events-admin__line{border:none}.tribe-events-admin-products-card,.tribe-events-admin-products-description{display:none}.tribe-events-admin-container,.tribe-events-admin-content-wrapper.tribe-events-admin-container{max-width:90%}.tribe-events-admin-2col-grid,.tribe-events-admin-3col-grid,.tribe-events-admin-4col-grid{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr))}.tribe-events-admin-extensions-title{max-width:100%}.tribe-events-admin-cta__image{height:auto;width:90%}.tribe-events-admin-cta__content,.tribe-events-admin__troubleshooting-cta{align-items:flex-start;padding:32px 23px 45px;width:auto}.tribe-events-admin-cta__content-title{font-size:22px;text-align:left}.tribe-events-admin-cta__content-subtitle{text-align:left}.tribe-events-admin-footer-logo{width:210px}.tribe-events-admin__system-information{grid-template-areas:".";grid-template-columns:repeat(1,minmax(0,1fr));margin:50px 0}.tribe-events-admin__troubleshooting-notice{margin-left:-20px}.tribe-events-admin__troubleshooting-notice_title{max-width:90%}}@media screen and (min-width:1200px){.tribe-events-admin-products-card__group{max-width:47%}}@media screen and (min-width:500px) and (max-width:1080px){.tribe-events-admin-4col-grid{grid-template-areas:". .";grid-template-columns:repeat(2,minmax(0,1fr))}}@media screen and (min-width:768px){.tribe-events-admin-section-header{font-size:28px;line-height:1.143;margin:50px 0 21px}}@media screen and (max-width:1080px){.tribe-events-admin-cta__content-title{font-size:24px}}@media only screen and (max-width:1920px){.tribe-events-admin__system-information-widget-copy{right:20.5vw}}@media only screen and (max-width:1280px){.tribe-events-admin__system-information-widget-copy{right:22vw}}@media only screen and (max-width:768px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:first-child,.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(2),.tribe-events-admin__recent-log-filters-select-wrapper #tribe-log-controls div:nth-child(3){padding-right:30px}.tribe-events-admin__issues-found-card-title h3{max-width:90%}}@media only screen and (max-width:480px){.tribe-events-admin__system-information-widget-copy{left:10px;right:auto}.tribe-events-admin__recent-log-filters{flex-direction:column}.tribe-events-admin__recent-log-filters-field{margin-bottom:30px;margin-right:0}.tribe-events-admin__recent-log-filters-select-wrapper:after{right:25px}.tribe-events-admin__issues-found-card-title h3{max-width:80%}.tribe-events-admin__ea-status-table{overflow:scroll}.tribe-events-admin__ea-status-table td{min-width:150px}.tribe-events-admin__ea-status-table td:nth-child(2),.tribe-events-admin__ea-status-table td:nth-child(3){width:100%}}@media (min-width:1024px){.black-friday-promo{align-items:center;flex-direction:row}.black-friday-promo__branding{padding-right:10px;width:calc(100% - 450px)}.end-of-year-sale-promo{align-items:center;flex-direction:row}.end-of-year-sale-promo__branding{padding-right:10px;width:calc(100% - 460px)}}@media (max-width:525px){.end-of-year-sale-promo__promo{grid-template-areas:"a" "b";grid-template-columns:auto;margin:20px auto;padding-top:100px;width:300px}}
|
common/vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit8b3e20246f7b5d2e5dbde93b325c184d::getLoader();
|
common/vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitc0f7f47dc76eb23b8642a331bfeb1880::getLoader();
|
common/vendor/composer/autoload_classmap.php
CHANGED
@@ -132,6 +132,7 @@ return array(
|
|
132 |
'Tribe\\Admin\\Settings' => $baseDir . '/src/Tribe/Admin/Settings.php',
|
133 |
'Tribe\\Admin\\Troubleshooting' => $baseDir . '/src/Tribe/Admin/Troubleshooting.php',
|
134 |
'Tribe\\Admin\\Upsell_Notice\\Main' => $baseDir . '/src/Tribe/Admin/Upsell_Notice/Main.php',
|
|
|
135 |
'Tribe\\Customizer\\Control' => $baseDir . '/src/Tribe/Customizer/Control.php',
|
136 |
'Tribe\\Customizer\\Controls\\Heading' => $baseDir . '/src/Tribe/Customizer/Controls/Heading.php',
|
137 |
'Tribe\\Customizer\\Controls\\Number' => $baseDir . '/src/Tribe/Customizer/Controls/Number.php',
|
132 |
'Tribe\\Admin\\Settings' => $baseDir . '/src/Tribe/Admin/Settings.php',
|
133 |
'Tribe\\Admin\\Troubleshooting' => $baseDir . '/src/Tribe/Admin/Troubleshooting.php',
|
134 |
'Tribe\\Admin\\Upsell_Notice\\Main' => $baseDir . '/src/Tribe/Admin/Upsell_Notice/Main.php',
|
135 |
+
'Tribe\\Admin\\Wysiwyg' => $baseDir . '/src/Tribe/Admin/Wysiwyg.php',
|
136 |
'Tribe\\Customizer\\Control' => $baseDir . '/src/Tribe/Customizer/Control.php',
|
137 |
'Tribe\\Customizer\\Controls\\Heading' => $baseDir . '/src/Tribe/Customizer/Controls/Heading.php',
|
138 |
'Tribe\\Customizer\\Controls\\Number' => $baseDir . '/src/Tribe/Customizer/Controls/Number.php',
|
common/vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitfa3326926b3e0647d366833632fd7160
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit8b3e20246f7b5d2e5dbde93b325c184d
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit8b3e20246f7b5d2e5dbde93b325c184d', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit8b3e20246f7b5d2e5dbde93b325c184d', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit8b3e20246f7b5d2e5dbde93b325c184d::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
common/vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitbffd0929a2123e9d1d886dcb6a396f06 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInitc0f7f47dc76eb23b8642a331bfeb1880 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitc0f7f47dc76eb23b8642a331bfeb1880', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitc0f7f47dc76eb23b8642a331bfeb1880', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
common/vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -193,6 +193,7 @@ class ComposerStaticInitfa3326926b3e0647d366833632fd7160
|
|
193 |
'Tribe\\Admin\\Settings' => __DIR__ . '/../..' . '/src/Tribe/Admin/Settings.php',
|
194 |
'Tribe\\Admin\\Troubleshooting' => __DIR__ . '/../..' . '/src/Tribe/Admin/Troubleshooting.php',
|
195 |
'Tribe\\Admin\\Upsell_Notice\\Main' => __DIR__ . '/../..' . '/src/Tribe/Admin/Upsell_Notice/Main.php',
|
|
|
196 |
'Tribe\\Customizer\\Control' => __DIR__ . '/../..' . '/src/Tribe/Customizer/Control.php',
|
197 |
'Tribe\\Customizer\\Controls\\Heading' => __DIR__ . '/../..' . '/src/Tribe/Customizer/Controls/Heading.php',
|
198 |
'Tribe\\Customizer\\Controls\\Number' => __DIR__ . '/../..' . '/src/Tribe/Customizer/Controls/Number.php',
|
@@ -273,10 +274,10 @@ class ComposerStaticInitfa3326926b3e0647d366833632fd7160
|
|
273 |
public static function getInitializer(ClassLoader $loader)
|
274 |
{
|
275 |
return \Closure::bind(function () use ($loader) {
|
276 |
-
$loader->prefixLengthsPsr4 =
|
277 |
-
$loader->prefixDirsPsr4 =
|
278 |
-
$loader->prefixesPsr0 =
|
279 |
-
$loader->classMap =
|
280 |
|
281 |
}, null, ClassLoader::class);
|
282 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit8b3e20246f7b5d2e5dbde93b325c184d
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
193 |
'Tribe\\Admin\\Settings' => __DIR__ . '/../..' . '/src/Tribe/Admin/Settings.php',
|
194 |
'Tribe\\Admin\\Troubleshooting' => __DIR__ . '/../..' . '/src/Tribe/Admin/Troubleshooting.php',
|
195 |
'Tribe\\Admin\\Upsell_Notice\\Main' => __DIR__ . '/../..' . '/src/Tribe/Admin/Upsell_Notice/Main.php',
|
196 |
+
'Tribe\\Admin\\Wysiwyg' => __DIR__ . '/../..' . '/src/Tribe/Admin/Wysiwyg.php',
|
197 |
'Tribe\\Customizer\\Control' => __DIR__ . '/../..' . '/src/Tribe/Customizer/Control.php',
|
198 |
'Tribe\\Customizer\\Controls\\Heading' => __DIR__ . '/../..' . '/src/Tribe/Customizer/Controls/Heading.php',
|
199 |
'Tribe\\Customizer\\Controls\\Number' => __DIR__ . '/../..' . '/src/Tribe/Customizer/Controls/Number.php',
|
274 |
public static function getInitializer(ClassLoader $loader)
|
275 |
{
|
276 |
return \Closure::bind(function () use ($loader) {
|
277 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit8b3e20246f7b5d2e5dbde93b325c184d::$prefixLengthsPsr4;
|
278 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit8b3e20246f7b5d2e5dbde93b325c184d::$prefixDirsPsr4;
|
279 |
+
$loader->prefixesPsr0 = ComposerStaticInit8b3e20246f7b5d2e5dbde93b325c184d::$prefixesPsr0;
|
280 |
+
$loader->classMap = ComposerStaticInit8b3e20246f7b5d2e5dbde93b325c184d::$classMap;
|
281 |
|
282 |
}, null, ClassLoader::class);
|
283 |
}
|
event-tickets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
-
Version: 5.5.
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: Event Tickets
|
4 |
Plugin URI: https://evnt.is/1acb
|
5 |
Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
|
6 |
+
Version: 5.5.4
|
7 |
Author: The Events Calendar
|
8 |
Author URI: https://evnt.is/1aor
|
9 |
License: GPLv2 or later
|
lang/event-tickets-nl_NL_formal.mo
ADDED
Binary file
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: theeventscalendar, brianjessee, camwynsp, aguseo, bordoni, borkweb, GeoffBel, jentheo, leahkoerper, lucatume, neillmcshea, vicskf, zbtirrell, juanfra, moraleida.me
|
4 |
Tags: tickets, registration, event registration, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 5.8.5
|
6 |
-
Tested up to: 6.
|
7 |
-
Stable tag: 5.5.
|
8 |
Requires PHP: 7.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -188,6 +188,12 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
|
|
188 |
|
189 |
== Changelog ==
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
= [5.5.3] 2022-10-31 =
|
192 |
|
193 |
* Fix - Orderby param not working for Attendee archive REST API. [ET-1591]
|
3 |
Contributors: theeventscalendar, brianjessee, camwynsp, aguseo, bordoni, borkweb, GeoffBel, jentheo, leahkoerper, lucatume, neillmcshea, vicskf, zbtirrell, juanfra, moraleida.me
|
4 |
Tags: tickets, registration, event registration, RSVP, ticket sales, attendee management
|
5 |
Requires at least: 5.8.5
|
6 |
+
Tested up to: 6.1
|
7 |
+
Stable tag: 5.5.4
|
8 |
Requires PHP: 7.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
+
= [5.5.4] 2022-11-09 =
|
192 |
+
|
193 |
+
* Fix - Fixes multiple of the same ticket form being on the same page being out of sync. [GTRIA-729]
|
194 |
+
* Fix - Added a JS event that checks for attendee label validation if ET+ is active. [ETP-803]
|
195 |
+
|
196 |
+
|
197 |
= [5.5.3] 2022-10-31 =
|
198 |
|
199 |
* Fix - Orderby param not working for Attendee archive REST API. [ET-1591]
|
src/Tickets/Emails/Assets.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles registering and setup for assets on Tickets Emails.
|
4 |
+
*
|
5 |
+
* @since TBD
|
6 |
+
*
|
7 |
+
* @package TEC\Tickets\Emails
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace TEC\Tickets\Emails;
|
11 |
+
|
12 |
+
use \tad_DI52_ServiceProvider;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Assets.
|
16 |
+
*
|
17 |
+
* @since TBD
|
18 |
+
*
|
19 |
+
* @package TEC\Tickets\Emails
|
20 |
+
*/
|
21 |
+
class Assets extends tad_DI52_ServiceProvider {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Binds and sets up implementations.
|
25 |
+
*
|
26 |
+
* @since TBD
|
27 |
+
*/
|
28 |
+
public function register() {
|
29 |
+
/** @var Tribe__Tickets__Main $tickets_main */
|
30 |
+
$tickets_main = tribe( 'tickets.main' );
|
31 |
+
|
32 |
+
}
|
33 |
+
}
|
src/Tickets/Emails/Emails_Tab.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles registering and setup for the Tickets Emails settings tab.
|
4 |
+
*
|
5 |
+
* @since TBD
|
6 |
+
*
|
7 |
+
* @package TEC\Tickets\Emails
|
8 |
+
*/
|
9 |
+
|
10 |
+
namespace TEC\Tickets\Emails;
|
11 |
+
|
12 |
+
use Tribe\Tickets\Admin\Settings as Plugin_Settings;
|
13 |
+
use \Tribe__Template;
|
14 |
+
use Tribe__Tickets__Main;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class Emails_Tab
|
18 |
+
*
|
19 |
+
* @since TBD
|
20 |
+
*
|
21 |
+
* @package TEC\Tickets\Emails
|
22 |
+
*/
|
23 |
+
class Emails_Tab {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Slug for the tab.
|
27 |
+
*
|
28 |
+
* @since TBD
|
29 |
+
*
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
public static $slug = 'emails';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Create the Tickets Commerce Emails Settings Tab.
|
36 |
+
*
|
37 |
+
* @since TBD
|
38 |
+
*
|
39 |
+
* @param $admin_page Page ID of current admin page.
|
40 |
+
*/
|
41 |
+
public function register_tab( $admin_page ) {
|
42 |
+
if ( ! empty( $admin_page ) && Plugin_Settings::$settings_page_id !== $admin_page ) {
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
$tab_settings = [
|
47 |
+
'priority' => 25,
|
48 |
+
'fields' => $this->get_fields(),
|
49 |
+
'show_save' => true,
|
50 |
+
];
|
51 |
+
|
52 |
+
$tab_settings = apply_filters( 'tec_tickets_commerce_emails_tab_settings', $tab_settings );
|
53 |
+
|
54 |
+
new \Tribe__Settings_Tab( static::$slug, esc_html__( 'Emails', 'event-tickets' ), $tab_settings );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Add the emails tab to the list of tab ids for the Tickets settings.
|
59 |
+
*
|
60 |
+
* @since TBD
|
61 |
+
*
|
62 |
+
* @param array $tabs Current array of tabs ids.
|
63 |
+
*
|
64 |
+
* @return array $tabs Filtered array of tabs ids.
|
65 |
+
*/
|
66 |
+
public function settings_add_tab_id( array $tabs ): array {
|
67 |
+
$tabs[] = static::$slug;
|
68 |
+
|
69 |
+
return $tabs;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Gets the template instance used to setup the rendering html.
|
74 |
+
*
|
75 |
+
* @since TBD
|
76 |
+
*
|
77 |
+
* @return Tribe__Template
|
78 |
+
*/
|
79 |
+
public function get_template(): Tribe__Template {
|
80 |
+
if ( empty( $this->template ) ) {
|
81 |
+
$this->template = new Tribe__Template();
|
82 |
+
$this->template->set_template_origin( Tribe__Tickets__Main::instance() );
|
83 |
+
$this->template->set_template_folder( 'src/admin-views/settings' );
|
84 |
+
$this->template->set_template_context_extract( true );
|
85 |
+
}
|
86 |
+
|
87 |
+
return $this->template;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Gets the URL for the Emails Tab.
|
92 |
+
*
|
93 |
+
* @since TBD
|
94 |
+
*
|
95 |
+
* @param array $args Which query args we are adding.
|
96 |
+
*
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function get_url( array $args = [] ): string {
|
100 |
+
// Force the `emails` tab.
|
101 |
+
$args['tab'] = static::$slug;
|
102 |
+
|
103 |
+
// Use the settings page get_url to build the URL.
|
104 |
+
return tribe( Plugin_Settings::class )->get_url( $args );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Gets the top level settings for Tickets Commerce.
|
109 |
+
*
|
110 |
+
* @since TBD
|
111 |
+
*
|
112 |
+
* @return array[]
|
113 |
+
*/
|
114 |
+
public function get_fields(): array {
|
115 |
+
|
116 |
+
$fields = [];
|
117 |
+
$fields['tribe-form-content-start'] = [
|
118 |
+
'type' => 'html',
|
119 |
+
'html' => '<div class="tribe-settings-form-wrap">',
|
120 |
+
];
|
121 |
+
$fields['tribe-tickets-emails-header'] = [
|
122 |
+
'type' => 'html',
|
123 |
+
'html' => '<h2>' . esc_html__( 'Tickets Emails', 'event-tickets' ) . '</h2>',
|
124 |
+
];
|
125 |
+
$kb_link_html = sprintf( '<a href="%s" target="_blank" rel="nofollow">%s</a>',
|
126 |
+
'https://www.theeventscalendar.com', // @todo Replace with correct KB URL.
|
127 |
+
esc_html__( 'Knowledgebase', 'event-tickets' )
|
128 |
+
);
|
129 |
+
$description_text = sprintf(
|
130 |
+
// Translators: %s Link to knowledgebase article.
|
131 |
+
esc_html__( 'Customize your customer communications when tickets are purchased, RSVPs are submitted, and for Tickets Commerce order notifications. Learn More about Tickets Commerce communications in our %s.', 'event-tickets' ),
|
132 |
+
$kb_link_html
|
133 |
+
);
|
134 |
+
$fields['tribe-tickets-emails-description'] = [
|
135 |
+
'type' => 'html',
|
136 |
+
'html' => sprintf( '<p>%s</p>', $description_text ),
|
137 |
+
];
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Hook to modify the settings fields for Tickets Emails.
|
141 |
+
*
|
142 |
+
* @since TBD
|
143 |
+
*
|
144 |
+
* @param array[] $fields Top level settings.
|
145 |
+
*/
|
146 |
+
return apply_filters( 'tec_tickets_emails_settings_fields', $fields );
|
147 |
+
}
|
148 |
+
}
|
src/Tickets/Emails/Hooks.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles hooking all the actions and filters used by the module.
|
4 |
+
*
|
5 |
+
* To remove a filter:
|
6 |
+
* remove_filter( 'some_filter', [ tribe( TEC\Tickets\Emails\Hooks::class ), 'some_filtering_method' ] );
|
7 |
+
* remove_filter( 'some_filter', [ tribe( 'tickets.emails.hooks' ), 'some_filtering_method' ] );
|
8 |
+
*
|
9 |
+
* To remove an action:
|
10 |
+
* remove_action( 'some_action', [ tribe( TEC\Tickets\Emails\Hooks::class ), 'some_method' ] );
|
11 |
+
* remove_action( 'some_action', [ tribe( 'tickets.emails.hooks' ), 'some_method' ] );
|
12 |
+
*
|
13 |
+
* @since TBD
|
14 |
+
*
|
15 |
+
* @package TEC\Tickets\Emails
|
16 |
+
*/
|
17 |
+
|
18 |
+
namespace TEC\Tickets\Emails;
|
19 |
+
|
20 |
+
use \tad_DI52_ServiceProvider;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Class Hooks.
|
24 |
+
*
|
25 |
+
* @since TBD
|
26 |
+
*
|
27 |
+
* @package TEC\Tickets\Emails
|
28 |
+
*/
|
29 |
+
class Hooks extends tad_DI52_ServiceProvider {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Binds and sets up implementations.
|
33 |
+
*
|
34 |
+
* @since TBD
|
35 |
+
*/
|
36 |
+
public function register() {
|
37 |
+
$this->add_actions();
|
38 |
+
$this->add_filters();
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Adds the actions required by each Tickets Emails component.
|
43 |
+
*
|
44 |
+
* @since TBD
|
45 |
+
*/
|
46 |
+
protected function add_actions() {
|
47 |
+
add_action( 'tribe_settings_do_tabs', [ $this, 'register_emails_tab' ], 17 );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Adds the filters required by each Tickets Emails component.
|
52 |
+
*
|
53 |
+
* @since TBD
|
54 |
+
*/
|
55 |
+
protected function add_filters() {
|
56 |
+
add_filter( 'tec_tickets_settings_tabs_ids', [ $this, 'filter_add_tab_id' ] );
|
57 |
+
add_filter( 'tec_tickets_emails_settings_fields', [ $this, 'filter_add_template_list' ] );
|
58 |
+
add_filter( 'tec_tickets_emails_settings_fields', [ $this, 'filter_add_sender_info_fields' ] );
|
59 |
+
add_filter( 'tec_tickets_emails_settings_fields', [ $this, 'filter_add_email_styling_fields' ] );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Action to add emails tab to tickets settings page.
|
64 |
+
*
|
65 |
+
* @since TBD
|
66 |
+
*
|
67 |
+
* @param $admin_page Page ID of current admin page.
|
68 |
+
*/
|
69 |
+
public function register_emails_tab( $admin_page ) {
|
70 |
+
$this->container->make( Emails_Tab::class )->register_tab( $admin_page );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Filter to add tab id to tickets emails tab.
|
75 |
+
*
|
76 |
+
* @since TBD
|
77 |
+
*
|
78 |
+
* @param array $tabs Current array of tabs ids.
|
79 |
+
*
|
80 |
+
* @return array $tabs Filtered array of tabs ids.
|
81 |
+
*/
|
82 |
+
public function filter_add_tab_id( $tabs ) {
|
83 |
+
return $this->container->make( Emails_Tab::class )->settings_add_tab_id( $tabs );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Filter to add template list to Ticklets Emails settings fields.
|
88 |
+
*
|
89 |
+
* @since TBD
|
90 |
+
*
|
91 |
+
* @param array $fields Current array of Tickets Emails settings fields.
|
92 |
+
*
|
93 |
+
* @return array $fields Filtered array of Tickets Emails settings fields.
|
94 |
+
*/
|
95 |
+
public function filter_add_template_list( $fields ) {
|
96 |
+
return $this->container->make( Settings::class )->add_template_list( $fields );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Filter to add sender info to Ticklets Emails settings fields.
|
101 |
+
*
|
102 |
+
* @since TBD
|
103 |
+
*
|
104 |
+
* @param array $fields Current array of Tickets Emails settings fields.
|
105 |
+
*
|
106 |
+
* @return array $fields Filtered array of Tickets Emails settings fields.
|
107 |
+
*/
|
108 |
+
public function filter_add_sender_info_fields( $fields ) {
|
109 |
+
return $this->container->make( Settings::class )->sender_info_fields( $fields );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Filter to add sender info to Ticklets Emails settings fields.
|
114 |
+
*
|
115 |
+
* @since TBD
|
116 |
+
*
|
117 |
+
* @param array $fields Current array of Tickets Emails settings fields.
|
118 |
+
*
|
119 |
+
* @return array $fields Filtered array of Tickets Emails settings fields.
|
120 |
+
*/
|
121 |
+
public function filter_add_email_styling_fields( $fields ) {
|
122 |
+
return $this->container->make( Settings::class )->email_styling_fields( $fields );
|
123 |
+
}
|
124 |
+
}
|
src/Tickets/Emails/Provider.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The main service provider for the Tickets Emails.
|
4 |
+
*
|
5 |
+
* @since TBD
|
6 |
+
* @package TEC\Tickets\Emails
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace TEC\Tickets\Emails;
|
10 |
+
|
11 |
+
use tad_DI52_ServiceProvider;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Service provider for the Tickets Emails.
|
15 |
+
*
|
16 |
+
* @since TBD
|
17 |
+
* @package TEC\Tickets\Emails
|
18 |
+
*/
|
19 |
+
class Provider extends tad_DI52_ServiceProvider {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Register the provider singletons.
|
23 |
+
*
|
24 |
+
* @since TBD
|
25 |
+
*/
|
26 |
+
public function register() {
|
27 |
+
|
28 |
+
// If not enabled, do not load Tickets Emails system.
|
29 |
+
if ( ! tec_tickets_emails_is_enabled() ) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
|
33 |
+
$this->register_assets();
|
34 |
+
$this->register_hooks();
|
35 |
+
|
36 |
+
// Register singletons.
|
37 |
+
$this->container->singleton( static::class, $this );
|
38 |
+
$this->container->singleton( 'tickets.emails.provider', $this );
|
39 |
+
$this->container->singleton( Emails_Tab::class );
|
40 |
+
$this->container->singleton( 'tickets.emails.emails-tab', $this );
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Registers the provider handling all the 1st level filters and actions for Tickets Emails.
|
46 |
+
*
|
47 |
+
* @since TBD
|
48 |
+
*/
|
49 |
+
protected function register_assets() {
|
50 |
+
$assets = new Assets( $this->container );
|
51 |
+
$assets->register();
|
52 |
+
|
53 |
+
$this->container->singleton( Assets::class, $assets );
|
54 |
+
$this->container->singleton( 'tickets.emails.assets', $assets );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Registers the provider handling all the 1st level filters and actions for Tickets Emails.
|
59 |
+
*
|
60 |
+
* @since TBD
|
61 |
+
*/
|
62 |
+
protected function register_hooks() {
|
63 |
+
$hooks = new Hooks( $this->container );
|
64 |
+
$hooks->register();
|
65 |
+
|
66 |
+
// Allow Hooks to be removed, by having the them registered to the container
|
67 |
+
$this->container->singleton( Hooks::class, $hooks );
|
68 |
+
$this->container->singleton( 'tickets.emails.hooks', $hooks );
|
69 |
+
}
|
70 |
+
}
|
src/Tickets/Emails/Settings.php
ADDED
@@ -0,0 +1,347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Tickets Emails Settings class
|
5 |
+
*
|
6 |
+
* @since TBD
|
7 |
+
*
|
8 |
+
* @package TEC\Tickets\Emails
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace TEC\Tickets\Emails;
|
13 |
+
|
14 |
+
use TEC\Tickets\Commerce\Settings as CommerceSettings;
|
15 |
+
use Tribe__Template;
|
16 |
+
use Tribe__Tickets__Main;
|
17 |
+
|
18 |
+
class Settings {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The option key for email sender's name.
|
22 |
+
*
|
23 |
+
* @since TBD
|
24 |
+
*
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
public static $option_sender_name = 'tec-tickets-emails-sender-name';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* The option key for email sender's email.
|
31 |
+
*
|
32 |
+
* @since TBD
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
public static $option_sender_email = 'tec-tickets-emails-sender-email';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* The option key for the email header image url.
|
40 |
+
*
|
41 |
+
* @since TBD
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
public static $option_header_image_url = 'tec-tickets-emails-header-image-url';
|
46 |
+
|
47 |
+
/**
|
48 |
+
* The option key for the email header image alignment.
|
49 |
+
*
|
50 |
+
* @since TBD
|
51 |
+
*
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
public static $option_header_image_alignment = 'tec-tickets-emails-header-image-alignment';
|
55 |
+
|
56 |
+
/**
|
57 |
+
* The option key for the email header background color.
|
58 |
+
*
|
59 |
+
* @since TBD
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
public static $option_header_bg_color = 'tec-tickets-emails-header-bg-color';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* The option key for the email ticket background color.
|
67 |
+
*
|
68 |
+
* @since TBD
|
69 |
+
*
|
70 |
+
* @var string
|
71 |
+
*/
|
72 |
+
public static $option_ticket_bg_color = 'tec-tickets-emails-ticket-bg-color';
|
73 |
+
|
74 |
+
/**
|
75 |
+
* The option key for the email footer content.
|
76 |
+
*
|
77 |
+
* @since TBD
|
78 |
+
*
|
79 |
+
* @var string
|
80 |
+
*/
|
81 |
+
public static $option_footer_content = 'tec-tickets-emails-footer-content';
|
82 |
+
|
83 |
+
/**
|
84 |
+
* The option key for the email footer credit.
|
85 |
+
*
|
86 |
+
* @since TBD
|
87 |
+
*
|
88 |
+
* @var string
|
89 |
+
*/
|
90 |
+
public static $option_footer_credit = 'tec-tickets-emails-footer-credit';
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Gets the template instance used to setup the rendering html.
|
94 |
+
*
|
95 |
+
* @since TBD
|
96 |
+
*
|
97 |
+
* @return Tribe__Template
|
98 |
+
*/
|
99 |
+
public function get_template(): Tribe__Template {
|
100 |
+
if ( empty( $this->template ) ) {
|
101 |
+
$this->template = new Tribe__Template();
|
102 |
+
$this->template->set_template_origin( Tribe__Tickets__Main::instance() );
|
103 |
+
$this->template->set_template_folder( 'src/admin-views/settings/emails' );
|
104 |
+
$this->template->set_template_context_extract( true );
|
105 |
+
}
|
106 |
+
|
107 |
+
return $this->template;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Adds list of Templates to the Tickets Emails settings tab.
|
112 |
+
*
|
113 |
+
* @since TBD
|
114 |
+
*
|
115 |
+
* @param array $fields Current array of Tickets Emails settings fields.
|
116 |
+
*
|
117 |
+
* @return array $fields Filtered array of Tickets Emails settings fields.
|
118 |
+
*/
|
119 |
+
public function add_template_list( array $fields ): array {
|
120 |
+
|
121 |
+
$template = $this->get_template();
|
122 |
+
|
123 |
+
// @todo Replace this with array of actual Message Template objects that do not yet exist.
|
124 |
+
$templates = [
|
125 |
+
[
|
126 |
+
'title' => 'Ticket Email',
|
127 |
+
'enabled' => true,
|
128 |
+
'recipient' => 'Purchaser',
|
129 |
+
],
|
130 |
+
[
|
131 |
+
'title' => 'RSVP Email',
|
132 |
+
'enabled' => true,
|
133 |
+
'recipient' => 'Attendee',
|
134 |
+
],
|
135 |
+
[
|
136 |
+
'title' => 'Order Notification',
|
137 |
+
'enabled' => false,
|
138 |
+
'recipient' => 'Site Admin',
|
139 |
+
],
|
140 |
+
[
|
141 |
+
'title' => 'Order Failure',
|
142 |
+
'enabled' => true,
|
143 |
+
'recipient' => 'Site Admin',
|
144 |
+
],
|
145 |
+
];
|
146 |
+
|
147 |
+
$new_fields = [
|
148 |
+
[
|
149 |
+
'type' => 'html',
|
150 |
+
'html' => $template->template( 'message-templates', [ 'templates' => $templates ], false ),
|
151 |
+
],
|
152 |
+
];
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Filter the Tickets Emails Tab Template List
|
156 |
+
*
|
157 |
+
* @since TBD
|
158 |
+
*
|
159 |
+
* @param array $new_fields A settings array that includes the template list.
|
160 |
+
*/
|
161 |
+
$new_fields = apply_filters( 'tec_tickets_emails_settings_template_list', $new_fields );
|
162 |
+
|
163 |
+
return array_merge( $fields, $new_fields );
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Adds Sender Info fields to Tickets Emails settings.
|
168 |
+
*
|
169 |
+
* @since TBD
|
170 |
+
*
|
171 |
+
* @param [] $fields Current array of Tickets Emails settings fields.
|
172 |
+
*
|
173 |
+
* @return [] $fields Filtered array of Tickets Emails settings fields.
|
174 |
+
*/
|
175 |
+
public function sender_info_fields( array $fields ): array {
|
176 |
+
$new_fields = [
|
177 |
+
[
|
178 |
+
'type' => 'html',
|
179 |
+
'html' => '<h3>' . esc_html__( 'Sender Information', 'event-tickets' ) . '</h3>',
|
180 |
+
],
|
181 |
+
[
|
182 |
+
'type' => 'html',
|
183 |
+
'html' => '<p>' . esc_html__( 'If fields are empty, sender information will be from the site owner set in WordPress general settings.', 'event-tickets' ) . '</p>',
|
184 |
+
],
|
185 |
+
static::$option_sender_name => [
|
186 |
+
'type' => 'text',
|
187 |
+
'label' => esc_html__( 'Sender Name', 'event-tickets' ),
|
188 |
+
'size' => 'medium',
|
189 |
+
'default' => $this->get_sender_name(),
|
190 |
+
'validation_callback' => 'is_string',
|
191 |
+
'validation_type' => 'textarea',
|
192 |
+
],
|
193 |
+
static::$option_sender_email => [
|
194 |
+
'type' => 'text',
|
195 |
+
'label' => esc_html__( 'Sender Email', 'event-tickets' ),
|
196 |
+
'size' => 'medium',
|
197 |
+
'default' => $this->get_sender_email(),
|
198 |
+
'validation_callback' => 'is_string',
|
199 |
+
'validation_type' => 'email',
|
200 |
+
],
|
201 |
+
];
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Filter the Tickets Emails Sender Info Fields
|
205 |
+
*
|
206 |
+
* @since TBD
|
207 |
+
*
|
208 |
+
* @param array $new_fields A settings array that includes the sender info fields.
|
209 |
+
*/
|
210 |
+
$new_fields = apply_filters( 'tec_tickets_emails_settings_sender_info_fields', $new_fields );
|
211 |
+
|
212 |
+
return array_merge( $fields, $new_fields );
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Get sender name.
|
217 |
+
*
|
218 |
+
* @since TBD
|
219 |
+
*
|
220 |
+
* @return string Sender's name.
|
221 |
+
*/
|
222 |
+
public function get_sender_name(): string {
|
223 |
+
// Get name from settings.
|
224 |
+
$name = tribe_get_option( CommerceSettings::$option_confirmation_email_sender_name );
|
225 |
+
if ( ! empty( $name ) ) {
|
226 |
+
return $name;
|
227 |
+
}
|
228 |
+
// If not set, return WordPress User `nicename`.
|
229 |
+
$current_user = get_user_by( 'id', get_current_user_id() );
|
230 |
+
return $current_user->user_nicename;
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Get sender email.
|
235 |
+
*
|
236 |
+
* @since TBD
|
237 |
+
*
|
238 |
+
* @return string Sender's email address.
|
239 |
+
*/
|
240 |
+
public function get_sender_email(): string {
|
241 |
+
// Get email from settings.
|
242 |
+
$email = tribe_get_option( CommerceSettings::$option_confirmation_email_sender_email );
|
243 |
+
if ( ! empty( $email ) ) {
|
244 |
+
return $email;
|
245 |
+
}
|
246 |
+
// If not set, return WordPress User `email`.
|
247 |
+
$current_user = get_user_by( 'id', get_current_user_id() );
|
248 |
+
return $current_user->user_email;
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Adds Sender Info fields to Tickets Emails settings.
|
253 |
+
*
|
254 |
+
* @since TBD
|
255 |
+
*
|
256 |
+
* @param [] $fields Current array of Tickets Emails settings fields.
|
257 |
+
*
|
258 |
+
* @return [] $fields Filtered array of Tickets Emails settings fields.
|
259 |
+
*/
|
260 |
+
public function email_styling_fields( array $fields ): array {
|
261 |
+
|
262 |
+
$new_fields = [
|
263 |
+
[
|
264 |
+
'type' => 'html',
|
265 |
+
'html' => '<h3>' . esc_html__( 'Email Styling', 'event-tickets' ) . '</h3>',
|
266 |
+
],
|
267 |
+
[
|
268 |
+
'type' => 'html',
|
269 |
+
'html' => '<p>' . esc_html__( 'Add a logo and customize link colors and footer information to personalize your communications. If you\'d like more granular control over email styling, you can override the email templates in your theme. Learn More', 'event-tickets' ) . '</p>',
|
270 |
+
],
|
271 |
+
static::$option_header_image_url => [
|
272 |
+
'type' => 'image',
|
273 |
+
'label' => esc_html__( 'Header Image', 'event-tickets' ),
|
274 |
+
'size' => 'medium',
|
275 |
+
'default' => '',
|
276 |
+
'validation_callback' => 'is_string',
|
277 |
+
'validation_type' => 'url',
|
278 |
+
],
|
279 |
+
static::$option_header_image_alignment => [
|
280 |
+
'type' => 'dropdown',
|
281 |
+
'label' => esc_html__( 'Image Alignment', 'event-tickets' ),
|
282 |
+
'default' => 'left',
|
283 |
+
'validation_type' => 'options',
|
284 |
+
'options' => [
|
285 |
+
'left' => esc_html__( 'Left', 'event-tickets' ),
|
286 |
+
'center' => esc_html__( 'Center', 'event-tickets' ),
|
287 |
+
'right' => esc_html__( 'Right', 'event-tickets' ),
|
288 |
+
],
|
289 |
+
],
|
290 |
+
static::$option_header_bg_color => [
|
291 |
+
'type' => 'color',
|
292 |
+
'label' => esc_html__( 'Header/Footer Background', 'event-tickets' ),
|
293 |
+
'size' => 'medium',
|
294 |
+
'default' => '#ffffff',
|
295 |
+
'validation_callback' => 'is_string',
|
296 |
+
'validation_type' => 'color',
|
297 |
+
],
|
298 |
+
static::$option_ticket_bg_color => [
|
299 |
+
'type' => 'color',
|
300 |
+
'label' => esc_html__( 'Ticket Color', 'event-tickets' ),
|
301 |
+
'size' => 'medium',
|
302 |
+
'default' => '#ffffff',
|
303 |
+
'validation_callback' => 'is_string',
|
304 |
+
'validation_type' => 'color',
|
305 |
+
],
|
306 |
+
static::$option_footer_content => [
|
307 |
+
'type' => 'wysiwyg',
|
308 |
+
'label' => esc_html__( 'Footer Content', 'event-tickets' ),
|
309 |
+
'tooltip' => esc_html__( 'Add custom links and instructions to the bottom of your emails.', 'event-tickets' ),
|
310 |
+
'default' => '',
|
311 |
+
'validation_type' => 'html',
|
312 |
+
'settings' => [
|
313 |
+
'media_buttons' => false,
|
314 |
+
'quicktags' => false,
|
315 |
+
'editor_height' => 200,
|
316 |
+
'buttons' => [
|
317 |
+
'bold',
|
318 |
+
'italic',
|
319 |
+
'underline',
|
320 |
+
'strikethrough',
|
321 |
+
'alignleft',
|
322 |
+
'aligncenter',
|
323 |
+
'alignright',
|
324 |
+
],
|
325 |
+
]
|
326 |
+
],
|
327 |
+
static::$option_footer_credit => [
|
328 |
+
'type' => 'checkbox_bool',
|
329 |
+
'label' => esc_html__( 'Footer Credit', 'event-tickets' ),
|
330 |
+
'tooltip' => esc_html__( 'Include "Ticket powered by Event Tickets" in the footer', 'event-tickets' ),
|
331 |
+
'default' => true,
|
332 |
+
'validation_type' => 'boolean',
|
333 |
+
],
|
334 |
+
];
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Filter the Tickets Emails Styling Fields
|
338 |
+
*
|
339 |
+
* @since TBD
|
340 |
+
*
|
341 |
+
* @param array $new_fields A settings array that includes the styling fields.
|
342 |
+
*/
|
343 |
+
$new_fields = apply_filters( 'tec_tickets_emails_settings_email_styling_fields', $new_fields );
|
344 |
+
|
345 |
+
return array_merge( $fields, $new_fields );
|
346 |
+
}
|
347 |
+
}
|
src/Tickets/Provider.php
CHANGED
@@ -38,6 +38,7 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
38 |
}
|
39 |
|
40 |
require_once Tickets_Plugin::instance()->plugin_path . 'src/functions/commerce/provider.php';
|
|
|
41 |
|
42 |
$this->register_hooks();
|
43 |
$this->register_assets();
|
@@ -52,6 +53,9 @@ class Provider extends tad_DI52_ServiceProvider {
|
|
52 |
// Load compatibility with ECP Recurrence engine.
|
53 |
$this->container->register( Recurrence\Provider::class );
|
54 |
|
|
|
|
|
|
|
55 |
// Loads admin area.
|
56 |
$this->container->register( Admin\Provider::class );
|
57 |
|
38 |
}
|
39 |
|
40 |
require_once Tickets_Plugin::instance()->plugin_path . 'src/functions/commerce/provider.php';
|
41 |
+
require_once Tickets_Plugin::instance()->plugin_path . 'src/functions/emails/provider.php';
|
42 |
|
43 |
$this->register_hooks();
|
44 |
$this->register_assets();
|
53 |
// Load compatibility with ECP Recurrence engine.
|
54 |
$this->container->register( Recurrence\Provider::class );
|
55 |
|
56 |
+
// Loads all of tickets emails.
|
57 |
+
$this->container->register( Emails\Provider::class );
|
58 |
+
|
59 |
// Loads admin area.
|
60 |
$this->container->register( Admin\Provider::class );
|
61 |
|
src/Tribe/Main.php
CHANGED
@@ -8,7 +8,7 @@ class Tribe__Tickets__Main {
|
|
8 |
/**
|
9 |
* Current version of this plugin
|
10 |
*/
|
11 |
-
const VERSION = '5.5.
|
12 |
|
13 |
/**
|
14 |
* Used to store the version history.
|
8 |
/**
|
9 |
* Current version of this plugin
|
10 |
*/
|
11 |
+
const VERSION = '5.5.4';
|
12 |
|
13 |
/**
|
14 |
* Used to store the version history.
|
src/admin-views/settings/emails/message-templates.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Emails Message Template List
|
4 |
+
*
|
5 |
+
* @since TBD List of email message templates for Emails settings tab.
|
6 |
+
*
|
7 |
+
* @var Array[] $templates Array of template info.
|
8 |
+
*/
|
9 |
+
|
10 |
+
// @todo $templates variable will be an array of Message_Template objects in the future.
|
11 |
+
|
12 |
+
// If no templates, bail.
|
13 |
+
if ( empty( $templates ) ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
?>
|
18 |
+
<div class="tec-tickets__admin-settings-emails-template-list">
|
19 |
+
<?php foreach ( $templates as $email_template ) : ?>
|
20 |
+
<?php $this->template( 'message-templates/list-item', [ 'template' => $email_template ] ); ?>
|
21 |
+
<?php endforeach; ?>
|
22 |
+
</div>
|
src/admin-views/settings/emails/message-templates/list-action.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Emails Message Template List Action
|
4 |
+
*
|
5 |
+
* @since TBD Action links for list item of email message templates for Emails settings tab.
|
6 |
+
*
|
7 |
+
* @var Array[] $templates Array of template info.
|
8 |
+
* @var Array $template Template info.
|
9 |
+
*/
|
10 |
+
|
11 |
+
// @todo $templates variable will be an array of Message_Template objects in the future.
|
12 |
+
// @todo $template variable will be a Message_Template object in the future.
|
13 |
+
|
14 |
+
// If no template, bail.
|
15 |
+
if ( empty( $template ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="tec-tickets__admin-settings-emails-template-list-item-action">
|
21 |
+
<a href="#" class="tec-tickets__admin-settings-emails-template-list-item-action-link dashicons dashicons-edit"></a>
|
22 |
+
</div>
|
src/admin-views/settings/emails/message-templates/list-icon.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Emails Message Template List Icon
|
4 |
+
*
|
5 |
+
* @since TBD Icon (checkmark) for list item of email message templates for Emails settings tab.
|
6 |
+
*
|
7 |
+
* @var Array[] $templates Array of template info.
|
8 |
+
* @var Array $template Template info.
|
9 |
+
*/
|
10 |
+
|
11 |
+
// @todo $templates variable will be an array of Message_Template objects in the future.
|
12 |
+
// @todo $template variable will be a Message_Template object in the future.
|
13 |
+
|
14 |
+
// If no template, bail.
|
15 |
+
if ( empty( $template ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
$icon_classes = [ 'dashicons' ];
|
20 |
+
$icon_classes[] = tribe_is_truthy( $template['enabled'] ) ? 'dashicons-yes' : '';
|
21 |
+
|
22 |
+
?>
|
23 |
+
<div class="tec-tickets__admin-settings-emails-template-list-item-icon">
|
24 |
+
<span <?php tribe_classes( $icon_classes ); ?> ></span>
|
25 |
+
</div>
|
src/admin-views/settings/emails/message-templates/list-item.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Emails Message Template List Item
|
4 |
+
*
|
5 |
+
* @since TBD List item of email message templates for Emails settings tab.
|
6 |
+
*
|
7 |
+
* @var Array[] $templates Array of template info.
|
8 |
+
* @var Array $template Template info.
|
9 |
+
*/
|
10 |
+
|
11 |
+
// @todo $templates variable will be an array of Message_Template objects in the future.
|
12 |
+
// @todo $template variable will be a Message_Template object in the future.
|
13 |
+
|
14 |
+
// If no template, bail.
|
15 |
+
if ( empty( $template ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
$item_classes = [ 'tec-tickets__admin-settings-emails-template-list-item' ];
|
20 |
+
$item_classes[] = tribe_is_truthy( $template['enabled'] ) ?
|
21 |
+
'tec-tickets__admin-settings-emails-template-list-item--enabled' :
|
22 |
+
'tec-tickets__admin-settings-emails-template-list-item--disabled';
|
23 |
+
|
24 |
+
?>
|
25 |
+
<div <?php tribe_classes( $item_classes ); ?> >
|
26 |
+
<?php $this->template( 'message-templates/list-icon' ); ?>
|
27 |
+
<?php $this->template( 'message-templates/list-title' ); ?>
|
28 |
+
<?php $this->template( 'message-templates/list-recipient' ); ?>
|
29 |
+
<?php $this->template( 'message-templates/list-action' ); ?>
|
30 |
+
</div>
|
src/admin-views/settings/emails/message-templates/list-recipient.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Emails Message Template List Recipient
|
4 |
+
*
|
5 |
+
* @since TBD Recipient for list item of email message templates for Emails settings tab.
|
6 |
+
*
|
7 |
+
* @var Array[] $templates Array of template info.
|
8 |
+
* @var Array $template Template info.
|
9 |
+
*/
|
10 |
+
|
11 |
+
// @todo $templates variable will be an array of Message_Template objects in the future.
|
12 |
+
// @todo $template variable will be a Message_Template object in the future.
|
13 |
+
|
14 |
+
// If no template, bail.
|
15 |
+
if ( empty( $template ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="tec-tickets__admin-settings-emails-template-list-item-recipient">
|
21 |
+
To: <?php echo esc_html( $template['recipient'] ); ?>
|
22 |
+
</div>
|
src/admin-views/settings/emails/message-templates/list-title.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tickets Emails Message Template List Title
|
4 |
+
*
|
5 |
+
* @since TBD Title for list item of email message templates for Emails settings tab.
|
6 |
+
*
|
7 |
+
* @var Array[] $templates Array of template info.
|
8 |
+
* @var Array $template Template info.
|
9 |
+
*/
|
10 |
+
|
11 |
+
// @todo $templates variable will be an array of Message_Template objects in the future.
|
12 |
+
// @todo $template variable will be a Message_Template object in the future.
|
13 |
+
|
14 |
+
// If no template, bail.
|
15 |
+
if ( empty( $template ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="tec-tickets__admin-settings-emails-template-list-item-title">
|
21 |
+
<?php echo esc_html( $template['title'] ); ?>
|
22 |
+
</div>
|
src/functions/emails/provider.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Checks whether out new Tickets Emails system should load.
|
5 |
+
*
|
6 |
+
* In order the function will check the `TEC_TICKETS_EMAILS` constant,
|
7 |
+
* the `TEC_TICKETS_EMAILS` environment variable and, finally, the `Manager::$option_enabled` option.
|
8 |
+
*
|
9 |
+
* @since TBD
|
10 |
+
*
|
11 |
+
* @return bool Whether Tickets Emails is enabled or not.
|
12 |
+
*/
|
13 |
+
function tec_tickets_emails_is_enabled(): bool {
|
14 |
+
if ( defined( 'TEC_TICKETS_EMAILS' ) ) {
|
15 |
+
return (bool) TEC_TICKETS_EMAILS;
|
16 |
+
}
|
17 |
+
|
18 |
+
$env_var = getenv( 'TEC_TICKETS_EMAILS' );
|
19 |
+
if ( false !== $env_var ) {
|
20 |
+
return (bool) $env_var;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Allows filtering of the Tickets Emails provider.
|
25 |
+
*
|
26 |
+
* @since TBD
|
27 |
+
*
|
28 |
+
* @param boolean $enabled Determining if Tickets Emails is enabled
|
29 |
+
*/
|
30 |
+
return apply_filters( 'tec_tickets_emails_is_enabled', false );
|
31 |
+
}
|
src/modules/blocks/rsvp/template.js
CHANGED
@@ -8,7 +8,8 @@ import classNames from 'classnames';
|
|
8 |
/**
|
9 |
* WordPress dependencies
|
10 |
*/
|
11 |
-
import { Spinner } from '@wordpress/components';
|
|
|
12 |
|
13 |
/**
|
14 |
* Internal dependencies
|
@@ -19,8 +20,6 @@ import RSVPInactiveBlock from './inactive-block/container';
|
|
19 |
import MoveModal from '@moderntribe/tickets/elements/move-modal';
|
20 |
import './style.pcss';
|
21 |
|
22 |
-
const { __ } = wp.i18n;
|
23 |
-
|
24 |
class RSVP extends PureComponent {
|
25 |
static propTypes = {
|
26 |
clientId: PropTypes.string.isRequired,
|
@@ -72,22 +71,26 @@ class RSVP extends PureComponent {
|
|
72 |
}
|
73 |
|
74 |
renderBlockNotSupported() {
|
75 |
-
const { clientId
|
76 |
return (
|
77 |
<div className="tribe-editor__not-supported-message">
|
78 |
<p className="tribe-editor__not-supported-message-text">
|
79 |
-
{__( 'RSVPs are not yet supported on recurring events.', 'event-tickets' )}
|
80 |
-
<br/>
|
81 |
<a
|
82 |
className="tribe-editor__not-supported-message-link"
|
83 |
href="https://evnt.is/1b7a"
|
84 |
target="_blank"
|
85 |
rel="noopener noreferrer"
|
86 |
>
|
87 |
-
{__( 'Read about our plans for future features.', 'event-tickets' )}
|
88 |
</a>
|
89 |
-
<br/>
|
90 |
-
<
|
|
|
|
|
|
|
|
|
91 |
</p>
|
92 |
</div>
|
93 |
);
|
8 |
/**
|
9 |
* WordPress dependencies
|
10 |
*/
|
11 |
+
import { Spinner, Button } from '@wordpress/components';
|
12 |
+
import { __ } from '@wordpress/i18n';
|
13 |
|
14 |
/**
|
15 |
* Internal dependencies
|
20 |
import MoveModal from '@moderntribe/tickets/elements/move-modal';
|
21 |
import './style.pcss';
|
22 |
|
|
|
|
|
23 |
class RSVP extends PureComponent {
|
24 |
static propTypes = {
|
25 |
clientId: PropTypes.string.isRequired,
|
71 |
}
|
72 |
|
73 |
renderBlockNotSupported() {
|
74 |
+
const { clientId } = this.props;
|
75 |
return (
|
76 |
<div className="tribe-editor__not-supported-message">
|
77 |
<p className="tribe-editor__not-supported-message-text">
|
78 |
+
{ __( 'RSVPs are not yet supported on recurring events.', 'event-tickets' ) }
|
79 |
+
<br />
|
80 |
<a
|
81 |
className="tribe-editor__not-supported-message-link"
|
82 |
href="https://evnt.is/1b7a"
|
83 |
target="_blank"
|
84 |
rel="noopener noreferrer"
|
85 |
>
|
86 |
+
{ __( 'Read about our plans for future features.', 'event-tickets' ) }
|
87 |
</a>
|
88 |
+
<br />
|
89 |
+
<Button variant="secondary" onClick={ () =>
|
90 |
+
wp.data.dispatch( 'core/block-editor' ).removeBlock( clientId ) }
|
91 |
+
>
|
92 |
+
{ __( 'Remove block', 'event-tickets' ) }
|
93 |
+
</Button>
|
94 |
</p>
|
95 |
</div>
|
96 |
);
|
src/modules/blocks/tickets/template.js
CHANGED
@@ -5,6 +5,12 @@ import React, { Fragment, PureComponent } from 'react';
|
|
5 |
import PropTypes from 'prop-types';
|
6 |
import classNames from 'classnames';
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
* Internal dependencies
|
10 |
*/
|
@@ -13,8 +19,6 @@ import TicketsContainer from './container/container';
|
|
13 |
import TicketControls from './controls/container';
|
14 |
import './style.pcss';
|
15 |
|
16 |
-
const { __ } = wp.i18n;
|
17 |
-
|
18 |
class Tickets extends PureComponent {
|
19 |
static propTypes = {
|
20 |
canCreateTickets: PropTypes.bool,
|
@@ -38,38 +42,41 @@ class Tickets extends PureComponent {
|
|
38 |
|
39 |
renderBlock() {
|
40 |
const {
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
return (
|
47 |
<Fragment>
|
48 |
-
<TicketsContainer isSelected={isSelected}/>
|
49 |
-
{canCreateTickets && <TicketsDashboard isSelected={isSelected} clientId={clientId}/>}
|
50 |
-
<TicketControls/>
|
51 |
</Fragment>
|
52 |
);
|
53 |
-
|
54 |
}
|
55 |
|
56 |
renderBlockNotSupported() {
|
57 |
-
const { clientId
|
58 |
return (
|
59 |
<div className="tribe-editor__not-supported-message">
|
60 |
<p className="tribe-editor__not-supported-message-text">
|
61 |
-
{__( 'Tickets are not yet supported for on recurring events.', 'event-tickets' )}
|
62 |
-
<br/>
|
63 |
<a
|
64 |
className="tribe-editor__not-supported-message-link"
|
65 |
href="https://evnt.is/1b7a"
|
66 |
target="_blank"
|
67 |
rel="noopener noreferrer"
|
68 |
>
|
69 |
-
{__( 'Read about our plans for future features.', 'event-tickets' )}
|
70 |
</a>
|
71 |
-
<br/>
|
72 |
-
<
|
|
|
|
|
|
|
|
|
73 |
</p>
|
74 |
</div>
|
75 |
);
|
@@ -88,11 +95,11 @@ class Tickets extends PureComponent {
|
|
88 |
|
89 |
return (
|
90 |
<div
|
91 |
-
className={classNames(
|
92 |
'tribe-editor__tickets',
|
93 |
{ 'tribe-editor__tickets--selected': isSelected },
|
94 |
-
{ 'tribe-editor__tickets--settings-open': isSettingsOpen }
|
95 |
-
)}
|
96 |
>
|
97 |
{this.renderContent()}
|
98 |
</div>
|
5 |
import PropTypes from 'prop-types';
|
6 |
import classNames from 'classnames';
|
7 |
|
8 |
+
/**
|
9 |
+
* WordPress dependencies
|
10 |
+
*/
|
11 |
+
import { __ } from '@wordpress/i18n';
|
12 |
+
import { Button } from '@wordpress/components';
|
13 |
+
|
14 |
/**
|
15 |
* Internal dependencies
|
16 |
*/
|
19 |
import TicketControls from './controls/container';
|
20 |
import './style.pcss';
|
21 |
|
|
|
|
|
22 |
class Tickets extends PureComponent {
|
23 |
static propTypes = {
|
24 |
canCreateTickets: PropTypes.bool,
|
42 |
|
43 |
renderBlock() {
|
44 |
const {
|
45 |
+
isSelected,
|
46 |
+
clientId,
|
47 |
+
canCreateTickets,
|
48 |
+
} = this.props;
|
49 |
|
50 |
return (
|
51 |
<Fragment>
|
52 |
+
<TicketsContainer isSelected={ isSelected } />
|
53 |
+
{ canCreateTickets && <TicketsDashboard isSelected={ isSelected } clientId={ clientId } /> }
|
54 |
+
<TicketControls />
|
55 |
</Fragment>
|
56 |
);
|
|
|
57 |
}
|
58 |
|
59 |
renderBlockNotSupported() {
|
60 |
+
const { clientId } = this.props;
|
61 |
return (
|
62 |
<div className="tribe-editor__not-supported-message">
|
63 |
<p className="tribe-editor__not-supported-message-text">
|
64 |
+
{ __( 'Tickets are not yet supported for on recurring events.', 'event-tickets' ) }
|
65 |
+
<br />
|
66 |
<a
|
67 |
className="tribe-editor__not-supported-message-link"
|
68 |
href="https://evnt.is/1b7a"
|
69 |
target="_blank"
|
70 |
rel="noopener noreferrer"
|
71 |
>
|
72 |
+
{ __( 'Read about our plans for future features.', 'event-tickets' ) }
|
73 |
</a>
|
74 |
+
<br />
|
75 |
+
<Button variant="secondary" onClick={ () =>
|
76 |
+
wp.data.dispatch( 'core/block-editor' ).removeBlock( clientId )
|
77 |
+
}>
|
78 |
+
{ __( 'Remove block', 'event-tickets' ) }
|
79 |
+
</Button>
|
80 |
</p>
|
81 |
</div>
|
82 |
);
|
95 |
|
96 |
return (
|
97 |
<div
|
98 |
+
className={ classNames(
|
99 |
'tribe-editor__tickets',
|
100 |
{ 'tribe-editor__tickets--selected': isSelected },
|
101 |
+
{ 'tribe-editor__tickets--settings-open': isSettingsOpen },
|
102 |
+
) }
|
103 |
>
|
104 |
{this.renderContent()}
|
105 |
</div>
|
src/resources/css/tickets-admin-settings.css
CHANGED
@@ -1352,6 +1352,77 @@ body.events-cal .tribe-common div.tribe-dialog, body.events-cal .event-tickets d
|
|
1352 |
font-weight: var(--tec-font-weight-bold);
|
1353 |
}
|
1354 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1355 |
/* @todo: Check this, see if it goes to common or where should we place it. */
|
1356 |
|
1357 |
.tribe-settings-form-wrap h3 {
|
@@ -1408,6 +1479,10 @@ body.events-cal .tribe-common div.tribe-dialog, body.events-cal .event-tickets d
|
|
1408 |
display: flex;
|
1409 |
text-align: left
|
1410 |
}
|
|
|
|
|
|
|
|
|
1411 |
}
|
1412 |
|
1413 |
@media (min-width: 960px) {
|
1352 |
font-weight: var(--tec-font-weight-bold);
|
1353 |
}
|
1354 |
|
1355 |
+
/**
|
1356 |
+
* Event Tickets Emails Admin Settings
|
1357 |
+
*
|
1358 |
+
* @since TBD
|
1359 |
+
*/
|
1360 |
+
|
1361 |
+
.tec-tickets__admin-settings-emails-template-list {
|
1362 |
+
background: var(--tec-color-background);
|
1363 |
+
border: 1px var(--tec-color-border-default) solid;
|
1364 |
+
border-radius: var(--tec-border-radius-default);
|
1365 |
+
margin-bottom: var(--tec-spacer-5);
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
.tec-tickets__admin-settings-emails-template-list-item {
|
1369 |
+
align-items: center;
|
1370 |
+
border-top: 1px solid var(--tec-color-border-default);
|
1371 |
+
display: flex;
|
1372 |
+
justify-content: flex-start;
|
1373 |
+
min-height: 54px;
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
.tec-tickets__admin-settings-emails-template-list-item:first-of-type {
|
1377 |
+
border-top: none;
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
.tec-tickets__admin-settings-emails-template-list-item--disabled {
|
1381 |
+
color: var(--tec-color-text-disabled);
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
.tec-tickets__admin-settings-emails-template-list-item-icon {
|
1385 |
+
padding: 0 var(--tec-spacer-4);
|
1386 |
+
width: 25px;
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
.tec-tickets__admin-settings-emails-template-list-item-icon > span.dashicons-yes {
|
1390 |
+
color: #1eb056;
|
1391 |
+
height: 25px;
|
1392 |
+
width: 25px;
|
1393 |
+
}
|
1394 |
+
|
1395 |
+
.tec-tickets__admin-settings-emails-template-list-item-icon > span.dashicons-yes:before {
|
1396 |
+
font-size: 25px;
|
1397 |
+
font-weight: var(--tec-font-weight-regular);
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
.tec-tickets__admin-settings-emails-template-list-item-title {
|
1401 |
+
font-size: 15px;
|
1402 |
+
font-weight: var(--tec-font-weight-bold);
|
1403 |
+
min-width: 90px;
|
1404 |
+
padding: 0 var(--tec-spacer-4) 0 0;
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
.tec-tickets__admin-settings-emails-template-list-item-recipient {
|
1408 |
+
flex-grow: 1;
|
1409 |
+
font-size: 13px;
|
1410 |
+
font-weight: var(--tec-font-weight-regular);
|
1411 |
+
padding: 0;
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
.tec-tickets__admin-settings-emails-template-list-item-action {
|
1415 |
+
padding: 0 var(--tec-spacer-4);
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
.tec-tickets__admin-settings-emails-template-list-item-action-link {
|
1419 |
+
color: var(--tec-color-icon-secondary);
|
1420 |
+
}
|
1421 |
+
|
1422 |
+
.tec-tickets__admin-settings-emails-template-list-item-action-link:hover {
|
1423 |
+
color: var(--tec-color-event-icon-hover);
|
1424 |
+
}
|
1425 |
+
|
1426 |
/* @todo: Check this, see if it goes to common or where should we place it. */
|
1427 |
|
1428 |
.tribe-settings-form-wrap h3 {
|
1479 |
display: flex;
|
1480 |
text-align: left
|
1481 |
}
|
1482 |
+
|
1483 |
+
.tec-tickets__admin-settings-emails-template-list-item-title {
|
1484 |
+
min-width: 200px
|
1485 |
+
}
|
1486 |
}
|
1487 |
|
1488 |
@media (min-width: 960px) {
|
src/resources/css/tickets-admin-settings.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.tec-tickets__admin-banner{background-color:#f9f9f9;border:1px solid #ccc;border-left:5px solid #50b078;border-radius:4px;margin:20px 0;padding:8px 24px 12px}.tec-tickets__admin-banner a{text-decoration:none}.tec-tickets__admin-banner p.tec-tickets__admin-banner-help-text{max-width:690px}.tec-tickets__admin-banner-help-links-wrapper{display:flex;max-width:690px}.tec-tickets__admin-banner-help-links-wrapper div{min-width:50%}.tec-tickets__admin-banner-links h3{font-size:14px}.tec-tickets__admin-banner-links-link-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;margin-left:8px;padding:3px 5px;text-transform:uppercase}.tec-tickets__admin-tc-banner-header-title{font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-5);line-height:var(--tec-line-height-0);margin:0;padding:0}.tec-tickets__admin-tc-banner-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;letter-spacing:1px;line-height:1;margin-bottom:3px;margin-left:8px;padding:3px 8px;text-transform:uppercase}.tec-tickets__admin-tc-banner-header{align-items:center;display:flex;justify-content:start;padding-top:var(--tec-spacer-4)}.tec-tickets__admin-tc-banner-footer{align-items:center;display:flex;justify-content:start;padding-bottom:var(--tec-spacer-4);padding-top:var(--tec-spacer-3)}.tec-tickets__admin-tc-banner-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:#405bfb;color:#fff;margin-right:var(--tec-spacer-5);padding:var(--tec-spacer-1) var(--tec-spacer-5)}.tec-tickets__admin-tc-banner-button:active,.tec-tickets__admin-tc-banner-button:focus,.tec-tickets__admin-tc-banner-button:hover{background-color:var(--tec-color-accent-primary-hover);color:#fff}a.tec-tickets__admin-tc-banner-link{color:#405bfb;text-decoration:underline}a.tec-tickets__admin-tc-banner-link:active,a.tec-tickets__admin-tc-banner-link:focus,a.tec-tickets__admin-tc-banner-link:hover{color:var(--tec-color-accent-primary-hover);text-decoration:none}#tribe-field-tickets-commerce-paypal-commerce-configure,#tribe-field-tickets-commerce-stripe-commerce-configure{padding-left:0;width:100%}#tribe-field-tickets-commerce-paypal-commerce-configure .tribe-field-wrap,#tribe-field-tickets-commerce-stripe-commerce-configure .tribe-field-wrap{float:none;max-width:none}.tec-tickets__admin-settings-tickets-commerce-toggle-wrapper{margin-bottom:20px;margin-top:45px}.tec-tickets__admin-settings-tickets-commerce-toggle{cursor:pointer;display:flex}.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#ccc;border-radius:16px;display:inline-block;height:22px;position:relative;transition:background .4s;vertical-align:middle;width:40px}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:after,.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{content:""}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#eee);border-radius:50%;display:block;height:16px;left:3px;position:absolute;top:3px;transition:left .4s;width:16px}.tec-tickets__admin-settings-tickets-commerce-toggle:hover .tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#fff)}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#278dbc}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{left:20px}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox{position:absolute;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-toggle-label{color:#1d2327;font-size:20px;font-weight:600;line-height:23px;margin-left:15px;position:relative}.tec-tickets__admin-settings-tickets-commerce-description{font-size:13px;font-weight:400;margin-bottom:35px;max-width:84%}.tec-tickets__admin-settings-tickets-commerce-gateway{background:#fff;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-around;margin-bottom:var(--tec-spacer-3);padding:45px 32px 20px}.tec-tickets__admin-settings-tickets-commerce-gateway-title{font-size:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-description{align-items:start;display:flex;flex-direction:column;flex-grow:1;margin-bottom:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-description p{max-width:470px}.tec-tickets__admin-settings-tickets-commerce-gateway-signup-links{flex-grow:1;margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateway-help-links{margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link{align-items:center;display:flex}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link:not(:last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link{margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:active,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:visited,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:active,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul{list-style:none;margin:inherit}.tec-tickets__admin-settings-tickets-commerce-gateway-logo li{line-height:1.8;margin-bottom:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul li:before{background-color:#405bfb;border-radius:100%;content:"";display:inline-block;height:7px;margin-right:7px;width:7px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo{display:none;flex-basis:290px;font-size:13px;font-style:italic;font-weight:400;letter-spacing:.02em;line-height:16px;margin-bottom:var(--tec-spacer-4)}.tec-tickets__admin-settings-tickets-commerce-gateway-logo-image{height:auto;margin-bottom:32px;max-width:232px;width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-connect{display:flex;flex:1}.tec-tickets__admin-settings-tickets-commerce-gateway-connect-text--connected{color:#1eb056;font-size:16px;font-weight:600}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-row{display:flex;font-size:13px;font-weight:400;margin:20px 0;text-align:left}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1{flex-basis:20%;min-width:125px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2{flex-basis:80%}.tec-tickets__admin-settings-tickets-commerce-gateway-connect,.tec-tickets__admin-settings-tickets-commerce-gateway-logo{flex-direction:column}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link{background:#405bfb;border-radius:4px;color:#fff;display:inline-block;font-size:16px;font-weight:600;line-height:18px;margin-top:25px;min-width:340px;padding:15px 0;text-align:center;text-decoration:none;width:100%}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:active,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:focus,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:hover,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:visited{color:#fff}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link.disabled{background-color:var(--tec-color-button-primary-background);pointer-events:none}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name{font-weight:700}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link{border-bottom:1px solid #405bfb;font-size:13px;margin-left:10px;text-transform:lowercase}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:active,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-gateway-currency{color:var(--tec-color-text-primary);font-weight:700}.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message{color:#a3a3a3;margin-top:var(--tec-spacer-1)}.tec-tickets__admin-settings-tickets-commerce-gateway-capability--no,.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message--error{color:var(--tec-color-icon-error)}.tec-tickets__admin-settings-tickets-commerce-gateway-capability--yes{color:#1eb056}.tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings{max-width:340px;width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error{display:none!important;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-name,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name{color:var(--tec-color-text-primary-light);text-decoration:line-through}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error{color:var(--color-icon-error);margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions-debug{margin-top:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:var(--tec-color-button-primary);padding:11px 20px;width:auto}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:disabled{background-color:var(--tec-color-button-primary-background)}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon{margin-right:8px;position:relative;stroke:#fff;top:3px;width:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon path{fill:none}.event-tickets.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice,.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice{display:block}.event-tickets.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn,.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn{width:auto}.event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list,.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list{list-style:initial;margin:1em 0;padding-left:16px}.event-tickets.tribe-modal__wrapper--gateway-connected p,.tribe-common.tribe-modal__wrapper--gateway-connected p{margin:1em 0}.event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons,.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons{display:flex;justify-content:flex-end;margin-top:26px}body.events-cal .event-tickets div.tribe-dialog,body.events-cal .tribe-common div.tribe-dialog{z-index:99999}.event-tickets .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error,.tribe-common .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error{display:block}.event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section,.event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title,.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section,.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title{margin-bottom:var(--tec-spacer-3)}#paypal-connected-modal-button,#stripe-connected-modal-button{display:none}.tec-tickets__admin-settings-tickets-commerce-section-menu{padding-top:var(--tec-spacer-6)}.tec-tickets__admin-settings-tickets-commerce-section-menu-link{border-bottom-color:#c4c4c4;border-bottom-style:solid;border-bottom-width:1px;color:#23282d;display:inline-block;font-size:var(--tec-font-size-2);margin-right:var(--tec-spacer-5);padding-bottom:var(--tec-spacer-1);text-decoration:none}.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active{border-bottom-width:var(--tec-spacer-0);font-weight:700}.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active,.tec-tickets__admin-settings-tickets-commerce-section-menu-link:hover{border-bottom-color:var(--tec-color-accent-primary);color:#23282d}.tec-tickets__admin-settings-featured{background-color:var(--tec-color-background);border:solid 1px var(--tec-color-border-default);border-radius:8px;margin-bottom:var(--tec-spacer-7);padding:var(--tec-spacer-8)}.tec-tickets__admin-settings-featured-title{background-color:transparent;font-size:var(--tec-font-size-5);font-weight:700;margin-bottom:var(--tec-spacer-2);padding:var(--tec-spacer-1) 0}.tec-tickets__admin-settings-featured-description{margin-bottom:var(--tec-spacer-4);max-width:720px}.tec-tickets__admin-settings-featured-link{align-items:center;display:flex}.tec-tickets__admin-settings-featured-link-url{color:var(--tec-color-accent-primary);padding:0 var(--tec-spacer-1)}.tec-tickets__admin-settings-tickets-commerce-gateways-item{margin-bottom:var(--tec-spacer-7);padding-bottom:var(--tec-spacer-0);text-align:center}.tec-tickets__admin-settings-tickets-commerce-gateways-item>div{padding:var(--tec-spacer-0) 0}.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle{margin-right:35px}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand{flex-grow:1}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo-image{max-height:var(--tec-spacer-10)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-subtitle{font-size:13px;font-style:italic}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link{background-color:var(--tec-color-accent-primary);border-radius:var(--tec-border-radius-default);color:#fff;display:inline-block;font-size:var(--tec-font-size-2);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-2) var(--tec-spacer-3);text-align:center;text-decoration:none;width:180px}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active,.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active{background-color:var(--tec-color-background);border:1px solid #3c434a;color:#3c434a}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active,.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:hover{background-color:var(--tec-color-button-primary-hover);border-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active{background-color:var(--tec-color-button-primary-active);border-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle .tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#50b078}.tec-tickets__admin-settings-tickets-commerce-gateway-group-header{background:#f9f9f9;color:#23282d;font-size:var(--tec-font-size-4);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-1) var(--tec-spacer-2);width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-group-header:first-of-type{margin-top:0}.tec-tickets__admin-settings-tickets-commerce-gateways-item-status{color:var(--tec-color-text-disabled);font-size:var(--tec-font-size-2);font-style:italic;font-weight:var(--tec-font-weight-normal);margin:0 var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-status--enabled{color:#50b078;font-weight:var(--tec-font-weight-bold)}.tribe-settings-form-wrap h3{width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.tec-tickets__admin-settings-tickets-commerce-gateway{background-image:url(../images/background-gateway-connect.png);background-position:100%;background-repeat:no-repeat;background-size:420px 100%}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single{height:42px}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single .select2-selection__rendered{line-height:42px;padding-left:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;right:12px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo{display:flex}.tec-tickets__admin-settings-tickets-commerce-gateway-connect{padding-right:74px}.tec-tickets__admin-settings-tickets-commerce-gateways-item{align-items:center;display:flex;text-align:left}}@media (min-width:960px){.tec-tickets__admin-banner{background-image:url(../images/background-tickets-notice.png);background-position:100% 0;background-repeat:no-repeat;background-size:contain}.tec-tickets__admin-tc-banner{background-image:url(../images/background-tc-banner.png)}.tec-tickets__admin-tc-banner-content{max-width:calc(100% - 450px)}}
|
1 |
+
.accordion-header{background:none;border:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:12px;font-weight:700;padding:10px 20px;position:relative;text-align:left;width:100%}.accordion-header:before{background-color:#000;border-radius:100%;box-sizing:border-box;color:#fff;content:"\f132";font-family:dashicons;font-size:10px;font-weight:400;height:14px;left:0;line-height:17px;padding:0;padding-right:1px;position:absolute;text-align:center;top:12px;width:15px}.accordion-header:after{border-bottom:1px solid #ddd;content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);width:80%}.accordion-header.is-active:before{content:"\f460";line-height:15px}.accordion-header:focus{outline:1px solid #5b9dd9}.accordion-header:hover{background:none}.tribe-tickets-editor-history:after{width:calc(100% - 80px)}.tribe_attendee_meta:after{width:calc(100% - 170px)}.tribe_advanced_meta:after{width:calc(100% - 105px)}.accordion-label:focus{outline:none}.accordion-content{display:none}.ticket_panel .accordion-content{margin:1em 0 2em}.accordion-content.is-active{display:block}.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.tribe-common-c-loader.tribe-tickets-loader__modal{height:100vh;position:fixed;width:100vw}.event-tickets .tribe-common-c-loader{align-items:center;background:var(--tec-color-background-transparent);display:flex;height:100%;justify-content:center;left:0;padding:0;position:absolute;top:0;width:100%;z-index:var(--tec-z-index-spinner-container)}.event-tickets .tribe-tickets__notice,.tribe-common .tribe-tickets__notice{background-color:var(--tec-color-background-secondary);border-radius:var(--tec-border-radius-default);margin:var(--tec-spacer-4) 0;padding:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice>:last-child,.tribe-common .tribe-tickets__notice>:last-child{margin-bottom:0;padding-bottom:0}.event-tickets .tribe-tickets-notice__title,.tribe-common .tribe-tickets-notice__title{margin:0;position:relative}.event-tickets .tribe-tickets-notice__title:empty,.tribe-common .tribe-tickets-notice__title:empty{display:none}.event-tickets .tribe-tickets__notice--error,.tribe-common .tribe-tickets__notice--error{background-color:var(--tec-color-background-error);display:none;padding-left:50px;position:relative}.event-tickets .tribe-tickets__notice--error:before,.tribe-common .tribe-tickets__notice--error:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' fill-rule='evenodd' transform='translate(1 1)'%3E%3Ccircle cx='8' cy='8' r='7.467' stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3Ccircle cx='8' cy='11.733' r='1.067' fill='%23141827' fill-rule='nonzero'/%3E%3Cpath stroke='%23141827' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 3.733v4.8' fill='%23141827'/%3E%3C/g%3E%3C/svg%3E");background-size:contain;content:"";height:var(--tec-spacer-3);left:var(--tec-spacer-4);position:absolute;top:var(--tec-spacer-4);width:var(--tec-spacer-3)}.event-tickets .tribe-tickets__notice--barred,.tribe-common .tribe-tickets__notice--barred{background-color:var(--tec-color-background);border:var(--tec-spacer-0) solid var(--tec-color-border-secondary);border-bottom:0;border-radius:0;border-top:0;padding:0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-left,.tribe-common .tribe-tickets__notice--barred-left{border-right:0;padding:0 0 0 var(--tec-spacer-2)}.event-tickets .tribe-tickets__notice--barred-right,.tribe-common .tribe-tickets__notice--barred-right{border-left:0;padding:0 var(--tec-spacer-2) 0 0}.event-tickets .tribe-tickets-svgicon{background-repeat:no-repeat;background-size:contain}.tooltipster-base.tribe-tickets-tooltip-theme{background-color:var(--tec-color-background);border:1px solid var(--tec-color-border-default);border-radius:var(--tec-border-radius-default);box-shadow:var(--tec-box-shadow-tooltip);height:auto!important;max-width:254px;padding:var(--tec-spacer-5)}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box{background-color:transparent;border:0;border-radius:0;box-shadow:none;margin:0}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-box .tooltipster-content{color:var(--tec-color-text-primary);overflow:inherit;padding:0;word-break:break-word}.tooltipster-base.tribe-tickets-tooltip-theme .tooltipster-arrow{display:none}.tribe-common a.tribe-common-c-btn--small,.tribe-common button.tribe-common-c-btn--small,.tribe-common input[type=button].tribe-common-c-btn--small,.tribe-common input[type=submit].tribe-common-c-btn--small{background-color:var(--tec-color-accent-primary);padding:11px 14px;width:auto}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;text-align:center;text-decoration:underline;transition:var(--tec-transition-color)}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{background-color:transparent}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;color:var(--tec-color-accent-primary);padding:11px 20px;width:100%}.tribe-common a.tribe-common-c-btn-link:focus,.tribe-common a.tribe-common-c-btn-link:hover,.tribe-common button.tribe-common-c-btn-link:focus,.tribe-common button.tribe-common-c-btn-link:hover,.tribe-common input[type=button].tribe-common-c-btn-link:focus,.tribe-common input[type=button].tribe-common-c-btn-link:hover,.tribe-common input[type=submit].tribe-common-c-btn-link:focus,.tribe-common input[type=submit].tribe-common-c-btn-link:hover{color:var(--tec-color-accent-primary-hover)}.tribe-common a.tribe-common-c-btn-link:active,.tribe-common button.tribe-common-c-btn-link:active,.tribe-common input[type=button].tribe-common-c-btn-link:active,.tribe-common input[type=submit].tribe-common-c-btn-link:active{color:var(--tec-color-accent-primary-active)}.tribe-common a.tribe-common-c-btn-link:disabled,.tribe-common button.tribe-common-c-btn-link:disabled,.tribe-common input[type=button].tribe-common-c-btn-link:disabled,.tribe-common input[type=submit].tribe-common-c-btn-link:disabled{color:var(--tec-color-accent-primary-background)}.tec-tickets__admin-banner{background-color:#f9f9f9;border:1px solid #ccc;border-left:5px solid #50b078;border-radius:4px;margin:20px 0;padding:8px 24px 12px}.tec-tickets__admin-banner a{text-decoration:none}.tec-tickets__admin-banner p.tec-tickets__admin-banner-help-text{max-width:690px}.tec-tickets__admin-banner-help-links-wrapper{display:flex;max-width:690px}.tec-tickets__admin-banner-help-links-wrapper div{min-width:50%}.tec-tickets__admin-banner-links h3{font-size:14px}.tec-tickets__admin-banner-links-link-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;margin-left:8px;padding:3px 5px;text-transform:uppercase}.tec-tickets__admin-tc-banner-header-title{font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-5);line-height:var(--tec-line-height-0);margin:0;padding:0}.tec-tickets__admin-tc-banner-label--new{background-color:#ffcf48;border-radius:80px;color:#23282d;font-size:10px;font-weight:600;letter-spacing:1px;line-height:1;margin-bottom:3px;margin-left:8px;padding:3px 8px;text-transform:uppercase}.tec-tickets__admin-tc-banner-header{align-items:center;display:flex;justify-content:start;padding-top:var(--tec-spacer-4)}.tec-tickets__admin-tc-banner-footer{align-items:center;display:flex;justify-content:start;padding-bottom:var(--tec-spacer-4);padding-top:var(--tec-spacer-3)}.tec-tickets__admin-tc-banner-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;width:auto;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:#405bfb;color:#fff;margin-right:var(--tec-spacer-5);padding:var(--tec-spacer-1) var(--tec-spacer-5)}.tec-tickets__admin-tc-banner-button:active,.tec-tickets__admin-tc-banner-button:focus,.tec-tickets__admin-tc-banner-button:hover{background-color:var(--tec-color-accent-primary-hover);color:#fff}a.tec-tickets__admin-tc-banner-link{color:#405bfb;text-decoration:underline}a.tec-tickets__admin-tc-banner-link:active,a.tec-tickets__admin-tc-banner-link:focus,a.tec-tickets__admin-tc-banner-link:hover{color:var(--tec-color-accent-primary-hover);text-decoration:none}#tribe-field-tickets-commerce-paypal-commerce-configure,#tribe-field-tickets-commerce-stripe-commerce-configure{padding-left:0;width:100%}#tribe-field-tickets-commerce-paypal-commerce-configure .tribe-field-wrap,#tribe-field-tickets-commerce-stripe-commerce-configure .tribe-field-wrap{float:none;max-width:none}.tec-tickets__admin-settings-tickets-commerce-toggle-wrapper{margin-bottom:20px;margin-top:45px}.tec-tickets__admin-settings-tickets-commerce-toggle{cursor:pointer;display:flex}.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#ccc;border-radius:16px;display:inline-block;height:22px;position:relative;transition:background .4s;vertical-align:middle;width:40px}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:after,.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{content:""}.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#eee);border-radius:50%;display:block;height:16px;left:3px;position:absolute;top:3px;transition:left .4s;width:16px}.tec-tickets__admin-settings-tickets-commerce-toggle:hover .tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{background:linear-gradient(180deg,#fff 0,#fff)}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#278dbc}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch:before{left:20px}.tec-tickets__admin-settings-tickets-commerce-toggle-checkbox{position:absolute;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-toggle-label{color:#1d2327;font-size:20px;font-weight:600;line-height:23px;margin-left:15px;position:relative}.tec-tickets__admin-settings-tickets-commerce-description{font-size:13px;font-weight:400;margin-bottom:35px;max-width:84%}.tec-tickets__admin-settings-tickets-commerce-gateway{background:#fff;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-around;margin-bottom:var(--tec-spacer-3);padding:45px 32px 20px}.tec-tickets__admin-settings-tickets-commerce-gateway-title{font-size:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-description{align-items:start;display:flex;flex-direction:column;flex-grow:1;margin-bottom:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-description p{max-width:470px}.tec-tickets__admin-settings-tickets-commerce-gateway-signup-links{flex-grow:1;margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateway-help-links{margin-top:var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link{align-items:center;display:flex}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link:not(:last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link{margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:active,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-help-link-url:visited,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:active,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-refresh-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul{list-style:none;margin:inherit}.tec-tickets__admin-settings-tickets-commerce-gateway-logo li{line-height:1.8;margin-bottom:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo ul li:before{background-color:#405bfb;border-radius:100%;content:"";display:inline-block;height:7px;margin-right:7px;width:7px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo{display:none;flex-basis:290px;font-size:13px;font-style:italic;font-weight:400;letter-spacing:.02em;line-height:16px;margin-bottom:var(--tec-spacer-4)}.tec-tickets__admin-settings-tickets-commerce-gateway-logo-image{height:auto;margin-bottom:32px;max-width:232px;width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-connect{display:flex;flex:1}.tec-tickets__admin-settings-tickets-commerce-gateway-connect-text--connected{color:#1eb056;font-size:16px;font-weight:600}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-row{display:flex;font-size:13px;font-weight:400;margin:20px 0;text-align:left}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col1{flex-basis:20%;min-width:125px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-col2{flex-basis:80%}.tec-tickets__admin-settings-tickets-commerce-gateway-connect,.tec-tickets__admin-settings-tickets-commerce-gateway-logo{flex-direction:column}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link{background:#405bfb;border-radius:4px;color:#fff;display:inline-block;font-size:16px;font-weight:600;line-height:18px;margin-top:25px;min-width:340px;padding:15px 0;text-align:center;text-decoration:none;width:100%}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:active,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:focus,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:hover,a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link:visited{color:#fff}a.tec-tickets__admin-settings-tickets-commerce-gateway-connect-button-link.disabled{background-color:var(--tec-color-button-primary-background);pointer-events:none}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-name{font-weight:700}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link{border-bottom:1px solid #405bfb;font-size:13px;margin-left:10px;text-transform:lowercase}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:active,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:hover,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-text-disconnect-link:visited{color:#405bfb}.tec-tickets__admin-settings-tickets-commerce-gateway-currency{color:var(--tec-color-text-primary);font-weight:700}.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message{color:#a3a3a3;margin-top:var(--tec-spacer-1)}.tec-tickets__admin-settings-tickets-commerce-gateway-capability--no,.tec-tickets__admin-settings-tickets-commerce-gateway-currency-message--error{color:var(--tec-color-icon-error)}.tec-tickets__admin-settings-tickets-commerce-gateway-capability--yes{color:#1eb056}.tec-tickets__admin-settings-tickets-commerce-gateway-signup-settings{max-width:340px;width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(last-of-type){margin-bottom:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-error{display:none!important;visibility:hidden}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-name,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook:not(.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook--active) .tec-tickets__admin-settings-tickets-commerce-paypal-connected-webhook-name{color:var(--tec-color-text-primary-light);text-decoration:line-through}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-webhook-error{color:var(--color-icon-error);margin-left:8px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-actions-debug{margin-top:20px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button{color:var(--tec-color-text-primary);font-family:var(--tec-font-family-sans-serif);font-size:var(--tec-font-size-2);line-height:var(--tec-line-height-3);font-weight:var(--tec-font-weight-regular);font-weight:var(--tec-font-weight-bold);border:0;cursor:pointer;display:inline-block;height:auto;padding:0;text-decoration:none;border-radius:var(--tec-border-radius-default);color:var(--tec-color-background);text-align:center;transition:var(--tec-transition-background-color);background-color:var(--tec-color-button-primary);padding:11px 20px;width:auto}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:focus,.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button:disabled{background-color:var(--tec-color-button-primary-background)}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon{margin-right:8px;position:relative;stroke:#fff;top:3px;width:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-connected-resync-button-icon path{fill:none}.event-tickets.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice,.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-tickets__notice{display:block}.event-tickets.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn,.tribe-common.tribe-modal__wrapper--gateway-connected .tribe-common-c-btn{width:auto}.event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list,.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-list{list-style:initial;margin:1em 0;padding-left:16px}.event-tickets.tribe-modal__wrapper--gateway-connected p,.tribe-common.tribe-modal__wrapper--gateway-connected p{margin:1em 0}.event-tickets.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons,.tribe-common.tribe-modal__wrapper--gateway-connected .tec-tickets__admin-modal-buttons{display:flex;justify-content:flex-end;margin-top:26px}body.events-cal .event-tickets div.tribe-dialog,body.events-cal .tribe-common div.tribe-dialog{z-index:99999}.event-tickets .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error,.tribe-common .tec-tickets__admin-settings-tickets-commerce-gateway-modal-notice-error{display:block}.event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section,.event-tickets .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title,.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-section,.tribe-common .tec-tickets__admin-settings-tickets-commerce-stripe-modal-content-title{margin-bottom:var(--tec-spacer-3)}#paypal-connected-modal-button,#stripe-connected-modal-button{display:none}.tec-tickets__admin-settings-tickets-commerce-section-menu{padding-top:var(--tec-spacer-6)}.tec-tickets__admin-settings-tickets-commerce-section-menu-link{border-bottom-color:#c4c4c4;border-bottom-style:solid;border-bottom-width:1px;color:#23282d;display:inline-block;font-size:var(--tec-font-size-2);margin-right:var(--tec-spacer-5);padding-bottom:var(--tec-spacer-1);text-decoration:none}.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active{border-bottom-width:var(--tec-spacer-0);font-weight:700}.tec-tickets__admin-settings-tickets-commerce-section-menu-link--active,.tec-tickets__admin-settings-tickets-commerce-section-menu-link:hover{border-bottom-color:var(--tec-color-accent-primary);color:#23282d}.tec-tickets__admin-settings-featured{background-color:var(--tec-color-background);border:solid 1px var(--tec-color-border-default);border-radius:8px;margin-bottom:var(--tec-spacer-7);padding:var(--tec-spacer-8)}.tec-tickets__admin-settings-featured-title{background-color:transparent;font-size:var(--tec-font-size-5);font-weight:700;margin-bottom:var(--tec-spacer-2);padding:var(--tec-spacer-1) 0}.tec-tickets__admin-settings-featured-description{margin-bottom:var(--tec-spacer-4);max-width:720px}.tec-tickets__admin-settings-featured-link{align-items:center;display:flex}.tec-tickets__admin-settings-featured-link-url{color:var(--tec-color-accent-primary);padding:0 var(--tec-spacer-1)}.tec-tickets__admin-settings-tickets-commerce-gateways-item{margin-bottom:var(--tec-spacer-7);padding-bottom:var(--tec-spacer-0);text-align:center}.tec-tickets__admin-settings-tickets-commerce-gateways-item>div{padding:var(--tec-spacer-0) 0}.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle{margin-right:35px}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand{flex-grow:1}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-logo-image{max-height:var(--tec-spacer-10)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-brand-subtitle{font-size:13px;font-style:italic}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link{background-color:var(--tec-color-accent-primary);border-radius:var(--tec-border-radius-default);color:#fff;display:inline-block;font-size:var(--tec-font-size-2);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-2) var(--tec-spacer-3);text-align:center;text-decoration:none;width:180px}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active,.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:hover{background-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link:active{background-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active{background-color:var(--tec-color-background);border:1px solid #3c434a;color:#3c434a}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active,.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:hover{background-color:var(--tec-color-button-primary-hover);border-color:var(--tec-color-button-primary-hover);color:#fff}.tec-tickets__admin-settings-tickets-commerce-gateways-item-button-link--active:active{background-color:var(--tec-color-button-primary-active);border-color:var(--tec-color-button-primary-active)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-toggle .tec-tickets__admin-settings-tickets-commerce-toggle-checkbox:checked+.tec-tickets__admin-settings-tickets-commerce-toggle-switch{background:#50b078}.tec-tickets__admin-settings-tickets-commerce-gateway-group-header{background:#f9f9f9;color:#23282d;font-size:var(--tec-font-size-4);font-weight:var(--tec-font-weight-bold);padding:var(--tec-spacer-1) var(--tec-spacer-2);width:100%}.tec-tickets__admin-settings-tickets-commerce-gateway-group-header:first-of-type{margin-top:0}.tec-tickets__admin-settings-tickets-commerce-gateways-item-status{color:var(--tec-color-text-disabled);font-size:var(--tec-font-size-2);font-style:italic;font-weight:var(--tec-font-weight-normal);margin:0 var(--tec-spacer-8)}.tec-tickets__admin-settings-tickets-commerce-gateways-item-status--enabled{color:#50b078;font-weight:var(--tec-font-weight-bold)}.tec-tickets__admin-settings-emails-template-list{background:var(--tec-color-background);border:1px var(--tec-color-border-default) solid;border-radius:var(--tec-border-radius-default);margin-bottom:var(--tec-spacer-5)}.tec-tickets__admin-settings-emails-template-list-item{align-items:center;border-top:1px solid var(--tec-color-border-default);display:flex;justify-content:flex-start;min-height:54px}.tec-tickets__admin-settings-emails-template-list-item:first-of-type{border-top:none}.tec-tickets__admin-settings-emails-template-list-item--disabled{color:var(--tec-color-text-disabled)}.tec-tickets__admin-settings-emails-template-list-item-icon{padding:0 var(--tec-spacer-4);width:25px}.tec-tickets__admin-settings-emails-template-list-item-icon>span.dashicons-yes{color:#1eb056;height:25px;width:25px}.tec-tickets__admin-settings-emails-template-list-item-icon>span.dashicons-yes:before{font-size:25px;font-weight:var(--tec-font-weight-regular)}.tec-tickets__admin-settings-emails-template-list-item-title{font-size:15px;font-weight:var(--tec-font-weight-bold);min-width:90px;padding:0 var(--tec-spacer-4) 0 0}.tec-tickets__admin-settings-emails-template-list-item-recipient{flex-grow:1;font-size:13px;font-weight:var(--tec-font-weight-regular);padding:0}.tec-tickets__admin-settings-emails-template-list-item-action{padding:0 var(--tec-spacer-4)}.tec-tickets__admin-settings-emails-template-list-item-action-link{color:var(--tec-color-icon-secondary)}.tec-tickets__admin-settings-emails-template-list-item-action-link:hover{color:var(--tec-color-event-icon-hover)}.tribe-settings-form-wrap h3{width:100%}@media (min-width:768px){.event-tickets .tribe-common-c-loader,.tribe-common-c-loader.tribe-tickets-loader__modal,.tribe-common-c-loader.tribe-tickets-loader__tickets-block{padding:0}.tribe-common a.tribe-common-c-btn-link,.tribe-common button.tribe-common-c-btn-link,.tribe-common input[type=button].tribe-common-c-btn-link,.tribe-common input[type=submit].tribe-common-c-btn-link{background-color:transparent;width:auto}.tec-tickets__admin-settings-tickets-commerce-gateway{background-image:url(../images/background-gateway-connect.png);background-position:100%;background-repeat:no-repeat;background-size:420px 100%}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single{height:42px}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .tribe-dropdown .select2-selection--single .select2-selection__rendered{line-height:42px;padding-left:16px}.tec-tickets__admin-settings-tickets-commerce-gateway-merchant-country-container .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;right:12px}.tec-tickets__admin-settings-tickets-commerce-gateway-logo{display:flex}.tec-tickets__admin-settings-tickets-commerce-gateway-connect{padding-right:74px}.tec-tickets__admin-settings-tickets-commerce-gateways-item{align-items:center;display:flex;text-align:left}.tec-tickets__admin-settings-emails-template-list-item-title{min-width:200px}}@media (min-width:960px){.tec-tickets__admin-banner{background-image:url(../images/background-tickets-notice.png);background-position:100% 0;background-repeat:no-repeat;background-size:contain}.tec-tickets__admin-tc-banner{background-image:url(../images/background-tc-banner.png)}.tec-tickets__admin-tc-banner-content{max-width:calc(100% - 450px)}}
|
src/resources/css/tickets-admin.css
CHANGED
@@ -1295,4 +1295,4 @@ p.description {
|
|
1295 |
#ticket_form .tooltip_container {
|
1296 |
display: none
|
1297 |
}
|
1298 |
-
}
|
1295 |
#ticket_form .tooltip_container {
|
1296 |
display: none
|
1297 |
}
|
1298 |
+
}
|
src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.css
CHANGED
@@ -14,14 +14,14 @@
|
|
14 |
* @since 5.3.0
|
15 |
*/
|
16 |
#tribe-field-tickets-commerce-stripe-webhooks-value input {
|
17 |
-
border-top-right-radius: 0;
|
18 |
border-bottom-right-radius: 0;
|
|
|
19 |
}
|
20 |
#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy {
|
21 |
-
border-top-left-radius: 0;
|
22 |
border-bottom-left-radius: 0;
|
23 |
-
|
24 |
line-height: 24px;
|
|
|
25 |
padding-left: 6px;
|
26 |
padding-right: 6px;
|
27 |
}
|
@@ -38,5 +38,7 @@
|
|
38 |
color: #50b078;
|
39 |
}
|
40 |
@keyframes rotate {
|
41 |
-
100% {
|
|
|
|
|
42 |
}
|
14 |
* @since 5.3.0
|
15 |
*/
|
16 |
#tribe-field-tickets-commerce-stripe-webhooks-value input {
|
|
|
17 |
border-bottom-right-radius: 0;
|
18 |
+
border-top-right-radius: 0;
|
19 |
}
|
20 |
#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy {
|
|
|
21 |
border-bottom-left-radius: 0;
|
22 |
+
border-top-left-radius: 0;
|
23 |
line-height: 24px;
|
24 |
+
margin-left: -2px;
|
25 |
padding-left: 6px;
|
26 |
padding-right: 6px;
|
27 |
}
|
38 |
color: #50b078;
|
39 |
}
|
40 |
@keyframes rotate {
|
41 |
+
100% {
|
42 |
+
transform: rotate(360deg);
|
43 |
+
}
|
44 |
}
|
src/resources/css/tickets-commerce/admin/gateway/stripe/webhooks.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#tribe-field-tickets-commerce-stripe-webhooks-value input{border-
|
1 |
+
#tribe-field-tickets-commerce-stripe-webhooks-value input{border-bottom-right-radius:0;border-top-right-radius:0}#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy{border-bottom-left-radius:0;border-top-left-radius:0;line-height:24px;margin-left:-2px;padding-left:6px;padding-right:6px}#tribe-field-tickets-commerce-stripe-webhooks-value .tribe-field-tickets-commerce-stripe-webhooks-copy span{line-height:24px}#tribe-field-tickets-commerce-stripe-webhooks-signing-key .dashicons.dashicons-update{animation:a 1s infinite}#tribe-field-tickets-commerce-stripe-webhooks-signing-key .dashicons.dashicons-no{color:var(--tec-color-icon-error)}#tribe-field-tickets-commerce-stripe-webhooks-signing-key .dashicons.dashicons-yes{color:#50b078}@keyframes a{to{transform:rotate(1turn)}}
|
src/resources/js/admin/gateway/stripe/webhooks.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
-
/* global ClipboardJS
|
2 |
/**
|
3 |
* Makes sure we have all the required levels on the Tribe Object
|
4 |
*
|
5 |
* @since 4.8.14
|
6 |
-
*
|
7 |
-
* @type {Object}
|
8 |
*/
|
9 |
tribe.tickets = tribe.tickets || {};
|
10 |
|
@@ -12,8 +11,7 @@ tribe.tickets = tribe.tickets || {};
|
|
12 |
* Path to this script in the global tribe Object.
|
13 |
*
|
14 |
* @since 5.3.0
|
15 |
-
*
|
16 |
-
* @type {Object}
|
17 |
*/
|
18 |
tribe.tickets.commerce = tribe.tickets.commerce || {};
|
19 |
|
@@ -21,8 +19,7 @@ tribe.tickets.commerce = tribe.tickets.commerce || {};
|
|
21 |
* Path to this script in the global tribe Object.
|
22 |
*
|
23 |
* @since 5.2.0
|
24 |
-
*
|
25 |
-
* @type {Object}
|
26 |
*/
|
27 |
tribe.tickets.commerce.gateway = tribe.tickets.commerce.gateway || {};
|
28 |
|
@@ -30,8 +27,7 @@ tribe.tickets.commerce.gateway = tribe.tickets.commerce.gateway || {};
|
|
30 |
* Path to this script in the global tribe Object.
|
31 |
*
|
32 |
* @since 5.3.0
|
33 |
-
*
|
34 |
-
* @type {Object}
|
35 |
*/
|
36 |
tribe.tickets.commerce.gateway.stripe = tribe.tickets.commerce.gateway.stripe || {};
|
37 |
|
@@ -39,26 +35,22 @@ tribe.tickets.commerce.gateway.stripe = tribe.tickets.commerce.gateway.stripe ||
|
|
39 |
* This script Object for public usage of the methods.
|
40 |
*
|
41 |
* @since 5.3.0
|
42 |
-
*
|
43 |
-
* @type {Object}
|
44 |
*/
|
45 |
tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
46 |
|
47 |
( ( $, obj, ajaxurl ) => {
|
48 |
-
"use strict";
|
49 |
-
|
50 |
/**
|
51 |
* Stores the all selectors used on this module.
|
52 |
*
|
53 |
* @since 5.3.0
|
54 |
-
*
|
55 |
-
* @type {Object}
|
56 |
*/
|
57 |
obj.selectors = {
|
58 |
button: '.tribe-field-tickets-commerce-stripe-webhooks-copy',
|
59 |
signingKey: '[name="tickets-commerce-stripe-webhooks-signing-key"]',
|
60 |
statusLabel: '.tribe-field-tickets-commerce-stripe-webhooks-signing-key-status',
|
61 |
-
tooltip: '.tooltip'
|
62 |
genericDashicon: '.dashicons',
|
63 |
saveButton: 'input#tribeSaveSettings',
|
64 |
};
|
@@ -67,8 +59,7 @@ tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
|
67 |
* Stores the ClipboardJS instance for later reference.
|
68 |
*
|
69 |
* @since 5.3.0
|
70 |
-
*
|
71 |
-
* @type {Object}
|
72 |
*/
|
73 |
obj.clipboardButton = null;
|
74 |
|
@@ -95,11 +86,10 @@ tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
|
95 |
* When the signing field changes.
|
96 |
*
|
97 |
* @since 5.3.0
|
98 |
-
*
|
99 |
* @param event {Event}
|
100 |
-
*
|
101 |
* @return {Promise<*>}
|
102 |
*/
|
|
|
103 |
obj.onSigningFieldChange = async ( event ) => {
|
104 |
const $field = $( event.target );
|
105 |
const $tooltip = $field.siblings( obj.selectors.tooltip );
|
@@ -120,9 +110,10 @@ tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
|
120 |
body: params,
|
121 |
hooks: {
|
122 |
beforeRequest: [
|
123 |
-
|
124 |
$statusLabel.text( $field.data( 'loadingText' ) );
|
125 |
-
$statusIcon.removeClass( [ 'dashicons-no', 'dashicons-yes' ] )
|
|
|
126 |
},
|
127 |
],
|
128 |
},
|
@@ -139,7 +130,7 @@ tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
|
139 |
} else {
|
140 |
$statusIcon.removeClass( [ 'dashicons-update' ] ).addClass( 'dashicons-no' );
|
141 |
$statusLabel.text( response.data.status );
|
142 |
-
$field.val('');
|
143 |
}
|
144 |
|
145 |
return response;
|
@@ -154,4 +145,4 @@ tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
|
154 |
};
|
155 |
|
156 |
$( document ).ready( obj.ready );
|
157 |
-
} )( jQuery, tribe.tickets.commerce.gateway.stripe.webhooks, window.ajaxurl );
|
1 |
+
/* global ClipboardJS */
|
2 |
/**
|
3 |
* Makes sure we have all the required levels on the Tribe Object
|
4 |
*
|
5 |
* @since 4.8.14
|
6 |
+
* @type {object}
|
|
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
|
11 |
* Path to this script in the global tribe Object.
|
12 |
*
|
13 |
* @since 5.3.0
|
14 |
+
* @type {object}
|
|
|
15 |
*/
|
16 |
tribe.tickets.commerce = tribe.tickets.commerce || {};
|
17 |
|
19 |
* Path to this script in the global tribe Object.
|
20 |
*
|
21 |
* @since 5.2.0
|
22 |
+
* @type {object}
|
|
|
23 |
*/
|
24 |
tribe.tickets.commerce.gateway = tribe.tickets.commerce.gateway || {};
|
25 |
|
27 |
* Path to this script in the global tribe Object.
|
28 |
*
|
29 |
* @since 5.3.0
|
30 |
+
* @type {object}
|
|
|
31 |
*/
|
32 |
tribe.tickets.commerce.gateway.stripe = tribe.tickets.commerce.gateway.stripe || {};
|
33 |
|
35 |
* This script Object for public usage of the methods.
|
36 |
*
|
37 |
* @since 5.3.0
|
38 |
+
* @type {object}
|
|
|
39 |
*/
|
40 |
tribe.tickets.commerce.gateway.stripe.webhooks = {};
|
41 |
|
42 |
( ( $, obj, ajaxurl ) => {
|
|
|
|
|
43 |
/**
|
44 |
* Stores the all selectors used on this module.
|
45 |
*
|
46 |
* @since 5.3.0
|
47 |
+
* @type {object}
|
|
|
48 |
*/
|
49 |
obj.selectors = {
|
50 |
button: '.tribe-field-tickets-commerce-stripe-webhooks-copy',
|
51 |
signingKey: '[name="tickets-commerce-stripe-webhooks-signing-key"]',
|
52 |
statusLabel: '.tribe-field-tickets-commerce-stripe-webhooks-signing-key-status',
|
53 |
+
tooltip: '.tooltip',
|
54 |
genericDashicon: '.dashicons',
|
55 |
saveButton: 'input#tribeSaveSettings',
|
56 |
};
|
59 |
* Stores the ClipboardJS instance for later reference.
|
60 |
*
|
61 |
* @since 5.3.0
|
62 |
+
* @type {object}
|
|
|
63 |
*/
|
64 |
obj.clipboardButton = null;
|
65 |
|
86 |
* When the signing field changes.
|
87 |
*
|
88 |
* @since 5.3.0
|
|
|
89 |
* @param event {Event}
|
|
|
90 |
* @return {Promise<*>}
|
91 |
*/
|
92 |
+
// eslint-disable-next-line
|
93 |
obj.onSigningFieldChange = async ( event ) => {
|
94 |
const $field = $( event.target );
|
95 |
const $tooltip = $field.siblings( obj.selectors.tooltip );
|
110 |
body: params,
|
111 |
hooks: {
|
112 |
beforeRequest: [
|
113 |
+
() => {
|
114 |
$statusLabel.text( $field.data( 'loadingText' ) );
|
115 |
+
$statusIcon.removeClass( [ 'dashicons-no', 'dashicons-yes' ] )
|
116 |
+
.addClass( 'dashicons-update' );
|
117 |
},
|
118 |
],
|
119 |
},
|
130 |
} else {
|
131 |
$statusIcon.removeClass( [ 'dashicons-update' ] ).addClass( 'dashicons-no' );
|
132 |
$statusLabel.text( response.data.status );
|
133 |
+
$field.val( '' );
|
134 |
}
|
135 |
|
136 |
return response;
|
145 |
};
|
146 |
|
147 |
$( document ).ready( obj.ready );
|
148 |
+
} )( jQuery, tribe.tickets.commerce.gateway.stripe.webhooks, window.ajaxurl );
|
src/resources/js/admin/tickets-commerce-settings.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.1.6
|
5 |
-
*
|
6 |
-
* @type {Object}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
tribe.tickets.admin = tribe.tickets.admin || {};
|
@@ -14,8 +13,7 @@ tribe.dialogs.events = tribe.dialogs.events || {};
|
|
14 |
* Configures admin commerce settings Object in the Global Tribe variable
|
15 |
*
|
16 |
* @since 5.1.6
|
17 |
-
*
|
18 |
-
* @type {Object}
|
19 |
*/
|
20 |
tribe.tickets.admin.commerceSettings = {};
|
21 |
|
@@ -23,23 +21,19 @@ tribe.tickets.admin.commerceSettings = {};
|
|
23 |
* Initializes in a Strict env the code that manages the Tickets Commerce settings page.
|
24 |
*
|
25 |
* @since 5.1.6
|
26 |
-
*
|
27 |
-
* @param {
|
28 |
-
* @param {
|
29 |
-
* @param {Object} obj tribe.tickets.admin.commerceSettings
|
30 |
-
*
|
31 |
* @return {void}
|
32 |
*/
|
33 |
( function( $, _, obj ) {
|
34 |
-
'use strict';
|
35 |
const $document = $( document );
|
36 |
|
37 |
/**
|
38 |
* Selectors used for configuration and setup
|
39 |
*
|
40 |
* @since 5.1.6
|
41 |
-
*
|
42 |
-
* @type {PlainObject}
|
43 |
*/
|
44 |
// @todo Replace ID/class names.
|
45 |
obj.selectors = {
|
@@ -64,7 +58,7 @@ tribe.tickets.admin.commerceSettings = {};
|
|
64 |
return;
|
65 |
}
|
66 |
|
67 |
-
obj.paypalErrorQuickHelp[0] &&
|
68 |
obj.paypalErrorQuickHelp.removeClass( 'tribe-common-a11y-hidden' );
|
69 |
} );
|
70 |
} );
|
@@ -74,13 +68,12 @@ tribe.tickets.admin.commerceSettings = {};
|
|
74 |
attributes: true,
|
75 |
childList: true,
|
76 |
} );
|
77 |
-
}
|
78 |
|
79 |
obj.maybeShowModalAfterConnection = function() {
|
80 |
-
|
81 |
if (
|
82 |
-
! window.location.search.match( /tc-status=paypal-signup-complete/i )
|
83 |
-
|
84 |
) {
|
85 |
return;
|
86 |
}
|
@@ -99,9 +92,8 @@ tribe.tickets.admin.commerceSettings = {};
|
|
99 |
$( closeButton ).on( 'click', function() {
|
100 |
dialog.a11yInstance.hide();
|
101 |
} );
|
102 |
-
|
103 |
} );
|
104 |
-
|
105 |
};
|
106 |
|
107 |
obj.setupPartnerLink = function( partnerLink ) {
|
@@ -120,9 +112,7 @@ tribe.tickets.admin.commerceSettings = {};
|
|
120 |
* Performs an AJAX request to get the partner URL.
|
121 |
*
|
122 |
* @since 5.1.6
|
123 |
-
*
|
124 |
-
* @param {String} countryCode The country code.
|
125 |
-
*
|
126 |
* @return {void}
|
127 |
*/
|
128 |
obj.requestPartnerUrl = function( countryCode ) {
|
@@ -158,7 +148,7 @@ tribe.tickets.admin.commerceSettings = {};
|
|
158 |
}
|
159 |
|
160 |
const buttonContainer = document.querySelector( obj.selectors.connectButtonWrap );
|
161 |
-
obj.paypalErrorQuickHelp[0] && obj.paypalErrorQuickHelp.remove();
|
162 |
buttonContainer.append( createElementFromHTML( res.data ) );
|
163 |
} );
|
164 |
} );
|
@@ -201,7 +191,8 @@ tribe.tickets.admin.commerceSettings = {};
|
|
201 |
obj.paypalErrorQuickHelp = $( obj.selectors.troubleNotice );
|
202 |
|
203 |
// Hide paypal quick help message.
|
204 |
-
obj.paypalErrorQuickHelp[0] &&
|
|
|
205 |
|
206 |
obj.requestPartnerUrl( countryCode );
|
207 |
};
|
@@ -225,10 +216,10 @@ tribe.tickets.admin.commerceSettings = {};
|
|
225 |
const query = '&authCode=' + authCode + '&sharedId=' + sharedId;
|
226 |
|
227 |
fetch( ajaxurl + '?action=tribe_tickets_paypal_commerce_user_on_boarded' + query )
|
228 |
-
.then( function
|
229 |
-
return res.json()
|
230 |
} )
|
231 |
-
.then( function
|
232 |
if ( true !== res.success ) {
|
233 |
// @todo Improve the error messaging here.
|
234 |
alert( 'Something went wrong while we were connecting your account, please try again.' );
|
@@ -237,26 +228,25 @@ tribe.tickets.admin.commerceSettings = {};
|
|
237 |
|
238 |
// Remove PayPal quick help container.
|
239 |
obj.paypalErrorQuickHelp = $( obj.selectors.troubleNotice );
|
240 |
-
obj.paypalErrorQuickHelp[0] && obj.paypalErrorQuickHelp.remove();
|
241 |
} );
|
242 |
-
}
|
243 |
|
244 |
/**
|
245 |
* Handles the initialization of the gateway settings when Document is ready.
|
246 |
*
|
247 |
* @since 5.1.6
|
248 |
-
*
|
249 |
* @return {void}
|
250 |
*/
|
251 |
obj.ready = function() {
|
252 |
obj.onBoardingButton = $( obj.selectors.connectButton );
|
253 |
obj.disconnectButton = $( obj.selectors.disconnectPayPalAccountButton );
|
254 |
|
255 |
-
if ( obj.onBoardingButton[0] ) {
|
256 |
obj.onBoardingButton.on( 'click', obj.handleConnectClick );
|
257 |
}
|
258 |
|
259 |
-
if ( obj.disconnectButton[0] ) {
|
260 |
obj.disconnectButton.on( 'click', obj.handleDisconnectClick );
|
261 |
}
|
262 |
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.1.6
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
tribe.tickets.admin = tribe.tickets.admin || {};
|
13 |
* Configures admin commerce settings Object in the Global Tribe variable
|
14 |
*
|
15 |
* @since 5.1.6
|
16 |
+
* @type {object}
|
|
|
17 |
*/
|
18 |
tribe.tickets.admin.commerceSettings = {};
|
19 |
|
21 |
* Initializes in a Strict env the code that manages the Tickets Commerce settings page.
|
22 |
*
|
23 |
* @since 5.1.6
|
24 |
+
* @param {object} $ jQuery
|
25 |
+
* @param {object} _ Underscore.js
|
26 |
+
* @param {object} obj tribe.tickets.admin.commerceSettings
|
|
|
|
|
27 |
* @return {void}
|
28 |
*/
|
29 |
( function( $, _, obj ) {
|
|
|
30 |
const $document = $( document );
|
31 |
|
32 |
/**
|
33 |
* Selectors used for configuration and setup
|
34 |
*
|
35 |
* @since 5.1.6
|
36 |
+
* @type {object}
|
|
|
37 |
*/
|
38 |
// @todo Replace ID/class names.
|
39 |
obj.selectors = {
|
58 |
return;
|
59 |
}
|
60 |
|
61 |
+
obj.paypalErrorQuickHelp[ 0 ] &&
|
62 |
obj.paypalErrorQuickHelp.removeClass( 'tribe-common-a11y-hidden' );
|
63 |
} );
|
64 |
} );
|
68 |
attributes: true,
|
69 |
childList: true,
|
70 |
} );
|
71 |
+
};
|
72 |
|
73 |
obj.maybeShowModalAfterConnection = function() {
|
|
|
74 |
if (
|
75 |
+
! window.location.search.match( /tc-status=paypal-signup-complete/i ) &&
|
76 |
+
! window.location.search.match( /tc-status=stripe-signup-complete/i )
|
77 |
) {
|
78 |
return;
|
79 |
}
|
92 |
$( closeButton ).on( 'click', function() {
|
93 |
dialog.a11yInstance.hide();
|
94 |
} );
|
95 |
+
} );
|
96 |
} );
|
|
|
97 |
};
|
98 |
|
99 |
obj.setupPartnerLink = function( partnerLink ) {
|
112 |
* Performs an AJAX request to get the partner URL.
|
113 |
*
|
114 |
* @since 5.1.6
|
115 |
+
* @param {string} countryCode The country code.
|
|
|
|
|
116 |
* @return {void}
|
117 |
*/
|
118 |
obj.requestPartnerUrl = function( countryCode ) {
|
148 |
}
|
149 |
|
150 |
const buttonContainer = document.querySelector( obj.selectors.connectButtonWrap );
|
151 |
+
obj.paypalErrorQuickHelp[ 0 ] && obj.paypalErrorQuickHelp.remove();
|
152 |
buttonContainer.append( createElementFromHTML( res.data ) );
|
153 |
} );
|
154 |
} );
|
191 |
obj.paypalErrorQuickHelp = $( obj.selectors.troubleNotice );
|
192 |
|
193 |
// Hide paypal quick help message.
|
194 |
+
obj.paypalErrorQuickHelp[ 0 ] &&
|
195 |
+
obj.paypalErrorQuickHelp.addClass( 'tribe-common-a11y-hidden' );
|
196 |
|
197 |
obj.requestPartnerUrl( countryCode );
|
198 |
};
|
216 |
const query = '&authCode=' + authCode + '&sharedId=' + sharedId;
|
217 |
|
218 |
fetch( ajaxurl + '?action=tribe_tickets_paypal_commerce_user_on_boarded' + query )
|
219 |
+
.then( function( res ) {
|
220 |
+
return res.json();
|
221 |
} )
|
222 |
+
.then( function( res ) {
|
223 |
if ( true !== res.success ) {
|
224 |
// @todo Improve the error messaging here.
|
225 |
alert( 'Something went wrong while we were connecting your account, please try again.' );
|
228 |
|
229 |
// Remove PayPal quick help container.
|
230 |
obj.paypalErrorQuickHelp = $( obj.selectors.troubleNotice );
|
231 |
+
obj.paypalErrorQuickHelp[ 0 ] && obj.paypalErrorQuickHelp.remove();
|
232 |
} );
|
233 |
+
};
|
234 |
|
235 |
/**
|
236 |
* Handles the initialization of the gateway settings when Document is ready.
|
237 |
*
|
238 |
* @since 5.1.6
|
|
|
239 |
* @return {void}
|
240 |
*/
|
241 |
obj.ready = function() {
|
242 |
obj.onBoardingButton = $( obj.selectors.connectButton );
|
243 |
obj.disconnectButton = $( obj.selectors.disconnectPayPalAccountButton );
|
244 |
|
245 |
+
if ( obj.onBoardingButton[ 0 ] ) {
|
246 |
obj.onBoardingButton.on( 'click', obj.handleConnectClick );
|
247 |
}
|
248 |
|
249 |
+
if ( obj.disconnectButton[ 0 ] ) {
|
250 |
obj.disconnectButton.on( 'click', obj.handleDisconnectClick );
|
251 |
}
|
252 |
|
src/resources/js/admin/tickets-manager.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.1.0
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
tribe.tickets.admin = tribe.tickets.admin || {};
|
@@ -12,8 +11,7 @@ tribe.tickets.admin = tribe.tickets.admin || {};
|
|
12 |
* Configures admin manager Object in the Global Tribe variable
|
13 |
*
|
14 |
* @since 5.1.0
|
15 |
-
*
|
16 |
-
* @type {PlainObject}
|
17 |
*/
|
18 |
tribe.tickets.admin.manager = {};
|
19 |
|
@@ -21,23 +19,19 @@ tribe.tickets.admin.manager = {};
|
|
21 |
* Initializes in a Strict env the code that manages the Tickets Manager
|
22 |
*
|
23 |
* @since 5.1.0
|
24 |
-
*
|
25 |
-
* @param {
|
26 |
-
* @param {
|
27 |
-
* @param {PlainObject} obj tribe.tickets.admin.manager
|
28 |
-
*
|
29 |
* @return {void}
|
30 |
*/
|
31 |
( function( $, _, obj ) {
|
32 |
-
'use strict';
|
33 |
const $document = $( document );
|
34 |
|
35 |
/**
|
36 |
* Selectors used for configuration and setup
|
37 |
*
|
38 |
* @since 5.1.0
|
39 |
-
*
|
40 |
-
* @type {PlainObject}
|
41 |
*/
|
42 |
obj.selectors = {
|
43 |
container: '.tribe-tickets__admin-container',
|
@@ -50,7 +44,6 @@ tribe.tickets.admin.manager = {};
|
|
50 |
* Stores the current ajax request been handled by the manager.
|
51 |
*
|
52 |
* @since 5.1.0
|
53 |
-
*
|
54 |
* @type {jqXHR|null}
|
55 |
*/
|
56 |
obj.currentAjaxRequest = null;
|
@@ -59,7 +52,6 @@ tribe.tickets.admin.manager = {};
|
|
59 |
* Containers on the current page that were initialized.
|
60 |
*
|
61 |
* @since 5.1.0
|
62 |
-
*
|
63 |
* @type {jQuery}
|
64 |
*/
|
65 |
obj.$containers = $();
|
@@ -68,7 +60,6 @@ tribe.tickets.admin.manager = {};
|
|
68 |
* Saves all the containers in the page into the object.
|
69 |
*
|
70 |
* @since 5.1.0
|
71 |
-
*
|
72 |
* @return {void}
|
73 |
*/
|
74 |
obj.selectContainers = function() {
|
@@ -79,9 +70,7 @@ tribe.tickets.admin.manager = {};
|
|
79 |
* Clean up the container and event listeners
|
80 |
*
|
81 |
* @since 5.1.0
|
82 |
-
*
|
83 |
* @param {jQuery} container Which element we are going to clean up
|
84 |
-
*
|
85 |
* @return {void}
|
86 |
*/
|
87 |
obj.cleanup = function( container ) {
|
@@ -96,12 +85,9 @@ tribe.tickets.admin.manager = {};
|
|
96 |
* Setup the container for admin management
|
97 |
*
|
98 |
* @since 5.1.0
|
99 |
-
*
|
100 |
* @todo Requirement to setup other JS modules after hijacking Click and Submit
|
101 |
-
*
|
102 |
-
* @param {integer} index jQuery.each index param
|
103 |
* @param {Element|jQuery} container Which element we are going to setup
|
104 |
-
*
|
105 |
* @return {void}
|
106 |
*/
|
107 |
obj.setup = function( index, container ) {
|
@@ -116,17 +102,15 @@ tribe.tickets.admin.manager = {};
|
|
116 |
* Performs an AJAX request.
|
117 |
*
|
118 |
* @since 5.1.0
|
119 |
-
*
|
120 |
* @param {object} data DOM Event related to the Click action
|
121 |
* @param {Element|jQuery} $container Which container we are dealing with
|
122 |
-
*
|
123 |
* @return {void}
|
124 |
*/
|
125 |
obj.request = function( data, $container ) {
|
126 |
const settings = obj.getAjaxSettings( $container );
|
127 |
|
128 |
// Set the security nonce.
|
129 |
-
data
|
130 |
|
131 |
// Pass the data received to the $.ajax settings
|
132 |
settings.data = data;
|
@@ -138,10 +122,8 @@ tribe.tickets.admin.manager = {};
|
|
138 |
* Gets the jQuery.ajax() settings provided a views container
|
139 |
*
|
140 |
* @since 5.1.0
|
141 |
-
*
|
142 |
* @param {Element|jQuery} $container Which container we are dealing with.
|
143 |
-
*
|
144 |
-
* @return {Object} ajaxSettings
|
145 |
*/
|
146 |
obj.getAjaxSettings = function( $container ) {
|
147 |
const ajaxSettings = {
|
@@ -165,10 +147,8 @@ tribe.tickets.admin.manager = {};
|
|
165 |
* Context with the RSVP container used to fire this AJAX call
|
166 |
*
|
167 |
* @since 5.1.0
|
168 |
-
*
|
169 |
-
* @param {
|
170 |
-
* @param {PlainObject} settings Settings that this request will be made with
|
171 |
-
*
|
172 |
* @return {void}
|
173 |
*/
|
174 |
obj.ajaxBeforeSend = function( jqXHR, settings ) {
|
@@ -190,10 +170,8 @@ tribe.tickets.admin.manager = {};
|
|
190 |
* Context with the RSVP container used to fire this AJAX call
|
191 |
*
|
192 |
* @since 5.1.0
|
193 |
-
*
|
194 |
* @param {jqXHR} jqXHR Request object
|
195 |
-
* @param {
|
196 |
-
*
|
197 |
* @return {void}
|
198 |
*/
|
199 |
obj.ajaxComplete = function( jqXHR, textStatus ) {
|
@@ -218,11 +196,9 @@ tribe.tickets.admin.manager = {};
|
|
218 |
* Context with the RSVP container used to fire this AJAX call
|
219 |
*
|
220 |
* @since 5.1.0
|
221 |
-
*
|
222 |
-
* @param {
|
223 |
-
* @param {String} textStatus Status for the request
|
224 |
* @param {jqXHR} jqXHR Request object
|
225 |
-
*
|
226 |
* @return {void}
|
227 |
*/
|
228 |
obj.ajaxSuccess = function( response, textStatus, jqXHR ) {
|
@@ -265,10 +241,8 @@ tribe.tickets.admin.manager = {};
|
|
265 |
* Context with the RSVP container used to fire this AJAX call
|
266 |
*
|
267 |
* @since 5.1.0
|
268 |
-
*
|
269 |
-
* @param {
|
270 |
-
* @param {PlainObject} settings Settings that this request was made with
|
271 |
-
*
|
272 |
* @return {void}
|
273 |
*/
|
274 |
obj.ajaxError = function( jqXHR, settings ) {
|
@@ -283,7 +257,6 @@ tribe.tickets.admin.manager = {};
|
|
283 |
* Handles the initialization of the manager when Document is ready.
|
284 |
*
|
285 |
* @since 5.1.0
|
286 |
-
*
|
287 |
* @return {void}
|
288 |
*/
|
289 |
obj.ready = function() {
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.1.0
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
tribe.tickets.admin = tribe.tickets.admin || {};
|
11 |
* Configures admin manager Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.1.0
|
14 |
+
* @type {object}
|
|
|
15 |
*/
|
16 |
tribe.tickets.admin.manager = {};
|
17 |
|
19 |
* Initializes in a Strict env the code that manages the Tickets Manager
|
20 |
*
|
21 |
* @since 5.1.0
|
22 |
+
* @param {object} $ jQuery
|
23 |
+
* @param {object} _ Underscore.js
|
24 |
+
* @param {object} obj tribe.tickets.admin.manager
|
|
|
|
|
25 |
* @return {void}
|
26 |
*/
|
27 |
( function( $, _, obj ) {
|
|
|
28 |
const $document = $( document );
|
29 |
|
30 |
/**
|
31 |
* Selectors used for configuration and setup
|
32 |
*
|
33 |
* @since 5.1.0
|
34 |
+
* @type {object}
|
|
|
35 |
*/
|
36 |
obj.selectors = {
|
37 |
container: '.tribe-tickets__admin-container',
|
44 |
* Stores the current ajax request been handled by the manager.
|
45 |
*
|
46 |
* @since 5.1.0
|
|
|
47 |
* @type {jqXHR|null}
|
48 |
*/
|
49 |
obj.currentAjaxRequest = null;
|
52 |
* Containers on the current page that were initialized.
|
53 |
*
|
54 |
* @since 5.1.0
|
|
|
55 |
* @type {jQuery}
|
56 |
*/
|
57 |
obj.$containers = $();
|
60 |
* Saves all the containers in the page into the object.
|
61 |
*
|
62 |
* @since 5.1.0
|
|
|
63 |
* @return {void}
|
64 |
*/
|
65 |
obj.selectContainers = function() {
|
70 |
* Clean up the container and event listeners
|
71 |
*
|
72 |
* @since 5.1.0
|
|
|
73 |
* @param {jQuery} container Which element we are going to clean up
|
|
|
74 |
* @return {void}
|
75 |
*/
|
76 |
obj.cleanup = function( container ) {
|
85 |
* Setup the container for admin management
|
86 |
*
|
87 |
* @since 5.1.0
|
|
|
88 |
* @todo Requirement to setup other JS modules after hijacking Click and Submit
|
89 |
+
* @param {number} index jQuery.each index param
|
|
|
90 |
* @param {Element|jQuery} container Which element we are going to setup
|
|
|
91 |
* @return {void}
|
92 |
*/
|
93 |
obj.setup = function( index, container ) {
|
102 |
* Performs an AJAX request.
|
103 |
*
|
104 |
* @since 5.1.0
|
|
|
105 |
* @param {object} data DOM Event related to the Click action
|
106 |
* @param {Element|jQuery} $container Which container we are dealing with
|
|
|
107 |
* @return {void}
|
108 |
*/
|
109 |
obj.request = function( data, $container ) {
|
110 |
const settings = obj.getAjaxSettings( $container );
|
111 |
|
112 |
// Set the security nonce.
|
113 |
+
data.nonce = TribeTicketsAdminManager.tribeTicketsAdminManagerNonce;
|
114 |
|
115 |
// Pass the data received to the $.ajax settings
|
116 |
settings.data = data;
|
122 |
* Gets the jQuery.ajax() settings provided a views container
|
123 |
*
|
124 |
* @since 5.1.0
|
|
|
125 |
* @param {Element|jQuery} $container Which container we are dealing with.
|
126 |
+
* @return {object} ajaxSettings
|
|
|
127 |
*/
|
128 |
obj.getAjaxSettings = function( $container ) {
|
129 |
const ajaxSettings = {
|
147 |
* Context with the RSVP container used to fire this AJAX call
|
148 |
*
|
149 |
* @since 5.1.0
|
150 |
+
* @param {jqXHR} jqXHR Request object
|
151 |
+
* @param {object} settings Settings that this request will be made with
|
|
|
|
|
152 |
* @return {void}
|
153 |
*/
|
154 |
obj.ajaxBeforeSend = function( jqXHR, settings ) {
|
170 |
* Context with the RSVP container used to fire this AJAX call
|
171 |
*
|
172 |
* @since 5.1.0
|
|
|
173 |
* @param {jqXHR} jqXHR Request object
|
174 |
+
* @param {string} textStatus Status for the request
|
|
|
175 |
* @return {void}
|
176 |
*/
|
177 |
obj.ajaxComplete = function( jqXHR, textStatus ) {
|
196 |
* Context with the RSVP container used to fire this AJAX call
|
197 |
*
|
198 |
* @since 5.1.0
|
199 |
+
* @param {object} response Response sent from the AJAX response.
|
200 |
+
* @param {string} textStatus Status for the request
|
|
|
201 |
* @param {jqXHR} jqXHR Request object
|
|
|
202 |
* @return {void}
|
203 |
*/
|
204 |
obj.ajaxSuccess = function( response, textStatus, jqXHR ) {
|
241 |
* Context with the RSVP container used to fire this AJAX call
|
242 |
*
|
243 |
* @since 5.1.0
|
244 |
+
* @param {jqXHR} jqXHR Request object
|
245 |
+
* @param {object} settings Settings that this request was made with
|
|
|
|
|
246 |
* @return {void}
|
247 |
*/
|
248 |
obj.ajaxError = function( jqXHR, settings ) {
|
257 |
* Handles the initialization of the manager when Document is ready.
|
258 |
*
|
259 |
* @since 5.1.0
|
|
|
260 |
* @return {void}
|
261 |
*/
|
262 |
obj.ready = function() {
|
src/resources/js/admin/welcome-message.js
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
-
( function
|
2 |
-
'use strict';
|
3 |
-
|
4 |
obj.$window = $( window );
|
5 |
|
6 |
obj.selectors = {
|
@@ -15,9 +13,9 @@
|
|
15 |
obj.onResize = function() {
|
16 |
// resize the video embed to keep the right aspect ratio
|
17 |
$( obj.selectors.adminVideo ).each( function() {
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
// 16:9 ratio
|
23 |
newHeight = w * 0.5625;
|
@@ -27,13 +25,13 @@
|
|
27 |
} );
|
28 |
|
29 |
// find window size to adjust the thickbox links
|
30 |
-
|
31 |
-
|
32 |
|
33 |
// adjust thickbox links height and width to be 90% of the browser height and width
|
34 |
$( obj.selectors.thickbox ).each( function() {
|
35 |
-
|
36 |
-
|
37 |
|
38 |
href.searchParams.set( 'height', height );
|
39 |
href.searchParams.set( 'width', width );
|
1 |
+
( function( $, obj ) {
|
|
|
|
|
2 |
obj.$window = $( window );
|
3 |
|
4 |
obj.selectors = {
|
13 |
obj.onResize = function() {
|
14 |
// resize the video embed to keep the right aspect ratio
|
15 |
$( obj.selectors.adminVideo ).each( function() {
|
16 |
+
const $video = $( this );
|
17 |
+
const w = $video.width();
|
18 |
+
let newHeight = 0;
|
19 |
|
20 |
// 16:9 ratio
|
21 |
newHeight = w * 0.5625;
|
25 |
} );
|
26 |
|
27 |
// find window size to adjust the thickbox links
|
28 |
+
const height = parseInt( obj.$window.height() * 0.9, 10 );
|
29 |
+
const width = parseInt( obj.$window.width() * 0.9, 10 );
|
30 |
|
31 |
// adjust thickbox links height and width to be 90% of the browser height and width
|
32 |
$( obj.selectors.thickbox ).each( function() {
|
33 |
+
const $link = $( this );
|
34 |
+
const href = new URL( $link.prop( 'href' ) );
|
35 |
|
36 |
href.searchParams.set( 'height', height );
|
37 |
href.searchParams.set( 'width', width );
|
src/resources/js/app/blocks.js
CHANGED
@@ -38105,6 +38105,7 @@ var rsvp_style = __webpack_require__(404);
|
|
38105 |
*/
|
38106 |
|
38107 |
|
|
|
38108 |
/**
|
38109 |
* Internal dependencies
|
38110 |
*/
|
@@ -38114,9 +38115,6 @@ var rsvp_style = __webpack_require__(404);
|
|
38114 |
|
38115 |
|
38116 |
|
38117 |
-
const {
|
38118 |
-
__
|
38119 |
-
} = wp.i18n;
|
38120 |
|
38121 |
class template_RSVP extends external_React_["PureComponent"] {
|
38122 |
componentDidMount() {
|
@@ -38154,15 +38152,15 @@ class template_RSVP extends external_React_["PureComponent"] {
|
|
38154 |
className: "tribe-editor__not-supported-message"
|
38155 |
}, wp.element.createElement("p", {
|
38156 |
className: "tribe-editor__not-supported-message-text"
|
38157 |
-
}, __('RSVPs are not yet supported on recurring events.', 'event-tickets'), wp.element.createElement("br", null), wp.element.createElement("a", {
|
38158 |
className: "tribe-editor__not-supported-message-link",
|
38159 |
href: "https://evnt.is/1b7a",
|
38160 |
target: "_blank",
|
38161 |
rel: "noopener noreferrer"
|
38162 |
-
}, __('Read about our plans for future features.', 'event-tickets')), wp.element.createElement("br", null), wp.element.createElement("
|
38163 |
-
|
38164 |
onClick: () => wp.data.dispatch('core/block-editor').removeBlock(clientId)
|
38165 |
-
}, __('Remove block', 'event-tickets'))));
|
38166 |
}
|
38167 |
|
38168 |
render() {
|
@@ -39548,6 +39546,12 @@ var tickets_style = __webpack_require__(415);
|
|
39548 |
|
39549 |
|
39550 |
|
|
|
|
|
|
|
|
|
|
|
|
|
39551 |
/**
|
39552 |
* Internal dependencies
|
39553 |
*/
|
@@ -39556,9 +39560,6 @@ var tickets_style = __webpack_require__(415);
|
|
39556 |
|
39557 |
|
39558 |
|
39559 |
-
const {
|
39560 |
-
__: template_
|
39561 |
-
} = wp.i18n;
|
39562 |
|
39563 |
class template_Tickets extends external_React_["PureComponent"] {
|
39564 |
componentDidMount() {
|
@@ -39593,15 +39594,15 @@ class template_Tickets extends external_React_["PureComponent"] {
|
|
39593 |
className: "tribe-editor__not-supported-message"
|
39594 |
}, wp.element.createElement("p", {
|
39595 |
className: "tribe-editor__not-supported-message-text"
|
39596 |
-
},
|
39597 |
className: "tribe-editor__not-supported-message-link",
|
39598 |
href: "https://evnt.is/1b7a",
|
39599 |
target: "_blank",
|
39600 |
rel: "noopener noreferrer"
|
39601 |
-
},
|
39602 |
-
|
39603 |
onClick: () => wp.data.dispatch('core/block-editor').removeBlock(clientId)
|
39604 |
-
},
|
39605 |
}
|
39606 |
|
39607 |
renderContent() {
|
38105 |
*/
|
38106 |
|
38107 |
|
38108 |
+
|
38109 |
/**
|
38110 |
* Internal dependencies
|
38111 |
*/
|
38115 |
|
38116 |
|
38117 |
|
|
|
|
|
|
|
38118 |
|
38119 |
class template_RSVP extends external_React_["PureComponent"] {
|
38120 |
componentDidMount() {
|
38152 |
className: "tribe-editor__not-supported-message"
|
38153 |
}, wp.element.createElement("p", {
|
38154 |
className: "tribe-editor__not-supported-message-text"
|
38155 |
+
}, Object(external_var_wp_i18n_root_wp_i18n_["__"])('RSVPs are not yet supported on recurring events.', 'event-tickets'), wp.element.createElement("br", null), wp.element.createElement("a", {
|
38156 |
className: "tribe-editor__not-supported-message-link",
|
38157 |
href: "https://evnt.is/1b7a",
|
38158 |
target: "_blank",
|
38159 |
rel: "noopener noreferrer"
|
38160 |
+
}, Object(external_var_wp_i18n_root_wp_i18n_["__"])('Read about our plans for future features.', 'event-tickets')), wp.element.createElement("br", null), wp.element.createElement(external_var_wp_components_root_wp_components_["Button"], {
|
38161 |
+
variant: "secondary",
|
38162 |
onClick: () => wp.data.dispatch('core/block-editor').removeBlock(clientId)
|
38163 |
+
}, Object(external_var_wp_i18n_root_wp_i18n_["__"])('Remove block', 'event-tickets'))));
|
38164 |
}
|
38165 |
|
38166 |
render() {
|
39546 |
|
39547 |
|
39548 |
|
39549 |
+
/**
|
39550 |
+
* WordPress dependencies
|
39551 |
+
*/
|
39552 |
+
|
39553 |
+
|
39554 |
+
|
39555 |
/**
|
39556 |
* Internal dependencies
|
39557 |
*/
|
39560 |
|
39561 |
|
39562 |
|
|
|
|
|
|
|
39563 |
|
39564 |
class template_Tickets extends external_React_["PureComponent"] {
|
39565 |
componentDidMount() {
|
39594 |
className: "tribe-editor__not-supported-message"
|
39595 |
}, wp.element.createElement("p", {
|
39596 |
className: "tribe-editor__not-supported-message-text"
|
39597 |
+
}, Object(external_var_wp_i18n_root_wp_i18n_["__"])('Tickets are not yet supported for on recurring events.', 'event-tickets'), wp.element.createElement("br", null), wp.element.createElement("a", {
|
39598 |
className: "tribe-editor__not-supported-message-link",
|
39599 |
href: "https://evnt.is/1b7a",
|
39600 |
target: "_blank",
|
39601 |
rel: "noopener noreferrer"
|
39602 |
+
}, Object(external_var_wp_i18n_root_wp_i18n_["__"])('Read about our plans for future features.', 'event-tickets')), wp.element.createElement("br", null), wp.element.createElement(external_var_wp_components_root_wp_components_["Button"], {
|
39603 |
+
variant: "secondary",
|
39604 |
onClick: () => wp.data.dispatch('core/block-editor').removeBlock(clientId)
|
39605 |
+
}, Object(external_var_wp_i18n_root_wp_i18n_["__"])('Remove block', 'event-tickets'))));
|
39606 |
}
|
39607 |
|
39608 |
renderContent() {
|
src/resources/js/app/blocks.min.js
CHANGED
@@ -11,4 +11,4 @@ var tribe="object"==typeof tribe?tribe:{};tribe.tickets=tribe.tickets||{},tribe.
|
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
-
*/var a="function"==typeof Symbol&&Symbol.for,r=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,o=a?Symbol.for("react.strict_mode"):60108,c=a?Symbol.for("react.profiler"):60114,d=a?Symbol.for("react.provider"):60109,l=a?Symbol.for("react.context"):60110,u=a?Symbol.for("react.async_mode"):60111,_=a?Symbol.for("react.concurrent_mode"):60111,m=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,T=a?Symbol.for("react.suspense_list"):60120,f=a?Symbol.for("react.memo"):60115,h=a?Symbol.for("react.lazy"):60116,y=a?Symbol.for("react.block"):60121,b=a?Symbol.for("react.fundamental"):60117,M=a?Symbol.for("react.responder"):60118,S=a?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case _:case s:case c:case o:case p:return e;default:switch(e=e&&e.$$typeof){case l:case m:case h:case f:case d:return e;default:return t}}case i:return t}}}function g(e){return E(e)===_}t.AsyncMode=u,t.ConcurrentMode=_,t.ContextConsumer=l,t.ContextProvider=d,t.Element=r,t.ForwardRef=m,t.Fragment=s,t.Lazy=h,t.Memo=f,t.Portal=i,t.Profiler=c,t.StrictMode=o,t.Suspense=p,t.isAsyncMode=function(e){return g(e)||E(e)===u},t.isConcurrentMode=g,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===d},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===m},t.isFragment=function(e){return E(e)===s},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===f},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===_||e===c||e===o||e===p||e===T||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===d||e.$$typeof===l||e.$$typeof===m||e.$$typeof===b||e.$$typeof===M||e.$$typeof===S||e.$$typeof===y)},t.typeOf=E},function(e,t,n){},function(e,t,n){},function(e,t){var n,a,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var c,d=[],l=!1,u=-1;function _(){l&&c&&(l=!1,c.length?d=c.concat(d):u=-1,d.length&&m())}function m(){if(!l){var e=o(_);l=!0;for(var t=d.length;t;){for(c=d,d=[];++u<t;)c&&c[u].run();u=-1,t=d.length}c=null,l=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function T(){}r.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];d.push(new p(e,t)),1!==d.length||l||o(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=T,r.addListener=T,r.once=T,r.off=T,r.removeListener=T,r.removeAllListeners=T,r.emit=T,r.prependListener=T,r.prependOnceListener=T,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var a=Object.keys;e.exports=function(e,t){var n,r,i,s,o;if(e===t)return!0;if(n=a(e),r=a(t),n.length!==r.length)return!1;for(i=0;i<n.length;){if(void 0===(o=e[s=n[i]])&&!t.hasOwnProperty(s)||o!==t[s])return!1;i++}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n;if(e===t)return!0;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var a=n(72),r=n(244),i=n(10),s=n.n(i),o=n(13),c=n(28);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}var u=n(1),_=n.n(u),m=_.a.shape({trySubscribe:_.a.func.isRequired,tryUnsubscribe:_.a.func.isRequired,notifyNestedSubs:_.a.func.isRequired,isSubscribed:_.a.func.isRequired}),p=_.a.shape({subscribe:_.a.func.isRequired,dispatch:_.a.func.isRequired,getState:_.a.func.isRequired});s.a.forwardRef;!function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",a=function(t){l(r,t);var a=r.prototype;function r(n,a){var r;return(r=t.call(this,n,a)||this)[e]=n.store,r}return a.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},a.render=function(){return i.Children.only(this.props.children)},r}(i.Component);a.propTypes={store:p.isRequired,children:_.a.element.isRequired},a.childContextTypes=((t={})[e]=p.isRequired,t[n]=m,t)}();function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}var y=n(387),b=n.n(y),M=n(248),S=n.n(M),E=n(385),g={notify:function(){}};var k=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=g}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,a=0;a<n.length;a++)n[a]()},get:function(){return t},subscribe:function(n){var a=!0;return t===e&&(t=e.slice()),t.push(n),function(){a&&null!==e&&(a=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=g)},e}(),D=void 0!==s.a.forwardRef,L=0,v={};function O(){}function j(e,t){var n,a;void 0===t&&(t={});var r=t,s=r.getDisplayName,o=void 0===s?function(e){return"ConnectAdvanced("+e+")"}:s,c=r.methodName,d=void 0===c?"connectAdvanced":c,u=r.renderCountProp,_=void 0===u?void 0:u,y=r.shouldHandleStateChanges,M=void 0===y||y,g=r.storeKey,j=void 0===g?"store":g,Y=r.withRef,w=void 0!==Y&&Y,I=h(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=j+"Subscription",C=L++,R=((n={})[j]=p,n[P]=m,n),A=((a={})[P]=m,a);return function(t){S()(Object(E.isValidElementType)(t),"You must pass a component to the function returned by "+d+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",a=o(n),r=f({},I,{getDisplayName:o,methodName:d,renderCountProp:_,shouldHandleStateChanges:M,storeKey:j,withRef:w,displayName:a,wrappedComponentName:n,WrappedComponent:t}),s=function(n){function s(e,t){var r;return(r=n.call(this,e,t)||this).version=C,r.state={},r.renderCount=0,r.store=e[j]||t[j],r.propsMode=Boolean(e[j]),r.setWrappedInstance=r.setWrappedInstance.bind(T(T(r))),S()(r.store,'Could not find "'+j+'" in either the context or props of "'+a+'". Either wrap the root component in a <Provider>, or explicitly pass "'+j+'" as a prop to "'+a+'".'),r.initSelector(),r.initSubscription(),r}l(s,n);var o=s.prototype;return o.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},o.componentDidMount=function(){M&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},o.componentWillReceiveProps=function(e){this.selector.run(e)},o.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},o.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=O,this.store=null,this.selector.run=O,this.selector.shouldComponentUpdate=!1},o.getWrappedInstance=function(){return S()(w,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+d+"() call."),this.wrappedInstance},o.setWrappedInstance=function(e){this.wrappedInstance=e},o.initSelector=function(){var t=e(this.store.dispatch,r);this.selector=function(e,t){var n={run:function(a){try{var r=e(t.getState(),a);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},o.initSubscription=function(){if(M){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new k(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},o.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(v)):this.notifyNestedSubs()},o.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},o.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},o.addExtraProps=function(e){if(!(w||_||this.propsMode&&this.subscription))return e;var t=f({},e);return w&&(t.ref=this.setWrappedInstance),_&&(t[_]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},o.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(i.createElement)(t,this.addExtraProps(e.props))},s}(i.Component);return D&&(s.prototype.UNSAFE_componentWillReceiveProps=s.prototype.componentWillReceiveProps,delete s.prototype.componentWillReceiveProps),s.WrappedComponent=t,s.displayName=a,s.childContextTypes=A,s.contextTypes=R,s.propTypes=R,b()(s,t)}}var Y=Object.prototype.hasOwnProperty;function w(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(w(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;r<n.length;r++)if(!Y.call(t,n[r])||!w(e[n[r]],t[n[r]]))return!1;return!0}var P=n(15);function C(e){return function(t,n){var a=e(t,n);function r(){return a}return r.dependsOnOwnProps=!1,r}}function R(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function A(e,t){return function(t,n){n.displayName;var a=function(e,t){return a.dependsOnOwnProps?a.mapToProps(e,t):a.mapToProps(e)};return a.dependsOnOwnProps=!0,a.mapToProps=function(t,n){a.mapToProps=e,a.dependsOnOwnProps=R(e);var r=a(t,n);return"function"==typeof r&&(a.mapToProps=r,a.dependsOnOwnProps=R(r),r=a(t,n)),r},a}}var H=[function(e){return"function"==typeof e?A(e):void 0},function(e){return e?void 0:C((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?C((function(t){return Object(P.a)(e,t)})):void 0}];var N=[function(e){return"function"==typeof e?A(e):void 0},function(e){return e?void 0:C((function(){return{}}))}];function x(e,t,n){return f({},n,e,t)}var V=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var a,r=n.pure,i=n.areMergedPropsEqual,s=!1;return function(t,n,o){var c=e(t,n,o);return s?r&&i(c,a)||(a=c):(s=!0,a=c),a}}}(e):void 0},function(e){return e?void 0:function(){return x}}];function F(e,t,n,a){return function(r,i){return n(e(r,i),t(a,i),i)}}function K(e,t,n,a,r){var i,s,o,c,d,l=r.areStatesEqual,u=r.areOwnPropsEqual,_=r.areStatePropsEqual,m=!1;function p(r,m){var p,T,f=!u(m,s),h=!l(r,i);return i=r,s=m,f&&h?(o=e(i,s),t.dependsOnOwnProps&&(c=t(a,s)),d=n(o,c,s)):f?(e.dependsOnOwnProps&&(o=e(i,s)),t.dependsOnOwnProps&&(c=t(a,s)),d=n(o,c,s)):h?(p=e(i,s),T=!_(p,o),o=p,T&&(d=n(o,c,s)),d):d}return function(r,l){return m?p(r,l):(o=e(i=r,s=l),c=t(a,s),d=n(o,c,s),m=!0,d)}}function W(e,t){var n=t.initMapStateToProps,a=t.initMapDispatchToProps,r=t.initMergeProps,i=h(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),s=n(e,i),o=a(e,i),c=r(e,i);return(i.pure?K:F)(s,o,c,e,i)}function U(e,t,n){for(var a=t.length-1;a>=0;a--){var r=t[a](e);if(r)return r}return function(t,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function z(e,t){return e===t}var G,B,q,J,$,Z,Q,X,ee,te,ne,ae,re=(q=(B=void 0===G?{}:G).connectHOC,J=void 0===q?j:q,$=B.mapStateToPropsFactories,Z=void 0===$?N:$,Q=B.mapDispatchToPropsFactories,X=void 0===Q?H:Q,ee=B.mergePropsFactories,te=void 0===ee?V:ee,ne=B.selectorFactory,ae=void 0===ne?W:ne,function(e,t,n,a){void 0===a&&(a={});var r=a,i=r.pure,s=void 0===i||i,o=r.areStatesEqual,c=void 0===o?z:o,d=r.areOwnPropsEqual,l=void 0===d?I:d,u=r.areStatePropsEqual,_=void 0===u?I:u,m=r.areMergedPropsEqual,p=void 0===m?I:m,T=h(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=U(e,Z,"mapStateToProps"),b=U(t,X,"mapDispatchToProps"),M=U(n,te,"mergeProps");return J(ae,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:M,pure:s,areStatesEqual:c,areOwnPropsEqual:l,areStatePropsEqual:_,areMergedPropsEqual:p},T))}),ie=n(4),se=n.n(ie),oe=n(17),ce=n(14),de=n.n(ce),le=n(20),ue=n.n(le),_e=n(24),me=n(23),pe=n(70),Te=!!document.documentElement.currentStyle,fe={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},he=["letter-spacing","line-height","font-family","font-weight","font-size","font-style","tab-size","text-rendering","text-transform","width","text-indent","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","box-sizing"],ye={},be=document.createElement("textarea"),Me=function(e){Object.keys(fe).forEach((function(t){e.style.setProperty(t,fe[t],"important")}))};function Se(e,t,n,a,r){void 0===n&&(n=!1),void 0===a&&(a=null),void 0===r&&(r=null),null===be.parentNode&&document.body.appendChild(be);var i=function(e,t,n){void 0===n&&(n=!1);if(n&&ye[t])return ye[t];var a=window.getComputedStyle(e);if(null===a)return null;var r=he.reduce((function(e,t){return e[t]=a.getPropertyValue(t),e}),{}),i=r["box-sizing"];if(""===i)return null;Te&&"border-box"===i&&(r.width=parseFloat(r.width)+parseFloat(a["border-right-width"])+parseFloat(a["border-left-width"])+parseFloat(a["padding-right"])+parseFloat(a["padding-left"])+"px");var s=parseFloat(r["padding-bottom"])+parseFloat(r["padding-top"]),o=parseFloat(r["border-bottom-width"])+parseFloat(r["border-top-width"]),c={sizingStyle:r,paddingSize:s,borderSize:o,boxSizing:i};n&&(ye[t]=c);return c}(e,t,n);if(null===i)return null;var s=i.paddingSize,o=i.borderSize,c=i.boxSizing,d=i.sizingStyle;Object.keys(d).forEach((function(e){be.style[e]=d[e]})),Me(be),be.value=e.value||e.placeholder||"x";var l=-1/0,u=1/0,_=be.scrollHeight;"border-box"===c?_+=o:"content-box"===c&&(_-=s),be.value="x";var m=be.scrollHeight-s,p=Math.floor(_/m);return null!==a&&(l=m*a,"border-box"===c&&(l=l+s+o),_=Math.max(l,_)),null!==r&&(u=m*r,"border-box"===c&&(u=u+s+o),_=Math.min(u,_)),{height:_,minHeight:l,maxHeight:u,rowCount:Math.floor(_/m),valueRowCount:p}}be.setAttribute("tab-index","-1"),be.setAttribute("aria-hidden","true"),Me(be);var Ee=function(){},ge=0,ke=function(e){function t(t){var n;return(n=e.call(this,t)||this)._onRef=function(e){n._ref=e;var t=n.props.inputRef;"function"!=typeof t?t.current=e:t(e)},n._onChange=function(e){n._controlled||n._resizeComponent(),n.props.onChange(e,T(n))},n._resizeComponent=function(e){void 0===e&&(e=Ee);var t=Se(n._ref,n._uid,n.props.useCacheForDOMMeasurements,n.props.minRows,n.props.maxRows);if(null!==t){var a=t.height,r=t.minHeight,i=t.maxHeight,s=t.rowCount,o=t.valueRowCount;n.rowCount=s,n.valueRowCount=o,n.state.height===a&&n.state.minHeight===r&&n.state.maxHeight===i?e():n.setState({height:a,minHeight:r,maxHeight:i},e)}else e()},n.state={height:t.style&&t.style.height||0,minHeight:-1/0,maxHeight:1/0},n._uid=ge++,n._controlled=void 0!==t.value,n._resizeLock=!1,n}l(t,e);var n=t.prototype;return n.render=function(){var e=this.props,t=(e.inputRef,e.maxRows,e.minRows,e.onHeightChange,e.useCacheForDOMMeasurements,h(e,["inputRef","maxRows","minRows","onHeightChange","useCacheForDOMMeasurements"]));return t.style=f({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)<this.state.height&&(t.style.overflow="hidden"),Object(i.createElement)("textarea",f({},t,{onChange:this._onChange,ref:this._onRef}))},n.componentDidMount=function(){var e=this;this._resizeComponent(),this._resizeListener=function(){e._resizeLock||(e._resizeLock=!0,e._resizeComponent((function(){e._resizeLock=!1})))},window.addEventListener("resize",this._resizeListener)},n.componentDidUpdate=function(e,t){e!==this.props&&this._resizeComponent(),this.state.height!==t.height&&this.props.onHeightChange(this.state.height,this)},n.componentWillUnmount=function(){window.removeEventListener("resize",this._resizeListener),function(e){delete ye[e]}(this._uid)},t}(i.Component);ke.defaultProps={inputRef:Ee,onChange:Ee,onHeightChange:Ee,useCacheForDOMMeasurements:!1};var De=ke,Le=n(21);n(390);const ve=e=>{let{goingCount:t,notGoingCount:n,showNotGoing:a}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__counters"},wp.element.createElement(Le.Counter,{className:"tribe-editor__rsvp-container-header__going-counter",count:t,label:Object(o.__)("Going","event-tickets")}),a&&wp.element.createElement(Le.Counter,{className:"tribe-editor__rsvp-container-header__not-going-counter",count:n,label:Object(o.__)("Not going","event-tickets")}))};ve.propTypes={goingCount:_.a.number,notGoingCount:_.a.number,showNotGoing:_.a.bool};var Oe=ve,je=n(11),Ye=n(19);var we=Object(P.c)(Object(Ye.withStore)(),re(e=>({goingCount:je.d.getRSVPGoingCount(e),notGoingCount:je.d.getRSVPNotGoingCount(e),showNotGoing:je.d.getRSVPNotGoingResponses(e)})))(Oe),Ie=n(43);n(391);const Pe=wp.element.createElement(Le.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ie.Clipboard,null),text:Object(o.__)("This ticket has Attendee Information Fields configured.","event-tickets")}),Ce=e=>{let{description:t,hasAttendeeInfoFields:n,isCreated:a,isDisabled:r,isSelected:s,onTempDescriptionChange:c,onTempTitleChange:d,tempDescription:l,tempTitle:u,title:_,available:m}=e;return wp.element.createElement(i.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__header-details"},((e,t,n,a,r,i)=>n?wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__title-input-wrapper"},wp.element.createElement(De,{className:"tribe-editor__rsvp-container-header__title-input",value:r,placeholder:Object(o.__)("RSVP Title","event-tickets"),onChange:a,disabled:t}),e&&Pe):wp.element.createElement("h2",{className:"tribe-editor__rsvp-container-header__title"},i))(n,r,s,d,u,_),((e,t,n,a,r)=>t?wp.element.createElement(De,{className:"tribe-editor__rsvp-container-header__description-input",value:a,placeholder:Object(o.__)("RSVP description","event-tickets"),onChange:n,disabled:e}):r&&wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__description"},r))(r,s,c,l,t),a&&(e=>{const t=Object(o.__)("%d available","event-tickets"),n=t,a=wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__capacity-label-fallback"},Object(o.__)("Unlimited","event-tickets"));return wp.element.createElement(me.NumericLabel,{className:"tribe-editor__rsvp-container-header__capacity-label",count:e,includeZero:!0,singular:t,plural:n,fallback:a})})(m)),wp.element.createElement(we,null))};Ce.propTypes={available:_.a.number,description:_.a.string,hasAttendeeInfoFields:_.a.bool,isCreated:_.a.bool,isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,onTempDescriptionChange:_.a.func,onTempTitleChange:_.a.func,tempDescription:_.a.string,tempTitle:_.a.string,title:_.a.string};var Re=Ce;const Ae=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var He=Object(P.c)(Object(Ye.withStore)(),re(e=>({available:je.d.getRSVPAvailable(e),description:je.d.getRSVPDescription(e),hasAttendeeInfoFields:je.d.getRSVPHasAttendeeInfoFields(e),isCreated:je.d.getRSVPCreated(e),isDisabled:Ae(e),tempDescription:je.d.getRSVPTempDescription(e),tempTitle:je.d.getRSVPTempTitle(e),title:je.d.getRSVPTitle(e)}),e=>({onTempDescriptionChange:t=>{e(je.a.setRSVPTempDescription(t.target.value)),e(je.a.setRSVPHasChanges(!0))},onTempTitleChange:t=>{e(je.a.setRSVPTempTitle(t.target.value)),e(je.a.setRSVPHasChanges(!0))}})))(Re),Ne=n(48),xe=n.n(Ne);n(393);const Ve=wp.element.createElement(_e.Dashicon,{className:"tribe-editor__rsvp-duration__duration-tooltip-label",icon:"info-outline"});var Fe=e=>{let{tooltipDisabled:t}=e;return wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__rsvp-duration__duration-label",label:Object(o.__)("Duration","event-tickets"),tooltipDisabled:t,tooltipLabel:Ve,tooltipText:Object(o.__)("By default, sales will begin as soon as you save the ticket and end when the event begins","event-tickets")})};const Ke=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var We=Object(P.c)(Object(Ye.withStore)(),re(e=>({isDisabled:Ke(e)})))(Fe),Ue=n(29),ze=n.n(Ue),Ge=n(35),Be=n.n(Ge);n(394);const qe=e=>wp.element.createElement(me.DateTimeRangePicker,Be()({className:"tribe-editor__rsvp-duration__duration-picker"},e));qe.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var Je=qe,$e=n(3);const Ze=["state"],Qe=["dispatch"];function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const tt=e=>(t,n,a)=>{const r={date:t,dayPickerInput:a};e(je.a.handleRSVPStartDate(r))},nt=e=>t=>e(je.a.setRSVPTempStartTimeInput(t.target.value)),at=e=>(t,n)=>{e(je.a.handleRSVPStartTime(t)),n()},rt=e=>(t,n,a)=>{const r={date:t,dayPickerInput:a};e(je.a.handleRSVPEndDate(r))},it=e=>t=>e(je.a.setRSVPTempEndTimeInput(t.target.value)),st=e=>(t,n)=>{e(je.a.handleRSVPEndTime(t)),n()},ot=(e,t)=>n=>{let a=$e.moment.toMoment(n.target.value,$e.moment.TIME_FORMAT,!1);if(!a.isValid()){const t=je.d.getRSVPStartTimeInput(e);a=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const r=$e.moment.totalSeconds(a);t(je.a.handleRSVPStartTime(r))},ct=(e,t)=>n=>{let a=$e.moment.toMoment(n.target.value,$e.moment.TIME_FORMAT,!1);if(!a.isValid()){const t=je.d.getRSVPEndTimeInput(e);a=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const r=$e.moment.totalSeconds(a);t(je.a.handleRSVPEndTime(r))};var dt=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=$e.globals.tecDateSettings().datepickerFormat?$e.moment.toFormat($e.globals.tecDateSettings().datepickerFormat):"LL",n=je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e),a=je.d.getRSVPTempStartDateMoment(e),r=je.d.getRSVPTempEndDateMoment(e),i=a&&a.toDate(),s=r&&r.toDate();return{fromDate:i,fromDateInput:je.d.getRSVPTempStartDateInput(e),fromDateDisabled:n,fromDateFormat:t,fromTime:je.d.getRSVPTempStartTimeInput(e),fromTimeDisabled:n,toDate:s,toDateInput:je.d.getRSVPTempEndDateInput(e),toDateDisabled:n,toDateFormat:t,toTime:je.d.getRSVPTempEndTimeInput(e),toTimeDisabled:n,state:e}},e=>({onFromDateChange:tt(e),onFromTimePickerChange:nt(e),onFromTimePickerClick:at(e),onToDateChange:rt(e),onToTimePickerChange:it(e),onToTimePickerClick:st(e),dispatch:e}),(e,t,n)=>{const{state:a}=e,r=ze()(e,Ze),{dispatch:i}=t,s=ze()(t,Qe);return et(et(et(et({},n),r),s),{},{onFromTimePickerBlur:ot(a,i),onToTimePickerBlur:ct(a,i)})}))(Je);n(395);var lt=e=>{let{hasDurationError:t}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp-duration"},wp.element.createElement(We,null),wp.element.createElement(dt,null),t&&wp.element.createElement("span",{className:"tribe-editor__rsvp-duration__error"},Object(o.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))};var ut=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasDurationError:je.d.getRSVPHasDurationError(e)})))(lt);n(396);const _t=e=>{let{moveRSVP:t,removeRSVP:n,isDisabled:a}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp__content-row--move-delete"},wp.element.createElement(Le.Button,{type:"button",onClick:t,disabled:a},Object(o.__)("Move RSVP","event-tickets")),wp.element.createElement(Le.Button,{type:"button",onClick:n,disabled:a},Object(o.__)("Remove RSVP","event-tickets")))};_t.propTypes={moveRSVP:_.a.func.isRequired,removeRSVP:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var mt=_t,pt=n(50);const Tt=["dispatch"];function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yt=Object(P.c)(Object(Ye.withStore)(),re(e=>({created:je.d.getRSVPCreated(e),rsvpId:je.d.getRSVPId(e),isDisabled:je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e)}),(e,t)=>({moveRSVP:n=>e(Object(pt.c)(n,t.clientId)),dispatch:e}),(e,t,n)=>{const{dispatch:a}=t,r=ze()(t,Tt);return ht(ht(ht(ht({},n),e),r),{},{removeRSVP:()=>{window.confirm(Object(o.__)("Are you sure you want to delete this RSVP? It cannot be undone.","event-tickets"))&&(a(je.a.deleteRSVP()),e.created&&e.rsvpId&&a(je.e.deleteRSVP(e.rsvpId)),Object(oe.dispatch)("core/editor").removeBlocks([n.clientId]))},moveRSVP:()=>t.moveRSVP(e.rsvpId)})}))(mt);n(397);const bt=Object(o.__)("+ Add","event-tickets"),Mt=Object(o.__)("Edit","event-tickets"),St=e=>{let{attendeeRegistrationURL:t,hasAttendeeInfoFields:n,isCreated:a,isDisabled:r,isModalOpen:i,onClick:s,onClose:c,onIframeLoad:d}=e;const l=n?Mt:bt;return wp.element.createElement(me.AttendeesRegistration,{helperText:Object(o.__)("Save your RSVP to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:r,isModalOpen:i,label:Object(o.__)("Attendee Information","event-tickets"),linkText:l,modalTitle:Object(o.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:d,showHelperText:!a,shouldCloseOnClickOutside:!1})};St.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var Et=St;const gt=e=>`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=attendee-registration&ticket_id=${je.d.getRSVPId(e)}&tribe_events_modal=1`,kt=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e)||!je.d.getRSVPCreated(e);var Dt=Object(P.c)(Object(Ye.withStore)(),re(e=>({attendeeRegistrationURL:gt(e),hasAttendeeInfoFields:je.d.getRSVPHasAttendeeInfoFields(e),isCreated:je.d.getRSVPCreated(e),isDisabled:kt(e),isModalOpen:je.d.getRSVPIsModalOpen(e)}),(e,t)=>({onClick:()=>{e(je.a.setRSVPIsModalOpen(!0))},onClose:n=>{n.target.classList.contains("components-modal__content")||e(je.a.setRSVPIsModalOpen(t.clientId,!1))},onIframeLoad:t=>{const n=t.contentWindow,a=()=>{t.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},r=n.document.querySelector("#event-tickets-attendee-information");r.addEventListener("submit",a);const i=()=>{n.removeEventListener("unload",i),r.removeEventListener("submit",a);const t=n.document.querySelector("#tribe-tickets-attendee-sortables"),s=Boolean(t.firstElementChild);e(je.a.setRSVPHasAttendeeInfoFields(s)),e(je.a.setRSVPIsModalOpen(!1))};n.addEventListener("unload",i);const s=n.document.querySelector(".tribe-intro > a");s&&s.setAttribute("target","_blank")}})))(Et);n(398);const Lt=()=>wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__labels"},wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label"},Object(o.__)("RSVP Capacity","event-tickets")),wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label-help"},Object(o.__)("Leave blank if unlimited","event-tickets"))),vt=e=>{let{capacityId:t,isDisabled:n,notGoingId:a,onTempCapacityChange:r,onTempNotGoingResponsesChange:i,tempCapacity:s,tempNotGoingResponses:c}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__options"},wp.element.createElement(Le.NumberInput,{className:"tribe-editor__rsvp-container-content__capacity-input",disabled:n,id:t,min:0,onChange:r,value:s}),wp.element.createElement(Le.Checkbox,{checked:c,className:"tribe-editor__rsvp-container-content__not-going-responses",disabled:n,id:a,label:Object(o.__)('Enable "Not Going" responses',"event-tickets"),onChange:i}))};vt.propTypes={capacityId:_.a.string.isRequired,isDisabled:_.a.bool.isRequired,notGoingId:_.a.string.isRequired,onTempCapacityChange:_.a.func.isRequired,onTempNotGoingResponsesChange:_.a.func.isRequired,tempCapacity:_.a.string.isRequired,tempNotGoingResponses:_.a.bool.isRequired};class Ot extends i.PureComponent{constructor(e){super(e),this.capacityId=xe()(),this.notGoingId=xe()()}render(){const{isDisabled:e,onTempCapacityChange:t,onTempNotGoingResponsesChange:n,tempCapacity:a,tempNotGoingResponses:r,clientId:s}=this.props,o={capacityId:this.capacityId,isDisabled:e,notGoingId:this.notGoingId,onTempCapacityChange:t,onTempNotGoingResponsesChange:n,tempCapacity:a,tempNotGoingResponses:r};return wp.element.createElement(i.Fragment,null,wp.element.createElement(Lt,null),wp.element.createElement(vt,o),wp.element.createElement(ut,null),this.props.hasBeenCreated&&wp.element.createElement(yt,{clientId:s}),this.props.hasTicketsPlus&&wp.element.createElement(Dt,null))}}de()(Ot,"propTypes",{clientId:_.a.string,hasTicketsPlus:_.a.bool,onTempCapacityChange:_.a.func,onTempNotGoingResponsesChange:_.a.func,tempCapacity:_.a.string,tempNotGoingResponses:_.a.bool,hasBeenCreated:_.a.bool});var jt=Ot,Yt=n(32);const wt=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var It=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),isDisabled:wt(e),tempCapacity:je.d.getRSVPTempCapacity(e),tempNotGoingResponses:je.d.getRSVPTempNotGoingResponses(e),hasBeenCreated:je.d.getRSVPCreated(e)}),e=>({onTempCapacityChange:t=>{e(je.a.setRSVPTempCapacity(t.target.value)),e(je.a.setRSVPHasChanges(!0))},onTempNotGoingResponsesChange:t=>{e(je.a.setRSVPTempNotGoingResponses(t.target.checked)),e(je.a.setRSVPHasChanges(!0))}})))(jt);n(399);const Pt=e=>{let{isDisabled:t}=e;return wp.element.createElement(i.Fragment,null,t?wp.element.createElement(c.RSVPInactive,null):wp.element.createElement(c.RSVPActive,null),wp.element.createElement("span",{className:"tribe-editor__rsvp-container__icon-label"},Object(o.__)("RSVP","event-tickets")))};Pt.propTypes={isDisabled:_.a.bool.isRequired};const Ct=e=>{let{isDisabled:t,isSelected:n,clientId:a}=e;return wp.element.createElement(me.ContainerPanel,{className:ue()("tribe-editor__rsvp-container",{"tribe-editor__rsvp-container--disabled":t}),layout:pe.a.rsvp,icon:wp.element.createElement(Pt,{isDisabled:t}),header:wp.element.createElement(He,{isSelected:n}),content:wp.element.createElement(It,{clientId:a})})};Ct.propTypes={isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,clientId:_.a.string.isRequired};var Rt=Ct;const At=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var Ht=Object(P.c)(Object(Ye.withStore)(),re(e=>({isDisabled:At(e)})))(Rt);const Nt=e=>{let{href:t,isDisabled:n}=e;return wp.element.createElement(me.ActionButton,{asLink:!0,className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--attendees",disabled:n,href:t,icon:wp.element.createElement(c.Attendees,null),target:"_blank"},Object(o.__)("Attendees","event-tickets"))};Nt.propTypes={href:_.a.string,isDisabled:_.a.bool};var xt=Nt;var Vt=Object(P.c)(Object(Ye.withStore)(),re(e=>({href:`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=tickets-attendees&event_id=${Object(oe.select)("core/editor").getCurrentPostId()}`,isDisabled:je.d.getRSVPIsLoading(e)})))(xt),Ft=n(33),Kt=n.n(Ft);const Wt=e=>{let{isDisabled:t,onClick:n}=e;return wp.element.createElement(me.ActionButton,{className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--settings",disabled:t,icon:wp.element.createElement(Ie.Cog,null),onClick:n},Object(o.__)("Settings","event-tickets"))};Wt.defaultProps={onClick:Kt.a},Wt.propTypes={isDisabled:_.a.bool,onClick:_.a.func};var Ut=Wt;var zt=Object(P.c)(Object(Ye.withStore)(),re(e=>({isDisabled:je.d.getRSVPIsLoading(e)}),e=>({onClick:()=>e(je.a.setRSVPSettingsOpen(!0))})))(Ut);n(400);const Gt=e=>e?Object(o.__)("Update RSVP","event-tickets"):Object(o.__)("Create RSVP","event-tickets"),Bt=Object(o.__)("Cancel","event-tickets");class qt extends i.PureComponent{constructor(e){super(e),de()(this,"onWarningClick",()=>{this.setState({isWarningOpen:!this.state.isWarningOpen})}),de()(this,"getActions",()=>{const{created:e,hasRecurrenceRules:t,isLoading:n}=this.props,a=[wp.element.createElement(zt,null)];if(e&&a.push(wp.element.createElement(Vt,null)),t){const e=this.state.isWarningOpen?"no":"info-outline",t=this.state.isWarningOpen?Object(o.__)("Hide Warning","event-tickets"):Object(o.__)("Warning","event-tickets");a.push(wp.element.createElement(me.WarningButton,{icon:e,onClick:this.onWarningClick,isDisabled:n},t))}return a}),this.state={isWarningOpen:!1}}render(){const{created:e,isCancelDisabled:t,isConfirmDisabled:n,onCancelClick:a,onConfirmClick:r,showCancel:s}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(me.ActionDashboard,{className:"tribe-editor__rsvp__action-dashboard",actions:this.getActions(),cancelLabel:Bt,confirmLabel:Gt(e),isCancelDisabled:t,isConfirmDisabled:n,onCancelClick:a,onConfirmClick:r,showCancel:s}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__rsvp__warning"},Object(o.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}de()(qt,"propTypes",{created:_.a.bool.isRequired,hasRecurrenceRules:_.a.bool.isRequired,isCancelDisabled:_.a.bool.isRequired,isConfirmDisabled:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,onCancelClick:_.a.func.isRequired,onConfirmClick:_.a.func.isRequired,showCancel:_.a.bool.isRequired});var Jt=qt,$t=n(54);const Zt=["state"];function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const en=e=>!je.d.getRSVPTempTitle(e)||!je.d.getRSVPHasChanges(e)||je.d.getRSVPIsLoading(e)||je.d.getRSVPHasDurationError(e),tn=(e,t)=>()=>{t(je.a.setRSVPTempDetails({tempTitle:je.d.getRSVPTitle(e),tempDescription:je.d.getRSVPDescription(e),tempCapacity:je.d.getRSVPCapacity(e),tempNotGoingResponses:je.d.getRSVPNotGoingResponses(e),tempStartDate:je.d.getRSVPStartDate(e),tempStartDateInput:je.d.getRSVPStartDateInput(e),tempStartDateMoment:je.d.getRSVPStartDateMoment(e),tempEndDate:je.d.getRSVPEndDate(e),tempEndDateInput:je.d.getRSVPEndDateInput(e),tempEndDateMoment:je.d.getRSVPEndDateMoment(e),tempStartTime:je.d.getRSVPStartTime(e),tempEndTime:je.d.getRSVPEndTime(e),tempStartTimeInput:je.d.getRSVPStartTimeInput(e),tempEndTimeInput:je.d.getRSVPEndTimeInput(e)})),t(je.a.setRSVPHasChanges(!1)),Object(oe.dispatch)("core/editor").clearSelectedBlock()},nn=(e,t)=>()=>{const n={title:je.d.getRSVPTempTitle(e),description:je.d.getRSVPTempDescription(e),capacity:je.d.getRSVPTempCapacity(e),notGoingResponses:je.d.getRSVPTempNotGoingResponses(e),startDate:je.d.getRSVPTempStartDate(e),startDateInput:je.d.getRSVPTempStartDateInput(e),startDateMoment:je.d.getRSVPTempStartDateMoment(e),endDate:je.d.getRSVPTempEndDate(e),endDateInput:je.d.getRSVPTempEndDateInput(e),endDateMoment:je.d.getRSVPTempEndDateMoment(e),startTime:je.d.getRSVPTempStartTime(e),endTime:je.d.getRSVPTempEndTime(e),startTimeInput:je.d.getRSVPTempStartTimeInput(e),endTimeInput:je.d.getRSVPTempEndTimeInput(e)};je.d.getRSVPCreated(e)?t(je.e.updateRSVP(Xt(Xt({},n),{},{id:je.d.getRSVPId(e)}))):t(je.e.createRSVP(Xt(Xt({},n),{},{postId:Object(oe.select)("core/editor").getCurrentPostId()})))};var an=Object(P.c)(Object(Ye.withStore)(),re(e=>({created:je.d.getRSVPCreated(e),hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)(),isCancelDisabled:je.d.getRSVPIsLoading(e),isConfirmDisabled:en(e),isLoading:je.d.getRSVPIsLoading(e),showCancel:je.d.getRSVPCreated(e),state:e}),null,(e,t,n)=>{const{state:a}=e,r=ze()(e,Zt),{dispatch:i}=t;return Xt(Xt(Xt({},n),r),{},{onCancelClick:tn(a,i),onConfirmClick:nn(a,i)})}))(Jt);n(401);const rn=e=>{let{image:t,isSettingsLoading:n,onRemove:a,onSelect:r}=e;const i={title:Object(o.__)("Ticket Header Image","event-tickets"),description:Object(o.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(o.__)("Upload Image","event-tickets"),image:t,onRemove:a,onSelect:r,removeButtonDisabled:n};return wp.element.createElement(Le.ImageUpload,i)};rn.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var sn=rn;var on=Object(P.c)(Object(Ye.withStore)(),re(e=>({image:{id:je.d.getRSVPHeaderImageId(e),alt:je.d.getRSVPHeaderImageAlt(e),src:je.d.getRSVPHeaderImageSrc(e)},isSettingsLoading:je.d.getRSVPIsSettingsLoading(e)}),e=>({onSelect:t=>e(je.a.updateRSVPHeaderImage(t)),onRemove:()=>e(je.a.deleteRSVPHeaderImage())})))(sn);n(402);const cn=e=>{let{isSettingsLoading:t,onCloseClick:n}=e;return wp.element.createElement(me.SettingsDashboard,{className:ue()("tribe-editor__rsvp__settings-dashboard",{"tribe-editor__rsvp__settings-dashboard--loading":t}),closeButtonDisabled:t,content:wp.element.createElement(i.Fragment,null,wp.element.createElement(on,null),t&&wp.element.createElement(_e.Spinner,null)),onCloseClick:n})};cn.propTypes={isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var dn=cn;var ln=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsLoading:je.d.getRSVPIsSettingsLoading(e)}),e=>({onCloseClick:()=>e(je.a.setRSVPSettingsOpen(!1))})))(dn);const un=e=>{let{isSelected:t,isSettingsOpen:n}=e;return t?n?wp.element.createElement(ln,null):wp.element.createElement(an,null):null};un.propTypes={isSelected:_.a.bool.isRequired,isSettingsOpen:_.a.bool.isRequired};var _n=un;var mn=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsOpen:je.d.getRSVPSettingsOpen(e)})))(_n),pn=n(62);const Tn={className:"tribe-editor__rsvp__inactive-block",icon:wp.element.createElement(c.RSVPInactive,null),layout:pn.a.rsvp},fn=e=>{let{created:t}=e;return Tn.title=t?Object(o.__)("RSVP is not currently active","event-tickets"):Object(o.__)("There is no RSVP configured","event-tickets"),Tn.description=t?Object(o.__)("Edit this block to change RSVP settings.","event-tickets"):Object(o.__)("Edit this block to create an RSVP form.","event-tickets"),wp.element.createElement(pn.b,Tn)};fn.propTypes={created:_.a.bool.isRequired};var hn=fn;var yn=Object(P.c)(Object(Ye.withStore)(),re(e=>({created:je.d.getRSVPCreated(e)})))(hn),bn=n(27),Mn=n(18);n(403);class Sn extends i.PureComponent{constructor(){super(...arguments),de()(this,"renderPostTypes",()=>this.props.isFetchingPosts?wp.element.createElement(_e.Spinner,null):this.props.postOptions.length?wp.element.createElement(_e.MenuGroup,null,wp.element.createElement(_e.MenuItemsChoice,{choices:this.props.postOptions,value:this.props.postValue,onSelect:this.props.onPostSelect})):wp.element.createElement(_e.Notice,{isDismissible:!1,status:"warning"},Object(o.__)("No posts found","event-tickets")))}componentDidMount(){this.props.initialize()}render(){return wp.element.createElement(_e.Modal,{title:this.props.title,onRequestClose:this.props.hideModal,className:"tribe-editor__tickets__move-modal"},wp.element.createElement("label",{htmlFor:"post_type"},Object(o.__)("You can optionally focus on a specific post type:","event-tickets")),wp.element.createElement(Le.Select,{id:"post_type",options:this.props.postTypeOptions,onChange:this.props.onPostTypeChange,value:this.props.postTypeOptionValue}),wp.element.createElement("label",{htmlFor:"search"},Object(o.__)("You can also enter keywords to help find the target event by title or description","event-tickets")),wp.element.createElement(Le.Input,{id:"search",type:"text",onChange:this.props.onSearchChange,value:this.props.search}),wp.element.createElement("label",null,Object(o.__)("Select the post you wish to move the ticket type to:","event-tickets")),this.renderPostTypes(),wp.element.createElement("footer",null,wp.element.createElement(_e.Button,{isLarge:!0,isPrimary:!0,isBusy:this.props.isModalSubmitting,disabled:!this.props.hasSelectedPost||this.props.isFetchingPosts,onClick:this.props.onSubmit},Object(o.__)("Finish!","event-tickets"))))}}de()(Sn,"propTypes",{hasSelectedPost:_.a.bool.isRequired,hideModal:_.a.func.isRequired,initialize:_.a.func.isRequired,isFetchingPosts:_.a.bool.isRequired,isModalSubmitting:_.a.bool.isRequired,onPostSelect:_.a.func.isRequired,onPostTypeChange:_.a.func.isRequired,onSearchChange:_.a.func.isRequired,onSubmit:_.a.func.isRequired,postOptions:_.a.arrayOf(_.a.object),postTypeOptions:_.a.arrayOf(_.a.object),postTypeOptionValue:_.a.object,postValue:_.a.string.isRequired,search:_.a.string.isRequired,title:_.a.string.isRequired}),de()(Sn,"defaultProps",{title:Object(o.__)("Move Ticket Types","event-tickets")});var En=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasSelectedPost:bn.i(e),isFetchingPosts:bn.k(e),isFetchingPostTypes:bn.j(e),isModalSubmitting:bn.m(e),postOptions:bn.f(e),postTypeOptions:bn.h(e),postTypeOptionValue:bn.g(e),postValue:bn.d(e),search:bn.c(e)}),e=>({initialize:()=>e({type:Mn.h}),hideModal:()=>e(Object(pt.a)()),onSearchChange:t=>e(Object(pt.b)({search_terms:t.target.value})),onPostTypeChange:t=>e(Object(pt.b)({post_type:t.value})),onPostSelect:t=>e(Object(pt.b)({target_post_id:t})),onSubmit:()=>e({type:Mn.o})})))(Sn);n(404);const{__:gn}=wp.i18n;class kn extends i.PureComponent{componentDidMount(){!this.props.rsvpId&&this.props.initializeRSVP()}renderBlock(){const{created:e,isInactive:t,isLoading:n,isSelected:a,clientId:r,isModalShowing:s}=this.props;return wp.element.createElement(i.Fragment,null,!a&&(e&&t||!e)?wp.element.createElement(yn,null):wp.element.createElement("div",{className:ue()("tribe-editor__rsvp",{"tribe-editor__rsvp--selected":a},{"tribe-editor__rsvp--loading":n})},wp.element.createElement(Ht,{isSelected:a,clientId:r}),wp.element.createElement(mn,{isSelected:a}),n&&wp.element.createElement(_e.Spinner,null)),s&&wp.element.createElement(En,null))}renderBlockNotSupported(){const{clientId:e}=this.props;return wp.element.createElement("div",{className:"tribe-editor__not-supported-message"},wp.element.createElement("p",{className:"tribe-editor__not-supported-message-text"},gn("RSVPs are not yet supported on recurring events.","event-tickets"),wp.element.createElement("br",null),wp.element.createElement("a",{className:"tribe-editor__not-supported-message-link",href:"https://evnt.is/1b7a",target:"_blank",rel:"noopener noreferrer"},gn("Read about our plans for future features.","event-tickets")),wp.element.createElement("br",null),wp.element.createElement("a",{href:"#",onClick:()=>wp.data.dispatch("core/block-editor").removeBlock(e)},gn("Remove block","event-tickets"))))}render(){return this.props.hasRecurrenceRules&&this.props.noTicketsOnRecurring?this.renderBlockNotSupported():this.renderBlock()}}de()(kn,"propTypes",{clientId:_.a.string.isRequired,created:_.a.bool.isRequired,initializeRSVP:_.a.func.isRequired,isInactive:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,isModalShowing:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,rsvpId:_.a.number.isRequired});var Dn=kn,Ln=n(40),vn=n.n(Ln),On=n(37),jn=n.n(On),Yn=n(30),wn=n.n(Yn),In=n(245),Pn=n.n(In),Cn=n(386),Rn=n.n(Cn);function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Nn={};var xn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{class n extends i.Component{constructor(e){super(e),de()(this,"keys",[]),de()(this,"saving",null),this.keys=this.generateKeys()}generateKeys(){return wn()(this.attrs)?this.attrs:jn()(this.attrs)?vn()(this.attrs):(console.warn("Make sure attributes is from a valid type: Array or Object"),[])}componentDidMount(){const{setInitialState:e,attributes:t={},isolated:n,onBlockCreated:a}=this.props;a(this.props),this.registerBlock(),this.blockCount()>1&&!n||e(Hn(Hn({},this.props),{},{get:(e,n)=>e in t?t[e]:n}))}componentWillUnmount(){const{onBlockRemoved:e}=this.props;this.unregisterBlock(),e(this.props)}registerBlock(){const{name:e}=this.props;Nn[e]=e in Nn?Nn[e]+1:1}unregisterBlock(){const{name:e}=this.props;Nn[e]-=1}blockCount(){const{name:e}=this.props;return Nn[e]}componentDidUpdate(){const e=this.calculateDiff();Rn()(this.saving,e)||(this.saving=e,Pn()(e)||this.props.setAttributes(e))}calculateDiff(){const e=this.attrs;return this.keys.reduce((t,n)=>(n in this.props&&!Rn()(e[n],this.props[n])&&(t[n]=this.props[n]),t),{})}get attrs(){return e||this.props.attributes||{}}render(){return wp.element.createElement(t,this.props)}}return de()(n,"defaultProps",{attributes:{},setInitialState:Kt.a,setAttributes:Kt.a,name:"",isolated:!1,onBlockCreated:Kt.a,onBlockRemoved:Kt.a}),de()(n,"propTypes",{setAttributes:_.a.func,setInitialState:_.a.func,attributes:_.a.object,name:_.a.string,isolated:_.a.bool,increaseRegister:_.a.func,decreaseRegister:_.a.func,onBlockCreated:_.a.func,onBlockRemoved:_.a.func}),n.displayName="WithSaveData( "+(t.displayName||t.name||"Component "),n}};const Vn=e=>{const t=je.d.getRSVPStartDateMoment(e),n=je.d.getRSVPStartTimeNoSeconds(e),a=je.d.getRSVPEndDateMoment(e),r=je.d.getRSVPEndTimeNoSeconds(e);if(!t||!a)return!1;const i=$e.moment.setTimeInSeconds(t.clone(),$e.time.toSeconds(n,$e.time.TIME_FORMAT_HH_MM)),s=$e.moment.setTimeInSeconds(a.clone(),$e.time.toSeconds(r,$e.time.TIME_FORMAT_HH_MM)),o=se()();return!(o.isAfter(i)&&o.isBefore(s))},Fn=(e,t)=>()=>{const n=Object(oe.select)("core/editor").getCurrentPostId();e(je.e.getRSVP(n));const{attributes:a={}}=t;parseInt(a.headerImageId,10)&&e(je.a.fetchRSVPHeaderImage(a.headerImageId)),a.goingCount&&e(je.a.setRSVPGoingCount(parseInt(a.goingCount,10))),a.notGoingCount&&e(je.a.setRSVPNotGoingCount(parseInt(a.notGoingCount,10)))};var Kn=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=je.d.getRSVPId(e);return{created:je.d.getRSVPCreated(e),isInactive:Vn(e),isLoading:je.d.getRSVPIsLoading(e),isModalShowing:Object(bn.l)(e)&&Object(bn.e)(e)===t,hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)(),rsvpId:t}},(e,t)=>({initializeRSVP:()=>e(je.a.initializeRSVP()),onBlockRemoved:()=>e(je.a.deleteRSVP()),setInitialState:Fn(e,t)})),xn())(Dn),Wn=n(8),Un={id:"rsvp",title:Object(o.__)("RSVP","event-tickets"),description:Object(o.__)("Find out who is planning to attend!","event-tickets"),icon:wp.element.createElement(c.RSVP,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{goingCount:{type:"integer",source:"meta",meta:Wn.g},notGoingCount:{type:"integer",source:"meta",meta:Wn.j},headerImageId:{type:"integer",source:"meta",meta:Wn.i}},edit:Kn,save:()=>null};const zn=e=>{let{onClick:t}=e;return wp.element.createElement(me.ActionButton,{icon:wp.element.createElement(Ie.Cog,null),onClick:t},Object(o.__)("Settings","event-tickets"))};zn.propTypes={onClick:_.a.func};var Gn=zn,Bn=n(5);var qn=Object(P.c)(Object(Ye.withStore)(),re(null,e=>({onClick:()=>e(Bn.a.openSettings())})))(Gn);const Jn=e=>{let{href:t}=e;return t?wp.element.createElement(me.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(c.Orders,null),target:"_blank"},Object(o.__)("Orders","event-tickets")):null};Jn.propTypes={href:_.a.string.isRequired};var $n=Jn;var Zn=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=$e.globals.adminUrl(),n=Object(oe.select)("core/editor").getCurrentPostType(),a=Object(oe.select)("core/editor").getCurrentPostId(),r=Bn.f.getTicketsProvider(e),i=Bn.b.TICKET_ORDERS_PAGE_SLUG[r];return{href:i?`${t}edit.php?post_type=${n}&page=${i}&event_id=${a}`:""}}))($n);const Qn=e=>{let{href:t,canCreateTickets:n}=e;return n&&wp.element.createElement(me.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(c.Attendees,null),target:"_blank"},Object(o.__)("Attendees","event-tickets"))};Qn.propTypes={href:_.a.string.isRequired,canCreateTickets:_.a.bool};var Xn=Qn;var ea=Object(P.c)(Object(Ye.withStore)(),re(()=>({href:`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=tickets-attendees&event_id=${Object(oe.select)("core/editor").getCurrentPostId()}`,canCreateTickets:Bn.f.canCreateTickets()})))(Xn);n(407);const ta=Object(o.__)("Add Tickets","event-tickets");class na extends i.PureComponent{constructor(e){super(e),de()(this,"onWarningClick",()=>{this.setState({isWarningOpen:!this.state.isWarningOpen})}),de()(this,"getActions",()=>{const{hasCreatedTickets:e,hasOrdersPage:t,hasRecurrenceRules:n}=this.props,a=[wp.element.createElement(qn,null)];if(e&&(a.push(wp.element.createElement(ea,null)),t&&a.push(wp.element.createElement(Zn,null))),n){const e=this.state.isWarningOpen?"no":"info-outline",t=this.state.isWarningOpen?Object(o.__)("Hide Warning","event-tickets"):Object(o.__)("Warning","event-tickets");a.push(wp.element.createElement(me.WarningButton,{icon:e,onClick:this.onWarningClick},t))}return a}),this.state={isWarningOpen:!1}}render(){const{onConfirmClick:e}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(me.ActionDashboard,{className:"tribe-editor__tickets__action-dashboard",actions:this.getActions(),confirmLabel:ta,onConfirmClick:e,showCancel:!1}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__tickets__warning"},Object(o.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}de()(na,"propTypes",{hasCreatedTickets:_.a.bool,hasOrdersPage:_.a.bool,hasRecurrenceRules:_.a.bool,onConfirmClick:_.a.func});var aa=na;var ra=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Bn.f.getTicketsProvider(e),r=Bn.b.TICKET_ORDERS_PAGE_SLUG[n];return{hasCreatedTickets:Bn.f.hasCreatedTickets(e),hasOrdersPage:Boolean(r),hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)(),onConfirmClick:()=>{const{clientId:e}=t,{getBlockCount:n}=Object(oe.select)("core/editor"),{insertBlock:r}=Object(oe.dispatch)("core/editor"),i=n(e);r(Object(a.createBlock)("tribe/tickets-item",{}),i,e)}}}))(aa);n(408);const ia=e=>{let{label:t,items:n,right:a}=e;return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-row"},wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-left"},t&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-label"},t),n&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-items"},n)),wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-right"},a))};ia.propTypes={label:_.a.string,items:_.a.string,right:_.a.node},ia.defaultProps={label:"",items:"",right:""};var sa=ia;n(409);const oa=e=>{let{isSettingsLoading:t,independentCapacity:n,sharedCapacity:a,independentAndSharedCapacity:r,independentTicketItems:i,sharedTicketItems:s,onSharedCapacityChange:c}=e;const d=wp.element.createElement(Le.NumberInput,{onChange:c,value:a,disabled:t,min:0});return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-table"},wp.element.createElement("h3",{className:"tribe-editor__tickets__capacity-table-title"},Object(o.__)("Capacity","event-tickets")),wp.element.createElement(sa,{label:Object(o.__)("Shared capacity","event-tickets"),items:s,right:d}),wp.element.createElement(sa,{label:Object(o.__)("Independent capacity","event-tickets"),items:i,right:n}),wp.element.createElement(sa,{label:Object(o.__)("Total Capacity","event-tickets"),right:r}))};oa.propTypes={isSettingsLoading:_.a.bool,independentCapacity:_.a.number,sharedCapacity:_.a.string,independentAndSharedCapacity:_.a.number,independentTicketItems:_.a.string,sharedTicketItems:_.a.string,onSharedCapacityChange:_.a.func};var ca=oa;const da=e=>{const t=e.filter(e=>e.details.title).map(e=>e.details.title).join(", ");return t?` (${t}) `:""},la=e=>{const t=Bn.f.getIndependentTickets(e);return da(t)},ua=e=>{const t=Bn.f.getSharedTickets(e);return da(t)};var _a=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsLoading:Bn.f.getTicketsIsSettingsLoading(e),independentCapacity:Bn.f.getIndependentTicketsCapacity(e),sharedCapacity:Bn.f.getTicketsSharedCapacity(e),independentAndSharedCapacity:Bn.f.getIndependentAndSharedTicketsCapacity(e),independentTicketItems:la(e),sharedTicketItems:ua(e)}),e=>({onSharedCapacityChange:t=>{e(Bn.a.setTicketsSharedCapacity(t.target.value)),e(Bn.a.setTicketsTempSharedCapacity(t.target.value))}})))(ca);n(410);const ma=e=>{let{image:t,isSettingsLoading:n,onRemove:a,onSelect:r}=e;const i={title:Object(o.__)("Ticket Header Image","event-tickets"),description:Object(o.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(o.__)("Upload Image","event-tickets"),image:t,onRemove:a,onSelect:r,removeButtonDisabled:n};return wp.element.createElement(Le.ImageUpload,i)};ma.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var pa=ma;var Ta=Object(P.c)(Object(Ye.withStore)(),re(e=>({image:{id:Bn.f.getTicketsHeaderImageId(e),alt:Bn.f.getTicketsHeaderImageAlt(e),src:Bn.f.getTicketsHeaderImageSrc(e)},isSettingsLoading:Bn.f.getTicketsIsSettingsLoading(e)}),e=>({onSelect:t=>e(Bn.a.updateTicketsHeaderImage(t)),onRemove:()=>e(Bn.a.deleteTicketsHeaderImage())})))(pa);n(411);const fa=e=>{let{hasTicketsPlus:t,isSettingsLoading:n,onCloseClick:a}=e;return wp.element.createElement(me.SettingsDashboard,{className:ue()("tribe-editor__tickets__settings-dashboard",{"tribe-editor__tickets__settings-dashboard--loading":n}),closeButtonDisabled:n,content:wp.element.createElement(i.Fragment,null,t&&wp.element.createElement(_a,null),wp.element.createElement(Ta,null),n&&wp.element.createElement(_e.Spinner,null)),onCloseClick:a})};fa.propTypes={hasTicketsPlus:_.a.bool,isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var ha=fa;var ya=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),isSettingsLoading:Bn.f.getTicketsIsSettingsLoading(e)}),e=>({onCloseClick:()=>e(Bn.a.closeSettings())})))(ha);const ba=e=>{let{clientId:t,isSelected:n,isSettingsOpen:a}=e;return n?a?wp.element.createElement(ya,null):wp.element.createElement(ra,{clientId:t}):null};ba.propTypes={clientId:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool};var Ma=ba;var Sa=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsOpen:Bn.f.getTicketsIsSettingsOpen(e)})))(Ma);n(412);const Ea=e=>{let{available:t,total:n}=e;const a=wp.element.createElement(me.NumericLabel,{className:ue()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--available","tribe-tooltip"),count:t,singular:Object(o.__)("%d ticket available","event-tickets"),plural:Object(o.__)("%d tickets available","event-tickets")}),r=wp.element.createElement(me.NumericLabel,{className:ue()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--total"),count:n,singular:Object(o.__)("%d total ticket","event-tickets"),plural:Object(o.__)("%d total tickets","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__tickets__availability"},wp.element.createElement("span",{class:"tribe-tooltip",title:Object(o.__)("Ticket availability is based on the lowest number of inventory, stock, and capacity.","event-tickets")},a,wp.element.createElement("span",{className:"dashicons dashicons-info"})),r)};Ea.propTypes={available:_.a.number,total:_.a.number};var ga=Ea;var ka=Object(P.c)(Object(Ye.withStore)(),re(e=>({total:Bn.f.getIndependentAndSharedTicketsCapacity(e),available:Bn.f.getIndependentAndSharedTicketsAvailable(e)})))(ga);n(413);const{InnerBlocks:Da}=wp.blockEditor,La=()=>wp.element.createElement("div",{className:"tribe-editor__tickets__overlay"}),va=e=>{let{allTicketsPast:t,canCreateTickets:n,hasCreatedTickets:a,hasOverlay:r,showAvailability:i,showInactiveBlock:s}=e;const d={title:"",description:""};n?a?d.title=t?Object(o.__)("Tickets are no longer available","event-tickets"):Object(o.__)("Tickets are not yet available","event-tickets"):(d.title=Object(o.__)("There are no tickets yet","event-tickets"),d.description=Object(o.__)("Edit this block to create your first ticket.","event-tickets")):(d.title=Object(o.__)("There is no ecommerce available","event-tickets"),d.description=Object(o.__)("To create tickets, you'll need to enable an ecommerce solution.","event-tickets"));const l=ue()({"tribe-editor__tickets__inner-blocks":!0,"tribe-editor__tickets__inner-blocks--show":!s});return wp.element.createElement("div",{className:"tribe-editor__tickets__container"},wp.element.createElement("div",{className:l},wp.element.createElement(Da,{allowedBlocks:["tribe/tickets-item"]})),s&&wp.element.createElement(me.InactiveBlock,{layout:pn.a.ticket,title:d.title,description:d.description,icon:wp.element.createElement(c.TicketInactive,null)}),i&&wp.element.createElement(ka,null),r&&wp.element.createElement(La,null))};va.propTypes={allTicketsPast:_.a.bool,canCreateTickets:_.a.bool,hasCreatedTickets:_.a.bool,hasOverlay:_.a.bool,showAvailability:_.a.bool,showInactiveBlock:_.a.bool};var Oa=va;const ja=(e,t)=>Bn.f.getTicketsIsSettingsOpen(e)||!Bn.f.hasATicketSelected(e)&&!t.isSelected,Ya=(e,t)=>{const n=t.isSelected&&!Bn.f.hasTickets(e),a=!(t.isSelected||Bn.f.hasATicketSelected(e)||Bn.f.hasCreatedTickets(e)&&Bn.f.hasTicketOnSale(e));return n||a};var wa=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({allTicketsPast:Bn.f.allTicketsPast(e),canCreateTickets:Bn.f.canCreateTickets(),hasCreatedTickets:Bn.f.hasCreatedTickets(e),hasOverlay:ja(e,t),showAvailability:t.isSelected&&Bn.f.hasCreatedTickets(e),showInactiveBlock:Ya(e,t)})))(Oa),Ia=n(246);n(414);const Pa=["provider","onProviderChange"],Ca=Object(o.__)("It looks like you have multiple ecommerce plugins active. We recommend running only one at a time. However, if you need to run multiple, please select which one to use to sell tickets for this event. ","event-tickets"),Ra=Object(o.__)("Note: adjusting this setting will only impact new tickets. Existing tickets will not change. We highly recommend that all tickets for one event use the same ecommerce plugin.","event-tickets"),Aa=e=>{let{provider:t,onProviderChange:n}=e,a=ze()(e,Pa);return wp.element.createElement("div",{className:"tribe-editor__tickets-control-container"},wp.element.createElement("input",Be()({className:"tribe-editor__tickets-control__input tribe-editor__tickets-control__input--radio",type:"radio",id:t.class,name:t.class,onChange:n},a)),wp.element.createElement("label",{className:"tribe-editor__tickets-control__label",htmlFor:t.class},t.name))},Ha=e=>{let{hasMultipleProviders:t,providers:n,selectedProvider:a,onProviderChange:r}=e;return t&&wp.element.createElement(Ia.InspectorControls,{key:"inspector"},wp.element.createElement(_e.PanelBody,{title:Object(o.__)("Tickets Settings","event-tickets")},wp.element.createElement(_e.PanelRow,null,wp.element.createElement("fieldset",{className:"tribe-editor__tickets-controls-provider"},wp.element.createElement("legend",null,Object(o.__)("Sell tickets using","event-tickets")),wp.element.createElement("p",null,Ca,wp.element.createElement("em",null,Ra)),n.map((e,t)=>wp.element.createElement(Aa,{key:"provider-option-"+(t+1),provider:e,onProviderChange:r,checked:a===e.class}))))))};Ha.propTypes={hasMultipleProviders:_.a.bool,providers:_.a.arrayOf(_.a.shape({name:_.a.string,class:_.a.string})),selectedProvider:_.a.string,onProviderChange:_.a.func};var Na=Ha;var xa=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasMultipleProviders:Bn.f.hasMultipleTicketProviders(),providers:Bn.f.getTicketProviders(),selectedProvider:Bn.f.getTicketsProvider(e)}),e=>({onProviderChange:t=>e(Bn.a.setTicketsProvider(t.target.name))})),xn())(Na);n(415);const{__:Va}=wp.i18n;class Fa extends i.PureComponent{componentDidMount(){this.props.onBlockUpdate(this.props.isSelected)}componentDidUpdate(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}renderBlock(){const{isSelected:e,clientId:t,canCreateTickets:n}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(wa,{isSelected:e}),n&&wp.element.createElement(Sa,{isSelected:e,clientId:t}),wp.element.createElement(xa,null))}renderBlockNotSupported(){const{clientId:e}=this.props;return wp.element.createElement("div",{className:"tribe-editor__not-supported-message"},wp.element.createElement("p",{className:"tribe-editor__not-supported-message-text"},Va("Tickets are not yet supported for on recurring events.","event-tickets"),wp.element.createElement("br",null),wp.element.createElement("a",{className:"tribe-editor__not-supported-message-link",href:"https://evnt.is/1b7a",target:"_blank",rel:"noopener noreferrer"},Va("Read about our plans for future features.","event-tickets")),wp.element.createElement("br",null),wp.element.createElement("a",{href:"#",onClick:()=>wp.data.dispatch("core/block-editor").removeBlock(e)},Va("Remove block","event-tickets"))))}renderContent(){return this.props.hasRecurrenceRules&&this.props.noTicketsOnRecurring?this.renderBlockNotSupported():this.renderBlock()}render(){const{isSelected:e,isSettingsOpen:t}=this.props;return wp.element.createElement("div",{className:ue()("tribe-editor__tickets",{"tribe-editor__tickets--selected":e},{"tribe-editor__tickets--settings-open":t})},this.renderContent())}}de()(Fa,"propTypes",{canCreateTickets:_.a.bool,clientId:_.a.string,hasProviders:_.a.bool,header:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool,onBlockUpdate:_.a.func});var Ka=Fa;var Wa=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=Bn.f.getTicketsHeaderImageId(e);return{header:t?""+t:"",hasProviders:Bn.f.hasTicketProviders(),isSettingsOpen:Bn.f.getTicketsIsSettingsOpen(e),provider:Bn.f.getTicketsProvider(e),sharedCapacity:Bn.f.getTicketsSharedCapacity(e),canCreateTickets:Bn.f.canCreateTickets(),hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)()}},e=>({setInitialState:t=>{e(Bn.a.setTicketsInitialState(t))},onBlockUpdate:t=>{e(Bn.a.setTicketsIsSelected(t))},onBlockRemoved:()=>{e(Bn.a.resetTicketsBlock())}})),xn())(Ka);const{InnerBlocks:Ua}=wp.blockEditor;var za={id:"tickets",title:Object(o.__)("Tickets","event-tickets"),description:Object(o.__)("Sell tickets and register attendees.","event-tickets"),icon:wp.element.createElement(c.Tickets,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{sharedCapacity:{type:"string",source:"meta",meta:Wn.d},header:{type:"string",source:"meta",meta:Wn.i},provider:{type:"string",source:"meta",meta:Wn.e},tickets:{type:"array",source:"meta",meta:Wn.c}},edit:Wa,save:()=>wp.element.createElement("div",null,wp.element.createElement(Ua.Content,null))};n(416),n(417);const Ga=e=>{let{hasAttendeeInfoFields:t,isDisabled:n,isSelected:a,onTempTitleChange:r,tempTitle:s,title:c}=e;const d=t&&wp.element.createElement(Le.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ie.Clipboard,null),text:Object(o.__)("This ticket has Attendee Information Fields configured.","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-title"},a?wp.element.createElement(i.Fragment,null,wp.element.createElement(De,{className:"tribe-editor__ticket__container-header-title-input",value:s,placeholder:Object(o.__)("Ticket Type *","event-tickets"),onChange:r,disabled:n,required:!0}),d):wp.element.createElement(i.Fragment,null,wp.element.createElement("h3",{className:"tribe-editor__ticket__container-header-title-label"},c),d,wp.element.createElement(Ie.Pencil,null)))};Ga.propTypes={hasAttendeeInfoFields:_.a.bool,isDisabled:_.a.bool,isSelected:_.a.bool,onTempTitleChange:_.a.func,tempTitle:_.a.string,title:_.a.string};var Ba=Ga;var qa=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({hasAttendeeInfoFields:Bn.f.getTicketHasAttendeeInfoFields(e,t),isDisabled:Bn.f.isTicketDisabled(e,t),tempTitle:Bn.f.getTicketTempTitle(e,t),title:Bn.f.getTicketTitle(e,t)}),(e,t)=>({onTempTitleChange:n=>{const{clientId:a}=t;e(Bn.a.setTicketTempTitle(a,n.target.value)),e(Bn.a.setTicketHasChanges(a,!0))}})))(Ba);n(418);const Ja=e=>{let{isDisabled:t,isSelected:n,onTempDescriptionChange:a,tempDescription:r,description:i}=e;return n?wp.element.createElement(De,{className:"tribe-editor__ticket__container-header-description-input",value:r,placeholder:Object(o.__)("Description","event-tickets"),onChange:a,disabled:t}):wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-description"},i)};Ja.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,onTempDescriptionChange:_.a.func,tempDescription:_.a.string,description:_.a.string};var $a=Ja;var Za=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),tempDescription:Bn.f.getTicketTempDescription(e,t),description:Bn.f.getTicketDescription(e,t)}),(e,t)=>({onTempDescriptionChange:n=>{const{clientId:a}=t;e(Bn.a.setTicketTempDescription(a,n.target.value)),e(Bn.a.setTicketHasChanges(a,!0))}})))($a),Qa=n(247),Xa=n.n(Qa),er=n(22);n(419);const tr=e=>{let{isDisabled:t,currencyPosition:n,currencySymbol:a,onTempPriceChange:r,tempPrice:s}=e;return wp.element.createElement(i.Fragment,null,n===er.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},a),wp.element.createElement(Xa.a,{className:"tribe-editor__ticket__container-header-price-input",value:s,placeholder:Object(o.__)("0","event-tickets"),onChange:r,disabled:t,type:"number",min:"0"}),n===er.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},a))};tr.propTypes={isDisabled:_.a.bool,currencyPosition:_.a.oneOf(er.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string};const nr=e=>{let{currencyPosition:t,currencySymbol:n,price:a}=e;return wp.element.createElement(i.Fragment,null,t===er.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n),wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-value"},a),t===er.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n))};nr.propTypes={currencyPosition:_.a.oneOf(er.PRICE_POSITIONS),currencySymbol:_.a.string,price:_.a.string};const ar=e=>{let{isDisabled:t,isSelected:n,currencyPosition:a,currencySymbol:r,onTempPriceChange:i,tempPrice:s,price:o}=e;return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-price"},n?wp.element.createElement(tr,{currencyPosition:a,currencySymbol:r,onTempPriceChange:i,tempPrice:s,isDisabled:t}):wp.element.createElement(nr,{currencyPosition:a,currencySymbol:r,price:o}))};ar.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,currencyPosition:_.a.oneOf(er.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string,price:_.a.string};var rr=ar;var ir=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),currencyPosition:Bn.f.getTicketCurrencyPosition(e,t),currencySymbol:Bn.f.getTicketCurrencySymbol(e,t),tempPrice:Bn.f.getTicketTempPrice(e,t),price:Bn.f.getTicketPrice(e,t)||"0"}),(e,t)=>({onTempPriceChange:n=>{const{clientId:a}=t;e(Bn.a.setTicketTempPrice(a,n.target.value)),e(Bn.a.setTicketHasChanges(a,!0))}})))(rr);n(420);const sr=e=>{let t,{children:n,className:a,value:r,total:i}=e;if(0===r||0===i)return null;try{t=$e.number.percentage(r,i)}catch(e){t=0}const s={width:Math.max(0,Math.min(100,t)).toFixed(2)+"%"};return wp.element.createElement("span",{className:ue()("tribe-editor__quantity-bar__bar",a),style:s},n)};sr.propTypes={children:_.a.node,className:_.a.oneOfType([_.a.string,_.a.arrayOf(_.a.string),$e.TribePropTypes.nullType]),value:_.a.number,total:_.a.number},sr.defaultProps={className:null,value:0,total:0};var or=sr;const cr=e=>{let{sharedSold:t,sold:n,capacity:a,total:r,isDisabled:s}=e;return wp.element.createElement("div",{className:"tribe-editor__quantity-bar"},!s&&wp.element.createElement(i.Fragment,null,wp.element.createElement(or,{className:"tribe-editor__quantity-bar__bar--shared-sold",value:t,total:r}),wp.element.createElement(or,{className:"tribe-editor__quantity-bar__bar--sold",value:n,total:r}),!!a&&!(a===r)&&wp.element.createElement(or,{className:"tribe-editor__quantity-bar__bar--capacity",value:a,total:r},wp.element.createElement("span",{className:"tribe-editor__quantity-bar__bar-label"},Object(o.__)("cap","event-tickets")))))};cr.propTypes={sharedSold:_.a.number,capacity:_.a.number,sold:_.a.number,total:_.a.number,isDisabled:_.a.bool},cr.defaultProps={sharedSold:0,capacity:0,sold:0,total:0,isDisabled:!1};var dr=cr;n(421);const lr=e=>{let{isDisabled:t,isSelected:n,isShared:a,isUnlimited:r,sold:i,capacity:s,sharedSold:c,sharedCapacity:d}=e;const l=a?d:s;return!n&&wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-quantity tribe-tooltip",title:Object(o.__)("This pertains to Orders that have been marked Completed.","event-tickets")},wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-label"},r?Object(o.sprintf)(Object(o.__)("%d sold","event-tickets"),i):Object(o.sprintf)(Object(o.__)("%d of %d sold","event-tickets"),i,l),wp.element.createElement("span",{class:"dashicons dashicons-info"})),r?wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-unlimited"},Object(o.__)("unlimited","event-tickets")):wp.element.createElement(dr,{sold:i,sharedSold:c,capacity:s,total:l,isDisabled:t}))};lr.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,isShared:_.a.bool,isUnlimited:_.a.bool,sold:_.a.number,capacity:_.a.number,sharedSold:_.a.number,sharedCapacity:_.a.number},lr.defaultProps={sold:0,sharedCapacity:0,capacity:0};var ur=lr;const _r=(e,t)=>t?Bn.f.getSharedTicketsSold(e):0;var mr=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Bn.f.isSharedTicket(e,t);return{isDisabled:Bn.f.isTicketDisabled(e,t),isShared:n,isUnlimited:Bn.f.isUnlimitedTicket(e,t),sold:Bn.f.getTicketSold(e,t),capacity:Bn.f.getTicketCapacityInt(e,t),sharedSold:_r(e,n),sharedCapacity:Bn.f.getTicketsSharedCapacityInt(e)}}))(ur);n(422);const pr=e=>{let{clientId:t,isSelected:n}=e;return wp.element.createElement(i.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-details"},wp.element.createElement(qa,{clientId:t,isSelected:n}),wp.element.createElement(Za,{clientId:t,isSelected:n})),wp.element.createElement(ir,{clientId:t,isSelected:n}),wp.element.createElement(mr,{clientId:t,isSelected:n}))};pr.propTypes={clientId:_.a.string,isSelected:_.a.bool};var Tr=pr,fr=n(59),hr=n.n(fr),yr=n(73),br=n.n(yr),Mr=n(388);n(423);const Sr=["className","id","label"],{INDEPENDENT:Er,SHARED:gr,TICKET_TYPES:kr}=Bn.b,{CAPACITY_TYPE_OPTIONS:Dr}=Bn.d,Lr=e=>{let{className:t,id:n,label:a}=e,r=ze()(e,Sr);return wp.element.createElement(Le.LabeledItem,{className:ue()("tribe-editor__labeled-number-input",t),forId:n,label:a,isLabel:!0},wp.element.createElement(Le.NumberInput,r))};Lr.propTypes={className:_.a.string,id:_.a.string,label:_.a.string};class vr extends i.PureComponent{constructor(e){super(e),de()(this,"getInputs",()=>{const{isDisabled:e,sharedCapacity:t,tempCapacityType:n,tempCapacity:a,tempSharedCapacity:r,onTempCapacityChange:i,onTempSharedCapacityChange:s}=this.props,c=[];if(n===kr[gr]&&""===t&&c.push(wp.element.createElement(Lr,{key:"shared-capacity",className:ue()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--shared-capacity"),id:this.ids.sharedCapacity,label:Object(o.__)("Set shared capacity:","event-tickets"),value:r,onChange:s,disabled:e,min:0,required:!0})),br()([kr[gr],kr[Er]],n)){const s={},d=n===kr[gr]?gr:Er;if(n===kr[gr]&&(t||r)){const e=t||r;s.max=parseInt(e,10)||0}n===kr[Er]&&(s.required=!0),s.label=n===kr[gr]?Object(o.__)("(optional) Limit sales of this ticket to:","event-tickets"):Object(o.__)("Number of tickets available","event-tickets"),c.push(wp.element.createElement(Lr,Be()({key:"capacity",className:ue()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--capacity","tribe-editor__ticket__capacity-input-row--capacity-"+d),id:this.ids.capacity,value:a,onChange:i,disabled:e,min:0},s)))}return c}),de()(this,"getCapacityForm",()=>{const{isDisabled:e,tempCapacityTypeOption:t,onTempCapacityTypeChange:n}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Le.Select,{id:this.ids.select,className:"tribe-editor__ticket__capacity-type-select",backspaceRemovesValue:!1,value:t,isSearchable:!1,isDisabled:e,options:Dr,onChange:n}),this.getInputs())}),de()(this,"getNoPlusCapacityForm",()=>{const{isDisabled:e,tempCapacity:t,onTempCapacityNoPlusChange:n}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Le.NumberInput,{className:"tribe-editor__ticket__capacity-input",id:this.ids.capacity,value:t,onChange:n,disabled:e,min:0}),wp.element.createElement("span",{className:"tribe-editor__ticket__capacity-input-helper-text"},Object(o.__)("Leave blank for unlimited","event-tickets")))}),this.ids={select:xe()("capacity-type-"),capacity:xe()("capacity-"),sharedCapacity:xe()("shared-capacity-")}}render(){const{hasTicketsPlus:e}=this.props;return wp.element.createElement("div",{className:ue()("tribe-editor__ticket__capacity","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--capacity")},wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__ticket__capacity-label-with-tooltip",forId:e?this.ids.select:this.ids.capacity,isLabel:!0,label:Object(o.__)("Ticket Capacity","event-tickets"),tooltipText:Object(o.__)("Ticket capacity will only be used by attendees buying this ticket type","event-tickets"),tooltipLabel:wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement("div",{className:"tribe-editor__ticket__capacity-form"},e?this.getCapacityForm():this.getNoPlusCapacityForm()))}}de()(vr,"propTypes",{hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,sharedCapacity:_.a.string,tempCapacity:_.a.string,tempCapacityType:_.a.string,tempCapacityTypeOption:Mr.ReactSelectOption,tempSharedCapacity:_.a.string,onTempCapacityChange:_.a.func,onTempCapacityNoPlusChange:_.a.func,onTempCapacityTypeChange:_.a.func,onTempSharedCapacityChange:_.a.func});var Or=vr;const{UNLIMITED:jr,INDEPENDENT:Yr,TICKET_TYPES:wr}=Bn.b;var Ir=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),isDisabled:Bn.f.isTicketDisabled(e,t),sharedCapacity:Bn.f.getTicketsSharedCapacity(e),tempCapacity:Bn.f.getTicketTempCapacity(e,t),tempCapacityType:Bn.f.getTicketTempCapacityType(e,t),tempCapacityTypeOption:Bn.f.getTicketTempCapacityTypeOption(e,t),tempSharedCapacity:Bn.f.getTicketsTempSharedCapacity(e)}),(e,t)=>{const{clientId:n}=t;return{onTempCapacityChange:t=>{e(Bn.a.setTicketTempCapacity(n,t.target.value)),e(Bn.a.setTicketHasChanges(n,!0))},onTempCapacityNoPlusChange:t=>{const a=t.target.value,r=""===hr()(a)?wr[jr]:wr[Yr];e(Bn.a.setTicketTempCapacityType(n,r)),e(Bn.a.setTicketTempCapacity(n,a)),e(Bn.a.setTicketHasChanges(n,!0))},onTempCapacityTypeChange:t=>{e(Bn.a.setTicketTempCapacityType(n,t.value)),e(Bn.a.setTicketHasChanges(n,!0))},onTempSharedCapacityChange:t=>{e(Bn.a.setTicketsTempSharedCapacity(t.target.value)),e(Bn.a.setTicketHasChanges(n,!0))}}}))(Or);n(424);const Pr=["hasDurationError"],Cr=e=>{let{hasDurationError:t}=e,n=ze()(e,Pr);return wp.element.createElement("div",{className:ue()("tribe-editor__ticket__duration","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--duration")},wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__ticket__duration-label-with-tooltip",label:Object(o.__)("Sale Duration","event-tickets"),tooltipText:Object(o.__)("If you do not set a start sale date, tickets will be available immediately.","event-tickets"),tooltipLabel:wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(me.DateTimeRangePicker,Be()({className:"tribe-editor__ticket__duration-picker"},n)),t&&wp.element.createElement("span",{className:"tribe-editor__ticket__duration-error"},Object(o.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))};Cr.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,hasDurationError:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var Rr=Cr;const Ar=["state"],Hr=["dispatch"];function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nr(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Vr=(e,t)=>(n,a,r)=>{e(Bn.a.handleTicketStartDate(t.clientId,n,r))},Fr=(e,t)=>n=>{e(Bn.a.setTicketTempStartTimeInput(t.clientId,n.target.value))},Kr=(e,t)=>(n,a)=>{e(Bn.a.handleTicketStartTime(t.clientId,n)),a()},Wr=(e,t)=>(n,a,r)=>{e(Bn.a.handleTicketEndDate(t.clientId,n,r))},Ur=(e,t)=>n=>{e(Bn.a.setTicketTempEndTimeInput(t.clientId,n.target.value))},zr=(e,t)=>(n,a)=>{e(Bn.a.handleTicketEndTime(t.clientId,n)),a()},Gr=(e,t,n)=>a=>{let r=$e.moment.toMoment(a.target.value,$e.moment.TIME_FORMAT,!1);if(!r.isValid()){const t=Bn.f.getTicketStartTimeInput(e,n);r=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const i=$e.moment.totalSeconds(r);t(Bn.a.handleTicketStartTime(n.clientId,i))},Br=(e,t,n)=>a=>{let r=$e.moment.toMoment(a.target.value,$e.moment.TIME_FORMAT,!1);if(!r.isValid()){const t=Bn.f.getTicketEndTimeInput(e,n);r=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const i=$e.moment.totalSeconds(r);t(Bn.a.handleTicketEndTime(n.clientId,i))};var qr=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=$e.globals.tecDateSettings().datepickerFormat?$e.moment.toFormat($e.globals.tecDateSettings().datepickerFormat):"LL",a=Bn.f.isTicketDisabled(e,t),r=Bn.f.getTicketTempStartDateMoment(e,t),i=Bn.f.getTicketTempEndDateMoment(e,t),s=r&&r.toDate(),o=i&&i.toDate();return{fromDate:s,fromDateInput:Bn.f.getTicketTempStartDateInput(e,t),fromDateDisabled:a,fromDateFormat:n,fromTime:Bn.f.getTicketTempStartTimeInput(e,t),fromTimeDisabled:a,hasDurationError:Bn.f.getTicketHasDurationError(e,t),toDate:o,toDateInput:Bn.f.getTicketTempEndDateInput(e,t),toDateDisabled:a,toDateFormat:n,toTime:Bn.f.getTicketTempEndTimeInput(e,t),toTimeDisabled:a,state:e}},(e,t)=>({onFromDateChange:Vr(e,t),onFromTimePickerChange:Fr(e,t),onFromTimePickerClick:Kr(e,t),onToDateChange:Wr(e,t),onToTimePickerChange:Ur(e,t),onToTimePickerClick:zr(e,t),dispatch:e}),(e,t,n)=>{const{state:a}=e,r=ze()(e,Ar),{dispatch:i}=t,s=ze()(t,Hr);return xr(xr(xr(xr({},n),r),s),{},{onFromTimePickerBlur:Gr(a,i,n),onToTimePickerBlur:Br(a,i,n)})}))(Rr);n(425);class Jr extends i.PureComponent{constructor(e){super(e),this.id=xe()("ticket-sku")}render(){const{sku:e,isDisabled:t,onChange:n}=this.props;return wp.element.createElement("div",{className:ue()("tribe-editor__ticket__sku","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--sku")},wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__ticket__sku-label-with-tooltip",forId:this.id,isLabel:!0,label:Object(o.__)("Ticket SKU","event-tickets"),tooltipText:Object(o.__)("A unique identifying code for each ticket type you're selling","event-tickets"),tooltipLabel:wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(Le.Input,{className:"tribe-editor__ticket__sku-input",id:this.id,type:"text",value:e,onChange:n,disabled:t}))}}de()(Jr,"propTypes",{isDisabled:_.a.bool,onChange:_.a.func.isRequired,sku:_.a.string});var $r=Jr;var Zr=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),sku:Bn.f.getTicketTempSku(e,t)}),(e,t)=>({onChange:n=>{const{clientId:a}=t;e(Bn.a.setTicketTempSku(a,n.target.value)),e(Bn.a.setTicketHasChanges(a,!0))}})))($r);n(426);const{EDD:Qr,WOO:Xr,PROVIDER_TYPES:ei}=Bn.b,ti=["edit-ticket","report"],ni=e=>{let{editTicketLink:t,isDisabled:n,provider:a,reportLink:r,showEcommerceOptions:i}=e;const s=e=>{const i=ue()("tribe-editor__ticket__ecommerce-options-link","tribe-editor__ticket__ecommerce-options-link--"+e),s="report"===e?r:t,c="report"===e?Object(o.__)("View Sales Report","event-tickets"):(e=>{let t="";return e===Qr?t=Object(o.__)("Edit Ticket in Easy Digital Downloads","event-tickets"):e===Xr&&(t=Object(o.__)("Edit Ticket in WooCommerce","event-tickets")),t})(a);return n?wp.element.createElement("span",{className:i},c):wp.element.createElement(Le.Link,{className:i,href:s,target:"_blank"},c)};return i&&wp.element.createElement(Le.LabeledItem,{className:ue()("tribe-editor__ticket__ecommerce-options","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--ecommerce-options"),label:Object(o.__)("Ecommerce","event-tickets")},wp.element.createElement("div",{className:"tribe-editor__ticket__ecommerce-options-links"},ti.map(e=>wp.element.createElement("span",{key:e,className:"tribe-editor__ticket__ecommerce-options-link-wrapper"},s(e)))))};ni.propTypes={editTicketLink:_.a.string,isDisabled:_.a.bool,provider:_.a.oneOf([...ei,""]),reportLink:_.a.string,showEcommerceOptions:_.a.bool};var ai=ni;const{EDD:ri,WOO:ii}=Bn.b,si=e=>br()([ri,ii],e),oi=(e,t,n)=>{let a="";if(si(n)){a=`${$e.globals.adminUrl()}post.php?post=${Bn.f.getTicketId(e,t)}&action=edit`}return a},ci=(e,t,n)=>{let a="";if(si(n)){const r=$e.globals.adminUrl(),i=Bn.f.getTicketId(e,t);let s="";n===ri?s="edit.php?page=edd-reports&view=sales&post_type=download&tab=logs&download="+i:n===ii&&(s="admin.php?page=wc-reports&tab=orders&report=sales_by_product&product_ids="+i),a=`${r}${s}`}return a};var di=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Bn.f.getTicketProvider(e,t);return{isDisabled:Bn.f.isTicketDisabled(e,t),provider:n,editTicketLink:oi(e,t,n),reportLink:ci(e,t,n),showEcommerceOptions:si(n)}}))(ai);n(427);const li=e=>{let{moveTicket:t,removeTicket:n,isDisabled:a}=e;return wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--move-delete"},wp.element.createElement(Le.Button,{type:"button",onClick:t,disabled:a},Object(o.__)("Move Ticket","event-tickets")),wp.element.createElement(Le.Button,{type:"button",onClick:n,disabled:a},Object(o.__)("Remove Ticket","event-tickets")))};li.propTypes={moveTicket:_.a.func.isRequired,removeTicket:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var ui=li;function _i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function mi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_i(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),ticketId:Bn.f.getTicketId(e,t)}),(e,t)=>({removeTicket:()=>{e(Bn.a.deleteTicket(t.clientId))},moveTicket:n=>e(Object(pt.c)(n,t.clientId))}),(e,t,n)=>mi(mi(mi(mi({},e),t),n),{},{moveTicket:()=>t.moveTicket(e.ticketId)})))(ui);class Ti extends i.Component{constructor(e){super(e),de()(this,"getHeader",()=>wp.element.createElement(i.Fragment,null,wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__advanced-options-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__advanced-options-header-text"},Object(o.__)("Advanced Options","event-tickets")))),de()(this,"getContent",()=>wp.element.createElement(i.Fragment,null,wp.element.createElement(Zr,{clientId:this.props.clientId}),wp.element.createElement(di,{clientId:this.props.clientId}),this.props.hasBeenCreated&&wp.element.createElement(pi,{clientId:this.props.clientId}))),de()(this,"getRows",()=>[{accordionId:this.accordionId,content:this.getContent(),contentClassName:"tribe-editor__ticket__advanced-options-content",header:this.getHeader(),headerAttrs:{disabled:this.props.isDisabled},headerClassName:"tribe-editor__ticket__advanced-options-header"}]),this.accordionId=xe()()}render(){return wp.element.createElement(Le.Accordion,{className:"tribe-editor__ticket__advanced-options",rows:this.getRows()})}}de()(Ti,"propTypes",{clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool});var fi=Ti;var hi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),hasBeenCreated:Bn.f.getTicketHasBeenCreated(e,t)})))(fi);n(428);class yi extends i.PureComponent{constructor(e){super(e),this.id=xe()("ticket-iac")}render(){const{iac:e,iacOptions:t,isDisabled:n,onChange:a}=this.props;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--iac-setting-description"},Object(o.__)("Select the default way to sell tickets. Enabling Individual Attendee Collection will allow purchasers to enter a name and email for each ticket.","event-tickets")),wp.element.createElement("div",{className:ue()("tribe-editor__ticket__iac-setting","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--iac-setting")},wp.element.createElement(_e.RadioControl,{className:"tribe-editor__ticket__iac-setting-input",id:this.id,type:"radio",selected:e,onChange:a,disabled:n,options:t})))}}de()(yi,"propTypes",{isDisabled:_.a.bool,onChange:_.a.func.isRequired,iac:_.a.string,iacOptions:_.a.arrayOf(_.a.shape({label:_.a.string,value:_.a.string}))});var bi=yi;var Mi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),iac:Bn.f.getTicketTempIACSetting(e,t),iacOptions:$e.globals.iacVars().iacOptions}),(e,t)=>({onChange:n=>{const{clientId:a}=t;e(Bn.a.setTicketTempIACSetting(a,n)),e(Bn.a.setTicketHasChanges(a,!0))}})))(bi);class Si extends i.PureComponent{constructor(e){super(e),de()(this,"getHeader",()=>wp.element.createElement(i.Fragment,null,wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__attendee-collection-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__attendee-collection-header-text"},Object(o.__)("Attendee Collection","event-tickets")))),de()(this,"getContent",()=>wp.element.createElement(Mi,{clientId:this.props.clientId})),de()(this,"getRows",()=>[{accordionId:this.accordionId,content:this.getContent(),contentClassName:"tribe-editor__ticket__attendee-collection-content",header:this.getHeader(),headerAttrs:{disabled:this.props.isDisabled},headerClassName:"tribe-editor__ticket__attendee-collection-header"}]),this.accordionId=xe()()}render(){return wp.element.createElement(Le.Accordion,{className:"tribe-editor__ticket__attendee-collection",rows:this.getRows()})}}de()(Si,"propTypes",{clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool});var Ei=Si;var gi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),hasBeenCreated:Bn.f.getTicketHasBeenCreated(e,t)})))(Ei);n(429);const ki=Object(o.__)("+ Add","event-tickets"),Di=Object(o.__)("Edit","event-tickets"),Li=e=>{let{attendeeRegistrationURL:t,hasAttendeeInfoFields:n,isCreated:a,isDisabled:r,isModalOpen:i,onClick:s,onClose:c,onIframeLoad:d}=e;const l=n?Di:ki;return wp.element.createElement(me.AttendeesRegistration,{helperText:Object(o.__)("Save your ticket to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:r,isModalOpen:i,label:Object(o.__)("Attendee Information","event-tickets"),linkText:l,modalTitle:Object(o.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:d,showHelperText:!a,shouldCloseOnClickOutside:!1})};Li.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var vi=Li;const Oi=(e,t)=>`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=attendee-registration&ticket_id=${Bn.f.getTicketId(e,t)}&tribe_events_modal=1`;var ji=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Bn.f.getTicketHasBeenCreated(e,t);return{attendeeRegistrationURL:Oi(e,t),hasAttendeeInfoFields:Bn.f.getTicketHasAttendeeInfoFields(e,t),isCreated:n,isDisabled:Bn.f.isTicketDisabled(e,t)||!n,isModalOpen:Bn.f.getTicketIsModalOpen(e,t)}},(e,t)=>({onClick:()=>{e(Bn.a.setTicketIsModalOpen(t.clientId,!0))},onClose:n=>{n.target.classList.contains("components-modal__content")||e(Bn.a.setTicketIsModalOpen(t.clientId,!1)),"click"===n.type&&n.target.classList.contains("components-modal__screen-overlay")&&e(Bn.a.setTicketIsModalOpen(t.clientId,!1))},onIframeLoad:n=>{const a=n.contentWindow,r=()=>{n.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},i=a.document.querySelector("#event-tickets-attendee-information");i.addEventListener("submit",r);const s=()=>{a.removeEventListener("unload",s),i.removeEventListener("submit",r);const n=a.document.querySelector("#tribe-tickets-attendee-sortables"),o=Boolean(n.firstElementChild);e(Bn.a.setTicketHasAttendeeInfoFields(t.clientId,o)),e(Bn.a.setTicketIsModalOpen(t.clientId,!1))};a.addEventListener("unload",s);const o=a.document.querySelector(".tribe-intro > a");o&&o.setAttribute("target","_blank")}})))(vi);n(430);const Yi=e=>{let{clientId:t,hasTicketsPlus:n,hasIacVars:a}=e;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Ir,{clientId:t}),wp.element.createElement(qr,{clientId:t}),wp.element.createElement(hi,{clientId:t}),n&&a&&wp.element.createElement(gi,{clientId:t}),n&&wp.element.createElement(ji,{clientId:t}))};Yi.propTypes={clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool};var wi=Yi;var Ii=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),hasIacVars:!Pn()($e.globals.iacVars())})))(wi);const Pi=e=>{let{isDisabled:t}=e;return t?wp.element.createElement(c.ClockInactive,null):wp.element.createElement(c.ClockActive,null)},Ci=e=>{let{isDisabled:t}=e;return t?wp.element.createElement(c.TicketInactive,null):wp.element.createElement(c.TicketActive,null)},Ri=e=>{let{isDisabled:t,isFuture:n,isPast:a}=e;return n||a?wp.element.createElement(Pi,{isDisabled:t}):wp.element.createElement(Ci,{isDisabled:t})};Ri.propTypes={isDisabled:_.a.bool.isRequired,isFuture:_.a.bool,isPast:_.a.bool};const Ai=e=>{let{clientId:t,isDisabled:n,isFuture:a,isPast:r,isSelected:i}=e;return wp.element.createElement(me.ContainerPanel,{className:"tribe-editor__ticket__container",layout:pe.a.ticket,icon:wp.element.createElement(Ri,{isDisabled:n,isFuture:a,isPast:r}),header:wp.element.createElement(Tr,{clientId:t,isSelected:i}),content:wp.element.createElement(Ii,{clientId:t})})};Ai.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,isFuture:_.a.bool,isPast:_.a.bool,isSelected:_.a.bool};var Hi=Ai;var Ni=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Bn.f.isTicketDisabled(e,t),isFuture:Bn.f.isTicketFuture(e,t),isPast:Bn.f.isTicketPast(e,t)})))(Hi);n(431);const xi=e=>e?Object(o.__)("Update Ticket","event-tickets"):Object(o.__)("Create Ticket","event-tickets"),Vi=Object(o.__)("Cancel","event-tickets"),Fi=e=>{let{hasBeenCreated:t,isCancelDisabled:n,isConfirmDisabled:a,onCancelClick:r,onConfirmClick:i}=e;return wp.element.createElement(me.ActionDashboard,{className:"tribe-editor__ticket__dashboard",cancelLabel:Vi,confirmLabel:xi(t),isCancelDisabled:n,isConfirmDisabled:a,onCancelClick:r,onConfirmClick:i})};Fi.propTypes={hasBeenCreated:_.a.bool,isCancelDisabled:_.a.bool,isConfirmDisabled:_.a.bool,onCancelClick:_.a.func,onConfirmClick:_.a.func};var Ki=Fi;const Wi=["state"];function Ui(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function zi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ui(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ui(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Gi=(e,t)=>!Bn.f.isTicketValid(e,t)||!Bn.f.getTicketHasChanges(e,t)||Bn.f.isTicketDisabled(e,t)||Bn.f.getTicketHasDurationError(e,t),Bi=(e,t,n)=>()=>{Bn.f.getTicketHasBeenCreated(e,n)?(t(Bn.a.setTicketTempDetails(n.clientId,{title:Bn.f.getTicketTitle(e,n),description:Bn.f.getTicketDescription(e,n),price:Bn.f.getTicketPrice(e,n),sku:Bn.f.getTicketSku(e,n),iac:Bn.f.getTicketIACSetting(e,n),startDate:Bn.f.getTicketStartDate(e,n),startDateInput:Bn.f.getTicketStartDateInput(e,n),startDateMoment:Bn.f.getTicketStartDateMoment(e,n),endDate:Bn.f.getTicketEndDate(e,n),endDateInput:Bn.f.getTicketEndDateInput(e,n),endDateMoment:Bn.f.getTicketEndDateMoment(e,n),startTime:Bn.f.getTicketStartTime(e,n),endTime:Bn.f.getTicketEndTime(e,n),startTimeInput:Bn.f.getTicketStartTimeInput(e,n),endTimeInput:Bn.f.getTicketEndTimeInput(e,n),capacityType:Bn.f.getTicketCapacityType(e,n),capacity:Bn.f.getTicketCapacity(e,n)})),t(Bn.a.setTicketsTempSharedCapacity(Bn.f.getTicketsSharedCapacity(e))),t(Bn.a.setTicketHasChanges(n.clientId,!1))):(t(Bn.a.removeTicketBlock(n.clientId)),Object(oe.dispatch)("core/editor").removeBlocks(n.clientId)),Object(oe.dispatch)("core/editor").clearSelectedBlock()},qi=(e,t,n)=>()=>Bn.f.getTicketHasBeenCreated(e,n)?t(Bn.a.updateTicket(n.clientId)):t(Bn.a.createNewTicket(n.clientId));var Ji=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({hasBeenCreated:Bn.f.getTicketHasBeenCreated(e,t),isCancelDisabled:Bn.f.isTicketDisabled(e,t),isConfirmDisabled:Gi(e,t),state:e}),null,(e,t,n)=>{const{state:a}=e,r=ze()(e,Wi),{dispatch:i}=t;return zi(zi(zi({},n),r),{},{onCancelClick:Bi(a,i,n),onConfirmClick:qi(a,i,n)})}))(Ki);class $i extends i.PureComponent{componentDidMount(){this.props.onBlockUpdate(this.props.isSelected)}componentDidUpdate(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}render(){const{clientId:e,hasTicketsPlus:t,isDisabled:n,isLoading:a,isSelected:r,isModalShowing:s,showTicket:o}=this.props;return o?wp.element.createElement(i.Fragment,null,wp.element.createElement("article",{className:ue()("tribe-editor__ticket",{"tribe-editor__ticket--disabled":n},{"tribe-editor__ticket--selected":r},{"tribe-editor__ticket--has-tickets-plus":t})},wp.element.createElement(Ni,{clientId:e,isSelected:r}),wp.element.createElement(Ji,{clientId:e,isSelected:r}),a&&wp.element.createElement(_e.Spinner,null)),s&&wp.element.createElement(En,null)):null}}de()($i,"propTypes",{clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,isLoading:_.a.bool,isModalShowing:_.a.bool,isSelected:_.a.bool,onBlockUpdate:_.a.func,removeTicketBlock:_.a.func,showTicket:_.a.bool});var Zi=$i;function Qi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qi(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const es=(e,t)=>Bn.f.getTicketsIsSelected(e)||Bn.f.hasATicketSelected(e)||Bn.f.isTicketOnSale(e,t);var ts=Object(P.c)(Object(Ye.withStore)({isolated:!0}),re((e,t)=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),hasBeenCreated:Bn.f.getTicketHasBeenCreated(e,t),isDisabled:Bn.f.isTicketDisabled(e,t),isLoading:Bn.f.getTicketIsLoading(e,t),isModalShowing:Object(bn.l)(e),modalTicketId:Object(bn.e)(e),showTicket:es(e,t),ticketId:Bn.f.getTicketId(e,t)}),(e,t)=>{const{clientId:n}=t;return{onBlockUpdate:t=>e(Bn.a.setTicketIsSelected(n,t)),setInitialState:t=>{e(Bn.a.registerTicketBlock(n)),e(Bn.a.setTicketInitialState(t))}}},(e,t,n)=>Xi(Xi(Xi(Xi({},e),t),n),{},{isModalShowing:e.isModalShowing&&e.modalTicketId===e.ticketId})),xn())(Zi);const{InnerBlocks:ns}=wp.blockEditor;var as={id:"tickets-item",title:Object(o.__)("Event Ticket","event-tickets"),description:Object(o.__)("A single configured ticket type.","event-tickets"),icon:wp.element.createElement(c.Tickets,null),category:"tribe-tickets",keywords:["event","event-tickets","tribe"],parent:["tribe/tickets"],supports:{html:!1,customClassName:!1},attributes:{hasBeenCreated:{type:"boolean",default:!1},ticketId:{type:"integer",default:0}},edit:ts,save:()=>wp.element.createElement("div",null,wp.element.createElement(ns.Content,null))},rs=n(39),is=n(71);n(432);const ss=Object(o.__)("Who's Attending?","event-tickets"),os=Object(o.__)("(X) people are attending this event","event-tickets"),cs=()=>wp.element.createElement("div",{className:"tribe-editor__event-attendees__gravatars"},wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null)),ds=()=>wp.element.createElement("div",{className:"tribe-editor__event-attendees__subtitle"},wp.element.createElement("p",null,os)),ls=e=>{const{isSelected:t,title:n,displayTitle:a,displaySubtitle:r}=e,i=t||n?(e=>{let{isSelected:t,isEmpty:n,title:a,setTitle:r}=e;const i=ue()({"tribe-editor__event-attendees__title":!0,"tribe-editor__event-attendees__title--selected":t}),s=ue()({"tribe-editor__event-attendees__title-text":!0,"tribe-editor__event-attendees__title-text--empty":n&&t});return wp.element.createElement("div",{key:"tribe-events-attendees-label",className:i},wp.element.createElement(Xa.a,{id:"tribe-events-attendees-link",className:s,value:a,placeholder:ss,onChange:r}))})(e):wp.element.createElement("span",{className:ue()(["tribe-editor__event-attendees__title","tribe-editor__event-attendees__title--placeholder"])},ss);return wp.element.createElement("div",{className:"tribe-editor__block tribe-editor__event-attendees"},a?i:"",r?wp.element.createElement(ds,null):"",wp.element.createElement(cs,null))},us=e=>{let{isSelected:t,displayTitle:n,displaySubtitle:a,onSetDisplayTitleChange:r,onSetDisplaySubtitleChange:i}=e;return t&&wp.element.createElement(Ia.InspectorControls,{key:"inspector"},wp.element.createElement(_e.PanelBody,{title:Object(o.__)("Attendees Settings","event-tickets")},wp.element.createElement(_e.ToggleControl,{label:Object(o.__)("Display Title","event-tickets"),checked:n,onChange:r}),wp.element.createElement(_e.ToggleControl,{label:Object(o.__)("Display Subtitle","event-tickets"),checked:a,onChange:i})))},_s=e=>wp.element.createElement(i.Fragment,null,wp.element.createElement(ls,e),wp.element.createElement(us,e));_s.propTypes={setTitle:_.a.func,title:_.a.string,isSelected:_.a.bool,isEmpty:_.a.bool,displayTitle:_.a.bool,displaySubtitle:_.a.bool,onSetDisplaySubtitleChange:_.a.func,onSetDisplayTitleChange:_.a.func};var ms=_s;var ps=Object(P.c)(Object(Ye.withStore)(),re(e=>({title:is.c(e),displayTitle:is.b(e),displaySubtitle:is.a(e)}),e=>({setInitialState:t=>e(rs.c(t)),setTitle:t=>e(rs.d(t.target.value)),onSetDisplayTitleChange:t=>e(rs.b(t)),onSetDisplaySubtitleChange:t=>e(rs.a(t))})),xn())(ms);const Ts=[Un,za,as,{id:"attendees",title:Object(o.__)("Attendee List","event-tickets"),description:Object(o.__)("Show the gravatars of people coming to this event.","event-tickets"),icon:wp.element.createElement(c.Attendees,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,customClassName:!1},attributes:{title:{type:"html",default:Object(o.__)("Who's Attending?","event-tickets")},displayTitle:{type:"boolean",default:!0},displaySubtitle:{type:"boolean",default:!0}},edit:ps,save:()=>null}];Ts.forEach(e=>Object(a.registerBlockType)("tribe/"+e.id,e)),Object(r.initStore)();t.default=Ts}]);
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
+
*/var a="function"==typeof Symbol&&Symbol.for,r=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,o=a?Symbol.for("react.strict_mode"):60108,c=a?Symbol.for("react.profiler"):60114,d=a?Symbol.for("react.provider"):60109,l=a?Symbol.for("react.context"):60110,u=a?Symbol.for("react.async_mode"):60111,_=a?Symbol.for("react.concurrent_mode"):60111,m=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,T=a?Symbol.for("react.suspense_list"):60120,f=a?Symbol.for("react.memo"):60115,h=a?Symbol.for("react.lazy"):60116,y=a?Symbol.for("react.block"):60121,b=a?Symbol.for("react.fundamental"):60117,M=a?Symbol.for("react.responder"):60118,S=a?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case _:case s:case c:case o:case p:return e;default:switch(e=e&&e.$$typeof){case l:case m:case h:case f:case d:return e;default:return t}}case i:return t}}}function g(e){return E(e)===_}t.AsyncMode=u,t.ConcurrentMode=_,t.ContextConsumer=l,t.ContextProvider=d,t.Element=r,t.ForwardRef=m,t.Fragment=s,t.Lazy=h,t.Memo=f,t.Portal=i,t.Profiler=c,t.StrictMode=o,t.Suspense=p,t.isAsyncMode=function(e){return g(e)||E(e)===u},t.isConcurrentMode=g,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===d},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===m},t.isFragment=function(e){return E(e)===s},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===f},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===_||e===c||e===o||e===p||e===T||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===d||e.$$typeof===l||e.$$typeof===m||e.$$typeof===b||e.$$typeof===M||e.$$typeof===S||e.$$typeof===y)},t.typeOf=E},function(e,t,n){},function(e,t,n){},function(e,t){var n,a,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var c,d=[],l=!1,u=-1;function _(){l&&c&&(l=!1,c.length?d=c.concat(d):u=-1,d.length&&m())}function m(){if(!l){var e=o(_);l=!0;for(var t=d.length;t;){for(c=d,d=[];++u<t;)c&&c[u].run();u=-1,t=d.length}c=null,l=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function T(){}r.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];d.push(new p(e,t)),1!==d.length||l||o(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=T,r.addListener=T,r.once=T,r.off=T,r.removeListener=T,r.removeAllListeners=T,r.emit=T,r.prependListener=T,r.prependOnceListener=T,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var a=Object.keys;e.exports=function(e,t){var n,r,i,s,o;if(e===t)return!0;if(n=a(e),r=a(t),n.length!==r.length)return!1;for(i=0;i<n.length;){if(void 0===(o=e[s=n[i]])&&!t.hasOwnProperty(s)||o!==t[s])return!1;i++}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n;if(e===t)return!0;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var a=n(72),r=n(244),i=n(10),s=n.n(i),o=n(13),c=n(28);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d(e,t)}var u=n(1),_=n.n(u),m=_.a.shape({trySubscribe:_.a.func.isRequired,tryUnsubscribe:_.a.func.isRequired,notifyNestedSubs:_.a.func.isRequired,isSubscribed:_.a.func.isRequired}),p=_.a.shape({subscribe:_.a.func.isRequired,dispatch:_.a.func.isRequired,getState:_.a.func.isRequired});s.a.forwardRef;!function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",a=function(t){l(r,t);var a=r.prototype;function r(n,a){var r;return(r=t.call(this,n,a)||this)[e]=n.store,r}return a.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},a.render=function(){return i.Children.only(this.props.children)},r}(i.Component);a.propTypes={store:p.isRequired,children:_.a.element.isRequired},a.childContextTypes=((t={})[e]=p.isRequired,t[n]=m,t)}();function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}var y=n(387),b=n.n(y),M=n(248),S=n.n(M),E=n(385),g={notify:function(){}};var k=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=g}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,a=0;a<n.length;a++)n[a]()},get:function(){return t},subscribe:function(n){var a=!0;return t===e&&(t=e.slice()),t.push(n),function(){a&&null!==e&&(a=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=g)},e}(),D=void 0!==s.a.forwardRef,L=0,v={};function O(){}function j(e,t){var n,a;void 0===t&&(t={});var r=t,s=r.getDisplayName,o=void 0===s?function(e){return"ConnectAdvanced("+e+")"}:s,c=r.methodName,d=void 0===c?"connectAdvanced":c,u=r.renderCountProp,_=void 0===u?void 0:u,y=r.shouldHandleStateChanges,M=void 0===y||y,g=r.storeKey,j=void 0===g?"store":g,Y=r.withRef,w=void 0!==Y&&Y,I=h(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=j+"Subscription",C=L++,R=((n={})[j]=p,n[P]=m,n),A=((a={})[P]=m,a);return function(t){S()(Object(E.isValidElementType)(t),"You must pass a component to the function returned by "+d+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",a=o(n),r=f({},I,{getDisplayName:o,methodName:d,renderCountProp:_,shouldHandleStateChanges:M,storeKey:j,withRef:w,displayName:a,wrappedComponentName:n,WrappedComponent:t}),s=function(n){function s(e,t){var r;return(r=n.call(this,e,t)||this).version=C,r.state={},r.renderCount=0,r.store=e[j]||t[j],r.propsMode=Boolean(e[j]),r.setWrappedInstance=r.setWrappedInstance.bind(T(T(r))),S()(r.store,'Could not find "'+j+'" in either the context or props of "'+a+'". Either wrap the root component in a <Provider>, or explicitly pass "'+j+'" as a prop to "'+a+'".'),r.initSelector(),r.initSubscription(),r}l(s,n);var o=s.prototype;return o.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},o.componentDidMount=function(){M&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},o.componentWillReceiveProps=function(e){this.selector.run(e)},o.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},o.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=O,this.store=null,this.selector.run=O,this.selector.shouldComponentUpdate=!1},o.getWrappedInstance=function(){return S()(w,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+d+"() call."),this.wrappedInstance},o.setWrappedInstance=function(e){this.wrappedInstance=e},o.initSelector=function(){var t=e(this.store.dispatch,r);this.selector=function(e,t){var n={run:function(a){try{var r=e(t.getState(),a);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},o.initSubscription=function(){if(M){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new k(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},o.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(v)):this.notifyNestedSubs()},o.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},o.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},o.addExtraProps=function(e){if(!(w||_||this.propsMode&&this.subscription))return e;var t=f({},e);return w&&(t.ref=this.setWrappedInstance),_&&(t[_]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},o.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(i.createElement)(t,this.addExtraProps(e.props))},s}(i.Component);return D&&(s.prototype.UNSAFE_componentWillReceiveProps=s.prototype.componentWillReceiveProps,delete s.prototype.componentWillReceiveProps),s.WrappedComponent=t,s.displayName=a,s.childContextTypes=A,s.contextTypes=R,s.propTypes=R,b()(s,t)}}var Y=Object.prototype.hasOwnProperty;function w(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(w(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var r=0;r<n.length;r++)if(!Y.call(t,n[r])||!w(e[n[r]],t[n[r]]))return!1;return!0}var P=n(15);function C(e){return function(t,n){var a=e(t,n);function r(){return a}return r.dependsOnOwnProps=!1,r}}function R(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function A(e,t){return function(t,n){n.displayName;var a=function(e,t){return a.dependsOnOwnProps?a.mapToProps(e,t):a.mapToProps(e)};return a.dependsOnOwnProps=!0,a.mapToProps=function(t,n){a.mapToProps=e,a.dependsOnOwnProps=R(e);var r=a(t,n);return"function"==typeof r&&(a.mapToProps=r,a.dependsOnOwnProps=R(r),r=a(t,n)),r},a}}var H=[function(e){return"function"==typeof e?A(e):void 0},function(e){return e?void 0:C((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?C((function(t){return Object(P.a)(e,t)})):void 0}];var N=[function(e){return"function"==typeof e?A(e):void 0},function(e){return e?void 0:C((function(){return{}}))}];function x(e,t,n){return f({},n,e,t)}var V=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var a,r=n.pure,i=n.areMergedPropsEqual,s=!1;return function(t,n,o){var c=e(t,n,o);return s?r&&i(c,a)||(a=c):(s=!0,a=c),a}}}(e):void 0},function(e){return e?void 0:function(){return x}}];function F(e,t,n,a){return function(r,i){return n(e(r,i),t(a,i),i)}}function K(e,t,n,a,r){var i,s,o,c,d,l=r.areStatesEqual,u=r.areOwnPropsEqual,_=r.areStatePropsEqual,m=!1;function p(r,m){var p,T,f=!u(m,s),h=!l(r,i);return i=r,s=m,f&&h?(o=e(i,s),t.dependsOnOwnProps&&(c=t(a,s)),d=n(o,c,s)):f?(e.dependsOnOwnProps&&(o=e(i,s)),t.dependsOnOwnProps&&(c=t(a,s)),d=n(o,c,s)):h?(p=e(i,s),T=!_(p,o),o=p,T&&(d=n(o,c,s)),d):d}return function(r,l){return m?p(r,l):(o=e(i=r,s=l),c=t(a,s),d=n(o,c,s),m=!0,d)}}function W(e,t){var n=t.initMapStateToProps,a=t.initMapDispatchToProps,r=t.initMergeProps,i=h(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),s=n(e,i),o=a(e,i),c=r(e,i);return(i.pure?K:F)(s,o,c,e,i)}function U(e,t,n){for(var a=t.length-1;a>=0;a--){var r=t[a](e);if(r)return r}return function(t,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function z(e,t){return e===t}var G,B,q,J,$,Z,Q,X,ee,te,ne,ae,re=(q=(B=void 0===G?{}:G).connectHOC,J=void 0===q?j:q,$=B.mapStateToPropsFactories,Z=void 0===$?N:$,Q=B.mapDispatchToPropsFactories,X=void 0===Q?H:Q,ee=B.mergePropsFactories,te=void 0===ee?V:ee,ne=B.selectorFactory,ae=void 0===ne?W:ne,function(e,t,n,a){void 0===a&&(a={});var r=a,i=r.pure,s=void 0===i||i,o=r.areStatesEqual,c=void 0===o?z:o,d=r.areOwnPropsEqual,l=void 0===d?I:d,u=r.areStatePropsEqual,_=void 0===u?I:u,m=r.areMergedPropsEqual,p=void 0===m?I:m,T=h(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=U(e,Z,"mapStateToProps"),b=U(t,X,"mapDispatchToProps"),M=U(n,te,"mergeProps");return J(ae,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:M,pure:s,areStatesEqual:c,areOwnPropsEqual:l,areStatePropsEqual:_,areMergedPropsEqual:p},T))}),ie=n(4),se=n.n(ie),oe=n(17),ce=n(14),de=n.n(ce),le=n(20),ue=n.n(le),_e=n(24),me=n(23),pe=n(70),Te=!!document.documentElement.currentStyle,fe={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},he=["letter-spacing","line-height","font-family","font-weight","font-size","font-style","tab-size","text-rendering","text-transform","width","text-indent","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","box-sizing"],ye={},be=document.createElement("textarea"),Me=function(e){Object.keys(fe).forEach((function(t){e.style.setProperty(t,fe[t],"important")}))};function Se(e,t,n,a,r){void 0===n&&(n=!1),void 0===a&&(a=null),void 0===r&&(r=null),null===be.parentNode&&document.body.appendChild(be);var i=function(e,t,n){void 0===n&&(n=!1);if(n&&ye[t])return ye[t];var a=window.getComputedStyle(e);if(null===a)return null;var r=he.reduce((function(e,t){return e[t]=a.getPropertyValue(t),e}),{}),i=r["box-sizing"];if(""===i)return null;Te&&"border-box"===i&&(r.width=parseFloat(r.width)+parseFloat(a["border-right-width"])+parseFloat(a["border-left-width"])+parseFloat(a["padding-right"])+parseFloat(a["padding-left"])+"px");var s=parseFloat(r["padding-bottom"])+parseFloat(r["padding-top"]),o=parseFloat(r["border-bottom-width"])+parseFloat(r["border-top-width"]),c={sizingStyle:r,paddingSize:s,borderSize:o,boxSizing:i};n&&(ye[t]=c);return c}(e,t,n);if(null===i)return null;var s=i.paddingSize,o=i.borderSize,c=i.boxSizing,d=i.sizingStyle;Object.keys(d).forEach((function(e){be.style[e]=d[e]})),Me(be),be.value=e.value||e.placeholder||"x";var l=-1/0,u=1/0,_=be.scrollHeight;"border-box"===c?_+=o:"content-box"===c&&(_-=s),be.value="x";var m=be.scrollHeight-s,p=Math.floor(_/m);return null!==a&&(l=m*a,"border-box"===c&&(l=l+s+o),_=Math.max(l,_)),null!==r&&(u=m*r,"border-box"===c&&(u=u+s+o),_=Math.min(u,_)),{height:_,minHeight:l,maxHeight:u,rowCount:Math.floor(_/m),valueRowCount:p}}be.setAttribute("tab-index","-1"),be.setAttribute("aria-hidden","true"),Me(be);var Ee=function(){},ge=0,ke=function(e){function t(t){var n;return(n=e.call(this,t)||this)._onRef=function(e){n._ref=e;var t=n.props.inputRef;"function"!=typeof t?t.current=e:t(e)},n._onChange=function(e){n._controlled||n._resizeComponent(),n.props.onChange(e,T(n))},n._resizeComponent=function(e){void 0===e&&(e=Ee);var t=Se(n._ref,n._uid,n.props.useCacheForDOMMeasurements,n.props.minRows,n.props.maxRows);if(null!==t){var a=t.height,r=t.minHeight,i=t.maxHeight,s=t.rowCount,o=t.valueRowCount;n.rowCount=s,n.valueRowCount=o,n.state.height===a&&n.state.minHeight===r&&n.state.maxHeight===i?e():n.setState({height:a,minHeight:r,maxHeight:i},e)}else e()},n.state={height:t.style&&t.style.height||0,minHeight:-1/0,maxHeight:1/0},n._uid=ge++,n._controlled=void 0!==t.value,n._resizeLock=!1,n}l(t,e);var n=t.prototype;return n.render=function(){var e=this.props,t=(e.inputRef,e.maxRows,e.minRows,e.onHeightChange,e.useCacheForDOMMeasurements,h(e,["inputRef","maxRows","minRows","onHeightChange","useCacheForDOMMeasurements"]));return t.style=f({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)<this.state.height&&(t.style.overflow="hidden"),Object(i.createElement)("textarea",f({},t,{onChange:this._onChange,ref:this._onRef}))},n.componentDidMount=function(){var e=this;this._resizeComponent(),this._resizeListener=function(){e._resizeLock||(e._resizeLock=!0,e._resizeComponent((function(){e._resizeLock=!1})))},window.addEventListener("resize",this._resizeListener)},n.componentDidUpdate=function(e,t){e!==this.props&&this._resizeComponent(),this.state.height!==t.height&&this.props.onHeightChange(this.state.height,this)},n.componentWillUnmount=function(){window.removeEventListener("resize",this._resizeListener),function(e){delete ye[e]}(this._uid)},t}(i.Component);ke.defaultProps={inputRef:Ee,onChange:Ee,onHeightChange:Ee,useCacheForDOMMeasurements:!1};var De=ke,Le=n(21);n(390);const ve=e=>{let{goingCount:t,notGoingCount:n,showNotGoing:a}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__counters"},wp.element.createElement(Le.Counter,{className:"tribe-editor__rsvp-container-header__going-counter",count:t,label:Object(o.__)("Going","event-tickets")}),a&&wp.element.createElement(Le.Counter,{className:"tribe-editor__rsvp-container-header__not-going-counter",count:n,label:Object(o.__)("Not going","event-tickets")}))};ve.propTypes={goingCount:_.a.number,notGoingCount:_.a.number,showNotGoing:_.a.bool};var Oe=ve,je=n(11),Ye=n(19);var we=Object(P.c)(Object(Ye.withStore)(),re(e=>({goingCount:je.d.getRSVPGoingCount(e),notGoingCount:je.d.getRSVPNotGoingCount(e),showNotGoing:je.d.getRSVPNotGoingResponses(e)})))(Oe),Ie=n(43);n(391);const Pe=wp.element.createElement(Le.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ie.Clipboard,null),text:Object(o.__)("This ticket has Attendee Information Fields configured.","event-tickets")}),Ce=e=>{let{description:t,hasAttendeeInfoFields:n,isCreated:a,isDisabled:r,isSelected:s,onTempDescriptionChange:c,onTempTitleChange:d,tempDescription:l,tempTitle:u,title:_,available:m}=e;return wp.element.createElement(i.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__header-details"},((e,t,n,a,r,i)=>n?wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__title-input-wrapper"},wp.element.createElement(De,{className:"tribe-editor__rsvp-container-header__title-input",value:r,placeholder:Object(o.__)("RSVP Title","event-tickets"),onChange:a,disabled:t}),e&&Pe):wp.element.createElement("h2",{className:"tribe-editor__rsvp-container-header__title"},i))(n,r,s,d,u,_),((e,t,n,a,r)=>t?wp.element.createElement(De,{className:"tribe-editor__rsvp-container-header__description-input",value:a,placeholder:Object(o.__)("RSVP description","event-tickets"),onChange:n,disabled:e}):r&&wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__description"},r))(r,s,c,l,t),a&&(e=>{const t=Object(o.__)("%d available","event-tickets"),n=t,a=wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__capacity-label-fallback"},Object(o.__)("Unlimited","event-tickets"));return wp.element.createElement(me.NumericLabel,{className:"tribe-editor__rsvp-container-header__capacity-label",count:e,includeZero:!0,singular:t,plural:n,fallback:a})})(m)),wp.element.createElement(we,null))};Ce.propTypes={available:_.a.number,description:_.a.string,hasAttendeeInfoFields:_.a.bool,isCreated:_.a.bool,isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,onTempDescriptionChange:_.a.func,onTempTitleChange:_.a.func,tempDescription:_.a.string,tempTitle:_.a.string,title:_.a.string};var Re=Ce;const Ae=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var He=Object(P.c)(Object(Ye.withStore)(),re(e=>({available:je.d.getRSVPAvailable(e),description:je.d.getRSVPDescription(e),hasAttendeeInfoFields:je.d.getRSVPHasAttendeeInfoFields(e),isCreated:je.d.getRSVPCreated(e),isDisabled:Ae(e),tempDescription:je.d.getRSVPTempDescription(e),tempTitle:je.d.getRSVPTempTitle(e),title:je.d.getRSVPTitle(e)}),e=>({onTempDescriptionChange:t=>{e(je.a.setRSVPTempDescription(t.target.value)),e(je.a.setRSVPHasChanges(!0))},onTempTitleChange:t=>{e(je.a.setRSVPTempTitle(t.target.value)),e(je.a.setRSVPHasChanges(!0))}})))(Re),Ne=n(48),xe=n.n(Ne);n(393);const Ve=wp.element.createElement(_e.Dashicon,{className:"tribe-editor__rsvp-duration__duration-tooltip-label",icon:"info-outline"});var Fe=e=>{let{tooltipDisabled:t}=e;return wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__rsvp-duration__duration-label",label:Object(o.__)("Duration","event-tickets"),tooltipDisabled:t,tooltipLabel:Ve,tooltipText:Object(o.__)("By default, sales will begin as soon as you save the ticket and end when the event begins","event-tickets")})};const Ke=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var We=Object(P.c)(Object(Ye.withStore)(),re(e=>({isDisabled:Ke(e)})))(Fe),Ue=n(29),ze=n.n(Ue),Ge=n(35),Be=n.n(Ge);n(394);const qe=e=>wp.element.createElement(me.DateTimeRangePicker,Be()({className:"tribe-editor__rsvp-duration__duration-picker"},e));qe.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var Je=qe,$e=n(3);const Ze=["state"],Qe=["dispatch"];function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const tt=e=>(t,n,a)=>{const r={date:t,dayPickerInput:a};e(je.a.handleRSVPStartDate(r))},nt=e=>t=>e(je.a.setRSVPTempStartTimeInput(t.target.value)),at=e=>(t,n)=>{e(je.a.handleRSVPStartTime(t)),n()},rt=e=>(t,n,a)=>{const r={date:t,dayPickerInput:a};e(je.a.handleRSVPEndDate(r))},it=e=>t=>e(je.a.setRSVPTempEndTimeInput(t.target.value)),st=e=>(t,n)=>{e(je.a.handleRSVPEndTime(t)),n()},ot=(e,t)=>n=>{let a=$e.moment.toMoment(n.target.value,$e.moment.TIME_FORMAT,!1);if(!a.isValid()){const t=je.d.getRSVPStartTimeInput(e);a=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const r=$e.moment.totalSeconds(a);t(je.a.handleRSVPStartTime(r))},ct=(e,t)=>n=>{let a=$e.moment.toMoment(n.target.value,$e.moment.TIME_FORMAT,!1);if(!a.isValid()){const t=je.d.getRSVPEndTimeInput(e);a=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const r=$e.moment.totalSeconds(a);t(je.a.handleRSVPEndTime(r))};var dt=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=$e.globals.tecDateSettings().datepickerFormat?$e.moment.toFormat($e.globals.tecDateSettings().datepickerFormat):"LL",n=je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e),a=je.d.getRSVPTempStartDateMoment(e),r=je.d.getRSVPTempEndDateMoment(e),i=a&&a.toDate(),s=r&&r.toDate();return{fromDate:i,fromDateInput:je.d.getRSVPTempStartDateInput(e),fromDateDisabled:n,fromDateFormat:t,fromTime:je.d.getRSVPTempStartTimeInput(e),fromTimeDisabled:n,toDate:s,toDateInput:je.d.getRSVPTempEndDateInput(e),toDateDisabled:n,toDateFormat:t,toTime:je.d.getRSVPTempEndTimeInput(e),toTimeDisabled:n,state:e}},e=>({onFromDateChange:tt(e),onFromTimePickerChange:nt(e),onFromTimePickerClick:at(e),onToDateChange:rt(e),onToTimePickerChange:it(e),onToTimePickerClick:st(e),dispatch:e}),(e,t,n)=>{const{state:a}=e,r=ze()(e,Ze),{dispatch:i}=t,s=ze()(t,Qe);return et(et(et(et({},n),r),s),{},{onFromTimePickerBlur:ot(a,i),onToTimePickerBlur:ct(a,i)})}))(Je);n(395);var lt=e=>{let{hasDurationError:t}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp-duration"},wp.element.createElement(We,null),wp.element.createElement(dt,null),t&&wp.element.createElement("span",{className:"tribe-editor__rsvp-duration__error"},Object(o.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))};var ut=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasDurationError:je.d.getRSVPHasDurationError(e)})))(lt);n(396);const _t=e=>{let{moveRSVP:t,removeRSVP:n,isDisabled:a}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp__content-row--move-delete"},wp.element.createElement(Le.Button,{type:"button",onClick:t,disabled:a},Object(o.__)("Move RSVP","event-tickets")),wp.element.createElement(Le.Button,{type:"button",onClick:n,disabled:a},Object(o.__)("Remove RSVP","event-tickets")))};_t.propTypes={moveRSVP:_.a.func.isRequired,removeRSVP:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var mt=_t,pt=n(50);const Tt=["dispatch"];function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yt=Object(P.c)(Object(Ye.withStore)(),re(e=>({created:je.d.getRSVPCreated(e),rsvpId:je.d.getRSVPId(e),isDisabled:je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e)}),(e,t)=>({moveRSVP:n=>e(Object(pt.c)(n,t.clientId)),dispatch:e}),(e,t,n)=>{const{dispatch:a}=t,r=ze()(t,Tt);return ht(ht(ht(ht({},n),e),r),{},{removeRSVP:()=>{window.confirm(Object(o.__)("Are you sure you want to delete this RSVP? It cannot be undone.","event-tickets"))&&(a(je.a.deleteRSVP()),e.created&&e.rsvpId&&a(je.e.deleteRSVP(e.rsvpId)),Object(oe.dispatch)("core/editor").removeBlocks([n.clientId]))},moveRSVP:()=>t.moveRSVP(e.rsvpId)})}))(mt);n(397);const bt=Object(o.__)("+ Add","event-tickets"),Mt=Object(o.__)("Edit","event-tickets"),St=e=>{let{attendeeRegistrationURL:t,hasAttendeeInfoFields:n,isCreated:a,isDisabled:r,isModalOpen:i,onClick:s,onClose:c,onIframeLoad:d}=e;const l=n?Mt:bt;return wp.element.createElement(me.AttendeesRegistration,{helperText:Object(o.__)("Save your RSVP to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:r,isModalOpen:i,label:Object(o.__)("Attendee Information","event-tickets"),linkText:l,modalTitle:Object(o.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:d,showHelperText:!a,shouldCloseOnClickOutside:!1})};St.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var Et=St;const gt=e=>`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=attendee-registration&ticket_id=${je.d.getRSVPId(e)}&tribe_events_modal=1`,kt=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e)||!je.d.getRSVPCreated(e);var Dt=Object(P.c)(Object(Ye.withStore)(),re(e=>({attendeeRegistrationURL:gt(e),hasAttendeeInfoFields:je.d.getRSVPHasAttendeeInfoFields(e),isCreated:je.d.getRSVPCreated(e),isDisabled:kt(e),isModalOpen:je.d.getRSVPIsModalOpen(e)}),(e,t)=>({onClick:()=>{e(je.a.setRSVPIsModalOpen(!0))},onClose:n=>{n.target.classList.contains("components-modal__content")||e(je.a.setRSVPIsModalOpen(t.clientId,!1))},onIframeLoad:t=>{const n=t.contentWindow,a=()=>{t.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},r=n.document.querySelector("#event-tickets-attendee-information");r.addEventListener("submit",a);const i=()=>{n.removeEventListener("unload",i),r.removeEventListener("submit",a);const t=n.document.querySelector("#tribe-tickets-attendee-sortables"),s=Boolean(t.firstElementChild);e(je.a.setRSVPHasAttendeeInfoFields(s)),e(je.a.setRSVPIsModalOpen(!1))};n.addEventListener("unload",i);const s=n.document.querySelector(".tribe-intro > a");s&&s.setAttribute("target","_blank")}})))(Et);n(398);const Lt=()=>wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__labels"},wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label"},Object(o.__)("RSVP Capacity","event-tickets")),wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label-help"},Object(o.__)("Leave blank if unlimited","event-tickets"))),vt=e=>{let{capacityId:t,isDisabled:n,notGoingId:a,onTempCapacityChange:r,onTempNotGoingResponsesChange:i,tempCapacity:s,tempNotGoingResponses:c}=e;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__options"},wp.element.createElement(Le.NumberInput,{className:"tribe-editor__rsvp-container-content__capacity-input",disabled:n,id:t,min:0,onChange:r,value:s}),wp.element.createElement(Le.Checkbox,{checked:c,className:"tribe-editor__rsvp-container-content__not-going-responses",disabled:n,id:a,label:Object(o.__)('Enable "Not Going" responses',"event-tickets"),onChange:i}))};vt.propTypes={capacityId:_.a.string.isRequired,isDisabled:_.a.bool.isRequired,notGoingId:_.a.string.isRequired,onTempCapacityChange:_.a.func.isRequired,onTempNotGoingResponsesChange:_.a.func.isRequired,tempCapacity:_.a.string.isRequired,tempNotGoingResponses:_.a.bool.isRequired};class Ot extends i.PureComponent{constructor(e){super(e),this.capacityId=xe()(),this.notGoingId=xe()()}render(){const{isDisabled:e,onTempCapacityChange:t,onTempNotGoingResponsesChange:n,tempCapacity:a,tempNotGoingResponses:r,clientId:s}=this.props,o={capacityId:this.capacityId,isDisabled:e,notGoingId:this.notGoingId,onTempCapacityChange:t,onTempNotGoingResponsesChange:n,tempCapacity:a,tempNotGoingResponses:r};return wp.element.createElement(i.Fragment,null,wp.element.createElement(Lt,null),wp.element.createElement(vt,o),wp.element.createElement(ut,null),this.props.hasBeenCreated&&wp.element.createElement(yt,{clientId:s}),this.props.hasTicketsPlus&&wp.element.createElement(Dt,null))}}de()(Ot,"propTypes",{clientId:_.a.string,hasTicketsPlus:_.a.bool,onTempCapacityChange:_.a.func,onTempNotGoingResponsesChange:_.a.func,tempCapacity:_.a.string,tempNotGoingResponses:_.a.bool,hasBeenCreated:_.a.bool});var jt=Ot,Yt=n(32);const wt=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var It=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),isDisabled:wt(e),tempCapacity:je.d.getRSVPTempCapacity(e),tempNotGoingResponses:je.d.getRSVPTempNotGoingResponses(e),hasBeenCreated:je.d.getRSVPCreated(e)}),e=>({onTempCapacityChange:t=>{e(je.a.setRSVPTempCapacity(t.target.value)),e(je.a.setRSVPHasChanges(!0))},onTempNotGoingResponsesChange:t=>{e(je.a.setRSVPTempNotGoingResponses(t.target.checked)),e(je.a.setRSVPHasChanges(!0))}})))(jt);n(399);const Pt=e=>{let{isDisabled:t}=e;return wp.element.createElement(i.Fragment,null,t?wp.element.createElement(c.RSVPInactive,null):wp.element.createElement(c.RSVPActive,null),wp.element.createElement("span",{className:"tribe-editor__rsvp-container__icon-label"},Object(o.__)("RSVP","event-tickets")))};Pt.propTypes={isDisabled:_.a.bool.isRequired};const Ct=e=>{let{isDisabled:t,isSelected:n,clientId:a}=e;return wp.element.createElement(me.ContainerPanel,{className:ue()("tribe-editor__rsvp-container",{"tribe-editor__rsvp-container--disabled":t}),layout:pe.a.rsvp,icon:wp.element.createElement(Pt,{isDisabled:t}),header:wp.element.createElement(He,{isSelected:n}),content:wp.element.createElement(It,{clientId:a})})};Ct.propTypes={isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,clientId:_.a.string.isRequired};var Rt=Ct;const At=e=>je.d.getRSVPIsLoading(e)||je.d.getRSVPSettingsOpen(e);var Ht=Object(P.c)(Object(Ye.withStore)(),re(e=>({isDisabled:At(e)})))(Rt);const Nt=e=>{let{href:t,isDisabled:n}=e;return wp.element.createElement(me.ActionButton,{asLink:!0,className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--attendees",disabled:n,href:t,icon:wp.element.createElement(c.Attendees,null),target:"_blank"},Object(o.__)("Attendees","event-tickets"))};Nt.propTypes={href:_.a.string,isDisabled:_.a.bool};var xt=Nt;var Vt=Object(P.c)(Object(Ye.withStore)(),re(e=>({href:`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=tickets-attendees&event_id=${Object(oe.select)("core/editor").getCurrentPostId()}`,isDisabled:je.d.getRSVPIsLoading(e)})))(xt),Ft=n(33),Kt=n.n(Ft);const Wt=e=>{let{isDisabled:t,onClick:n}=e;return wp.element.createElement(me.ActionButton,{className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--settings",disabled:t,icon:wp.element.createElement(Ie.Cog,null),onClick:n},Object(o.__)("Settings","event-tickets"))};Wt.defaultProps={onClick:Kt.a},Wt.propTypes={isDisabled:_.a.bool,onClick:_.a.func};var Ut=Wt;var zt=Object(P.c)(Object(Ye.withStore)(),re(e=>({isDisabled:je.d.getRSVPIsLoading(e)}),e=>({onClick:()=>e(je.a.setRSVPSettingsOpen(!0))})))(Ut);n(400);const Gt=e=>e?Object(o.__)("Update RSVP","event-tickets"):Object(o.__)("Create RSVP","event-tickets"),Bt=Object(o.__)("Cancel","event-tickets");class qt extends i.PureComponent{constructor(e){super(e),de()(this,"onWarningClick",()=>{this.setState({isWarningOpen:!this.state.isWarningOpen})}),de()(this,"getActions",()=>{const{created:e,hasRecurrenceRules:t,isLoading:n}=this.props,a=[wp.element.createElement(zt,null)];if(e&&a.push(wp.element.createElement(Vt,null)),t){const e=this.state.isWarningOpen?"no":"info-outline",t=this.state.isWarningOpen?Object(o.__)("Hide Warning","event-tickets"):Object(o.__)("Warning","event-tickets");a.push(wp.element.createElement(me.WarningButton,{icon:e,onClick:this.onWarningClick,isDisabled:n},t))}return a}),this.state={isWarningOpen:!1}}render(){const{created:e,isCancelDisabled:t,isConfirmDisabled:n,onCancelClick:a,onConfirmClick:r,showCancel:s}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(me.ActionDashboard,{className:"tribe-editor__rsvp__action-dashboard",actions:this.getActions(),cancelLabel:Bt,confirmLabel:Gt(e),isCancelDisabled:t,isConfirmDisabled:n,onCancelClick:a,onConfirmClick:r,showCancel:s}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__rsvp__warning"},Object(o.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}de()(qt,"propTypes",{created:_.a.bool.isRequired,hasRecurrenceRules:_.a.bool.isRequired,isCancelDisabled:_.a.bool.isRequired,isConfirmDisabled:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,onCancelClick:_.a.func.isRequired,onConfirmClick:_.a.func.isRequired,showCancel:_.a.bool.isRequired});var Jt=qt,$t=n(54);const Zt=["state"];function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const en=e=>!je.d.getRSVPTempTitle(e)||!je.d.getRSVPHasChanges(e)||je.d.getRSVPIsLoading(e)||je.d.getRSVPHasDurationError(e),tn=(e,t)=>()=>{t(je.a.setRSVPTempDetails({tempTitle:je.d.getRSVPTitle(e),tempDescription:je.d.getRSVPDescription(e),tempCapacity:je.d.getRSVPCapacity(e),tempNotGoingResponses:je.d.getRSVPNotGoingResponses(e),tempStartDate:je.d.getRSVPStartDate(e),tempStartDateInput:je.d.getRSVPStartDateInput(e),tempStartDateMoment:je.d.getRSVPStartDateMoment(e),tempEndDate:je.d.getRSVPEndDate(e),tempEndDateInput:je.d.getRSVPEndDateInput(e),tempEndDateMoment:je.d.getRSVPEndDateMoment(e),tempStartTime:je.d.getRSVPStartTime(e),tempEndTime:je.d.getRSVPEndTime(e),tempStartTimeInput:je.d.getRSVPStartTimeInput(e),tempEndTimeInput:je.d.getRSVPEndTimeInput(e)})),t(je.a.setRSVPHasChanges(!1)),Object(oe.dispatch)("core/editor").clearSelectedBlock()},nn=(e,t)=>()=>{const n={title:je.d.getRSVPTempTitle(e),description:je.d.getRSVPTempDescription(e),capacity:je.d.getRSVPTempCapacity(e),notGoingResponses:je.d.getRSVPTempNotGoingResponses(e),startDate:je.d.getRSVPTempStartDate(e),startDateInput:je.d.getRSVPTempStartDateInput(e),startDateMoment:je.d.getRSVPTempStartDateMoment(e),endDate:je.d.getRSVPTempEndDate(e),endDateInput:je.d.getRSVPTempEndDateInput(e),endDateMoment:je.d.getRSVPTempEndDateMoment(e),startTime:je.d.getRSVPTempStartTime(e),endTime:je.d.getRSVPTempEndTime(e),startTimeInput:je.d.getRSVPTempStartTimeInput(e),endTimeInput:je.d.getRSVPTempEndTimeInput(e)};je.d.getRSVPCreated(e)?t(je.e.updateRSVP(Xt(Xt({},n),{},{id:je.d.getRSVPId(e)}))):t(je.e.createRSVP(Xt(Xt({},n),{},{postId:Object(oe.select)("core/editor").getCurrentPostId()})))};var an=Object(P.c)(Object(Ye.withStore)(),re(e=>({created:je.d.getRSVPCreated(e),hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)(),isCancelDisabled:je.d.getRSVPIsLoading(e),isConfirmDisabled:en(e),isLoading:je.d.getRSVPIsLoading(e),showCancel:je.d.getRSVPCreated(e),state:e}),null,(e,t,n)=>{const{state:a}=e,r=ze()(e,Zt),{dispatch:i}=t;return Xt(Xt(Xt({},n),r),{},{onCancelClick:tn(a,i),onConfirmClick:nn(a,i)})}))(Jt);n(401);const rn=e=>{let{image:t,isSettingsLoading:n,onRemove:a,onSelect:r}=e;const i={title:Object(o.__)("Ticket Header Image","event-tickets"),description:Object(o.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(o.__)("Upload Image","event-tickets"),image:t,onRemove:a,onSelect:r,removeButtonDisabled:n};return wp.element.createElement(Le.ImageUpload,i)};rn.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var sn=rn;var on=Object(P.c)(Object(Ye.withStore)(),re(e=>({image:{id:je.d.getRSVPHeaderImageId(e),alt:je.d.getRSVPHeaderImageAlt(e),src:je.d.getRSVPHeaderImageSrc(e)},isSettingsLoading:je.d.getRSVPIsSettingsLoading(e)}),e=>({onSelect:t=>e(je.a.updateRSVPHeaderImage(t)),onRemove:()=>e(je.a.deleteRSVPHeaderImage())})))(sn);n(402);const cn=e=>{let{isSettingsLoading:t,onCloseClick:n}=e;return wp.element.createElement(me.SettingsDashboard,{className:ue()("tribe-editor__rsvp__settings-dashboard",{"tribe-editor__rsvp__settings-dashboard--loading":t}),closeButtonDisabled:t,content:wp.element.createElement(i.Fragment,null,wp.element.createElement(on,null),t&&wp.element.createElement(_e.Spinner,null)),onCloseClick:n})};cn.propTypes={isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var dn=cn;var ln=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsLoading:je.d.getRSVPIsSettingsLoading(e)}),e=>({onCloseClick:()=>e(je.a.setRSVPSettingsOpen(!1))})))(dn);const un=e=>{let{isSelected:t,isSettingsOpen:n}=e;return t?n?wp.element.createElement(ln,null):wp.element.createElement(an,null):null};un.propTypes={isSelected:_.a.bool.isRequired,isSettingsOpen:_.a.bool.isRequired};var _n=un;var mn=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsOpen:je.d.getRSVPSettingsOpen(e)})))(_n),pn=n(62);const Tn={className:"tribe-editor__rsvp__inactive-block",icon:wp.element.createElement(c.RSVPInactive,null),layout:pn.a.rsvp},fn=e=>{let{created:t}=e;return Tn.title=t?Object(o.__)("RSVP is not currently active","event-tickets"):Object(o.__)("There is no RSVP configured","event-tickets"),Tn.description=t?Object(o.__)("Edit this block to change RSVP settings.","event-tickets"):Object(o.__)("Edit this block to create an RSVP form.","event-tickets"),wp.element.createElement(pn.b,Tn)};fn.propTypes={created:_.a.bool.isRequired};var hn=fn;var yn=Object(P.c)(Object(Ye.withStore)(),re(e=>({created:je.d.getRSVPCreated(e)})))(hn),bn=n(27),Mn=n(18);n(403);class Sn extends i.PureComponent{constructor(){super(...arguments),de()(this,"renderPostTypes",()=>this.props.isFetchingPosts?wp.element.createElement(_e.Spinner,null):this.props.postOptions.length?wp.element.createElement(_e.MenuGroup,null,wp.element.createElement(_e.MenuItemsChoice,{choices:this.props.postOptions,value:this.props.postValue,onSelect:this.props.onPostSelect})):wp.element.createElement(_e.Notice,{isDismissible:!1,status:"warning"},Object(o.__)("No posts found","event-tickets")))}componentDidMount(){this.props.initialize()}render(){return wp.element.createElement(_e.Modal,{title:this.props.title,onRequestClose:this.props.hideModal,className:"tribe-editor__tickets__move-modal"},wp.element.createElement("label",{htmlFor:"post_type"},Object(o.__)("You can optionally focus on a specific post type:","event-tickets")),wp.element.createElement(Le.Select,{id:"post_type",options:this.props.postTypeOptions,onChange:this.props.onPostTypeChange,value:this.props.postTypeOptionValue}),wp.element.createElement("label",{htmlFor:"search"},Object(o.__)("You can also enter keywords to help find the target event by title or description","event-tickets")),wp.element.createElement(Le.Input,{id:"search",type:"text",onChange:this.props.onSearchChange,value:this.props.search}),wp.element.createElement("label",null,Object(o.__)("Select the post you wish to move the ticket type to:","event-tickets")),this.renderPostTypes(),wp.element.createElement("footer",null,wp.element.createElement(_e.Button,{isLarge:!0,isPrimary:!0,isBusy:this.props.isModalSubmitting,disabled:!this.props.hasSelectedPost||this.props.isFetchingPosts,onClick:this.props.onSubmit},Object(o.__)("Finish!","event-tickets"))))}}de()(Sn,"propTypes",{hasSelectedPost:_.a.bool.isRequired,hideModal:_.a.func.isRequired,initialize:_.a.func.isRequired,isFetchingPosts:_.a.bool.isRequired,isModalSubmitting:_.a.bool.isRequired,onPostSelect:_.a.func.isRequired,onPostTypeChange:_.a.func.isRequired,onSearchChange:_.a.func.isRequired,onSubmit:_.a.func.isRequired,postOptions:_.a.arrayOf(_.a.object),postTypeOptions:_.a.arrayOf(_.a.object),postTypeOptionValue:_.a.object,postValue:_.a.string.isRequired,search:_.a.string.isRequired,title:_.a.string.isRequired}),de()(Sn,"defaultProps",{title:Object(o.__)("Move Ticket Types","event-tickets")});var En=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasSelectedPost:bn.i(e),isFetchingPosts:bn.k(e),isFetchingPostTypes:bn.j(e),isModalSubmitting:bn.m(e),postOptions:bn.f(e),postTypeOptions:bn.h(e),postTypeOptionValue:bn.g(e),postValue:bn.d(e),search:bn.c(e)}),e=>({initialize:()=>e({type:Mn.h}),hideModal:()=>e(Object(pt.a)()),onSearchChange:t=>e(Object(pt.b)({search_terms:t.target.value})),onPostTypeChange:t=>e(Object(pt.b)({post_type:t.value})),onPostSelect:t=>e(Object(pt.b)({target_post_id:t})),onSubmit:()=>e({type:Mn.o})})))(Sn);n(404);class gn extends i.PureComponent{componentDidMount(){!this.props.rsvpId&&this.props.initializeRSVP()}renderBlock(){const{created:e,isInactive:t,isLoading:n,isSelected:a,clientId:r,isModalShowing:s}=this.props;return wp.element.createElement(i.Fragment,null,!a&&(e&&t||!e)?wp.element.createElement(yn,null):wp.element.createElement("div",{className:ue()("tribe-editor__rsvp",{"tribe-editor__rsvp--selected":a},{"tribe-editor__rsvp--loading":n})},wp.element.createElement(Ht,{isSelected:a,clientId:r}),wp.element.createElement(mn,{isSelected:a}),n&&wp.element.createElement(_e.Spinner,null)),s&&wp.element.createElement(En,null))}renderBlockNotSupported(){const{clientId:e}=this.props;return wp.element.createElement("div",{className:"tribe-editor__not-supported-message"},wp.element.createElement("p",{className:"tribe-editor__not-supported-message-text"},Object(o.__)("RSVPs are not yet supported on recurring events.","event-tickets"),wp.element.createElement("br",null),wp.element.createElement("a",{className:"tribe-editor__not-supported-message-link",href:"https://evnt.is/1b7a",target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Read about our plans for future features.","event-tickets")),wp.element.createElement("br",null),wp.element.createElement(_e.Button,{variant:"secondary",onClick:()=>wp.data.dispatch("core/block-editor").removeBlock(e)},Object(o.__)("Remove block","event-tickets"))))}render(){return this.props.hasRecurrenceRules&&this.props.noTicketsOnRecurring?this.renderBlockNotSupported():this.renderBlock()}}de()(gn,"propTypes",{clientId:_.a.string.isRequired,created:_.a.bool.isRequired,initializeRSVP:_.a.func.isRequired,isInactive:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,isModalShowing:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,rsvpId:_.a.number.isRequired});var kn=gn,Dn=n(40),Ln=n.n(Dn),vn=n(37),On=n.n(vn),jn=n(30),Yn=n.n(jn),wn=n(245),In=n.n(wn),Pn=n(386),Cn=n.n(Pn);function Rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function An(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rn(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Hn={};var Nn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{class n extends i.Component{constructor(e){super(e),de()(this,"keys",[]),de()(this,"saving",null),this.keys=this.generateKeys()}generateKeys(){return Yn()(this.attrs)?this.attrs:On()(this.attrs)?Ln()(this.attrs):(console.warn("Make sure attributes is from a valid type: Array or Object"),[])}componentDidMount(){const{setInitialState:e,attributes:t={},isolated:n,onBlockCreated:a}=this.props;a(this.props),this.registerBlock(),this.blockCount()>1&&!n||e(An(An({},this.props),{},{get:(e,n)=>e in t?t[e]:n}))}componentWillUnmount(){const{onBlockRemoved:e}=this.props;this.unregisterBlock(),e(this.props)}registerBlock(){const{name:e}=this.props;Hn[e]=e in Hn?Hn[e]+1:1}unregisterBlock(){const{name:e}=this.props;Hn[e]-=1}blockCount(){const{name:e}=this.props;return Hn[e]}componentDidUpdate(){const e=this.calculateDiff();Cn()(this.saving,e)||(this.saving=e,In()(e)||this.props.setAttributes(e))}calculateDiff(){const e=this.attrs;return this.keys.reduce((t,n)=>(n in this.props&&!Cn()(e[n],this.props[n])&&(t[n]=this.props[n]),t),{})}get attrs(){return e||this.props.attributes||{}}render(){return wp.element.createElement(t,this.props)}}return de()(n,"defaultProps",{attributes:{},setInitialState:Kt.a,setAttributes:Kt.a,name:"",isolated:!1,onBlockCreated:Kt.a,onBlockRemoved:Kt.a}),de()(n,"propTypes",{setAttributes:_.a.func,setInitialState:_.a.func,attributes:_.a.object,name:_.a.string,isolated:_.a.bool,increaseRegister:_.a.func,decreaseRegister:_.a.func,onBlockCreated:_.a.func,onBlockRemoved:_.a.func}),n.displayName="WithSaveData( "+(t.displayName||t.name||"Component "),n}};const xn=e=>{const t=je.d.getRSVPStartDateMoment(e),n=je.d.getRSVPStartTimeNoSeconds(e),a=je.d.getRSVPEndDateMoment(e),r=je.d.getRSVPEndTimeNoSeconds(e);if(!t||!a)return!1;const i=$e.moment.setTimeInSeconds(t.clone(),$e.time.toSeconds(n,$e.time.TIME_FORMAT_HH_MM)),s=$e.moment.setTimeInSeconds(a.clone(),$e.time.toSeconds(r,$e.time.TIME_FORMAT_HH_MM)),o=se()();return!(o.isAfter(i)&&o.isBefore(s))},Vn=(e,t)=>()=>{const n=Object(oe.select)("core/editor").getCurrentPostId();e(je.e.getRSVP(n));const{attributes:a={}}=t;parseInt(a.headerImageId,10)&&e(je.a.fetchRSVPHeaderImage(a.headerImageId)),a.goingCount&&e(je.a.setRSVPGoingCount(parseInt(a.goingCount,10))),a.notGoingCount&&e(je.a.setRSVPNotGoingCount(parseInt(a.notGoingCount,10)))};var Fn=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=je.d.getRSVPId(e);return{created:je.d.getRSVPCreated(e),isInactive:xn(e),isLoading:je.d.getRSVPIsLoading(e),isModalShowing:Object(bn.l)(e)&&Object(bn.e)(e)===t,hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)(),rsvpId:t}},(e,t)=>({initializeRSVP:()=>e(je.a.initializeRSVP()),onBlockRemoved:()=>e(je.a.deleteRSVP()),setInitialState:Vn(e,t)})),Nn())(kn),Kn=n(8),Wn={id:"rsvp",title:Object(o.__)("RSVP","event-tickets"),description:Object(o.__)("Find out who is planning to attend!","event-tickets"),icon:wp.element.createElement(c.RSVP,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{goingCount:{type:"integer",source:"meta",meta:Kn.g},notGoingCount:{type:"integer",source:"meta",meta:Kn.j},headerImageId:{type:"integer",source:"meta",meta:Kn.i}},edit:Fn,save:()=>null};const Un=e=>{let{onClick:t}=e;return wp.element.createElement(me.ActionButton,{icon:wp.element.createElement(Ie.Cog,null),onClick:t},Object(o.__)("Settings","event-tickets"))};Un.propTypes={onClick:_.a.func};var zn=Un,Gn=n(5);var Bn=Object(P.c)(Object(Ye.withStore)(),re(null,e=>({onClick:()=>e(Gn.a.openSettings())})))(zn);const qn=e=>{let{href:t}=e;return t?wp.element.createElement(me.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(c.Orders,null),target:"_blank"},Object(o.__)("Orders","event-tickets")):null};qn.propTypes={href:_.a.string.isRequired};var Jn=qn;var $n=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=$e.globals.adminUrl(),n=Object(oe.select)("core/editor").getCurrentPostType(),a=Object(oe.select)("core/editor").getCurrentPostId(),r=Gn.f.getTicketsProvider(e),i=Gn.b.TICKET_ORDERS_PAGE_SLUG[r];return{href:i?`${t}edit.php?post_type=${n}&page=${i}&event_id=${a}`:""}}))(Jn);const Zn=e=>{let{href:t,canCreateTickets:n}=e;return n&&wp.element.createElement(me.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(c.Attendees,null),target:"_blank"},Object(o.__)("Attendees","event-tickets"))};Zn.propTypes={href:_.a.string.isRequired,canCreateTickets:_.a.bool};var Qn=Zn;var Xn=Object(P.c)(Object(Ye.withStore)(),re(()=>({href:`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=tickets-attendees&event_id=${Object(oe.select)("core/editor").getCurrentPostId()}`,canCreateTickets:Gn.f.canCreateTickets()})))(Qn);n(407);const ea=Object(o.__)("Add Tickets","event-tickets");class ta extends i.PureComponent{constructor(e){super(e),de()(this,"onWarningClick",()=>{this.setState({isWarningOpen:!this.state.isWarningOpen})}),de()(this,"getActions",()=>{const{hasCreatedTickets:e,hasOrdersPage:t,hasRecurrenceRules:n}=this.props,a=[wp.element.createElement(Bn,null)];if(e&&(a.push(wp.element.createElement(Xn,null)),t&&a.push(wp.element.createElement($n,null))),n){const e=this.state.isWarningOpen?"no":"info-outline",t=this.state.isWarningOpen?Object(o.__)("Hide Warning","event-tickets"):Object(o.__)("Warning","event-tickets");a.push(wp.element.createElement(me.WarningButton,{icon:e,onClick:this.onWarningClick},t))}return a}),this.state={isWarningOpen:!1}}render(){const{onConfirmClick:e}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(me.ActionDashboard,{className:"tribe-editor__tickets__action-dashboard",actions:this.getActions(),confirmLabel:ea,onConfirmClick:e,showCancel:!1}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__tickets__warning"},Object(o.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}de()(ta,"propTypes",{hasCreatedTickets:_.a.bool,hasOrdersPage:_.a.bool,hasRecurrenceRules:_.a.bool,onConfirmClick:_.a.func});var na=ta;var aa=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Gn.f.getTicketsProvider(e),r=Gn.b.TICKET_ORDERS_PAGE_SLUG[n];return{hasCreatedTickets:Gn.f.hasCreatedTickets(e),hasOrdersPage:Boolean(r),hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)(),onConfirmClick:()=>{const{clientId:e}=t,{getBlockCount:n}=Object(oe.select)("core/editor"),{insertBlock:r}=Object(oe.dispatch)("core/editor"),i=n(e);r(Object(a.createBlock)("tribe/tickets-item",{}),i,e)}}}))(na);n(408);const ra=e=>{let{label:t,items:n,right:a}=e;return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-row"},wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-left"},t&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-label"},t),n&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-items"},n)),wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-right"},a))};ra.propTypes={label:_.a.string,items:_.a.string,right:_.a.node},ra.defaultProps={label:"",items:"",right:""};var ia=ra;n(409);const sa=e=>{let{isSettingsLoading:t,independentCapacity:n,sharedCapacity:a,independentAndSharedCapacity:r,independentTicketItems:i,sharedTicketItems:s,onSharedCapacityChange:c}=e;const d=wp.element.createElement(Le.NumberInput,{onChange:c,value:a,disabled:t,min:0});return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-table"},wp.element.createElement("h3",{className:"tribe-editor__tickets__capacity-table-title"},Object(o.__)("Capacity","event-tickets")),wp.element.createElement(ia,{label:Object(o.__)("Shared capacity","event-tickets"),items:s,right:d}),wp.element.createElement(ia,{label:Object(o.__)("Independent capacity","event-tickets"),items:i,right:n}),wp.element.createElement(ia,{label:Object(o.__)("Total Capacity","event-tickets"),right:r}))};sa.propTypes={isSettingsLoading:_.a.bool,independentCapacity:_.a.number,sharedCapacity:_.a.string,independentAndSharedCapacity:_.a.number,independentTicketItems:_.a.string,sharedTicketItems:_.a.string,onSharedCapacityChange:_.a.func};var oa=sa;const ca=e=>{const t=e.filter(e=>e.details.title).map(e=>e.details.title).join(", ");return t?` (${t}) `:""},da=e=>{const t=Gn.f.getIndependentTickets(e);return ca(t)},la=e=>{const t=Gn.f.getSharedTickets(e);return ca(t)};var ua=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e),independentCapacity:Gn.f.getIndependentTicketsCapacity(e),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),independentAndSharedCapacity:Gn.f.getIndependentAndSharedTicketsCapacity(e),independentTicketItems:da(e),sharedTicketItems:la(e)}),e=>({onSharedCapacityChange:t=>{e(Gn.a.setTicketsSharedCapacity(t.target.value)),e(Gn.a.setTicketsTempSharedCapacity(t.target.value))}})))(oa);n(410);const _a=e=>{let{image:t,isSettingsLoading:n,onRemove:a,onSelect:r}=e;const i={title:Object(o.__)("Ticket Header Image","event-tickets"),description:Object(o.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(o.__)("Upload Image","event-tickets"),image:t,onRemove:a,onSelect:r,removeButtonDisabled:n};return wp.element.createElement(Le.ImageUpload,i)};_a.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var ma=_a;var pa=Object(P.c)(Object(Ye.withStore)(),re(e=>({image:{id:Gn.f.getTicketsHeaderImageId(e),alt:Gn.f.getTicketsHeaderImageAlt(e),src:Gn.f.getTicketsHeaderImageSrc(e)},isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e)}),e=>({onSelect:t=>e(Gn.a.updateTicketsHeaderImage(t)),onRemove:()=>e(Gn.a.deleteTicketsHeaderImage())})))(ma);n(411);const Ta=e=>{let{hasTicketsPlus:t,isSettingsLoading:n,onCloseClick:a}=e;return wp.element.createElement(me.SettingsDashboard,{className:ue()("tribe-editor__tickets__settings-dashboard",{"tribe-editor__tickets__settings-dashboard--loading":n}),closeButtonDisabled:n,content:wp.element.createElement(i.Fragment,null,t&&wp.element.createElement(ua,null),wp.element.createElement(pa,null),n&&wp.element.createElement(_e.Spinner,null)),onCloseClick:a})};Ta.propTypes={hasTicketsPlus:_.a.bool,isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var fa=Ta;var ha=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e)}),e=>({onCloseClick:()=>e(Gn.a.closeSettings())})))(fa);const ya=e=>{let{clientId:t,isSelected:n,isSettingsOpen:a}=e;return n?a?wp.element.createElement(ha,null):wp.element.createElement(aa,{clientId:t}):null};ya.propTypes={clientId:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool};var ba=ya;var Ma=Object(P.c)(Object(Ye.withStore)(),re(e=>({isSettingsOpen:Gn.f.getTicketsIsSettingsOpen(e)})))(ba);n(412);const Sa=e=>{let{available:t,total:n}=e;const a=wp.element.createElement(me.NumericLabel,{className:ue()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--available","tribe-tooltip"),count:t,singular:Object(o.__)("%d ticket available","event-tickets"),plural:Object(o.__)("%d tickets available","event-tickets")}),r=wp.element.createElement(me.NumericLabel,{className:ue()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--total"),count:n,singular:Object(o.__)("%d total ticket","event-tickets"),plural:Object(o.__)("%d total tickets","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__tickets__availability"},wp.element.createElement("span",{class:"tribe-tooltip",title:Object(o.__)("Ticket availability is based on the lowest number of inventory, stock, and capacity.","event-tickets")},a,wp.element.createElement("span",{className:"dashicons dashicons-info"})),r)};Sa.propTypes={available:_.a.number,total:_.a.number};var Ea=Sa;var ga=Object(P.c)(Object(Ye.withStore)(),re(e=>({total:Gn.f.getIndependentAndSharedTicketsCapacity(e),available:Gn.f.getIndependentAndSharedTicketsAvailable(e)})))(Ea);n(413);const{InnerBlocks:ka}=wp.blockEditor,Da=()=>wp.element.createElement("div",{className:"tribe-editor__tickets__overlay"}),La=e=>{let{allTicketsPast:t,canCreateTickets:n,hasCreatedTickets:a,hasOverlay:r,showAvailability:i,showInactiveBlock:s}=e;const d={title:"",description:""};n?a?d.title=t?Object(o.__)("Tickets are no longer available","event-tickets"):Object(o.__)("Tickets are not yet available","event-tickets"):(d.title=Object(o.__)("There are no tickets yet","event-tickets"),d.description=Object(o.__)("Edit this block to create your first ticket.","event-tickets")):(d.title=Object(o.__)("There is no ecommerce available","event-tickets"),d.description=Object(o.__)("To create tickets, you'll need to enable an ecommerce solution.","event-tickets"));const l=ue()({"tribe-editor__tickets__inner-blocks":!0,"tribe-editor__tickets__inner-blocks--show":!s});return wp.element.createElement("div",{className:"tribe-editor__tickets__container"},wp.element.createElement("div",{className:l},wp.element.createElement(ka,{allowedBlocks:["tribe/tickets-item"]})),s&&wp.element.createElement(me.InactiveBlock,{layout:pn.a.ticket,title:d.title,description:d.description,icon:wp.element.createElement(c.TicketInactive,null)}),i&&wp.element.createElement(ga,null),r&&wp.element.createElement(Da,null))};La.propTypes={allTicketsPast:_.a.bool,canCreateTickets:_.a.bool,hasCreatedTickets:_.a.bool,hasOverlay:_.a.bool,showAvailability:_.a.bool,showInactiveBlock:_.a.bool};var va=La;const Oa=(e,t)=>Gn.f.getTicketsIsSettingsOpen(e)||!Gn.f.hasATicketSelected(e)&&!t.isSelected,ja=(e,t)=>{const n=t.isSelected&&!Gn.f.hasTickets(e),a=!(t.isSelected||Gn.f.hasATicketSelected(e)||Gn.f.hasCreatedTickets(e)&&Gn.f.hasTicketOnSale(e));return n||a};var Ya=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({allTicketsPast:Gn.f.allTicketsPast(e),canCreateTickets:Gn.f.canCreateTickets(),hasCreatedTickets:Gn.f.hasCreatedTickets(e),hasOverlay:Oa(e,t),showAvailability:t.isSelected&&Gn.f.hasCreatedTickets(e),showInactiveBlock:ja(e,t)})))(va),wa=n(246);n(414);const Ia=["provider","onProviderChange"],Pa=Object(o.__)("It looks like you have multiple ecommerce plugins active. We recommend running only one at a time. However, if you need to run multiple, please select which one to use to sell tickets for this event. ","event-tickets"),Ca=Object(o.__)("Note: adjusting this setting will only impact new tickets. Existing tickets will not change. We highly recommend that all tickets for one event use the same ecommerce plugin.","event-tickets"),Ra=e=>{let{provider:t,onProviderChange:n}=e,a=ze()(e,Ia);return wp.element.createElement("div",{className:"tribe-editor__tickets-control-container"},wp.element.createElement("input",Be()({className:"tribe-editor__tickets-control__input tribe-editor__tickets-control__input--radio",type:"radio",id:t.class,name:t.class,onChange:n},a)),wp.element.createElement("label",{className:"tribe-editor__tickets-control__label",htmlFor:t.class},t.name))},Aa=e=>{let{hasMultipleProviders:t,providers:n,selectedProvider:a,onProviderChange:r}=e;return t&&wp.element.createElement(wa.InspectorControls,{key:"inspector"},wp.element.createElement(_e.PanelBody,{title:Object(o.__)("Tickets Settings","event-tickets")},wp.element.createElement(_e.PanelRow,null,wp.element.createElement("fieldset",{className:"tribe-editor__tickets-controls-provider"},wp.element.createElement("legend",null,Object(o.__)("Sell tickets using","event-tickets")),wp.element.createElement("p",null,Pa,wp.element.createElement("em",null,Ca)),n.map((e,t)=>wp.element.createElement(Ra,{key:"provider-option-"+(t+1),provider:e,onProviderChange:r,checked:a===e.class}))))))};Aa.propTypes={hasMultipleProviders:_.a.bool,providers:_.a.arrayOf(_.a.shape({name:_.a.string,class:_.a.string})),selectedProvider:_.a.string,onProviderChange:_.a.func};var Ha=Aa;var Na=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasMultipleProviders:Gn.f.hasMultipleTicketProviders(),providers:Gn.f.getTicketProviders(),selectedProvider:Gn.f.getTicketsProvider(e)}),e=>({onProviderChange:t=>e(Gn.a.setTicketsProvider(t.target.name))})),Nn())(Ha);n(415);class xa extends i.PureComponent{componentDidMount(){this.props.onBlockUpdate(this.props.isSelected)}componentDidUpdate(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}renderBlock(){const{isSelected:e,clientId:t,canCreateTickets:n}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Ya,{isSelected:e}),n&&wp.element.createElement(Ma,{isSelected:e,clientId:t}),wp.element.createElement(Na,null))}renderBlockNotSupported(){const{clientId:e}=this.props;return wp.element.createElement("div",{className:"tribe-editor__not-supported-message"},wp.element.createElement("p",{className:"tribe-editor__not-supported-message-text"},Object(o.__)("Tickets are not yet supported for on recurring events.","event-tickets"),wp.element.createElement("br",null),wp.element.createElement("a",{className:"tribe-editor__not-supported-message-link",href:"https://evnt.is/1b7a",target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Read about our plans for future features.","event-tickets")),wp.element.createElement("br",null),wp.element.createElement(_e.Button,{variant:"secondary",onClick:()=>wp.data.dispatch("core/block-editor").removeBlock(e)},Object(o.__)("Remove block","event-tickets"))))}renderContent(){return this.props.hasRecurrenceRules&&this.props.noTicketsOnRecurring?this.renderBlockNotSupported():this.renderBlock()}render(){const{isSelected:e,isSettingsOpen:t}=this.props;return wp.element.createElement("div",{className:ue()("tribe-editor__tickets",{"tribe-editor__tickets--selected":e},{"tribe-editor__tickets--settings-open":t})},this.renderContent())}}de()(xa,"propTypes",{canCreateTickets:_.a.bool,clientId:_.a.string,hasProviders:_.a.bool,header:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool,onBlockUpdate:_.a.func});var Va=xa;var Fa=Object(P.c)(Object(Ye.withStore)(),re(e=>{const t=Gn.f.getTicketsHeaderImageId(e);return{header:t?""+t:"",hasProviders:Gn.f.hasTicketProviders(),isSettingsOpen:Gn.f.getTicketsIsSettingsOpen(e),provider:Gn.f.getTicketsProvider(e),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),canCreateTickets:Gn.f.canCreateTickets(),hasRecurrenceRules:Object($t.hasRecurrenceRules)(e),noTicketsOnRecurring:Object($t.noTicketsOnRecurring)()}},e=>({setInitialState:t=>{e(Gn.a.setTicketsInitialState(t))},onBlockUpdate:t=>{e(Gn.a.setTicketsIsSelected(t))},onBlockRemoved:()=>{e(Gn.a.resetTicketsBlock())}})),Nn())(Va);const{InnerBlocks:Ka}=wp.blockEditor;var Wa={id:"tickets",title:Object(o.__)("Tickets","event-tickets"),description:Object(o.__)("Sell tickets and register attendees.","event-tickets"),icon:wp.element.createElement(c.Tickets,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{sharedCapacity:{type:"string",source:"meta",meta:Kn.d},header:{type:"string",source:"meta",meta:Kn.i},provider:{type:"string",source:"meta",meta:Kn.e},tickets:{type:"array",source:"meta",meta:Kn.c}},edit:Fa,save:()=>wp.element.createElement("div",null,wp.element.createElement(Ka.Content,null))};n(416),n(417);const Ua=e=>{let{hasAttendeeInfoFields:t,isDisabled:n,isSelected:a,onTempTitleChange:r,tempTitle:s,title:c}=e;const d=t&&wp.element.createElement(Le.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ie.Clipboard,null),text:Object(o.__)("This ticket has Attendee Information Fields configured.","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-title"},a?wp.element.createElement(i.Fragment,null,wp.element.createElement(De,{className:"tribe-editor__ticket__container-header-title-input",value:s,placeholder:Object(o.__)("Ticket Type *","event-tickets"),onChange:r,disabled:n,required:!0}),d):wp.element.createElement(i.Fragment,null,wp.element.createElement("h3",{className:"tribe-editor__ticket__container-header-title-label"},c),d,wp.element.createElement(Ie.Pencil,null)))};Ua.propTypes={hasAttendeeInfoFields:_.a.bool,isDisabled:_.a.bool,isSelected:_.a.bool,onTempTitleChange:_.a.func,tempTitle:_.a.string,title:_.a.string};var za=Ua;var Ga=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({hasAttendeeInfoFields:Gn.f.getTicketHasAttendeeInfoFields(e,t),isDisabled:Gn.f.isTicketDisabled(e,t),tempTitle:Gn.f.getTicketTempTitle(e,t),title:Gn.f.getTicketTitle(e,t)}),(e,t)=>({onTempTitleChange:n=>{const{clientId:a}=t;e(Gn.a.setTicketTempTitle(a,n.target.value)),e(Gn.a.setTicketHasChanges(a,!0))}})))(za);n(418);const Ba=e=>{let{isDisabled:t,isSelected:n,onTempDescriptionChange:a,tempDescription:r,description:i}=e;return n?wp.element.createElement(De,{className:"tribe-editor__ticket__container-header-description-input",value:r,placeholder:Object(o.__)("Description","event-tickets"),onChange:a,disabled:t}):wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-description"},i)};Ba.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,onTempDescriptionChange:_.a.func,tempDescription:_.a.string,description:_.a.string};var qa=Ba;var Ja=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),tempDescription:Gn.f.getTicketTempDescription(e,t),description:Gn.f.getTicketDescription(e,t)}),(e,t)=>({onTempDescriptionChange:n=>{const{clientId:a}=t;e(Gn.a.setTicketTempDescription(a,n.target.value)),e(Gn.a.setTicketHasChanges(a,!0))}})))(qa),$a=n(247),Za=n.n($a),Qa=n(22);n(419);const Xa=e=>{let{isDisabled:t,currencyPosition:n,currencySymbol:a,onTempPriceChange:r,tempPrice:s}=e;return wp.element.createElement(i.Fragment,null,n===Qa.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},a),wp.element.createElement(Za.a,{className:"tribe-editor__ticket__container-header-price-input",value:s,placeholder:Object(o.__)("0","event-tickets"),onChange:r,disabled:t,type:"number",min:"0"}),n===Qa.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},a))};Xa.propTypes={isDisabled:_.a.bool,currencyPosition:_.a.oneOf(Qa.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string};const er=e=>{let{currencyPosition:t,currencySymbol:n,price:a}=e;return wp.element.createElement(i.Fragment,null,t===Qa.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n),wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-value"},a),t===Qa.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n))};er.propTypes={currencyPosition:_.a.oneOf(Qa.PRICE_POSITIONS),currencySymbol:_.a.string,price:_.a.string};const tr=e=>{let{isDisabled:t,isSelected:n,currencyPosition:a,currencySymbol:r,onTempPriceChange:i,tempPrice:s,price:o}=e;return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-price"},n?wp.element.createElement(Xa,{currencyPosition:a,currencySymbol:r,onTempPriceChange:i,tempPrice:s,isDisabled:t}):wp.element.createElement(er,{currencyPosition:a,currencySymbol:r,price:o}))};tr.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,currencyPosition:_.a.oneOf(Qa.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string,price:_.a.string};var nr=tr;var ar=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),currencyPosition:Gn.f.getTicketCurrencyPosition(e,t),currencySymbol:Gn.f.getTicketCurrencySymbol(e,t),tempPrice:Gn.f.getTicketTempPrice(e,t),price:Gn.f.getTicketPrice(e,t)||"0"}),(e,t)=>({onTempPriceChange:n=>{const{clientId:a}=t;e(Gn.a.setTicketTempPrice(a,n.target.value)),e(Gn.a.setTicketHasChanges(a,!0))}})))(nr);n(420);const rr=e=>{let t,{children:n,className:a,value:r,total:i}=e;if(0===r||0===i)return null;try{t=$e.number.percentage(r,i)}catch(e){t=0}const s={width:Math.max(0,Math.min(100,t)).toFixed(2)+"%"};return wp.element.createElement("span",{className:ue()("tribe-editor__quantity-bar__bar",a),style:s},n)};rr.propTypes={children:_.a.node,className:_.a.oneOfType([_.a.string,_.a.arrayOf(_.a.string),$e.TribePropTypes.nullType]),value:_.a.number,total:_.a.number},rr.defaultProps={className:null,value:0,total:0};var ir=rr;const sr=e=>{let{sharedSold:t,sold:n,capacity:a,total:r,isDisabled:s}=e;return wp.element.createElement("div",{className:"tribe-editor__quantity-bar"},!s&&wp.element.createElement(i.Fragment,null,wp.element.createElement(ir,{className:"tribe-editor__quantity-bar__bar--shared-sold",value:t,total:r}),wp.element.createElement(ir,{className:"tribe-editor__quantity-bar__bar--sold",value:n,total:r}),!!a&&!(a===r)&&wp.element.createElement(ir,{className:"tribe-editor__quantity-bar__bar--capacity",value:a,total:r},wp.element.createElement("span",{className:"tribe-editor__quantity-bar__bar-label"},Object(o.__)("cap","event-tickets")))))};sr.propTypes={sharedSold:_.a.number,capacity:_.a.number,sold:_.a.number,total:_.a.number,isDisabled:_.a.bool},sr.defaultProps={sharedSold:0,capacity:0,sold:0,total:0,isDisabled:!1};var or=sr;n(421);const cr=e=>{let{isDisabled:t,isSelected:n,isShared:a,isUnlimited:r,sold:i,capacity:s,sharedSold:c,sharedCapacity:d}=e;const l=a?d:s;return!n&&wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-quantity tribe-tooltip",title:Object(o.__)("This pertains to Orders that have been marked Completed.","event-tickets")},wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-label"},r?Object(o.sprintf)(Object(o.__)("%d sold","event-tickets"),i):Object(o.sprintf)(Object(o.__)("%d of %d sold","event-tickets"),i,l),wp.element.createElement("span",{class:"dashicons dashicons-info"})),r?wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-unlimited"},Object(o.__)("unlimited","event-tickets")):wp.element.createElement(or,{sold:i,sharedSold:c,capacity:s,total:l,isDisabled:t}))};cr.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,isShared:_.a.bool,isUnlimited:_.a.bool,sold:_.a.number,capacity:_.a.number,sharedSold:_.a.number,sharedCapacity:_.a.number},cr.defaultProps={sold:0,sharedCapacity:0,capacity:0};var dr=cr;const lr=(e,t)=>t?Gn.f.getSharedTicketsSold(e):0;var ur=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Gn.f.isSharedTicket(e,t);return{isDisabled:Gn.f.isTicketDisabled(e,t),isShared:n,isUnlimited:Gn.f.isUnlimitedTicket(e,t),sold:Gn.f.getTicketSold(e,t),capacity:Gn.f.getTicketCapacityInt(e,t),sharedSold:lr(e,n),sharedCapacity:Gn.f.getTicketsSharedCapacityInt(e)}}))(dr);n(422);const _r=e=>{let{clientId:t,isSelected:n}=e;return wp.element.createElement(i.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-details"},wp.element.createElement(Ga,{clientId:t,isSelected:n}),wp.element.createElement(Ja,{clientId:t,isSelected:n})),wp.element.createElement(ar,{clientId:t,isSelected:n}),wp.element.createElement(ur,{clientId:t,isSelected:n}))};_r.propTypes={clientId:_.a.string,isSelected:_.a.bool};var mr=_r,pr=n(59),Tr=n.n(pr),fr=n(73),hr=n.n(fr),yr=n(388);n(423);const br=["className","id","label"],{INDEPENDENT:Mr,SHARED:Sr,TICKET_TYPES:Er}=Gn.b,{CAPACITY_TYPE_OPTIONS:gr}=Gn.d,kr=e=>{let{className:t,id:n,label:a}=e,r=ze()(e,br);return wp.element.createElement(Le.LabeledItem,{className:ue()("tribe-editor__labeled-number-input",t),forId:n,label:a,isLabel:!0},wp.element.createElement(Le.NumberInput,r))};kr.propTypes={className:_.a.string,id:_.a.string,label:_.a.string};class Dr extends i.PureComponent{constructor(e){super(e),de()(this,"getInputs",()=>{const{isDisabled:e,sharedCapacity:t,tempCapacityType:n,tempCapacity:a,tempSharedCapacity:r,onTempCapacityChange:i,onTempSharedCapacityChange:s}=this.props,c=[];if(n===Er[Sr]&&""===t&&c.push(wp.element.createElement(kr,{key:"shared-capacity",className:ue()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--shared-capacity"),id:this.ids.sharedCapacity,label:Object(o.__)("Set shared capacity:","event-tickets"),value:r,onChange:s,disabled:e,min:0,required:!0})),hr()([Er[Sr],Er[Mr]],n)){const s={},d=n===Er[Sr]?Sr:Mr;if(n===Er[Sr]&&(t||r)){const e=t||r;s.max=parseInt(e,10)||0}n===Er[Mr]&&(s.required=!0),s.label=n===Er[Sr]?Object(o.__)("(optional) Limit sales of this ticket to:","event-tickets"):Object(o.__)("Number of tickets available","event-tickets"),c.push(wp.element.createElement(kr,Be()({key:"capacity",className:ue()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--capacity","tribe-editor__ticket__capacity-input-row--capacity-"+d),id:this.ids.capacity,value:a,onChange:i,disabled:e,min:0},s)))}return c}),de()(this,"getCapacityForm",()=>{const{isDisabled:e,tempCapacityTypeOption:t,onTempCapacityTypeChange:n}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Le.Select,{id:this.ids.select,className:"tribe-editor__ticket__capacity-type-select",backspaceRemovesValue:!1,value:t,isSearchable:!1,isDisabled:e,options:gr,onChange:n}),this.getInputs())}),de()(this,"getNoPlusCapacityForm",()=>{const{isDisabled:e,tempCapacity:t,onTempCapacityNoPlusChange:n}=this.props;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Le.NumberInput,{className:"tribe-editor__ticket__capacity-input",id:this.ids.capacity,value:t,onChange:n,disabled:e,min:0}),wp.element.createElement("span",{className:"tribe-editor__ticket__capacity-input-helper-text"},Object(o.__)("Leave blank for unlimited","event-tickets")))}),this.ids={select:xe()("capacity-type-"),capacity:xe()("capacity-"),sharedCapacity:xe()("shared-capacity-")}}render(){const{hasTicketsPlus:e}=this.props;return wp.element.createElement("div",{className:ue()("tribe-editor__ticket__capacity","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--capacity")},wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__ticket__capacity-label-with-tooltip",forId:e?this.ids.select:this.ids.capacity,isLabel:!0,label:Object(o.__)("Ticket Capacity","event-tickets"),tooltipText:Object(o.__)("Ticket capacity will only be used by attendees buying this ticket type","event-tickets"),tooltipLabel:wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement("div",{className:"tribe-editor__ticket__capacity-form"},e?this.getCapacityForm():this.getNoPlusCapacityForm()))}}de()(Dr,"propTypes",{hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,sharedCapacity:_.a.string,tempCapacity:_.a.string,tempCapacityType:_.a.string,tempCapacityTypeOption:yr.ReactSelectOption,tempSharedCapacity:_.a.string,onTempCapacityChange:_.a.func,onTempCapacityNoPlusChange:_.a.func,onTempCapacityTypeChange:_.a.func,onTempSharedCapacityChange:_.a.func});var Lr=Dr;const{UNLIMITED:vr,INDEPENDENT:Or,TICKET_TYPES:jr}=Gn.b;var Yr=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),isDisabled:Gn.f.isTicketDisabled(e,t),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),tempCapacity:Gn.f.getTicketTempCapacity(e,t),tempCapacityType:Gn.f.getTicketTempCapacityType(e,t),tempCapacityTypeOption:Gn.f.getTicketTempCapacityTypeOption(e,t),tempSharedCapacity:Gn.f.getTicketsTempSharedCapacity(e)}),(e,t)=>{const{clientId:n}=t;return{onTempCapacityChange:t=>{e(Gn.a.setTicketTempCapacity(n,t.target.value)),e(Gn.a.setTicketHasChanges(n,!0))},onTempCapacityNoPlusChange:t=>{const a=t.target.value,r=""===Tr()(a)?jr[vr]:jr[Or];e(Gn.a.setTicketTempCapacityType(n,r)),e(Gn.a.setTicketTempCapacity(n,a)),e(Gn.a.setTicketHasChanges(n,!0))},onTempCapacityTypeChange:t=>{e(Gn.a.setTicketTempCapacityType(n,t.value)),e(Gn.a.setTicketHasChanges(n,!0))},onTempSharedCapacityChange:t=>{e(Gn.a.setTicketsTempSharedCapacity(t.target.value)),e(Gn.a.setTicketHasChanges(n,!0))}}}))(Lr);n(424);const wr=["hasDurationError"],Ir=e=>{let{hasDurationError:t}=e,n=ze()(e,wr);return wp.element.createElement("div",{className:ue()("tribe-editor__ticket__duration","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--duration")},wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__ticket__duration-label-with-tooltip",label:Object(o.__)("Sale Duration","event-tickets"),tooltipText:Object(o.__)("If you do not set a start sale date, tickets will be available immediately.","event-tickets"),tooltipLabel:wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(me.DateTimeRangePicker,Be()({className:"tribe-editor__ticket__duration-picker"},n)),t&&wp.element.createElement("span",{className:"tribe-editor__ticket__duration-error"},Object(o.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))};Ir.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,hasDurationError:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var Pr=Ir;const Cr=["state"],Rr=["dispatch"];function Ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ar(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ar(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Nr=(e,t)=>(n,a,r)=>{e(Gn.a.handleTicketStartDate(t.clientId,n,r))},xr=(e,t)=>n=>{e(Gn.a.setTicketTempStartTimeInput(t.clientId,n.target.value))},Vr=(e,t)=>(n,a)=>{e(Gn.a.handleTicketStartTime(t.clientId,n)),a()},Fr=(e,t)=>(n,a,r)=>{e(Gn.a.handleTicketEndDate(t.clientId,n,r))},Kr=(e,t)=>n=>{e(Gn.a.setTicketTempEndTimeInput(t.clientId,n.target.value))},Wr=(e,t)=>(n,a)=>{e(Gn.a.handleTicketEndTime(t.clientId,n)),a()},Ur=(e,t,n)=>a=>{let r=$e.moment.toMoment(a.target.value,$e.moment.TIME_FORMAT,!1);if(!r.isValid()){const t=Gn.f.getTicketStartTimeInput(e,n);r=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const i=$e.moment.totalSeconds(r);t(Gn.a.handleTicketStartTime(n.clientId,i))},zr=(e,t,n)=>a=>{let r=$e.moment.toMoment(a.target.value,$e.moment.TIME_FORMAT,!1);if(!r.isValid()){const t=Gn.f.getTicketEndTimeInput(e,n);r=$e.moment.toMoment(t,$e.moment.TIME_FORMAT,!1)}const i=$e.moment.totalSeconds(r);t(Gn.a.handleTicketEndTime(n.clientId,i))};var Gr=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=$e.globals.tecDateSettings().datepickerFormat?$e.moment.toFormat($e.globals.tecDateSettings().datepickerFormat):"LL",a=Gn.f.isTicketDisabled(e,t),r=Gn.f.getTicketTempStartDateMoment(e,t),i=Gn.f.getTicketTempEndDateMoment(e,t),s=r&&r.toDate(),o=i&&i.toDate();return{fromDate:s,fromDateInput:Gn.f.getTicketTempStartDateInput(e,t),fromDateDisabled:a,fromDateFormat:n,fromTime:Gn.f.getTicketTempStartTimeInput(e,t),fromTimeDisabled:a,hasDurationError:Gn.f.getTicketHasDurationError(e,t),toDate:o,toDateInput:Gn.f.getTicketTempEndDateInput(e,t),toDateDisabled:a,toDateFormat:n,toTime:Gn.f.getTicketTempEndTimeInput(e,t),toTimeDisabled:a,state:e}},(e,t)=>({onFromDateChange:Nr(e,t),onFromTimePickerChange:xr(e,t),onFromTimePickerClick:Vr(e,t),onToDateChange:Fr(e,t),onToTimePickerChange:Kr(e,t),onToTimePickerClick:Wr(e,t),dispatch:e}),(e,t,n)=>{const{state:a}=e,r=ze()(e,Cr),{dispatch:i}=t,s=ze()(t,Rr);return Hr(Hr(Hr(Hr({},n),r),s),{},{onFromTimePickerBlur:Ur(a,i,n),onToTimePickerBlur:zr(a,i,n)})}))(Pr);n(425);class Br extends i.PureComponent{constructor(e){super(e),this.id=xe()("ticket-sku")}render(){const{sku:e,isDisabled:t,onChange:n}=this.props;return wp.element.createElement("div",{className:ue()("tribe-editor__ticket__sku","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--sku")},wp.element.createElement(me.LabelWithTooltip,{className:"tribe-editor__ticket__sku-label-with-tooltip",forId:this.id,isLabel:!0,label:Object(o.__)("Ticket SKU","event-tickets"),tooltipText:Object(o.__)("A unique identifying code for each ticket type you're selling","event-tickets"),tooltipLabel:wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(Le.Input,{className:"tribe-editor__ticket__sku-input",id:this.id,type:"text",value:e,onChange:n,disabled:t}))}}de()(Br,"propTypes",{isDisabled:_.a.bool,onChange:_.a.func.isRequired,sku:_.a.string});var qr=Br;var Jr=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),sku:Gn.f.getTicketTempSku(e,t)}),(e,t)=>({onChange:n=>{const{clientId:a}=t;e(Gn.a.setTicketTempSku(a,n.target.value)),e(Gn.a.setTicketHasChanges(a,!0))}})))(qr);n(426);const{EDD:$r,WOO:Zr,PROVIDER_TYPES:Qr}=Gn.b,Xr=["edit-ticket","report"],ei=e=>{let{editTicketLink:t,isDisabled:n,provider:a,reportLink:r,showEcommerceOptions:i}=e;const s=e=>{const i=ue()("tribe-editor__ticket__ecommerce-options-link","tribe-editor__ticket__ecommerce-options-link--"+e),s="report"===e?r:t,c="report"===e?Object(o.__)("View Sales Report","event-tickets"):(e=>{let t="";return e===$r?t=Object(o.__)("Edit Ticket in Easy Digital Downloads","event-tickets"):e===Zr&&(t=Object(o.__)("Edit Ticket in WooCommerce","event-tickets")),t})(a);return n?wp.element.createElement("span",{className:i},c):wp.element.createElement(Le.Link,{className:i,href:s,target:"_blank"},c)};return i&&wp.element.createElement(Le.LabeledItem,{className:ue()("tribe-editor__ticket__ecommerce-options","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--ecommerce-options"),label:Object(o.__)("Ecommerce","event-tickets")},wp.element.createElement("div",{className:"tribe-editor__ticket__ecommerce-options-links"},Xr.map(e=>wp.element.createElement("span",{key:e,className:"tribe-editor__ticket__ecommerce-options-link-wrapper"},s(e)))))};ei.propTypes={editTicketLink:_.a.string,isDisabled:_.a.bool,provider:_.a.oneOf([...Qr,""]),reportLink:_.a.string,showEcommerceOptions:_.a.bool};var ti=ei;const{EDD:ni,WOO:ai}=Gn.b,ri=e=>hr()([ni,ai],e),ii=(e,t,n)=>{let a="";if(ri(n)){a=`${$e.globals.adminUrl()}post.php?post=${Gn.f.getTicketId(e,t)}&action=edit`}return a},si=(e,t,n)=>{let a="";if(ri(n)){const r=$e.globals.adminUrl(),i=Gn.f.getTicketId(e,t);let s="";n===ni?s="edit.php?page=edd-reports&view=sales&post_type=download&tab=logs&download="+i:n===ai&&(s="admin.php?page=wc-reports&tab=orders&report=sales_by_product&product_ids="+i),a=`${r}${s}`}return a};var oi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Gn.f.getTicketProvider(e,t);return{isDisabled:Gn.f.isTicketDisabled(e,t),provider:n,editTicketLink:ii(e,t,n),reportLink:si(e,t,n),showEcommerceOptions:ri(n)}}))(ti);n(427);const ci=e=>{let{moveTicket:t,removeTicket:n,isDisabled:a}=e;return wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--move-delete"},wp.element.createElement(Le.Button,{type:"button",onClick:t,disabled:a},Object(o.__)("Move Ticket","event-tickets")),wp.element.createElement(Le.Button,{type:"button",onClick:n,disabled:a},Object(o.__)("Remove Ticket","event-tickets")))};ci.propTypes={moveTicket:_.a.func.isRequired,removeTicket:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var di=ci;function li(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?li(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _i=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),ticketId:Gn.f.getTicketId(e,t)}),(e,t)=>({removeTicket:()=>{e(Gn.a.deleteTicket(t.clientId))},moveTicket:n=>e(Object(pt.c)(n,t.clientId))}),(e,t,n)=>ui(ui(ui(ui({},e),t),n),{},{moveTicket:()=>t.moveTicket(e.ticketId)})))(di);class mi extends i.Component{constructor(e){super(e),de()(this,"getHeader",()=>wp.element.createElement(i.Fragment,null,wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__advanced-options-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__advanced-options-header-text"},Object(o.__)("Advanced Options","event-tickets")))),de()(this,"getContent",()=>wp.element.createElement(i.Fragment,null,wp.element.createElement(Jr,{clientId:this.props.clientId}),wp.element.createElement(oi,{clientId:this.props.clientId}),this.props.hasBeenCreated&&wp.element.createElement(_i,{clientId:this.props.clientId}))),de()(this,"getRows",()=>[{accordionId:this.accordionId,content:this.getContent(),contentClassName:"tribe-editor__ticket__advanced-options-content",header:this.getHeader(),headerAttrs:{disabled:this.props.isDisabled},headerClassName:"tribe-editor__ticket__advanced-options-header"}]),this.accordionId=xe()()}render(){return wp.element.createElement(Le.Accordion,{className:"tribe-editor__ticket__advanced-options",rows:this.getRows()})}}de()(mi,"propTypes",{clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool});var pi=mi;var Ti=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t)})))(pi);n(428);class fi extends i.PureComponent{constructor(e){super(e),this.id=xe()("ticket-iac")}render(){const{iac:e,iacOptions:t,isDisabled:n,onChange:a}=this.props;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--iac-setting-description"},Object(o.__)("Select the default way to sell tickets. Enabling Individual Attendee Collection will allow purchasers to enter a name and email for each ticket.","event-tickets")),wp.element.createElement("div",{className:ue()("tribe-editor__ticket__iac-setting","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--iac-setting")},wp.element.createElement(_e.RadioControl,{className:"tribe-editor__ticket__iac-setting-input",id:this.id,type:"radio",selected:e,onChange:a,disabled:n,options:t})))}}de()(fi,"propTypes",{isDisabled:_.a.bool,onChange:_.a.func.isRequired,iac:_.a.string,iacOptions:_.a.arrayOf(_.a.shape({label:_.a.string,value:_.a.string}))});var hi=fi;var yi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),iac:Gn.f.getTicketTempIACSetting(e,t),iacOptions:$e.globals.iacVars().iacOptions}),(e,t)=>({onChange:n=>{const{clientId:a}=t;e(Gn.a.setTicketTempIACSetting(a,n)),e(Gn.a.setTicketHasChanges(a,!0))}})))(hi);class bi extends i.PureComponent{constructor(e){super(e),de()(this,"getHeader",()=>wp.element.createElement(i.Fragment,null,wp.element.createElement(_e.Dashicon,{className:"tribe-editor__ticket__attendee-collection-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__attendee-collection-header-text"},Object(o.__)("Attendee Collection","event-tickets")))),de()(this,"getContent",()=>wp.element.createElement(yi,{clientId:this.props.clientId})),de()(this,"getRows",()=>[{accordionId:this.accordionId,content:this.getContent(),contentClassName:"tribe-editor__ticket__attendee-collection-content",header:this.getHeader(),headerAttrs:{disabled:this.props.isDisabled},headerClassName:"tribe-editor__ticket__attendee-collection-header"}]),this.accordionId=xe()()}render(){return wp.element.createElement(Le.Accordion,{className:"tribe-editor__ticket__attendee-collection",rows:this.getRows()})}}de()(bi,"propTypes",{clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool});var Mi=bi;var Si=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t)})))(Mi);n(429);const Ei=Object(o.__)("+ Add","event-tickets"),gi=Object(o.__)("Edit","event-tickets"),ki=e=>{let{attendeeRegistrationURL:t,hasAttendeeInfoFields:n,isCreated:a,isDisabled:r,isModalOpen:i,onClick:s,onClose:c,onIframeLoad:d}=e;const l=n?gi:Ei;return wp.element.createElement(me.AttendeesRegistration,{helperText:Object(o.__)("Save your ticket to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:r,isModalOpen:i,label:Object(o.__)("Attendee Information","event-tickets"),linkText:l,modalTitle:Object(o.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:d,showHelperText:!a,shouldCloseOnClickOutside:!1})};ki.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var Di=ki;const Li=(e,t)=>`${$e.globals.adminUrl()}edit.php?post_type=${Object(oe.select)("core/editor").getCurrentPostType()}&page=attendee-registration&ticket_id=${Gn.f.getTicketId(e,t)}&tribe_events_modal=1`;var vi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>{const n=Gn.f.getTicketHasBeenCreated(e,t);return{attendeeRegistrationURL:Li(e,t),hasAttendeeInfoFields:Gn.f.getTicketHasAttendeeInfoFields(e,t),isCreated:n,isDisabled:Gn.f.isTicketDisabled(e,t)||!n,isModalOpen:Gn.f.getTicketIsModalOpen(e,t)}},(e,t)=>({onClick:()=>{e(Gn.a.setTicketIsModalOpen(t.clientId,!0))},onClose:n=>{n.target.classList.contains("components-modal__content")||e(Gn.a.setTicketIsModalOpen(t.clientId,!1)),"click"===n.type&&n.target.classList.contains("components-modal__screen-overlay")&&e(Gn.a.setTicketIsModalOpen(t.clientId,!1))},onIframeLoad:n=>{const a=n.contentWindow,r=()=>{n.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},i=a.document.querySelector("#event-tickets-attendee-information");i.addEventListener("submit",r);const s=()=>{a.removeEventListener("unload",s),i.removeEventListener("submit",r);const n=a.document.querySelector("#tribe-tickets-attendee-sortables"),o=Boolean(n.firstElementChild);e(Gn.a.setTicketHasAttendeeInfoFields(t.clientId,o)),e(Gn.a.setTicketIsModalOpen(t.clientId,!1))};a.addEventListener("unload",s);const o=a.document.querySelector(".tribe-intro > a");o&&o.setAttribute("target","_blank")}})))(Di);n(430);const Oi=e=>{let{clientId:t,hasTicketsPlus:n,hasIacVars:a}=e;return wp.element.createElement(i.Fragment,null,wp.element.createElement(Yr,{clientId:t}),wp.element.createElement(Gr,{clientId:t}),wp.element.createElement(Ti,{clientId:t}),n&&a&&wp.element.createElement(Si,{clientId:t}),n&&wp.element.createElement(vi,{clientId:t}))};Oi.propTypes={clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool};var ji=Oi;var Yi=Object(P.c)(Object(Ye.withStore)(),re(e=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),hasIacVars:!In()($e.globals.iacVars())})))(ji);const wi=e=>{let{isDisabled:t}=e;return t?wp.element.createElement(c.ClockInactive,null):wp.element.createElement(c.ClockActive,null)},Ii=e=>{let{isDisabled:t}=e;return t?wp.element.createElement(c.TicketInactive,null):wp.element.createElement(c.TicketActive,null)},Pi=e=>{let{isDisabled:t,isFuture:n,isPast:a}=e;return n||a?wp.element.createElement(wi,{isDisabled:t}):wp.element.createElement(Ii,{isDisabled:t})};Pi.propTypes={isDisabled:_.a.bool.isRequired,isFuture:_.a.bool,isPast:_.a.bool};const Ci=e=>{let{clientId:t,isDisabled:n,isFuture:a,isPast:r,isSelected:i}=e;return wp.element.createElement(me.ContainerPanel,{className:"tribe-editor__ticket__container",layout:pe.a.ticket,icon:wp.element.createElement(Pi,{isDisabled:n,isFuture:a,isPast:r}),header:wp.element.createElement(mr,{clientId:t,isSelected:i}),content:wp.element.createElement(Yi,{clientId:t})})};Ci.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,isFuture:_.a.bool,isPast:_.a.bool,isSelected:_.a.bool};var Ri=Ci;var Ai=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({isDisabled:Gn.f.isTicketDisabled(e,t),isFuture:Gn.f.isTicketFuture(e,t),isPast:Gn.f.isTicketPast(e,t)})))(Ri);n(431);const Hi=e=>e?Object(o.__)("Update Ticket","event-tickets"):Object(o.__)("Create Ticket","event-tickets"),Ni=Object(o.__)("Cancel","event-tickets"),xi=e=>{let{hasBeenCreated:t,isCancelDisabled:n,isConfirmDisabled:a,onCancelClick:r,onConfirmClick:i}=e;return wp.element.createElement(me.ActionDashboard,{className:"tribe-editor__ticket__dashboard",cancelLabel:Ni,confirmLabel:Hi(t),isCancelDisabled:n,isConfirmDisabled:a,onCancelClick:r,onConfirmClick:i})};xi.propTypes={hasBeenCreated:_.a.bool,isCancelDisabled:_.a.bool,isConfirmDisabled:_.a.bool,onCancelClick:_.a.func,onConfirmClick:_.a.func};var Vi=xi;const Fi=["state"];function Ki(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Wi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ki(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ki(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ui=(e,t)=>!Gn.f.isTicketValid(e,t)||!Gn.f.getTicketHasChanges(e,t)||Gn.f.isTicketDisabled(e,t)||Gn.f.getTicketHasDurationError(e,t),zi=(e,t,n)=>()=>{Gn.f.getTicketHasBeenCreated(e,n)?(t(Gn.a.setTicketTempDetails(n.clientId,{title:Gn.f.getTicketTitle(e,n),description:Gn.f.getTicketDescription(e,n),price:Gn.f.getTicketPrice(e,n),sku:Gn.f.getTicketSku(e,n),iac:Gn.f.getTicketIACSetting(e,n),startDate:Gn.f.getTicketStartDate(e,n),startDateInput:Gn.f.getTicketStartDateInput(e,n),startDateMoment:Gn.f.getTicketStartDateMoment(e,n),endDate:Gn.f.getTicketEndDate(e,n),endDateInput:Gn.f.getTicketEndDateInput(e,n),endDateMoment:Gn.f.getTicketEndDateMoment(e,n),startTime:Gn.f.getTicketStartTime(e,n),endTime:Gn.f.getTicketEndTime(e,n),startTimeInput:Gn.f.getTicketStartTimeInput(e,n),endTimeInput:Gn.f.getTicketEndTimeInput(e,n),capacityType:Gn.f.getTicketCapacityType(e,n),capacity:Gn.f.getTicketCapacity(e,n)})),t(Gn.a.setTicketsTempSharedCapacity(Gn.f.getTicketsSharedCapacity(e))),t(Gn.a.setTicketHasChanges(n.clientId,!1))):(t(Gn.a.removeTicketBlock(n.clientId)),Object(oe.dispatch)("core/editor").removeBlocks(n.clientId)),Object(oe.dispatch)("core/editor").clearSelectedBlock()},Gi=(e,t,n)=>()=>Gn.f.getTicketHasBeenCreated(e,n)?t(Gn.a.updateTicket(n.clientId)):t(Gn.a.createNewTicket(n.clientId));var Bi=Object(P.c)(Object(Ye.withStore)(),re((e,t)=>({hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t),isCancelDisabled:Gn.f.isTicketDisabled(e,t),isConfirmDisabled:Ui(e,t),state:e}),null,(e,t,n)=>{const{state:a}=e,r=ze()(e,Fi),{dispatch:i}=t;return Wi(Wi(Wi({},n),r),{},{onCancelClick:zi(a,i,n),onConfirmClick:Gi(a,i,n)})}))(Vi);class qi extends i.PureComponent{componentDidMount(){this.props.onBlockUpdate(this.props.isSelected)}componentDidUpdate(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}render(){const{clientId:e,hasTicketsPlus:t,isDisabled:n,isLoading:a,isSelected:r,isModalShowing:s,showTicket:o}=this.props;return o?wp.element.createElement(i.Fragment,null,wp.element.createElement("article",{className:ue()("tribe-editor__ticket",{"tribe-editor__ticket--disabled":n},{"tribe-editor__ticket--selected":r},{"tribe-editor__ticket--has-tickets-plus":t})},wp.element.createElement(Ai,{clientId:e,isSelected:r}),wp.element.createElement(Bi,{clientId:e,isSelected:r}),a&&wp.element.createElement(_e.Spinner,null)),s&&wp.element.createElement(En,null)):null}}de()(qi,"propTypes",{clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,isLoading:_.a.bool,isModalShowing:_.a.bool,isSelected:_.a.bool,onBlockUpdate:_.a.func,removeTicketBlock:_.a.func,showTicket:_.a.bool});var Ji=qi;function $i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Zi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$i(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Qi=(e,t)=>Gn.f.getTicketsIsSelected(e)||Gn.f.hasATicketSelected(e)||Gn.f.isTicketOnSale(e,t);var Xi=Object(P.c)(Object(Ye.withStore)({isolated:!0}),re((e,t)=>({hasTicketsPlus:Yt.plugins.selectors.hasPlugin(e)(Yt.plugins.constants.TICKETS_PLUS),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t),isDisabled:Gn.f.isTicketDisabled(e,t),isLoading:Gn.f.getTicketIsLoading(e,t),isModalShowing:Object(bn.l)(e),modalTicketId:Object(bn.e)(e),showTicket:Qi(e,t),ticketId:Gn.f.getTicketId(e,t)}),(e,t)=>{const{clientId:n}=t;return{onBlockUpdate:t=>e(Gn.a.setTicketIsSelected(n,t)),setInitialState:t=>{e(Gn.a.registerTicketBlock(n)),e(Gn.a.setTicketInitialState(t))}}},(e,t,n)=>Zi(Zi(Zi(Zi({},e),t),n),{},{isModalShowing:e.isModalShowing&&e.modalTicketId===e.ticketId})),Nn())(Ji);const{InnerBlocks:es}=wp.blockEditor;var ts={id:"tickets-item",title:Object(o.__)("Event Ticket","event-tickets"),description:Object(o.__)("A single configured ticket type.","event-tickets"),icon:wp.element.createElement(c.Tickets,null),category:"tribe-tickets",keywords:["event","event-tickets","tribe"],parent:["tribe/tickets"],supports:{html:!1,customClassName:!1},attributes:{hasBeenCreated:{type:"boolean",default:!1},ticketId:{type:"integer",default:0}},edit:Xi,save:()=>wp.element.createElement("div",null,wp.element.createElement(es.Content,null))},ns=n(39),as=n(71);n(432);const rs=Object(o.__)("Who's Attending?","event-tickets"),is=Object(o.__)("(X) people are attending this event","event-tickets"),ss=()=>wp.element.createElement("div",{className:"tribe-editor__event-attendees__gravatars"},wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null),wp.element.createElement(c.AttendeesGravatar,null)),os=()=>wp.element.createElement("div",{className:"tribe-editor__event-attendees__subtitle"},wp.element.createElement("p",null,is)),cs=e=>{const{isSelected:t,title:n,displayTitle:a,displaySubtitle:r}=e,i=t||n?(e=>{let{isSelected:t,isEmpty:n,title:a,setTitle:r}=e;const i=ue()({"tribe-editor__event-attendees__title":!0,"tribe-editor__event-attendees__title--selected":t}),s=ue()({"tribe-editor__event-attendees__title-text":!0,"tribe-editor__event-attendees__title-text--empty":n&&t});return wp.element.createElement("div",{key:"tribe-events-attendees-label",className:i},wp.element.createElement(Za.a,{id:"tribe-events-attendees-link",className:s,value:a,placeholder:rs,onChange:r}))})(e):wp.element.createElement("span",{className:ue()(["tribe-editor__event-attendees__title","tribe-editor__event-attendees__title--placeholder"])},rs);return wp.element.createElement("div",{className:"tribe-editor__block tribe-editor__event-attendees"},a?i:"",r?wp.element.createElement(os,null):"",wp.element.createElement(ss,null))},ds=e=>{let{isSelected:t,displayTitle:n,displaySubtitle:a,onSetDisplayTitleChange:r,onSetDisplaySubtitleChange:i}=e;return t&&wp.element.createElement(wa.InspectorControls,{key:"inspector"},wp.element.createElement(_e.PanelBody,{title:Object(o.__)("Attendees Settings","event-tickets")},wp.element.createElement(_e.ToggleControl,{label:Object(o.__)("Display Title","event-tickets"),checked:n,onChange:r}),wp.element.createElement(_e.ToggleControl,{label:Object(o.__)("Display Subtitle","event-tickets"),checked:a,onChange:i})))},ls=e=>wp.element.createElement(i.Fragment,null,wp.element.createElement(cs,e),wp.element.createElement(ds,e));ls.propTypes={setTitle:_.a.func,title:_.a.string,isSelected:_.a.bool,isEmpty:_.a.bool,displayTitle:_.a.bool,displaySubtitle:_.a.bool,onSetDisplaySubtitleChange:_.a.func,onSetDisplayTitleChange:_.a.func};var us=ls;var _s=Object(P.c)(Object(Ye.withStore)(),re(e=>({title:as.c(e),displayTitle:as.b(e),displaySubtitle:as.a(e)}),e=>({setInitialState:t=>e(ns.c(t)),setTitle:t=>e(ns.d(t.target.value)),onSetDisplayTitleChange:t=>e(ns.b(t)),onSetDisplaySubtitleChange:t=>e(ns.a(t))})),Nn())(us);const ms=[Wn,Wa,ts,{id:"attendees",title:Object(o.__)("Attendee List","event-tickets"),description:Object(o.__)("Show the gravatars of people coming to this event.","event-tickets"),icon:wp.element.createElement(c.Attendees,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,customClassName:!1},attributes:{title:{type:"html",default:Object(o.__)("Who's Attending?","event-tickets")},displayTitle:{type:"boolean",default:!0},displaySubtitle:{type:"boolean",default:!0}},edit:_s,save:()=>null}];ms.forEach(e=>Object(a.registerBlockType)("tribe/"+e.id,e)),Object(r.initStore)();t.default=ms}]);
|
src/resources/js/tickets.js
CHANGED
@@ -635,6 +635,7 @@ var ticketHeaderImage = window.ticketHeaderImage || {};
|
|
635 |
/* "Save Ticket" button action */
|
636 |
$document.on( 'click.tribe', '[name="ticket_form_save"]', function( e ) {
|
637 |
var $form = $( document.getElementById( 'ticket_form_table' ) );
|
|
|
638 |
|
639 |
// Makes sure we have validation
|
640 |
$form.trigger( 'validation.tribe' );
|
@@ -644,6 +645,14 @@ var ticketHeaderImage = window.ticketHeaderImage || {};
|
|
644 |
return;
|
645 |
}
|
646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
$tribe_tickets.trigger( 'pre-save-ticket.tribe', e );
|
648 |
|
649 |
var $orders = $base_panel.find( '.tribe-ticket-field-order' );
|
635 |
/* "Save Ticket" button action */
|
636 |
$document.on( 'click.tribe', '[name="ticket_form_save"]', function( e ) {
|
637 |
var $form = $( document.getElementById( 'ticket_form_table' ) );
|
638 |
+
var additionalValidation = true;
|
639 |
|
640 |
// Makes sure we have validation
|
641 |
$form.trigger( 'validation.tribe' );
|
645 |
return;
|
646 |
}
|
647 |
|
648 |
+
// setting triggerHandler as a variable is needed to return a new value of additionalValidation if needed.
|
649 |
+
additionalValidation = $tribe_tickets.triggerHandler( 'additionalValidation.tribe', [ additionalValidation ] );
|
650 |
+
|
651 |
+
// prevent form submission if trigger above returns false
|
652 |
+
if ( additionalValidation === false ) {
|
653 |
+
return;
|
654 |
+
}
|
655 |
+
|
656 |
$tribe_tickets.trigger( 'pre-save-ticket.tribe', e );
|
657 |
|
658 |
var $orders = $base_panel.find( '.tribe-ticket-field-order' );
|
src/resources/js/tickets.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
void 0===tribe.tickets&&(tribe.tickets={}),"undefined"==typeof ajaxurl&&(ajaxurl=TribeTickets.ajaxurl),tribe.tickets.editor={};var ticketHeaderImage=window.ticketHeaderImage||{};!function(e,t,i,n){"use strict";var a=t(document),r=t(document.getElementById("tribetickets"));const c="#rsvp_form_toggle, #ticket_form_toggle, #settings_form_toggle",d=document.body.classList.contains("tec-no-tickets-on-recurring");if(0===r.length)return;var o=t(document.getElementById("event_tickets")),s=t(document.getElementById("post_ID")),l=t(document.getElementById("publish")),_=r.find(".tribe-tickets-editor-blocker"),p=r.find(".spinner"),u=t(document.getElementById("tribe_panel_base")),f=t(document.getElementById("tribe_panel_edit")),m=t(document.getElementById("tribe_panel_settings")),k=["yy-mm-dd","m/d/yy","mm/dd/yy","d/m/yy","dd/mm/yy","m-d-yy","mm-dd-yy","d-m-yy","dd-mm-yy","yy.mm.dd","mm.dd.yy","dd.mm.yy"],b=k[0];n.beforeUnload=function(e){var t=!1;return"true"===u.attr("aria-hidden")&&(t=tribe_global_stock_admin_ui.nav_away_msg),e.returnValue=t,t},ticketHeaderImage={uploader:function(){var e=wp.media({title:HeaderImageData.title,multiple:!1,library:{type:"image"},button:{text:HeaderImageData.button}});return e.on("close",function(){var t=e.state().get("selection").toJSON();t.length&&ticketHeaderImage.render(t[0])}),e.open(),!1},render:function(e){t(document.getElementById("tribe_ticket_header_preview")).html(ticketHeaderImage.imgHTML(e)),t(document.getElementById("tribe_ticket_header_image_id")).val(e.id),t(document.getElementById("tribe_ticket_header_remove")).show(),t(document.getElementById("tribe_tickets_image_preview_filename")).show().find(".filename").text(e.filename)},imgHTML:function(e){var t='<img src="'+e.url+'" ';return t+='width="'+e.width+'" ',t+='height="'+e.height+'" ',t+="/>"}},n.panels={list:"#tribe_panel_base",ticket:"#tribe_panel_edit",settings:"#tribe_panel_settings"},n.swapPanel=function(i){var c;c=i instanceof jQuery?i:void 0!==n.panels[i]?t(n.panels[i]):u;var d=t("#event_tickets");d.trigger("before_panel_swap.tickets",{panel:c}),r.find(".ticket_panel").each(function(){t(this).attr("aria-hidden","true")}),c.attr("aria-hidden","false"),c.is(u)?(t(e).off("beforeunload.tribe"),a.trigger("tribe.dependencies-run")):t(e).on("beforeunload.tribe",n.beforeUnload),d.trigger("after_panel_swap.tickets",{panel:c})},n.fetchPanels=function(e,i){void 0===e&&(e=[]);var a={action:"tribe-ticket-panels",notice:!1,post_id:s.val(),nonce:TribeTickets.add_ticket_nonce,data:e,is_admin:t("body").hasClass("wp-admin")};t.post(ajaxurl,a,function(e){e.success&&n.refreshPanels(e.data,i)},"json")},n.startWatchingMoveLinkIn=function(){o.find(".tribe-ticket-move-link").one("click",function(){e.setTimeout(n.listentToThickboxEvents,250)})},n.listentToThickboxEvents=function(){var e=t("#TB_window");0!==e.length&&e.one("tb_unload",function(){n.fetchPanels(null,"list")})},n.refreshPanels=function(e,i){u=t(e.list),f=t(e.ticket),m=t(e.settings),r.find(n.panels.list).replaceWith(u),r.find(n.panels.ticket).replaceWith(f),r.find(n.panels.settings).replaceWith(m),n.setupPanels(),n.swapPanel(i),t(".tribe-dependency").trigger("verify.dependency")},n.setupPanels=function(){e.MTAccordion({target:".accordion"});var i=t(document.getElementById("tribe-event-datepickers")),n=t(document.getElementById("ticket_start_date")),a=t(document.getElementById("ticket_end_date"));t(document.getElementById("ticket_start_time")),t(document.getElementById("ticket_end_time"));if("undefined"==typeof tribe_datepicker_opts){var c=t("[data-datepicker_format]"),d=c.length?c.attr("data-datepicker_format"):"",o=parseInt(d,10);isNaN(o)||(e.tribe_datepicker_opts={dateFormat:k[o]})}var s,l=e.tribe_datepicker_opts||{};if(i.length&&i.data("startofweek"),"undefined"!=typeof tribe_ticket_datepicker_format){var _=(s=tribe_ticket_datepicker_format.datepicker_format_index,!isNaN(parseFloat(s))&&isFinite(s)?tribe_ticket_datepicker_format.datepicker_format_index:0);b=k[_]}else l&&l.dateFormat&&(b=l.dateFormat);var p={dateFormat:b,showAnim:"fadeIn",changeMonth:!0,changeYear:!0,numberOfMonths:3,showButtonPanel:!1,onChange:function(){},beforeShow:function(e,i){i.input.data("prevDate",i.input.datepicker("getDate"));var n=t(i.dpDiv);n.addClass("tribe-ui-datepicker"),n.attrchange({trackValues:!0,callback:function(e){(e.newValue.indexOf("display: none")>=0||e.newValue.indexOf("display:none")>=0)&&n.removeClass("tribe-ui-datepicker")}})},onSelect:function(e,i){var r=t.datepicker.parseDate(b,e);"ticket_start_date"===i.id?a.datepicker("option","minDate",r):n.datepicker("option","maxDate",r)}};t.extend(p,tribe_l10n_datatables.datepicker);var f=r.find(".tribe-timepicker:not(.ui-timepicker-input)");if(tribe_timepickers.setup_timepickers(f),n.datepicker(p).datepicker("option","defaultDate",t(document.getElementById("EventStartDate")).val()).on("keyup",function(e){8!==e.keyCode&&46!==e.keyCode||t.datepicker._clearDate(this)}),a.datepicker(p).datepicker("option","defaultDate",t(document.getElementById("EventEndDate")).val()).on("keyup",function(e){8!==e.keyCode&&46!==e.keyCode||t.datepicker._clearDate(this)}),t(document.getElementById("tribe_ticket_header_preview")).find("img").length){t(document.getElementById("tribe_ticket_header_remove")).show();var m=t(document.getElementById("tribe_ticket_header_preview")).find("img");m.removeAttr("width").removeAttr("height"),r.width()<m.width()&&m.css("width","95%")}"undefined"!=typeof tribe_event_tickets_plus&&t.isPlainObject(tribe_event_tickets_plus)&&t.isPlainObject(tribe_event_tickets_plus.meta)&&t.isPlainObject(tribe_event_tickets_plus.meta.admin)&&"function"==typeof tribe_event_tickets_plus.meta.admin.init_ticket_fields&&tribe_event_tickets_plus.meta.admin.init_ticket_fields(),tribe.tickets.table&&0!==u.find(".tribe-tickets-editor-table-tickets-body tr").length&&tribe.tickets.table.toggle_sortable(),r.find(tribe.validation.selectors.item).validation(),r.find(".tribe-dependent").dependency(),r.find(".tribe-dependency").trigger("verify.dependency")},a.ajaxSend(function(e,i,n){"string"===t.type(n.data)&&-1!==n.data.indexOf("action=tribe-ticket")&&r.trigger("spin.tribe","start")}),a.ajaxComplete(function(e,i,n){"string"===t.type(n.data)&&-1!==n.data.indexOf("action=tribe-ticket")&&r.trigger("spin.tribe","stop")}),a.on({"spin.tribe":function(e,i){(void 0===i||t.inArray(i,["start","stop"]))&&(i="stop"),"stop"===i?(_.hide(),p.removeClass("is-active")):(_.show(),p.addClass("is-active"))}}),l.on("click",function(i){t(e).off("beforeunload.tribe")}),a.on("click","#settings_form_toggle",function(e){return e.preventDefault(),n.fetchPanels(null,"settings"),!1}),a.on("click","#tribe_settings_form_cancel, #ticket_form_cancel",function(e){return e.preventDefault(),n.fetchPanels(null,"list"),!1}),a.on("click","#tribe_settings_form_save",function(e){e.preventDefault();var t=m.find("input,textarea").serialize();return n.fetchPanels(t,"list"),!1}),a.on("click",".ticket_form_toggle",function(e){return e.preventDefault(),function(e){void 0===e&&(e=!0);var i,n=r.find(".tribe-ticket-editor-field-default_provider");n.is(":radio")&&(n=n.filter(":checked")),i=e?"Tribe__Tickets__RSVP_radio":"Tribe__Tickets_Plus__Commerce__WooCommerce__Main_radio",!e&&n.length>0&&(i=n.val()+"_radio"),t(document.getElementById(i)).prop("checked",!0).trigger("change")}("rsvp_form_toggle"===t(this).attr("id")),f.find(".tribe-dependency").trigger("verify.dependency"),n.swapPanel("ticket"),!1}),a.on("click",".ticket_edit_button",function(e){e.preventDefault();var i=t(this),a={action:"tribe-ticket-edit",post_id:s.val(),ticket_id:i.data("ticketId"),nonce:TribeTickets.edit_ticket_nonce,is_admin:t("body").hasClass("wp-admin")};return t.post(ajaxurl,a,function(t){t.success&&(n.refreshPanels(t.data,"ticket"),n.startWatchingMoveLinkIn("#event_tickets"),r.trigger("edit-ticket.tribe",e))},"json"),!1}),a.on("click.tribe",'[name="ticket_form_save"]',function(e){var i=t(document.getElementById("ticket_form_table"));if(i.trigger("validation.tribe"),!tribe.validation.hasErrors(i)){r.trigger("pre-save-ticket.tribe",e);var a=u.find(".tribe-ticket-field-order"),c={action:"tribe-ticket-add",data:f.find("input,textarea,select").serialize().replace(/\'/g,"%27").replace(/\:/g,"%3A"),post_id:s.val(),nonce:TribeTickets.add_ticket_nonce,menu_order:a.length,is_admin:t("body").hasClass("wp-admin")};t.post(ajaxurl,c,function(e){e.success&&n.refreshPanels(e.data)},"json")}}),a.on("click",".ticket_delete",function(e){if(!confirm(tribe_ticket_notices.confirm_alert))return!1;e.preventDefault(),r.trigger("delete-ticket.tribe",e);var i=t(this).attr("attr-ticket-id"),a={action:"tribe-ticket-delete",post_id:s.val(),ticket_id:i,nonce:TribeTickets.remove_ticket_nonce,is_admin:t("body").hasClass("wp-admin")};t.post(ajaxurl,a,function(e){e.success&&n.refreshPanels(e.data)},"json")}),a.on("click",".ticket_duplicate",function(e){e.preventDefault();var i=t(this),a={action:"tribe-ticket-duplicate",post_id:s.val(),ticket_id:i.data("ticketId"),nonce:TribeTickets.duplicate_ticket_nonce,is_admin:t("body").hasClass("wp-admin")};return t.post(ajaxurl,a,function(e){e.success&&n.refreshPanels(e.data)},"json"),!1}),a.on("change",".tribe-ticket-field-capacity",function(e){var i=t(this),n=i.parents(".input_block").eq(0).find(".tribe-ticket-field-mode");i.val()&&n.val("capped")}),a.on("keyup","#ticket_price",function(e){e.preventDefault();var i=price_format.decimal,n=new RegExp("[^-0-9%\\"+i+"]+","gi"),a=t(this).val(),r=a.replace(n,"");a!==r&&t(this).val(r)}),a.on("click","#tribe_ticket_header_image, #tribe_ticket_header_preview",function(e){e.preventDefault(),ticketHeaderImage.uploader("","")}),a.on("focus","#settings_global_capacity_edit",function(){var e=t(this),i=0;t(".tribe-tickets-editor-capacity-table").find("[data-capacity]").each(function(){var e=t(this);i+=parseInt(e.data("capacity"),10)}),e.data("nonSharedCapacity",i)}),a.on("blur change","#settings_global_capacity_edit",function(){var e=t(".tribe-tickets-editor-table-row-capacity-total");if(-1!==parseInt(e.data("totalCapacity"),10)){var n=t(this),a=e.find(".tribe-tickets-editor-total-capacity"),r=parseInt(n.val(),10),c=n.data("nonSharedCapacity");(""===r||0>r||i.isNaN(r))&&(r=0);var d=c+r;a.text(d)}}),a.on("click","#global_capacity_edit_button",function(e){e.preventDefault(),t(document.getElementById("settings_global_capacity_edit")).prop("disabled",!1).focus()}),a.on("blur",'[name="tribe-ticket[event_capacity]"]',function(e,i){void 0===i&&(i=t(this).val());if(void 0!==i){i||(i=0),i=parseInt(i,10);var n=t(".tribe-ticket-capacity-max").find(".tribe-ticket-capacity-value"),a=t('.tribe-ticket-field-capacity[name="tribe-ticket[capacity]"]');a.attr("placeholder",i),i?a.attr("max",i):i=0,n.text(i)}}),a.on("change",'[name="tribe-ticket[capacity]"]',function(e){var i=t(this),n=parseInt(i.attr("max"),10),a=parseInt(i.val(),10);n&&n<a&&i.val(n)}),d&&(a.on("tribe-recurrence-active",function(e){t(c).hide(),t(c).parent().find(".ticket-editor-notice").show()}),a.on("tribe-recurrence-inactive",function(e){t(c).show(),t(c).parent().find(".ticket-editor-notice").hide()}),a.on("tribe-tickets-active",function(e){t(".recurrence-row").hide(),t(".recurrence-row.tribe-recurrence-not-supported").css("visibility","visible").show()}),a.on("tribe-tickets-inactive",function(e){t(".recurrence-row").show(),t(".recurrence-row.tribe-recurrence-not-supported").hide()})),a.on("click","#tribe_ticket_header_remove",function(e){e.preventDefault(),t(document.getElementById("tribe_ticket_header_preview")).html(""),t(document.getElementById("tribe_ticket_header_remove")).hide(),t(document.getElementById("tribe_tickets_image_preview_filename")).hide().find(".filename").text(""),t(document.getElementById("tribe_ticket_header_image_id")).val("")}),a.on("after_panel_swap.tickets",function(){a.trigger("tribe-tickets-active")}),a.on("verify.dependency",function(){t(".tribe-tickets-editor-table-tickets-body").is(":visible")?a.trigger("tribe-tickets-active"):a.trigger("tribe-tickets-inactive"),t(".tribe-event-recurrence-rule").is(":visible")?a.trigger("tribe-recurrence-active"):a.trigger("tribe-recurrence-inactive")}),t(n.setupPanels)}(window,jQuery,_,tribe.tickets.editor);
|
1 |
+
void 0===tribe.tickets&&(tribe.tickets={}),"undefined"==typeof ajaxurl&&(ajaxurl=TribeTickets.ajaxurl),tribe.tickets.editor={};var ticketHeaderImage=window.ticketHeaderImage||{};!function(e,t,i,n){"use strict";var a=t(document),r=t(document.getElementById("tribetickets"));const c="#rsvp_form_toggle, #ticket_form_toggle, #settings_form_toggle",d=document.body.classList.contains("tec-no-tickets-on-recurring");if(0===r.length)return;var o=t(document.getElementById("event_tickets")),s=t(document.getElementById("post_ID")),l=t(document.getElementById("publish")),_=r.find(".tribe-tickets-editor-blocker"),p=r.find(".spinner"),u=t(document.getElementById("tribe_panel_base")),f=t(document.getElementById("tribe_panel_edit")),m=t(document.getElementById("tribe_panel_settings")),k=["yy-mm-dd","m/d/yy","mm/dd/yy","d/m/yy","dd/mm/yy","m-d-yy","mm-dd-yy","d-m-yy","dd-mm-yy","yy.mm.dd","mm.dd.yy","dd.mm.yy"],b=k[0];n.beforeUnload=function(e){var t=!1;return"true"===u.attr("aria-hidden")&&(t=tribe_global_stock_admin_ui.nav_away_msg),e.returnValue=t,t},ticketHeaderImage={uploader:function(){var e=wp.media({title:HeaderImageData.title,multiple:!1,library:{type:"image"},button:{text:HeaderImageData.button}});return e.on("close",function(){var t=e.state().get("selection").toJSON();t.length&&ticketHeaderImage.render(t[0])}),e.open(),!1},render:function(e){t(document.getElementById("tribe_ticket_header_preview")).html(ticketHeaderImage.imgHTML(e)),t(document.getElementById("tribe_ticket_header_image_id")).val(e.id),t(document.getElementById("tribe_ticket_header_remove")).show(),t(document.getElementById("tribe_tickets_image_preview_filename")).show().find(".filename").text(e.filename)},imgHTML:function(e){var t='<img src="'+e.url+'" ';return t+='width="'+e.width+'" ',t+='height="'+e.height+'" ',t+="/>"}},n.panels={list:"#tribe_panel_base",ticket:"#tribe_panel_edit",settings:"#tribe_panel_settings"},n.swapPanel=function(i){var c;c=i instanceof jQuery?i:void 0!==n.panels[i]?t(n.panels[i]):u;var d=t("#event_tickets");d.trigger("before_panel_swap.tickets",{panel:c}),r.find(".ticket_panel").each(function(){t(this).attr("aria-hidden","true")}),c.attr("aria-hidden","false"),c.is(u)?(t(e).off("beforeunload.tribe"),a.trigger("tribe.dependencies-run")):t(e).on("beforeunload.tribe",n.beforeUnload),d.trigger("after_panel_swap.tickets",{panel:c})},n.fetchPanels=function(e,i){void 0===e&&(e=[]);var a={action:"tribe-ticket-panels",notice:!1,post_id:s.val(),nonce:TribeTickets.add_ticket_nonce,data:e,is_admin:t("body").hasClass("wp-admin")};t.post(ajaxurl,a,function(e){e.success&&n.refreshPanels(e.data,i)},"json")},n.startWatchingMoveLinkIn=function(){o.find(".tribe-ticket-move-link").one("click",function(){e.setTimeout(n.listentToThickboxEvents,250)})},n.listentToThickboxEvents=function(){var e=t("#TB_window");0!==e.length&&e.one("tb_unload",function(){n.fetchPanels(null,"list")})},n.refreshPanels=function(e,i){u=t(e.list),f=t(e.ticket),m=t(e.settings),r.find(n.panels.list).replaceWith(u),r.find(n.panels.ticket).replaceWith(f),r.find(n.panels.settings).replaceWith(m),n.setupPanels(),n.swapPanel(i),t(".tribe-dependency").trigger("verify.dependency")},n.setupPanels=function(){e.MTAccordion({target:".accordion"});var i=t(document.getElementById("tribe-event-datepickers")),n=t(document.getElementById("ticket_start_date")),a=t(document.getElementById("ticket_end_date"));t(document.getElementById("ticket_start_time")),t(document.getElementById("ticket_end_time"));if("undefined"==typeof tribe_datepicker_opts){var c=t("[data-datepicker_format]"),d=c.length?c.attr("data-datepicker_format"):"",o=parseInt(d,10);isNaN(o)||(e.tribe_datepicker_opts={dateFormat:k[o]})}var s,l=e.tribe_datepicker_opts||{};if(i.length&&i.data("startofweek"),"undefined"!=typeof tribe_ticket_datepicker_format){var _=(s=tribe_ticket_datepicker_format.datepicker_format_index,!isNaN(parseFloat(s))&&isFinite(s)?tribe_ticket_datepicker_format.datepicker_format_index:0);b=k[_]}else l&&l.dateFormat&&(b=l.dateFormat);var p={dateFormat:b,showAnim:"fadeIn",changeMonth:!0,changeYear:!0,numberOfMonths:3,showButtonPanel:!1,onChange:function(){},beforeShow:function(e,i){i.input.data("prevDate",i.input.datepicker("getDate"));var n=t(i.dpDiv);n.addClass("tribe-ui-datepicker"),n.attrchange({trackValues:!0,callback:function(e){(e.newValue.indexOf("display: none")>=0||e.newValue.indexOf("display:none")>=0)&&n.removeClass("tribe-ui-datepicker")}})},onSelect:function(e,i){var r=t.datepicker.parseDate(b,e);"ticket_start_date"===i.id?a.datepicker("option","minDate",r):n.datepicker("option","maxDate",r)}};t.extend(p,tribe_l10n_datatables.datepicker);var f=r.find(".tribe-timepicker:not(.ui-timepicker-input)");if(tribe_timepickers.setup_timepickers(f),n.datepicker(p).datepicker("option","defaultDate",t(document.getElementById("EventStartDate")).val()).on("keyup",function(e){8!==e.keyCode&&46!==e.keyCode||t.datepicker._clearDate(this)}),a.datepicker(p).datepicker("option","defaultDate",t(document.getElementById("EventEndDate")).val()).on("keyup",function(e){8!==e.keyCode&&46!==e.keyCode||t.datepicker._clearDate(this)}),t(document.getElementById("tribe_ticket_header_preview")).find("img").length){t(document.getElementById("tribe_ticket_header_remove")).show();var m=t(document.getElementById("tribe_ticket_header_preview")).find("img");m.removeAttr("width").removeAttr("height"),r.width()<m.width()&&m.css("width","95%")}"undefined"!=typeof tribe_event_tickets_plus&&t.isPlainObject(tribe_event_tickets_plus)&&t.isPlainObject(tribe_event_tickets_plus.meta)&&t.isPlainObject(tribe_event_tickets_plus.meta.admin)&&"function"==typeof tribe_event_tickets_plus.meta.admin.init_ticket_fields&&tribe_event_tickets_plus.meta.admin.init_ticket_fields(),tribe.tickets.table&&0!==u.find(".tribe-tickets-editor-table-tickets-body tr").length&&tribe.tickets.table.toggle_sortable(),r.find(tribe.validation.selectors.item).validation(),r.find(".tribe-dependent").dependency(),r.find(".tribe-dependency").trigger("verify.dependency")},a.ajaxSend(function(e,i,n){"string"===t.type(n.data)&&-1!==n.data.indexOf("action=tribe-ticket")&&r.trigger("spin.tribe","start")}),a.ajaxComplete(function(e,i,n){"string"===t.type(n.data)&&-1!==n.data.indexOf("action=tribe-ticket")&&r.trigger("spin.tribe","stop")}),a.on({"spin.tribe":function(e,i){(void 0===i||t.inArray(i,["start","stop"]))&&(i="stop"),"stop"===i?(_.hide(),p.removeClass("is-active")):(_.show(),p.addClass("is-active"))}}),l.on("click",function(i){t(e).off("beforeunload.tribe")}),a.on("click","#settings_form_toggle",function(e){return e.preventDefault(),n.fetchPanels(null,"settings"),!1}),a.on("click","#tribe_settings_form_cancel, #ticket_form_cancel",function(e){return e.preventDefault(),n.fetchPanels(null,"list"),!1}),a.on("click","#tribe_settings_form_save",function(e){e.preventDefault();var t=m.find("input,textarea").serialize();return n.fetchPanels(t,"list"),!1}),a.on("click",".ticket_form_toggle",function(e){return e.preventDefault(),function(e){void 0===e&&(e=!0);var i,n=r.find(".tribe-ticket-editor-field-default_provider");n.is(":radio")&&(n=n.filter(":checked")),i=e?"Tribe__Tickets__RSVP_radio":"Tribe__Tickets_Plus__Commerce__WooCommerce__Main_radio",!e&&n.length>0&&(i=n.val()+"_radio"),t(document.getElementById(i)).prop("checked",!0).trigger("change")}("rsvp_form_toggle"===t(this).attr("id")),f.find(".tribe-dependency").trigger("verify.dependency"),n.swapPanel("ticket"),!1}),a.on("click",".ticket_edit_button",function(e){e.preventDefault();var i=t(this),a={action:"tribe-ticket-edit",post_id:s.val(),ticket_id:i.data("ticketId"),nonce:TribeTickets.edit_ticket_nonce,is_admin:t("body").hasClass("wp-admin")};return t.post(ajaxurl,a,function(t){t.success&&(n.refreshPanels(t.data,"ticket"),n.startWatchingMoveLinkIn("#event_tickets"),r.trigger("edit-ticket.tribe",e))},"json"),!1}),a.on("click.tribe",'[name="ticket_form_save"]',function(e){var i=t(document.getElementById("ticket_form_table")),a=!0;if(i.trigger("validation.tribe"),!tribe.validation.hasErrors(i)&&!1!==(a=r.triggerHandler("additionalValidation.tribe",[a]))){r.trigger("pre-save-ticket.tribe",e);var c=u.find(".tribe-ticket-field-order"),d={action:"tribe-ticket-add",data:f.find("input,textarea,select").serialize().replace(/\'/g,"%27").replace(/\:/g,"%3A"),post_id:s.val(),nonce:TribeTickets.add_ticket_nonce,menu_order:c.length,is_admin:t("body").hasClass("wp-admin")};t.post(ajaxurl,d,function(e){e.success&&n.refreshPanels(e.data)},"json")}}),a.on("click",".ticket_delete",function(e){if(!confirm(tribe_ticket_notices.confirm_alert))return!1;e.preventDefault(),r.trigger("delete-ticket.tribe",e);var i=t(this).attr("attr-ticket-id"),a={action:"tribe-ticket-delete",post_id:s.val(),ticket_id:i,nonce:TribeTickets.remove_ticket_nonce,is_admin:t("body").hasClass("wp-admin")};t.post(ajaxurl,a,function(e){e.success&&n.refreshPanels(e.data)},"json")}),a.on("click",".ticket_duplicate",function(e){e.preventDefault();var i=t(this),a={action:"tribe-ticket-duplicate",post_id:s.val(),ticket_id:i.data("ticketId"),nonce:TribeTickets.duplicate_ticket_nonce,is_admin:t("body").hasClass("wp-admin")};return t.post(ajaxurl,a,function(e){e.success&&n.refreshPanels(e.data)},"json"),!1}),a.on("change",".tribe-ticket-field-capacity",function(e){var i=t(this),n=i.parents(".input_block").eq(0).find(".tribe-ticket-field-mode");i.val()&&n.val("capped")}),a.on("keyup","#ticket_price",function(e){e.preventDefault();var i=price_format.decimal,n=new RegExp("[^-0-9%\\"+i+"]+","gi"),a=t(this).val(),r=a.replace(n,"");a!==r&&t(this).val(r)}),a.on("click","#tribe_ticket_header_image, #tribe_ticket_header_preview",function(e){e.preventDefault(),ticketHeaderImage.uploader("","")}),a.on("focus","#settings_global_capacity_edit",function(){var e=t(this),i=0;t(".tribe-tickets-editor-capacity-table").find("[data-capacity]").each(function(){var e=t(this);i+=parseInt(e.data("capacity"),10)}),e.data("nonSharedCapacity",i)}),a.on("blur change","#settings_global_capacity_edit",function(){var e=t(".tribe-tickets-editor-table-row-capacity-total");if(-1!==parseInt(e.data("totalCapacity"),10)){var n=t(this),a=e.find(".tribe-tickets-editor-total-capacity"),r=parseInt(n.val(),10),c=n.data("nonSharedCapacity");(""===r||0>r||i.isNaN(r))&&(r=0);var d=c+r;a.text(d)}}),a.on("click","#global_capacity_edit_button",function(e){e.preventDefault(),t(document.getElementById("settings_global_capacity_edit")).prop("disabled",!1).focus()}),a.on("blur",'[name="tribe-ticket[event_capacity]"]',function(e,i){void 0===i&&(i=t(this).val());if(void 0!==i){i||(i=0),i=parseInt(i,10);var n=t(".tribe-ticket-capacity-max").find(".tribe-ticket-capacity-value"),a=t('.tribe-ticket-field-capacity[name="tribe-ticket[capacity]"]');a.attr("placeholder",i),i?a.attr("max",i):i=0,n.text(i)}}),a.on("change",'[name="tribe-ticket[capacity]"]',function(e){var i=t(this),n=parseInt(i.attr("max"),10),a=parseInt(i.val(),10);n&&n<a&&i.val(n)}),d&&(a.on("tribe-recurrence-active",function(e){t(c).hide(),t(c).parent().find(".ticket-editor-notice").show()}),a.on("tribe-recurrence-inactive",function(e){t(c).show(),t(c).parent().find(".ticket-editor-notice").hide()}),a.on("tribe-tickets-active",function(e){t(".recurrence-row").hide(),t(".recurrence-row.tribe-recurrence-not-supported").css("visibility","visible").show()}),a.on("tribe-tickets-inactive",function(e){t(".recurrence-row").show(),t(".recurrence-row.tribe-recurrence-not-supported").hide()})),a.on("click","#tribe_ticket_header_remove",function(e){e.preventDefault(),t(document.getElementById("tribe_ticket_header_preview")).html(""),t(document.getElementById("tribe_ticket_header_remove")).hide(),t(document.getElementById("tribe_tickets_image_preview_filename")).hide().find(".filename").text(""),t(document.getElementById("tribe_ticket_header_image_id")).val("")}),a.on("after_panel_swap.tickets",function(){a.trigger("tribe-tickets-active")}),a.on("verify.dependency",function(){t(".tribe-tickets-editor-table-tickets-body").is(":visible")?a.trigger("tribe-tickets-active"):a.trigger("tribe-tickets-inactive"),t(".tribe-event-recurrence-rule").is(":visible")?a.trigger("tribe-recurrence-active"):a.trigger("tribe-recurrence-inactive")}),t(n.setupPanels)}(window,jQuery,_,tribe.tickets.editor);
|
src/resources/js/v2/rsvp-ari.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
-
*
|
6 |
-
* @type {Object}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
@@ -12,8 +11,7 @@ tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
|
12 |
* Configures RSVP ARI Object in the Global Tribe variable
|
13 |
*
|
14 |
* @since 5.0.0
|
15 |
-
*
|
16 |
-
* @type {Object}
|
17 |
*/
|
18 |
tribe.tickets.rsvp.ari = {};
|
19 |
|
@@ -21,22 +19,18 @@ tribe.tickets.rsvp.ari = {};
|
|
21 |
* Initializes in a Strict env the code that manages the RSVP ARI.
|
22 |
*
|
23 |
* @since 5.0.0
|
24 |
-
*
|
25 |
-
* @param {
|
26 |
-
* @param {Object} obj tribe.tickets.rsvp.ari
|
27 |
-
*
|
28 |
* @return {void}
|
29 |
*/
|
30 |
( function( $, obj ) {
|
31 |
-
'use strict';
|
32 |
const $document = $( document );
|
33 |
|
34 |
/**
|
35 |
* Selectors used for configuration and setup
|
36 |
*
|
37 |
* @since 5.0.0
|
38 |
-
*
|
39 |
-
* @type {Object}
|
40 |
*/
|
41 |
obj.selectors = {
|
42 |
container: '.tribe-tickets__rsvp-wrapper',
|
@@ -65,10 +59,8 @@ tribe.tickets.rsvp.ari = {};
|
|
65 |
* Go to guest.
|
66 |
*
|
67 |
* @since 5.0.0
|
68 |
-
*
|
69 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
70 |
* @param {number} guestNumber The guest number we want to go to.
|
71 |
-
*
|
72 |
* @return {void}
|
73 |
*/
|
74 |
obj.goToGuest = function( $container, guestNumber ) {
|
@@ -102,10 +94,8 @@ tribe.tickets.rsvp.ari = {};
|
|
102 |
* Check if there are required fields for the ARI.
|
103 |
*
|
104 |
* @since 5.0.0
|
105 |
-
*
|
106 |
* @param {jQuery} $container jQuery object of the container.
|
107 |
-
*
|
108 |
-
* @return {bool} True if there are required fields for ARI.
|
109 |
*/
|
110 |
obj.hasAriRequiredFields = function( $container ) {
|
111 |
const $form = $container.find( obj.selectors.rsvpForm );
|
@@ -123,9 +113,7 @@ tribe.tickets.rsvp.ari = {};
|
|
123 |
* Show element.
|
124 |
*
|
125 |
* @since 5.0.0
|
126 |
-
*
|
127 |
* @param {jQuery} $element jQuery object of the element to show.
|
128 |
-
*
|
129 |
* @return {void}
|
130 |
*/
|
131 |
obj.showElement = function( $element ) {
|
@@ -136,9 +124,7 @@ tribe.tickets.rsvp.ari = {};
|
|
136 |
* Hide element.
|
137 |
*
|
138 |
* @since 5.0.0
|
139 |
-
*
|
140 |
* @param {jQuery} $element jQuery object of the element to hide.
|
141 |
-
*
|
142 |
* @return {void}
|
143 |
*/
|
144 |
obj.hideElement = function( $element ) {
|
@@ -149,9 +135,7 @@ tribe.tickets.rsvp.ari = {};
|
|
149 |
* Checks if the guest form is valid.
|
150 |
*
|
151 |
* @since 5.0.0
|
152 |
-
*
|
153 |
* @param {jQuery} $guestForm jQuery object of the guest form container.
|
154 |
-
*
|
155 |
* @return {void}
|
156 |
*/
|
157 |
obj.isGuestValid = function( $guestForm ) {
|
@@ -166,7 +150,7 @@ tribe.tickets.rsvp.ari = {};
|
|
166 |
if ( ! isValidField ) {
|
167 |
isValid = false;
|
168 |
}
|
169 |
-
}
|
170 |
);
|
171 |
|
172 |
const $guestFormError = $guestForm.find( obj.selectors.guestFormFieldsError );
|
@@ -184,10 +168,8 @@ tribe.tickets.rsvp.ari = {};
|
|
184 |
* Checks if if can move to the guest coming in `guestNumber`.
|
185 |
*
|
186 |
* @since 5.0.0
|
187 |
-
*
|
188 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
189 |
* @param {number} guestNumber The guest number we want to go to.
|
190 |
-
*
|
191 |
* @return {void}
|
192 |
*/
|
193 |
obj.canGoToGuest = function( $container, guestNumber ) {
|
@@ -219,9 +201,7 @@ tribe.tickets.rsvp.ari = {};
|
|
219 |
* Bind the required actions to the "Next" button.
|
220 |
*
|
221 |
* @since 5.0.0
|
222 |
-
*
|
223 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
224 |
-
*
|
225 |
* @return {void}
|
226 |
*/
|
227 |
obj.setNextAndSubmit = function( $container ) {
|
@@ -250,15 +230,13 @@ tribe.tickets.rsvp.ari = {};
|
|
250 |
* Bind go to guest.
|
251 |
*
|
252 |
* @since 5.0.0
|
253 |
-
*
|
254 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
255 |
* @param {jQuery} $button jQuery object of the button.
|
256 |
* @param {number} guestNumberVal The guest number.
|
257 |
-
*
|
258 |
* @return {void}
|
259 |
*/
|
260 |
obj.bindGoToGuest = function( $container, $button, guestNumberVal ) {
|
261 |
-
|
262 |
|
263 |
$button.on( 'click', function() {
|
264 |
const guestNumberDataAttribute = $( this ).data( 'guest-number' );
|
@@ -279,9 +257,7 @@ tribe.tickets.rsvp.ari = {};
|
|
279 |
* Adds the form and the list item.
|
280 |
*
|
281 |
* @since 5.0.0
|
282 |
-
*
|
283 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
284 |
-
*
|
285 |
* @return {void}
|
286 |
*/
|
287 |
obj.addGuest = function( $container ) {
|
@@ -291,10 +267,10 @@ tribe.tickets.rsvp.ari = {};
|
|
291 |
|
292 |
const rsvpId = $container.data( 'rsvp-id' );
|
293 |
const rsvpFieldsTemplate = window.wp.template(
|
294 |
-
obj.selectors.guestFormFieldsTemplate.className() + '-' + rsvpId
|
295 |
);
|
296 |
const guestListItemTemplate = window.wp.template(
|
297 |
-
obj.selectors.guestListItemTemplate.className() + '-' + rsvpId
|
298 |
);
|
299 |
const data = { attendee_id: totalGuests };
|
300 |
|
@@ -321,7 +297,6 @@ tribe.tickets.rsvp.ari = {};
|
|
321 |
* Handle the number input + and - actions
|
322 |
*
|
323 |
* @since 5.0.0
|
324 |
-
*
|
325 |
* @param {Event} e input event
|
326 |
*/
|
327 |
obj.handleQuantityChangeValue = function( e ) {
|
@@ -366,7 +341,6 @@ tribe.tickets.rsvp.ari = {};
|
|
366 |
* Handle the RSVP form submission
|
367 |
*
|
368 |
* @since 5.0.0
|
369 |
-
*
|
370 |
* @param {Event} e submission event
|
371 |
*/
|
372 |
obj.handleSubmission = function( e ) {
|
@@ -377,7 +351,7 @@ tribe.tickets.rsvp.ari = {};
|
|
377 |
const rsvpId = $form.data( 'rsvp-id' );
|
378 |
const params = $form.serializeArray();
|
379 |
|
380 |
-
|
381 |
action: 'tribe_tickets_rsvp_handle',
|
382 |
ticket_id: rsvpId,
|
383 |
step: 'success',
|
@@ -394,9 +368,7 @@ tribe.tickets.rsvp.ari = {};
|
|
394 |
* Binds events for the RSVP form.
|
395 |
*
|
396 |
* @since 5.0.0
|
397 |
-
*
|
398 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
399 |
-
*
|
400 |
* @return {void}
|
401 |
*/
|
402 |
obj.bindForm = function( $container ) {
|
@@ -412,9 +384,7 @@ tribe.tickets.rsvp.ari = {};
|
|
412 |
* Remove the form and the list item.
|
413 |
*
|
414 |
* @since 5.0.0
|
415 |
-
*
|
416 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
417 |
-
*
|
418 |
* @return {void}
|
419 |
*/
|
420 |
obj.removeGuest = function( $container ) {
|
@@ -451,9 +421,7 @@ tribe.tickets.rsvp.ari = {};
|
|
451 |
* Get the total guests number for the container.
|
452 |
*
|
453 |
* @since 5.0.0
|
454 |
-
*
|
455 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
456 |
-
*
|
457 |
* @return {number} Number representing the total guests.
|
458 |
*/
|
459 |
obj.getTotalGuests = function( $container ) {
|
@@ -464,9 +432,7 @@ tribe.tickets.rsvp.ari = {};
|
|
464 |
* Get the current guest number for the container.
|
465 |
*
|
466 |
* @since 5.0.0
|
467 |
-
*
|
468 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
469 |
-
*
|
470 |
* @return {number} Number representing the current guests.
|
471 |
*/
|
472 |
obj.getCurrentGuest = function( $container ) {
|
@@ -480,13 +446,11 @@ tribe.tickets.rsvp.ari = {};
|
|
480 |
* Handle the quantity change.
|
481 |
*
|
482 |
* @since 5.0.0
|
483 |
-
*
|
484 |
* @param {Event} e click event
|
485 |
-
*
|
486 |
*/
|
487 |
obj.handleQuantityChange = function( e ) {
|
488 |
e.preventDefault();
|
489 |
-
const $input
|
490 |
const increase = $( this ).hasClass( obj.selectors.addGuestButton.className() );
|
491 |
const step = $input.attr( 'step' ) ? Number( $input.attr( 'step' ) ) : 1;
|
492 |
const originalValue = Number( $input.val() );
|
@@ -515,7 +479,7 @@ tribe.tickets.rsvp.ari = {};
|
|
515 |
: max;
|
516 |
}
|
517 |
} else {
|
518 |
-
const min = $input.attr( 'min' ) ? Number( $input.attr( 'min' )) : 0;
|
519 |
|
520 |
if ( typeof $input[ 0 ].stepDown === 'function' ) {
|
521 |
try {
|
@@ -542,9 +506,7 @@ tribe.tickets.rsvp.ari = {};
|
|
542 |
* Binds events for guest addition/removal.
|
543 |
*
|
544 |
* @since 5.0.0
|
545 |
-
*
|
546 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
547 |
-
*
|
548 |
* @return {void}
|
549 |
*/
|
550 |
obj.bindGuestAddRemove = function( $container ) {
|
@@ -562,7 +524,7 @@ tribe.tickets.rsvp.ari = {};
|
|
562 |
$qtyInput.on(
|
563 |
'input',
|
564 |
{ container: $container },
|
565 |
-
obj.handleQuantityChangeValue
|
566 |
);
|
567 |
};
|
568 |
|
@@ -570,9 +532,7 @@ tribe.tickets.rsvp.ari = {};
|
|
570 |
* Binds events for next guest button.
|
571 |
*
|
572 |
* @since 5.0.0
|
573 |
-
*
|
574 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
575 |
-
*
|
576 |
* @return {void}
|
577 |
*/
|
578 |
obj.bindNextButton = function( $container ) {
|
@@ -588,11 +548,9 @@ tribe.tickets.rsvp.ari = {};
|
|
588 |
* Unbinds events.
|
589 |
*
|
590 |
* @since 5.0.0
|
591 |
-
*
|
592 |
* @param {Event} event event object for 'beforeAjaxSuccess.tribeTicketsRsvp' event
|
593 |
* @param {XMLHttpRequest} jqXHR Request object
|
594 |
-
* @param {
|
595 |
-
*
|
596 |
* @return {void}
|
597 |
*/
|
598 |
obj.unbindEvents = function( event, jqXHR, settings ) { // eslint-disable-line no-unused-vars
|
@@ -610,9 +568,7 @@ tribe.tickets.rsvp.ari = {};
|
|
610 |
* Binds events for container.
|
611 |
*
|
612 |
* @since 5.0.0
|
613 |
-
*
|
614 |
* @param {jQuery} $container jQuery object of object of the RSVP container.
|
615 |
-
*
|
616 |
* @return {void}
|
617 |
*/
|
618 |
obj.bindEvents = function( $container ) {
|
@@ -623,7 +579,7 @@ tribe.tickets.rsvp.ari = {};
|
|
623 |
$container.on(
|
624 |
'beforeAjaxSuccess.tribeTicketsRsvp',
|
625 |
{ container: $container },
|
626 |
-
obj.unbindEvents
|
627 |
);
|
628 |
};
|
629 |
|
@@ -631,11 +587,9 @@ tribe.tickets.rsvp.ari = {};
|
|
631 |
* Initialize RSVP events.
|
632 |
*
|
633 |
* @since 5.0.0
|
634 |
-
*
|
635 |
* @param {Event} event event object for 'afterSetup.tribeTicketsRsvp' event
|
636 |
-
* @param {
|
637 |
* @param {jQuery} $container jQuery object of view container.
|
638 |
-
*
|
639 |
* @return {void}
|
640 |
*/
|
641 |
obj.init = function( event, index, $container ) {
|
@@ -646,14 +600,13 @@ tribe.tickets.rsvp.ari = {};
|
|
646 |
* Handles the initialization of the RSVP block events when Document is ready.
|
647 |
*
|
648 |
* @since 5.0.0
|
649 |
-
*
|
650 |
* @return {void}
|
651 |
*/
|
652 |
obj.ready = function() {
|
653 |
$document.on(
|
654 |
'afterSetup.tribeTicketsRsvp',
|
655 |
tribe.tickets.rsvp.manager.selectors.container,
|
656 |
-
obj.init
|
657 |
);
|
658 |
};
|
659 |
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
11 |
* Configures RSVP ARI Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.0
|
14 |
+
* @type {object}
|
|
|
15 |
*/
|
16 |
tribe.tickets.rsvp.ari = {};
|
17 |
|
19 |
* Initializes in a Strict env the code that manages the RSVP ARI.
|
20 |
*
|
21 |
* @since 5.0.0
|
22 |
+
* @param {object} $ jQuery
|
23 |
+
* @param {object} obj tribe.tickets.rsvp.ari
|
|
|
|
|
24 |
* @return {void}
|
25 |
*/
|
26 |
( function( $, obj ) {
|
|
|
27 |
const $document = $( document );
|
28 |
|
29 |
/**
|
30 |
* Selectors used for configuration and setup
|
31 |
*
|
32 |
* @since 5.0.0
|
33 |
+
* @type {object}
|
|
|
34 |
*/
|
35 |
obj.selectors = {
|
36 |
container: '.tribe-tickets__rsvp-wrapper',
|
59 |
* Go to guest.
|
60 |
*
|
61 |
* @since 5.0.0
|
|
|
62 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
63 |
* @param {number} guestNumber The guest number we want to go to.
|
|
|
64 |
* @return {void}
|
65 |
*/
|
66 |
obj.goToGuest = function( $container, guestNumber ) {
|
94 |
* Check if there are required fields for the ARI.
|
95 |
*
|
96 |
* @since 5.0.0
|
|
|
97 |
* @param {jQuery} $container jQuery object of the container.
|
98 |
+
* @return {boolean} True if there are required fields for ARI.
|
|
|
99 |
*/
|
100 |
obj.hasAriRequiredFields = function( $container ) {
|
101 |
const $form = $container.find( obj.selectors.rsvpForm );
|
113 |
* Show element.
|
114 |
*
|
115 |
* @since 5.0.0
|
|
|
116 |
* @param {jQuery} $element jQuery object of the element to show.
|
|
|
117 |
* @return {void}
|
118 |
*/
|
119 |
obj.showElement = function( $element ) {
|
124 |
* Hide element.
|
125 |
*
|
126 |
* @since 5.0.0
|
|
|
127 |
* @param {jQuery} $element jQuery object of the element to hide.
|
|
|
128 |
* @return {void}
|
129 |
*/
|
130 |
obj.hideElement = function( $element ) {
|
135 |
* Checks if the guest form is valid.
|
136 |
*
|
137 |
* @since 5.0.0
|
|
|
138 |
* @param {jQuery} $guestForm jQuery object of the guest form container.
|
|
|
139 |
* @return {void}
|
140 |
*/
|
141 |
obj.isGuestValid = function( $guestForm ) {
|
150 |
if ( ! isValidField ) {
|
151 |
isValid = false;
|
152 |
}
|
153 |
+
},
|
154 |
);
|
155 |
|
156 |
const $guestFormError = $guestForm.find( obj.selectors.guestFormFieldsError );
|
168 |
* Checks if if can move to the guest coming in `guestNumber`.
|
169 |
*
|
170 |
* @since 5.0.0
|
|
|
171 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
172 |
* @param {number} guestNumber The guest number we want to go to.
|
|
|
173 |
* @return {void}
|
174 |
*/
|
175 |
obj.canGoToGuest = function( $container, guestNumber ) {
|
201 |
* Bind the required actions to the "Next" button.
|
202 |
*
|
203 |
* @since 5.0.0
|
|
|
204 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
205 |
* @return {void}
|
206 |
*/
|
207 |
obj.setNextAndSubmit = function( $container ) {
|
230 |
* Bind go to guest.
|
231 |
*
|
232 |
* @since 5.0.0
|
|
|
233 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
234 |
* @param {jQuery} $button jQuery object of the button.
|
235 |
* @param {number} guestNumberVal The guest number.
|
|
|
236 |
* @return {void}
|
237 |
*/
|
238 |
obj.bindGoToGuest = function( $container, $button, guestNumberVal ) {
|
239 |
+
let guestNumber = guestNumberVal || 1;
|
240 |
|
241 |
$button.on( 'click', function() {
|
242 |
const guestNumberDataAttribute = $( this ).data( 'guest-number' );
|
257 |
* Adds the form and the list item.
|
258 |
*
|
259 |
* @since 5.0.0
|
|
|
260 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
261 |
* @return {void}
|
262 |
*/
|
263 |
obj.addGuest = function( $container ) {
|
267 |
|
268 |
const rsvpId = $container.data( 'rsvp-id' );
|
269 |
const rsvpFieldsTemplate = window.wp.template(
|
270 |
+
obj.selectors.guestFormFieldsTemplate.className() + '-' + rsvpId,
|
271 |
);
|
272 |
const guestListItemTemplate = window.wp.template(
|
273 |
+
obj.selectors.guestListItemTemplate.className() + '-' + rsvpId,
|
274 |
);
|
275 |
const data = { attendee_id: totalGuests };
|
276 |
|
297 |
* Handle the number input + and - actions
|
298 |
*
|
299 |
* @since 5.0.0
|
|
|
300 |
* @param {Event} e input event
|
301 |
*/
|
302 |
obj.handleQuantityChangeValue = function( e ) {
|
341 |
* Handle the RSVP form submission
|
342 |
*
|
343 |
* @since 5.0.0
|
|
|
344 |
* @param {Event} e submission event
|
345 |
*/
|
346 |
obj.handleSubmission = function( e ) {
|
351 |
const rsvpId = $form.data( 'rsvp-id' );
|
352 |
const params = $form.serializeArray();
|
353 |
|
354 |
+
const data = {
|
355 |
action: 'tribe_tickets_rsvp_handle',
|
356 |
ticket_id: rsvpId,
|
357 |
step: 'success',
|
368 |
* Binds events for the RSVP form.
|
369 |
*
|
370 |
* @since 5.0.0
|
|
|
371 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
372 |
* @return {void}
|
373 |
*/
|
374 |
obj.bindForm = function( $container ) {
|
384 |
* Remove the form and the list item.
|
385 |
*
|
386 |
* @since 5.0.0
|
|
|
387 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
388 |
* @return {void}
|
389 |
*/
|
390 |
obj.removeGuest = function( $container ) {
|
421 |
* Get the total guests number for the container.
|
422 |
*
|
423 |
* @since 5.0.0
|
|
|
424 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
425 |
* @return {number} Number representing the total guests.
|
426 |
*/
|
427 |
obj.getTotalGuests = function( $container ) {
|
432 |
* Get the current guest number for the container.
|
433 |
*
|
434 |
* @since 5.0.0
|
|
|
435 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
436 |
* @return {number} Number representing the current guests.
|
437 |
*/
|
438 |
obj.getCurrentGuest = function( $container ) {
|
446 |
* Handle the quantity change.
|
447 |
*
|
448 |
* @since 5.0.0
|
|
|
449 |
* @param {Event} e click event
|
|
|
450 |
*/
|
451 |
obj.handleQuantityChange = function( e ) {
|
452 |
e.preventDefault();
|
453 |
+
const $input = $( this ).parent().find( 'input[type="number"]' );
|
454 |
const increase = $( this ).hasClass( obj.selectors.addGuestButton.className() );
|
455 |
const step = $input.attr( 'step' ) ? Number( $input.attr( 'step' ) ) : 1;
|
456 |
const originalValue = Number( $input.val() );
|
479 |
: max;
|
480 |
}
|
481 |
} else {
|
482 |
+
const min = $input.attr( 'min' ) ? Number( $input.attr( 'min' ) ) : 0;
|
483 |
|
484 |
if ( typeof $input[ 0 ].stepDown === 'function' ) {
|
485 |
try {
|
506 |
* Binds events for guest addition/removal.
|
507 |
*
|
508 |
* @since 5.0.0
|
|
|
509 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
510 |
* @return {void}
|
511 |
*/
|
512 |
obj.bindGuestAddRemove = function( $container ) {
|
524 |
$qtyInput.on(
|
525 |
'input',
|
526 |
{ container: $container },
|
527 |
+
obj.handleQuantityChangeValue,
|
528 |
);
|
529 |
};
|
530 |
|
532 |
* Binds events for next guest button.
|
533 |
*
|
534 |
* @since 5.0.0
|
|
|
535 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
536 |
* @return {void}
|
537 |
*/
|
538 |
obj.bindNextButton = function( $container ) {
|
548 |
* Unbinds events.
|
549 |
*
|
550 |
* @since 5.0.0
|
|
|
551 |
* @param {Event} event event object for 'beforeAjaxSuccess.tribeTicketsRsvp' event
|
552 |
* @param {XMLHttpRequest} jqXHR Request object
|
553 |
+
* @param {object} settings Settings that this request was made with
|
|
|
554 |
* @return {void}
|
555 |
*/
|
556 |
obj.unbindEvents = function( event, jqXHR, settings ) { // eslint-disable-line no-unused-vars
|
568 |
* Binds events for container.
|
569 |
*
|
570 |
* @since 5.0.0
|
|
|
571 |
* @param {jQuery} $container jQuery object of object of the RSVP container.
|
|
|
572 |
* @return {void}
|
573 |
*/
|
574 |
obj.bindEvents = function( $container ) {
|
579 |
$container.on(
|
580 |
'beforeAjaxSuccess.tribeTicketsRsvp',
|
581 |
{ container: $container },
|
582 |
+
obj.unbindEvents,
|
583 |
);
|
584 |
};
|
585 |
|
587 |
* Initialize RSVP events.
|
588 |
*
|
589 |
* @since 5.0.0
|
|
|
590 |
* @param {Event} event event object for 'afterSetup.tribeTicketsRsvp' event
|
591 |
+
* @param {number} index jQuery.each index param from 'afterSetup.tribeTicketsRsvp' event.
|
592 |
* @param {jQuery} $container jQuery object of view container.
|
|
|
593 |
* @return {void}
|
594 |
*/
|
595 |
obj.init = function( event, index, $container ) {
|
600 |
* Handles the initialization of the RSVP block events when Document is ready.
|
601 |
*
|
602 |
* @since 5.0.0
|
|
|
603 |
* @return {void}
|
604 |
*/
|
605 |
obj.ready = function() {
|
606 |
$document.on(
|
607 |
'afterSetup.tribeTicketsRsvp',
|
608 |
tribe.tickets.rsvp.manager.selectors.container,
|
609 |
+
obj.init,
|
610 |
);
|
611 |
};
|
612 |
|
src/resources/js/v2/rsvp-block.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
-
*
|
6 |
-
* @type {Object}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
@@ -12,8 +11,7 @@ tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
|
12 |
* Configures RSVP block Object in the Global Tribe variable
|
13 |
*
|
14 |
* @since 5.0.0
|
15 |
-
*
|
16 |
-
* @type {Object}
|
17 |
*/
|
18 |
tribe.tickets.rsvp.block = {};
|
19 |
|
@@ -21,22 +19,18 @@ tribe.tickets.rsvp.block = {};
|
|
21 |
* Initializes in a Strict env the code that manages the RSVP block.
|
22 |
*
|
23 |
* @since 5.0.0
|
24 |
-
*
|
25 |
-
* @param {
|
26 |
-
* @param {Object} obj tribe.tickets.rsvp.block
|
27 |
-
*
|
28 |
* @return {void}
|
29 |
*/
|
30 |
( function( $, obj ) {
|
31 |
-
'use strict';
|
32 |
const $document = $( document );
|
33 |
|
34 |
/**
|
35 |
* Selectors used for configuration and setup
|
36 |
*
|
37 |
* @since 5.0.0
|
38 |
-
*
|
39 |
-
* @type {Object}
|
40 |
*/
|
41 |
obj.selectors = {
|
42 |
container: '.tribe-tickets__rsvp-wrapper',
|
@@ -53,13 +47,11 @@ tribe.tickets.rsvp.block = {};
|
|
53 |
* Binds events for the going button.
|
54 |
*
|
55 |
* @since 5.0.0
|
56 |
-
*
|
57 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
58 |
-
*
|
59 |
* @return {void}
|
60 |
*/
|
61 |
obj.bindGoing = function( $container ) {
|
62 |
-
let data
|
63 |
const rsvpId = $container.data( 'rsvp-id' );
|
64 |
const $goingButton = $container.find( obj.selectors.goingButton );
|
65 |
|
@@ -80,13 +72,11 @@ tribe.tickets.rsvp.block = {};
|
|
80 |
* Binds events for the not going button.
|
81 |
*
|
82 |
* @since 5.0.0
|
83 |
-
*
|
84 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
85 |
-
*
|
86 |
* @return {void}
|
87 |
*/
|
88 |
obj.bindNotGoing = function( $container ) {
|
89 |
-
let data
|
90 |
const rsvpId = $container.data( 'rsvp-id' );
|
91 |
const $notGoingButton = $container.find( obj.selectors.notGoingButton );
|
92 |
|
@@ -107,19 +97,16 @@ tribe.tickets.rsvp.block = {};
|
|
107 |
* Binds events for the cancel button.
|
108 |
*
|
109 |
* @since 5.0.0
|
110 |
-
*
|
111 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
112 |
-
*
|
113 |
* @return {void}
|
114 |
*/
|
115 |
obj.bindCancel = function( $container ) {
|
116 |
-
let data
|
117 |
const rsvpId = $container.data( 'rsvp-id' );
|
118 |
const $cancelButton = $container.find( obj.selectors.cancelButton );
|
119 |
|
120 |
$cancelButton.each( function( index, button ) {
|
121 |
$( button ).on( 'click', function() {
|
122 |
-
|
123 |
if ( ! confirm( TribeRsvp.cancelText ) ) {
|
124 |
return;
|
125 |
}
|
@@ -139,7 +126,6 @@ tribe.tickets.rsvp.block = {};
|
|
139 |
* Handle the RSVP toggle for listing in public attendee list.
|
140 |
*
|
141 |
* @since 5.0.0
|
142 |
-
*
|
143 |
* @param {Event} event Input event
|
144 |
*/
|
145 |
obj.handleDisplayToggle = function( event ) {
|
@@ -168,7 +154,6 @@ tribe.tickets.rsvp.block = {};
|
|
168 |
* Handle the RSVP form submission
|
169 |
*
|
170 |
* @since 5.0.0
|
171 |
-
*
|
172 |
* @param {event} e submission event
|
173 |
*/
|
174 |
obj.handleSubmission = function( e ) {
|
@@ -179,7 +164,7 @@ tribe.tickets.rsvp.block = {};
|
|
179 |
const rsvpId = $form.data( 'rsvp-id' );
|
180 |
const params = $form.serializeArray();
|
181 |
|
182 |
-
|
183 |
action: 'tribe_tickets_rsvp_handle',
|
184 |
ticket_id: rsvpId,
|
185 |
step: 'success',
|
@@ -196,9 +181,7 @@ tribe.tickets.rsvp.block = {};
|
|
196 |
* Binds events for the RSVP form.
|
197 |
*
|
198 |
* @since 5.0.0
|
199 |
-
*
|
200 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
201 |
-
*
|
202 |
* @return {void}
|
203 |
*/
|
204 |
obj.bindForm = function( $container ) {
|
@@ -213,9 +196,7 @@ tribe.tickets.rsvp.block = {};
|
|
213 |
* Binds events for the display in public attendee toggle.
|
214 |
*
|
215 |
* @since 5.0.0
|
216 |
-
*
|
217 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
218 |
-
*
|
219 |
* @return {void}
|
220 |
*/
|
221 |
obj.bindDisplayToggle = function( $container ) {
|
@@ -224,7 +205,7 @@ tribe.tickets.rsvp.block = {};
|
|
224 |
$displayToggle.on(
|
225 |
'input',
|
226 |
{ container: $container },
|
227 |
-
obj.handleDisplayToggle
|
228 |
);
|
229 |
};
|
230 |
|
@@ -232,11 +213,9 @@ tribe.tickets.rsvp.block = {};
|
|
232 |
* Unbinds events.
|
233 |
*
|
234 |
* @since 5.0.0
|
235 |
-
*
|
236 |
* @param {Event} event event object for 'beforeAjaxSuccess.tribeTicketsRsvp' event
|
237 |
* @param {jqXHR} jqXHR Request object
|
238 |
-
* @param {
|
239 |
-
*
|
240 |
* @return {void}
|
241 |
*/
|
242 |
obj.unbindEvents = function( event, jqXHR, settings ) { // eslint-disable-line no-unused-vars
|
@@ -258,13 +237,10 @@ tribe.tickets.rsvp.block = {};
|
|
258 |
* Binds events for container.
|
259 |
*
|
260 |
* @since 5.0.0
|
261 |
-
*
|
262 |
* @param {jQuery} $container jQuery object of object of the RSVP container.
|
263 |
-
*
|
264 |
* @return {void}
|
265 |
*/
|
266 |
obj.bindEvents = function( $container ) {
|
267 |
-
|
268 |
obj.bindGoing( $container );
|
269 |
obj.bindNotGoing( $container );
|
270 |
obj.bindCancel( $container );
|
@@ -274,7 +250,7 @@ tribe.tickets.rsvp.block = {};
|
|
274 |
$container.on(
|
275 |
'beforeAjaxSuccess.tribeTicketsRsvp',
|
276 |
{ container: $container },
|
277 |
-
obj.unbindEvents
|
278 |
);
|
279 |
};
|
280 |
|
@@ -282,11 +258,9 @@ tribe.tickets.rsvp.block = {};
|
|
282 |
* Initialize RSVP events.
|
283 |
*
|
284 |
* @since 5.0.0
|
285 |
-
*
|
286 |
* @param {Event} event event object for 'afterSetup.tribeTicketsRsvp' event
|
287 |
-
* @param {
|
288 |
* @param {jQuery} $container jQuery object of view container.
|
289 |
-
*
|
290 |
* @return {void}
|
291 |
*/
|
292 |
obj.init = function( event, index, $container ) {
|
@@ -297,14 +271,13 @@ tribe.tickets.rsvp.block = {};
|
|
297 |
* Handles the initialization of the RSVP block events when Document is ready.
|
298 |
*
|
299 |
* @since 5.0.0
|
300 |
-
*
|
301 |
* @return {void}
|
302 |
*/
|
303 |
obj.ready = function() {
|
304 |
$document.on(
|
305 |
'afterSetup.tribeTicketsRsvp',
|
306 |
tribe.tickets.rsvp.manager.selectors.container,
|
307 |
-
obj.init
|
308 |
);
|
309 |
};
|
310 |
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
11 |
* Configures RSVP block Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.0
|
14 |
+
* @type {object}
|
|
|
15 |
*/
|
16 |
tribe.tickets.rsvp.block = {};
|
17 |
|
19 |
* Initializes in a Strict env the code that manages the RSVP block.
|
20 |
*
|
21 |
* @since 5.0.0
|
22 |
+
* @param {object} $ jQuery
|
23 |
+
* @param {object} obj tribe.tickets.rsvp.block
|
|
|
|
|
24 |
* @return {void}
|
25 |
*/
|
26 |
( function( $, obj ) {
|
|
|
27 |
const $document = $( document );
|
28 |
|
29 |
/**
|
30 |
* Selectors used for configuration and setup
|
31 |
*
|
32 |
* @since 5.0.0
|
33 |
+
* @type {object}
|
|
|
34 |
*/
|
35 |
obj.selectors = {
|
36 |
container: '.tribe-tickets__rsvp-wrapper',
|
47 |
* Binds events for the going button.
|
48 |
*
|
49 |
* @since 5.0.0
|
|
|
50 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
51 |
* @return {void}
|
52 |
*/
|
53 |
obj.bindGoing = function( $container ) {
|
54 |
+
let data = {};
|
55 |
const rsvpId = $container.data( 'rsvp-id' );
|
56 |
const $goingButton = $container.find( obj.selectors.goingButton );
|
57 |
|
72 |
* Binds events for the not going button.
|
73 |
*
|
74 |
* @since 5.0.0
|
|
|
75 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
76 |
* @return {void}
|
77 |
*/
|
78 |
obj.bindNotGoing = function( $container ) {
|
79 |
+
let data = {};
|
80 |
const rsvpId = $container.data( 'rsvp-id' );
|
81 |
const $notGoingButton = $container.find( obj.selectors.notGoingButton );
|
82 |
|
97 |
* Binds events for the cancel button.
|
98 |
*
|
99 |
* @since 5.0.0
|
|
|
100 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
101 |
* @return {void}
|
102 |
*/
|
103 |
obj.bindCancel = function( $container ) {
|
104 |
+
let data = {};
|
105 |
const rsvpId = $container.data( 'rsvp-id' );
|
106 |
const $cancelButton = $container.find( obj.selectors.cancelButton );
|
107 |
|
108 |
$cancelButton.each( function( index, button ) {
|
109 |
$( button ).on( 'click', function() {
|
|
|
110 |
if ( ! confirm( TribeRsvp.cancelText ) ) {
|
111 |
return;
|
112 |
}
|
126 |
* Handle the RSVP toggle for listing in public attendee list.
|
127 |
*
|
128 |
* @since 5.0.0
|
|
|
129 |
* @param {Event} event Input event
|
130 |
*/
|
131 |
obj.handleDisplayToggle = function( event ) {
|
154 |
* Handle the RSVP form submission
|
155 |
*
|
156 |
* @since 5.0.0
|
|
|
157 |
* @param {event} e submission event
|
158 |
*/
|
159 |
obj.handleSubmission = function( e ) {
|
164 |
const rsvpId = $form.data( 'rsvp-id' );
|
165 |
const params = $form.serializeArray();
|
166 |
|
167 |
+
const data = {
|
168 |
action: 'tribe_tickets_rsvp_handle',
|
169 |
ticket_id: rsvpId,
|
170 |
step: 'success',
|
181 |
* Binds events for the RSVP form.
|
182 |
*
|
183 |
* @since 5.0.0
|
|
|
184 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
185 |
* @return {void}
|
186 |
*/
|
187 |
obj.bindForm = function( $container ) {
|
196 |
* Binds events for the display in public attendee toggle.
|
197 |
*
|
198 |
* @since 5.0.0
|
|
|
199 |
* @param {jQuery} $container jQuery object of the RSVP container.
|
|
|
200 |
* @return {void}
|
201 |
*/
|
202 |
obj.bindDisplayToggle = function( $container ) {
|
205 |
$displayToggle.on(
|
206 |
'input',
|
207 |
{ container: $container },
|
208 |
+
obj.handleDisplayToggle,
|
209 |
);
|
210 |
};
|
211 |
|
213 |
* Unbinds events.
|
214 |
*
|
215 |
* @since 5.0.0
|
|
|
216 |
* @param {Event} event event object for 'beforeAjaxSuccess.tribeTicketsRsvp' event
|
217 |
* @param {jqXHR} jqXHR Request object
|
218 |
+
* @param {object} settings Settings that this request was made with
|
|
|
219 |
* @return {void}
|
220 |
*/
|
221 |
obj.unbindEvents = function( event, jqXHR, settings ) { // eslint-disable-line no-unused-vars
|
237 |
* Binds events for container.
|
238 |
*
|
239 |
* @since 5.0.0
|
|
|
240 |
* @param {jQuery} $container jQuery object of object of the RSVP container.
|
|
|
241 |
* @return {void}
|
242 |
*/
|
243 |
obj.bindEvents = function( $container ) {
|
|
|
244 |
obj.bindGoing( $container );
|
245 |
obj.bindNotGoing( $container );
|
246 |
obj.bindCancel( $container );
|
250 |
$container.on(
|
251 |
'beforeAjaxSuccess.tribeTicketsRsvp',
|
252 |
{ container: $container },
|
253 |
+
obj.unbindEvents,
|
254 |
);
|
255 |
};
|
256 |
|
258 |
* Initialize RSVP events.
|
259 |
*
|
260 |
* @since 5.0.0
|
|
|
261 |
* @param {Event} event event object for 'afterSetup.tribeTicketsRsvp' event
|
262 |
+
* @param {number} index jQuery.each index param from 'afterSetup.tribeTicketsRsvp' event.
|
263 |
* @param {jQuery} $container jQuery object of view container.
|
|
|
264 |
* @return {void}
|
265 |
*/
|
266 |
obj.init = function( event, index, $container ) {
|
271 |
* Handles the initialization of the RSVP block events when Document is ready.
|
272 |
*
|
273 |
* @since 5.0.0
|
|
|
274 |
* @return {void}
|
275 |
*/
|
276 |
obj.ready = function() {
|
277 |
$document.on(
|
278 |
'afterSetup.tribeTicketsRsvp',
|
279 |
tribe.tickets.rsvp.manager.selectors.container,
|
280 |
+
obj.init,
|
281 |
);
|
282 |
};
|
283 |
|
src/resources/js/v2/rsvp-manager.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
@@ -12,8 +11,7 @@ tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
|
12 |
* Configures RSVP manager Object in the Global Tribe variable
|
13 |
*
|
14 |
* @since 5.0.0
|
15 |
-
*
|
16 |
-
* @type {PlainObject}
|
17 |
*/
|
18 |
tribe.tickets.rsvp.manager = {};
|
19 |
|
@@ -21,22 +19,17 @@ tribe.tickets.rsvp.manager = {};
|
|
21 |
* Initializes in a Strict env the code that manages the RSVP Manager
|
22 |
*
|
23 |
* @since 5.0.0
|
24 |
-
*
|
25 |
-
* @param {
|
26 |
-
* @param {
|
27 |
-
* @param {PlainObject} obj tribe.tickets.rsvp.manager
|
28 |
-
*
|
29 |
* @return {void}
|
30 |
*/
|
31 |
( function( $, _, obj ) {
|
32 |
-
'use strict';
|
33 |
-
|
34 |
/**
|
35 |
* Selectors used for configuration and setup
|
36 |
*
|
37 |
* @since 5.0.0
|
38 |
-
*
|
39 |
-
* @type {PlainObject}
|
40 |
*/
|
41 |
obj.selectors = {
|
42 |
container: '.tribe-tickets__rsvp-wrapper',
|
@@ -49,7 +42,6 @@ tribe.tickets.rsvp.manager = {};
|
|
49 |
* Stores the current ajax request been handled by the manager.
|
50 |
*
|
51 |
* @since 5.0.0
|
52 |
-
*
|
53 |
* @type {jqXHR|null}
|
54 |
*/
|
55 |
obj.currentAjaxRequest = null;
|
@@ -58,7 +50,6 @@ tribe.tickets.rsvp.manager = {};
|
|
58 |
* Containers on the current page that were initialized.
|
59 |
*
|
60 |
* @since 5.0.0
|
61 |
-
*
|
62 |
* @type {jQuery}
|
63 |
*/
|
64 |
obj.$containers = $();
|
@@ -67,7 +58,6 @@ tribe.tickets.rsvp.manager = {};
|
|
67 |
* Saves all the containers in the page into the object.
|
68 |
*
|
69 |
* @since 5.0.0
|
70 |
-
*
|
71 |
* @return {void}
|
72 |
*/
|
73 |
obj.selectContainers = function() {
|
@@ -78,9 +68,7 @@ tribe.tickets.rsvp.manager = {};
|
|
78 |
* Clean up the container and event listeners
|
79 |
*
|
80 |
* @since 5.0.0
|
81 |
-
*
|
82 |
* @param {jQuery} container Which element we are going to clean up
|
83 |
-
*
|
84 |
* @return {void}
|
85 |
*/
|
86 |
obj.cleanup = function( container ) {
|
@@ -95,12 +83,9 @@ tribe.tickets.rsvp.manager = {};
|
|
95 |
* Setup the container for RSVP management
|
96 |
*
|
97 |
* @since 5.0.0
|
98 |
-
*
|
99 |
* @todo Requirement to setup other JS modules after hijacking Click and Submit
|
100 |
-
*
|
101 |
-
* @param {integer} index jQuery.each index param
|
102 |
* @param {Element|jQuery} container Which element we are going to setup
|
103 |
-
*
|
104 |
* @return {void}
|
105 |
*/
|
106 |
obj.setup = function( index, container ) {
|
@@ -115,10 +100,8 @@ tribe.tickets.rsvp.manager = {};
|
|
115 |
* Performs an AJAX request.
|
116 |
*
|
117 |
* @since 5.0.0
|
118 |
-
*
|
119 |
* @param {object} data DOM Event related to the Click action
|
120 |
* @param {Element|jQuery} $container Which container we are dealing with
|
121 |
-
*
|
122 |
* @return {void}
|
123 |
*/
|
124 |
obj.request = function( data, $container ) {
|
@@ -134,13 +117,10 @@ tribe.tickets.rsvp.manager = {};
|
|
134 |
* Gets the jQuery.ajax() settings provided a views container
|
135 |
*
|
136 |
* @since 5.0.0
|
137 |
-
*
|
138 |
* @param {Element|jQuery} $container Which container we are dealing with.
|
139 |
-
*
|
140 |
-
* @return {Object} ajaxSettings
|
141 |
*/
|
142 |
obj.getAjaxSettings = function( $container ) {
|
143 |
-
|
144 |
const ajaxSettings = {
|
145 |
url: TribeRsvp.ajaxurl,
|
146 |
method: 'POST',
|
@@ -162,10 +142,8 @@ tribe.tickets.rsvp.manager = {};
|
|
162 |
* Context with the RSVP container used to fire this AJAX call
|
163 |
*
|
164 |
* @since 5.0.0
|
165 |
-
*
|
166 |
* @param {jqXHR} jqXHR Request object
|
167 |
-
* @param {
|
168 |
-
*
|
169 |
* @return {void}
|
170 |
*/
|
171 |
obj.ajaxBeforeSend = function( jqXHR, settings ) {
|
@@ -186,10 +164,8 @@ tribe.tickets.rsvp.manager = {};
|
|
186 |
* Context with the RSVP container used to fire this AJAX call
|
187 |
*
|
188 |
* @since 5.0.0
|
189 |
-
*
|
190 |
* @param {jqXHR} jqXHR Request object
|
191 |
-
* @param {
|
192 |
-
*
|
193 |
* @return {void}
|
194 |
*/
|
195 |
obj.ajaxComplete = function( jqXHR, textStatus ) {
|
@@ -214,11 +190,9 @@ tribe.tickets.rsvp.manager = {};
|
|
214 |
* Context with the RSVP container used to fire this AJAX call
|
215 |
*
|
216 |
* @since 5.0.0
|
217 |
-
*
|
218 |
-
* @param {
|
219 |
-
* @param {String} textStatus Status for the request
|
220 |
* @param {jqXHR} jqXHR Request object
|
221 |
-
*
|
222 |
* @return {void}
|
223 |
*/
|
224 |
obj.ajaxSuccess = function( response, textStatus, jqXHR ) {
|
@@ -261,10 +235,8 @@ tribe.tickets.rsvp.manager = {};
|
|
261 |
* Context with the RSVP container used to fire this AJAX call
|
262 |
*
|
263 |
* @since 5.0.0
|
264 |
-
*
|
265 |
* @param {jqXHR} jqXHR Request object
|
266 |
-
* @param {
|
267 |
-
*
|
268 |
* @return {void}
|
269 |
*/
|
270 |
obj.ajaxError = function( jqXHR, settings ) {
|
@@ -279,7 +251,6 @@ tribe.tickets.rsvp.manager = {};
|
|
279 |
* Handles the initialization of the manager when Document is ready.
|
280 |
*
|
281 |
* @since 5.0.0
|
282 |
-
*
|
283 |
* @return {void}
|
284 |
*/
|
285 |
obj.ready = function() {
|
@@ -289,5 +260,4 @@ tribe.tickets.rsvp.manager = {};
|
|
289 |
|
290 |
// Configure on document ready.
|
291 |
$( obj.ready );
|
292 |
-
|
293 |
} )( jQuery, window.underscore || window._, tribe.tickets.rsvp.manager );
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
11 |
* Configures RSVP manager Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.0
|
14 |
+
* @type {object}
|
|
|
15 |
*/
|
16 |
tribe.tickets.rsvp.manager = {};
|
17 |
|
19 |
* Initializes in a Strict env the code that manages the RSVP Manager
|
20 |
*
|
21 |
* @since 5.0.0
|
22 |
+
* @param {object} $ jQuery
|
23 |
+
* @param {object} _ Underscore.js
|
24 |
+
* @param {object} obj tribe.tickets.rsvp.manager
|
|
|
|
|
25 |
* @return {void}
|
26 |
*/
|
27 |
( function( $, _, obj ) {
|
|
|
|
|
28 |
/**
|
29 |
* Selectors used for configuration and setup
|
30 |
*
|
31 |
* @since 5.0.0
|
32 |
+
* @type {object}
|
|
|
33 |
*/
|
34 |
obj.selectors = {
|
35 |
container: '.tribe-tickets__rsvp-wrapper',
|
42 |
* Stores the current ajax request been handled by the manager.
|
43 |
*
|
44 |
* @since 5.0.0
|
|
|
45 |
* @type {jqXHR|null}
|
46 |
*/
|
47 |
obj.currentAjaxRequest = null;
|
50 |
* Containers on the current page that were initialized.
|
51 |
*
|
52 |
* @since 5.0.0
|
|
|
53 |
* @type {jQuery}
|
54 |
*/
|
55 |
obj.$containers = $();
|
58 |
* Saves all the containers in the page into the object.
|
59 |
*
|
60 |
* @since 5.0.0
|
|
|
61 |
* @return {void}
|
62 |
*/
|
63 |
obj.selectContainers = function() {
|
68 |
* Clean up the container and event listeners
|
69 |
*
|
70 |
* @since 5.0.0
|
|
|
71 |
* @param {jQuery} container Which element we are going to clean up
|
|
|
72 |
* @return {void}
|
73 |
*/
|
74 |
obj.cleanup = function( container ) {
|
83 |
* Setup the container for RSVP management
|
84 |
*
|
85 |
* @since 5.0.0
|
|
|
86 |
* @todo Requirement to setup other JS modules after hijacking Click and Submit
|
87 |
+
* @param {number} index jQuery.each index param
|
|
|
88 |
* @param {Element|jQuery} container Which element we are going to setup
|
|
|
89 |
* @return {void}
|
90 |
*/
|
91 |
obj.setup = function( index, container ) {
|
100 |
* Performs an AJAX request.
|
101 |
*
|
102 |
* @since 5.0.0
|
|
|
103 |
* @param {object} data DOM Event related to the Click action
|
104 |
* @param {Element|jQuery} $container Which container we are dealing with
|
|
|
105 |
* @return {void}
|
106 |
*/
|
107 |
obj.request = function( data, $container ) {
|
117 |
* Gets the jQuery.ajax() settings provided a views container
|
118 |
*
|
119 |
* @since 5.0.0
|
|
|
120 |
* @param {Element|jQuery} $container Which container we are dealing with.
|
121 |
+
* @return {object} ajaxSettings
|
|
|
122 |
*/
|
123 |
obj.getAjaxSettings = function( $container ) {
|
|
|
124 |
const ajaxSettings = {
|
125 |
url: TribeRsvp.ajaxurl,
|
126 |
method: 'POST',
|
142 |
* Context with the RSVP container used to fire this AJAX call
|
143 |
*
|
144 |
* @since 5.0.0
|
|
|
145 |
* @param {jqXHR} jqXHR Request object
|
146 |
+
* @param {object} settings Settings that this request will be made with
|
|
|
147 |
* @return {void}
|
148 |
*/
|
149 |
obj.ajaxBeforeSend = function( jqXHR, settings ) {
|
164 |
* Context with the RSVP container used to fire this AJAX call
|
165 |
*
|
166 |
* @since 5.0.0
|
|
|
167 |
* @param {jqXHR} jqXHR Request object
|
168 |
+
* @param {string} textStatus Status for the request
|
|
|
169 |
* @return {void}
|
170 |
*/
|
171 |
obj.ajaxComplete = function( jqXHR, textStatus ) {
|
190 |
* Context with the RSVP container used to fire this AJAX call
|
191 |
*
|
192 |
* @since 5.0.0
|
193 |
+
* @param {object} response Response sent from the AJAX response.
|
194 |
+
* @param {string} textStatus Status for the request
|
|
|
195 |
* @param {jqXHR} jqXHR Request object
|
|
|
196 |
* @return {void}
|
197 |
*/
|
198 |
obj.ajaxSuccess = function( response, textStatus, jqXHR ) {
|
235 |
* Context with the RSVP container used to fire this AJAX call
|
236 |
*
|
237 |
* @since 5.0.0
|
|
|
238 |
* @param {jqXHR} jqXHR Request object
|
239 |
+
* @param {object} settings Settings that this request was made with
|
|
|
240 |
* @return {void}
|
241 |
*/
|
242 |
obj.ajaxError = function( jqXHR, settings ) {
|
251 |
* Handles the initialization of the manager when Document is ready.
|
252 |
*
|
253 |
* @since 5.0.0
|
|
|
254 |
* @return {void}
|
255 |
*/
|
256 |
obj.ready = function() {
|
260 |
|
261 |
// Configure on document ready.
|
262 |
$( obj.ready );
|
|
|
263 |
} )( jQuery, window.underscore || window._, tribe.tickets.rsvp.manager );
|
src/resources/js/v2/rsvp-tooltip.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
@@ -12,8 +11,7 @@ tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
|
12 |
* Configures RSVP Tooltip Object in the Global Tribe variable
|
13 |
*
|
14 |
* @since 5.0.0
|
15 |
-
*
|
16 |
-
* @type {PlainObject}
|
17 |
*/
|
18 |
tribe.tickets.rsvp.tooltip = {};
|
19 |
|
@@ -21,22 +19,18 @@ tribe.tickets.rsvp.tooltip = {};
|
|
21 |
* Initializes in a Strict env the code that manages the RSVP Tooltip
|
22 |
*
|
23 |
* @since 5.0.0
|
24 |
-
*
|
25 |
-
* @param {
|
26 |
-
* @param {PlainObject} obj tribe.tickets.rsvp.tooltip
|
27 |
-
*
|
28 |
* @return {void}
|
29 |
*/
|
30 |
( function( $, obj ) {
|
31 |
-
|
32 |
-
var $document = $( document );
|
33 |
|
34 |
/**
|
35 |
* Config used for tooltip setup.
|
36 |
*
|
37 |
* @since 5.0.0
|
38 |
-
*
|
39 |
-
* @type {PlainObject}
|
40 |
*/
|
41 |
obj.config = {
|
42 |
delayHoverIn: 300,
|
@@ -47,8 +41,7 @@ tribe.tickets.rsvp.tooltip = {};
|
|
47 |
* Selectors used for configuration and setup.
|
48 |
*
|
49 |
* @since 5.0.0
|
50 |
-
*
|
51 |
-
* @type {PlainObject}
|
52 |
*/
|
53 |
obj.selectors = {
|
54 |
tooltipTrigger: '[data-js~="tribe-tickets-tooltip"]',
|
@@ -63,9 +56,7 @@ tribe.tickets.rsvp.tooltip = {};
|
|
63 |
* Handle tooltip focus event.
|
64 |
*
|
65 |
* @since 5.0.0
|
66 |
-
*
|
67 |
* @param {Event} event event object
|
68 |
-
*
|
69 |
* @return {void}
|
70 |
*/
|
71 |
obj.handleOriginFocus = function( event ) {
|
@@ -73,7 +64,7 @@ tribe.tickets.rsvp.tooltip = {};
|
|
73 |
if (
|
74 |
event.data.target.is( ':focus' ) ||
|
75 |
event.data.target.hasClass(
|
76 |
-
obj.selectors.tribeTicketsRsvpTooltipTriggerHoverClass.className()
|
77 |
)
|
78 |
) {
|
79 |
event.data.target.tooltipster( 'open' );
|
@@ -85,9 +76,7 @@ tribe.tickets.rsvp.tooltip = {};
|
|
85 |
* Handle tooltip blur event.
|
86 |
*
|
87 |
* @since 5.0.0
|
88 |
-
*
|
89 |
* @param {Event} event event object
|
90 |
-
*
|
91 |
* @return {void}
|
92 |
*/
|
93 |
obj.handleOriginBlur = function( event ) {
|
@@ -98,14 +87,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
98 |
* Handle origin mouseenter and touchstart events.
|
99 |
*
|
100 |
* @since 5.0.0
|
101 |
-
*
|
102 |
* @param {Event} event event object
|
103 |
-
*
|
104 |
* @return {void}
|
105 |
*/
|
106 |
obj.handleOriginHoverIn = function( event ) {
|
107 |
event.data.target.addClass(
|
108 |
-
obj.selectors.tribeTicketsRsvpTooltipTriggerHoverClass.className()
|
109 |
);
|
110 |
};
|
111 |
|
@@ -113,14 +100,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
113 |
* Handle origin mouseleave and touchleave events.
|
114 |
*
|
115 |
* @since 5.0.0
|
116 |
-
*
|
117 |
* @param {Event} event event object
|
118 |
-
*
|
119 |
* @return {void}
|
120 |
*/
|
121 |
obj.handleOriginHoverOut = function( event ) {
|
122 |
event.data.target.removeClass(
|
123 |
-
obj.selectors.tribeTicketsRsvpTooltipTriggerHoverClass.className()
|
124 |
);
|
125 |
};
|
126 |
|
@@ -128,14 +113,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
128 |
* Handle tooltip mouseenter and touchstart event.
|
129 |
*
|
130 |
* @since 5.0.0
|
131 |
-
*
|
132 |
* @param {Event} event event object
|
133 |
-
*
|
134 |
* @return {void}
|
135 |
*/
|
136 |
obj.handleTooltipHoverIn = function( event ) {
|
137 |
event.data.target.addClass(
|
138 |
-
obj.selectors.tribeTicketsRsvpTooltipThemeHoverClass.className()
|
139 |
);
|
140 |
};
|
141 |
|
@@ -143,14 +126,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
143 |
* Handle tooltip mouseleave and touchleave events.
|
144 |
*
|
145 |
* @since 5.0.0
|
146 |
-
*
|
147 |
* @param {Event} event event object
|
148 |
-
*
|
149 |
* @return {void}
|
150 |
*/
|
151 |
obj.handleTooltipHoverOut = function( event ) {
|
152 |
event.data.target.removeClass(
|
153 |
-
obj.selectors.tribeTicketsRsvpTooltipThemeHoverClass.className()
|
154 |
);
|
155 |
};
|
156 |
|
@@ -158,14 +139,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
158 |
* Handle tooltip instance closing event.
|
159 |
*
|
160 |
* @since 5.0.0
|
161 |
-
*
|
162 |
* @param {Event} event event object
|
163 |
-
*
|
164 |
* @return {void}
|
165 |
*/
|
166 |
obj.handleInstanceClose = function( event ) {
|
167 |
-
|
168 |
-
|
169 |
|
170 |
// if trigger is focused, hovered, or tooltip is hovered, do not close tooltip
|
171 |
if (
|
@@ -181,9 +160,7 @@ tribe.tickets.rsvp.tooltip = {};
|
|
181 |
* Handle tooltip instance close event.
|
182 |
*
|
183 |
* @since 5.0.0
|
184 |
-
*
|
185 |
* @param {Event} event event object
|
186 |
-
*
|
187 |
* @return {void}
|
188 |
*/
|
189 |
obj.handleInstanceClosing = function( event ) {
|
@@ -197,14 +174,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
197 |
* A custom function to be fired only once at instantiation.
|
198 |
*
|
199 |
* @since 5.0.0
|
200 |
-
*
|
201 |
-
* @param {
|
202 |
-
* @param {PlainObject} helper helper object with tooltip origin
|
203 |
-
*
|
204 |
* @return {void}
|
205 |
*/
|
206 |
obj.onFunctionInit = function( instance, helper ) {
|
207 |
-
|
208 |
$origin
|
209 |
.on( 'focus', { target: $origin }, obj.handleOriginFocus )
|
210 |
.on( 'blur', { target: $origin }, obj.handleOriginBlur )
|
@@ -220,14 +195,12 @@ tribe.tickets.rsvp.tooltip = {};
|
|
220 |
* A custom function to be fired when the tooltip and its contents have been added to the DOM.
|
221 |
*
|
222 |
* @since 5.0.0
|
223 |
-
*
|
224 |
-
* @param {
|
225 |
-
* @param {PlainObject} helper helper object with tooltip origin
|
226 |
-
*
|
227 |
* @return {void}
|
228 |
*/
|
229 |
obj.onFunctionReady = function( instance, helper ) {
|
230 |
-
|
231 |
$tooltip
|
232 |
.on( 'mouseenter touchstart', { target: $tooltip }, obj.handleTooltipHoverIn )
|
233 |
.on( 'mouseleave touchleave', { target: $tooltip }, obj.handleTooltipHoverOut );
|
@@ -237,9 +210,7 @@ tribe.tickets.rsvp.tooltip = {};
|
|
237 |
* Deinitialize accessible tooltips via tooltipster.
|
238 |
*
|
239 |
* @since 5.0.0
|
240 |
-
*
|
241 |
* @param {jQuery} $container jQuery object of view container.
|
242 |
-
*
|
243 |
* @return {void}
|
244 |
*/
|
245 |
obj.deinitTooltips = function( $container ) {
|
@@ -257,13 +228,11 @@ tribe.tickets.rsvp.tooltip = {};
|
|
257 |
* Initialize accessible tooltips via tooltipster.
|
258 |
*
|
259 |
* @since 5.0.0
|
260 |
-
*
|
261 |
* @param {jQuery} $container jQuery object of RSVP container.
|
262 |
-
*
|
263 |
* @return {void}
|
264 |
*/
|
265 |
obj.initTooltips = function( $container ) {
|
266 |
-
|
267 |
|
268 |
$container
|
269 |
.find( obj.selectors.tooltipTrigger )
|
@@ -284,15 +253,13 @@ tribe.tickets.rsvp.tooltip = {};
|
|
284 |
* Initialize tooltip theme.
|
285 |
*
|
286 |
* @since 5.0.0
|
287 |
-
*
|
288 |
* @param {jQuery} $container jQuery object of RSVP container.
|
289 |
-
*
|
290 |
* @return {void}
|
291 |
*/
|
292 |
obj.initTheme = function( $container ) {
|
293 |
$container.trigger( 'beforeTooltipInitTheme.tribeTicketsRsvp', [ $container ] );
|
294 |
|
295 |
-
|
296 |
obj.selectors.tribeTicketsRsvpTooltipThemeClass.className(),
|
297 |
obj.selectors.tribeCommonClass.className(),
|
298 |
obj.selectors.tribeTicketsClass.className(),
|
@@ -306,15 +273,13 @@ tribe.tickets.rsvp.tooltip = {};
|
|
306 |
* Deinitialize tooltip JS.
|
307 |
*
|
308 |
* @since 5.0.0
|
309 |
-
*
|
310 |
-
* @param {
|
311 |
-
* @param {
|
312 |
-
* @param {PlainObject} settings Settings that this request was made with
|
313 |
-
*
|
314 |
* @return {void}
|
315 |
*/
|
316 |
obj.deinit = function( event, jqXHR, settings ) { // eslint-disable-line no-unused-vars
|
317 |
-
|
318 |
obj.deinitTooltips( $container );
|
319 |
$container.off( 'beforeAjaxSuccess.tribeTicketsRsvp', obj.deinit );
|
320 |
};
|
@@ -323,11 +288,9 @@ tribe.tickets.rsvp.tooltip = {};
|
|
323 |
* Initialize tooltips JS.
|
324 |
*
|
325 |
* @since 5.0.0
|
326 |
-
*
|
327 |
* @param {Event} event event object for 'afterSetup.tribeTicketsRsvp' event
|
328 |
-
* @param {
|
329 |
* @param {jQuery} $container jQuery object of view container.
|
330 |
-
*
|
331 |
* @return {void}
|
332 |
*/
|
333 |
obj.init = function( event, index, $container ) {
|
@@ -340,14 +303,13 @@ tribe.tickets.rsvp.tooltip = {};
|
|
340 |
* Handles the initialization of the scripts when Document is ready.
|
341 |
*
|
342 |
* @since 5.0.0
|
343 |
-
*
|
344 |
* @return {void}
|
345 |
*/
|
346 |
obj.ready = function() {
|
347 |
$document.on(
|
348 |
'afterSetup.tribeTicketsRsvp',
|
349 |
tribe.tickets.rsvp.manager.selectors.container,
|
350 |
-
obj.init
|
351 |
);
|
352 |
};
|
353 |
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.0
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
tribe.tickets.rsvp = tribe.tickets.rsvp || {};
|
11 |
* Configures RSVP Tooltip Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.0
|
14 |
+
* @type {object}
|
|
|
15 |
*/
|
16 |
tribe.tickets.rsvp.tooltip = {};
|
17 |
|
19 |
* Initializes in a Strict env the code that manages the RSVP Tooltip
|
20 |
*
|
21 |
* @since 5.0.0
|
22 |
+
* @param {object} $ jQuery
|
23 |
+
* @param {object} obj tribe.tickets.rsvp.tooltip
|
|
|
|
|
24 |
* @return {void}
|
25 |
*/
|
26 |
( function( $, obj ) {
|
27 |
+
const $document = $( document );
|
|
|
28 |
|
29 |
/**
|
30 |
* Config used for tooltip setup.
|
31 |
*
|
32 |
* @since 5.0.0
|
33 |
+
* @type {object}
|
|
|
34 |
*/
|
35 |
obj.config = {
|
36 |
delayHoverIn: 300,
|
41 |
* Selectors used for configuration and setup.
|
42 |
*
|
43 |
* @since 5.0.0
|
44 |
+
* @type {object}
|
|
|
45 |
*/
|
46 |
obj.selectors = {
|
47 |
tooltipTrigger: '[data-js~="tribe-tickets-tooltip"]',
|
56 |
* Handle tooltip focus event.
|
57 |
*
|
58 |
* @since 5.0.0
|
|
|
59 |
* @param {Event} event event object
|
|
|
60 |
* @return {void}
|
61 |
*/
|
62 |
obj.handleOriginFocus = function( event ) {
|
64 |
if (
|
65 |
event.data.target.is( ':focus' ) ||
|
66 |
event.data.target.hasClass(
|
67 |
+
obj.selectors.tribeTicketsRsvpTooltipTriggerHoverClass.className(),
|
68 |
)
|
69 |
) {
|
70 |
event.data.target.tooltipster( 'open' );
|
76 |
* Handle tooltip blur event.
|
77 |
*
|
78 |
* @since 5.0.0
|
|
|
79 |
* @param {Event} event event object
|
|
|
80 |
* @return {void}
|
81 |
*/
|
82 |
obj.handleOriginBlur = function( event ) {
|
87 |
* Handle origin mouseenter and touchstart events.
|
88 |
*
|
89 |
* @since 5.0.0
|
|
|
90 |
* @param {Event} event event object
|
|
|
91 |
* @return {void}
|
92 |
*/
|
93 |
obj.handleOriginHoverIn = function( event ) {
|
94 |
event.data.target.addClass(
|
95 |
+
obj.selectors.tribeTicketsRsvpTooltipTriggerHoverClass.className(),
|
96 |
);
|
97 |
};
|
98 |
|
100 |
* Handle origin mouseleave and touchleave events.
|
101 |
*
|
102 |
* @since 5.0.0
|
|
|
103 |
* @param {Event} event event object
|
|
|
104 |
* @return {void}
|
105 |
*/
|
106 |
obj.handleOriginHoverOut = function( event ) {
|
107 |
event.data.target.removeClass(
|
108 |
+
obj.selectors.tribeTicketsRsvpTooltipTriggerHoverClass.className(),
|
109 |
);
|
110 |
};
|
111 |
|
113 |
* Handle tooltip mouseenter and touchstart event.
|
114 |
*
|
115 |
* @since 5.0.0
|
|
|
116 |
* @param {Event} event event object
|
|
|
117 |
* @return {void}
|
118 |
*/
|
119 |
obj.handleTooltipHoverIn = function( event ) {
|
120 |
event.data.target.addClass(
|
121 |
+
obj.selectors.tribeTicketsRsvpTooltipThemeHoverClass.className(),
|
122 |
);
|
123 |
};
|
124 |
|
126 |
* Handle tooltip mouseleave and touchleave events.
|
127 |
*
|
128 |
* @since 5.0.0
|
|
|
129 |
* @param {Event} event event object
|
|
|
130 |
* @return {void}
|
131 |
*/
|
132 |
obj.handleTooltipHoverOut = function( event ) {
|
133 |
event.data.target.removeClass(
|
134 |
+
obj.selectors.tribeTicketsRsvpTooltipThemeHoverClass.className(),
|
135 |
);
|
136 |
};
|
137 |
|
139 |
* Handle tooltip instance closing event.
|
140 |
*
|
141 |
* @since 5.0.0
|
|
|
142 |
* @param {Event} event event object
|
|
|
143 |
* @return {void}
|
144 |
*/
|
145 |
obj.handleInstanceClose = function( event ) {
|
146 |
+
const $origin = event.data.origin;
|
147 |
+
const $tooltip = $( event.tooltip );
|
148 |
|
149 |
// if trigger is focused, hovered, or tooltip is hovered, do not close tooltip
|
150 |
if (
|
160 |
* Handle tooltip instance close event.
|
161 |
*
|
162 |
* @since 5.0.0
|
|
|
163 |
* @param {Event} event event object
|
|
|
164 |
* @return {void}
|
165 |
*/
|
166 |
obj.handleInstanceClosing = function( event ) {
|
174 |
* A custom function to be fired only once at instantiation.
|
175 |
*
|
176 |
* @since 5.0.0
|
177 |
+
* @param {Function} instance instance of Tooltipster
|
178 |
+
* @param {object} helper helper object with tooltip origin
|
|
|
|
|
179 |
* @return {void}
|
180 |
*/
|
181 |
obj.onFunctionInit = function( instance, helper ) {
|
182 |
+
const $origin = $( helper.origin );
|
183 |
$origin
|
184 |
.on( 'focus', { target: $origin }, obj.handleOriginFocus )
|
185 |
.on( 'blur', { target: $origin }, obj.handleOriginBlur )
|
195 |
* A custom function to be fired when the tooltip and its contents have been added to the DOM.
|
196 |
*
|
197 |
* @since 5.0.0
|
198 |
+
* @param {Function} instance instance of Tooltipster
|
199 |
+
* @param {object} helper helper object with tooltip origin
|
|
|
|
|
200 |
* @return {void}
|
201 |
*/
|
202 |
obj.onFunctionReady = function( instance, helper ) {
|
203 |
+
const $tooltip = $( helper.tooltip );
|
204 |
$tooltip
|
205 |
.on( 'mouseenter touchstart', { target: $tooltip }, obj.handleTooltipHoverIn )
|
206 |
.on( 'mouseleave touchleave', { target: $tooltip }, obj.handleTooltipHoverOut );
|
210 |
* Deinitialize accessible tooltips via tooltipster.
|
211 |
*
|
212 |
* @since 5.0.0
|
|
|
213 |
* @param {jQuery} $container jQuery object of view container.
|
|
|
214 |
* @return {void}
|
215 |
*/
|
216 |
obj.deinitTooltips = function( $container ) {
|
228 |
* Initialize accessible tooltips via tooltipster.
|
229 |
*
|
230 |
* @since 5.0.0
|
|
|
231 |
* @param {jQuery} $container jQuery object of RSVP container.
|
|
|
232 |
* @return {void}
|
233 |
*/
|
234 |
obj.initTooltips = function( $container ) {
|
235 |
+
const theme = $container.data( 'tribeTicketsRsvpTooltipTheme' );
|
236 |
|
237 |
$container
|
238 |
.find( obj.selectors.tooltipTrigger )
|
253 |
* Initialize tooltip theme.
|
254 |
*
|
255 |
* @since 5.0.0
|
|
|
256 |
* @param {jQuery} $container jQuery object of RSVP container.
|
|
|
257 |
* @return {void}
|
258 |
*/
|
259 |
obj.initTheme = function( $container ) {
|
260 |
$container.trigger( 'beforeTooltipInitTheme.tribeTicketsRsvp', [ $container ] );
|
261 |
|
262 |
+
const theme = [
|
263 |
obj.selectors.tribeTicketsRsvpTooltipThemeClass.className(),
|
264 |
obj.selectors.tribeCommonClass.className(),
|
265 |
obj.selectors.tribeTicketsClass.className(),
|
273 |
* Deinitialize tooltip JS.
|
274 |
*
|
275 |
* @since 5.0.0
|
276 |
+
* @param {Event} event event object for 'beforeAjaxSuccess.tribeTicketsRsvp' event
|
277 |
+
* @param {jqXHR} jqXHR Request object
|
278 |
+
* @param {object} settings Settings that this request was made with
|
|
|
|
|
279 |
* @return {void}
|
280 |
*/
|
281 |
obj.deinit = function( event, jqXHR, settings ) { // eslint-disable-line no-unused-vars
|
282 |
+
const $container = event.data.container;
|
283 |
obj.deinitTooltips( $container );
|
284 |
$container.off( 'beforeAjaxSuccess.tribeTicketsRsvp', obj.deinit );
|
285 |
};
|
288 |
* Initialize tooltips JS.
|
289 |
*
|
290 |
* @since 5.0.0
|
|
|
291 |
* @param {Event} event event object for 'afterSetup.tribeTicketsRsvp' event
|
292 |
+
* @param {number} index jQuery.each index param from 'afterSetup.tribeTicketsRsvp' event.
|
293 |
* @param {jQuery} $container jQuery object of view container.
|
|
|
294 |
* @return {void}
|
295 |
*/
|
296 |
obj.init = function( event, index, $container ) {
|
303 |
* Handles the initialization of the scripts when Document is ready.
|
304 |
*
|
305 |
* @since 5.0.0
|
|
|
306 |
* @return {void}
|
307 |
*/
|
308 |
obj.ready = function() {
|
309 |
$document.on(
|
310 |
'afterSetup.tribeTicketsRsvp',
|
311 |
tribe.tickets.rsvp.manager.selectors.container,
|
312 |
+
obj.init,
|
313 |
);
|
314 |
};
|
315 |
|
src/resources/js/v2/tickets-block.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
|
@@ -11,8 +10,7 @@ tribe.tickets = tribe.tickets || {};
|
|
11 |
* Configures Tickets Block Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.3
|
14 |
-
*
|
15 |
-
* @type {PlainObject}
|
16 |
*/
|
17 |
tribe.tickets.block = {
|
18 |
num_attendees: 0,
|
@@ -23,14 +21,11 @@ tribe.tickets.block = {
|
|
23 |
* Initializes in a Strict env the code that manages the Tickets Block
|
24 |
*
|
25 |
* @since 5.0.3
|
26 |
-
*
|
27 |
-
* @param {
|
28 |
-
* @param {PlainObject} obj tribe.tickets.block
|
29 |
-
*
|
30 |
* @return {void}
|
31 |
*/
|
32 |
( function( $, obj ) {
|
33 |
-
'use strict';
|
34 |
const $document = $( document );
|
35 |
|
36 |
/**
|
@@ -86,9 +81,7 @@ tribe.tickets.block = {
|
|
86 |
* Make DOM updates for the AJAX response.
|
87 |
*
|
88 |
* @since 5.0.3
|
89 |
-
*
|
90 |
-
* @param {array} tickets Array of tickets to iterate over.
|
91 |
-
*
|
92 |
* @return {void}
|
93 |
*/
|
94 |
obj.updateAvailability = function( tickets ) {
|
@@ -122,9 +115,7 @@ tribe.tickets.block = {
|
|
122 |
* Update all the footer info.
|
123 |
*
|
124 |
* @since 5.0.3
|
125 |
-
*
|
126 |
* @param {jQuery} $form The form we're updating.
|
127 |
-
*
|
128 |
* @return {void}
|
129 |
*/
|
130 |
obj.updateFooter = function( $form ) {
|
@@ -140,7 +131,6 @@ tribe.tickets.block = {
|
|
140 |
* Adjust the footer count for +/-.
|
141 |
*
|
142 |
* @since 5.0.3
|
143 |
-
*
|
144 |
* @param {object} $form The form we're updating.
|
145 |
*/
|
146 |
obj.updateFooterCount = function( $form ) {
|
@@ -177,9 +167,7 @@ tribe.tickets.block = {
|
|
177 |
* Get tickets block provider.
|
178 |
*
|
179 |
* @since 5.0.3
|
180 |
-
*
|
181 |
* @param {jQuery} $form The form we want to retrieve the provider from.
|
182 |
-
*
|
183 |
* @return {string} The provider.
|
184 |
*/
|
185 |
obj.getTicketsBlockProvider = function( $form ) {
|
@@ -190,7 +178,6 @@ tribe.tickets.block = {
|
|
190 |
* Adjust the footer total/amount for +/-.
|
191 |
*
|
192 |
* @since 5.0.3
|
193 |
-
*
|
194 |
* @param {object} $form The form we're updating.
|
195 |
*/
|
196 |
obj.updateFooterAmount = function( $form ) {
|
@@ -226,9 +213,7 @@ tribe.tickets.block = {
|
|
226 |
* Update form totals.
|
227 |
*
|
228 |
* @since 5.0.3
|
229 |
-
*
|
230 |
* @param {jQuery} $form The jQuery form object to update totals.
|
231 |
-
*
|
232 |
* @return {void}
|
233 |
*/
|
234 |
obj.updateFormTotals = function( $form ) {
|
@@ -243,14 +228,13 @@ tribe.tickets.block = {
|
|
243 |
* Get the tickets IDs.
|
244 |
*
|
245 |
* @since 5.0.3
|
246 |
-
*
|
247 |
-
* @returns {array} Array of tickets IDs.
|
248 |
*/
|
249 |
obj.getTickets = function() {
|
250 |
const $tickets = $( obj.selectors.item ).map(
|
251 |
function() {
|
252 |
return $( this ).data( 'ticket-id' );
|
253 |
-
}
|
254 |
).get();
|
255 |
|
256 |
return $tickets;
|
@@ -260,10 +244,8 @@ tribe.tickets.block = {
|
|
260 |
* Maybe display the Opt Out.
|
261 |
*
|
262 |
* @since 5.0.3
|
263 |
-
*
|
264 |
* @param {jQuery} $ticket The ticket item element.
|
265 |
* @param {number} newQuantity The new ticket quantity.
|
266 |
-
*
|
267 |
* @return {void}
|
268 |
*/
|
269 |
obj.maybeShowOptOut = function( $ticket, newQuantity ) {
|
@@ -279,12 +261,31 @@ tribe.tickets.block = {
|
|
279 |
}
|
280 |
};
|
281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
/**
|
283 |
* Step up the input according to the button that was clicked.
|
284 |
* Handles IE/Edge.
|
285 |
*
|
286 |
* @since 5.0.3
|
287 |
-
*
|
288 |
* @param {jQuery} $input The input field.
|
289 |
* @param {number} originalValue The field's original value.
|
290 |
*/
|
@@ -322,6 +323,9 @@ tribe.tickets.block = {
|
|
322 |
} else {
|
323 |
$input.val( newValue );
|
324 |
}
|
|
|
|
|
|
|
325 |
};
|
326 |
|
327 |
/**
|
@@ -329,7 +333,6 @@ tribe.tickets.block = {
|
|
329 |
* Handles IE/Edge.
|
330 |
*
|
331 |
* @since 5.0.3
|
332 |
-
*
|
333 |
* @param {jQuery} $input The input field.
|
334 |
* @param {number} originalValue The field's original value.
|
335 |
*/
|
@@ -349,6 +352,9 @@ tribe.tickets.block = {
|
|
349 |
} else {
|
350 |
$input[ 0 ].value = decrease;
|
351 |
}
|
|
|
|
|
|
|
352 |
};
|
353 |
|
354 |
/**
|
@@ -379,7 +385,7 @@ tribe.tickets.block = {
|
|
379 |
|
380 |
// Make DOM updates.
|
381 |
obj.updateAvailability( tickets );
|
382 |
-
}
|
383 |
);
|
384 |
|
385 |
// Repeat every 60 ( filterable via tribe_tickets_availability_check_interval ) seconds.
|
@@ -393,12 +399,10 @@ tribe.tickets.block = {
|
|
393 |
* limits it to the shared cap minus any tickets in cart.
|
394 |
*
|
395 |
* @since 5.0.3
|
396 |
-
*
|
397 |
* @param {jQuery} $form jQuery object that is the form we are checking.
|
398 |
* @param {number} qty The quantity we desire.
|
399 |
-
* @param {
|
400 |
-
*
|
401 |
-
* @returns {integer} The quantity, limited by existing shared cap tickets.
|
402 |
*/
|
403 |
obj.checkSharedCapacity = function( $form, qty, $target ) {
|
404 |
let sharedCap = [];
|
@@ -412,39 +416,39 @@ tribe.tickets.block = {
|
|
412 |
return qty;
|
413 |
}
|
414 |
|
415 |
-
|
416 |
-
|
417 |
|
418 |
-
if ( undefined ===
|
419 |
return qty;
|
420 |
}
|
421 |
|
422 |
$sharedCapTickets.each(
|
423 |
function() {
|
424 |
currentLoad.push( parseInt( $( this ).val(), 10 ) );
|
425 |
-
}
|
426 |
);
|
427 |
|
428 |
currentLoad = currentLoad.reduce(
|
429 |
function( a, b ) {
|
430 |
return a + b;
|
431 |
},
|
432 |
-
0
|
433 |
);
|
434 |
|
435 |
$sharedTickets.each(
|
436 |
function() {
|
437 |
sharedCap.push( parseInt( $( this ).attr( 'data-available-count' ), 10 ) );
|
438 |
-
}
|
439 |
);
|
440 |
|
441 |
sharedCap = Math.max.apply( this, sharedCap );
|
442 |
|
443 |
return tribe.tickets.utils.calculateSharedCap(
|
444 |
qty,
|
445 |
-
|
446 |
sharedCap,
|
447 |
-
currentLoad
|
448 |
);
|
449 |
};
|
450 |
|
@@ -452,9 +456,7 @@ tribe.tickets.block = {
|
|
452 |
* Get the Quantity.
|
453 |
*
|
454 |
* @since 5.0.3
|
455 |
-
*
|
456 |
* @param {jQuery} $cartItem The cart item to update.
|
457 |
-
*
|
458 |
* @returns {number} The item quantity.
|
459 |
*/
|
460 |
obj.getQty = function( $cartItem ) {
|
@@ -467,9 +469,7 @@ tribe.tickets.block = {
|
|
467 |
* Get the Price.
|
468 |
*
|
469 |
* @since 5.0.3
|
470 |
-
*
|
471 |
* @param {jQuery} $item The jQuery object of the ticket item to update.
|
472 |
-
*
|
473 |
* @returns {number} The item price.
|
474 |
*/
|
475 |
obj.getPrice = function( $item ) {
|
@@ -480,10 +480,8 @@ tribe.tickets.block = {
|
|
480 |
* Get ticket data to send to cart.
|
481 |
*
|
482 |
* @since 5.0.3
|
483 |
-
*
|
484 |
* @param {jQuery} $form jQuery object of the form container.
|
485 |
-
*
|
486 |
-
* @returns {array} Tickets array of objects.
|
487 |
*/
|
488 |
obj.getTicketsForCart = function( $form ) {
|
489 |
const $ticketsForm = $form || $document;
|
@@ -512,7 +510,7 @@ tribe.tickets.block = {
|
|
512 |
data.optout = optout;
|
513 |
|
514 |
tickets.push( data );
|
515 |
-
}
|
516 |
);
|
517 |
|
518 |
return tickets;
|
@@ -522,9 +520,7 @@ tribe.tickets.block = {
|
|
522 |
* Unbinds events for add/remove ticket.
|
523 |
*
|
524 |
* @since 5.0.3
|
525 |
-
*
|
526 |
* @param {jQuery} $container jQuery object of the tickets container.
|
527 |
-
*
|
528 |
* @return {void}
|
529 |
*/
|
530 |
obj.unbindTicketsAddRemove = function( $container ) {
|
@@ -538,9 +534,7 @@ tribe.tickets.block = {
|
|
538 |
* Binds events for add/remove ticket.
|
539 |
*
|
540 |
* @since 5.0.3
|
541 |
-
*
|
542 |
* @param {jQuery} $container jQuery object of the tickets container.
|
543 |
-
*
|
544 |
* @return {void}
|
545 |
*/
|
546 |
obj.bindTicketsAddRemove = function( $container ) {
|
@@ -570,15 +564,13 @@ tribe.tickets.block = {
|
|
570 |
obj.stepDown( $input, originalValue );
|
571 |
}
|
572 |
|
573 |
-
obj.updateFooter( $input.closest( 'form' ) );
|
574 |
-
|
575 |
// Trigger the on Change for the input ( if it has changed ) as it's not handled via stepUp() || stepDown().
|
576 |
if ( originalValue !== $input[ 0 ].value ) {
|
577 |
$input.trigger( 'change' );
|
578 |
}
|
579 |
|
580 |
$document.trigger( 'afterTicketsAddRemove.tribeTicketsBlock', [ $input ] );
|
581 |
-
}
|
582 |
);
|
583 |
};
|
584 |
|
@@ -586,9 +578,7 @@ tribe.tickets.block = {
|
|
586 |
* Unbinds events for the quantity input.
|
587 |
*
|
588 |
* @since 5.0.3
|
589 |
-
*
|
590 |
* @param {jQuery} $container jQuery object of the tickets container.
|
591 |
-
*
|
592 |
* @return {void}
|
593 |
*/
|
594 |
obj.unbindTicketsQuantityInput = function( $container ) {
|
@@ -601,9 +591,7 @@ tribe.tickets.block = {
|
|
601 |
* Binds events for the quantity input.
|
602 |
*
|
603 |
* @since 5.0.3
|
604 |
-
*
|
605 |
* @param {jQuery} $container jQuery object of the tickets container.
|
606 |
-
*
|
607 |
* @return {void}
|
608 |
*/
|
609 |
obj.bindTicketsQuantityInput = function( $container ) {
|
@@ -618,7 +606,7 @@ tribe.tickets.block = {
|
|
618 |
e.stopPropagation();
|
619 |
return;
|
620 |
}
|
621 |
-
}
|
622 |
);
|
623 |
|
624 |
/**
|
@@ -660,7 +648,7 @@ tribe.tickets.block = {
|
|
660 |
obj.updateFormTotals( $form );
|
661 |
|
662 |
$document.trigger( 'afterTicketsQuantityChange.tribeTicketsBlock', [ $this ] );
|
663 |
-
}
|
664 |
);
|
665 |
};
|
666 |
|
@@ -668,9 +656,7 @@ tribe.tickets.block = {
|
|
668 |
* Toggle the ticket item description visibility.
|
669 |
*
|
670 |
* @since 5.0.3
|
671 |
-
*
|
672 |
* @param {event} event The event.
|
673 |
-
*
|
674 |
* @return {void}
|
675 |
*/
|
676 |
obj.itemDescriptionToggle = function( event ) {
|
@@ -711,25 +697,23 @@ tribe.tickets.block = {
|
|
711 |
* Binds the description toggle.
|
712 |
*
|
713 |
* @since 5.0.3
|
714 |
-
*
|
715 |
* @param {jQuery} $container jQuery object of the tickets container.
|
716 |
-
*
|
717 |
* @return {void}
|
718 |
*/
|
719 |
obj.bindDescriptionToggle = function( $container ) {
|
720 |
const $descriptionToggleButtons = $container.find(
|
721 |
-
obj.selectors.itemDescriptionButtonMore + ', ' + obj.selectors.itemDescriptionButtonLess
|
722 |
);
|
723 |
|
724 |
// Add keyboard support for enter key.
|
725 |
$descriptionToggleButtons.on(
|
726 |
'keyup',
|
727 |
-
obj.itemDescriptionToggle
|
728 |
);
|
729 |
|
730 |
$descriptionToggleButtons.on(
|
731 |
'click',
|
732 |
-
obj.itemDescriptionToggle
|
733 |
);
|
734 |
};
|
735 |
|
@@ -737,14 +721,12 @@ tribe.tickets.block = {
|
|
737 |
* Unbinds the description toggle.
|
738 |
*
|
739 |
* @since 5.0.3
|
740 |
-
*
|
741 |
* @param {jQuery} $container jQuery object of the tickets container.
|
742 |
-
*
|
743 |
* @return {void}
|
744 |
*/
|
745 |
obj.unbindDescriptionToggle = function( $container ) {
|
746 |
const $descriptionToggleButtons = $container.find(
|
747 |
-
obj.selectors.itemDescriptionButtonMore + ', ' + obj.selectors.itemDescriptionButtonLess
|
748 |
);
|
749 |
|
750 |
$descriptionToggleButtons.off();
|
@@ -754,9 +736,7 @@ tribe.tickets.block = {
|
|
754 |
* Submit the tickets block form.
|
755 |
*
|
756 |
* @since 5.0.3
|
757 |
-
*
|
758 |
* @param {jQuery} $form jQuery object of the form.
|
759 |
-
*
|
760 |
* @return {void}
|
761 |
*/
|
762 |
obj.ticketsSubmit = function( $form ) {
|
@@ -787,9 +767,7 @@ tribe.tickets.block = {
|
|
787 |
* Binds events the classic "Submit" (non-modal)
|
788 |
*
|
789 |
* @since 5.0.3
|
790 |
-
*
|
791 |
* @param {jQuery} $container jQuery object of the tickets container.
|
792 |
-
*
|
793 |
* @return {void}
|
794 |
*/
|
795 |
obj.bindTicketsSubmit = function( $container ) {
|
@@ -808,7 +786,7 @@ tribe.tickets.block = {
|
|
808 |
const $form = $container.find( obj.selectors.form );
|
809 |
|
810 |
obj.ticketsSubmit( $form );
|
811 |
-
}
|
812 |
);
|
813 |
};
|
814 |
|
@@ -816,9 +794,7 @@ tribe.tickets.block = {
|
|
816 |
* Binds events for container.
|
817 |
*
|
818 |
* @since 5.0.3
|
819 |
-
*
|
820 |
* @param {jQuery} $container jQuery object of object of the tickets container.
|
821 |
-
*
|
822 |
* @return {void}
|
823 |
*/
|
824 |
obj.bindEvents = function( $container ) {
|
@@ -840,7 +816,6 @@ tribe.tickets.block = {
|
|
840 |
* Handles the initialization of the tickets block events when Document is ready.
|
841 |
*
|
842 |
* @since 5.0.3
|
843 |
-
*
|
844 |
* @return {void}
|
845 |
*/
|
846 |
obj.ready = function() {
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
|
10 |
* Configures Tickets Block Object in the Global Tribe variable
|
11 |
*
|
12 |
* @since 5.0.3
|
13 |
+
* @type {object}
|
|
|
14 |
*/
|
15 |
tribe.tickets.block = {
|
16 |
num_attendees: 0,
|
21 |
* Initializes in a Strict env the code that manages the Tickets Block
|
22 |
*
|
23 |
* @since 5.0.3
|
24 |
+
* @param {object} $ jQuery
|
25 |
+
* @param {object} obj tribe.tickets.block
|
|
|
|
|
26 |
* @return {void}
|
27 |
*/
|
28 |
( function( $, obj ) {
|
|
|
29 |
const $document = $( document );
|
30 |
|
31 |
/**
|
81 |
* Make DOM updates for the AJAX response.
|
82 |
*
|
83 |
* @since 5.0.3
|
84 |
+
* @param {Array} tickets Array of tickets to iterate over.
|
|
|
|
|
85 |
* @return {void}
|
86 |
*/
|
87 |
obj.updateAvailability = function( tickets ) {
|
115 |
* Update all the footer info.
|
116 |
*
|
117 |
* @since 5.0.3
|
|
|
118 |
* @param {jQuery} $form The form we're updating.
|
|
|
119 |
* @return {void}
|
120 |
*/
|
121 |
obj.updateFooter = function( $form ) {
|
131 |
* Adjust the footer count for +/-.
|
132 |
*
|
133 |
* @since 5.0.3
|
|
|
134 |
* @param {object} $form The form we're updating.
|
135 |
*/
|
136 |
obj.updateFooterCount = function( $form ) {
|
167 |
* Get tickets block provider.
|
168 |
*
|
169 |
* @since 5.0.3
|
|
|
170 |
* @param {jQuery} $form The form we want to retrieve the provider from.
|
|
|
171 |
* @return {string} The provider.
|
172 |
*/
|
173 |
obj.getTicketsBlockProvider = function( $form ) {
|
178 |
* Adjust the footer total/amount for +/-.
|
179 |
*
|
180 |
* @since 5.0.3
|
|
|
181 |
* @param {object} $form The form we're updating.
|
182 |
*/
|
183 |
obj.updateFooterAmount = function( $form ) {
|
213 |
* Update form totals.
|
214 |
*
|
215 |
* @since 5.0.3
|
|
|
216 |
* @param {jQuery} $form The jQuery form object to update totals.
|
|
|
217 |
* @return {void}
|
218 |
*/
|
219 |
obj.updateFormTotals = function( $form ) {
|
228 |
* Get the tickets IDs.
|
229 |
*
|
230 |
* @since 5.0.3
|
231 |
+
* @returns {Array} Array of tickets IDs.
|
|
|
232 |
*/
|
233 |
obj.getTickets = function() {
|
234 |
const $tickets = $( obj.selectors.item ).map(
|
235 |
function() {
|
236 |
return $( this ).data( 'ticket-id' );
|
237 |
+
},
|
238 |
).get();
|
239 |
|
240 |
return $tickets;
|
244 |
* Maybe display the Opt Out.
|
245 |
*
|
246 |
* @since 5.0.3
|
|
|
247 |
* @param {jQuery} $ticket The ticket item element.
|
248 |
* @param {number} newQuantity The new ticket quantity.
|
|
|
249 |
* @return {void}
|
250 |
*/
|
251 |
obj.maybeShowOptOut = function( $ticket, newQuantity ) {
|
261 |
}
|
262 |
};
|
263 |
|
264 |
+
/**
|
265 |
+
* When multiple of the same ticket forms are on a page, sync them on change.
|
266 |
+
*
|
267 |
+
* @since TBD
|
268 |
+
* @param {jQuery} $input The ticket input being changed.
|
269 |
+
* @param {number} newValue The value being updated to.
|
270 |
+
* @return {void}
|
271 |
+
*/
|
272 |
+
obj.formMatch = function( $input, newValue ) {
|
273 |
+
const formID = $input.closest( obj.selectors.item ).attr( 'data-ticket-id' );
|
274 |
+
const $formTicket = $( '[ data-ticket-id="' + formID + '" ]' );
|
275 |
+
|
276 |
+
if ( $formTicket.length >= 2 ) {
|
277 |
+
$formTicket.each( function() {
|
278 |
+
$( this ).find( obj.selectors.itemQuantityInput ).val( newValue );
|
279 |
+
obj.updateFooter( $( this ).closest( 'form' ) );
|
280 |
+
} );
|
281 |
+
}
|
282 |
+
};
|
283 |
+
|
284 |
/**
|
285 |
* Step up the input according to the button that was clicked.
|
286 |
* Handles IE/Edge.
|
287 |
*
|
288 |
* @since 5.0.3
|
|
|
289 |
* @param {jQuery} $input The input field.
|
290 |
* @param {number} originalValue The field's original value.
|
291 |
*/
|
323 |
} else {
|
324 |
$input.val( newValue );
|
325 |
}
|
326 |
+
|
327 |
+
// If there's two of the same forms on a page, match the value of attendees on both on change.
|
328 |
+
obj.formMatch( $input, newValue );
|
329 |
};
|
330 |
|
331 |
/**
|
333 |
* Handles IE/Edge.
|
334 |
*
|
335 |
* @since 5.0.3
|
|
|
336 |
* @param {jQuery} $input The input field.
|
337 |
* @param {number} originalValue The field's original value.
|
338 |
*/
|
352 |
} else {
|
353 |
$input[ 0 ].value = decrease;
|
354 |
}
|
355 |
+
|
356 |
+
// If there's two of the same forms on a page, match the value of attendees on both on change.
|
357 |
+
obj.formMatch( $input, decrease );
|
358 |
};
|
359 |
|
360 |
/**
|
385 |
|
386 |
// Make DOM updates.
|
387 |
obj.updateAvailability( tickets );
|
388 |
+
},
|
389 |
);
|
390 |
|
391 |
// Repeat every 60 ( filterable via tribe_tickets_availability_check_interval ) seconds.
|
399 |
* limits it to the shared cap minus any tickets in cart.
|
400 |
*
|
401 |
* @since 5.0.3
|
|
|
402 |
* @param {jQuery} $form jQuery object that is the form we are checking.
|
403 |
* @param {number} qty The quantity we desire.
|
404 |
+
* @param {object} $target The ticket item that was clicked.
|
405 |
+
* @returns {number} The quantity, limited by existing shared cap tickets.
|
|
|
406 |
*/
|
407 |
obj.checkSharedCapacity = function( $form, qty, $target ) {
|
408 |
let sharedCap = [];
|
416 |
return qty;
|
417 |
}
|
418 |
|
419 |
+
const activeTicketLimit = $target.attr( 'data-available-count' );
|
420 |
+
const totalSharedCap = $target.attr( 'data-shared-cap' );
|
421 |
|
422 |
+
if ( undefined === activeTicketLimit || undefined === totalSharedCap ) {
|
423 |
return qty;
|
424 |
}
|
425 |
|
426 |
$sharedCapTickets.each(
|
427 |
function() {
|
428 |
currentLoad.push( parseInt( $( this ).val(), 10 ) );
|
429 |
+
},
|
430 |
);
|
431 |
|
432 |
currentLoad = currentLoad.reduce(
|
433 |
function( a, b ) {
|
434 |
return a + b;
|
435 |
},
|
436 |
+
0,
|
437 |
);
|
438 |
|
439 |
$sharedTickets.each(
|
440 |
function() {
|
441 |
sharedCap.push( parseInt( $( this ).attr( 'data-available-count' ), 10 ) );
|
442 |
+
},
|
443 |
);
|
444 |
|
445 |
sharedCap = Math.max.apply( this, sharedCap );
|
446 |
|
447 |
return tribe.tickets.utils.calculateSharedCap(
|
448 |
qty,
|
449 |
+
activeTicketLimit,
|
450 |
sharedCap,
|
451 |
+
currentLoad,
|
452 |
);
|
453 |
};
|
454 |
|
456 |
* Get the Quantity.
|
457 |
*
|
458 |
* @since 5.0.3
|
|
|
459 |
* @param {jQuery} $cartItem The cart item to update.
|
|
|
460 |
* @returns {number} The item quantity.
|
461 |
*/
|
462 |
obj.getQty = function( $cartItem ) {
|
469 |
* Get the Price.
|
470 |
*
|
471 |
* @since 5.0.3
|
|
|
472 |
* @param {jQuery} $item The jQuery object of the ticket item to update.
|
|
|
473 |
* @returns {number} The item price.
|
474 |
*/
|
475 |
obj.getPrice = function( $item ) {
|
480 |
* Get ticket data to send to cart.
|
481 |
*
|
482 |
* @since 5.0.3
|
|
|
483 |
* @param {jQuery} $form jQuery object of the form container.
|
484 |
+
* @returns {Array} Tickets array of objects.
|
|
|
485 |
*/
|
486 |
obj.getTicketsForCart = function( $form ) {
|
487 |
const $ticketsForm = $form || $document;
|
510 |
data.optout = optout;
|
511 |
|
512 |
tickets.push( data );
|
513 |
+
},
|
514 |
);
|
515 |
|
516 |
return tickets;
|
520 |
* Unbinds events for add/remove ticket.
|
521 |
*
|
522 |
* @since 5.0.3
|
|
|
523 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
524 |
* @return {void}
|
525 |
*/
|
526 |
obj.unbindTicketsAddRemove = function( $container ) {
|
534 |
* Binds events for add/remove ticket.
|
535 |
*
|
536 |
* @since 5.0.3
|
|
|
537 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
538 |
* @return {void}
|
539 |
*/
|
540 |
obj.bindTicketsAddRemove = function( $container ) {
|
564 |
obj.stepDown( $input, originalValue );
|
565 |
}
|
566 |
|
|
|
|
|
567 |
// Trigger the on Change for the input ( if it has changed ) as it's not handled via stepUp() || stepDown().
|
568 |
if ( originalValue !== $input[ 0 ].value ) {
|
569 |
$input.trigger( 'change' );
|
570 |
}
|
571 |
|
572 |
$document.trigger( 'afterTicketsAddRemove.tribeTicketsBlock', [ $input ] );
|
573 |
+
},
|
574 |
);
|
575 |
};
|
576 |
|
578 |
* Unbinds events for the quantity input.
|
579 |
*
|
580 |
* @since 5.0.3
|
|
|
581 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
582 |
* @return {void}
|
583 |
*/
|
584 |
obj.unbindTicketsQuantityInput = function( $container ) {
|
591 |
* Binds events for the quantity input.
|
592 |
*
|
593 |
* @since 5.0.3
|
|
|
594 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
595 |
* @return {void}
|
596 |
*/
|
597 |
obj.bindTicketsQuantityInput = function( $container ) {
|
606 |
e.stopPropagation();
|
607 |
return;
|
608 |
}
|
609 |
+
},
|
610 |
);
|
611 |
|
612 |
/**
|
648 |
obj.updateFormTotals( $form );
|
649 |
|
650 |
$document.trigger( 'afterTicketsQuantityChange.tribeTicketsBlock', [ $this ] );
|
651 |
+
},
|
652 |
);
|
653 |
};
|
654 |
|
656 |
* Toggle the ticket item description visibility.
|
657 |
*
|
658 |
* @since 5.0.3
|
|
|
659 |
* @param {event} event The event.
|
|
|
660 |
* @return {void}
|
661 |
*/
|
662 |
obj.itemDescriptionToggle = function( event ) {
|
697 |
* Binds the description toggle.
|
698 |
*
|
699 |
* @since 5.0.3
|
|
|
700 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
701 |
* @return {void}
|
702 |
*/
|
703 |
obj.bindDescriptionToggle = function( $container ) {
|
704 |
const $descriptionToggleButtons = $container.find(
|
705 |
+
obj.selectors.itemDescriptionButtonMore + ', ' + obj.selectors.itemDescriptionButtonLess,
|
706 |
);
|
707 |
|
708 |
// Add keyboard support for enter key.
|
709 |
$descriptionToggleButtons.on(
|
710 |
'keyup',
|
711 |
+
obj.itemDescriptionToggle,
|
712 |
);
|
713 |
|
714 |
$descriptionToggleButtons.on(
|
715 |
'click',
|
716 |
+
obj.itemDescriptionToggle,
|
717 |
);
|
718 |
};
|
719 |
|
721 |
* Unbinds the description toggle.
|
722 |
*
|
723 |
* @since 5.0.3
|
|
|
724 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
725 |
* @return {void}
|
726 |
*/
|
727 |
obj.unbindDescriptionToggle = function( $container ) {
|
728 |
const $descriptionToggleButtons = $container.find(
|
729 |
+
obj.selectors.itemDescriptionButtonMore + ', ' + obj.selectors.itemDescriptionButtonLess,
|
730 |
);
|
731 |
|
732 |
$descriptionToggleButtons.off();
|
736 |
* Submit the tickets block form.
|
737 |
*
|
738 |
* @since 5.0.3
|
|
|
739 |
* @param {jQuery} $form jQuery object of the form.
|
|
|
740 |
* @return {void}
|
741 |
*/
|
742 |
obj.ticketsSubmit = function( $form ) {
|
767 |
* Binds events the classic "Submit" (non-modal)
|
768 |
*
|
769 |
* @since 5.0.3
|
|
|
770 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
771 |
* @return {void}
|
772 |
*/
|
773 |
obj.bindTicketsSubmit = function( $container ) {
|
786 |
const $form = $container.find( obj.selectors.form );
|
787 |
|
788 |
obj.ticketsSubmit( $form );
|
789 |
+
},
|
790 |
);
|
791 |
};
|
792 |
|
794 |
* Binds events for container.
|
795 |
*
|
796 |
* @since 5.0.3
|
|
|
797 |
* @param {jQuery} $container jQuery object of object of the tickets container.
|
|
|
798 |
* @return {void}
|
799 |
*/
|
800 |
obj.bindEvents = function( $container ) {
|
816 |
* Handles the initialization of the tickets block events when Document is ready.
|
817 |
*
|
818 |
* @since 5.0.3
|
|
|
819 |
* @return {void}
|
820 |
*/
|
821 |
obj.ready = function() {
|
src/resources/js/v2/tickets-commerce.js
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
-
/* eslint-disable es5/no-arrow-functions */
|
2 |
/**
|
3 |
* Makes sure we have all the required levels on the Tribe Object
|
4 |
*
|
5 |
* @since 5.1.9
|
6 |
-
*
|
7 |
-
* @type {Object}
|
8 |
*/
|
9 |
tribe.tickets = tribe.tickets || {};
|
10 |
|
@@ -12,8 +10,7 @@ tribe.tickets = tribe.tickets || {};
|
|
12 |
* Configures ET Tickets Commerce Object in the Global Tribe variable
|
13 |
*
|
14 |
* @since 5.1.9
|
15 |
-
*
|
16 |
-
* @type {Object}
|
17 |
*/
|
18 |
tribe.tickets.commerce = {};
|
19 |
|
@@ -21,14 +18,11 @@ tribe.tickets.commerce = {};
|
|
21 |
* Initializes in a Strict env the code that manages the plugin tickets commerce.
|
22 |
*
|
23 |
* @since 5.1.9
|
24 |
-
*
|
25 |
-
* @param {
|
26 |
-
* @param {Object} obj tribe.tickets.commerce
|
27 |
-
*
|
28 |
* @return {void}
|
29 |
*/
|
30 |
( function( $, obj ) {
|
31 |
-
'use strict';
|
32 |
const $document = $( document );
|
33 |
|
34 |
/**
|
@@ -37,8 +31,8 @@ tribe.tickets.commerce = {};
|
|
37 |
* @since 5.1.10
|
38 |
*/
|
39 |
obj.customEvents = {
|
40 |
-
showLoader
|
41 |
-
hideLoader
|
42 |
};
|
43 |
|
44 |
/*
|
@@ -83,7 +77,7 @@ tribe.tickets.commerce = {};
|
|
83 |
*
|
84 |
* @since 5.1.10
|
85 |
*/
|
86 |
-
obj.bindLoaderEvents = function
|
87 |
$document.on( obj.customEvents.showLoader, obj.loaderShow );
|
88 |
$document.on( obj.customEvents.hideLoader, obj.loaderHide );
|
89 |
};
|
@@ -92,9 +86,7 @@ tribe.tickets.commerce = {};
|
|
92 |
* Toggle the checkout item description visibility.
|
93 |
*
|
94 |
* @since 5.1.9
|
95 |
-
*
|
96 |
* @param {event} event The event.
|
97 |
-
*
|
98 |
* @return {void}
|
99 |
*/
|
100 |
obj.checkoutItemDescriptionToggle = function( event ) {
|
@@ -135,9 +127,7 @@ tribe.tickets.commerce = {};
|
|
135 |
* Binds the checkout item description toggle.
|
136 |
*
|
137 |
* @since 5.1.9
|
138 |
-
*
|
139 |
* @param {jQuery} $container jQuery object of the tickets container.
|
140 |
-
*
|
141 |
* @return {void}
|
142 |
*/
|
143 |
obj.bindCheckoutItemDescriptionToggle = function( $container ) {
|
@@ -152,9 +142,7 @@ tribe.tickets.commerce = {};
|
|
152 |
* Unbinds the description toggle.
|
153 |
*
|
154 |
* @since 5.1.9
|
155 |
-
*
|
156 |
* @param {jQuery} $container jQuery object of the tickets container.
|
157 |
-
*
|
158 |
* @return {void}
|
159 |
*/
|
160 |
obj.unbindCheckoutItemDescriptionToggle = function( $container ) {
|
@@ -167,9 +155,7 @@ tribe.tickets.commerce = {};
|
|
167 |
* Binds events for checkout container.
|
168 |
*
|
169 |
* @since 5.1.9
|
170 |
-
*
|
171 |
* @param {jQuery} $container jQuery object of object of the tickets container.
|
172 |
-
*
|
173 |
* @return {void}
|
174 |
*/
|
175 |
obj.bindCheckoutEvents = function( $container ) {
|
@@ -188,10 +174,8 @@ tribe.tickets.commerce = {};
|
|
188 |
* Get purchaser data if available.
|
189 |
*
|
190 |
* @since 5.3.0
|
191 |
-
*
|
192 |
* @param {jQuery} $container Container for the purchaser info fields.
|
193 |
-
*
|
194 |
-
* @return {Object}
|
195 |
*/
|
196 |
obj.getPurchaserData = ( $container ) => {
|
197 |
const purchaser = {};
|
@@ -200,7 +184,7 @@ tribe.tickets.commerce = {};
|
|
200 |
return purchaser;
|
201 |
}
|
202 |
|
203 |
-
purchaser.name
|
204 |
purchaser.email = $container.find( obj.selectors.purchaserEmail ).val();
|
205 |
|
206 |
return purchaser;
|
@@ -210,7 +194,6 @@ tribe.tickets.commerce = {};
|
|
210 |
* Handles the initialization of the tickets commerce events when Document is ready.
|
211 |
*
|
212 |
* @since 5.1.9
|
213 |
-
*
|
214 |
* @return {void}
|
215 |
*/
|
216 |
obj.ready = function() {
|
@@ -222,5 +205,4 @@ tribe.tickets.commerce = {};
|
|
222 |
};
|
223 |
|
224 |
$( obj.ready );
|
225 |
-
|
226 |
} )( jQuery, tribe.tickets.commerce );
|
|
|
1 |
/**
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.1.9
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
|
10 |
* Configures ET Tickets Commerce Object in the Global Tribe variable
|
11 |
*
|
12 |
* @since 5.1.9
|
13 |
+
* @type {object}
|
|
|
14 |
*/
|
15 |
tribe.tickets.commerce = {};
|
16 |
|
18 |
* Initializes in a Strict env the code that manages the plugin tickets commerce.
|
19 |
*
|
20 |
* @since 5.1.9
|
21 |
+
* @param {object} $ jQuery
|
22 |
+
* @param {object} obj tribe.tickets.commerce
|
|
|
|
|
23 |
* @return {void}
|
24 |
*/
|
25 |
( function( $, obj ) {
|
|
|
26 |
const $document = $( document );
|
27 |
|
28 |
/**
|
31 |
* @since 5.1.10
|
32 |
*/
|
33 |
obj.customEvents = {
|
34 |
+
showLoader: 'showLoader.tecTicketsCommerce',
|
35 |
+
hideLoader: 'hideLoader.tecTicketsCommerce',
|
36 |
};
|
37 |
|
38 |
/*
|
77 |
*
|
78 |
* @since 5.1.10
|
79 |
*/
|
80 |
+
obj.bindLoaderEvents = function() {
|
81 |
$document.on( obj.customEvents.showLoader, obj.loaderShow );
|
82 |
$document.on( obj.customEvents.hideLoader, obj.loaderHide );
|
83 |
};
|
86 |
* Toggle the checkout item description visibility.
|
87 |
*
|
88 |
* @since 5.1.9
|
|
|
89 |
* @param {event} event The event.
|
|
|
90 |
* @return {void}
|
91 |
*/
|
92 |
obj.checkoutItemDescriptionToggle = function( event ) {
|
127 |
* Binds the checkout item description toggle.
|
128 |
*
|
129 |
* @since 5.1.9
|
|
|
130 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
131 |
* @return {void}
|
132 |
*/
|
133 |
obj.bindCheckoutItemDescriptionToggle = function( $container ) {
|
142 |
* Unbinds the description toggle.
|
143 |
*
|
144 |
* @since 5.1.9
|
|
|
145 |
* @param {jQuery} $container jQuery object of the tickets container.
|
|
|
146 |
* @return {void}
|
147 |
*/
|
148 |
obj.unbindCheckoutItemDescriptionToggle = function( $container ) {
|
155 |
* Binds events for checkout container.
|
156 |
*
|
157 |
* @since 5.1.9
|
|
|
158 |
* @param {jQuery} $container jQuery object of object of the tickets container.
|
|
|
159 |
* @return {void}
|
160 |
*/
|
161 |
obj.bindCheckoutEvents = function( $container ) {
|
174 |
* Get purchaser data if available.
|
175 |
*
|
176 |
* @since 5.3.0
|
|
|
177 |
* @param {jQuery} $container Container for the purchaser info fields.
|
178 |
+
* @return {object}
|
|
|
179 |
*/
|
180 |
obj.getPurchaserData = ( $container ) => {
|
181 |
const purchaser = {};
|
184 |
return purchaser;
|
185 |
}
|
186 |
|
187 |
+
purchaser.name = $container.find( obj.selectors.purchaserName ).val();
|
188 |
purchaser.email = $container.find( obj.selectors.purchaserEmail ).val();
|
189 |
|
190 |
return purchaser;
|
194 |
* Handles the initialization of the tickets commerce events when Document is ready.
|
195 |
*
|
196 |
* @since 5.1.9
|
|
|
197 |
* @return {void}
|
198 |
*/
|
199 |
obj.ready = function() {
|
205 |
};
|
206 |
|
207 |
$( obj.ready );
|
|
|
208 |
} )( jQuery, tribe.tickets.commerce );
|
src/resources/js/v2/tickets-loader.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
|
@@ -11,8 +10,7 @@ tribe.tickets = tribe.tickets || {};
|
|
11 |
* Configures ET Loader Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.3
|
14 |
-
*
|
15 |
-
* @type {PlainObject}
|
16 |
*/
|
17 |
tribe.tickets.loader = {};
|
18 |
|
@@ -20,21 +18,16 @@ tribe.tickets.loader = {};
|
|
20 |
* Initializes in a Strict env the code that manages the plugin "loader".
|
21 |
*
|
22 |
* @since 5.0.3
|
23 |
-
*
|
24 |
-
* @param {
|
25 |
-
* @param {PlainObject} obj tribe.tickets.loader
|
26 |
-
*
|
27 |
* @return {void}
|
28 |
*/
|
29 |
( function( $, obj ) {
|
30 |
-
'use strict';
|
31 |
-
|
32 |
/**
|
33 |
* Selectors used for configuration and setup.
|
34 |
*
|
35 |
* @since 5.0.3
|
36 |
-
*
|
37 |
-
* @type {PlainObject}
|
38 |
*/
|
39 |
obj.selectors = {
|
40 |
loader: '.tribe-common-c-loader',
|
@@ -45,9 +38,7 @@ tribe.tickets.loader = {};
|
|
45 |
* Show loader for the container.
|
46 |
*
|
47 |
* @since 5.0.3
|
48 |
-
*
|
49 |
* @param {jQuery} $container jQuery object of the container.
|
50 |
-
*
|
51 |
* @return {void}
|
52 |
*/
|
53 |
obj.show = function( $container ) {
|
@@ -62,9 +53,7 @@ tribe.tickets.loader = {};
|
|
62 |
* Hide loader for the container.
|
63 |
*
|
64 |
* @since 5.0.3
|
65 |
-
*
|
66 |
* @param {jQuery} $container jQuery object of the container.
|
67 |
-
*
|
68 |
* @return {void}
|
69 |
*/
|
70 |
obj.hide = function( $container ) {
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
|
10 |
* Configures ET Loader Object in the Global Tribe variable
|
11 |
*
|
12 |
* @since 5.0.3
|
13 |
+
* @type {object}
|
|
|
14 |
*/
|
15 |
tribe.tickets.loader = {};
|
16 |
|
18 |
* Initializes in a Strict env the code that manages the plugin "loader".
|
19 |
*
|
20 |
* @since 5.0.3
|
21 |
+
* @param {object} $ jQuery
|
22 |
+
* @param {object} obj tribe.tickets.loader
|
|
|
|
|
23 |
* @return {void}
|
24 |
*/
|
25 |
( function( $, obj ) {
|
|
|
|
|
26 |
/**
|
27 |
* Selectors used for configuration and setup.
|
28 |
*
|
29 |
* @since 5.0.3
|
30 |
+
* @type {object}
|
|
|
31 |
*/
|
32 |
obj.selectors = {
|
33 |
loader: '.tribe-common-c-loader',
|
38 |
* Show loader for the container.
|
39 |
*
|
40 |
* @since 5.0.3
|
|
|
41 |
* @param {jQuery} $container jQuery object of the container.
|
|
|
42 |
* @return {void}
|
43 |
*/
|
44 |
obj.show = function( $container ) {
|
53 |
* Hide loader for the container.
|
54 |
*
|
55 |
* @since 5.0.3
|
|
|
56 |
* @param {jQuery} $container jQuery object of the container.
|
|
|
57 |
* @return {void}
|
58 |
*/
|
59 |
obj.hide = function( $container ) {
|
src/resources/js/v2/tickets-page.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
|
@@ -11,8 +10,7 @@ tribe.tickets = tribe.tickets || {};
|
|
11 |
* Configures ET tickets page Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.3
|
14 |
-
*
|
15 |
-
* @type {PlainObject}
|
16 |
*/
|
17 |
tribe.tickets.page = {};
|
18 |
|
@@ -20,14 +18,11 @@ tribe.tickets.page = {};
|
|
20 |
* Initializes in a Strict env the code that manages the plugin tickets page.
|
21 |
*
|
22 |
* @since 5.0.3
|
23 |
-
*
|
24 |
-
* @param {
|
25 |
-
* @param {PlainObject} obj tribe.tickets.page
|
26 |
-
*
|
27 |
* @return {void}
|
28 |
*/
|
29 |
( function( $, obj ) {
|
30 |
-
'use strict';
|
31 |
const $document = $( document );
|
32 |
|
33 |
/*
|
@@ -43,9 +38,7 @@ tribe.tickets.page = {};
|
|
43 |
* Binds events for container.
|
44 |
*
|
45 |
* @since 5.0.3
|
46 |
-
*
|
47 |
* @param {jQuery} $container jQuery object of object of the tickets page container.
|
48 |
-
*
|
49 |
* @return {void}
|
50 |
*/
|
51 |
obj.bindEvents = function( $container ) {
|
@@ -58,7 +51,6 @@ tribe.tickets.page = {};
|
|
58 |
* Handles the initialization of the tickets page events when Document is ready.
|
59 |
*
|
60 |
* @since 5.0.3
|
61 |
-
*
|
62 |
* @return {void}
|
63 |
*/
|
64 |
obj.ready = function() {
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
|
10 |
* Configures ET tickets page Object in the Global Tribe variable
|
11 |
*
|
12 |
* @since 5.0.3
|
13 |
+
* @type {object}
|
|
|
14 |
*/
|
15 |
tribe.tickets.page = {};
|
16 |
|
18 |
* Initializes in a Strict env the code that manages the plugin tickets page.
|
19 |
*
|
20 |
* @since 5.0.3
|
21 |
+
* @param {object} $ jQuery
|
22 |
+
* @param {object} obj tribe.tickets.page
|
|
|
|
|
23 |
* @return {void}
|
24 |
*/
|
25 |
( function( $, obj ) {
|
|
|
26 |
const $document = $( document );
|
27 |
|
28 |
/*
|
38 |
* Binds events for container.
|
39 |
*
|
40 |
* @since 5.0.3
|
|
|
41 |
* @param {jQuery} $container jQuery object of object of the tickets page container.
|
|
|
42 |
* @return {void}
|
43 |
*/
|
44 |
obj.bindEvents = function( $container ) {
|
51 |
* Handles the initialization of the tickets page events when Document is ready.
|
52 |
*
|
53 |
* @since 5.0.3
|
|
|
54 |
* @return {void}
|
55 |
*/
|
56 |
obj.ready = function() {
|
src/resources/js/v2/tickets-utils.js
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
-
*
|
6 |
-
* @type {PlainObject}
|
7 |
*/
|
8 |
tribe.tickets = tribe.tickets || {};
|
9 |
|
@@ -11,8 +10,7 @@ tribe.tickets = tribe.tickets || {};
|
|
11 |
* Configures ET Utils Object in the Global Tribe variable
|
12 |
*
|
13 |
* @since 5.0.3
|
14 |
-
*
|
15 |
-
* @type {PlainObject}
|
16 |
*/
|
17 |
tribe.tickets.utils = {};
|
18 |
|
@@ -20,31 +18,26 @@ tribe.tickets.utils = {};
|
|
20 |
* Initializes in a Strict env the code that manages the plugin "utils".
|
21 |
*
|
22 |
* @since 5.0.3
|
23 |
-
*
|
24 |
-
* @param {
|
25 |
-
* @param {PlainObject} obj tribe.tickets.utils
|
26 |
-
*
|
27 |
* @return {void}
|
28 |
*/
|
29 |
( function( $, obj ) {
|
30 |
-
'use strict';
|
31 |
const $document = $( document );
|
32 |
|
33 |
/**
|
34 |
* Disable/Enable element.
|
35 |
*
|
36 |
* @since 5.0.3
|
37 |
-
*
|
38 |
* @param {object} $element jQuery object that we want to disable/enable.
|
39 |
* @param {boolean} isDisabled True if we want to disable the element.
|
40 |
-
*
|
41 |
* @return {void}
|
42 |
*/
|
43 |
obj.disable = function( $element, isDisabled ) {
|
44 |
if ( isDisabled ) {
|
45 |
$element.prop( 'disabled', true )
|
46 |
.attr( {
|
47 |
-
|
48 |
'aria-disabled': 'true',
|
49 |
} );
|
50 |
} else {
|
@@ -58,7 +51,6 @@ tribe.tickets.utils = {};
|
|
58 |
* Get the REST endpoint
|
59 |
*
|
60 |
* @since 5.0.3
|
61 |
-
*
|
62 |
* @returns {string} REST endpoint URL.
|
63 |
*/
|
64 |
obj.getRestEndpoint = function() {
|
@@ -69,9 +61,7 @@ tribe.tickets.utils = {};
|
|
69 |
* Get the Currency Formatting for a Provider.
|
70 |
*
|
71 |
* @since 5.0.3
|
72 |
-
*
|
73 |
* @param {string} provider The provider.
|
74 |
-
*
|
75 |
* @returns {object} The appropriate currency format.
|
76 |
*/
|
77 |
obj.getCurrencyFormatting = function( provider ) {
|
@@ -85,10 +75,8 @@ tribe.tickets.utils = {};
|
|
85 |
* So they play nice with other functions.
|
86 |
*
|
87 |
* @since 5.0.3
|
88 |
-
*
|
89 |
* @param {number} passedNumber The number to clean.
|
90 |
* @param {string} provider The provider.
|
91 |
-
*
|
92 |
* @returns {string} The cleaned number.
|
93 |
*/
|
94 |
obj.cleanNumber = function( passedNumber, provider ) {
|
@@ -131,10 +119,8 @@ tribe.tickets.utils = {};
|
|
131 |
* Based off coding from https://stackoverflow.com/a/2901136.
|
132 |
*
|
133 |
* @since 5.0.3
|
134 |
-
*
|
135 |
* @param {number} number The number to format.
|
136 |
* @param {string} provider The provider.
|
137 |
-
*
|
138 |
* @returns {string} The formatted number.
|
139 |
*/
|
140 |
obj.numberFormat = function( number, provider ) {
|
@@ -159,7 +145,7 @@ tribe.tickets.utils = {};
|
|
159 |
return Math.round( num * k ) / k;
|
160 |
};
|
161 |
|
162 |
-
|
163 |
|
164 |
if ( s[ 0 ].length > 3 ) {
|
165 |
s[ 0 ] = s[ 0 ].replace( /\B(?=(?:\d{3})+(?!\d))/g, sep );
|
@@ -177,9 +163,7 @@ tribe.tickets.utils = {};
|
|
177 |
* Get the tickets form, given a post ID.
|
178 |
*
|
179 |
* @since 5.0.3
|
180 |
-
*
|
181 |
* @param {number} postId The post id.
|
182 |
-
*
|
183 |
* @returns {jQuery} The jQuery object of the form.
|
184 |
*/
|
185 |
obj.getTicketsFormFromPostId = function( postId ) {
|
@@ -190,9 +174,7 @@ tribe.tickets.utils = {};
|
|
190 |
* Get the tickets provider, given a post ID.
|
191 |
*
|
192 |
* @since 5.0.3
|
193 |
-
*
|
194 |
* @param {number} postId The post id.
|
195 |
-
*
|
196 |
* @returns {boolean|string} The provider, or false if it's not found.
|
197 |
*/
|
198 |
obj.getTicketsProviderFromPostId = function( postId ) {
|
@@ -203,9 +185,7 @@ tribe.tickets.utils = {};
|
|
203 |
* Get the tickets provider ID, given a post ID.
|
204 |
*
|
205 |
* @since 5.0.3
|
206 |
-
*
|
207 |
* @param {number} postId The post id.
|
208 |
-
*
|
209 |
* @returns {boolean|string} The provider ID, or false if it's not found.
|
210 |
*/
|
211 |
obj.getTicketsProviderIdFromPostId = function( postId ) {
|
@@ -216,8 +196,7 @@ tribe.tickets.utils = {};
|
|
216 |
* Get the first tickets block post ID
|
217 |
*
|
218 |
* @since 5.0.3
|
219 |
-
*
|
220 |
-
* @return {boolean|int} postId The post id.
|
221 |
*/
|
222 |
obj.getTicketsPostId = function() {
|
223 |
const $ticketsBlock = $( tribe.tickets.block.selectors.form )[ 0 ];
|
@@ -230,8 +209,9 @@ tribe.tickets.utils = {};
|
|
230 |
* Get the price of the ticket from the ticket item element.
|
231 |
*
|
232 |
* @since 5.2.1
|
233 |
-
*
|
234 |
-
* @
|
|
|
235 |
*/
|
236 |
obj.getPrice = function( $ticketItem, provider ) {
|
237 |
if ( ! $ticketItem ) {
|
@@ -244,7 +224,8 @@ tribe.tickets.utils = {};
|
|
244 |
const priceString = isNaN( realPrice )
|
245 |
? obj.cleanNumber( formattedPrice, provider )
|
246 |
: realPrice;
|
247 |
-
|
|
|
248 |
};
|
249 |
|
250 |
/**
|
@@ -253,10 +234,9 @@ tribe.tickets.utils = {};
|
|
253 |
* @param targetAvailable {integer}
|
254 |
* @param maxAvailable {integer}
|
255 |
* @param addedToCart {integer}
|
256 |
-
* @returns {number
|
257 |
*/
|
258 |
obj.calculateSharedCap = function( targetQty, targetAvailable, maxAvailable, addedToCart ) {
|
259 |
-
|
260 |
const maxLimit = maxAvailable - addedToCart;
|
261 |
|
262 |
// If target qty is smaller than both max available and target ticket capacity then it's valid.
|
@@ -270,6 +250,5 @@ tribe.tickets.utils = {};
|
|
270 |
}
|
271 |
|
272 |
return maxLimit;
|
273 |
-
}
|
274 |
-
|
275 |
} )( jQuery, tribe.tickets.utils );
|
2 |
* Makes sure we have all the required levels on the Tribe Object
|
3 |
*
|
4 |
* @since 5.0.3
|
5 |
+
* @type {object}
|
|
|
6 |
*/
|
7 |
tribe.tickets = tribe.tickets || {};
|
8 |
|
10 |
* Configures ET Utils Object in the Global Tribe variable
|
11 |
*
|
12 |
* @since 5.0.3
|
13 |
+
* @type {object}
|
|
|
14 |
*/
|
15 |
tribe.tickets.utils = {};
|
16 |
|
18 |
* Initializes in a Strict env the code that manages the plugin "utils".
|
19 |
*
|
20 |
* @since 5.0.3
|
21 |
+
* @param {object} $ jQuery
|
22 |
+
* @param {object} obj tribe.tickets.utils
|
|
|
|
|
23 |
* @return {void}
|
24 |
*/
|
25 |
( function( $, obj ) {
|
|
|
26 |
const $document = $( document );
|
27 |
|
28 |
/**
|
29 |
* Disable/Enable element.
|
30 |
*
|
31 |
* @since 5.0.3
|
|
|
32 |
* @param {object} $element jQuery object that we want to disable/enable.
|
33 |
* @param {boolean} isDisabled True if we want to disable the element.
|
|
|
34 |
* @return {void}
|
35 |
*/
|
36 |
obj.disable = function( $element, isDisabled ) {
|
37 |
if ( isDisabled ) {
|
38 |
$element.prop( 'disabled', true )
|
39 |
.attr( {
|
40 |
+
disabled: 'true',
|
41 |
'aria-disabled': 'true',
|
42 |
} );
|
43 |
} else {
|
51 |
* Get the REST endpoint
|
52 |
*
|
53 |
* @since 5.0.3
|
|
|
54 |
* @returns {string} REST endpoint URL.
|
55 |
*/
|
56 |
obj.getRestEndpoint = function() {
|
61 |
* Get the Currency Formatting for a Provider.
|
62 |
*
|
63 |
* @since 5.0.3
|
|
|
64 |
* @param {string} provider The provider.
|
|
|
65 |
* @returns {object} The appropriate currency format.
|
66 |
*/
|
67 |
obj.getCurrencyFormatting = function( provider ) {
|
75 |
* So they play nice with other functions.
|
76 |
*
|
77 |
* @since 5.0.3
|
|
|
78 |
* @param {number} passedNumber The number to clean.
|
79 |
* @param {string} provider The provider.
|
|
|
80 |
* @returns {string} The cleaned number.
|
81 |
*/
|
82 |
obj.cleanNumber = function( passedNumber, provider ) {
|
119 |
* Based off coding from https://stackoverflow.com/a/2901136.
|
120 |
*
|
121 |
* @since 5.0.3
|
|
|
122 |
* @param {number} number The number to format.
|
123 |
* @param {string} provider The provider.
|
|
|
124 |
* @returns {string} The formatted number.
|
125 |
*/
|
126 |
obj.numberFormat = function( number, provider ) {
|
145 |
return Math.round( num * k ) / k;
|
146 |
};
|
147 |
|
148 |
+
const s = ( prec ? toFixedFix( n, prec ) : Math.round( n ) ).toString().split( '.' );
|
149 |
|
150 |
if ( s[ 0 ].length > 3 ) {
|
151 |
s[ 0 ] = s[ 0 ].replace( /\B(?=(?:\d{3})+(?!\d))/g, sep );
|
163 |
* Get the tickets form, given a post ID.
|
164 |
*
|
165 |
* @since 5.0.3
|
|
|
166 |
* @param {number} postId The post id.
|
|
|
167 |
* @returns {jQuery} The jQuery object of the form.
|
168 |
*/
|
169 |
obj.getTicketsFormFromPostId = function( postId ) {
|
174 |
* Get the tickets provider, given a post ID.
|
175 |
*
|
176 |
* @since 5.0.3
|
|
|
177 |
* @param {number} postId The post id.
|
|
|
178 |
* @returns {boolean|string} The provider, or false if it's not found.
|
179 |
*/
|
180 |
obj.getTicketsProviderFromPostId = function( postId ) {
|
185 |
* Get the tickets provider ID, given a post ID.
|
186 |
*
|
187 |
* @since 5.0.3
|
|
|
188 |
* @param {number} postId The post id.
|
|
|
189 |
* @returns {boolean|string} The provider ID, or false if it's not found.
|
190 |
*/
|
191 |
obj.getTicketsProviderIdFromPostId = function( postId ) {
|
196 |
* Get the first tickets block post ID
|
197 |
*
|
198 |
* @since 5.0.3
|
199 |
+
* @return {boolean|number} postId The post id.
|
|
|
200 |
*/
|
201 |
obj.getTicketsPostId = function() {
|
202 |
const $ticketsBlock = $( tribe.tickets.block.selectors.form )[ 0 ];
|
209 |
* Get the price of the ticket from the ticket item element.
|
210 |
*
|
211 |
* @since 5.2.1
|
212 |
+
* @param {jQuery} $ticketItem The ticket item
|
213 |
+
* @param {object} provider The provider
|
214 |
+
* @return {number} The ticket price.
|
215 |
*/
|
216 |
obj.getPrice = function( $ticketItem, provider ) {
|
217 |
if ( ! $ticketItem ) {
|
224 |
const priceString = isNaN( realPrice )
|
225 |
? obj.cleanNumber( formattedPrice, provider )
|
226 |
: realPrice;
|
227 |
+
|
228 |
+
return parseFloat( priceString );
|
229 |
};
|
230 |
|
231 |
/**
|
234 |
* @param targetAvailable {integer}
|
235 |
* @param maxAvailable {integer}
|
236 |
* @param addedToCart {integer}
|
237 |
+
* @returns {number} The shared cap
|
238 |
*/
|
239 |
obj.calculateSharedCap = function( targetQty, targetAvailable, maxAvailable, addedToCart ) {
|
|
|
240 |
const maxLimit = maxAvailable - addedToCart;
|
241 |
|
242 |
// If target qty is smaller than both max available and target ticket capacity then it's valid.
|
250 |
}
|
251 |
|
252 |
return maxLimit;
|
253 |
+
};
|
|
|
254 |
} )( jQuery, tribe.tickets.utils );
|
src/resources/postcss/tickets-admin.pcss
CHANGED
@@ -642,8 +642,8 @@ p.description {
|
|
642 |
|
643 |
.tec-admin__upsell-tec-tickets-capacity-arf {
|
644 |
margin-bottom: var(--tec-spacer-5);
|
645 |
-
|
646 |
.tec-admin__upsell-content {
|
647 |
padding: var(--tec-spacer-1) 0;
|
648 |
}
|
649 |
-
}
|
642 |
|
643 |
.tec-admin__upsell-tec-tickets-capacity-arf {
|
644 |
margin-bottom: var(--tec-spacer-5);
|
645 |
+
|
646 |
.tec-admin__upsell-content {
|
647 |
padding: var(--tec-spacer-1) 0;
|
648 |
}
|
649 |
+
}
|
src/resources/postcss/tickets-admin/settings/_all.pcss
CHANGED
@@ -6,3 +6,4 @@
|
|
6 |
|
7 |
@import "_banners.pcss";
|
8 |
@import "_tickets-commerce.pcss";
|
|
6 |
|
7 |
@import "_banners.pcss";
|
8 |
@import "_tickets-commerce.pcss";
|
9 |
+
@import "_emails.pcss";
|
src/resources/postcss/tickets-admin/settings/_emails.pcss
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Event Tickets Emails Admin Settings
|
3 |
+
*
|
4 |
+
* @since TBD
|
5 |
+
*/
|
6 |
+
|
7 |
+
.tec-tickets__admin-settings-emails-template-list {
|
8 |
+
background: var(--tec-color-background);
|
9 |
+
border: 1px var(--tec-color-border-default) solid;
|
10 |
+
border-radius: var(--tec-border-radius-default);
|
11 |
+
margin-bottom: var(--tec-spacer-5);
|
12 |
+
}
|
13 |
+
|
14 |
+
.tec-tickets__admin-settings-emails-template-list-item {
|
15 |
+
align-items: center;
|
16 |
+
border-top: 1px solid var(--tec-color-border-default);
|
17 |
+
display: flex;
|
18 |
+
justify-content: flex-start;
|
19 |
+
min-height: 54px;
|
20 |
+
|
21 |
+
&:first-of-type {
|
22 |
+
border-top: none;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
.tec-tickets__admin-settings-emails-template-list-item--disabled {
|
27 |
+
color: var(--tec-color-text-disabled);
|
28 |
+
}
|
29 |
+
|
30 |
+
.tec-tickets__admin-settings-emails-template-list-item-icon {
|
31 |
+
padding: 0 var(--tec-spacer-4);
|
32 |
+
width: 25px;
|
33 |
+
|
34 |
+
& > span.dashicons-yes {
|
35 |
+
color: #1eb056;
|
36 |
+
height: 25px;
|
37 |
+
width: 25px;
|
38 |
+
|
39 |
+
&:before {
|
40 |
+
font-size: 25px;
|
41 |
+
font-weight: var(--tec-font-weight-regular);
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
.tec-tickets__admin-settings-emails-template-list-item-title {
|
47 |
+
font-size: 15px;
|
48 |
+
font-weight: var(--tec-font-weight-bold);
|
49 |
+
min-width: 90px;
|
50 |
+
padding: 0 var(--tec-spacer-4) 0 0;
|
51 |
+
|
52 |
+
@media (--viewport-medium) {
|
53 |
+
min-width: 200px;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
.tec-tickets__admin-settings-emails-template-list-item-recipient {
|
58 |
+
flex-grow: 1;
|
59 |
+
font-size: 13px;
|
60 |
+
font-weight: var(--tec-font-weight-regular);
|
61 |
+
padding: 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
.tec-tickets__admin-settings-emails-template-list-item-action {
|
65 |
+
padding: 0 var(--tec-spacer-4);
|
66 |
+
}
|
67 |
+
|
68 |
+
.tec-tickets__admin-settings-emails-template-list-item-action-link {
|
69 |
+
color: var(--tec-color-icon-secondary);
|
70 |
+
|
71 |
+
&:hover {
|
72 |
+
color: var(--tec-color-event-icon-hover);
|
73 |
+
}
|
74 |
+
}
|
src/resources/postcss/tickets-commerce/admin/gateway/stripe/webhooks.pcss
CHANGED
@@ -5,15 +5,15 @@
|
|
5 |
*/
|
6 |
#tribe-field-tickets-commerce-stripe-webhooks-value {
|
7 |
input {
|
8 |
-
border-top-right-radius: 0;
|
9 |
border-bottom-right-radius: 0;
|
|
|
10 |
}
|
11 |
|
12 |
.tribe-field-tickets-commerce-stripe-webhooks-copy {
|
13 |
-
border-top-left-radius: 0;
|
14 |
border-bottom-left-radius: 0;
|
15 |
-
|
16 |
line-height: 24px;
|
|
|
17 |
padding-left: 6px;
|
18 |
padding-right: 6px;
|
19 |
|
@@ -24,19 +24,23 @@
|
|
24 |
}
|
25 |
|
26 |
#tribe-field-tickets-commerce-stripe-webhooks-signing-key {
|
27 |
-
.dashicons{
|
28 |
&.dashicons-update {
|
29 |
animation: rotate 1s infinite;
|
30 |
}
|
|
|
31 |
&.dashicons-no {
|
32 |
color: var(--tec-color-icon-error);
|
33 |
}
|
|
|
34 |
&.dashicons-yes {
|
35 |
color: #50b078;
|
36 |
}
|
37 |
}
|
38 |
|
39 |
@keyframes rotate {
|
40 |
-
100% {
|
|
|
|
|
41 |
}
|
42 |
}
|
5 |
*/
|
6 |
#tribe-field-tickets-commerce-stripe-webhooks-value {
|
7 |
input {
|
|
|
8 |
border-bottom-right-radius: 0;
|
9 |
+
border-top-right-radius: 0;
|
10 |
}
|
11 |
|
12 |
.tribe-field-tickets-commerce-stripe-webhooks-copy {
|
|
|
13 |
border-bottom-left-radius: 0;
|
14 |
+
border-top-left-radius: 0;
|
15 |
line-height: 24px;
|
16 |
+
margin-left: -2px;
|
17 |
padding-left: 6px;
|
18 |
padding-right: 6px;
|
19 |
|
24 |
}
|
25 |
|
26 |
#tribe-field-tickets-commerce-stripe-webhooks-signing-key {
|
27 |
+
.dashicons {
|
28 |
&.dashicons-update {
|
29 |
animation: rotate 1s infinite;
|
30 |
}
|
31 |
+
|
32 |
&.dashicons-no {
|
33 |
color: var(--tec-color-icon-error);
|
34 |
}
|
35 |
+
|
36 |
&.dashicons-yes {
|
37 |
color: #50b078;
|
38 |
}
|
39 |
}
|
40 |
|
41 |
@keyframes rotate {
|
42 |
+
100% {
|
43 |
+
transform: rotate(360deg);
|
44 |
+
}
|
45 |
}
|
46 |
}
|
src/resources/postcss/tickets-tables.pcss
CHANGED
@@ -90,30 +90,30 @@
|
|
90 |
table-layout: fixed;
|
91 |
width: 100%;
|
92 |
}
|
93 |
-
|
94 |
.tribe-tickets__tickets-editor-ticket-available-dates {
|
95 |
color: #999;
|
96 |
font-size: var(--tec-font-size-1);
|
97 |
line-height: var(--tec-spacer-4);
|
98 |
-
|
99 |
&:before {
|
100 |
color: #ccc;
|
101 |
font-size: var(--tec-spacer-3);
|
102 |
height: var(--tec-spacer-3);
|
103 |
line-height: var(--tec-spacer-3);
|
104 |
-
margin-top: calc(
|
105 |
width: var(--tec-spacer-3);
|
106 |
}
|
107 |
}
|
108 |
|
109 |
.tribe-tickets__tickets-editor-ticket-available-dates-icon-expired {
|
110 |
font-style: italic;
|
111 |
-
|
112 |
&:before {
|
113 |
color: var(--tec-color-icon-error);
|
114 |
}
|
115 |
}
|
116 |
-
|
117 |
.tribe-tickets__tickets-editor-ticket-name-sortable,
|
118 |
.tribe-tickets__tickets-editor-ticket-name-title {
|
119 |
display: table-cell;
|
90 |
table-layout: fixed;
|
91 |
width: 100%;
|
92 |
}
|
93 |
+
|
94 |
.tribe-tickets__tickets-editor-ticket-available-dates {
|
95 |
color: #999;
|
96 |
font-size: var(--tec-font-size-1);
|
97 |
line-height: var(--tec-spacer-4);
|
98 |
+
|
99 |
&:before {
|
100 |
color: #ccc;
|
101 |
font-size: var(--tec-spacer-3);
|
102 |
height: var(--tec-spacer-3);
|
103 |
line-height: var(--tec-spacer-3);
|
104 |
+
margin-top: calc(var(--tec-spacer-0) / 2);
|
105 |
width: var(--tec-spacer-3);
|
106 |
}
|
107 |
}
|
108 |
|
109 |
.tribe-tickets__tickets-editor-ticket-available-dates-icon-expired {
|
110 |
font-style: italic;
|
111 |
+
|
112 |
&:before {
|
113 |
color: var(--tec-color-icon-error);
|
114 |
}
|
115 |
}
|
116 |
+
|
117 |
.tribe-tickets__tickets-editor-ticket-name-sortable,
|
118 |
.tribe-tickets__tickets-editor-ticket-name-title {
|
119 |
display: table-cell;
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitb79680b9a44ca5c8682e15f24e789bc2::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -149,6 +149,11 @@ return array(
|
|
149 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Maintenance_Mode' => $baseDir . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Maintenance_Mode.php',
|
150 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Provider' => $baseDir . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Provider.php',
|
151 |
'TEC\\Tickets\\Custom_Tables\\V1\\Provider' => $baseDir . '/src/Tickets/Custom_Tables/V1/Provider.php',
|
|
|
|
|
|
|
|
|
|
|
152 |
'TEC\\Tickets\\Event' => $baseDir . '/src/Tickets/Event.php',
|
153 |
'TEC\\Tickets\\Hooks' => $baseDir . '/src/Tickets/Hooks.php',
|
154 |
'TEC\\Tickets\\Provider' => $baseDir . '/src/Tickets/Provider.php',
|
149 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Maintenance_Mode' => $baseDir . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Maintenance_Mode.php',
|
150 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Provider' => $baseDir . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Provider.php',
|
151 |
'TEC\\Tickets\\Custom_Tables\\V1\\Provider' => $baseDir . '/src/Tickets/Custom_Tables/V1/Provider.php',
|
152 |
+
'TEC\\Tickets\\Emails\\Assets' => $baseDir . '/src/Tickets/Emails/Assets.php',
|
153 |
+
'TEC\\Tickets\\Emails\\Emails_Tab' => $baseDir . '/src/Tickets/Emails/Emails_Tab.php',
|
154 |
+
'TEC\\Tickets\\Emails\\Hooks' => $baseDir . '/src/Tickets/Emails/Hooks.php',
|
155 |
+
'TEC\\Tickets\\Emails\\Provider' => $baseDir . '/src/Tickets/Emails/Provider.php',
|
156 |
+
'TEC\\Tickets\\Emails\\Settings' => $baseDir . '/src/Tickets/Emails/Settings.php',
|
157 |
'TEC\\Tickets\\Event' => $baseDir . '/src/Tickets/Event.php',
|
158 |
'TEC\\Tickets\\Hooks' => $baseDir . '/src/Tickets/Hooks.php',
|
159 |
'TEC\\Tickets\\Provider' => $baseDir . '/src/Tickets/Provider.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit404b81d8c23798606e43de80a7d9e300
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitb79680b9a44ca5c8682e15f24e789bc2
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitb79680b9a44ca5c8682e15f24e789bc2', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb79680b9a44ca5c8682e15f24e789bc2', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitb79680b9a44ca5c8682e15f24e789bc2::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -169,6 +169,11 @@ class ComposerStaticInit404b81d8c23798606e43de80a7d9e300
|
|
169 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Maintenance_Mode' => __DIR__ . '/../..' . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Maintenance_Mode.php',
|
170 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Provider.php',
|
171 |
'TEC\\Tickets\\Custom_Tables\\V1\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Custom_Tables/V1/Provider.php',
|
|
|
|
|
|
|
|
|
|
|
172 |
'TEC\\Tickets\\Event' => __DIR__ . '/../..' . '/src/Tickets/Event.php',
|
173 |
'TEC\\Tickets\\Hooks' => __DIR__ . '/../..' . '/src/Tickets/Hooks.php',
|
174 |
'TEC\\Tickets\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Provider.php',
|
@@ -213,9 +218,9 @@ class ComposerStaticInit404b81d8c23798606e43de80a7d9e300
|
|
213 |
public static function getInitializer(ClassLoader $loader)
|
214 |
{
|
215 |
return \Closure::bind(function () use ($loader) {
|
216 |
-
$loader->prefixLengthsPsr4 =
|
217 |
-
$loader->prefixDirsPsr4 =
|
218 |
-
$loader->classMap =
|
219 |
|
220 |
}, null, ClassLoader::class);
|
221 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitb79680b9a44ca5c8682e15f24e789bc2
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
169 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Maintenance_Mode' => __DIR__ . '/../..' . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Maintenance_Mode.php',
|
170 |
'TEC\\Tickets\\Custom_Tables\\V1\\Migration\\Maintenance_Mode\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Custom_Tables/V1/Migration/Maintenance_Mode/Provider.php',
|
171 |
'TEC\\Tickets\\Custom_Tables\\V1\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Custom_Tables/V1/Provider.php',
|
172 |
+
'TEC\\Tickets\\Emails\\Assets' => __DIR__ . '/../..' . '/src/Tickets/Emails/Assets.php',
|
173 |
+
'TEC\\Tickets\\Emails\\Emails_Tab' => __DIR__ . '/../..' . '/src/Tickets/Emails/Emails_Tab.php',
|
174 |
+
'TEC\\Tickets\\Emails\\Hooks' => __DIR__ . '/../..' . '/src/Tickets/Emails/Hooks.php',
|
175 |
+
'TEC\\Tickets\\Emails\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Emails/Provider.php',
|
176 |
+
'TEC\\Tickets\\Emails\\Settings' => __DIR__ . '/../..' . '/src/Tickets/Emails/Settings.php',
|
177 |
'TEC\\Tickets\\Event' => __DIR__ . '/../..' . '/src/Tickets/Event.php',
|
178 |
'TEC\\Tickets\\Hooks' => __DIR__ . '/../..' . '/src/Tickets/Hooks.php',
|
179 |
'TEC\\Tickets\\Provider' => __DIR__ . '/../..' . '/src/Tickets/Provider.php',
|
218 |
public static function getInitializer(ClassLoader $loader)
|
219 |
{
|
220 |
return \Closure::bind(function () use ($loader) {
|
221 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitb79680b9a44ca5c8682e15f24e789bc2::$prefixLengthsPsr4;
|
222 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitb79680b9a44ca5c8682e15f24e789bc2::$prefixDirsPsr4;
|
223 |
+
$loader->classMap = ComposerStaticInitb79680b9a44ca5c8682e15f24e789bc2::$classMap;
|
224 |
|
225 |
}, null, ClassLoader::class);
|
226 |
}
|