Advanced AJAX Product Filters - Version 1.5beta

Version Description

Download this release

Release Info

Developer RazyRx
Plugin Icon wp plugin Advanced AJAX Product Filters
Version 1.5beta
Comparing to
See all releases

Code changes from version 1.4.2.3 to 1.5beta

Files changed (53) hide show
  1. addons/add_classes/add_classes.php +14 -0
  2. addons/add_classes/classes.php +20 -0
  3. addons/deprecated_compat/deprecated_compat.php +0 -22
  4. addons/deprecated_compat/widget.php +0 -2282
  5. {js → addons/deprecated_filters}/admin.js +0 -16
  6. addons/deprecated_filters/deprecated_filters.php +420 -0
  7. addons/deprecated_filters/display_filter/reset_button.php +27 -0
  8. addons/deprecated_filters/display_filter/selected_area.php +35 -0
  9. addons/deprecated_filters/display_filter/update_button.php +27 -0
  10. addons/deprecated_filters/display_widget.php +593 -0
  11. {templates → addons/deprecated_filters}/filter_post.php +49 -6
  12. {js → addons/deprecated_filters}/j.doe.cloud.min.js +0 -0
  13. addons/deprecated_filters/settings/design.php +773 -0
  14. {css → addons/deprecated_filters}/widget.css +3 -3
  15. {js → addons/deprecated_filters}/widget.min.js +20 -13
  16. addons/separate_link/separate_vars.php +86 -0
  17. {css → assets/admin/css}/admin.css +0 -34
  18. {css → assets/admin/css}/brjsf.css +0 -0
  19. assets/admin/css/single_filter_edit.css +518 -0
  20. assets/admin/images/apply_filters.png +0 -0
  21. assets/admin/images/clear_filters.png +0 -0
  22. assets/admin/images/filters.png +0 -0
  23. assets/admin/images/selected_filters.png +0 -0
  24. assets/admin/js/admin.js +898 -0
  25. {js → assets/admin/js}/brjsf.js +0 -0
  26. assets/admin/js/javascript_hide.js +234 -0
  27. assets/admin/js/single_filter_edit.js +406 -0
  28. {css/scrollbar → assets/frontend/css}/Scrollbar.min.css +0 -0
  29. assets/frontend/css/fullmain.min.css +5 -0
  30. {css → assets/frontend/css}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  31. {css → assets/frontend/css}/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
  32. {css → assets/frontend/css}/images/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
  33. {css → assets/frontend/css}/images/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
  34. {css → assets/frontend/css}/images/ui-icons_0073ea_256x240.png +0 -0
  35. {css → assets/frontend/css}/images/ui-icons_454545_256x240.png +0 -0
  36. {css → assets/frontend/css}/images/ui-icons_666666_256x240.png +0 -0
  37. {css → assets/frontend/css}/images/ui-icons_ff0084_256x240.png +0 -0
  38. {css → assets/frontend/css}/images/ui-icons_ffffff_256x240.png +0 -0
  39. {css → assets/frontend/css}/jquery-ui.min.css +0 -0
  40. {css → assets/frontend/css}/jquery-ui.theme.min.css +0 -0
  41. {css/scrollbar → assets/frontend/css}/mCSB_buttons.png +0 -0
  42. assets/frontend/css/main.css +1107 -0
  43. assets/frontend/css/main.min.css +1 -0
  44. {css → assets/frontend/css}/select2.fixed.css +0 -0
  45. assets/frontend/css/select2.min.css +1 -0
  46. {css → assets/frontend/css}/themes.css +0 -0
  47. assets/frontend/js/Scrollbar.concat.min.js +5 -0
  48. assets/frontend/js/fullmain.min.js +10 -0
  49. {js → assets/frontend/js}/jquery-ui.min.js +0 -0
  50. {js → assets/frontend/js}/jquery.ui.touch-punch.min.js +0 -0
  51. assets/frontend/js/main.js +1470 -0
  52. assets/frontend/js/main.min.js +2 -0
  53. assets/frontend/js/select2.min.js +2 -0
addons/add_classes/add_classes.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BeRocket_aapf_add_classes_addon extends BeRocket_framework_addon_lib {
3
+ public $addon_file = __FILE__;
4
+ public $plugin_name = 'ajax_filters';
5
+ public $php_file_name = 'classes';
6
+ function get_addon_data() {
7
+ $data = parent::get_addon_data();
8
+ return array_merge($data, array(
9
+ 'addon_name' => __('Add more classes', 'BeRocket_AJAX_domain'),
10
+ 'tooltip' => __('Add more CSS classes to filters. Can be using for styling or other things', 'BeRocket_AJAX_domain')
11
+ ));
12
+ }
13
+ }
14
+ new BeRocket_aapf_add_classes_addon();
addons/add_classes/classes.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BeRocket_aapf_add_classes_filters {
3
+ function __construct() {
4
+ add_filter('BeRocket_AAPF_template_full_content', array($this, 'global_classes'), 1400, 4);
5
+ add_filter('BeRocket_AAPF_template_single_item', array($this, 'products_count'), 1400, 4);
6
+ }
7
+ function global_classes($template_content, $terms, $berocket_query_var_title) {
8
+ $template_content['template']['attributes']['class']['attribute'] = 'bapf_attr_' . trim($berocket_query_var_title['attribute']);
9
+ return $template_content;
10
+ }
11
+ function products_count($element, $term, $i, $berocket_query_var_title) {
12
+ $element = BeRocket_AAPF_dynamic_data_template::create_element_arrays($element, array('attributes', 'class'));
13
+ $element['attributes']['class']['term_tax'] = 'bapf_tax_'.$term->taxonomy;
14
+ $element['attributes']['class']['term_slug'] = 'bapf_term_'.$term->slug;
15
+ $element['attributes']['class']['term_id'] = 'bapf_term_'.$term->term_id;
16
+ $element['attributes']['class']['term_parent'] = 'bapf_parent_'.$term->parent;
17
+ return $element;
18
+ }
19
+ }
20
+ new BeRocket_aapf_add_classes_filters();
addons/deprecated_compat/deprecated_compat.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- class BeRocket_aapf_deprecated_compat_addon extends BeRocket_framework_addon_lib {
3
- public $addon_file = __FILE__;
4
- public $plugin_name = 'ajax_filters';
5
- public $php_file_name = 'widget';
6
- function get_addon_data() {
7
- $data = parent::get_addon_data();
8
- return array_merge($data, array(
9
- 'addon_name' => __('Deprecated Widget', 'BeRocket_AJAX_domain'),
10
- 'deprecated' => true,
11
- 'tooltip' => __('<span style="color: red;">DO NOT USE<br>IT WILL BE REMOVED IN THE FUTURE</span><br>Uses for compatibility with old filters', 'BeRocket_AJAX_domain')
12
- ));
13
- }
14
- function init_active() {
15
- parent::init_active();
16
- add_filter('BeRocket_AAPF_widget_load_file', array($this, 'disable_file'));
17
- }
18
- function disable_file($isload) {
19
- return false;
20
- }
21
- }
22
- new BeRocket_aapf_deprecated_compat_addon();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
addons/deprecated_compat/widget.php DELETED
@@ -1,2282 +0,0 @@
1
- <?php
2
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
3
-
4
- /**
5
- * BeRocket_AAPF_Widget - main filter widget. One filter for any needs
6
- */
7
- class BeRocket_AAPF_Widget extends WP_Widget {
8
-
9
- public static $defaults = array(
10
- 'br_wp_footer' => false,
11
- 'widget_type' => 'filter',
12
- 'title' => '',
13
- 'filter_type' => 'attribute',
14
- 'attribute' => 'price',
15
- 'custom_taxonomy' => 'product_cat',
16
- 'type' => 'slider',
17
- 'select_first_element_text' => '',
18
- 'operator' => 'OR',
19
- 'order_values_by' => '',
20
- 'order_values_type' => '',
21
- 'text_before_price' => '',
22
- 'text_after_price' => '',
23
- 'enable_slider_inputs' => '',
24
- 'parent_product_cat' => '',
25
- 'depth_count' => '0',
26
- 'widget_collapse_enable' => '0',
27
- 'widget_is_hide' => '0',
28
- 'show_product_count_per_attr' => '0',
29
- 'hide_child_attributes' => '0',
30
- 'hide_collapse_arrow' => '0',
31
- 'use_value_with_color' => '0',
32
- 'values_per_row' => '1',
33
- 'icon_before_title' => '',
34
- 'icon_after_title' => '',
35
- 'icon_before_value' => '',
36
- 'icon_after_value' => '',
37
- 'price_values' => '',
38
- 'description' => '',
39
- 'css_class' => '',
40
- 'tag_cloud_height' => '0',
41
- 'tag_cloud_min_font' => '12',
42
- 'tag_cloud_max_font' => '14',
43
- 'tag_cloud_tags_count' => '100',
44
- 'tag_cloud_type' => 'doe',
45
- 'use_min_price' => '0',
46
- 'min_price' => '0',
47
- 'use_max_price' => '0',
48
- 'max_price' => '1',
49
- 'height' => 'auto',
50
- 'scroll_theme' => 'dark',
51
- 'selected_area_show' => '0',
52
- 'hide_selected_arrow' => '0',
53
- 'selected_is_hide' => '0',
54
- 'slider_default' => '0',
55
- 'number_style' => '0',
56
- 'number_style_thousand_separate'=> '',
57
- 'number_style_decimal_separate' => '.',
58
- 'number_style_decimal_number' => '2',
59
- 'is_hide_mobile' => '0',
60
- 'user_can_see' => '',
61
- 'cat_propagation' => '0',
62
- 'product_cat' => '',
63
- 'parent_product_cat_current' => '0',
64
- 'attribute_count' => '',
65
- 'show_page' => array( 'shop', 'product_cat', 'product_tag', 'product_taxonomy' ),
66
- 'cat_value_limit' => '0',
67
- 'child_parent' => '',
68
- 'child_parent_depth' => '1',
69
- 'child_parent_no_values' => '',
70
- 'child_parent_previous' => '',
71
- 'child_parent_no_products' => '',
72
- 'child_onew_count' => '1',
73
- 'child_onew_childs' => array(
74
- 1 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
75
- 2 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
76
- 3 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
77
- 4 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
78
- 5 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
79
- 6 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
80
- 7 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
81
- 8 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
82
- 9 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
83
- 10 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
84
- ),
85
- 'search_box_link_type' => 'shop_page',
86
- 'search_box_url' => '',
87
- 'search_box_category' => '',
88
- 'search_box_count' => '1',
89
- 'search_box_attributes' => array(
90
- 1 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
91
- 2 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
92
- 3 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
93
- 4 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
94
- 5 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
95
- 6 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
96
- 7 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
97
- 8 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
98
- 9 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
99
- 10 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
100
- ),
101
- 'search_box_style' => array(
102
- 'position' => 'vertical',
103
- 'search_position' => 'after',
104
- 'search_text' => 'Search',
105
- 'background' => 'bbbbff',
106
- 'back_opacity' => '0',
107
- 'button_background' => '888800',
108
- 'button_background_over' => 'aaaa00',
109
- 'text_color' => '000000',
110
- 'text_color_over' => '000000',
111
- ),
112
- 'ranges' => array( 1, 10 ),
113
- 'hide_first_last_ranges' => '',
114
- 'include_exclude_select' => '',
115
- 'include_exclude_list' => array(),
116
- );
117
-
118
- /**
119
- * Constructor
120
- */
121
- function __construct() {
122
- global $wp_version;
123
- /* Widget settings. */
124
- $widget_ops = array( 'classname' => 'widget_berocket_aapf', 'description' => __('Add Filters to Products page', 'BeRocket_AJAX_domain') );
125
-
126
- /* Widget control settings. */
127
- $control_ops = array( 'id_base' => 'berocket_aapf_widget' );
128
-
129
- /* Create the widget. */
130
- parent::__construct( 'berocket_aapf_widget', __('AJAX Product Filters (Deprecated)', 'BeRocket_AJAX_domain'), $widget_ops, $control_ops );
131
-
132
- add_filter( 'berocket_aapf_listener_wp_query_args', 'br_aapf_args_parser' );
133
- }
134
- public static function br_widget_ajax_set() {
135
- if ( ( is_plugin_active( 'woocommerce/woocommerce.php' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) && br_get_woocommerce_version() >= 2.1 ) {
136
-
137
- add_action( 'wp_ajax_nopriv_berocket_aapf_listener', array( __CLASS__, 'listener' ) );
138
- add_action( 'wp_ajax_berocket_aapf_listener', array( __CLASS__, 'listener' ) );
139
- add_action( 'wp_ajax_berocket_aapf_color_listener', array( __CLASS__, 'color_listener' ) );
140
- add_action( 'wp_ajax_br_include_exclude_list', array( __CLASS__, 'ajax_include_exclude_list' ) );
141
- }
142
- }
143
-
144
- /**
145
- * Show widget to user
146
- *
147
- * @param array $args
148
- * @param array $instance
149
- */
150
- function widget( $args, $instance ) {
151
- if( ! empty($args['widget_id']) ) {
152
- $this->id = $args['widget_id'];
153
- $this->number = $args['widget_id'];
154
- }
155
- if( empty($this->number) || $this->number == -1 ) {
156
- global $berocket_aapf_shortcode_id;
157
- if( empty($berocket_aapf_shortcode_id) ) {
158
- $berocket_aapf_shortcode_id = 1;
159
- } else {
160
- $berocket_aapf_shortcode_id++;
161
- }
162
- $this->id = 'berocket_aapf_widget-s'.$berocket_aapf_shortcode_id;
163
- $args['widget_id'] = $this->id;
164
- $this->number = 's'.$berocket_aapf_shortcode_id;
165
- }
166
- $set_query_var_title = array();
167
- $set_query_var_main = array();
168
- $set_query_var_footer = array();
169
- $filter_type_array = array(
170
- 'attribute' => array(
171
- 'name' => __('Attribute', 'BeRocket_AJAX_domain'),
172
- 'sameas' => 'attribute',
173
- ),
174
- 'tag' => array(
175
- 'name' => __('Tag', 'BeRocket_AJAX_domain'),
176
- 'sameas' => 'tag',
177
- ),
178
- 'all_product_cat' => array(
179
- 'name' => __('Product Category', 'BeRocket_AJAX_domain'),
180
- 'sameas' => 'custom_taxonomy',
181
- 'attribute' => 'product_cat',
182
- ),
183
- );
184
- if ( function_exists('wc_get_product_visibility_term_ids') ) {
185
- $filter_type_array['_rating'] = array(
186
- 'name' => __('Rating', 'BeRocket_AJAX_domain'),
187
- 'sameas' => '_rating',
188
- );
189
- }
190
- $filter_type_array = apply_filters('berocket_filter_filter_type_array', $filter_type_array, $instance);
191
- if( empty($instance['filter_type']) || ! array_key_exists($instance['filter_type'], $filter_type_array) ) {
192
- foreach($filter_type_array as $filter_type_key => $filter_type_val) {
193
- $instance['filter_type'] = $filter_type_key;
194
- break;
195
- }
196
- }
197
- if( ! empty($instance['filter_type']) && ! empty($filter_type_array[$instance['filter_type']]) && ! empty($filter_type_array[$instance['filter_type']]['sameas']) ) {
198
- $sameas = $filter_type_array[$instance['filter_type']];
199
- $instance['filter_type'] = $sameas['sameas'];
200
- if( ! empty($sameas['attribute']) ) {
201
- if( $sameas['sameas'] == 'custom_taxonomy' ) {
202
- $instance['custom_taxonomy'] = $sameas['attribute'];
203
- } elseif( $sameas['sameas'] == 'attribute' ) {
204
- $instance['attribute'] = $sameas['attribute'];
205
- }
206
- }
207
- }
208
- //CHECK WIDGET TYPES
209
- $berocket_admin_filter_types = array(
210
- 'tag' => array('checkbox','radio','select','color','image','tag_cloud'),
211
- 'product_cat' => array('checkbox','radio','select','color','image'),
212
- 'sale' => array('checkbox','radio','select'),
213
- 'custom_taxonomy' => array('checkbox','radio','select','color','image'),
214
- 'attribute' => array('checkbox','radio','select','color','image'),
215
- 'price' => array('slider'),
216
- 'filter_by' => array('checkbox','radio','select','color','image'),
217
- );
218
- $berocket_admin_filter_types_by_attr = array(
219
- 'checkbox' => array('value' => 'checkbox', 'text' => 'Checkbox'),
220
- 'radio' => array('value' => 'radio', 'text' => 'Radio'),
221
- 'select' => array('value' => 'select', 'text' => 'Select'),
222
- 'color' => array('value' => 'color', 'text' => 'Color'),
223
- 'image' => array('value' => 'image', 'text' => 'Image'),
224
- 'slider' => array('value' => 'slider', 'text' => 'Slider'),
225
- 'tag_cloud' => array('value' => 'tag_cloud', 'text' => 'Tag cloud'),
226
- );
227
- list($berocket_admin_filter_types, $berocket_admin_filter_types_by_attr) = apply_filters( 'berocket_admin_filter_types_by_attr', array($berocket_admin_filter_types, $berocket_admin_filter_types_by_attr) );
228
- $select_options_variants = array();
229
- if ( $instance['filter_type'] == 'tag' ) {
230
- $select_options_variants = $berocket_admin_filter_types['tag'];
231
- } else if ( $instance['filter_type'] == 'product_cat' || ( $instance['filter_type'] == 'custom_taxonomy' && ( $instance['custom_taxonomy'] == 'product_tag' || $instance['custom_taxonomy'] == 'product_cat' ) ) ) {
232
- $select_options_variants = $berocket_admin_filter_types['product_cat'];
233
- } else if ( $instance['filter_type'] == '_sale' || $instance['filter_type'] == '_stock_status' || $instance['filter_type'] == '_rating' ) {
234
- $select_options_variants = $berocket_admin_filter_types['sale'];
235
- } else if ( $instance['filter_type'] == 'custom_taxonomy' ) {
236
- $select_options_variants = $berocket_admin_filter_types['custom_taxonomy'];
237
- } else if ( $instance['filter_type'] == 'attribute' ) {
238
- if ( $instance['attribute'] == 'price' ) {
239
- $select_options_variants = $berocket_admin_filter_types['price'];
240
- } else {
241
- $select_options_variants = $berocket_admin_filter_types['attribute'];
242
- }
243
- } else if ( $instance['filter_type'] == 'filter_by' ) {
244
- $select_options_variants = $berocket_admin_filter_types['filter_by'];
245
- }
246
- $selected = false;
247
- $first = false;
248
- foreach($select_options_variants as $select_options_variant) {
249
- if( ! empty($berocket_admin_filter_types_by_attr[$select_options_variant]) ) {
250
- if( $instance['type'] == $berocket_admin_filter_types_by_attr[$select_options_variant]['value'] ) {
251
- $selected = true;
252
- break;
253
- }
254
- if( $first === false ) {
255
- $first = $berocket_admin_filter_types_by_attr[$select_options_variant]['value'];
256
- }
257
- }
258
- }
259
- if( ! $selected ) {
260
- $instance['type'] = $first;
261
- }
262
- $widget_type_array = apply_filters( 'berocket_widget_widget_type_array', apply_filters( 'berocket_aapf_display_filter_type_list', array(
263
- 'filter' => __('Filter', 'BeRocket_AJAX_domain'),
264
- ) ) );
265
- if( ! array_key_exists($instance['widget_type'], $widget_type_array) ) {
266
- foreach($widget_type_array as $widget_type_id => $widget_type_name) {
267
- $instance['widget_type'] = $widget_type_id;
268
- break;
269
- }
270
- }
271
- $instance['title'] = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
272
- $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
273
- $default_language = apply_filters( 'wpml_default_language', NULL );
274
-
275
- global $wp_query, $wp_the_query, $wp, $sitepress, $br_wc_query;
276
- if( ! isset( BeRocket_AAPF::$error_log['6_widgets'] ) )
277
- {
278
- BeRocket_AAPF::$error_log['6_widgets'] = array();
279
- }
280
- $widget_error_log = array();
281
-
282
- $instance = array_merge( self::$defaults, $instance );
283
- $instance = apply_filters('aapf_widget_instance', $instance);
284
- $args = apply_filters('aapf_widget_args', $args);
285
- if( ( $instance['user_can_see'] == 'logged' && ! is_user_logged_in() ) || ( $instance['user_can_see'] == 'not_logged' && is_user_logged_in() ) ) {
286
- return false;
287
- }
288
-
289
- if( BeRocket_AAPF::$debug_mode ) {
290
- $widget_error_log['wp_query'] = $wp_query;
291
- $widget_error_log['args'] = $args;
292
- $widget_error_log['instance'] = $instance;
293
- }
294
-
295
- $BeRocket_AAPF = BeRocket_AAPF::getInstance();
296
- if( ! empty($br_options['user_func']) && is_array( $br_options['user_func'] ) ) {
297
- $user_func = array_merge( $BeRocket_AAPF->defaults['user_func'], $br_options['user_func'] );
298
- } else {
299
- $user_func = $BeRocket_AAPF->defaults['user_func'];
300
- }
301
-
302
- if( ! empty($br_options['filters_turn_off']) ) return false;
303
-
304
- if( ! empty($instance['child_parent']) && in_array($instance['child_parent'], array('child', 'parent')) ) {
305
- $br_options['show_all_values'] = true;
306
- }
307
-
308
- if ( ! empty($instance['show_page']) ) {
309
- $pageid = get_the_ID();
310
- $pageid = apply_filters( 'wpml_object_id', $pageid, 'page', true, $default_language );
311
- $pagelimit = FALSE;
312
-
313
- foreach ( $instance['show_page'] as $page => $is_show ) {
314
- if( $is_show ) {
315
- $pagelimit = TRUE;
316
- break;
317
- }
318
- }
319
- if ( $pagelimit &&
320
- ( ( ! is_product_category() && ! is_shop() && ! is_product_tag() && ! is_product_taxonomy() && ! is_product() && ! in_array( $pageid, $instance['show_page'] ) ) ||
321
- ( is_shop() && ! in_array( 'shop', $instance['show_page'] ) ) ||
322
- ( is_product_category() && ! in_array( 'product_cat', $instance['show_page'] ) ) ||
323
- ( is_product() && ! in_array( 'single_product', $instance['show_page'] ) ) ||
324
- ( is_product_taxonomy() && ! in_array( 'product_taxonomy', $instance['show_page'] ) && ! is_product_category() ) ||
325
- ( is_product_tag() && ! in_array( 'product_tag', $instance['show_page'] ) ) )
326
- ) {
327
-
328
- if( BeRocket_AAPF::$debug_mode ) {
329
- $widget_error_log['return'] = 'hidden';
330
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
331
- }
332
- return false;
333
- }
334
- }
335
-
336
- if ( isset ( $br_wc_query ) ) {
337
- if( ! is_a($br_wc_query, 'WP_Query') ) {
338
- $br_wc_query = new WP_Query( $br_wc_query );
339
- }
340
- if( class_exists('WC_Query') && method_exists('WC_Query', 'product_query') && method_exists('WC_Query', 'get_main_query') ) {
341
- $wc_query = wc()->query->get_main_query();
342
- }
343
- $old_query = $wp_query;
344
- $old_the_query = $wp_the_query;
345
- $wp_query = $br_wc_query;
346
- $wp_the_query = $br_wc_query;
347
- if( class_exists('WC_Query') && method_exists('WC_Query', 'product_query') && method_exists('WC_Query', 'get_main_query') ) {
348
- wc()->query->product_query($wp_query);
349
- }
350
- }
351
-
352
- $wp_query_product_cat = '-1';
353
- $wp_check_product_cat = '1q1main_shop1q1';
354
- if ( ! empty($wp_query->query['product_cat']) ) {
355
- $wp_query_product_cat = explode( "/", $wp_query->query['product_cat'] );
356
- $wp_query_product_cat = $wp_query_product_cat[ count( $wp_query_product_cat ) - 1 ];
357
- $wp_query_product_cat = urldecode($wp_query_product_cat);
358
- $wp_check_product_cat = $wp_query_product_cat;
359
- }
360
-
361
- if ( empty($br_options['products_holder_id']) ) $br_options['products_holder_id'] = 'ul.products';
362
-
363
- if ( empty($instance['br_wp_footer']) ) {
364
- global $br_widget_ids;
365
- if ( ! isset( $br_widget_ids ) ) {
366
- $br_widget_ids = array();
367
- }
368
- $br_widget_ids[] = array('instance' => $instance, 'args' => $args);
369
- }
370
-
371
- extract( $args );
372
- extract( $instance );
373
-
374
- $text_before_price = apply_filters('aapf_widget_text_before_price', ( isset($text_before_price) ? $text_before_price : '' ) );
375
- $text_after_price = apply_filters('aapf_widget_text_after_price', ( isset($text_after_price) ? $text_after_price : '' ) );
376
- if( ! empty($text_before_price) || ! empty($text_after_price) ) {
377
- $cur_symbol = get_woocommerce_currency_symbol();
378
- $cur_slug = get_woocommerce_currency();
379
- if( !empty($text_before_price) ) {
380
- $text_before_price = str_replace(array('%cur_symbol%', '%cur_slug%'), array($cur_symbol, $cur_slug), $text_before_price);
381
- }
382
- if( !empty($text_after_price) ) {
383
- $text_after_price = str_replace(array('%cur_symbol%', '%cur_slug%'), array($cur_symbol, $cur_slug), $text_after_price);
384
- }
385
- }
386
-
387
- if ( empty($order_values_by) ) {
388
- $order_values_by = 'Default';
389
- }
390
-
391
- if ( ! empty($filter_type) && ( $filter_type == 'product_cat' || $filter_type == '_stock_status' || $filter_type == '_sale' || $filter_type == '_rating' ) ) {
392
- $attribute = $filter_type;
393
- $filter_type = 'attribute';
394
- }
395
-
396
- $product_cat = @ json_decode( $product_cat );
397
-
398
- if ( $product_cat && is_product() && ! empty($instance['show_page']) && is_array($instance['show_page']) && in_array( 'single_product', $instance['show_page'] ) ) {
399
- $hide_widget = true;
400
- global $post;
401
- $product_cat_id = array();
402
- $terms = get_the_terms( $post->ID, 'product_cat' );
403
- if( ! empty($terms) && is_array($terms) ) {
404
- foreach ($terms as $term) {
405
- $cur_cat_id = apply_filters( 'wpml_object_id', $term->term_id, 'product_cat', true, $default_language );
406
- $product_cat_id[] = $cur_cat_id;
407
- if ( ! empty($cat_propagation) ) {
408
- $cur_cat_ancestors = get_ancestors( $term->term_id, 'product_cat' );
409
- foreach ( $cur_cat_ancestors as $cat_ancestor ) {
410
- $cur_cat_ancestor = apply_filters( 'wpml_object_id', $cat_ancestor, 'product_cat', true, $default_language );
411
- $product_cat_id[] = $cur_cat_ancestor;
412
- }
413
- }
414
- foreach ( $product_cat as $cat ) {
415
- $cur_cat = get_term_by( 'slug', $cat, 'product_cat' );
416
- $cur_cat_id = apply_filters( 'wpml_object_id', $cur_cat->term_id, 'product_cat', true, $default_language );
417
- if ( ! empty($cur_cat_id) && is_array($product_cat_id) && in_array( $cur_cat_id, $product_cat_id ) ) {
418
- $hide_widget = false;
419
- break;
420
- }
421
- }
422
- }
423
- }
424
-
425
- if ( $hide_widget ) {
426
- $widget_error_log['return'] = 'hide_widget';
427
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
428
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
429
- return true;
430
- }
431
- }
432
-
433
- if ( $product_cat && is_product_category() ) {
434
- $hide_widget = true;
435
-
436
- $cur_cat = get_term_by( 'slug', $wp_query_product_cat, 'product_cat' );
437
- $cur_cat_id = apply_filters( 'wpml_object_id', $cur_cat->term_id, 'product_cat', true, $default_language );
438
-
439
- if ( ! empty($cat_propagation) ) {
440
- $cur_cat_ancestors = get_ancestors( $cur_cat_id, 'product_cat' );
441
- $cur_cat_ancestors[] = $cur_cat_id;
442
- foreach ( $cur_cat_ancestors as &$cat_ancestor ) {
443
- $cat_ancestor = apply_filters( 'wpml_object_id', $cat_ancestor, 'product_cat', true, $default_language );
444
- }
445
- foreach ( $product_cat as $cat ) {
446
- $cat = get_term_by( 'slug', $cat, 'product_cat' );
447
- $cat_id = apply_filters( 'wpml_object_id', $cat->term_id, 'product_cat', true, $default_language );
448
-
449
- if ( ! empty($cat_id) && is_array($cur_cat_ancestors) && in_array( $cat_id, $cur_cat_ancestors ) ) {
450
- $hide_widget = false;
451
- break;
452
- }
453
- }
454
- } else {
455
- foreach ( $product_cat as $cat ) {
456
- $cat = get_term_by( 'slug', $cat, 'product_cat' );
457
- $cat_id = apply_filters( 'wpml_object_id', $cat->term_id, 'product_cat', true, $default_language );
458
- if ( $cat_id == $cur_cat_id ) {
459
- $hide_widget = false;
460
- break;
461
- }
462
- }
463
- }
464
-
465
- if ( $hide_widget ) {
466
- $widget_error_log['return'] = 'hide_widget';
467
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
468
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
469
- return true;
470
- }
471
- }
472
-
473
- if( empty($br_options['ajax_site']) ) {
474
- do_action('br_footer_script');
475
- } else {
476
- echo '<script>jQuery(document).ready(function() {if(typeof(berocket_filters_first_load) == "function") {berocket_filters_first_load();}});</script>';
477
- }
478
- if( apply_filters( 'berocket_aapf_widget_display_custom_filter', false, berocket_isset($widget_type), $instance, $args, $this ) ) return '';
479
-
480
- if( ! empty($widget_type) && $custom_type_html = apply_filters('berocket_aapf_display_filter_custom_type', '', $widget_type, array('options' => $instance, 'args' => $args)) ) {
481
- if( $custom_type_html !== TRUE ) {
482
- echo $before_widget;
483
- echo $custom_type_html;
484
- echo $after_widget;
485
- }
486
- $widget_error_log['return'] = $widget_type;
487
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
488
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
489
- return '';
490
- }
491
-
492
- $woocommerce_hide_out_of_stock_items = BeRocket_AAPF_Widget::woocommerce_hide_out_of_stock_items();
493
- if( $woocommerce_hide_out_of_stock_items == 'yes' && $filter_type == 'attribute' && $attribute == '_stock_status' ) {
494
- $widget_error_log['return'] = 'stock_status';
495
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
496
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
497
- return true;
498
- }
499
-
500
- if( $type == "slider" ) {
501
- $operator = 'OR';
502
- $order_values_by = '';
503
- $order_values_type = 'asc';
504
- }
505
-
506
- $terms = $sort_terms = $price_range = array();
507
- $instance['wp_check_product_cat'] = $wp_check_product_cat;
508
- $instance['wp_query_product_cat'] = $wp_query_product_cat;
509
- list($terms_error_return, $terms_ready, $terms, $type) = apply_filters( 'berocket_widget_attribute_type_terms', array(false, false, $terms, $type), $attribute, $filter_type, $instance );
510
- if( $terms_ready ) {
511
- if( $terms_error_return === FALSE ) {
512
- $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
513
- if( BeRocket_AAPF::$debug_mode ) {
514
- $widget_error_log['terms'] = $terms;
515
- }
516
- } else {
517
- $widget_error_log['terms'] = $terms;
518
- $widget_error_log['return'] = $terms_error_return;
519
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
520
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
521
- return false;
522
- }
523
- } else {
524
- if ( $filter_type == 'attribute' ) {
525
- if ( $attribute == 'price' ) {
526
- if ( ! empty($price_values) ) {
527
- $price_range = explode( ",", $price_values );
528
- } elseif( $use_min_price && $use_max_price ) {
529
- $price_range = array($min_price, $max_price);
530
- } else {
531
- $price_range = br_get_cache( 'price_range', $wp_check_product_cat );
532
- if ( $price_range === false ) {
533
- $price_range = BeRocket_AAPF_Widget::get_price_range( $wp_query_product_cat, ( isset($cat_value_limit) ? $cat_value_limit : null ) );
534
- br_set_cache( 'price_range', $price_range, $wp_check_product_cat, BeRocket_AJAX_cache_expire );
535
- }
536
- if ( ! $price_range or count( $price_range ) < 2 ) {
537
- $widget_error_log['price_range'] = $price_range;
538
- $widget_error_log['return'] = 'price_range < 2';
539
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
540
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
541
- return false;
542
- }
543
- }
544
- if( BeRocket_AAPF::$debug_mode ) {
545
- $widget_error_log['price_range'] = $price_range;
546
- }
547
- } elseif ( $attribute == '_rating' ) {
548
- $terms = array();
549
- $term = get_term_by('slug', 'rated-1', 'product_visibility');
550
- $term->name = ( $type == 'select' ? __('1 star', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') );
551
- array_push($terms, $term);
552
- $term = get_term_by('slug', 'rated-2', 'product_visibility');
553
- $term->name = ( $type == 'select' ? __('2 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') );
554
- array_push($terms, $term);
555
- $term = get_term_by('slug', 'rated-3', 'product_visibility');
556
- $term->name = ( $type == 'select' ? __('3 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') );
557
- array_push($terms, $term);
558
- $term = get_term_by('slug', 'rated-4', 'product_visibility');
559
- $term->name = ( $type == 'select' ? __('4 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') );
560
- array_push($terms, $term);
561
- $term = get_term_by('slug', 'rated-5', 'product_visibility');
562
- $term->name = ( $type == 'select' ? __('5 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i>', 'BeRocket_AJAX_domain') );
563
- array_push($terms, $term);
564
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $attribute, 'id', braapf_filters_must_be_recounted('first'), ( braapf_filters_must_be_recounted() ), $terms, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
565
- foreach($terms as &$term) {
566
- $term->taxonomy = '_rating';
567
- }
568
- if( ! empty( $order_values_type ) && $order_values_type == 'desc' ) {
569
- $terms = array_reverse($terms);
570
- }
571
- $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
572
- if( BeRocket_AAPF::$debug_mode ) {
573
- $widget_error_log['terms'] = $terms;
574
- }
575
- } elseif ( $attribute == 'product_cat' ) {
576
- if( $parent_product_cat_current ) {
577
- $cate = get_queried_object();
578
- if( isset($cate->term_id) ) {
579
- $cateID = $cate->term_id;
580
- $title = str_replace( '%product_cat%', $cate->name, $title );
581
- } else {
582
- $cateID = 0;
583
- $title = str_replace( '%product_cat%', '', $title );
584
- }
585
- $parent_product_cat_cache = $cateID;
586
- $parent_product_cat = $cateID;
587
- } else {
588
- $parent_product_cat_cache = $parent_product_cat;
589
- }
590
- $terms = br_get_cache ( $attribute . $order_values_by, $wp_check_product_cat . $parent_product_cat_cache . $depth_count );
591
- if ( br_is_filtered() || $terms === false ) {
592
- $terms_unsort = br_get_cat_hierarchy(array(), $parent_product_cat, $depth_count );
593
- self::sort_terms( $terms_unsort, array(
594
- "order_values_by" => $order_values_by,
595
- "attribute" => $attribute,
596
- "order_values_type"=> (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC)
597
- ) );
598
-
599
- $terms_unsort = self::set_terms_on_same_level( $terms_unsort, array(), ($type != 'checkbox' && $type != 'radio') );
600
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $attribute, 'id', braapf_filters_must_be_recounted('first'), ( braapf_filters_must_be_recounted() ), $terms_unsort, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
601
- if ( isset( $depth_count ) ) {
602
- $old_terms = array();
603
- foreach($terms as $term_data) {
604
- $old_terms[$term_data->term_id] = $term_data;
605
- }
606
- $terms = array();
607
-
608
- foreach( $terms_unsort as $term_unsort ) {
609
- if ( ! empty( $old_terms[ $term_unsort->term_id ] ) ) {
610
- $terms[ $term_unsort->term_id ] = $old_terms[ $term_unsort->term_id ];
611
- }
612
- }
613
- }
614
-
615
- if ( ! br_is_filtered() ) {
616
- br_set_cache( $attribute.$order_values_by, $terms, $wp_check_product_cat.$parent_product_cat_cache.$depth_count, BeRocket_AJAX_cache_expire );
617
- }
618
- }
619
-
620
- if( BeRocket_AAPF::$debug_mode ) {
621
- $widget_error_log['terms'] = $terms;
622
- }
623
- $terms = apply_filters('berocket_aapf_widget_include_exclude_items', $terms, $instance);
624
-
625
- if ( empty($terms) || ! is_array($terms) || count( $terms ) < 1 ) {
626
- $widget_error_log['terms'] = $terms;
627
- $widget_error_log['return'] = 'terms < 1';
628
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
629
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
630
- return false;
631
- }
632
- $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
633
- unset( $terms, $terms_unsort );
634
- } else {
635
- $sort_array = array();
636
- $wc_order_by = wc_attribute_orderby( $attribute );
637
-
638
- $terms = br_get_cache ( $attribute, $wp_check_product_cat );
639
- if( br_is_filtered() || $terms === false || ( ! empty($child_parent) && ( $child_parent == 'parent' || $child_parent == 'child' ) ) ) {
640
- $current_terms = self::get_terms_child_parent ( ( empty($child_parent) ? '' : $child_parent ), $attribute, FALSE, ( isset($child_parent_depth) ? $child_parent_depth : null ) );
641
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $attribute, 'id', braapf_filters_must_be_recounted('first'), ( braapf_filters_must_be_recounted() ), $current_terms, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
642
- if( ! br_is_filtered() && ( empty($child_parent) || ( $child_parent != 'parent' && $child_parent != 'child' ) ) ) {
643
- br_set_cache ( $attribute, $terms, $wp_check_product_cat, BeRocket_AJAX_cache_expire );
644
- }
645
- }
646
- $terms = apply_filters('berocket_aapf_widget_include_exclude_items', $terms, $instance);
647
-
648
- if ( empty($terms) || ! is_array($terms) || count( $terms ) < 1 ) {
649
- $widget_error_log['terms'] = $terms;
650
- $widget_error_log['return'] = 'terms < 1';
651
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
652
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
653
- return false;
654
- }
655
-
656
- if ( $wc_order_by == 'menu_order' and $order_values_by == 'Default' ) {
657
- foreach ( $terms as $term ) {
658
- if( isset($term->term_id) ) {
659
- $sort_array[] = get_term_meta( $term->term_id, ( br_woocommerce_version_check('3.6') ? 'order' : 'order_' . $attribute ), true );
660
- }
661
- }
662
- array_multisort( $sort_array, (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC), $terms );
663
- } else {
664
- self::sort_terms( $terms, array(
665
- "wc_order_by" => $wc_order_by,
666
- "order_values_by" => $order_values_by,
667
- "filter_type" => $filter_type,
668
- "order_values_type"=> (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC)
669
- ) );
670
- }
671
-
672
- if( BeRocket_AAPF::$debug_mode ) {
673
- $widget_error_log['terms'] = $terms;
674
- }
675
- $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
676
- }
677
-
678
- } elseif ( $filter_type == 'tag' ) {
679
- $attribute = 'product_tag';
680
- $terms = br_get_cache ( $attribute.$order_values_by, $wp_check_product_cat );
681
- if( br_is_filtered() || $terms === false ) {
682
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $attribute, 'id', braapf_filters_must_be_recounted('first'), ( braapf_filters_must_be_recounted() ), FALSE, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
683
-
684
- if ( $order_values_by != 'Default' ) {
685
- self::sort_terms( $terms, array(
686
- "order_values_by" => $order_values_by,
687
- "attribute" => $attribute,
688
- "order_values_type"=> (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC)
689
- ) );
690
- }
691
- if( ! br_is_filtered() ) {
692
- br_set_cache ( $attribute.$order_values_by, $terms, $wp_check_product_cat, BeRocket_AJAX_cache_expire );
693
- }
694
- }
695
-
696
- if( BeRocket_AAPF::$debug_mode ) {
697
- $widget_error_log['terms'] = $terms;
698
- }
699
-
700
- $terms = apply_filters('berocket_aapf_widget_include_exclude_items', $terms, $instance);
701
-
702
- $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
703
-
704
- if ( empty($terms) || ! is_array($terms) || count( $terms ) < 1 ) {
705
- $widget_error_log['terms'] = $terms;
706
- $widget_error_log['return'] = 'terms < 1';
707
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
708
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
709
- return false;
710
- }
711
- } elseif ( $filter_type == 'custom_taxonomy' ) {
712
- $terms = br_get_cache ( $custom_taxonomy.$order_values_by, $filter_type.$wp_check_product_cat );
713
- if( br_is_filtered() || $terms === false || ( ! empty($child_parent) && ( $child_parent == 'parent' || $child_parent == 'child' ) ) ) {
714
- if ( $custom_taxonomy == 'product_cat' ) {
715
- if( empty($child_parent) || ( $child_parent != 'parent' && $child_parent != 'child' ) ) {
716
- $terms = br_get_cat_hierarchy(array());
717
- $terms = self::set_terms_on_same_level( $terms, array(), ($type != 'checkbox' && $type != 'radio') );
718
- } else {
719
- $terms = self::get_terms_child_parent ( ( empty($child_parent) ? '' : $child_parent ), $custom_taxonomy, FALSE, ( isset($child_parent_depth) ? $child_parent_depth : null ) );
720
- }
721
- } else {
722
- $terms = self::get_terms_child_parent ( $child_parent, $custom_taxonomy, FALSE, ( isset($child_parent_depth) ? $child_parent_depth : 0 ) );
723
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $custom_taxonomy, 'id', braapf_filters_must_be_recounted('first'), ( braapf_filters_must_be_recounted() ), $terms, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
724
- }
725
- if( $custom_taxonomy == 'product_cat' ) {
726
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $custom_taxonomy, 'id', braapf_filters_must_be_recounted('first'), ( braapf_filters_must_be_recounted() ), $terms, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
727
- }
728
- if ( $order_values_by != 'Default' || in_array($custom_taxonomy, array('berocket_brand', 'product_cat')) ) {
729
- if( $custom_taxonomy == 'product_cat' ) {
730
- $terms_unsort = br_get_cat_hierarchy(array(), 0, 0 );
731
- self::sort_terms( $terms_unsort, array(
732
- "order_values_by" => $order_values_by,
733
- "attribute" => $custom_taxonomy,
734
- "order_values_type"=> (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC)
735
- ) );
736
-
737
- $terms_unsort = self::set_terms_on_same_level( $terms_unsort, array(), ($type != 'checkbox' && $type != 'radio') );
738
- if ( isset( $depth_count ) ) {
739
- $old_terms = array();
740
- foreach($terms as $term_data) {
741
- $old_terms[$term_data->term_id] = $term_data;
742
- }
743
- $terms = array();
744
-
745
- foreach( $terms_unsort as $term_unsort ) {
746
- if ( ! empty( $old_terms[ $term_unsort->term_id ] ) ) {
747
- $terms[ $term_unsort->term_id ] = $old_terms[ $term_unsort->term_id ];
748
- }
749
- }
750
- }
751
- } else {
752
- self::sort_terms( $terms, array(
753
- "order_values_by" => $order_values_by,
754
- "attribute" => $custom_taxonomy,
755
- "order_values_type"=> (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC)
756
- ) );
757
- }
758
- }
759
- if ( ! br_is_filtered() && $child_parent != 'parent' && $child_parent != 'child' ) {
760
- br_set_cache( $custom_taxonomy . $order_values_by, $terms, $filter_type . $wp_check_product_cat, BeRocket_AJAX_cache_expire );
761
- }
762
- }
763
-
764
- if( BeRocket_AAPF::$debug_mode ) {
765
- $widget_error_log['terms'] = $terms;
766
- }
767
- $terms = apply_filters('berocket_aapf_widget_include_exclude_items', $terms, $instance);
768
-
769
- $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
770
- $sort_array = self::sort_child_parent_hierarchy($terms);
771
- @ array_multisort( $sort_array, (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC), SORT_NUMERIC, $terms );
772
-
773
- if ( ! isset($terms) || ! is_array($terms) || count( $terms ) < 1 ) {
774
- $widget_error_log['terms'] = ( isset($terms) ? $terms : '' );
775
- $widget_error_log['return'] = 'terms < 1';
776
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
777
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
778
- return false;
779
- }
780
- }
781
- }
782
-
783
- $style = $class = '';
784
- $style = br_get_value_from_array($args, 'widget_inline_style');
785
- if( ! empty($height) and $height != 'auto' ){
786
- $style .= "max-height: {$height}px; overflow: hidden;";
787
- $class = "berocket_aapf_widget_height_control";
788
- }
789
-
790
- if( !$scroll_theme ) $scroll_theme = 'dark';
791
- if( $filter_type == 'custom_taxonomy' )
792
- $attribute = $custom_taxonomy;
793
- if( ! isset($attribute_count) || $attribute_count == '' ) {
794
- $attribute_count = br_get_value_from_array($br_options,'attribute_count');
795
- }
796
-
797
- if( $type == 'select' || $type == 'slider' ) {
798
- $values_per_row = 1;
799
- }
800
-
801
- $set_query_var_title['operator'] = $operator;
802
- $set_query_var_title['attribute'] = $attribute;
803
- $set_query_var_title['type'] = $type;
804
- $set_query_var_title['title'] = apply_filters( 'berocket_aapf_widget_title', $title );
805
- $set_query_var_title['class'] = apply_filters( 'berocket_aapf_widget_class', $class );
806
- $set_query_var_title['css_class'] = apply_filters( 'berocket_aapf_widget_css_class', (isset($css_class) ? $css_class : '') );
807
- $set_query_var_title['style'] = apply_filters( 'berocket_aapf_widget_style', $style );
808
- $set_query_var_title['scroll_theme'] = $scroll_theme;
809
- $set_query_var_title['x'] = time();
810
- $set_query_var_title['filter_type'] = $filter_type;
811
- $set_query_var_title['uo'] = br_aapf_converter_styles( (empty($br_options['styles']) ? '' : $br_options['styles']) );
812
- $set_query_var_title['notuo'] = (empty($br_options['styles']) ? '' : $br_options['styles']);
813
- $set_query_var_title['widget_is_hide'] = (! empty($widget_collapse_enable) && ! empty($widget_is_hide));
814
- $set_query_var_title['widget_collapse_disable'] = empty($widget_collapse_enable);
815
- $set_query_var_title['is_hide_mobile'] = ! empty($is_hide_mobile);
816
- $set_query_var_title['show_product_count_per_attr'] = ! empty($show_product_count_per_attr);
817
- $set_query_var_title['hide_child_attributes'] = ! empty($hide_child_attributes);
818
- $set_query_var_title['cat_value_limit'] = ( isset($cat_value_limit) ? $cat_value_limit : null );
819
- $set_query_var_title['select_first_element_text'] = ( empty($select_first_element_text) ? __('Any', 'BeRocket_AJAX_domain') : $select_first_element_text );
820
- $set_query_var_title['icon_before_title'] = (isset($icon_before_title) ? $icon_before_title : null);
821
- $set_query_var_title['icon_after_title'] = (isset($icon_after_title) ? $icon_after_title : null);
822
- $set_query_var_title['hide_o_value'] = ! empty($br_options['hide_value']['o']);
823
- $set_query_var_title['hide_sel_value'] = ! empty($br_options['hide_value']['sel']);
824
- $set_query_var_title['hide_empty_value'] = ! empty($br_options['hide_value']['empty']);
825
- $set_query_var_title['hide_button_value'] = ! empty($br_options['hide_value']['button']);
826
- $set_query_var_title['attribute_count_show_hide'] = berocket_isset($attribute_count_show_hide);
827
- $set_query_var_title['attribute_count'] = $attribute_count;
828
- $set_query_var_title['description'] = (isset($description) ? $description : null);
829
- $set_query_var_title['hide_collapse_arrow'] = (empty($widget_collapse_enable) || ! empty($hide_collapse_arrow));
830
- $set_query_var_title['values_per_row'] = (isset($values_per_row) ? $values_per_row : null);
831
- $set_query_var_title['child_parent'] = (isset($child_parent) ? $child_parent : null);
832
- $set_query_var_title['child_parent_depth'] = (isset($child_parent_depth) ? $child_parent_depth : null);
833
- $set_query_var_title['product_count_style'] = (isset($br_options['styles_input']['product_count']) ? $br_options['styles_input']['product_count'] : '').'pcs '.(isset($br_options['styles_input']['product_count_position']) ? $br_options['styles_input']['product_count_position'] : null).'pcs';
834
- $set_query_var_title['styles_input'] = (isset($br_options['styles_input']) ? $br_options['styles_input'] : array());
835
- $set_query_var_title['child_parent_previous'] = (isset($child_parent_previous) ? $child_parent_previous : null);
836
- $set_query_var_title['child_parent_no_values'] = (isset($child_parent_no_values) ? $child_parent_no_values : null);
837
- $set_query_var_title['child_parent_no_products'] = (isset($child_parent_no_products) ? $child_parent_no_products : null);
838
- $set_query_var_title['before_title'] = (isset($before_title) ? $before_title : null);
839
- $set_query_var_title['after_title'] = (isset($after_title) ? $after_title : null);
840
- $set_query_var_title['widget_id'] = ( $this->id ? $this->id : $widget_id );
841
- $set_query_var_title['widget_id_number'] = ( $this->number ? $this->number : $widget_id_number );
842
- $set_query_var_title['slug_urls'] = ! empty($br_options['slug_urls']);
843
- $set_query_var_title = apply_filters('berocket_aapf_query_var_title_filter', $set_query_var_title, $instance, $br_options);
844
- set_query_var( 'berocket_query_var_title', $set_query_var_title );
845
-
846
- // widget title and start tag ( <ul> ) can be found in templates/widget_start.php
847
- echo $before_widget;
848
- do_action('berocket_aapf_widget_before_start');
849
- br_get_template_part('widget_start');
850
- do_action('berocket_aapf_widget_after_start');
851
-
852
- $slider_with_string = false;
853
- $stringed_is_numeric = true;
854
- $slider_step = 1;
855
-
856
- if ( $type == 'slider' ) {
857
- $min = $max = false;
858
- $main_class = 'slider';
859
- $slider_class = 'berocket_filter_slider';
860
-
861
- if ( $attribute == 'price' ){
862
- wp_localize_script(
863
- 'berocket_aapf_widget-script',
864
- 'br_price_text',
865
- array(
866
- 'before' => (isset($text_before_price) ? $text_before_price : ''),
867
- 'after' => (isset($text_after_price) ? $text_after_price : ''),
868
- )
869
- );
870
- if ( ! empty($price_values) ) {
871
- $all_terms_name = $price_range;
872
- $all_terms_slug = $price_range;
873
- $stringed_is_numeric = true;
874
- $min = 0;
875
- $max = count( $all_terms_name ) - 1;
876
- $slider_with_string = true;
877
- } else {
878
- if( $price_range ) {
879
- foreach ( $price_range as $price ) {
880
- if ( $min === false or $min > (int) $price ) {
881
- $min = $price;
882
- }
883
- if ( $max === false or $max < (int) $price ) {
884
- $max = $price;
885
- }
886
- }
887
- }
888
- if( $use_min_price ) {
889
- $min = $min_price;
890
- }
891
- if ( $use_max_price ) {
892
- $max = $max_price;
893
- }
894
- }
895
- $id = 'br_price';
896
- $slider_class .= ' berocket_filter_price_slider';
897
- $main_class .= ' price';
898
-
899
- $min = floor( $min );
900
- $max = ceil( $max );
901
- } else {
902
- if ( $slider_default ) {
903
- $slider_with_string = true;
904
- }
905
-
906
- if ( isset($terms) && is_array($terms) && count( $terms ) < 1 ) {
907
- $widget_error_log['terms'] = $terms;
908
- $widget_error_log['return'] = 'terms < 1';
909
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
910
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
911
- return false;
912
- }
913
-
914
- if( ! empty($terms) && is_array($terms) ) {
915
- $all_terms_name = array();
916
- $all_terms_slug = array();
917
- foreach ( $terms as $term ) {
918
- if ( ! is_numeric( $term->name ) ) {
919
- $slider_with_string = true;
920
- if ( ! is_numeric( substr( $term->name, 0, 1 ) ) ) {
921
- $stringed_is_numeric = false;
922
- }
923
- }
924
- if ( $min === false or strcmp( $min, $term->name ) > 0 ) {
925
- $min = $term->name;
926
- }
927
- if ( $max === false or strcmp( $max, $term->name ) < 0 ) {
928
- $max = $term->name;
929
- }
930
- array_push( $all_terms_name, urldecode($term->slug) );
931
- array_push( $all_terms_slug, $term->name );
932
- }
933
-
934
- if ( ! $slider_with_string ) {
935
- $min = false;
936
- $max = false;
937
- foreach ( $terms as $term ) {
938
- if ( (float) $term->name != (int) (float) $term->name ) {
939
- if ( round( (float) $term->name, 1 ) == (float) $term->name && $slider_step != 100 ) {
940
- $slider_step = 10;
941
- } else {
942
- $slider_step = 100;
943
- }
944
- }
945
- if ( $min === false or $min > (float) $term->name ) {
946
- $min = round( (float) $term->name, 2 );
947
- if ( $min > (float) $term->name ) {
948
- $min -= 0.01;
949
- }
950
- }
951
- if ( $max === false or $max < (float) $term->name ) {
952
- $max = round( (float) $term->name, 2 );
953
- if ( $max < (float) $term->name ) {
954
- $max += 0.01;
955
- }
956
- }
957
- }
958
- }
959
- }
960
- $widget_error_log['slider_with_string'] = (isset($slider_with_string) ? $slider_with_string : null);
961
- $widget_error_log['stringed_is_numeric'] = (isset($stringed_is_numeric) ? $stringed_is_numeric : null);
962
-
963
- $id = $term->taxonomy;
964
- if ( empty($slider_with_string) ) {
965
- $min *= $slider_step;
966
- $max *= $slider_step;
967
- $all_terms_name = null;
968
- } else {
969
- if ( count( $all_terms_name ) == 1 ) {
970
- array_push( $all_terms_name, $all_terms_name[0] );
971
- array_push( $all_terms_slug, $all_terms_slug[0] );
972
- }
973
- $min = 0;
974
- $max = count( $all_terms_name ) - 1;
975
- if( ! empty($stringed_is_numeric) ) {
976
- array_multisort( $all_terms_slug, SORT_NUMERIC, $all_terms_slug, $all_terms_name );
977
- } elseif($filter_type == 'custom_taxonomy') {
978
- array_multisort( $all_terms_name, $all_terms_name, $all_terms_slug );
979
- }
980
- }
981
- $widget_error_log['all_terms_slug'] = (isset($all_terms_slug) ? $all_terms_slug : null);
982
- $widget_error_log['all_terms_name'] = (isset($all_terms_name) ? $all_terms_name : null);
983
- }
984
-
985
- $slider_value1 = $min;
986
- $slider_value2 = $max;
987
-
988
- if ( $attribute == 'price' and ! empty($_POST['price']) ) {
989
- if ( ! empty($price_values) ) {
990
- $slider_value1 = array_search( $_POST['price'][0], $all_terms_name );
991
- $slider_value2 = array_search( $_POST['price'][1], $all_terms_name );
992
- } else {
993
- $slider_value1 = apply_filters('berocket_price_filter_widget_min_amount', apply_filters('berocket_price_slider_widget_min_amount', apply_filters('woocommerce_price_filter_widget_min_amount', $_POST['price'][0])), $_POST['price'][0]);
994
- $slider_value2 = apply_filters('berocket_price_filter_widget_max_amount', apply_filters('berocket_price_slider_widget_max_amount', apply_filters('woocommerce_price_filter_widget_max_amount', $_POST['price'][1])), $_POST['price'][1]);
995
- }
996
- }
997
- if ( $attribute != 'price' and ! empty($_POST['limits']) and is_array($_POST['limits']) ) {
998
- foreach ( $_POST['limits'] as $p_limit ) {
999
- if ( $p_limit[0] == $attribute ) {
1000
- $slider_value1 = $p_limit[1];
1001
- $slider_value2 = $p_limit[2];
1002
- if ( ! $slider_with_string ) {
1003
- $slider_value1 *= $slider_step;
1004
- $slider_value2 *= $slider_step;
1005
- } else {
1006
- $p_limit[1] = urldecode( $p_limit[1] );
1007
- $p_limit[2] = urldecode( $p_limit[2] );
1008
- $slider_value1 = array_search( $p_limit[1], $all_terms_name );
1009
- $slider_value2 = array_search( $p_limit[2], $all_terms_name );
1010
- if( $slider_value1 === FALSE ) {
1011
- $slider_value1 = 0;
1012
- }
1013
- if( $slider_value2 === FALSE ) {
1014
- $slider_value2 = count($all_terms_name) - 1;
1015
- }
1016
- }
1017
- }
1018
- }
1019
- if( BeRocket_AAPF::$debug_mode ) {
1020
- $widget_error_log['value_1'] = $slider_value1;
1021
- $widget_error_log['value_2'] = $slider_value2;
1022
- $widget_error_log['step'] = $slider_step;
1023
- }
1024
- }
1025
-
1026
- $wpml_id = preg_replace( '#^pa_#', '', $id );
1027
- $wpml_id = 'pa_'.berocket_wpml_attribute_translate($wpml_id);
1028
- $set_query_var_title['slider_value1'] = $slider_value1;
1029
- $set_query_var_title['slider_value2'] = $slider_value2;
1030
- $set_query_var_title['filter_slider_id'] = $wpml_id;
1031
- $set_query_var_title['main_class'] = $main_class;
1032
- $set_query_var_title['slider_class'] = $slider_class;
1033
- $set_query_var_title['min'] = $min;
1034
- $set_query_var_title['max'] = $max;
1035
- $set_query_var_title['step'] = $slider_step;
1036
- $set_query_var_title['slider_with_string'] = $slider_with_string;
1037
- $set_query_var_title['all_terms_name'] = ( empty($all_terms_name) ? null : $all_terms_name );
1038
- $set_query_var_title['all_terms_slug'] = ( empty($all_terms_slug) ? null : $all_terms_slug );
1039
- $set_query_var_title['text_before_price'] = (isset($text_before_price) ? $text_before_price : null);
1040
- $set_query_var_title['text_after_price'] = (isset($text_after_price) ? $text_after_price : null);
1041
- $set_query_var_title['enable_slider_inputs'] = (isset($enable_slider_inputs) ? $enable_slider_inputs : null);
1042
- if( ! empty($number_style) ) {
1043
- $set_query_var_title['number_style'] = array(
1044
- ( empty($number_style_thousand_separate) ? '' : $number_style_thousand_separate ),
1045
- ( empty($number_style_decimal_separate) ? '' : $number_style_decimal_separate ),
1046
- ( empty($number_style_decimal_number) ? '' : $number_style_decimal_number )
1047
- );
1048
- } else {
1049
- $set_query_var_title['number_style'] = '';
1050
- }
1051
- }
1052
- $set_query_var_title['first_page_jump'] = ( empty($first_page_jump) ? '' : $first_page_jump );
1053
- $set_query_var_title['icon_before_value'] = (isset($icon_before_value) ? $icon_before_value : null);
1054
- $set_query_var_title['icon_after_value'] = (isset($icon_after_value) ? $icon_after_value : null);
1055
-
1056
- if ( $type == 'tag_cloud' ) {
1057
- $tag_script_var = array(
1058
- 'height' => $tag_cloud_height,
1059
- 'min_font_size' => $tag_cloud_min_font,
1060
- 'max_font_size' => $tag_cloud_max_font,
1061
- 'tags_count' => $tag_cloud_tags_count,
1062
- 'tags_type' => $tag_cloud_type
1063
- );
1064
- $set_query_var_title['tag_script_var'] = $tag_script_var;
1065
- } elseif ( $type == 'color' || $type == 'image' ) {
1066
- $set_query_var_title['use_value_with_color'] = (isset($use_value_with_color) ? $use_value_with_color : null);
1067
- $set_query_var_title['disable_multiple'] = (isset($disable_multiple) ? $disable_multiple : null);
1068
- $set_query_var_title['color_image_block_size'] = berocket_isset($color_image_block_size, false, 'h2em w2em');
1069
- $set_query_var_title['color_image_checked'] = berocket_isset($color_image_checked, false, 'brchecked_default');
1070
- $set_query_var_title['color_image_checked_custom_css'] = berocket_isset($color_image_checked_custom_css);
1071
- $set_query_var_title['color_image_block_size_height'] = berocket_isset($color_image_block_size_height);
1072
- $set_query_var_title['color_image_block_size_width'] = berocket_isset($color_image_block_size_width);
1073
- }
1074
- if( $type == 'select' ) {
1075
- if( ! empty($br_options['use_select2']) ) {
1076
- if( ! empty($br_options['fixed_select2']) ) {
1077
- wp_enqueue_style( 'br_select2' );
1078
- } else {
1079
- wp_enqueue_style( 'select2' );
1080
- }
1081
- wp_enqueue_script( 'select2' );
1082
- }
1083
- $set_query_var_title['select_multiple'] = ! empty($select_multiple);
1084
- }
1085
- set_query_var( 'berocket_query_var_title', apply_filters('berocket_query_var_title_before_widget', $set_query_var_title, $type, $instance));
1086
- br_get_template_part( apply_filters('berocket_widget_load_template_name', $type, $instance, (empty($terms) ? '' : $terms)) );
1087
-
1088
- do_action('berocket_aapf_widget_before_end');
1089
- br_get_template_part('widget_end');
1090
- do_action('berocket_aapf_widget_after_end');
1091
- echo $after_widget;
1092
- if( BeRocket_AAPF::$debug_mode ) {
1093
- $widget_error_log['terms'] = (isset($terms) ? $terms : null);
1094
- }
1095
- $widget_error_log['return'] = 'OK';
1096
- BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
1097
- $this->restore_wp_the_query($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query);
1098
- }
1099
-
1100
- public static function restore_wp_the_query(&$br_wc_query, &$wp_the_query, &$wp_query, &$wc_query, &$old_the_query, &$old_query) {
1101
- if ( isset ( $br_wc_query ) ) {
1102
- if ( isset ( $old_query ) ) {
1103
- $wp_the_query = $old_the_query;
1104
- $wp_query = $old_query;
1105
- }
1106
- if( ! empty($wc_query) && is_a($wc_query, 'WP_Query') && class_exists('WC_Query') && method_exists('WC_Query', 'product_query') && method_exists('WC_Query', 'get_main_query') ) {
1107
- wc()->query->product_query($wc_query);
1108
- }
1109
- wc()->query->remove_ordering_args();
1110
- }
1111
- }
1112
-
1113
- public static function woocommerce_hide_out_of_stock_items(){
1114
- $hide = get_option( 'woocommerce_hide_out_of_stock_items', null );
1115
-
1116
- if ( is_array( $hide ) ) {
1117
- $hide = array_map( 'stripslashes', $hide );
1118
- } elseif ( ! is_null( $hide ) ) {
1119
- $hide = stripslashes( $hide );
1120
- }
1121
-
1122
- return apply_filters( 'berocket_aapf_hide_out_of_stock_items', $hide );
1123
- }
1124
-
1125
- public static function price_range_count($term, $from, $to) {
1126
- if( class_exists('WP_Meta_Query') && class_exists('WP_Tax_Query') ) {
1127
- global $wpdb, $wp_query;
1128
- $old_join_posts = '';
1129
- $has_new_function = method_exists('WC_Query', 'get_main_query') && method_exists('WC_Query', 'get_main_meta_query') && method_exists('WC_Query', 'get_main_tax_query');
1130
- if( $has_new_function ) {
1131
- $WC_Query_get_main_query = WC_Query::get_main_query();
1132
- $has_new_function = ! empty($WC_Query_get_main_query);
1133
- }
1134
- if( ! $has_new_function ) {
1135
- $old_query_vars = self::old_wc_compatible($wp_query);
1136
- $old_meta_query = (empty( $old_query_vars[ 'meta_query' ] ) || ! is_array($old_query_vars[ 'meta_query' ]) ? array() : $old_query_vars['meta_query']);
1137
- $old_tax_query = (empty($old_query_vars['tax_query']) || ! is_array($old_query_vars[ 'tax_query' ]) ? array() : $old_query_vars['tax_query']);
1138
- } else {
1139
- $old_query_vars = self::old_wc_compatible($wp_query, true);
1140
- }
1141
- if( ! empty( $old_query_vars['posts__in'] ) ) {
1142
- $old_join_posts = " AND {$wpdb->posts}.ID IN (".implode(',', $old_query_vars['posts__in']).") ";
1143
- }
1144
- if( $has_new_function ) {
1145
- $tax_query = WC_Query::get_main_tax_query();
1146
- } else {
1147
- $tax_query = $old_tax_query;
1148
- }
1149
- if( $has_new_function ) {
1150
- $meta_query = WC_Query::get_main_meta_query();
1151
- } else {
1152
- $meta_query = $old_meta_query;
1153
- }
1154
- foreach( $meta_query as $key => $val ) {
1155
- if( is_array($val) ) {
1156
- if ( ! empty( $val['price_filter'] ) || ! empty( $val['rating_filter'] ) ) {
1157
- unset( $meta_query[ $key ] );
1158
- }
1159
- if( isset( $val['relation']) ) {
1160
- unset($val['relation']);
1161
- foreach( $val as $key2 => $val2 ) {
1162
- if ( isset( $val2['key'] ) && $val2['key'] == apply_filters('berocket_price_filter_meta_key', '_price', 'widget_1162') ) {
1163
- if ( isset( $meta_query[ $key ][ $key2 ] ) ) unset( $meta_query[ $key ][ $key2 ] );
1164
- }
1165
- }
1166
- if( count($meta_query[ $key ]) <= 1 ) {
1167
- unset( $meta_query[ $key ] );
1168
- }
1169
- } else {
1170
- if ( isset( $val['key'] ) && $val['key'] == apply_filters('berocket_price_filter_meta_key', '_price', 'widget_1170') ) {
1171
- if ( isset( $meta_query[ $key ] ) ) unset( $meta_query[ $key ] );
1172
- }
1173
- }
1174
- }
1175
- }
1176
- $queried_object = $wp_query->get_queried_object_id();
1177
- if( ! empty($queried_object) ) {
1178
- $query_object = $wp_query->get_queried_object();
1179
- if( ! empty($query_object->taxonomy) && ! empty($query_object->slug) ) {
1180
- $tax_query[ $query_object->taxonomy ] = array(
1181
- 'taxonomy' => $query_object->taxonomy,
1182
- 'terms' => array( $query_object->slug ),
1183
- 'field' => 'slug',
1184
- );
1185
- }
1186
- }
1187
- $meta_query = new WP_Meta_Query( $meta_query );
1188
- $tax_query = new WP_Tax_Query( $tax_query );
1189
- $meta_query_sql = $meta_query->get_sql( 'post', $wpdb->posts, 'ID' );
1190
- $tax_query_sql = $tax_query->get_sql( $wpdb->posts, 'ID' );
1191
-
1192
- // Generate query
1193
- $query = array();
1194
- $query['select'] = "SELECT COUNT( DISTINCT {$wpdb->posts}.ID ) as range_count";
1195
- $query['from'] = "FROM {$wpdb->posts}";
1196
- $query['join'] = "
1197
- INNER JOIN {$wpdb->postmeta} AS price_term ON {$wpdb->posts}.ID = price_term.post_id
1198
- " . $tax_query_sql['join'] . $meta_query_sql['join'];
1199
- $query['where'] = "
1200
- WHERE {$wpdb->posts}.post_type IN ( 'product' )
1201
- AND " . br_select_post_status() . "
1202
- " . $tax_query_sql['where'] . $meta_query_sql['where'] . "
1203
- AND price_term.meta_key = '".apply_filters('berocket_price_filter_meta_key', '_price', 'widget_1203')."'
1204
- AND price_term.meta_value >= {$from} AND price_term.meta_value <= {$to}
1205
- ";
1206
- if( defined( 'WCML_VERSION' ) && defined('ICL_LANGUAGE_CODE') ) {
1207
- $query['join'] = $query['join']." INNER JOIN {$wpdb->prefix}icl_translations as wpml_lang ON ( {$wpdb->posts}.ID = wpml_lang.element_id )";
1208
- $query['where'] = $query['where']." AND wpml_lang.language_code = '".ICL_LANGUAGE_CODE."' AND wpml_lang.element_type = 'post_product'";
1209
- }
1210
- br_where_search( $query );
1211
- $query['where'] .= $old_join_posts;
1212
- $query = apply_filters( 'woocommerce_get_filtered_ranges_product_counts_query', $query );
1213
- $query = implode( ' ', $query );
1214
-
1215
- $results = $wpdb->get_results( $query );
1216
- if( isset( $results[0]->range_count ) ) {
1217
- $term->count = $results[0]->range_count;
1218
- }
1219
- }
1220
- return $term;
1221
- }
1222
-
1223
- public static function get_price_range( $wp_query_product_cat, $product_cat = null ) {
1224
- global $wpdb;
1225
-
1226
- $BeRocket_AAPF = BeRocket_AAPF::getInstance();
1227
- $br_options = $BeRocket_AAPF->get_option();
1228
-
1229
- if( br_woocommerce_version_check('3.6') ) {
1230
- $query[ 'select' ] = "SELECT MIN(cast(FLOOR(wc_product_meta_lookup.min_price) as decimal)) as min_price,
1231
- MAX(cast(CEIL(wc_product_meta_lookup.max_price) as decimal)) as max_price ";
1232
- $query[ 'from' ] = "FROM {$wpdb->posts}";
1233
- $query[ 'join' ] = " INNER JOIN {$wpdb->wc_product_meta_lookup} as wc_product_meta_lookup ON $wpdb->posts.ID = wc_product_meta_lookup.product_id ";
1234
- } else {
1235
- $query[ 'select' ] = "SELECT MIN(cast(FLOOR(wp_price_check.meta_value) as decimal)) as min_price,
1236
- MAX(cast(CEIL(wp_price_check.meta_value) as decimal)) as max_price ";
1237
- $query[ 'from' ] = "FROM {$wpdb->postmeta} as wp_price_check";
1238
- $query[ 'join' ] = "INNER JOIN {$wpdb->posts} ON ({$wpdb->posts}.ID = wp_price_check.post_id)";
1239
- }
1240
- if ( ! braapf_filters_must_be_recounted('first') ) {
1241
- $query[ 'where' ] = " WHERE {$wpdb->posts}.post_type = 'product' AND " . br_select_post_status();
1242
- } else {
1243
- $query = br_filters_query( $query, 'price', $product_cat );
1244
- }
1245
-
1246
- if( !br_woocommerce_version_check('3.6') ) {
1247
- if ( $query[ 'where' ] ) {
1248
- $query[ 'where' ] .= " AND ";
1249
- } else {
1250
- $query[ 'where' ] = " WHERE ";
1251
- }
1252
- $query[ 'where' ] .= "wp_price_check.meta_key = '".apply_filters('berocket_price_filter_meta_key', '_price', 'widget_1243')."' AND wp_price_check.meta_value > ''";
1253
- }
1254
-
1255
- if ( $post__not_in = apply_filters('berocket_aapf_get_attribute_values_post__not_in_outside', false) ) {
1256
- if ( $query[ 'where' ] ) {
1257
- $query[ 'where' ] .= " AND ";
1258
- } else {
1259
- $query[ 'where' ] = " WHERE ";
1260
- }
1261
-
1262
- $query[ 'where' ] .= "$wpdb->posts.ID NOT IN(" . implode( ',', $post__not_in ) . ")";
1263
- }
1264
- if ( $post__in = apply_filters('berocket_aapf_get_attribute_values_post__in_outside', false) ) {
1265
- if ( $query[ 'where' ] ) {
1266
- $query[ 'where' ] .= " AND ";
1267
- } else {
1268
- $query[ 'where' ] = " WHERE ";
1269
- }
1270
-
1271
- $query[ 'where' ] .= "$wpdb->posts.ID IN(" . implode( ',', $post__not_in ) . ")";
1272
- }
1273
-
1274
-
1275
- $query_string = implode( ' ', $query );
1276
-
1277
- $query_string = $wpdb->get_row( $query_string );
1278
-
1279
- $price_range = false;
1280
- if ( isset( $query_string->min_price ) && isset( $query_string->max_price ) && $query_string->min_price != $query_string->max_price ) {
1281
- $price_range = array(
1282
- apply_filters('berocket_price_filter_widget_min_amount', apply_filters('berocket_price_slider_widget_min_amount', apply_filters( 'woocommerce_price_filter_widget_min_amount', $query_string->min_price )), $query_string->min_price),
1283
- apply_filters('berocket_price_filter_widget_max_amount', apply_filters('berocket_price_slider_widget_max_amount', apply_filters( 'woocommerce_price_filter_widget_max_amount', $query_string->max_price )), $query_string->max_price)
1284
- );
1285
- }
1286
-
1287
- return apply_filters( 'berocket_aapf_get_price_range', $price_range );
1288
- }
1289
-
1290
- public static function get_attribute_values( $taxonomy = '', $order_by = 'id', $hide_empty = false, $count_filtering = true, $input_terms = FALSE, $product_cat = FALSE, $operator = 'OR' ) {
1291
- $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
1292
- if ( ! $taxonomy || $taxonomy == 'price' ) return array();
1293
- if( $taxonomy == '_rating' ) $taxonomy = 'product_visibility';
1294
- $terms = (empty($input_terms) ? FALSE : $input_terms);
1295
- if( is_array($terms) && count($terms) ) {
1296
- $first_element = array_shift($terms);
1297
- if(empty($first_element) || $first_element->term_id != 'R__term_id__R') {
1298
- $terms = (empty($input_terms) ? FALSE : $input_terms);
1299
- unset($first_element);
1300
- }
1301
- }
1302
- if( empty($terms) && ! empty($input_terms) ) {
1303
- return $input_terms;
1304
- }
1305
-
1306
- global $wp_query, $br_wc_query, $br_aapf_wc_footer_widget;
1307
-
1308
- $post__in = ( isset($wp_query->query_vars['post__in']) ? $wp_query->query_vars['post__in'] : array() );
1309
- if (
1310
- ! empty( $br_wc_query ) and
1311
- ! empty( $br_wc_query->query ) and
1312
- isset( $br_wc_query->query['post__in'] ) and
1313
- is_array( $br_wc_query->query['post__in'] )
1314
- ) {
1315
- $post__in = array_merge( $post__in, $br_wc_query->query[ 'post__in' ] );
1316
- }
1317
-
1318
- if( empty($post__in) || ! is_array($post__in) || count($post__in) == 0 ) {
1319
- $post__in = false;
1320
- }
1321
- $post__not_in = ( isset($wp_query->query_vars['post__not_in']) ? $wp_query->query_vars['post__not_in'] : array() );
1322
- if( empty($post__not_in) || ! is_array($post__not_in) || count($post__not_in) == 0 ) {
1323
- $post__not_in = false;
1324
- }
1325
- global $braapf_not_filtered_data;
1326
- if( isset($braapf_not_filtered_data['post__not_in']) ) {
1327
- $post__not_in = $braapf_not_filtered_data['post__not_in'];
1328
- }
1329
- $recount_args = array(
1330
- 'taxonomy' => $taxonomy,
1331
- 'operator' => $operator,
1332
- 'use_filters' => FALSE,
1333
- 'post__not_in' => apply_filters('berocket_aapf_get_attribute_values_post__not_in_outside', $post__not_in),
1334
- 'post__in' => apply_filters('berocket_aapf_get_attribute_values_post__in_outside', $post__in)
1335
- );
1336
- if( ! empty($product_cat) ) {
1337
- $recount_args['additional_tax_query'] = array(
1338
- 'field' => 'slug',
1339
- 'include_children' => true,
1340
- 'operator' => 'IN',
1341
- 'taxonomy' => 'product_cat',
1342
- 'terms' => array($product_cat)
1343
- );
1344
- }
1345
- if( $hide_empty ) {
1346
- $terms = apply_filters('berocket_aapf_recount_terms_apply', $terms, $recount_args);
1347
- } elseif(empty($terms)) {
1348
- $terms = get_terms( array(
1349
- 'taxonomy' => $taxonomy,
1350
- 'hide_empty' => true,
1351
- 'hierarchical' => true,
1352
- 'post__not_in' => apply_filters('berocket_aapf_get_attribute_values_post__not_in_outside', false),
1353
- 'post__in' => apply_filters('berocket_aapf_get_attribute_values_post__in_outside', false)
1354
- ) );
1355
- }
1356
- if( empty($terms) || ! is_array($terms) ) {
1357
- $terms = array();
1358
- }
1359
- if( $hide_empty ) {
1360
- foreach($terms as $term_id => $term) {
1361
- if( $term->count == 0 ) {
1362
- unset($terms[$term_id]);
1363
- }
1364
- }
1365
- }
1366
- if (
1367
- ( ! $hide_empty
1368
- || apply_filters( 'berocket_aapf_is_filtered_page_check', ! empty($_GET['filters']), 'get_filter_args', $wp_query )
1369
- || ( ! empty($br_options['out_of_stock_variable_reload']) && ! empty($br_options['out_of_stock_variable']) )
1370
- || is_filtered()
1371
- ) && $count_filtering
1372
- ) {
1373
- $recount_args['use_filters'] = true;
1374
- $terms = apply_filters('berocket_aapf_recount_terms_apply', $terms, $recount_args);
1375
- }
1376
- if( isset($first_element) ) {
1377
- array_unshift($terms, $first_element);
1378
- }
1379
- return $terms;
1380
- }
1381
-
1382
- public static function sort_child_parent_hierarchy($terms) {
1383
- $terms_sort = array();
1384
- $new_terms = $terms;
1385
- $terms = array_reverse($terms);
1386
- foreach($terms as $term_id => $term) {
1387
- if(empty($term->parent)) {
1388
- $terms_sort[] = $term->term_id;
1389
- unset($terms[$term_id]);
1390
- }
1391
- }
1392
- $length = 0;
1393
- while(count($terms) && $length < 30) {
1394
- foreach($terms as $term_id => $term) {
1395
- $term_i = array_search($term->parent, $terms_sort);
1396
- if( $term_i !== FALSE ) {
1397
- array_splice($terms_sort, $term_i, 0, array($term->term_id));
1398
- unset($terms[$term_id]);
1399
- }
1400
- }
1401
- $length++;
1402
- }
1403
- if( count($terms) ) {
1404
- foreach($terms as $term_id => $term) {
1405
- $terms_sort[] = $term->term_id;
1406
- }
1407
- }
1408
- $sort_array = array();
1409
- foreach($new_terms as $terms) {
1410
- $sort_array[] = array_search($terms->term_id, $terms_sort);
1411
- }
1412
- return $sort_array;
1413
- }
1414
-
1415
- public static function sort_terms( &$terms, $sort_data ) {
1416
- $sort_array = array();
1417
- if ( ! empty($terms) && is_array( $terms ) && count( $terms ) ) {
1418
- if ( ! empty($sort_data['attribute']) and in_array($sort_data['attribute'], array('product_cat', 'berocket_brand')) and ! empty($sort_data['order_values_by']) and $sort_data['order_values_by'] == 'Default' ) {
1419
- foreach ( $terms as $term ) {
1420
- $element_of_sort = get_term_meta( $term->term_id, 'order', true );
1421
- if( is_array($element_of_sort) || $element_of_sort === false ) {
1422
- $sort_array[] = 0;
1423
- } else {
1424
- $sort_array[] = $element_of_sort;
1425
- }
1426
- if ( ! empty($term->child) ) {
1427
- self::sort_terms( $term->child, $sort_data );
1428
- }
1429
- }
1430
- if( BeRocket_AAPF::$debug_mode ) {
1431
- BeRocket_AAPF::$error_log[$sort_data['attribute'].'_sort'] = array('array' => $sort_array, 'sort' => $terms, 'data' => $sort_data );
1432
- }
1433
- @ array_multisort( $sort_array, $sort_data['order_values_type'], SORT_NUMERIC, $terms );
1434
- } elseif ( ! empty($sort_data['wc_order_by']) or ! empty($sort_data['order_values_by']) ) {
1435
- if ( ! empty($sort_data['order_values_by']) and $sort_data['order_values_by'] == 'Numeric' ) {
1436
- foreach ( $terms as $term ) {
1437
- $sort_array[] = (float)preg_replace('/\s+/', '', str_replace(',', '.', $term->name));
1438
- if ( ! empty($term->child) ) {
1439
- self::sort_terms( $term->child, $sort_data );
1440
- }
1441
- }
1442
- @ array_multisort( $sort_array, $sort_data['order_values_type'], SORT_NUMERIC, $terms );
1443
- } else {
1444
- $get_terms_args = array( 'hide_empty' => '0', 'fields' => 'ids' );
1445
-
1446
- if ( ! empty($sort_data['order_values_by']) and $sort_data['order_values_by'] == 'Alpha' ) {
1447
- $orderby = 'name';
1448
- } else {
1449
- $orderby = 'name';
1450
- foreach($terms as $term_sort) {
1451
- $orderby = wc_attribute_orderby( $term_sort->taxonomy );
1452
- break;
1453
- }
1454
- }
1455
-
1456
- switch ( $orderby ) {
1457
- case 'name':
1458
- $get_terms_args['orderby'] = 'name';
1459
- $get_terms_args['menu_order'] = false;
1460
- break;
1461
- case 'id':
1462
- $get_terms_args['orderby'] = 'id';
1463
- $get_terms_args['order'] = 'ASC';
1464
- $get_terms_args['menu_order'] = false;
1465
- break;
1466
- case 'menu_order':
1467
- $get_terms_args['menu_order'] = 'ASC';
1468
- break;
1469
- default:
1470
- break;
1471
- }
1472
-
1473
- if( count($terms) ) {
1474
- $terms_first = reset($terms);
1475
- $terms2 = get_terms( $terms_first->taxonomy, $get_terms_args );
1476
- foreach ( $terms as $term ) {
1477
- $sort_array[] = array_search($term->term_id, $terms2);
1478
- if ( ! empty($term->child) ) {
1479
- self::sort_terms( $term->child, $sort_data );
1480
- }
1481
- }
1482
- @ array_multisort( $sort_array, $sort_data['order_values_type'], SORT_NUMERIC, $terms );
1483
- }
1484
- }
1485
- $sort_array = self::sort_child_parent_hierarchy($terms);
1486
- @ array_multisort( $sort_array, SORT_DESC, SORT_NUMERIC, $terms );
1487
- }
1488
- }
1489
- }
1490
-
1491
- public static function set_terms_on_same_level( $terms, $return_array = array(), $add_spaces = true ) {
1492
- if ( ! empty($terms) && is_array( $terms ) && count( $terms ) ) {
1493
- foreach ( $terms as $term ) {
1494
- if ( $add_spaces ) {
1495
- for ( $i = 0; $i < $term->depth; $i++ ) {
1496
- $term->name = "&nbsp;&nbsp;" . $term->name;
1497
- }
1498
- }
1499
-
1500
- if( ! empty($term->child) ) {
1501
- $child = $term->child;
1502
- unset( $term->child );
1503
- }
1504
-
1505
- $return_array[] = $term;
1506
-
1507
- if ( ! empty($child) ) {
1508
- $return_array = self::set_terms_on_same_level( $child, $return_array, $add_spaces );
1509
- unset($child);
1510
- }
1511
- }
1512
- } else {
1513
- $return_array = $terms;
1514
- }
1515
- return $return_array;
1516
- }
1517
-
1518
- public static function get_filter_products( $wp_query_product_cat, $woocommerce_hide_out_of_stock_items, $use_filters = true ) {
1519
- $BeRocket_AAPF = BeRocket_AAPF::getInstance();
1520
- global $wp_query, $wp_rewrite;
1521
- $_POST['product_cat'] = $wp_query_product_cat;
1522
-
1523
- $old_post_terms = (isset($_POST['terms']) ? $_POST['terms'] : null);
1524
-
1525
- add_filter( 'woocommerce_pagination_args', array( __CLASS__, 'pagination_args' ) );
1526
-
1527
- $args = apply_filters( 'berocket_aapf_listener_wp_query_args', array() );
1528
- $tags = (isset($args['product_tag']) ? $args['product_tag'] : null);
1529
- $meta_query = $BeRocket_AAPF->remove_out_of_stock( array() , true, $woocommerce_hide_out_of_stock_items != 'yes' );
1530
- $args['post__in'] = array();
1531
-
1532
- if( $woocommerce_hide_out_of_stock_items == 'yes' ) {
1533
- $args['post__in'] = $BeRocket_AAPF->remove_out_of_stock( $args['post__in'] );
1534
- }
1535
- if ( $use_filters ) {
1536
- $args['post__in'] = $BeRocket_AAPF->limits_filter( $args['post__in'] );
1537
- $args['post__in'] = $BeRocket_AAPF->price_filter( $args['post__in'] );
1538
- $args['post__in'] = $BeRocket_AAPF->add_terms( $args['post__in'] );
1539
- } else {
1540
- $args = array( 'posts_per_page' => -1 );
1541
- if ( ! empty($_POST['product_cat']) and $_POST['product_cat'] != '-1' ) {
1542
- $args['tax_query'][] = array(
1543
- 'taxonomy' => 'product_cat',
1544
- 'field' => 'slug',
1545
- 'terms' => strip_tags( $_POST['product_cat'] ),
1546
- 'operator' => 'IN'
1547
- );
1548
- }
1549
- }
1550
-
1551
- $args['post_status'] = 'publish';
1552
- $args['post_type'] = 'product';
1553
-
1554
- if( isset($args['tax_query']) ) {
1555
- $tax_query_reset = $args['tax_query'];
1556
- unset($args['tax_query']);
1557
- }
1558
- $wp_query = new WP_Query( $args );
1559
- if( isset($tax_query_reset) ) {
1560
- $wp_query->set('tax_query', $tax_query_reset);
1561
- $args['tax_query'] = $tax_query_reset;
1562
- unset($tax_query_reset);
1563
- }
1564
-
1565
- // here we get max products to know if current page is not too big
1566
- if( ! isset($_POST['location']) ) {
1567
- $_POST['location'] = '';
1568
- }
1569
- if ( $wp_rewrite->using_permalinks() and preg_match( "~/page/([0-9]+)~", $_POST['location'], $mathces ) or preg_match( "~paged?=([0-9]+)~", $_POST['location'], $mathces ) ) {
1570
- $args['paged'] = min( $mathces[1], $wp_query->max_num_pages );
1571
- if( isset($args['tax_query']) ) {
1572
- $tax_query_reset = $args['tax_query'];
1573
- unset($args['tax_query']);
1574
- }
1575
- $wp_query = new WP_Query( $args );
1576
- if( isset($tax_query_reset) ) {
1577
- $wp_query->set('tax_query', $tax_query_reset);
1578
- $args['tax_query'] = $tax_query_reset;
1579
- unset($tax_query_reset);
1580
- }
1581
- }
1582
- if ( $wp_query->found_posts <= 1 ) {
1583
- $args['paged'] = 0;
1584
- if( isset($args['tax_query']) ) {
1585
- $tax_query_reset = $args['tax_query'];
1586
- unset($args['tax_query']);
1587
- }
1588
- $wp_query = new WP_Query( $args );
1589
- if( isset($tax_query_reset) ) {
1590
- $wp_query->set('tax_query', $tax_query_reset);
1591
- $args['tax_query'] = $tax_query_reset;
1592
- unset($tax_query_reset);
1593
- }
1594
- }
1595
-
1596
- $products = array();
1597
- if ( $wp_query->have_posts() ) {
1598
- while ( have_posts() ) {
1599
- the_post();
1600
- $products[] = get_the_ID();
1601
- }
1602
- }
1603
-
1604
- wp_reset_query();
1605
- if( isset($meta_query) && is_array( $meta_query ) && count( $meta_query ) > 0 ) {
1606
- $q_vars = $wp_query->query_vars;
1607
- foreach( $q_vars['meta_query'] as $key_meta => $val_meta ) {
1608
- if( $key_meta != 'relation' && $val_meta['key'] == '_stock_status') {
1609
- unset( $q_vars['meta_query'][$key_meta] );
1610
- }
1611
- }
1612
- $q_vars['meta_query'] = array_merge( $q_vars['meta_query'], $meta_query );
1613
- $wp_query->set('meta_query', $q_vars['meta_query']);
1614
- }
1615
- if( ! empty($tags) ) {
1616
- $q_vars = $wp_query->query_vars;
1617
- $q_vars['product_tag'] = $tags;
1618
- unset($q_vars['s']);
1619
- if( isset($q_vars['tax_query']) ) {
1620
- $tax_query_reset = $q_vars['tax_query'];
1621
- unset($q_vars['tax_query']);
1622
- }
1623
- $wp_query = new WP_Query( $q_vars );
1624
- if( isset($tax_query_reset) ) {
1625
- $wp_query->set('tax_query', $tax_query_reset);
1626
- $q_vars['tax_query'] = $tax_query_reset;
1627
- unset($tax_query_reset);
1628
- }
1629
- }
1630
-
1631
- $_POST['terms'] = $old_post_terms;
1632
- return $products;
1633
- }
1634
-
1635
- /**
1636
- * Validating and updating widget data
1637
- *
1638
- * @param array $new_instance
1639
- * @param array $old_instance
1640
- *
1641
- * @return array - new merged instance
1642
- */
1643
- function update( $new_instance, $old_instance ) {
1644
- return $old_instance;
1645
- }
1646
-
1647
- /**
1648
- * Output admin form
1649
- *
1650
- * @param array $instance
1651
- *
1652
- * @return string|void
1653
- */
1654
- function form( $instance ) {
1655
- $BeRocket_AAPF = BeRocket_AAPF::getInstance();
1656
- $BeRocket_AAPF->register_admin_scripts();
1657
- wp_enqueue_script( 'berocket_aapf_widget-admin' );
1658
-
1659
- wp_register_style( 'berocket_aapf_widget-style-admin', plugins_url('../css/admin.css', __FILE__), "", BeRocket_AJAX_filters_version );
1660
- wp_enqueue_style( 'berocket_aapf_widget-style-admin' );
1661
-
1662
- $default = apply_filters( 'berocket_aapf_form_defaults', self::$defaults );
1663
-
1664
- $instance = wp_parse_args( (array) $instance, $default );
1665
- if( ! empty($instance['product_cat']) && is_array($instance['product_cat']) ) {
1666
- foreach($instance['product_cat'] as &$product_cat_el) {
1667
- $product_cat_el = urldecode($product_cat_el);
1668
- }
1669
- }
1670
- $instance['product_cat'] = (isset($instance['product_cat']) ? $instance['product_cat'] : '');
1671
- $attributes = br_aapf_get_attributes();
1672
- $categories = self::get_product_categories( @ json_decode( $instance['product_cat'] ) );
1673
- $categories = self::set_terms_on_same_level( $categories );
1674
- $tags = get_terms( 'product_tag' );
1675
- $custom_taxonomies = get_object_taxonomies( 'product' );
1676
- $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
1677
-
1678
- include AAPF_TEMPLATE_PATH . "admin.php";
1679
- }
1680
-
1681
- /**
1682
- * Widget ajax listener
1683
- */
1684
- public static function listener(){
1685
- global $wp_query, $wp_rewrite;
1686
- $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
1687
-
1688
- $wp_query = self::listener_wp_query();
1689
- if( class_exists('WC_Query') && method_exists('WC_Query', 'product_query') ) {
1690
- $wp_query->get_posts();
1691
- wc()->query->product_query($wp_query);
1692
- }
1693
-
1694
- if( ! empty($br_options['alternative_load']) && $br_options['alternative_load_type'] == 'wpajax' ) {
1695
- ob_start();
1696
-
1697
- $is_have_post = $wp_query->have_posts();
1698
- if ( $is_have_post ) {
1699
- do_action('woocommerce_before_shop_loop');
1700
-
1701
- woocommerce_product_loop_start();
1702
- woocommerce_product_subcategories();
1703
-
1704
- while ( have_posts() ) {
1705
- the_post();
1706
- wc_get_template_part( 'content', 'product' );
1707
- }
1708
-
1709
- woocommerce_product_loop_end();
1710
-
1711
- do_action('woocommerce_after_shop_loop');
1712
-
1713
- wp_reset_postdata();
1714
-
1715
- $_RESPONSE['products'] = ob_get_contents();
1716
- } else {
1717
- echo apply_filters( 'berocket_aapf_listener_no_products_message', "<div class='no-products" . ( ( $br_options['no_products_class'] ) ? ' '.$br_options['no_products_class'] : '' ) . "'>" . $br_options['no_products_message'] . "</div>" );
1718
-
1719
- $_RESPONSE['no_products'] = ob_get_contents();
1720
- }
1721
- ob_end_clean();
1722
- if( empty($br_options['woocommerce_removes']['ordering']) ) {
1723
- ob_start();
1724
- woocommerce_catalog_ordering();
1725
- $_RESPONSE['catalog_ordering'] = ob_get_contents();
1726
- ob_end_clean();
1727
- }
1728
- if( empty($br_options['woocommerce_removes']['result_count']) ) {
1729
- ob_start();
1730
- woocommerce_result_count();
1731
- $_RESPONSE['result_count'] = ob_get_contents();
1732
- ob_end_clean();
1733
- }
1734
- if( empty($br_options['woocommerce_removes']['pagination']) ) {
1735
- ob_start();
1736
- woocommerce_pagination();
1737
- $_RESPONSE['pagination'] = ob_get_contents();
1738
- ob_end_clean();
1739
- }
1740
- }
1741
-
1742
- if( braapf_filters_must_be_recounted() ) {
1743
- $_RESPONSE['attributesname'] = array();
1744
- $_RESPONSE['attributes'] = array();
1745
- if(isset($_POST['attributes']) && is_array($_POST['attributes'])) {
1746
- $attributes = array_combine ( $_POST['attributes'], $_POST['cat_limit'] );
1747
- foreach( $attributes as $attribute => $cat_limit ) {
1748
- if($attribute != 'price') {
1749
- $terms = FALSE;
1750
- if( $attribute == '_stock_status' ) {
1751
- $terms = array();
1752
- array_push($terms, (object)array('term_id' => '1', 'term_taxonomy_id' => '1','name' => __('In stock', 'BeRocket_AJAX_domain'), 'slug' => 'instock', 'taxonomy' => '_stock_status', 'count' => 1));
1753
- array_push($terms, (object)array('term_id' => '2', 'term_taxonomy_id' => '2', 'name' => __('Out of stock', 'BeRocket_AJAX_domain'), 'slug' => 'outofstock', 'taxonomy' => '_stock_status', 'count' => 1));
1754
- }
1755
- $_RESPONSE['attributesname'][] = $attribute;
1756
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $attribute, 'id', false, TRUE, $terms, $cat_limit );
1757
- $_RESPONSE['attributes'][] = self::remove_pid( array_values($terms) );
1758
- }
1759
- }
1760
- }
1761
- }
1762
- $_RESPONSE = apply_filters('berocket_ajax_response_without_fix', $_RESPONSE);
1763
- echo json_encode( $_RESPONSE );
1764
-
1765
- die();
1766
- }
1767
-
1768
- public static function remove_pid( $terms ) {
1769
-
1770
- foreach ( $terms as &$term ) {
1771
- if ( isset( $term ) ) {
1772
- if ( isset( $term->PID ) ) {
1773
- $term->PID = '';
1774
- }
1775
-
1776
- if ( is_array( $term ) ) {
1777
- foreach ( $term as &$subterm ) {
1778
- if ( isset( $subterm ) and isset( $subterm->PID ) ) {
1779
- $subterm->PID = '';
1780
- }
1781
- }
1782
- }
1783
-
1784
- }
1785
- }
1786
- return $terms;
1787
- }
1788
-
1789
- public static function listener_wp_query() {
1790
- global $wp_query, $wp_rewrite;
1791
- $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
1792
-
1793
- $add_to_args = array();
1794
- if ( ! empty($_POST['limits']) && is_array($_POST['limits']) ) {
1795
- foreach ( $_POST['limits'] as $post_key => $t ) {
1796
- if( $t[0] == '_date' ) {
1797
- $from = $t[1];
1798
- $to = $t[2];
1799
- $from = substr($from, 0, 2).'/'.substr($from, 2, 2).'/'.substr($from, 4, 4);
1800
- $to = substr($to, 0, 2).'/'.substr($to, 2, 2).'/'.substr($to, 4, 4);
1801
- $from = date('Y-m-d 00:00:00', strtotime($from));
1802
- $to = date('Y-m-d 23:59:59', strtotime($to));
1803
- $add_to_args['date_query'] = array(
1804
- 'after' => $from,
1805
- 'before' => $to,
1806
- );
1807
- unset($_POST['limits'][$post_key]);
1808
- }
1809
- }
1810
- }
1811
- $BeRocket_AAPF = BeRocket_AAPF::getInstance();
1812
- if ( ! empty($_POST['terms']) && is_array($_POST['terms']) ) {
1813
- $stop_sale = false;
1814
- $check_sale = $check_notsale = 0;
1815
- foreach ( $_POST['terms'] as $post_key => $t ) {
1816
- if( $t[0] == 'price' ) {
1817
- if( preg_match( "~\*~", $t[1] ) ) {
1818
- if( ! isset( $_POST['price_ranges'] ) ) {
1819
- $_POST['price_ranges'] = array();
1820
- }
1821
- $_POST['price_ranges'][] = $t[1];
1822
- unset( $_POST['terms'][$post_key] );
1823
- }
1824
- } elseif( $t[0] == '_sale' ) {
1825
- // if both used do nothing
1826
- if ( $t[0] == '_sale' and $t[3] == 'sale' ) {
1827
- $check_sale++;
1828
- }
1829
- if ( $t[0] == '_sale' and $t[3] == 'notsale' ) {
1830
- $check_notsale++;
1831
- }
1832
- unset($_POST['terms'][$post_key]);
1833
- } elseif( $t[0] == '_rating' ) {
1834
- $_POST['terms'][$post_key][0] = 'product_visibility';
1835
- }
1836
- }
1837
- if ( ! empty($br_options['slug_urls']) ) {
1838
- foreach ( $_POST['terms'] as $post_key => $t ) {
1839
- if( $t[0] == '_stock_status' ) {
1840
- $_stock_status = array( 'instock' => 1, 'outofstock' => 2);
1841
- $_POST['terms'][$post_key][1] = (isset($_stock_status[$t[1]]) ? $_stock_status[$t[1]] : $_stock_status['instock']);
1842
- } else {
1843
- $t[1] = get_term_by( 'slug', $t[3], $t[0] );
1844
- $t[1] = $t[1]->term_id;
1845
- $_POST['terms'][$post_key] = $t;
1846
- }
1847
- }
1848
- }
1849
-
1850
- if ( ! ($check_sale and $check_notsale) ) {
1851
- if ( $check_sale ) {
1852
- $add_to_args['post__in'] = array_merge( array( 0 ), wc_get_product_ids_on_sale() );
1853
- } elseif( $check_notsale ) {
1854
- $add_to_args['post__in'] = array_merge( array( 0 ), $BeRocket_AAPF->wc_get_product_ids_not_on_sale() );
1855
- }
1856
- }
1857
- }
1858
-
1859
- add_filter( 'post_class', array( __CLASS__, 'add_product_class' ) );
1860
- add_filter( 'woocommerce_pagination_args', array( __CLASS__, 'pagination_args' ) );
1861
-
1862
- $woocommerce_hide_out_of_stock_items = BeRocket_AAPF_Widget::woocommerce_hide_out_of_stock_items();
1863
-
1864
- $meta_query = $BeRocket_AAPF->remove_out_of_stock( array() , true, $woocommerce_hide_out_of_stock_items != 'yes' );
1865
-
1866
- $args = apply_filters( 'berocket_aapf_listener_wp_query_args', array() );
1867
- foreach($add_to_args as $arg_name => $add_arg) {
1868
- $args[$arg_name] = $add_arg;
1869
- }
1870
- if( ! empty($_POST['limits']) ) {
1871
- $args = apply_filters('berocket_aapf_convert_limits_to_tax_query', $args, $_POST['limits']);
1872
- }
1873
- if( ! isset($args['post__in']) ) {
1874
- $args['post__in'] = array();
1875
- }
1876
- if( $woocommerce_hide_out_of_stock_items == 'yes' ) {
1877
- $args['post__in'] = $BeRocket_AAPF->remove_out_of_stock( $args['post__in'] );
1878
- }
1879
- if( ! br_woocommerce_version_check() ) {
1880
- $args['post__in'] = $BeRocket_AAPF->remove_hidden( $args['post__in'] );
1881
- }
1882
- $args['meta_query'] = $meta_query;
1883
-
1884
- if( ! empty($_POST['limits']) ) {
1885
- $args = apply_filters('berocket_aapf_convert_limits_to_tax_query', $args, $_POST['limits']);
1886
- }
1887
- if( isset($_POST['price']) && is_array($_POST['price']) ) {
1888
- $_POST['price'] = apply_filters('berocket_min_max_filter', $_POST['price']);
1889
- }
1890
- $min = isset( $_POST['price'][0] ) ? floatval( $_POST['price'][0] ) : 0;
1891
- $max = isset( $_POST['price'][1] ) ? floatval( $_POST['price'][1] ) : 9999999999;
1892
-
1893
- $args['meta_query'][] = array(
1894
- 'key' => apply_filters('berocket_price_filter_meta_key', '_price', 'widget_2847'),
1895
- 'value' => array( $min, $max ),
1896
- 'compare' => 'BETWEEN',
1897
- 'type' => 'DECIMAL',
1898
- 'price_filter' => true,
1899
- );
1900
- $args['post_status'] = 'publish';
1901
- if ( is_user_logged_in() ) {
1902
- $args['post_status'] .= '|private';
1903
- }
1904
- $args['post_type'] = 'product';
1905
- $default_posts_per_page = get_option( 'posts_per_page' );
1906
- $args['posts_per_page'] = apply_filters( 'loop_shop_per_page', $default_posts_per_page );
1907
- if ( ! empty($_POST['price_ranges']) && is_array($_POST['price_ranges']) ) {
1908
- $price_range_query = array( 'relation' => 'OR' );
1909
- foreach ( $_POST['price_ranges'] as $range ) {
1910
- $range = explode( '*', $range );
1911
- $price_range_query[] = array( 'key' => apply_filters('berocket_price_filter_meta_key', '_price', 'widget_2867'), 'compare' => 'BETWEEN', 'type' => 'NUMERIC', 'value' => array( ($range[0] - 1), $range[1] ) );
1912
- }
1913
- $args['meta_query'][] = $price_range_query;
1914
- }
1915
- if ( ! empty($_POST['price']) && is_array($_POST['price']) ) {
1916
- $args['meta_query'][] = array( 'key' => apply_filters('berocket_price_filter_meta_key', '_price', 'widget_2872'), 'compare' => 'BETWEEN', 'type' => 'NUMERIC', 'value' => array( ($_POST['price'][0]), $_POST['price'][1] ) );
1917
- }
1918
-
1919
- if( isset($_POST['product_taxonomy']) && $_POST['product_taxonomy'] != '-1' && strpos( $_POST['product_taxonomy'], '|' ) !== FALSE ) {
1920
- $product_taxonomy = explode( '|', $_POST['product_taxonomy'] );
1921
- $args['taxonomy'] = $product_taxonomy[0];
1922
- $args['term'] = $product_taxonomy[1];
1923
- }
1924
- if( isset($_POST['s']) && strlen($_POST['s']) > 0 ) {
1925
- $args['s'] = $_POST['s'];
1926
- }
1927
-
1928
- if( function_exists('wc_get_product_visibility_term_ids') ) {
1929
- $product_visibility_term_ids = wc_get_product_visibility_term_ids();
1930
-
1931
- $args['tax_query'][] = array(
1932
- 'taxonomy' => 'product_visibility',
1933
- 'field' => 'term_taxonomy_id',
1934
- 'terms' => array($product_visibility_term_ids['exclude-from-catalog']),
1935
- 'operator' => 'NOT IN'
1936
- );
1937
- }
1938
- $args = array_merge($args, WC()->query->get_catalog_ordering_args());
1939
- $wp_query = new WP_Query( $args );
1940
-
1941
- // here we get max products to know if current page is not too big
1942
- $is_using_permalinks = $wp_rewrite->using_permalinks();
1943
- $_POST['location'] = (empty($_POST['location']) ? $_GET['location'] : $_POST['location']);
1944
- if ( $is_using_permalinks and preg_match( "~/page/([0-9]+)~", $_POST['location'], $mathces ) or preg_match( "~paged?=([0-9]+)~", $_POST['location'], $mathces ) ) {
1945
- $args['paged'] = min( $mathces[1], $wp_query->max_num_pages );
1946
-
1947
- $wp_query = new WP_Query( $args );
1948
- }
1949
- return apply_filters('berocket_listener_wp_query_return', $wp_query, $args);
1950
- }
1951
-
1952
- public static function rebuild() {
1953
- add_action('woocommerce_before_shop_loop', array( __CLASS__, 'tags_restore' ), 999999);
1954
- }
1955
-
1956
- public static function tags_restore() {
1957
- global $wp_query;
1958
- $args = apply_filters( 'berocket_aapf_listener_wp_query_args', array() );
1959
- $tags = ( empty($args['product_tag']) ? '' : $args['product_tag'] );
1960
- if( ! empty($tags) ) {
1961
- $q_vars = $wp_query->query_vars;
1962
- $q_vars['product_tag'] = $tags;
1963
- $q_vars['taxonomy'] = '';
1964
- $q_vars['term'] = '';
1965
- unset( $q_vars['s'] );
1966
- if( isset($q_vars['tax_query']) ) {
1967
- $tax_query_reset = $q_vars['tax_query'];
1968
- unset($q_vars['tax_query']);
1969
- }
1970
- $wp_query = new WP_Query( $q_vars );
1971
- if( isset($tax_query_reset) ) {
1972
- $wp_query->set('tax_query', $tax_query_reset);
1973
- $q_vars['tax_query'] = $tax_query_reset;
1974
- unset($tax_query_reset);
1975
- }
1976
- }
1977
- }
1978
-
1979
- public static function woocommerce_before_main_content() {
1980
- ?>||EXPLODE||<?php
1981
- self::tags_restore();
1982
- }
1983
-
1984
- public static function woocommerce_after_main_content() {
1985
- ?>||EXPLODE||<?php
1986
- }
1987
-
1988
- public static function pre_get_posts() {
1989
- add_action( 'woocommerce_before_shop_loop', array( __CLASS__, 'woocommerce_before_main_content' ), 999999 );
1990
- add_action( 'woocommerce_after_shop_loop', array( __CLASS__, 'woocommerce_after_main_content' ), 1 );
1991
- }
1992
-
1993
- public static function end_clean() {
1994
- global $wp_query, $wp_rewrite;
1995
- $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
1996
- if ( $br_options['alternative_load_type'] != 'js' ) {
1997
- $_RESPONSE['products'] = explode('||EXPLODE||', ob_get_contents());
1998
- $_RESPONSE['products'] = $_RESPONSE['products'][1];
1999
- ob_end_clean();
2000
-
2001
- if ( $_RESPONSE['products'] == null ) {
2002
- unset( $_RESPONSE['products'] );
2003
- ob_start();
2004
- echo apply_filters( 'berocket_aapf_listener_no_products_message', "<p class='no-products woocommerce-info" . ( ( $br_options['no_products_class'] ) ? ' '.$br_options['no_products_class'] : '' ) . "'>" . $br_options['no_products_message'] . "</p>" );
2005
- $_RESPONSE['no_products'] = ob_get_contents();
2006
- ob_end_clean();
2007
- } else {
2008
- $_RESPONSE['products'] = str_replace( 'explode=explode#038;', '', $_RESPONSE['products'] );
2009
- $_RESPONSE['products'] = str_replace( '&#038;explode=explode', '', $_RESPONSE['products'] );
2010
- $_RESPONSE['products'] = str_replace( '?explode=explode', '', $_RESPONSE['products'] );
2011
- }
2012
- }
2013
-
2014
- if ( braapf_filters_must_be_recounted() ) {
2015
- $_RESPONSE['attributesname'] = array();
2016
- $_RESPONSE['attributes'] = array();
2017
-
2018
- if ( isset($_POST['attributes']) && is_array( $_POST['attributes'] ) ) {
2019
- $attributes = array_combine ( $_POST['attributes'], $_POST['cat_limit'] );
2020
- foreach ( $attributes as $attribute => $cat_limit ) {
2021
- if ( $attribute != 'price' ) {
2022
- $terms = FALSE;
2023
- if( $attribute == '_stock_status' ) {
2024
- $terms = array();
2025
- array_push($terms, (object)array('term_id' => '1', 'term_taxonomy_id' => '1','name' => __('In stock', 'BeRocket_AJAX_domain'), 'slug' => 'instock', 'taxonomy' => '_stock_status', 'count' => 1));
2026
- array_push($terms, (object)array('term_id' => '2', 'term_taxonomy_id' => '2', 'name' => __('Out of stock', 'BeRocket_AJAX_domain'), 'slug' => 'outofstock', 'taxonomy' => '_stock_status', 'count' => 1));
2027
- }
2028
- $_RESPONSE['attributesname'][] = $attribute;
2029
- $terms = BeRocket_AAPF_Widget::get_attribute_values( $attribute, 'id', braapf_filters_must_be_recounted('first'), TRUE, $terms, $cat_limit );
2030
- $_RESPONSE['attributes'][] = self::remove_pid( array_values($terms));
2031
- }
2032
- }
2033
- }
2034
- }
2035
- if( empty($br_options['woocommerce_removes']['ordering']) ) {
2036
- ob_start();
2037
- woocommerce_catalog_ordering();
2038
- $_RESPONSE['catalog_ordering'] = ob_get_contents();
2039
- ob_end_clean();
2040
- }
2041
- if( empty($br_options['woocommerce_removes']['result_count']) ) {
2042
- ob_start();
2043
- woocommerce_result_count();
2044
- $_RESPONSE['result_count'] = ob_get_contents();
2045
- ob_end_clean();
2046
- }
2047
- if( empty($br_options['woocommerce_removes']['pagination']) ) {
2048
- ob_start();
2049
- woocommerce_pagination();
2050
- $_RESPONSE['pagination'] = ob_get_contents();
2051
- $_RESPONSE['pagination'] = str_replace( 'explode=explode#038;', '', $_RESPONSE['pagination'] );
2052
- $_RESPONSE['pagination'] = str_replace( '&#038;explode=explode', '', $_RESPONSE['pagination'] );
2053
- $_RESPONSE['pagination'] = str_replace( '?explode=explode', '', $_RESPONSE['pagination'] );
2054
- ob_end_clean();
2055
- }
2056
- if ( $br_options['alternative_load_type'] == 'js' ) echo '||JSON||';
2057
- $_RESPONSE = apply_filters('berocket_ajax_response_with_fix', $_RESPONSE);
2058
- $_RESPONSE['attributesname'] = array_values($_RESPONSE['attributesname']);
2059
- $_RESPONSE['attributes'] = array_values($_RESPONSE['attributes']);
2060
- foreach($_RESPONSE['attributesname'] as &$attributesname) {
2061
- if( ! is_array($attributesname) ) {
2062
- $attributesname = array();
2063
- }
2064
- }
2065
- foreach($_RESPONSE['attributes'] as &$attributes) {
2066
- if( ! is_array($attributes) ) {
2067
- $attributes = array();
2068
- }
2069
- }
2070
- echo json_encode( $_RESPONSE );
2071
- if ( $br_options['alternative_load_type'] == 'js' ) echo '||JSON||';
2072
-
2073
- die();
2074
- }
2075
-
2076
- public static function start_clean() {
2077
- $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
2078
- if ( $br_options['alternative_load_type'] != 'js' ) {
2079
- ob_start();
2080
- }
2081
- }
2082
-
2083
- public static function color_listener() {
2084
- if ( defined('DOING_AJAX') && DOING_AJAX && !isset( $_POST ['tax_color_set'] ) && isset( $_POST ['br_widget_color'] ) ) {
2085
- $_POST ['tax_color_set'] = $_POST ['br_widget_color'];
2086
- }
2087
- if( isset( $_POST ['tax_color_set'] ) ) {
2088
- if ( current_user_can( 'manage_woocommerce' ) ) {
2089
- foreach( $_POST['tax_color_set'] as $key => $value ) {
2090
- if( $_POST['type'] == 'color' ) {
2091
- foreach($value as $term_key => $term_val) {
2092
- if( !empty($term_val) ) {
2093
- update_metadata( 'berocket_term', $term_key, $key, $term_val );
2094
- } else {
2095
- delete_metadata( 'berocket_term', $term_key, $key );
2096
- }
2097
- }
2098
- } else {
2099
- update_metadata( 'berocket_term', $key, $_POST['type'], $value );
2100
- }
2101
- }
2102
- unset( $_POST['tax_color_set'] );
2103
- }
2104
- } else {
2105
- BeRocket_AAPF_Widget::color_list_view( $_POST['type'], $_POST['tax_color_name'], true );
2106
- wp_die();
2107
- }
2108
- }
2109
-
2110
- public static function color_list_view( $type, $taxonomy_name, $load_script = false ) {
2111
- $terms = get_terms( $taxonomy_name, array( 'hide_empty' => false ) );
2112
- $set_query_var_color = array();
2113
- $set_query_var_color['terms'] = $terms;
2114
- $set_query_var_color['type'] = $type;
2115
- $set_query_var_color['load_script'] = $load_script;
2116
- set_query_var( 'berocket_query_var_color', $set_query_var_color );
2117
- br_get_template_part( 'color_ajax' );
2118
- }
2119
-
2120
- public static function ajax_include_exclude_list() {
2121
- if( ! empty($_POST['taxonomy_name']) ) {
2122
- echo self::include_exclude_terms_list($_POST['taxonomy_name']);
2123
- }
2124
- wp_die();
2125
- }
2126
-
2127
- public static function include_exclude_terms_list($taxonomy_name = false, $selected = array() ) {
2128
- $terms = get_terms( $taxonomy_name, array( 'hide_empty' => false ) );
2129
- $set_query_var_exclude_list = array();
2130
- $set_query_var_exclude_list['taxonomy'] = $taxonomy_name;
2131
- $set_query_var_exclude_list['terms'] = $terms;
2132
- $set_query_var_exclude_list['selected'] = $selected;
2133
- set_query_var( 'berocket_var_exclude_list', $set_query_var_exclude_list );
2134
- ob_start();
2135
- br_get_template_part( 'include_exclude_list' );
2136
- return ob_get_clean();
2137
- }
2138
-
2139
- public static function get_product_categories( $current_product_cat = '', $parent = 0, $data = array(), $depth = 0, $max_count = 9, $follow_hierarchy = false ) {
2140
- return br_get_sub_categories( $parent, 'id', array( 'return' => 'hierarchy_objects', 'max_depth' => $max_count ) );
2141
- }
2142
-
2143
- public static function add_product_class( $classes ) {
2144
- $classes[] = 'product';
2145
- return apply_filters( 'berocket_aapf_add_product_class', $classes );
2146
- }
2147
-
2148
- public static function pagination_args( $args = array() ) {
2149
- $args['base'] = str_replace( 999999999, '%#%', self::get_pagenum_link( 999999999 ) );
2150
- return $args;
2151
- }
2152
-
2153
- // 99% copy of WordPress' get_pagenum_link.
2154
- public static function get_pagenum_link( $pagenum = 1, $escape = true ) {
2155
- global $wp_rewrite;
2156
-
2157
- $pagenum = (int) $pagenum;
2158
-
2159
- $request = remove_query_arg( 'paged', preg_replace( "~".home_url()."~", "", (isset($_POST['location']) ? $_POST['location'] : '') ) );
2160
-
2161
- $home_root = parse_url( home_url() );
2162
- $home_root = ( isset( $home_root['path'] ) ) ? $home_root['path'] : '';
2163
- $home_root = preg_quote( $home_root, '|' );
2164
-
2165
- $request = preg_replace( '|^' . $home_root . '|i', '', $request );
2166
- $request = preg_replace( '|^/+|', '', $request );
2167
-
2168
- $is_using_permalinks = $wp_rewrite->using_permalinks();
2169
- if ( ! $is_using_permalinks ) {
2170
- $base = trailingslashit( get_bloginfo( 'url' ) );
2171
-
2172
- if ( $pagenum > 1 ) {
2173
- $result = add_query_arg( 'paged', $pagenum, $base . $request );
2174
- } else {
2175
- $result = $base . $request;
2176
- }
2177
- } else {
2178
- $qs_regex = '|\?.*?$|';
2179
- preg_match( $qs_regex, $request, $qs_match );
2180
-
2181
- if ( ! empty( $qs_match[0] ) ) {
2182
- $query_string = $qs_match[0];
2183
- $request = preg_replace( $qs_regex, '', $request );
2184
- } else {
2185
- $query_string = '';
2186
- }
2187
-
2188
- $request = preg_replace( "|$wp_rewrite->pagination_base/\d+/?$|", '', $request );
2189
- $request = preg_replace( '|^' . preg_quote( $wp_rewrite->index, '|' ) . '|i', '', $request );
2190
- $request = ltrim( $request, '/' );
2191
-
2192
- $base = trailingslashit( get_bloginfo( 'url' ) );
2193
-
2194
- $is_using_index_permalinks = $wp_rewrite->using_index_permalinks();
2195
- if ( $is_using_index_permalinks && ( $pagenum > 1 || '' != $request ) )
2196
- $base .= $wp_rewrite->index . '/';
2197
-
2198
- if ( $pagenum > 1 ) {
2199
- $request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( $wp_rewrite->pagination_base . "/" . $pagenum, 'paged' );
2200
- }
2201
-
2202
- $result = $base . $request . $query_string;
2203
- }
2204
-
2205
- /**
2206
- * Filter the page number link for the current request.
2207
- *
2208
- * @since 2.5.0
2209
- *
2210
- * @param string $result The page number link.
2211
- */
2212
- $result = apply_filters( 'get_pagenum_link', $result );
2213
-
2214
- if ( $escape )
2215
- return esc_url( $result );
2216
- else
2217
- return esc_url_raw( $result );
2218
- }
2219
-
2220
- public static function get_terms_child_parent ( $child_parent, $attribute, $current_terms = FALSE, $child_parent_depth = 1 ) {
2221
- if ( isset($child_parent) && $child_parent == 'parent' ) {
2222
- $args_terms = array(
2223
- 'orderby' => 'id',
2224
- 'order' => 'ASC',
2225
- 'hide_empty' => false,
2226
- 'parent' => 0,
2227
- );
2228
- if( $attribute == 'product_cat' ) {
2229
- $current_terms = br_get_taxonomy_hierarchy(array(), 0, 1);
2230
- } else {
2231
- $current_terms = get_terms( $attribute, $args_terms );
2232
- }
2233
- }
2234
- if ( isset($child_parent) && $child_parent == 'child' ) {
2235
- $current_terms = array( (object) array( 'depth' => 0, 'child' => 0, 'term_id' => 'R__term_id__R', 'count' => 'R__count__R', 'slug' => 'R__slug__R', 'name' => 'R__name__R', 'taxonomy' => 'R__taxonomy__R' ) );
2236
- $selected_terms = br_get_selected_term( $attribute );
2237
- $selected_terms_id = array();
2238
- if( empty($child_parent_depth) ) {
2239
- $child_parent_depth = 0;
2240
- }
2241
- foreach( $selected_terms as $selected_term ) {
2242
- $ancestors = get_ancestors( $selected_term, $attribute );
2243
- if( count( $ancestors ) >= ( $child_parent_depth - 1 ) ) {
2244
- if( count( $ancestors ) > ( $child_parent_depth - 1 ) ) {
2245
- $selected_term = $ancestors[count( $ancestors ) - ( $child_parent_depth )];
2246
- }
2247
- if ( ! in_array( $selected_term, $selected_terms_id ) ) {
2248
- $args_terms = array(
2249
- 'orderby' => 'id',
2250
- 'order' => 'ASC',
2251
- 'hide_empty' => false,
2252
- 'parent' => $selected_term,
2253
- );
2254
- $selected_terms_id[] = $selected_term;
2255
- $additional_terms = get_terms( $attribute, $args_terms );
2256
- $current_terms = array_merge( $current_terms, $additional_terms );
2257
- }
2258
- }
2259
- }
2260
- }
2261
- return $current_terms;
2262
- }
2263
-
2264
- public static function is_parent_selected($attribute, $child_parent_depth = 1) {
2265
- $selected_terms = br_get_selected_term( $attribute );
2266
- $selected_terms_id = array();
2267
- foreach( $selected_terms as $selected_term ) {
2268
- if( empty($child_parent_depth) ) {
2269
- $child_parent_depth = 0;
2270
- }
2271
- $ancestors = get_ancestors( $selected_term, $attribute );
2272
- if( count( $ancestors ) > ( $child_parent_depth - 1 ) ) {
2273
- return true;
2274
- }
2275
- }
2276
- return false;
2277
- }
2278
-
2279
- public static function old_wc_compatible( $query, $new = false ) {
2280
- return br_filters_old_wc_compatible( $query, $new );
2281
- }
2282
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{js → addons/deprecated_filters}/admin.js RENAMED
@@ -554,22 +554,6 @@ var berocket_admin_filter_types_by_attr = {
554
  $('.berocket_widget_reset_button_block', $parent).hide();
555
  }
556
  });
557
-
558
- $(document).on('click', '.berocket_widget_show_color_values',function(event)
559
- {
560
- event.preventDefault();
561
- var show_block = $(this).next();
562
- if(show_block.css('display') == 'none')
563
- {
564
- show_block.show(40);
565
- $(this).find('span').removeClass('show_button').addClass('hide_button');
566
- }
567
- else
568
- {
569
- show_block.hide(40);
570
- $(this).find('span').removeClass('hide_button').addClass('show_button');
571
- }
572
- });
573
  $(document).on('change', '.berocket_scroll_shop_top', function () {
574
  if ( $(this).prop('checked') ) {
575
  $(this).parent().next().show();
554
  $('.berocket_widget_reset_button_block', $parent).hide();
555
  }
556
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
557
  $(document).on('change', '.berocket_scroll_shop_top', function () {
558
  if ( $(this).prop('checked') ) {
559
  $(this).parent().next().show();
addons/deprecated_filters/deprecated_filters.php ADDED
@@ -0,0 +1,420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BeRocket_aapf_deprecated_compat_addon extends BeRocket_framework_addon_lib {
3
+ public $addon_file = __FILE__;
4
+ public $plugin_name = 'ajax_filters';
5
+ public $php_file_name = 'display_widget';
6
+ function get_addon_data() {
7
+ $data = parent::get_addon_data();
8
+ return array_merge($data, array(
9
+ 'addon_name' => __('Deprecated Filters', 'BeRocket_AJAX_domain'),
10
+ 'deprecated' => true,
11
+ 'tooltip' => __('<span style="color: red;">IT WILL BE REMOVED IN THE FUTURE</span><br>Temporary compatibility with older filters', 'BeRocket_AJAX_domain')
12
+ ));
13
+ }
14
+ function init_active() {
15
+ parent::init_active();
16
+ add_filter('BeRocket_AAPF_widget_load_file', array($this, 'disable_file'));
17
+ add_filter('BRAAPF_single_filter_settings_meta_use', array($this, 'settings_meta'), 10, 3);
18
+ add_filter('BRAAPF_single_filter_settings_enqueue_scripts', array($this, 'enqueue_scripts'), 10, 1);
19
+ add_action( 'braapf_register_frontend_assets', array( $this, 'init_scripts' ), 9999999999 );
20
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_additional_scripts' ) );
21
+ foreach (glob(__DIR__ . "/display_filter/*.php") as $filename)
22
+ {
23
+ include_once($filename);
24
+ }
25
+ add_action('wp', array($this, 'wp'));
26
+ add_filter('brfr_data_ajax_filters', array($this, 'settings_page'));
27
+ add_filter('brfr_ajax_filters_prevent_disable', array($this, 'section_prevent_disable'), 10, 3);
28
+ add_filter( 'berocket_filter_filter_type_array', array($this, 'filter_filter_type_array'), 20 );
29
+ add_filter( 'brfr_data_ajax_filters', array($this, 'plugin_settings_page'), 50) ;
30
+ add_filter( 'brfr_ajax_filters_old_design', array($this, 'section_old_design'), 50, 3) ;
31
+ update_option('braapf_new_filters_converted', false);
32
+ }
33
+ function wp() {
34
+ $BeRocket_AAPF = BeRocket_AAPF::getInstance();
35
+ $option = $BeRocket_AAPF->get_option();
36
+ if ( ! empty($option['selected_area_show']) ) {
37
+ add_action ( br_get_value_from_array($option, 'elements_position_hook', 'woocommerce_archive_description'), array($this, 'selected_area'), 1 );
38
+ remove_action ( br_get_value_from_array($option, 'elements_position_hook', 'woocommerce_archive_description'), array($BeRocket_AAPF, 'selected_area'), 1 );
39
+ }
40
+ }
41
+ function disable_file($isload) {
42
+ return false;
43
+ }
44
+ function enqueue_additional_scripts() {
45
+ wp_register_script( 'berocket_aapf_widget-tag_cloud', plugins_url( 'j.doe.cloud.min.js', __FILE__ ), array( 'jquery-ui-core' ), BeRocket_AJAX_filters_version );
46
+ }
47
+ function enqueue_scripts($enqueue) {
48
+ BeRocket_AAPF::wp_enqueue_script('braapf-deprecated-admin-js', plugins_url( '/assets/admin/js/admin.js', __FILE__ ), array('jquery') );
49
+ return false;
50
+ }
51
+ function settings_meta($isuse, $clthis, $post) {
52
+ $instance = $clthis->get_option($post->ID);
53
+ $post_name = $clthis->post_name;
54
+ include "filter_post.php";
55
+ return false;
56
+ }
57
+ function init_scripts() {
58
+ wp_deregister_script('berocket_aapf_widget-script');
59
+ wp_deregister_style('berocket_aapf_widget-style');
60
+ wp_register_script( 'berocket_aapf_widget-script', plugins_url( 'widget.min.js', __FILE__ ), array( 'jquery', 'jquery-ui-slider', 'jquery-ui-datepicker' ), BeRocket_AJAX_filters_version );
61
+ wp_register_style ( 'berocket_aapf_widget-style', plugins_url( 'widget.css', __FILE__ ), "", BeRocket_AJAX_filters_version );
62
+ }
63
+ public function selected_area() {
64
+ $set_query_var_title = array();
65
+ $BeRocket_AAPF = BeRocket_AAPF::getInstance();
66
+ $br_options = $BeRocket_AAPF->get_option();
67
+ $br_options = apply_filters( 'berocket_aapf_listener_br_options', $br_options );
68
+ $set_query_var_title['title'] = apply_filters( 'berocket_aapf_widget_title', ( empty($title) ? '' : $title ) );
69
+ $set_query_var_title['uo'] = br_aapf_converter_styles( ( empty($br_options['styles']) ? '' : $br_options['styles'] ) );
70
+ $set_query_var_title['selected_area_show'] = empty($br_options['selected_area_hide_empty']);
71
+ $set_query_var_title['hide_selected_arrow'] = false;
72
+ $set_query_var_title['selected_is_hide'] = false;
73
+ $set_query_var_title['is_hooked'] = true;
74
+ $set_query_var_title['is_hide_mobile'] = false;
75
+ set_query_var( 'berocket_query_var_title', $set_query_var_title );
76
+ br_get_template_part( 'old_templates/widget_selected_area' );
77
+ }
78
+ public function settings_page($data) {
79
+ $data['Addons']['prevent_disable'] = array(
80
+ "section" => "prevent_disable",
81
+ "value" => "",
82
+ );
83
+ return $data;
84
+ }
85
+ function section_prevent_disable ( $item, $element_data, $options ) {
86
+ $html = '<script>
87
+ jQuery(":contains(Deprecated Filters)").parents(".berocket_addon_label").find("input").on("change", function(e) {
88
+ if( ! jQuery(this).prop("checked") ) {
89
+ jQuery(document).trigger("braapf_deprecated_filters_disabled");
90
+ }
91
+ });
92
+ </script>';
93
+ $popup_text = '<h2>'. __('ATTENTION! After disabling this addon all filters will be converted to new version and there is no way to convert it back', 'BeRocket_AJAX_domain') . '</h2>'
94
+ . '<p><strong>' . __('Please try to do it on some staging/local/development site before doing it on live site', 'BeRocket_AJAX_domain') . '</strong></p>'
95
+ . __('Please check those things after addon disabling (it will be disabled after settings save)', 'BeRocket_AJAX_domain')
96
+ . '<ol>'
97
+ . '<li>' . __('Filters on Frontend, how it looks and how it works. Some styles can be different from what it was before', 'BeRocket_AJAX_domain') . '</li>';
98
+ if( ! empty($options['user_custom_css']) ) {
99
+ $popup_text .= '<li>' . __('You have some Custom CSS. It can do not work at all, because all classes new, but maybe you can now doing same things with our new styles', 'BeRocket_AJAX_domain') . '</li>';
100
+ }
101
+ if( ! empty($options['javascript']) && (
102
+ ! empty($options['javascript']['berocket_ajax_filtering_start'])
103
+ || ! empty($options['javascript']['berocket_ajax_filtering_start'])
104
+ || ! empty($options['javascript']['berocket_ajax_filtering_start'])
105
+ ) ) {
106
+ $popup_text .= '<li>' . __('You have some Custom JavaScript. In most cases it will work correct, because it is some fix for your theme or other plugins, but if you changed something inside filters, then it can break your page at all. Please check that it is correct', 'BeRocket_AJAX_domain') . '</li>';
107
+ }
108
+ $popup_text .= '</ol>'
109
+ . '<p><strong>' . __('Are you ready to disable it?... It can break your site... Or maybe not, whos know it.', 'BeRocket_AJAX_domain') . '</strong></p>';
110
+
111
+ BeRocket_popup_display::add_popup(
112
+ array(
113
+ 'yes_no_buttons' => array(
114
+ 'show' => true,
115
+ 'yes_text' => __('Yes, disable add-on', 'BeRocket_AJAX_domain'),
116
+ 'no_text' => __('No, turn it back', 'BeRocket_AJAX_domain'),
117
+ 'location' => 'popup',
118
+ 'yes_func' => '',
119
+ 'no_func' => 'jQuery(":contains(Deprecated Filters)").parents(".berocket_addon_label").find("input").prop("checked", true);',
120
+ ),
121
+ 'no_x_button' => true,
122
+ 'close_with' => array(
123
+ 'yes_button',
124
+ 'no_button', '', '', '', '', '', '', ''
125
+ ),
126
+ 'height' => '500px',
127
+ 'width' => '800px',
128
+ ),
129
+ $popup_text,
130
+ array('event_new' => array('type' => 'event', 'event' => 'braapf_deprecated_filters_disabled'))
131
+ );
132
+ return $html;
133
+ }
134
+ function filter_filter_type_array($filter_type) {
135
+ $filter_type = berocket_insert_to_array(
136
+ $filter_type,
137
+ 'tag',
138
+ array(
139
+ 'product_cat' => array(
140
+ 'name' => __('Product sub-categories', 'BeRocket_AJAX_domain'),
141
+ 'sameas' => 'product_cat',
142
+ ),
143
+ )
144
+ );
145
+ return $filter_type;
146
+ }
147
+ function plugin_settings_page($data) {
148
+ $data['General'] = berocket_insert_to_array(
149
+ $data['General'],
150
+ 'hide_values',
151
+ array(
152
+ 'use_select2' => array(
153
+ "label" => __( 'Select2', "BeRocket_AJAX_domain" ),
154
+ "type" => "checkbox",
155
+ "name" => "use_select2",
156
+ "class" => "br_use_select2",
157
+ "value" => '1',
158
+ 'label_for' => __("Use Select2 script for dropdown menu", 'BeRocket_AJAX_domain') . '<br>',
159
+ ),
160
+ )
161
+ );
162
+ $data['Design'] = berocket_insert_to_array(
163
+ $data['Design'],
164
+ 'design',
165
+ array(
166
+ 'design_old' => array(
167
+ 'section' => 'old_design',
168
+ "value" => "",
169
+ ),
170
+ ),
171
+ true
172
+ );
173
+ return $data;
174
+ }
175
+ public function section_old_design($html, $item, $options) {
176
+ $designables = br_aapf_get_styled();
177
+ ob_start();
178
+ include __DIR__ . '/settings/design.php';
179
+ $html = ob_get_clean();
180
+ return $html;
181
+ }
182
+ function br_custom_user_css() {
183
+ $options = $this->get_option();
184
+ $replace_css = array(
185
+ '#widget#' => '.berocket_aapf_widget',
186
+ '#widget-title#' => '.berocket_aapf_widget-title'
187
+ );
188
+ $result_css = "";
189
+ $result_css = str_replace(array('<style>', '</style>', '<'), '', $options[ 'user_custom_css' ]);
190
+ foreach ( $replace_css as $key => $value ) {
191
+ $result_css = str_replace( $key, $value, $result_css );
192
+ }
193
+ $result_css = trim($result_css);
194
+ $uo = br_aapf_converter_styles( (isset($options['styles']) ? $options['styles'] : array()) );
195
+ if( ! empty($uo['style']['selected_area']) ) {
196
+ $result_css .= 'div.berocket_aapf_widget_selected_area .berocket_aapf_widget_selected_filter a, div.berocket_aapf_selected_area_block a{'.$uo['style']['selected_area'].'}';
197
+ }
198
+ if( ! empty($uo['style']['selected_area_hover']) ) {
199
+ $result_css .= 'div.berocket_aapf_widget_selected_area .berocket_aapf_widget_selected_filter a.br_hover *, div.berocket_aapf_widget_selected_area .berocket_aapf_widget_selected_filter a.br_hover, div.berocket_aapf_selected_area_block a.br_hover{'.$uo['style']['selected_area_hover'].'}';
200
+ }
201
+ if ( ! empty($options['styles_input']['checkbox']['icon']) ) {
202
+ $result_css .= 'ul.berocket_aapf_widget li > span > input[type="checkbox"] + .berocket_label_widgets:before {display:inline-block;}';
203
+ $result_css .= '.berocket_aapf_widget input[type="checkbox"] {display: none;}';
204
+ }
205
+ $add_css = $this->convert_styles_to_string($options['styles_input']['checkbox']);
206
+ if( ! empty($add_css) ) {
207
+ $result_css .= 'ul.berocket_aapf_widget li > span > input[type="checkbox"] + .berocket_label_widgets:before {'.$add_css.'}';
208
+ }
209
+ if ( ! empty($options['styles_input']['checkbox']['icon']) ) {
210
+ $result_css .= 'ul.berocket_aapf_widget li > span > input[type="checkbox"]:checked + .berocket_label_widgets:before {';
211
+ $result_css .= 'content: "\\'.$options['styles_input']['checkbox']['icon'].'";';
212
+ $result_css .= '}';
213
+ }
214
+ if ( ! empty($options['styles_input']['radio']['icon']) ) {
215
+ $result_css .= 'ul.berocket_aapf_widget li > span > input[type="radio"] + .berocket_label_widgets:before {display:inline-block;}';
216
+ $result_css .= '.berocket_aapf_widget input[type="radio"] {display: none;}';
217
+ }
218
+ $add_css = $this->convert_styles_to_string($options['styles_input']['radio']);
219
+ if( ! empty($add_css) ) {
220
+ $result_css .= 'ul.berocket_aapf_widget li > span > input[type="radio"] + .berocket_label_widgets:before {' . $add_css . '}';
221
+ }
222
+ if ( ! empty($options['styles_input']['radio']['icon']) ) {
223
+ $result_css .= 'ul.berocket_aapf_widget li > span > input[type="radio"]:checked + .berocket_label_widgets:before {';
224
+ $result_css .= 'content: "\\'.$options['styles_input']['radio']['icon'].'";';
225
+ $result_css .= '}';
226
+ }
227
+ if ( ! empty($options['styles_input']['slider']['line_color']) ) {
228
+ $result_css .= '.berocket_aapf_widget .slide .berocket_filter_slider.ui-widget-content .ui-slider-range, .berocket_aapf_widget .slide .berocket_filter_price_slider.ui-widget-content .ui-slider-range{';
229
+ $result_css .= 'background-color: ';
230
+ if ( $options['styles_input']['slider']['line_color'][0] != '#' ) {
231
+ $result_css .= '#';
232
+ }
233
+ $result_css .= $options['styles_input']['slider']['line_color'].';';
234
+ $result_css .= '}';
235
+ }
236
+ $add_css = '';
237
+ if ( isset($options['styles_input']['slider']['line_height']) && strlen($options['styles_input']['slider']['line_height']) ) {
238
+ $add_css .= 'height: '.$options['styles_input']['slider']['line_height'].'px;';
239
+ }
240
+ if ( ! empty($options['styles_input']['slider']['line_border_color']) ) {
241
+ $add_css .= 'border-color: ';
242
+ if ( $options['styles_input']['slider']['line_border_color'][0] != '#' ) {
243
+ $add_css .= '#';
244
+ }
245
+ $add_css .= $options['styles_input']['slider']['line_border_color'].';';
246
+ }
247
+ if ( ! empty($options['styles_input']['slider']['back_line_color']) ) {
248
+ $add_css .= 'background-color: ';
249
+ if ( $options['styles_input']['slider']['back_line_color'][0] != '#' ) {
250
+ $add_css .= '#';
251
+ }
252
+ $add_css .= $options['styles_input']['slider']['back_line_color'].';';
253
+ }
254
+ if ( isset($options['styles_input']['slider']['line_border_width']) && strlen($options['styles_input']['slider']['line_border_width']) ) {
255
+ $add_css .= 'border-width: '.$options['styles_input']['slider']['line_border_width'].'px;';
256
+ }
257
+ if( ! empty($add_css) ) {
258
+ $result_css .= '.berocket_aapf_widget .slide .berocket_filter_slider.ui-widget-content, .berocket_aapf_widget .slide .berocket_filter_price_slider.ui-widget-content{'.$add_css.'}';
259
+ }
260
+ $add_css = '';
261
+ if ( isset($options['styles_input']['slider']['button_size']) && strlen($options['styles_input']['slider']['button_size']) ) {
262
+ $add_css .= 'font-size: '.$options['styles_input']['slider']['button_size'].'px;';
263
+ }
264
+ if ( ! empty($options['styles_input']['slider']['button_color']) ) {
265
+ $add_css .= 'background-color: ';
266
+ if ( $options['styles_input']['slider']['button_color'][0] != '#' ) {
267
+ $add_css .= '#';
268
+ }
269
+ $add_css .= $options['styles_input']['slider']['button_color'].';';
270
+ }
271
+ if ( ! empty($options['styles_input']['slider']['button_border_color']) ) {
272
+ $add_css .= 'border-color: ';
273
+ if ( $options['styles_input']['slider']['button_border_color'][0] != '#' ) {
274
+ $add_css .= '#';
275
+ }
276
+ $add_css .= $options['styles_input']['slider']['button_border_color'].';';
277
+ }
278
+ if ( isset($options['styles_input']['slider']['button_border_width']) && strlen($options['styles_input']['slider']['button_border_width']) ) {
279
+ $add_css .= 'border-width: '.$options['styles_input']['slider']['button_border_width'].'px;';
280
+ }
281
+ if ( isset($options['styles_input']['slider']['button_border_radius']) && strlen($options['styles_input']['slider']['button_border_radius']) ) {
282
+ $add_css .= 'border-radius: '.$options['styles_input']['slider']['button_border_radius'].'px;';
283
+ }
284
+ if( ! empty($add_css) ) {
285
+ $result_css .= '.berocket_aapf_widget .slide .berocket_filter_slider .ui-state-default,
286
+ .berocket_aapf_widget .slide .berocket_filter_price_slider .ui-state-default,
287
+ .berocket_aapf_widget .slide .berocket_filter_slider.ui-widget-content .ui-state-default,
288
+ .berocket_aapf_widget .slide .berocket_filter_price_slider.ui-widget-content .ui-state-default,
289
+ .berocket_aapf_widget .slide .berocket_filter_slider .ui-widget-header .ui-state-default,
290
+ .berocket_aapf_widget .slide .berocket_filter_price_slider .ui-widget-header .ui-state-default
291
+ .berocket_aapf_widget .berocket_filter_slider.ui-widget-content .ui-slider-handle,
292
+ .berocket_aapf_widget .berocket_filter_price_slider.ui-widget-content .ui-slider-handle{'.$add_css.'}';
293
+ }
294
+ if( ! empty( $uo['style']['selected_area_block'] ) || ! empty( $uo['style']['selected_area_border'] ) ) {
295
+ $result_css .= ' .berocket_aapf_selected_area_hook div.berocket_aapf_widget_selected_area .berocket_aapf_widget_selected_filter a{'
296
+ .( ! empty( $uo['style']['selected_area_block'] ) ? 'background-'.$uo['style']['selected_area_block'] : '' )
297
+ .( ! empty( $uo['style']['selected_area_border'] ) ? ' border-'.$uo['style']['selected_area_border'] : '' ).'}';
298
+ }
299
+ $add_css = '';
300
+ if ( ! empty($options['styles_input']['pc_ub']['back_color']) ) {
301
+ $add_css .= 'background-color: ';
302
+ if ( $options['styles_input']['pc_ub']['back_color'][0] != '#' ) {
303
+ $add_css .= '#';
304
+ }
305
+ $add_css .= $options['styles_input']['pc_ub']['back_color'].';';
306
+ }
307
+ if ( ! empty($options['styles_input']['pc_ub']['border_color']) ) {
308
+ $add_css .= 'border-color: ';
309
+ if ( $options['styles_input']['pc_ub']['border_color'][0] != '#' ) {
310
+ $add_css .= '#';
311
+ }
312
+ $add_css .= $options['styles_input']['pc_ub']['border_color'].';';
313
+ }
314
+ if ( ! empty($options['styles_input']['pc_ub']['font_color']) ) {
315
+ $add_css .= 'color: ';
316
+ if ( $options['styles_input']['pc_ub']['font_color'][0] != '#' ) {
317
+ $add_css .= '#';
318
+ }
319
+ $add_css .= $options['styles_input']['pc_ub']['font_color'].';';
320
+ }
321
+ if ( isset($options['styles_input']['pc_ub']['font_size']) && strlen($options['styles_input']['pc_ub']['font_size']) ) {
322
+ $add_css .= 'font-size: '.$options['styles_input']['pc_ub']['font_size'].'px;';
323
+ }
324
+ if( ! empty($add_css) ) {
325
+ $result_css .= '.berocket_aapf_widget div.berocket_aapf_product_count_desc {'.$add_css.'}';
326
+ }
327
+ $add_css = '';
328
+ if ( ! empty($options['styles_input']['pc_ub']['back_color']) ) {
329
+ $add_css .= 'background-color: ';
330
+ if ( $options['styles_input']['pc_ub']['back_color'][0] != '#' ) {
331
+ $add_css .= '#';
332
+ }
333
+ $add_css .= $options['styles_input']['pc_ub']['back_color'].';';
334
+ }
335
+ if ( ! empty($options['styles_input']['pc_ub']['border_color']) ) {
336
+ $add_css .= 'border-color: ';
337
+ if ( $options['styles_input']['pc_ub']['border_color'][0] != '#' ) {
338
+ $add_css .= '#';
339
+ }
340
+ $add_css .= $options['styles_input']['pc_ub']['border_color'].';';
341
+ }
342
+ if( ! empty($add_css) ) {
343
+ $result_css .= '.berocket_aapf_widget div.berocket_aapf_product_count_desc > span {'.$add_css.'}';
344
+ }
345
+ $add_css = '';
346
+ if ( ! empty($options['styles_input']['pc_ub']['show_font_color']) ) {
347
+ $add_css .= 'color: ';
348
+ if ( $options['styles_input']['pc_ub']['show_font_color'][0] != '#' ) {
349
+ $add_css .= '#';
350
+ }
351
+ $add_css .= $options['styles_input']['pc_ub']['show_font_color'].';';
352
+ }
353
+ if ( ! empty($options['styles_input']['pc_ub']['show_font_size']) ) {
354
+ $add_css .= 'font-size: '.$options['styles_input']['pc_ub']['show_font_size'].'px;';
355
+ }
356
+ if( ! empty($add_css) ) {
357
+ $result_css .= '.berocket_aapf_widget div.berocket_aapf_product_count_desc .berocket_aapf_widget_update_button {'.$add_css.'}';
358
+ }
359
+ if ( ! empty($options['styles_input']['pc_ub']['show_font_color_hover']) ) {
360
+ $result_css .= '.berocket_aapf_widget div.berocket_aapf_product_count_desc .berocket_aapf_widget_update_button:hover {';
361
+ $result_css .= 'color: ';
362
+ if ( $options['styles_input']['pc_ub']['show_font_color_hover'][0] != '#' ) {
363
+ $result_css .= '#';
364
+ }
365
+ $result_css .= $options['styles_input']['pc_ub']['show_font_color_hover'].';';
366
+ $result_css .= '}';
367
+ }
368
+ $add_css = '';
369
+ if ( ! empty($options['styles_input']['pc_ub']['close_font_color']) ) {
370
+ $add_css .= 'color: ';
371
+ if ( $options['styles_input']['pc_ub']['close_font_color'][0] != '#' ) {
372
+ $add_css .= '#';
373
+ }
374
+ $add_css .= $options['styles_input']['pc_ub']['close_font_color'].';';
375
+ }
376
+ if ( ! empty($options['styles_input']['pc_ub']['close_size']) ) {
377
+ $add_css .= 'font-size: '.$options['styles_input']['pc_ub']['close_size'].'px;';
378
+ }
379
+ if( ! empty($add_css) ) {
380
+ $result_css .= '.berocket_aapf_widget div.berocket_aapf_product_count_desc .berocket_aapf_close_pc {'.$add_css.'}';
381
+ }
382
+ if ( ! empty($options['styles_input']['pc_ub']['close_font_color_hover']) ) {
383
+ $result_css .= '.berocket_aapf_widget div.berocket_aapf_product_count_desc .berocket_aapf_close_pc:hover {';
384
+ $result_css .= 'color: ';
385
+ if ( $options['styles_input']['pc_ub']['close_font_color_hover'][0] != '#' ) {
386
+ $result_css .= '#';
387
+ }
388
+ $result_css .= $options['styles_input']['pc_ub']['close_font_color_hover'].';';
389
+ $result_css .= '}';
390
+ }
391
+ $add_css = $this->convert_styles_to_string($options['styles_input']['onlyTitle_title']);
392
+ if( ! empty($add_css) ) {
393
+ $result_css .= 'div.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div {'.$add_css.'}';
394
+ }
395
+ $add_css = $this->convert_styles_to_string($options['styles_input']['onlyTitle_titleopened']);
396
+ if( ! empty($add_css) ) {
397
+ $result_css .= 'div.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-title_div {'.$add_css.'}';
398
+ }
399
+ $add_css = $this->convert_styles_to_string($options['styles_input']['onlyTitle_filter']);
400
+ if( ! empty($add_css) ) {
401
+ $result_css .= 'div.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget {'.$add_css.'}';
402
+ }
403
+ if ( ! empty($options['styles_input']['onlyTitle_filter']['fcolor']) ) {
404
+ $result_css .= 'div.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget * {';
405
+ $result_css .= 'color: ';
406
+ if ( $options['styles_input']['onlyTitle_filter']['fcolor'][0] != '#' ) {
407
+ $result_css .= '#';
408
+ }
409
+ $result_css .= $options['styles_input']['onlyTitle_filter']['fcolor'].';';
410
+ $result_css .= '}';
411
+ $result_css .= 'div.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget input {';
412
+ $result_css .= 'color: black;';
413
+ $result_css .= '}';
414
+ }
415
+ if( ! empty($result_css) ) {
416
+ echo '<style type="text/css">' . $result_css . '</style>';
417
+ }
418
+ }
419
+ }
420
+ new BeRocket_aapf_deprecated_compat_addon();
addons/deprecated_filters/display_filter/reset_button.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BeRocket_AAPF_display_filters_reset_button_type extends BeRocket_AAPF_display_filters_additional_type {
3
+ public static $type_slug = 'reset_button';
4
+ public static $type_name;
5
+ public static $needed_options = array(
6
+ 'title' => 'Reset Filters',
7
+ 'is_hide_mobile' => false
8
+ );
9
+ function init() {
10
+ static::$type_name = __('Reset Products button', 'BeRocket_AJAX_domain');
11
+ parent::init();
12
+ }
13
+ public static function return_html($html, $additional) {
14
+ extract($additional['options']);
15
+ $br_options = self::get_option();
16
+ $set_query_var_title = array(
17
+ 'title' => $additional['options']['title'],
18
+ 'uo' => br_aapf_converter_styles( (empty($br_options['styles']) ? NULL : $br_options['styles']) ),
19
+ 'is_hide_mobile' => ( empty($additional['options']['is_hide_mobile']) ? '' : $additional['options']['is_hide_mobile'] )
20
+ );
21
+ set_query_var( 'berocket_query_var_title', $set_query_var_title );
22
+ ob_start();
23
+ br_get_template_part( 'old_templates/widget_reset_button' );
24
+ return ob_get_clean();
25
+ }
26
+ }
27
+ new BeRocket_AAPF_display_filters_reset_button_type();
addons/deprecated_filters/display_filter/selected_area.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BeRocket_AAPF_display_filters_selected_area_type extends BeRocket_AAPF_display_filters_additional_type {
3
+ public static $type_slug = 'selected_area';
4
+ public static $type_name;
5
+ public static $needed_options = array(
6
+ 'title' => '',
7
+ 'scroll_theme' => 'dark',
8
+ 'is_hide_mobile' => false,
9
+ 'selected_area_show' => '0',
10
+ 'hide_selected_arrow' => '0',
11
+ 'selected_is_hide' => '0',
12
+ );
13
+ function init() {
14
+ static::$type_name = __('Selected Filters area', 'BeRocket_AJAX_domain');
15
+ parent::init();
16
+ }
17
+ public static function return_html($html, $additional) {
18
+ $br_options = self::get_option();
19
+ $style = br_get_value_from_array($additional, array('args', 'widget_inline_style'));
20
+ $set_query_var_title = array(
21
+ 'title' => $additional['options']['title'],
22
+ 'uo' => br_aapf_converter_styles( (empty($br_options['styles']) ? NULL : $br_options['styles']) ),
23
+ 'is_hide_mobile' => ( empty($additional['options']['is_hide_mobile']) ? '' : $additional['options']['is_hide_mobile'] ),
24
+ 'selected_area_show' => $additional['options']['selected_area_show'],
25
+ 'hide_selected_arrow' => $additional['options']['hide_selected_arrow'],
26
+ 'selected_is_hide' => $additional['options']['selected_is_hide'],
27
+ 'style' => $style,
28
+ );
29
+ set_query_var( 'berocket_query_var_title', $set_query_var_title );
30
+ ob_start();
31
+ br_get_template_part( 'old_templates/widget_selected_area' );
32
+ return ob_get_clean();
33
+ }
34
+ }
35
+ new BeRocket_AAPF_display_filters_selected_area_type();
addons/deprecated_filters/display_filter/update_button.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BeRocket_AAPF_display_filters_update_button_type extends BeRocket_AAPF_display_filters_additional_type {
3
+ public static $type_slug = 'update_button';
4
+ public static $type_name;
5
+ public static $needed_options = array(
6
+ 'title' => 'Update',
7
+ 'is_hide_mobile' => false
8
+ );
9
+ function init() {
10
+ static::$type_name = __('Update Products button', 'BeRocket_AJAX_domain');
11
+ parent::init();
12
+ }
13
+ public static function return_html($html, $additional) {
14
+ $br_options = self::get_option();
15
+ $set_query_var_title = array(
16
+ 'title' => $additional['options']['title'],
17
+ 'uo' => br_aapf_converter_styles( (empty($br_options['styles']) ? NULL : $br_options['styles']) ),
18
+ 'is_hide_mobile' => ( empty($additional['options']['is_hide_mobile']) ? '' : $additional['options']['is_hide_mobile'] )
19
+ );
20
+ set_query_var( 'berocket_query_var_title', $set_query_var_title );
21
+ ob_start();
22
+ br_get_template_part( 'old_templates/widget_update_button' );
23
+ return ob_get_clean();
24
+ }
25
+ }
26
+ new BeRocket_AAPF_display_filters_update_button_type();
27
+
addons/deprecated_filters/display_widget.php ADDED
@@ -0,0 +1,593 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * BeRocket_AAPF_Widget - main filter widget. One filter for any needs
5
+ */
6
+ class BeRocket_AAPF_Widget {
7
+
8
+ public static $defaults = array(
9
+ 'br_wp_footer' => false,
10
+ 'widget_type' => 'filter',
11
+ 'title' => '',
12
+ 'filter_type' => 'attribute',
13
+ 'attribute' => 'price',
14
+ 'custom_taxonomy' => 'product_cat',
15
+ 'type' => 'slider',
16
+ 'select_first_element_text' => '',
17
+ 'operator' => 'OR',
18
+ 'order_values_by' => '',
19
+ 'order_values_type' => '',
20
+ 'text_before_price' => '',
21
+ 'text_after_price' => '',
22
+ 'enable_slider_inputs' => '',
23
+ 'parent_product_cat' => '',
24
+ 'depth_count' => '0',
25
+ 'widget_collapse_enable' => '0',
26
+ 'widget_is_hide' => '0',
27
+ 'show_product_count_per_attr' => '0',
28
+ 'hide_child_attributes' => '0',
29
+ 'hide_collapse_arrow' => '0',
30
+ 'use_value_with_color' => '0',
31
+ 'values_per_row' => '1',
32
+ 'icon_before_title' => '',
33
+ 'icon_after_title' => '',
34
+ 'icon_before_value' => '',
35
+ 'icon_after_value' => '',
36
+ 'price_values' => '',
37
+ 'description' => '',
38
+ 'css_class' => '',
39
+ 'tag_cloud_height' => '0',
40
+ 'tag_cloud_min_font' => '12',
41
+ 'tag_cloud_max_font' => '14',
42
+ 'tag_cloud_tags_count' => '100',
43
+ 'tag_cloud_type' => 'doe',
44
+ 'use_min_price' => '0',
45
+ 'min_price' => '0',
46
+ 'use_max_price' => '0',
47
+ 'max_price' => '1',
48
+ 'height' => 'auto',
49
+ 'scroll_theme' => 'dark',
50
+ 'selected_area_show' => '0',
51
+ 'hide_selected_arrow' => '0',
52
+ 'selected_is_hide' => '0',
53
+ 'slider_default' => '0',
54
+ 'number_style' => '0',
55
+ 'number_style_thousand_separate'=> '',
56
+ 'number_style_decimal_separate' => '.',
57
+ 'number_style_decimal_number' => '2',
58
+ 'is_hide_mobile' => '0',
59
+ 'user_can_see' => '',
60
+ 'cat_propagation' => '0',
61
+ 'product_cat' => '',
62
+ 'parent_product_cat_current' => '0',
63
+ 'attribute_count' => '',
64
+ 'show_page' => array( 'shop', 'product_cat', 'product_tag', 'product_taxonomy' ),
65
+ 'cat_value_limit' => '0',
66
+ 'child_parent' => '',
67
+ 'child_parent_depth' => '1',
68
+ 'child_parent_no_values' => '',
69
+ 'child_parent_previous' => '',
70
+ 'child_parent_no_products' => '',
71
+ 'child_onew_count' => '1',
72
+ 'child_onew_childs' => array(
73
+ 1 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
74
+ 2 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
75
+ 3 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
76
+ 4 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
77
+ 5 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
78
+ 6 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
79
+ 7 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
80
+ 8 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
81
+ 9 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
82
+ 10 => array('title' => '', 'no_product' => '', 'no_values' => '', 'previous' => ''),
83
+ ),
84
+ 'search_box_link_type' => 'shop_page',
85
+ 'search_box_url' => '',
86
+ 'search_box_category' => '',
87
+ 'search_box_count' => '1',
88
+ 'search_box_attributes' => array(
89
+ 1 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
90
+ 2 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
91
+ 3 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
92
+ 4 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
93
+ 5 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
94
+ 6 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
95
+ 7 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
96
+ 8 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
97
+ 9 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
98
+ 10 => array('type' => 'attribute', 'attribute' => '', 'custom_taxonomy' => '', 'title' => '', 'visual_type' => 'select'),
99
+ ),
100
+ 'search_box_style' => array(
101
+ 'position' => 'vertical',
102
+ 'search_position' => 'after',
103
+ 'search_text' => 'Search',
104
+ 'background' => 'bbbbff',
105
+ 'back_opacity' => '0',
106
+ 'button_background' => '888800',
107
+ 'button_background_over' => 'aaaa00',
108
+ 'text_color' => '000000',
109
+ 'text_color_over' => '000000',
110
+ ),
111
+ 'ranges' => array( 1, 10 ),
112
+ 'hide_first_last_ranges' => '',
113
+ 'include_exclude_select' => '',
114
+ 'include_exclude_list' => array(),
115
+ );
116
+
117
+ /**
118
+ * Constructor
119
+ */
120
+ function __construct( $instance, $args = array() ) {
121
+ if( ! empty($args['widget_id']) ) {
122
+ $this->id = $args['widget_id'];
123
+ $this->number = $args['widget_id'];
124
+ }
125
+ if( empty($this->number) || $this->number == -1 ) {
126
+ global $berocket_aapf_shortcode_id;
127
+ if( empty($berocket_aapf_shortcode_id) ) {
128
+ $berocket_aapf_shortcode_id = 1;
129
+ } else {
130
+ $berocket_aapf_shortcode_id++;
131
+ }
132
+ $this->id = 'berocket_aapf_widget-s'.$berocket_aapf_shortcode_id;
133
+ $args['widget_id'] = $this->id;
134
+ $this->number = 's'.$berocket_aapf_shortcode_id;
135
+ }
136
+ $set_query_var_title = array();
137
+ $set_query_var_main = array();
138
+ $set_query_var_footer = array();
139
+ $filter_type_array = array(
140
+ 'attribute' => array(
141
+ 'name' => __('Attribute', 'BeRocket_AJAX_domain'),
142
+ 'sameas' => 'attribute',
143
+ ),
144
+ 'tag' => array(
145
+ 'name' => __('Tag', 'BeRocket_AJAX_domain'),
146
+ 'sameas' => 'tag',
147
+ ),
148
+ 'all_product_cat' => array(
149
+ 'name' => __('Product Category', 'BeRocket_AJAX_domain'),
150
+ 'sameas' => 'custom_taxonomy',
151
+ 'attribute' => 'product_cat',
152
+ ),
153
+ );
154
+ if ( function_exists('wc_get_product_visibility_term_ids') ) {
155
+ $filter_type_array['_rating'] = array(
156
+ 'name' => __('Rating', 'BeRocket_AJAX_domain'),
157
+ 'sameas' => '_rating',
158
+ );
159
+ }
160
+ $filter_type_array = apply_filters('berocket_filter_filter_type_array', $filter_type_array, $instance);
161
+ if( empty($instance['filter_type']) || ! array_key_exists($instance['filter_type'], $filter_type_array) ) {
162
+ foreach($filter_type_array as $filter_type_key => $filter_type_val) {
163
+ $instance['filter_type'] = $filter_type_key;
164
+ break;
165
+ }
166
+ }
167
+ if( ! empty($instance['filter_type']) && ! empty($filter_type_array[$instance['filter_type']]) && ! empty($filter_type_array[$instance['filter_type']]['sameas']) ) {
168
+ $sameas = $filter_type_array[$instance['filter_type']];
169
+ $instance['filter_type'] = $sameas['sameas'];
170
+ if( ! empty($sameas['attribute']) ) {
171
+ if( $sameas['sameas'] == 'custom_taxonomy' ) {
172
+ $instance['custom_taxonomy'] = $sameas['attribute'];
173
+ } elseif( $sameas['sameas'] == 'attribute' ) {
174
+ $instance['attribute'] = $sameas['attribute'];
175
+ }
176
+ }
177
+ }
178
+ //CHECK WIDGET TYPES
179
+ list($berocket_admin_filter_types, $berocket_admin_filter_types_by_attr) = berocket_aapf_get_filter_types();
180
+ $select_options_variants = array();
181
+ if ( $instance['filter_type'] == 'tag' ) {
182
+ $select_options_variants = $berocket_admin_filter_types['tag'];
183
+ } else if ( $instance['filter_type'] == 'product_cat' || ( $instance['filter_type'] == 'custom_taxonomy' && ( $instance['custom_taxonomy'] == 'product_tag' || $instance['custom_taxonomy'] == 'product_cat' ) ) ) {
184
+ $select_options_variants = $berocket_admin_filter_types['product_cat'];
185
+ } else if ( $instance['filter_type'] == '_sale' || $instance['filter_type'] == '_stock_status' || $instance['filter_type'] == '_rating' ) {
186
+ $select_options_variants = $berocket_admin_filter_types['sale'];
187
+ } else if ( $instance['filter_type'] == 'custom_taxonomy' ) {
188
+ $select_options_variants = $berocket_admin_filter_types['custom_taxonomy'];
189
+ } else if ( $instance['filter_type'] == 'attribute' ) {
190
+ if ( $instance['attribute'] == 'price' ) {
191
+ $select_options_variants = $berocket_admin_filter_types['price'];
192
+ } else {
193
+ $select_options_variants = $berocket_admin_filter_types['attribute'];
194
+ }
195
+ } else if ( $instance['filter_type'] == 'filter_by' ) {
196
+ $select_options_variants = $berocket_admin_filter_types['filter_by'];
197
+ }
198
+ $selected = false;
199
+ $first = false;
200
+ foreach($select_options_variants as $select_options_variant) {
201
+ if( ! empty($berocket_admin_filter_types_by_attr[$select_options_variant]) ) {
202
+ if( $instance['type'] == $berocket_admin_filter_types_by_attr[$select_options_variant]['value'] ) {
203
+ $selected = true;
204
+ break;
205
+ }
206
+ if( $first === false ) {
207
+ $first = $berocket_admin_filter_types_by_attr[$select_options_variant]['value'];
208
+ }
209
+ }
210
+ }
211
+ if( ! $selected ) {
212
+ $instance['type'] = $first;
213
+ }
214
+ $widget_type_array = apply_filters( 'berocket_widget_widget_type_array', apply_filters( 'berocket_aapf_display_filter_type_list', array(
215
+ 'filter' => __('Filter', 'BeRocket_AJAX_domain'),
216
+ ) ) );
217
+ if( ! array_key_exists($instance['widget_type'], $widget_type_array) ) {
218
+ foreach($widget_type_array as $widget_type_id => $widget_type_name) {
219
+ $instance['widget_type'] = $widget_type_id;
220
+ break;
221
+ }
222
+ }
223
+ $instance['title'] = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
224
+ $br_options = apply_filters( 'berocket_aapf_listener_br_options', BeRocket_AAPF::get_aapf_option() );
225
+ $default_language = apply_filters( 'wpml_default_language', NULL );
226
+
227
+ global $wp_query, $wp_the_query, $wp, $sitepress, $br_wc_query;
228
+ if( ! isset( BeRocket_AAPF::$error_log['6_widgets'] ) )
229
+ {
230
+ BeRocket_AAPF::$error_log['6_widgets'] = array();
231
+ }
232
+ $widget_error_log = array();
233
+
234
+ $instance = array_merge( self::$defaults, $instance );
235
+ $instance = apply_filters('aapf_widget_instance', $instance);
236
+ $args = apply_filters('aapf_widget_args', $args);
237
+ if( ( $instance['user_can_see'] == 'logged' && ! is_user_logged_in() ) || ( $instance['user_can_see'] == 'not_logged' && is_user_logged_in() ) ) {
238
+ return false;
239
+ }
240
+
241
+ if( BeRocket_AAPF::$debug_mode ) {
242
+ $widget_error_log['wp_query'] = $wp_query;
243
+ $widget_error_log['args'] = $args;
244
+ $widget_error_log['instance'] = $instance;
245
+ }
246
+
247
+ $BeRocket_AAPF = BeRocket_AAPF::getInstance();
248
+ $BeRocket_AAPF::require_all_scripts(true);
249
+ $BeRocket_AAPF::require_all_styles(true);
250
+ if( ! empty($br_options['filters_turn_off']) ) return false;
251
+
252
+ if( ! empty($instance['child_parent']) && in_array($instance['child_parent'], array('child', 'parent')) ) {
253
+ $br_options['show_all_values'] = true;
254
+ }
255
+
256
+ if ( isset ( $br_wc_query ) ) {
257
+ if( ! is_a($br_wc_query, 'WP_Query') ) {
258
+ $br_wc_query = new WP_Query( $br_wc_query );
259
+ }
260
+ if( class_exists('WC_Query') && method_exists('WC_Query', 'product_query') && method_exists('WC_Query', 'get_main_query') ) {
261
+ $wc_query = wc()->query->get_main_query();
262
+ }
263
+ $old_query = $wp_query;
264
+ $old_the_query = $wp_the_query;
265
+ $wp_query = $br_wc_query;
266
+ $wp_the_query = $br_wc_query;
267
+ if( class_exists('WC_Query') && method_exists('WC_Query', 'product_query') && method_exists('WC_Query', 'get_main_query') ) {
268
+ wc()->query->product_query($wp_query);
269
+ }
270
+ }
271
+
272
+ if ( empty($instance['br_wp_footer']) ) {
273
+ global $br_widget_ids;
274
+ if ( ! isset( $br_widget_ids ) ) {
275
+ $br_widget_ids = array();
276
+ }
277
+ $br_widget_ids[] = array('instance' => $instance, 'args' => $args);
278
+ }
279
+
280
+ $text_before_price = berocket_isset($instance['text_before_price']);
281
+ $text_after_price = berocket_isset($instance['text_after_price']);
282
+ $text_before_price = apply_filters('aapf_widget_text_before_price', ( isset($text_before_price) ? $text_before_price : '' ) );
283
+ $text_after_price = apply_filters('aapf_widget_text_after_price', ( isset($text_after_price) ? $text_after_price : '' ) );
284
+ if( ! empty($text_before_price) || ! empty($text_after_price) ) {
285
+ $cur_symbol = get_woocommerce_currency_symbol();
286
+ $cur_slug = get_woocommerce_currency();
287
+ if( !empty($text_before_price) ) {
288
+ $text_before_price = str_replace(array('%cur_symbol%', '%cur_slug%'), array($cur_symbol, $cur_slug), $text_before_price);
289
+ }
290
+ if( !empty($text_after_price) ) {
291
+ $text_after_price = str_replace(array('%cur_symbol%', '%cur_slug%'), array($cur_symbol, $cur_slug), $text_after_price);
292
+ }
293
+ }
294
+ $instance['text_before_price'] = $text_before_price;
295
+ $instance['text_after_price'] = $text_after_price;
296
+ extract( $args );
297
+ extract( $instance );
298
+
299
+ if( ! empty($style) ) {
300
+ echo 'This Filter cannot be displayed as deprecated';
301
+ return false;
302
+ }
303
+
304
+ if ( empty($order_values_by) ) {
305
+ $order_values_by = 'Default';
306
+ }
307
+
308
+ if ( ! empty($filter_type) && ( $filter_type == 'product_cat' || $filter_type == '_stock_status' || $filter_type == '_sale' || $filter_type == '_rating' ) ) {
309
+ $attribute = $filter_type;
310
+ $filter_type = 'attribute';
311
+ }
312
+
313
+ if( empty($br_options['ajax_site']) ) {
314
+ do_action('br_footer_script');
315
+ } else {
316
+ echo '<script>jQuery(document).ready(function() {if(typeof(berocket_filters_first_load) == "function") {berocket_filters_first_load();}});</script>';
317
+ }
318
+ if( apply_filters( 'berocket_aapf_widget_display_custom_filter', false, berocket_isset($widget_type), $instance, $args, $this ) ) {
319
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
320
+ return '';
321
+ }
322
+
323
+ if( ! empty($widget_type) && $custom_type_html = apply_filters('berocket_aapf_display_filter_custom_type', '', $widget_type, array('options' => $instance, 'args' => $args)) ) {
324
+ if( $custom_type_html !== TRUE ) {
325
+ echo berocket_isset($before_widget);
326
+ echo $custom_type_html;
327
+ echo berocket_isset($after_widget);
328
+ }
329
+ $widget_error_log['return'] = $widget_type;
330
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
331
+ return '';
332
+ }
333
+
334
+ $woocommerce_hide_out_of_stock_items = BeRocket_AAPF_Widget_functions::woocommerce_hide_out_of_stock_items();
335
+ if( $woocommerce_hide_out_of_stock_items == 'yes' && $filter_type == 'attribute' && $attribute == '_stock_status' ) {
336
+ $widget_error_log['return'] = 'stock_status';
337
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
338
+ return true;
339
+ }
340
+
341
+ if( $type == "slider" ) {
342
+ $operator = 'OR';
343
+ }
344
+
345
+ $terms = $sort_terms = $price_range = array();
346
+ list($terms_error_return, $terms_ready, $terms, $type) = apply_filters( 'berocket_widget_attribute_type_terms', array(false, false, $terms, $type), $attribute, $filter_type, $instance );
347
+ if( $terms_ready ) {
348
+ if( $terms_error_return === FALSE ) {
349
+ $set_query_var_title['terms'] = apply_filters( 'berocket_aapf_widget_terms', $terms );
350
+ if( BeRocket_AAPF::$debug_mode ) {
351
+ $widget_error_log['terms'] = $terms;
352
+ }
353
+ } else {
354
+ $widget_error_log['terms'] = $terms;
355
+ $widget_error_log['return'] = $terms_error_return;
356
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
357
+ return false;
358
+ }
359
+ } else {
360
+ if ( $filter_type == 'attribute' && $attribute == 'price' && $type == 'slider' ) {
361
+ if ( ! empty($price_values) ) {
362
+ $price_range = explode( ",", $price_values );
363
+ } elseif( $use_min_price && $use_max_price ) {
364
+ $price_range = array($min_price, $max_price);
365
+ } else {
366
+ $price_range = BeRocket_AAPF_Widget_functions::get_price_range( ( isset($cat_value_limit) ? $cat_value_limit : null ) );
367
+ if ( ! $price_range or count( $price_range ) < 2 ) {
368
+ $widget_error_log['price_range'] = $price_range;
369
+ $widget_error_log['return'] = 'price_range < 2';
370
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
371
+ return false;
372
+ }
373
+ }
374
+ if( BeRocket_AAPF::$debug_mode ) {
375
+ $widget_error_log['price_range'] = $price_range;
376
+ }
377
+ if( ! empty($text_before_price) || ! empty($text_after_price) ) {
378
+ wp_localize_script(
379
+ 'berocket_aapf_widget-script',
380
+ 'br_price_text',
381
+ array(
382
+ 'before' => (isset($text_before_price) ? $text_before_price : ''),
383
+ 'after' => (isset($text_after_price) ? $text_after_price : ''),
384
+ )
385
+ );
386
+ }
387
+ $set_query_var_title['text_before_price'] = (isset($text_before_price) ? $text_before_price : null);
388
+ $set_query_var_title['text_after_price'] = (isset($text_after_price) ? $text_after_price : null);
389
+ } elseif ( $filter_type != 'attribute' || $attribute != 'price' ) {
390
+ $get_terms_args = array(
391
+ 'taxonomy' => $attribute,
392
+ 'hide_empty' => true
393
+ );
394
+ $get_terms_advanced = array(
395
+ 'operator' => $operator,
396
+ 'force_query' => ! empty($br_wp_footer)
397
+ );
398
+ if( ! empty($cat_value_limit) ) {
399
+ $get_terms_advanced['additional_tax_query'] = array(
400
+ 'field' => 'slug',
401
+ 'include_children' => true,
402
+ 'operator' => 'IN',
403
+ 'taxonomy' => 'product_cat',
404
+ 'terms' => array($cat_value_limit)
405
+ );
406
+ }
407
+ if ( $attribute == '_rating' ) {
408
+ $get_terms_args['taxonomy'] = 'product_visibility';
409
+ $get_terms_args['slug'] = array('rated-1', 'rated-2', 'rated-3', 'rated-4', 'rated-5');
410
+ } elseif( $filter_type == 'tag' ) {
411
+ $get_terms_args['taxonomy'] = 'product_tag';
412
+ } elseif( $filter_type == 'custom_taxonomy' ) {
413
+ $get_terms_args['taxonomy'] = $custom_taxonomy;
414
+ } elseif( $filter_type == 'attribute' && $attribute == 'product_cat' ) {
415
+ $get_terms_advanced['depth'] = intval($depth_count);
416
+ if( ! empty($parent_product_cat_current) ) {
417
+ $cate = get_queried_object();
418
+ if( isset($cate->term_id) ) {
419
+ $cateID = $cate->term_id;
420
+ } else {
421
+ $cateID = 0;
422
+ }
423
+ $parent_product_cat = $cateID;
424
+ }
425
+ $get_terms_args['child_of'] = intval($parent_product_cat);
426
+ }
427
+ if( ! empty($order_values_by) && $order_values_by == 'Alpha' ) {
428
+ $get_terms_args['orderby'] = 'name';
429
+ } elseif( ! empty($order_values_by) && $order_values_by == 'Numeric' ) {
430
+ $get_terms_args['orderby'] = 'name_num';
431
+ }
432
+ if( ! empty($order_values_type) ) {
433
+ $get_terms_args['order'] = ($order_values_type == 'asc' ? 'ASC' : 'DESC');
434
+ }
435
+ $get_terms_args = apply_filters('berocket_aapf_get_terms_args', $get_terms_args, $instance, $args);
436
+ $get_terms_advanced = apply_filters('berocket_aapf_get_terms_additional', $get_terms_advanced, $instance, $args, $get_terms_args);
437
+ $terms = berocket_aapf_get_terms( $get_terms_args, $get_terms_advanced );
438
+ if ( $attribute == '_rating' ) {
439
+ if( is_array($terms) && ! is_wp_error($terms) ) {
440
+ $rating_names = array(
441
+ 'rated-1' => ( $type == 'select' ? __('1 star', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') ),
442
+ 'rated-2' => ( $type == 'select' ? __('2 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') ),
443
+ 'rated-3' => ( $type == 'select' ? __('3 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-o"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') ),
444
+ 'rated-4' => ( $type == 'select' ? __('4 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-o"></i>', 'BeRocket_AJAX_domain') ),
445
+ 'rated-5' => ( $type == 'select' ? __('5 stars', 'BeRocket_AJAX_domain') : __('<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i>', 'BeRocket_AJAX_domain') ),
446
+ );
447
+ foreach($terms as &$term) {
448
+ if( isset($rating_names[$term->slug]) ) {
449
+ $term->name = $rating_names[$term->slug];
450
+ }
451
+ }
452
+ }
453
+ }
454
+ $terms = apply_filters('berocket_aapf_widget_include_exclude_items', $terms, $instance, $get_terms_args, $get_terms_advanced);
455
+ if ( isset($terms) && is_array($terms) && count( $terms ) < 1 ) {
456
+ $widget_error_log['terms'] = $terms;
457
+ $widget_error_log['return'] = 'terms < 1';
458
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
459
+ return false;
460
+ }
461
+ $set_query_var_title['terms'] = $terms;
462
+ }
463
+ }
464
+
465
+ $style = $class = '';
466
+ $style = br_get_value_from_array($args, 'widget_inline_style');
467
+ if( ! empty($height) and $height != 'auto' ){
468
+ $style .= "max-height: {$height}px; overflow: hidden;";
469
+ $class = "berocket_aapf_widget_height_control";
470
+ }
471
+
472
+ if( !$scroll_theme ) $scroll_theme = 'dark';
473
+ if( $filter_type == 'custom_taxonomy' )
474
+ $attribute = $custom_taxonomy;
475
+ if( ! isset($attribute_count) || $attribute_count == '' ) {
476
+ $attribute_count = br_get_value_from_array($br_options,'attribute_count');
477
+ }
478
+
479
+ if( $type == 'select' || $type == 'slider' ) {
480
+ $values_per_row = 1;
481
+ }
482
+
483
+ $set_query_var_title['operator'] = $operator;
484
+ $set_query_var_title['attribute'] = $attribute;
485
+ $set_query_var_title['type'] = $type;
486
+ $set_query_var_title['title'] = apply_filters( 'berocket_aapf_widget_title', $title );
487
+ $set_query_var_title['class'] = apply_filters( 'berocket_aapf_widget_class', $class );
488
+ $set_query_var_title['css_class'] = apply_filters( 'berocket_aapf_widget_css_class', (isset($css_class) ? $css_class : '') );
489
+ $set_query_var_title['style'] = apply_filters( 'berocket_aapf_widget_style', $style );
490
+ $set_query_var_title['scroll_theme'] = $scroll_theme;
491
+ $set_query_var_title['x'] = time();
492
+ $set_query_var_title['filter_type'] = $filter_type;
493
+ $set_query_var_title['uo'] = br_aapf_converter_styles( (empty($br_options['styles']) ? '' : $br_options['styles']) );
494
+ $set_query_var_title['notuo'] = (empty($br_options['styles']) ? '' : $br_options['styles']);
495
+ $set_query_var_title['widget_is_hide'] = (! empty($widget_collapse_enable) && ! empty($widget_is_hide));
496
+ $set_query_var_title['widget_collapse_disable'] = empty($widget_collapse_enable);
497
+ $set_query_var_title['is_hide_mobile'] = ! empty($is_hide_mobile);
498
+ $set_query_var_title['show_product_count_per_attr'] = ! empty($show_product_count_per_attr);
499
+ $set_query_var_title['hide_child_attributes'] = ! empty($hide_child_attributes);
500
+ $set_query_var_title['cat_value_limit'] = ( isset($cat_value_limit) ? $cat_value_limit : null );
501
+ $set_query_var_title['select_first_element_text'] = ( empty($select_first_element_text) ? __('Any', 'BeRocket_AJAX_domain') : $select_first_element_text );
502
+ $set_query_var_title['icon_before_title'] = (isset($icon_before_title) ? $icon_before_title : null);
503
+ $set_query_var_title['icon_after_title'] = (isset($icon_after_title) ? $icon_after_title : null);
504
+ $set_query_var_title['hide_o_value'] = ! empty($br_options['hide_value']['o']);
505
+ $set_query_var_title['hide_sel_value'] = ! empty($br_options['hide_value']['sel']);
506
+ $set_query_var_title['hide_empty_value'] = ! empty($br_options['hide_value']['empty']);
507
+ $set_query_var_title['hide_button_value'] = ! empty($br_options['hide_value']['button']);
508
+ $set_query_var_title['attribute_count_show_hide'] = berocket_isset($attribute_count_show_hide);
509
+ $set_query_var_title['attribute_count'] = $attribute_count;
510
+ $set_query_var_title['description'] = (isset($description) ? $description : null);
511
+ $set_query_var_title['hide_collapse_arrow'] = (empty($widget_collapse_enable) || ! empty($hide_collapse_arrow));
512
+ $set_query_var_title['values_per_row'] = (isset($values_per_row) ? $values_per_row : null);
513
+ $set_query_var_title['child_parent'] = (isset($child_parent) ? $child_parent : null);
514
+ $set_query_var_title['child_parent_depth'] = (isset($child_parent_depth) ? $child_parent_depth : null);
515
+ $set_query_var_title['product_count_style'] = (isset($br_options['styles_input']['product_count']) ? $br_options['styles_input']['product_count'] : '').'pcs '.(isset($br_options['styles_input']['product_count_position']) ? $br_options['styles_input']['product_count_position'] : null).'pcs';
516
+ $set_query_var_title['styles_input'] = (isset($br_options['styles_input']) ? $br_options['styles_input'] : array());
517
+ $set_query_var_title['child_parent_previous'] = (isset($child_parent_previous) ? $child_parent_previous : null);
518
+ $set_query_var_title['child_parent_no_values'] = (isset($child_parent_no_values) ? $child_parent_no_values : null);
519
+ $set_query_var_title['child_parent_no_products'] = (isset($child_parent_no_products) ? $child_parent_no_products : null);
520
+ $set_query_var_title['before_title'] = (isset($before_title) ? $before_title : null);
521
+ $set_query_var_title['after_title'] = (isset($after_title) ? $after_title : null);
522
+ $set_query_var_title['widget_id'] = ( $this->id ? $this->id : $widget_id );
523
+ $set_query_var_title['widget_id_number'] = ( $this->number ? $this->number : $widget_id_number );
524
+ $set_query_var_title['slug_urls'] = ! empty($br_options['slug_urls']);
525
+ $set_query_var_title['first_page_jump'] = ( empty($first_page_jump) ? '' : $first_page_jump );
526
+ $set_query_var_title['icon_before_value'] = (isset($icon_before_value) ? $icon_before_value : null);
527
+ $set_query_var_title['icon_after_value'] = (isset($icon_after_value) ? $icon_after_value : null);
528
+ $set_query_var_title = apply_filters('berocket_aapf_query_var_title_filter', $set_query_var_title, $instance, $br_options);
529
+ set_query_var( 'berocket_query_var_title', $set_query_var_title );
530
+
531
+ // widget title and start tag ( <ul> ) can be found in templates/widget_start.php
532
+ echo berocket_isset($before_widget);
533
+ do_action('berocket_aapf_widget_before_start');
534
+ br_get_template_part('old_templates/widget_start');
535
+ do_action('berocket_aapf_widget_after_start');
536
+
537
+ if ( $type == 'tag_cloud' ) {
538
+ $tag_script_var = array(
539
+ 'height' => $tag_cloud_height,
540
+ 'min_font_size' => $tag_cloud_min_font,
541
+ 'max_font_size' => $tag_cloud_max_font,
542
+ 'tags_count' => $tag_cloud_tags_count,
543
+ 'tags_type' => $tag_cloud_type
544
+ );
545
+ $set_query_var_title['tag_script_var'] = $tag_script_var;
546
+ } elseif ( $type == 'color' || $type == 'image' ) {
547
+ $set_query_var_title['use_value_with_color'] = (isset($use_value_with_color) ? $use_value_with_color : null);
548
+ $set_query_var_title['disable_multiple'] = (isset($disable_multiple) ? $disable_multiple : null);
549
+ $set_query_var_title['color_image_block_size'] = berocket_isset($color_image_block_size, false, 'h2em w2em');
550
+ $set_query_var_title['color_image_checked'] = berocket_isset($color_image_checked, false, 'brchecked_default');
551
+ $set_query_var_title['color_image_checked_custom_css'] = berocket_isset($color_image_checked_custom_css);
552
+ $set_query_var_title['color_image_block_size_height'] = berocket_isset($color_image_block_size_height);
553
+ $set_query_var_title['color_image_block_size_width'] = berocket_isset($color_image_block_size_width);
554
+ } elseif( $type == 'select' ) {
555
+ $set_query_var_title['select_multiple'] = ! empty($select_multiple);
556
+ }
557
+ $set_query_var_title = apply_filters('berocket_query_var_title_before_widget', $set_query_var_title, $type, $instance, $args, $terms);
558
+ set_query_var( 'berocket_query_var_title', $set_query_var_title);
559
+ br_get_template_part( 'old_templates/'.apply_filters('berocket_widget_load_template_name', $type, $instance, (empty($terms) ? '' : $terms)) );
560
+
561
+ do_action('berocket_aapf_widget_before_end');
562
+ br_get_template_part('old_templates/widget_end');
563
+ do_action('berocket_aapf_widget_after_end');
564
+ echo berocket_isset($after_widget);
565
+ if( BeRocket_AAPF::$debug_mode ) {
566
+ $widget_error_log['terms'] = (isset($terms) ? $terms : null);
567
+ }
568
+ $widget_error_log['return'] = 'OK';
569
+ $this->filter_return($br_wc_query, $wp_the_query, $wp_query, $wc_query, $old_the_query, $old_query, $widget_error_log);
570
+ }
571
+
572
+ public function filter_return(&$br_wc_query, &$wp_the_query, &$wp_query, &$wc_query, &$old_the_query, &$old_query, $widget_error_log) {
573
+ BeRocket_AAPF::$error_log['6_widgets'][] = $widget_error_log;
574
+ if ( isset ( $br_wc_query ) ) {
575
+ if ( isset ( $old_query ) ) {
576
+ $wp_the_query = $old_the_query;
577
+ $wp_query = $old_query;
578
+ }
579
+ if( ! empty($wc_query) && is_a($wc_query, 'WP_Query') && class_exists('WC_Query') && method_exists('WC_Query', 'product_query') && method_exists('WC_Query', 'get_main_query') ) {
580
+ wc()->query->product_query($wc_query);
581
+ }
582
+ wc()->query->remove_ordering_args();
583
+ }
584
+ do_action('berocket_aapf_filter_end_generation');
585
+ }
586
+ //DEPRECATED SOON
587
+ function update( $new_instance, $old_instance ) {
588
+ return $old_instance;
589
+ }
590
+ function form( $instance ) {
591
+ include AAPF_TEMPLATE_PATH . "admin.php";
592
+ }
593
+ }
{templates → addons/deprecated_filters}/filter_post.php RENAMED
@@ -5,6 +5,49 @@ $categories = BeRocket_AAPF_Widget_functions::set_terms_on_same_level( $c
5
  $tags = get_terms( 'product_tag' );
6
  $custom_taxonomies = get_object_taxonomies( 'product' );
7
  $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ?>
9
  <div class="berocket_aapf_widget_content">
10
  <div class="widget-liquid-right tab-item current">
@@ -68,7 +111,7 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
68
  echo '<option';
69
  foreach($filter_type_val as $data_key => $data_val) {
70
  if( ! empty($data_val) ) {
71
- echo ' data-'.$data_key.'="'.$data_val.'"';
72
  }
73
  }
74
  echo ' value="'.$filter_type_key.'"'.($instance['filter_type'] == $filter_type_key ? ' selected' : '').'>'.$filter_type_val['name'].'</option>';
@@ -511,19 +554,19 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
511
  <div class="berocket_aapf_widget_admin_tag_cloud_block" <?php if ($instance['type'] != 'tag_cloud') echo 'style="display:none;"' ?>>
512
  <div>
513
  <label for="<?php echo 'tag_cloud_height'; ?>"><?php _e('Tags Cloud Height:', 'BeRocket_AJAX_domain') ?> </label>
514
- <input id="<?php echo 'tag_cloud_height'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_height]'; ?>" value="<?php echo $instance['tag_cloud_height']; ?>" class="berocket_aapf_widget_admin_height_input" />px
515
  </div>
516
  <div>
517
  <label for="<?php echo 'tag_cloud_min_font'; ?>"><?php _e('Min Font Size:', 'BeRocket_AJAX_domain') ?> </label>
518
- <input id="<?php echo 'tag_cloud_min_font'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_min_font]'; ?>" value="<?php echo $instance['tag_cloud_min_font']; ?>" class="berocket_aapf_widget_admin_height_input" />px
519
  </div>
520
  <div>
521
  <label for="<?php echo 'tag_cloud_max_font'; ?>"><?php _e('Max Font Size:', 'BeRocket_AJAX_domain') ?> </label>
522
- <input id="<?php echo 'tag_cloud_max_font'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_max_font]'; ?>" value="<?php echo $instance['tag_cloud_max_font']; ?>" class="berocket_aapf_widget_admin_height_input" />px
523
  </div>
524
  <div>
525
  <label for="<?php echo 'tag_cloud_tags_count'; ?>"><?php _e('Max Tags Count:', 'BeRocket_AJAX_domain') ?> </label>
526
- <input id="<?php echo 'tag_cloud_tags_count'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_tags_count]'; ?>" value="<?php echo $instance['tag_cloud_tags_count']; ?>" class="berocket_aapf_widget_admin_height_input" />
527
  </div>
528
  </div>
529
  <div class="berocket_aapf_widget_admin_price_attribute" <?php if ( ! ( $instance['attribute'] == 'price' && $instance['type'] == 'slider' ) ) echo " style='display: none;'"; ?> >
@@ -621,6 +664,7 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
621
  jQuery(document).on('change', '#widget_collapse_enable', berocket_aapf_widget_is_hide);
622
  berocket_aapf_widget_is_hide();
623
  </script>
 
624
  <div class="berocket_widget_output_limitation_block"<?php if( ! empty($instance['widget_type']) && $instance['widget_type'] != 'filter' ) echo ' style="display: none";'?>>
625
  <h3 class="berocket_aapf_admin_section_title "><?php _e('Widget Output Limitations', 'BeRocket_AJAX_domain') ?></h3>
626
  <div class="br_accordion berocket_product_category_value_limit"<?php if( ! empty($instance['widget_type']) && $instance['widget_type'] != 'filter' ) echo ' style="display: none";'?>>
@@ -632,7 +676,6 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
632
  <?php _e('Disable', 'BeRocket_AJAX_domain') ?>
633
  </li>
634
  <?php
635
- $instance['cat_value_limit'] = ( empty($instance['cat_value_limit']) ? '' : urldecode($instance['cat_value_limit']) );
636
  foreach( $categories as $category ){
637
  $selected_category = false;
638
  if( $instance['cat_value_limit'] == $category->slug )
5
  $tags = get_terms( 'product_tag' );
6
  $custom_taxonomies = get_object_taxonomies( 'product' );
7
  $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
8
+ if( empty($instance['filter_type']) ) {
9
+ $instance['filter_type'] = 'attribute';
10
+ }
11
+ if( empty($instance['attribute']) ) {
12
+ $instance['attribute'] = 'price';
13
+ }
14
+ if( ! empty($instance['version']) ) {
15
+ $popup_text = '<h2>' . __('ATTENTION! This filter was created with new styles and settings', 'BeRocket_AJAX_domain') . '</h2>'
16
+ . '<p>' . __('Plugin do not have feature to meve it back to old(DEPRECATED) version.', 'BeRocket_AJAX_domain') . '</p>'
17
+ . '<p>' . __('If you enable old(DEPRECATED) filters, because you have some issue with it, then please ', 'BeRocket_AJAX_domain')
18
+ . '<a target="_blank" href="https://berocket.com/contact">' . __('CONTACT US', 'BeRocket_AJAX_domain') . '</a>' . '</p>'
19
+ . '<p>' . __('When you save it as old(DEPRECATED) filter ALL data will be losed', 'BeRocket_AJAX_domain') . '</p>'
20
+ . '<p><strong>' . __('Are you want edit it anyway?', 'BeRocket_AJAX_domain') . '</strong></p>';
21
+ BeRocket_popup_display::add_popup(
22
+ array(
23
+ 'yes_no_buttons' => array(
24
+ 'show' => true,
25
+ 'yes_text' => __('Yes, edit filter', 'BeRocket_AJAX_domain'),
26
+ 'no_text' => __('No, return back', 'BeRocket_AJAX_domain'),
27
+ 'location' => 'popup',
28
+ 'yes_func' => '',
29
+ 'no_func' => 'window.history.back();setTimeout(function(){if (!braapf_has_history){window.close();}}, 200);',
30
+ ),
31
+ 'no_x_button' => true,
32
+ 'close_with' => array(
33
+ 'yes_button',
34
+ 'no_button', '', '', '', '', '', '', ''
35
+ ),
36
+ 'width' => '600px',
37
+ 'height' => '400px'
38
+ ),
39
+ $popup_text,
40
+ array('page_open' => array('type' => 'page_open'))
41
+ );
42
+ ?>
43
+ <script>
44
+ var braapf_has_history = false;
45
+ jQuery(window).on('beforeunload', function(){
46
+ braapf_has_history = true;
47
+ });
48
+ </script>
49
+ <?php
50
+ }
51
  ?>
52
  <div class="berocket_aapf_widget_content">
53
  <div class="widget-liquid-right tab-item current">
111
  echo '<option';
112
  foreach($filter_type_val as $data_key => $data_val) {
113
  if( ! empty($data_val) ) {
114
+ echo ' data-'.$data_key.'="'.( is_array($data_val) ? json_encode($data_val) : $data_val).'"';
115
  }
116
  }
117
  echo ' value="'.$filter_type_key.'"'.($instance['filter_type'] == $filter_type_key ? ' selected' : '').'>'.$filter_type_val['name'].'</option>';
554
  <div class="berocket_aapf_widget_admin_tag_cloud_block" <?php if ($instance['type'] != 'tag_cloud') echo 'style="display:none;"' ?>>
555
  <div>
556
  <label for="<?php echo 'tag_cloud_height'; ?>"><?php _e('Tags Cloud Height:', 'BeRocket_AJAX_domain') ?> </label>
557
+ <input id="<?php echo 'tag_cloud_height'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_height]'; ?>" value="<?php echo berocket_isset($instance['tag_cloud_height']); ?>" class="berocket_aapf_widget_admin_height_input" />px
558
  </div>
559
  <div>
560
  <label for="<?php echo 'tag_cloud_min_font'; ?>"><?php _e('Min Font Size:', 'BeRocket_AJAX_domain') ?> </label>
561
+ <input id="<?php echo 'tag_cloud_min_font'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_min_font]'; ?>" value="<?php echo berocket_isset($instance['tag_cloud_min_font']); ?>" class="berocket_aapf_widget_admin_height_input" />px
562
  </div>
563
  <div>
564
  <label for="<?php echo 'tag_cloud_max_font'; ?>"><?php _e('Max Font Size:', 'BeRocket_AJAX_domain') ?> </label>
565
+ <input id="<?php echo 'tag_cloud_max_font'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_max_font]'; ?>" value="<?php echo berocket_isset($instance['tag_cloud_max_font']); ?>" class="berocket_aapf_widget_admin_height_input" />px
566
  </div>
567
  <div>
568
  <label for="<?php echo 'tag_cloud_tags_count'; ?>"><?php _e('Max Tags Count:', 'BeRocket_AJAX_domain') ?> </label>
569
+ <input id="<?php echo 'tag_cloud_tags_count'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_tags_count]'; ?>" value="<?php echo berocket_isset($instance['tag_cloud_tags_count']); ?>" class="berocket_aapf_widget_admin_height_input" />
570
  </div>
571
  </div>
572
  <div class="berocket_aapf_widget_admin_price_attribute" <?php if ( ! ( $instance['attribute'] == 'price' && $instance['type'] == 'slider' ) ) echo " style='display: none;'"; ?> >
664
  jQuery(document).on('change', '#widget_collapse_enable', berocket_aapf_widget_is_hide);
665
  berocket_aapf_widget_is_hide();
666
  </script>
667
+ <?php $instance['cat_value_limit'] = ( empty($instance['cat_value_limit']) ? '' : urldecode($instance['cat_value_limit']) ); ?>
668
  <div class="berocket_widget_output_limitation_block"<?php if( ! empty($instance['widget_type']) && $instance['widget_type'] != 'filter' ) echo ' style="display: none";'?>>
669
  <h3 class="berocket_aapf_admin_section_title "><?php _e('Widget Output Limitations', 'BeRocket_AJAX_domain') ?></h3>
670
  <div class="br_accordion berocket_product_category_value_limit"<?php if( ! empty($instance['widget_type']) && $instance['widget_type'] != 'filter' ) echo ' style="display: none";'?>>
676
  <?php _e('Disable', 'BeRocket_AJAX_domain') ?>
677
  </li>
678
  <?php
 
679
  foreach( $categories as $category ){
680
  $selected_category = false;
681
  if( $instance['cat_value_limit'] == $category->slug )
{js → addons/deprecated_filters}/j.doe.cloud.min.js RENAMED
File without changes
addons/deprecated_filters/settings/design.php ADDED
@@ -0,0 +1,773 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $fonts_list = g_fonts_list();
3
+ ?>
4
+ <table class="wp-list-table widefat fixed posts">
5
+ <thead>
6
+ <tr>
7
+ <th class="manage-column column-cb check-column" id="cb" scope="col">
8
+ <label for="cb-select-all-1" class="screen-reader-text"><?php _e('Select All', 'BeRocket_AJAX_domain') ?></label>
9
+ <input type="checkbox" id="cb-select-all-1" />
10
+ </th>
11
+ <th class="manage-column" scope="col"><?php _e('Element', 'BeRocket_AJAX_domain') ?></th>
12
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Color', 'BeRocket_AJAX_domain') ?></th>
13
+ <th class="manage-column admin-column-font-family" scope="col"><?php _e('Font Family', 'BeRocket_AJAX_domain') ?></th>
14
+ <th class="manage-column admin-column-font-weight" scope="col"><?php _e('Font-Weight', 'BeRocket_AJAX_domain') ?><br /><small><?php _e('(depends on font)', 'BeRocket_AJAX_domain') ?></small></th>
15
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Font-Size', 'BeRocket_AJAX_domain') ?></th>
16
+ <th class="manage-column admin-column-theme" scope="col"><?php _e('Theme', 'BeRocket_AJAX_domain') ?></th>
17
+ </tr>
18
+ </thead>
19
+
20
+ <tfoot>
21
+ <tr>
22
+ <th class="manage-column column-cb check-column" scope="col">
23
+ <label for="cb-select-all-2" class="screen-reader-text"><?php _e('Select All', 'BeRocket_AJAX_domain') ?></label>
24
+ <input type="checkbox" id="cb-select-all-2" />
25
+ </th>
26
+ <th class="manage-column" scope="col"><?php _e('Element', 'BeRocket_AJAX_domain') ?></th>
27
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Color', 'BeRocket_AJAX_domain') ?></th>
28
+ <th class="manage-column admin-column-font-family" scope="col"><?php _e('Font Family', 'BeRocket_AJAX_domain') ?></th>
29
+ <th class="manage-column admin-column-font-weight" scope="col"><?php _e('Font-Weight', 'BeRocket_AJAX_domain') ?><br /><small><?php _e('(depends on font)', 'BeRocket_AJAX_domain') ?></small></th>
30
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Font-Size', 'BeRocket_AJAX_domain') ?></th>
31
+ <th class="manage-column admin-column-theme" scope="col"><?php _e('Theme', 'BeRocket_AJAX_domain') ?></th>
32
+ </tr>
33
+ <tr>
34
+ <th class="manage-column admin-column-theme" scope="col" colspan="7">
35
+ <input type="button" value="<?php _e('Set all to theme default', 'BeRocket_AJAX_domain') ?>" class="all_theme_default button">
36
+ <div style="clear:both;"></div>
37
+ </th>
38
+ </tr>
39
+ </tfoot>
40
+
41
+ <tbody id="the-list">
42
+ <?php
43
+ $i_designable = 1;
44
+ foreach ( $designables as $key => $designable ) {
45
+ ?>
46
+ <tr class="type-page status-publish author-self">
47
+ <th class="check-column" scope="row">
48
+ <label for="cb-select-<?php echo $i_designable ?>" class="screen-reader-text"><?php _e('Select Element', 'BeRocket_AJAX_domain') ?></label>
49
+ <input type="checkbox" value="<?php echo $i_designable ?>" name="element[]" id="cb-select-<?php echo $i_designable ?>">
50
+ <div class="locked-indicator"></div>
51
+ </th>
52
+ <td><?php echo $designable['name'] ?></td>
53
+ <td class="admin-column-color">
54
+ <?php if ( $designable['has']['color'] ) { ?>
55
+ <div class="br_colorpicker_field" data-color="<?php echo ( ! empty($options['styles'][$key]['color']) ) ? $options['styles'][$key]['color'] : '000000' ?>"></div>
56
+ <input type="hidden" value="<?php echo ( ! empty($options['styles'][$key]['color']) ) ? $options['styles'][$key]['color'] : '' ?>" name="br_filters_options[styles][<?php echo $key ?>][color]" />
57
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
58
+ <?php } else {
59
+ _e('N/A', 'BeRocket_AJAX_domain');
60
+ } ?>
61
+ </td>
62
+ <td class="admin-column-font-family">
63
+ <?php if ( $designable['has']['font_family'] ) { ?>
64
+ <select name="br_filters_options[styles][<?php echo $key ?>][font_family]">
65
+ <option value=""><?php _e('Theme Default', 'BeRocket_AJAX_domain') ?></option>
66
+ <?php foreach( $fonts_list as $font ) { ?>
67
+ <option <?php echo ( br_get_value_from_array($options, array('styles', $key, 'font_family')) == $font ) ? 'selected' : '' ?>><?php echo $font?></option>
68
+ <?php } ?>
69
+ </select>
70
+ <?php } else {
71
+ _e('N/A', 'BeRocket_AJAX_domain');
72
+ } ?>
73
+ </td>
74
+ <td class="admin-column-font-weight">
75
+ <?php if ( $designable['has']['bold'] ) {
76
+ if( empty( $options['styles'][$key]['bold'] ) ) {
77
+ $options['styles'][$key]['bold'] = '';
78
+ } ?>
79
+ <select name="br_filters_options[styles][<?php echo $key ?>][bold]">
80
+ <option value=""><?php _e('Theme Default', 'BeRocket_AJAX_domain') ?></option>
81
+ <?php
82
+ $font_weight = array(
83
+ 'Textual Values' => array(
84
+ 'lighter' => 'light',
85
+ 'normal' => 'normal',
86
+ 'bold' => 'bold',
87
+ 'bolder' => 'bolder',
88
+ ),
89
+ 'Numeric Values' => array(
90
+ '100' => '100',
91
+ '200' => '200',
92
+ '300' => '300',
93
+ '400' => '400',
94
+ '500' => '500',
95
+ '600' => '600',
96
+ '700' => '700',
97
+ '800' => '800',
98
+ '900' => '900',
99
+ ),
100
+ );
101
+ $fw_current = br_get_value_from_array($options, array('styles', $key, 'bold'));
102
+ foreach($font_weight as $fm_optgroup => $fw_options) {
103
+ echo '<optgroup label="', $fm_optgroup, '">';
104
+ foreach($fw_options as $fw_key => $fw_value) {
105
+ echo '<option', ( $fw_current == $fw_key ? ' selected' : '' ), ' value="', $fw_key, '">', $fw_value, '</option>';
106
+ }
107
+ echo '</optgroup>';
108
+ }
109
+ ?>
110
+ </select>
111
+ <?php } else {
112
+ _e('N/A', 'BeRocket_AJAX_domain');
113
+ } ?>
114
+ </td>
115
+ <td class="admin-column-font-size">
116
+ <?php if ( ! empty($designable['has']['font_size']) ) { ?>
117
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles][<?php echo $key ?>][font_size]" value="<?php echo br_get_value_from_array($options, array('styles', $key, 'font_size')) ?>" />
118
+ <?php } else {
119
+ _e('N/A', 'BeRocket_AJAX_domain');
120
+ } ?>
121
+ </td>
122
+ <td class="admin-column-theme">
123
+ <?php if ( $designable['has']['theme'] ) { ?>
124
+ <select name="br_filters_options[styles][<?php echo $key ?>][theme]">
125
+ <option value=""><?php _e('Without Theme', 'BeRocket_AJAX_domain') ?></option>
126
+ <?php if ( $key != 'selectbox' ) { ?>
127
+ <option value="aapf_grey1" <?php echo ( empty($options['styles'][$key]['theme']) && $options['styles'][$key]['theme'] == 'aapf_grey1' ) ? 'selected' : '' ?>>Grey</option>
128
+ <?php } ?>
129
+ <?php if ( $key != 'slider' and $key != 'checkbox_radio' ) { ?>
130
+ <option value="aapf_grey2" <?php echo ( ! empty($options['styles'][$key]['theme']) && $options['styles'][$key]['theme'] == 'aapf_grey2' ) ? 'selected' : '' ?>>Grey 2</option>
131
+ <?php } ?>
132
+ </select>
133
+ <?php } else {
134
+ _e('N/A', 'BeRocket_AJAX_domain');
135
+ } ?>
136
+ </td>
137
+ </tr>
138
+ <?php
139
+ $i_designable++;
140
+ }
141
+ ?>
142
+ </tbody>
143
+ </table>
144
+ <table class="wp-list-table widefat fixed posts">
145
+ <thead>
146
+ <tr><th colspan="9" style="text-align: center; font-size: 2em;"><?php _e('Checkbox / Radio', 'BeRocket_AJAX_domain') ?></th></tr>
147
+ <tr>
148
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Element', 'BeRocket_AJAX_domain') ?></th>
149
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Border color', 'BeRocket_AJAX_domain') ?></th>
150
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Border width', 'BeRocket_AJAX_domain') ?></th>
151
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Border radius', 'BeRocket_AJAX_domain') ?></th>
152
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Size', 'BeRocket_AJAX_domain') ?></th>
153
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Font color', 'BeRocket_AJAX_domain') ?></th>
154
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Background', 'BeRocket_AJAX_domain') ?></th>
155
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Icon', 'BeRocket_AJAX_domain') ?></th>
156
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Theme', 'BeRocket_AJAX_domain') ?></th>
157
+ </tr>
158
+ </thead>
159
+ <tbody>
160
+ <tr class="br_checkbox_radio_settings">
161
+ <td><?php _e('Checkbox', 'BeRocket_AJAX_domain') ?></td>
162
+ <td class="admin-column-color">
163
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'bcolor'), '000000') ?>"></div>
164
+ <input class="br_border_color_set" type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'bcolor')) ?>" name="br_filters_options[styles_input][checkbox][bcolor]" />
165
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
166
+ </td>
167
+ <td class="admin-column-font-size">
168
+ <input class="br_border_width_set" type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][checkbox][bwidth]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'bwidth')); ?>" />
169
+ </td>
170
+ <td class="admin-column-font-size">
171
+ <input class="br_border_radius_set" type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][checkbox][bradius]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'bradius')); ?>" />
172
+ </td>
173
+ <td class="admin-column-font-size">
174
+ <input class="br_size_set" type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][checkbox][fontsize]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'fontsize')); ?>" />
175
+ </td>
176
+ <td class="admin-column-color">
177
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'fcolor'), '000000') ?>"></div>
178
+ <input class="br_font_color_set" type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'fcolor')) ?>" name="br_filters_options[styles_input][checkbox][fcolor]" />
179
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
180
+ </td>
181
+ <td class="admin-column-color">
182
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'backcolor'), '000000') ?>"></div>
183
+ <input class="br_background_set" type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'checkbox', 'backcolor')) ?>" name="br_filters_options[styles_input][checkbox][backcolor]" />
184
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
185
+ </td>
186
+ <td class="admin-column-color">
187
+ <select name="br_filters_options[styles_input][checkbox][icon]" class="fontawesome br_icon_set">
188
+ <option value=""<?php if ( empty($options['styles_input']['checkbox']['icon']) ) echo ' selected' ?>>NONE</option>
189
+ <?php $radion_icon = array( 'f00c', '2713', 'f00d', 'f067', 'f055', 'f0fe', 'f14a', 'f058' );
190
+ foreach( $radion_icon as $r_icon ) {
191
+ echo '<option value="'.$r_icon.'"'.( br_get_value_from_array($options, array('styles_input', 'checkbox', 'icon')) == $r_icon ? ' selected' : '' ).'>&#x'.$r_icon.';</option>';
192
+ }?>
193
+ </select>
194
+ </td>
195
+ <td class="admin-column-color">
196
+ <select name="br_filters_options[styles_input][checkbox][theme]" class="br_theme_set_select">
197
+ <option value=""<?php if ( empty($options['styles_input']['checkbox']['theme']) ) echo ' selected' ?>>NONE</option>
198
+ <?php
199
+ $checkbox_theme_current = br_get_value_from_array($options, array('styles_input', 'checkbox', 'theme'));
200
+ $checkbox_themes = array(
201
+ 'black_1' => array(
202
+ 'name' => 'Black 1',
203
+ 'border_color' => '',
204
+ 'border_width' => '0',
205
+ 'border_radius' => '5',
206
+ 'size' => '',
207
+ 'font_color' => '333333',
208
+ 'background' => 'bbbbbb',
209
+ 'icon' => 'f00c',
210
+ ),
211
+ 'black_2' => array(
212
+ 'name' => 'Black 2',
213
+ 'border_color' => '333333',
214
+ 'border_width' => '1',
215
+ 'border_radius' => '2',
216
+ 'size' => '',
217
+ 'font_color' => '333333',
218
+ 'background' => '',
219
+ 'icon' => '2713',
220
+ ),
221
+ 'black_3' => array(
222
+ 'name' => 'Black 3',
223
+ 'border_color' => '333333',
224
+ 'border_width' => '2',
225
+ 'border_radius' => '50',
226
+ 'size' => '',
227
+ 'font_color' => '333333',
228
+ 'background' => '',
229
+ 'icon' => 'f058',
230
+ ),
231
+ 'black_4' => array(
232
+ 'name' => 'Black 4',
233
+ 'border_color' => '333333',
234
+ 'border_width' => '2',
235
+ 'border_radius' => '2',
236
+ 'size' => '',
237
+ 'font_color' => '333333',
238
+ 'background' => '',
239
+ 'icon' => 'f14a',
240
+ ),
241
+ 'white_1' => array(
242
+ 'name' => 'White 1',
243
+ 'border_color' => '',
244
+ 'border_width' => '0',
245
+ 'border_radius' => '5',
246
+ 'size' => '',
247
+ 'font_color' => 'dddddd',
248
+ 'background' => '333333',
249
+ 'icon' => 'f00c',
250
+ ),
251
+ 'white_2' => array(
252
+ 'name' => 'White 2',
253
+ 'border_color' => 'dddddd',
254
+ 'border_width' => '1',
255
+ 'border_radius' => '2',
256
+ 'size' => '',
257
+ 'font_color' => 'dddddd',
258
+ 'background' => '',
259
+ 'icon' => '2713',
260
+ ),
261
+ 'white_3' => array(
262
+ 'name' => 'White 3',
263
+ 'border_color' => 'dddddd',
264
+ 'border_width' => '2',
265
+ 'border_radius' => '50',
266
+ 'size' => '',
267
+ 'font_color' => 'dddddd',
268
+ 'background' => '',
269
+ 'icon' => 'f058',
270
+ ),
271
+ 'white_4' => array(
272
+ 'name' => 'White 4',
273
+ 'border_color' => 'dddddd',
274
+ 'border_width' => '2',
275
+ 'border_radius' => '2',
276
+ 'size' => '',
277
+ 'font_color' => 'dddddd',
278
+ 'background' => '',
279
+ 'icon' => 'f14a',
280
+ ),
281
+ 'red_1' => array(
282
+ 'name' => 'Red 1',
283
+ 'border_color' => '',
284
+ 'border_width' => '0',
285
+ 'border_radius' => '5',
286
+ 'size' => '',
287
+ 'font_color' => 'dd3333',
288
+ 'background' => '333333',
289
+ 'icon' => 'f00c',
290
+ ),
291
+ 'red_2' => array(
292
+ 'name' => 'Red 2',
293
+ 'border_color' => 'dd3333',
294
+ 'border_width' => '1',
295
+ 'border_radius' => '2',
296
+ 'size' => '',
297
+ 'font_color' => 'dd3333',
298
+ 'background' => '',
299
+ 'icon' => '2713',
300
+ ),
301
+ 'red_3' => array(
302
+ 'name' => 'Red 3',
303
+ 'border_color' => 'dd3333',
304
+ 'border_width' => '2',
305
+ 'border_radius' => '50',
306
+ 'size' => '',
307
+ 'font_color' => 'dd3333',
308
+ 'background' => '',
309
+ 'icon' => 'f058',
310
+ ),
311
+ 'red_4' => array(
312
+ 'name' => 'Red 4',
313
+ 'border_color' => 'dd3333',
314
+ 'border_width' => '2',
315
+ 'border_radius' => '2',
316
+ 'size' => '',
317
+ 'font_color' => 'dd3333',
318
+ 'background' => '',
319
+ 'icon' => 'f14a',
320
+ ),
321
+ 'green_1' => array(
322
+ 'name' => 'Green 1',
323
+ 'border_color' => '',
324
+ 'border_width' => '0',
325
+ 'border_radius' => '5',
326
+ 'size' => '',
327
+ 'font_color' => '33dd33',
328
+ 'background' => '333333',
329
+ 'icon' => 'f00c',
330
+ ),
331
+ 'green_2' => array(
332
+ 'name' => 'Green 2',
333
+ 'border_color' => '33dd33',
334
+ 'border_width' => '1',
335
+ 'border_radius' => '2',
336
+ 'size' => '',
337
+ 'font_color' => '33dd33',
338
+ 'background' => '',
339
+ 'icon' => '2713',
340
+ ),
341
+ 'green_3' => array(
342
+ 'name' => 'Green 3',
343
+ 'border_color' => '33dd33',
344
+ 'border_width' => '2',
345
+ 'border_radius' => '50',
346
+ 'size' => '',
347
+ 'font_color' => '33dd33',
348
+ 'background' => '',
349
+ 'icon' => 'f058',
350
+ ),
351
+ 'green_4' => array(
352
+ 'name' => 'Green 4',
353
+ 'border_color' => '33dd33',
354
+ 'border_width' => '2',
355
+ 'border_radius' => '2',
356
+ 'size' => '',
357
+ 'font_color' => '33dd33',
358
+ 'background' => '',
359
+ 'icon' => 'f14a',
360
+ ),
361
+ 'blue_1' => array(
362
+ 'name' => 'Blue 1',
363
+ 'border_color' => '',
364
+ 'border_width' => '0',
365
+ 'border_radius' => '5',
366
+ 'size' => '',
367
+ 'font_color' => '3333dd',
368
+ 'background' => '333333',
369
+ 'icon' => 'f00c',
370
+ ),
371
+ 'blue_2' => array(
372
+ 'name' => 'Blue 2',
373
+ 'border_color' => '3333dd',
374
+ 'border_width' => '1',
375
+ 'border_radius' => '2',
376
+ 'size' => '',
377
+ 'font_color' => '3333dd',
378
+ 'background' => '',
379
+ 'icon' => '2713',
380
+ ),
381
+ 'blue_3' => array(
382
+ 'name' => 'Blue 3',
383
+ 'border_color' => '3333dd',
384
+ 'border_width' => '2',
385
+ 'border_radius' => '50',
386
+ 'size' => '',
387
+ 'font_color' => '3333dd',
388
+ 'background' => '',
389
+ 'icon' => 'f058',
390
+ ),
391
+ 'blue_4' => array(
392
+ 'name' => 'Blue 4',
393
+ 'border_color' => '3333dd',
394
+ 'border_width' => '2',
395
+ 'border_radius' => '2',
396
+ 'size' => '',
397
+ 'font_color' => '3333dd',
398
+ 'background' => '',
399
+ 'icon' => 'f14a',
400
+ ),
401
+ );
402
+ foreach($checkbox_themes as $chth_key => $chth_data) {
403
+ echo '<option value="', $chth_key, '"';
404
+ foreach($chth_data as $chth_data_key => $chth_data_val) {
405
+ echo ' data-', $chth_data_key, '="', $chth_data_val, '"';
406
+ }
407
+ if( $checkbox_theme_current == $chth_key ) {
408
+ echo ' selected';
409
+ }
410
+ echo '>', $chth_data['name'], '</option>';
411
+ }
412
+ ?>
413
+ </select>
414
+ </td>
415
+ </tr>
416
+ <tr class="br_checkbox_radio_settings">
417
+ <td><?php _e('Radio', 'BeRocket_AJAX_domain') ?></td>
418
+ <td class="admin-column-color">
419
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'bcolor'), '000000') ?>"></div>
420
+ <input class="br_border_color_set" type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'bcolor')) ?>" name="br_filters_options[styles_input][radio][bcolor]" />
421
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
422
+ </td>
423
+ <td class="admin-column-font-size">
424
+ <input class="br_border_width_set" type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][radio][bwidth]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'bwidth')) ?>" />
425
+ </td>
426
+ <td class="admin-column-font-size">
427
+ <input class="br_border_radius_set" type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][radio][bradius]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'bradius')) ?>" />
428
+ </td>
429
+ <td class="admin-column-font-size">
430
+ <input class="br_size_set" type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][radio][fontsize]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'fontsize')) ?>" />
431
+ </td>
432
+ <td class="admin-column-color">
433
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'fcolor'), '000000') ?>"></div>
434
+ <input class="br_font_color_set" type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'fcolor')) ?>" name="br_filters_options[styles_input][radio][fcolor]" />
435
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
436
+ </td>
437
+ <td class="admin-column-color">
438
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'backcolor'), '000000') ?>"></div>
439
+ <input class="br_background_set" type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'radio', 'backcolor')) ?>" name="br_filters_options[styles_input][radio][backcolor]" />
440
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
441
+ </td>
442
+ <td class="admin-column-color">
443
+ <select name="br_filters_options[styles_input][radio][icon]" class="fontawesome br_icon_set">
444
+ <option value=""<?php if ( empty($options['styles_input']['radio']['icon']) ) echo ' selected' ?>>NONE</option>
445
+ <?php $radion_icon = array( 'f111', '2022', 'f10c', 'f192', 'f0c8', 'f055', 'f0fe', 'f14a', 'f058' );
446
+ foreach( $radion_icon as $r_icon ) {
447
+ echo '<option value="'.$r_icon.'"'.( br_get_value_from_array($options, array('styles_input', 'radio', 'icon')) == $r_icon ? ' selected' : '' ).'>&#x'.$r_icon.';</option>';
448
+ }?>
449
+ </select>
450
+ </td>
451
+ <td class="admin-column-color">
452
+ <select name="br_filters_options[styles_input][radio][theme]" class="br_theme_set_select">
453
+ <option value=""<?php if ( empty($options['styles_input']['radio']['theme']) ) echo ' selected' ?>>NONE</option>
454
+ <?php
455
+ $radio_theme_current = br_get_value_from_array($options, array('styles_input', 'checkbox', 'theme'));
456
+ $radio_themes = array(
457
+ 'black_1' => array(
458
+ 'name' => 'Black 1',
459
+ 'border_color' => '',
460
+ 'border_width' => '0',
461
+ 'border_radius' => '5',
462
+ 'size' => '',
463
+ 'font_color' => '333333',
464
+ 'background' => 'bbbbbb',
465
+ 'icon' => 'f111',
466
+ ),
467
+ 'black_2' => array(
468
+ 'name' => 'Black 2',
469
+ 'border_color' => '333333',
470
+ 'border_width' => '1',
471
+ 'border_radius' => '2',
472
+ 'size' => '',
473
+ 'font_color' => '333333',
474
+ 'background' => '',
475
+ 'icon' => 'f0c8',
476
+ ),
477
+ 'black_3' => array(
478
+ 'name' => 'Black 3',
479
+ 'border_color' => '333333',
480
+ 'border_width' => '2',
481
+ 'border_radius' => '',
482
+ 'size' => '10',
483
+ 'font_color' => '333333',
484
+ 'background' => '',
485
+ 'icon' => 'f055',
486
+ ),
487
+ 'white_1' => array(
488
+ 'name' => 'White 1',
489
+ 'border_color' => '',
490
+ 'border_width' => '0',
491
+ 'border_radius' => '5',
492
+ 'size' => '',
493
+ 'font_color' => 'dddddd',
494
+ 'background' => '333333',
495
+ 'icon' => 'f111',
496
+ ),
497
+ 'white_2' => array(
498
+ 'name' => 'White 2',
499
+ 'border_color' => 'dddddd',
500
+ 'border_width' => '1',
501
+ 'border_radius' => '2',
502
+ 'size' => '',
503
+ 'font_color' => 'dddddd',
504
+ 'background' => '',
505
+ 'icon' => 'f0c8',
506
+ ),
507
+ 'white_3' => array(
508
+ 'name' => 'White 3',
509
+ 'border_color' => 'dddddd',
510
+ 'border_width' => '2',
511
+ 'border_radius' => '',
512
+ 'size' => '10',
513
+ 'font_color' => 'dddddd',
514
+ 'background' => '',
515
+ 'icon' => 'f055',
516
+ ),
517
+ 'red_1' => array(
518
+ 'name' => 'Red 1',
519
+ 'border_color' => '',
520
+ 'border_width' => '0',
521
+ 'border_radius' => '5',
522
+ 'size' => '',
523
+ 'font_color' => 'dd3333',
524
+ 'background' => '333333',
525
+ 'icon' => 'f111',
526
+ ),
527
+ 'red_2' => array(
528
+ 'name' => 'Red 2',
529
+ 'border_color' => 'dd3333',
530
+ 'border_width' => '1',
531
+ 'border_radius' => '2',
532
+ 'size' => '',
533
+ 'font_color' => 'dd3333',
534
+ 'background' => '',
535
+ 'icon' => 'f0c8',
536
+ ),
537
+ 'red_3' => array(
538
+ 'name' => 'Red 3',
539
+ 'border_color' => 'dd3333',
540
+ 'border_width' => '2',
541
+ 'border_radius' => '',
542
+ 'size' => '10',
543
+ 'font_color' => 'dd3333',
544
+ 'background' => '',
545
+ 'icon' => 'f055',
546
+ ),
547
+ 'green_1' => array(
548
+ 'name' => 'Green 1',
549
+ 'border_color' => '',
550
+ 'border_width' => '0',
551
+ 'border_radius' => '5',
552
+ 'size' => '',
553
+ 'font_color' => '33dd33',
554
+ 'background' => '333333',
555
+ 'icon' => 'f111',
556
+ ),
557
+ 'green_2' => array(
558
+ 'name' => 'Green 2',
559
+ 'border_color' => '33dd33',
560
+ 'border_width' => '1',
561
+ 'border_radius' => '2',
562
+ 'size' => '',
563
+ 'font_color' => '33dd33',
564
+ 'background' => '',
565
+ 'icon' => 'f0c8',
566
+ ),
567
+ 'green_3' => array(
568
+ 'name' => 'Green 3',
569
+ 'border_color' => '33dd33',
570
+ 'border_width' => '2',
571
+ 'border_radius' => '',
572
+ 'size' => '10',
573
+ 'font_color' => '33dd33',
574
+ 'background' => '',
575
+ 'icon' => 'f055',
576
+ ),
577
+ 'blue_1' => array(
578
+ 'name' => 'Blue 1',
579
+ 'border_color' => '',
580
+ 'border_width' => '0',
581
+ 'border_radius' => '5',
582
+ 'size' => '',
583
+ 'font_color' => '3333dd',
584
+ 'background' => '333333',
585
+ 'icon' => 'f111',
586
+ ),
587
+ 'blue_2' => array(
588
+ 'name' => 'Blue 2',
589
+ 'border_color' => '3333dd',
590
+ 'border_width' => '1',
591
+ 'border_radius' => '2',
592
+ 'size' => '',
593
+ 'font_color' => '3333dd',
594
+ 'background' => '',
595
+ 'icon' => 'f0c8',
596
+ ),
597
+ 'blue_3' => array(
598
+ 'name' => 'Blue 3',
599
+ 'border_color' => '3333dd',
600
+ 'border_width' => '2',
601
+ 'border_radius' => '',
602
+ 'size' => '10',
603
+ 'font_color' => '3333dd',
604
+ 'background' => '',
605
+ 'icon' => 'f055',
606
+ ),
607
+ );
608
+ foreach($radio_themes as $rth_key => $rth_data) {
609
+ echo '<option value="', $rth_key, '"';
610
+ foreach($rth_data as $rth_data_key => $rth_data_val) {
611
+ echo ' data-', $rth_data_key, '="', $rth_data_val, '"';
612
+ }
613
+ if( $checkbox_theme_current == $rth_key ) {
614
+ echo ' selected';
615
+ }
616
+ echo '>', $rth_data['name'], '</option>';
617
+ }
618
+ ?>
619
+ </select>
620
+ </td>
621
+ </tr>
622
+ </tbody>
623
+ <tfoot>
624
+ <tr>
625
+ <th class="manage-column admin-column-theme" scope="col" colspan="9">
626
+ <input type="button" value="<?php _e('Set all to theme default', 'BeRocket_AJAX_domain') ?>" class="all_theme_default button">
627
+ <div style="clear:both;"></div>
628
+ </th>
629
+ </tr>
630
+ </tfoot>
631
+ </table>
632
+ <table class="wp-list-table widefat fixed posts">
633
+ <thead>
634
+ <tr><th colspan="10" style="text-align: center; font-size: 2em;"><?php _e('Slider', 'BeRocket_AJAX_domain') ?></th></tr>
635
+ <tr>
636
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Line color', 'BeRocket_AJAX_domain') ?></th>
637
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Back line color', 'BeRocket_AJAX_domain') ?></th>
638
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Line height', 'BeRocket_AJAX_domain') ?></th>
639
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Line border color', 'BeRocket_AJAX_domain') ?></th>
640
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Line border width', 'BeRocket_AJAX_domain') ?></th>
641
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Button size', 'BeRocket_AJAX_domain') ?></th>
642
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Button color', 'BeRocket_AJAX_domain') ?></th>
643
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Button border color', 'BeRocket_AJAX_domain') ?></th>
644
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Button border width', 'BeRocket_AJAX_domain') ?></th>
645
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Button border radius', 'BeRocket_AJAX_domain') ?></th>
646
+ </tr>
647
+ </thead>
648
+ <tbody>
649
+ <tr>
650
+ <td class="admin-column-color">
651
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'line_color'), '000000') ?>"></div>
652
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'line_color')) ?>" name="br_filters_options[styles_input][slider][line_color]" />
653
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
654
+ </td>
655
+ <td class="admin-column-color">
656
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'back_line_color'), '000000') ?>"></div>
657
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'back_line_color')) ?>" name="br_filters_options[styles_input][slider][back_line_color]" />
658
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
659
+ </td>
660
+ <td class="admin-column-font-size">
661
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][slider][line_height]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'line_height')) ?>" />
662
+ </td>
663
+ <td class="admin-column-color">
664
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'line_border_color'), '000000') ?>"></div>
665
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'line_border_color')) ?>" name="br_filters_options[styles_input][slider][line_border_color]" />
666
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
667
+ </td>
668
+ <td class="admin-column-font-size">
669
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][slider][line_border_width]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'line_border_width')) ?>" />
670
+ </td>
671
+ <td class="admin-column-font-size">
672
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][slider][button_size]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_size')) ?>" />
673
+ </td>
674
+ <td class="admin-column-color">
675
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_color'), '000000') ?>"></div>
676
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_color')) ?>" name="br_filters_options[styles_input][slider][button_color]" />
677
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
678
+ </td>
679
+ <td class="admin-column-color">
680
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_border_color'), '000000') ?>"></div>
681
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_border_color')) ?>" name="br_filters_options[styles_input][slider][button_border_color]" />
682
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
683
+ </td>
684
+ <td class="admin-column-font-size">
685
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][slider][button_border_width]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_border_width')); ?>" />
686
+ </td>
687
+ <td class="admin-column-font-size">
688
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][slider][button_border_radius]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'slider', 'button_border_radius')); ?>" />
689
+ </td>
690
+ </tr>
691
+ </tbody>
692
+ <tfoot>
693
+ <tr>
694
+ <th class="manage-column admin-column-theme" scope="col" colspan="10">
695
+ <input type="button" value="<?php _e('Set all to theme default', 'BeRocket_AJAX_domain') ?>" class="all_theme_default button">
696
+ <div style="clear:both;"></div>
697
+ </th>
698
+ </tr>
699
+ </tfoot>
700
+ </table>
701
+ <table class="wp-list-table widefat fixed posts">
702
+ <thead>
703
+ <tr><th colspan="10" style="text-align: center; font-size: 2em;"><?php _e('Product count description before filtering with Apply Filters button', 'BeRocket_AJAX_domain') ?></th></tr>
704
+ <tr>
705
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Background color', 'BeRocket_AJAX_domain') ?></th>
706
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Border color', 'BeRocket_AJAX_domain') ?></th>
707
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Font size', 'BeRocket_AJAX_domain') ?></th>
708
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Font color', 'BeRocket_AJAX_domain') ?></th>
709
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Show button font size', 'BeRocket_AJAX_domain') ?></th>
710
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Show button font color', 'BeRocket_AJAX_domain') ?></th>
711
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Show button font color on mouse over', 'BeRocket_AJAX_domain') ?></th>
712
+ <th class="manage-column admin-column-font-size" scope="col"><?php _e('Close button size', 'BeRocket_AJAX_domain') ?></th>
713
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Close button font color', 'BeRocket_AJAX_domain') ?></th>
714
+ <th class="manage-column admin-column-color" scope="col"><?php _e('Close button font color on mouse over', 'BeRocket_AJAX_domain') ?></th>
715
+ </tr>
716
+ </thead>
717
+ <tbody>
718
+ <tr>
719
+ <td class="admin-column-color">
720
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'back_color'), '000000') ?>"></div>
721
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'back_color')) ?>" name="br_filters_options[styles_input][pc_ub][back_color]" />
722
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
723
+ </td>
724
+ <td class="admin-column-color">
725
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'border_color'), '000000') ?>"></div>
726
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'border_color')) ?>" name="br_filters_options[styles_input][pc_ub][border_color]" />
727
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
728
+ </td>
729
+ <td class="admin-column-font-size">
730
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][pc_ub][font_size]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'font_size')); ?>" />
731
+ </td>
732
+ <td class="admin-column-color">
733
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'font_color'), '000000') ?>"></div>
734
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'font_color')) ?>" name="br_filters_options[styles_input][pc_ub][font_color]" />
735
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
736
+ </td>
737
+ <td class="admin-column-font-size">
738
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][pc_ub][show_font_size]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'show_font_size')); ?>" />
739
+ </td>
740
+ <td class="admin-column-color">
741
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'show_font_color'), '000000') ?>"></div>
742
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'show_font_color')) ?>" name="br_filters_options[styles_input][pc_ub][show_font_color]" />
743
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
744
+ </td>
745
+ <td class="admin-column-color">
746
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'show_font_color_hover'), '000000') ?>"></div>
747
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'show_font_color_hover')) ?>" name="br_filters_options[styles_input][pc_ub][show_font_color_hover]" />
748
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
749
+ </td>
750
+ <td class="admin-column-font-size">
751
+ <input type="text" placeholder="<?php _e('Theme Default', 'BeRocket_AJAX_domain') ?>" name="br_filters_options[styles_input][pc_ub][close_size]" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'close_size')); ?>" />
752
+ </td>
753
+ <td class="admin-column-color">
754
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'close_font_color'), '000000') ?>"></div>
755
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'close_font_color')) ?>" name="br_filters_options[styles_input][pc_ub][close_font_color]" />
756
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
757
+ </td>
758
+ <td class="admin-column-color">
759
+ <div class="br_colorpicker_field" data-color="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'close_font_color_hover'), '000000') ?>"></div>
760
+ <input type="hidden" value="<?php echo br_get_value_from_array($options, array('styles_input', 'pc_ub', 'close_font_color_hover')) ?>" name="br_filters_options[styles_input][pc_ub][close_font_color_hover]" />
761
+ <input type="button" value="<?php _e('Default', 'BeRocket_AJAX_domain') ?>" class="theme_default button tiny-button">
762
+ </td>
763
+ </tr>
764
+ </tbody>
765
+ <tfoot>
766
+ <tr>
767
+ <th class="manage-column admin-column-theme" scope="col" colspan="10">
768
+ <input type="button" value="<?php _e('Set all to theme default', 'BeRocket_AJAX_domain') ?>" class="all_theme_default button">
769
+ <div style="clear:both;"></div>
770
+ </th>
771
+ </tr>
772
+ </tfoot>
773
+ </table>
{css → addons/deprecated_filters}/widget.css RENAMED
@@ -1236,17 +1236,17 @@ div.berocket_single_filter_widget div.berocket_aapf_widget-wrapper * {
1236
  opacity:1;
1237
  }
1238
  @media screen and (max-width: 767px){
1239
- .berocket_hide_single_widget_on_mobile {
1240
  display: none!important;
1241
  }
1242
  }
1243
  @media screen and (min-width: 768px) and (max-width: 1024px){
1244
- .berocket_hide_single_widget_on_tablet {
1245
  display: none!important;
1246
  }
1247
  }
1248
  @media screen and (min-width: 1025px){
1249
- .berocket_hide_single_widget_on_desktop {
1250
  display: none!important;
1251
  }
1252
  }
1236
  opacity:1;
1237
  }
1238
  @media screen and (max-width: 767px){
1239
+ .bapf_sngl_hd_mobile {
1240
  display: none!important;
1241
  }
1242
  }
1243
  @media screen and (min-width: 768px) and (max-width: 1024px){
1244
+ .bapf_sngl_hd_tablet {
1245
  display: none!important;
1246
  }
1247
  }
1248
  @media screen and (min-width: 1025px){
1249
+ .bapf_sngl_hd_desktop {
1250
  display: none!important;
1251
  }
1252
  }
{js → addons/deprecated_filters}/widget.min.js RENAMED
@@ -26,13 +26,14 @@ var berocket_aapf_widget_product_filters = [],
26
  var $berocket_aapf_widget = $(this).parents('.berocket_aapf_widget');
27
  var $date_info = $berocket_aapf_widget.find('.berocket_date_picker');
28
  var value = berocket_convert_date_to_date_picker($(this).datepicker( "getDate" ));
 
29
  value = value.replace(/\//g, '');
30
  if( $(this).is('.br_start_date')) {
31
  $date_info.data('value_1', $(this).val());
32
- $date_info.data('value1', value);
33
  } else {
34
  $date_info.data('value_2', $(this).val());
35
- $date_info.data('value2', value);
36
  }
37
  });
38
  function berocket_convert_date_to_date_picker(date) {
@@ -48,6 +49,19 @@ var berocket_aapf_widget_product_filters = [],
48
  var yy = date.getFullYear();
49
  return mm+'/'+dd+'/'+yy;
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  if( $(the_ajax_script.products_holder_id).is('.wf-container') ) {
52
  berocket_replace_only_html = true;
53
  }
@@ -69,12 +83,6 @@ var berocket_aapf_widget_product_filters = [],
69
  }
70
  }
71
 
72
- function init_styler(){
73
- setTimeout(function() {
74
- $('.themed').styler();
75
- }, 100);
76
- }
77
-
78
  function update_selected_area() {
79
  var selected_area_exist = true;
80
  if ( ! $('.berocket_aapf_widget_selected_area').hasClass('berocket_aapf_widget_selected_area') ) {
@@ -1749,7 +1757,7 @@ var berocket_aapf_widget_product_filters = [],
1749
  {
1750
  widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
1751
  widget_block.slideUp(0);
1752
- if( typeof(widget_block.find('select').select2) == 'function' ) {
1753
  widget_block.find('select').select2("close");
1754
  }
1755
  $(this).find('span').removeClass('hide_button').addClass('show_button');
@@ -1917,13 +1925,13 @@ var berocket_aapf_widget_product_filters = [],
1917
 
1918
  berocket_filters_first_load = function() {
1919
  if( $(window).width() <= 767 ) {
1920
- $('.berocket_hide_single_widget_on_mobile').remove();
1921
  }
1922
  if( $(window).width() > 767 && $(window).width() <= 1024 ) {
1923
- $('.berocket_hide_single_widget_on_tablet').remove();
1924
  }
1925
  if( $(window).width() > 1024 ) {
1926
- $('.berocket_hide_single_widget_on_desktop').remove();
1927
  }
1928
  if( $('.berocket_wc_shortcode_fix').length ) {
1929
  berocket_new_product_recount($('.berocket_wc_shortcode_fix'));
@@ -1954,7 +1962,6 @@ var berocket_aapf_widget_product_filters = [],
1954
  berocket_custom_scroll_bar_init();
1955
  }
1956
  });
1957
- init_styler();
1958
 
1959
  update_data_containers();
1960
  update_selected_area();
26
  var $berocket_aapf_widget = $(this).parents('.berocket_aapf_widget');
27
  var $date_info = $berocket_aapf_widget.find('.berocket_date_picker');
28
  var value = berocket_convert_date_to_date_picker($(this).datepicker( "getDate" ));
29
+ var value_send = berocket_convert_date_to_date_picker_send($(this).datepicker( "getDate" ));
30
  value = value.replace(/\//g, '');
31
  if( $(this).is('.br_start_date')) {
32
  $date_info.data('value_1', $(this).val());
33
+ $date_info.data('value1', value_send);
34
  } else {
35
  $date_info.data('value_2', $(this).val());
36
+ $date_info.data('value2', value_send);
37
  }
38
  });
39
  function berocket_convert_date_to_date_picker(date) {
49
  var yy = date.getFullYear();
50
  return mm+'/'+dd+'/'+yy;
51
  }
52
+ function berocket_convert_date_to_date_picker_send(date) {
53
+ var mm = date.getMonth();
54
+ mm++;
55
+ if( mm < 10 ) {
56
+ mm = '0'+mm;
57
+ }
58
+ var dd = date.getDate();
59
+ if( dd < 10 ) {
60
+ dd = '0'+dd;
61
+ }
62
+ var yy = date.getFullYear();
63
+ return yy+''+mm+''+dd;
64
+ }
65
  if( $(the_ajax_script.products_holder_id).is('.wf-container') ) {
66
  berocket_replace_only_html = true;
67
  }
83
  }
84
  }
85
 
 
 
 
 
 
 
86
  function update_selected_area() {
87
  var selected_area_exist = true;
88
  if ( ! $('.berocket_aapf_widget_selected_area').hasClass('berocket_aapf_widget_selected_area') ) {
1757
  {
1758
  widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
1759
  widget_block.slideUp(0);
1760
+ if( typeof(widget_block.find('select').select2) == 'function' && widget_block.find('select').data('select2') ) {
1761
  widget_block.find('select').select2("close");
1762
  }
1763
  $(this).find('span').removeClass('hide_button').addClass('show_button');
1925
 
1926
  berocket_filters_first_load = function() {
1927
  if( $(window).width() <= 767 ) {
1928
+ $('.bapf_sngl_hd_mobile').remove();
1929
  }
1930
  if( $(window).width() > 767 && $(window).width() <= 1024 ) {
1931
+ $('.bapf_sngl_hd_tablet').remove();
1932
  }
1933
  if( $(window).width() > 1024 ) {
1934
+ $('.bapf_sngl_hd_desktop').remove();
1935
  }
1936
  if( $('.berocket_wc_shortcode_fix').length ) {
1937
  berocket_new_product_recount($('.berocket_wc_shortcode_fix'));
1962
  berocket_custom_scroll_bar_init();
1963
  }
1964
  });
 
1965
 
1966
  update_data_containers();
1967
  update_selected_area();
addons/separate_link/separate_vars.php CHANGED
@@ -5,6 +5,7 @@ class BeRocket_AAPF_lp_separate_vars extends BeRocket_AAPF_link_parser {
5
  if( ! is_admin() ) {
6
  add_filter('berocket_aapf_is_filtered_page_check', array($this, 'php_parse_inside_test'));
7
  add_action('wp_footer', array($this, 'js_footer_new_func'));
 
8
  }
9
  $BeRocket_AAPF = BeRocket_AAPF::getInstance();
10
  $option = $BeRocket_AAPF->get_option();
@@ -12,6 +13,7 @@ class BeRocket_AAPF_lp_separate_vars extends BeRocket_AAPF_link_parser {
12
  if( ! empty( $option['use_links_filters'] ) ) {
13
  add_action( 'current_screen', array( $this, 'register_permalink_option' ), 50 );
14
  }
 
15
  }
16
  function register_permalink_option() {
17
  global $wp_settings_sections;
@@ -437,5 +439,89 @@ class BeRocket_AAPF_lp_separate_vars extends BeRocket_AAPF_link_parser {
437
  }
438
  return $link_data;
439
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  }
441
  new BeRocket_AAPF_lp_separate_vars();
5
  if( ! is_admin() ) {
6
  add_filter('berocket_aapf_is_filtered_page_check', array($this, 'php_parse_inside_test'));
7
  add_action('wp_footer', array($this, 'js_footer_new_func'));
8
+ add_action( 'braapf_wp_enqueue_script_after', array($this, 'js_generate_new'), 10, 1 );
9
  }
10
  $BeRocket_AAPF = BeRocket_AAPF::getInstance();
11
  $option = $BeRocket_AAPF->get_option();
13
  if( ! empty( $option['use_links_filters'] ) ) {
14
  add_action( 'current_screen', array( $this, 'register_permalink_option' ), 50 );
15
  }
16
+ add_filter('aapf_localize_widget_script', array($this, 'localize_widget_script'), 900);
17
  }
18
  function register_permalink_option() {
19
  global $wp_settings_sections;
439
  }
440
  return $link_data;
441
  }
442
+ function js_generate_new($handle) {
443
+ if( $handle == 'berocket_aapf_widget-script' ) {
444
+ ob_start();
445
+ ?>
446
+ //Link Like Woocommerce
447
+ var braapf_get_current_filters_separate_link,
448
+ braapf_glue_by_operator_separate_link,
449
+ braapf_set_filters_to_link_separate_link,
450
+ braapf_compat_filters_to_string_single_separate_link,
451
+ braapf_compat_filters_result_separate_link;
452
+ (function ($){
453
+ braapf_get_current_filters_separate_link = function(url_data) {
454
+ var new_queryargs = [];
455
+ var filters = '';
456
+ $.each(url_data.queryargs, function(i, val) {
457
+ if(val.name.substring(0, 3) == 'pa-') {
458
+ if( filters === '' ) {
459
+ filters = '';
460
+ } else {
461
+ filters = filters+'&';
462
+ }
463
+ filters = filters+val.name+'='+val.value;
464
+ } else {
465
+ new_queryargs.push(val);
466
+ }
467
+ });
468
+ url_data.filter = filters;
469
+ url_data.queryargs = new_queryargs;
470
+ return url_data;
471
+ }
472
+ braapf_glue_by_operator_separate_link = function(glue) {
473
+ return ',';
474
+ }
475
+ braapf_compat_filters_result_separate_link = function(filter, val) {
476
+ var operator_string = '';
477
+ if( typeof(val.operator) != 'undefined' && val.operator != the_ajax_script.default_operator ) {
478
+ operator_string = 'pa-'+filter.taxonomy+'_operator='+val.operator;
479
+ }
480
+ filter.operator = operator_string;
481
+ return filter;
482
+ }
483
+ braapf_compat_filters_to_string_single_separate_link = function(single_string, val, compat_filters, filter_mask, glue_between_taxonomy) {
484
+ if( val.operator.length ) {
485
+ single_string = single_string+'&'+val.operator;
486
+ }
487
+ return single_string;
488
+ }
489
+ braapf_set_filters_to_link_separate_link = function(url, url_data, parameters, url_without_query, query_get) {
490
+ if(url_data.filter.length) {
491
+ if( query_get.length ) {
492
+ query_get = '&'+query_get;
493
+ }
494
+ query_get = url_data.filter+query_get;
495
+ url = url_without_query+'?'+query_get;
496
+ }
497
+ return url;
498
+ }
499
+ })(jQuery);
500
+ berocket_remove_filter('get_current_url_data', braapf_get_current_filters);
501
+ berocket_remove_filter('url_from_urldata_linkget', braapf_set_filters_to_link);
502
+
503
+ //Remove filters
504
+ berocket_add_filter('get_current_url_data', braapf_get_current_filters_separate_link);
505
+ //Add filters
506
+ berocket_add_filter('glue_by_operator', braapf_glue_by_operator_separate_link, 1);
507
+ berocket_add_filter('compat_filters_result_single', braapf_compat_filters_result_separate_link, 20);
508
+ berocket_add_filter('compat_filters_to_string_single', braapf_compat_filters_to_string_single_separate_link);
509
+ berocket_add_filter('url_from_urldata_linkget', braapf_set_filters_to_link_separate_link);
510
+ <?php
511
+ $script = ob_get_clean();
512
+ wp_add_inline_script('berocket_aapf_widget-script', $script);
513
+ remove_action('wp_footer', array($this, 'js_footer_new_func'));
514
+ remove_action( 'braapf_wp_enqueue_script_after', array($this, 'js_generate_new'), 10, 1 );
515
+ }
516
+ }
517
+ function localize_widget_script($localization) {
518
+ $BeRocket_AAPF = BeRocket_AAPF::getInstance();
519
+ $options = $BeRocket_AAPF->get_option();
520
+ $localization['url_mask'] = 'pa-%t%=%v%';
521
+ $localization['url_split'] = '&';
522
+ $localization['nice_url'] = '';
523
+ $localization['default_operator'] = (empty($options['default_operator_and']) ? 'OR' : 'AND');
524
+ return $localization;
525
+ }
526
  }
527
  new BeRocket_AAPF_lp_separate_vars();
{css → assets/admin/css}/admin.css RENAMED
@@ -37,34 +37,6 @@ td.br_colorpicker_field.colorpicker_removed:after {
37
  .admin-column-theme select{max-width: 100%;}
38
  .tab-item{display: none;}
39
  .tab-item.current{display: block;}
40
- .berocket_widget_show_color_values{
41
- cursor: pointer;
42
- display: inline-block;
43
- padding: 3px;
44
- }
45
- .berocket_widget_show_color_values span{
46
- float: right;
47
- margin-right: 20px;
48
- width: 20px;
49
- height: 20px;
50
- background: transparent url('../images/gray-left-arrow.png') no-repeat center center;
51
- }
52
- .berocket_widget_show_color_values span.show_button
53
- {
54
- -moz-transform: rotate(270deg);
55
- -ms-transform: rotate(270deg);
56
- -webkit-transform: rotate(270deg);
57
- -o-transform: rotate(270deg);
58
- transform: rotate(270deg);
59
- }
60
- .berocket_widget_show_color_values span.hide_button
61
- {
62
- -moz-transform: rotate(90deg);
63
- -ms-transform: rotate(90deg);
64
- -webkit-transform: rotate(90deg);
65
- -o-transform: rotate(90deg);
66
- transform: rotate(90deg);
67
- }
68
  .berocket_aapf_select_icon{
69
  position: fixed;
70
  left: 0;
@@ -198,12 +170,6 @@ td.br_colorpicker_field.colorpicker_removed:after {
198
  vertical-align: middle;
199
  width: 1.5em;
200
  }
201
- .berocket_ranges > input {
202
- display: inline-block;
203
- font-size: 1.5em;
204
- text-align: center;
205
- vertical-align: middle;
206
- }
207
 
208
  /* FONT AWESOME SELECTOR */
209
 
37
  .admin-column-theme select{max-width: 100%;}
38
  .tab-item{display: none;}
39
  .tab-item.current{display: block;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  .berocket_aapf_select_icon{
41
  position: fixed;
42
  left: 0;
170
  vertical-align: middle;
171
  width: 1.5em;
172
  }
 
 
 
 
 
 
173
 
174
  /* FONT AWESOME SELECTOR */
175
 
{css → assets/admin/css}/brjsf.css RENAMED
File without changes
assets/admin/css/single_filter_edit.css ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*FIX DEFAULT STYLES*/
2
+ .post-type-br_product_filter #settings .inside {
3
+ padding: 0;
4
+ }
5
+ .post-type-br_product_filter #settings .inside .berocket_sbs {
6
+ margin-left: 0;
7
+ }
8
+ /*Settings styles*/
9
+ .berocket_sbs .berocket_sbs_header {
10
+ margin-bottom: 20px;
11
+ position: relative;
12
+ }
13
+ .berocket_sbs .berocket_sbs_header .brsbs_numeric {
14
+ float: left;
15
+ position: relative;
16
+ display: block;
17
+ width: 40px;
18
+ height: 40px;
19
+ line-height:36px;
20
+ border: 2px solid white;
21
+ background-color: #f2f7fa;
22
+ border-radius: 50px;
23
+ text-align: center;
24
+ z-index:200;
25
+ box-sizing: border-box;
26
+ font-size: 16px;
27
+ font-weight: bold;
28
+ left: 10px;
29
+ top: -2px;
30
+ }
31
+ .berocket_sbs .berocket_sbs_header h3 {
32
+ margin-left: 35px;
33
+ padding: 0;
34
+ z-index: 1000;
35
+ font-size: 16px;
36
+ border: 0 none;
37
+ background-color: #f2f7fa;
38
+ height: 36px;
39
+ line-height: 36px;
40
+ position: static;
41
+ padding-left: 30px;
42
+ top: 0;
43
+ }
44
+ .berocket_sbs .berocket_sbs_content {
45
+ margin-left: 40px;
46
+ margin-right: 20px;
47
+ padding-bottom: 20px;
48
+ }
49
+ .berocket_sbs .berocket_sbs_step {
50
+ overflow: hidden;
51
+ pading-bottom: 20px;
52
+ margin-top: -20px;
53
+ }
54
+ .berocket_sbs .berocket_sbs_step:first-child {
55
+ margin-top: 0;
56
+ }
57
+ .berocket_sbs .berocket_sbs_step .berocket_sbs_header .brsbs_numeric:after {
58
+ content: " ";
59
+ position: absolute;
60
+ left: 50%;
61
+ top: 100%;
62
+ height: 9999px;
63
+ margin-left: -1px;
64
+ width: 2px;
65
+ background-color: #d3dbe1;
66
+ }
67
+ /*WIDGET TYPE CSS*/
68
+
69
+ .braapf_widget_type input[type=radio] {
70
+ display: none;
71
+ }
72
+ .braapf_widget_type {
73
+ display: flex;
74
+ flex-direction: row;
75
+ flex-wrap: wrap;
76
+ justify-content: space-around;
77
+ align-items: stretch;
78
+ align-content: space-around;
79
+ }
80
+ .braapf_widget_type > div {
81
+ flex-basis: 23%;
82
+ }
83
+ .braapf_widget_type > div {
84
+ margin-bottom:20px;
85
+ }
86
+ .braapf_widget_type > div label {
87
+ display: flex;
88
+ flex-direction: column;
89
+ flex-wrap: nowrap;
90
+ align-items: center;
91
+ width: 100%;
92
+ height: 100%;
93
+ border: 2px solid #f2f7fa;
94
+ text-align: center;
95
+ box-sizing: border-box;
96
+ position: relative;
97
+ background-color: #f2f7fa;
98
+ padding: 0;
99
+ justify-content: end;
100
+ }
101
+ .braapf_widget_type > div label:hover {
102
+ border: 2px solid #a5b0b9;
103
+ }
104
+ .braapf_widget_type > div input:checked + label {
105
+ border: 2px solid #a5b0b9;
106
+ padding: 0;
107
+ }
108
+ .braapf_widget_type > div h3 {
109
+ text-align: center;
110
+ margin: 0;
111
+ padding: 15px 0;
112
+ background-color: white;
113
+ color: #383a4d;;
114
+ display: block;
115
+ width: 100%;
116
+ font-weight: normal;
117
+ }
118
+ /*ATTRIUTE SETUP*/
119
+ .braapf_attribute_setup_flex {
120
+ display: flex;
121
+ flex-direction: row;
122
+ flex-wrap: wrap;
123
+ align-items: stretch;
124
+ align-content: space-around;
125
+ justify-content: space-between;
126
+ }
127
+ .braapf_attribute_setup_flex > div {
128
+ flex-basis: 100%;
129
+ margin-bottom: 15px;
130
+ }
131
+ .braapf_attribute_setup_flex > div > p {
132
+ width: 100%;
133
+ text-align:left;
134
+ }
135
+ .braapf_attribute_setup_flex .braapf_half_select_full {
136
+ display: flex;
137
+ flex-direction: column;
138
+ flex-wrap: nowrap;
139
+ align-items: center;
140
+ width: 100%;
141
+ height: 100%;
142
+ justify-content: space-evenly;
143
+ flex-basis: 45%;
144
+ text-align: center;
145
+ }
146
+ .braapf_attribute_setup_flex .braapf_full_select_full {
147
+ flex-basis: 90%;
148
+ display: flex;
149
+ flex-direction: column;
150
+ flex-wrap: nowrap;
151
+ justify-content: space-around;
152
+ align-items: center;
153
+ width: 100%;
154
+ height: 100%;
155
+ margin-left: auto;
156
+ margin-right: auto;
157
+ }
158
+ .braapf_parent_product_cat.braapf_half_select_full {
159
+ margin-left: 5%;
160
+ flex-basis: 43%;
161
+ }
162
+ .braapf_depth_count.braapf_half_select_full {
163
+ margin-right: 5%;
164
+ flex-basis: 43%;
165
+ }
166
+ .braapf_attribute_setup_flex .braapf_full_select_full label {
167
+ text-align: center;
168
+ }
169
+ .braapf_attribute_setup_flex .braapf_full_select_full.braapf_include_exclude_list label {
170
+ text-align: left;
171
+ }
172
+ .braapf_attribute_setup_flex .braapf_half_select_full select,
173
+ .braapf_attribute_setup_flex .braapf_half_select_full input[type=text],
174
+ .braapf_attribute_setup_flex .braapf_half_select_full input[type=number],
175
+ .braapf_attribute_setup_flex .braapf_half_select_full textarea,
176
+ .braapf_attribute_setup_flex .braapf_full_select_full select,
177
+ .braapf_attribute_setup_flex .braapf_full_select_full input[type=text],
178
+ .braapf_attribute_setup_flex .braapf_full_select_full input[type=number],
179
+ .braapf_attribute_setup_flex .braapf_full_select_full textarea {
180
+ width: 100%;
181
+ }
182
+ .braapf_attribute_setup_flex .braapf_full_select_full.braapf_price_values,
183
+ .braapf_attribute_setup_flex .braapf_full_select_full.braapf_slider_numeric,
184
+ .braapf_attribute_setup_flex .braapf_full_select_full.braapf_show_product_count_per_attr {
185
+ flex-basis: 100%;
186
+ }
187
+ .braapf_attribute_setup_flex .braapf_half_select_full.braapf_height,
188
+ .braapf_attribute_setup_flex .braapf_half_select_full.braapf_color_image_checked,
189
+ .braapf_attribute_setup_flex .braapf_half_select_full.braapf_scroll_theme {
190
+ margin-left: 5%;
191
+ margin-right: 5%;
192
+ flex-basis: 40%;
193
+ }
194
+ .braapf_attribute_setup_flex .braapf_parent_product_cat > div {
195
+ width: 100%;
196
+ text-align: center;
197
+ }
198
+ .braapf_attribute_setup_flex .berocket_aapf_selected_icon_show i:before{
199
+ position: relative;
200
+ top: -3px;
201
+ }
202
+ .braapf_include_exclude_list > div {
203
+ width: 100%;
204
+ }
205
+ .braapf_include_exclude_list .brjsf_accord_block > div {
206
+ margin-bottom: 5px;
207
+ }
208
+ .braapf_include_exclude_list input[type=checkbox] {
209
+ -webkit-appearance: none;
210
+ -moz-appearance: none;
211
+ -ms-appearance: none;
212
+ appearance: none;
213
+ display: inline-block;
214
+ vertical-align: middle;
215
+ border: 2px solid #555;
216
+ width: 20px;
217
+ height: 20px;
218
+ outline: none;
219
+ padding: 6px 2px!important;
220
+ margin-right: 5px;
221
+ }
222
+ .braapf_include_exclude_list input[type=checkbox]:checked {
223
+ background: red;
224
+ background-clip: content-box;
225
+ }
226
+ .braapf_include_exclude_list.braapf_include input[type=checkbox]:checked {
227
+ background: limegreen;
228
+ background-clip: content-box;
229
+ }
230
+ .braapf_include_exclude_list input[type=checkbox]:checked::before {
231
+ content: none!important;
232
+ }
233
+ .braapf_include_exclude_list.braapf_include input[type=checkbox]:checked::before {
234
+ content: ""!important;
235
+ background-color: limegreen;
236
+ width: 4px;
237
+ height: 12px;
238
+ margin: 0;
239
+ position: relative;
240
+ top: -4px;
241
+ margin-left: 4px;
242
+ margin-right: 3px;
243
+ box-sizing: border-box;
244
+ }
245
+ /*STYLE CSS*/
246
+ .braapf_templates_list {
247
+ display: flex;
248
+ flex-direction: column;
249
+ flex-wrap: nowrap;
250
+ align-items: stretch;
251
+ align-content: space-around;
252
+ overflow: auto;
253
+ }
254
+
255
+ .braapf_style input[type=radio] {
256
+ display: none;
257
+ }
258
+ .braapf_style {
259
+ display: flex;
260
+ flex-direction: row;
261
+ flex-wrap: nowrap;
262
+ align-items: stretch;
263
+ align-content: space-around;
264
+ overflow: auto;
265
+ }
266
+ .braapf_style > div {
267
+ margin-right:10px;
268
+ margin-left:10px;
269
+ overflow: visible;
270
+ }
271
+ .braapf_style > div label {
272
+ display: flex;
273
+ flex-direction: column;
274
+ flex-wrap: nowrap;
275
+ justify-content: space-around;
276
+ align-items: center;
277
+ width: 100%;
278
+ min-height: 100%;
279
+ text-align: center;
280
+ box-sizing: border-box;
281
+ position: relative;
282
+ z-index: 100;
283
+ overflow: hidden;
284
+ transition: all 0.1s;
285
+ background-color: #f6fbfe;
286
+ border: 2px solid #f2f7fa;
287
+ }
288
+ .braapf_style > div label:hover {
289
+ z-index: 200;
290
+ border: 2px solid #a5b0b9;
291
+ }
292
+ .braapf_style > div h3 {
293
+ position: absolute;
294
+ text-align: center;
295
+ display: block;
296
+ width: 100%;
297
+ left: 0;
298
+ margin: 0;
299
+ padding: 10px 0;
300
+ transition: all 0.2s;
301
+ bottom: -50px;
302
+ opacity: 0;
303
+ background-color: #a5b0b9;
304
+ color: #fff;
305
+ font-weight: 400;
306
+ }
307
+ .braapf_style > div label:hover h3 {
308
+ display: block;
309
+ bottom: 0px;
310
+ opacity: 1;
311
+ }
312
+ .braapf_style > div input:checked + label {
313
+ border: 2px solid #a5b0b9;
314
+ padding: 0;
315
+ }
316
+ .braapf_style > div label img {
317
+ height: 220px;
318
+ width: 375px;
319
+ }
320
+ .braapf_widget_color_pick .br_accordion {
321
+ width: 100%;
322
+ }
323
+ .braapf_widget_type > div img {
324
+ padding: 15px 0;
325
+ }
326
+ .braapf_widget_type > div .braapf_active,
327
+ .braapf_style > div .braapf_active {
328
+ position: absolute;
329
+ font-size: 6px;
330
+ left: auto;
331
+ right: 0;
332
+ top: 0;
333
+ transform: none;
334
+ -moz-transform: none;
335
+ -webkit-transform: none;
336
+ display: block;
337
+ z-index: 100;
338
+ background-color: #009688;
339
+ border-radius: 50%;
340
+ border: 6px solid #a4d2ce;
341
+ line-height: 14em;
342
+ color: white;
343
+ transition: 0.3s;
344
+ opacity: 0;
345
+ width: 20px;
346
+ height: 20px;
347
+ }
348
+ .braapf_widget_type > div input:checked + label .braapf_active,
349
+ .braapf_style > div input:checked + label .braapf_active {
350
+ opacity: 1;
351
+ }
352
+ .braapf_widget_type > div .braapf_active i,
353
+ .braapf_style > div .braapf_active i {
354
+ font-size: 12px;
355
+ display: block;
356
+ height: 20px;
357
+ line-height: 22px;
358
+ }
359
+ /*ADDITIONAL CSS*/
360
+ .braapf_icon_before_title > div,
361
+ .braapf_icon_after_title > div,
362
+ .braapf_icon_before_value > div,
363
+ .braapf_icon_after_value > div {
364
+ width: 100%;
365
+ text-align: center;
366
+ }
367
+ /*EXPERIMENTAL DESIGN*/
368
+ .braapf_templates_list {
369
+ flex-wrap: wrap;
370
+ align-content: initial;
371
+ flex-direction: row;
372
+ }
373
+ .braapf_templates_list > div {
374
+ margin-left: 10px;
375
+ margin-right: 10px;
376
+ margin-bottom: 20px;
377
+ width: 23%;
378
+ }
379
+ .braapf_templates_list > div > h4 {
380
+ display: none;
381
+ }
382
+ .braapf_templates_list > div .braapf_style {
383
+ overflow: hidden;
384
+ }
385
+ .braapf_templates_list > div .braapf_style > div {
386
+ margin-left: 0;
387
+ margin-right: 0;
388
+ }
389
+ .braapf_templates_list > div.braapf_checked_style_parent {
390
+ transition: width 0.5s;
391
+ width: 100%;
392
+ margin-left: 0;
393
+ margin-right: 0;
394
+ opacity: 1;
395
+ order: 1!important;
396
+ }
397
+ .braapf_templates_list > div.braapf_checked_style_parent .braapf_style {
398
+ overflow: auto;
399
+ }
400
+ .braapf_templates_list > div.braapf_checked_style_parent .braapf_style > div {
401
+ margin-left: 10px;
402
+ margin-right: 10px;
403
+ }
404
+ .braapf_attribute_setup_flex .braapf_half_select_full .braapf_color_image_block_size_custom input {
405
+ width: 70px;
406
+ padding: 0;
407
+ }
408
+ .braapf_fixed_submit {
409
+ position: fixed;
410
+ right: 10px;
411
+ bottom: 10px;
412
+ }
413
+ .braapf_filter_title_label,
414
+ .braapf_filter_title_button {
415
+ font-size: 24px;
416
+ font-weight: bold;
417
+ text-transform: uppercase;
418
+ }
419
+ .braapf_filter_title_label, .braapf_filter_title_button, .braapf_attribute_setup_flex .braapf_full_select_full.braapf_filter_title input {
420
+ width: 40%;
421
+ }
422
+ .braapf_attribute_setup_flex .braapf_full_select_full.braapf_filter_title {
423
+ flex-direction: row;
424
+ justify-content: start;
425
+ margin: 10px 0 20px;
426
+ }
427
+ .braapf_attribute_setup_flex .braapf_full_select_full.braapf_filter_title label {
428
+ text-align: right;
429
+ padding-right: 25px;
430
+ font-size: 18px;
431
+ font-weight: 400;
432
+ width: auto;
433
+ padding-left: 30px;
434
+ text-transform: none;
435
+ }
436
+ .berocket_sbs_step.brsbs_save .berocket_sbs_content {
437
+ text-align: center;
438
+ padding-top: 20px;
439
+ padding-bottom: 40px;
440
+ }
441
+ .berocket_sbs_step.brsbs_save .berocket_sbs_content input{
442
+ font-size: 17px;
443
+ padding: 0 30px;
444
+ }
445
+ .braapf_templates_list > div:not(.braapf_checked_style_parent) {
446
+ width: 16.63%;
447
+ padding-left: 10px;
448
+ box-sizing: border-box;
449
+ margin-left: 0;
450
+ margin-right: 0;
451
+ }
452
+ .braapf_templates_list > div:not(.braapf_checked_style_parent) .braapf_style > div + div {
453
+ display: none !important;
454
+ }
455
+ .braapf_templates_list > div:not(.braapf_checked_style_parent) .braapf_style > div{
456
+ width: 100%;
457
+ }
458
+ .braapf_templates_list > div:not(.braapf_checked_style_parent) .braapf_style > div label img {
459
+ max-width: 100%;
460
+ height: auto;
461
+ }
462
+ .braapf_widget_is_hide > p {
463
+ margin-top: 22px;
464
+ margin-bottom: 0;
465
+ }
466
+ @media screen and (max-width: 1400px) {
467
+ .braapf_widget_type > div {
468
+ flex-basis: 40%;
469
+ }
470
+ }
471
+ @media screen and (min-width: 1400px) {
472
+ .berocket_sbs_step.brsbs_additional .berocket_sbs_content,
473
+ .berocket_sbs_step.brsbs_attribute_setup .berocket_sbs_content,
474
+ .berocket_sbs_step.brsbs_required .berocket_sbs_content {
475
+ margin-left: auto;
476
+ margin-right: auto;
477
+ max-width: 600px;
478
+ }
479
+ }
480
+ .berocket_ranges_block .berocket_ranges:first-child {
481
+ padding-right: 38px;
482
+ }
483
+ .berocket_ranges {
484
+ margin-bottom: 5px;
485
+ }
486
+ .berocket_ranges > span {
487
+ display: inline-block;
488
+ vertical-align: middle;
489
+ text-align: center;
490
+ line-height: 41px;
491
+ }
492
+ .braapf_attribute_setup_flex .berocket_ranges_block .berocket_ranges input {
493
+ display: inline-block;
494
+ font-size: 1.5em;
495
+ text-align: center;
496
+ vertical-align: middle;
497
+ font-weight: bold;
498
+ padding: 0;
499
+ margin: 0;
500
+ max-width: 200px;
501
+ }
502
+ @media screen and (max-width: 768px) {
503
+ .braapf_attribute_setup_flex .berocket_ranges_block .berocket_ranges input {
504
+ max-width: 60px;
505
+ font-size: 1em;
506
+ }
507
+ }
508
+ .berocket_ranges .berocket_ranges_glue {
509
+ background-color: #444;
510
+ height: 7px;
511
+ width: 30px;
512
+ padding: 0;
513
+ margin: 0 10px;
514
+ }
515
+ .berocket_ranges .berocket_remove_ranges {
516
+ width: 38px;
517
+ display: inline-block;
518
+ }
assets/admin/images/apply_filters.png ADDED
Binary file
assets/admin/images/clear_filters.png ADDED
Binary file
assets/admin/images/filters.png ADDED
Binary file
assets/admin/images/selected_filters.png ADDED
Binary file
assets/admin/js/admin.js ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var berocket_admin_filter_types = {
2
+ tag:['checkbox','radio','select','color','image','tag_cloud'],
3
+ product_cat:['checkbox','radio','select','color','image'],
4
+ sale:['checkbox','radio','select'],
5
+ custom_taxonomy:['checkbox','radio','select','color','image'],
6
+ attribute:['checkbox','radio','select','color','image'],
7
+ price:['slider'],
8
+ filter_by:['checkbox','radio','select','color','image']
9
+ };
10
+ var berocket_admin_filter_types_by_attr = {
11
+ checkbox:'<option value="checkbox">'+aapf_admin_text.checkbox_text+'</option>',
12
+ radio:'<option value="radio">'+aapf_admin_text.radio_text+'</option>',
13
+ select:'<option value="select">'+aapf_admin_text.select_text+'</option>',
14
+ color:'<option value="color">'+aapf_admin_text.color_text+'</option>',
15
+ image:'<option value="image">'+aapf_admin_text.image_text+'</option>',
16
+ slider:'<option value="slider">'+aapf_admin_text.slider_text+'</option>',
17
+ tag_cloud:'<option value="tag_cloud">'+aapf_admin_text.tag_cloud_text+'</option>'
18
+ };
19
+
20
+ (function ($) {
21
+ $(document).ready(function () {
22
+
23
+ $('.get_shortcode').click( function ( event ) {
24
+ event.preventDefault();
25
+ $form = $(this).parents('form');
26
+ var params = $( '.br_colorpicker_field_input, .berocket_image_value' );
27
+ var attr = $( '#berocket_sc_attribute' );
28
+ var type = $( '#berocket_sc_type' );
29
+ if ( params.length > 0 ) {
30
+ params = params.serialize();
31
+ params = params+'&action=aapf_color_set&type='+type.val()+'&tax_color_name='+attr.val();
32
+ $.post(ajaxurl, params, function (data) {});
33
+ }
34
+ create_shortcode( $form );
35
+ });
36
+ $(document).on('change', '.berocket_aapf_widget_sc, .berocket_aapf_style_sb_sc, .berocket_aapf_sb_attributes_sc, .berocket_aapf_childs_sc, .berocket_aapf_include_list_sc', function() {
37
+ $(this).data('sc_change', '1');
38
+ });
39
+ function create_shortcode( $form ) {
40
+ var shortcode = {
41
+ key: [],
42
+ value: [],
43
+ };
44
+ var widget_type = $form.find('.berocket_aapf_widget_admin_widget_type_select').val();
45
+ $form.find('.berocket_aapf_widget_sc').each( function ( i, o ) {
46
+ if( $(o).data('sc_change') ) {
47
+ if ( $(o).is('[type=checkbox]') ) {
48
+ if( shortcode.key.indexOf( $(o).data('sc') ) == -1 ) {
49
+ shortcode.key.push($(o).data('sc'));
50
+ if ( $(o).prop('checked') ) {
51
+ shortcode.value.push($(o).val());
52
+ } else {
53
+ shortcode.value.push('');
54
+ }
55
+ } else {
56
+ index = shortcode.key.indexOf( $(o).data('sc') );
57
+ if ( $(o).prop('checked') ) {
58
+ if ( ! Array.isArray( shortcode.value[index] ) ) {
59
+ firstvalue = shortcode.value[index];
60
+ shortcode.value[index] = [];
61
+ if( firstvalue != '' ) {
62
+ shortcode.value[index].push(firstvalue);
63
+ }
64
+ }
65
+ shortcode.value[index].push($(o).val());
66
+ }
67
+ }
68
+ } else if ( $(o).is('[type=radio]') ) {
69
+ if ( $(o).prop('checked') ) {
70
+ shortcode.key.push($(o).data('sc'));
71
+ shortcode.value.push($(o).val());
72
+ }
73
+ } else {
74
+ if( shortcode.key.indexOf( $(o).data('sc') ) == -1 ) {
75
+ shortcode.key.push($(o).data('sc'));
76
+ shortcode.value.push($(o).val());
77
+ } else {
78
+ if( $(o).val() != '' ) {
79
+ index = shortcode.key.indexOf( $(o).data('sc') );
80
+ if ( ! Array.isArray( shortcode.value[index] ) ) {
81
+ firstvalue = shortcode.value[index];
82
+ shortcode.value[index] = [];
83
+ if( firstvalue != '' ) {
84
+ shortcode.value[index].push(firstvalue);
85
+ }
86
+ }
87
+ shortcode.value[index].push($(o).val());
88
+ }
89
+ }
90
+ }
91
+ }
92
+ });
93
+ if( widget_type == 'search_box' ) {
94
+ var search_box_count = $form.find('.br_search_box_count').val();
95
+ var search_box_style = {};
96
+ var search_box_style_exist = false;
97
+ $form.find('.berocket_aapf_style_sb_sc').each( function ( i, o ) {
98
+ if( $(o).data('sc_change') ) {
99
+ search_box_style[$(o).data('sc')] = $(o).val();
100
+ search_box_style_exist = true;
101
+ }
102
+ });
103
+ if( search_box_style_exist ) {
104
+ shortcode.key.push('search_box_style');
105
+ shortcode.value.push(JSON.stringify(search_box_style));
106
+ }
107
+
108
+ var search_box_attributes = {};
109
+ var search_box_attributes_exist = false;
110
+ for( var i = 1; i <= search_box_count; i++ ) {
111
+ var $attribute_block = $form.find('.berocket_search_box_attribute_'+i);
112
+
113
+ var current_attr = {};
114
+ var current_attr_exist = false;
115
+ $attribute_block.find('.berocket_aapf_sb_attributes_sc').each( function ( i, o ) {
116
+ if( $(o).data('sc_change') ) {
117
+ current_attr[$(o).data('sc')] = $(o).val();
118
+ current_attr_exist = true;
119
+ }
120
+ });
121
+ if( current_attr_exist ) {
122
+ search_box_attributes[i] = current_attr;
123
+ search_box_attributes_exist = true;
124
+ }
125
+ }
126
+ if( search_box_attributes_exist ) {
127
+ shortcode.key.push('search_box_attributes');
128
+ shortcode.value.push(JSON.stringify(search_box_attributes));
129
+ }
130
+ }
131
+ var child_type = $form.find('.berocket_aapf_widget_child_parent_select').val();
132
+ if( widget_type == 'filter' && child_type == 'depth' ) {
133
+ var child_count = $form.find('.br_onew_child_count_select').val();
134
+
135
+ var child_onew_childs = {};
136
+ var child_onew_childs_exist = false;
137
+ for( var i = 1; i <= child_count; i++ ) {
138
+ var $child_block = $form.find('.child_onew_childs_'+i);
139
+
140
+ var current_child = {};
141
+ var current_child_exist = false;
142
+ $child_block.find('.berocket_aapf_childs_sc').each( function ( i, o ) {
143
+ if( $(o).data('sc_change') ) {
144
+ current_child[$(o).data('sc')] = $(o).val();
145
+ current_child_exist = true;
146
+ }
147
+ });
148
+ if( current_child_exist ) {
149
+ child_onew_childs[i] = current_child;
150
+ child_onew_childs_exist = true;
151
+ }
152
+ }
153
+ if( child_onew_childs_exist ) {
154
+ shortcode.key.push('child_onew_childs');
155
+ shortcode.value.push(JSON.stringify(child_onew_childs));
156
+ }
157
+ }
158
+ var br_filters = '[br_filters';
159
+ for( var i = 0; i < shortcode.key.length; i++ ) {
160
+ br_filters += ' '+shortcode.key[i]+'=\'';
161
+ if ( Array.isArray( shortcode.value[i] ) ) {
162
+ for( var j = 0; j < shortcode.value[i].length; j++ ) {
163
+ if ( j != 0 ) {
164
+ br_filters += '|';
165
+ }
166
+ br_filters += shortcode.value[i][j];
167
+ }
168
+ } else {
169
+ br_filters += shortcode.value[i];
170
+ }
171
+ br_filters += '\'';
172
+ }
173
+ br_filters += ']';
174
+ window.prompt('Shortcode',br_filters);
175
+ }
176
+
177
+ function berocket_aapf_show_hide($block, is_hide) {
178
+ if( is_hide ) {
179
+ $block.hide(0);
180
+ } else {
181
+ $block.show(0);
182
+ }
183
+ }
184
+ function berocket_aapf_hide_blocks ( $parent, args ) {
185
+ if( args.changed != undefined ) {
186
+ changed = args.changed;
187
+ } else {
188
+ changed = 'none';
189
+ }
190
+ product_cat_current = $('.berocket_aapf_product_sub_cat_current_input', $parent).prop('checked');
191
+ filter_type = $('.berocket_aapf_widget_admin_filter_type_select', $parent).val();
192
+ filter_type_data = $('.berocket_aapf_widget_admin_filter_type_select', $parent).find('option:selected').data();
193
+ attribute = $('.berocket_aapf_widget_admin_filter_type_attribute_select', $parent).val();
194
+ custom_taxonomy = $('.berocket_aapf_widget_admin_filter_type_custom_taxonomy_select', $parent).val();
195
+
196
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_filter_type_', $parent),
197
+ true );
198
+ if ( $('.berocket_aapf_widget_admin_filter_type_'+filter_type, $parent).hasClass('berocket_aapf_widget_admin_filter_type_'+filter_type) ) {
199
+ $('.berocket_aapf_widget_admin_filter_type_'+filter_type, $parent).show();
200
+ }
201
+ if( filter_type_data.sameas ) {
202
+ filter_type = filter_type_data.sameas;
203
+ if( filter_type_data.attribute ) {
204
+ if( filter_type_data.sameas == 'custom_taxonomy' ) {
205
+ custom_taxonomy = filter_type_data.attribute;
206
+ } else if( filter_type_data.sameas == 'attribute' ) {
207
+ attribute = filter_type_data.attribute;
208
+ }
209
+ }
210
+ }
211
+
212
+ if ( changed != 'type' && changed != 'child_parent' ) {
213
+ var select_options = '';
214
+ var select_options_variants = [];
215
+ if ( filter_type == 'tag' ) {
216
+ select_options_variants = berocket_admin_filter_types.tag;
217
+ } else if ( filter_type == 'product_cat' || ( filter_type == 'custom_taxonomy' && ( custom_taxonomy == 'product_tag' || custom_taxonomy == 'product_cat' ) ) ) {
218
+ select_options_variants = berocket_admin_filter_types.product_cat;
219
+ } else if ( filter_type == '_sale' || filter_type == '_stock_status' || filter_type == '_rating' ) {
220
+ select_options_variants = berocket_admin_filter_types.sale;
221
+ } else if ( filter_type == 'custom_taxonomy' ) {
222
+ select_options_variants = berocket_admin_filter_types.custom_taxonomy;
223
+ } else if ( filter_type == 'attribute' ) {
224
+ if ( attribute == 'price' ) {
225
+ select_options_variants = berocket_admin_filter_types.price;
226
+ } else {
227
+ select_options_variants = berocket_admin_filter_types.attribute;
228
+ }
229
+ } else if ( filter_type == 'filter_by' ) {
230
+ select_options_variants = berocket_admin_filter_types.filter_by;
231
+ }
232
+ select_options_variants.forEach(function(element) {
233
+ select_options = select_options + berocket_admin_filter_types_by_attr[element];
234
+ });
235
+ $('.berocket_aapf_widget_admin_type_select', $parent).html(select_options);
236
+ $('.berocket_aapf_widget_admin_type_select', $parent).data('sc_change', '1');
237
+ }
238
+ type = $('.berocket_aapf_widget_admin_type_select', $parent).val();
239
+ child_parent = $('.berocket_aapf_widget_child_parent_select', $parent).val();
240
+
241
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_operator_select', $parent).parent(),
242
+ ( ( filter_type == 'attribute'
243
+ && ( attribute == 'price' ) )
244
+ || type == 'slider'
245
+ || filter_type == 'date'
246
+ || filter_type == '_sale'
247
+ || filter_type == '_rating' ) );
248
+ berocket_aapf_show_hide( $('.br_aapf_child_parent_selector', $parent),
249
+ ( ( filter_type == 'attribute'
250
+ && attribute == 'price' )
251
+ || filter_type == 'product_cat'
252
+ || filter_type == '_stock_status'
253
+ || filter_type == 'tag'
254
+ || type == 'slider'
255
+ || filter_type == 'date'
256
+ || filter_type == '_sale'
257
+ || filter_type == '_rating' ) );
258
+ berocket_aapf_show_hide( $('.berocket_ranges_block', $parent),
259
+ ( filter_type != 'attribute'
260
+ || attribute != 'price'
261
+ || type != 'ranges' ) );
262
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_values_per_row', $parent).parent(),
263
+ ( ( filter_type == 'attribute'
264
+ && ( attribute == 'price' || attribute == 'product_cat' ) )
265
+ || type == 'slider'
266
+ || type == 'select'
267
+ || type == 'tag_cloud'
268
+ || filter_type == 'product_cat'
269
+ || filter_type == 'custom_taxonomy' && custom_taxonomy == 'product_cat' ) );
270
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_non_price_tag_cloud', $parent),
271
+ ( filter_type == 'date'
272
+ || ( filter_type != 'date'
273
+ && ( type == 'tag_cloud'
274
+ || type == 'slider' ) ) ) );
275
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_non_price_tag_cloud_select', $parent),
276
+ ( filter_type == 'date'
277
+ || ( filter_type != 'date'
278
+ && ( type == 'tag_cloud'
279
+ || type == 'slider'
280
+ || type == 'select' ) ) ) );
281
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_ranges_hide', $parent),
282
+ ( type == 'ranges' ) );
283
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_price_attribute', $parent),
284
+ ( filter_type != 'attribute'
285
+ || attribute != 'price'
286
+ || type != 'slider' ) );
287
+ berocket_aapf_show_hide( $('.berocket_aapf_advanced_color_pick_settings', $parent),
288
+ ( type != 'color' && type != 'image' ) );
289
+ berocket_aapf_show_hide( $('.berocket_aapf_product_sub_cat_current', $parent),
290
+ ( filter_type != 'product_cat' ) );
291
+ berocket_aapf_show_hide( $('.berocket_aapf_product_sub_cat_div', $parent),
292
+ ( filter_type != 'product_cat' || product_cat_current ) );
293
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_tag_cloud_block', $parent),
294
+ ( type != 'tag_cloud' ) );
295
+ berocket_aapf_show_hide( $('.berocket_aapf_icons_select_block', $parent),
296
+ ( type == 'select' ) );
297
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_child_parent_depth_block', $parent),
298
+ ( child_parent != 'child' ) );
299
+ berocket_aapf_show_hide( $('.berocket_aapf_widget_child_parent_one_widget', $parent),
300
+ ( child_parent != 'depth' ) );
301
+ berocket_aapf_show_hide( $('.berocket_aapf_order_values_by', $parent),
302
+ ( filter_type == '_stock_status'
303
+ || filter_type == 'attribute' && attribute == 'price'
304
+ || filter_type == 'date'
305
+ || filter_type == '_sale'
306
+ || filter_type == '_rating' ) );
307
+ berocket_aapf_show_hide( $('.berocket_aapf_order_values_type', $parent),
308
+ ( ( filter_type != 'attribute'
309
+ && filter_type != 'custom_taxonomy' )
310
+ || type == 'ranges')
311
+ && filter_type != 'tag'
312
+ && filter_type != '_rating' );
313
+ berocket_aapf_show_hide( $('.berocket_attributes_slider_data', $parent),
314
+ ! ( ( (filter_type == 'attribute' && attribute != 'price' )
315
+ || filter_type == 'custom_taxonomy' )
316
+ && type == 'slider' ) );
317
+ berocket_aapf_show_hide( $('.berocket_attributes_checkbox_radio_data', $parent),
318
+ ! ( ( filter_type == 'attribute' || filter_type == 'custom_taxonomy' )
319
+ && ( type == 'checkbox' || type == 'radio' || type == 'color' || type == 'image' ) ) );
320
+ berocket_aapf_show_hide( $('.berocket_attributes_number_style_data', $parent),
321
+ ! ( ( filter_type == 'attribute'
322
+ || filter_type == 'custom_taxonomy' )
323
+ && type == 'slider' ) );
324
+ berocket_aapf_show_hide( $('.br_type_select_block', $parent),
325
+ ( filter_type == 'date' ) );
326
+ berocket_aapf_show_hide( $('.berocket_options_for_select', $parent),
327
+ ( ( filter_type != 'attribute'
328
+ && filter_type != 'custom_taxonomy'
329
+ && filter_type != 'product_cat'
330
+ && filter_type != 'tag' )
331
+ || type != 'select' ) );
332
+ berocket_aapf_show_hide( $('.br_aapf_date_style_select', $parent),
333
+ ( filter_type != 'date' ) );
334
+ if ( type == 'color' || type == 'image' ) {
335
+ var tax_color_name;
336
+ if ( filter_type == 'attribute' ) {
337
+ tax_color_name = attribute;
338
+ } else if ( filter_type == 'custom_taxonomy' ) {
339
+ tax_color_name = custom_taxonomy;
340
+ } else if( filter_type == 'tag' ) {
341
+ tax_color_name = 'product_tag';
342
+ } else if( filter_type == 'product_cat' ) {
343
+ tax_color_name = 'product_cat';
344
+ }
345
+ var data = {
346
+ 'action': 'berocket_aapf_color_listener',
347
+ 'tax_color_name': tax_color_name,
348
+ 'type': type
349
+ };
350
+ $.post(ajaxurl, data, function(data) {
351
+ $('.berocket_widget_color_pick', $parent).html(data);
352
+ $('.berocket_aapf_advanced_color_pick_settings', $parent).show(0);
353
+ });
354
+ } else {
355
+ $('.berocket_widget_color_pick', $parent).text("");
356
+ }
357
+ if( args.changed == 'filter_type' || args.changed == 'attribute' || args.changed == 'custom_taxonomy' || args.changed == 'type' ) {
358
+ var taxonomy_name = false;
359
+ if( filter_type == 'product_cat' ) {
360
+ taxonomy_name = 'product_cat';
361
+ } else if( filter_type == 'tag' ) {
362
+ taxonomy_name = 'product_tag';
363
+ } else if( filter_type == 'attribute' && attribute != 'price' ) {
364
+ taxonomy_name = attribute;
365
+ } else if ( filter_type == 'custom_taxonomy' ) {
366
+ taxonomy_name = custom_taxonomy;
367
+ }
368
+ var exclude_include_name = $('.include_exclude_list', $parent).data('name');
369
+ if( taxonomy_name === false ) {
370
+ $('.include_exclude_list', $parent).text("");
371
+ $('.include_exclude_select', $parent).hide();
372
+ } else {
373
+ if( $('.include_exclude_list', $parent).length ) {
374
+ $('.include_exclude_select', $parent).show();
375
+ var data = {
376
+ 'action': 'br_include_exclude_list',
377
+ 'taxonomy_name': taxonomy_name,
378
+ };
379
+ $.post(ajaxurl, data, function(data) {
380
+ if( data ) {
381
+ var replace_str = /%field_name%/g;
382
+ data = data.replace(replace_str, exclude_include_name);
383
+ $('.include_exclude_list', $parent).html(data);
384
+ } else {
385
+ $('.include_exclude_list', $parent).text("");
386
+ }
387
+ });
388
+ }
389
+ }
390
+ } else {
391
+ $('.include_exclude_list', $parent).text("");
392
+ $('.include_exclude_select', $parent).hide();
393
+ }
394
+ brjsf($('.berocket_aapf_widget_admin_type_select', $parent));
395
+ }
396
+ $(document).on('change', '.berocket_aapf_widget_admin_filter_type_select', function () {
397
+ $parent = $(this).parents('.customize-control.customize-control-widget_form.widget-rendered');
398
+ if( $parent.length == 0 ) {
399
+ $parent = $(this).parents('form');
400
+ }
401
+ berocket_aapf_hide_blocks ( $parent, { changed:'filter_type' } );
402
+ });
403
+
404
+ $(document).on('change', '.berocket_aapf_widget_admin_filter_type_attribute_select', function () {
405
+ $parent = $(this).parents('.customize-control.customize-control-widget_form.widget-rendered');
406
+ if( $parent.length == 0 ) {
407
+ $parent = $(this).parents('form');
408
+ }
409
+ berocket_aapf_hide_blocks ( $parent, { changed:'attribute' } );
410
+ });
411
+
412
+ $(document).on('change', '.berocket_aapf_widget_admin_type_select', function () {
413
+ $parent = $(this).parents('.customize-control.customize-control-widget_form.widget-rendered');
414
+ if( $parent.length == 0 ) {
415
+ $parent = $(this).parents('form');
416
+ }
417
+ berocket_aapf_hide_blocks ( $parent, { changed:'type' } );
418
+ });
419
+
420
+ $(document).on('change', '.berocket_aapf_widget_admin_filter_type_custom_taxonomy_select', function () {
421
+ $parent = $(this).parents('.customize-control.customize-control-widget_form.widget-rendered');
422
+ if( $parent.length == 0 ) {
423
+ $parent = $(this).parents('form');
424
+ }
425
+ berocket_aapf_hide_blocks ( $parent, { changed:'custom_taxonomy' } );
426
+ });
427
+
428
+ $(document).on('change', '.berocket_aapf_widget_child_parent_select', function () {
429
+ $parent = $(this).parents('.customize-control.customize-control-widget_form.widget-rendered');
430
+ if( $parent.length == 0 ) {
431
+ $parent = $(this).parents('form');
432
+ }
433
+ berocket_aapf_hide_blocks ( $parent, { changed:'child_parent' } );
434
+ });
435
+
436
+ $(document).on('change', '.berocket_aapf_product_sub_cat_current_input', function () {
437
+ $parent = $(this).parents('.customize-control.customize-control-widget_form.widget-rendered');
438
+ if( $parent.length == 0 ) {
439
+ $parent = $(this).parents('form');
440
+ }
441
+ berocket_aapf_hide_blocks ( $parent, { changed:'product_cat_current' } );
442
+ });
443
+
444
+ $(document).on('change', '.berocket_aapf_checked_show_next', function () {
445
+ if($(this).find('input[type=checkbox]').attr('checked') == 'checked') {
446
+ $(this).next().show(0);
447
+ } else {
448
+ $(this).next().hide(0);
449
+ }
450
+ });
451
+
452
+ $(document).on('change', '.include_exclude_select select', function() {
453
+ if( $(this).val() ) {
454
+ $('.include_exclude_list').show();
455
+ } else {
456
+ $('.include_exclude_list').hide();
457
+ }
458
+ });
459
+
460
+ $(document).on('click', '.berocket_aapf_advanced_settings_pointer', function (event) {
461
+ event.preventDefault();
462
+ $next = $(this).parent().next();
463
+ if ( $next.is(':visible') ) {
464
+ $next.slideUp(300);
465
+ } else {
466
+ $next.slideDown(300);
467
+ }
468
+ });
469
+
470
+ $(document).on('click', '.berocket_aapf_output_limitations_pointer', function (event) {
471
+ event.preventDefault();
472
+ $next = $(this).parent().next();
473
+ if ( $next.is(':visible') ) {
474
+ $next.slideUp(300);
475
+ } else {
476
+ $next.slideDown(300);
477
+ }
478
+ });
479
+
480
+ $('.br_colorpicker_field').each(function (i,o){
481
+ if( typeof($(o).colpick) != 'undefined' ) {
482
+ $(o).css('backgroundColor', '#'+$(o).data('color'));
483
+ $(o).colpick({
484
+ layout: 'hex',
485
+ submit: 0,
486
+ color: '#'+$(o).data('color'),
487
+ onChange: function(hsb,hex,rgb,el,bySetColor) {
488
+ $(el).removeClass('colorpicker_removed');
489
+ $(el).css('backgroundColor', '#'+hex).next().val(hex).trigger('change');
490
+ }
491
+ })
492
+ }
493
+ });
494
+
495
+ $(document).on('click', '.theme_default', function (event) {
496
+ event.preventDefault();
497
+ $(this).prev().prev().css('backgroundColor', '#000000').colpickSetColor('#000000');
498
+ $(this).prev().val('');
499
+ });
500
+
501
+ $(document).on('click', '.all_theme_default', function (event) {
502
+ event.preventDefault();
503
+ $table = $(this).parents('table');
504
+ $table.find('.br_colorpicker_field').css('backgroundColor', '#000000').colpickSetColor('#000000');
505
+ $table.find('.br_colorpicker_field').next().val('');
506
+ $table.find('select').val("");
507
+ $table.find('input[type=text]').val("");
508
+ });
509
+
510
+ $('.filter_settings_tabs').on('click', 'a', function (event) {
511
+ if( ! $(this).is('.link-tab') ) {
512
+ event.preventDefault();
513
+ $('#br_opened_tab').val( $(this).attr('href').replace('#', '') );
514
+ $id = $(this).attr('href');
515
+ $('.tab-item.current').removeClass('current');
516
+ $($id).addClass('current');
517
+
518
+ $('.filter_settings_tabs .nav-tab').removeClass('nav-tab-active');
519
+ $(this).addClass('nav-tab-active');
520
+ }
521
+ });
522
+
523
+ $(document).on('change', '.berocket_aapf_widget_admin_widget_type_select', function () {
524
+ $parent = $(this).parents('form');
525
+ if ( $(this).val() == 'filter' ) {
526
+ $('.berocket_aapf_admin_filter_widget_content', $parent).show();
527
+ $('.berocket_aapf_admin_widget_selected_area', $parent).hide();
528
+ $('.berocket_aapf_admin_search_box', $parent).hide();
529
+ $('.berocket_product_category_value_limit, .berocket_widget_output_limitation_block', $parent).show();
530
+ $('.berocket_widget_reset_button_block', $parent).hide();
531
+ } else if( $(this).val() == 'update_button' ) {
532
+ $('.berocket_aapf_admin_filter_widget_content', $parent).hide();
533
+ $('.berocket_aapf_admin_widget_selected_area', $parent).hide();
534
+ $('.berocket_aapf_admin_search_box', $parent).hide();
535
+ $('.berocket_product_category_value_limit, .berocket_widget_output_limitation_block', $parent).hide();
536
+ $('.berocket_widget_reset_button_block', $parent).hide();
537
+ } else if( $(this).val() == 'reset_button' ) {
538
+ $('.berocket_aapf_admin_filter_widget_content', $parent).hide();
539
+ $('.berocket_aapf_admin_widget_selected_area', $parent).hide();
540
+ $('.berocket_aapf_admin_search_box', $parent).hide();
541
+ $('.berocket_product_category_value_limit, .berocket_widget_output_limitation_block', $parent).hide();
542
+ $('.berocket_widget_reset_button_block', $parent).show();
543
+ } else if( $(this).val() == 'selected_area' ) {
544
+ $('.berocket_aapf_admin_filter_widget_content', $parent).hide();
545
+ $('.berocket_aapf_admin_search_box', $parent).hide();
546
+ $('.berocket_aapf_admin_widget_selected_area', $parent).show();
547
+ $('.berocket_product_category_value_limit, .berocket_widget_output_limitation_block', $parent).hide();
548
+ $('.berocket_widget_reset_button_block', $parent).hide();
549
+ } else if( $(this).val() == 'search_box' ) {
550
+ $('.berocket_aapf_admin_filter_widget_content', $parent).hide();
551
+ $('.berocket_aapf_admin_widget_selected_area', $parent).hide();
552
+ $('.berocket_aapf_admin_search_box', $parent).show();
553
+ $('.berocket_product_category_value_limit, .berocket_widget_output_limitation_block', $parent).hide();
554
+ $('.berocket_widget_reset_button_block', $parent).hide();
555
+ }
556
+ });
557
+ $(document).on('change', '.berocket_scroll_shop_top', function () {
558
+ if ( $(this).prop('checked') ) {
559
+ $(this).parent().next().show();
560
+ } else {
561
+ $(this).parent().next().hide();
562
+ }
563
+ });
564
+ $(document).on('click', '.berocket_aapf_font_awesome_icon_select',function(event) {
565
+ event.preventDefault();
566
+ $(this).next('.berocket_aapf_select_icon').show();
567
+ });
568
+ $(document).on('click', '.berocket_aapf_select_icon',function(event) {
569
+ event.preventDefault();
570
+ $(this).hide();
571
+ });
572
+ $(document).on('click', '.berocket_aapf_select_icon div p i.fa',function(event) {
573
+ event.preventDefault();
574
+ $(this).parents('.berocket_aapf_select_icon').hide();
575
+ });
576
+ $(document).on('click', '.berocket_aapf_select_icon div',function(event) {
577
+ event.preventDefault();
578
+ event.stopPropagation()
579
+ });
580
+ $(document).on('click', '.berocket_aapf_select_icon label',function(event) {
581
+ event.preventDefault();
582
+ $(this).parents('.berocket_aapf_select_icon').prevAll(".berocket_aapf_icon_text_value").val($(this).find('span').data('value'));
583
+ $(this).parents('.berocket_aapf_select_icon').prevAll(".berocket_aapf_selected_icon_show").html('<i class="fa '+$(this).find('span').data('value')+'"></i>');
584
+ $(this).parents('.berocket_aapf_select_icon').hide();
585
+ });
586
+ $(document).on('click', '.berocket_aapf_upload_icon', function(e) {
587
+ e.preventDefault();
588
+ $p = $(this);
589
+ var custom_uploader = wp.media({
590
+ title: 'Select custom Icon',
591
+ button: {
592
+ text: 'Set Icon'
593
+ },
594
+ multiple: false
595
+ }).on('select', function() {
596
+ var attachment = custom_uploader.state().get('selection').first().toJSON();
597
+ $p.prevAll(".berocket_aapf_selected_icon_show").html('<i class="fa"><image src="'+attachment.url+'" alt=""></i>');
598
+ $p.prevAll(".berocket_aapf_icon_text_value").val(attachment.url);
599
+ }).open();
600
+ });
601
+ $(document).on('click', '.berocket_aapf_remove_icon',function(event) {
602
+ event.preventDefault();
603
+ $(this).prevAll(".berocket_aapf_icon_text_value").val("");
604
+ $(this).prevAll(".berocket_aapf_selected_icon_show").html("");
605
+ });
606
+ br_widget_set();
607
+ $(document).on( 'change', '.br_theme_set_select', function(event) {
608
+ var $parent = $(this).parents('.br_checkbox_radio_settings');
609
+ var $data = $(this).find('option:selected').data();
610
+ var $color = '000000';
611
+ if( ! $data['border_color'] ) {
612
+ $color = '000000';
613
+ } else {
614
+ $color = $data['border_color'];
615
+ }
616
+ $parent.find('.br_border_color_set').prev().css('backgroundColor', '#' + $color).colpickSetColor('#' + $color);
617
+ $parent.find('.br_border_color_set').val( $data['border_color'] );
618
+ if( ! $data['font_color'] ) {
619
+ $color = '000000';
620
+ } else {
621
+ $color = $data['font_color'];
622
+ }
623
+ $parent.find('.br_font_color_set').prev().css('backgroundColor', '#' + $color).colpickSetColor('#' + $color);
624
+ $parent.find('.br_font_color_set').val( $data['font_color'] );
625
+ if( ! $data['background'] ) {
626
+ $color = '000000';
627
+ } else {
628
+ $color = $data['background'];
629
+ }
630
+ $parent.find('.br_background_set').prev().css('backgroundColor', '#' + $color).colpickSetColor('#' + $color);
631
+ $parent.find('.br_background_set').val( $data['background'] );
632
+ $parent.find('.br_border_width_set').val( $data['border_width'] );
633
+ $parent.find('.br_border_radius_set').val( $data['border_radius'] );
634
+ $parent.find('.br_size_set').val( $data['size'] );
635
+ $parent.find('.br_icon_set').val( $data['icon'] );
636
+ });
637
+ $(document).on( 'change', '.br_checkbox_radio_settings input, .br_checkbox_radio_settings select', function(event) {
638
+ if( ! $(this).is( '.br_theme_set_select' ) ) {
639
+ $(this).parents('.br_checkbox_radio_settings').find('.br_theme_set_select').val('');
640
+ }
641
+ });
642
+ $(document).on('click', '.berocket_remove_ranges',function(event) {
643
+ event.preventDefault();
644
+ $(this).parents('.berocket_ranges').remove();
645
+ });
646
+ $(document).on('change', '.br_onew_child_count_select', function() {
647
+ var child_count = $(this).val();
648
+ $('.child_onew_childs_settings').hide();
649
+ $parents = $(this).parents('.berocket_aapf_widget_child_parent_one_widget');
650
+ for( var i = 1; i <= child_count; i++, $parents ) {
651
+ $('.child_onew_childs_'+i).show();
652
+ }
653
+ });
654
+ $(document).on('change', '.br_search_box_count', function() {
655
+ var $parent = $(this).parents('.berocket_aapf_admin_search_box');
656
+ for(i = 1; i < 11; i++ ) {
657
+ if( i <= $(this).val() ) {
658
+ $parent.find('.berocket_search_box_attribute_'+i).show();
659
+ } else {
660
+ $parent.find('.berocket_search_box_attribute_'+i).hide();
661
+ }
662
+ }
663
+ });
664
+ $(document).on('change', '.br_search_box_attribute_type', function() {
665
+ var $parent = $(this).parents('.br_search_box_attribute_block');
666
+ $parent.find('.br_search_box_attribute_attribute_block').hide();
667
+ $parent.find('.br_search_box_attribute_custom_taxonomy_block').hide();
668
+ if( $(this).val() == 'attribute' ) {
669
+ $parent.find('.br_search_box_attribute_attribute_block').show();
670
+ } else if( $(this).val() == 'custom_taxonomy' ) {
671
+ $parent.find('.br_search_box_attribute_custom_taxonomy_block').show();
672
+ }
673
+ });
674
+ $(document).on('change', '.berocket_search_link_select', function() {
675
+ var $parent = $(this).parents('.berocket_aapf_admin_search_box');
676
+ $parent.find('.berocket_search_link').hide();
677
+ $parent.find('.berocket_search_link_'+$(this).val()).show();
678
+ });
679
+ $(document).on('change', '.berocket_attributes_number_style', function() {
680
+ var $parent = $(this).parents('.berocket_attributes_number_style_data');
681
+ if( $(this).prop('checked') ) {
682
+ $parent.find('.berocket_attributes_number_styles').show();
683
+ } else {
684
+ $parent.find('.berocket_attributes_number_styles').hide();
685
+ }
686
+ });
687
+ $(document).on('change', '.berocket_seo_friendly_urls', berocket_change_seo_friendly_urls);
688
+ $(document).on('change', '.berocket_nice_url', berocket_change_seo_friendly_urls);
689
+ $(document).on('change', '.berocket_seo_meta_title', berocket_change_seo_meta_title);
690
+ $(document).on('change', '.berocket_use_links_filters', berocket_change_use_links_filters);
691
+ berocket_change_seo_friendly_urls();
692
+ berocket_change_seo_meta_title();
693
+ berocket_change_use_links_filters();
694
+ })
695
+ })(jQuery);
696
+ function berocket_change_seo_friendly_urls() {
697
+ if( jQuery('.berocket_seo_friendly_urls').prop('checked') ) {
698
+ jQuery('.berocket_use_slug_in_url').parents('tr').first().show();
699
+ jQuery('.berocket_use_links_filters').parents('tr').first().show();
700
+ jQuery('.berocket_nice_url').parents('tr').first().show();
701
+ jQuery('.berocket_uri_decode').parents('tr').first().show();
702
+ } else {
703
+ jQuery('.berocket_use_slug_in_url').prop('checked', false);
704
+ jQuery('.berocket_nice_url').prop('checked', false);
705
+ jQuery('.berocket_use_links_filters').prop('checked', false);
706
+ jQuery('.berocket_use_slug_in_url').parents('tr').first().hide();
707
+ jQuery('.berocket_use_links_filters').parents('tr').first().hide();
708
+ jQuery('.berocket_nice_url').parents('tr').first().hide();
709
+ jQuery('.berocket_uri_decode').parents('tr').first().hide();
710
+ }
711
+ if( jQuery('.berocket_seo_friendly_urls').prop('checked') && jQuery('.berocket_nice_url').prop('checked') ) {
712
+ jQuery('.berocket_canonicalization').parents('tr').first().show();
713
+ } else {
714
+ jQuery('.berocket_canonicalization').prop('checked', false);
715
+ jQuery('.berocket_canonicalization').parents('tr').first().hide();
716
+ }
717
+ }
718
+ function berocket_change_seo_meta_title() {
719
+ if( jQuery('.berocket_seo_meta_title').prop('checked') ) {
720
+ jQuery('.berocket_seo_meta_title_elements').show();
721
+ } else {
722
+ jQuery('.berocket_seo_meta_title_elements').hide();
723
+ }
724
+ }
725
+ function berocket_change_use_links_filters() {
726
+ if( jQuery('.berocket_use_links_filters').prop('checked') ) {
727
+ jQuery('.berocket_use_noindex').show();
728
+ jQuery('.berocket_use_nofollow').show();
729
+ } else {
730
+ jQuery('.berocket_use_noindex').hide();
731
+ jQuery('.berocket_use_nofollow').hide();
732
+ }
733
+ }
734
+ var br_widget_setted = false;
735
+ function br_widget_set() {
736
+ if ( br_widget_setted !== false ) {
737
+ clearTimeout( br_widget_setted );
738
+ }
739
+ br_widget_setted = setTimeout( function () {
740
+ if( typeof(brjsf) != 'undefined' && jQuery.isFunction(brjsf) && jQuery.isFunction(brjsf_accordion) ) {
741
+ brjsf(jQuery( ".br_select_menu_left" ));
742
+ brjsf(jQuery( ".br_select_menu_right" ));
743
+ brjsf_accordion(jQuery( ".br_accordion" ));
744
+ jQuery('.berocket_aapf_widget_admin_widget_type_select').parents('.editwidget').first().css('width', 'initial');
745
+ } else {
746
+ br_widget_set();
747
+ }
748
+ br_widget_setted = false;
749
+ }, 400);
750
+ }
751
+ var br_saved_timeout;
752
+ var br_savin_ajax = false;
753
+ (function ($){
754
+ $(document).ready( function () {
755
+ $(document).on('click', '.br_aapf_settings_fa .berocket_upload_image', function(e) {
756
+ e.preventDefault();
757
+ $p = $(this);
758
+ var custom_uploader = wp.media({
759
+ title: 'Select custom Icon',
760
+ button: {
761
+ text: 'Set Icon'
762
+ },
763
+ multiple: false
764
+ }).on('select', function() {
765
+ var attachment = custom_uploader.state().get('selection').first().toJSON();
766
+ $p.prevAll(".berocket_selected_image").html('<image src="'+attachment.url+'" alt="">');
767
+ $p.prevAll(".berocket_image_value").val(attachment.url);
768
+ }).open();
769
+ });
770
+ $(document).on('click', '.br_aapf_settings_fa .berocket_remove_image',function(event) {
771
+ event.preventDefault();
772
+ $(this).prevAll(".berocket_image_value").val("");
773
+ $(this).prevAll(".berocket_selected_image").html("");
774
+ });
775
+ var berocket_fa_select_for = $('.berocket_fa_dark');
776
+ $(document).on('click', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_select_fa',function(event) {
777
+ event.preventDefault();
778
+ berocket_fa_select_for = $(this);
779
+ $('.berocket_fa_dark').not(':first').remove();
780
+ var $html = $('<div class="berocket_select_fontawesome"></div>');
781
+ $html.append($('.berocket_fa_dark'));
782
+ var $html2 = $('<div class="br_aapf_settings_fa"></div>');
783
+ $html2.append($html);
784
+ $('body').children('.br_aapf_settings_fa').remove();
785
+ $('body').append($html2);
786
+ $('.berocket_fa_dark').show();
787
+ });
788
+ $(document).on('hover', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_fa_hover', function() {
789
+ var window_width = $(window).width();
790
+ window_width = window_width / 2;
791
+ var $this = $(this).parents('.berocket_fa_icon');
792
+ if( $this.offset().left < window_width ) {
793
+ $this.find('.berocket_fa_preview').css({left: '0', right: 'initial'});
794
+ $this.find('.berocket_fa_preview span').appendTo($this.find('.berocket_fa_preview'));
795
+ } else {
796
+ $this.find('.berocket_fa_preview').css({left: 'initial', right: '0'});
797
+ $this.find('.berocket_fa_preview .fa').appendTo($this.find('.berocket_fa_preview'));
798
+ }
799
+ });
800
+ $(document).on('click', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_fa_hover',function(event) {
801
+ event.preventDefault();
802
+ var value = $(this).parents('.berocket_fa_icon').first().find('.berocket_fa_preview span').text();
803
+ $(berocket_fa_select_for).parents('.berocket_select_fontawesome').find('.berocket_fa_value').val(value);
804
+ $(berocket_fa_select_for).parents('.berocket_select_fontawesome').find('.berocket_selected_fa').html('<i class="fa '+value+'"></i>');
805
+ $('.berocket_fa_dark').hide();
806
+ });
807
+ $(document).on('click', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_remove_fa',function(event) {
808
+ event.preventDefault();
809
+ $(this).parents('.berocket_select_fontawesome').find('.berocket_fa_value').val('');
810
+ $(this).parents('.berocket_select_fontawesome').find('.berocket_selected_fa').html('');
811
+ });
812
+ $(document).on('keyup', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_fa_search', function() {
813
+ var $parent = $(this).parents('.berocket_select_fontawesome').first();
814
+ var value = $(this).val();
815
+ value = value.replace(/\s+/g, '');
816
+ value = value.toLowerCase();
817
+ if( value.length >=1 ) {
818
+ $parent.find('.berocket_fa_icon').hide();
819
+ $parent.find('.berocket_fa_preview span:contains("'+value+'")').parents('.berocket_fa_icon').show();
820
+ } else {
821
+ $parent.find('.berocket_fa_icon').show();
822
+ }
823
+ });
824
+ $(document).on('click', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_fa_dark',function(event) {
825
+ event.preventDefault();
826
+ $(this).hide();
827
+ });
828
+ $(document).on('click', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_fa_dark .berocket_fa_close',function(event) {
829
+ event.preventDefault();
830
+ $(this).parents('.berocket_fa_dark').hide();
831
+ });
832
+ $(document).on('click', '.br_aapf_settings_fa .berocket_select_fontawesome .berocket_fa_popup',function(event) {
833
+ event.preventDefault();
834
+ event.stopPropagation();
835
+ });
836
+ $(document).on('click', '.berocket_generate_new_filter_from_old', function(event) {
837
+ event.preventDefault();
838
+ var form_data = $(this).parents('form').first().serialize();
839
+ form_data = 'action=aapf_generate_new_filter&'+form_data;
840
+ $.post(ajaxurl, form_data, function (data) {
841
+ if( data != 'error' ) {
842
+ location.href = data;
843
+ }
844
+ });
845
+ });
846
+ jQuery('#widget-1_berocket_aapf_widget-__i__, #widget-2_berocket_aapf_widget-__i__, #widget-3_berocket_aapf_widget-__i__, #widget-4_berocket_aapf_widget-__i__, #widget-5_berocket_aapf_widget-__i__, #widget-6_berocket_aapf_widget-__i__, #widget-7_berocket_aapf_widget-__i__, #widget-8_berocket_aapf_widget-__i__').remove();
847
+ $(document).on('click', '.berocket_create_new', function(event) {
848
+ event.preventDefault();
849
+ var $this = $(this);
850
+ var data = $(this).data();
851
+ $.post(ajaxurl, data, function(html) {
852
+ var parent = $this.parents('form').first();
853
+ if( $this.parents('.widget').length ) {
854
+ parent = $this.parents('.widget').first();
855
+ }
856
+ parent.css('position', 'relative');
857
+ parent.append($(html));
858
+ berocket_add_submit_function_to_element();
859
+ });
860
+ });
861
+ function berocket_add_submit_function_to_element() {
862
+ $('.berocket_simple_filter_creation:not(.berocket_submit_event_added)').on('submit', function(event) {
863
+ event.preventDefault();
864
+ $this = $(this);
865
+ var form_data = $this.serialize();
866
+ $.post($this.attr('action'), form_data, function(result) {
867
+ if( typeof(window[$this.data('function')]) == 'function' ) {
868
+ window[$this.data('function')]($this, result);
869
+ }
870
+ }, 'json');
871
+ }).addClass('berocket_submit_event_added');
872
+ }
873
+ $(document).on('click', '.berocket_simple_filter_creation .berocket_simple_close', function(event) {
874
+ event.preventDefault();
875
+ $(this).parents('.berocket_simple_filter_creation').remove();
876
+ });
877
+ $(document).on('change', '.berocket_new_widget_selectbox', function() {
878
+ var edit = $(this).find('option:selected').data('edit');
879
+ if( typeof(edit) != 'undefined' && edit ) {
880
+ $(this).next('.berocket_aapf_edit_post_link').attr('href', edit).show();
881
+ } else {
882
+ $(this).next('.berocket_aapf_edit_post_link').hide();
883
+ }
884
+ });
885
+ });
886
+ })(jQuery);
887
+ function berocket_semple_creation_single_return($this, data) {
888
+ var $widget = $this.parent();
889
+ jQuery('.berocket_new_widget_selectbox.single').append('<option data-name="'+data.name2+'" data-edit="'+data.edit+'" value="'+data.value+'">'+data.name+'</option>');
890
+ $widget.find('.berocket_new_widget_selectbox.single').val(data.value).trigger('change');
891
+ $this.remove();
892
+ }
893
+ function berocket_semple_creation_group_return($this, data) {
894
+ var $widget = $this.parent();
895
+ jQuery('.berocket_new_widget_selectbox.group').append('<option data-edit="'+data.edit+'" value="'+data.value+'">'+data.name+'</option>');
896
+ $widget.find('.berocket_new_widget_selectbox.group').val(data.value).trigger('change');
897
+ $this.remove();
898
+ }
{js → assets/admin/js}/brjsf.js RENAMED
File without changes
assets/admin/js/javascript_hide.js ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var berocket_show_element_hooked_data = [];
2
+ function berocket_show_element_callback(show, element, data_string, init) {
3
+ if( show == "1" ) {
4
+ jQuery(element).show();
5
+ jQuery(element).find('input, select, textarea').prop('disabled', false);
6
+ } else {
7
+ jQuery(element).hide();
8
+ jQuery(element).find('input, select, textarea').prop('disabled', true);
9
+ }
10
+ jQuery(document).trigger('berocket_show_element_callback', show, element, data_string, init);
11
+ }
12
+ var braapf_test_interval = false;
13
+ var braapf_test_recount_it = 0;
14
+ function berocket_show_element(element, data_string, init, callback) {
15
+ braapf_test_recount_it++;
16
+ if( braapf_test_interval !== false ) {
17
+ clearTimeout(braapf_test_interval);
18
+ }
19
+ braapf_test_interval = setTimeout(function() {
20
+ console.log('Hide function called '+braapf_test_recount_it+' times');
21
+ braapf_test_recount_it = 0;
22
+ braapf_test_interval = false;
23
+ }, 500);
24
+ if( typeof(init) == 'undefined' ) {
25
+ init = true;
26
+ }
27
+ if( typeof(callback) != 'function' ) {
28
+ callback = berocket_show_element_callback;
29
+ }
30
+ $element = jQuery(element);
31
+ if( !$element.length ) {
32
+ return false;
33
+ }
34
+ berocket_show_element_hooked_data = [];
35
+ jQuery(element).data('show_element_data', data_string);
36
+ var show = berocket_check_data(element, data_string);
37
+ callback(show, element, data_string, init);
38
+ if( init ) {
39
+ function onlyUnique(value, index, self) {
40
+ return self.indexOf(value) === index;
41
+ }
42
+ berocket_show_element_hooked_data.filter( onlyUnique );
43
+ jQuery.each(berocket_show_element_hooked_data, function(i, selector) {
44
+ jQuery(document).on('change', selector, function() {
45
+ berocket_show_element(element, data_string, false, callback);
46
+ });
47
+ });
48
+ }
49
+ return show;
50
+ }
51
+ function berocket_check_data(element, data_string) {
52
+ var regexp_open = /\([#\w\-\.\s\|\&=!><"'{}\[\]]+\)/g;
53
+ while(regexp_open.exec(data_string) != null) {
54
+ data_string = data_string.replace(regexp_open, function(str) {
55
+ str = str.substr(1, str.length - 2);
56
+ str = berocket_check_data(element, str);
57
+ return str;
58
+ });
59
+ }
60
+ if( data_string.search(/\|\|/) != -1 ) {
61
+ var regexp_or = /[#\w\-\.\s\&=!><"'{}\[\]]+/g;
62
+ data_string = data_string.replace(regexp_or, function(str) {
63
+ str = berocket_check_data(element, str);
64
+ return str;
65
+ });
66
+ var splited_arr = data_string.split('||');
67
+ data_string = "0";
68
+ jQuery.each(splited_arr, function(key, value) {
69
+ value = value.trim()
70
+ if( value == "1" ) {
71
+ data_string = "1";
72
+ return false;
73
+ }
74
+ });
75
+ }
76
+ if( data_string.search(/&&/) != -1 ) {
77
+ var regexp_and = /[#\w\-\.\s=!><"'{}\[\]]+/g;
78
+ data_string = data_string.replace(regexp_and, function(str) {
79
+ str = berocket_check_data(element, str);
80
+ return str;
81
+ });
82
+ var splited_arr = data_string.split('&&');
83
+ data_string = "1";
84
+ jQuery.each(splited_arr, function(key, value) {
85
+ value = value.trim()
86
+ if( value == "0" ) {
87
+ data_string = "0";
88
+ return false;
89
+ }
90
+ });
91
+ }
92
+ var compares = ['==', '>=', '<=', '>', '<', '!='];
93
+ var compare = false;
94
+ var i = -1;
95
+ do {
96
+ i++;
97
+ } while(i < compares.length && data_string.search(compares[i]) == -1 );
98
+ if( i < compares.length ) {
99
+ compare = compares[i];
100
+ }
101
+ if( compare === false ) {
102
+ var splited_arr = [data_string];
103
+ } else {
104
+ var splited_arr = data_string.split(compare);
105
+ }
106
+
107
+ if( data_string == "0" || data_string == "1" ) {
108
+ return data_string;
109
+ }
110
+
111
+ jQuery.each(splited_arr, function(key, value) {
112
+ value = value.trim();
113
+ if( value.substr(0,1) == '{' && value.substr(-1,1) == '}' ) {
114
+ value = value.substr(1, value.length - 2);
115
+ value = berocket_get_element_by_selector(element, value);
116
+ } else if( (value.substr(0,1) == '"' && value.substr(-1,1) == '"') || (value.substr(0,1) == "'" && value.substr(-1,1) == "'") ) {
117
+ value = value.substr(1, value.length - 2);
118
+ } else if( value.substr(0,1) == '!' && value.substr(-1,1) == '!' ) {
119
+ value = value.substr(1, value.length - 2);
120
+ if( typeof(window[value]) == 'function' ) {
121
+ value = window[value](splited_arr, data_string);
122
+ } else {
123
+ value = false;
124
+ }
125
+ } else if(value.toLowerCase() == 'false') {
126
+ value = false;
127
+ } else if(value.toLowerCase() == 'true') {
128
+ value = true;
129
+ }
130
+ splited_arr[key] = value;
131
+ });
132
+ while(splited_arr.length < 2) {
133
+ splited_arr.push(true);
134
+ }
135
+ data_string = berocket_check_two_values(splited_arr[0], splited_arr[1], compare);
136
+
137
+ return data_string;
138
+ }
139
+ function berocket_get_element_by_selector(element, selector) {
140
+ var $element = jQuery(selector);
141
+ var result = [];
142
+ if( $element.length == 0 ) {
143
+ result.push(false);
144
+ } else {
145
+ berocket_show_element_hooked_data.push(selector);
146
+ $element.each( function() {
147
+ if( jQuery(this).is('[type=checkbox],[type=radio]') ) {
148
+ if( jQuery(this).prop('checked') ) {
149
+ result.push(jQuery(this).val());
150
+ }
151
+ } else {
152
+ result.push(jQuery(this).val());
153
+ }
154
+ });
155
+ }
156
+ return result;
157
+ }
158
+ function berocket_check_two_values(value1, value2, check) {
159
+ var to_num = false;
160
+ if( check == '>' || check == '<' || check == '<=' || check == '>=' ) {
161
+ to_num = true;
162
+ }
163
+ if( !Array.isArray(value1) ) {
164
+ value1 = [value1];
165
+ }
166
+ if( !Array.isArray(value2) ) {
167
+ value2 = [value2];
168
+ }
169
+ if( !value1.length ) {
170
+ value1 = [false];
171
+ }
172
+ if( !value2.length ) {
173
+ value2 = [false];
174
+ }
175
+ if( check == '!=' ) {
176
+ var isittrue = "1";
177
+ } else {
178
+ var isittrue = "0";
179
+ }
180
+ jQuery.each(value1, function (key1, el1) {
181
+ jQuery.each(value2, function (key2, el2) {
182
+ if( to_num ) {
183
+ if(
184
+ (check == '>' && parseFloat(el1) > parseFloat(el2))
185
+ || (check == '<' && parseFloat(el1) < parseFloat(el2))
186
+ || (check == '>=' && parseFloat(el1) >= parseFloat(el2))
187
+ || (check == '<=' && parseFloat(el1) <= parseFloat(el2))
188
+ ) {
189
+ isittrue = "1";
190
+ return false;
191
+ }
192
+ } else if( check == '!=' ) {
193
+ if( el1 == el2 && el1 !== "0" && el2 !== "0" ) {
194
+ isittrue = "0";
195
+ return false;
196
+ }
197
+ } else {
198
+ if( el1 == el2 && el1 !== "0" && el2 !== "0" ) {
199
+ isittrue = "1";
200
+ return false;
201
+ }
202
+ }
203
+ });
204
+ if( (check == '!=' && isittrue == "0") || (check != '!=' && isittrue == "1") ) {
205
+ return false;
206
+ }
207
+ });
208
+ return isittrue;
209
+ }
210
+ /* How to use berocket_show_element function to hide element
211
+ * Parameters:
212
+ * @ selector - Element that must be visible only with some condition
213
+ * @ condition - string with condition that describe when it must be visible
214
+ *
215
+ * Condition format:
216
+ * EXAMPLE: "({input[name=checkbox1]} == true || {input[name=checkbox2]} == true) && ({input[name=text1]} == 'show' || {select[name=select1]} == 'show')"
217
+ *
218
+ * {selector} - get value(uses jQuery.val() function) from element(uses jQuery(selector) to get elements), can be used with multiple elements
219
+ * !function_name! - call global function and use value that it is return for compare. Can return: true, false, string, [string, string]
220
+ * true - if element exist and checked(for radio/checkbox) and has value that is not empty string
221
+ * false - if element do not exist or not checked(for radio/checkbox) or has value as empty string
222
+ * "VALUE" or 'VALUE' - search element with value VALUE that is checked(for radio/checkbox)
223
+ *
224
+ * operators:
225
+ * == - TRUE if at least one element value is equal to one value from another element. work with all type of content
226
+ * != - TRU if all elements value are not equal to all value from another elements. work with all type of content
227
+ * >, >=, <, <= - compare elements value with another elements value(uses function parseFloat() to convert values). Do not work with true and false
228
+ *
229
+ *
230
+ * USE EXAMPLE
231
+ berocket_show_element('.test2', '{.test1 input} == true');
232
+ berocket_show_element('.test3', '{.test1 input} == true && {.test2 input} == "2"');
233
+ berocket_show_element('.test4', '{.test1 input} == true && ({.test2 input} == "3" || {.test2 input} == "1") && ({.test3 input} == false || {.test2 input} != "2")');
234
+ */
assets/admin/js/single_filter_edit.js ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var braapf_all_sameas_custom_taxonomy,
2
+ braapf_all_sameas_attribute,
3
+ braapf_current_attribute,
4
+ braapf_current_template_styles,
5
+ braapf_current_specific_styles,
6
+ braapf_current_template,
7
+ braapf_current_specific,
8
+ braapf_any_style_checked,
9
+ braapf_get_style_checked,
10
+ braapf_get_current_taxonomy_name,
11
+ braapf_load_color_image_pick,
12
+ braapf_current_taxonomy_hierarchical,
13
+ braapf_any_widget_selected,
14
+ braapf_disable_height_control,
15
+ braapf_hide_child_attributes_select,
16
+ braapf_price_range_changes,
17
+ braapf_price_symbol_before_price,
18
+ braapf_checked_style_parent;
19
+ (function ($){
20
+ function braapf_sbs_numeric_set() {
21
+ $('.berocket_sbs .brsbs_numeric:visible').each(function(i, elem) {
22
+ $(this).text(i+1);
23
+ });
24
+ }
25
+ function braapf_all_sameas_get(sameas) {
26
+ var elements = [];
27
+ $('#braapf_filter_type').find('option[data-sameas="'+sameas+'"]').each(function(){
28
+ elements.push($(this).val());
29
+ });
30
+ return elements;
31
+ }
32
+ braapf_all_sameas_custom_taxonomy = function () {
33
+ return braapf_all_sameas_get('custom_taxonomy');
34
+ }
35
+ braapf_all_sameas_attribute = function () {
36
+ return braapf_all_sameas_get('attribute');
37
+ }
38
+ braapf_current_attribute = function () {
39
+ berocket_show_element_hooked_data.push('#braapf_attribute');
40
+ berocket_show_element_hooked_data.push('#braapf_custom_taxonomy');
41
+ berocket_show_element_hooked_data.push('#braapf_filter_type');
42
+ var result = "";
43
+ var filter_type = $('#braapf_filter_type option:selected');
44
+ if( filter_type.val() == filter_type.data('sameas') ) {
45
+ if( $('#braapf_'+filter_type.data('sameas')).length ) {
46
+ result = $('#braapf_'+filter_type.data('sameas')).val();
47
+ }
48
+ } else {
49
+ if( typeof(filter_type.data('attribute')) != 'undefined' ) {
50
+ result = filter_type.data('attribute');
51
+ }
52
+ }
53
+ return result;
54
+ }
55
+ braapf_current_template_styles = function () {
56
+ berocket_show_element_hooked_data.push('#braapf_attribute');
57
+ berocket_show_element_hooked_data.push('#braapf_custom_taxonomy');
58
+ berocket_show_element_hooked_data.push('#braapf_filter_type');
59
+ berocket_show_element_hooked_data.push('.braapf_widget_type input[type=radio]');
60
+ if( $('.braapf_widget_type input[type=radio]:checked').val() == 'filter' ) {
61
+ var templates = $('#braapf_filter_type option:selected').data('templates');
62
+ } else {
63
+ var templates = $('.braapf_widget_type input[type=radio]:checked').data('templates');
64
+ }
65
+ if( typeof(templates) == 'undefined' || ! templates ) {
66
+ templates = "";
67
+ }
68
+ return templates;
69
+ }
70
+ braapf_current_specific_styles = function () {
71
+ berocket_show_element_hooked_data.push('#braapf_attribute');
72
+ berocket_show_element_hooked_data.push('#braapf_custom_taxonomy');
73
+ berocket_show_element_hooked_data.push('#braapf_filter_type');
74
+ if( $('.braapf_widget_type input[type=radio]:checked').val() == 'filter' ) {
75
+ var specific = jQuery('#braapf_filter_type option:selected').data('specific');
76
+ } else {
77
+ var specific = $('.braapf_widget_type input[type=radio]:checked').data('specific');
78
+ }
79
+ if( typeof(specific) == 'undefined' || ! specific ) {
80
+ specific = "";
81
+ }
82
+ return specific;
83
+ }
84
+ braapf_current_template = function() {
85
+ berocket_show_element_hooked_data.push('.braapf_style input[name="br_product_filter[style]"]');
86
+ var template = "";
87
+ var current_style = $('.braapf_style input[name="br_product_filter[style]"]:enabled:checked');
88
+ if( current_style.length ) {
89
+ template = current_style.data('template');
90
+ }
91
+ return template;
92
+ }
93
+ braapf_current_specific = function() {
94
+ berocket_show_element_hooked_data.push('.braapf_style input[name="br_product_filter[style]"]');
95
+ var specific = "";
96
+ var current_style = $('.braapf_style input[name="br_product_filter[style]"]:enabled:checked');
97
+ if( current_style.length && current_style.data('specific') ) {
98
+ specific = current_style.data('specific');
99
+ }
100
+ return specific;
101
+ }
102
+ braapf_any_style_checked = function() {
103
+ berocket_show_element_hooked_data.push('.braapf_style input[name="br_product_filter[style]"]');
104
+ berocket_show_element_hooked_data.push('.braapf_widget_type input[type=radio]');
105
+ berocket_show_element_hooked_data.push('.brsbs_attribute_setup select');
106
+ return ($('.braapf_style input[type=radio]:enabled:checked + label:visible').length > 0);
107
+ }
108
+ braapf_get_style_checked = function() {
109
+ berocket_show_element_hooked_data.push('.braapf_style input[name="br_product_filter[style]"]');
110
+ if($('.braapf_style input[type=radio]:enabled:checked').length > 0) {
111
+ return $('.braapf_style input[type=radio]:enabled:checked').val();
112
+ }
113
+ return ($('.braapf_style input[type=radio]:enabled:checked').length > 0);
114
+ }
115
+ braapf_get_current_taxonomy_name = function() {
116
+ berocket_show_element_hooked_data.push('#braapf_attribute');
117
+ berocket_show_element_hooked_data.push('#braapf_custom_taxonomy');
118
+ berocket_show_element_hooked_data.push('#braapf_filter_type');
119
+ var taxonomy_name = false;
120
+ var filter_type = $('#braapf_filter_type option:selected');
121
+ if( filter_type.val() == filter_type.data('sameas') ) {
122
+ if( $('#braapf_'+filter_type.data('sameas')).length ) {
123
+ taxonomy_name = $('#braapf_'+filter_type.data('sameas')).val();
124
+ }
125
+ } else {
126
+ if( typeof(filter_type.data('attribute')) != 'undefined' ) {
127
+ taxonomy_name = filter_type.data('attribute');
128
+ }
129
+ }
130
+ return taxonomy_name;
131
+ }
132
+ braapf_load_color_image_pick = function() {
133
+ var taxonomy_name = braapf_get_current_taxonomy_name();
134
+ var specific = braapf_current_specific();
135
+ if ( specific == 'color' || specific == 'image' ) {
136
+ var data = {
137
+ 'action': 'berocket_aapf_color_listener',
138
+ 'tax_color_name': taxonomy_name,
139
+ 'type': specific
140
+ };
141
+ $.post(ajaxurl, data, function(data) {
142
+ $('.braapf_widget_color_pick').html(data);
143
+ });
144
+ return true;
145
+ } else {
146
+ $('.braapf_widget_color_pick').text("");
147
+ return false;
148
+ }
149
+ }
150
+ braapf_current_taxonomy_hierarchical = function () {
151
+ var taxonoy_name = braapf_get_current_taxonomy_name();
152
+ var hierarchical = false;
153
+ if( taxonoy_name != false && $('#braapf_custom_taxonomy option[value="'+taxonoy_name+'"]').data('hierarchical') ) {
154
+ hierarchical = true;
155
+ }
156
+ return hierarchical;
157
+ }
158
+ braapf_any_widget_selected = function () {
159
+ berocket_show_element_hooked_data.push('.braapf_widget_type input[type=radio]');
160
+ return ($('.braapf_widget_type input[type=radio]:checked').length > 0);
161
+ }
162
+ braapf_sort_styles = function(show, element, data_string, init) {
163
+ berocket_show_element_callback(show, element, data_string, init);
164
+ if( $('.braapf_widget_type input[type=radio]:checked').val() == 'filter' ) {
165
+ sort_styles = true;
166
+ var $element_single = $(element).first();
167
+ var style_template = $element_single.data('template');
168
+ var style_specific = $element_single.data('specific');
169
+
170
+ var templates = $('#braapf_filter_type option:selected').data('templates');
171
+ var position = $('#braapf_filter_type option:selected').data('positions');
172
+ if( ! Array.isArray(position) || ! Array.isArray(templates) ) {
173
+ position = 1000000;
174
+ } else {
175
+ if( templates.indexOf(style_template) != -1 ) {
176
+ var indexof_template = templates.indexOf(style_template);
177
+ if( typeof(position[indexof_template]) != 'undefined' ) {
178
+ position = position[indexof_template];
179
+ }
180
+ }
181
+ }
182
+ var specific = $('#braapf_filter_type option:selected').data('specific');
183
+ var spec_pos = $('#braapf_filter_type option:selected').data('spec_pos');
184
+ if( ! Array.isArray(specific) || ! Array.isArray(spec_pos) ) {
185
+ spec_pos = 9000;
186
+ } else {
187
+ if( specific.indexOf(style_specific) != -1 ) {
188
+ var indexof_specific = specific.indexOf(style_specific);
189
+ if( typeof(spec_pos[indexof_specific]) != 'undefined' ) {
190
+ spec_pos = spec_pos[indexof_specific];
191
+ }
192
+ }
193
+ }
194
+ $('.braapf_template_'+style_template+'_'+style_specific).css('order', (parseInt(position) + parseInt(spec_pos)));
195
+ $(element).each(function() {
196
+ var style_pos = $(this).data('sort_pos');
197
+ var sum_pos = parseInt(position) + parseInt(spec_pos) + parseInt(style_pos);
198
+ $(this).css('order', sum_pos);
199
+ });
200
+ }
201
+ braapf_checked_style_parent();
202
+ }
203
+ braapf_hide_child_attributes_select = function(show, element, data_string, init) {
204
+ berocket_show_element_callback(show, element, data_string, init);
205
+ if( braapf_current_template() == "select" ) {
206
+ if( $('#braapf_hide_child_attributes').val() == '1' ) {
207
+ $('#braapf_hide_child_attributes').val("2");
208
+ }
209
+ $('#braapf_hide_child_attributes').find('option[value="1"]').prop('disabled', true);
210
+ } else {
211
+ $('#braapf_hide_child_attributes').find('option[value="1"]').prop('disabled', false);
212
+ }
213
+ }
214
+ braapf_price_symbol_before_price = function(show, element, data_string, init) {
215
+ var changed = $('#braapf_text_before_price').data('price_changed');
216
+ if( typeof(changed) != 'undefined' ) {
217
+ if( show == '0' ) {
218
+ if( changed == 'yes' && $('#braapf_text_before_price').val() == '%cur_symbol%' ) {
219
+ $('#braapf_text_before_price').val('');
220
+ }
221
+ } else {
222
+ if( changed == 'no' && $('#braapf_text_before_price').val() == '' ) {
223
+ $('#braapf_text_before_price').val('%cur_symbol%');
224
+ }
225
+ }
226
+ }
227
+ if( show == '0' ) {
228
+ $('#braapf_text_before_price').data('price_changed', 'no');
229
+ } else {
230
+ $('#braapf_text_before_price').data('price_changed', 'yes');
231
+ }
232
+ }
233
+ braapf_price_range_changes = function(show, element, data_string, init) {
234
+ $('.braapf_style > div').each(function() {
235
+ if( show == '0' ) {
236
+ if( typeof($(this).data('image')) != 'undefined' && $(this).data('image') ) {
237
+ $(this).find('img').attr('src', $(this).data('image'));
238
+ }
239
+ if( typeof($(this).data('name')) != 'undefined' && $(this).data('name') ) {
240
+ $(this).find('h3').html($(this).data('name'));
241
+ }
242
+ } else {
243
+ if( typeof($(this).data('image_price')) != 'undefined' && $(this).data('image_price') ) {
244
+ $(this).find('img').attr('src', $(this).data('image_price'));
245
+ }
246
+ if( typeof($(this).data('name_price')) != 'undefined' && $(this).data('name_price') ) {
247
+ $(this).find('h3').html($(this).data('name_price'));
248
+ }
249
+ }
250
+ });
251
+ }
252
+ braapf_disable_height_control = function() {
253
+ return ['select', 'slider', 'new_slider', 'datepicker'];
254
+ }
255
+ braapf_filter_title_buttons_placeholder = function(show, element, data_string, init) {
256
+ berocket_show_element_callback(show, element, data_string, init);
257
+ if( show == '1') {
258
+ $('#braapf_filter_title').attr('placeholder', $('#braapf_filter_title').data('buttons'));
259
+ }
260
+ }
261
+ braapf_filter_title_filters_placeholder = function(show, element, data_string, init) {
262
+ berocket_show_element_callback(show, element, data_string, init);
263
+ if( show == '1') {
264
+ $('#braapf_filter_title').attr('placeholder', $('#braapf_filter_title').data('filters'));
265
+ }
266
+ }
267
+ /*EXPERIMENTAL STYLE*/
268
+ braapf_checked_style_parent = function() {
269
+ var parent_block = false;
270
+ if( $('.braapf_style input[name="br_product_filter[style]"]:checked').length ) {
271
+ parent_block = $('.braapf_style input[name="br_product_filter[style]"]:checked').closest('.braapf_style').parent();
272
+ }
273
+ if( $('.braapf_checked_style_parent').length ) {
274
+ if( $('.braapf_checked_style_parent').find('.braapf_style').length && (parent_block === false || ! $('.braapf_checked_style_parent').is(parent_block)) ) {
275
+ $('.braapf_checked_style_parent').find('.braapf_style').scrollLeft(0);
276
+ }
277
+ $('.braapf_checked_style_parent').removeClass('braapf_checked_style_parent');
278
+ }
279
+ if( $('.braapf_style input[name="br_product_filter[style]"]:checked').length ) {
280
+ var parent_block = $('.braapf_style input[name="br_product_filter[style]"]:checked').closest('.braapf_style').parent();
281
+ parent_block.addClass('braapf_checked_style_parent');
282
+ }
283
+ }
284
+ $(document).ready(function() {
285
+ braapf_sbs_numeric_set();
286
+ $(document).on('berocket_show_element_callback', braapf_sbs_numeric_set);
287
+ berocket_show_element('.brsbs_style', '!braapf_any_widget_selected! == true');
288
+ $(document).trigger('brsbs_style');
289
+ berocket_show_element('.brsbs_attribute_setup', '{.braapf_widget_type input[type=radio]} == "filter"');
290
+ berocket_show_element('.braapf_filter_title_label', '({.braapf_widget_type input[type=radio]} == "filter" || {.braapf_widget_type input[type=radio]} == "selected_area" || {.braapf_widget_type input[type=radio]} == "")', true, braapf_filter_title_filters_placeholder);
291
+ berocket_show_element('.braapf_filter_title_button', '({.braapf_widget_type input[type=radio]} == "update_button" || {.braapf_widget_type input[type=radio]} == "reset_button")', true, braapf_filter_title_buttons_placeholder);
292
+ berocket_show_element('.braapf_attribute', '{#braapf_filter_type} == "attribute"');
293
+ berocket_show_element('.braapf_custom_taxonomy', '{#braapf_filter_type} == "custom_taxonomy"');
294
+ berocket_show_element('.braapf_order_values_by, .braapf_order_values_type, .braapf_parent_product_cat', '{#braapf_filter_type} == !braapf_all_sameas_custom_taxonomy! || {#braapf_filter_type} == !braapf_all_sameas_attribute!');
295
+ //REQUIRED
296
+ berocket_show_element('.brsbs_required', '{.braapf_widget_type input[type=radio]} == "filter" && (({#braapf_filter_type} == "price" && (!braapf_current_template! == "select" || !braapf_current_template! == "checkbox")) || !braapf_current_specific! == "color" || !braapf_current_specific! == "image")');
297
+ berocket_show_element('.braapf_widget_color_pick', '!braapf_load_color_image_pick! == true');
298
+ //ADDITIONAL
299
+ berocket_show_element('.brsbs_additional', '!braapf_any_style_checked! == true');
300
+ berocket_show_element('.braapf_selected_area_show', '{.braapf_widget_type input[type=radio]} == "selected_area"');
301
+ //FOR ALL FILTERS
302
+ berocket_show_element('.braapf_widget_collapse', '{.braapf_widget_type input[type=radio]} == "filter" || {.braapf_widget_type input[type=radio]} == "selected_area"');
303
+ berocket_show_element('.braapf_widget_is_hide', '{#braapf_widget_collapse} != "" && ({.braapf_widget_type input[type=radio]} == "filter" || {.braapf_widget_type input[type=radio]} == "selected_area")');
304
+ berocket_show_element('.braapf_description', '{.braapf_widget_type input[type=radio]} == "filter" || {.braapf_widget_type input[type=radio]} == "selected_area"');
305
+ berocket_show_element('.braapf_height', '({.braapf_widget_type input[type=radio]} == "filter" && !braapf_current_template! != !braapf_disable_height_control!) || {.braapf_widget_type input[type=radio]} == "selected_area"');
306
+ berocket_show_element('.braapf_scroll_theme', '{#braapf_height} != "" && (({.braapf_widget_type input[type=radio]} == "filter" && !braapf_current_template! != !braapf_disable_height_control!) || {.braapf_widget_type input[type=radio]} == "selected_area")');
307
+ berocket_show_element('.braapf_icon_before_title, .braapf_icon_after_title', '{.braapf_widget_type input[type=radio]} == "filter" || {.braapf_widget_type input[type=radio]} == "selected_area"');
308
+ berocket_show_element('.braapf_icon_before_value, .braapf_icon_after_value', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_template! != "select" && ((!braapf_current_specific! != "color" && !braapf_current_specific! != "image") || {#braapf_use_value_with_color} != ""))');
309
+ berocket_show_element('.braapf_enable_slider_inputs', '{.braapf_widget_type input[type=radio]} == "filter" && !braapf_current_template! == "slider"');
310
+ //CHECKBOX
311
+ berocket_show_element('.braapf_hide_child_attributes', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_template! == "checkbox" || !braapf_current_template! == "select") && !braapf_current_taxonomy_hierarchical! == true', true, braapf_hide_child_attributes_select);
312
+ berocket_show_element('.braapf_single_selection', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_template! == "select" || !braapf_current_template! == "checkbox")');
313
+ berocket_show_element('.braapf_operator', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_template! == "select" || !braapf_current_template! == "checkbox") && {#braapf_single_selection} == false');
314
+ berocket_show_element('.braapf_select_first_element_text', '{.braapf_widget_type input[type=radio]} == "filter" && !braapf_current_template! == "select" && ({#braapf_single_selection} == true || {.braapf_style input[type=radio]} == "select2")');
315
+ berocket_show_element('.braapf_select_first_element_text_for_single', '{#braapf_single_selection} == true');
316
+ berocket_show_element('.braapf_select_first_element_text_for_multiple', '{#braapf_single_selection} == false');
317
+ berocket_show_element('.braapf_attribute_count, .braapf_attribute_count_show_hide', '{.braapf_widget_type input[type=radio]} == "filter" && !braapf_current_template! == "checkbox"');
318
+ //COLOR/IMAGE
319
+ berocket_show_element('.braapf_use_value_with_color, .braapf_color_image_block_size, .braapf_color_image_checked', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_specific! == "color" || !braapf_current_specific! == "image")');
320
+ berocket_show_element('.braapf_color_image_block_size_custom', '{#braapf_color_image_block_size} == "hxpx_wxpx"');
321
+ berocket_show_element('.braapf_color_image_checked_custom_css', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_specific! == "color" || !braapf_current_specific! == "image") && {#braapf_color_image_checked} == "brchecked_custom"');
322
+ //PRICE ATTRIBUTE
323
+ berocket_show_element('.braapf_price_values', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price" && (!braapf_current_template! == "slider" || !braapf_current_template! == "new_slider")');
324
+ berocket_show_element('.braapf_min_price, .braapf_max_price', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price" && {#braapf_price_values} == "" && (!braapf_current_template! == "slider" || !braapf_current_template! == "new_slider")');
325
+ berocket_show_element('.braapf_text_before_price, .braapf_text_after_price', '{.braapf_widget_type input[type=radio]} == "filter" && (!braapf_current_template! == "slider" || !braapf_current_template! == "new_slider")');
326
+ berocket_show_element('.braapf_number_style', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price"');
327
+ berocket_show_element('.braapf_number_style_elements', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price" && {#braapf_number_style} == true');
328
+ berocket_show_element('#braapf_text_after_price_info, #braapf_text_before_price_info', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price" && (!braapf_current_template! == "slider" || !braapf_current_template! == "new_slider")');
329
+ //RESET BUTTON
330
+ berocket_show_element('.braapf_reset_hide', '{.braapf_widget_type input[type=radio]} == "reset_button"');
331
+ //SAVE FILTERS
332
+ berocket_show_element('.brsbs_save', '!braapf_any_style_checked! == true');
333
+ //EXECUTE SOME SCRIPT
334
+ berocket_show_element('.brsbs_style', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price"', true, braapf_price_range_changes);
335
+ berocket_show_element('.brsbs_style', '{.braapf_widget_type input[type=radio]} == "filter" && {#braapf_filter_type} == "price" && (!braapf_current_template! == "slider" || !braapf_current_template! == "new_slider")', true, braapf_price_symbol_before_price);
336
+ /*EXPERIMENTAL STYLE*/
337
+ $(document).on('change', '.braapf_style input[name="br_product_filter[style]"]', function() {
338
+ if( ! $('#braapf_single_selection').data('was_select') && braapf_current_template() == 'select') {
339
+ $('#braapf_single_selection').prop('checked', true).trigger('change');
340
+ } else if( $('#braapf_single_selection').data('was_select') && braapf_current_template() != 'select' ) {
341
+ $('#braapf_single_selection').prop('checked', false).trigger('change');
342
+ }
343
+ $('#braapf_single_selection').data('was_select', braapf_current_template() == 'select');
344
+ });
345
+ $('#braapf_single_selection').data('was_select', braapf_current_template() == 'select');
346
+
347
+ $('#post').on('submit', function(event) {
348
+ if($('.braapf_widget_type input[type=radio]:enabled:checked').length == 0) {
349
+ $(document).trigger('braapf_error_select_widget_type');
350
+ event.preventDefault();
351
+ } else if($('.braapf_style input[name="br_product_filter[style]"]:enabled:checked').length == 0) {
352
+ $(document).trigger('braapf_error_select_style');
353
+ event.preventDefault();
354
+ }
355
+ });
356
+ $(window).on('scroll', function() {
357
+ if( $('#submitdiv').length ) {
358
+ var scrollTop = $(window).scrollTop();
359
+ var scrollBottom = scrollTop + $(window).height();
360
+ var submitTop = $('#submitdiv').offset().top;
361
+ var submitBottom = submitTop + $('#submitdiv').height();
362
+ if( scrollTop > submitTop || scrollBottom < submitBottom ) {
363
+ if( !$('.braapf_fixed_submit').length ) {
364
+ $('#submitdiv input[type=submit]').addClass('braapf_fixed_submit').appendTo('#post');
365
+ }
366
+ } else {
367
+ if( $('.braapf_fixed_submit').length ) {
368
+ $('input[type=submit].braapf_fixed_submit').removeClass('braapf_fixed_submit').appendTo('#submitdiv #publishing-action');
369
+ }
370
+ }
371
+ }
372
+ });
373
+ /*EXPERIMENTAL STYLE*/
374
+ function bapf_scroll_to_needed_styles() {
375
+ if( $(this).closest('.braapf_checked_style_parent').length == 0 ) {
376
+ braapf_checked_style_parent();
377
+ var top = $('.braapf_templates_list').offset().top - 100;
378
+ $('html, body').stop().animate({scrollTop:top}, 500, 'swing');
379
+ }
380
+ }
381
+ $(document).on('change', '.braapf_style input[name="br_product_filter[style]"]', bapf_scroll_to_needed_styles);
382
+ $(document).on('change', '.brsbs_widget_type input[name="br_product_filter[widget_type]"]', function() {
383
+ $(document).off('change', '.braapf_style input[name="br_product_filter[style]"]', bapf_scroll_to_needed_styles);
384
+ $('.braapf_style input[name="br_product_filter[style]"]').first().trigger('change');
385
+ $(document).on('change', '.braapf_style input[name="br_product_filter[style]"]', bapf_scroll_to_needed_styles);
386
+ });
387
+ braapf_checked_style_parent();
388
+ setTimeout(function() {
389
+ if( jQuery('.braapf_style > div input:checked').length ) {
390
+ var scroll_from_left = jQuery('.braapf_style > div input:checked + label').position().left +
391
+ jQuery('.braapf_style > div input:checked + label').width()/3 +
392
+ jQuery('.braapf_style > div input:checked + label').closest('.braapf_style').scrollLeft() -
393
+ jQuery('.braapf_style > div input:checked + label').closest('.braapf_style').width()/2;
394
+ jQuery('.braapf_style > div input:checked + label').closest('.braapf_style').stop().animate({scrollLeft:scroll_from_left}, 200, 'swing');
395
+ }
396
+ }, 550);
397
+ $('#braapf_filter_title').data('title', $('#title').val());
398
+ $('#title').on('keyup change', function() {
399
+ if( $('#braapf_filter_title').data('title') == $('#braapf_filter_title').val() ) {
400
+ $('#braapf_filter_title').val($('#title').val());
401
+ }
402
+ $('#braapf_filter_title').data('title', $('#title').val());
403
+ });
404
+ $('.brsbs_save input[type=submit]').click(function(){$(window).off("beforeunload.edit-post")});
405
+ });
406
+ })(jQuery);
{css/scrollbar → assets/frontend/css}/Scrollbar.min.css RENAMED
File without changes
assets/frontend/css/fullmain.min.css ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ .bapf_sfilter .bapf_button,.bapf_sfilter label{cursor:pointer;display:inline-block!important}.bapf_sfilter ul li{list-style:none!important;margin:0!important;padding:0!important;max-width:100%}.bapf_slidr_main.ui-widget-content,.berocket_filter_price_slider.ui-widget-content{background:#b0b5b9;border:0;border-radius:0;height:4px;padding:0}.bapf_slidr_main.ui-widget-content .ui-slider-range,.berocket_filter_price_slider.ui-widget-content .ui-slider-range{background:#000}.slide.default .bapf_slidr_main.ui-widget-content .ui-slider-range,.slide.default .berocket_filter_price_slider.ui-widget-content .ui-slider-range{background:#222}.slide.default .bapf_slidr_main.ui-widget-content,.slide.default .berocket_filter_price_slider.ui-widget-content{height:4px;border:1px solid #555;font-size:10px}.bapf_slidr_main.ui-widget-content .ui-slider-handle,.berocket_filter_price_slider.ui-widget-content .ui-slider-handle,.slide.default .bapf_slidr_main .ui-state-default,.slide.default .bapf_slidr_main .ui-widget-header .ui-state-default,.slide.default .bapf_slidr_main.ui-widget-content .ui-state-default,.slide.default .berocket_filter_price_slider .ui-state-default,.slide.default .berocket_filter_price_slider .ui-widget-header .ui-state-default,.slide.default .berocket_filter_price_slider.ui-widget-content .ui-state-default{background:#ddd;font-size:14px;width:1em;height:1em;border:1px solid #555;top:-6px;border-radius:2em}.berocket_aapf_widget li.slider div.slide{clear:both;height:auto;text-align:right;line-height:0}.bapf_slidr_jqrui .bapf_from,.ui-slider{text-align:left}.ui-slider{position:relative}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:pointer;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.bapf_slidr_main>a:last-child{margin-left:-12px}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.slide .ui-corner-all,.slide .ui-corner-bottom,.slide .ui-corner-br,.slide .ui-corner-right{border-bottom-right-radius:4px}.slide .ui-corner-all,.slide .ui-corner-bl,.slide .ui-corner-bottom,.slide .ui-corner-left{border-bottom-left-radius:4px}.slide .ui-corner-all,.slide .ui-corner-right,.slide .ui-corner-top,.slide .ui-corner-tr{border-top-right-radius:4px}.slide .ui-corner-all,.slide .ui-corner-left,.slide .ui-corner-tl,.slide .ui-corner-top{border-top-left-radius:4px}ul.berocket_aapf_widget li.slider>span{cursor:initial}ul.berocket_aapf_widget li.slider .bapf_slidr_main{cursor:pointer}.slide .ui-widget-content{background:#fff;border:1px solid #aaa;color:#222}.slide .ui-state-default,.slide .ui-widget-content .ui-state-default,.slide .ui-widget-header .ui-state-default{background:#e6e6e6;border:1px solid #d3d3d3;color:#555;font-weight:400}.ui-widget.ui-datepicker{font-size:14px;z-index:9000!important}.bapf_sfilter .ui-button,.bapf_sfilter .ui-state-default,.bapf_sfilter .ui-widget-content .ui-state-default,.bapf_sfilter .ui-widget-header .ui-state-default,.bapf_sfilter .ui-widget.ui-widget-content,html .bapf_sfilter .ui-button.ui-state-disabled:active,html .bapf_sfilter .ui-button.ui-state-disabled:hover{border:0}.bapf_slidr_jqrui .bapf_slidr_all:after{content:"";display:block;clear:both}.bapf_slidr_jqrui .bapf_slidr_main{margin-bottom:10px}.bapf_slidr_jqrui .bapf_from,.bapf_slidr_jqrui .bapf_to{width:49%;display:inline-block;margin-bottom:10px;vertical-align:middle}.bapf_slidr_jqrui .bapf_from input,.bapf_slidr_jqrui .bapf_to input{width:50%;vertical-align:middle;font-size:1em;padding:0;margin:0;line-height:1em}.bapf_slidr_jqrui .bapf_to{text-align:right}.bapf_sfilter{margin-bottom:20px}.berocket_single_filter_widget.berocket_inline_clickable,.berocket_single_filter_widget.berocket_inline_filters{float:left!important;padding-right:15px!important}.berocket_single_filter_widget.berocket_inline_filters{width:12.5%!important}#berocket-ajax-filters-sidebar .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div,.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div{border:2px solid #333!important;background-color:#333!important;color:#ccc!important;padding:5px 35px 5px 5px!important;border-radius:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div h3{margin:0!important;padding:0!important;font-size:inherit!important;color:inherit!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-title_div{border:2px solid #ccc!important;color:#000!important;background-color:#ccc!important;border-radius:5px 5px 0 0!important;padding-bottom:10px!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-wrapper{padding-bottom:0!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget{position:absolute!important;top:100%!important;width:100%!important;background-color:#fff!important;z-index:800!important;margin:0!important;border:2px solid #ccc!important;padding:5px!important;display:none}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget{z-index:900!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_left .berocket_aapf_widget{left:0!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_right .berocket_aapf_widget{right:0!important}.berocket_element_above_products{clear:both!important;overflow:visible!important}.berocket_single_filter_widget.bapf_mt_none{display:none!important}div.berocket_single_filter_widget div.berocket_aapf_widget-wrapper *{opacity:1}@media screen and (max-width:767px){.bapf_sngl_hd_mobile{display:none!important}}@media screen and (min-width:768px) and (max-width:1024px){.bapf_sngl_hd_tablet{display:none!important}}@media screen and (min-width:1025px){.bapf_sngl_hd_desktop{display:none!important}}.berocket_aapf_widget select{overflow:auto!important}.berocket_element_above_products_after{clear:both}ul.berocket_aapf_widget li>span>input+.berocket_label_widgets::before{margin-right:6px}.berocket_element_above_products_is_hide{overflow:visible!important}.berocket_element_above_products_is_hide:after{content:"";display:block;clear:both}.berocket_ajax_filters_sidebar_toggle,.berocket_element_above_products_is_hide_toggle{width:200px!important;display:inline-block;padding-left:25px;font-size:16px;position:relative;font-weight:600;outline:0!important}.berocket_element_above_products_is_hide.br_is_hidden{opacity:0;max-height:1px;position:relative}.berocket_element_above_products_is_hide_toggle{height:20px;margin:40px 0;color:#2a2a2a}body{transition:margin-left .2s}body.berocket_ajax_filters_sidebar_active{margin-left:200px}.berocket_ajax_filters_sidebar_toggle{height:26px;margin:40px 0;text-decoration:none!important;box-sizing:border-box!important}#berocket-ajax-filters-sidebar{display:block;position:fixed;top:0;left:-350px;bottom:0;width:350px;max-width:100%;background:#fff;transition:all .2s;z-index:100000;box-sizing:border-box;overflow:auto!important}#berocket-ajax-filters-sidebar-shadow{content:"";display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:99999;background:#000;opacity:.7}.admin-bar #berocket-ajax-filters-sidebar{top:32px}#berocket-ajax-filters-sidebar.active,#berocket-ajax-filters-sidebar.active+#berocket-ajax-filters-sidebar-shadow{left:0;display:block}#berocket-ajax-filters-sidebar .berocket_ajax_group_filter_title{padding:15px 88px 15px 15px!important;font-weight:500!important;font-size:24px!important;color:#333!important;border-bottom:1px solid #ccc!important}#berocket-ajax-filters-sidebar>div{padding:15px!important}#berocket-ajax-filters-sidebar .berocket_aapf_widget-title_div{color:#333!important;font-size:19px!important;font-weight:600!important}#berocket-ajax-filters-sidebar .berocket_aapf_widget,#berocket-ajax-filters-sidebar .berocket_aapf_widget li{margin:0!important}#berocket-ajax-filters-sidebar .berocket_aapf_widget .berocket_checkbox_color .berocket_label_widgets{margin:0 .6em .6em 0!important}#berocket-ajax-filters-sidebar-close{position:absolute!important;right:0!important;line-height:39px;padding:17px 15px 13px!important;font-family:Arial,serif!important;color:#a2a2a2}#berocket-ajax-filters-sidebar-close+*{margin-top:70px!important}#berocket-ajax-filters-sidebar-close+.berocket_ajax_group_filter_title{margin-top:0!important}@media screen and (max-width:782px){.admin-bar #berocket-ajax-filters-sidebar{top:46px}}@media screen and (max-width:600px){.admin-bar #berocket-ajax-filters-sidebar{top:0}}.berocket_aapf_widget-wrapper .slider:not(.flickity-enabled){overflow:initial;white-space:initial}.select2-container{z-index:999}.bapf_sfilter .bapf_body>ul{margin-left:0}.bapf_sfilter.bapf_vpr_1 .bapf_body ul,.bapf_sfilter.bapf_vpr_2 .bapf_body ul,.bapf_sfilter.bapf_vpr_3 .bapf_body ul,.bapf_sfilter.bapf_vpr_4 .bapf_body ul{display:flex;flex-wrap:wrap}.bapf_sfilter.bapf_vpr_1 .bapf_body ul>li,.bapf_sfilter.bapf_vpr_2 .bapf_body ul>li,.bapf_sfilter.bapf_vpr_3 .bapf_body ul>li,.bapf_sfilter.bapf_vpr_4 .bapf_body ul>li{white-space:nowrap}.bapf_sfilter.bapf_vpr_1 .bapf_body ul>li{flex-basis:100%}.bapf_sfilter.bapf_vpr_2 .bapf_body ul>li{flex-basis:50%}.bapf_sfilter.bapf_vpr_3 .bapf_body ul>li{flex-basis:33%}.bapf_sfilter.bapf_vpr_4 .bapf_body ul>li{flex-basis:25%}.bapf_sfilter.bapf_vpr_1 .bapf_body ul>li label,.bapf_sfilter.bapf_vpr_2 .bapf_body ul>li label,.bapf_sfilter.bapf_vpr_3 .bapf_body ul>li label,.bapf_sfilter.bapf_vpr_4 .bapf_body ul>li label{white-space:initial}.bapf_sfilter.bapf_fhide .bapf_body ul li.bapf_hide,.bapf_sfilter.bapf_fhide.bapf_filter_hide{display:none!important}.bapf_sfilter .bapf_hascolarr,.bapf_sfilter .bapf_hasdesc{position:relative;padding-right:25px}.bapf_sfilter .bapf_colaps_smb,.bapf_sfilter .bapf_desci{position:absolute;right:0;top:0}.bapf_sfilter .bapf_hasdesc .bapf_colaps_smb{right:25px}#berocket-ajax-filters-sidebar .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head,.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head{border:2px solid #333!important;background-color:#333!important;color:#ccc!important;padding:5px!important;border-radius:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_widget_has_description .berocket_aapf_widget-title_div{padding-right:55px!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-wrapper{padding-bottom:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head h3{margin:0;font-size:inherit!important;color:inherit!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter{position:relative!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter.bapf_ccolaps .bapf_head{border:2px solid #ccc!important;color:#000!important;background-color:#ccc!important;border-radius:5px 5px 0 0!important;padding-bottom:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_body{position:absolute!important;top:100%!important;width:100%!important;background-color:#fff!important;z-index:800!important;margin:0!important;border:2px solid #ccc!important;padding:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_left .bapf_sfilter.bapf_ccolaps .bapf_body{left:0!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_right .bapf_sfilter.bapf_ccolaps .bapf_body{right:0!important}@media screen and (max-width:767px){.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible{position:fixed!important;top:0!important;left:0!important;bottom:0!important;right:0!important;z-index:9000000000!important;background-color:#fff!important;overflow:auto!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget{border:0!important;width:100%!important;max-width:100%!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide{display:block!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-left:before,.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-right:before{content:"\f00d"!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_description{display:none!important}body .select2-container,body .ui-widget.ui-datepicker{z-index:9000000009!important}}@keyframes bapf_loader{from{transform:rotate(0)}to{transform:rotate(360deg)}}.bapf_loader_page{position:fixed;top:0;left:0;bottom:0;right:0;background-color:rgba(255,255,255,.5);z-index:9999}.bapf_loader_page .bapf_lcontainer{position:absolute;top:50%;margin:-20px 0 0 -20px;left:50%;width:30px;height:30px;padding:0}.bapf_lcontainer .bapf_loader{width:100%;height:100%;display:block;transform:rotate(0);animation:1s linear 0s infinite bapf_loader;position:relative}.bapf_lcontainer .bapf_loader .bapf_lfirst,.bapf_lcontainer .bapf_loader .bapf_lsecond{position:absolute;width:10px;height:10px;background:#000;background:linear-gradient(45deg,#000,transparent);display:block;border-radius:6px}.bapf_lcontainer .bapf_loader .bapf_lfirst{bottom:0;right:0}.bapf_lcontainer .bapf_loader .bapf_lsecond{top:0;left:0;transform:rotate(180deg)}.bapf_lcontainer .bapf_labove,.bapf_lcontainer .bapf_lbelow{position:absolute;display:block;text-align:center;width:80vw;left:calc(15px - 40vw)}.bapf_lcontainer .bapf_labove{bottom:120%}.bapf_lcontainer .bapf_lbelow{top:120%}.bapf_lcontainer .bapf_lafter,.bapf_lcontainer .bapf_lbefore{position:absolute;top:50%;margin-top:-15px;height:30px;line-height:30px;vertical-align:middle;white-space:nowrap}.bapf_lcontainer .bapf_lbefore{right:120%}.bapf_lcontainer .bapf_lafter{left:120%}.bapf_lcontainer .bapf_limg{width:100%;height:100%}.berocket_single_filter_widget .tippy-tooltip,.berocket_single_filter_widget .tippy-tooltip .tippy-content{font-size:1em}@media only screen and (max-device-width:767px){.bapf_hide_mobile{display:none!important}}.bapf_sfilter .bapf_button{font-size:1em}.bapf_sfilter .rightpcs{float:right}.bapf_sfilter .right2empcs{padding-left:10px}#bapf_footer_clrimg>div,#bapf_footer_count_before>div,#bapf_footer_description>div{z-index:999999999999!important}.bapf_sfilter.bapf_ckbox input[type=checkbox]{margin-right:5px}.bapf_sfilter.bapf_ckbox input[type=checkbox],.bapf_sfilter.bapf_ckbox label{vertical-align:middle}.select2-container--classic input[type=search],.select2-container--classic input[type=search]:focus{background-color:initial}.berocket_search_box_block{position:relative;padding:.5em}.berocket_search_box_block .berocket_search_box_background_all{position:relative;z-index:200}.berocket_search_box_block .berocket_search_box_background{z-index:100;position:absolute;top:0;bottom:0;left:0;right:0}.berocket_search_box_block select{min-width:100%}.berocket_search_box_button{cursor:pointer;display:block;text-align:center;padding:5px 0}.berocket_search_box_block .berocket_aapf_widget-wrapper ul{margin:0}.berocket_search_box_block .berocket_aapf_widget-wrapper{margin:1em 0}.bapf_sfilter.bapf_button_berocket .bapf_button{font-size:20px;padding:8px 30px;border:0;line-height:28px;font-weight:600;display:inline-block;color:#fff;text-transform:uppercase;text-align:center;text-decoration:none;background-color:#f16543}.bapf_sfilter.bapf_button_berocket .bapf_button:hover{background-color:#d94825}.bapf_sfilter.bapf_colorinline li{display:inline-block!important}.bapf_sfilter .bapf_clr_span,.bapf_sfilter .bapf_img_span{display:inline-block!important;position:relative;overflow:hidden;margin:5px;height:2em;width:2em;line-height:2em;border:2px solid #000;text-align:center;vertical-align:middle;color:#222!important;text-shadow:0 0 3px #FFF,1px 0 2px #FFF,0 1px 2px #FFF,-1px 0 2px #FFF,0 -1px 2px #FFF,1px 1px 2px #FFF,1px -1px 2px #FFF,-1px 1px 2px #FFF,-1px -1px 2px #FFF;-webkit-transition:all .2s ease-out .1s;-moz-transition:all .2s ease-out .1s;-o-transition:all .2s ease-out .1s;transition:all .2s ease-out .1s}.bapf_sfilter .bapf_clr_span.h1em,.bapf_sfilter .bapf_img_span.h1em{height:1em;line-height:1em}.bapf_sfilter .bapf_clr_span.h2em,.bapf_sfilter .bapf_img_span.h2em{height:2em;line-height:2em}.bapf_sfilter .bapf_clr_span.h3em,.bapf_sfilter .bapf_img_span.h3em{height:3em;line-height:3em}.bapf_sfilter .bapf_clr_span.h4em,.bapf_sfilter .bapf_img_span.h4em{height:4em;line-height:4em}.bapf_sfilter .bapf_clr_span.h5em,.bapf_sfilter .bapf_img_span.h5em{height:5em;line-height:5em}.bapf_sfilter .bapf_clr_span.w1em,.bapf_sfilter .bapf_img_span.w1em{width:1em}.bapf_sfilter .bapf_clr_span.w2em,.bapf_sfilter .bapf_img_span.w2em{width:2em}.bapf_sfilter .bapf_clr_span.w3em,.bapf_sfilter .bapf_img_span.w3em{width:3em}.bapf_sfilter .bapf_clr_span.w4em,.bapf_sfilter .bapf_img_span.w4em{width:4em}.bapf_sfilter .bapf_clr_span.w5em,.bapf_sfilter .bapf_img_span.w5em{width:5em}.bapf_sfilter .bapf_img_span.w1em.h1em .fa,.bapf_sfilter .bapf_img_span.w1em.h2em .fa,.bapf_sfilter .bapf_img_span.w1em.h3em .fa,.bapf_sfilter .bapf_img_span.w1em.h4em .fa,.bapf_sfilter .bapf_img_span.w1em.h5em .fa,.bapf_sfilter .bapf_img_span.w2em.h1em .fa,.bapf_sfilter .bapf_img_span.w3em.h1em .fa,.bapf_sfilter .bapf_img_span.w4em.h1em .fa,.bapf_sfilter .bapf_img_span.w5em.h1em .fa{font-size:.8em}.bapf_sfilter .bapf_img_span.w2em.h2em .fa,.bapf_sfilter .bapf_img_span.w2em.h3em .fa,.bapf_sfilter .bapf_img_span.w2em.h4em .fa,.bapf_sfilter .bapf_img_span.w2em.h5em .fa,.bapf_sfilter .bapf_img_span.w3em.h2em .fa,.bapf_sfilter .bapf_img_span.w4em.h2em .fa,.bapf_sfilter .bapf_img_span.w5em.h2em .fa{font-size:1.6em}.bapf_sfilter .bapf_img_span.w3em.h3em .fa,.bapf_sfilter .bapf_img_span.w3em.h4em .fa,.bapf_sfilter .bapf_img_span.w3em.h5em .fa,.bapf_sfilter .bapf_img_span.w4em.h3em .fa,.bapf_sfilter .bapf_img_span.w5em.h3em .fa{font-size:2.4em}.bapf_sfilter .bapf_img_span.w4em.h4em .fa,.bapf_sfilter .bapf_img_span.w4em.h5em .fa,.bapf_sfilter .bapf_img_span.w5em.h4em .fa{font-size:3.2em}.bapf_sfilter .bapf_img_span.w5em.h5em .fa{font-size:4em}.bapf_sfilter .bapf_clr_span .bapf_clr_span_abslt{position:relative;z-index:100}.bapf_sfilter.brchecked_default input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_default input:checked+label .bapf_img_span,.bapf_sfilter.brchecked_rotate input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_rotate input:checked+label .bapf_img_span{-webkit-transform:rotate(15deg);-moz-transform:rotate(15deg);-ms-transform:rotate(15deg);-o-transform:rotate(15deg);transform:rotate(15deg)}.bapf_sfilter.brchecked_scale input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_scale input:checked+label .bapf_img_span{transform:scale(1.1)}.bapf_sfilter.brchecked_image_shadow input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_shadow input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_shadow input:checked+label .bapf_img_span{box-shadow:0 0 1px 3px #88F}.bapf_sfilter.brchecked_image_shadow input:checked+label .bapf_img_span{-webkit-filter:drop-shadow(0 0 2px);-moz-filter:drop-shadow(0 0 2px);-o-filter:drop-shadow(0 0 2px);filter:drop-shadow(0 0 2px)}.bapf_sfilter.brchecked_hue_rotate input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_hue_rotate input:checked+label .bapf_img_span{-webkit-filter:hue-rotate(90deg);-moz-filter:hue-rotate(90deg);-o-filter:hue-rotate(90deg);filter:hue-rotate(90deg)}.bapf_sfilter .bapf_clr_multi{position:absolute;top:0;bottom:0;left:0;right:0;z-index:2;transform:rotateZ(45deg);padding:0;margin:-2em 0;box-sizing:border-box}.bapf_sfilter .bapf_clr_multi .bapf_clr_multi_singl{position:absolute;top:-50%;bottom:-50%;padding:0;margin:0;box-shadow:none;box-sizing:border-box;border:0}.bapf_sfilter .bapf_clr_multi_2 .bapf_clr_multi_singl,.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl{width:100%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_1{width:34%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_0,.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_2{width:83%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl{width:25%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_0,.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_3{width:75%}.bapf_sfilter .bapf_clr_multi .bapf_clr_multi_singl_0{left:-50%}.bapf_sfilter .bapf_clr_multi_2 .bapf_clr_multi_singl_1{left:50%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_1{left:33%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_1{left:25%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_2{left:67%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_2{left:50%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_3{left:75%}.bapf_sfilter.bapf_clr_txt_left .bapf_img_span{margin:5px 0 5px 10px}.bapf_sfilter.bapf_clr_txt_right .bapf_img_span{margin:5px 10px 5px 0}.bapf_sfilter.bapf_clr_txt_bottom .bapf_img_span,.bapf_sfilter.bapf_clr_txt_top .bapf_img_span{margin:5px 10px}.bapf_sfilter.bapf_colorinline.bapf_clr_txt_bottom li label,.bapf_sfilter.bapf_colorinline.bapf_clr_txt_top li label{display:inline-block!important;text-align:center}.bapf_sfilter.bapf_clr_txt_bottom .bapf_clr_text,.bapf_sfilter.bapf_clr_txt_top .bapf_clr_text{display:block;margin-right:10px;margin-left:10px}.bapf_colorinline .bapf_body li{text-align:center}.bapf_img_woborder.bapf_sfilter .bapf_img_span{border:none;overflow:visible}.bapf_asradio2 ul li input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;display:inline-block;vertical-align:middle;border:2px solid #555;width:15px;height:15px;outline:0;border-radius:10px;padding:2px;margin-right:5px}.bapf_asradio2 ul li input[type=checkbox]:checked{background:#555;background-clip:content-box}.bapf_slct select{width:100%;font-size:1em}.bapf_slct .select2 .select2-search__field{width:auto!important}.bapf_sfa_inline .berocket_aapf_widget_selected_area ul li{display:inline-block;margin-left:3px!important;margin-right:3px!important}.bapf_ckbox_square input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;display:inline-block;vertical-align:middle;border:2px solid #555;width:20px;height:20px;outline:0;padding:4px;margin-right:5px}.bapf_ckbox_square input[type=checkbox]:checked{background:#555;background-clip:content-box}.ui-datepicker .ui-icon,.ui-icon{text-indent:-99999px;background-repeat:no-repeat}/*! jQuery UI - v1.12.0 - 2016-07-28
2
+ * http://jqueryui.com
3
+ * Includes: core.css, datepicker.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=flick&cornerRadiusShadow=0px&offsetLeftShadow=-4px&offsetTopShadow=-4px&thicknessShadow=4px&opacityShadow=60&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=aaaaaa&opacityOverlay=80&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=eeeeee&iconColorError=ff0084&fcError=222222&borderColorError=ff0084&bgImgOpacityError=55&bgTextureError=flat&bgColorError=ffffff&iconColorHighlight=0073ea&fcHighlight=444444&borderColorHighlight=cccccc&bgImgOpacityHighlight=55&bgTextureHighlight=flat&bgColorHighlight=ffffff&iconColorActive=454545&fcActive=ff0084&borderColorActive=dddddd&bgImgOpacityActive=65&bgTextureActive=glass&bgColorActive=ffffff&iconColorHover=ffffff&fcHover=ffffff&borderColorHover=0073ea&bgImgOpacityHover=25&bgTextureHover=highlight_soft&bgColorHover=0073ea&iconColorDefault=666666&fcDefault=0073ea&borderColorDefault=dddddd&bgImgOpacityDefault=100&bgTextureDefault=highlight_soft&bgColorDefault=f6f6f6&iconColorContent=ff0084&fcContent=444444&borderColorContent=dddddd&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=0073ea&fcHeader=444444&borderColorHeader=dddddd&bgImgOpacityHeader=50&bgTextureHeader=highlight_soft&bgColorHeader=dddddd&cornerRadius=2px&fsDefault=1.1em&fwDefault=bold&ffDefault=Helvetica%2CArial%2Csans-serif
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.select2-container,.ui-icon{display:inline-block;vertical-align:middle}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{margin-top:-.25em;position:relative;overflow:hidden}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-multi .ui-datepicker-group,.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;overflow:hidden;left:.5em;top:.3em}.ui-widget{font-family:Helvetica,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Helvetica,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #ddd}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#444}.ui-widget-content a{color:#444}.ui-widget-header{border:1px solid #ddd;background:url(images/ui-bg_highlight-soft_50_dddddd_1x100.png) 50% 50% repeat-x #ddd;color:#444;font-weight:700}.ui-widget-header a{color:#444}.ui-button,.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,html .ui-button.ui-state-disabled:active,html .ui-button.ui-state-disabled:hover{border:1px solid #ddd;background:url(images/ui-bg_highlight-soft_100_f6f6f6_1x100.png) 50% 50% repeat-x #f6f6f6;font-weight:700;color:#0073ea}.ui-button,.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button{color:#0073ea;text-decoration:none}.ui-button:focus,.ui-button:hover,.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #0073ea;background:url(images/ui-bg_highlight-soft_25_0073ea_1x100.png) 50% 50% repeat-x #0073ea;font-weight:700;color:#fff}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,a.ui-button:focus,a.ui-button:hover{color:#fff;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px #5e9ed6}.ui-button.ui-state-active:hover,.ui-button:active,.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active{border:1px solid #ddd;background:url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x #fff;font-weight:700;color:#ff0084}.ui-icon-background,.ui-state-active .ui-icon-background{border:#ddd;background-color:#ff0084}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#ff0084;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #ccc;background:#fff;color:#444}.ui-state-checked{border:1px solid #ccc;background:#fff}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#444}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #ff0084;background:#fff;color:#222}.ui-state-error a,.ui-state-error-text,.ui-widget-content .ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error a,.ui-widget-header .ui-state-error-text{color:#222}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_ff0084_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_0073ea_256x240.png)}.ui-button .ui-icon{background-image:url(images/ui-icons_666666_256x240.png)}.ui-button:focus .ui-icon,.ui-button:hover .ui-icon,.ui-state-default .ui-icon,.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-button:active .ui-icon,.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-button .ui-state-highlight.ui-icon,.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_0073ea_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ff0084_256x240.png)}.ui-icon-blank{background-position:16px 16px}.mCSB_scrollTools .mCSB_buttonUp,.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-first,.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:2px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:2px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:2px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:2px}.ui-widget-overlay{background:#eee;opacity:.8;filter:Alpha(Opacity=80)}.ui-widget-shadow{-webkit-box-shadow:-4px -4px 4px #aaa;box-shadow:-4px -4px 4px #aaa}.select2-container{box-sizing:border-box;margin:0;position:relative}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:#fff;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;white-space:nowrap!important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline,.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:1px solid #000;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--above .select2-selection--single{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple,.select2-container--default.select2-container--open.select2-container--below .select2-selection--single{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:0 0;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:#fff}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top,#fff 50%,#eee 100%);background-image:-o-linear-gradient(top,#fff 50%,#eee 100%);background-image:linear-gradient(to bottom,#fff 50%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top,#eee 50%,#ccc 100%);background-image:-o-linear-gradient(top,#eee 50%,#ccc 100%);background-image:linear-gradient(to bottom,#eee 50%,#ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:4px 0 0 4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:0 0;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top,#fff 0,#eee 50%);background-image:-o-linear-gradient(top,#fff 0,#eee 50%);background-image:linear-gradient(to bottom,#fff 0,#eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top,#eee 50%,#fff 100%);background-image:-o-linear-gradient(top,#eee 50%,#fff 100%);background-image:linear-gradient(to bottom,#eee 50%,#fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}.mCustomScrollbar{-ms-touch-action:pinch-zoom;touch-action:pinch-zoom}.mCustomScrollbar.mCS_no_scrollbar,.mCustomScrollbar.mCS_touch_action{-ms-touch-action:auto;touch-action:auto}.mCustomScrollBox{position:relative;overflow:hidden;height:100%;max-width:100%;outline:0;direction:ltr}.mCSB_container{overflow:hidden;width:auto;height:auto}.mCSB_inside>.mCSB_container{margin-right:30px}.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container{margin-right:0;margin-left:30px}.mCS-dir-rtl>.mCSB_inside>.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{margin-left:0}.mCSB_scrollTools{position:absolute;width:16px;height:auto;left:auto;top:0;right:0;bottom:0;opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_outside+.mCSB_scrollTools{right:-26px}.mCS-dir-rtl>.mCSB_inside>.mCSB_scrollTools,.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{right:auto;left:0}.mCS-dir-rtl>.mCSB_outside+.mCSB_scrollTools{left:-26px}.mCSB_scrollTools .mCSB_draggerContainer{position:absolute;top:0;left:0;bottom:0;right:0;height:auto}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:20px 0}.mCSB_scrollTools .mCSB_draggerRail{width:2px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCSB_scrollTools .mCSB_dragger{cursor:pointer;width:100%;height:30px;z-index:1}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{position:relative;width:4px;height:100%;margin:0 auto;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;text-align:center}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:12px}.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:8px}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonUp{display:block;position:absolute;height:20px;width:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools .mCSB_buttonDown{bottom:0}.mCSB_horizontal.mCSB_inside>.mCSB_container{margin-right:0;margin-bottom:30px}.mCSB_horizontal.mCSB_outside>.mCSB_container{min-height:100%}.mCSB_horizontal>.mCSB_container.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal{width:auto;height:16px;top:auto;right:0;bottom:0;left:0}.mCustomScrollBox+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:-26px}.mCSB_scrollTools.mCSB_scrollTools_horizontal a+.mCSB_draggerContainer{margin:0 20px}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:2px;margin:7px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger{width:30px;height:100%;left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:4px;margin:6px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:12px;margin:2px auto}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:8px;margin:4px 0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft,.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{display:block;position:absolute;width:20px;height:100%;overflow:hidden;margin:0 auto;cursor:pointer}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonLeft{left:0}.mCSB_scrollTools.mCSB_scrollTools_horizontal .mCSB_buttonRight{right:0}.mCSB_container_wrapper{position:absolute;height:auto;width:auto;overflow:hidden;top:0;left:0;right:0;bottom:0;margin-right:30px;margin-bottom:30px}.mCSB_container_wrapper>.mCSB_container{padding-right:30px;padding-bottom:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:20px}.mCSB_vertical_horizontal>.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:20px}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden+.mCSB_scrollTools.mCSB_scrollTools_vertical{bottom:0}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools~.mCSB_scrollTools.mCSB_scrollTools_horizontal{right:0}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_scrollTools.mCSB_scrollTools_horizontal{left:20px}.mCS-dir-rtl>.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden+.mCSB_scrollTools~.mCSB_scrollTools.mCSB_scrollTools_horizontal{left:0}.mCS-dir-rtl>.mCSB_inside>.mCSB_container_wrapper{margin-right:0;margin-left:30px}.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden>.mCSB_container{padding-right:0}.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden>.mCSB_container{padding-bottom:0}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_y.mCS_y_hidden{margin-right:0;margin-left:0}.mCustomScrollBox.mCSB_vertical_horizontal.mCSB_inside>.mCSB_container_wrapper.mCS_no_scrollbar_x.mCS_x_hidden{margin-bottom:0}.mCSB_scrollTools,.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight,.mCSB_scrollTools .mCSB_buttonUp,.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerRail,.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger_bar{-webkit-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out;transition:width .2s ease-out .2s,height .2s ease-out .2s,margin-left .2s ease-out .2s,margin-right .2s ease-out .2s,margin-top .2s ease-out .2s,margin-bottom .2s ease-out .2s,opacity .2s ease-in-out,background-color .2s ease-in-out}.mCS-autoHide>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide>.mCustomScrollBox~.mCSB_scrollTools{opacity:0;filter:"alpha(opacity=0)";-ms-filter:"alpha(opacity=0)"}.mCS-autoHide:hover>.mCustomScrollBox>.mCSB_scrollTools,.mCS-autoHide:hover>.mCustomScrollBox~.mCSB_scrollTools,.mCustomScrollBox:hover>.mCSB_scrollTools,.mCustomScrollBox:hover~.mCSB_scrollTools,.mCustomScrollbar>.mCustomScrollBox>.mCSB_scrollTools.mCSB_scrollTools_onDrag,.mCustomScrollbar>.mCustomScrollBox~.mCSB_scrollTools.mCSB_scrollTools_onDrag{opacity:1;filter:"alpha(opacity=100)";-ms-filter:"alpha(opacity=100)"}.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.4);filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.75);filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85);filter:"alpha(opacity=85)";-ms-filter:"alpha(opacity=85)"}.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9);filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCSB_scrollTools .mCSB_buttonDown,.mCSB_scrollTools .mCSB_buttonLeft,.mCSB_scrollTools .mCSB_buttonRight,.mCSB_scrollTools .mCSB_buttonUp{background-image:url(mCSB_buttons.png);background-repeat:no-repeat;opacity:.4;filter:"alpha(opacity=40)";-ms-filter:"alpha(opacity=40)"}.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -20px}.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -40px}.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -56px}.mCSB_scrollTools .mCSB_buttonDown:hover,.mCSB_scrollTools .mCSB_buttonLeft:hover,.mCSB_scrollTools .mCSB_buttonRight:hover,.mCSB_scrollTools .mCSB_buttonUp:hover{opacity:.75;filter:"alpha(opacity=75)";-ms-filter:"alpha(opacity=75)"}.mCSB_scrollTools .mCSB_buttonDown:active,.mCSB_scrollTools .mCSB_buttonLeft:active,.mCSB_scrollTools .mCSB_buttonRight:active,.mCSB_scrollTools .mCSB_buttonUp:active{opacity:.9;filter:"alpha(opacity=90)";-ms-filter:"alpha(opacity=90)"}.mCS-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.15)}.mCS-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:rgba(0,0,0,.85)}.mCS-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:rgba(0,0,0,.9)}.mCS-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-light-2.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:4px;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:4px;margin:6px auto}.mCS-light-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85)}.mCS-light-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9)}.mCS-light-2.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px 0}.mCS-light-2.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -20px}.mCS-light-2.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -40px}.mCS-light-2.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -56px}.mCS-dark-2.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75);-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-2.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-2.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px 0}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -20px}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -40px}.mCS-dark-2.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -56px}.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail,.mCS-light-thick.mCSB_scrollTools .mCSB_draggerRail{width:4px;background-color:#fff;background-color:rgba(255,255,255,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;background-color:#fff;background-color:rgba(255,255,255,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:4px;margin:6px 0}.mCS-dark-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:6px;margin:5px auto}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85)}.mCS-light-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-light-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9)}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px 0}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -20px}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -40px}.mCS-light-thick.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -56px}.mCS-dark-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px 0}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -20px}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -40px}.mCS-dark-thick.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -56px}.mCS-light-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,.1)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px}.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%}.mCS-dark-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-thin.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:2px;margin:7px auto}.mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.15)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-thin.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px 0}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -20px}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -40px}.mCS-dark-thin.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -56px}.mCS-rounded.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,.15)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger,.mCS-rounded.mCSB_scrollTools .mCSB_dragger{height:14px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:14px;margin:0 1px}.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger{width:14px}.mCS-rounded-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:14px;margin:1px 0}.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{width:16px;height:16px;margin:-1px 0}.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:4px}.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded .mCSB_dragger_bar,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_dragger .mCSB_dragger_bar{height:16px;width:16px;margin:0 -1px}.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded-dark.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-rounded.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:4px;margin:6px 0}.mCS-rounded.mCSB_scrollTools .mCSB_buttonUp{background-position:0 -72px}.mCS-rounded.mCSB_scrollTools .mCSB_buttonDown{background-position:0 -92px}.mCS-rounded.mCSB_scrollTools .mCSB_buttonLeft{background-position:0 -112px}.mCS-rounded.mCSB_scrollTools .mCSB_buttonRight{background-position:0 -128px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.15)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-rounded-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-80px -72px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-80px -92px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-80px -112px}.mCS-rounded-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-80px -128px}.mCS-rounded-dots-dark.mCSB_scrollTools_vertical .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_vertical .mCSB_draggerRail{width:4px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail{background-color:transparent;background-position:center}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAANElEQVQYV2NkIAAYiVbw//9/Y6DiM1ANJoyMjGdBbLgJQAX/kU0DKgDLkaQAvxW4HEvQFwCRcxIJK1XznAAAAABJRU5ErkJggg==);background-repeat:repeat-y;opacity:.3;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-rounded-dots-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-rounded-dots.mCSB_scrollTools_horizontal .mCSB_draggerRail{height:4px;margin:6px 0;background-repeat:repeat-x}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonUp{background-position:-16px -72px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonDown{background-position:-16px -92px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonLeft{background-position:-20px -112px}.mCS-rounded-dots.mCSB_scrollTools .mCSB_buttonRight{background-position:-20px -128px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_draggerRail{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAALElEQVQYV2NkIAAYSVFgDFR8BqrBBEifBbGRTfiPZhpYjiQFBK3A6l6CvgAAE9kGCd1mvgEAAAAASUVORK5CYII=)}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-96px -72px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-96px -92px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-100px -112px}.mCS-rounded-dots-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-100px -128px}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-y;background-image:-moz-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(left,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{background-repeat:repeat-x;background-image:-moz-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(255,255,255,.5)),color-stop(100%,rgba(255,255,255,0)));background-image:-webkit-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-o-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:-ms-linear-gradient(top,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%);background-image:linear-gradient(to bottom,rgba(255,255,255,.5) 0,rgba(255,255,255,0) 100%)}.mCS-3d-dark.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-3d.mCSB_scrollTools_vertical .mCSB_dragger{height:70px}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger{width:70px}.mCS-3d-dark.mCSB_scrollTools,.mCS-3d.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{width:8px;background-color:#000;background-color:rgba(0,0,0,.2);box-shadow:inset 1px 0 1px rgba(0,0,0,.5),inset -1px 0 1px rgba(255,255,255,.2)}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#555}.mCS-3d-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:8px}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:8px;margin:4px 0;box-shadow:inset 0 1px 1px rgba(0,0,0,.5),inset 0 -1px 1px rgba(255,255,255,.2)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{width:100%;height:8px;margin:4px auto}.mCS-3d.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCS-3d.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-3d.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-3d.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1);box-shadow:inset 1px 0 1px rgba(0,0,0,.1)}.mCS-3d-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail{box-shadow:inset 0 1px 1px rgba(0,0,0,.1)}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-3d-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-3d-thick-dark.mCSB_scrollTools,.mCS-3d-thick.mCSB_scrollTools{opacity:1;filter:"alpha(opacity=30)";-ms-filter:"alpha(opacity=30)"}.mCS-3d-thick-dark.mCSB_scrollTools,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer,.mCS-3d-thick.mCSB_scrollTools,.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mCSB_inside+.mCS-3d-thick-dark.mCSB_scrollTools_vertical,.mCSB_inside+.mCS-3d-thick.mCSB_scrollTools_vertical{right:1px}.mCS-3d-thick-dark.mCSB_scrollTools_vertical,.mCS-3d-thick.mCSB_scrollTools_vertical{box-shadow:inset 1px 0 1px rgba(0,0,0,.1),inset 0 0 14px rgba(0,0,0,.5)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal,.mCS-3d-thick.mCSB_scrollTools_horizontal{bottom:1px;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),inset 0 0 14px rgba(0,0,0,.5)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;box-shadow:inset 1px 0 0 rgba(255,255,255,.4);width:12px;margin:2px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,.4);height:12px;width:auto}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerContainer{background-color:#000;background-color:rgba(0,0,0,.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,.1)}.mCS-3d-thick.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-3d-thick.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-3d-thick-dark.mCSB_scrollTools{box-shadow:inset 0 0 14px rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal{box-shadow:inset 0 1px 1px rgba(0,0,0,.1),inset 0 0 14px rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 1px 0 0 rgba(255,255,255,.4),inset -1px 0 0 rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -1px 0 rgba(0,0,0,.2)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#777}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerContainer{background-color:#fff;background-color:rgba(0,0,0,.05);box-shadow:inset 1px 1px 16px rgba(0,0,0,.1)}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-minimal-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-minimal.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-3d-thick-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset.mCSB_scrollTools .mCSB_buttonUp,.mCS-light-3.mCSB_scrollTools .mCSB_buttonUp{background-position:-32px -72px}.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical,.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical{right:0;margin:12px 0}.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools+.mCSB_scrollTools.mCSB_scrollTools_horizontal,.mCustomScrollBox.mCS-minimal-dark+.mCSB_scrollTools.mCSB_scrollTools_horizontal{bottom:0;margin:0 12px}.mCS-dir-rtl>.mCSB_outside+.mCS-minimal-dark.mCSB_scrollTools_vertical,.mCS-dir-rtl>.mCSB_outside+.mCS-minimal.mCSB_scrollTools_vertical{left:0;right:auto}.mCS-minimal-dark.mCSB_scrollTools_vertical .mCSB_dragger,.mCS-minimal.mCSB_scrollTools_vertical .mCSB_dragger{height:50px}.mCS-minimal-dark.mCSB_scrollTools_horizontal .mCSB_dragger,.mCS-minimal.mCSB_scrollTools_horizontal .mCSB_dragger{width:50px}.mCS-minimal.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-minimal.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.2);filter:"alpha(opacity=20)";-ms-filter:"alpha(opacity=20)"}.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-minimal-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.5);filter:"alpha(opacity=50)";-ms-filter:"alpha(opacity=50)"}.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools .mCSB_draggerRail{width:6px;background-color:#000;background-color:rgba(0,0,0,.2)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-light-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px}.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-light-3.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:6px;margin:5px 0}.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_vertical.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{width:12px}.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-dark-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_dragger.mCSB_dragger_onDrag_expanded+.mCSB_draggerRail,.mCS-light-3.mCSB_scrollTools_horizontal.mCSB_scrollTools_onDrag_expand .mCSB_draggerContainer:hover .mCSB_draggerRail{height:12px;margin:2px 0}.mCS-light-3.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-light-3.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-light-3.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-dark-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-dark-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-dark-3.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1)}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-dark-3.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset.mCSB_scrollTools .mCSB_draggerRail{width:12px;background-color:#000;background-color:rgba(0,0,0,.2)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:6px;margin:3px 5px;position:absolute;height:auto;top:0;bottom:0;left:0;right:0}.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar,.mCS-inset.mCSB_scrollTools_horizontal .mCSB_dragger .mCSB_dragger_bar{height:6px;margin:5px 3px;position:absolute;width:auto;top:0;bottom:0;left:0;right:0}.mCS-inset-2-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-3.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools_horizontal .mCSB_draggerRail,.mCS-inset.mCSB_scrollTools_horizontal .mCSB_draggerRail{width:100%;height:12px;margin:2px 0}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset.mCSB_scrollTools .mCSB_buttonDown{background-position:-32px -92px}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset.mCSB_scrollTools .mCSB_buttonLeft{background-position:-40px -112px}.mCS-inset-2.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset-3.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset.mCSB_scrollTools .mCSB_buttonRight{background-position:-40px -128px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-2-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.1)}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonUp,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonUp{background-position:-112px -72px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonDown,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonDown{background-position:-112px -92px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonLeft,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonLeft{background-position:-120px -112px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_buttonRight,.mCS-inset-dark.mCSB_scrollTools .mCSB_buttonRight{background-position:-120px -128px}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-inset-2.mCSB_scrollTools .mCSB_draggerRail{background-color:transparent;border-width:1px;border-style:solid;border-color:#fff;border-color:rgba(255,255,255,.2);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mCS-inset-2-dark.mCSB_scrollTools .mCSB_draggerRail{border-color:#000;border-color:rgba(0,0,0,.2)}.mCS-inset-3.mCSB_scrollTools .mCSB_draggerRail{background-color:#fff;background-color:rgba(255,255,255,.6)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_draggerRail{background-color:#000;background-color:rgba(0,0,0,.6)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.75)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.85)}.mCS-inset-3.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#000;background-color:rgba(0,0,0,.9)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.75)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.85)}.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar,.mCS-inset-3-dark.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar{background-color:#fff;background-color:rgba(255,255,255,.9)}.berocket_ajax_filters_toggle *{box-sizing:border-box!important}.berocket_ajax_filters_toggle:focus,.berocket_ajax_filters_toggle:hover{text-decoration:none}.berocket_ajax_filters_toggle.active i,.berocket_ajax_filters_toggle.active i:after,.berocket_ajax_filters_toggle.active i:before,.berocket_ajax_filters_toggle:hover i,.berocket_ajax_filters_toggle:hover i:after,.berocket_ajax_filters_toggle:hover i:before{background:#2a2a2a}.berocket_ajax_filters_toggle:hover i:before{width:14px}.berocket_ajax_filters_toggle:hover i:after{width:11px}.berocket_ajax_filters_toggle.active i{background-color:transparent!important}.berocket_ajax_filters_toggle.active i:before{transform:rotate(45deg);width:17px;top:0}.berocket_ajax_filters_toggle.active i:after{transform:rotate(135deg);width:17px;top:0}.berocket_ajax_filters_toggle span{width:25px;height:25px;left:-10px}.berocket_ajax_filters_toggle span i,.berocket_ajax_filters_toggle span i:after,.berocket_ajax_filters_toggle span i:before{box-sizing:border-box!important;top:18px;width:17px;height:2px;background:#ababab;display:block;transition:all .2s;content:'';position:absolute;left:0}.berocket_ajax_filters_toggle span i:before{top:-6px}.berocket_ajax_filters_toggle span i:after{top:6px}.berocket_ajax_filters_toggle span b,.berocket_ajax_filters_toggle span s{position:absolute;display:block;top:0;left:0}.berocket_ajax_filters_toggle span b:after,.berocket_ajax_filters_toggle span b:before,.berocket_ajax_filters_toggle span s:after,.berocket_ajax_filters_toggle span s:before,.berocket_ajax_filters_toggle span:after,.berocket_ajax_filters_toggle span:before{content:'';display:block;position:absolute;top:0;left:0;z-index:100;box-sizing:border-box!important}.berocket_ajax_filters_toggle.icon-theme-2.active b:after,.berocket_ajax_filters_toggle.icon-theme-2.active b:before,.berocket_ajax_filters_toggle.icon-theme-3.active b,.berocket_ajax_filters_toggle.icon-theme-3.active b:after,.berocket_ajax_filters_toggle.icon-theme-3.active b:before,.berocket_ajax_filters_toggle.icon-theme-4.active b,.berocket_ajax_filters_toggle.icon-theme-4.active b:after,.berocket_ajax_filters_toggle.icon-theme-4.active b:before,.berocket_ajax_filters_toggle.icon-theme-5.active s,.berocket_ajax_filters_toggle.icon-theme-5.active s:after,.berocket_ajax_filters_toggle.icon-theme-5.active s:before,.berocket_ajax_filters_toggle.icon-theme-6.active s,.berocket_ajax_filters_toggle.icon-theme-6.active s:after,.berocket_ajax_filters_toggle.icon-theme-6.active s:before{display:none}.berocket_ajax_filters_toggle.icon-theme-1 span i{width:11px;left:4px}.berocket_ajax_filters_toggle.icon-theme-1 span i:after{width:3px;left:4px}.berocket_ajax_filters_toggle.icon-theme-1 span i:before{width:19px;left:-4px}.berocket_ajax_filters_toggle.icon-theme-1.active span i:before{transform:rotate(45deg);width:17px;top:0;left:-4px}.berocket_ajax_filters_toggle.icon-theme-1.active span i:after{transform:rotate(135deg);width:17px;bottom:0;left:-4px}.berocket_ajax_filters_toggle.icon-theme-2.active i:before,.berocket_ajax_filters_toggle.icon-theme-3.active i:before{transform:rotate(45deg)}.berocket_ajax_filters_toggle.icon-theme-2 span{margin-left:-3px}.berocket_ajax_filters_toggle.icon-theme-2 span,.berocket_ajax_filters_toggle.icon-theme-2 span:after,.berocket_ajax_filters_toggle.icon-theme-2 span:before{background:0 0!important}.berocket_ajax_filters_toggle.icon-theme-2 span i{top:18px;width:17px;height:0;background:0 0;z-index:20}.berocket_ajax_filters_toggle.icon-theme-2 span i:after,.berocket_ajax_filters_toggle.icon-theme-2 span i:before{height:2px;width:26px;background-color:#ababab;position:absolute;left:0}.berocket_ajax_filters_toggle.icon-theme-2 span i:before{top:-5px}.berocket_ajax_filters_toggle.icon-theme-2 span i:after{top:5px}.berocket_ajax_filters_toggle.icon-theme-2 span b{background-color:transparent;z-index:21;top:18px}.berocket_ajax_filters_toggle.icon-theme-2 span b:after,.berocket_ajax_filters_toggle.icon-theme-2 span b:before{height:10px;width:10px;border:2px solid #ababab;position:absolute;border-radius:50%;background-color:#fff}.berocket_ajax_filters_toggle.icon-theme-2 span b:before{top:-9px;left:2px}.berocket_ajax_filters_toggle.icon-theme-2 span b:after{top:1px;left:14px}.berocket_ajax_filters_toggle.icon-theme-2.active i:after,.berocket_ajax_filters_toggle.icon-theme-2.active i:before{width:17px;top:0;left:3px}.berocket_ajax_filters_toggle.icon-theme-2.active i:after{transform:rotate(135deg)}.berocket_ajax_filters_toggle.icon-theme-2:hover i:after,.berocket_ajax_filters_toggle.icon-theme-2:hover i:before{background-color:#2a2a2a}.berocket_ajax_filters_toggle.icon-theme-2:hover b:after,.berocket_ajax_filters_toggle.icon-theme-2:hover b:before{border-color:#2a2a2a}.berocket_ajax_filters_toggle.icon-theme-3 span{width:26px;margin-left:-3px}.berocket_ajax_filters_toggle.icon-theme-3 span,.berocket_ajax_filters_toggle.icon-theme-3 span:after,.berocket_ajax_filters_toggle.icon-theme-3 span:before{background:0 0!important}.berocket_ajax_filters_toggle.icon-theme-3 span i,.berocket_ajax_filters_toggle.icon-theme-3 span i:after,.berocket_ajax_filters_toggle.icon-theme-3 span i:before{width:100%;left:0}.berocket_ajax_filters_toggle.icon-theme-3 span i:before{top:-9px}.berocket_ajax_filters_toggle.icon-theme-3 span i:after{top:9px}.berocket_ajax_filters_toggle.icon-theme-3 span b{top:14px;left:2px}.berocket_ajax_filters_toggle.icon-theme-3 span b,.berocket_ajax_filters_toggle.icon-theme-3 span b:after,.berocket_ajax_filters_toggle.icon-theme-3 span b:before{height:10px;width:10px;border:2px solid #ababab;border-radius:50%;background-color:#fff}.berocket_ajax_filters_toggle.icon-theme-3 span b:after,.berocket_ajax_filters_toggle.icon-theme-3 span b:before{left:10px;position:absolute;content:'';top:7px}.berocket_ajax_filters_toggle.icon-theme-3 span b:after{top:-11px}.berocket_ajax_filters_toggle.icon-theme-3.active i{background-color:transparent}.berocket_ajax_filters_toggle.icon-theme-3.active i:after,.berocket_ajax_filters_toggle.icon-theme-3.active i:before{width:17px;top:0;left:3px}.berocket_ajax_filters_toggle.icon-theme-3.active i:after{transform:rotate(135deg)}.berocket_ajax_filters_toggle.icon-theme-4.active i:before,.berocket_ajax_filters_toggle.icon-theme-5.active b:before,.berocket_ajax_filters_toggle.icon-theme-6.active b:before,.irs--modern .irs-handle>i:nth-child(1){transform:rotate(45deg)}.berocket_ajax_filters_toggle.icon-theme-3:hover i,.berocket_ajax_filters_toggle.icon-theme-3:hover i:after,.berocket_ajax_filters_toggle.icon-theme-3:hover i:before{background-color:#2a2a2a}.berocket_ajax_filters_toggle.icon-theme-3:hover b,.berocket_ajax_filters_toggle.icon-theme-3:hover b:after,.berocket_ajax_filters_toggle.icon-theme-3:hover b:before{border-color:#2a2a2a}.berocket_ajax_filters_toggle.icon-theme-4 span{width:26px;margin-left:-3px}.berocket_ajax_filters_toggle.icon-theme-4 span,.berocket_ajax_filters_toggle.icon-theme-4 span:after,.berocket_ajax_filters_toggle.icon-theme-4 span:before{background:0 0!important}.berocket_ajax_filters_toggle.icon-theme-4 span i,.berocket_ajax_filters_toggle.icon-theme-4 span i:after,.berocket_ajax_filters_toggle.icon-theme-4 span i:before{width:100%;left:0}.berocket_ajax_filters_toggle.icon-theme-4 span i:before{top:-9px}.berocket_ajax_filters_toggle.icon-theme-4 span i:after{top:9px}.berocket_ajax_filters_toggle.icon-theme-4 span b{top:15px;left:16px}.berocket_ajax_filters_toggle.icon-theme-4 span b,.berocket_ajax_filters_toggle.icon-theme-4 span b:after,.berocket_ajax_filters_toggle.icon-theme-4 span b:before{height:8px;width:8px;border-radius:50%;border:4px solid #ababab;box-sizing:content-box;position:absolute}.berocket_ajax_filters_toggle.icon-theme-4 span b:before{content:'';top:-13px;left:-10px}.berocket_ajax_filters_toggle.icon-theme-4 span b:after{content:'';top:5px;left:-18px}.berocket_ajax_filters_toggle.icon-theme-4.active i{background-color:transparent}.berocket_ajax_filters_toggle.icon-theme-4:hover i,.berocket_ajax_filters_toggle.icon-theme-4:hover i:after,.berocket_ajax_filters_toggle.icon-theme-4:hover i:before,.berocket_ajax_filters_toggle.icon-theme-5:hover b,.berocket_ajax_filters_toggle.icon-theme-5:hover b:after,.berocket_ajax_filters_toggle.icon-theme-5:hover b:before,.berocket_ajax_filters_toggle.icon-theme-5:hover s,.berocket_ajax_filters_toggle.icon-theme-5:hover s:after,.berocket_ajax_filters_toggle.icon-theme-5:hover s:before{background-color:#2a2a2a}.berocket_ajax_filters_toggle.icon-theme-4.active i:after,.berocket_ajax_filters_toggle.icon-theme-4.active i:before{width:17px;top:0;left:3px}.berocket_ajax_filters_toggle.icon-theme-4.active i:after{transform:rotate(135deg)}.berocket_ajax_filters_toggle.icon-theme-4:hover b,.berocket_ajax_filters_toggle.icon-theme-4:hover b:after,.berocket_ajax_filters_toggle.icon-theme-4:hover b:before{border-color:#2a2a2a}.berocket_ajax_filters_toggle.icon-theme-4.theme-5 span b,.berocket_ajax_filters_toggle.icon-theme-4.theme-5 span b:after,.berocket_ajax_filters_toggle.icon-theme-4.theme-5 span b:before{border-color:#fff}.berocket_ajax_filters_toggle.icon-theme-5 span{margin-left:-3px}.berocket_ajax_filters_toggle.icon-theme-5 span,.berocket_ajax_filters_toggle.icon-theme-5 span i,.berocket_ajax_filters_toggle.icon-theme-5 span i:after,.berocket_ajax_filters_toggle.icon-theme-5 span i:before,.berocket_ajax_filters_toggle.icon-theme-5 span:after,.berocket_ajax_filters_toggle.icon-theme-5 span:before{background:0 0!important}.berocket_ajax_filters_toggle.icon-theme-5 span b,.berocket_ajax_filters_toggle.icon-theme-5 span b:after,.berocket_ajax_filters_toggle.icon-theme-5 span b:before,.berocket_ajax_filters_toggle.icon-theme-5 span s,.berocket_ajax_filters_toggle.icon-theme-5 span s:after,.berocket_ajax_filters_toggle.icon-theme-5 span s:before{border:2px solid #383b40;border-radius:50%;background-color:#fff;width:6px;height:6px;top:8px;bottom:auto}.berocket_ajax_filters_toggle.icon-theme-5 span b:before{left:7px;top:-2px}.berocket_ajax_filters_toggle.icon-theme-5 span b:after{left:17px;top:-2px}.berocket_ajax_filters_toggle.icon-theme-5 span s{left:4px;top:16px}.berocket_ajax_filters_toggle.icon-theme-5 span s:before{top:-2px;left:8px}.berocket_ajax_filters_toggle.icon-theme-5 span s:after{top:6px;left:3px}.berocket_ajax_filters_toggle.icon-theme-5.active b{border:transparent;background:0 0;left:4px}.berocket_ajax_filters_toggle.icon-theme-5.active b:after,.berocket_ajax_filters_toggle.icon-theme-5.active b:before{width:17px;top:10px;border:1px solid #2a2a2a;height:0;left:0;border-radius:0}.berocket_ajax_filters_toggle.icon-theme-5.active b:after{transform:rotate(135deg)}.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span b,.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span s{margin-top:1px}.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span b,.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span b:after,.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span b:before,.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span s,.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span s:after,.berocket_ajax_filters_toggle.icon-theme-5.theme-5 span s:before{border-color:#fff;background:0 0}.berocket_ajax_filters_toggle.icon-theme-5.theme-5.active span b{margin-top:0;border:transparent;background:0 0}.berocket_ajax_filters_toggle.icon-theme-6 span{margin-left:-3px}.berocket_ajax_filters_toggle.icon-theme-6 span,.berocket_ajax_filters_toggle.icon-theme-6 span i,.berocket_ajax_filters_toggle.icon-theme-6 span i:after,.berocket_ajax_filters_toggle.icon-theme-6 span i:before,.berocket_ajax_filters_toggle.icon-theme-6 span:after,.berocket_ajax_filters_toggle.icon-theme-6 span:before{background:0 0!important}.berocket_ajax_filters_toggle.icon-theme-6 span b,.berocket_ajax_filters_toggle.icon-theme-6 span b:after,.berocket_ajax_filters_toggle.icon-theme-6 span b:before,.berocket_ajax_filters_toggle.icon-theme-6 span s,.berocket_ajax_filters_toggle.icon-theme-6 span s:after,.berocket_ajax_filters_toggle.icon-theme-6 span s:before{border:3px solid #383b40;border-radius:50%;width:6px;height:6px;top:8px;bottom:auto}.berocket_ajax_filters_toggle.icon-theme-6 span b:before{left:6px;top:-3px}.berocket_ajax_filters_toggle.icon-theme-6 span b:after{left:16px;top:-3px}.berocket_ajax_filters_toggle.icon-theme-6 span s{left:4px;top:16px}.berocket_ajax_filters_toggle.icon-theme-6 span s:before{top:-3px;left:7px}.berocket_ajax_filters_toggle.icon-theme-6 span s:after{top:5px;left:2px}.berocket_ajax_filters_toggle.icon-theme-6:hover b,.berocket_ajax_filters_toggle.icon-theme-6:hover b:after,.berocket_ajax_filters_toggle.icon-theme-6:hover b:before,.berocket_ajax_filters_toggle.icon-theme-6:hover s,.berocket_ajax_filters_toggle.icon-theme-6:hover s:after,.berocket_ajax_filters_toggle.icon-theme-6:hover s:before{background-color:#fff}.berocket_ajax_filters_toggle.icon-theme-6.active b{border:transparent;background:0 0;left:4px}.berocket_ajax_filters_toggle.icon-theme-6.active b:after,.berocket_ajax_filters_toggle.icon-theme-6.active b:before{width:17px;top:10px;border:1px solid #2a2a2a;height:0;left:0;border-radius:0}.berocket_ajax_filters_toggle.theme-1 span,.berocket_ajax_filters_toggle.theme-2 span{left:-10px}.berocket_ajax_filters_toggle.icon-theme-6.active b:after{transform:rotate(135deg)}.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span b,.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span s{margin-top:1px}.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span b,.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span b:after,.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span b:before,.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span s,.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span s:after,.berocket_ajax_filters_toggle.icon-theme-6.theme-5 span s:before{border-color:#fff}.berocket_ajax_filters_toggle.icon-theme-6.theme-5.active span b{margin-top:0;border:transparent;background:0 0}.berocket_ajax_filters_toggle.theme-1,.berocket_ajax_filters_toggle.theme-2{background:#fff;border:1px solid #ebebeb;padding:1px 0;height:40px;line-height:32px;text-align:center;font-weight:400}.berocket_ajax_filters_toggle,.berocket_ajax_filters_toggle:focus,.berocket_ajax_filters_toggle:hover{text-decoration:none}.berocket_ajax_filters_toggle,.berocket_ajax_filters_toggle *{box-sizing:border-box!important}.berocket_ajax_filters_toggle span{position:relative;display:inline-block;z-index:20}.berocket_ajax_filters_toggle.theme-2{box-shadow:0 0 6px 0 #dedede}.berocket_ajax_filters_toggle.theme-1 span i,.berocket_ajax_filters_toggle.theme-1 span i:after,.berocket_ajax_filters_toggle.theme-1 span i:before,.berocket_ajax_filters_toggle.theme-1.active i,.berocket_ajax_filters_toggle.theme-1.active i:after,.berocket_ajax_filters_toggle.theme-1.active i:before,.berocket_ajax_filters_toggle.theme-1:hover i,.berocket_ajax_filters_toggle.theme-1:hover i:after,.berocket_ajax_filters_toggle.theme-1:hover i:before{background-color:#2a2a2a}.berocket_ajax_filters_toggle.theme-3{background:#ff4e3d;height:40px;line-height:32px;text-align:center;padding:4px 0 4px 36px;font-weight:400;color:#fff}.berocket_ajax_filters_toggle.theme-3:before{background:#d43f34;content:"";position:absolute;left:0;top:0;bottom:0;width:40px}.berocket_ajax_filters_toggle.theme-3 span{position:absolute;left:11px;top:1px}.berocket_ajax_filters_toggle.theme-3 span i,.berocket_ajax_filters_toggle.theme-3 span i:after,.berocket_ajax_filters_toggle.theme-3 span i:before,.berocket_ajax_filters_toggle.theme-3.active i,.berocket_ajax_filters_toggle.theme-3.active i:after,.berocket_ajax_filters_toggle.theme-3.active i:before,.berocket_ajax_filters_toggle.theme-3:hover i,.berocket_ajax_filters_toggle.theme-3:hover i:after,.berocket_ajax_filters_toggle.theme-3:hover i:before{background-color:#fff}.berocket_ajax_filters_toggle.theme-3 span b,.berocket_ajax_filters_toggle.theme-3 span b:after,.berocket_ajax_filters_toggle.theme-3 span b:before,.berocket_ajax_filters_toggle.theme-3 span s,.berocket_ajax_filters_toggle.theme-3 span s:after,.berocket_ajax_filters_toggle.theme-3 span s:before,.berocket_ajax_filters_toggle.theme-3.active b,.berocket_ajax_filters_toggle.theme-3.active b:after,.berocket_ajax_filters_toggle.theme-3.active b:before,.berocket_ajax_filters_toggle.theme-3.active s,.berocket_ajax_filters_toggle.theme-3.active s:after,.berocket_ajax_filters_toggle.theme-3.active s:before,.berocket_ajax_filters_toggle.theme-3:hover b,.berocket_ajax_filters_toggle.theme-3:hover b:after,.berocket_ajax_filters_toggle.theme-3:hover b:before,.berocket_ajax_filters_toggle.theme-3:hover s,.berocket_ajax_filters_toggle.theme-3:hover s:after,.berocket_ajax_filters_toggle.theme-3:hover s:before{border-color:#fff;background-color:#d43f34}.berocket_ajax_filters_toggle.theme-4{background:#fff;height:40px;line-height:32px;text-align:center;padding:4px 0;font-weight:400;color:#79c7a5;box-shadow:0 5px 5px 0 #c7e8dbc7}.berocket_ajax_filters_toggle.theme-4 span{left:-10px}.berocket_ajax_filters_toggle.theme-4 span i,.berocket_ajax_filters_toggle.theme-4 span i:after,.berocket_ajax_filters_toggle.theme-4 span i:before{border-color:#79c7a5}.berocket_ajax_filters_toggle.theme-4:hover span i,.berocket_ajax_filters_toggle.theme-4:hover span i:after,.berocket_ajax_filters_toggle.theme-4:hover span i:before{border-color:#47b585}.berocket_ajax_filters_toggle.theme-4 span i,.berocket_ajax_filters_toggle.theme-4 span i:after,.berocket_ajax_filters_toggle.theme-4 span i:before,.berocket_ajax_filters_toggle.theme-4.active i,.berocket_ajax_filters_toggle.theme-4.active i:after,.berocket_ajax_filters_toggle.theme-4.active i:before,.berocket_ajax_filters_toggle.theme-4:hover i,.berocket_ajax_filters_toggle.theme-4:hover i:after,.berocket_ajax_filters_toggle.theme-4:hover i:before{background-color:#79c7a5}.berocket_ajax_filters_toggle.theme-4 span b,.berocket_ajax_filters_toggle.theme-4 span b:after,.berocket_ajax_filters_toggle.theme-4 span b:before,.berocket_ajax_filters_toggle.theme-4 span s,.berocket_ajax_filters_toggle.theme-4 span s:after,.berocket_ajax_filters_toggle.theme-4 span s:before,.berocket_ajax_filters_toggle.theme-4.active b,.berocket_ajax_filters_toggle.theme-4.active b:after,.berocket_ajax_filters_toggle.theme-4.active b:before,.berocket_ajax_filters_toggle.theme-4.active s,.berocket_ajax_filters_toggle.theme-4.active s:after,.berocket_ajax_filters_toggle.theme-4.active s:before,.berocket_ajax_filters_toggle.theme-4:hover b,.berocket_ajax_filters_toggle.theme-4:hover b:after,.berocket_ajax_filters_toggle.theme-4:hover b:before,.berocket_ajax_filters_toggle.theme-4:hover s,.berocket_ajax_filters_toggle.theme-4:hover s:after,.berocket_ajax_filters_toggle.theme-4:hover s:before{border-color:#79c7a5;background-color:#fff}.berocket_ajax_filters_toggle.theme-5{height:40px;line-height:32px;text-align:center;padding:4px 0;font-weight:400;color:#fff;border-radius:20px;background:#65d6d0;background:linear-gradient(90deg,#65d6d0 0,#39b4ef 56%,#2aa1f5 100%)}.berocket_ajax_filters_toggle.theme-5:before{content:'';height:34px;width:34px;position:absolute;top:3px;left:3px;border:1px solid #fff;box-sizing:border-box;border-radius:50%}.berocket_ajax_filters_toggle.theme-6,.berocket_ajax_filters_toggle.theme-7,.berocket_ajax_filters_toggle.theme-8{height:50px;line-height:29px;text-align:center;font-weight:400}.berocket_ajax_filters_toggle.theme-5 span{position:absolute;left:11px;top:1px}.berocket_ajax_filters_toggle.theme-5 span i,.berocket_ajax_filters_toggle.theme-5 span i:after,.berocket_ajax_filters_toggle.theme-5 span i:before,.berocket_ajax_filters_toggle.theme-5.active i,.berocket_ajax_filters_toggle.theme-5.active i:after,.berocket_ajax_filters_toggle.theme-5.active i:before,.berocket_ajax_filters_toggle.theme-5:hover i,.berocket_ajax_filters_toggle.theme-5:hover i:after,.berocket_ajax_filters_toggle.theme-5:hover i:before{background-color:#fff}.berocket_ajax_filters_toggle.theme-5 span b,.berocket_ajax_filters_toggle.theme-5 span b:after,.berocket_ajax_filters_toggle.theme-5 span b:before,.berocket_ajax_filters_toggle.theme-5 span s,.berocket_ajax_filters_toggle.theme-5 span s:after,.berocket_ajax_filters_toggle.theme-5 span s:before,.berocket_ajax_filters_toggle.theme-5.active b,.berocket_ajax_filters_toggle.theme-5.active b:after,.berocket_ajax_filters_toggle.theme-5.active b:before,.berocket_ajax_filters_toggle.theme-5.active s,.berocket_ajax_filters_toggle.theme-5.active s:after,.berocket_ajax_filters_toggle.theme-5.active s:before,.berocket_ajax_filters_toggle.theme-5:hover b,.berocket_ajax_filters_toggle.theme-5:hover b:after,.berocket_ajax_filters_toggle.theme-5:hover b:before,.berocket_ajax_filters_toggle.theme-5:hover s,.berocket_ajax_filters_toggle.theme-5:hover s:after,.berocket_ajax_filters_toggle.theme-5:hover s:before{border-color:#65d6d0;background-color:#fff}.berocket_ajax_filters_toggle.theme-6{padding:10px 0 10px 12px;color:#fff;border-radius:6px;background:#ed5153;border-bottom:4px solid #e14043}.berocket_ajax_filters_toggle.theme-6 span{position:absolute;left:13px;top:5px}.berocket_ajax_filters_toggle.theme-6 span i,.berocket_ajax_filters_toggle.theme-6 span i:after,.berocket_ajax_filters_toggle.theme-6 span i:before,.berocket_ajax_filters_toggle.theme-6.active i,.berocket_ajax_filters_toggle.theme-6.active i:after,.berocket_ajax_filters_toggle.theme-6.active i:before,.berocket_ajax_filters_toggle.theme-6:hover i,.berocket_ajax_filters_toggle.theme-6:hover i:after,.berocket_ajax_filters_toggle.theme-6:hover i:before{background-color:#fff}.berocket_ajax_filters_toggle.theme-6 span b,.berocket_ajax_filters_toggle.theme-6 span b:after,.berocket_ajax_filters_toggle.theme-6 span b:before,.berocket_ajax_filters_toggle.theme-6 span s,.berocket_ajax_filters_toggle.theme-6 span s:after,.berocket_ajax_filters_toggle.theme-6 span s:before,.berocket_ajax_filters_toggle.theme-6.active b,.berocket_ajax_filters_toggle.theme-6.active b:after,.berocket_ajax_filters_toggle.theme-6.active b:before,.berocket_ajax_filters_toggle.theme-6.active s,.berocket_ajax_filters_toggle.theme-6.active s:after,.berocket_ajax_filters_toggle.theme-6.active s:before,.berocket_ajax_filters_toggle.theme-6:hover b,.berocket_ajax_filters_toggle.theme-6:hover b:after,.berocket_ajax_filters_toggle.theme-6:hover b:before,.berocket_ajax_filters_toggle.theme-6:hover s,.berocket_ajax_filters_toggle.theme-6:hover s:after,.berocket_ajax_filters_toggle.theme-6:hover s:before{border-color:#fff;background-color:#ed5153}.berocket_ajax_filters_toggle.theme-7{padding:10px 0 10px 44px;color:#fff;border-radius:6px;background:#a39cff;border:0}.berocket_ajax_filters_toggle.theme-7:after{content:"";background:#fff;top:4px;left:4px;bottom:4px;position:absolute;width:44px;display:block;z-index:10;border-radius:6px}.berocket_ajax_filters_toggle.theme-7 span{position:absolute;left:17px;top:6px}.berocket_ajax_filters_toggle.theme-7 span i,.berocket_ajax_filters_toggle.theme-7 span i:after,.berocket_ajax_filters_toggle.theme-7 span i:before,.berocket_ajax_filters_toggle.theme-7.active i,.berocket_ajax_filters_toggle.theme-7.active i:after,.berocket_ajax_filters_toggle.theme-7.active i:before,.berocket_ajax_filters_toggle.theme-7:hover i,.berocket_ajax_filters_toggle.theme-7:hover i:after,.berocket_ajax_filters_toggle.theme-7:hover i:before{background-color:#6d5ceb}.berocket_ajax_filters_toggle.theme-7 span b,.berocket_ajax_filters_toggle.theme-7 span b:after,.berocket_ajax_filters_toggle.theme-7 span b:before,.berocket_ajax_filters_toggle.theme-7 span s,.berocket_ajax_filters_toggle.theme-7 span s:after,.berocket_ajax_filters_toggle.theme-7 span s:before,.berocket_ajax_filters_toggle.theme-7.active b,.berocket_ajax_filters_toggle.theme-7.active b:after,.berocket_ajax_filters_toggle.theme-7.active b:before,.berocket_ajax_filters_toggle.theme-7.active s,.berocket_ajax_filters_toggle.theme-7.active s:after,.berocket_ajax_filters_toggle.theme-7.active s:before,.berocket_ajax_filters_toggle.theme-7:hover b,.berocket_ajax_filters_toggle.theme-7:hover b:after,.berocket_ajax_filters_toggle.theme-7:hover b:before,.berocket_ajax_filters_toggle.theme-7:hover s,.berocket_ajax_filters_toggle.theme-7:hover s:after,.berocket_ajax_filters_toggle.theme-7:hover s:before{border-color:#6d5ceb;background-color:#fff}.berocket_ajax_filters_toggle.theme-8{padding:10px 0 10px 12px;color:#333;border-radius:6px;background:#fff;border:0;box-shadow:0 2px 2px 2px #ccc}.berocket_ajax_filters_toggle.theme-10,.berocket_ajax_filters_toggle.theme-9{height:50px;line-height:29px;padding:10px 0 10px 12px;font-weight:400;color:#fff;text-align:center}.berocket_ajax_filters_toggle.theme-8 span{position:absolute;left:17px;top:5px}.berocket_ajax_filters_toggle.theme-8 span i,.berocket_ajax_filters_toggle.theme-8 span i:after,.berocket_ajax_filters_toggle.theme-8 span i:before,.berocket_ajax_filters_toggle.theme-8.active i,.berocket_ajax_filters_toggle.theme-8.active i:after,.berocket_ajax_filters_toggle.theme-8.active i:before,.berocket_ajax_filters_toggle.theme-8:hover i,.berocket_ajax_filters_toggle.theme-8:hover i:after,.berocket_ajax_filters_toggle.theme-8:hover i:before{background-color:#333}.berocket_ajax_filters_toggle.theme-8 span b,.berocket_ajax_filters_toggle.theme-8 span b:after,.berocket_ajax_filters_toggle.theme-8 span b:before,.berocket_ajax_filters_toggle.theme-8 span s,.berocket_ajax_filters_toggle.theme-8 span s:after,.berocket_ajax_filters_toggle.theme-8 span s:before,.berocket_ajax_filters_toggle.theme-8.active b,.berocket_ajax_filters_toggle.theme-8.active b:after,.berocket_ajax_filters_toggle.theme-8.active b:before,.berocket_ajax_filters_toggle.theme-8.active s,.berocket_ajax_filters_toggle.theme-8.active s:after,.berocket_ajax_filters_toggle.theme-8.active s:before,.berocket_ajax_filters_toggle.theme-8:hover b,.berocket_ajax_filters_toggle.theme-8:hover b:after,.berocket_ajax_filters_toggle.theme-8:hover b:before,.berocket_ajax_filters_toggle.theme-8:hover s,.berocket_ajax_filters_toggle.theme-8:hover s:after,.berocket_ajax_filters_toggle.theme-8:hover s:before{border-color:#333;background-color:#fff}.berocket_ajax_filters_toggle.theme-9{border-radius:6px;background:#4f5055;background:radial-gradient(circle,#4f5055 0,#87888d 100%);border:0}.berocket_ajax_filters_toggle.theme-9 span{position:absolute;left:17px;top:5px}.berocket_ajax_filters_toggle.theme-9 span i,.berocket_ajax_filters_toggle.theme-9 span i:after,.berocket_ajax_filters_toggle.theme-9 span i:before,.berocket_ajax_filters_toggle.theme-9.active i,.berocket_ajax_filters_toggle.theme-9.active i:after,.berocket_ajax_filters_toggle.theme-9.active i:before,.berocket_ajax_filters_toggle.theme-9:hover i,.berocket_ajax_filters_toggle.theme-9:hover i:after,.berocket_ajax_filters_toggle.theme-9:hover i:before{background-color:#fff}.berocket_ajax_filters_toggle.theme-9 span b,.berocket_ajax_filters_toggle.theme-9 span b:after,.berocket_ajax_filters_toggle.theme-9 span b:before,.berocket_ajax_filters_toggle.theme-9 span s,.berocket_ajax_filters_toggle.theme-9 span s:after,.berocket_ajax_filters_toggle.theme-9 span s:before,.berocket_ajax_filters_toggle.theme-9.active b,.berocket_ajax_filters_toggle.theme-9.active b:after,.berocket_ajax_filters_toggle.theme-9.active b:before,.berocket_ajax_filters_toggle.theme-9.active s,.berocket_ajax_filters_toggle.theme-9.active s:after,.berocket_ajax_filters_toggle.theme-9.active s:before,.berocket_ajax_filters_toggle.theme-9:hover b,.berocket_ajax_filters_toggle.theme-9:hover b:after,.berocket_ajax_filters_toggle.theme-9:hover b:before,.berocket_ajax_filters_toggle.theme-9:hover s,.berocket_ajax_filters_toggle.theme-9:hover s:after,.berocket_ajax_filters_toggle.theme-9:hover s:before{border-color:#fff;background-color:#87888d}.berocket_ajax_filters_toggle.theme-10{border-radius:8px;background:#db0071;border:0}.berocket_ajax_filters_toggle.theme-10:after{content:"";top:50%;left:15%;right:15%;bottom:0;position:absolute;display:block;z-index:-1;border-radius:6px;box-shadow:0 0 35px 1px #db0071}#berocket-ajax-filters-sidebar.sidebar-theme-1,#berocket-ajax-filters-sidebar.sidebar-theme-2{box-shadow:8px 0 10px 0 #eee}.berocket_ajax_filters_toggle.theme-10 span{position:absolute;left:17px;top:5px}.irs,.irs-line{position:relative}.berocket_ajax_filters_toggle.theme-10 span i,.berocket_ajax_filters_toggle.theme-10 span i:after,.berocket_ajax_filters_toggle.theme-10 span i:before,.berocket_ajax_filters_toggle.theme-10.active i,.berocket_ajax_filters_toggle.theme-10.active i:after,.berocket_ajax_filters_toggle.theme-10.active i:before,.berocket_ajax_filters_toggle.theme-10:hover i,.berocket_ajax_filters_toggle.theme-10:hover i:after,.berocket_ajax_filters_toggle.theme-10:hover i:before{background-color:#fff}.berocket_ajax_filters_toggle.theme-10 span b,.berocket_ajax_filters_toggle.theme-10 span b:after,.berocket_ajax_filters_toggle.theme-10 span b:before,.berocket_ajax_filters_toggle.theme-10 span s,.berocket_ajax_filters_toggle.theme-10 span s:after,.berocket_ajax_filters_toggle.theme-10 span s:before,.berocket_ajax_filters_toggle.theme-10.active b,.berocket_ajax_filters_toggle.theme-10.active b:after,.berocket_ajax_filters_toggle.theme-10.active b:before,.berocket_ajax_filters_toggle.theme-10.active s,.berocket_ajax_filters_toggle.theme-10.active s:after,.berocket_ajax_filters_toggle.theme-10.active s:before,.berocket_ajax_filters_toggle.theme-10:hover b,.berocket_ajax_filters_toggle.theme-10:hover b:after,.berocket_ajax_filters_toggle.theme-10:hover b:before,.berocket_ajax_filters_toggle.theme-10:hover s,.berocket_ajax_filters_toggle.theme-10:hover s:after,.berocket_ajax_filters_toggle.theme-10:hover s:before{border-color:#fff;background-color:#db0071}#berocket-ajax-filters-sidebar.sidebar-theme-1.active+#berocket-ajax-filters-sidebar-shadow{display:none}.irs,.irs-bar,.irs-line{display:block}#berocket-ajax-filters-sidebar.sidebar-theme-2.active+#berocket-ajax-filters-sidebar-shadow{background-color:#fff}/*!Ion.RangeSlider, 2.3.1, © Denis Ineshin, 2010 - 2019, IonDen.com, Build date: 2019-12-19 16:51:02*/.irs{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:12px;font-family:Arial,sans-serif}.irs-line{overflow:hidden;outline:0!important}.irs-bar,.irs-shadow{position:absolute;width:0;left:0}.irs-shadow{display:none}.irs-from,.irs-handle,.irs-max,.irs-min,.irs-single,.irs-to{display:block;position:absolute;cursor:default}.irs-handle{box-sizing:border-box;z-index:1}.irs-handle.type_last{z-index:2}.irs-min{left:0}.irs-max{right:0}.irs-from,.irs-single,.irs-to{top:0;left:0;white-space:nowrap}.irs-grid{position:absolute;display:none;bottom:0;left:0;width:100%;height:20px}.irs-with-grid .irs-grid{display:block}.irs-grid-pol{position:absolute;top:0;left:0;width:1px;height:8px;background:#000}.irs-grid-pol.small{height:4px}.irs-grid-text{position:absolute;bottom:0;left:0;white-space:nowrap;text-align:center;font-size:9px;line-height:9px;padding:0 3px;color:#000}.irs-disable-mask{position:absolute;display:block;top:0;left:-1%;width:102%;height:100%;cursor:default;background:rgba(0,0,0,0);z-index:2}.lt-ie9 .irs-disable-mask{background:#000;filter:alpha(opacity=0);cursor:not-allowed}.irs-disabled{opacity:.4}.irs-hidden-input{position:absolute!important;display:block!important;top:0!important;left:0!important;width:0!important;height:0!important;font-size:0!important;line-height:0!important;padding:0!important;margin:0!important;overflow:hidden;outline:0!important;z-index:-9999!important;background:0 0!important;border-style:solid!important;border-color:transparent!important}.irs--flat{height:40px}.irs--flat.irs-with-grid{height:60px}.irs--flat .irs-line{top:25px;height:12px;background-color:#e1e4e9;border-radius:4px}.irs--flat .irs-bar{top:25px;height:12px;background-color:#ed5565}.irs--flat .irs-bar--single{border-radius:4px 0 0 4px}.irs--flat .irs-shadow{height:1px;bottom:16px;background-color:#e1e4e9}.irs--flat .irs-handle{top:22px;width:16px;height:18px;background-color:transparent}.irs--flat .irs-handle>i:first-child{position:absolute;display:block;top:0;left:50%;width:2px;height:100%;margin-left:-1px;background-color:#da4453}.irs--flat .irs-handle.state_hover>i:first-child,.irs--flat .irs-handle:hover>i:first-child{background-color:#a43540}.irs--flat .irs-max,.irs--flat .irs-min{top:0;padding:1px 3px;color:#999;font-size:10px;line-height:1.333;text-shadow:none;background-color:#e1e4e9;border-radius:4px}.irs--flat .irs-from,.irs--flat .irs-single,.irs--flat .irs-to{color:#fff;font-size:10px;line-height:1.333;text-shadow:none;padding:1px 5px;background-color:#ed5565;border-radius:4px}.irs--flat .irs-from:before,.irs--flat .irs-single:before,.irs--flat .irs-to:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#ed5565}.irs--big,.irs--modern,.irs--modern.irs-with-grid{height:55px}.irs--flat .irs-grid-pol{background-color:#e1e4e9}.irs--flat .irs-grid-text{color:#999}.irs--big.irs-with-grid{height:70px}.irs--big .irs-line{top:33px;height:12px;background-color:#fff;background:linear-gradient(to bottom,#ddd -50%,#fff 150%);border:1px solid #ccc;border-radius:12px}.irs--big .irs-bar{top:33px;height:12px;background-color:#92bce0;border:1px solid #428bca;background:linear-gradient(to bottom,#fff 0,#428bca 30%,#b9d4ec 100%);box-shadow:inset 0 0 1px 1px rgba(255,255,255,.5)}.irs--big .irs-bar--single{border-radius:12px 0 0 12px}.irs--big .irs-shadow{height:1px;bottom:16px;background-color:rgba(66,139,202,.5)}.irs--big .irs-handle{top:25px;width:30px;height:30px;border:1px solid rgba(0,0,0,.3);background-color:#cbcfd5;background:linear-gradient(to bottom,#fff 0,#B4B9BE 30%,#fff 100%);box-shadow:1px 1px 2px rgba(0,0,0,.2),inset 0 0 3px 1px #fff;border-radius:30px}.irs--big .irs-handle.state_hover,.irs--big .irs-handle:hover{border-color:rgba(0,0,0,.45);background-color:#939ba7;background:linear-gradient(to bottom,#fff 0,#919BA5 30%,#fff 100%)}.irs--big .irs-max,.irs--big .irs-min{top:0;padding:1px 5px;color:#fff;text-shadow:none;background-color:#9f9f9f;border-radius:3px}.irs--big .irs-from,.irs--big .irs-single,.irs--big .irs-to{color:#fff;text-shadow:none;padding:1px 5px;background-color:#428bca;background:linear-gradient(to bottom,#428bca 0,#3071a9 100%);border-radius:3px}.irs--big .irs-grid-pol{background-color:#428bca}.irs--big .irs-grid-text{color:#428bca}.irs--modern .irs-line{top:25px;height:5px;background-color:#d1d6e0;background:linear-gradient(to bottom,#e0e4ea 0,#d1d6e0 100%);border:1px solid #a3adc1;border-bottom-width:0;border-radius:5px}.irs--modern .irs-bar{top:25px;height:5px;background:#20b426;background:linear-gradient(to bottom,#20b426 0,#18891d 100%)}.irs--modern .irs-bar--single{border-radius:5px 0 0 5px}.irs--modern .irs-shadow{height:1px;bottom:21px;background-color:rgba(209,214,224,.5)}.irs--modern .irs-handle{top:37px;width:12px;height:13px;border:1px solid #a3adc1;border-top-width:0;box-shadow:1px 1px 1px rgba(0,0,0,.1);border-radius:0 0 3px 3px}.irs--modern .irs-handle>i:nth-child(1){position:absolute;display:block;top:-4px;left:1px;width:6px;height:6px;border:1px solid #a3adc1;background:#fff}.irs--modern .irs-handle>i:nth-child(2){position:absolute;display:block;box-sizing:border-box;top:0;left:0;width:10px;height:12px;background:#e9e6e6;background:linear-gradient(to bottom,#fff 0,#e9e6e6 100%);border-radius:0 0 3px 3px}.irs--modern .irs-handle>i:nth-child(3){position:absolute;display:block;box-sizing:border-box;top:3px;left:3px;width:4px;height:5px;border-left:1px solid #a3adc1;border-right:1px solid #a3adc1}.irs--modern .irs-handle.state_hover,.irs--modern .irs-handle:hover{border-color:#7685a2;background:#c3c7cd;background:linear-gradient(to bottom,#fff 0,#919ba5 30%,#fff 100%)}.irs--modern .irs-handle.state_hover>i:nth-child(1),.irs--modern .irs-handle:hover>i:nth-child(1){border-color:#7685a2}.irs--modern .irs-handle.state_hover>i:nth-child(3),.irs--modern .irs-handle:hover>i:nth-child(3){border-color:#48536a}.irs--modern .irs-max,.irs--modern .irs-min{top:0;font-size:10px;line-height:1.333;text-shadow:none;padding:1px 5px;color:#fff;background-color:#d1d6e0;border-radius:5px}.irs--modern .irs-from,.irs--modern .irs-single,.irs--modern .irs-to{font-size:10px;line-height:1.333;text-shadow:none;padding:1px 5px;background-color:#20b426;color:#fff;border-radius:5px}.irs--modern .irs-from:before,.irs--modern .irs-single:before,.irs--modern .irs-to:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#20b426}.irs--modern .irs-grid{height:25px}.irs--modern .irs-grid-pol{background-color:#dedede}.irs--modern .irs-grid-text{color:silver;font-size:13px}.irs--sharp{height:50px;font-size:12px;line-height:1}.irs--sharp.irs-with-grid{height:57px}.irs--sharp .irs-line{top:30px;height:2px;background-color:#000;border-radius:2px}.irs--sharp .irs-bar{top:30px;height:2px;background-color:#ee22fa}.irs--sharp .irs-bar--single{border-radius:2px 0 0 2px}.irs--sharp .irs-shadow{height:1px;bottom:21px;background-color:rgba(0,0,0,.5)}.irs--sharp .irs-handle{top:25px;width:10px;height:10px;background-color:#a804b2}.irs--sharp .irs-handle>i:first-child{position:absolute;display:block;top:100%;left:0;width:0;height:0;border:5px solid transparent;border-top-color:#a804b2}.irs--sharp .irs-handle.state_hover,.irs--sharp .irs-handle:hover{background-color:#000}.irs--sharp .irs-handle.state_hover>i:first-child,.irs--sharp .irs-handle:hover>i:first-child{border-top-color:#000}.irs--sharp .irs-max,.irs--sharp .irs-min{color:#fff;font-size:14px;line-height:1;top:0;padding:3px 4px;opacity:.4;background-color:#a804b2;border-radius:2px}.irs--sharp .irs-from,.irs--sharp .irs-single,.irs--sharp .irs-to{font-size:14px;line-height:1;text-shadow:none;padding:3px 4px;background-color:#a804b2;color:#fff;border-radius:2px}.irs--sharp .irs-from:before,.irs--sharp .irs-single:before,.irs--sharp .irs-to:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#a804b2}.irs--sharp .irs-grid{height:25px}.irs--sharp .irs-grid-pol{background-color:#dedede}.irs--sharp .irs-grid-text{color:silver;font-size:13px}.irs--round{height:50px}.irs--round.irs-with-grid{height:65px}.irs--round .irs-line{top:36px;height:4px;background-color:#dee4ec;border-radius:4px}.irs--round .irs-bar{top:36px;height:4px;background-color:#006cfa}.irs--round .irs-bar--single{border-radius:4px 0 0 4px}.irs--round .irs-shadow{height:4px;bottom:21px;background-color:rgba(222,228,236,.5)}.irs--round .irs-handle{top:26px;width:24px;height:24px;border:4px solid #006cfa;background-color:#fff;border-radius:24px;box-shadow:0 1px 3px rgba(0,0,255,.3)}.irs--round .irs-handle.state_hover,.irs--round .irs-handle:hover{background-color:#f0f6ff}.irs--round .irs-max,.irs--round .irs-min{color:#333;font-size:14px;line-height:1;top:0;padding:3px 5px;background-color:rgba(0,0,0,.1);border-radius:4px}.irs--round .irs-from,.irs--round .irs-single,.irs--round .irs-to{font-size:14px;line-height:1;text-shadow:none;padding:3px 5px;background-color:#006cfa;color:#fff;border-radius:4px}.irs--round .irs-grid-pol,.irs--square .irs-line{background-color:#dedede}.irs--round .irs-from:before,.irs--round .irs-single:before,.irs--round .irs-to:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#006cfa}.irs--round .irs-grid{height:25px}.irs--round .irs-grid-text{color:silver;font-size:13px}.irs--square{height:50px}.irs--square.irs-with-grid{height:60px}.irs--square .irs-line{top:31px;height:4px}.irs--square .irs-bar{top:31px;height:4px;background-color:#000}.irs--square .irs-shadow{height:2px;bottom:21px;background-color:#dedede}.irs--square .irs-handle{top:25px;width:16px;height:16px;border:3px solid #000;background-color:#fff;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.irs--square .irs-handle.state_hover,.irs--square .irs-handle:hover{background-color:#f0f6ff}.irs--square .irs-max,.irs--square .irs-min{color:#333;font-size:14px;line-height:1;top:0;padding:3px 5px;background-color:rgba(0,0,0,.1)}.irs--square .irs-from,.irs--square .irs-single,.irs--square .irs-to{font-size:14px;line-height:1;text-shadow:none;padding:3px 5px;background-color:#000;color:#fff}.irs--square .irs-grid{height:25px}.irs--square .irs-grid-pol{background-color:#dedede}.irs--square .irs-grid-text{color:silver;font-size:11px}
{css → assets/frontend/css}/images/ui-bg_glass_65_ffffff_1x400.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-bg_highlight-soft_25_0073ea_1x100.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-bg_highlight-soft_50_dddddd_1x100.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-icons_0073ea_256x240.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-icons_454545_256x240.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-icons_666666_256x240.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-icons_ff0084_256x240.png RENAMED
File without changes
{css → assets/frontend/css}/images/ui-icons_ffffff_256x240.png RENAMED
File without changes
{css → assets/frontend/css}/jquery-ui.min.css RENAMED
File without changes
{css → assets/frontend/css}/jquery-ui.theme.min.css RENAMED
File without changes
{css/scrollbar → assets/frontend/css}/mCSB_buttons.png RENAMED
File without changes
assets/frontend/css/main.css ADDED
@@ -0,0 +1,1107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bapf_sfilter .bapf_button,
2
+ .bapf_sfilter label {
3
+ cursor: pointer;
4
+ display: inline-block!important;
5
+ }
6
+ .bapf_sfilter ul li {
7
+ list-style: none!important;
8
+ margin: 0!important;
9
+ padding: 0!important;
10
+ max-width: 100%;
11
+ }
12
+ /*JQUERY UI*/
13
+ .bapf_slidr_main.ui-widget-content, .berocket_filter_price_slider.ui-widget-content{
14
+ background: none repeat scroll 0 0 #b0b5b9;
15
+ border: 0 none;
16
+ border-radius: 0;
17
+ height: 4px;
18
+ padding: 0;
19
+ }
20
+
21
+ .bapf_slidr_main.ui-widget-content .ui-slider-range, .berocket_filter_price_slider.ui-widget-content .ui-slider-range{
22
+ background: none repeat scroll 0 0 #000000;
23
+ }
24
+ .slide.default .bapf_slidr_main.ui-widget-content .ui-slider-range,
25
+ .slide.default .berocket_filter_price_slider.ui-widget-content .ui-slider-range{
26
+ background: #222;
27
+ }
28
+ .slide.default .bapf_slidr_main.ui-widget-content,
29
+ .slide.default .berocket_filter_price_slider.ui-widget-content{
30
+ height: 4px;
31
+ border: 1px solid #555;
32
+ font-size: 10px;
33
+ }
34
+ .slide.default .bapf_slidr_main .ui-state-default,
35
+ .slide.default .berocket_filter_price_slider .ui-state-default,
36
+ .slide.default .bapf_slidr_main.ui-widget-content .ui-state-default,
37
+ .slide.default .berocket_filter_price_slider.ui-widget-content .ui-state-default,
38
+ .slide.default .bapf_slidr_main .ui-widget-header .ui-state-default,
39
+ .slide.default .berocket_filter_price_slider .ui-widget-header .ui-state-default,
40
+ .bapf_slidr_main.ui-widget-content .ui-slider-handle,
41
+ .berocket_filter_price_slider.ui-widget-content .ui-slider-handle{
42
+ background: #ddd;
43
+ font-size: 14px;
44
+ width: 1em;
45
+ height: 1em;
46
+ border: 1px solid #555;
47
+ top: -6px;
48
+ border-radius: 2em;
49
+ }
50
+
51
+ .berocket_aapf_widget li.slider div.slide{
52
+ clear: both;
53
+ height: auto;
54
+ text-align: right;
55
+ line-height: 0;
56
+ }
57
+
58
+ .ui-slider {
59
+ position: relative;
60
+ text-align: left;
61
+ }
62
+ .ui-slider .ui-slider-handle {
63
+ position: absolute;
64
+ z-index: 2;
65
+ width: 1.2em;
66
+ height: 1.2em;
67
+ cursor: pointer;
68
+ -ms-touch-action: none;
69
+ touch-action: none;
70
+ }
71
+ .ui-slider .ui-slider-range {
72
+ position: absolute;
73
+ z-index: 1;
74
+ font-size: .7em;
75
+ display: block;
76
+ border: 0;
77
+ background-position: 0 0;
78
+ }
79
+ .ui-slider.ui-state-disabled .ui-slider-handle,
80
+ .ui-slider.ui-state-disabled .ui-slider-range {
81
+ filter: inherit;
82
+ }
83
+
84
+ .ui-slider-horizontal {
85
+ height: .8em;
86
+ }
87
+ .ui-slider-horizontal .ui-slider-handle {
88
+ top: -.3em;
89
+ margin-left: -.6em;
90
+ }
91
+ .bapf_slidr_main > a:last-child {
92
+ margin-left: -12px;
93
+ }
94
+ .ui-slider-horizontal .ui-slider-range {
95
+ top: 0;
96
+ height: 100%;
97
+ }
98
+ .ui-slider-horizontal .ui-slider-range-min {
99
+ left: 0;
100
+ }
101
+ .ui-slider-horizontal .ui-slider-range-max {
102
+ right: 0;
103
+ }
104
+
105
+ .ui-slider-vertical {
106
+ width: .8em;
107
+ height: 100px;
108
+ }
109
+ .ui-slider-vertical .ui-slider-handle {
110
+ left: -.3em;
111
+ margin-left: 0;
112
+ margin-bottom: -.6em;
113
+ }
114
+ .ui-slider-vertical .ui-slider-range {
115
+ left: 0;
116
+ width: 100%;
117
+ }
118
+ .ui-slider-vertical .ui-slider-range-min {
119
+ bottom: 0;
120
+ }
121
+ .ui-slider-vertical .ui-slider-range-max {
122
+ top: 0;
123
+ }
124
+
125
+ .slide .ui-corner-all,
126
+ .slide .ui-corner-bottom,
127
+ .slide .ui-corner-right,
128
+ .slide .ui-corner-br {
129
+ border-bottom-right-radius: 4px;
130
+ }
131
+ .slide .ui-corner-all,
132
+ .slide .ui-corner-bottom,
133
+ .slide .ui-corner-left,
134
+ .slide .ui-corner-bl {
135
+ border-bottom-left-radius: 4px;
136
+ }
137
+ .slide .ui-corner-all,
138
+ .slide .ui-corner-top,
139
+ .slide .ui-corner-right,
140
+ .slide .ui-corner-tr {
141
+ border-top-right-radius: 4px;
142
+ }
143
+ .slide .ui-corner-all,
144
+ .slide .ui-corner-top,
145
+ .slide .ui-corner-left,
146
+ .slide .ui-corner-tl {
147
+ border-top-left-radius: 4px;
148
+ }
149
+ ul.berocket_aapf_widget li.slider > span {
150
+ cursor: initial;
151
+ }
152
+ ul.berocket_aapf_widget li.slider .bapf_slidr_main {
153
+ cursor: pointer;
154
+ }
155
+ .slide .ui-widget-content {
156
+ background: #ffffff;
157
+ border: 1px solid #aaaaaa;
158
+ color: #222222;
159
+ }
160
+ .slide .ui-state-default,
161
+ .slide .ui-widget-content .ui-state-default,
162
+ .slide .ui-widget-header .ui-state-default {
163
+ background: #e6e6e6;
164
+ border: 1px solid #d3d3d3;
165
+ color: #555555;
166
+ font-weight: normal;
167
+ }
168
+ .ui-widget.ui-datepicker {
169
+ font-size: 14px;
170
+ z-index: 9000!important;
171
+ }
172
+ .bapf_sfilter .ui-widget.ui-widget-content{
173
+ border: 0;
174
+ }
175
+ .bapf_sfilter .ui-state-default,
176
+ .bapf_sfilter .ui-widget-content .ui-state-default,
177
+ .bapf_sfilter .ui-widget-header .ui-state-default,
178
+ .bapf_sfilter .ui-button,
179
+ html .bapf_sfilter .ui-button.ui-state-disabled:hover,
180
+ html .bapf_sfilter .ui-button.ui-state-disabled:active{
181
+ border: 0;
182
+ }
183
+ .bapf_slidr_jqrui .bapf_slidr_all:after {
184
+ content: "";
185
+ display: block;
186
+ clear: both;
187
+ }
188
+ .bapf_slidr_jqrui .bapf_slidr_main {
189
+ margin-bottom: 10px;
190
+ }
191
+ .bapf_slidr_jqrui .bapf_from,
192
+ .bapf_slidr_jqrui .bapf_to {
193
+ width: 49%;
194
+ display: inline-block;
195
+ margin-bottom: 10px;
196
+ vertical-align: middle;
197
+ }
198
+ .bapf_slidr_jqrui .bapf_from input,
199
+ .bapf_slidr_jqrui .bapf_to input {
200
+ width: 50%;
201
+ vertical-align: middle;
202
+ font-size: 1em;
203
+ padding: 0;
204
+ margin: 0;
205
+ line-height: 1em;
206
+ }
207
+ .bapf_slidr_jqrui .bapf_from {
208
+ text-align: left;
209
+ }
210
+ .bapf_slidr_jqrui .bapf_to {
211
+ text-align: right;
212
+ }
213
+ /*JQUERY UI*/
214
+
215
+ /*Widget absolute and display only title*/
216
+ .bapf_sfilter {
217
+ margin-bottom: 20px;
218
+ }
219
+ .berocket_single_filter_widget.berocket_inline_filters,
220
+ .berocket_single_filter_widget.berocket_inline_clickable {
221
+ float:left!important;
222
+ padding-right:15px!important;
223
+ }
224
+ .berocket_single_filter_widget.berocket_inline_filters {
225
+ width: 12.5%!important;
226
+ }
227
+ #berocket-ajax-filters-sidebar .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div,
228
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div {
229
+ border:2px solid #333333!important;
230
+ background-color: #333333!important;
231
+ color: #ccc!important;
232
+ padding: 5px!important;
233
+ padding-right: 35px!important;
234
+ border-radius: 5px!important;
235
+ }
236
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_widget_has_description .berocket_aapf_widget-title_div {
237
+ padding-right: 55px!important;
238
+ }
239
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-wrapper {
240
+ padding-bottom: 5px!important;
241
+ }
242
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div h3 {
243
+ margin: 0!important;
244
+ padding: 0!important;
245
+ font-size: inherit!important;
246
+ color:inherit!important;
247
+ }
248
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-title_div {
249
+ border:2px solid #ccc!important;
250
+ color: black!important;
251
+ background-color: #ccc!important;
252
+ border-radius: 5px 5px 0 0!important;
253
+ padding-bottom: 10px!important;
254
+ }
255
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-wrapper {
256
+ padding-bottom: 0!important;
257
+ }
258
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget {
259
+ position: absolute!important;
260
+ top:100%!important;
261
+ width:100%!important;
262
+ background-color:white!important;
263
+ z-index: 800!important;
264
+ margin: 0!important;
265
+ border:2px solid #ccc!important;
266
+ padding: 5px!important;
267
+ display: none;
268
+ }
269
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget {
270
+ z-index: 900!important;
271
+ }
272
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_left .berocket_aapf_widget {
273
+ left: 0!important;
274
+ }
275
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_right .berocket_aapf_widget {
276
+ right: 0!important;
277
+ }
278
+ @media screen and (max-width: 767px){
279
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible {
280
+ position: fixed!important;
281
+ top: 0!important;
282
+ left: 0!important;
283
+ bottom: 0!important;
284
+ right:0!important;
285
+ z-index: 9000000000!important;
286
+ background-color: white!important;
287
+ overflow: auto!important;
288
+ }
289
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget {
290
+ border: 0!important;
291
+ width: 100%!important;
292
+ max-width: 100%!important;
293
+ }
294
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide {
295
+ display: block!important;
296
+ }
297
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-left:before,
298
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-right:before {
299
+ content: "\f00d"!important;
300
+ }
301
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_description {
302
+ display: none!important;
303
+ }
304
+ body .select2-container,
305
+ body .ui-widget.ui-datepicker {
306
+ z-index: 9000000009!important;
307
+ }
308
+ }
309
+ .berocket_element_above_products {
310
+ clear: both!important;
311
+ overflow: visible!important;
312
+ }
313
+ /*.berocket_single_filter_widget,
314
+ .berocket_single_filter_widget div {
315
+ overflow:visible!important;
316
+ }*/
317
+ .berocket_single_filter_widget.bapf_mt_none {
318
+ display: none!important;
319
+ }
320
+ div.berocket_single_filter_widget div.berocket_aapf_widget-wrapper * {
321
+ opacity:1;
322
+ }
323
+ @media screen and (max-width: 767px){
324
+ .bapf_sngl_hd_mobile {
325
+ display: none!important;
326
+ }
327
+ }
328
+ @media screen and (min-width: 768px) and (max-width: 1024px){
329
+ .bapf_sngl_hd_tablet {
330
+ display: none!important;
331
+ }
332
+ }
333
+ @media screen and (min-width: 1025px){
334
+ .bapf_sngl_hd_desktop {
335
+ display: none!important;
336
+ }
337
+ }
338
+ .berocket_aapf_widget select {
339
+ overflow: auto!important;
340
+ }
341
+ .berocket_element_above_products_after {
342
+ clear:both;
343
+ }
344
+
345
+ ul.berocket_aapf_widget li > span > input + .berocket_label_widgets::before {
346
+ margin-right: 6px;
347
+ }
348
+
349
+ /* HIDDEN FILTERS UNDER ICON */
350
+
351
+ .berocket_element_above_products_is_hide {
352
+ overflow: visible !important;
353
+ }
354
+ .berocket_element_above_products_is_hide:after {
355
+ content:"";
356
+ display: block;
357
+ clear: both;
358
+ }
359
+ .berocket_element_above_products_is_hide.br_is_hidden {
360
+ opacity: 0;
361
+ max-height: 1px;
362
+ position: relative;
363
+ }
364
+ .berocket_element_above_products_is_hide_toggle {
365
+ height: 20px;
366
+ width: 200px !important;;
367
+ margin: 40px 0;
368
+ display: inline-block;
369
+ position: relative;
370
+ padding-left: 25px;
371
+ outline: 0 none !important;
372
+ color: #2a2a2a;
373
+ font-weight: 600;
374
+ font-size: 16px;
375
+ }
376
+ /* CUSTOM SIDEBAR */
377
+ body {
378
+ transition: margin-left 0.2s;
379
+ }
380
+ body.berocket_ajax_filters_sidebar_active {
381
+ margin-left: 200px;
382
+ }
383
+ .berocket_ajax_filters_sidebar_toggle {
384
+ height: 26px;
385
+ width: 200px !important;
386
+ margin: 40px 0;
387
+ display: inline-block;
388
+ position: relative;
389
+ padding-left: 25px;
390
+ outline: 0 none !important;
391
+ text-decoration: none!important;
392
+ box-sizing: border-box!important;
393
+ font-weight: 600;
394
+ font-size: 16px;
395
+ }
396
+
397
+ #berocket-ajax-filters-sidebar {
398
+ display: block;
399
+ position: fixed;
400
+ top: 0;
401
+ left: -350px;
402
+ bottom: 0;
403
+ width: 350px;
404
+ max-width: 100%;
405
+ background: white;
406
+ transition: all 0.2s;
407
+ z-index: 100000;
408
+ box-sizing: border-box;
409
+ overflow: auto !important;
410
+ }
411
+ #berocket-ajax-filters-sidebar-shadow {
412
+ content: "";
413
+ display: none;
414
+ position: fixed;
415
+ top: 0;
416
+ left: 0;
417
+ bottom: 0;
418
+ right: 0;
419
+ z-index: 99999;
420
+ background: black;
421
+ opacity: 0.7;
422
+ }
423
+ .admin-bar #berocket-ajax-filters-sidebar {
424
+ top: 32px;
425
+ }
426
+ #berocket-ajax-filters-sidebar.active,
427
+ #berocket-ajax-filters-sidebar.active + #berocket-ajax-filters-sidebar-shadow{
428
+ left: 0;
429
+ display: block;
430
+ }
431
+ #berocket-ajax-filters-sidebar .berocket_ajax_group_filter_title {
432
+ padding: 15px 88px 15px 15px !important;
433
+ font-weight: 500 !important;
434
+ font-size: 24px !important;
435
+ color: #333333 !important;
436
+ border-bottom: 1px solid #ccc !important;
437
+ }
438
+ #berocket-ajax-filters-sidebar > div {
439
+ padding: 15px!important;
440
+ }
441
+ #berocket-ajax-filters-sidebar .berocket_aapf_widget-title_div {
442
+ color: #333333 !important;
443
+ font-size: 19px !important;
444
+ font-weight: 600 !important;
445
+ }
446
+ #berocket-ajax-filters-sidebar .berocket_aapf_widget,
447
+ #berocket-ajax-filters-sidebar .berocket_aapf_widget li {
448
+ margin: 0 !important;
449
+ }
450
+ #berocket-ajax-filters-sidebar .berocket_aapf_widget .berocket_checkbox_color .berocket_label_widgets {
451
+ margin: 0 0.6em 0.6em 0 !important;
452
+ }
453
+ #berocket-ajax-filters-sidebar-close{
454
+ position: absolute !important;
455
+ right: 0 !important;
456
+ line-height: 39px;
457
+ padding: 17px 15px 13px !important;
458
+ font-family: Arial, serif !important;
459
+ color: #a2a2a2;
460
+ }
461
+ #berocket-ajax-filters-sidebar-close + * {
462
+ margin-top: 70px!important;
463
+ }
464
+ #berocket-ajax-filters-sidebar-close + .berocket_ajax_group_filter_title {
465
+ margin-top: 0!important;
466
+ }
467
+ @media screen and (max-width:782px) {
468
+ .admin-bar #berocket-ajax-filters-sidebar {
469
+ top: 46px;
470
+ }
471
+ }
472
+ @media screen and (max-width:600px) {
473
+ .admin-bar #berocket-ajax-filters-sidebar {
474
+ top: 0;
475
+ }
476
+ }
477
+
478
+
479
+ /* COMPATIBILITY WITH THEMES */
480
+ /* FLATSOME */
481
+ .berocket_aapf_widget-wrapper .slider:not(.flickity-enabled) {
482
+ overflow: initial;
483
+ white-space: initial;
484
+ }
485
+ .select2-container {
486
+ z-index: 999;
487
+ }
488
+
489
+
490
+ /*NEW TEMPLATES STYLE*/
491
+ .bapf_sfilter .bapf_body > ul {
492
+ margin-left: 0;
493
+ }
494
+ .bapf_sfilter.bapf_vpr_1 .bapf_body ul,
495
+ .bapf_sfilter.bapf_vpr_2 .bapf_body ul,
496
+ .bapf_sfilter.bapf_vpr_3 .bapf_body ul,
497
+ .bapf_sfilter.bapf_vpr_4 .bapf_body ul {
498
+ display: flex;
499
+ flex-wrap: wrap;
500
+ }
501
+ .bapf_sfilter.bapf_vpr_1 .bapf_body ul > li,
502
+ .bapf_sfilter.bapf_vpr_2 .bapf_body ul > li,
503
+ .bapf_sfilter.bapf_vpr_3 .bapf_body ul > li,
504
+ .bapf_sfilter.bapf_vpr_4 .bapf_body ul > li {
505
+ white-space: nowrap;
506
+ }
507
+ .bapf_sfilter.bapf_vpr_1 .bapf_body ul > li {
508
+ flex-basis:100%;
509
+ }
510
+ .bapf_sfilter.bapf_vpr_2 .bapf_body ul > li {
511
+ flex-basis: 50%;
512
+ }
513
+ .bapf_sfilter.bapf_vpr_3 .bapf_body ul > li {
514
+ flex-basis: 33%;
515
+ }
516
+ .bapf_sfilter.bapf_vpr_4 .bapf_body ul > li {
517
+ flex-basis: 25%;
518
+ }
519
+ .bapf_sfilter.bapf_vpr_1 .bapf_body ul > li label,
520
+ .bapf_sfilter.bapf_vpr_2 .bapf_body ul > li label,
521
+ .bapf_sfilter.bapf_vpr_3 .bapf_body ul > li label,
522
+ .bapf_sfilter.bapf_vpr_4 .bapf_body ul > li label {
523
+ white-space: initial;
524
+ }
525
+
526
+ .bapf_sfilter.bapf_fhide.bapf_filter_hide,
527
+ .bapf_sfilter.bapf_fhide .bapf_body ul li.bapf_hide {
528
+ display: none!important;
529
+ }
530
+ .bapf_sfilter .bapf_hascolarr,
531
+ .bapf_sfilter .bapf_hasdesc {
532
+ position: relative;
533
+ padding-right: 25px;
534
+ }
535
+ .bapf_sfilter .bapf_desci,
536
+ .bapf_sfilter .bapf_colaps_smb {
537
+ position: absolute;
538
+ right: 0;
539
+ top: 0;
540
+ }
541
+ .bapf_sfilter .bapf_hasdesc .bapf_colaps_smb {
542
+ right: 25px;
543
+ }
544
+
545
+ #berocket-ajax-filters-sidebar .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head,
546
+ .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head {
547
+ border:2px solid #333333!important;
548
+ background-color: #333333!important;
549
+ color: #ccc!important;
550
+ padding: 5px!important;
551
+ border-radius: 5px!important;
552
+ }
553
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_widget_has_description .berocket_aapf_widget-title_div {
554
+ padding-right: 55px!important;
555
+ }
556
+ .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-wrapper {
557
+ padding-bottom: 5px!important;
558
+ }
559
+ .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head h3 {
560
+ margin: 0;
561
+ font-size: inherit!important;
562
+ color:inherit!important;
563
+ }
564
+ .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter {
565
+ position: relative!important;
566
+ }
567
+ .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter.bapf_ccolaps .bapf_head {
568
+ border:2px solid #ccc!important;
569
+ color: black!important;
570
+ background-color: #ccc!important;
571
+ border-radius: 5px 5px 0 0!important;
572
+ padding-bottom: 5px!important;
573
+ }
574
+ .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_body {
575
+ position: absolute!important;
576
+ top:100%!important;
577
+ width:100%!important;
578
+ background-color:white!important;
579
+ z-index: 800!important;
580
+ margin: 0!important;
581
+ border:2px solid #ccc!important;
582
+ padding: 5px!important;
583
+ }
584
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_left .bapf_sfilter.bapf_ccolaps .bapf_body {
585
+ left: 0!important;
586
+ }
587
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_right .bapf_sfilter.bapf_ccolaps .bapf_body {
588
+ right: 0!important;
589
+ }
590
+ @media screen and (max-width: 767px){
591
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible {
592
+ position: fixed!important;
593
+ top: 0!important;
594
+ left: 0!important;
595
+ bottom: 0!important;
596
+ right:0!important;
597
+ z-index: 9000000000!important;
598
+ background-color: white!important;
599
+ overflow: auto!important;
600
+ }
601
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget {
602
+ border: 0!important;
603
+ width: 100%!important;
604
+ max-width: 100%!important;
605
+ }
606
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide {
607
+ display: block!important;
608
+ }
609
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-left:before,
610
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-right:before {
611
+ content: "\f00d"!important;
612
+ }
613
+ .berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_description {
614
+ display: none!important;
615
+ }
616
+ body .select2-container,
617
+ body .ui-widget.ui-datepicker {
618
+ z-index: 9000000009!important;
619
+ }
620
+ }
621
+ /*Products loading hide*/
622
+ @keyframes bapf_loader {
623
+ from { transform: rotate(0deg); }
624
+ to { transform: rotate(360deg); }
625
+ }
626
+ .bapf_loader_page {
627
+ position: fixed;
628
+ top: 0;
629
+ left: 0;
630
+ bottom: 0;
631
+ right: 0;
632
+ background-color: rgba(255,255,255, 0.5);
633
+ z-index: 9999;
634
+ }
635
+ .bapf_loader_page .bapf_lcontainer {
636
+ position: absolute;
637
+ top: 50%;
638
+ margin: 0;
639
+ margin-top: -20px;
640
+ left: 50%;
641
+ margin-left: -20px;
642
+ width: 30px;
643
+ height: 30px;
644
+ padding: 0;
645
+ }
646
+ .bapf_lcontainer .bapf_loader {
647
+ width: 100%;
648
+ height: 100%;
649
+ display: block;
650
+ transform: rotate(0deg);
651
+ animation: 1s linear 0s infinite bapf_loader;
652
+ position: relative;
653
+ }
654
+ .bapf_lcontainer .bapf_loader .bapf_lfirst,
655
+ .bapf_lcontainer .bapf_loader .bapf_lsecond {
656
+ position: absolute;
657
+ width: 10px;
658
+ height: 10px;
659
+ background: black;
660
+ background: linear-gradient(45deg, black, transparent);
661
+ display: block;
662
+ border-radius: 6px;
663
+ }
664
+ .bapf_lcontainer .bapf_loader .bapf_lfirst {
665
+ bottom: 0;
666
+ right: 0;
667
+ }
668
+ .bapf_lcontainer .bapf_loader .bapf_lsecond {
669
+ top: 0;
670
+ left: 0;
671
+ transform: rotate(180deg);
672
+ }
673
+ .bapf_lcontainer .bapf_labove,
674
+ .bapf_lcontainer .bapf_lbelow {
675
+ position: absolute;
676
+ display: block;
677
+ text-align: center;
678
+ width: 600px;
679
+ left: -285px;
680
+ width: 80vw;
681
+ left: calc(15px - 40vw);
682
+ }
683
+ .bapf_lcontainer .bapf_labove {
684
+ bottom: 120%;
685
+ }
686
+ .bapf_lcontainer .bapf_lbelow {
687
+ top: 120%;
688
+ }
689
+ .bapf_lcontainer .bapf_lbefore,
690
+ .bapf_lcontainer .bapf_lafter {
691
+ position: absolute;
692
+ top: 50%;
693
+ margin-top: -15px;
694
+ height: 30px;
695
+ line-height: 30px;
696
+ vertical-align: middle;
697
+ white-space: nowrap;
698
+ }
699
+ .bapf_lcontainer .bapf_lbefore {
700
+ right: 120%;
701
+ }
702
+ .bapf_lcontainer .bapf_lafter {
703
+ left: 120%;
704
+ }
705
+ .bapf_lcontainer .bapf_limg {
706
+ width: 100%;
707
+ height: 100%;
708
+ }
709
+
710
+ .berocket_single_filter_widget .tippy-tooltip,
711
+ .berocket_single_filter_widget .tippy-tooltip .tippy-content {
712
+ font-size: 1em;
713
+ }
714
+ @media only screen and (max-device-width: 767px) {
715
+ .bapf_hide_mobile {
716
+ display: none !important;
717
+ }
718
+ }
719
+ .bapf_sfilter .bapf_button {
720
+ font-size: 1em;
721
+ }
722
+ .bapf_sfilter .rightpcs {
723
+ float: right;
724
+ }
725
+ .bapf_sfilter .right2empcs {
726
+ padding-left: 10px;
727
+ }
728
+ #bapf_footer_description > div,
729
+ #bapf_footer_clrimg > div,
730
+ #bapf_footer_count_before > div {
731
+ z-index: 999999999999!important;
732
+ }
733
+ .bapf_sfilter.bapf_ckbox input[type=checkbox] {
734
+ margin-right: 5px;
735
+ }
736
+ .bapf_sfilter.bapf_ckbox input[type=checkbox],
737
+ .bapf_sfilter.bapf_ckbox label {
738
+ vertical-align: middle;
739
+ }
740
+ .select2-container--classic input[type='search'],
741
+ .select2-container--classic input[type='search']:focus {
742
+ background-color: initial;
743
+ }
744
+
745
+ .berocket_search_box_block {
746
+ position: relative;
747
+ padding: 0.5em;
748
+ }
749
+ .berocket_search_box_block .berocket_search_box_background_all {
750
+ position: relative;
751
+ z-index: 200;
752
+ }
753
+ .berocket_search_box_block .berocket_search_box_background {
754
+ z-index: 100;
755
+ position: absolute;
756
+ top: 0;
757
+ bottom: 0;
758
+ left: 0;
759
+ right: 0;
760
+ }
761
+ .berocket_search_box_block select {
762
+ min-width: 100%;
763
+ }
764
+ .berocket_search_box_button {
765
+ cursor: pointer;
766
+ display: block;
767
+ text-align: center;
768
+ padding: 5px 0;
769
+ }
770
+ .berocket_search_box_block .berocket_aapf_widget-wrapper ul {
771
+ margin: 0;
772
+ }
773
+ .berocket_search_box_block .berocket_aapf_widget-wrapper {
774
+ margin: 1em 0;
775
+ }
776
+ .bapf_sfilter.bapf_button_berocket .bapf_button {
777
+ font-size: 20px;
778
+ padding: 8px 30px;
779
+ border: 0;
780
+ line-height: 28px;
781
+ font-weight: 600;
782
+ display: inline-block;
783
+ color: #fff;
784
+ text-transform: uppercase;
785
+ text-align: center;
786
+ text-decoration: none;
787
+ background-color: #f16543;
788
+ }
789
+ .bapf_sfilter.bapf_button_berocket .bapf_button:hover {
790
+ background-color: #d94825;
791
+ }
792
+ .bapf_sfilter.bapf_colorinline li {
793
+ display: inline-block !important;
794
+ }
795
+ .bapf_sfilter .bapf_clr_span,
796
+ .bapf_sfilter .bapf_img_span {
797
+ display: inline-block!important;
798
+ position: relative;
799
+ overflow: hidden;
800
+ margin: 0;
801
+ margin-right: 5px;
802
+ margin-bottom: 5px;
803
+ margin-left: 5px;
804
+ margin-top: 5px;
805
+ height: 2em;
806
+ width: 2em;
807
+ line-height: 2em;
808
+ border: 2px solid black;
809
+ text-align: center;
810
+ vertical-align: middle;
811
+ color: #222 !important;
812
+ text-shadow:
813
+ 0px 0px 3px #FFF,
814
+ 1px 0px 2px #FFF,
815
+ 0px 1px 2px #FFF,
816
+ -1px 0px 2px #FFF,
817
+ 0px -1px 2px #FFF,
818
+ 1px 1px 2px #FFF,
819
+ 1px -1px 2px #FFF,
820
+ -1px 1px 2px #FFF,
821
+ -1px -1px 2px #FFF;
822
+ -webkit-transition: all 0.2s ease-out 0.1s;
823
+ -moz-transition: all 0.2s ease-out 0.1s;
824
+ -o-transition: all 0.2s ease-out 0.1s;
825
+ transition: all 0.2s ease-out 0.1s;
826
+ }
827
+ .bapf_sfilter .bapf_clr_span.h1em,
828
+ .bapf_sfilter .bapf_img_span.h1em {
829
+ height: 1em;
830
+ line-height: 1em;
831
+ }
832
+ .bapf_sfilter .bapf_clr_span.h2em,
833
+ .bapf_sfilter .bapf_img_span.h2em {
834
+ height: 2em;
835
+ line-height: 2em;
836
+ }
837
+ .bapf_sfilter .bapf_clr_span.h3em,
838
+ .bapf_sfilter .bapf_img_span.h3em {
839
+ height: 3em;
840
+ line-height: 3em;
841
+ }
842
+ .bapf_sfilter .bapf_clr_span.h4em,
843
+ .bapf_sfilter .bapf_img_span.h4em {
844
+ height: 4em;
845
+ line-height: 4em;
846
+ }
847
+ .bapf_sfilter .bapf_clr_span.h5em,
848
+ .bapf_sfilter .bapf_img_span.h5em {
849
+ height: 5em;
850
+ line-height: 5em;
851
+ }
852
+
853
+ .bapf_sfilter .bapf_clr_span.w1em,
854
+ .bapf_sfilter .bapf_img_span.w1em {
855
+ width: 1em;
856
+ }
857
+ .bapf_sfilter .bapf_clr_span.w2em,
858
+ .bapf_sfilter .bapf_img_span.w2em {
859
+ width: 2em;
860
+ }
861
+ .bapf_sfilter .bapf_clr_span.w3em,
862
+ .bapf_sfilter .bapf_img_span.w3em {
863
+ width: 3em;
864
+ }
865
+ .bapf_sfilter .bapf_clr_span.w4em,
866
+ .bapf_sfilter .bapf_img_span.w4em {
867
+ width: 4em;
868
+ }
869
+ .bapf_sfilter .bapf_clr_span.w5em,
870
+ .bapf_sfilter .bapf_img_span.w5em {
871
+ width: 5em;
872
+ }
873
+ .bapf_sfilter .bapf_img_span.w1em.h1em .fa,
874
+ .bapf_sfilter .bapf_img_span.w2em.h1em .fa,
875
+ .bapf_sfilter .bapf_img_span.w3em.h1em .fa,
876
+ .bapf_sfilter .bapf_img_span.w4em.h1em .fa,
877
+ .bapf_sfilter .bapf_img_span.w5em.h1em .fa,
878
+ .bapf_sfilter .bapf_img_span.w1em.h2em .fa,
879
+ .bapf_sfilter .bapf_img_span.w1em.h3em .fa,
880
+ .bapf_sfilter .bapf_img_span.w1em.h4em .fa,
881
+ .bapf_sfilter .bapf_img_span.w1em.h5em .fa {
882
+ font-size: 0.8em;
883
+ }
884
+ .bapf_sfilter .bapf_img_span.w2em.h2em .fa,
885
+ .bapf_sfilter .bapf_img_span.w3em.h2em .fa,
886
+ .bapf_sfilter .bapf_img_span.w4em.h2em .fa,
887
+ .bapf_sfilter .bapf_img_span.w5em.h2em .fa,
888
+ .bapf_sfilter .bapf_img_span.w2em.h3em .fa,
889
+ .bapf_sfilter .bapf_img_span.w2em.h4em .fa,
890
+ .bapf_sfilter .bapf_img_span.w2em.h5em .fa {
891
+ font-size: 1.6em;
892
+ }
893
+ .bapf_sfilter .bapf_img_span.w3em.h3em .fa,
894
+ .bapf_sfilter .bapf_img_span.w4em.h3em .fa,
895
+ .bapf_sfilter .bapf_img_span.w5em.h3em .fa,
896
+ .bapf_sfilter .bapf_img_span.w3em.h4em .fa,
897
+ .bapf_sfilter .bapf_img_span.w3em.h5em .fa {
898
+ font-size: 2.4em;
899
+ }
900
+ .bapf_sfilter .bapf_img_span.w4em.h4em .fa,
901
+ .bapf_sfilter .bapf_img_span.w5em.h4em .fa,
902
+ .bapf_sfilter .bapf_img_span.w4em.h5em .fa {
903
+ font-size: 3.2em;
904
+ }
905
+ .bapf_sfilter .bapf_img_span.w5em.h5em .fa {
906
+ font-size: 4em;
907
+ }
908
+ .bapf_sfilter .bapf_clr_span .bapf_clr_span_abslt {
909
+ position: relative;
910
+ z-index: 100;
911
+ }
912
+
913
+ .bapf_sfilter.brchecked_default input:checked + label .bapf_clr_span,
914
+ .bapf_sfilter.brchecked_default input:checked + label .bapf_img_span,
915
+ .bapf_sfilter.brchecked_rotate input:checked + label .bapf_clr_span,
916
+ .bapf_sfilter.brchecked_rotate input:checked + label .bapf_img_span {
917
+ -webkit-transform:rotate(15deg);
918
+ -moz-transform:rotate(15deg);
919
+ -ms-transform:rotate(15deg);
920
+ -o-transform:rotate(15deg);
921
+ transform:rotate(15deg);
922
+ }
923
+ .bapf_sfilter.brchecked_scale input:checked + label .bapf_clr_span,
924
+ .bapf_sfilter.brchecked_scale input:checked + label .bapf_img_span {
925
+ transform: scale(1.1);
926
+ }
927
+ .bapf_sfilter.brchecked_image_shadow input:checked + label .bapf_clr_span,
928
+ .bapf_sfilter.brchecked_shadow input:checked + label .bapf_clr_span,
929
+ .bapf_sfilter.brchecked_shadow input:checked + label .bapf_img_span {
930
+ box-shadow: 0px 0px 1px 3px #8888FF;
931
+ }
932
+
933
+ .bapf_sfilter.brchecked_image_shadow input:checked + label .bapf_img_span {
934
+ -webkit-filter: drop-shadow(0px 0px 2px);
935
+ -moz-filter: drop-shadow(0px 0px 2px);
936
+ -o-filter: drop-shadow(0px 0px 2px);
937
+ filter: drop-shadow(0px 0px 2px);
938
+ }
939
+ .bapf_sfilter.brchecked_hue_rotate input:checked + label .bapf_clr_span,
940
+ .bapf_sfilter.brchecked_hue_rotate input:checked + label .bapf_img_span {
941
+ -webkit-filter: hue-rotate(90deg);
942
+ -moz-filter: hue-rotate(90deg);
943
+ -o-filter: hue-rotate(90deg);
944
+ filter: hue-rotate(90deg);
945
+ }
946
+
947
+
948
+ .bapf_sfilter .bapf_clr_multi {
949
+ position: absolute;
950
+ top: 0;
951
+ bottom: 0;
952
+ left: 0;
953
+ right: 0;
954
+ z-index: 2;
955
+ transform: rotateZ(45deg);
956
+ padding: 0;
957
+ margin: 0;
958
+ box-sizing: border-box;
959
+ margin-top: -2em;
960
+ margin-bottom: -2em;
961
+ }
962
+ .bapf_sfilter .bapf_clr_multi .bapf_clr_multi_singl {
963
+ position: absolute;
964
+ top: -50%;
965
+ bottom: -50%;
966
+ padding: 0;
967
+ margin: 0;
968
+ box-shadow: none;
969
+ box-sizing: border-box;
970
+ border: 0;
971
+ }
972
+
973
+ .bapf_sfilter .bapf_clr_multi_2 .bapf_clr_multi_singl,
974
+ .bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl {
975
+ width:100%;
976
+ }
977
+ .bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_1 {
978
+ width:34%;
979
+ }
980
+ .bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_0,
981
+ .bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_2 {
982
+ width:83%;
983
+ }
984
+ .bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl {
985
+ width:25%;
986
+ }
987
+ .bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_0,
988
+ .bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_3 {
989
+ width:75%;
990
+ }
991
+
992
+ .bapf_sfilter .bapf_clr_multi .bapf_clr_multi_singl_0 {
993
+ left:-50%;
994
+ }
995
+
996
+ .bapf_sfilter .bapf_clr_multi_2 .bapf_clr_multi_singl_1 {
997
+ left:50%;
998
+ }
999
+
1000
+ .bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_1 {
1001
+ left:33%;
1002
+ }
1003
+
1004
+ .bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_1 {
1005
+ left:25%;
1006
+ }
1007
+
1008
+ .bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_2 {
1009
+ left:67%;
1010
+ }
1011
+
1012
+ .bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_2 {
1013
+ left:50%;
1014
+ }
1015
+
1016
+ .bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_3 {
1017
+ left:75%;
1018
+ }
1019
+ .bapf_sfilter.bapf_clr_txt_left .bapf_img_span {
1020
+ margin-right: 0;
1021
+ margin-left: 10px;
1022
+ margin-top: 5px;
1023
+ margin-bottom: 5px;
1024
+ }
1025
+ .bapf_sfilter.bapf_clr_txt_right .bapf_img_span {
1026
+ margin-right: 10px;
1027
+ margin-left: 0;
1028
+ margin-top: 5px;
1029
+ margin-bottom: 5px;
1030
+ }
1031
+ .bapf_sfilter.bapf_clr_txt_top .bapf_img_span,
1032
+ .bapf_sfilter.bapf_clr_txt_bottom .bapf_img_span {
1033
+ margin-right: 10px;
1034
+ margin-left: 10px;
1035
+ margin-top: 5px;
1036
+ margin-bottom: 5px;
1037
+ }
1038
+ .bapf_sfilter.bapf_colorinline.bapf_clr_txt_top li label,
1039
+ .bapf_sfilter.bapf_colorinline.bapf_clr_txt_bottom li label {
1040
+ display: inline-block!important;
1041
+ text-align: center;
1042
+ }
1043
+ .bapf_sfilter.bapf_clr_txt_top .bapf_clr_text,
1044
+ .bapf_sfilter.bapf_clr_txt_bottom .bapf_clr_text {
1045
+ display: block;
1046
+ margin-right: 10px;
1047
+ margin-left: 10px;
1048
+ }
1049
+ .bapf_colorinline .bapf_body li {
1050
+ text-align: center;
1051
+ }
1052
+ /*Image without border*/
1053
+ .bapf_img_woborder.bapf_sfilter .bapf_img_span {
1054
+ border:none;
1055
+ overflow: visible;
1056
+ }
1057
+ .bapf_asradio2 ul li input[type=checkbox] {
1058
+ -webkit-appearance: none;
1059
+ -moz-appearance: none;
1060
+ -ms-appearance: none;
1061
+ appearance: none;
1062
+ display: inline-block;
1063
+ vertical-align: middle;
1064
+ border: 2px solid #555;
1065
+ width: 15px;
1066
+ height: 15px;
1067
+ outline: none;
1068
+ border-radius: 10px;
1069
+ padding: 2px;
1070
+ margin-right: 5px;
1071
+ }
1072
+ .bapf_asradio2 ul li input[type="checkbox"]:checked {
1073
+ background: #555;
1074
+ background-clip: content-box;
1075
+ }
1076
+
1077
+ .bapf_slct select {
1078
+ width: 100%;
1079
+ font-size: 1em;
1080
+ }
1081
+ .bapf_slct .select2 .select2-search__field {
1082
+ width: auto!important;
1083
+ }
1084
+ .bapf_sfa_inline .berocket_aapf_widget_selected_area ul li{
1085
+ display: inline-block;
1086
+ margin-left: 3px!important;
1087
+ margin-right: 3px!important;
1088
+ }
1089
+ .bapf_ckbox_square input[type=checkbox] {
1090
+ -webkit-appearance: none;
1091
+ -moz-appearance: none;
1092
+ -ms-appearance: none;
1093
+ appearance: none;
1094
+ display: inline-block;
1095
+ vertical-align: middle;
1096
+ border: 2px solid #555;
1097
+ width: 20px;
1098
+ height: 20px;
1099
+ outline: none;
1100
+ padding: 4px;
1101
+ margin-right: 5px;
1102
+ }
1103
+
1104
+ .bapf_ckbox_square input[type="checkbox"]:checked {
1105
+ background: #555;
1106
+ background-clip: content-box;
1107
+ }
assets/frontend/css/main.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .bapf_sfilter .bapf_button,.bapf_sfilter label{cursor:pointer;display:inline-block!important}.bapf_sfilter ul li{list-style:none!important;margin:0!important;padding:0!important;max-width:100%}.bapf_slidr_main.ui-widget-content,.berocket_filter_price_slider.ui-widget-content{background:#b0b5b9;border:0;border-radius:0;height:4px;padding:0}.bapf_slidr_main.ui-widget-content .ui-slider-range,.berocket_filter_price_slider.ui-widget-content .ui-slider-range{background:#000}.slide.default .bapf_slidr_main.ui-widget-content .ui-slider-range,.slide.default .berocket_filter_price_slider.ui-widget-content .ui-slider-range{background:#222}.slide.default .bapf_slidr_main.ui-widget-content,.slide.default .berocket_filter_price_slider.ui-widget-content{height:4px;border:1px solid #555;font-size:10px}.bapf_slidr_main.ui-widget-content .ui-slider-handle,.berocket_filter_price_slider.ui-widget-content .ui-slider-handle,.slide.default .bapf_slidr_main .ui-state-default,.slide.default .bapf_slidr_main .ui-widget-header .ui-state-default,.slide.default .bapf_slidr_main.ui-widget-content .ui-state-default,.slide.default .berocket_filter_price_slider .ui-state-default,.slide.default .berocket_filter_price_slider .ui-widget-header .ui-state-default,.slide.default .berocket_filter_price_slider.ui-widget-content .ui-state-default{background:#ddd;font-size:14px;width:1em;height:1em;border:1px solid #555;top:-6px;border-radius:2em}.berocket_aapf_widget li.slider div.slide{clear:both;height:auto;text-align:right;line-height:0}.bapf_slidr_jqrui .bapf_from,.ui-slider{text-align:left}.ui-slider{position:relative}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:pointer;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.bapf_slidr_main>a:last-child{margin-left:-12px}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_left .bapf_sfilter.bapf_ccolaps .bapf_body,.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_left .berocket_aapf_widget{left:0!important}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.slide .ui-corner-all,.slide .ui-corner-bottom,.slide .ui-corner-br,.slide .ui-corner-right{border-bottom-right-radius:4px}.slide .ui-corner-all,.slide .ui-corner-bl,.slide .ui-corner-bottom,.slide .ui-corner-left{border-bottom-left-radius:4px}.slide .ui-corner-all,.slide .ui-corner-right,.slide .ui-corner-top,.slide .ui-corner-tr{border-top-right-radius:4px}.slide .ui-corner-all,.slide .ui-corner-left,.slide .ui-corner-tl,.slide .ui-corner-top{border-top-left-radius:4px}ul.berocket_aapf_widget li.slider>span{cursor:initial}ul.berocket_aapf_widget li.slider .bapf_slidr_main{cursor:pointer}.slide .ui-widget-content{background:#fff;border:1px solid #aaa;color:#222}.slide .ui-state-default,.slide .ui-widget-content .ui-state-default,.slide .ui-widget-header .ui-state-default{background:#e6e6e6;border:1px solid #d3d3d3;color:#555;font-weight:400}.ui-widget.ui-datepicker{font-size:14px;z-index:9000!important}.bapf_sfilter .ui-button,.bapf_sfilter .ui-state-default,.bapf_sfilter .ui-widget-content .ui-state-default,.bapf_sfilter .ui-widget-header .ui-state-default,.bapf_sfilter .ui-widget.ui-widget-content,html .bapf_sfilter .ui-button.ui-state-disabled:active,html .bapf_sfilter .ui-button.ui-state-disabled:hover{border:0}.bapf_slidr_jqrui .bapf_slidr_all:after{content:"";display:block;clear:both}.bapf_slidr_jqrui .bapf_slidr_main{margin-bottom:10px}.bapf_slidr_jqrui .bapf_from,.bapf_slidr_jqrui .bapf_to{width:49%;display:inline-block;margin-bottom:10px;vertical-align:middle}.bapf_slidr_jqrui .bapf_from input,.bapf_slidr_jqrui .bapf_to input{width:50%;vertical-align:middle;font-size:1em;padding:0;margin:0;line-height:1em}.bapf_slidr_jqrui .bapf_to{text-align:right}.bapf_sfilter{margin-bottom:20px}.berocket_single_filter_widget.berocket_inline_clickable,.berocket_single_filter_widget.berocket_inline_filters{float:left!important;padding-right:15px!important}.berocket_single_filter_widget.berocket_inline_filters{width:12.5%!important}#berocket-ajax-filters-sidebar .berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div,.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div{border:2px solid #333!important;background-color:#333!important;color:#ccc!important;padding:5px 35px 5px 5px!important;border-radius:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-title_div h3{margin:0!important;padding:0!important;font-size:inherit!important;color:inherit!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-title_div{border:2px solid #ccc!important;color:#000!important;background-color:#ccc!important;border-radius:5px 5px 0 0!important;padding-bottom:10px!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget-wrapper{padding-bottom:0!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget{position:absolute!important;top:100%!important;width:100%!important;background-color:#fff!important;z-index:800!important;margin:0!important;border:2px solid #ccc!important;padding:5px!important;display:none}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget{z-index:900!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_right .berocket_aapf_widget{right:0!important}.berocket_ajax_filters_sidebar_toggle,.berocket_element_above_products_is_hide_toggle{width:200px!important;padding-left:25px;outline:0!important;font-size:16px;position:relative;font-weight:600}.berocket_element_above_products{clear:both!important;overflow:visible!important}.berocket_single_filter_widget.bapf_mt_none{display:none!important}div.berocket_single_filter_widget div.berocket_aapf_widget-wrapper *{opacity:1}@media screen and (max-width:767px){.bapf_sngl_hd_mobile{display:none!important}}@media screen and (min-width:768px) and (max-width:1024px){.bapf_sngl_hd_tablet{display:none!important}}@media screen and (min-width:1025px){.bapf_sngl_hd_desktop{display:none!important}}.berocket_aapf_widget select{overflow:auto!important}.berocket_element_above_products_after{clear:both}ul.berocket_aapf_widget li>span>input+.berocket_label_widgets::before{margin-right:6px}.berocket_element_above_products_is_hide{overflow:visible!important}.berocket_element_above_products_is_hide:after{content:"";display:block;clear:both}.berocket_element_above_products_is_hide.br_is_hidden{opacity:0;max-height:1px;position:relative}.berocket_element_above_products_is_hide_toggle{height:20px;margin:40px 0;display:inline-block;color:#2a2a2a}body{transition:margin-left .2s}body.berocket_ajax_filters_sidebar_active{margin-left:200px}.berocket_ajax_filters_sidebar_toggle{height:26px;margin:40px 0;display:inline-block;text-decoration:none!important;box-sizing:border-box!important}#berocket-ajax-filters-sidebar{display:block;position:fixed;top:0;left:-350px;bottom:0;width:350px;max-width:100%;background:#fff;transition:all .2s;z-index:100000;box-sizing:border-box;overflow:auto!important}#berocket-ajax-filters-sidebar-shadow{content:"";display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:99999;background:#000;opacity:.7}.admin-bar #berocket-ajax-filters-sidebar{top:32px}#berocket-ajax-filters-sidebar.active,#berocket-ajax-filters-sidebar.active+#berocket-ajax-filters-sidebar-shadow{left:0;display:block}#berocket-ajax-filters-sidebar .berocket_ajax_group_filter_title{padding:15px 88px 15px 15px!important;font-weight:500!important;font-size:24px!important;color:#333!important;border-bottom:1px solid #ccc!important}#berocket-ajax-filters-sidebar>div{padding:15px!important}#berocket-ajax-filters-sidebar .berocket_aapf_widget-title_div{color:#333!important;font-size:19px!important;font-weight:600!important}#berocket-ajax-filters-sidebar .berocket_aapf_widget,#berocket-ajax-filters-sidebar .berocket_aapf_widget li{margin:0!important}#berocket-ajax-filters-sidebar .berocket_aapf_widget .berocket_checkbox_color .berocket_label_widgets{margin:0 .6em .6em 0!important}#berocket-ajax-filters-sidebar-close{position:absolute!important;right:0!important;line-height:39px;padding:17px 15px 13px!important;font-family:Arial,serif!important;color:#a2a2a2}#berocket-ajax-filters-sidebar-close+*{margin-top:70px!important}#berocket-ajax-filters-sidebar-close+.berocket_ajax_group_filter_title{margin-top:0!important}@media screen and (max-width:782px){.admin-bar #berocket-ajax-filters-sidebar{top:46px}}@media screen and (max-width:600px){.admin-bar #berocket-ajax-filters-sidebar{top:0}}.berocket_aapf_widget-wrapper .slider:not(.flickity-enabled){overflow:initial;white-space:initial}.select2-container{z-index:999}.bapf_sfilter .bapf_body>ul{margin-left:0}.bapf_sfilter.bapf_vpr_1 .bapf_body ul,.bapf_sfilter.bapf_vpr_2 .bapf_body ul,.bapf_sfilter.bapf_vpr_3 .bapf_body ul,.bapf_sfilter.bapf_vpr_4 .bapf_body ul{display:flex;flex-wrap:wrap}.bapf_sfilter.bapf_vpr_1 .bapf_body ul>li,.bapf_sfilter.bapf_vpr_2 .bapf_body ul>li,.bapf_sfilter.bapf_vpr_3 .bapf_body ul>li,.bapf_sfilter.bapf_vpr_4 .bapf_body ul>li{white-space:nowrap}.bapf_sfilter.bapf_vpr_1 .bapf_body ul>li{flex-basis:100%}.bapf_sfilter.bapf_vpr_2 .bapf_body ul>li{flex-basis:50%}.bapf_sfilter.bapf_vpr_3 .bapf_body ul>li{flex-basis:33%}.bapf_sfilter.bapf_vpr_4 .bapf_body ul>li{flex-basis:25%}.bapf_sfilter.bapf_vpr_1 .bapf_body ul>li label,.bapf_sfilter.bapf_vpr_2 .bapf_body ul>li label,.bapf_sfilter.bapf_vpr_3 .bapf_body ul>li label,.bapf_sfilter.bapf_vpr_4 .bapf_body ul>li label{white-space:initial}.bapf_sfilter.bapf_fhide .bapf_body ul li.bapf_hide,.bapf_sfilter.bapf_fhide.bapf_filter_hide{display:none!important}.bapf_sfilter .bapf_hascolarr,.bapf_sfilter .bapf_hasdesc{position:relative;padding-right:25px}.bapf_sfilter .bapf_colaps_smb,.bapf_sfilter .bapf_desci{position:absolute;right:0;top:0}.bapf_sfilter .bapf_hasdesc .bapf_colaps_smb{right:25px}#berocket-ajax-filters-sidebar .berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head,.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head{border:2px solid #333!important;background-color:#333!important;color:#ccc!important;padding:5px!important;border-radius:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_widget_has_description .berocket_aapf_widget-title_div{padding-right:55px!important}.berocket_single_filter_widget.berocket_hidden_clickable .berocket_aapf_widget-wrapper{padding-bottom:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_head h3{margin:0;font-size:inherit!important;color:inherit!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter{position:relative!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter.bapf_ccolaps .bapf_head{border:2px solid #ccc!important;color:#000!important;background-color:#ccc!important;border-radius:5px 5px 0 0!important;padding-bottom:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable .bapf_sfilter .bapf_body{position:absolute!important;top:100%!important;width:100%!important;background-color:#fff!important;z-index:800!important;margin:0!important;border:2px solid #ccc!important;padding:5px!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_hidden_clickable_right .bapf_sfilter.bapf_ccolaps .bapf_body{right:0!important}@media screen and (max-width:767px){.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible{position:fixed!important;top:0!important;left:0!important;bottom:0!important;right:0!important;z-index:9000000000!important;background-color:#fff!important;overflow:auto!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget{border:0!important;width:100%!important;max-width:100%!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide{display:block!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-left:before,.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_widget_show.mobile_hide .fa-angle-right:before{content:"\f00d"!important}.berocket_single_filter_widget.berocket_hidden_clickable.berocket_single_filter_visible .berocket_aapf_description{display:none!important}body .select2-container,body .ui-widget.ui-datepicker{z-index:9000000009!important}}@keyframes bapf_loader{from{transform:rotate(0)}to{transform:rotate(360deg)}}.bapf_loader_page{position:fixed;top:0;left:0;bottom:0;right:0;background-color:rgba(255,255,255,.5);z-index:9999}.bapf_loader_page .bapf_lcontainer{position:absolute;top:50%;margin:-20px 0 0 -20px;left:50%;width:30px;height:30px;padding:0}.bapf_lcontainer .bapf_loader{width:100%;height:100%;display:block;transform:rotate(0);animation:1s linear 0s infinite bapf_loader;position:relative}.bapf_lcontainer .bapf_loader .bapf_lfirst,.bapf_lcontainer .bapf_loader .bapf_lsecond{position:absolute;width:10px;height:10px;background:#000;background:linear-gradient(45deg,#000,transparent);display:block;border-radius:6px}.bapf_lcontainer .bapf_loader .bapf_lfirst{bottom:0;right:0}.bapf_lcontainer .bapf_loader .bapf_lsecond{top:0;left:0;transform:rotate(180deg)}.bapf_lcontainer .bapf_labove,.bapf_lcontainer .bapf_lbelow{position:absolute;display:block;text-align:center;width:80vw;left:calc(15px - 40vw)}.bapf_lcontainer .bapf_labove{bottom:120%}.bapf_lcontainer .bapf_lbelow{top:120%}.bapf_lcontainer .bapf_lafter,.bapf_lcontainer .bapf_lbefore{position:absolute;top:50%;margin-top:-15px;height:30px;line-height:30px;vertical-align:middle;white-space:nowrap}.bapf_lcontainer .bapf_lbefore{right:120%}.bapf_lcontainer .bapf_lafter{left:120%}.bapf_lcontainer .bapf_limg{width:100%;height:100%}.berocket_single_filter_widget .tippy-tooltip,.berocket_single_filter_widget .tippy-tooltip .tippy-content{font-size:1em}@media only screen and (max-device-width:767px){.bapf_hide_mobile{display:none!important}}.bapf_sfilter .bapf_button{font-size:1em}.bapf_sfilter .rightpcs{float:right}.bapf_sfilter .right2empcs{padding-left:10px}#bapf_footer_clrimg>div,#bapf_footer_count_before>div,#bapf_footer_description>div{z-index:999999999999!important}.bapf_sfilter.bapf_ckbox input[type=checkbox]{margin-right:5px}.bapf_sfilter.bapf_ckbox input[type=checkbox],.bapf_sfilter.bapf_ckbox label{vertical-align:middle}.select2-container--classic input[type=search],.select2-container--classic input[type=search]:focus{background-color:initial}.berocket_search_box_block{position:relative;padding:.5em}.berocket_search_box_block .berocket_search_box_background_all{position:relative;z-index:200}.berocket_search_box_block .berocket_search_box_background{z-index:100;position:absolute;top:0;bottom:0;left:0;right:0}.berocket_search_box_block select{min-width:100%}.berocket_search_box_button{cursor:pointer;display:block;text-align:center;padding:5px 0}.berocket_search_box_block .berocket_aapf_widget-wrapper ul{margin:0}.berocket_search_box_block .berocket_aapf_widget-wrapper{margin:1em 0}.bapf_sfilter.bapf_button_berocket .bapf_button{font-size:20px;padding:8px 30px;border:0;line-height:28px;font-weight:600;display:inline-block;color:#fff;text-transform:uppercase;text-align:center;text-decoration:none;background-color:#f16543}.bapf_sfilter.bapf_button_berocket .bapf_button:hover{background-color:#d94825}.bapf_sfilter.bapf_colorinline li{display:inline-block!important}.bapf_sfilter .bapf_clr_span,.bapf_sfilter .bapf_img_span{display:inline-block!important;position:relative;overflow:hidden;margin:5px;height:2em;width:2em;line-height:2em;border:2px solid #000;text-align:center;vertical-align:middle;color:#222!important;text-shadow:0 0 3px #FFF,1px 0 2px #FFF,0 1px 2px #FFF,-1px 0 2px #FFF,0 -1px 2px #FFF,1px 1px 2px #FFF,1px -1px 2px #FFF,-1px 1px 2px #FFF,-1px -1px 2px #FFF;-webkit-transition:all .2s ease-out .1s;-moz-transition:all .2s ease-out .1s;-o-transition:all .2s ease-out .1s;transition:all .2s ease-out .1s}.bapf_sfilter .bapf_clr_span.h1em,.bapf_sfilter .bapf_img_span.h1em{height:1em;line-height:1em}.bapf_sfilter .bapf_clr_span.h2em,.bapf_sfilter .bapf_img_span.h2em{height:2em;line-height:2em}.bapf_sfilter .bapf_clr_span.h3em,.bapf_sfilter .bapf_img_span.h3em{height:3em;line-height:3em}.bapf_sfilter .bapf_clr_span.h4em,.bapf_sfilter .bapf_img_span.h4em{height:4em;line-height:4em}.bapf_sfilter .bapf_clr_span.h5em,.bapf_sfilter .bapf_img_span.h5em{height:5em;line-height:5em}.bapf_sfilter .bapf_clr_span.w1em,.bapf_sfilter .bapf_img_span.w1em{width:1em}.bapf_sfilter .bapf_clr_span.w2em,.bapf_sfilter .bapf_img_span.w2em{width:2em}.bapf_sfilter .bapf_clr_span.w3em,.bapf_sfilter .bapf_img_span.w3em{width:3em}.bapf_sfilter .bapf_clr_span.w4em,.bapf_sfilter .bapf_img_span.w4em{width:4em}.bapf_sfilter .bapf_clr_span.w5em,.bapf_sfilter .bapf_img_span.w5em{width:5em}.bapf_sfilter .bapf_img_span.w1em.h1em .fa,.bapf_sfilter .bapf_img_span.w1em.h2em .fa,.bapf_sfilter .bapf_img_span.w1em.h3em .fa,.bapf_sfilter .bapf_img_span.w1em.h4em .fa,.bapf_sfilter .bapf_img_span.w1em.h5em .fa,.bapf_sfilter .bapf_img_span.w2em.h1em .fa,.bapf_sfilter .bapf_img_span.w3em.h1em .fa,.bapf_sfilter .bapf_img_span.w4em.h1em .fa,.bapf_sfilter .bapf_img_span.w5em.h1em .fa{font-size:.8em}.bapf_sfilter .bapf_img_span.w2em.h2em .fa,.bapf_sfilter .bapf_img_span.w2em.h3em .fa,.bapf_sfilter .bapf_img_span.w2em.h4em .fa,.bapf_sfilter .bapf_img_span.w2em.h5em .fa,.bapf_sfilter .bapf_img_span.w3em.h2em .fa,.bapf_sfilter .bapf_img_span.w4em.h2em .fa,.bapf_sfilter .bapf_img_span.w5em.h2em .fa{font-size:1.6em}.bapf_sfilter .bapf_img_span.w3em.h3em .fa,.bapf_sfilter .bapf_img_span.w3em.h4em .fa,.bapf_sfilter .bapf_img_span.w3em.h5em .fa,.bapf_sfilter .bapf_img_span.w4em.h3em .fa,.bapf_sfilter .bapf_img_span.w5em.h3em .fa{font-size:2.4em}.bapf_sfilter .bapf_img_span.w4em.h4em .fa,.bapf_sfilter .bapf_img_span.w4em.h5em .fa,.bapf_sfilter .bapf_img_span.w5em.h4em .fa{font-size:3.2em}.bapf_sfilter .bapf_img_span.w5em.h5em .fa{font-size:4em}.bapf_sfilter .bapf_clr_span .bapf_clr_span_abslt{position:relative;z-index:100}.bapf_sfilter.brchecked_default input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_default input:checked+label .bapf_img_span,.bapf_sfilter.brchecked_rotate input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_rotate input:checked+label .bapf_img_span{-webkit-transform:rotate(15deg);-moz-transform:rotate(15deg);-ms-transform:rotate(15deg);-o-transform:rotate(15deg);transform:rotate(15deg)}.bapf_sfilter.brchecked_scale input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_scale input:checked+label .bapf_img_span{transform:scale(1.1)}.bapf_sfilter.brchecked_image_shadow input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_shadow input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_shadow input:checked+label .bapf_img_span{box-shadow:0 0 1px 3px #88F}.bapf_sfilter.brchecked_image_shadow input:checked+label .bapf_img_span{-webkit-filter:drop-shadow(0 0 2px);-moz-filter:drop-shadow(0 0 2px);-o-filter:drop-shadow(0 0 2px);filter:drop-shadow(0 0 2px)}.bapf_sfilter.brchecked_hue_rotate input:checked+label .bapf_clr_span,.bapf_sfilter.brchecked_hue_rotate input:checked+label .bapf_img_span{-webkit-filter:hue-rotate(90deg);-moz-filter:hue-rotate(90deg);-o-filter:hue-rotate(90deg);filter:hue-rotate(90deg)}.bapf_sfilter .bapf_clr_multi{position:absolute;top:0;bottom:0;left:0;right:0;z-index:2;transform:rotateZ(45deg);padding:0;margin:-2em 0;box-sizing:border-box}.bapf_sfilter .bapf_clr_multi .bapf_clr_multi_singl{position:absolute;top:-50%;bottom:-50%;padding:0;margin:0;box-shadow:none;box-sizing:border-box;border:0}.bapf_sfilter .bapf_clr_multi_2 .bapf_clr_multi_singl,.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl{width:100%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_1{width:34%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_0,.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_2{width:83%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl{width:25%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_0,.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_3{width:75%}.bapf_sfilter .bapf_clr_multi .bapf_clr_multi_singl_0{left:-50%}.bapf_sfilter .bapf_clr_multi_2 .bapf_clr_multi_singl_1{left:50%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_1{left:33%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_1{left:25%}.bapf_sfilter .bapf_clr_multi_3 .bapf_clr_multi_singl_2{left:67%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_2{left:50%}.bapf_sfilter .bapf_clr_multi_4 .bapf_clr_multi_singl_3{left:75%}.bapf_sfilter.bapf_clr_txt_left .bapf_img_span{margin:5px 0 5px 10px}.bapf_sfilter.bapf_clr_txt_right .bapf_img_span{margin:5px 10px 5px 0}.bapf_sfilter.bapf_clr_txt_bottom .bapf_img_span,.bapf_sfilter.bapf_clr_txt_top .bapf_img_span{margin:5px 10px}.bapf_sfilter.bapf_colorinline.bapf_clr_txt_bottom li label,.bapf_sfilter.bapf_colorinline.bapf_clr_txt_top li label{display:inline-block!important;text-align:center}.bapf_sfilter.bapf_clr_txt_bottom .bapf_clr_text,.bapf_sfilter.bapf_clr_txt_top .bapf_clr_text{display:block;margin-right:10px;margin-left:10px}.bapf_colorinline .bapf_body li{text-align:center}.bapf_img_woborder.bapf_sfilter .bapf_img_span{border:none;overflow:visible}.bapf_asradio2 ul li input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;display:inline-block;vertical-align:middle;border:2px solid #555;width:15px;height:15px;outline:0;border-radius:10px;padding:2px;margin-right:5px}.bapf_asradio2 ul li input[type=checkbox]:checked{background:#555;background-clip:content-box}.bapf_slct select{width:100%;font-size:1em}.bapf_slct .select2 .select2-search__field{width:auto!important}.bapf_sfa_inline .berocket_aapf_widget_selected_area ul li{display:inline-block;margin-left:3px!important;margin-right:3px!important}.bapf_ckbox_square input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;display:inline-block;vertical-align:middle;border:2px solid #555;width:20px;height:20px;outline:0;padding:4px;margin-right:5px}.bapf_ckbox_square input[type=checkbox]:checked{background:#555;background-clip:content-box}
{css → assets/frontend/css}/select2.fixed.css RENAMED
File without changes
assets/frontend/css/select2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
{css → assets/frontend/css}/themes.css RENAMED
File without changes
assets/frontend/js/Scrollbar.concat.min.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */
2
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
3
+ /* == malihu jquery custom scrollbar plugin == Version: 3.1.5, License: MIT License (MIT) */
4
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+n.langDir+"' /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' "+r+" />","<a href='#' class='"+d[14]+"' "+r+" />","<a href='#' class='"+d[15]+"' "+r+" />","<a href='#' class='"+d[16]+"' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,"y","all",!0),B.overflowed[1]&&s(w[1],R,n,"x",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c="yx"!==n.axis||s[0]||s[1]?"all":"none";"x"===n.axis||s[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===n.axis||s[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){
5
+ return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind("load",function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});
assets/frontend/js/fullmain.min.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c,d=[error_exist];c<arguments.length;c++)d.push(arguments[c]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,d),d[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}function d(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;f.length>e;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}};var e=0,f=Array.prototype.slice;a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(a){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var c,d,e=f.call(arguments,1),g=0,h=e.length;h>g;g++)for(c in e[g])d=e[g][c],e[g].hasOwnProperty(c)&&void 0!==d&&(b[c]=a.isPlainObject(d)?a.isPlainObject(b[c])?a.widget.extend({},b[c],d):a.widget.extend({},d):d);return b},a.widget.bridge=function(b,c){var d=c.prototype.widgetFullName||b;a.fn[b]=function(e){var g="string"==typeof e,h=f.call(arguments,1),i=this;return g?this.each(function(){var c,f=a.data(this,d);return"instance"===e?(i=f,!1):f?a.isFunction(f[e])&&"_"!==e.charAt(0)?(c=f[e].apply(f,h),c!==f&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+e+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+e+"'")}):(h.length&&(e=a.widget.extend.apply(null,[e].concat(h))),this.each(function(){var b=a.data(this,d);b?(b.option(e||{}),b._init&&b._init()):a.data(this,d,new c(e,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,c){c=a(c||this.defaultElement||this)[0],this.element=a(c),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),c!==this&&(a.data(c,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===c&&this.destroy()}}),this.document=a(c.style?c.ownerDocument:c.document||c),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;d.length-1>f;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){return b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled")?("string"==typeof g?f[g]:g).apply(f,arguments):void 0}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget;var g=!1;a(document).mouseup(function(){g=!1}),a.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){return!0===a.data(c.target,b.widgetName+".preventClickEvent")?(a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!g){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var c=this,d=1===b.which,e=!("string"!=typeof this.options.cancel||!b.target.nodeName)&&a(b.target).closest(this.options.cancel).length;return!(d&&!e&&this._mouseCapture(b))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted)?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return c._mouseMove(a)},this._mouseUpDelegate=function(a){return c._mouseUp(a)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),g=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||9>document.documentMode)&&!b.button)return this._mouseUp(b);if(!b.which)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),g=!1,!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function b(a,b,c){return[parseFloat(a[0])*(n.test(a[0])?b/100:1),parseFloat(a[1])*(n.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var e,f,g=Math.max,h=Math.abs,i=Math.round,j=/left|center|right/,k=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,m=/^\w+/,n=/%$/,o=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d||e?c.width():c.outerWidth(),height:d||e?c.height():c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return o.apply(this,arguments);e=a.extend({},e);var n,p,q,r,s,t,u=a(e.of),v=a.position.getWithinInfo(e.within),w=a.position.getScrollInfo(v),x=(e.collision||"flip").split(" "),y={};return t=d(u),u[0].preventDefault&&(e.at="left top"),p=t.width,q=t.height,r=t.offset,s=a.extend({},r),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=j.test(c[0])?c.concat(["center"]):k.test(c[0])?["center"].concat(c):["center","center"]),c[0]=j.test(c[0])?c[0]:"center",c[1]=k.test(c[1])?c[1]:"center",a=l.exec(c[0]),b=l.exec(c[1]),y[this]=[a?a[0]:0,b?b[0]:0],e[this]=[m.exec(c[0])[0],m.exec(c[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?s.left+=p:"center"===e.at[0]&&(s.left+=p/2),"bottom"===e.at[1]?s.top+=q:"center"===e.at[1]&&(s.top+=q/2),n=b(y.at,p,q),s.left+=n[0],s.top+=n[1],this.each(function(){var d,j,k=a(this),l=k.outerWidth(),m=k.outerHeight(),o=c(this,"marginLeft"),t=c(this,"marginTop"),z=l+o+c(this,"marginRight")+w.width,A=m+t+c(this,"marginBottom")+w.height,B=a.extend({},s),C=b(y.my,k.outerWidth(),k.outerHeight());"right"===e.my[0]?B.left-=l:"center"===e.my[0]&&(B.left-=l/2),"bottom"===e.my[1]?B.top-=m:"center"===e.my[1]&&(B.top-=m/2),B.left+=C[0],B.top+=C[1],f||(B.left=i(B.left),B.top=i(B.top)),d={marginLeft:o,marginTop:t},a.each(["left","top"],function(b,c){a.ui.position[x[b]]&&a.ui.position[x[b]][c](B,{targetWidth:p,targetHeight:q,elemWidth:l,elemHeight:m,collisionPosition:d,collisionWidth:z,collisionHeight:A,offset:[n[0]+C[0],n[1]+C[1]],my:e.my,at:e.at,within:v,elem:k})}),e.using&&(j=function(a){var b=r.left-B.left,c=b+p-l,d=r.top-B.top,f=d+q-m,i={target:{element:u,left:r.left,top:r.top,width:p,height:q},element:{element:k,left:B.left,top:B.top,width:l,height:m},horizontal:0>c?"left":b>0?"right":"center",vertical:0>f?"top":d>0?"bottom":"middle"};l>p&&p>h(b+c)&&(i.horizontal="center"),m>q&&q>h(d+f)&&(i.vertical="middle"),i.important=g(h(b),h(c))>g(h(d),h(f))?"horizontal":"vertical",e.using.call(this,a,i)}),k.offset(a.extend(B,{using:j}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,f=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-f-e;b.collisionWidth>f?i>0&&0>=j?(c=a.left+i+b.collisionWidth-f-e,a.left+=i-c):a.left=j>0&&0>=i?e:i>j?e+f-b.collisionWidth:e:i>0?a.left+=i:j>0?a.left-=j:a.left=g(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,f=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-f-e;b.collisionHeight>f?i>0&&0>=j?(c=a.top+i+b.collisionHeight-f-e,a.top+=i-c):a.top=j>0&&0>=i?e:i>j?e+f-b.collisionHeight:e:i>0?a.top+=i:j>0?a.top-=j:a.top=g(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,g=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-g-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];0>k?(c=a.left+m+n+o+b.collisionWidth-g-f,(0>c||h(k)>c)&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||l>h(d))&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,g=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-g-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];0>k?(d=a.top+n+o+p+b.collisionHeight-g-f,(0>d||h(k)>d)&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||l>h(c))&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,g,h=document.getElementsByTagName("body")[0],i=document.createElement("div");b=document.createElement(h?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},h&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(g in d)b.style[g]=d[g];b.appendChild(i),c=h||document.documentElement,c.insertBefore(b,c.firstChild),i.style.cssText="position: absolute; left: 10.7432222px;",e=a(i).offset().left,f=e>10&&11>e,b.innerHTML="",c.removeChild(b)}()}(),a.ui.position,a.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),0>b.active&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),a=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&(this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var b,c=this.options,d=c.heightStyle,e=this.element.parent();this.active=this._findActive(c.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var b=a(this),c=b.uniqueId().attr("id"),d=b.next(),e=d.uniqueId().attr("id");b.attr("aria-controls",e),d.attr("aria-labelledby",c)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(c.event),"fill"===d?(b=e.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-hidden":"true"}),d.prev().attr({"aria-selected":"false","aria-expanded":"false"}),c.length&&d.length?d.prev().attr({tabIndex:-1,"aria-expanded":"false"}):c.length&&this.headers.filter(function(){return 0===parseInt(a(this).attr("tabIndex"),10)}).attr("tabIndex",-1),c.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var d,e,f,g=this,h=0,i=a.css("box-sizing"),j=a.length&&(!b.length||a.index()<b.index()),k=this.options.animate||{},l=j&&k.down||k,m=function(){g._toggleComplete(c)};return"number"==typeof l&&(f=l),"string"==typeof l&&(e=l),e=e||l.easing||k.easing,f=f||l.duration||k.duration,b.length?a.length?(d=a.show().outerHeight(),b.animate(this.hideProps,{duration:f,easing:e,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(this.showProps,{duration:f,easing:e,complete:m,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?"content-box"===i&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(d-b.outerHeight()-h),h=0)}})):b.animate(this.hideProps,f,e,m):a.animate(this.showProps,f,e,m)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}}),a.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(b){var c=a(b.target);!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.select(b),b.isPropagationStopped()||(this.mouseHandled=!0),c.has(".ui-menu").length?this.expand(b):!this.element.is(":focus")&&a(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){if(!this.previousFilter){var c=a(b.currentTarget);c.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){
2
+ var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){var c,d,e,f,g=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:g=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,c=this._filterMenuItems(e),c=f&&-1!==c.index(this.active.next())?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),c=this._filterMenuItems(e)),c.length?(this.focus(b,c),this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}g&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(a):this.select(a))},refresh:function(){var b,c,d=this,e=this.options.icons.submenu,f=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),c=b.parent(),d=a("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);c.attr("aria-haspopup","true").prepend(d),b.attr("aria-labelledby",c.attr("id"))}),b=f.add(this.element),c=b.find(this.options.items),c.not(".ui-menu-item").each(function(){var b=a(this);d._isDivider(b)&&b.addClass("ui-widget-content ui-menu-divider")}),c.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),c.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.outerHeight(),0>e?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(b){return!a(b.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.find(this.options.items)[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),0>c.offset().top-d-e}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.find(this.options.items).first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)},_filterMenuItems:function(b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),d=RegExp("^"+c,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return d.test(a.trim(a(this).text()))})}}),a.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){var d,e;return this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)})):(e=c.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",b,{item:e})&&b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(e.value),d=c.item.attr("aria-label")||e.value,void(d&&a.trim(d).length&&(this.liveRegion.children().hide(),a("<div>").text(d).appendTo(this.liveRegion))))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),d=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;(!b||b&&!c&&!d)&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var b=++this.requestIndex;return a.proxy(function(a){b===this.requestIndex&&this.__response(a),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({},b,{label:b.label||b.value,value:b.value||b.label})})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").text(c.label).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(b){var c;this._superApply(arguments),this.options.disabled||this.cancelSearch||(c=b&&b.length?this.options.messages.results(b.length):this.options.messages.noResults,this.liveRegion.children().hide(),a("<div>").text(c).appendTo(this.liveRegion))}}),a.ui.autocomplete;var h,i="ui-button ui-widget ui-state-default ui-corner-all",j="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",k=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},l=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"'][type=radio]"):a("[name='"+c+"'][type=radio]",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,k),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d="checkbox"===this.type||"radio"===this.type,e=d?"":"ui-state-active";null===c.label&&(c.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){c.disabled||this===h&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){c.disabled||a(this).removeClass(e)}).bind("click"+this.eventNamespace,function(a){c.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),d&&this.element.bind("change"+this.eventNamespace,function(){b.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return!c.disabled&&void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(c.disabled)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var d=b.element[0];l(d).not(d).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!c.disabled&&(a(this).addClass("ui-state-active"),h=this,void b.document.one("mouseup",function(){h=null}))}).bind("mouseup"+this.eventNamespace,function(){return!c.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!c.disabled&&void((b.keyCode===a.ui.keyCode.SPACE||b.keyCode===a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",c.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+j).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),void(b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?l(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(j),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction"),c=this.element.find(this.options.items),d=c.filter(":ui-button");c.not(":ui-button").button(),d.button("refresh"),this.buttons=c.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),a.ui.button,a.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+"-button",menu:a+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var b=this;this.label=a("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(a){this.button.focus(),a.preventDefault()}}),this.element.hide(),this.button=a("<span>",{class:"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),a("<span>",{class:"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=a("<span>",{class:"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){b.menuItems||b._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var b=this;this.menu=a("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=a("<div>",{class:"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(a,c){a.preventDefault(),b._setSelection(),b._select(c.item.data("ui-selectmenu-item"),a)},focus:function(a,c){var d=c.item.data("ui-selectmenu-item");null!=b.focusIndex&&d.index!==b.focusIndex&&(b._trigger("focus",a,{item:d}),b.isOpen||b._select(d,a)),b.focusIndex=d.index,b.button.attr("aria-activedescendant",b.menuItems.eq(d.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var a,b=this.element.find("option");b.length&&(this._parseOptions(b),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),a=this._getSelectedItem(),this.menuInstance.focus(null,a),this._setAria(a.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(a){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",a))},_position:function(){this.menuWrap.position(a.extend({of:this.button},this.options.position))},close:function(a){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",a))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(b,c){var d=this,e="";a.each(c,function(c,f){f.optgroup!==e&&(a("<li>",{class:"ui-selectmenu-optgroup ui-menu-divider"+(f.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:f.optgroup}).appendTo(b),e=f.optgroup),d._renderItemData(b,f)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-selectmenu-item",b)},_renderItem:function(b,c){var d=a("<li>");return c.disabled&&d.addClass("ui-state-disabled"),this._setText(d,c.label),d.appendTo(b)},_setText:function(a,b){b?a.text(b):a.html("&#160;")},_move:function(a,b){var c,d,e=".ui-menu-item";this.isOpen?c=this.menuItems.eq(this.focusIndex):(c=this.menuItems.eq(this.element[0].selectedIndex),e+=":not(.ui-state-disabled)"),d="first"===a||"last"===a?c["first"===a?"prevAll":"nextAll"](e).eq(-1):c[a+"All"](e).eq(0),d.length&&this.menuInstance.focus(b,d)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(a){this[this.isOpen?"close":"open"](a)},_setSelection:function(){var a;this.range&&(window.getSelection?(a=window.getSelection(),a.removeAllRanges(),a.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(b){this.isOpen&&(a(b.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(b))}},_buttonEvents:{mousedown:function(){var a;window.getSelection?(a=window.getSelection(),a.rangeCount&&(this.range=a.getRangeAt(0))):this.range=document.selection.createRange()},click:function(a){this._setSelection(),this._toggle(a)},keydown:function(b){var c=!0;switch(b.keyCode){case a.ui.keyCode.TAB:case a.ui.keyCode.ESCAPE:this.close(b),c=!1;break;case a.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(b);break;case a.ui.keyCode.UP:b.altKey?this._toggle(b):this._move("prev",b);break;case a.ui.keyCode.DOWN:b.altKey?this._toggle(b):this._move("next",b);break;case a.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(b):this._toggle(b);break;case a.ui.keyCode.LEFT:this._move("prev",b);break;case a.ui.keyCode.RIGHT:this._move("next",b);break;case a.ui.keyCode.HOME:case a.ui.keyCode.PAGE_UP:this._move("first",b);break;case a.ui.keyCode.END:case a.ui.keyCode.PAGE_DOWN:this._move("last",b);break;default:this.menu.trigger(b),c=!1}c&&b.preventDefault()}},_selectFocusedItem:function(a){var b=this.menuItems.eq(this.focusIndex);b.hasClass("ui-state-disabled")||this._select(b.data("ui-selectmenu-item"),a)},_select:function(a,b){var c=this.element[0].selectedIndex;this.element[0].selectedIndex=a.index,this._setText(this.buttonText,a.label),this._setAria(a),this._trigger("select",b,{item:a}),a.index!==c&&this._trigger("change",b,{item:a}),this.close(b)},_setAria:function(a){var b=this.menuItems.eq(a.index).attr("id");this.button.attr({"aria-labelledby":b,"aria-activedescendant":b}),this.menu.attr("aria-activedescendant",b)},_setOption:function(a,b){"icons"===a&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(b.button),this._super(a,b),"appendTo"===a&&this.menuWrap.appendTo(this._appendTo()),"disabled"===a&&(this.menuInstance.option("disabled",b),this.button.toggleClass("ui-state-disabled",b).attr("aria-disabled",b),this.element.prop("disabled",b),b?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===a&&this._resizeButton()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b&&b[0]||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var a=this.options.width;a||(a=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(a)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(b){var c=[];b.each(function(b,d){var e=a(d),f=e.parent("optgroup");c.push({element:e,index:b,value:e.val(),label:e.text(),optgroup:f.attr("label")||"",disabled:f.prop("disabled")||e.prop("disabled")})}),this.items=c},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),a.widget("ui.slider",a.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;c>b;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;
3
+ return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),0>d&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&d>c)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;d.length>f;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),"disabled"===b&&this.element.toggleClass("ui-state-disabled",!!c),this._super(b,c),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===c?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;e>d;d+=1)this._change(null,d);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;c.length>d;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(this._valueMin()>=a)return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,d=Math.floor(+(a-b).toFixed(this._precision())/c)*c;a=d+b,this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=""+a,c=b.indexOf(".");return-1===c?0:b.length-c-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=100*((i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())),k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?100*((d-e)/(f-e)):0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var c,d,e,f,g=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),c=this._start(b,g),c===!1))return}switch(f=this.options.step,d=e=this.options.values&&this.options.values.length?this.values(g):this.value(),b.keyCode){case a.ui.keyCode.HOME:e=this._valueMin();break;case a.ui.keyCode.END:e=this._valueMax();break;case a.ui.keyCode.PAGE_UP:e=this._trimAlignValue(d+(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(d-(this._valueMax()-this._valueMin())/this.numPages);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(d===this._valueMax())return;e=this._trimAlignValue(d+f);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(d===this._valueMin())return;e=this._trimAlignValue(d-f)}this._slide(b,g,e)},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}}),a.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function c(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d}))}var d;d=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),c.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,c.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){return a(b.currentTarget).hasClass("ui-state-active")?this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=""+a,c=b.indexOf(".");return-1===c?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&d.min>a?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}("max"===a||"min"===a||"step"===a)&&"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),this.buttons.button(b?"disable":"enable"))},_setOptions:d(function(a){this._super(a)}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var a=this.value();return null!==a&&a===this._adjustValue(a)},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:d(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:d(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:d(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:d(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void d(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),a.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,d;b=b.cloneNode(!1),c=b.href.replace(a,""),d=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(a){}try{d=decodeURIComponent(d)}catch(a){}return b.hash.length>1&&c===d}}(),_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(c.active):a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){return a(e).attr("aria-controls")===d?(b=c,!1):void 0}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===b||-1===b)&&(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),-1===b&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||b.metaKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function d(){return b>e&&(b=0),0>b&&(b=e),b}for(var e=this.tabs.length-1;-1!==a.inArray(d(),this.options.disabled);)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this,c=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,f,g,h=a(d).uniqueId().attr("id"),i=a(d).closest("li"),j=i.attr("aria-controls");b._isLocal(d)?(e=d.hash,g=e.substring(1),f=b.element.find(b._sanitizeSelector(e))):(g=i.attr("aria-controls")||a({}).uniqueId()[0].id,e="#"+g,f=b.element.find(e),f.length||(f=b._createPanel(g),f.insertAfter(b.panels[c-1]||b.tablist)),f.attr("aria-live","polite")),f.length&&(b.panels=b.panels.add(f)),j&&i.data("ui-tabs-aria-controls",j),i.attr({"aria-controls":g,"aria-labelledby":h}),f.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),c&&(this._off(c.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var c,d=0;c=this.tabs[d];d++)b===!0||-1!==a.inArray(d,b)?a(c).addClass("ui-state-disabled").attr("aria-disabled","true"):a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(a){a.preventDefault()}}),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function d(){f.running=!1,f._trigger("activate",b,c)}function e(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=c.newPanel,h=c.oldPanel;this.running=!0,h.length&&this.options.hide?this._hide(h,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),e()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e()),h.attr("aria-hidden","true"),c.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),g.length&&h.length?c.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),g.attr("aria-hidden","false"),c.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;c!==!1&&(void 0===b?c=!1:(b=this._getIndex(b),c=a.isArray(c)?a.map(c,function(a){return a!==b?a:null}):a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setupDisabled(c))},disable:function(b){var c=this.options.disabled;if(c!==!0){if(void 0===b)c=!0;else{if(b=this._getIndex(b),-1!==a.inArray(b,c))return;c=a.isArray(c)?a.merge([b],c).sort():[b]}this._setupDisabled(c)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},i=function(a,b){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),g.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=a.ajax(this._ajaxSettings(f,c,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,b,e){setTimeout(function(){g.html(a),d._trigger("load",c,h),i(e,b)},1)}).fail(function(a,b){setTimeout(function(){i(a,b)},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}}),a.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))},_removeDescribedBy:function(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);-1!==e&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=a("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b.element)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d.element[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var b,d=a(this);d.data("ui-tooltip-open")&&(b=a.Event("blur"),b.target=b.currentTarget=this,c.close(b,!0)),d.attr("title")&&(d.uniqueId(),c.parents[this.id]={element:this,title:d.attr("title")},d.attr("title",""))}),this._registerCloseHandlers(b,d),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b,a,c))})}),void(c&&this._open(b,a,c)))},_open:function(b,c,d){function e(a){j.of=a,g.is(":hidden")||g.position(j)}var f,g,h,i,j=a.extend({},this.options.position);if(d){if(f=this._find(c))return void f.tooltip.find(".ui-tooltip-content").html(d);c.is("[title]")&&(b&&"mouseover"===b.type?c.attr("title",""):c.removeAttr("title")),f=this._tooltip(c),g=f.tooltip,this._addDescribedBy(c,g.attr("id")),g.find(".ui-tooltip-content").html(d),this.liveRegion.children().hide(),d.clone?(i=d.clone(),i.removeAttr("id").find("[id]").removeAttr("id")):i=d,a("<div>").html(i).appendTo(this.liveRegion),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:e}),e(b)):g.position(a.extend({of:c},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(j.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:g})}},_registerCloseHandlers:function(b,c){var d={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var d=a.Event(b);d.currentTarget=c[0],this.close(d,!0)}}};c[0]!==this.element[0]&&(d.remove=function(){this._removeTooltip(this._find(c).tooltip)}),b&&"mouseover"!==b.type||(d.mouseleave="close"),b&&"focusin"!==b.type||(d.focusout="close"),this._on(!0,c,d)},close:function(b){var c,d=this,e=a(b?b.currentTarget:this.element),f=this._find(e);return f?(c=f.tooltip,void(f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e),f.hiding=!0,c.stop(!0),this._hide(c,this.options.hide,function(){d._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title),delete d.parents[b]}),f.closing=!0,this._trigger("close",b,{tooltip:c}),f.hiding||(f.closing=!1)))):void e.removeData("ui-tooltip-open")},_tooltip:function(b){var c=a("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),d=c.uniqueId().attr("id");return a("<div>").addClass("ui-tooltip-content").appendTo(c),c.appendTo(this.document[0].body),this.tooltips[d]={element:b,tooltip:c}},_find:function(a){var b=a.data("ui-tooltip-id");return b?this.tooltips[b]:null},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur"),f=d.element;e.target=e.currentTarget=f[0],b.close(e,!0),a("#"+c).remove(),f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),
4
+ f.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),!function(a){function b(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var c,d=a.ui.mouse.prototype,e=d._mouseInit,f=d._mouseDestroy;d._touchStart=function(a){var d=this;!c&&d._mouseCapture(a.originalEvent.changedTouches[0])&&(c=!0,d._touchMoved=!1,b(a,"mouseover"),b(a,"mousemove"),b(a,"mousedown"))},d._touchMove=function(a){c&&(this._touchMoved=!0,b(a,"mousemove"))},d._touchEnd=function(a){c&&(b(a,"mouseup"),b(a,"mouseout"),this._touchMoved||b(a,"click"),c=!1)},d._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),e.call(b)},d._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),f.call(b)}}}(jQuery),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&W(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(X(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&X(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),U.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=S.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=T.call(this,j[0],"y"),j[1]=T.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ea()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",X(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",X(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&W(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);c.data(d)&&(c.data(d),U.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3]))})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),U.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),_(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=!(a.inArray(b.theme,c)>-1)&&b.autoDraggerLength,b.autoExpandScrollbar=!(a.inArray(b.theme,d)>-1)&&b.autoExpandScrollbar,b.scrollButtons.enable=!(a.inArray(b.theme,e)>-1)&&b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1||b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),_(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_vertical"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+f.theme+" mCSB_scrollTools_horizontal"+g+"'><div class='"+k[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+f.theme+" "+i+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+f.setTop+"; left:"+f.setLeft+";' dir='"+e.langDir+"' /></div>");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=ca(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["<a href='#' class='"+k[13]+"' "+g+" />","<a href='#' class='"+k[14]+"' "+g+" />","<a href='#' class='"+k[15]+"' "+g+" />","<a href='#' class='"+k[16]+"' "+g+" />"],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]<j[0]?j[0]:j[1],l=i&&j[3]<j[2]?j[2]:j[3];g[0].css({height:k,"max-height":g[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":j[0]+"px"}),g[1].css({width:l,"max-width":g[1].parent().width()-10})},w=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[f.outerHeight(!1)-e.height(),f.outerWidth(!1)-e.width()],i=[h[0]/(g[0].parent().height()-g[0].height()),h[1]/(g[1].parent().width()-g[1].width())];c.scrollRatio={y:i[0],x:i[1]}},x=function(a,b,c){var d=c?k[0]+"_expanded":"",e=a.closest(".mCSB_scrollTools");"active"===b?(a.toggleClass(k[0]+" "+d),e.toggleClass(k[1]),a[0]._draggable=a[0]._draggable?0:1):a[0]._draggable||("hide"===b?(a.removeClass(k[0]),e.removeClass(k[1])):(a.addClass(k[0]),e.addClass(k[1])))},y=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=null==c.overflowed?f.height():f.outerHeight(!1),h=null==c.overflowed?f.width():f.outerWidth(!1),i=f[0].scrollHeight,j=f[0].scrollWidth;return i>g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(W(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),X(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),X(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}M.call(this),O.call(this),f.advanced.autoScrollOnFocus&&N.call(this),f.scrollButtons.enable&&P.call(this),f.keyboard.enable&&Q.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!J()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),_(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),_(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),_(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document&&null!==frameElement?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=J()&&b.target.ownerDocument!==top.document&&null!==frameElement?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a,b,d,e){if(n[0].idleTimer=k.scrollInertia<233?250:0,c.attr("id")===m[1])var f="x",i=(c[0].offsetLeft-b+e)*h.scrollRatio.x;else var f="y",i=(c[0].offsetTop-a+d)*h.scrollRatio.y;X(g,i.toString(),{dir:f,drag:!0})}var c,e,f,g=a(this),h=g.data(d),k=h.opt,l=d+"_"+h.idx,m=["mCSB_"+h.idx+"_dragger_vertical","mCSB_"+h.idx+"_dragger_horizontal"],n=a("#mCSB_"+h.idx+"_container"),o=a("#"+m[0]+",#"+m[1]),p=k.advanced.releaseDraggableSelectors?o.add(a(k.advanced.releaseDraggableSelectors)):o,q=k.advanced.extraDraggableSelectors?a(!J()||top.document).add(a(k.advanced.extraDraggableSelectors)):a(!J()||top.document);o.bind("contextmenu."+l,function(a){a.preventDefault()}).bind("mousedown."+l+" touchstart."+l+" pointerdown."+l+" MSPointerDown."+l,function(b){if(b.stopImmediatePropagation(),b.preventDefault(),aa(b)){j=!0,i&&(document.onselectstart=function(){return!1}),K.call(n,!1),W(g),c=a(this);var d=c.offset(),h=D(b)[0]-d.top,l=D(b)[1]-d.left,m=c.height()+d.top,o=c.width()+d.left;m>h&&h>0&&o>l&&l>0&&(e=h,f=l),x(c,"active",k.autoExpandScrollbar)}}).bind("touchmove."+l,function(a){a.stopImmediatePropagation(),a.preventDefault();var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;b(e,f,g,h)}),a(document).add(q).bind("mousemove."+l+" pointermove."+l+" MSPointerMove."+l,function(a){if(c){var d=c.offset(),g=D(a)[0]-d.top,h=D(a)[1]-d.left;if(e===g&&f===h)return;b(e,f,g,h)}}).add(p).bind("mouseup."+l+" touchend."+l+" pointerup."+l+" MSPointerUp."+l,function(){c&&(x(c,"active",k.autoExpandScrollbar),c=null),j=!1,i&&(document.onselectstart=null),K.call(n,!0)})},F=function(){function c(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(ba(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]<L[2]||"yx"===A.axis);if(z.overflowed[1])var h=F[1].parent().width()-F[1].width(),n=m-d>0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]<L[3]||"yx"===A.axis);g||n?(O||a.preventDefault(),w=1):(x=1,y.addClass("mCS_touch_action")),O&&a.preventDefault(),u="yx"===A.axis?[l-c,m-d]:"x"===A.axis?[null,m-d]:[l-c,null],E[0].idleTimer=250,z.overflowed[0]&&i(u[0],I,e,"y","all",!0),z.overflowed[1]&&i(u[1],I,e,"x",K,!0)}}function f(a){if(!ba(a)||j||D(a)[2])return void(b=0);b=1,a.stopImmediatePropagation(),W(y),p=Z();var c=C.offset();n=D(a)[0]-c.top,o=D(a)[1]-c.left,G=[],H=[]}function g(a){if(ba(a)&&!j&&!D(a)[2]){k=0,a.stopImmediatePropagation(),w=0,x=0,r=Z();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left;if(!(r-q>30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&X(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],I=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,R(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g<n.height()&&j>0&&j<n.width()?k.step&&e("off",null,"stepped"):("x"!==i.axis&&h.overflowed[0]&&(0>g?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(W(c),!L(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r="y"===f.mouseWheel.axis?b.deltaY||d:b.deltaX;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<5&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),X(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=new Object,J=function(b){var c=!1,d=!1,e=null;if(void 0===b?d="#empty":void 0!==a(b).attr("id")&&(d=a(b).attr("id")),d!==!1&&void 0!==I[d])return I[d];if(b){try{var f=b.contentDocument||b.contentWindow.document;e=f.body.innerHTML}catch(a){}c=null!==e}else{try{var f=top.document;e=f.body.innerHTML}catch(a){}c=null!==e}return d!==!1&&(I[d]=c),c},K=function(a){var b=this.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}},L=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},M=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){W(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}X(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},N=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(){var c=a(document.activeElement),d=g.find(".mCustomScrollBox").length,f=0;c.is(e.advanced.autoScrollOnFocus)&&(W(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=d?(f+17)*d:0,b[0]._focusTimeout=setTimeout(function(){var a=[da(c)[0],da(c)[1]],d=[g[0].offsetTop,g[0].offsetLeft],i=[d[0]+a[0]>=0&&d[0]+a[0]<h.height()-c.outerHeight(!1),d[1]+a[1]>=0&&d[0]+a[1]<h.width()-c.outerWidth(!1)],j="yx"!==e.axis||i[0]||i[1]?"all":"none";"x"===e.axis||i[0]||X(b,a[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f}),"y"===e.axis||i[1]||X(b,a[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:j,dur:f})},b[0]._focusTimer))})},O=function(){var b=a(this),c=b.data(d),e=d+"_"+c.idx,f=a("#mCSB_"+c.idx+"_container").parent();f.bind("scroll."+e,function(){0===f.scrollTop()&&0===f.scrollLeft()||a(".mCSB_"+c.idx+"_scrollbar").css("visibility","hidden");
5
+ })},P=function(){var b=a(this),c=b.data(d),e=c.opt,f=c.sequential,g=d+"_"+c.idx,h=".mCSB_"+c.idx+"_scrollbar",i=a(h+">a");i.bind("contextmenu."+g,function(a){a.preventDefault()}).bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,R(b,a,c)}if(d.preventDefault(),aa(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},Q=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||R(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){W(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;X(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).bind("load",function(){J(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},R=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),X(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),_(m,"step"),W(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],W(b),ca(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},S=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},T=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1)-i.width():h.outerHeight(!1)-i.height(),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?da(o)[1]:da(o)[0];case"string":case"number":if(ca(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&ca(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?da(o)[1]:da(o)[0]}return a(b).length?"x"===c?da(a(b))[1]:da(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},U=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void _(m[0],"autoUpdate")):void c()},V=function(a,b,c){return Math.round(a/b)*b-c},W=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){$.call(this)})},X=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?S.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?S.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=V(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),Y(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||Y(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},Y=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=Z()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time<s+1&&(v.time=s+1)),v.time<d?v.id=n(h):q.call())}function i(){d>0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=Z(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},$=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c<b.length;c++){var d=b[c];a._mTween[d].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(a._mTween[d].id):clearTimeout(a._mTween[d].id),a._mTween[d].id=null,a._mTween[d].stop=1)}},_=function(a,b){try{delete a[b]}catch(c){a[b]=null}},aa=function(a){return!(a.which&&1!==a.which)},ba=function(a){var b=a.originalEvent.pointerType;return!(b&&"touch"!==b&&2!==b)},ca=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},da=function(a){var b=a.parents(".mCSB_container");return[a.offset().top-b.offset().top,a.offset().left-b.offset().left]},ea=function(){function a(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b<a.length;b++)if(a[b]+"Hidden"in document)return a[b]+"Hidden";return null}var b=a();return!!b&&document[b]};a.fn[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c]=function(b){return l[b]?l[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist"):l.init.apply(this,arguments)},a[c].defaults=f,window[c]=!0,a(window).bind("load",function(){a(e)[c](),a.extend(a.expr[":"],{mcsInView:a.expr[":"].mcsInView||function(b){var c,d,e=a(b),f=e.parents(".mCSB_container");if(f.length)return c=f.parent(),d=[f[0].offsetTop,f[0].offsetLeft],d[0]+da(e)[0]>=0&&d[0]+da(e)[0]<c.height()-e.outerHeight(!1)&&d[1]+da(e)[1]>=0&&d[1]+da(e)[1]<c.width()-e.outerWidth(!1)},mcsInSight:a.expr[":"].mcsInSight||function(b,c,d){var e,f,g,h,i=a(b),j=i.parents(".mCSB_container"),k="exact"===d[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(j.length)return e=[i.outerHeight(!1),i.outerWidth(!1)],g=[j[0].offsetTop+da(i)[0],j[0].offsetLeft+da(i)[1]],f=[j.parent()[0].offsetHeight,j.parent()[0].offsetWidth],h=[e[0]<f[0]?k[0]:k[1],e[1]<f[1]?k[0]:k[1]],g[0]-f[0]*h[0][0]<0&&g[0]+e[0]-f[0]*h[0][1]>=0&&g[1]-f[1]*h[1][0]<0&&g[1]+e[1]-f[1]*h[1][1]>=0},mcsOverflow:a.expr[":"].mcsOverflow||function(b){var c=a(b).data(d);if(c)return c.overflowed[0]||c.overflowed[1]}})})})}),!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){function b(a,b){return v.call(a,b)}function c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=t.map,p=o&&o["*"]||{};if(a){for(g=(a=a.split("/")).length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&n&&(a=n.slice(0,n.length-1).concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),--k;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;0<k&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((n||p)&&o){for(k=(c=a.split("/")).length;0<k;--k){if(d=c.slice(0,k).join("/"),n)for(l=n.length;0<l;--l)if(e=(e=o[n.slice(0,l).join("/")])&&e[d]){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function d(a,b){return function(){var c=w.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),o.apply(m,c.concat([a,b]))}}function e(a){return function(b){r[a]=b}}function f(a){if(b(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(m,c)}if(!b(r,a)&&!b(u,a))throw new Error("No "+a);return r[a]}function g(a){var b,c=a?a.indexOf("!"):-1;return-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function h(a){return a?g(a):[]}if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var i=a.fn.select2.amd;var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;return i&&i.requirejs||(i?k=i:i={},r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/,p=function(a,b){var d,e,h=g(a),i=h[0],j=b[1];return a=h[1],i&&(d=f(i=c(i,j))),i?a=d&&d.normalize?d.normalize(a,(e=j,function(a){return c(a,e)})):c(a,j):(i=(h=g(a=c(a,j)))[0],a=h[1],i&&(d=f(i))),{f:i?i+"!"+a:a,n:a,pr:i,p:d}},q={require:function(a){return d(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:(b=a,function(){return t&&t.config&&t.config[b]||{}})};var b}},n=function(a,c,g,i){var j,k,l,n,o,t,v,w=[],x=typeof g;if(t=h(i=i||a),"undefined"==x||"function"==x){for(c=!c.length&&g.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if("require"===(k=(n=p(c[o],t)).f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)j=w[o]=q.module(a);else if(b(r,k)||b(s,k)||b(u,k))w[o]=f(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,d(i,!0),e(k),{}),w[o]=r[k]}l=g?g.apply(r[a],w):void 0,a&&(j&&j.exports!==m&&j.exports!==r[a]?r[a]=j.exports:l===m&&v||(r[a]=l))}else a&&(r[a]=g)},j=k=o=function(a,b,c,d,e){if("string"==typeof a)return q[a]?q[a](b):f(p(a,h(b)).f);if(!a.splice){if((t=a).deps&&o(t.deps,t.callback),!b)return;b.splice?(a=b,b=c,c=null):a=m}return b=b||function(){},"function"==typeof c&&(c=d,d=e),d?n(m,a,b,c):setTimeout(function(){n(m,a,b,c)},4),o},o.config=function(a){return o(a)},j._defined=r,(l=function(a,c,d){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");c.splice||(d=c,c=[]),b(r,a)||b(s,a)||(s[a]=[a,c,d])}).amd={jQuery:!0},i.requirejs=j,i.require=k,i.define=l),i.define("almond",function(){}),i.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),i.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b)"function"==typeof b[d]&&"constructor"!==d&&c.push(d);return c}function c(){this.listeners={}}var d={};d.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},d.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;0<d&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new function(){this.constructor=d};for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=0;j<f.length;j++){var k=f[j];d.prototype[k]=e(k)}return d},c.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},c.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),(c[0]._type=a)in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},c.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},d.Observable=c,d.generateChars=function(a){for(var b="",c=0;c<a;c++)b+=Math.floor(36*Math.random()).toString(36);return b},d.bind=function(a,b){return function(){a.apply(b,arguments)}},d._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];(f=f.substring(0,1).toLowerCase()+f.substring(1))in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},d.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth)},d.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},d.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},d.__cache={};var e=0;return d.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},d.StoreData=function(a,b,c){var e=d.GetUniqueElementId(a);d.__cache[e]||(d.__cache[e]={}),d.__cache[e][b]=c},d.GetData=function(b,c){var e=d.GetUniqueElementId(b);return c?d.__cache[e]&&null!=d.__cache[e][c]?d.__cache[e][c]:a(b).data(c):d.__cache[e]},d.RemoveData=function(a){var b=d.GetUniqueElementId(a);null!=d.__cache[b]&&delete d.__cache[b],a.removeAttribute("data-select2-id")},d}),i.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null!=a.results&&0!==a.results.length){a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");0<b.length?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&-1<a.inArray(f,e)?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(a)},c=this.option(b);c.className+=" loading-results",this.$results.prepend(c)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"option","aria-selected":"false"},f=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var g in(null!=c.element&&f.call(c.element,":disabled")||null==c.element&&c.disabled)&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]),e){var h=e[g];d.setAttribute(g,h)}if(c.children){var i=a(d),j=document.createElement("strong");j.className="select2-results__group",a(j),this.template(c,j);for(var k=[],l=0;l<c.children.length;l++){var m=c.children[l],n=this.option(m);k.push(n)}var o=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});o.append(k),i.append(j),i.append(o)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a)+1;if(!(c>=b.length)){var d=b.eq(c);d.trigger("mouseenter");var f=e.$results.offset().top+e.$results.outerHeight(!1),g=d.offset().top+d.outerHeight(!1),h=e.$results.scrollTop()+g-f;0===c?e.$results.scrollTop(0):f<g&&e.$results.scrollTop(h)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=0<a.deltaY&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");"true"!==d.attr("aria-selected")?e.trigger("select",{originalEvent:c,data:f}):e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]").index(a),c=this.$results.offset().top,d=a.offset().top,e=this.$results.scrollTop()+(d-c),f=d-c;e-=2*a.outerHeight(!1),b<=2?this.$results.scrollTop(0):(f>this.$results.outerHeight()||f<0)&&this.$results.scrollTop(e)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),i.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),i.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),c.attr("aria-disabled","false"),this.$selection=c},d.prototype.bind=function(a,b){var d=this,e=a.id+"-results";this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.trigger("focus"),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex),d.$selection.attr("aria-disabled","false")}),a.on("disable",function(){d.$selection.attr("tabindex","-1"),d.$selection.attr("aria-disabled","true")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target).closest(".select2");a(".select2.select2-container--open").each(function(){this!=d[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d}),i.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.trigger("focus")})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");
6
+ return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0!==a.length){var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d);var e=b.title||b.text;e?c.attr("title",e):c.removeAttr("title")}else this.clear()},e}),i.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.isDisabled()){var d=a(this).parent(),e=c.GetData(d[0],"data");f.trigger("unselect",{originalEvent:b,data:e})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g);var h=e.title||e.text;h&&f.attr("title",h),c.StoreData(f[0],"data",e),b.push(f)}var i=this.$selection.find(".select2-selection__rendered");c.appendMany(i,b)}},d}),i.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(1<b.length||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),i.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.isDisabled()){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)this.$element.val(f);else{for(var h=0;h<e.length;h++)if(g={data:e[h]},this.trigger("unselect",g),g.prevented)return void this.$element.val(f);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},d.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},d.prototype.update=function(b,d){if(b.call(this,d),!(0<this.$selection.find(".select2-selection__placeholder").length||0===d.length)){var e=this.options.get("translations").get("removeAllItems"),f=a('<span class="select2-selection__clear" title="'+e()+'">&times;</span>');c.StoreData(f[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(f)}},d}),i.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this,g=d.id+"-results";a.call(this,d,e),d.on("open",function(){f.$search.attr("aria-controls",g),f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-controls"),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){a.data._resultId?f.$search.attr("aria-activedescendant",a.data._resultId):f.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(0<d.length){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(a){f.$search.val()&&a.stopPropagation()});var h=document.documentMode,i=h&&h<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){i?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(i&&"input"===a.type)f.$selection.off("input.search input.searchcheck");else{var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)}})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.trigger("focus")},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";a=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",a)},d}),i.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),i.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),i.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),i.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),i.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];(a=[a]).push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("input").trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("input").trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("input").trigger("change")})}},d.prototype.bind=function(a,b){var c=this;(this.container=a).on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){b.RemoveData(this)})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var d;a.children?(d=document.createElement("optgroup")).label=a.text:void 0!==(d=document.createElement("option")).textContent?d.textContent=a.text:d.innerText=a.text,void 0!==a.id&&(d.value=a.id),a.disabled&&(d.disabled=!0),a.selected&&(d.selected=!0),a.title&&(d.title=a.title);var e=c(d),f=this._normalizeItem(a);return f.element=d,b.StoreData(d,"data",f),e},d.prototype.item=function(a){var d={};if(null!=(d=b.GetData(a[0],"data")))return d;if(a.is("option"))d={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){d={text:a.prop("label"),children:[],title:a.prop("title")};for(var e=a.children("option"),f=[],g=0;g<e.length;g++){var h=c(e[g]),i=this.item(h);f.push(i)}d.children=f}return(d=this._normalizeItem(d)).element=a[0],b.StoreData(a[0],"data",d),d},d.prototype._normalizeItem=function(a){return a!==Object(a)&&(a={id:a,text:a}),null!=(a=c.extend({},{text:""},a)).id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},{selected:!1,disabled:!1},a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),i.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){this._dataToConvert=b.get("data")||[],d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype.bind=function(a,b){d.__super__.bind.call(this,a,b),this.addOptions(this.convertToOptions(this._dataToConvert))},d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(0<=c.inArray(j.id,g)){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),i.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),i.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){var d=this;this._removeOldTags(),null!=b.term&&null==b.page?a.call(this,b,function a(e,f){for(var g=e.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!a({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(e.data=g,void c(e))}if(f)return!0;var k=d.createTag(b);if(null!=k){var l=d.option(k);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(g,k)}e.results=g,c(e)}):a.call(this,b,c)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),i.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){var e=this;c.term=c.term||"";var f=this.tokenizer(c,this.options,function(b){var c,d=e._normalizeItem(b);if(!e.$element.find("option").filter(function(){return a(this).val()===d.id}).length){var f=e.option(d);f.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([f])}c=d,e.trigger("select",{data:c})});f.term!==c.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.trigger("focus")),c.term=f.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=i(a.extend({},c,{term:k}));null!=l?(e(l),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),i.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.term=b.term||"",b.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.term=b.term||"",0<this.maximumInputLength&&b.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):a.call(this,b,c)},a}),i.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(){d._checkIfMaximumSelected()})},a.prototype.query=function(a,b,c){var d=this;this._checkIfMaximumSelected(function(){a.call(d,b,c)})},a.prototype._checkIfMaximumSelected=function(a,b){var c=this;this.current(function(a){var d=null!=a?a.length:0;0<c.maximumSelectionLength&&d>=c.maximumSelectionLength?c.trigger("results:message",{message:"maximumSelected",args:{maximum:c.maximumSelectionLength}}):b&&b()})},a}),i.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),i.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this,f=c.id+"-results";b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.attr("aria-controls",f),e.$search.trigger("focus"),window.setTimeout(function(){e.$search.trigger("focus")},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.removeAttr("aria-controls"),e.$search.removeAttr("aria-activedescendant"),e.$search.val(""),e.$search.trigger("blur")}),c.on("focus",function(){c.isOpen()||e.$search.trigger("focus")}),c.on("results:all",function(a){null!=a.query.term&&""!==a.query.term||(e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide"))}),c.on("results:focus",function(a){a.data._resultId?e.$search.attr("aria-activedescendant",a.data._resultId):e.$search.removeAttr("aria-activedescendant")})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),i.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;0<=d;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),i.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("query",function(a){d.lastParams=a,d.loading=!0}),b.on("query:append",function(a){d.lastParams=a,d.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},b.prototype.loadMoreIfNeeded=function(){var b=a.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&b){var c=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=c+50&&this.loadMore()}},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),i.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=a(d.get("dropdownParent")||document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),d._bindContainerResultHandlers(b)}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._bindContainerResultHandlers=function(a,b){if(!this._containerResultsHandlersBound){var c=this;b.on("results:all",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:append",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("results:message",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("select",function(){c._positionDropdown(),c._resizeDropdown()}),b.on("unselect",function(){c._positionDropdown(),c._resizeDropdown()}),this._containerResultsHandlersBound=!0}},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h=this.$dropdown.outerHeight(!1),i=b.scrollTop(),j=b.scrollTop()+b.height(),k=i<f.top-h,l=j>f.bottom+h,m={left:f.left,top:g.bottom},n=this.$dropdownParent;"static"===n.css("position")&&(n=n.offsetParent());var o={top:0,left:0};(a.contains(document.body,n[0])||n[0].isConnected)&&(o=n.offset()),m.top-=o.top,m.left-=o.left,c||d||(e="below"),l||!k||c?!k&&l&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(m.top=g.top-o.top-h),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),
7
+ this.$dropdownContainer.css(m)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),i.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return a.prototype.showSearch=function(a,b){return!(function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}(b.data.results)<this.minimumResultsForSearch)&&a.call(this,b)},a}),i.define("select2/dropdown/selectOnClose",["../utils"],function(a){function b(){}return b.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},b.prototype._handleSelectOnClose=function(b,c){if(c&&null!=c.originalSelect2Event){var d=c.originalSelect2Event;if("select"===d._type||"unselect"===d._type)return}var e=this.getHighlightedResults();if(!(e.length<1)){var f=a.GetData(e[0],"data");null!=f.element&&f.element.selected||null==f.element&&f.selected||this.trigger("select",{data:f})}},b}),i.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&(c.ctrlKey||c.metaKey)||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),i.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),i.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(k){if(null==(k=a.extend(!0,{},this.defaults,k)).dataAdapter){if(null!=k.ajax?k.dataAdapter=o:null!=k.data?k.dataAdapter=n:k.dataAdapter=m,0<k.minimumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,r)),0<k.maximumInputLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,s)),0<k.maximumSelectionLength&&(k.dataAdapter=j.Decorate(k.dataAdapter,t)),k.tags&&(k.dataAdapter=j.Decorate(k.dataAdapter,p)),null==k.tokenSeparators&&null==k.tokenizer||(k.dataAdapter=j.Decorate(k.dataAdapter,q)),null!=k.query){var l=b(k.amdBase+"compat/query");k.dataAdapter=j.Decorate(k.dataAdapter,l)}if(null!=k.initSelection){var C=b(k.amdBase+"compat/initSelection");k.dataAdapter=j.Decorate(k.dataAdapter,C)}}if(null==k.resultsAdapter&&(k.resultsAdapter=c,null!=k.ajax&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,x)),null!=k.placeholder&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,w)),k.selectOnClose&&(k.resultsAdapter=j.Decorate(k.resultsAdapter,A))),null==k.dropdownAdapter){if(k.multiple)k.dropdownAdapter=u;else{var D=j.Decorate(u,v);k.dropdownAdapter=D}if(0!==k.minimumResultsForSearch&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,z)),k.closeOnSelect&&(k.dropdownAdapter=j.Decorate(k.dropdownAdapter,B)),null!=k.dropdownCssClass||null!=k.dropdownCss||null!=k.adaptDropdownCssClass){var E=b(k.amdBase+"compat/dropdownCss");k.dropdownAdapter=j.Decorate(k.dropdownAdapter,E)}k.dropdownAdapter=j.Decorate(k.dropdownAdapter,y)}if(null==k.selectionAdapter){if(k.multiple?k.selectionAdapter=e:k.selectionAdapter=d,null!=k.placeholder&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,f)),k.allowClear&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,g)),k.multiple&&(k.selectionAdapter=j.Decorate(k.selectionAdapter,h)),null!=k.containerCssClass||null!=k.containerCss||null!=k.adaptContainerCssClass){var F=b(k.amdBase+"compat/containerCss");k.selectionAdapter=j.Decorate(k.selectionAdapter,F)}k.selectionAdapter=j.Decorate(k.selectionAdapter,i)}k.language=this._resolveLanguage(k.language),k.language.push("en");for(var G=[],H=0;H<k.language.length;H++){var I=k.language[H];-1===G.indexOf(I)&&G.push(I)}return k.language=G,k.translations=this._processTranslations(k.language,k.debug),k},D.prototype.reset=function(){function b(a){return a.replace(/[^\u0000-\u007E]/g,function(a){return l[a]||a})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:{},matcher:function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&0<e.children.length){for(var f=a.extend(!0,{},e),g=e.children.length-1;0<=g;g--)null==c(d,e.children[g])&&f.children.splice(g,1);return 0<f.children.length?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return-1<h.indexOf(i)?e:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.applyFromElement=function(a,b){var c=a.language,d=this.defaults.language,e=b.prop("lang"),f=b.closest("[lang]").prop("lang"),g=Array.prototype.concat.call(this._resolveLanguage(e),this._resolveLanguage(c),this._resolveLanguage(d),this._resolveLanguage(f));return a.language=g,a},D.prototype._resolveLanguage=function(b){if(!b)return[];if(a.isEmptyObject(b))return[];if(a.isPlainObject(b))return[b];var c;c=a.isArray(b)?b:[b];for(var d=[],e=0;e<c.length;e++)if(d.push(c[e]),"string"==typeof c[e]&&0<c[e].indexOf("-")){var f=c[e].split("-")[0];d.push(f)}return d},D.prototype._processTranslations=function(b,c){for(var d=new k,e=0;e<b.length;e++){var f=new k,g=b[e];if("string"==typeof g)try{f=k.loadPath(g)}catch(a){try{g=this.defaults.amdLanguageBase+g,f=k.loadPath(g)}catch(a){c&&window.console&&console.warn&&console.warn('Select2: The language file for "'+g+'" could not be automatically loaded. A fallback will be used instead.')}}else f=a.isPlainObject(g)?new k(g):g;d.extend(f)}return d},D.prototype.set=function(b,c){var d={};d[a.camelCase(b)]=c;var e=j._convertData(d);a.extend(!0,this.defaults,e)},new D}),i.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),null!=e&&(this.options=c.applyFromElement(this.options,e)),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){function c(a,b){return b.toUpperCase()}var e=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));for(var f={},g=0;g<a[0].attributes.length;g++){var h=a[0].attributes[g].name,i="data-";if(h.substr(0,i.length)==i){var j=h.substring(i.length),k=d.GetData(a[0],j);f[j.replace(/-([a-z])/g,c)]=k}}b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset&&(f=b.extend(!0,{},a[0].dataset,f));var l=b.extend(!0,{},d.GetData(a[0]),f);for(var m in l=d._convertData(l))-1<b.inArray(m,e)||(b.isPlainObject(this.options[m])?b.extend(this.options[m],l[m]):this.options[m]=l[m]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),i.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){return"select2-"+(null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"!=b)return"computedstyle"!=b?b:window.getComputedStyle(a[0]).width;var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,"").match(c);if(null!==j&&1<=j.length)return j[1]}return null},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var a=this;this.$element.on("change.select2",function(){a.dataAdapter.current(function(b){a.trigger("selection:update",{data:b})})}),this.$element.on("focus.select2",function(b){a.trigger("focus",b)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=b?(this._observer=new b(function(b){a._syncA(),a._syncS(null,b)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",a._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",a._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",a._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(b),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._isChangeMutation=function(b,c){var d=!1,e=this;if(!b||!b.target||"OPTION"===b.target.nodeName||"OPTGROUP"===b.target.nodeName){if(c)if(c.addedNodes&&0<c.addedNodes.length)for(var f=0;f<c.addedNodes.length;f++)c.addedNodes[f].selected&&(d=!0);else c.removedNodes&&0<c.removedNodes.length?d=!0:a.isArray(c)&&a.each(c,function(a,b){if(e._isChangeMutation(a,b))return!(d=!0)});else d=!0;return d}},e.prototype._syncSubtree=function(a,b){var c=this._isChangeMutation(a,b),d=this;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},e.prototype.close=function(a){this.isOpen()&&this.trigger("close",{originalEvent:a})},e.prototype.isEnabled=function(){return!this.isDisabled()},e.prototype.isDisabled=function(){return this.options.get("disabled")},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("input").trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),i.define("select2/compat/utils",["jquery"],function(a){return{syncCssClasses:function(b,c,d){var e,f,g=[];(e=a.trim(b.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)}),(e=a.trim(c.attr("class")))&&a((e=""+e).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)}),b.attr("class",g.join(" "))}}}),i.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),i.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;this._isInitialized?b.call(this,c):this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),i.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return c.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},c.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("input").trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("input").trigger("change")},c.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("input").trigger("change")})},c.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},c.prototype.addOptions=function(c,d){var e=a.map(d,function(a){return b.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,e)},c}),i.define("select2/compat/matcher",["jquery"],function(a){return function(b){return function(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;0<=f;f--){var g=d.children[f];b(c.term,g.text,g)||e.children.splice(f,1)}if(0<e.children.length)return e}return b(c.term,d.text,d)?e:null}}}),i.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c,this.options.get("query").call(null,b)},a}),i.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){c.find(".dropdown-wrapper").append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),i.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),i.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(a){a.stopPropagation()})},a}),y=function(a){function b(b){var g,h=b||window.event,j=i.call(arguments,1),l=0,m=0,n=0,o=0,p=0;if((b=a.event.fix(h)).type="mousewheel","detail"in h&&(n=-1*h.detail),"wheelDelta"in h&&(n=h.wheelDelta),"wheelDeltaY"in h&&(n=h.wheelDeltaY),"wheelDeltaX"in h&&(m=-1*h.wheelDeltaX),"axis"in h&&h.axis===h.HORIZONTAL_AXIS&&(m=-1*n,n=0),l=0===n?m:n,"deltaY"in h&&(l=n=-1*h.deltaY),"deltaX"in h&&(m=h.deltaX,0===n&&(l=-1*m)),0!==n||0!==m){if(1===h.deltaMode){var q=a.data(this,"mousewheel-line-height");l*=q,n*=q,m*=q}else if(2===h.deltaMode){var r=a.data(this,"mousewheel-page-height");l*=r,n*=r,m*=r}if(g=Math.max(Math.abs(n),Math.abs(m)),(!f||g<f)&&d(h,f=g)&&(f/=40),d(h,g)&&(l/=40,m/=40,n/=40),l=Math[1<=l?"floor":"ceil"](l/f),m=Math[1<=m?"floor":"ceil"](m/f),n=Math[1<=n?"floor":"ceil"](n/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=m,b.deltaY=n,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,j.unshift(b,l,m,n),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,j)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120==0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})},"function"==typeof i.define&&i.define.amd?i.define("jquery-mousewheel",["jquery"],y):"object"==typeof exports?module.exports=y:y(a),i.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"!=typeof b)throw new Error("Invalid arguments for Select2: "+b);var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),-1<a.inArray(b,f)?this:d}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:i.define,require:i.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),!function(a){"undefined"!=typeof jQuery&&jQuery||"function"!=typeof define||!define.amd?"undefined"!=typeof jQuery&&jQuery||"object"!=typeof exports?a(jQuery,document,window,navigator):a(require("jquery"),document,window,navigator):define(["jquery"],function(b){return a(b,document,window,navigator)})}(function(a,b,c,d,e){"use strict";function f(d,f,g){this.VERSION="2.3.1",this.input=d,this.plugin_count=g,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,f=f||{},this.$cache={win:a(c),body:a(b.body),input:a(d),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var h,i,j,k=this.$cache.input,l=k.prop("value");for(j in h={skin:"flat",type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==k[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",k[0]),(i={skin:k.data("skin"),type:k.data("type"),min:k.data("min"),max:k.data("max"),from:k.data("from"),to:k.data("to"),step:k.data("step"),min_interval:k.data("minInterval"),max_interval:k.data("maxInterval"),drag_interval:k.data("dragInterval"),values:k.data("values"),from_fixed:k.data("fromFixed"),from_min:k.data("fromMin"),from_max:k.data("fromMax"),from_shadow:k.data("fromShadow"),to_fixed:k.data("toFixed"),to_min:k.data("toMin"),to_max:k.data("toMax"),to_shadow:k.data("toShadow"),prettify_enabled:k.data("prettifyEnabled"),prettify_separator:k.data("prettifySeparator"),force_edges:k.data("forceEdges"),keyboard:k.data("keyboard"),grid:k.data("grid"),grid_margin:k.data("gridMargin"),grid_num:k.data("gridNum"),grid_snap:k.data("gridSnap"),hide_min_max:k.data("hideMinMax"),hide_from_to:k.data("hideFromTo"),prefix:k.data("prefix"),postfix:k.data("postfix"),max_postfix:k.data("maxPostfix"),decorate_both:k.data("decorateBoth"),values_separator:k.data("valuesSeparator"),input_values_separator:k.data("inputValuesSeparator"),disable:k.data("disable"),block:k.data("block"),extra_classes:k.data("extraClasses")}).values=i.values&&i.values.split(","),i)i.hasOwnProperty(j)&&(i[j]!==e&&""!==i[j]||delete i[j]);l!==e&&""!==l&&((l=l.split(i.input_values_separator||f.input_values_separator||";"))[0]&&l[0]==+l[0]&&(l[0]=+l[0]),l[1]&&l[1]==+l[1]&&(l[1]=+l[1]),f&&f.values&&f.values.length?(h.from=l[0]&&f.values.indexOf(l[0]),h.to=l[1]&&f.values.indexOf(l[1])):(h.from=l[0]&&+l[0],h.to=l[1]&&+l[1])),a.extend(h,f),a.extend(h,i),this.options=h,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,
8
+ max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()}var g,h,i=0,j=(g=d.userAgent,h=/msie\s\d+/i,0<g.search(h)&&h.exec(g).toString().split(" ")[1]<9&&(a("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var g=new f,h=b.apply(g,d.concat(c.call(arguments)));return Object(h)===h?h:g}return b.apply(a,d.concat(c.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0==e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),e<=f)return-1;for(c=Math.max(0<=f?f:e-Math.abs(f),0);c<e;){if(c in d&&d[c]===a)return c;c++}return-1}),f.prototype={init:function(a){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var a='<span class="irs irs--'+this.options.skin+" js-irs-"+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(a),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar irs-bar--single"></span><span class="irs-shadow shadow-single"></span><span class="irs-handle single"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-bar"></span><span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-handle from"><i></i><i></i><i></i></span><span class="irs-handle to"><i></i><i></i><i></i></span>'),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.min,b=this.options.max,c=this.options.from,d=this.options.to;a<c&&d===b?this.$cache.s_from.addClass("type_last"):d<b&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),j&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),j&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(a){var b,c;this.target||(b=(c="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,b+=c.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:b}))},pointerMove:function(a){if(this.dragging){var b=a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX;this.coords.x_pointer=b-this.coords.x_gap,this.calc()}},pointerUp:function(b){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,j&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],b.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(b,c){c.preventDefault();var d=c.pageX||c.originalEvent.touches&&c.originalEvent.touches[0].pageX;2!==c.button&&("both"===b&&this.setTempMinInterval(),b=b||this.target||"from",this.current_plugin=this.plugin_count,this.target=b,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(b),j&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,c=(this.options.max-this.options.min)/100;c=this.options.step/c,a?b+=c:b-=c,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var a=this._prettify(this.options.min),b=this._prettify(this.options.max);this.result.min_pretty=a,this.result.max_pretty=b,this.$cache.min.html(this.decorate(a,this.options.min)),this.$cache.max.html(this.decorate(b,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options&&(this.calc_count++,10!==this.calc_count&&!a||(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var b=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,b=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,b=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(b)),this.target){case"base":var c=(this.options.max-this.options.min)/100,d=(this.result.from-this.options.min)/c,e=(this.result.to-this.options.min)/c;this.coords.p_single_real=this.toFixed(d),this.coords.p_from_real=this.toFixed(d),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(b),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(b),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(b),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;b=this.toFixed(b+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(b)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(b)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var f=this.convertToRealPercent(b),g=this.result.from_percent,h=this.result.to_percent-g,i=h/2,j=f-i,k=f+i;j<0&&(k=(j=0)+h),100<k&&(j=(k=100)-h),this.coords.p_from_real=this.calcWithStep(j),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(k),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return b<0?b=0:a<b&&(b=a),b},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=a?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),this.coords.w_rs===this.coords.w_rs_old&&!this.force_redraw||(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.bar[0].style.left=0,this.$cache.bar[0].style.width=this.coords.p_bar_w+this.coords.p_bar_x+"%",this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",this.old_from===this.result.from&&!this.force_redraw||(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),this.old_to===this.result.to&&!this.force_redraw||(this.$cache.to[0].style.left=this.labels.p_to_left+"%")),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var a,b,c,d,e,f=this.options.values.length,g=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)a=f?this.decorate(g[this.result.from]):(d=this._prettify(this.result.from),this.decorate(d,this.result.from)),this.$cache.single.html(a),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{c=f?(this.options.decorate_both?(a=this.decorate(g[this.result.from]),a+=this.options.values_separator,a+=this.decorate(g[this.result.to])):a=this.decorate(g[this.result.from]+this.options.values_separator+g[this.result.to]),b=this.decorate(g[this.result.from]),this.decorate(g[this.result.to])):(d=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(a=this.decorate(d,this.result.from),a+=this.options.values_separator,a+=this.decorate(e,this.result.to)):a=this.decorate(d+this.options.values_separator+e,this.result.to),b=this.decorate(d,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(a),this.$cache.from.html(b),this.$cache.to.html(c),this.calcLabels();var h=Math.min(this.labels.p_single_left,this.labels.p_from_left),i=this.labels.p_single_left+this.labels.p_single_fake,j=this.labels.p_to_left+this.labels.p_to_fake,k=Math.max(i,j);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",k=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",j):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(i,j))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),h<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",k>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var a,b,c,d,e=this.options,f=this.$cache,g="number"==typeof e.from_min&&!isNaN(e.from_min),h="number"==typeof e.from_max&&!isNaN(e.from_max),i="number"==typeof e.to_min&&!isNaN(e.to_min),j="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_single[0].style.display="block",f.shad_single[0].style.left=a+"%",f.shad_single[0].style.width=b+"%"):f.shad_single[0].style.display="none":(e.from_shadow&&(g||h)?(a=this.convertToPercent(g?e.from_min:e.min),b=this.convertToPercent(h?e.from_max:e.max)-a,a=this.toFixed(a-this.coords.p_handle/100*a),b=this.toFixed(b-this.coords.p_handle/100*b),a+=this.coords.p_handle/2,f.shad_from[0].style.display="block",f.shad_from[0].style.left=a+"%",f.shad_from[0].style.width=b+"%"):f.shad_from[0].style.display="none",e.to_shadow&&(i||j)?(c=this.convertToPercent(i?e.to_min:e.min),d=this.convertToPercent(j?e.to_max:e.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,f.shad_to[0].style.display="block",f.shad_to[0].style.left=c+"%",f.shad_to[0].style.width=d+"%"):f.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(a,b){var c,d=this.options.max-this.options.min,e=d/100;return d?(c=(b?a:a-this.options.min)/e,this.toFixed(c)):(this.no_diapason=!0,0)},convertToValue:function(a){var b,c,d=this.options.min,e=this.options.max,f=d.toString().split(".")[1],g=e.toString().split(".")[1],h=0,i=0;if(0===a)return this.options.min;if(100===a)return this.options.max;f&&(h=b=f.length),g&&(h=c=g.length),b&&c&&(h=c<=b?b:c),d<0&&(d=+(d+(i=Math.abs(d))).toFixed(h),e=+(e+i).toFixed(h));var j,k=(e-d)/100*a+d,l=this.options.step.toString().split(".")[1];return k=l?+k.toFixed(l.length):(k/=this.options.step,+(k*=this.options.step).toFixed(0)),i&&(k-=i),(j=l?+k.toFixed(l.length):this.toFixed(k))<this.options.min?j=this.options.min:j>this.options.max&&(j=this.options.max),j},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;return 100<b&&(b=100),100===a&&(b=100),this.toFixed(b)},checkMinInterval:function(a,b,c){var d,e,f=this.options;return f.min_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d<f.min_interval&&(d=e-f.min_interval):d-e<f.min_interval&&(d=e+f.min_interval),this.convertToPercent(d)):a},checkMaxInterval:function(a,b,c){var d,e,f=this.options;return f.max_interval?(d=this.convertToValue(a),e=this.convertToValue(b),"from"===c?e-d>f.max_interval&&(d=e-f.max_interval):d-e>f.max_interval&&(d=e+f.max_interval),this.convertToPercent(d)):a},checkDiapason:function(a,b,c){var d=this.convertToValue(a),e=this.options;return"number"!=typeof b&&(b=e.min),"number"!=typeof c&&(c=e.max),d<b&&(d=b),c<d&&(d=c),this.convertToPercent(d)},toFixed:function(a){return+(a=a.toFixed(20))},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){return this.options.force_edges&&(a<0?a=0:100-b<a&&(a=100-b)),this.toFixed(a)},validate:function(){var a,b,c=this.options,d=this.result,e=c.values,f=e.length;if("string"==typeof c.min&&(c.min=+c.min),"string"==typeof c.max&&(c.max=+c.max),"string"==typeof c.from&&(c.from=+c.from),"string"==typeof c.to&&(c.to=+c.to),"string"==typeof c.step&&(c.step=+c.step),"string"==typeof c.from_min&&(c.from_min=+c.from_min),"string"==typeof c.from_max&&(c.from_max=+c.from_max),"string"==typeof c.to_min&&(c.to_min=+c.to_min),"string"==typeof c.to_max&&(c.to_max=+c.to_max),"string"==typeof c.grid_num&&(c.grid_num=+c.grid_num),c.max<c.min&&(c.max=c.min),f)for(c.p_values=[],c.min=0,c.max=f-1,c.step=1,c.grid_num=c.max,c.grid_snap=!0,b=0;b<f;b++)a=+e[b],a=isNaN(a)?e[b]:(e[b]=a,this._prettify(a)),c.p_values.push(a);"number"==typeof c.from&&!isNaN(c.from)||(c.from=c.min),"number"==typeof c.to&&!isNaN(c.to)||(c.to=c.max),"single"===c.type?(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max)):(c.from<c.min&&(c.from=c.min),c.from>c.max&&(c.from=c.max),c.to<c.min&&(c.to=c.min),c.to>c.max&&(c.to=c.max),this.update_check.from&&(this.update_check.from!==c.from&&c.from>c.to&&(c.from=c.to),this.update_check.to!==c.to&&c.to<c.from&&(c.to=c.from)),c.from>c.to&&(c.from=c.to),c.to<c.from&&(c.to=c.from)),("number"!=typeof c.step||isNaN(c.step)||!c.step||c.step<0)&&(c.step=1),"number"==typeof c.from_min&&c.from<c.from_min&&(c.from=c.from_min),"number"==typeof c.from_max&&c.from>c.from_max&&(c.from=c.from_max),"number"==typeof c.to_min&&c.to<c.to_min&&(c.to=c.to_min),"number"==typeof c.to_max&&c.from>c.to_max&&(c.to=c.to_max),d&&(d.min!==c.min&&(d.min=c.min),d.max!==c.max&&(d.max=c.max),(d.from<d.min||d.from>d.max)&&(d.from=c.from),
9
+ (d.to<d.min||d.to>d.max)&&(d.to=c.to)),("number"!=typeof c.min_interval||isNaN(c.min_interval)||!c.min_interval||c.min_interval<0)&&(c.min_interval=0),("number"!=typeof c.max_interval||isNaN(c.max_interval)||!c.max_interval||c.max_interval<0)&&(c.max_interval=0),c.min_interval&&c.min_interval>c.max-c.min&&(c.min_interval=c.max-c.min),c.max_interval&&c.max_interval>c.max-c.min&&(c.max_interval=c.max-c.min)},decorate:function(a,b){var c="",d=this.options;return d.prefix&&(c+=d.prefix),c+=a,d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" "))),d.postfix&&(c+=d.postfix),c},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var a,b,c,d,e,f,g=this.options,h=g.max-g.min,i=g.grid_num,j=0,k=4,l="";for(this.calcGridMargin(),g.grid_snap&&(i=h/g.step),50<i&&(i=50),c=this.toFixed(100/i),4<i&&(k=3),7<i&&(k=2),14<i&&(k=1),28<i&&(k=0),a=0;a<i+1;a++){for(d=k,100<(j=this.toFixed(c*a))&&(j=100),e=((this.coords.big[a]=j)-c*(a-1))/(d+1),b=1;b<=d&&0!==j;b++)l+='<span class="irs-grid-pol small" style="left: '+this.toFixed(j-e*b)+'%"></span>';l+='<span class="irs-grid-pol" style="left: '+j+'%"></span>',f=this.convertToValue(j),l+='<span class="irs-grid-text js-grid-text-'+a+'" style="left: '+j+'%">'+(f=g.values.length?g.p_values[f]:this._prettify(f))+"</span>"}this.coords.big_num=Math.ceil(i+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(l),this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b<c;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b,c=[],d=[],e=this.coords.big_num;for(a=0;a<e;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),c[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(c[a]+this.coords.big_p[a]);for(this.options.force_edges&&(c[0]<-this.coords.grid_gap&&(c[0]=-this.coords.grid_gap,d[0]=this.toFixed(c[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[e-1]>100+this.coords.grid_gap&&(d[e-1]=100+this.coords.grid_gap,c[e-1]=this.toFixed(d[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,c,d),this.calcGridCollision(4,c,d),a=0;a<e;a++)b=this.$cache.grid_labels[a][0],this.coords.big_x[a]!==Number.POSITIVE_INFINITY&&(b.style.marginLeft=-this.coords.big_x[a]+"%")},calcGridCollision:function(a,b,c){var d,e,f,g=this.coords.big_num;for(d=0;d<g&&!(g<=(e=d+a/2));d+=a)f=this.$cache.grid_labels[e][0],c[d]<=b[e]?f.style.visibility="visible":f.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(b){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=a.extend(this.options,b),this.validate(),this.updateResult(b),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),a.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},a.fn.ionRangeSlider=function(b){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new f(this,b,i++))})},function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d<b.length&&!c.requestAnimationFrame;++d)c.requestAnimationFrame=c[b[d]+"RequestAnimationFrame"],c.cancelAnimationFrame=c[b[d]+"CancelAnimationFrame"]||c[b[d]+"CancelRequestAnimationFrame"];c.requestAnimationFrame||(c.requestAnimationFrame=function(b,d){var e=(new Date).getTime(),f=Math.max(0,16-(e-a)),g=c.setTimeout(function(){b(e+f)},f);return a=e+f,g}),c.cancelAnimationFrame||(c.cancelAnimationFrame=function(a){clearTimeout(a)})}()});var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a});var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length<a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){"undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),b?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500);var d=the_ajax_script.pagination_class;d=d.replace(","," a,"),d+=" a",a(document).on("click",d,function(c){c.preventDefault();var d=a(this).attr("href");d=decodeURI(d),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load]},d))}),the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=braapf_get_url_with_filters_selected();berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||"filter"!=b,b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_url_history_api_from_current=function(){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=[];if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c){b=a(b);var d=!1,e=!1,f=b.data("taxonomy");if("undefined"==typeof f||!f)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",d,b,c);if(a.each(c,function(a,b){b.taxonomy==f&&(e=!0)}),!berocket_apply_filters("grab_single_filter_exist",e,b,c)){if(d=berocket_apply_filters("grab_single_filter",d,b,c),d!==!1)return d;var g=b.data("op"),h=b.data("name");"undefined"==typeof h&&(h="");var i=braapf_glue_by_operator(g),j=[],k=[],l=a(".bapf_sfilter[data-taxonomy="+f+"]");l.find("input:checked:not(:disabled)").each(function(b,c){k.indexOf(a(this).val())==-1&&(j.push({value:a(this).val(),html:a(this).data("name")}),k.push(a(this).val()))}),d={name:h,taxonomy:f,values:j,glue:i,operator:g}}return berocket_apply_filters("grab_single_filter_default",d,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_result_count=function(a){var b=the_ajax_script.result_count_class;braapf_replace_current_with_new(a,b)},braapf_replace_orderby=function(a){var b=the_ajax_script.ordering_class;braapf_replace_current_with_new(a,b)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&(window.onpopstate=function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){a(window).width()<=767&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>767&&a(window).width()<=1024&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>1024&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).mCustomScrollbar({setHeight:a(this).data("mcs-h"),scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).length>1&&a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove()}),a(".bapf_desci").on("click hover",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){d.values.length>0&&(b+="<span>"+d.name+"</span>",b+="<ul>",a.each(d.values,function(a,c){b+='<li><a href="#unselect_'+c.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+c.value+'"><i class="fa fa-times"></i>'+c.html+"</a></li>"}),b+="</ul>")}),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b='<div class="berocket_aapf_widget_selected_filter">'+b+'<ul><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>"):(b=the_ajax_script.translate.nothing_selected,a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a(".bapf_sfilter[data-taxonomy="+a(this).data("taxonomy")+"]").trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a(".bapf_sfilter[data-taxonomy="+c.taxonomy+"]").trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),a(document).ready(function(){a(".berocket_wc_shortcode_fix").length&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")})}(jQuery);var braapf_get_current_filters,braapf_scroll_shop_to_top;!function(a){function b(){a(".berocket_ajax_filters_sidebar_toggle").removeClass("active"),a("#berocket-ajax-filters-sidebar").removeClass("active"),a("body").removeClass("berocket_ajax_filters_sidebar_active")}function c(){a(".berocket_ajax_filters_sidebar_toggle").addClass("active"),a("#berocket-ajax-filters-sidebar").addClass("active"),a("body").addClass("berocket_ajax_filters_sidebar_active")}function d(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault,a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show()}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide()});var e=[];braapf_hierarhical_save=function(b){return e=[],a(".bapf_cchild").each(function(){e.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(e,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).find(".bapf_body").first().show(),a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up")}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).find(".bapf_body").first().hide(),a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up")});var f={open:[],close:[]};braapf_collapse_status_save=function(b){return f={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?f.open.push(a(this).attr("id")):f.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(f.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(f.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var g={open:[],close:[]};braapf_show_hide_values_save=function(b){return g={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?g.close.push(a(this).attr("id")):g.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(g.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(g.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){if("default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<=768||3==the_ajax_script.scroll_shop_top&&a(window).width()>768)){var g=0;a(the_ajax_script.products_holder_id).length?(g=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),g<0&&(g=0)):a(".bapf_no_products").length&&(g=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),g<0&&(g=0)),a("html, body").animate({scrollTop:g},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),a(document).on("berocket_custom_sidebar_close",b),a(document).on("berocket_custom_sidebar_open",c),a(document).on("click",".berocket_ajax_filters_sidebar_toggle",function(d){d.preventDefault(),a(this).is(".active")&&a("#berocket-ajax-filters-sidebar").is(".active")?b():c()}),a(document).on("click","#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close",function(a){a.preventDefault(),b()}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&d()})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_add_loader_element,braapf_remove_loader_element;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+"[data-taxonomy="+f+"]");if(g.length){var h=braapf_grab_single(g,[]);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").length;i++)a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")})}(jQuery);var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent;!function(a){function b(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)}braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){
10
+ var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a(".bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)];if(e[0]!=d.data("min")||e[1]!=d.data("max")){var g={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};g=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),g,e,f,d,a),a.values=[g]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",b),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr)}(jQuery);var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){var d=c.find(".bapf_body select:not(:disabled)");d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&b.values.push({value:c,html:a(this).data("name")})})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(a.dropdownParent=$("#berocket-ajax-filters-sidebar")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a(".bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values");if(d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c);var f={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};f=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),f,d,e,c,a),a.values=[f]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}(jQuery);
{js → assets/frontend/js}/jquery-ui.min.js RENAMED
File without changes
{js → assets/frontend/js}/jquery.ui.touch-punch.min.js RENAMED
File without changes
assets/frontend/js/main.js ADDED
@@ -0,0 +1,1470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //Filter functions
2
+ var berocket_filters = {};
3
+ function berocket_make_args_array(args) {
4
+ var args_array = [];
5
+ for(var i = 0; i < args.length; i++) {
6
+ args_array.push(args[i]);
7
+ }
8
+ return args_array;
9
+ }
10
+ function berocket_apply_filters(filter_name, filter_element) {
11
+ if( typeof(berocket_filters[filter_name]) !== 'undefined' ) {
12
+ var array_args = berocket_make_args_array(arguments);
13
+ array_args.splice(0, 1);
14
+ jQuery.each(berocket_filters[filter_name], function(i, callback_data) {
15
+ filter_element = callback_data.callback.apply(null, array_args);
16
+ array_args[0] = filter_element;
17
+ });
18
+ }
19
+ return filter_element;
20
+ }
21
+ function berocket_do_action(filter_name) {
22
+ if( typeof(berocket_filters[filter_name]) !== 'undefined' ) {
23
+ var array_args = berocket_make_args_array(arguments);
24
+ array_args.splice(0, 1);
25
+ jQuery.each(berocket_filters[filter_name], function(i, callback_data) {
26
+ callback_data.callback.apply(null, array_args);
27
+ });
28
+ }
29
+ }
30
+ function berocket_throw_error(error_name) {
31
+ var filter_name = 'berocket_throw_error';
32
+ error_exist = true;
33
+ if( typeof(berocket_filters[filter_name]) !== 'undefined' ) {
34
+ var array_args = [error_exist];
35
+ for(var i; i < arguments.length; i++) {
36
+ array_args.push(arguments[i]);
37
+ }
38
+ jQuery.each(berocket_filters[filter_name], function(i, callback_data) {
39
+ error_exist = callback_data.callback.apply(null, array_args);
40
+ array_args[0] = error_exist;
41
+ if( ! error_exist ) {
42
+ return false;
43
+ }
44
+ });
45
+ }
46
+ return error_exist;
47
+ }
48
+ function berocket_add_filter(filter_name, callback, priority) {
49
+ if( typeof(priority) == 'undefined' ) {
50
+ priority = 10;
51
+ }
52
+ if( typeof(berocket_filters[filter_name]) === 'undefined' ) {
53
+ berocket_filters[filter_name] = [];
54
+ }
55
+ var isExist = false;
56
+ jQuery.each(berocket_filters[filter_name], function(i, callback_data) {
57
+ if( callback_data.priority === priority && callback_data.callback === callback ) {
58
+ isExist = true;
59
+ }
60
+ });
61
+ if( ! isExist ) {
62
+ berocket_filters[filter_name].push({callback:callback, priority:priority});
63
+ berocket_filters[filter_name] = berocket_sort_by_priority(berocket_filters[filter_name]);
64
+ }
65
+ }
66
+ function berocket_remove_filter(filter_name, callback, priority) {
67
+ if( typeof(priority) == 'undefined' ) {
68
+ priority = 10;
69
+ }
70
+ if( typeof(berocket_filters[filter_name]) != 'undefined' ) {
71
+ var new_array = [];
72
+ jQuery.each(berocket_filters[filter_name], function(i, callback_data) {
73
+ if( callback_data.priority !== priority || callback_data.callback !== callback ) {
74
+ new_array.push(callback_data);
75
+ }
76
+ });
77
+ berocket_filters[filter_name] = berocket_sort_by_priority(new_array);
78
+ }
79
+ }
80
+ function berocket_sort_by_priority(sorting_array) {
81
+ if( Array.isArray(sorting_array) ) {
82
+ sorting_array.sort(function(a, b) {
83
+ if( a.priority > b.priority ) {
84
+ return 1;
85
+ } else if( a.priority < b.priority ) {
86
+ return -1;
87
+ }
88
+ return 0;
89
+ });
90
+ }
91
+ return sorting_array;
92
+ }
93
+ berocket_add_filter('compat_filters_result_single', function(val) {
94
+ if( typeof( val ) == 'object' && typeof(val.taxonomy) == 'string' && val.taxonomy.substr(0, 3) == 'pa_' ) {
95
+ val.taxonomy = val.taxonomy.substr(3);
96
+ }
97
+ return val;
98
+ });
99
+
100
+
101
+ //NEW TEMPLATE
102
+
103
+ function berocket_format_number (number, number_style) {
104
+ if( typeof number_style == 'undefined' ) {
105
+ number_style = the_ajax_script.number_style;
106
+ }
107
+ var num = number.toFixed(number_style[2]);
108
+ num = num.toString();
109
+ var decimal = num.split('.');
110
+ var new_number = decimal[0];
111
+ if(num.indexOf('.') != -1)
112
+ {
113
+ decimal = decimal[1];
114
+ }
115
+ new_number = new_number.replace(/\d(?=(?:\d{3})+(?:$))/g, function($0, i){
116
+ return $0+number_style[0];
117
+ });
118
+ if(num.indexOf('.') != -1)
119
+ {
120
+ new_number = new_number+number_style[1]+decimal;
121
+ }
122
+ return new_number;
123
+ }
124
+ var braapf_filter_blocked = false,
125
+ //object{taxonomy:"", values:[value:"",html:"name/colorBlock/imgBlock/text"], glue:""}
126
+ braapf_selected_filters = [],
127
+ braapf_filtered_filters = [],
128
+ braapf_filters_var,
129
+ braapf_ajax_request;
130
+ //FUNCTIONS
131
+ var braapf_checkbox_same,
132
+ braapf_update_products,
133
+ braapf_grab_all,
134
+ braapf_grab_single,
135
+ braapf_compact_filters,
136
+ braapf_compat_filters_to_string,
137
+ braapf_build_url_from_urldata,
138
+ braapf_glue_by_operator,
139
+ braapf_ajax_load_from_url,
140
+ braapf_ajax_load_from_url_request,
141
+ braapf_init_load,
142
+ braapf_remove_pages_from_url_data,
143
+ braapf_filter_products_by_url,
144
+ braapf_get_current_url_data,
145
+ braapf_reset_buttons_hide;
146
+ function braapf_grab_all_init() {braapf_grab_all();}
147
+ function braapf_selected_filters_area_set_init() {braapf_selected_filters_area_set();}
148
+ function braapf_filtered_filters_set() {
149
+ braapf_filtered_filters = braapf_selected_filters.slice();
150
+ berocket_do_action('braapf_init_filtered_set', braapf_filtered_filters);
151
+ }
152
+ (function ($){
153
+ //Main part
154
+ //Checkbox change script
155
+ $(document).on("change", ".bapf_sfilter.bapf_ckbox input[type=checkbox]", function(){
156
+ var value = $(this).val();
157
+ var taxonomy = $(this).parents('.bapf_sfilter').data('taxonomy');
158
+ var checked = $(this).prop('checked');
159
+ braapf_checkbox_same(taxonomy, value, checked);
160
+ berocket_apply_filters('input_ckbox_changed', this, taxonomy, value, checked);
161
+ var filter_changed_element = {
162
+ element:'#'+$(this).attr('id'),
163
+ parent: 1,
164
+ find: false
165
+ };
166
+ berocket_apply_filters('filter_changed_element', filter_changed_element, $(this));
167
+ berocket_do_action('update_products', 'filter', $(this));
168
+ });
169
+ braapf_checkbox_same = function (taxonomy, value, checked) {
170
+ $('.bapf_sfilter[data-taxonomy="'+taxonomy+'"] input[value="'+value+'"]').prop('checked', checked);
171
+ if( $('.bapf_sfilter[data-taxonomy="'+taxonomy+'"]').length < $('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+taxonomy+'"]').length ) {
172
+ berocket_throw_error('multiple_filters_for_same_taxonomy', taxonomy);
173
+ }
174
+ }
175
+ $(document).on('braapf_unselect', '.bapf_ckbox', function(event, data) {
176
+ if( typeof(data) == 'undefined' ) {
177
+ data = false;
178
+ }
179
+ if( data == false ) {
180
+ var $this = $(this).find('input[type=checkbox]');
181
+ } else {
182
+ var $this = $(this).find('input[value="'+data.value+'"]');
183
+ }
184
+ if( $this.length > 0 ) {
185
+ var value = $this.val();
186
+ var taxonomy = $(this).data('taxonomy');
187
+ $this.prop('checked', false);
188
+ braapf_checkbox_same(taxonomy, value, false);
189
+ }
190
+ });
191
+ $(document).on('braapf_unselect_all', '.bapf_ckbox', function(event, data) {
192
+ $(this).trigger('braapf_unselect', false);
193
+ });
194
+ //update/reset butons
195
+ $(document).on('click', '.berocket_aapf_widget_update_button, .bapf_update', function(event) {
196
+ event.preventDefault();
197
+ berocket_do_action('update_products', 'update', $(this));
198
+ });
199
+ $(document).on('click', '.berocket_aapf_reset_button, .bapf_reset', function(event) {
200
+ event.preventDefault();
201
+ braapf_unselect_all();
202
+ berocket_do_action('update_products', 'reset_all', $(this));
203
+ });
204
+ braapf_reset_buttons_hide = function() {
205
+ if( typeof(braapf_filtered_filters) == 'undefined' || braapf_filtered_filters.length <= 0 ) {
206
+ $('.bapf_rst_nofltr').hide();
207
+ } else {
208
+ $('.bapf_rst_nofltr').show();
209
+ }
210
+ var selected = false;
211
+ if( typeof(braapf_filtered_filters) != 'undefined' && braapf_filtered_filters.length > 0 ) {
212
+ $.each(braapf_filtered_filters, function(i, taxonomy) {
213
+ if( taxonomy.values.length > 0 ) {
214
+ selected = true;
215
+ return false;
216
+ }
217
+ });
218
+ }
219
+ if( selected ) {
220
+ $('.bapf_rst_sel').show();
221
+ } else {
222
+ $('.bapf_rst_sel').hide();
223
+ }
224
+ }
225
+ berocket_add_filter('braapf_init', braapf_reset_buttons_hide, 1500);
226
+ berocket_add_filter('braapf_init_filtered_set', braapf_reset_buttons_hide, 1500);
227
+ //Pagination page
228
+ var pagination_links = the_ajax_script.pagination_class;
229
+ pagination_links = pagination_links.replace(',', ' a,');
230
+ pagination_links = pagination_links+' a';
231
+ $(document).on('click', pagination_links, function(event) {
232
+ event.preventDefault();
233
+ var href = $(this).attr('href');
234
+ href = decodeURI(href);
235
+ braapf_change_url_history_api(href, {replace:the_ajax_script.seo_friendly_urls});
236
+ berocket_add_filter('ajax_load_from_url_beforeSend', braapf_pagination_prevent_filters_load);
237
+ braapf_ajax_load_from_url(href, {}, berocket_apply_filters('ajax_load_from_pagination', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_init_load]}, href));
238
+ });
239
+ function braapf_pagination_prevent_filters_load(xhr) {
240
+ berocket_remove_filter('ajax_load_from_url_beforeSend', braapf_pagination_prevent_filters_load);
241
+ xhr.setRequestHeader('X-Braapfdisable', '1');
242
+ return xhr;
243
+ }
244
+ //Order By override
245
+ if( the_ajax_script.control_sorting ) {
246
+ $(document).on('submit', the_ajax_script.ordering_class, function(event) {
247
+ event.preventDefault();
248
+ var current_url_data = braapf_get_current_url_data();
249
+ current_url_data = braapf_remove_pages_from_url_data(current_url_data);
250
+ if( Array.isArray(current_url_data.queryargs) ) {
251
+ var newqueryargs = [];
252
+ $.each(current_url_data.queryargs, function(i, val) {
253
+ if(val.name != 'orderby') {
254
+ newqueryargs.push(val);
255
+ }
256
+ });
257
+ current_url_data.queryargs = newqueryargs;
258
+ } else {
259
+ current_url_data.queryargs = [];
260
+ }
261
+ var form_data = $(this).serializeArray();
262
+ if( Array.isArray(form_data) ) {
263
+ $.each(form_data, function(i, val) {
264
+ if(val.name == 'paged') {
265
+ current_url_data.page = parseInt(val.value);
266
+ } else if( val.name == 'orderby' ) {
267
+ if( the_ajax_script.default_sorting != val.value ) {
268
+ current_url_data.queryargs.push(val);
269
+ }
270
+ } else {
271
+ current_url_data.queryargs.push(val);
272
+ }
273
+ });
274
+ }
275
+ var url_filtered = braapf_build_url_from_urldata(current_url_data);
276
+ braapf_filter_products_by_url(url_filtered);
277
+ });
278
+ }
279
+
280
+ //default update products
281
+ braapf_get_url_with_filters_selected = function() {
282
+ braapf_grab_all();
283
+ var compat_filters = braapf_compact_filters();
284
+ var filter_mask = berocket_apply_filters('braapf_filters_mask', the_ajax_script.url_mask);
285
+ var filter_string = braapf_compat_filters_to_string(compat_filters, filter_mask, the_ajax_script.url_split);
286
+ var current_url_data = braapf_get_current_url_data();
287
+ current_url_data.filter = filter_string;
288
+ current_url_data = braapf_remove_pages_from_url_data(current_url_data);
289
+ var url_filtered = braapf_build_url_from_urldata(current_url_data);
290
+ return url_filtered;
291
+ }
292
+ braapf_update_products = function (context, element) {
293
+ if( typeof(context) == 'undefined' ) {
294
+ context = 'filter';
295
+ }
296
+ if( typeof(element) == 'undefined' ) {
297
+ element = false;
298
+ }
299
+ context = berocket_apply_filters('before_update_products_context', context, element);
300
+ var url_filtered = braapf_get_url_with_filters_selected();
301
+ if( berocket_apply_filters('apply_filters_to_page', ($('.berocket_aapf_widget_update_button:visible, .bapf_update:visible').length == 0 || context != 'filter'), context, element, url_filtered) ) {
302
+ braapf_selected_filters_area_set();
303
+ braapf_filter_products_by_url(url_filtered);
304
+ } else if( berocket_apply_filters('apply_filters_to_page_partial', false, context, element, url_filtered) ) {
305
+ braapf_ajax_load_from_url(url_filtered, {}, berocket_apply_filters('ajax_load_from_filters_partial', {done:[braapf_replace_each_filter, braapf_init_load]}, url_filtered, 'partial'), 'partial');
306
+ }
307
+ }
308
+ braapf_filter_products_by_url = function(url) {
309
+ if( berocket_apply_filters('page_has_products_holder', (! $(the_ajax_script.products_holder_id).length), url) ) {
310
+ location.href = url;
311
+ } else {
312
+ braapf_change_url_history_api(url, {replace:the_ajax_script.seo_friendly_urls});
313
+ braapf_ajax_load_from_url(url, {}, berocket_apply_filters('ajax_load_from_filters', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_replace_orderby, braapf_replace_each_filter, braapf_init_load, braapf_filtered_filters_set, braapf_update_url_history_api_from_current]}, url, 'default'));
314
+ }
315
+ }
316
+ braapf_update_url_history_api_from_current = function() {
317
+ if( the_ajax_script.seo_friendly_urls ) {
318
+ url_filtered = braapf_get_url_with_filters_selected();
319
+ history.replaceState(history.state, "BeRocket Rules", url_filtered);
320
+ }
321
+ }
322
+ //Grab filters from page
323
+ braapf_grab_all = function ($parent) {
324
+ if( typeof($parent) == 'undefined' ) { $parent = false; }
325
+ var selected_filters = [];
326
+ if( $parent === false ) {
327
+ var all_filters = $('.bapf_sfilter');
328
+ } else {
329
+ var all_filters = $($parent).find('.bapf_sfilter');
330
+ }
331
+ all_filters.each(function() {
332
+ var single_data = braapf_grab_single(this, selected_filters);
333
+ if( single_data !== false ) {
334
+ selected_filters.push(single_data);
335
+ }
336
+ });
337
+ selected_filters = berocket_apply_filters('grab_all_filters', selected_filters, $parent);
338
+ if( $parent === false ) {
339
+ braapf_selected_filters = selected_filters;
340
+ }
341
+ return selected_filters;
342
+ }
343
+ braapf_grab_single = function(element, selected_filters) {
344
+ element = $(element);
345
+ var single_data = false;
346
+ var exist = false;
347
+ var taxonomy = element.data('taxonomy');
348
+ if( typeof(taxonomy) == 'undefined' || ! taxonomy ) {
349
+ return berocket_apply_filters('grab_single_filter_taxonomy_undefined', single_data, element, selected_filters);
350
+ }
351
+ $.each(selected_filters, function(i, val) {
352
+ if(val.taxonomy == taxonomy ) {
353
+ exist = true;
354
+ }
355
+ });
356
+ if( ! berocket_apply_filters('grab_single_filter_exist', exist, element, selected_filters) ) {
357
+ single_data = berocket_apply_filters('grab_single_filter', single_data, element, selected_filters);
358
+ if( single_data !== false ) return single_data;
359
+ var operator = element.data('op');
360
+ var tax_name = element.data('name');
361
+ if( typeof(tax_name) == 'undefined' ) {
362
+ tax_name = '';
363
+ }
364
+ var glue = braapf_glue_by_operator(operator);
365
+ var values = [];
366
+ var values_find = [];
367
+ var $elements = $('.bapf_sfilter[data-taxonomy='+taxonomy+']');
368
+ $elements.find('input:checked:not(:disabled)').each(function(i, val) {
369
+ if( values_find.indexOf($(this).val()) == -1 ) {
370
+ values.push({value:$(this).val(), html:$(this).data('name')});
371
+ values_find.push($(this).val());
372
+ }
373
+ });
374
+ single_data = {name:tax_name, taxonomy:taxonomy, values:values, glue:glue, operator:operator};
375
+ }
376
+ return berocket_apply_filters('grab_single_filter_default', single_data, element, selected_filters);
377
+ }
378
+ braapf_glue_by_operator = function(operator) {
379
+ if( typeof(operator) != 'string' ) {
380
+ operator = '';
381
+ }
382
+ var glue = '-';
383
+ if( operator.toLowerCase() == 'and' ) {
384
+ glue = '+';
385
+ }
386
+ return berocket_apply_filters('glue_by_operator', glue, operator);
387
+ }
388
+ //compact filters to {taxonomy,values} object
389
+ braapf_compact_filters = function(filters_start) {
390
+ if( typeof(filters_start) == 'undefined' ) {
391
+ filters_start = braapf_selected_filters;
392
+ }
393
+ var filters = [];
394
+ $.each(filters_start, function(i, val) {
395
+ var values_str = '';
396
+ if( typeof(val.customValuesLine) != 'undefined' ) {
397
+ values_str = val.customValuesLine;
398
+ } else {
399
+ $.each(val.values, function(i2, val2) {
400
+ if( values_str.length ) {
401
+ values_str += val.glue;
402
+ }
403
+ values_str += val2.value;
404
+ });
405
+ }
406
+ if( values_str.length ) {
407
+ filters.push(berocket_apply_filters('compat_filters_result_single', {taxonomy:val.taxonomy, values:values_str}, val));
408
+ }
409
+ });
410
+ return berocket_apply_filters('compat_filters_result', filters, filters_start);
411
+ }
412
+ //Compact all filters to single string
413
+ braapf_compat_filters_to_string = function (compat_filters, filter_mask, glue_between_taxonomy) {
414
+ var filters_string = '';
415
+ $.each(compat_filters, function(i, val) {
416
+ if( filters_string.length ) {
417
+ filters_string += glue_between_taxonomy;
418
+ }
419
+ var single_string = filter_mask;
420
+ single_string = single_string.replace('%t%', val.taxonomy);
421
+ single_string = single_string.replace('%v%', val.values);
422
+ filters_string += berocket_apply_filters('compat_filters_to_string_single', single_string, val, compat_filters, filter_mask, glue_between_taxonomy);
423
+ });
424
+ return berocket_apply_filters('compat_filters_to_string', filters_string, compat_filters, filter_mask, glue_between_taxonomy);
425
+ }
426
+ //get object with information about currentUrl/sendedUrl
427
+ braapf_get_current_url_data = function(url) {
428
+ if( typeof(url) == 'undefined' ) {
429
+ var link = location.href.split('#')[0].split('?')[0],
430
+ query = location.search.substring(1);
431
+ } else {
432
+ var link = url.split('#')[0].split('?')[0];
433
+ if( url.split('#')[0].split('?').length > 1 ) {
434
+ var query = url.split('#')[0].split('?')[1];
435
+ } else {
436
+ var query = '';
437
+ }
438
+ }
439
+ var query_arr = [],
440
+ page = 1,
441
+ search_page = link.match(/\/page\/(\d+)/);
442
+ if( search_page && typeof(search_page[1]) == 'string' ) {
443
+ page = parseInt(search_page[1]);
444
+ link = link.replace(/\/page\/(\d+)/, '');
445
+ }
446
+ query = query.split('&');
447
+ $.each(query, function(i, val) {
448
+ if( val.length ) {
449
+ query[i] = val.split('=');
450
+ if( query[i][0] == 'paged' ) {
451
+ page = parseInt(query[i][1]);
452
+ } else {
453
+ query_arr.push({name:query[i][0], value: query[i][1]});
454
+ }
455
+ }
456
+ });
457
+ return berocket_apply_filters('get_current_url_data', {baselink:link, queryargs:query_arr, filter:"", page:page});
458
+ }
459
+ braapf_remove_pages_from_url_data = function(url_data) {
460
+ url_data.page = 1;
461
+ if( Array.isArray(url_data.queryargs) ) {
462
+ var newqueryargs = [];
463
+ $.each(url_data.queryargs, function(i, val) {
464
+ if(val.name != 'product-page') {
465
+ newqueryargs.push(val);
466
+ }
467
+ });
468
+ url_data.queryargs = newqueryargs;
469
+ }
470
+ return url_data;
471
+ }
472
+ //Build url from url data object
473
+ braapf_build_url_from_urldata = function (url_data, parameters) {
474
+ if( typeof(parameters) == 'undefined' ) {
475
+ parameters = braapf_build_url_parameters_default();
476
+ }
477
+ var url = berocket_apply_filters('url_from_urldata_baselink', url_data.baselink, url_data, parameters);
478
+ var query_get = '';
479
+ if( url_data.queryargs.length ) {
480
+ $.each(url_data.queryargs, function(i, val) {
481
+ if( query_get.length ) {
482
+ query_get += '&';
483
+ }
484
+ if( val.name.length ) {
485
+ query_get += val.name + '=' + val.value;
486
+ }
487
+ });
488
+ }
489
+ if( url_data.page && url_data.page > 1 ) {
490
+ if( query_get.length ) {
491
+ query_get += '&';
492
+ }
493
+ query_get += 'paged=' + url_data.page;
494
+ }
495
+ if( query_get.length ) {
496
+ query_get = '?' + query_get;
497
+ }
498
+ url = berocket_apply_filters('url_from_urldata_linkget', (url+query_get), url_data, parameters, url, query_get);
499
+ return url;
500
+ }
501
+ braapf_build_url_parameters_default = function () {
502
+ return berocket_apply_filters('build_url_parameters_default', {});
503
+ }
504
+ //REPLACE ANY ELEMENT ON PAGE
505
+ braapf_replace_current_with_new = function(html, selector, argsin) {
506
+ if( typeof(argsin) == 'undefined' ) {
507
+ argsin = {};
508
+ }
509
+ args = {replace:false};
510
+ jQuery.extend(args, argsin);
511
+ var $html = $('<div><div>'+html+'</div></div>');
512
+ var $new = $html.find(selector);
513
+ var $current = $(selector);
514
+ if( $current.length != 0 ) {
515
+ if( $new.length != $current.length && $new.length != 0 ) {
516
+ berocket_throw_error('error_notsame_block_qty', selector, $new.length, $current.length);
517
+ }
518
+ if( $new.length == 0 ) {
519
+ $current.html('').addClass('braapfNotReplaced');
520
+ $current.hide();
521
+ } else {
522
+ $current.each(function(i, el) {
523
+ if( typeof($new[i]) != 'undefined' ) {
524
+ if( args.replace ) {
525
+ $(el).replaceWith($($new[i]));
526
+ } else {
527
+ $(el).html($($new[i]).html()).removeClass('braapfNotReplaced');
528
+ }
529
+ } else {
530
+ $(el).html('').addClass('braapfNotReplaced');
531
+ }
532
+ });
533
+ $current.show();
534
+ }
535
+ }
536
+ }
537
+ braapf_replace_products = function (data) {
538
+ var products_selector = the_ajax_script.products_holder_id;
539
+ var $html = $('<div><div>'+data+'</div></div>');
540
+ $('.bapf_no_products').remove();
541
+ braapf_replace_current_with_new(data, products_selector);
542
+ if( $('.braapfNotReplaced').filter(products_selector).length ) {
543
+ $('.braapfNotReplaced').filter(products_selector).before($(the_ajax_script.no_products));
544
+ }
545
+ }
546
+ braapf_replace_pagination = function (data) {
547
+ var pagination_selector = the_ajax_script.pagination_class;
548
+ if( $(pagination_selector).length == 0 ) {
549
+ var products_selector = the_ajax_script.products_holder_id;
550
+ var $html = $('<div><div>'+data+'</div></div>');
551
+ var pagination = $html.find(pagination_selector).last();
552
+ if( pagination.length ) {
553
+ $(products_selector).last().after(pagination);
554
+ }
555
+ } else {
556
+ braapf_replace_current_with_new(data, pagination_selector);
557
+ }
558
+ }
559
+ braapf_replace_result_count = function (data) {
560
+ var result_count_selector = the_ajax_script.result_count_class;
561
+ braapf_replace_current_with_new(data, result_count_selector);
562
+ }
563
+ braapf_replace_orderby = function (data) {
564
+ var orderby_selector = the_ajax_script.ordering_class;
565
+ braapf_replace_current_with_new(data, orderby_selector);
566
+ }
567
+ braapf_replace_each_filter = function(html) {
568
+ var $html = $('<div><div>'+html+'</div></div>');
569
+ $('.berocket_single_filter_widget').each(function() {
570
+ var data_id = $(this).data('id');
571
+ $('.berocket_single_filter_widget_'+data_id).html($html.find('.berocket_single_filter_widget_'+data_id).last().html());
572
+ if( $html.find('.berocket_single_filter_widget_'+data_id).is('.bapf_mt_none') ) {
573
+ $('.berocket_single_filter_widget_'+data_id).addClass('bapf_mt_none');
574
+ } else {
575
+ $('.berocket_single_filter_widget_'+data_id).removeClass('bapf_mt_none');
576
+ }
577
+ });
578
+ }
579
+ //Add url HTML5
580
+ braapf_change_url_history_api = function(new_url, data) {
581
+ if( typeof(data) != 'undefined' && data.replace ) {
582
+ var stateParameters = { BeRocket: "Rules" };
583
+ history.replaceState(stateParameters, "");
584
+ history.pushState(stateParameters, "", new_url);
585
+ history.pathname = new_url;
586
+ }
587
+ }
588
+ if( berocket_apply_filters('load_products_ajax_on_popstate', true) ) {
589
+ window.onpopstate = function(event) {
590
+ if ( event.state != null && event.state.BeRocket == 'Rules' ) {
591
+ var url = location.href;
592
+ if( berocket_apply_filters('page_has_products_holder', (! $(the_ajax_script.products_holder_id).length), url) ) {
593
+ location.href = url;
594
+ } else {
595
+ braapf_ajax_load_from_url(url, {}, berocket_apply_filters('ajax_load_from_filters', {done:[braapf_replace_products, braapf_replace_pagination, braapf_replace_result_count, braapf_replace_orderby, braapf_replace_each_filter, braapf_init_load, braapf_filtered_filters_set, braapf_update_url_history_api_from_current]}, url, 'default'));
596
+ }
597
+ }
598
+ }
599
+ }
600
+ //Load data from URL
601
+ braapf_ajax_load_from_url = function(url, send_data, callback_func, type) {
602
+ if( typeof(type) == 'undefined' ) {
603
+ type = 'default';
604
+ }
605
+ if( typeof(send_data) != 'object' ) {
606
+ send_data = {};
607
+ }
608
+ if( typeof(callback_func) != 'object' ) {
609
+ callback_func = {done:[], fail:[], always:[]};
610
+ }
611
+ if( typeof(callback_func.done) == 'undefined' || ! Array.isArray(callback_func.done) ) {
612
+ callback_func.done = [];
613
+ }
614
+ if( typeof(callback_func.fail) == 'undefined' || ! Array.isArray(callback_func.fail) ) {
615
+ callback_func.fail = [];
616
+ }
617
+ if( typeof(callback_func.always) == 'undefined' || ! Array.isArray(callback_func.always) ) {
618
+ callback_func.always = [];
619
+ }
620
+ url = berocket_apply_filters('ajax_load_from_url_url', url, send_data, callback_func, type);
621
+ send_data = berocket_apply_filters('ajax_load_from_url_data', send_data, url, callback_func, type);
622
+ callback_func = berocket_apply_filters('ajax_load_from_url_callback', callback_func, url, send_data, type);
623
+ braapf_ajax_load_from_url_request(url, send_data, callback_func, type);
624
+ }
625
+ braapf_ajax_load_from_url_request = function(url, send_data, callback_func, type) {
626
+ $(document).trigger('berocket_ajax_filtering_start');
627
+ if( typeof(braapf_ajax_request) == 'object' && typeof(braapf_ajax_request.abort) != 'undefined' ) {
628
+ braapf_ajax_request.abort();
629
+ }
630
+ braapf_ajax_request = $.ajax({method:"GET", url: url, data: send_data, beforeSend: function(xhr) {
631
+ xhr = berocket_apply_filters('ajax_load_from_url_beforeSend', xhr, url, send_data, callback_func, type);
632
+ }
633
+ })
634
+ .done(function(data, textStatus, jqXHR) {
635
+ $(document).trigger('berocket_ajax_filtering_on_update');
636
+ data = berocket_apply_filters('ajax_load_from_url_done', data, url, send_data, callback_func, type);
637
+ $.each(callback_func.done, function(i, val) {
638
+ val(data, textStatus, jqXHR);
639
+ });
640
+ data = berocket_apply_filters('ajax_load_from_url_done_after', data, url, send_data, callback_func, type);
641
+ $(document).trigger('berocket_ajax_products_loaded');
642
+ })
643
+ .fail(function(jqXHR, textStatus, errorThrown) {
644
+ if( textStatus == 'abort' ) {
645
+ return false;
646
+ }
647
+ $(document).trigger('berocket_ajax_products_not_loaded');
648
+ jqXHR = berocket_apply_filters('ajax_load_from_url_fail', jqXHR, url, send_data, callback_func, type);
649
+ $.each(callback_func.fail, function(i, val) {
650
+ val(jqXHR, textStatus, errorThrown);
651
+ });
652
+ jqXHR = berocket_apply_filters('ajax_load_from_url_fail_after', jqXHR, url, send_data, callback_func, type);
653
+ if( type == 'default' ) {
654
+ var query_send_data = jQuery.param(send_data);
655
+ if( query_send_data ) {
656
+ if( url.split('?').length > 1 ) {
657
+ url = url + "&" + query_send_data;
658
+ } else {
659
+ url = url + "?" + query_send_data;
660
+ }
661
+ }
662
+ location.href = url;
663
+ }
664
+ })
665
+ .always(function(data, textStatus, jqXHR) {
666
+ data = berocket_apply_filters('ajax_load_from_url_always', data, url, send_data, callback_func, type);
667
+ $.each(callback_func.always, function(i, val) {
668
+ val(data, textStatus, jqXHR);
669
+ });
670
+ data = berocket_apply_filters('ajax_load_from_url_always_after', data, url, send_data, callback_func, type);
671
+ $(document).trigger('berocket_ajax_filtering_end');
672
+ });
673
+ }
674
+ function braapf_additional_header(xhr) {
675
+ xhr.setRequestHeader('X-Braapf', '1');
676
+ return xhr;
677
+ }
678
+ //INIT filters
679
+ braapf_init_load = function() {
680
+ if( $(window).width() <= 767 ) {
681
+ $('.bapf_sngl_hd_mobile').remove();
682
+ }
683
+ if( $(window).width() > 767 && $(window).width() <= 1024 ) {
684
+ $('.bapf_sngl_hd_tablet').remove();
685
+ }
686
+ if( $(window).width() > 1024 ) {
687
+ $('.bapf_sngl_hd_desktop').remove();
688
+ }
689
+ $('.bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)').each(function() {
690
+ $(this).mCustomScrollbar({setHeight:$(this).data('mcs-h'), scrollInertia: 300}).addClass('bapf_mcs_ready');
691
+ });
692
+ $('.berocket_single_filter_widget').each(function() {
693
+ var data_id = $(this).data('id');
694
+ if( $('.berocket_single_filter_widget_'+data_id).length > 1 ) {
695
+ $('.berocket_single_filter_widget_'+data_id).not($('.berocket_single_filter_widget_'+data_id).first()).remove();
696
+ }
697
+ });
698
+ $('.bapf_desci').on('click hover', function(e) {
699
+ e.stopPropagation();
700
+ });
701
+ berocket_do_action('braapf_init', braapf_selected_filters);
702
+ $(document).trigger('berocket_filters_first_load');
703
+ }
704
+ braapf_update_page_on_error = function() {
705
+ location.reload();
706
+ }
707
+ //Selected filters area
708
+ braapf_selected_filters_area_set = function() {
709
+ if( typeof(braapf_filtered_filters) != 'undefined' && braapf_filtered_filters.length > 0 ) {
710
+ var html = '';
711
+ $.each(braapf_filtered_filters, function(i, taxonomy) {
712
+ if( taxonomy.values.length > 0 ) {
713
+ html += '<span>' + taxonomy.name + '</span>';
714
+ html += '<ul>';
715
+ $.each(taxonomy.values, function(i2, val) {
716
+ html += '<li><a href="#unselect_'+val.value+'" class="braapf_unselect" data-taxonomy="'+taxonomy.taxonomy+'" data-value="'+val.value+'"><i class="fa fa-times"></i>'+val.html+'</a></li>';
717
+ });
718
+ html += '</ul>';
719
+ }
720
+ });
721
+ if( html ) {
722
+ $('.bapf_sfa_mt_hide').show().parent().removeClass('bapf_mt_none');
723
+ html = '<div class="berocket_aapf_widget_selected_filter">' + html + '<ul><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+'</a></li></ul>';
724
+ } else {
725
+ html =the_ajax_script.translate.nothing_selected;
726
+ $('.bapf_sfa_mt_hide').hide().parent().addClass('bapf_mt_none');
727
+ }
728
+ $('.berocket_aapf_widget_selected_area').html(html);
729
+ }
730
+ }
731
+
732
+ $(document).on('click', '.berocket_aapf_widget_selected_area .braapf_unselect', function(event) {
733
+ event.preventDefault();
734
+ $('.bapf_sfilter[data-taxonomy='+$(this).data('taxonomy')+']').trigger('braapf_unselect', $(this).data());
735
+ berocket_do_action('update_products', 'reset_single', $(this));
736
+ });
737
+ braapf_unselect_all = function() {
738
+ braapf_grab_all();
739
+ if( typeof(braapf_selected_filters) != 'undefined' && braapf_selected_filters.length > 0 ) {
740
+ $.each(braapf_selected_filters, function(i, taxonomy) {
741
+ if( taxonomy.values.length > 0 ) {
742
+ $('.bapf_sfilter[data-taxonomy='+taxonomy.taxonomy+']').trigger('braapf_unselect_all', taxonomy);
743
+ }
744
+ });
745
+ }
746
+ }
747
+ $(document).on('click', '.berocket_aapf_widget_selected_area .braapf_unselect_all', function(event) {
748
+ event.preventDefault();
749
+ braapf_unselect_all();
750
+ berocket_do_action('update_products', 'reset_all', $(this));
751
+ });
752
+ berocket_add_filter('braapf_init', braapf_grab_all_init, 1000);
753
+ berocket_add_filter('braapf_init', braapf_selected_filters_area_set_init, 1100);
754
+ berocket_add_filter('braapf_init_filtered_set', braapf_selected_filters_area_set_init, 1100);
755
+ //Error catch
756
+ braapf_reload_page_for_products_error = function(error_exist, selector) {
757
+ if( selector == the_ajax_script.products_holder_id) {
758
+ braapf_update_page_on_error();
759
+ }
760
+ return error_exist;
761
+ }
762
+ //Additional part
763
+ berocket_add_filter('ajax_load_from_url_beforeSend', braapf_additional_header);
764
+ berocket_add_filter('update_products', braapf_update_products);
765
+ berocket_add_filter('error_notsame_block_qty', braapf_reload_page_for_products_error);
766
+ $(document).ready(function(){
767
+ if( $('.berocket_wc_shortcode_fix').length ) {
768
+ braapf_replace_each_filter($('.berocket_wc_shortcode_fix').html());
769
+ $('.berocket_wc_shortcode_fix').html('');
770
+ }
771
+ braapf_init_load();
772
+ braapf_filtered_filters_set();
773
+ $(document).trigger('berocket_filters_document_ready');
774
+ });
775
+ })(jQuery);
776
+ var braapf_get_current_filters,
777
+ braapf_scroll_shop_to_top;
778
+ (function ($){
779
+ //default filters
780
+ braapf_get_current_filters = function (url_data) {
781
+ if( url_data.queryargs.length ) {
782
+ var newqueryargs = [];
783
+ $.each(url_data.queryargs, function (i, val) {
784
+ if( val.name == the_ajax_script.url_variable ) {
785
+ url_data.filter = val.value;
786
+ } else {
787
+ newqueryargs.push(val);
788
+ }
789
+ });
790
+ url_data.queryargs = newqueryargs;
791
+ }
792
+ return url_data;
793
+ }
794
+ braapf_set_filters_to_link = function(url, url_data, parameters, url_without_query, query_get) {
795
+ if( typeof(url_data.filter) == 'string' && url_data.filter.length ) {
796
+ if( query_get.length ) {
797
+ url += '&';
798
+ } else {
799
+ url += '?';
800
+ }
801
+ url += the_ajax_script.url_variable + '=' + url_data.filter;
802
+ }
803
+ return url;
804
+ }
805
+ //SINGLE ELEMENT / RADIOBUTTONS
806
+ braapf_convert_ckbox_to_radio = function(thisel, taxonomy, value, checked){
807
+ var $this = $(thisel);
808
+ var parent = $(thisel).closest('.bapf_sfilter.bapf_ckbox');
809
+ if( parent.is('.bapf_asradio') ) {
810
+ parent.find('input[type=checkbox]:checked:not(:disabled)').each(function() {
811
+ var val = $(this).val();
812
+ if( val != value ) {
813
+ braapf_checkbox_same(taxonomy, val, false);
814
+ }
815
+ });
816
+ }
817
+ }
818
+ berocket_add_filter('input_ckbox_changed', braapf_convert_ckbox_to_radio);
819
+ //CHILD HIERARCHICAL
820
+ $(document).on('click', '.bapf_ochild, .bapf_cchild', function(e) {
821
+ e.preventDefault;
822
+ if( $(this).is('.bapf_ochild' ) ) {
823
+ $(this).trigger('bapf_ochild');
824
+ } else {
825
+ $(this).trigger('bapf_cchild');
826
+ }
827
+ });
828
+ $(document).on('bapf_ochild', '.bapf_sfilter.bapf_ckbox ul li', function(e) {
829
+ e.stopPropagation();
830
+ $(this).find('.bapf_ochild, .bapf_cchild').first().removeClass('bapf_ochild').removeClass('fa-plus').addClass('bapf_cchild').addClass('fa-minus');
831
+ $(this).find('ul').first().show();
832
+ });
833
+ $(document).on('bapf_cchild', '.bapf_sfilter.bapf_ckbox ul li', function(e) {
834
+ e.stopPropagation();
835
+ $(this).find('.bapf_ochild, .bapf_cchild').first().addClass('bapf_ochild').addClass('fa-plus').removeClass('bapf_cchild').removeClass('fa-minus');
836
+ $(this).find('ul').first().hide();
837
+ });
838
+ var braapf_hierarhical_values = [];
839
+ braapf_hierarhical_save = function(data) {
840
+ braapf_hierarhical_values = [];
841
+ $('.bapf_cchild').each(function() {
842
+ braapf_hierarhical_values.push($(this).parent().children('input[type=checkbox]').attr('id'));
843
+ });
844
+ return data;
845
+ }
846
+ braapf_hierarhical_set = function(data) {
847
+ $.each(braapf_hierarhical_values, function(i, val) {
848
+ $('#'+val).trigger('bapf_ochild');
849
+ });
850
+ return data;
851
+ }
852
+ berocket_add_filter('ajax_load_from_url_done', braapf_hierarhical_save, 1);
853
+ berocket_add_filter('ajax_load_from_url_done_after', braapf_hierarhical_set, 1000);
854
+ //SHOW/HIDE FILTERS
855
+ $(document).on('click', '.bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl', function(e) {
856
+ e.preventDefault;
857
+ if( $(this).closest('.bapf_ocolaps, .bapf_ccolaps').is('.bapf_ocolaps' ) ) {
858
+ $(this).closest('.bapf_ocolaps, .bapf_ccolaps').trigger('bapf_ocolaps');
859
+ } else {
860
+ $(this).closest('.bapf_ocolaps, .bapf_ccolaps').trigger('bapf_ccolaps');
861
+ }
862
+ });
863
+ $(document).on('bapf_ocolaps', '.bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps', function(e) {
864
+ $(this).find('.bapf_body').first().show();
865
+ $(this).removeClass('bapf_ocolaps').addClass('bapf_ccolaps');
866
+ if( $(this).find('.bapf_colaps_smb').length ) {
867
+ $(this).find('.bapf_colaps_smb').removeClass('fa-chevron-down').addClass('fa-chevron-up');
868
+ }
869
+ });
870
+ $(document).on('bapf_ccolaps', '.bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps', function(e) {
871
+ $(this).find('.bapf_body').first().hide();
872
+ $(this).addClass('bapf_ocolaps').removeClass('bapf_ccolaps');
873
+ if( $(this).find('.bapf_colaps_smb').length ) {
874
+ $(this).find('.bapf_colaps_smb').addClass('fa-chevron-down').removeClass('fa-chevron-up');
875
+ }
876
+ });
877
+ var braapf_collapse_status = {open:[], close:[]};
878
+ braapf_collapse_status_save = function(data) {
879
+ braapf_collapse_status = {open:[], close:[]};
880
+ $('.bapf_ocolaps, .bapf_ccolaps').each(function() {
881
+ if( $(this).is('.bapf_ocolaps') ) {
882
+ braapf_collapse_status.open.push($(this).attr('id'));
883
+ } else {
884
+ braapf_collapse_status.close.push($(this).attr('id'));
885
+ }
886
+ });
887
+ return data;
888
+ }
889
+ braapf_collapse_status_set = function(data) {
890
+ $.each(braapf_collapse_status.open, function(i, val) {
891
+ $('#'+val).trigger('bapf_ccolaps');
892
+ });
893
+ $.each(braapf_collapse_status.close, function(i, val) {
894
+ $('#'+val).trigger('bapf_ocolaps');
895
+ });
896
+ return data;
897
+ }
898
+ berocket_add_filter('ajax_load_from_url_done', braapf_collapse_status_save, 1);
899
+ berocket_add_filter('ajax_load_from_url_done_after', braapf_collapse_status_set, 1000);
900
+ //Show/Hide values button
901
+ $(document).on('click', '.bapf_show_hide', function() {
902
+ $(this).closest('.bapf_sfilter').toggleClass('bapf_fhide');
903
+ if( $(this).closest('.bapf_sfilter').is('.bapf_fhide') ) {
904
+ $(this).text($(this).data('show'));
905
+ } else {
906
+ $(this).text($(this).data('hide'));
907
+ }
908
+ });
909
+ var braapf_show_hide_values_status = {open:[], close:[]};
910
+ braapf_show_hide_values_save = function(data) {
911
+ braapf_show_hide_values_status = {open:[], close:[]};
912
+ $('.bapf_sfilter').each(function() {
913
+ if( $(this).is('.bapf_fhide') ) {
914
+ braapf_show_hide_values_status.close.push($(this).attr('id'));
915
+ } else {
916
+ braapf_show_hide_values_status.open.push($(this).attr('id'));
917
+ }
918
+ });
919
+ return data;
920
+ }
921
+ braapf_show_hide_values_set = function(data) {
922
+ $.each(braapf_show_hide_values_status.open, function(i, val) {
923
+ $('#'+val).removeClass('bapf_fhide');
924
+ $('#'+val).find('.bapf_show_hide').text($('#'+val).find('.bapf_show_hide').data('hide'));
925
+ });
926
+ $.each(braapf_show_hide_values_status.close, function(i, val) {
927
+ $('#'+val).addClass('bapf_fhide');
928
+ $('#'+val).find('.bapf_show_hide').text($('#'+val).find('.bapf_show_hide').data('show'));
929
+ });
930
+ return data;
931
+ }
932
+ berocket_add_filter('ajax_load_from_url_done', braapf_show_hide_values_save, 1);
933
+ berocket_add_filter('ajax_load_from_url_done_after', braapf_show_hide_values_set, 1000);
934
+ //Scroll page to the top
935
+ braapf_scroll_shop_to_top = function(data, url, send_data, callback_func, type) {
936
+ if( type == 'default' && ( the_ajax_script.scroll_shop_top == 1
937
+ || (the_ajax_script.scroll_shop_top == 2 && $(window).width() <= 768)
938
+ || (the_ajax_script.scroll_shop_top == 3 && $(window).width() > 768) )
939
+ ) {
940
+ var top_scroll_offset = 0;
941
+ if( $( the_ajax_script.products_holder_id ).length ) {
942
+ top_scroll_offset = $( the_ajax_script.products_holder_id ).offset().top + parseInt(the_ajax_script.scroll_shop_top_px);
943
+ if(top_scroll_offset < 0) top_scroll_offset = 0;
944
+ } else if( $( '.bapf_no_products' ).length ) {
945
+ top_scroll_offset = $( '.bapf_no_products' ).offset().top + parseInt(the_ajax_script.scroll_shop_top_px);
946
+ if(top_scroll_offset < 0) top_scroll_offset = 0;
947
+ }
948
+ $("html, body").animate({ scrollTop: top_scroll_offset }, "slow");
949
+ }
950
+ return data;
951
+ }
952
+ berocket_add_filter('ajax_load_from_url_beforeSend', braapf_scroll_shop_to_top);
953
+ //Sidebar
954
+ $(document).on('mousedown', '.wc-product-table-reset a', function() {
955
+ $(this).remove();
956
+ br_reset_all_filters();
957
+ });
958
+ $(document).on('click', '.berocket_element_above_products_is_hide_toggle', function (e){
959
+ e.preventDefault();
960
+ $(this).toggleClass( "active" ).next().slideToggle(200, 'linear');
961
+ var is_active = 'inactive';
962
+ if( $(this).is('.active') ) {
963
+ is_active = 'active';
964
+ }
965
+ $(document).trigger('berocket_element_above_products_'+is_active);
966
+ });
967
+ function berocket_custom_sidebar_close() {
968
+ $('.berocket_ajax_filters_sidebar_toggle').removeClass( "active" );
969
+ $('#berocket-ajax-filters-sidebar').removeClass('active');
970
+ $('body').removeClass('berocket_ajax_filters_sidebar_active');
971
+ }
972
+ function berocket_custom_sidebar_open() {
973
+ $('.berocket_ajax_filters_sidebar_toggle').addClass( "active" );
974
+ $('#berocket-ajax-filters-sidebar').addClass('active');
975
+ $('body').addClass('berocket_ajax_filters_sidebar_active');
976
+ }
977
+ $(document).on('berocket_custom_sidebar_close', berocket_custom_sidebar_close);
978
+ $(document).on('berocket_custom_sidebar_open', berocket_custom_sidebar_open);
979
+ $(document).on('click', '.berocket_ajax_filters_sidebar_toggle', function (e){
980
+ e.preventDefault();
981
+ if( $(this).is('.active') && $('#berocket-ajax-filters-sidebar').is('.active') ) {
982
+ berocket_custom_sidebar_close();
983
+ } else {
984
+ berocket_custom_sidebar_open();
985
+ }
986
+ });
987
+ $(document).on('click', '#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close', function (e) {
988
+ e.preventDefault();
989
+ berocket_custom_sidebar_close();
990
+ });
991
+ //Compatibility scripts
992
+
993
+ function berocket_ajax_load_product_table_compat() {
994
+ if( jQuery('.berocket_product_table_compat .dataTables_length select').length ) {
995
+ jQuery('.berocket_product_table_compat .wc-product-table').dataTable()._fnSaveState();
996
+ }
997
+ var tableid = jQuery('.berocket_product_table_compat .wc-product-table').attr('id');
998
+ if( typeof(window['config_'+tableid]) != 'undefined' && window['config_'+tableid].serverSide ) {
999
+ jQuery('.berocket_product_table_compat .wc-product-table').DataTable().destroy();
1000
+ var table_html = jQuery('.berocket_product_table_compat').html();
1001
+ jQuery('.berocket_product_table_compat').html('');
1002
+ jQuery('.berocket_product_table_compat').html(table_html);
1003
+ jQuery('.berocket_product_table_compat .blockUI.blockOverlay').remove();
1004
+ jQuery('.berocket_product_table_compat .wc-product-table').productTable();
1005
+ }
1006
+ }
1007
+ $(document).on('berocket_ajax_filtering_start', function() {
1008
+ if( jQuery('.berocket_product_table_compat').length ) {
1009
+ berocket_ajax_load_product_table_compat();
1010
+ }
1011
+ });
1012
+ })(jQuery);
1013
+ berocket_add_filter('get_current_url_data', braapf_get_current_filters);
1014
+ berocket_add_filter('url_from_urldata_linkget', braapf_set_filters_to_link);
1015
+ var braapf_child_parent_grab_single,
1016
+ braapf_child_parent_fix_selected,
1017
+ braapf_child_parent_load_with_update_button,
1018
+ braapf_add_loader_element,
1019
+ braapf_remove_loader_element;
1020
+ (function ($){
1021
+ //CHILD/PARENT FEATURE
1022
+ braapf_child_parent_grab_single = function(single_data, element, selected_filters) {
1023
+ var child_position = element.data('child');
1024
+ if( typeof(child_position) != 'undefined' && child_position > 0
1025
+ && typeof(single_data) == 'object' && typeof(single_data.values) != 'undefined' && Array.isArray(single_data.values) && single_data.values.length > 0 ) {
1026
+ child_position++;
1027
+ var taxonomy = element.data('taxonomy');
1028
+ var next_child = $('.bapf_sfilter.bapf_child_'+child_position+'[data-taxonomy='+taxonomy+']');
1029
+ if( next_child.length ) {
1030
+ var new_single_data = braapf_grab_single (next_child, []);
1031
+ if( typeof(new_single_data) == 'object' && typeof(new_single_data.values) != 'undefined' && Array.isArray(new_single_data.values) && new_single_data.values.length > 0 ) {
1032
+ single_data = new_single_data;
1033
+ }
1034
+ }
1035
+ }
1036
+ return single_data;
1037
+ }
1038
+ braapf_child_parent_fix_selected = function(context, element) {
1039
+ if( element != false) {
1040
+ var $filter = element.closest('.bapf_sfilter');
1041
+ if( $filter.length ) {
1042
+ var child_position = $filter.data('child');
1043
+ var taxonomy = $filter.data('taxonomy');
1044
+ if( typeof(child_position) != 'undefined' && child_position > 0 ) {
1045
+ for(i = child_position + 1; $('.bapf_sfilter.bapf_child_'+i+'[data-taxonomy='+taxonomy+']').length; i++) {
1046
+ $('.bapf_sfilter.bapf_child_'+i+'[data-taxonomy='+taxonomy+']').trigger('braapf_unselect', false);
1047
+ }
1048
+ }
1049
+ }
1050
+ }
1051
+ return context;
1052
+ }
1053
+ braapf_child_parent_load_with_update_button = function(issend, context, element) {
1054
+ if( element != false) {
1055
+ var $filter = element.closest('.bapf_sfilter');
1056
+ if( $filter.length ) {
1057
+ var child_position = $filter.data('child');
1058
+ var taxonomy = $filter.data('taxonomy');
1059
+ if( typeof(child_position) != 'undefined' && child_position > 0 ) {
1060
+ issend = true;
1061
+ }
1062
+ }
1063
+ }
1064
+ return issend;
1065
+ }
1066
+ berocket_add_filter( 'grab_single_filter_default', braapf_child_parent_grab_single );
1067
+ berocket_add_filter( 'before_update_products_context', braapf_child_parent_fix_selected );
1068
+ berocket_add_filter( 'apply_filters_to_page_partial', braapf_child_parent_load_with_update_button );
1069
+
1070
+ //LOADER OVER PAGE
1071
+ var braapf_loader_element;
1072
+ braapf_add_loader_element = function (data, url, send_data, callback_func, type) {
1073
+ if( type == 'default' ) {
1074
+ if( typeof(braapf_loader_element) != 'undefined' && typeof(braapf_loader_element.remove) == 'function' ) {
1075
+ braapf_loader_element.remove();
1076
+ }
1077
+ braapf_loader_element = $(the_ajax_script.load_image);
1078
+ $('body').append(braapf_loader_element);
1079
+ }
1080
+ return data;
1081
+ }
1082
+ braapf_remove_loader_element = function (data) {
1083
+ if( typeof(braapf_loader_element) != 'undefined' && typeof(braapf_loader_element.remove) == 'function' ) {
1084
+ braapf_loader_element.remove();
1085
+ }
1086
+ return data;
1087
+ }
1088
+ berocket_add_filter( 'ajax_load_from_url_beforeSend', braapf_add_loader_element );
1089
+ berocket_add_filter( 'ajax_load_from_url_always_after', braapf_remove_loader_element );
1090
+ //FILTER LINKS
1091
+ $(document).on('click', '.bapf_sfilter.bapf_ckbox .bapf_body li label a', function(event){event.preventDefault();$(this).parent().trigger('click')});
1092
+ })(jQuery);
1093
+
1094
+ var braapf_init_ion_slidr,
1095
+ braapf_ion_slidr_same,
1096
+ braapf_jqrui_slidr_ion_value_wc_price,
1097
+ braapf_jqrui_slidr_ion_value_arr_attr,
1098
+ braapf_init_ion_slidr_for_parent;
1099
+ (function ($){
1100
+ braapf_init_ion_slidr = function () {
1101
+ braapf_init_ion_slidr_for_parent($(document));
1102
+ }
1103
+ braapf_init_ion_slidr_for_parent = function($parent) {
1104
+ $parent.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function() {
1105
+ var $this = $(this).find('.bapf_slidr_all .bapf_slidr_main');
1106
+ var update_function = function(data) {
1107
+ if( !$this.is('.bapf_ion_blocked') ) {
1108
+ $this.addClass('bapf_ion_blocked');
1109
+ var taxonomy = $this.closest('.bapf_sfilter').data('taxonomy');
1110
+ braapf_ion_slidr_same(taxonomy, data);
1111
+ var filter_changed_element = {
1112
+ element:'#'+$this.closest('.bapf_sfilter').attr('id'),
1113
+ parent: 0,
1114
+ find: '.bapf_body'
1115
+ };
1116
+ berocket_apply_filters('filter_changed_element', filter_changed_element, $this);
1117
+ berocket_do_action('update_products', 'filter', $this);
1118
+ $this.removeClass('bapf_ion_blocked');
1119
+ }
1120
+ }
1121
+ var ionRangeData = berocket_apply_filters('jqrui_data_slidr_ion', {
1122
+ type: "double",
1123
+ from: $this.data('start'),
1124
+ to: $this.data('end'),
1125
+ grid: false,
1126
+ force_edges: true,
1127
+ onFinish: update_function,
1128
+ onUpdate: update_function,
1129
+ prettify: function(value) {
1130
+ value = berocket_apply_filters('jqrui_slidr_ion_'+$this.data('display'), value, $this);
1131
+ return value;
1132
+ }
1133
+ }, $this);
1134
+ $this.ionRangeSlider(ionRangeData);
1135
+ $(this).addClass('bapf_slidr_ready');
1136
+ });
1137
+ }
1138
+ braapf_ion_slidr_same = function (taxonomy, data) {
1139
+ $('.bapf_slidr_ion.bapf_slidr_ready[data-taxonomy='+taxonomy+']').each(function() {
1140
+ var $slider = $(this).find('.bapf_slidr_main');
1141
+ $slider.addClass('bapf_ion_blocked');
1142
+ var slider_data = $slider.data("ionRangeSlider");
1143
+ slider_data.update({from:data.from, to:data.to});
1144
+ $slider.removeClass('bapf_ion_blocked');
1145
+ });
1146
+ }
1147
+ function braapf_jqrui_slidr_ion_value_wc_price(value, $element) {
1148
+ var number_style = $element.data('number_style');
1149
+ if( ! number_style ) {
1150
+ number_style = the_ajax_script.number_style;
1151
+ }
1152
+ value = berocket_format_number (parseFloat(value), number_style );
1153
+ return value;
1154
+ }
1155
+ braapf_jqrui_slidr_ion_value_arr_attr = function(value, $element) {
1156
+ var attr = $element.data('attr');
1157
+ value = attr[value].n;
1158
+ return value;
1159
+ }
1160
+ braapf_grab_single_ion = function(single_data, element) {
1161
+ if( element.is('.bapf_slidr_ion.bapf_slidr_ready') && single_data != false ) {
1162
+ var data = element.find(".bapf_slidr_main").data('ionRangeSlider');
1163
+ var $slider = element.find('.bapf_slidr_main');
1164
+ var values = [data.options.from, data.options.to];
1165
+ var input_values = [berocket_apply_filters('jqrui_slidr_ion_'+$slider.data('display'), data.options.from, $slider), berocket_apply_filters('jqrui_slidr_ion_'+$slider.data('display'), data.options.to, $slider)];
1166
+ if( values[0] != $slider.data('min') || values[1] != $slider.data('max') ) {
1167
+ var value_ready = {value:values[0]+'_'+values[1], html:input_values[0]+' - '+input_values[1]};
1168
+ value_ready = berocket_apply_filters('jqrui_slidr_ion_link_'+$slider.data('display'), value_ready, values, input_values, $slider, single_data);
1169
+ single_data.values = [value_ready];
1170
+ }
1171
+ }
1172
+ return single_data;
1173
+ }
1174
+ braapf_jqrui_slidr_ion_values_link_arr_attr = function(value_ready, values, input_values, $slider, single_data) {
1175
+ var attr = $slider.data('attr');
1176
+ value_ready.value = attr[values[0]].v+'_'+attr[values[1]].v;
1177
+ return value_ready;
1178
+ }
1179
+ $(document).on('braapf_unselect braapf_unselect_all', '.bapf_slidr_ion', function(event, data) {
1180
+ var $slider = $(this).find('.bapf_slidr_main');
1181
+ var slider_data = $slider.data("ionRangeSlider");
1182
+ $slider.addClass('bapf_ion_blocked');
1183
+ slider_data.update({from:slider_data.options.min, to:slider_data.options.max});
1184
+ $slider.removeClass('bapf_ion_blocked');
1185
+ });
1186
+ berocket_add_filter('braapf_init', braapf_init_ion_slidr);
1187
+ berocket_add_filter('braapf_init_for_parent', braapf_init_ion_slidr_for_parent);
1188
+ berocket_add_filter('grab_single_filter_default', braapf_grab_single_ion);
1189
+ berocket_add_filter('jqrui_slidr_ion_link_arr_attr', braapf_jqrui_slidr_ion_values_link_arr_attr);
1190
+ berocket_add_filter('jqrui_slidr_ion_wc_price', braapf_jqrui_slidr_ion_value_wc_price);
1191
+ berocket_add_filter('jqrui_slidr_ion_arr_attr', braapf_jqrui_slidr_ion_value_arr_attr);
1192
+ })(jQuery);
1193
+
1194
+ var braapf_init_jqrui_slidr,
1195
+ braapf_jqrui_slidr_same,
1196
+ braapf_jqrui_slidr_values_wc_price;
1197
+ (function ($){
1198
+ $(document).on('change', '.bapf_slct .bapf_body select', function() {
1199
+ var filter_changed_element = {
1200
+ element:'#'+$(this).closest('.bapf_sfilter').attr('id'),
1201
+ parent: 0,
1202
+ find: '.bapf_body'
1203
+ };
1204
+ berocket_apply_filters('filter_changed_element', filter_changed_element, $(this));
1205
+ berocket_do_action('update_products', 'filter', $(this));
1206
+ });
1207
+ braapf_grab_single_select = function(single_data, element) {
1208
+ if( element.is('.bapf_slct') && single_data != false ) {
1209
+ var $select = element.find('.bapf_body select:not(:disabled)');
1210
+ $select.find('option:selected:not(:disabled)').each(function() {
1211
+ var value = $(this).val();
1212
+ if( value ) {
1213
+ single_data.values.push({value: value, html: $(this).data('name')})
1214
+ }
1215
+ });
1216
+ }
1217
+ return single_data;
1218
+ }
1219
+ $(document).on('braapf_unselect braapf_unselect_all', '.bapf_slct', function(event, data) {
1220
+ $(this).find('.bapf_body select:not(:disabled) option:selected:not(:disabled)').each(function() {
1221
+ if( typeof(data.value) == 'undefined' || data.value == $(this).val() ) {
1222
+ $(this).prop('selected', false);
1223
+ }
1224
+ });
1225
+ });
1226
+ berocket_add_filter('grab_single_filter_default', braapf_grab_single_select);
1227
+ })(jQuery);
1228
+
1229
+ var bapf_select2_init,
1230
+ bapf_select2_init_for_parent,
1231
+ bapf_select2_disable_for_parent;
1232
+ jQuery(document).ready(function() {
1233
+ bapf_select2_init = function() {
1234
+ bapf_select2_init_for_parent(jQuery(document));
1235
+ }
1236
+ bapf_select2_init_for_parent = function($parent) {
1237
+ if( $parent.find('.bapf_select2').length && typeof($parent.find('.bapf_select2').select2) != 'undefined' ) {
1238
+ $parent.find('.bapf_select2').each(function() {
1239
+ if ( ! jQuery(this).data('select2') ) {
1240
+ var select2data = {width:'100%', theme:'default'};
1241
+ if (jQuery(this).prop('multiple') ) {
1242
+ select2data.placeholder = jQuery(this).data('placeholder');
1243
+ }
1244
+ if( jQuery(this).parents('#berocket-ajax-filters-sidebar').length ) {
1245
+ select2data.dropdownParent = $('#berocket-ajax-filters-sidebar');
1246
+ }
1247
+ select2data = berocket_apply_filters('jqrui_data_select2', select2data, jQuery(this));
1248
+ jQuery(this).select2(select2data);
1249
+ }
1250
+ });
1251
+ }
1252
+ }
1253
+ bapf_select2_disable_for_parent = function($parent) {
1254
+ if( $parent.find('.bapf_select2').length && typeof($parent.find('.bapf_select2').select2) != 'undefined' ) {
1255
+ $parent.find('.bapf_select2').each(function() {
1256
+ if ( jQuery(this).data('select2') ) {
1257
+ jQuery(this).select2('destroy');
1258
+ }
1259
+ });
1260
+ }
1261
+ }
1262
+ jQuery(document).on('berocket_ajax_filtering_on_update', function() {
1263
+ bapf_select2_disable_for_parent(jQuery(document));
1264
+ });
1265
+ bapf_select2_init();
1266
+ berocket_add_filter('braapf_init', bapf_select2_init, 2000);
1267
+ berocket_add_filter('braapf_init_for_parent', bapf_select2_init_for_parent);
1268
+ });
1269
+ var braapf_init_jqrui_slidr,
1270
+ braapf_jqrui_slidr_same,
1271
+ braapf_jqrui_slidr_values_wc_price,
1272
+ braapf_init_jqrui_slidr_for_parent;
1273
+ (function ($){
1274
+ function braapf_slider_input_focusin(input, position) {
1275
+ var $slider = $(input).closest('.bapf_slidr_jqrui.bapf_slidr_ready').find('.bapf_slidr_main');
1276
+ var values = $slider.slider('values');
1277
+ $(input).val(values[position]);
1278
+ $(input).data('val', values[position]);
1279
+ }
1280
+ function braapf_slider_input_focusout_change(input, position, trigger) {
1281
+ var $slider = $(input).closest('.bapf_slidr_jqrui.bapf_slidr_ready').find('.bapf_slidr_main');
1282
+ if( trigger == 'focusout' ) {
1283
+ if( $(input).val() == $(input).data('val') ) {
1284
+ var values = $slider.slider('values');
1285
+ $slider.trigger('braapf_change_jqrui_slidr', [values]);
1286
+ }
1287
+ } else {
1288
+ var val = parseInt($(input).val());
1289
+ $slider.slider('values', position, val);
1290
+ }
1291
+ }
1292
+ $.each([{position:0, className:'bapf_from'}, {position:1, className:'bapf_to'}], function(i, val) {
1293
+ $(document).on('focusin', '.bapf_slidr_jqrui.bapf_slidr_ready .'+val.className+' input[type=text]', function() {
1294
+ braapf_slider_input_focusin(this, val.position);
1295
+ });
1296
+ $(document).on('change focusout', '.bapf_slidr_jqrui.bapf_slidr_ready .'+val.className+' input[type=text]', function(event) {
1297
+ braapf_slider_input_focusout_change(this, val.position, event.type);
1298
+ });
1299
+ $(document).on('change', '.bapf_slidr_jqrui.bapf_slidr_ready .'+val.className+' select', function(event) {
1300
+ braapf_slider_input_focusout_change(this, val.position, event.type);
1301
+ });
1302
+ });
1303
+ //SPAN CHANGED TEXT
1304
+ $(document).on('braapf_change_jqrui_slidr', '.bapf_slidr_jqrui .bapf_slidr_main', function(event, values) {
1305
+ var $element = $(this);
1306
+ var input_values = [values[0], values[1]];
1307
+ input_values = berocket_apply_filters('jqrui_slidr_'+$element.data('display'), input_values, $element);
1308
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_from span.bapf_val').length ) {
1309
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_from span.bapf_val').text(input_values[0]);
1310
+ }
1311
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_to span.bapf_val').length ) {
1312
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_to span.bapf_val').text(input_values[1]);
1313
+ }
1314
+ });
1315
+ //INPUT CHANGED TEXT
1316
+ $(document).on('braapf_change_jqrui_slidr', '.bapf_slidr_jqrui .bapf_slidr_main', function(event, values) {
1317
+ var $element = $(this);
1318
+ var input_values = [values[0], values[1]];
1319
+ input_values = berocket_apply_filters('jqrui_slidr_'+$element.data('display'), input_values, $element);
1320
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_from input[type=text]').length ) {
1321
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_from input[type=text]').val(input_values[0]);
1322
+ }
1323
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_to input[type=text]').length ) {
1324
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_to input[type=text]').val(input_values[1]);
1325
+ }
1326
+ });
1327
+ //SELECT CHANGED
1328
+ $(document).on('braapf_change_jqrui_slidr', '.bapf_slidr_jqrui .bapf_slidr_main', function(event, values) {
1329
+ var $element = $(this);
1330
+ var attr = $element.data('attr');
1331
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_from select').length || $element.closest('.bapf_slidr_jqrui').find('.bapf_to select').length ) {
1332
+ var attr = $element.data('attr');
1333
+ var from_options = [];
1334
+ var to_options = [];
1335
+ var from_end = false, to_start = false;
1336
+ $.each(attr, function(i, val) {
1337
+ if( i == values[0] ) to_start = true;
1338
+ if( ! from_end ) {
1339
+ from_options.push({v:val.v, n:val.n, ov:i});
1340
+ }
1341
+ if( to_start ) {
1342
+ to_options.push({v:val.v, n:val.n, ov:i});
1343
+ }
1344
+ if( i == values[1] ) from_end = true;
1345
+ });
1346
+ }
1347
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_from select').length ) {
1348
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_from select option').remove();
1349
+ $.each(from_options, function(i, val) {
1350
+ var selected = '';
1351
+ if( val.ov == values[0] ) {
1352
+ selected = ' selected';
1353
+ }
1354
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_from select').append($('<option value="'+val.ov+'"'+selected+'>'+val.n+'</option>'));
1355
+ });
1356
+ }
1357
+ if( $element.closest('.bapf_slidr_jqrui').find('.bapf_to select').length ) {
1358
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_to select option').remove();
1359
+ $.each(to_options, function(i, val) {
1360
+ var selected = '';
1361
+ if( val.ov == values[1] ) {
1362
+ selected = ' selected';
1363
+ }
1364
+ $element.closest('.bapf_slidr_jqrui').find('.bapf_to select').append($('<option value="'+val.ov+'"'+selected+'>'+val.n+'</option>'));
1365
+ });
1366
+ }
1367
+ });
1368
+ braapf_init_jqrui_slidr = function() {
1369
+ braapf_init_jqrui_slidr_for_parent($(document));
1370
+ }
1371
+ braapf_init_jqrui_slidr_for_parent = function($parent) {
1372
+ $parent.find( ".bapf_slidr_jqrui:not(.bapf_slidr_ready)" ).each(function() {
1373
+ var $slider = $(this).find('.bapf_slidr_main');
1374
+ var slider_data = berocket_apply_filters('jqrui_data_slidr_jqrui', {
1375
+ range: true,
1376
+ min: $slider.data('min'),
1377
+ max: $slider.data('max'),
1378
+ values: [ $slider.data('start'), $slider.data('end') ],
1379
+ step: $slider.data('step'),
1380
+ create:function(event, ui) {
1381
+ var values = $(this).slider('values');
1382
+ $(this).trigger('braapf_change_jqrui_slidr', [values]);
1383
+ },
1384
+ slide:function(event, ui) {
1385
+ $(this).trigger('braapf_change_jqrui_slidr', [ui.values]);
1386
+ },
1387
+ change:function(event, ui) {
1388
+ var values = $(this).slider('values');
1389
+ $(this).trigger('braapf_change_jqrui_slidr', [values]);
1390
+ if( !$(this).is('.bapf_jqrui_blocked') ) {
1391
+ var values = $(this).slider('values');
1392
+ var taxonomy = $(this).parents('.bapf_sfilter').data('taxonomy');
1393
+ braapf_jqrui_slidr_same(taxonomy, values);
1394
+ var filter_changed_element = {
1395
+ element:'#'+$(this).closest('.bapf_sfilter').attr('id'),
1396
+ parent: 0,
1397
+ find: '.bapf_body'
1398
+ };
1399
+ berocket_apply_filters('filter_changed_element', filter_changed_element, $(this));
1400
+ berocket_do_action('update_products', 'filter', $(this));
1401
+ }
1402
+ },
1403
+ }, $slider);
1404
+ $slider.slider(slider_data);
1405
+ $(this).addClass('bapf_slidr_ready');
1406
+ });
1407
+ }
1408
+ braapf_jqrui_slidr_same = function (taxonomy, values) {
1409
+ $('.bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy='+taxonomy+']').each(function() {
1410
+ var $slider = $(this).find('.bapf_slidr_main');
1411
+ $slider.addClass('bapf_jqrui_blocked');
1412
+ $slider.slider('values', values);
1413
+ $slider.removeClass('bapf_jqrui_blocked');
1414
+ });
1415
+ }
1416
+ braapf_jqrui_slidr_values_wc_price = function(values, $element) {
1417
+ var number_style = $element.data('number_style');
1418
+ if( ! number_style ) {
1419
+ number_style = the_ajax_script.number_style;
1420
+ }
1421
+ values[0] = berocket_format_number (values[0], number_style );
1422
+ values[1] = berocket_format_number (values[1], number_style );
1423
+ return values;
1424
+ }
1425
+ braapf_grab_single_jqrui = function(single_data, element) {
1426
+ if( element.is('.bapf_slidr_jqrui.bapf_slidr_ready') && single_data != false ) {
1427
+ var $slider = element.find('.bapf_slidr_main');
1428
+ var values = $slider.slider('values');
1429
+ var input_values = $slider.slider('values');
1430
+ if( values[0] != $slider.data('min') || values[1] != $slider.data('max') ) {
1431
+ input_values = berocket_apply_filters('jqrui_slidr_'+$slider.data('display'), input_values, $slider);
1432
+ var value_ready = {value:values[0]+'_'+values[1], html:input_values[0]+' - '+input_values[1]};
1433
+ value_ready = berocket_apply_filters('jqrui_slidr_link_'+$slider.data('display'), value_ready, values, input_values, $slider, single_data);
1434
+ single_data.values = [value_ready];
1435
+ }
1436
+ }
1437
+ return single_data;
1438
+ }
1439
+ braapf_jqrui_slidr_values_arr_attr = function(values, $element) {
1440
+ var attr = $element.data('attr');
1441
+ if( Array.isArray(values) && values.length == 2 ) {
1442
+ values[0] = attr[values[0]].n;
1443
+ values[1] = attr[values[1]].n;
1444
+ } else {
1445
+ values = ['', ''];
1446
+ values[0] = attr[0].n;
1447
+ values[1] = attr[attr.length - 1].n;
1448
+ }
1449
+ return values;
1450
+ }
1451
+ braapf_jqrui_slidr_values_link_arr_attr = function(value_ready, values, input_values, $slider, single_data) {
1452
+ var attr = $slider.data('attr');
1453
+ value_ready.value = attr[values[0]].v+'_'+attr[values[1]].v;
1454
+ return value_ready;
1455
+ }
1456
+ $(document).on('braapf_unselect braapf_unselect_all', '.bapf_slidr_jqrui', function(event, data) {
1457
+ var $slider = $(this).find('.bapf_slidr_main');
1458
+ var min = $slider.data('min');
1459
+ var max = $slider.data('max');
1460
+ $slider.addClass('bapf_jqrui_blocked');
1461
+ $slider.slider('values', [min, max]);
1462
+ $slider.removeClass('bapf_jqrui_blocked');
1463
+ });
1464
+ berocket_add_filter('jqrui_slidr_wc_price', braapf_jqrui_slidr_values_wc_price);
1465
+ berocket_add_filter('jqrui_slidr_arr_attr', braapf_jqrui_slidr_values_arr_attr);
1466
+ berocket_add_filter('jqrui_slidr_link_arr_attr', braapf_jqrui_slidr_values_link_arr_attr);
1467
+ berocket_add_filter('grab_single_filter_default', braapf_grab_single_jqrui);
1468
+ berocket_add_filter('braapf_init', braapf_init_jqrui_slidr);
1469
+ berocket_add_filter('braapf_init_for_parent', braapf_init_jqrui_slidr_for_parent);
1470
+ })(jQuery);
assets/frontend/js/main.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ function berocket_make_args_array(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b}function berocket_apply_filters(a,b){if("undefined"!=typeof berocket_filters[a]){var c=berocket_make_args_array(arguments);c.splice(0,1),jQuery.each(berocket_filters[a],function(a,d){b=d.callback.apply(null,c),c[0]=b})}return b}function berocket_do_action(a){if("undefined"!=typeof berocket_filters[a]){var b=berocket_make_args_array(arguments);b.splice(0,1),jQuery.each(berocket_filters[a],function(a,c){c.callback.apply(null,b)})}}function berocket_throw_error(a){var b="berocket_throw_error";if(error_exist=!0,"undefined"!=typeof berocket_filters[b]){for(var c,d=[error_exist];c<arguments.length;c++)d.push(arguments[c]);jQuery.each(berocket_filters[b],function(a,b){if(error_exist=b.callback.apply(null,d),d[0]=error_exist,!error_exist)return!1})}return error_exist}function berocket_add_filter(a,b,c){"undefined"==typeof c&&(c=10),"undefined"==typeof berocket_filters[a]&&(berocket_filters[a]=[]);var d=!1;jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b&&(d=!0)}),d||(berocket_filters[a].push({callback:b,priority:c}),berocket_filters[a]=berocket_sort_by_priority(berocket_filters[a]))}function berocket_remove_filter(a,b,c){if("undefined"==typeof c&&(c=10),"undefined"!=typeof berocket_filters[a]){var d=[];jQuery.each(berocket_filters[a],function(a,e){e.priority===c&&e.callback===b||d.push(e)}),berocket_filters[a]=berocket_sort_by_priority(d)}}function berocket_sort_by_priority(a){return Array.isArray(a)&&a.sort(function(a,b){return a.priority>b.priority?1:a.priority<b.priority?-1:0}),a}function berocket_format_number(a,b){"undefined"==typeof b&&(b=the_ajax_script.number_style);var c=a.toFixed(b[2]);c=c.toString();var d=c.split("."),e=d[0];return c.indexOf(".")!=-1&&(d=d[1]),e=e.replace(/\d(?=(?:\d{3})+(?:$))/g,function(a,c){return a+b[0]}),c.indexOf(".")!=-1&&(e=e+b[1]+d),e}function braapf_grab_all_init(){braapf_grab_all()}function braapf_selected_filters_area_set_init(){braapf_selected_filters_area_set()}function braapf_filtered_filters_set(){braapf_filtered_filters=braapf_selected_filters.slice(),berocket_do_action("braapf_init_filtered_set",braapf_filtered_filters)}var berocket_filters={};berocket_add_filter("compat_filters_result_single",function(a){return"object"==typeof a&&"string"==typeof a.taxonomy&&"pa_"==a.taxonomy.substr(0,3)&&(a.taxonomy=a.taxonomy.substr(3)),a});var braapf_filter_blocked=!1,braapf_selected_filters=[],braapf_filtered_filters=[],braapf_filters_var,braapf_ajax_request,braapf_checkbox_same,braapf_update_products,braapf_grab_all,braapf_grab_single,braapf_compact_filters,braapf_compat_filters_to_string,braapf_build_url_from_urldata,braapf_glue_by_operator,braapf_ajax_load_from_url,braapf_ajax_load_from_url_request,braapf_init_load,braapf_remove_pages_from_url_data,braapf_filter_products_by_url,braapf_get_current_url_data,braapf_reset_buttons_hide;!function(a){function b(a){return berocket_remove_filter("ajax_load_from_url_beforeSend",b),a.setRequestHeader("X-Braapfdisable","1"),a}function c(a){return a.setRequestHeader("X-Braapf","1"),a}a(document).on("change",".bapf_sfilter.bapf_ckbox input[type=checkbox]",function(){var b=a(this).val(),c=a(this).parents(".bapf_sfilter").data("taxonomy"),d=a(this).prop("checked");braapf_checkbox_same(c,b,d),berocket_apply_filters("input_ckbox_changed",this,c,b,d);var e={element:"#"+a(this).attr("id"),parent:1,find:!1};berocket_apply_filters("filter_changed_element",e,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_checkbox_same=function(b,c,d){a('.bapf_sfilter[data-taxonomy="'+b+'"] input[value="'+c+'"]').prop("checked",d),a('.bapf_sfilter[data-taxonomy="'+b+'"]').length<a('.bapf_sfilter.bapf_ckbox[data-taxonomy="'+b+'"]').length&&berocket_throw_error("multiple_filters_for_same_taxonomy",b)},a(document).on("braapf_unselect",".bapf_ckbox",function(b,c){if("undefined"==typeof c&&(c=!1),0==c)var d=a(this).find("input[type=checkbox]");else var d=a(this).find('input[value="'+c.value+'"]');if(d.length>0){var e=d.val(),f=a(this).data("taxonomy");d.prop("checked",!1),braapf_checkbox_same(f,e,!1)}}),a(document).on("braapf_unselect_all",".bapf_ckbox",function(b,c){a(this).trigger("braapf_unselect",!1)}),a(document).on("click",".berocket_aapf_widget_update_button, .bapf_update",function(b){b.preventDefault(),berocket_do_action("update_products","update",a(this))}),a(document).on("click",".berocket_aapf_reset_button, .bapf_reset",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),braapf_reset_buttons_hide=function(){"undefined"==typeof braapf_filtered_filters||braapf_filtered_filters.length<=0?a(".bapf_rst_nofltr").hide():a(".bapf_rst_nofltr").show();var b=!1;"undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0&&a.each(braapf_filtered_filters,function(a,c){if(c.values.length>0)return b=!0,!1}),b?a(".bapf_rst_sel").show():a(".bapf_rst_sel").hide()},berocket_add_filter("braapf_init",braapf_reset_buttons_hide,1500),berocket_add_filter("braapf_init_filtered_set",braapf_reset_buttons_hide,1500);var d=the_ajax_script.pagination_class;d=d.replace(","," a,"),d+=" a",a(document).on("click",d,function(c){c.preventDefault();var d=a(this).attr("href");d=decodeURI(d),braapf_change_url_history_api(d,{replace:the_ajax_script.seo_friendly_urls}),berocket_add_filter("ajax_load_from_url_beforeSend",b),braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_pagination",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_init_load]},d))}),the_ajax_script.control_sorting&&a(document).on("submit",the_ajax_script.ordering_class,function(b){b.preventDefault();var c=braapf_get_current_url_data();if(c=braapf_remove_pages_from_url_data(c),Array.isArray(c.queryargs)){var d=[];a.each(c.queryargs,function(a,b){"orderby"!=b.name&&d.push(b)}),c.queryargs=d}else c.queryargs=[];var e=a(this).serializeArray();Array.isArray(e)&&a.each(e,function(a,b){"paged"==b.name?c.page=parseInt(b.value):"orderby"==b.name?the_ajax_script.default_sorting!=b.value&&c.queryargs.push(b):c.queryargs.push(b)});var f=braapf_build_url_from_urldata(c);braapf_filter_products_by_url(f)}),braapf_get_url_with_filters_selected=function(){braapf_grab_all();var a=braapf_compact_filters(),b=berocket_apply_filters("braapf_filters_mask",the_ajax_script.url_mask),c=braapf_compat_filters_to_string(a,b,the_ajax_script.url_split),d=braapf_get_current_url_data();d.filter=c,d=braapf_remove_pages_from_url_data(d);var e=braapf_build_url_from_urldata(d);return e},braapf_update_products=function(b,c){"undefined"==typeof b&&(b="filter"),"undefined"==typeof c&&(c=!1),b=berocket_apply_filters("before_update_products_context",b,c);var d=braapf_get_url_with_filters_selected();berocket_apply_filters("apply_filters_to_page",0==a(".berocket_aapf_widget_update_button:visible, .bapf_update:visible").length||"filter"!=b,b,c,d)?(braapf_selected_filters_area_set(),braapf_filter_products_by_url(d)):berocket_apply_filters("apply_filters_to_page_partial",!1,b,c,d)&&braapf_ajax_load_from_url(d,{},berocket_apply_filters("ajax_load_from_filters_partial",{done:[braapf_replace_each_filter,braapf_init_load]},d,"partial"),"partial")},braapf_filter_products_by_url=function(b){berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,b)?location.href=b:(braapf_change_url_history_api(b,{replace:the_ajax_script.seo_friendly_urls}),braapf_ajax_load_from_url(b,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},b,"default")))},braapf_update_url_history_api_from_current=function(){the_ajax_script.seo_friendly_urls&&(url_filtered=braapf_get_url_with_filters_selected(),history.replaceState(history.state,"BeRocket Rules",url_filtered))},braapf_grab_all=function(b){"undefined"==typeof b&&(b=!1);var c=[];if(b===!1)var d=a(".bapf_sfilter");else var d=a(b).find(".bapf_sfilter");return d.each(function(){var a=braapf_grab_single(this,c);a!==!1&&c.push(a)}),c=berocket_apply_filters("grab_all_filters",c,b),b===!1&&(braapf_selected_filters=c),c},braapf_grab_single=function(b,c){b=a(b);var d=!1,e=!1,f=b.data("taxonomy");if("undefined"==typeof f||!f)return berocket_apply_filters("grab_single_filter_taxonomy_undefined",d,b,c);if(a.each(c,function(a,b){b.taxonomy==f&&(e=!0)}),!berocket_apply_filters("grab_single_filter_exist",e,b,c)){if(d=berocket_apply_filters("grab_single_filter",d,b,c),d!==!1)return d;var g=b.data("op"),h=b.data("name");"undefined"==typeof h&&(h="");var i=braapf_glue_by_operator(g),j=[],k=[],l=a(".bapf_sfilter[data-taxonomy="+f+"]");l.find("input:checked:not(:disabled)").each(function(b,c){k.indexOf(a(this).val())==-1&&(j.push({value:a(this).val(),html:a(this).data("name")}),k.push(a(this).val()))}),d={name:h,taxonomy:f,values:j,glue:i,operator:g}}return berocket_apply_filters("grab_single_filter_default",d,b,c)},braapf_glue_by_operator=function(a){"string"!=typeof a&&(a="");var b="-";return"and"==a.toLowerCase()&&(b="+"),berocket_apply_filters("glue_by_operator",b,a)},braapf_compact_filters=function(b){"undefined"==typeof b&&(b=braapf_selected_filters);var c=[];return a.each(b,function(b,d){var e="";"undefined"!=typeof d.customValuesLine?e=d.customValuesLine:a.each(d.values,function(a,b){e.length&&(e+=d.glue),e+=b.value}),e.length&&c.push(berocket_apply_filters("compat_filters_result_single",{taxonomy:d.taxonomy,values:e},d))}),berocket_apply_filters("compat_filters_result",c,b)},braapf_compat_filters_to_string=function(b,c,d){var e="";return a.each(b,function(a,f){e.length&&(e+=d);var g=c;g=g.replace("%t%",f.taxonomy),g=g.replace("%v%",f.values),e+=berocket_apply_filters("compat_filters_to_string_single",g,f,b,c,d)}),berocket_apply_filters("compat_filters_to_string",e,b,c,d)},braapf_get_current_url_data=function(b){if("undefined"==typeof b)var c=location.href.split("#")[0].split("?")[0],d=location.search.substring(1);else{var c=b.split("#")[0].split("?")[0];if(b.split("#")[0].split("?").length>1)var d=b.split("#")[0].split("?")[1];else var d=""}var e=[],f=1,g=c.match(/\/page\/(\d+)/);return g&&"string"==typeof g[1]&&(f=parseInt(g[1]),c=c.replace(/\/page\/(\d+)/,"")),d=d.split("&"),a.each(d,function(a,b){b.length&&(d[a]=b.split("="),"paged"==d[a][0]?f=parseInt(d[a][1]):e.push({name:d[a][0],value:d[a][1]}))}),berocket_apply_filters("get_current_url_data",{baselink:c,queryargs:e,filter:"",page:f})},braapf_remove_pages_from_url_data=function(b){if(b.page=1,Array.isArray(b.queryargs)){var c=[];a.each(b.queryargs,function(a,b){"product-page"!=b.name&&c.push(b)}),b.queryargs=c}return b},braapf_build_url_from_urldata=function(b,c){"undefined"==typeof c&&(c=braapf_build_url_parameters_default());var d=berocket_apply_filters("url_from_urldata_baselink",b.baselink,b,c),e="";return b.queryargs.length&&a.each(b.queryargs,function(a,b){e.length&&(e+="&"),b.name.length&&(e+=b.name+"="+b.value)}),b.page&&b.page>1&&(e.length&&(e+="&"),e+="paged="+b.page),e.length&&(e="?"+e),d=berocket_apply_filters("url_from_urldata_linkget",d+e,b,c,d,e)},braapf_build_url_parameters_default=function(){return berocket_apply_filters("build_url_parameters_default",{})},braapf_replace_current_with_new=function(b,c,d){"undefined"==typeof d&&(d={}),args={replace:!1},jQuery.extend(args,d);var e=a("<div><div>"+b+"</div></div>"),f=e.find(c),g=a(c);0!=g.length&&(f.length!=g.length&&0!=f.length&&berocket_throw_error("error_notsame_block_qty",c,f.length,g.length),0==f.length?(g.html("").addClass("braapfNotReplaced"),g.hide()):(g.each(function(b,c){"undefined"!=typeof f[b]?args.replace?a(c).replaceWith(a(f[b])):a(c).html(a(f[b]).html()).removeClass("braapfNotReplaced"):a(c).html("").addClass("braapfNotReplaced")}),g.show()))},braapf_replace_products=function(b){var c=the_ajax_script.products_holder_id;a("<div><div>"+b+"</div></div>");a(".bapf_no_products").remove(),braapf_replace_current_with_new(b,c),a(".braapfNotReplaced").filter(c).length&&a(".braapfNotReplaced").filter(c).before(a(the_ajax_script.no_products))},braapf_replace_pagination=function(b){var c=the_ajax_script.pagination_class;if(0==a(c).length){var d=the_ajax_script.products_holder_id,e=a("<div><div>"+b+"</div></div>"),f=e.find(c).last();f.length&&a(d).last().after(f)}else braapf_replace_current_with_new(b,c)},braapf_replace_result_count=function(a){var b=the_ajax_script.result_count_class;braapf_replace_current_with_new(a,b)},braapf_replace_orderby=function(a){var b=the_ajax_script.ordering_class;braapf_replace_current_with_new(a,b)},braapf_replace_each_filter=function(b){var c=a("<div><div>"+b+"</div></div>");a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).html(c.find(".berocket_single_filter_widget_"+b).last().html()),c.find(".berocket_single_filter_widget_"+b).is(".bapf_mt_none")?a(".berocket_single_filter_widget_"+b).addClass("bapf_mt_none"):a(".berocket_single_filter_widget_"+b).removeClass("bapf_mt_none")})},braapf_change_url_history_api=function(a,b){if("undefined"!=typeof b&&b.replace){var c={BeRocket:"Rules"};history.replaceState(c,""),history.pushState(c,"",a),history.pathname=a}},berocket_apply_filters("load_products_ajax_on_popstate",!0)&&(window.onpopstate=function(b){if(null!=b.state&&"Rules"==b.state.BeRocket){var c=location.href;berocket_apply_filters("page_has_products_holder",!a(the_ajax_script.products_holder_id).length,c)?location.href=c:braapf_ajax_load_from_url(c,{},berocket_apply_filters("ajax_load_from_filters",{done:[braapf_replace_products,braapf_replace_pagination,braapf_replace_result_count,braapf_replace_orderby,braapf_replace_each_filter,braapf_init_load,braapf_filtered_filters_set,braapf_update_url_history_api_from_current]},c,"default"))}}),braapf_ajax_load_from_url=function(a,b,c,d){"undefined"==typeof d&&(d="default"),"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={done:[],fail:[],always:[]}),"undefined"!=typeof c.done&&Array.isArray(c.done)||(c.done=[]),"undefined"!=typeof c.fail&&Array.isArray(c.fail)||(c.fail=[]),"undefined"!=typeof c.always&&Array.isArray(c.always)||(c.always=[]),a=berocket_apply_filters("ajax_load_from_url_url",a,b,c,d),b=berocket_apply_filters("ajax_load_from_url_data",b,a,c,d),c=berocket_apply_filters("ajax_load_from_url_callback",c,a,b,d),braapf_ajax_load_from_url_request(a,b,c,d)},braapf_ajax_load_from_url_request=function(b,c,d,e){a(document).trigger("berocket_ajax_filtering_start"),"object"==typeof braapf_ajax_request&&"undefined"!=typeof braapf_ajax_request.abort&&braapf_ajax_request.abort(),braapf_ajax_request=a.ajax({method:"GET",url:b,data:c,beforeSend:function(a){a=berocket_apply_filters("ajax_load_from_url_beforeSend",a,b,c,d,e)}}).done(function(f,g,h){a(document).trigger("berocket_ajax_filtering_on_update"),f=berocket_apply_filters("ajax_load_from_url_done",f,b,c,d,e),a.each(d.done,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_done_after",f,b,c,d,e),a(document).trigger("berocket_ajax_products_loaded")}).fail(function(f,g,h){if("abort"==g)return!1;if(a(document).trigger("berocket_ajax_products_not_loaded"),f=berocket_apply_filters("ajax_load_from_url_fail",f,b,c,d,e),a.each(d.fail,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_fail_after",f,b,c,d,e),"default"==e){var i=jQuery.param(c);i&&(b=b.split("?").length>1?b+"&"+i:b+"?"+i),location.href=b}}).always(function(f,g,h){f=berocket_apply_filters("ajax_load_from_url_always",f,b,c,d,e),a.each(d.always,function(a,b){b(f,g,h)}),f=berocket_apply_filters("ajax_load_from_url_always_after",f,b,c,d,e),a(document).trigger("berocket_ajax_filtering_end")})},braapf_init_load=function(){a(window).width()<=767&&a(".bapf_sngl_hd_mobile").remove(),a(window).width()>767&&a(window).width()<=1024&&a(".bapf_sngl_hd_tablet").remove(),a(window).width()>1024&&a(".bapf_sngl_hd_desktop").remove(),a(".bapf_sfilter .bapf_body.bapf_mcs:not(.bapf_mcs_ready)").each(function(){a(this).mCustomScrollbar({setHeight:a(this).data("mcs-h"),scrollInertia:300}).addClass("bapf_mcs_ready")}),a(".berocket_single_filter_widget").each(function(){var b=a(this).data("id");a(".berocket_single_filter_widget_"+b).length>1&&a(".berocket_single_filter_widget_"+b).not(a(".berocket_single_filter_widget_"+b).first()).remove()}),a(".bapf_desci").on("click hover",function(a){a.stopPropagation()}),berocket_do_action("braapf_init",braapf_selected_filters),a(document).trigger("berocket_filters_first_load")},braapf_update_page_on_error=function(){location.reload()},braapf_selected_filters_area_set=function(){if("undefined"!=typeof braapf_filtered_filters&&braapf_filtered_filters.length>0){var b="";a.each(braapf_filtered_filters,function(c,d){d.values.length>0&&(b+="<span>"+d.name+"</span>",b+="<ul>",a.each(d.values,function(a,c){b+='<li><a href="#unselect_'+c.value+'" class="braapf_unselect" data-taxonomy="'+d.taxonomy+'" data-value="'+c.value+'"><i class="fa fa-times"></i>'+c.html+"</a></li>"}),b+="</ul>")}),b?(a(".bapf_sfa_mt_hide").show().parent().removeClass("bapf_mt_none"),b='<div class="berocket_aapf_widget_selected_filter">'+b+'<ul><li><a href="#Unselect_all" class="braapf_unselect_all"><i class="fa fa-times"></i> '+the_ajax_script.translate.unselect_all+"</a></li></ul>"):(b=the_ajax_script.translate.nothing_selected,a(".bapf_sfa_mt_hide").hide().parent().addClass("bapf_mt_none")),a(".berocket_aapf_widget_selected_area").html(b)}},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect",function(b){b.preventDefault(),a(".bapf_sfilter[data-taxonomy="+a(this).data("taxonomy")+"]").trigger("braapf_unselect",a(this).data()),berocket_do_action("update_products","reset_single",a(this))}),braapf_unselect_all=function(){braapf_grab_all(),"undefined"!=typeof braapf_selected_filters&&braapf_selected_filters.length>0&&a.each(braapf_selected_filters,function(b,c){c.values.length>0&&a(".bapf_sfilter[data-taxonomy="+c.taxonomy+"]").trigger("braapf_unselect_all",c)})},a(document).on("click",".berocket_aapf_widget_selected_area .braapf_unselect_all",function(b){b.preventDefault(),braapf_unselect_all(),berocket_do_action("update_products","reset_all",a(this))}),berocket_add_filter("braapf_init",braapf_grab_all_init,1e3),berocket_add_filter("braapf_init",braapf_selected_filters_area_set_init,1100),berocket_add_filter("braapf_init_filtered_set",braapf_selected_filters_area_set_init,1100),braapf_reload_page_for_products_error=function(a,b){return b==the_ajax_script.products_holder_id&&braapf_update_page_on_error(),a},berocket_add_filter("ajax_load_from_url_beforeSend",c),berocket_add_filter("update_products",braapf_update_products),berocket_add_filter("error_notsame_block_qty",braapf_reload_page_for_products_error),a(document).ready(function(){a(".berocket_wc_shortcode_fix").length&&(braapf_replace_each_filter(a(".berocket_wc_shortcode_fix").html()),a(".berocket_wc_shortcode_fix").html("")),braapf_init_load(),braapf_filtered_filters_set(),a(document).trigger("berocket_filters_document_ready")})}(jQuery);var braapf_get_current_filters,braapf_scroll_shop_to_top;!function(a){function b(){a(".berocket_ajax_filters_sidebar_toggle").removeClass("active"),a("#berocket-ajax-filters-sidebar").removeClass("active"),a("body").removeClass("berocket_ajax_filters_sidebar_active")}function c(){a(".berocket_ajax_filters_sidebar_toggle").addClass("active"),a("#berocket-ajax-filters-sidebar").addClass("active"),a("body").addClass("berocket_ajax_filters_sidebar_active")}function d(){jQuery(".berocket_product_table_compat .dataTables_length select").length&&jQuery(".berocket_product_table_compat .wc-product-table").dataTable()._fnSaveState();var a=jQuery(".berocket_product_table_compat .wc-product-table").attr("id");if("undefined"!=typeof window["config_"+a]&&window["config_"+a].serverSide){jQuery(".berocket_product_table_compat .wc-product-table").DataTable().destroy();var b=jQuery(".berocket_product_table_compat").html();jQuery(".berocket_product_table_compat").html(""),jQuery(".berocket_product_table_compat").html(b),jQuery(".berocket_product_table_compat .blockUI.blockOverlay").remove(),jQuery(".berocket_product_table_compat .wc-product-table").productTable()}}braapf_get_current_filters=function(b){if(b.queryargs.length){var c=[];a.each(b.queryargs,function(a,d){d.name==the_ajax_script.url_variable?b.filter=d.value:c.push(d)}),b.queryargs=c}return b},braapf_set_filters_to_link=function(a,b,c,d,e){return"string"==typeof b.filter&&b.filter.length&&(a+=e.length?"&":"?",a+=the_ajax_script.url_variable+"="+b.filter),a},braapf_convert_ckbox_to_radio=function(b,c,d,e){var f=(a(b),a(b).closest(".bapf_sfilter.bapf_ckbox"));f.is(".bapf_asradio")&&f.find("input[type=checkbox]:checked:not(:disabled)").each(function(){var b=a(this).val();b!=d&&braapf_checkbox_same(c,b,!1)})},berocket_add_filter("input_ckbox_changed",braapf_convert_ckbox_to_radio),a(document).on("click",".bapf_ochild, .bapf_cchild",function(b){b.preventDefault,a(this).is(".bapf_ochild")?a(this).trigger("bapf_ochild"):a(this).trigger("bapf_cchild")}),a(document).on("bapf_ochild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),a(this).find(".bapf_ochild, .bapf_cchild").first().removeClass("bapf_ochild").removeClass("fa-plus").addClass("bapf_cchild").addClass("fa-minus"),a(this).find("ul").first().show()}),a(document).on("bapf_cchild",".bapf_sfilter.bapf_ckbox ul li",function(b){b.stopPropagation(),a(this).find(".bapf_ochild, .bapf_cchild").first().addClass("bapf_ochild").addClass("fa-plus").removeClass("bapf_cchild").removeClass("fa-minus"),a(this).find("ul").first().hide()});var e=[];braapf_hierarhical_save=function(b){return e=[],a(".bapf_cchild").each(function(){e.push(a(this).parent().children("input[type=checkbox]").attr("id"))}),b},braapf_hierarhical_set=function(b){return a.each(e,function(b,c){a("#"+c).trigger("bapf_ochild")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_hierarhical_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_hierarhical_set,1e3),a(document).on("click",".bapf_ocolaps .bapf_colaps_togl, .bapf_ccolaps .bapf_colaps_togl",function(b){b.preventDefault,a(this).closest(".bapf_ocolaps, .bapf_ccolaps").is(".bapf_ocolaps")?a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ocolaps"):a(this).closest(".bapf_ocolaps, .bapf_ccolaps").trigger("bapf_ccolaps")}),a(document).on("bapf_ocolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).find(".bapf_body").first().show(),a(this).removeClass("bapf_ocolaps").addClass("bapf_ccolaps"),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").removeClass("fa-chevron-down").addClass("fa-chevron-up")}),a(document).on("bapf_ccolaps",".bapf_sfilter.bapf_ocolaps, .bapf_sfilter.bapf_ccolaps",function(b){a(this).find(".bapf_body").first().hide(),a(this).addClass("bapf_ocolaps").removeClass("bapf_ccolaps"),a(this).find(".bapf_colaps_smb").length&&a(this).find(".bapf_colaps_smb").addClass("fa-chevron-down").removeClass("fa-chevron-up")});var f={open:[],close:[]};braapf_collapse_status_save=function(b){return f={open:[],close:[]},a(".bapf_ocolaps, .bapf_ccolaps").each(function(){a(this).is(".bapf_ocolaps")?f.open.push(a(this).attr("id")):f.close.push(a(this).attr("id"))}),b},braapf_collapse_status_set=function(b){return a.each(f.open,function(b,c){a("#"+c).trigger("bapf_ccolaps")}),a.each(f.close,function(b,c){a("#"+c).trigger("bapf_ocolaps")}),b},berocket_add_filter("ajax_load_from_url_done",braapf_collapse_status_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_collapse_status_set,1e3),a(document).on("click",".bapf_show_hide",function(){a(this).closest(".bapf_sfilter").toggleClass("bapf_fhide"),a(this).closest(".bapf_sfilter").is(".bapf_fhide")?a(this).text(a(this).data("show")):a(this).text(a(this).data("hide"))});var g={open:[],close:[]};braapf_show_hide_values_save=function(b){return g={open:[],close:[]},a(".bapf_sfilter").each(function(){a(this).is(".bapf_fhide")?g.close.push(a(this).attr("id")):g.open.push(a(this).attr("id"))}),b},braapf_show_hide_values_set=function(b){return a.each(g.open,function(b,c){a("#"+c).removeClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("hide"))}),a.each(g.close,function(b,c){a("#"+c).addClass("bapf_fhide"),a("#"+c).find(".bapf_show_hide").text(a("#"+c).find(".bapf_show_hide").data("show"))}),b},berocket_add_filter("ajax_load_from_url_done",braapf_show_hide_values_save,1),berocket_add_filter("ajax_load_from_url_done_after",braapf_show_hide_values_set,1e3),braapf_scroll_shop_to_top=function(b,c,d,e,f){if("default"==f&&(1==the_ajax_script.scroll_shop_top||2==the_ajax_script.scroll_shop_top&&a(window).width()<=768||3==the_ajax_script.scroll_shop_top&&a(window).width()>768)){var g=0;a(the_ajax_script.products_holder_id).length?(g=a(the_ajax_script.products_holder_id).offset().top+parseInt(the_ajax_script.scroll_shop_top_px),g<0&&(g=0)):a(".bapf_no_products").length&&(g=a(".bapf_no_products").offset().top+parseInt(the_ajax_script.scroll_shop_top_px),g<0&&(g=0)),a("html, body").animate({scrollTop:g},"slow")}return b},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_scroll_shop_to_top),a(document).on("mousedown",".wc-product-table-reset a",function(){a(this).remove(),br_reset_all_filters()}),a(document).on("click",".berocket_element_above_products_is_hide_toggle",function(b){b.preventDefault(),a(this).toggleClass("active").next().slideToggle(200,"linear");var c="inactive";a(this).is(".active")&&(c="active"),a(document).trigger("berocket_element_above_products_"+c)}),a(document).on("berocket_custom_sidebar_close",b),a(document).on("berocket_custom_sidebar_open",c),a(document).on("click",".berocket_ajax_filters_sidebar_toggle",function(d){d.preventDefault(),a(this).is(".active")&&a("#berocket-ajax-filters-sidebar").is(".active")?b():c()}),a(document).on("click","#berocket-ajax-filters-sidebar-shadow, #berocket-ajax-filters-sidebar-close",function(a){a.preventDefault(),b()}),a(document).on("berocket_ajax_filtering_start",function(){jQuery(".berocket_product_table_compat").length&&d()})}(jQuery),berocket_add_filter("get_current_url_data",braapf_get_current_filters),berocket_add_filter("url_from_urldata_linkget",braapf_set_filters_to_link);var braapf_child_parent_grab_single,braapf_child_parent_fix_selected,braapf_child_parent_load_with_update_button,braapf_add_loader_element,braapf_remove_loader_element;!function(a){braapf_child_parent_grab_single=function(b,c,d){var e=c.data("child");if("undefined"!=typeof e&&e>0&&"object"==typeof b&&"undefined"!=typeof b.values&&Array.isArray(b.values)&&b.values.length>0){e++;var f=c.data("taxonomy"),g=a(".bapf_sfilter.bapf_child_"+e+"[data-taxonomy="+f+"]");if(g.length){var h=braapf_grab_single(g,[]);"object"==typeof h&&"undefined"!=typeof h.values&&Array.isArray(h.values)&&h.values.length>0&&(b=h)}}return b},braapf_child_parent_fix_selected=function(b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child"),f=d.data("taxonomy");if("undefined"!=typeof e&&e>0)for(i=e+1;a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").length;i++)a(".bapf_sfilter.bapf_child_"+i+"[data-taxonomy="+f+"]").trigger("braapf_unselect",!1)}}return b},braapf_child_parent_load_with_update_button=function(a,b,c){if(0!=c){var d=c.closest(".bapf_sfilter");if(d.length){var e=d.data("child");d.data("taxonomy");"undefined"!=typeof e&&e>0&&(a=!0)}}return a},berocket_add_filter("grab_single_filter_default",braapf_child_parent_grab_single),berocket_add_filter("before_update_products_context",braapf_child_parent_fix_selected),berocket_add_filter("apply_filters_to_page_partial",braapf_child_parent_load_with_update_button);var b;braapf_add_loader_element=function(c,d,e,f,g){return"default"==g&&("undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),b=a(the_ajax_script.load_image),a("body").append(b)),c},braapf_remove_loader_element=function(a){return"undefined"!=typeof b&&"function"==typeof b.remove&&b.remove(),a},berocket_add_filter("ajax_load_from_url_beforeSend",braapf_add_loader_element),berocket_add_filter("ajax_load_from_url_always_after",braapf_remove_loader_element),a(document).on("click",".bapf_sfilter.bapf_ckbox .bapf_body li label a",function(b){b.preventDefault(),a(this).parent().trigger("click")})}(jQuery);var braapf_init_ion_slidr,braapf_ion_slidr_same,braapf_jqrui_slidr_ion_value_wc_price,braapf_jqrui_slidr_ion_value_arr_attr,braapf_init_ion_slidr_for_parent;!function(a){function b(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a=berocket_format_number(parseFloat(a),c)}braapf_init_ion_slidr=function(){braapf_init_ion_slidr_for_parent(a(document))},braapf_init_ion_slidr_for_parent=function(b){b.find(".bapf_slidr_ion:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_all .bapf_slidr_main"),c=function(a){if(!b.is(".bapf_ion_blocked")){b.addClass("bapf_ion_blocked");var c=b.closest(".bapf_sfilter").data("taxonomy");braapf_ion_slidr_same(c,a);var d={element:"#"+b.closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",d,b),berocket_do_action("update_products","filter",b),b.removeClass("bapf_ion_blocked")}},d=berocket_apply_filters("jqrui_data_slidr_ion",{type:"double",from:b.data("start"),to:b.data("end"),grid:!1,force_edges:!0,onFinish:c,onUpdate:c,prettify:function(a){return a=berocket_apply_filters("jqrui_slidr_ion_"+b.data("display"),a,b)}},b);b.ionRangeSlider(d),a(this).addClass("bapf_slidr_ready")})},braapf_ion_slidr_same=function(b,c){a(".bapf_slidr_ion.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_ion_blocked");var d=b.data("ionRangeSlider");d.update({from:c.from,to:c.to}),b.removeClass("bapf_ion_blocked")})},braapf_jqrui_slidr_ion_value_arr_attr=function(a,b){var c=b.data("attr");return a=c[a].n},braapf_grab_single_ion=function(a,b){if(b.is(".bapf_slidr_ion.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main").data("ionRangeSlider"),d=b.find(".bapf_slidr_main"),e=[c.options.from,c.options.to],f=[berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.from,d),berocket_apply_filters("jqrui_slidr_ion_"+d.data("display"),c.options.to,d)];if(e[0]!=d.data("min")||e[1]!=d.data("max")){var g={value:e[0]+"_"+e[1],html:f[0]+" - "+f[1]};g=berocket_apply_filters("jqrui_slidr_ion_link_"+d.data("display"),g,e,f,d,a),a.values=[g]}}return a},braapf_jqrui_slidr_ion_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_ion",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("ionRangeSlider");d.addClass("bapf_ion_blocked"),e.update({from:e.options.min,to:e.options.max}),d.removeClass("bapf_ion_blocked")}),berocket_add_filter("braapf_init",braapf_init_ion_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_ion_slidr_for_parent),berocket_add_filter("grab_single_filter_default",braapf_grab_single_ion),berocket_add_filter("jqrui_slidr_ion_link_arr_attr",braapf_jqrui_slidr_ion_values_link_arr_attr),berocket_add_filter("jqrui_slidr_ion_wc_price",b),berocket_add_filter("jqrui_slidr_ion_arr_attr",braapf_jqrui_slidr_ion_value_arr_attr)}(jQuery);var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price;!function(a){a(document).on("change",".bapf_slct .bapf_body select",function(){var b={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",b,a(this)),berocket_do_action("update_products","filter",a(this))}),braapf_grab_single_select=function(b,c){if(c.is(".bapf_slct")&&0!=b){
2
+ var d=c.find(".bapf_body select:not(:disabled)");d.find("option:selected:not(:disabled)").each(function(){var c=a(this).val();c&&b.values.push({value:c,html:a(this).data("name")})})}return b},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slct",function(b,c){a(this).find(".bapf_body select:not(:disabled) option:selected:not(:disabled)").each(function(){"undefined"!=typeof c.value&&c.value!=a(this).val()||a(this).prop("selected",!1)})}),berocket_add_filter("grab_single_filter_default",braapf_grab_single_select)}(jQuery);var bapf_select2_init,bapf_select2_init_for_parent,bapf_select2_disable_for_parent;jQuery(document).ready(function(){bapf_select2_init=function(){bapf_select2_init_for_parent(jQuery(document))},bapf_select2_init_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){if(!jQuery(this).data("select2")){var a={width:"100%",theme:"default"};jQuery(this).prop("multiple")&&(a.placeholder=jQuery(this).data("placeholder")),jQuery(this).parents("#berocket-ajax-filters-sidebar").length&&(a.dropdownParent=$("#berocket-ajax-filters-sidebar")),a=berocket_apply_filters("jqrui_data_select2",a,jQuery(this)),jQuery(this).select2(a)}})},bapf_select2_disable_for_parent=function(a){a.find(".bapf_select2").length&&"undefined"!=typeof a.find(".bapf_select2").select2&&a.find(".bapf_select2").each(function(){jQuery(this).data("select2")&&jQuery(this).select2("destroy")})},jQuery(document).on("berocket_ajax_filtering_on_update",function(){bapf_select2_disable_for_parent(jQuery(document))}),bapf_select2_init(),berocket_add_filter("braapf_init",bapf_select2_init,2e3),berocket_add_filter("braapf_init_for_parent",bapf_select2_init_for_parent)});var braapf_init_jqrui_slidr,braapf_jqrui_slidr_same,braapf_jqrui_slidr_values_wc_price,braapf_init_jqrui_slidr_for_parent;!function(a){function b(b,c){var d=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main"),e=d.slider("values");a(b).val(e[c]),a(b).data("val",e[c])}function c(b,c,d){var e=a(b).closest(".bapf_slidr_jqrui.bapf_slidr_ready").find(".bapf_slidr_main");if("focusout"==d){if(a(b).val()==a(b).data("val")){var f=e.slider("values");e.trigger("braapf_change_jqrui_slidr",[f])}}else{var g=parseInt(a(b).val());e.slider("values",c,g)}}a.each([{position:0,className:"bapf_from"},{position:1,className:"bapf_to"}],function(d,e){a(document).on("focusin",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(){b(this,e.position)}),a(document).on("change focusout",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" input[type=text]",function(a){c(this,e.position,a.type)}),a(document).on("change",".bapf_slidr_jqrui.bapf_slidr_ready ."+e.className+" select",function(a){c(this,e.position,a.type)})}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from span.bapf_val").text(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to span.bapf_val").text(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=[c[0],c[1]];e=berocket_apply_filters("jqrui_slidr_"+d.data("display"),e,d),d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_from input[type=text]").val(e[0]),d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").length&&d.closest(".bapf_slidr_jqrui").find(".bapf_to input[type=text]").val(e[1])}),a(document).on("braapf_change_jqrui_slidr",".bapf_slidr_jqrui .bapf_slidr_main",function(b,c){var d=a(this),e=d.data("attr");if(d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length||d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length){var e=d.data("attr"),f=[],g=[],h=!1,i=!1;a.each(e,function(a,b){a==c[0]&&(i=!0),h||f.push({v:b.v,n:b.n,ov:a}),i&&g.push({v:b.v,n:b.n,ov:a}),a==c[1]&&(h=!0)})}d.closest(".bapf_slidr_jqrui").find(".bapf_from select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_from select option").remove(),a.each(f,function(b,e){var f="";e.ov==c[0]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_from select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))})),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").length&&(d.closest(".bapf_slidr_jqrui").find(".bapf_to select option").remove(),a.each(g,function(b,e){var f="";e.ov==c[1]&&(f=" selected"),d.closest(".bapf_slidr_jqrui").find(".bapf_to select").append(a('<option value="'+e.ov+'"'+f+">"+e.n+"</option>"))}))}),braapf_init_jqrui_slidr=function(){braapf_init_jqrui_slidr_for_parent(a(document))},braapf_init_jqrui_slidr_for_parent=function(b){b.find(".bapf_slidr_jqrui:not(.bapf_slidr_ready)").each(function(){var b=a(this).find(".bapf_slidr_main"),c=berocket_apply_filters("jqrui_data_slidr_jqrui",{range:!0,min:b.data("min"),max:b.data("max"),values:[b.data("start"),b.data("end")],step:b.data("step"),create:function(b,c){var d=a(this).slider("values");a(this).trigger("braapf_change_jqrui_slidr",[d])},slide:function(b,c){a(this).trigger("braapf_change_jqrui_slidr",[c.values])},change:function(b,c){var d=a(this).slider("values");if(a(this).trigger("braapf_change_jqrui_slidr",[d]),!a(this).is(".bapf_jqrui_blocked")){var d=a(this).slider("values"),e=a(this).parents(".bapf_sfilter").data("taxonomy");braapf_jqrui_slidr_same(e,d);var f={element:"#"+a(this).closest(".bapf_sfilter").attr("id"),parent:0,find:".bapf_body"};berocket_apply_filters("filter_changed_element",f,a(this)),berocket_do_action("update_products","filter",a(this))}}},b);b.slider(c),a(this).addClass("bapf_slidr_ready")})},braapf_jqrui_slidr_same=function(b,c){a(".bapf_slidr_jqrui.bapf_slidr_ready[data-taxonomy="+b+"]").each(function(){var b=a(this).find(".bapf_slidr_main");b.addClass("bapf_jqrui_blocked"),b.slider("values",c),b.removeClass("bapf_jqrui_blocked")})},braapf_jqrui_slidr_values_wc_price=function(a,b){var c=b.data("number_style");return c||(c=the_ajax_script.number_style),a[0]=berocket_format_number(a[0],c),a[1]=berocket_format_number(a[1],c),a},braapf_grab_single_jqrui=function(a,b){if(b.is(".bapf_slidr_jqrui.bapf_slidr_ready")&&0!=a){var c=b.find(".bapf_slidr_main"),d=c.slider("values"),e=c.slider("values");if(d[0]!=c.data("min")||d[1]!=c.data("max")){e=berocket_apply_filters("jqrui_slidr_"+c.data("display"),e,c);var f={value:d[0]+"_"+d[1],html:e[0]+" - "+e[1]};f=berocket_apply_filters("jqrui_slidr_link_"+c.data("display"),f,d,e,c,a),a.values=[f]}}return a},braapf_jqrui_slidr_values_arr_attr=function(a,b){var c=b.data("attr");return Array.isArray(a)&&2==a.length?(a[0]=c[a[0]].n,a[1]=c[a[1]].n):(a=["",""],a[0]=c[0].n,a[1]=c[c.length-1].n),a},braapf_jqrui_slidr_values_link_arr_attr=function(a,b,c,d,e){var f=d.data("attr");return a.value=f[b[0]].v+"_"+f[b[1]].v,a},a(document).on("braapf_unselect braapf_unselect_all",".bapf_slidr_jqrui",function(b,c){var d=a(this).find(".bapf_slidr_main"),e=d.data("min"),f=d.data("max");d.addClass("bapf_jqrui_blocked"),d.slider("values",[e,f]),d.removeClass("bapf_jqrui_blocked")}),berocket_add_filter("jqrui_slidr_wc_price",braapf_jqrui_slidr_values_wc_price),berocket_add_filter("jqrui_slidr_arr_attr",braapf_jqrui_slidr_values_arr_attr),berocket_add_filter("jqrui_slidr_link_arr_attr",braapf_jqrui_slidr_values_link_arr_attr),berocket_add_filter("grab_single_filter_default",braapf_grab_single_jqrui),berocket_add_filter("braapf_init",braapf_init_jqrui_slidr),berocket_add_filter("braapf_init_for_parent",braapf_init_jqrui_slidr_for_parent)}(jQuery);
assets/frontend/js/select2.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(d){var e=function(){if(d&&d.fn&&d.fn.select2&&d.fn.select2.amd)var e=d.fn.select2.amd;var t,n,i,h,o,s,f,g,m,v,y,_,r,a,w,l;function b(e,t){return r.call(e,t)}function c(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).l