AMP for WP – Accelerated Mobile Pages - Version 1.0.65

Version Description

(15th October 2020) = * Added: Integrated Truepush in push notification section #4644 * Added: Easy select option for category module #4672 * Added: Option to change the image size for the related posts thumbnail #4534 * Added: Option to change the image size of the first image in Swift theme #4476 * Added: AMP compatibility with Web stories by Google #4667 * Fixed: Validation error in the in-content related post #4729 * Fixed: Image elements do not have alt attributes #4757 * Fixed: When genesis theme is activated getting SEO error notice #4758 * Fixed: Removed third party plugins notices on the AMP option panel #4730 * Fixed: Instant articles not working when Site directory or Installation directory is different #4690 * Fixed: Clicking on the menu gets # at the end of the URL in design 2 #4722 * Fixed: Need to add tag for disqus comments #4692 * Fixed: Optimize menu caching code #4657 * Fixed: View non amp version is not working in mobile due to conflict with Redis Cache and WP Rocket #4614 * Fixed: Social share Buttons do not have an accessible name using Design One #4764 * Fixed: In the Contact form module, wp form options are not getting selected #4761 * Fixed: Uncaught Error: Call to undefined function ampforwp_is_home() main file #4782

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 1.0.65
Comparing to
See all releases

Code changes from version 1.0.64.1 to 1.0.65

Files changed (33) hide show
  1. README.md +20 -1
  2. accelerated-moblie-pages.php +3 -3
  3. changelog.txt +19 -0
  4. components/comments/comments.php +1 -0
  5. components/components-core.php +11 -4
  6. includes/features/functions.php +5 -4
  7. includes/features/performance/performance-functions.php +3 -0
  8. includes/features/push-notification/push-notification-functions.php +56 -1
  9. includes/features/push-notification/push-notification-options.php +46 -3
  10. includes/features/structure-data/structured-data-functions.php +3 -2
  11. includes/options/admin-config.php +50 -2
  12. includes/redirect.php +1 -0
  13. includes/thirdparty-compatibility.php +1 -1
  14. includes/truepush-integration/amp-web-push-helper-frame.html +9 -0
  15. includes/truepush-integration/amp-web-push-permission-dialog.html +261 -0
  16. includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php +8 -0
  17. pagebuilder/components/fieldsTemplate.php +17 -0
  18. pagebuilder/functions.php +7 -3
  19. pagebuilder/inc/admin-amp-page-builder.css +3 -0
  20. pagebuilder/inc/admin-amp-page-builder.js +53 -0
  21. pagebuilder/inc/assets/vue-select2/select2.min.css +1 -0
  22. pagebuilder/inc/assets/vue-select2/select2.min.js +1 -0
  23. pagebuilder/inc/assets/vue-select2/select2_jquery.min.js +1 -0
  24. pagebuilder/modules/contact-form-shortcode-module.php +3 -3
  25. pagebuilder/modules/contents-module.php +1 -1
  26. readme.txt +20 -1
  27. templates/design-manager.php +7 -1
  28. templates/design-manager/design-1/elements/social-icons.php +4 -3
  29. templates/design-manager/design-2/header-bar.php +1 -1
  30. templates/design-manager/swift/index.php +9 -1
  31. templates/design-manager/swift/single.php +16 -19
  32. templates/design-manager/swift/style.php +28 -2
  33. templates/features.php +7 -3
README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.5
7
- Stable tag: 1.0.64.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,25 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.64.1 (5th October 2020) =
197
  * Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
198
 
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.5
7
+ Stable tag: 1.0.65
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.65 (15th October 2020) =
197
+ * Added: Integrated Truepush in push notification section #4644
198
+ * Added: Easy select option for category module #4672
199
+ * Added: Option to change the image size for the related posts thumbnail #4534
200
+ * Added: Option to change the image size of the first image in Swift theme #4476
201
+ * Added: AMP compatibility with Web stories by Google #4667
202
+ * Fixed: Validation error in the in-content related post #4729
203
+ * Fixed: Image elements do not have alt attributes #4757
204
+ * Fixed: When genesis theme is activated getting SEO error notice #4758
205
+ * Fixed: Removed third party plugins notices on the AMP option panel #4730
206
+ * Fixed: Instant articles not working when Site directory or Installation directory is different #4690
207
+ * Fixed: Clicking on the menu gets # at the end of the URL in design 2 #4722
208
+ * Fixed: Need to add tag for disqus comments #4692
209
+ * Fixed: Optimize menu caching code #4657
210
+ * Fixed: View non amp version is not working in mobile due to conflict with Redis Cache and WP Rocket #4614
211
+ * Fixed: Social share Buttons do not have an accessible name using Design One #4764
212
+ * Fixed: In the Contact form module, wp form options are not getting selected #4761
213
+ * Fixed: Uncaught Error: Call to undefined function ampforwp_is_home() main file #4782#4782
214
+
215
  = 1.0.64.1 (5th October 2020) =
216
  * Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
217
 
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.64.1
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','1.0.64.1');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
@@ -1081,7 +1081,7 @@ function ampforwp_get_all_post_types(){
1081
  }
1082
  $post_types = array_merge($post_types, $selected_post_types);
1083
  }
1084
- if(class_exists('WPUltimateRecipe') && ampforwp_is_home()){
1085
  $post_types['recipe'] = 'recipe';
1086
  }
1087
  return $post_types;
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 1.0.65
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','1.0.65');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
1081
  }
1082
  $post_types = array_merge($post_types, $selected_post_types);
1083
  }
1084
+ if(class_exists('WPUltimateRecipe') && function_exists('ampforwp_is_home') && ampforwp_is_home()){
1085
  $post_types['recipe'] = 'recipe';
1086
  }
1087
  return $post_types;
changelog.txt CHANGED
@@ -1,5 +1,24 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.64.1 (5th October 2020) =
4
  * Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
5
 
1
  == Changelog ==
2
 
3
+ = 1.0.65 (15th October 2020) =
4
+ * Added: Integrated Truepush in push notification section #4644
5
+ * Added: Easy select option for category module #4672
6
+ * Added: Option to change the image size for the related posts thumbnail #4534
7
+ * Added: Option to change the image size of the first image in Swift theme #4476
8
+ * Added: AMP compatibility with Web stories by Google #4667
9
+ * Fixed: Validation error in the in-content related post #4729
10
+ * Fixed: Image elements do not have alt attributes #4757
11
+ * Fixed: When genesis theme is activated getting SEO error notice #4758
12
+ * Fixed: Removed third party plugins notices on the AMP option panel #4730
13
+ * Fixed: Instant articles not working when Site directory or Installation directory is different #4690
14
+ * Fixed: Clicking on the menu gets # at the end of the URL in design 2 #4722
15
+ * Fixed: Need to add tag for disqus comments #4692
16
+ * Fixed: Optimize menu caching code #4657
17
+ * Fixed: View non amp version is not working in mobile due to conflict with Redis Cache and WP Rocket #4614
18
+ * Fixed: Social share Buttons do not have an accessible name using Design One #4764
19
+ * Fixed: In the Contact form module, wp form options are not getting selected #4761
20
+ * Fixed: Uncaught Error: Call to undefined function ampforwp_is_home() main file #4782
21
+
22
  = 1.0.64.1 (5th October 2020) =
23
  * Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
24
 
components/comments/comments.php CHANGED
@@ -196,6 +196,7 @@ function ampforwp_framework_get_disqus_comments(){
196
  width=<?php echo esc_attr($width); ?>
197
  layout="<?php echo esc_attr($layout); ?>"
198
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
 
199
  frameborder="0"
200
  <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>
201
  src="<?php echo esc_url($disqus_url); ?>" title="<?php echo esc_html__('Disqus Comments.','accelerated-mobile-pages'); ?>">
196
  width=<?php echo esc_attr($width); ?>
197
  layout="<?php echo esc_attr($layout); ?>"
198
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
199
+ resizable
200
  frameborder="0"
201
  <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>
202
  src="<?php echo esc_url($disqus_url); ?>" title="<?php echo esc_html__('Disqus Comments.','accelerated-mobile-pages'); ?>">
components/components-core.php CHANGED
@@ -157,11 +157,18 @@ function amp_menu($echo=true, $menu_args=array(), $type='header'){
157
  }
158
  global $loadComponent;
159
  if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
160
- if ( false != get_transient('ampforwp_header_menu') && 'header' == $type ){
161
- $amp_menu = get_transient('ampforwp_header_menu');
 
 
 
 
162
  }
163
- elseif (false != get_transient('ampforwp_footer_menu') && 'footer' == $type) {
164
- $amp_menu = get_transient('ampforwp_footer_menu');
 
 
 
165
  }
166
  else{
167
  $amp_menu = amp_menu_html($echo, $menu_args, $type);
157
  }
158
  global $loadComponent;
159
  if(isset($loadComponent['AMP-menu']) && $loadComponent['AMP-menu']==true){
160
+ $amp_menu = "";
161
+ if ( 'header' == $type ){
162
+ $header_menu = get_transient('ampforwp_header_menu');
163
+ if(false != $header_menu ){
164
+ $amp_menu = $header_menu;
165
+ }
166
  }
167
+ elseif ('footer' == $type) {
168
+ $footer_menu = get_transient('ampforwp_footer_menu');
169
+ if(false != $footer_menu){
170
+ $amp_menu = $footer_menu;
171
+ }
172
  }
173
  else{
174
  $amp_menu = amp_menu_html($echo, $menu_args, $type);
includes/features/functions.php CHANGED
@@ -46,6 +46,7 @@ function ampforwp_add_admin_styling($hook_suffix){
46
  wp_dequeue_script( 'jquery-js' );
47
  }
48
  remove_all_actions('admin_notices');
 
49
  add_action('admin_notices', 'ampforwp_dev_mode_notice');
50
  add_action('admin_notices', 'ampforwp_plugins_manager_notice');
51
  add_action('admin_notices', 'ampforwp_ampwptheme_notice');
@@ -1292,6 +1293,9 @@ function ampforwp_dev_mode_notice(){
1292
 
1293
  function ampforwp_seo_selection_notice() {
1294
  $seo = '';
 
 
 
1295
  if(class_exists('WPSEO_Options')){
1296
  $seo = 'Yoast SEO';
1297
  }
@@ -1301,9 +1305,6 @@ function ampforwp_seo_selection_notice() {
1301
  if(function_exists( 'the_seo_framework' )){
1302
  $seo = 'The SEO Framework';
1303
  }
1304
- if(function_exists('genesis_theme_support')){
1305
- $seo = 'Genesis';
1306
- }
1307
  if(function_exists('qode_header_meta')){
1308
  $seo = 'Bridge Qode SEO';
1309
  }
@@ -1338,7 +1339,7 @@ function ampforwp_seo_selection_notice() {
1338
  else if (class_exists('Smartcrawl_Loader') && 'smartcrawl' != ampforwp_get_setting('ampforwp-seo-selection')){
1339
  $seosel = true;
1340
  }
1341
- else if (function_exists('genesis_theme_support') && 'genesis' != ampforwp_get_setting('ampforwp-seo-selection')){
1342
  $seosel = true;
1343
  }
1344
  else if (function_exists('seopress_activation') && 'seopress' != ampforwp_get_setting('ampforwp-seo-selection')){
46
  wp_dequeue_script( 'jquery-js' );
47
  }
48
  remove_all_actions('admin_notices');
49
+ remove_all_actions('all_admin_notices');
50
  add_action('admin_notices', 'ampforwp_dev_mode_notice');
51
  add_action('admin_notices', 'ampforwp_plugins_manager_notice');
52
  add_action('admin_notices', 'ampforwp_ampwptheme_notice');
1293
 
1294
  function ampforwp_seo_selection_notice() {
1295
  $seo = '';
1296
+ if(function_exists('genesis_theme_support')){
1297
+ $seo = 'Genesis';
1298
+ }
1299
  if(class_exists('WPSEO_Options')){
1300
  $seo = 'Yoast SEO';
1301
  }
1305
  if(function_exists( 'the_seo_framework' )){
1306
  $seo = 'The SEO Framework';
1307
  }
 
 
 
1308
  if(function_exists('qode_header_meta')){
1309
  $seo = 'Bridge Qode SEO';
1310
  }
1339
  else if (class_exists('Smartcrawl_Loader') && 'smartcrawl' != ampforwp_get_setting('ampforwp-seo-selection')){
1340
  $seosel = true;
1341
  }
1342
+ else if (function_exists('genesis_theme_support') && 'genesis' != ampforwp_get_setting('ampforwp-seo-selection') && !class_exists('WPSEO_Options') && !defined( 'RANK_MATH_FILE' ) && !class_exists('All_in_One_SEO_Pack') && !defined( 'SQ_ALL_PATTERNS' ) && !class_exists('Smartcrawl_Loader') && !function_exists('seopress_activation')){
1343
  $seosel = true;
1344
  }
1345
  else if (function_exists('seopress_activation') && 'seopress' != ampforwp_get_setting('ampforwp-seo-selection')){
includes/features/performance/performance-functions.php CHANGED
@@ -30,6 +30,9 @@ function ampforwp_minify_html_output($content_buffer){
30
  if(preg_match('/<script(.*?)type="text\/javascript"(.*?)>[\s\S]*?<\/script>/', $content_buffer)){
31
  $content_buffer = preg_replace('/<script(.*?)type="text\/javascript"(.*?)>[\s\S]*?<\/script>/', '', $content_buffer);
32
  }
 
 
 
33
  global $redux_builder_amp;
34
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
35
  return $content_buffer;
30
  if(preg_match('/<script(.*?)type="text\/javascript"(.*?)>[\s\S]*?<\/script>/', $content_buffer)){
31
  $content_buffer = preg_replace('/<script(.*?)type="text\/javascript"(.*?)>[\s\S]*?<\/script>/', '', $content_buffer);
32
  }
33
+ if(preg_match('/<amp-story-player(.*?)<\/amp-story-player>/s', $content_buffer)){
34
+ $content_buffer = preg_replace('/<amp-story-player(.*?)<\/amp-story-player>/s', '<amp-story-player width="360" height="600" $1</amp-story-player>', $content_buffer);
35
+ }
36
  global $redux_builder_amp;
37
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
38
  return $content_buffer;
includes/features/push-notification/push-notification-functions.php CHANGED
@@ -216,4 +216,59 @@ function ampforwp_onesignal_sticky(){ ?>
216
  </a>
217
  </amp-web-push-widget>
218
  </div>
219
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  </a>
217
  </amp-web-push-widget>
218
  </div>
219
+ <?php }
220
+ add_action( 'ampforwp_body_beginning' , 'ampforwp_truepush_notifications');
221
+ function ampforwp_truepush_notifications(){
222
+ $checker = false;
223
+ if (!checkAMPforPageBuilderStatus(get_the_ID()) && is_single() ){
224
+ $checker = true;
225
+ }
226
+ if('4' == ampforwp_get_setting('ampforwp-web-push') && $checker ){
227
+ $app_id = ampforwp_get_setting('ampforwp-truepush-app-id');
228
+ $public_key = ampforwp_get_setting('ampforwp-truepush-public-key');
229
+ $domain_path = AMPFORWP_PLUGIN_DIR_URI.'includes/truepush-integration/';
230
+ $helper_iframe_url = $domain_path .'amp-web-push-helper-frame.html?appId=' . $app_id;
231
+ $permission_dialog_url = $domain_path .'amp-web-push-permission-dialog.html?publicKey=' . $public_key;
232
+ $service_worker_url = $domain_path .'sw.js';?>
233
+ <amp-web-push
234
+ id="amp-web-push"
235
+ layout="nodisplay"
236
+ helper-iframe-url="<?php echo esc_url_raw($helper_iframe_url); ?>"
237
+ permission-dialog-url="<?php echo esc_url_raw($permission_dialog_url); ?>"
238
+ service-worker-url="<?php echo esc_url($service_worker_url); ?>">
239
+ </amp-web-push>
240
+ <?php }
241
+ }
242
+ add_action('amp_post_template_css' , 'ampforwp_truepush_styling');
243
+ function ampforwp_truepush_styling(){?>
244
+ amp-web-push-widget button.amp-subscribe {
245
+ display: inline-flex;
246
+ align-items: center;
247
+ border-radius: 5px;
248
+ border: 0;
249
+ box-sizing: border-box;
250
+ margin: 0;
251
+ padding: 10px 15px;
252
+ cursor: pointer;
253
+ outline: none;
254
+ font-size: 15px;
255
+ font-weight: 500;
256
+ background: #4A90E2;
257
+ margin-top: 7px;
258
+ color: white;
259
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.5);
260
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
261
+ }
262
+ <?php }
263
+ function ampforwp_truepush_markup(){?>
264
+ <amp-web-push-widget visibility="unsubscribed" layout="fixed" width="250" height="45">
265
+ <button on="tap:amp-web-push.subscribe" class="amp-subscribe"><?php echo ampforwp_translation( ampforwp_get_setting('ampforwp-truepush-translator-subscribe'), 'Subscribe to updates' ); ?></button>
266
+ </amp-web-push-widget>
267
+ <?php }
268
+ if(!checkAMPforPageBuilderStatus(get_the_ID()) && is_single() &&ampforwp_get_setting('ampforwp-web-push-truepush-below-content')){
269
+ add_action('ampforwp_after_post_content', 'ampforwp_truepush_markup');
270
+ }
271
+
272
+ if(!checkAMPforPageBuilderStatus(get_the_ID()) && is_single() &&ampforwp_get_setting('ampforwp-web-push-truepush-above-content')){
273
+ add_action('ampforwp_before_post_content', 'ampforwp_truepush_markup');
274
+ }
includes/features/push-notification/push-notification-options.php CHANGED
@@ -101,7 +101,7 @@ function ampforwp_push_notification_options($opt_name){
101
  '0' => esc_html__('Select Integration Service', 'accelerated-mobile-pages' ),
102
  '1' => esc_html__('OneSignal', 'accelerated-mobile-pages' ),
103
  '2' => esc_html__('iZooto', 'accelerated-mobile-pages' ),
104
-
105
  ),
106
  'default' => ampforwp_push_notification_default(),
107
  ),
@@ -130,6 +130,26 @@ function ampforwp_push_notification_options($opt_name){
130
  'class' => 'child_opt child_opt_arrow',
131
  'tooltip-subtitle' => '<a href="https://ampforwp.com/tutorials/one-signal-in-amp/" target="_blank">View Integration Tutorial</a> (HTTPS is required)',
132
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  array(
134
  'id' => 'ampforwp-one-signal-page',
135
  'type' => 'switch',
@@ -144,8 +164,7 @@ function ampforwp_push_notification_options($opt_name){
144
  'id' => 'ampforwp-onesignal-positioning',
145
  'type' => 'section',
146
  'title' => esc_html__('Positioning', 'accelerated-mobile-pages'),
147
- 'required' => array(
148
- array( 'ampforwp-web-push', '=' , '1' ),
149
  array( 'amp-use-pot', '=' , 0 )
150
  ),
151
  'indent' => true,
@@ -172,6 +191,22 @@ function ampforwp_push_notification_options($opt_name){
172
  'tooltip-subtitle' => 'Show Subscribe Button Above the Content',
173
  'required' => array('ampforwp-web-push', '=' , '1'),
174
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  $izt_opt3,
176
  $izt_opt1,$izt_opt2,
177
  array(
@@ -188,6 +223,7 @@ function ampforwp_push_notification_options($opt_name){
188
  'title' => esc_html__('Subscribe', 'accelerated-mobile-pages'),
189
  'default' => esc_html__('Subscribe to updates','accelerated-mobile-pages'),
190
  'placeholder'=>esc_html__('Add some text','accelerated-mobile-pages'),
 
191
  ),
192
  array(
193
  'id' => 'ampforwp-onesignal-translator-unsubscribe',
@@ -197,6 +233,13 @@ function ampforwp_push_notification_options($opt_name){
197
  'placeholder'=>esc_html__('Add some text','accelerated-mobile-pages'),
198
  'required'=> array( array( 'ampforwp-web-push', '=' , '1' )),
199
  ),
 
 
 
 
 
 
 
200
  array(
201
  'id' => 'ampforwp-onesignal-exper',
202
  'type' => 'section',
101
  '0' => esc_html__('Select Integration Service', 'accelerated-mobile-pages' ),
102
  '1' => esc_html__('OneSignal', 'accelerated-mobile-pages' ),
103
  '2' => esc_html__('iZooto', 'accelerated-mobile-pages' ),
104
+ '4' => esc_html__('Truepush', 'accelerated-mobile-pages' ),
105
  ),
106
  'default' => ampforwp_push_notification_default(),
107
  ),
130
  'class' => 'child_opt child_opt_arrow',
131
  'tooltip-subtitle' => '<a href="https://ampforwp.com/tutorials/one-signal-in-amp/" target="_blank">View Integration Tutorial</a> (HTTPS is required)',
132
  ),
133
+ array(
134
+ 'id' => 'ampforwp-truepush-app-id',
135
+ 'type' => 'text',
136
+ 'title' => esc_html__('APP ID','accelerated-mobile-pages'),
137
+ 'class' => 'child_opt child_opt_arrow',
138
+ 'tooltip-subtitle' => '<a href="https://ampforwp.com/tutorials/truepush-in-amp/" target="_blank">'.esc_html__('View Integration Tutorial','accelerated-mobile-pages').'</a>',
139
+ 'required' => array(
140
+ array( 'ampforwp-web-push', '=' , '4' ),
141
+ ),
142
+ ),
143
+ array(
144
+ 'id' => 'ampforwp-truepush-public-key',
145
+ 'type' => 'text',
146
+ 'title' => esc_html__('Public Key','accelerated-mobile-pages'),
147
+ 'class' => 'child_opt child_opt_arrow',
148
+ 'tooltip-subtitle' => '<a href="https://ampforwp.com/tutorials/truepush-in-amp/" target="_blank">'.esc_html__('View Integration Tutorial','accelerated-mobile-pages').'</a>',
149
+ 'required' => array(
150
+ array( 'ampforwp-web-push', '=' , '4' ),
151
+ ),
152
+ ),
153
  array(
154
  'id' => 'ampforwp-one-signal-page',
155
  'type' => 'switch',
164
  'id' => 'ampforwp-onesignal-positioning',
165
  'type' => 'section',
166
  'title' => esc_html__('Positioning', 'accelerated-mobile-pages'),
167
+ 'required' => array(
 
168
  array( 'amp-use-pot', '=' , 0 )
169
  ),
170
  'indent' => true,
191
  'tooltip-subtitle' => 'Show Subscribe Button Above the Content',
192
  'required' => array('ampforwp-web-push', '=' , '1'),
193
  ),
194
+ array(
195
+ 'id' => 'ampforwp-web-push-truepush-below-content',
196
+ 'type' => 'switch',
197
+ 'title' => esc_html__('Below Content','accelerated-mobile-pages'),
198
+ 'default' => 1,
199
+ 'tooltip-subtitle' => esc_html__('Show Subscribe Button Below the Content','accelerated-mobile-pages'),
200
+ 'required' => array('ampforwp-web-push', '=' , '4'),
201
+ ),
202
+ array(
203
+ 'id' => 'ampforwp-web-push-truepush-above-content',
204
+ 'type' => 'switch',
205
+ 'title' => esc_html__('Above Content','accelerated-mobile-pages'),
206
+ 'default' => 0,
207
+ 'tooltip-subtitle' => esc_html__('Show Subscribe Button Above the Content','accelerated-mobile-pages'),
208
+ 'required' => array('ampforwp-web-push', '=' , '4'),
209
+ ),
210
  $izt_opt3,
211
  $izt_opt1,$izt_opt2,
212
  array(
223
  'title' => esc_html__('Subscribe', 'accelerated-mobile-pages'),
224
  'default' => esc_html__('Subscribe to updates','accelerated-mobile-pages'),
225
  'placeholder'=>esc_html__('Add some text','accelerated-mobile-pages'),
226
+ 'required'=> array( array( 'ampforwp-web-push', '=' , '1' )),
227
  ),
228
  array(
229
  'id' => 'ampforwp-onesignal-translator-unsubscribe',
233
  'placeholder'=>esc_html__('Add some text','accelerated-mobile-pages'),
234
  'required'=> array( array( 'ampforwp-web-push', '=' , '1' )),
235
  ),
236
+ array(
237
+ 'id' => 'ampforwp-truepush-translator-subscribe',
238
+ 'type' => 'text',
239
+ 'title' => esc_html__('Subscribe', 'accelerated-mobile-pages'),
240
+ 'default' => esc_html__('Subscribe to Notifications','accelerated-mobile-pages'),
241
+ 'required'=> array( array( 'ampforwp-web-push', '=' , '4' )),
242
+ ),
243
  array(
244
  'id' => 'ampforwp-onesignal-exper',
245
  'type' => 'section',
includes/features/structure-data/structured-data-functions.php CHANGED
@@ -415,8 +415,9 @@ function ampforwp_sd_sitenavigation(){
415
  if ( ! class_exists('saswp_fields_generator') ) {
416
  $input = array();
417
  $navObj = array();
418
- if ( true == get_transient('ampforwp_header_sd_menu') && true == get_transient('ampforwp_footer_sd_menu') && false != get_transient('ampforwp_sd_menu') ) {
419
- $navObj[] = get_transient('ampforwp_sd_menu');
 
420
  }
421
  $menuLocations = get_nav_menu_locations();
422
  if(!empty($menuLocations) ){
415
  if ( ! class_exists('saswp_fields_generator') ) {
416
  $input = array();
417
  $navObj = array();
418
+ $ampforwp_sd_menu = get_transient('ampforwp_sd_menu');
419
+ if ( true == get_transient('ampforwp_header_sd_menu') && true == get_transient('ampforwp_footer_sd_menu') && false != $ampforwp_sd_menu) {
420
+ $navObj[] = $ampforwp_sd_menu;
421
  }
422
  $menuLocations = get_nav_menu_locations();
423
  if(!empty($menuLocations) ){
includes/options/admin-config.php CHANGED
@@ -2547,8 +2547,8 @@ function ampforwp_fb_instant_article() {
2547
  if(get_option('permalink_structure') == ''){
2548
  $feedname = '?feed=instant_articles';
2549
  }
2550
- $fb_instant_article_feed = trailingslashit( site_url() ).$feedname ;
2551
- $input = '<a href=" '. esc_url($fb_instant_article_feed) . '" target="_blank">' . esc_url( $fb_instant_article_feed ). '</a>' ;
2552
 
2553
  return strip_tags($input, '<a>');
2554
  }
@@ -5621,6 +5621,18 @@ Redux::setSection( $opt_name, array(
5621
  array('ampforwp-homepage-posts-image-modify-size','=',1)
5622
  )
5623
  ),
 
 
 
 
 
 
 
 
 
 
 
 
5624
  array(
5625
  'id' => 'amforwp-homepage-date-switch',
5626
  'type' => 'switch',
@@ -6081,6 +6093,42 @@ $single_page_options = array(
6081
  array('ampforwp-single-related-posts-switch', '=' , '1')
6082
  ),
6083
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6084
  array(
6085
  'id' => 'ampforwp-single-related-posts-excerpt',
6086
  'type' => 'switch',
2547
  if(get_option('permalink_structure') == ''){
2548
  $feedname = '?feed=instant_articles';
2549
  }
2550
+ $fb_instant_article_feed = trailingslashit( get_home_url() ).$feedname ;
2551
+ $input = '<a href=" '. esc_url_raw($fb_instant_article_feed) . '" target="_blank">' . esc_url_raw( $fb_instant_article_feed ). '</a>' ;
2552
 
2553
  return strip_tags($input, '<a>');
2554
  }
5621
  array('ampforwp-homepage-posts-image-modify-size','=',1)
5622
  )
5623
  ),
5624
+ array(
5625
+ 'class' => 'child_opt',
5626
+ 'id' => 'ampforwp-homepage-posts-first-image-modify-size',
5627
+ 'type' => 'switch',
5628
+ 'title' => esc_html__('Apply for first image', 'accelerated-mobile-pages'),
5629
+ 'default' => 0,
5630
+ 'tooltip-subtitle' => esc_html__('Inherit the above Height and Width size for homepage first image', 'accelerated-mobile-pages'),
5631
+ 'required' => array(
5632
+ array('amp-design-selector','=',4),
5633
+ array('ampforwp-homepage-posts-image-modify-size','=',1)
5634
+ )
5635
+ ),
5636
  array(
5637
  'id' => 'amforwp-homepage-date-switch',
5638
  'type' => 'switch',
6093
  array('ampforwp-single-related-posts-switch', '=' , '1')
6094
  ),
6095
  ),
6096
+ array(
6097
+ 'id' => 'ampforwp-single-related-posts-change-image-size',
6098
+ 'type' => 'switch',
6099
+ 'class' => 'child_opt',
6100
+ 'title' => esc_html__('Change Image Size', 'accelerated-mobile-pages'),
6101
+ 'default' => 0,
6102
+ 'required' => array(
6103
+ array('amp-design-selector','=',4),
6104
+ array('ampforwp-single-related-posts-switch', '=' , '1'),
6105
+ array('ampforwp-single-related-posts-image', '=' , '1')
6106
+ ),
6107
+ ),
6108
+ array(
6109
+ 'id' => 'ampforwp-single-related-posts-image-width',
6110
+ 'class' => 'child_opt child_opt_arrow',
6111
+ 'type' => 'text',
6112
+ 'title' => esc_html__('Image Width', 'accelerated-mobile-pages'),
6113
+ 'tooltip-subtitle' => esc_html__('Defaults to 346', 'accelerated-mobile-pages'),
6114
+ 'default' => 346,
6115
+ 'required' => array(
6116
+ array('amp-design-selector','=',4),
6117
+ array('ampforwp-single-related-posts-change-image-size','=',1)
6118
+ )
6119
+ ),
6120
+ array(
6121
+ 'id' => 'ampforwp-single-related-posts-image-height',
6122
+ 'class' => 'child_opt',
6123
+ 'type' => 'text',
6124
+ 'title' => esc_html__('Image Height', 'accelerated-mobile-pages'),
6125
+ 'tooltip-subtitle' => esc_html__('Defaults to 188', 'accelerated-mobile-pages'),
6126
+ 'default' => 188,
6127
+ 'required' => array(
6128
+ array('amp-design-selector','=',4),
6129
+ array('ampforwp-single-related-posts-change-image-size','=',1)
6130
+ )
6131
+ ),
6132
  array(
6133
  'id' => 'ampforwp-single-related-posts-excerpt',
6134
  'type' => 'switch',
includes/redirect.php CHANGED
@@ -69,6 +69,7 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
69
  htmlspecialchars( $_SERVER['REQUEST_URI'] );
70
  if(function_exists('googlesitekit_activate_plugin')){
71
  $current_url = remove_query_arg( '_gl', $current_url);
 
72
  }
73
  $current_url = explode('/', $current_url);
74
  $check = '?nonamp=1';
69
  htmlspecialchars( $_SERVER['REQUEST_URI'] );
70
  if(function_exists('googlesitekit_activate_plugin')){
71
  $current_url = remove_query_arg( '_gl', $current_url);
72
+ $current_url = remove_query_arg(array('', '_gl'));
73
  }
74
  $current_url = explode('/', $current_url);
75
  $check = '?nonamp=1';
includes/thirdparty-compatibility.php CHANGED
@@ -1132,7 +1132,7 @@ if(!function_exists('ampforwp_mistape_plugin_compatibility')){
1132
  }
1133
  }
1134
  function ampforwp_valid_amp_componet_script(){
1135
- $ce_valid_scripts = array('amp-3d-gltf','amp-3q-player','amp-access','amp-analytics','amp-access-laterpay','amp-access-poool','amp-accordion','amp-action-macro','amp-ad-exit','amp-ad','amp-embed','amp-addthis','amp-anim','amp-animation','amp-apester-media','amp-app-banner','amp-audio','amp-auto-ads','amp-autocomplete','amp-base-carousel','amp-beopinion','amp-bind','amp-bodymovin-animation','amp-brid-player','amp-brightcove','amp-byside-content','amp-call-tracking','amp-carousel','amp-connatix-player','amp-consent','amp-dailymotion','amp-date-countdown','amp-date-picker','amp-delight-player','amp-dynamic-css-classes','amp-embedly-card','amp-experiment','amp-facebook-comments','amp-facebook-like','amp-facebook-page','amp-facebook','amp-fit-text','amp-font','amp-form','amp-fx-collection','amp-fx-flying-carpet','amp-geo','amp-gfycat','amp-gist','amp-google-document-embed','amp-google-vrview-image','amp-hulu','amp-iframe','amp-ima-video','amp-image-lightbox','amp-image-slider','amp-imgur','amp-inputmask','amp-instagram','amp-install-serviceworker','amp-izlesene','amp-jwplayer','amp-kaltura-player','amp-lightbox-gallery','amp-lightbox','amp-link-rewriter','amp-list','amp-live-list','amp-mathml','amp-mega-menu','amp-megaphone','amp-minute-media-player','amp-form','amp-mustache','amp-next-page','amp-nexxtv-player','amp-o2-player','amp-ooyala-player','amp-orientation-observer','amp-pan-zoom','amp-pinterest','amp-playbuzz','amp-position-observer','amp-powr-player','amp-reach-player','amp-recaptcha-input','amp-redbull-player','amp-reddit','amp-riddle-quiz','amp-script','amp-selector','amp-sidebar','amp-skimlinks','amp-smartlinks','amp-social-share','amp-soundcloud','amp-springboard-player','amp-sticky-ad','amp-story-auto-ads','amp-story','amp-subscriptions-google','amp-subscriptions','amp-timeago','amp-truncate-text','amp-twitter','amp-user-notification','amp-video-docking','amp-video-iframe','amp-video','amp-vimeo','amp-vine','amp-viqeo-player','amp-viz-vega','amp-vk','amp-web-push','amp-wistia-player','amp-yotpo','amp-youtube');
1136
  $ce_valid_scripts = apply_filters('ampforwp_valid_amp_component_script',$ce_valid_scripts);
1137
  return $ce_valid_scripts;
1138
  }
1132
  }
1133
  }
1134
  function ampforwp_valid_amp_componet_script(){
1135
+ $ce_valid_scripts = array('amp-3d-gltf','amp-3q-player','amp-access','amp-analytics','amp-access-laterpay','amp-access-poool','amp-accordion','amp-action-macro','amp-ad-exit','amp-ad','amp-embed','amp-addthis','amp-anim','amp-animation','amp-apester-media','amp-app-banner','amp-audio','amp-auto-ads','amp-autocomplete','amp-base-carousel','amp-beopinion','amp-bind','amp-bodymovin-animation','amp-brid-player','amp-brightcove','amp-byside-content','amp-call-tracking','amp-carousel','amp-connatix-player','amp-consent','amp-dailymotion','amp-date-countdown','amp-date-picker','amp-delight-player','amp-dynamic-css-classes','amp-embedly-card','amp-experiment','amp-facebook-comments','amp-facebook-like','amp-facebook-page','amp-facebook','amp-fit-text','amp-font','amp-form','amp-fx-collection','amp-fx-flying-carpet','amp-geo','amp-gfycat','amp-gist','amp-google-document-embed','amp-google-vrview-image','amp-hulu','amp-iframe','amp-ima-video','amp-image-lightbox','amp-image-slider','amp-imgur','amp-inputmask','amp-instagram','amp-install-serviceworker','amp-izlesene','amp-jwplayer','amp-kaltura-player','amp-lightbox-gallery','amp-lightbox','amp-link-rewriter','amp-list','amp-live-list','amp-mathml','amp-mega-menu','amp-megaphone','amp-minute-media-player','amp-form','amp-mustache','amp-next-page','amp-nexxtv-player','amp-o2-player','amp-ooyala-player','amp-orientation-observer','amp-pan-zoom','amp-pinterest','amp-playbuzz','amp-position-observer','amp-powr-player','amp-reach-player','amp-recaptcha-input','amp-redbull-player','amp-reddit','amp-riddle-quiz','amp-script','amp-selector','amp-sidebar','amp-skimlinks','amp-smartlinks','amp-social-share','amp-soundcloud','amp-springboard-player','amp-sticky-ad','amp-story-auto-ads','amp-story','amp-subscriptions-google','amp-subscriptions','amp-timeago','amp-truncate-text','amp-twitter','amp-user-notification','amp-video-docking','amp-video-iframe','amp-video','amp-vimeo','amp-vine','amp-viqeo-player','amp-viz-vega','amp-vk','amp-web-push','amp-wistia-player','amp-yotpo','amp-youtube','amp-story-player');
1136
  $ce_valid_scripts = apply_filters('ampforwp_valid_amp_component_script',$ce_valid_scripts);
1137
  return $ce_valid_scripts;
1138
  }
includes/truepush-integration/amp-web-push-helper-frame.html ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <script src="https://sdki.truepush.com/sdk/v2.0.2/amp-helper-frame.js"></script>
6
+ </head>
7
+ <body>
8
+ </body>
9
+ </html>
includes/truepush-integration/amp-web-push-permission-dialog.html ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html>
3
+ <!-- AMP Web Push Permission Dialog -->
4
+
5
+ <head>
6
+ <meta charset="utf-8">
7
+
8
+ <!-- Do not edit styles in this section -->
9
+ <style builtin>
10
+ /* Do not edit styles in this section. Add custom styles in the next
11
+ style section */
12
+ html,
13
+ body {
14
+ height: 100%;
15
+ margin: 0;
16
+ padding: 0;
17
+ }
18
+
19
+ /* Default loading spinner */
20
+ .spinner,
21
+ .spinner:after {
22
+ border-radius: 50%;
23
+ width: 10em;
24
+ height: 10em;
25
+ }
26
+
27
+ .spinner {
28
+ margin: 60px auto;
29
+ font-size: 10px;
30
+ position: relative;
31
+ text-indent: -9999em;
32
+ border-top: 1.1em solid rgba(140, 140, 140, 0.2);
33
+ border-right: 1.1em solid rgba(140, 140, 140, 0.2);
34
+ border-bottom: 1.1em solid rgba(140, 140, 140, 0.2);
35
+ border-left: 1.1em solid rgb(140, 140, 140);
36
+ -webkit-transform: translateZ(0);
37
+ -ms-transform: translateZ(0);
38
+ transform: translateZ(0);
39
+ -webkit-animation: spinner 1.1s infinite linear;
40
+ animation: spinner 1.1s infinite linear;
41
+ }
42
+
43
+ @-webkit-keyframes spinner {
44
+ 0% {
45
+ -webkit-transform: rotate(0deg);
46
+ transform: rotate(0deg);
47
+ }
48
+
49
+ 100% {
50
+ -webkit-transform: rotate(360deg);
51
+ transform: rotate(360deg);
52
+ }
53
+ }
54
+
55
+ @keyframes spinner {
56
+ 0% {
57
+ -webkit-transform: rotate(0deg);
58
+ transform: rotate(0deg);
59
+ }
60
+
61
+ 100% {
62
+ -webkit-transform: rotate(360deg);
63
+ transform: rotate(360deg);
64
+ }
65
+ }
66
+
67
+ /* Horizontally and vertically center items */
68
+ body {
69
+ display: flex;
70
+ justify-content: center;
71
+ align-items: center;
72
+ padding: 15px;
73
+ }
74
+
75
+ /* Page message text styles */
76
+ .message {
77
+ font-size: 22px;
78
+ font-family: sans-serif;
79
+ text-align: center;
80
+ }
81
+
82
+ /* Close icon styles */
83
+ #close {
84
+ position: fixed;
85
+ right: 32px;
86
+ top: 32px;
87
+ width: 32px;
88
+ height: 32px;
89
+ opacity: 0.5;
90
+ cursor: pointer;
91
+ }
92
+
93
+ #close:before,
94
+ #close:after {
95
+ position: fixed;
96
+ right: 48px;
97
+ content: ' ';
98
+ height: 33px;
99
+ width: 3px;
100
+ background-color: #333;
101
+ }
102
+
103
+ #close:before {
104
+ transform: rotate(45deg);
105
+ }
106
+
107
+ #close:after {
108
+ transform: rotate(-45deg);
109
+ }
110
+
111
+ /* Used to hide the preload and postload sections */
112
+ .invisible {
113
+ display: none;
114
+ }
115
+
116
+ #denied {
117
+ display: none;
118
+ }
119
+ </style>
120
+
121
+ <!-- Optional: Add custom styles here -->
122
+ <style amp-custom>
123
+ html,
124
+ body {
125
+ margin: 0;
126
+ padding: 0;
127
+ background-color: #f6f6f6;
128
+ width: 100%;
129
+ height: 100%;
130
+ overflow: hidden;
131
+ font-size: 14px;
132
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
133
+ background: #f1f1f1
134
+ }
135
+
136
+ .wrapper {
137
+ width: 100%;
138
+ height: 100%;
139
+ box-sizing: border-box;
140
+ padding: 2em;
141
+ display: -ms-flexbox;
142
+ display: flex;
143
+ -ms-flex-direction: row;
144
+ flex-direction: row;
145
+ -ms-flex-align: center;
146
+ align-items: center;
147
+ -ms-flex-pack: center;
148
+ justify-content: center;
149
+ text-align: center;
150
+ }
151
+
152
+ .title {
153
+ font-size: 1.429em;
154
+ font-weight: 500;
155
+ max-width: 360px;
156
+ margin: 0 auto;
157
+ }
158
+
159
+ .subtitle {
160
+ font-size: 1.143em;
161
+ font-weight: 300;
162
+ line-height: 1.714em;
163
+ color: #666;
164
+ margin: .714em auto 2.143em;
165
+ max-width: 360px;
166
+ }
167
+
168
+ .notice {
169
+ font-style: italic;
170
+ font-weight: 300;
171
+ color: #999;
172
+ font-size: 12px;
173
+ text-align: center;
174
+ white-space: nowrap;
175
+ overflow: hidden;
176
+ text-overflow: ellipsis;
177
+ text-align: center;
178
+ }
179
+
180
+ #subsus {
181
+ margin-top: 20px;
182
+ display: none;
183
+ color: green
184
+ }
185
+
186
+ button {
187
+ margin: 25px auto;
188
+ display: block;
189
+ background: #2c7be5;
190
+ border: none;
191
+ color: #fff;
192
+ font-size: 22px;
193
+ padding: 10px 35px;
194
+ line-height: 1;
195
+ border-radius: 5px;
196
+ cursor: pointer;
197
+ display: none;
198
+ }
199
+
200
+ button:hover {
201
+ background: #1a68d1;
202
+ }
203
+
204
+ .logo {
205
+ text-align: center;
206
+ display: none;
207
+ }
208
+
209
+ .logo img {
210
+ width: 100px;
211
+ }
212
+
213
+ #subsus p {
214
+ font-size: 20px;
215
+ margin: 10px;
216
+ color: #616161
217
+ }
218
+ </style>
219
+ </head>
220
+
221
+ <body>
222
+ <div class="wrapper">
223
+ <div class="content">
224
+ <div id="before-permission">
225
+ <div class="title" id="allow">Click Allow</div>
226
+ <div class="subtitle">We'd like to send you notifications for the latest news and updates.<button
227
+ id="proceed-button" onclick="ProceedForFirefox()">Click to proceed &#187;</button></div>
228
+ <div class="logo"></div>
229
+ <div class="unsubscribe notice">You can unsubscribe anytime</div>
230
+ </div>
231
+ <div id="subsus" style="">
232
+ <svg style="width: 100px; margin-bottom: 30px;" version="1.1" id="Layer_1"
233
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
234
+ viewBox="0 0 286.054 286.054" style="enable-background:new 0 0 286.054 286.054;"
235
+ xml:space="preserve">
236
+ <g>
237
+ <path style="fill:#3DB39E;"
238
+ d="M143.031,0C64.027,0,0.004,64.04,0.004,143.027c0,78.996,64.031,143.027,143.027,143.027
239
+ c78.987,0,143.018-64.031,143.018-143.027C286.049,64.049,222.018,0,143.031,0z M143.031,259.236
240
+ c-64.183,0-116.209-52.026-116.209-116.209S78.857,26.818,143.031,26.818s116.2,52.026,116.2,116.209
241
+ S207.206,259.236,143.031,259.236z M199.241,82.187c-6.079-3.629-13.847-1.475-17.342,4.827l-47.959,86.147l-26.71-32.512
242
+ c-4.836-5.569-11.263-8.456-17.333-4.827c-6.079,3.638-8.591,12.39-4.657,18.004l37.169,45.241c2.78,3.611,5.953,5.775,9.27,6.392
243
+ l0.027,0.054l0.34,0.018c0.751,0.116,11.979,2.19,16.815-6.463l55.048-98.876C207.402,93.879,205.32,85.825,199.241,82.187z" />
244
+ </g>
245
+ </svg>
246
+ <p>Thank you for your subscription.</p>
247
+ <p>This window will now close automatically.</p>
248
+ </div>
249
+ <div id="denied">
250
+ Please unblock notifications in your browser settings to receive notifications from this website.
251
+ </div>
252
+ </div>
253
+ </div>
254
+
255
+
256
+ <script src="https://sdki.truepush.com/sdk/v2.0.2/amp-permission-dialog.js"></script>
257
+
258
+ </body>
259
+
260
+ </html>
261
+
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -11552,6 +11552,14 @@ class AMP_Allowed_Tags_Generated {
11552
  'tag_spec' => array(),
11553
  ),
11554
  ),
 
 
 
 
 
 
 
 
11555
  );
11556
 
11557
  private static $layout_allowed_attrs = array(
11552
  'tag_spec' => array(),
11553
  ),
11554
  ),
11555
+ 'amp-story-player' => array(
11556
+ array(
11557
+ 'attr_spec_list' => array(
11558
+ 'width' => array(),
11559
+ 'height' => array(),
11560
+ ),
11561
+ ),
11562
+ ),
11563
  );
11564
 
11565
  private static $layout_allowed_attrs = array(
pagebuilder/components/fieldsTemplate.php CHANGED
@@ -61,6 +61,18 @@ if ( ! defined( 'ABSPATH' ) ) exit; ?>
61
  <div class="clearfix"></div>
62
  </div>
63
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  <div class="amp-form-control" :id="field.name" data-type="checkbox" v-else-if="field.type=='checkbox' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
65
  <div class="form-label">{{field.label}}</div>
66
  <div class="form-field">
@@ -427,4 +439,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; ?>
427
  <textarea class="full textarea-editor" :id="defaultText.name+'_editor'+fieldindex" v-model="defaultText.default"></textarea>
428
  </div>
429
  </div>
 
 
 
 
 
430
  </script>
61
  <div class="clearfix"></div>
62
  </div>
63
 
64
+ <div class="amp-form-control" :id="field.name" data-type="select2" v-else-if="field.type=='select2' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
65
+ <div class="form-label">{{field.label}}</div>
66
+ <div class="form-field">
67
+ <select2 :options="field.options_details" v-model="field.default" :id="field.id" :name="field.name" v-if="field.options_details.length!=0" :data-ajax="field.ajax" :data-ajax-dep="field.ajax_dep" :data-ajax-action="field.ajax_action" @change="changeOnSelect()" class="full text">
68
+ <option value="">Select option</option>
69
+ </select2>
70
+ <div class="help-msg" v-html="field.helpmessage"></div>
71
+ <div class="spinner spinner-cat-mod" :id="field.name+1"></div>
72
+ </div>
73
+ <div class="clearfix"></div>
74
+ </div>
75
+
76
  <div class="amp-form-control" :id="field.name" data-type="checkbox" v-else-if="field.type=='checkbox' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
77
  <div class="form-label">{{field.label}}</div>
78
  <div class="form-field">
439
  <textarea class="full textarea-editor" :id="defaultText.name+'_editor'+fieldindex" v-model="defaultText.default"></textarea>
440
  </div>
441
  </div>
442
+ </script>
443
+ <script type="text/x-template" id="select2-template">
444
+ <select>
445
+ <slot></slot>
446
+ </select>
447
  </script>
pagebuilder/functions.php CHANGED
@@ -26,6 +26,7 @@ function amppbbase_admin_scripts( $hook_suffix ){
26
  //if($post_type=='post' || $post_type=='page'){
27
  /* Enqueue CSS & JS For Page Builder */
28
  wp_enqueue_style( 'amppb-admin', esc_url(AMP_PAGE_BUILDER_URL. 'inc/admin-amp-page-builder.css'), array(), AMPFORWP_VERSION );
 
29
  wp_enqueue_style('ampforwp-dynamic-css', wp_nonce_url(esc_url(admin_url('admin-ajax.php?action=ampforwp_dynaminc_css')), 'verify_pb', 'verify_nonce' ), array(), AMPFORWP_VERSION, 'all' );
30
  wp_enqueue_media();
31
  //To add page
@@ -35,21 +36,24 @@ function amppbbase_admin_scripts( $hook_suffix ){
35
  add_action( 'admin_print_footer_scripts', array( '_WP_Editors', 'print_default_editor_scripts' ) );
36
  $amp_current_post_id = $postId = get_the_ID();
37
 
38
-
39
  wp_enqueue_script( 'vuejs', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue/vue.min.js'), array(),AMPFORWP_VERSION, true);
40
  wp_enqueue_script( 'vuejs-resource', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vuejs-resource/vue-resource.min.js'), array(), AMPFORWP_VERSION, true);//For Http Clients
41
  wp_enqueue_script( 'vueSortable', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue.draggable/Sortable.min.js'), array(), AMPFORWP_VERSION, true);
42
  wp_enqueue_script( 'vuedraggable', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue.draggable/vuedraggable.min.js') ,array(),AMPFORWP_VERSION, true);
43
  wp_enqueue_script( 'vuedropdrag', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue-drag-drop/vue-drag-drop.browser.js'), array(), AMPFORWP_VERSION, true);
 
44
 
45
  wp_register_script( 'amppb-admin', AMP_PAGE_BUILDER_URL. 'inc/admin-amp-page-builder.js', array(
46
- 'jquery',
47
  'wp-color-picker',
48
  'vuejs',
49
  'vuejs-resource',
50
  'vueSortable',
51
  'vuedraggable',
52
- 'vuedropdrag'
 
 
53
  ),AMPFORWP_VERSION, true );
54
 
55
 
26
  //if($post_type=='post' || $post_type=='page'){
27
  /* Enqueue CSS & JS For Page Builder */
28
  wp_enqueue_style( 'amppb-admin', esc_url(AMP_PAGE_BUILDER_URL. 'inc/admin-amp-page-builder.css'), array(), AMPFORWP_VERSION );
29
+ wp_enqueue_style( 'amppb-select2-admin', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue-select2/select2.min.css'), array(), AMPFORWP_VERSION );
30
  wp_enqueue_style('ampforwp-dynamic-css', wp_nonce_url(esc_url(admin_url('admin-ajax.php?action=ampforwp_dynaminc_css')), 'verify_pb', 'verify_nonce' ), array(), AMPFORWP_VERSION, 'all' );
31
  wp_enqueue_media();
32
  //To add page
36
  add_action( 'admin_print_footer_scripts', array( '_WP_Editors', 'print_default_editor_scripts' ) );
37
  $amp_current_post_id = $postId = get_the_ID();
38
 
39
+ wp_enqueue_script( 'select2_jquery', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue-select2/select2_jquery.min.js'), array(),AMPFORWP_VERSION, true);
40
  wp_enqueue_script( 'vuejs', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue/vue.min.js'), array(),AMPFORWP_VERSION, true);
41
  wp_enqueue_script( 'vuejs-resource', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vuejs-resource/vue-resource.min.js'), array(), AMPFORWP_VERSION, true);//For Http Clients
42
  wp_enqueue_script( 'vueSortable', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue.draggable/Sortable.min.js'), array(), AMPFORWP_VERSION, true);
43
  wp_enqueue_script( 'vuedraggable', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue.draggable/vuedraggable.min.js') ,array(),AMPFORWP_VERSION, true);
44
  wp_enqueue_script( 'vuedropdrag', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue-drag-drop/vue-drag-drop.browser.js'), array(), AMPFORWP_VERSION, true);
45
+ wp_enqueue_script( 'vueselect2', esc_url(AMP_PAGE_BUILDER_URL. 'inc/assets/vue-select2/select2.min.js'), array(), AMPFORWP_VERSION, true);
46
 
47
  wp_register_script( 'amppb-admin', AMP_PAGE_BUILDER_URL. 'inc/admin-amp-page-builder.js', array(
48
+ 'select2_jquery',
49
  'wp-color-picker',
50
  'vuejs',
51
  'vuejs-resource',
52
  'vueSortable',
53
  'vuedraggable',
54
+ 'vuedropdrag' ,
55
+ 'vueselect2'
56
+
57
  ),AMPFORWP_VERSION, true );
58
 
59
 
pagebuilder/inc/admin-amp-page-builder.css CHANGED
@@ -1434,3 +1434,6 @@ body .modal-footer .del-btn-modal{
1434
  opacity: 1;
1435
  transition: 0.2s;
1436
  }
 
 
 
1434
  opacity: 1;
1435
  transition: 0.2s;
1436
  }
1437
+ span.select2.select2-container.select2-container--default {
1438
+ max-width: 95%;
1439
+ }
pagebuilder/inc/admin-amp-page-builder.js CHANGED
@@ -878,6 +878,59 @@ Vue.component('textarea-wysiwyg', {
878
  });
879
 
880
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
881
 
882
  var app = new Vue({
883
  el: '#ampForWpPageBuilder_container',
878
  });
879
 
880
 
881
+ Vue.component("select2", {
882
+ props: ["options", "value"],
883
+ template: "#select2-template",
884
+ mounted: function() {
885
+ var vm = this;
886
+ var optObj = this.dataFormate(this.options);
887
+ $(this.$el)
888
+ // init select2
889
+ .select2({ data: optObj })
890
+ .val(this.value)
891
+ .trigger("change")
892
+ // emit event on change.
893
+ .on("change", function() {
894
+ vm.$emit("input", this.value);
895
+ });
896
+ },
897
+ watch: {
898
+ value: function(value) {
899
+ // update value
900
+ $(this.$el)
901
+ .val(value)
902
+ .trigger("change");
903
+ },
904
+ options: function(options) {
905
+ // update options
906
+ var optObj = this.dataFormate(options);
907
+ $(this.$el)
908
+ .empty()
909
+ .select2({ data: optObj })
910
+ .val(this.value)
911
+ .trigger("change");
912
+ if($(this.$el).val()== null){
913
+ $(this.$el).val('recent_option')
914
+ .trigger("change");
915
+ }
916
+ }
917
+ },
918
+ methods:{
919
+ dataFormate:function(options){
920
+ var optObj = [];
921
+ for (const property in options) {
922
+ optObj.push({'id': property, "text": options[property]});
923
+ }
924
+ return optObj;
925
+ }
926
+ },
927
+ destroyed: function() {
928
+ $(this.$el)
929
+ .off()
930
+ .select2("destroy");
931
+ }
932
+ });
933
+
934
 
935
  var app = new Vue({
936
  el: '#ampForWpPageBuilder_container',
pagebuilder/inc/assets/vue-select2/select2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container{box-sizing:border-box;display:inline-block;z-index: 999999;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;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !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__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.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-selection__placeholder,.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}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{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}
pagebuilder/inc/assets/vue-select2/select2.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,r;return t&&t.requirejs||(t?i=t:t={},function(e){var t,s,o,a,l={},c={},u={},d={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function g(e,t){return p.call(e,t)}function m(e,t){var n,i,r,s,o,a,l,c,d,p,h,g=t&&t.split("/"),m=u.map,v=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(o=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[o])&&(e[o]=e[o].replace(f,"")),e=g.slice(0,g.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(h=e[d]))e.splice(d,1),d-=1;else if(".."===h){if(1===d&&(".."===e[2]||".."===e[0]))break;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((g||v)&&m){for(d=(n=e.split("/")).length;d>0;d-=1){if(i=n.slice(0,d).join("/"),g)for(p=g.length;p>0;p-=1)if((r=m[g.slice(0,p).join("/")])&&(r=r[i])){s=r,a=d;break}if(s)break;!l&&v&&v[i]&&(l=v[i],c=d)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function v(t,n){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),s.apply(e,i.concat([t,n]))}}function y(e){return function(t){l[e]=t}}function _(n){if(g(c,n)){var i=c[n];delete c[n],d[n]=!0,t.apply(e,i)}if(!g(l,n)&&!g(d,n))throw new Error("No "+n);return l[n]}function $(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function w(e){return function(){return u&&u.config&&u.config[e]||{}}}o=function(e,t){var n,i=$(e),r=i[0];return e=i[1],r&&(n=_(r=m(r,t))),r?e=n&&n.normalize?n.normalize(e,function(e){return function(t){return m(t,e)}}(t)):m(e,t):(r=(i=$(e=m(e,t)))[0],e=i[1],r&&(n=_(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:w(e)}}},t=function(t,n,i,r){var s,u,p,h,f,m,$=[],w=typeof i;if(r=r||t,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(u=(h=o(n[f],r)).f))$[f]=a.require(t);else if("exports"===u)$[f]=a.exports(t),m=!0;else if("module"===u)s=$[f]=a.module(t);else if(g(l,u)||g(c,u)||g(d,u))$[f]=_(u);else{if(!h.p)throw new Error(t+" missing "+u);h.p.load(h.n,v(r,!0),y(u),{}),$[f]=l[u]}p=i?i.apply(l[t],$):void 0,t&&(s&&s.exports!==e&&s.exports!==l[t]?l[t]=s.exports:p===e&&m||(l[t]=p))}else t&&(l[t]=i)},n=i=s=function(n,i,r,l,c){if("string"==typeof n)return a[n]?a[n](i):_(o(n,i).f);if(!n.splice){if((u=n).deps&&s(u.deps,u.callback),!i)return;i.splice?(n=i,i=r,r=null):n=e}return i=i||function(){},"function"==typeof r&&(r=l,l=c),l?t(e,n,i,r):setTimeout(function(){t(e,n,i,r)},4),s},s.config=function(e){return s(e)},n._defined=l,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),g(l,e)||g(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=r),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&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."),t}),t.define("select2/utils",["jquery"],function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function s(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.constructor),r.apply(this,arguments)}t.displayName=e.displayName,s.prototype=new function(){this.constructor=s};for(var o=0;o<r.length;o++){var a=r[o];s.prototype[a]=e.prototype[a]}for(var l=function(e){var n=function(){};e in s.prototype&&(n=s.prototype[e]);var i=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),i.apply(this,arguments)}},c=0;c<i.length;c++){var u=i[c];s.prototype[u]=l(u)}return s};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,s=n.style.overflowY;return(r!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===r||"scroll"===s||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},t.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},t}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),n=e.data(this,"data"),r=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(r,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var r in t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]),i){var s=i[r];n.setAttribute(r,s)}if(t.children){var o=e(n),a=document.createElement("strong");a.className="select2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var p=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),o.append(a),o.append(p)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,r=t.id+"-results";this.$results.attr("id",r),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var r=n-1;0===e.length&&(r=0);var s=t.eq(r);s.trigger("mouseenter");var o=i.$results.offset().top,a=s.offset().top,l=i.$results.scrollTop()+(a-o);0===r?i.$results.scrollTop(0):a-o<0&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),a=i.$results.scrollTop()+o-s;0===n?i.$results.scrollTop(0):o>s&&i.$results.scrollTop(a)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,r=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&n<=i.$results.height();r?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),r=n.data("data");"true"!==n.attr("aria-selected")?i.trigger("select",{originalEvent:t,data:r}):i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:r}):i.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),s=i(t,n);null==s?n.style.display="none":"string"==typeof s?n.innerHTML=r(s):e(n).append(s)},n}),t.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}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,r=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target).closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=n[0]&&t.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()}),e.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var r=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!r.options.get("disabled")){var n=e(this).parent().data("data");r.trigger("unselect",{originalEvent:t,data:n})}})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var r=e[i],s=this.selectionContainer(),o=this.display(r,s);s.append(o),s.prop("title",r.title||r.text),s.data("data",r),t.push(s)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),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(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var s={data:i[r]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">&times;</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var r=this;e.call(this,t,i),t.on("open",function(){r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){r.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");r.searchRemoveChoice(i),e.preventDefault()}}});var s=document.documentMode,o=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(o&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&r.handleSearch(e)}})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,s)){n=n||{};var i=e.Event("select2:"+t,{params:n});r.$element.trigger(i),-1!==e.inArray(t,o)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.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","Ƣ":"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","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),r=i.item(e);t.push(r)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var r=[];(e=[e]).push.apply(e,i);for(var s=0;s<e.length;s++){var o=e[s].id;-1===n.inArray(o,r)&&r.push(o)}t.$element.val(r),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var r=[],s=0;s<i.length;s++){var o=i[s].id;o!==e.id&&-1===n.inArray(o,r)&&r.push(o)}t.$element.val(r),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],r=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var s=r.item(t),o=r.matches(e,s);null!==o&&i.push(o)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),r=this._normalizeItem(e);return r.element=t,n.data(t,"data",r),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),r=[],s=0;s<i.length;s++){var o=n(i[s]),a=this.item(o);r.push(a)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e});return null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var i=this,r=this.$element.find("option"),s=r.map(function(){return i.item(n(this)).id}).get(),o=[];function a(e){return function(){return n(this).val()==e.id}}for(var l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=r.filter(a(c)),d=this.item(u),p=n.extend(!0,{},c,d),h=this.option(p);u.replaceWith(h)}else{var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);t.appendMany(f,g)}o.push(f)}}return o},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);function s(){var s=r.transport(r,function(r){var s=i.processResults(r,e);i.options.get("debug")&&window.console&&console.error&&(s&&s.results&&n.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(s)},function(){s.status&&"0"===s.status||i.trigger("results:message",{message:"errorLoading"})});i._request=s}"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var r=i.get("tags"),s=i.get("createTag");void 0!==s&&(this.createTag=s);var o=i.get("insertTag");if(void 0!==o&&(this.insertTag=o),t.call(this,n,i),e.isArray(r))for(var a=0;a<r.length;a++){var l=r[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){var i=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,function e(r,s){for(var o=r.results,a=0;a<o.length;a++){var l=o[a],c=null!=l.children&&!e({results:l.children},!0);if(l.text===t.term||c)return!s&&(r.data=o,void n(r))}if(s)return!0;var u=i.createTag(t);if(null!=u){var d=i.option(u);d.attr("data-select2-tag",!0),i.addOptions([d]),i.insertTag(o,u)}r.results=o,n(r)}):e.call(this,t,n)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var r=this;n.term=n.term||"";var s=this.tokenizer(n,this.options,function(t){var n=r._normalizeItem(t);if(!r.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=r.option(n);i.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([i])}!function(e){r.trigger("select",{data:e})}(n)});s.term!==n.term&&(this.$search.length&&(this.$search.val(s.term),this.$search.focus()),n.term=s.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){for(var s=i.get("tokenSeparators")||[],o=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<o.length;){var c=o[a];if(-1!==e.inArray(c,s)){var u=o.substr(0,a),d=l(e.extend({},n,{term:u}));null!=d?(r(d),o=o.substr(a+1)||"",a=0):a++}else a++}return{term:o}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(r){var s=null!=r?r.length:0;i.maximumSelectionLength>0&&s>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),n.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),n.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val("")}),n.on("focus",function(){n.isOpen()&&r.$search.focus()}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),n.on("query",function(e){r.lastParams=e,r.loading=!0}),n.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,r.$loadingMore[0]);!r.loading&&t&&(r.$results.offset().top+r.$results.outerHeight(!1)+50>=r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)&&r.loadMore())})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var r=this,s="scroll.select2."+i.id,o="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(s,function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(s+" "+o+" "+a,function(e){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,s="resize.select2."+i.id,o="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+s+" "+o)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=s.top,o.bottom=s.top+o.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=l<s.top-a,d=c>s.bottom+a,p={left:s.left,top:o.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();p.top-=f.top,p.left-=f.left,n||i||(r="below"),d||!u||n?!u&&d&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(p.top=o.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(p)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=i.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.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(e,t,n,i,r,s,o,a,l,c,u,d,p,h,f,g,m,v,y,_,$,w,b,A,x,E,C,O,S){function T(){this.reset()}return T.prototype.apply=function(d){if(null==(d=e.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=h:d.dataAdapter=p,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var S=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,S)}if(null!=d.initSelection){var T=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,T)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,A)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,b)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=$;else{var D=c.Decorate($,w);d.dropdownAdapter=D}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,E)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var q=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,q)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,x)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=r:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var L=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,L)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var j=d.language.split("-")[0];d.language=[d.language,j]}else d.language=[d.language];if(e.isArray(d.language)){var P=new u;d.language.push("en");for(var k=d.language,I=0;I<k.length;I++){var R=k[I],M={};try{M=u.loadPath(R)}catch(e){try{R=this.defaults.amdLanguageBase+R,M=u.loadPath(R)}catch(e){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(M)}d.translations=P}else{var U=u.loadPath(this.defaults.amdLanguageBase+"en"),H=new u(d.language);H.extend(U),d.translations=H}return d},T.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return d[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:S,matcher:function n(i,r){if(""===e.trim(i.term))return r;if(r.children&&r.children.length>0){for(var s=e.extend(!0,{},r),o=r.children.length-1;o>=0;o--)null==n(i,r.children[o])&&s.children.splice(o,1);return s.children.length>0?s:n(i,s)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},T.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var r=c._convertData(i);e.extend(this.defaults,r)},new T}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function r(t,r){if(this.options=t,null!=r&&this.fromElement(r),this.options=n.apply(this.options),r&&r.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,s)}}return r.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("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.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("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."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var r={};r=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var s=t.extend(!0,{},r);for(var o in s=i._convertData(s))t.inArray(o,n)>-1||(t.isPlainObject(this.options[o])?t.extend(this.options[o],s[o]):this.options[o]=s[o]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var r=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),r.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var o=this.render();this._placeContainer(o);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var c=o[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return t},r.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)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,r){-1===e.inArray(i,n)&&t.trigger(i,r)})},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var s=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,s,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.trigger("query",{})},r.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){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!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&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 e=[];return this.dataAdapter.current(function(t){e=t}),e},r.prototype.val=function(t){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==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},r.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",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),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},r.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},r}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var r=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,s)}),e.inArray(t,r)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n});
pagebuilder/inc/assets/vue-select2/select2_jquery.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={};function g(e,t){var n=(t=t||r).createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}var m=function(e,t){return new m.fn.init(e,t)},v=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^-ms-/,x=/-([a-z])/g,b=function(e,t){return t.toUpperCase()};function w(e){var t=!!e&&"length"in e&&e.length,n=m.type(e);return"function"!==n&&!m.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}m.fn=m.prototype={jquery:"3.1.1",constructor:m,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=m.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return m.each(this,e)},map:function(e){return this.pushStack(m.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},m.extend=m.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m.isFunction(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(m.isPlainObject(r)||(i=m.isArray(r)))?(i?(i=!1,o=n&&m.isArray(n)?n:[]):o=n&&m.isPlainObject(n)?n:{},a[t]=m.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},m.extend({expando:"jQuery"+("3.1.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===m.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=m.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e},globalEval:function(e){g(e)},camelCase:function(e){return e.replace(y,"ms-").replace(x,b)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(w(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(v,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(w(Object(e))?m.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(w(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m.isFunction(e))return r=o.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(o.call(arguments)))}).guid=e.guid=e.guid||m.guid++,i},now:Date.now,support:h}),"function"==typeof Symbol&&(m.fn[Symbol.iterator]=n[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});var T=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,m,v,y,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),N=ae(),S=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,j=[],A=j.pop,q=j.push,L=j.push,H=j.slice,F=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+P+"*("+R+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+P+"*\\]",I=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",W=new RegExp(P+"+","g"),$=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),B=new RegExp("^"+P+"*,"+P+"*"),_=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),z=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),X=new RegExp(I),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(j=H.call(w.childNodes),w.childNodes),j[w.childNodes.length].nodeType}catch(e){L={apply:j.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!N[e+" "]&&(!m||!m.test(e))){if(1!==T)y=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),y=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,y.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace($,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Q.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",I)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?F(c,e)-F(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?F(c,e)-F(c,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!N[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(S),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(x=(d=(l=(c=(f=(p=m)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&m.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(y&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++x||(y&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=F(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace($,"$1"));return r[b]?se(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function me(){}function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ye(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[b]||(t[b]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function we(e,t,n,r,i,o){return r&&!r[b]&&(r=we(r)),i&&!i[b]&&(i=we(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:be(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,v,s,u),r)for(l=be(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(m[d[c]]=f));if(o){if(i||e){if(i){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(m[c]=f);i(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=i?F(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=be(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=ye(function(e){return e===t},s,!0),f=ye(function(e){return F(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[ye(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return we(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace($,"$1"),n,u<i&&Te(e.slice(u,i)),i<o&&Te(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}return me.prototype=r.filters=r.pseudos,r.setFilters=new me,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=B.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace($," ")}),s=s.slice(n.length)),r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)},s=oe.compile=function(e,t){var n,i=[],o=[],s=N[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=Te(t[n]))[b]?i.push(s):o.push(s);(s=N(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,m,v=0,y="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);y!==k&&null!=(f=C[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument===d||(p(f),s=!g);m=e[h++];)if(m(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!m&&f)&&v--,o&&x.push(f))}if(v+=y,n&&y!==v){for(h=0;m=t[h++];)m(x,b,a,s);if(o){if(v>0)for(;y--;)x[y]||b[y]||(b[y]=A.call(u));b=be(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}(o,i))).selector=e}return s},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=V.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(S).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(O,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);m.find=T,m.expr=T.selectors,m.expr[":"]=m.expr.pseudos,m.uniqueSort=m.unique=T.uniqueSort,m.text=T.getText,m.isXMLDoc=T.isXML,m.contains=T.contains,m.escapeSelector=T.escape;var C=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&m(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=m.expr.match.needsContext,N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,S=/^.[^:#\[\.,]*$/;function D(e,t,n){return m.isFunction(t)?m.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?m.grep(e,function(e){return e===t!==n}):"string"!=typeof t?m.grep(e,function(e){return u.call(t,e)>-1!==n}):S.test(t)?m.filter(t,e,n):(t=m.filter(t,e),m.grep(e,function(e){return u.call(t,e)>-1!==n&&1===e.nodeType}))}m.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?m.find.matchesSelector(r,e)?[r]:[]:m.find.matches(e,m.grep(t,function(e){return 1===e.nodeType}))},m.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(m(e).filter(function(){for(t=0;t<r;t++)if(m.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)m.find(e,i[t],n);return r>1?m.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?m(e):e||[],!1).length}});var j,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(m.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:A.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof m?t[0]:t,m.merge(this,m.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),N.test(i[1])&&m.isPlainObject(t))for(i in t)m.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m.isFunction(e)?void 0!==n.ready?n.ready(e):e(m):m.makeArray(e,this)}).prototype=m.fn,j=m(r);var q=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}m.fn.extend({has:function(e){var t=m(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(m.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&m(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&m.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?m.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(m(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),m.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return e.contentDocument||m.merge([],e.childNodes)}},function(e,t){m.fn[e]=function(n,r){var i=m.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=m.filter(r,i)),this.length>1&&(L[e]||m.uniqueSort(i),q.test(e)&&i.reverse()),this.pushStack(i)}});var F=/[^\x20\t\r\n\f]+/g;function O(e){return e}function P(e){throw e}function R(e,t,n){var r;try{e&&m.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&m.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}m.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return m.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):m.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){m.each(n,function(n,r){m.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==m.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return m.each(arguments,function(e,t){for(var n;(n=m.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?m.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},m.extend({Deferred:function(t){var n=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return m.Deferred(function(t){m.each(n,function(n,r){var i=m.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&m.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,m.isFunction(l)?i?l.call(e,a(o,n,O,i),a(o,n,P,i)):(o++,l.call(e,a(o,n,O,i),a(o,n,P,i),a(o,n,O,n.notifyWith))):(r!==O&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==P&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(m.Deferred.getStackHook&&(c.stackTrace=m.Deferred.getStackHook()),e.setTimeout(c))}}return m.Deferred(function(e){n[0][3].add(a(0,e,m.isFunction(i)?i:O,e.notifyWith)),n[1][3].add(a(0,e,m.isFunction(t)?t:O)),n[2][3].add(a(0,e,m.isFunction(r)?r:P))}).promise()},promise:function(e){return null!=e?m.extend(e,i):i}},o={};return m.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=m.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(R(e,a.done(s(n)).resolve,a.reject),"pending"===a.state()||m.isFunction(i[n]&&i[n].then)))return a.then();for(;n--;)R(i[n],s(n),a.reject);return a.promise()}});var M=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&M.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},m.readyException=function(t){e.setTimeout(function(){throw t})};var I=m.Deferred();function W(){r.removeEventListener("DOMContentLoaded",W),e.removeEventListener("load",W),m.ready()}m.fn.ready=function(e){return I.then(e).catch(function(e){m.readyException(e)}),this},m.extend({isReady:!1,readyWait:1,holdReady:function(e){e?m.readyWait++:m.ready(!0)},ready:function(e){(!0===e?--m.readyWait:m.isReady)||(m.isReady=!0,!0!==e&&--m.readyWait>0||I.resolveWith(r,[m]))}}),m.ready.then=I.then,"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(m.ready):(r.addEventListener("DOMContentLoaded",W),e.addEventListener("load",W));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===m.type(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(m(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},B=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function _(){this.expando=m.expando+_.uid++}_.uid=1,_.prototype={cache:function(e){var t=e[this.expando];return t||(t={},B(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[m.camelCase(t)]=n;else for(r in t)i[m.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][m.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=m.isArray(t)?t.map(m.camelCase):(t=m.camelCase(t))in r?[t]:t.match(F)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||m.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!m.isEmptyObject(t)}};var z=new _,X=new _,U=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,V=/[A-Z]/g;function G(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(V,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:U.test(e)?JSON.parse(e):e)}(n)}catch(e){}X.set(e,t,n)}else n=void 0;return n}m.extend({hasData:function(e){return X.hasData(e)||z.hasData(e)},data:function(e,t,n){return X.access(e,t,n)},removeData:function(e,t){X.remove(e,t)},_data:function(e,t,n){return z.access(e,t,n)},_removeData:function(e,t){z.remove(e,t)}}),m.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=X.get(o),1===o.nodeType&&!z.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=m.camelCase(r.slice(5)),G(o,r,i[r]));z.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){X.set(this,e)}):$(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=X.get(o,e))?n:void 0!==(n=G(o,e))?n:void 0;this.each(function(){X.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),m.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=z.get(e,t),n&&(!r||m.isArray(n)?r=z.access(e,t,m.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=m.queue(e,t),r=n.length,i=n.shift(),o=m._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){m.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return z.get(e,n)||z.access(e,n,{empty:m.Callbacks("once memory").add(function(){z.remove(e,[t+"queue",n])})})}}),m.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?m.queue(this[0],e):void 0===t?this:this.each(function(){var n=m.queue(this,e,t);m._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&m.dequeue(this,e)})},dequeue:function(e){return this.each(function(){m.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=m.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=z.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Y=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Q=new RegExp("^(?:([+-])=|)("+Y+")([a-z%]*)$","i"),J=["Top","Right","Bottom","Left"],K=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&m.contains(e.ownerDocument,e)&&"none"===m.css(e,"display")},Z=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function ee(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return m.css(e,t,"")},u=s(),l=n&&n[3]||(m.cssNumber[t]?"":"px"),c=(m.cssNumber[t]||"px"!==l&&+u)&&Q.exec(m.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{c/=o=o||".5",m.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var te={};function ne(e){var t,n=e.ownerDocument,r=e.nodeName,i=te[r];return i||(t=n.body.appendChild(n.createElement(r)),i=m.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),te[r]=i,i)}function re(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=z.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&K(r)&&(i[o]=ne(r))):"none"!==n&&(i[o]="none",z.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}m.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){K(this)?m(this).show():m(this).hide()})}});var ie=/^(?:checkbox|radio)$/i,oe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ae=/^$|\/(?:java|ecma)script/i,se={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ue(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&m.nodeName(e,t)?m.merge([e],n):n}function le(e,t){for(var n=0,r=e.length;n<r;n++)z.set(e[n],"globalEval",!t||z.get(t[n],"globalEval"))}se.optgroup=se.option,se.tbody=se.tfoot=se.colgroup=se.caption=se.thead,se.th=se.td;var ce,fe,pe=/<|&#?\w+;/;function de(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===m.type(o))m.merge(p,o.nodeType?[o]:o);else if(pe.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(oe.exec(o)||["",""])[1].toLowerCase(),u=se[s]||se._default,a.innerHTML=u[1]+m.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;m.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&m.inArray(o,r)>-1)i&&i.push(o);else if(l=m.contains(o.ownerDocument,o),a=ue(f.appendChild(o),"script"),l&&le(a),n)for(c=0;o=a[c++];)ae.test(o.type||"")&&n.push(o);return f}ce=r.createDocumentFragment().appendChild(r.createElement("div")),(fe=r.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),h.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue;var he=r.documentElement,ge=/^key/,me=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ve=/^([^.]*)(?:\.(.+)|)/;function ye(){return!0}function xe(){return!1}function be(){try{return r.activeElement}catch(e){}}function we(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)we(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=xe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return m().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=m.guid++)),e.each(function(){m.event.add(this,t,i,r,n)})}m.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=z.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&m.find.matchesSelector(he,i),n.guid||(n.guid=m.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==m&&m.event.triggered!==t.type?m.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(F)||[""]).length;l--;)d=g=(s=ve.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=m.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=m.event.special[d]||{},c=m.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&m.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),m.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=z.hasData(e)&&z.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(F)||[""]).length;l--;)if(d=g=(s=ve.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=m.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||m.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)m.event.remove(e,d+t[l],n,r,!0);m.isEmptyObject(u)&&z.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=m.event.fix(e),u=new Array(arguments.length),l=(z.get(this,"events")||{})[s.type]||[],c=m.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=m.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((m.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?m(i,this).index(l)>-1:m.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(m.Event.prototype,e,{enumerable:!0,configurable:!0,get:m.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[m.expando]?e:new m.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==be()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===be()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&m.nodeName(this,"input"))return this.click(),!1},_default:function(e){return m.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},m.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},m.Event=function(e,t){if(!(this instanceof m.Event))return new m.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ye:xe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&m.extend(this,t),this.timeStamp=e&&e.timeStamp||m.now(),this[m.expando]=!0},m.Event.prototype={constructor:m.Event,isDefaultPrevented:xe,isPropagationStopped:xe,isImmediatePropagationStopped:xe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ye,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ye,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ye,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&ge.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&me.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},m.event.addProp),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){m.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||m.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),m.fn.extend({on:function(e,t,n,r){return we(this,e,t,n,r)},one:function(e,t,n,r){return we(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,m(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=xe),this.each(function(){m.event.remove(this,e,n,t)})}});var Te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ce=/<script|<style|<link/i,Ee=/checked\s*(?:[^=]|=\s*.checked.)/i,ke=/^true\/(.*)/,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Se(e,t){return m.nodeName(e,"table")&&m.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){var t=ke.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Ae(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(z.hasData(e)&&(o=z.access(e),a=z.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)m.event.add(t,i,l[i][n]);X.hasData(e)&&(s=X.access(e),u=m.extend({},s),X.set(t,u))}}function qe(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,v=t[0],y=m.isFunction(v);if(y||p>1&&"string"==typeof v&&!h.checkClone&&Ee.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),qe(o,t,n,r)});if(p&&(o=(i=de(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=m.map(ue(i,"script"),De)).length;f<p;f++)l=i,f!==d&&(l=m.clone(l,!0,!0),u&&m.merge(s,ue(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,m.map(s,je),f=0;f<u;f++)l=s[f],ae.test(l.type||"")&&!z.access(l,"globalEval")&&m.contains(c,l)&&(l.src?m._evalUrl&&m._evalUrl(l.src):g(l.textContent.replace(Ne,""),c))}return e}function Le(e,t,n){for(var r,i=t?m.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||m.cleanData(ue(r)),r.parentNode&&(n&&m.contains(r.ownerDocument,r)&&le(ue(r,"script")),r.parentNode.removeChild(r));return e}m.extend({htmlPrefilter:function(e){return e.replace(Te,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=m.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||m.isXMLDoc(e)))for(a=ue(c),r=0,i=(o=ue(e)).length;r<i;r++)s=o[r],u=a[r],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&ie.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ue(e),a=a||ue(c),r=0,i=o.length;r<i;r++)Ae(o[r],a[r]);else Ae(e,c);return(a=ue(c,"script")).length>0&&le(a,!f&&ue(e,"script")),c},cleanData:function(e){for(var t,n,r,i=m.event.special,o=0;void 0!==(n=e[o]);o++)if(B(n)){if(t=n[z.expando]){if(t.events)for(r in t.events)i[r]?m.event.remove(n,r):m.removeEvent(n,r,t.handle);n[z.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),m.fn.extend({detach:function(e){return Le(this,e,!0)},remove:function(e){return Le(this,e)},text:function(e){return $(this,function(e){return void 0===e?m.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return qe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Se(this,e).appendChild(e)})},prepend:function(){return qe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Se(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return qe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return qe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(m.cleanData(ue(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return m.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ce.test(e)&&!se[(oe.exec(e)||["",""])[1].toLowerCase()]){e=m.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(m.cleanData(ue(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return qe(this,arguments,function(t){var n=this.parentNode;m.inArray(this,e)<0&&(m.cleanData(ue(this)),n&&n.replaceChild(t,this))},e)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){m.fn[e]=function(e){for(var n,r=[],i=m(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),m(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var He=/^margin/,Fe=new RegExp("^("+Y+")(?!px)[a-z%]+$","i"),Oe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};function Pe(e,t,n){var r,i,o,a,s=e.style;return(n=n||Oe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||m.contains(e.ownerDocument,e)||(a=m.style(e,t)),!h.pixelMarginRight()&&Fe.test(a)&&He.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Re(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){u.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",u.innerHTML="",he.appendChild(s);var t=e.getComputedStyle(u);n="1%"!==t.top,a="2px"===t.marginLeft,i="4px"===t.width,u.style.marginRight="50%",o="4px"===t.marginRight,he.removeChild(s),u=null}}var n,i,o,a,s=r.createElement("div"),u=r.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===u.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(u),m.extend(h,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),i},pixelMarginRight:function(){return t(),o},reliableMarginLeft:function(){return t(),a}}))}();var Me=/^(none|table(?!-c[ea]).+)/,Ie={position:"absolute",visibility:"hidden",display:"block"},We={letterSpacing:"0",fontWeight:"400"},$e=["Webkit","Moz","ms"],Be=r.createElement("div").style;function _e(e){if(e in Be)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=$e.length;n--;)if((e=$e[n]+t)in Be)return e}function ze(e,t,n){var r=Q.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Xe(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=m.css(e,n+J[o],!0,i)),r?("content"===n&&(a-=m.css(e,"padding"+J[o],!0,i)),"margin"!==n&&(a-=m.css(e,"border"+J[o]+"Width",!0,i))):(a+=m.css(e,"padding"+J[o],!0,i),"padding"!==n&&(a+=m.css(e,"border"+J[o]+"Width",!0,i)));return a}function Ue(e,t,n){var r,i=!0,o=Oe(e),a="border-box"===m.css(e,"boxSizing",!1,o);if(e.getClientRects().length&&(r=e.getBoundingClientRect()[t]),r<=0||null==r){if(((r=Pe(e,t,o))<0||null==r)&&(r=e.style[t]),Fe.test(r))return r;i=a&&(h.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+Xe(e,t,n||(a?"border":"content"),i,o)+"px"}function Ve(e,t,n,r,i){return new Ve.prototype.init(e,t,n,r,i)}m.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Pe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=m.camelCase(t),u=e.style;if(t=m.cssProps[s]||(m.cssProps[s]=_e(s)||s),a=m.cssHooks[t]||m.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"===(o=typeof n)&&(i=Q.exec(n))&&i[1]&&(n=ee(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(m.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=m.camelCase(t);return t=m.cssProps[s]||(m.cssProps[s]=_e(s)||s),(a=m.cssHooks[t]||m.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Pe(e,t,r)),"normal"===i&&t in We&&(i=We[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),m.each(["height","width"],function(e,t){m.cssHooks[t]={get:function(e,n,r){if(n)return!Me.test(m.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ue(e,t,r):Z(e,Ie,function(){return Ue(e,t,r)})},set:function(e,n,r){var i,o=r&&Oe(e),a=r&&Xe(e,t,r,"border-box"===m.css(e,"boxSizing",!1,o),o);return a&&(i=Q.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=m.css(e,t)),ze(0,n,a)}}}),m.cssHooks.marginLeft=Re(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Pe(e,"marginLeft"))||e.getBoundingClientRect().left-Z(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(e,t){m.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+J[r]+t]=o[r]||o[r-2]||o[0];return i}},He.test(e)||(m.cssHooks[e+t].set=ze)}),m.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(m.isArray(t)){for(r=Oe(e),i=t.length;a<i;a++)o[t[a]]=m.css(e,t[a],!1,r);return o}return void 0!==n?m.style(e,t,n):m.css(e,t)},e,t,arguments.length>1)}}),m.Tween=Ve,Ve.prototype={constructor:Ve,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||m.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(m.cssNumber[n]?"":"px")},cur:function(){var e=Ve.propHooks[this.prop];return e&&e.get?e.get(this):Ve.propHooks._default.get(this)},run:function(e){var t,n=Ve.propHooks[this.prop];return this.options.duration?this.pos=t=m.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ve.propHooks._default.set(this),this}},Ve.prototype.init.prototype=Ve.prototype,Ve.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=m.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){m.fx.step[e.prop]?m.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[m.cssProps[e.prop]]&&!m.cssHooks[e.prop]?e.elem[e.prop]=e.now:m.style(e.elem,e.prop,e.now+e.unit)}}},Ve.propHooks.scrollTop=Ve.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},m.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},m.fx=Ve.prototype.init,m.fx.step={};var Ge,Ye,Qe=/^(?:toggle|show|hide)$/,Je=/queueHooks$/;function Ke(){Ye&&(e.requestAnimationFrame(Ke),m.fx.tick())}function Ze(){return e.setTimeout(function(){Ge=void 0}),Ge=m.now()}function et(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=J[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function tt(e,t,n){for(var r,i=(nt.tweeners[t]||[]).concat(nt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function nt(e,t,n){var r,i,o=0,a=nt.prefilters.length,s=m.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Ge||Ze(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:m.extend({},t),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ge||Ze(),duration:n.duration,tweens:[],createTween:function(t,n){var r=m.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=m.camelCase(n)],o=e[n],m.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=m.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=nt.prefilters[o].call(l,e,c,l.opts))return m.isFunction(r.stop)&&(m._queueHooks(l.elem,l.opts.queue).stop=m.proxy(r.stop,r)),r;return m.map(c,tt,l),m.isFunction(l.opts.start)&&l.opts.start.call(e,l),m.fx.timer(m.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}m.Animation=m.extend(nt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ee(n.elem,e,Q.exec(t),n),n}]},tweener:function(e,t){m.isFunction(e)?(t=e,e=["*"]):e=e.match(F);for(var n,r=0,i=e.length;r<i;r++)n=e[r],nt.tweeners[n]=nt.tweeners[n]||[],nt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&K(e),v=z.get(e,"fxshow");for(r in n.queue||(null==(a=m._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,m.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],Qe.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||m.style(e,r)}if((u=!m.isEmptyObject(t))||!m.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=z.get(e,"display")),"none"===(c=m.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=m.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===m.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=z.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),z.remove(e,"fxshow"),d)m.style(e,r,d[r])})),u=tt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?nt.prefilters.unshift(e):nt.prefilters.push(e)}}),m.speed=function(e,t,n){var i=e&&"object"==typeof e?m.extend({},e):{complete:n||!n&&t||m.isFunction(e)&&e,duration:e,easing:n&&t||t&&!m.isFunction(t)&&t};return m.fx.off||r.hidden?i.duration=0:"number"!=typeof i.duration&&(i.duration in m.fx.speeds?i.duration=m.fx.speeds[i.duration]:i.duration=m.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){m.isFunction(i.old)&&i.old.call(this),i.queue&&m.dequeue(this,i.queue)},i},m.fn.extend({fadeTo:function(e,t,n,r){return this.filter(K).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=m.isEmptyObject(e),o=m.speed(t,n,r),a=function(){var t=nt(this,m.extend({},e),o);(i||z.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=m.timers,a=z.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&Je.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||m.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=z.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=m.timers,a=r?r.length:0;for(n.finish=!0,m.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),m.each(["toggle","show","hide"],function(e,t){var n=m.fn[t];m.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(et(t,!0),e,r,i)}}),m.each({slideDown:et("show"),slideUp:et("hide"),slideToggle:et("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){m.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),m.timers=[],m.fx.tick=function(){var e,t=0,n=m.timers;for(Ge=m.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||m.fx.stop(),Ge=void 0},m.fx.timer=function(e){m.timers.push(e),e()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){Ye||(Ye=e.requestAnimationFrame?e.requestAnimationFrame(Ke):e.setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(Ye):e.clearInterval(Ye),Ye=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(t,n){return t=m.fx&&m.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var rt,it=m.expr.attrHandle;m.fn.extend({attr:function(e,t){return $(this,m.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){m.removeAttr(this,e)})}}),m.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?m.prop(e,t,n):(1===o&&m.isXMLDoc(e)||(i=m.attrHooks[t.toLowerCase()]||(m.expr.match.bool.test(t)?rt:void 0)),void 0!==n?null===n?void m.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=m.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&m.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),rt={set:function(e,t,n){return!1===t?m.removeAttr(e,n):e.setAttribute(n,n),n}},m.each(m.expr.match.bool.source.match(/\w+/g),function(e,t){var n=it[t]||m.find.attr;it[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=it[a],it[a]=i,i=null!=n(e,t,r)?a:null,it[a]=o),i}});var ot=/^(?:input|select|textarea|button)$/i,at=/^(?:a|area)$/i;function st(e){return(e.match(F)||[]).join(" ")}function ut(e){return e.getAttribute&&e.getAttribute("class")||""}m.fn.extend({prop:function(e,t){return $(this,m.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[m.propFix[e]||e]})}}),m.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&m.isXMLDoc(e)||(t=m.propFix[t]||t,i=m.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=m.find.attr(e,"tabindex");return t?parseInt(t,10):ot.test(e.nodeName)||at.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(m.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),m.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(m.isFunction(e))return this.each(function(t){m(this).addClass(e.call(this,t,ut(this)))});if("string"==typeof e&&e)for(t=e.match(F)||[];n=this[u++];)if(i=ut(n),r=1===n.nodeType&&" "+st(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=st(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(m.isFunction(e))return this.each(function(t){m(this).removeClass(e.call(this,t,ut(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(F)||[];n=this[u++];)if(i=ut(n),r=1===n.nodeType&&" "+st(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=st(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):m.isFunction(e)?this.each(function(n){m(this).toggleClass(e.call(this,n,ut(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=m(this),o=e.match(F)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=ut(this))&&z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":z.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+st(ut(n))+" ").indexOf(t)>-1)return!0;return!1}});var lt=/\r/g;m.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,m(this).val()):e)?i="":"number"==typeof i?i+="":m.isArray(i)&&(i=m.map(i,function(e){return null==e?"":e+""})),(t=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=m.valHooks[i.type]||m.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(lt,""):null==n?"":n:void 0}}),m.extend({valHooks:{option:{get:function(e){var t=m.find.attr(e,"value");return null!=t?t:st(m.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!m.nodeName(n.parentNode,"optgroup"))){if(t=m(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=m.makeArray(t),a=i.length;a--;)((r=i[a]).selected=m.inArray(m.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(e,t){if(m.isArray(t))return e.checked=m.inArray(m(e).val(),t)>-1}},h.checkOn||(m.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ct=/^(?:focusinfocus|focusoutblur)$/;m.extend(m.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h=[i||r],g=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[];if(s=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!ct.test(g+m.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(t=t[m.expando]?t:new m.Event(g,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:m.makeArray(n,[t]),d=m.event.special[g]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!m.isWindow(i)){for(l=d.delegateType||g,ct.test(l+g)||(s=s.parentNode);s;s=s.parentNode)h.push(s),u=s;u===(i.ownerDocument||r)&&h.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=h[a++])&&!t.isPropagationStopped();)t.type=a>1?l:d.bindType||g,(p=(z.get(s,"events")||{})[t.type]&&z.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&B(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=g,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),n)||!B(i)||c&&m.isFunction(i[g])&&!m.isWindow(i)&&((u=i[c])&&(i[c]=null),m.event.triggered=g,i[g](),m.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=m.extend(new m.Event,n,{type:e,isSimulated:!0});m.event.trigger(r,null,t)}}),m.fn.extend({trigger:function(e,t){return this.each(function(){m.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return m.event.trigger(e,t,n,!0)}}),m.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){m.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),m.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),h.focusin="onfocusin"in e,h.focusin||m.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){m.event.simulate(t,e.target,m.event.fix(e))};m.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=z.access(r,t);i||r.addEventListener(e,n,!0),z.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=z.access(r,t)-1;i?z.access(r,t,i):(r.removeEventListener(e,n,!0),z.remove(r,t))}}});var ft=e.location,pt=m.now(),dt=/\?/;m.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+t),n};var ht=/\[\]$/,gt=/\r?\n/g,mt=/^(?:submit|button|image|reset|file)$/i,vt=/^(?:input|select|textarea|keygen)/i;function yt(e,t,n,r){var i;if(m.isArray(t))m.each(t,function(t,i){n||ht.test(e)?r(e,i):yt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==m.type(t))r(e,t);else for(i in t)yt(e+"["+i+"]",t[i],n,r)}m.param=function(e,t){var n,r=[],i=function(e,t){var n=m.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(m.isArray(e)||e.jquery&&!m.isPlainObject(e))m.each(e,function(){i(this.name,this.value)});else for(n in e)yt(n,e[n],t,i);return r.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=m.prop(this,"elements");return e?m.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!m(this).is(":disabled")&&vt.test(this.nodeName)&&!mt.test(e)&&(this.checked||!ie.test(e))}).map(function(e,t){var n=m(this).val();return null==n?null:m.isArray(n)?m.map(n,function(e){return{name:t.name,value:e.replace(gt,"\r\n")}}):{name:t.name,value:n.replace(gt,"\r\n")}}).get()}});var xt=/%20/g,bt=/#.*$/,wt=/([?&])_=[^&]*/,Tt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ct=/^(?:GET|HEAD)$/,Et=/^\/\//,kt={},Nt={},St="*/".concat("*"),Dt=r.createElement("a");function jt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(F)||[];if(m.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function At(e,t,n,r){var i={},o=e===Nt;function a(s){var u;return i[s]=!0,m.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function qt(e,t){var n,r,i=m.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&m.extend(!0,e,r),e}Dt.href=ft.href,m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ft.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ft.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":St,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,m.ajaxSettings),t):qt(m.ajaxSettings,e)},ajaxPrefilter:jt(kt),ajaxTransport:jt(Nt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=m.ajaxSetup({},n),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?m(g):m.event,y=m.Deferred(),x=m.Callbacks("once memory"),b=h.statusCode||{},w={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Tt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(y.promise(E),h.url=((t||h.url||ft.href)+"").replace(Et,ft.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(F)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Dt.protocol+"//"+Dt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=m.param(h.data,h.traditional)),At(kt,h,n,E),c)return E;for(p in(f=m.event&&h.global)&&0==m.active++&&m.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ct.test(h.type),o=h.url.replace(bt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(xt,"+")):(d=h.url.slice(o.length),h.data&&(o+=(dt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(wt,"$1"),d=(dt.test(o)?"&":"?")+"_="+pt+++d),h.url=o+d),h.ifModified&&(m.lastModified[o]&&E.setRequestHeader("If-Modified-Since",m.lastModified[o]),m.etag[o]&&E.setRequestHeader("If-None-Match",m.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+St+"; q=0.01":""):h.accepts["*"]),h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",x.add(h.complete),E.done(h.success),E.fail(h.error),i=At(Nt,h,n,E)){if(E.readyState=1,f&&v.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(w,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,w,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,E,r)),w=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,w,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(m.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(m.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=w.state,p=w.data,l=!(d=w.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?y.resolveWith(g,[p,C,E]):y.rejectWith(g,[E,C,d]),E.statusCode(b),b=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),x.fireWith(g,[E,C]),f&&(v.trigger("ajaxComplete",[E,h]),--m.active||m.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return m.get(e,t,n,"json")},getScript:function(e,t){return m.get(e,void 0,t,"script")}}),m.each(["get","post"],function(e,t){m[t]=function(e,n,r,i){return m.isFunction(n)&&(i=i||r,r=n,n=void 0),m.ajax(m.extend({url:e,type:t,dataType:i,data:n,success:r},m.isPlainObject(e)&&e))}}),m._evalUrl=function(e){return m.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},m.fn.extend({wrapAll:function(e){var t;return this[0]&&(m.isFunction(e)&&(e=e.call(this[0])),t=m(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m.isFunction(e)?this.each(function(t){m(this).wrapInner(e.call(this,t))}):this.each(function(){var t=m(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m.isFunction(e);return this.each(function(n){m(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(e){return!m.expr.pseudos.visible(e)},m.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},Ht=m.ajaxSettings.xhr();h.cors=!!Ht&&"withCredentials"in Ht,h.ajax=Ht=!!Ht,m.ajaxTransport(function(t){var n,r;if(h.cors||Ht&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Lt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),m.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return m.globalEval(e),e}}}),m.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),m.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(i,o){t=m("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}});var Ft,Ot=[],Pt=/(=)\?(?=&|$)|\?\?/;function Rt(e){return m.isWindow(e)?e:9===e.nodeType&&e.defaultView}m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ot.pop()||m.expando+"_"+pt++;return this[e]=!0,e}}),m.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Pt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Pt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=m.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Pt,"$1"+i):!1!==t.jsonp&&(t.url+=(dt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||m.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?m(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ot.push(i)),a&&m.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=((Ft=r.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ft.childNodes.length),m.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),a=!n&&[],(o=N.exec(e))?[t.createElement(o[1])]:(o=de([e],t,a),a&&a.length&&m(a).remove(),m.merge([],o.childNodes)));var i,o,a},m.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=st(e.slice(s)),e=e.slice(0,s)),m.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&m.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?m("<div>").append(m.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){m.fn[t]=function(e){return this.on(t,e)}}),m.expr.pseudos.animated=function(e){return m.grep(m.timers,function(t){return e===t.elem}).length},m.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=m.css(e,"position"),c=m(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=m.css(e,"top"),u=m.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m.isFunction(t)&&(t=t.call(e,n,m.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},m.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){m.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];return o?o.getClientRects().length?(r=o.getBoundingClientRect()).width||r.height?(n=Rt(i=o.ownerDocument),t=i.documentElement,{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===m.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),m.nodeName(e[0],"html")||(r=e.offset()),r={top:r.top+m.css(e[0],"borderTopWidth",!0),left:r.left+m.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-m.css(n,"marginTop",!0),left:t.left-r.left-m.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===m.css(e,"position");)e=e.offsetParent;return e||he})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;m.fn[e]=function(r){return $(this,function(e,r,i){var o=Rt(e);if(void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),m.each(["top","left"],function(e,t){m.cssHooks[t]=Re(h.pixelPosition,function(e,n){if(n)return n=Pe(e,t),Fe.test(n)?m(e).position()[t]+"px":n})}),m.each({Height:"height",Width:"width"},function(e,t){m.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){m.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return $(this,function(t,n,i){var o;return m.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?m.css(t,n,s):m.style(t,n,i,s)},t,a?i:void 0,a)}})}),m.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),m.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var Mt=e.jQuery,It=e.$;return m.noConflict=function(t){return e.$===m&&(e.$=It),t&&e.jQuery===m&&(e.jQuery=Mt),m},t||(e.jQuery=e.$=m),m});
pagebuilder/modules/contact-form-shortcode-module.php CHANGED
@@ -11,7 +11,7 @@ $output = '
11
  {{ifend_condition_form_type_gravityform}}
12
 
13
  {{if_condition_form_type==wpforms}}
14
- [wpforms id="{{wp_form_id}}"]
15
  {{ifend_condition_form_type_wpforms}}
16
 
17
  {{if_condition_form_type==ninja_form}}
@@ -68,7 +68,7 @@ if(is_plugin_active('amp-gravity-forms/amp-gravity-forms.php') && class_exists('
68
  'required' => array('form_type' => 'gravityform'),
69
  ));
70
  }
71
- if(is_plugin_active('amp-wp-forms/amp-wpforms.php')){
72
  $formSupported = array_merge($formSupported, array('wpforms'=>'WP Forms'));
73
 
74
  //$args = apply_filters( 'wpforms_modal_select', array() );
@@ -86,7 +86,7 @@ if(is_plugin_active('amp-wp-forms/amp-wpforms.php')){
86
  $wpformsArray = array();
87
  if(count($forms)){
88
  foreach( $forms as $form ):
89
- $wpformsArray[$form->id] = $form->post_title;
90
  endforeach;
91
  }
92
  $wpformsList = array(array(
11
  {{ifend_condition_form_type_gravityform}}
12
 
13
  {{if_condition_form_type==wpforms}}
14
+ [wpforms id="{{wp_forms_id}}"]
15
  {{ifend_condition_form_type_wpforms}}
16
 
17
  {{if_condition_form_type==ninja_form}}
68
  'required' => array('form_type' => 'gravityform'),
69
  ));
70
  }
71
+ if(function_exists('ampforwp_wpforms_initiate_plugin')){
72
  $formSupported = array_merge($formSupported, array('wpforms'=>'WP Forms'));
73
 
74
  //$args = apply_filters( 'wpforms_modal_select', array() );
86
  $wpformsArray = array();
87
  if(count($forms)){
88
  foreach( $forms as $form ):
89
+ $wpformsArray[$form->ID] = $form->post_title;
90
  endforeach;
91
  }
92
  $wpformsList = array(array(
pagebuilder/modules/contents-module.php CHANGED
@@ -263,7 +263,7 @@ if ( is_admin() ) {
263
  'ajax_action' => 'ampforwp_pb_cats'
264
  ),
265
  array(
266
- 'type' =>'select',
267
  'name' =>"category_selection",
268
  'label' =>"Select Category",
269
  'tab' =>'customizer',
263
  'ajax_action' => 'ampforwp_pb_cats'
264
  ),
265
  array(
266
+ 'type' =>'select2',
267
  'name' =>"category_selection",
268
  'label' =>"Select Category",
269
  'tab' =>'customizer',
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.5
7
- Stable tag: 1.0.64.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,25 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.64.1 (5th October 2020) =
194
  * Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
195
 
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.5
7
+ Stable tag: 1.0.65
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.65 (15th October 2020) =
194
+ * Added: Integrated Truepush in push notification section #4644
195
+ * Added: Easy select option for category module #4672
196
+ * Added: Option to change the image size for the related posts thumbnail #4534
197
+ * Added: Option to change the image size of the first image in Swift theme #4476
198
+ * Added: AMP compatibility with Web stories by Google #4667
199
+ * Fixed: Validation error in the in-content related post #4729
200
+ * Fixed: Image elements do not have alt attributes #4757
201
+ * Fixed: When genesis theme is activated getting SEO error notice #4758
202
+ * Fixed: Removed third party plugins notices on the AMP option panel #4730
203
+ * Fixed: Instant articles not working when Site directory or Installation directory is different #4690
204
+ * Fixed: Clicking on the menu gets # at the end of the URL in design 2 #4722
205
+ * Fixed: Need to add tag for disqus comments #4692
206
+ * Fixed: Optimize menu caching code #4657
207
+ * Fixed: View non amp version is not working in mobile due to conflict with Redis Cache and WP Rocket #4614
208
+ * Fixed: Social share Buttons do not have an accessible name using Design One #4764
209
+ * Fixed: In the Contact form module, wp form options are not getting selected #4761
210
+ * Fixed: Uncaught Error: Call to undefined function ampforwp_is_home() main file #4782
211
+
212
  = 1.0.64.1 (5th October 2020) =
213
  * Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
214
 
templates/design-manager.php CHANGED
@@ -16,7 +16,13 @@ if ( is_customize_preview() ) {
16
  add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_bread_crumbs' );
17
  }
18
 
19
- $data = get_option( 'ampforwp_design',array());
 
 
 
 
 
 
20
 
21
  // Adding default Value
22
  if (empty($data)){
16
  add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_bread_crumbs' );
17
  }
18
 
19
+ $design = ampforwp_get_setting('amp-design-selector');
20
+ if ( empty( $design )){
21
+ $design = 4;
22
+ }
23
+ if ( 4 != $design) {
24
+ $data = get_option( 'ampforwp_design',array());
25
+ }
26
 
27
  // Adding default Value
28
  if (empty($data)){
templates/design-manager/design-1/elements/social-icons.php CHANGED
@@ -64,19 +64,20 @@ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
64
  <amp-social-share type="twitter"
65
  width="50"
66
  height="28"
 
67
  <?php ampforwp_rel_attributes_social_links(); ?>
68
  data-param-url=""
69
  data-param-text="TITLE <?php echo esc_url($twitter_amp_permalink).' '.ampforwp_translation( $redux_builder_amp['amp-translator-via-text'], 'via' ).' '.esc_attr($data_param_data) ?>"
70
  ></amp-social-share>
71
  <?php } ?>
72
  <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
73
- <amp-social-share type="email" width="50" height="28" <?php ampforwp_rel_attributes_social_links(); ?>></amp-social-share>
74
  <?php } ?>
75
  <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
76
- <amp-social-share type="pinterest" width="50" height="28" <?php ampforwp_rel_attributes_social_links(); ?>></amp-social-share>
77
  <?php } ?>
78
  <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
79
- <amp-social-share type="linkedin" width="50" height="28" <?php ampforwp_rel_attributes_social_links(); ?>></amp-social-share>
80
  <?php } ?>
81
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
82
  <a title="whatsapp share" <?php ampforwp_rel_attributes_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_attr(htmlspecialchars(get_the_title()))."\n".esc_url($amp_permalink); ?>" aria-label="whatsapp share">
64
  <amp-social-share type="twitter"
65
  width="50"
66
  height="28"
67
+ aria-label="twitter"
68
  <?php ampforwp_rel_attributes_social_links(); ?>
69
  data-param-url=""
70
  data-param-text="TITLE <?php echo esc_url($twitter_amp_permalink).' '.ampforwp_translation( $redux_builder_amp['amp-translator-via-text'], 'via' ).' '.esc_attr($data_param_data) ?>"
71
  ></amp-social-share>
72
  <?php } ?>
73
  <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
74
+ <amp-social-share type="email" aria-label="email" width="50" height="28" <?php ampforwp_rel_attributes_social_links(); ?>></amp-social-share>
75
  <?php } ?>
76
  <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
77
+ <amp-social-share type="pinterest" aria-label="pinterest" width="50" height="28" <?php ampforwp_rel_attributes_social_links(); ?>></amp-social-share>
78
  <?php } ?>
79
  <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
80
+ <amp-social-share type="linkedin" aria-label="linkedin" width="50" height="28" <?php ampforwp_rel_attributes_social_links(); ?>></amp-social-share>
81
  <?php } ?>
82
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
83
  <a title="whatsapp share" <?php ampforwp_rel_attributes_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_attr(htmlspecialchars(get_the_title()))."\n".esc_url($amp_permalink); ?>" aria-label="whatsapp share">
templates/design-manager/design-2/header-bar.php CHANGED
@@ -19,7 +19,7 @@ global $redux_builder_amp; ?>
19
 
20
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
21
  <div on='tap:sidebar.toggle' aria-label="Navigation" role="button" tabindex="0" class="nav_container">
22
- <a href="#" class="toggle-text"><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-navigate-text'], 'Navigate' )); ?></a>
23
  </div>
24
 
25
  <amp-sidebar id='sidebar'
19
 
20
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
21
  <div on='tap:sidebar.toggle' aria-label="Navigation" role="button" tabindex="0" class="nav_container">
22
+ <a class="toggle-text"><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-navigate-text'], 'Navigate' )); ?></a>
23
  </div>
24
 
25
  <amp-sidebar id='sidebar'
templates/design-manager/swift/index.php CHANGED
@@ -24,7 +24,15 @@ global $redux_builder_amp; ?>
24
  if($i==1 && $paged==1){
25
  ?>
26
  <div class="fbp">
27
- <?php if (ampforwp_has_post_thumbnail() ) { $argsbig = array("tag"=>'div',"tag_class"=>'image-container','image_size'=>'full','image_crop'=>'true','image_crop_width'=>723,'image_crop_height'=>394, 'responsive'=> true); ?>
 
 
 
 
 
 
 
 
28
  <div class="fbp-img fbp-c">
29
  <?php amp_loop_image($argsbig); ?>
30
  </div> <?php } ?>
24
  if($i==1 && $paged==1){
25
  ?>
26
  <div class="fbp">
27
+ <?php if (ampforwp_has_post_thumbnail() ) {
28
+ $fimg_width = 723;
29
+ $fimg_height = 394;
30
+ if( true == ampforwp_get_setting('ampforwp-homepage-posts-image-modify-size') && true== ampforwp_get_setting('ampforwp-homepage-posts-first-image-modify-size') ){
31
+ $fimg_width = ampforwp_get_setting('ampforwp-swift-homepage-posts-width');
32
+ $fimg_height = ampforwp_get_setting('ampforwp-swift-homepage-posts-height');
33
+ }
34
+
35
+ $argsbig = array("tag"=>'div',"tag_class"=>'image-container','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$fimg_width,'image_crop_height'=>$fimg_height, 'responsive'=> true); ?>
36
  <div class="fbp-img fbp-c">
37
  <?php amp_loop_image($argsbig); ?>
38
  </div> <?php } ?>
templates/design-manager/swift/single.php CHANGED
@@ -122,11 +122,11 @@ global $redux_builder_amp; ?>
122
  <?php
123
  $r_width = 220;
124
  $r_height = 134;
125
- if(function_exists('ampforwp_get_retina_image_settings')){
126
- $ret_config = ampforwp_get_retina_image_settings($r_width,$r_height);
127
- $r_width = intval($ret_config['width']);
128
- $r_height = intval($ret_config['height']);
129
- }
130
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );
131
  ?>
132
  </div>
@@ -177,11 +177,10 @@ do_action("ampforwp_single_design_type_handle_d1");
177
  <?php
178
  $r_width = 220;
179
  $r_height = 134;
180
- if(function_exists('ampforwp_get_retina_image_settings')){
181
- $ret_config = ampforwp_get_retina_image_settings($r_width,$r_height);
182
- $r_width = intval($ret_config['width']);
183
- $r_height = intval($ret_config['height']);
184
- }
185
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );?>
186
  </div>
187
  <?php } } ?>
@@ -225,11 +224,10 @@ do_action("ampforwp_single_design_type_handle_d1");
225
  <?php
226
  $r_width = 346;
227
  $r_height = 188;
228
- if(function_exists('ampforwp_get_retina_image_settings')){
229
- $ret_config = ampforwp_get_retina_image_settings($r_width,$r_height);
230
- $r_width = intval($ret_config['width']);
231
- $r_height = intval($ret_config['height']);
232
- }
233
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );?>
234
  </div>
235
  <?php } } ?>
@@ -403,10 +401,9 @@ do_action("ampforwp_single_design_type_handle_d1");
403
  <?php
404
  $r_width = 346;
405
  $r_height = 188;
406
- if(function_exists('ampforwp_get_retina_image_settings')){
407
- $ret_config = ampforwp_get_retina_image_settings($r_width,$r_height);
408
- $r_width = intval($ret_config['width']);
409
- $r_height = intval($ret_config['height']);
410
  }
411
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );?>
412
  </div>
122
  <?php
123
  $r_width = 220;
124
  $r_height = 134;
125
+
126
+ if ( ampforwp_get_setting('ampforwp-single-related-posts-change-image-size') ) {
127
+ $r_width = ampforwp_get_setting('ampforwp-single-related-posts-image-width');
128
+ $r_height = ampforwp_get_setting('ampforwp-single-related-posts-image-height');
129
+ }
130
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );
131
  ?>
132
  </div>
177
  <?php
178
  $r_width = 220;
179
  $r_height = 134;
180
+ if ( ampforwp_get_setting('ampforwp-single-related-posts-change-image-size') ) {
181
+ $r_width = ampforwp_get_setting('ampforwp-single-related-posts-image-width');
182
+ $r_height = ampforwp_get_setting('ampforwp-single-related-posts-image-height');
183
+ }
 
184
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );?>
185
  </div>
186
  <?php } } ?>
224
  <?php
225
  $r_width = 346;
226
  $r_height = 188;
227
+ if ( ampforwp_get_setting('ampforwp-single-related-posts-change-image-size') ) {
228
+ $r_width = ampforwp_get_setting('ampforwp-single-related-posts-image-width');
229
+ $r_height = ampforwp_get_setting('ampforwp-single-related-posts-image-height');
230
+ }
 
231
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );?>
232
  </div>
233
  <?php } } ?>
401
  <?php
402
  $r_width = 346;
403
  $r_height = 188;
404
+ if ( ampforwp_get_setting('ampforwp-single-related-posts-change-image-size') ) {
405
+ $r_width = ampforwp_get_setting('ampforwp-single-related-posts-image-width');
406
+ $r_height = ampforwp_get_setting('ampforwp-single-related-posts-image-height');
 
407
  }
408
  ampforwp_get_relatedpost_image('full',array('image_crop'=>'true','image_crop_width'=>esc_attr($r_width),'image_crop_height'=>esc_attr($r_height)) );?>
409
  </div>
templates/design-manager/swift/style.php CHANGED
@@ -427,9 +427,26 @@ if( ampforwp_is_home() || is_archive() || is_search() || (function_exists('is_sh
427
 
428
  <?php if(true == ampforwp_get_setting('ampforwp-full-post-in-loop')){?>
429
  .fbp-img{width:100%;}
430
- <?php }else{ ?>
 
 
 
431
  .fbp-c{flex: 1 0 100%;}
432
- .fbp-img{flex-basis: calc(65%);margin-right:30px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  .fbp-cnt{flex-basis: calc(31%);}
434
  <?php } ?>
435
 
@@ -482,7 +499,16 @@ echo sanitize_text_field($fontFamily);
482
  @media(max-width:1110px){
483
  .amppb-fluid .col{max-width:95%}
484
  .sf-img .wp-caption-text{width:100%;padding:10px 40px;}
 
 
 
 
 
 
 
 
485
  .fbp-img{flex-basis: calc(64%);}
 
486
  .fbp-img amp-img img{width:100%;}
487
  .fbp-cnt h2 {font-size: 28px;line-height: 34px;}
488
  }
427
 
428
  <?php if(true == ampforwp_get_setting('ampforwp-full-post-in-loop')){?>
429
  .fbp-img{width:100%;}
430
+ <?php }else{
431
+ if( true == ampforwp_get_setting('ampforwp-homepage-posts-image-modify-size') && true== ampforwp_get_setting('ampforwp-homepage-posts-first-image-modify-size') ){
432
+ ?>
433
+ <?php }else{?>
434
  .fbp-c{flex: 1 0 100%;}
435
+ <?php }?>
436
+ .fbp-img{
437
+ <?php
438
+ if( true == ampforwp_get_setting('ampforwp-homepage-posts-image-modify-size') && true== ampforwp_get_setting('ampforwp-homepage-posts-first-image-modify-size') ){
439
+ $fimg_width = ampforwp_get_setting('ampforwp-swift-homepage-posts-width');
440
+ $fimg_height = ampforwp_get_setting('ampforwp-swift-homepage-posts-height');
441
+ ?>
442
+ height:<?php echo esc_html($fimg_height).'px';?>;width:<?php echo esc_html($fimg_width).'px';?>;
443
+ <?php
444
+ }else{
445
+ ?>
446
+ flex-basis: calc(65%);
447
+ <?php }?>
448
+ margin-right:30px;
449
+ }
450
  .fbp-cnt{flex-basis: calc(31%);}
451
  <?php } ?>
452
 
499
  @media(max-width:1110px){
500
  .amppb-fluid .col{max-width:95%}
501
  .sf-img .wp-caption-text{width:100%;padding:10px 40px;}
502
+ <?php
503
+ if( true == ampforwp_get_setting('ampforwp-homepage-posts-image-modify-size') && true== ampforwp_get_setting('ampforwp-homepage-posts-first-image-modify-size') ){
504
+ $fimg_width = ampforwp_get_setting('ampforwp-swift-homepage-posts-width');
505
+ $fimg_height = ampforwp_get_setting('ampforwp-swift-homepage-posts-height');
506
+ ?>
507
+ .fbp-img{height:<?php echo esc_html($fimg_height).'px';?>;width:<?php echo esc_html($fimg_width).'px';?>;}
508
+ <?php }else{
509
+ ?>
510
  .fbp-img{flex-basis: calc(64%);}
511
+ <?php }?>
512
  .fbp-img amp-img img{width:100%;}
513
  .fbp-cnt h2 {font-size: 28px;line-height: 34px;}
514
  }
templates/features.php CHANGED
@@ -2252,6 +2252,7 @@ function ampforwp_add_disqus_support() {
2252
  width=<?php echo esc_attr($width) ?>
2253
  layout="<?php echo esc_attr($layout) ?>"
2254
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
 
2255
  frameborder="0"
2256
  src="<?php echo esc_url($disqus_url) ?>" title="<?php echo esc_html__('Disqus Comments','accelerated-mobile-pages'); ?>">
2257
  <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo esc_html__('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
@@ -4931,6 +4932,10 @@ function ampforwp_inline_related_posts(){
4931
  }
4932
  $thumb_url_2 = ampforwp_aq_resize( $thumb_url_2, $r_width , $r_height , true, false, true );
4933
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . esc_attr($thumb_url_2[1]) . '" height="' . esc_attr($thumb_url_2[2]) . '" layout="responsive"></amp-img>';
 
 
 
 
4934
  }
4935
  else{
4936
  $r_width = 150;
@@ -5579,7 +5584,6 @@ function ampforwp_default_logo_data() {
5579
  function ampforwp_default_logo($param=""){
5580
  global $redux_builder_amp;
5581
  $value = '';
5582
- $logo_alt = '';
5583
  $data = ampforwp_default_logo_data();
5584
  if( ! $data ) {
5585
  if($param!="width" && $param!="height"){
@@ -5624,7 +5628,7 @@ function ampforwp_default_logo($param=""){
5624
  }
5625
  break;
5626
  case 'alt':
5627
- if($logo_alt){
5628
  $value = $data['logo_alt'];
5629
  }
5630
  else
@@ -8322,7 +8326,7 @@ function ampforwp_include_required_scripts($content){
8322
  }
8323
  }
8324
  //OTHER COMPONENT CHECK
8325
- $other_comp_arr = array('amp-mustache'=>'amp-mustache','amp-embed'=>'amp-ad','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection');
8326
  foreach ($other_comp_arr as $key => $value) {
8327
  $ocomp = $value;
8328
  $celem = 'element';
2252
  width=<?php echo esc_attr($width) ?>
2253
  layout="<?php echo esc_attr($layout) ?>"
2254
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
2255
+ resizable
2256
  frameborder="0"
2257
  src="<?php echo esc_url($disqus_url) ?>" title="<?php echo esc_html__('Disqus Comments','accelerated-mobile-pages'); ?>">
2258
  <div overflow tabindex="0" role="button" aria-label="Read more"><?php echo esc_html__('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
4932
  }
4933
  $thumb_url_2 = ampforwp_aq_resize( $thumb_url_2, $r_width , $r_height , true, false, true );
4934
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . esc_attr($thumb_url_2[1]) . '" height="' . esc_attr($thumb_url_2[2]) . '" layout="responsive"></amp-img>';
4935
+ if(!isset($thumb_url_2[0]) && is_null($thumb_url_2[0])){
4936
+ $thumb_url = ampforwp_get_post_thumbnail('url');
4937
+ $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url ).'" width="' . esc_attr(220) . '" height="' . esc_attr(134) . '" layout="responsive"></amp-img>';
4938
+ }
4939
  }
4940
  else{
4941
  $r_width = 150;
5584
  function ampforwp_default_logo($param=""){
5585
  global $redux_builder_amp;
5586
  $value = '';
 
5587
  $data = ampforwp_default_logo_data();
5588
  if( ! $data ) {
5589
  if($param!="width" && $param!="height"){
5628
  }
5629
  break;
5630
  case 'alt':
5631
+ if(isset($data['logo_alt'][0])){
5632
  $value = $data['logo_alt'];
5633
  }
5634
  else
8326
  }
8327
  }
8328
  //OTHER COMPONENT CHECK
8329
+ $other_comp_arr = array('amp-mustache'=>'amp-mustache','amp-embed'=>'amp-ad','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection','amp-story-player'=>'amp-story-player');
8330
  foreach ($other_comp_arr as $key => $value) {
8331
  $ocomp = $value;
8332
  $celem = 'element';