Speed Booster Pack - Version 3.8.2

Version Description

Release Date: 03 June 2019

  • Added: The new uninstall.php file now removes plugin settings when you delete the plugin. (Deactivating the plugin doesn't remove plugin settings.)
  • Fixed: Minor styling & HTML validation fixes for the settings panel.
  • Updated: Rewrote part of the Localize Analytics feature, and update the default Google Analytics code.
  • Updated: Tags in readme.txt.
  • Tested: Ensured the plugin works in WordPress version 5.2.1 and PHP version 5.6.
Download this release

Release Info

Developer optimocha
Plugin Icon 128x128 Speed Booster Pack
Version 3.8.2
Comparing to
See all releases

Code changes from version 3.8.1 to 3.8.2

css/style.css CHANGED
@@ -453,6 +453,7 @@ html {
453
  .sb-pack .postbox .hndle {font-size:1rem;line-height:2;padding:.5rem 1rem;margin:0;}
454
  .sb-pack .postbox .inside {padding:1rem;margin:0;}
455
  .sb-pack .postbox .inside p {margin:0 0 1rem;}
 
456
  .sb-pack .postbox .inside p:last-child {margin:0;}
457
 
458
  .feature-box .inside .feature-box-image {width:7rem;height:auto;display:block;}
453
  .sb-pack .postbox .hndle {font-size:1rem;line-height:2;padding:.5rem 1rem;margin:0;}
454
  .sb-pack .postbox .inside {padding:1rem;margin:0;}
455
  .sb-pack .postbox .inside p {margin:0 0 1rem;}
456
+ .sb-pack .postbox .inside .button {margin-bottom:.5rem;}
457
  .sb-pack .postbox .inside p:last-child {margin:0;}
458
 
459
  .feature-box .inside .feature-box-image {width:7rem;height:auto;display:block;}
inc/class-sb-pack-review.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
 
 
 
 
 
 
3
  class SB_Pack_Review {
4
 
5
  private static $instance;
1
  <?php
2
 
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
  class SB_Pack_Review {
9
 
10
  private static $instance;
inc/core.php CHANGED
@@ -1,7 +1,12 @@
1
  <?php
2
 
 
 
 
 
 
3
  /*--------------------------------------------------------------------------------------------------------
4
- Plugin Core Functions
5
  ---------------------------------------------------------------------------------------------------------*/
6
 
7
  if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
@@ -19,40 +24,40 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
19
 
20
  add_action( 'after_setup_theme', array( $this, 'sbp_junk_header_tags' ) );
21
  add_action( 'init', array( $this, 'sbp_init' ) );
22
- //enable cdn rewrite
23
- if(!empty($sbp_options['sbp_enable_cdn']) && $sbp_options['sbp_enable_cdn'] == "1" && !empty($sbp_options['sbp_cdn_url'])) {
24
- add_action('template_redirect', array($this,'sbp_cdn_rewrite'));
25
- }
26
-
27
- // Start GA
28
- if(!empty($sbp_options['sbp_enable_local_analytics']) && $sbp_options['sbp_enable_local_analytics'] == "1") {
29
- if(!wp_next_scheduled('sbp_update_ga')) {
30
- wp_schedule_event(time(), 'daily', 'sbp_update_ga');
31
- }
32
-
33
- if(!empty($sbp_options['sbp_monsterinsights']) && $sbp_options['sbp_monsterinsights'] == "1") {
34
- add_filter('monsterinsights_frontend_output_analytics_src', array($this,'sbp_monster_ga'), 1000);
35
- }
36
- else {
37
- if(!empty($sbp_options['sbp_tracking_position']) && $sbp_options['sbp_tracking_position'] == 'footer') {
38
- $tracking_code_position = 'wp_footer';
39
- }
40
- else {
41
- $tracking_code_position = 'wp_head';
42
- }
43
- add_action($tracking_code_position, array($this,'sbp_print_ga'), 0);
44
- }
45
- }
46
- else {
47
- if(wp_next_scheduled('sbp_update_ga')) {
48
- wp_clear_scheduled_hook('sbp_update_ga');
49
- }
50
- }
51
-
52
- add_action('sbp_update_ga', array($this,'sbp_update_ga'));
53
- // End GA
54
-
55
- $this->sbp_css_optimizer(); // CSS Optimizer functions
56
 
57
  // Minifier
58
  if ( ! is_admin() and isset( $sbp_options['minify_html_js'] ) ) {
@@ -83,8 +88,8 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
83
  */
84
  // Disable Cart Fragments
85
  if( isset( $sbp_options[ 'disable_cart_fragments' ] ) && class_exists( 'woocommerce' ) ) {
86
- add_action( 'wp_enqueue_scripts', array( $this, 'sbp_disable_cart_fragments' ), 999 );
87
- }
88
 
89
  /**
90
  * @since 3.8
@@ -277,8 +282,8 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
277
  if ( ! empty( $not_inlined ) ) {
278
  foreach ( $not_inlined as $style ) {
279
  ?>
280
- <link rel="stylesheet" href="<?php echo $style['src'] ?>"
281
- type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : '' ?> /><?php
282
  }
283
  }
284
  }
@@ -314,8 +319,8 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
314
  if ( ! empty( $not_inlined ) ) {
315
  foreach ( $not_inlined as $style ) {
316
  ?>
317
- <link rel="stylesheet" href="<?php echo $style['src'] ?>"
318
- type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : '' ?> /><?php
319
  }
320
  }
321
  }
@@ -338,7 +343,7 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
338
 
339
  }
340
 
341
- } // END function sbp_move_scripts_to_footer
342
 
343
 
344
  /*--------------------------------------------------------------------------------------------------------
@@ -402,8 +407,8 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
402
  *
403
  * New solution, going forward so not to crash so many sites anymore
404
  *
405
- * This should come BEFORE the fallback function, since jQuery should be ALWAYS
406
- * the first loaded script.
407
  *
408
  */
409
  if ( $js_footer_exceptions1 !== 'jquery-core' || $js_footer_exceptions2 !== 'jquery-core' || $js_footer_exceptions3 !== 'jquery-core' || $js_footer_exceptions4 !== 'jquery-core' ) {
@@ -534,7 +539,7 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
534
  function sbp_minifier() {
535
 
536
  require_once( SPEED_BOOSTER_PACK_PATH . 'inc/sbp-minifier.php' );
537
- } // End function sbp_minifier()
538
 
539
 
540
  /*--------------------------------------------------------------------------------------------------------
@@ -545,7 +550,7 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
545
 
546
  require_once( SPEED_BOOSTER_PACK_PATH . 'inc/css-optimizer.php' );
547
 
548
- } // End function sbp_css_optimizer()
549
 
550
  /*--------------------------------------------------------------------------------------------------------
551
  Defer parsing of JavaScript and exclusion files
@@ -589,14 +594,14 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
589
 
590
  return $tag;
591
 
592
- } // END function sbp_defer_parsing_of_js
593
 
594
 
595
  /*--------------------------------------------------------------------------------------------------------
596
  Remove query strings from static resources
597
  ---------------------------------------------------------------------------------------------------------*/
598
 
599
- function sbp_remove_query_strings( $src ) { // remove "?ver" string
600
 
601
  $output = preg_split( "/(\?rev|&ver|\?ver)/", $src );
602
 
@@ -631,7 +636,7 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
631
  function sbp_disable_emojis_dns_prefetch( $urls, $relation_type ) {
632
  if ( 'dns-prefetch' == $relation_type ) {
633
  $emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.2.1/svg/' );
634
- $urls = array_diff( $urls, array( $emoji_svg_url ) );
635
  }
636
 
637
  return $urls;
@@ -653,8 +658,8 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
653
  }
654
 
655
  /*--------------------------------------------------------------------------------------------------------
656
- Disable Cart Fragments
657
- ---------------------------------------------------------------------------------------------------------*/
658
 
659
  function sbp_disable_cart_fragments() {
660
  global $wp_scripts;
@@ -666,37 +671,37 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
666
  wp_add_inline_script(
667
  'woocommerce',
668
  '
669
- function sbp_getCookie(name) {
670
- var v = document.cookie.match("(^|;) ?" + name + "=([^;]*)(;|$)");
671
- return v ? v[2] : null;
672
- }
673
-
674
- function sbp_check_wc_cart_script() {
675
- var cart_src = "' . $load_cart_fragments_path . '";
676
- var script_id = "sbp_loaded_wc_cart_fragments";
677
-
678
- if( document.getElementById(script_id) !== null ) {
679
- return false;
680
- }
681
-
682
- if( sbp_getCookie("woocommerce_cart_hash") ) {
683
- var script = document.createElement("script");
684
- script.id = script_id;
685
- script.src = cart_src;
686
- script.async = true;
687
- document.head.appendChild(script);
688
- }
689
- }
690
-
691
- sbp_check_wc_cart_script();
692
- document.addEventListener("click", function(){setTimeout(sbp_check_wc_cart_script,1000);});
693
- '
694
  );
695
  }
696
 
697
  /*--------------------------------------------------------------------------------------------------------
698
- Enable Instant Page
699
- ---------------------------------------------------------------------------------------------------------*/
700
 
701
  function sbp_enable_instant_page() {
702
  wp_enqueue_script( 'sbp-instant-page', plugins_url( 'js/instant.page.js', __FILE__ ),
@@ -741,186 +746,185 @@ if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
741
 
742
  // Remove all feeds
743
  if ( isset( $sbp_options['remove_all_feeds'] ) ) {
744
- remove_action( 'wp_head', 'feed_links_extra', 3 ); // remove the feed links from the extra feeds such as category feeds
745
- remove_action( 'wp_head', 'feed_links', 2 ); // remove the feed links from the general feeds: Post and Comment Feed
746
- }
747
-
748
- } // END public function sbp_junk_header_tags
749
-
750
-
751
- /*--------------------------------
752
- CDN Rewrite URLs
753
- ---------------------------------*/
754
-
755
- function sbp_cdn_rewrite() {
756
- ob_start(array($this,'sbp_cdn_rewriter'));
757
- }
758
-
759
- function sbp_cdn_rewriter($html) {
760
- global $sbp_options;
761
- $sbp_cdn_directories = $sbp_options['sbp_cdn_included_directories'];
762
-
763
- //Prep Site URL
764
- $escapedSiteURL = quotemeta(get_option('home'));
765
- $regExURL = '(https?:|)' . substr($escapedSiteURL, strpos($escapedSiteURL, '//'));
766
-
767
- //Prep Included Directories
768
- $directories = 'wp\-content|wp\-includes';
769
- if(!empty($sbp_cdn_directories)) {
770
- $directoriesArray = array_map('trim', explode(',', $sbp_cdn_directories));
771
- if(count($directoriesArray) > 0) {
772
- $directories = implode('|', array_map('quotemeta', array_filter($directoriesArray)));
773
- }
774
- }
775
-
776
- //Rewrite URLs + Return
777
- $regEx = '#(?<=[(\"\'])(?:' . $regExURL . ')?/(?:((?:' . $directories . ')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])#';
778
- $cdnHTML = preg_replace_callback($regEx, array($this,'sbp_cdn_rewrite_url'), $html);
779
- return $cdnHTML;
780
- }
781
-
782
- function sbp_cdn_rewrite_url($url) {
783
- global $sbp_options;
784
- $sbp_cdn_url = $sbp_options['sbp_cdn_url'];
785
- $sbp_cdn_excluded = $sbp_options['sbp_cdn_exclusions'];
786
-
787
- //Make Sure CDN URL is Set
788
- if(!empty($sbp_cdn_url)) {
789
-
790
- //Don't Rewrite if Excluded
791
- if(!empty($sbp_cdn_excluded)) {
792
- $exclusions = array_map('trim', explode(',', $sbp_cdn_excluded));
793
- foreach($exclusions as $exclusion) {
794
- if(!empty($exclusion) && stristr($url[0], $exclusion) != false) {
795
- return $url[0];
796
- }
797
- }
798
- }
799
-
800
- //Don't Rewrite if Previewing
801
- if(is_admin_bar_showing() && isset($_GET['preview']) && $_GET['preview'] == 'true') {
802
- return $url[0];
803
- }
804
-
805
- //Prep Site URL
806
- $siteURL = get_option('home');
807
- $siteURL = substr($siteURL, strpos($siteURL, '//'));
808
-
809
- //Replace URL w/ No HTTP/S Prefix
810
- if(strpos($url[0], '//') === 0) {
811
- return str_replace($siteURL, $sbp_cdn_url, $url[0]);
812
- }
813
-
814
- //Found Site URL, Replace Non Relative URL w/ HTTP/S Prefix
815
- if(strstr($url[0], $siteURL)) {
816
- return str_replace(array('http:' . $siteURL, 'https:' . $siteURL), $sbp_cdn_url, $url[0]);
817
- }
818
- //Replace Relative URL
819
- return $sbp_cdn_url . $url[0];
820
- }
821
-
822
- //Return Original URL
823
- return $url[0];
824
- }
825
-
826
- /*--------------------------------------------
827
- Google Analytics
828
- --------------------------------------------*/
829
 
830
  //update analytics.js
831
- function sbp_update_ga() {
832
- //paths
833
- $local_file = SPEED_BOOSTER_PACK_URL. 'inc/js/analytics.js';
834
- $host = 'www.google-analytics.com';
835
- $path = '/analytics.js';
836
-
837
- //open connection
838
- $fp = @fsockopen($host, '80', $errno, $errstr, 10);
839
-
840
- if($fp){
841
- //send headers
842
- $header = "GET $path HTTP/1.0\r\n";
843
- $header.= "Host: $host\r\n";
844
- $header.= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\r\n";
845
- $header.= "Accept: */*\r\n";
846
- $header.= "Accept-Language: en-us,en;q=0.5\r\n";
847
- $header.= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
848
- $header.= "Keep-Alive: 300\r\n";
849
- $header.= "Connection: keep-alive\r\n";
850
- $header.= "Referer: https://$host\r\n\r\n";
851
- fwrite($fp, $header);
852
- $response = '';
853
-
854
- //get response
855
- while($line = fread($fp, 4096)) {
856
- $response.= $line;
857
- }
858
-
859
- //close connection
860
- fclose($fp);
861
-
862
- //remove headers
863
- $position = strpos($response, "\r\n\r\n");
864
- $response = substr($response, $position + 4);
865
-
866
- //create file if needed
867
- if(!file_exists($local_file)) {
868
- fopen($local_file, 'w');
869
- }
870
-
871
- //write response to file
872
- if(is_writable($local_file)) {
873
- if($fp = fopen($local_file, 'w')) {
874
- fwrite($fp, $response);
875
- fclose($fp);
876
- }
877
- }
878
- }
879
- }
880
-
881
-
882
- //print analytics script
883
- function sbp_print_ga() {
884
- global $sbp_options;
885
-
886
- //dont print for logged in admins
887
- if(current_user_can('manage_options') && empty($sbp_options['sbp_track_loggedin_admins'])) {
888
- return;
889
- }
890
-
891
- if(!empty($sbp_options['sbp_ga_tracking_id'])) {
892
- echo "<!-- Local Analytics generated with speed booster pack. -->";
893
- echo "<script>";
894
- echo "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
895
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
896
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
897
- })(window,document,'script','" . SPEED_BOOSTER_PACK_URL . "inc/js/analytics.js','ga');";
898
- echo "ga('create', '" . $sbp_options['sbp_ga_tracking_id'] . "', 'auto');";
899
-
900
- //disable display features
901
- if(!empty($sbp_options['sbp_disable_display_features']) && $sbp_options['sbp_disable_display_features'] == "1") {
902
- echo "ga('set', 'allowAdFeatures', false);";
903
- }
904
-
905
- //anonymize ip
906
- if(!empty($sbp_options['sbp_anonymize_ip']) && $sbp_options['sbp_anonymize_ip'] == "1") {
907
- echo "ga('set', 'anonymizeIp', true);";
908
- }
909
-
910
- echo "ga('send', 'pageview');";
911
-
912
- //adjusted bounce rate
913
- if(!empty($sbp_options['sbp_bounce_rate'])) {
914
- echo 'setTimeout("ga(' . "'send','event','adjusted bounce rate','" . $sbp_options['sbp_bounce_rate'] . " seconds')" . '"' . "," . $sbp_options['sbp_bounce_rate'] * 1000 . ");";
915
- }
916
- echo "</script>";
917
- }
918
- }
919
-
920
- //return local anlytics url for Monster Insights
921
- function sbp_monster_ga($url) {
922
- return SPEED_BOOSTER_PACK_URL . "/inc/js/analytics.js";
923
- }
924
 
925
 
926
  } // END class Speed_Booster_Pack_Core
1
  <?php
2
 
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
  /*--------------------------------------------------------------------------------------------------------
9
+ Plugin Core Functions
10
  ---------------------------------------------------------------------------------------------------------*/
11
 
12
  if ( ! class_exists( 'Speed_Booster_Pack_Core' ) ) {
24
 
25
  add_action( 'after_setup_theme', array( $this, 'sbp_junk_header_tags' ) );
26
  add_action( 'init', array( $this, 'sbp_init' ) );
27
+ //enable cdn rewrite
28
+ if(!empty($sbp_options['sbp_enable_cdn']) && $sbp_options['sbp_enable_cdn'] == "1" && !empty($sbp_options['sbp_cdn_url'])) {
29
+ add_action('template_redirect', array($this,'sbp_cdn_rewrite'));
30
+ }
31
+
32
+ // Start GA
33
+ if(!empty($sbp_options['sbp_enable_local_analytics']) && $sbp_options['sbp_enable_local_analytics'] == "1") {
34
+ if(!wp_next_scheduled('sbp_update_ga')) {
35
+ wp_schedule_event(time(), 'daily', 'sbp_update_ga');
36
+ }
37
+
38
+ if(!empty($sbp_options['sbp_monsterinsights']) && $sbp_options['sbp_monsterinsights'] == "1") {
39
+ add_filter('monsterinsights_frontend_output_analytics_src', array($this,'sbp_monster_ga'), 1000);
40
+ }
41
+ else {
42
+ if(!empty($sbp_options['sbp_tracking_position']) && $sbp_options['sbp_tracking_position'] == 'footer') {
43
+ $tracking_code_position = 'wp_footer';
44
+ }
45
+ else {
46
+ $tracking_code_position = 'wp_head';
47
+ }
48
+ add_action($tracking_code_position, array($this,'sbp_print_ga'), 0);
49
+ }
50
+ }
51
+ else {
52
+ if(wp_next_scheduled('sbp_update_ga')) {
53
+ wp_clear_scheduled_hook('sbp_update_ga');
54
+ }
55
+ }
56
+
57
+ add_action('sbp_update_ga', array($this,'sbp_update_ga'));
58
+ // End GA
59
+
60
+ $this->sbp_css_optimizer(); // CSS Optimizer functions
61
 
62
  // Minifier
63
  if ( ! is_admin() and isset( $sbp_options['minify_html_js'] ) ) {
88
  */
89
  // Disable Cart Fragments
90
  if( isset( $sbp_options[ 'disable_cart_fragments' ] ) && class_exists( 'woocommerce' ) ) {
91
+ add_action( 'wp_enqueue_scripts', array( $this, 'sbp_disable_cart_fragments' ), 999 );
92
+ }
93
 
94
  /**
95
  * @since 3.8
282
  if ( ! empty( $not_inlined ) ) {
283
  foreach ( $not_inlined as $style ) {
284
  ?>
285
+ <link rel="stylesheet" href="<?php echo $style['src'] ?>"
286
+ type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : '' ?> /><?php
287
  }
288
  }
289
  }
319
  if ( ! empty( $not_inlined ) ) {
320
  foreach ( $not_inlined as $style ) {
321
  ?>
322
+ <link rel="stylesheet" href="<?php echo $style['src'] ?>"
323
+ type="text/css" <?php echo $style['media'] ? "media=\"{$style['media']}\"" : '' ?> /><?php
324
  }
325
  }
326
  }
343
 
344
  }
345
 
346
+ } // END function sbp_move_scripts_to_footer
347
 
348
 
349
  /*--------------------------------------------------------------------------------------------------------
407
  *
408
  * New solution, going forward so not to crash so many sites anymore
409
  *
410
+ * This should come BEFORE the fallback function, since jQuery should be ALWAYS
411
+ * the first loaded script.
412
  *
413
  */
414
  if ( $js_footer_exceptions1 !== 'jquery-core' || $js_footer_exceptions2 !== 'jquery-core' || $js_footer_exceptions3 !== 'jquery-core' || $js_footer_exceptions4 !== 'jquery-core' ) {
539
  function sbp_minifier() {
540
 
541
  require_once( SPEED_BOOSTER_PACK_PATH . 'inc/sbp-minifier.php' );
542
+ } // End function sbp_minifier()
543
 
544
 
545
  /*--------------------------------------------------------------------------------------------------------
550
 
551
  require_once( SPEED_BOOSTER_PACK_PATH . 'inc/css-optimizer.php' );
552
 
553
+ } // End function sbp_css_optimizer()
554
 
555
  /*--------------------------------------------------------------------------------------------------------
556
  Defer parsing of JavaScript and exclusion files
594
 
595
  return $tag;
596
 
597
+ } // END function sbp_defer_parsing_of_js
598
 
599
 
600
  /*--------------------------------------------------------------------------------------------------------
601
  Remove query strings from static resources
602
  ---------------------------------------------------------------------------------------------------------*/
603
 
604
+ function sbp_remove_query_strings( $src ) { // remove "?ver" string
605
 
606
  $output = preg_split( "/(\?rev|&ver|\?ver)/", $src );
607
 
636
  function sbp_disable_emojis_dns_prefetch( $urls, $relation_type ) {
637
  if ( 'dns-prefetch' == $relation_type ) {
638
  $emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.2.1/svg/' );
639
+ $urls = array_diff( $urls, array( $emoji_svg_url ) );
640
  }
641
 
642
  return $urls;
658
  }
659
 
660
  /*--------------------------------------------------------------------------------------------------------
661
+ Disable Cart Fragments
662
+ ---------------------------------------------------------------------------------------------------------*/
663
 
664
  function sbp_disable_cart_fragments() {
665
  global $wp_scripts;
671
  wp_add_inline_script(
672
  'woocommerce',
673
  '
674
+ function sbp_getCookie(name) {
675
+ var v = document.cookie.match("(^|;) ?" + name + "=([^;]*)(;|$)");
676
+ return v ? v[2] : null;
677
+ }
678
+
679
+ function sbp_check_wc_cart_script() {
680
+ var cart_src = "' . $load_cart_fragments_path . '";
681
+ var script_id = "sbp_loaded_wc_cart_fragments";
682
+
683
+ if( document.getElementById(script_id) !== null ) {
684
+ return false;
685
+ }
686
+
687
+ if( sbp_getCookie("woocommerce_cart_hash") ) {
688
+ var script = document.createElement("script");
689
+ script.id = script_id;
690
+ script.src = cart_src;
691
+ script.async = true;
692
+ document.head.appendChild(script);
693
+ }
694
+ }
695
+
696
+ sbp_check_wc_cart_script();
697
+ document.addEventListener("click", function(){setTimeout(sbp_check_wc_cart_script,1000);});
698
+ '
699
  );
700
  }
701
 
702
  /*--------------------------------------------------------------------------------------------------------
703
+ Enable Instant Page
704
+ ---------------------------------------------------------------------------------------------------------*/
705
 
706
  function sbp_enable_instant_page() {
707
  wp_enqueue_script( 'sbp-instant-page', plugins_url( 'js/instant.page.js', __FILE__ ),
746
 
747
  // Remove all feeds
748
  if ( isset( $sbp_options['remove_all_feeds'] ) ) {
749
+ remove_action( 'wp_head', 'feed_links_extra', 3 ); // remove the feed links from the extra feeds such as category feeds
750
+ remove_action( 'wp_head', 'feed_links', 2 ); // remove the feed links from the general feeds: Post and Comment Feed
751
+ }
752
+
753
+ } // END public function sbp_junk_header_tags
754
+
755
+
756
+ /*--------------------------------
757
+ CDN Rewrite URLs
758
+ ---------------------------------*/
759
+
760
+ function sbp_cdn_rewrite() {
761
+ ob_start(array($this,'sbp_cdn_rewriter'));
762
+ }
763
+
764
+ function sbp_cdn_rewriter($html) {
765
+ global $sbp_options;
766
+ $sbp_cdn_directories = $sbp_options['sbp_cdn_included_directories'];
767
+
768
+ //Prep Site URL
769
+ $escapedSiteURL = quotemeta(get_option('home'));
770
+ $regExURL = '(https?:|)' . substr($escapedSiteURL, strpos($escapedSiteURL, '//'));
771
+
772
+ //Prep Included Directories
773
+ $directories = 'wp\-content|wp\-includes';
774
+ if(!empty($sbp_cdn_directories)) {
775
+ $directoriesArray = array_map('trim', explode(',', $sbp_cdn_directories));
776
+ if(count($directoriesArray) > 0) {
777
+ $directories = implode('|', array_map('quotemeta', array_filter($directoriesArray)));
778
+ }
779
+ }
780
+
781
+ //Rewrite URLs + Return
782
+ $regEx = '#(?<=[(\"\'])(?:' . $regExURL . ')?/(?:((?:' . $directories . ')[^\"\')]+)|([^/\"\']+\.[^/\"\')]+))(?=[\"\')])#';
783
+ $cdnHTML = preg_replace_callback($regEx, array($this,'sbp_cdn_rewrite_url'), $html);
784
+ return $cdnHTML;
785
+ }
786
+
787
+ function sbp_cdn_rewrite_url($url) {
788
+ global $sbp_options;
789
+ $sbp_cdn_url = $sbp_options['sbp_cdn_url'];
790
+ $sbp_cdn_excluded = $sbp_options['sbp_cdn_exclusions'];
791
+
792
+ //Make Sure CDN URL is Set
793
+ if(!empty($sbp_cdn_url)) {
794
+
795
+ //Don't Rewrite if Excluded
796
+ if(!empty($sbp_cdn_excluded)) {
797
+ $exclusions = array_map('trim', explode(',', $sbp_cdn_excluded));
798
+ foreach($exclusions as $exclusion) {
799
+ if(!empty($exclusion) && stristr($url[0], $exclusion) != false) {
800
+ return $url[0];
801
+ }
802
+ }
803
+ }
804
+
805
+ //Don't Rewrite if Previewing
806
+ if(is_admin_bar_showing() && isset($_GET['preview']) && $_GET['preview'] == 'true') {
807
+ return $url[0];
808
+ }
809
+
810
+ //Prep Site URL
811
+ $siteURL = get_option('home');
812
+ $siteURL = substr($siteURL, strpos($siteURL, '//'));
813
+
814
+ //Replace URL w/ No HTTP/S Prefix
815
+ if(strpos($url[0], '//') === 0) {
816
+ return str_replace($siteURL, $sbp_cdn_url, $url[0]);
817
+ }
818
+
819
+ //Found Site URL, Replace Non Relative URL w/ HTTP/S Prefix
820
+ if(strstr($url[0], $siteURL)) {
821
+ return str_replace(array('http:' . $siteURL, 'https:' . $siteURL), $sbp_cdn_url, $url[0]);
822
+ }
823
+ //Replace Relative URL
824
+ return $sbp_cdn_url . $url[0];
825
+ }
826
+
827
+ //Return Original URL
828
+ return $url[0];
829
+ }
830
+
831
+ /*--------------------------------------------
832
+ Google Analytics
833
+ --------------------------------------------*/
834
 
835
  //update analytics.js
836
+ function sbp_update_ga() {
837
+ //paths
838
+ $local_file = SPEED_BOOSTER_PACK_URL. 'inc/js/analytics.js';
839
+ $host = 'www.google-analytics.com';
840
+ $path = '/analytics.js';
841
+
842
+ //open connection
843
+ $fp = @fsockopen($host, '80', $errno, $errstr, 10);
844
+
845
+ if($fp){
846
+ //send headers
847
+ $header = "GET $path HTTP/1.0\r\n";
848
+ $header.= "Host: $host\r\n";
849
+ $header.= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\r\n";
850
+ $header.= "Accept: */*\r\n";
851
+ $header.= "Accept-Language: en-us,en;q=0.5\r\n";
852
+ $header.= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
853
+ $header.= "Keep-Alive: 300\r\n";
854
+ $header.= "Connection: keep-alive\r\n";
855
+ $header.= "Referer: https://$host\r\n\r\n";
856
+ fwrite($fp, $header);
857
+ $response = '';
858
+
859
+ //get response
860
+ while($line = fread($fp, 4096)) {
861
+ $response.= $line;
862
+ }
863
+
864
+ //close connection
865
+ fclose($fp);
866
+
867
+ //remove headers
868
+ $position = strpos($response, "\r\n\r\n");
869
+ $response = substr($response, $position + 4);
870
+
871
+ //create file if needed
872
+ if(!file_exists($local_file)) {
873
+ fopen($local_file, 'w');
874
+ }
875
+
876
+ //write response to file
877
+ if(is_writable($local_file)) {
878
+ if($fp = fopen($local_file, 'w')) {
879
+ fwrite($fp, $response);
880
+ fclose($fp);
881
+ }
882
+ }
883
+ }
884
+ }
885
+
886
+
887
+ //print analytics script
888
+ function sbp_print_ga() {
889
+ global $sbp_options;
890
+
891
+ //dont print for logged in admins
892
+ if(current_user_can('manage_options') && empty($sbp_options['sbp_track_loggedin_admins'])) {
893
+ return;
894
+ }
895
+
896
+ if(!empty($sbp_options['sbp_ga_tracking_id'])) {
897
+ echo "\n\n<!-- Local Analytics generated with Speed Booster Pack by Optimocha. -->\n";
898
+ echo "<script>\n";
899
+ echo "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','" . SPEED_BOOSTER_PACK_URL . "inc/js/analytics.js','ga');\n";
900
+ echo "ga('create', '" . $sbp_options['sbp_ga_tracking_id'] . "', 'auto');\n";
901
+
902
+ //disable display features
903
+ if(!empty($sbp_options['sbp_disable_display_features']) && $sbp_options['sbp_disable_display_features'] == "1") {
904
+ echo "ga('set', 'allowAdFeatures', false);\n";
905
+ }
906
+
907
+ //anonymize ip
908
+ if(!empty($sbp_options['sbp_anonymize_ip']) && $sbp_options['sbp_anonymize_ip'] == "1") {
909
+ echo "ga('set', 'anonymizeIp', true);\n";
910
+ }
911
+
912
+ echo "ga('send', 'pageview');\n";
913
+
914
+ //adjusted bounce rate
915
+ if(!empty($sbp_options['sbp_bounce_rate'])) {
916
+ echo 'setTimeout("ga(' . "'send','event','adjusted bounce rate','" . $sbp_options['sbp_bounce_rate'] . " seconds')" . '"' . "," . $sbp_options['sbp_bounce_rate'] * 1000 . ");\n";
917
+ }
918
+
919
+ echo "</script>\n";
920
+ echo "<!-- End of Local Analytics. -->\n\n";
921
+ }
922
+ }
923
+
924
+ //return local anlytics url for Monster Insights
925
+ function sbp_monster_ga($url) {
926
+ return SPEED_BOOSTER_PACK_URL . "/inc/js/analytics.js";
927
+ }
 
928
 
929
 
930
  } // END class Speed_Booster_Pack_Core
inc/css-optimizer.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
 
 
 
 
 
 
3
  /*--------------------------------------------------------------------------------------------------------
4
  CSS OPTIMIZER - Generate Styles List
5
  ---------------------------------------------------------------------------------------------------------*/
@@ -225,4 +230,4 @@ function is_css_excluded( $file ) {
225
  }
226
 
227
  return false;
228
- }
1
  <?php
2
 
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
  /*--------------------------------------------------------------------------------------------------------
9
  CSS OPTIMIZER - Generate Styles List
10
  ---------------------------------------------------------------------------------------------------------*/
230
  }
231
 
232
  return false;
233
+ }
inc/js/analytics.js CHANGED
@@ -1,73 +1,73 @@
1
- (function(){var k=this,l=function(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b};var m=function(a){var b=[];if(Array.prototype.indexOf)return a=b.indexOf(a),"number"==typeof a?a:-1;for(var c=0;c<b.length;c++)if(b[c]===a)return c;return-1},n=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},q=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};var r=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;var t=window,u=document,v=function(a,b){u.addEventListener?u.addEventListener(a,b,!1):u.attachEvent&&u.attachEvent("on"+a,b)};var w=/:[0-9]+$/,y=function(a,b){var c=function(a){return a?a.replace(":","").toLowerCase():""};c=c(a.protocol)||c(t.location.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":a=x(a);break;case "protocol":a=c;break;case "host":a=(a.hostname||t.location.hostname).replace(w,"").toLowerCase();break;case "port":a=String(Number(a.hostname?a.port:t.location.port)||("http"==c?80:"https"==c?443:""));break;case "path":a="/"==a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;a=a.split("/");
2
- 0<=m(a[a.length-1])&&(a[a.length-1]="");a=a.join("/");break;case "query":a=a.search.replace("?","");break;case "extension":a=a.pathname.split(".");a=1<a.length?a[a.length-1]:"";a=a.split("/")[0];break;case "fragment":a=a.hash.replace("#","");break;default:a=a&&a.href}return a},x=function(a){var b="";a&&a.href&&(b=a.hash?a.href.replace(a.hash,""):a.href);return b},z=function(a){var b=document.createElement("a");a&&(r.test(a),b.href=a);a=b.pathname;"/"!==a[0]&&(a="/"+a);var c=b.hostname.replace(w,"");
3
- return{href:b.href,protocol:b.protocol,host:b.host,hostname:c,pathname:a,search:b.search,hash:b.hash,port:b.port}};function A(){for(var a=B,b={},c=0;c<a.length;++c)b[a[c]]=c;return b}function C(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a.toLowerCase()+"0123456789-_";return a+"."}
4
- var B,D,E=function(a){B=B||C();D=D||A();for(var b=[],c=0;c<a.length;c+=3){var d=c+1<a.length,e=c+2<a.length,g=a.charCodeAt(c),f=d?a.charCodeAt(c+1):0,h=e?a.charCodeAt(c+2):0,p=g>>2;g=(g&3)<<4|f>>4;f=(f&15)<<2|h>>6;h&=63;e||(h=64,d||(f=64));b.push(B[p],B[g],B[f],B[h])}return b.join("")},F=function(a){function b(b){for(;d<a.length;){var c=a.charAt(d++),e=D[c];if(null!=e)return e;if(!/^[\s\xa0]*$/.test(c))throw Error("Unknown base64 encoding at char: "+c);}return b}B=B||C();D=D||A();for(var c="",d=0;;){var e=
5
- b(-1),g=b(0),f=b(64),h=b(64);if(64===h&&-1===e)return c;c+=String.fromCharCode(e<<2|g>>4);64!=f&&(c+=String.fromCharCode(g<<4&240|f>>2),64!=h&&(c+=String.fromCharCode(f<<6&192|h)))}};var G;function H(a,b){if(!a||b===u.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1}var I=function(){var a={};var b=t.google_tag_data;t.google_tag_data=void 0===b?a:b;a=t.google_tag_data;b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var J=/(.*?)\*(.*?)\*(.*)/,K=/([^?#]+)(\?[^#]*)?(#.*)?/,L=/(.*?)(^|&)_gl=([^&]*)&?(.*)/,N=function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!==d&&d===d&&null!==d&&"[object Object]"!==d.toString()&&(b.push(c),b.push(E(String(d))))}a=b.join("*");return["1",M(a),a].join("*")},M=function(a,b){a=[window.navigator.userAgent,(new Date).getTimezoneOffset(),window.navigator.userLanguage||window.navigator.language,Math.floor((new Date).getTime()/60/1E3)-(void 0===b?0:b),a].join("*");
6
- if(!(b=G)){b=Array(256);for(var c=0;256>c;c++){for(var d=c,e=0;8>e;e++)d=d&1?d>>>1^3988292384:d>>>1;b[c]=d}}G=b;b=4294967295;for(c=0;c<a.length;c++)b=b>>>8^G[(b^a.charCodeAt(c))&255];return((b^-1)>>>0).toString(36)},Q=function(a){return function(b){var c=z(t.location.href),d=c.search.replace("?","");a:{var e=d.split("&");for(var g=0;g<e.length;g++){var f=e[g].split("=");if("_gl"==decodeURIComponent(f[0]).replace(/\+/g," ")){e=f.slice(1).join("=");break a}}e=void 0}b.query=O(e||"")||{};e=y(c,"fragment");
7
- g=e.match(L);b.fragment=O(g&&g[3]||"")||{};a&&P(c,d,e)}};function R(a){var b=L.exec(a);if(b){var c=b[2],d=b[4];a=b[1];d&&(a=a+c+d)}return a}
8
- var P=function(a,b,c){function d(a,b){a=R(a);a.length&&(a=b+a);return a}t.history&&t.history.replaceState&&(L.test(b)||L.test(c))&&(a=y(a,"path"),b=d(b,"?"),c=d(c,"#"),t.history.replaceState({},void 0,""+a+b+c))},O=function(a){var b=void 0===b?3:b;try{if(a){a:{for(var c=0;3>c;++c){var d=J.exec(a);if(d){var e=d;break a}a=decodeURIComponent(a)}e=void 0}if(e&&"1"===e[1]){var g=e[2],f=e[3];a:{for(e=0;e<b;++e)if(g===M(f,e)){var h=!0;break a}h=!1}if(h){b={};var p=f?f.split("*"):[];for(f=0;f<p.length;f+=
9
- 2)b[p[f]]=F(p[f+1]);return b}}}}catch(Y){}};function S(a,b,c){function d(a){a=R(a);var b=a.charAt(a.length-1);a&&"&"!==b&&(a+="&");return a+f}c=void 0===c?!1:c;var e=K.exec(b);if(!e)return"";b=e[1];var g=e[2]||"";e=e[3]||"";var f="_gl="+a;c?e="#"+d(e.substring(1)):g="?"+d(g.substring(1));return""+b+g+e}
10
- function T(a,b,c){for(var d={},e={},g=I().decorators,f=0;f<g.length;++f){var h=g[f];(!c||h.forms)&&H(h.domains,b)&&(h.fragment?n(e,h.callback()):n(d,h.callback()))}q(d)&&(b=N(d),c?U(b,a):V(b,a,!1));!c&&q(e)&&(c=N(e),V(c,a,!0))}function V(a,b,c){b.href&&(a=S(a,b.href,void 0===c?!1:c),r.test(a)&&(b.href=a))}
11
- function U(a,b){if(b&&b.action){var c=(b.method||"").toLowerCase();if("get"===c){c=b.childNodes||[];for(var d=!1,e=0;e<c.length;e++){var g=c[e];if("_gl"===g.name){g.setAttribute("value",a);d=!0;break}}d||(c=u.createElement("input"),c.setAttribute("type","hidden"),c.setAttribute("name","_gl"),c.setAttribute("value",a),b.appendChild(c))}else"post"===c&&(a=S(a,b.action),r.test(a)&&(b.action=a))}}
12
- var W=function(a){try{a:{var b=a.target||a.srcElement||{};for(a=100;b&&0<a;){if(b.href&&b.nodeName.match(/^a(?:rea)?$/i)){var c=b;break a}b=b.parentNode;a--}c=null}if(c){var d=c.protocol;"http:"!==d&&"https:"!==d||T(c,c.hostname,!1)}}catch(e){}},X=function(a){try{var b=a.target||a.srcElement||{};if(b.action){var c=y(z(b.action),"host");T(b,c,!0)}}catch(d){}};l("google_tag_data.glBridge.auto",function(a,b,c,d){var e=I();e.init||(v("mousedown",W),v("keyup",W),v("submit",X),e.init=!0);a={callback:a,domains:b,fragment:"fragment"===c,forms:!!d};I().decorators.push(a)});l("google_tag_data.glBridge.decorate",function(a,b,c){c=!!c;a=N(a);if(b.tagName){if("a"==b.tagName.toLowerCase())return V(a,b,c);if("form"==b.tagName.toLowerCase())return U(a,b)}if("string"==typeof b)return S(a,b,c)});l("google_tag_data.glBridge.generate",N);
13
- l("google_tag_data.glBridge.get",function(a,b){var c=Q(!!b);b=I();b.data||(b.data={query:{},fragment:{}},c(b.data));c={};if(b=b.data)n(c,b.query),a&&n(c,b.fragment);return c});})(window);
14
- (function(){function La(a){var b=1,c;if(a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b};var $c=function(a){this.w=a||[]};$c.prototype.set=function(a){this.w[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b<this.w.length;b++)this.w[b]&&(a[Math.floor(b/6)]^=1<<b%6);for(b=0;b<a.length;b++)a[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(a[b]||0);return a.join("")+"~"};var vd=new $c;function J(a){vd.set(a)}var Td=function(a){a=Dd(a);a=new $c(a);for(var b=vd.w.slice(),c=0;c<a.w.length;c++)b[c]=b[c]||a.w[c];return(new $c(b)).encode()},Dd=function(a){a=a.get(Gd);ka(a)||(a=[]);return a};var ea=function(a){return"function"==typeof a},ka=function(a){return"[object Array]"==Object.prototype.toString.call(Object(a))},qa=function(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")},D=function(a,b){return 0==a.indexOf(b)},sa=function(a){return a?a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""},ra=function(){for(var a=O.navigator.userAgent+(M.cookie?M.cookie:"")+(M.referrer?M.referrer:""),b=a.length,c=O.history.length;0<c;)a+=c--^b++;return[hd()^La(a)&2147483647,Math.round((new Date).getTime()/
15
- 1E3)].join(".")},ta=function(a){var b=M.createElement("img");b.width=1;b.height=1;b.src=a;return b},ua=function(){},K=function(a){if(encodeURIComponent instanceof Function)return encodeURIComponent(a);J(28);return a},L=function(a,b,c,d){try{a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){J(27)}},f=/^[\w\-:/.?=&%!\[\]]+$/,wa=function(a,b,c){a&&(c?(c="",b&&f.test(b)&&(c=' id="'+b+'"'),f.test(a)&&M.write("<script"+c+' src="'+a+'">\x3c/script>')):(c=M.createElement("script"),
16
- c.type="text/javascript",c.async=!0,c.src=a,b&&(c.id=b),a=M.getElementsByTagName("script")[0],a.parentNode.insertBefore(c,a)))},be=function(a,b){return E(M.location[b?"href":"search"],a)},E=function(a,b){return(a=a.match("(?:&|#|\\?)"+K(b).replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==a.length?a[1]:""},xa=function(){var a=""+M.location.hostname;return 0==a.indexOf("www.")?a.substring(4):a},de=function(a,b){var c=a.indexOf(b);if(5==c||6==c)if(a=a.charAt(c+b.length),"/"==a||"?"==a||
17
- ""==a||":"==a)return!0;return!1},ya=function(a,b){var c=M.referrer;if(/^(https?|android-app):\/\//i.test(c)){if(a)return c;a="//"+M.location.hostname;if(!de(c,a))return b&&(b=a.replace(/\./g,"-")+".cdn.ampproject.org",de(c,b))?void 0:c}},za=function(a,b){if(1==b.length&&null!=b[0]&&"object"===typeof b[0])return b[0];for(var c={},d=Math.min(a.length+1,b.length),e=0;e<d;e++)if("object"===typeof b[e]){for(var g in b[e])b[e].hasOwnProperty(g)&&(c[g]=b[e][g]);break}else e<a.length&&(c[a[e]]=b[e]);return c};var ee=function(){this.keys=[];this.values={};this.m={}};ee.prototype.set=function(a,b,c){this.keys.push(a);c?this.m[":"+a]=b:this.values[":"+a]=b};ee.prototype.get=function(a){return this.m.hasOwnProperty(":"+a)?this.m[":"+a]:this.values[":"+a]};ee.prototype.map=function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b],d=this.get(c);d&&a(c,d)}};var O=window,M=document,va=function(a,b){return setTimeout(a,b)};var F=window,Ea=document,G=function(a){var b=F._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===F["ga-disable-"+a])return!0;try{var c=F.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(g){}a=[];b=String(Ea.cookie||document.cookie).split(";");for(c=0;c<b.length;c++){var d=b[c].split("="),e=d[0].replace(/^\s*|\s*$/g,"");e&&"AMP_TOKEN"==e&&((d=d.slice(1).join("=").replace(/^\s*|\s*$/g,""))&&(d=decodeURIComponent(d)),a.push(d))}for(b=0;b<a.length;b++)if("$OPT_OUT"==a[b])return!0;return!1};var Ca=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},zc=function(a,b,c,d,e,g){e=G(e)?!1:eb.test(M.location.hostname)||"/"==c&&vc.test(d)?!1:!0;if(!e)return!1;b&&1200<b.length&&(b=b.substring(0,1200));c=a+"="+b+"; path="+c+"; ";g&&(c+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");d&&"none"!==d&&(c+="domain="+d+";");d=M.cookie;M.cookie=c;if(!(d=d!=M.cookie))a:{a=Ca(a);
18
- for(d=0;d<a.length;d++)if(b==a[d]){d=!0;break a}d=!1}return d},Cc=function(a){return encodeURIComponent?encodeURIComponent(a).replace(/\(/g,"%28").replace(/\)/g,"%29"):a},vc=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,eb=/(^|\.)doubleclick\.net$/i;var oc,Id=/^.*Version\/?(\d+)[^\d].*$/i,ne=function(){if(void 0!==O.__ga4__)return O.__ga4__;if(void 0===oc){var a=O.navigator.userAgent;if(a){var b=a;try{b=decodeURIComponent(a)}catch(c){}if(a=!(0<=b.indexOf("Chrome"))&&!(0<=b.indexOf("CriOS"))&&(0<=b.indexOf("Safari/")||0<=b.indexOf("Safari,")))b=Id.exec(b),a=11<=(b?Number(b[1]):-1);oc=a}else oc=!1}return oc};var Fa,Ga,fb,Ab,ja=/^https?:\/\/[^/]*cdn\.ampproject\.org\//,Ue=/^(?:www\.|m\.|amp\.)+/,Ub=[],da=function(a){a:{if(ja.test(M.referrer)){var b=M.location.hostname.replace(Ue,"");b:{var c=M.referrer;c=c.replace(/^https?:\/\//,"");var d=c.replace(/^[^/]+/,"").split("/"),e=d[2];d=(d="s"==e?d[3]:e)?decodeURIComponent(d):d;if(!d){if(0==c.indexOf("xn--")){c="";break b}(c=c.match(/(.*)\.cdn\.ampproject\.org\/?$/))&&2==c.length&&(d=c[1].replace(/-/g,".").replace(/\.\./g,"-"))}c=d?d.replace(Ue,""):""}if(b==
19
- c){b=!0;break a}else J(78)}b=!1}if(b&&!1!==a[Kd]&&(void 0===Ab&&(b=(b=De.get())&&b._ga||void 0)&&(Ab=b,J(81)),void 0!==Ab))return a[Q]||(a[Q]=Ab),!1;if(a[Kd]){J(67);if(a[ac]&&"cookie"!=a[ac])return!1;if(void 0!==Ab)a[Q]||(a[Q]=Ab);else{a:if(b=String(a[W]||xa()),c=String(a[Yb]||"/"),d=Ca(String(a[U]||"_ga")),b=na(d,b,c),!b||jd.test(b))b=!0;else if(b=Ca("AMP_TOKEN"),0==b.length)b=!0;else{if(1==b.length&&(b=decodeURIComponent(b[0]),"$RETRIEVING"==b||"$OPT_OUT"==b||"$ERROR"==b||"$NOT_FOUND"==b)){b=!0;
20
- break a}b=!1}if(b&&tc(ic,String(a[Na])))return!0}}return!1},ic=function(){Z.D([ua])},tc=function(a,b){var c=Ca("AMP_TOKEN");if(1<c.length)return J(55),!1;c=decodeURIComponent(c[0]||"");if("$OPT_OUT"==c||"$ERROR"==c||G(b))return J(62),!1;if(!ja.test(M.referrer)&&"$NOT_FOUND"==c)return J(68),!1;if(void 0!==Ab)return J(56),va(function(){a(Ab)},0),!0;if(Fa)return Ub.push(a),!0;if("$RETRIEVING"==c)return J(57),va(function(){tc(a,b)},1E4),!0;Fa=!0;c&&"$"!=c[0]||(xc("$RETRIEVING",3E4),setTimeout(Mc,3E4),
21
- c="");return Pc(c,b)?(Ub.push(a),!0):!1},Pc=function(a,b,c){if(!window.JSON)return J(58),!1;var d=O.XMLHttpRequest;if(!d)return J(59),!1;var e=new d;if(!("withCredentials"in e))return J(60),!1;e.open("POST",(c||"https://ampcid.google.com/v1/publisher:getClientId")+"?key=AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM",!0);e.withCredentials=!0;e.setRequestHeader("Content-Type","text/plain");e.onload=function(){Fa=!1;if(4==e.readyState){try{200!=e.status&&(J(61),Qc("","$ERROR",3E4));var d=JSON.parse(e.responseText);
22
- d.optOut?(J(63),Qc("","$OPT_OUT",31536E6)):d.clientId?Qc(d.clientId,d.securityToken,31536E6):!c&&d.alternateUrl?(Ga&&clearTimeout(Ga),Fa=!0,Pc(a,b,d.alternateUrl)):(J(64),Qc("","$NOT_FOUND",36E5))}catch(ca){J(65),Qc("","$ERROR",3E4)}e=null}};d={originScope:"AMP_ECID_GOOGLE"};a&&(d.securityToken=a);e.send(JSON.stringify(d));Ga=va(function(){J(66);Qc("","$ERROR",3E4)},1E4);return!0},Mc=function(){Fa=!1},xc=function(a,b){if(void 0===fb){fb="";for(var c=id(),d=0;d<c.length;d++){var e=c[d];if(zc("AMP_TOKEN",
23
- encodeURIComponent(a),"/",e,"",b)){fb=e;return}}}zc("AMP_TOKEN",encodeURIComponent(a),"/",fb,"",b)},Qc=function(a,b,c){Ga&&clearTimeout(Ga);b&&xc(b,c);Ab=a;b=Ub;Ub=[];for(c=0;c<b.length;c++)b[c](a)};var oe=function(){return(Ba||"https:"==M.location.protocol?"https:":"http:")+"//www.google-analytics.com"},Da=function(a){this.name="len";this.message=a+"-8192"},ba=function(a,b,c){c=c||ua;if(2036>=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},pe=function(a,b,c,d){d=d||ua;wd(a+"?"+b,"",d,c)},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c,d){var e=O.XMLHttpRequest;
24
- if(!e)return!1;var g=new e;if(!("withCredentials"in g))return!1;a=a.replace(/^http:/,"https:");g.open("POST",a,!0);g.withCredentials=!0;g.setRequestHeader("Content-Type","text/plain");g.onreadystatechange=function(){if(4==g.readyState){if(d)try{var a=g.responseText;if(1>a.length)ge("xhr","ver","0"),c();else if("1"!=a.charAt(0))ge("xhr","ver",String(a.length)),c();else if(3<d.count++)ge("xhr","tmr",""+d.count),c();else if(1==a.length)c();else{var b=a.charAt(1);if("d"==b)pe("https://stats.g.doubleclick.net/j/collect",
25
- d.U,d,c);else if("g"==b){var e="https://www.google.%/ads/ga-audiences".replace("%","com");wc(e,d.google,c);var w=a.substring(2);if(w)if(/^[a-z.]{1,6}$/.test(w)){var ha="https://www.google.%/ads/ga-audiences".replace("%",w);wc(ha,d.google,ua)}else ge("tld","bcc",w)}else ge("xhr","brc",b),c()}}catch(ue){ge("xhr","rsp"),c()}else c();g=null}};g.send(b);return!0},x=function(a,b,c){return O.navigator.sendBeacon?O.navigator.sendBeacon(a,b)?(c(),!0):!1:!1},ge=function(a,b,c){1<=100*Math.random()||G("?")||
26
- (a=["t=error","_e="+a,"_v=j72","sr=1"],b&&a.push("_f="+b),c&&a.push("_m="+K(c.substring(0,100))),a.push("aip=1"),a.push("z="+hd()),wc("https://www.google-analytics.com/u/d",a.join("&"),ua))};var h=function(a){var b=O.gaData=O.gaData||{};return b[a]=b[a]||{}};var Ha=function(){this.M=[]};Ha.prototype.add=function(a){this.M.push(a)};Ha.prototype.D=function(a){try{for(var b=0;b<this.M.length;b++){var c=a.get(this.M[b]);c&&ea(c)&&c.call(O,a)}}catch(d){}b=a.get(Ia);b!=ua&&ea(b)&&(a.set(Ia,ua,!0),setTimeout(b,10))};function Ja(a){if(100!=a.get(Ka)&&La(P(a,Q))%1E4>=100*R(a,Ka))throw"abort";}function Ma(a){if(G(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";}
27
- function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(c){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var b=[];Qa.map(function(c,d){d.F&&(c=a.get(c),void 0!=c&&c!=d.defaultValue&&("boolean"==typeof c&&(c*=1),b.push(d.F+"="+K(""+c))))});b.push("z="+Bd());a.set(Ra,b.join("&"),!0)}
28
- function Sa(a){var b=P(a,gd)||oe()+"/collect",c=a.get(qe),d=P(a,fa);!d&&a.get(Vd)&&(d="beacon");if(c)pe(b,P(a,Ra),c,a.get(Ia));else if(d){c=d;d=P(a,Ra);var e=a.get(Ia);e=e||ua;"image"==c?wc(b,d,e):"xhr"==c&&wd(b,d,e)||"beacon"==c&&x(b,d,e)||ba(b,d,e)}else ba(b,P(a,Ra),a.get(Ia));b=a.get(Na);b=h(b);c=b.hitcount;b.hitcount=c?c+1:1;b=a.get(Na);delete h(b).pending_experiments;a.set(Ia,ua,!0)}
29
- function Hc(a){(O.gaData=O.gaData||{}).expId&&a.set(Nc,(O.gaData=O.gaData||{}).expId);(O.gaData=O.gaData||{}).expVar&&a.set(Oc,(O.gaData=O.gaData||{}).expVar);var b=a.get(Na);if(b=h(b).pending_experiments){var c=[];for(d in b)b.hasOwnProperty(d)&&b[d]&&c.push(encodeURIComponent(d)+"."+encodeURIComponent(b[d]));var d=c.join("!")}else d=void 0;d&&a.set(m,d,!0)}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}
30
- function yd(a){var b=O.gaDevIds;ka(b)&&0!=b.length&&a.set("&did",b.join(","),!0)}function vb(a){if(!a.get(Na))throw"abort";};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}};function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){c=R(a,Wa);var d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0<e&&(c=Math.min(c+e,20),a.set(Xa,d));if(0>=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee},Qa=new ee,Za=[];Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){a=a.get(b);return void 0==a?"":""+a},R=function(a,b){a=a.get(b);return void 0==a||""===a?0:1*a};Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};
31
- var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)},bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=Qa.get(a);if(!b)for(var c=0;c<Za.length;c++){var d=Za[c],e=d[0].exec(a);if(e){b=d[1](e);Qa.set(b.name,b);break}}return b},yc=function(a){var b;Qa.map(function(c,d){d.F==a&&(b=d)});return b&&b.name},S=function(a,b,c,d,e){a=new bb(a,b,c,d,e);Qa.set(a.name,a);return a.name},cb=function(a,
32
- b){Za.push([new RegExp("^"+a+"$"),b])},T=function(a,b,c){return S(a,b,c,void 0,db)},db=function(){};var gb=qa(window.GoogleAnalyticsObject)&&sa(window.GoogleAnalyticsObject)||"ga",jd=/^(?:utma\.)?\d+\.\d+$/,kd=/^amp-[\w.-]{22,64}$/,Ba=!1,hb=T("apiVersion","v"),ib=T("clientVersion","_v");S("anonymizeIp","aip");var jb=S("adSenseId","a"),Va=S("hitType","t"),Ia=S("hitCallback"),Ra=S("hitPayload");S("nonInteraction","ni");S("currencyCode","cu");S("dataSource","ds");var Vd=S("useBeacon",void 0,!1),fa=S("transport");S("sessionControl","sc","");S("sessionGroup","sg");S("queueTime","qt");var Ac=S("_s","_s");
33
- S("screenName","cd");var kb=S("location","dl",""),lb=S("referrer","dr"),mb=S("page","dp","");S("hostname","dh");var nb=S("language","ul"),ob=S("encoding","de");S("title","dt",function(){return M.title||void 0});cb("contentGroup([0-9]+)",function(a){return new bb(a[0],"cg"+a[1])});var pb=S("screenColors","sd"),qb=S("screenResolution","sr"),rb=S("viewportSize","vp"),sb=S("javaEnabled","je"),tb=S("flashVersion","fl");S("campaignId","ci");S("campaignName","cn");S("campaignSource","cs");
34
- S("campaignMedium","cm");S("campaignKeyword","ck");S("campaignContent","cc");
35
- var ub=S("eventCategory","ec"),xb=S("eventAction","ea"),yb=S("eventLabel","el"),zb=S("eventValue","ev"),Bb=S("socialNetwork","sn"),Cb=S("socialAction","sa"),Db=S("socialTarget","st"),Eb=S("l1","plt"),Fb=S("l2","pdt"),Gb=S("l3","dns"),Hb=S("l4","rrt"),Ib=S("l5","srt"),Jb=S("l6","tcp"),Kb=S("l7","dit"),Lb=S("l8","clt"),Ve=S("l9","_gst"),We=S("l10","_gbt"),Xe=S("l11","_cst"),Ye=S("l12","_cbt"),Mb=S("timingCategory","utc"),Nb=S("timingVar","utv"),Ob=S("timingLabel","utl"),Pb=S("timingValue","utt");
36
- S("appName","an");S("appVersion","av","");S("appId","aid","");S("appInstallerId","aiid","");S("exDescription","exd");S("exFatal","exf");var Nc=S("expId","xid"),Oc=S("expVar","xvar"),m=S("exp","exp"),Rc=S("_utma","_utma"),Sc=S("_utmz","_utmz"),Tc=S("_utmht","_utmht"),Ua=S("_hc",void 0,0),Xa=S("_ti",void 0,0),Wa=S("_to",void 0,20);cb("dimension([0-9]+)",function(a){return new bb(a[0],"cd"+a[1])});cb("metric([0-9]+)",function(a){return new bb(a[0],"cm"+a[1])});S("linkerParam",void 0,void 0,Bc,db);
37
- var Ze=T("_cd2l",void 0,!1),ld=S("usage","_u"),Gd=S("_um");S("forceSSL",void 0,void 0,function(){return Ba},function(a,b,c){J(34);Ba=!!c});var ed=S("_j1","jid"),ia=S("_j2","gjid");cb("\\&(.*)",function(a){var b=new bb(a[0],a[1]),c=yc(a[0].substring(1));c&&(b.Z=function(a){return a.get(c)},b.o=function(a,b,g,ca){a.set(c,g,ca)},b.F=void 0);return b});
38
- var Qb=T("_oot"),dd=S("previewTask"),Rb=S("checkProtocolTask"),md=S("validationTask"),Sb=S("checkStorageTask"),Uc=S("historyImportTask"),Tb=S("samplerTask"),Vb=S("_rlt"),Wb=S("buildHitTask"),Xb=S("sendHitTask"),Vc=S("ceTask"),zd=S("devIdTask"),Cd=S("timingTask"),Ld=S("displayFeaturesTask"),oa=S("customTask"),V=T("name"),Q=T("clientId","cid"),n=T("clientIdTime"),xd=T("storedClientId"),Ad=S("userId","uid"),Na=T("trackingId","tid"),U=T("cookieName",void 0,"_ga"),W=T("cookieDomain"),Yb=T("cookiePath",
39
- void 0,"/"),Zb=T("cookieExpires",void 0,63072E3),Hd=T("cookieUpdate",void 0,!0),$b=T("legacyCookieDomain"),Wc=T("legacyHistoryImport",void 0,!0),ac=T("storage",void 0,"cookie"),bc=T("allowLinker",void 0,!1),cc=T("allowAnchor",void 0,!0),Ka=T("sampleRate","sf",100),dc=T("siteSpeedSampleRate",void 0,1),ec=T("alwaysSendReferrer",void 0,!1),I=T("_gid","_gid"),la=T("_gcn"),Kd=T("useAmpClientId"),ce=T("_gclid"),fe=T("_gt"),he=T("_ge",void 0,7776E6),ie=T("_gclsrc"),je=T("storeGac",void 0,!0),gd=S("transportUrl"),
40
- Md=S("_r","_r"),qe=S("_dp"),Ud=S("allowAdFeatures",void 0,!0);function X(a,b,c,d){b[a]=function(){try{return d&&J(d),c.apply(this,arguments)}catch(e){throw ge("exc",a,e&&e.name),e;}}};var Od=function(){this.V=100;this.$=this.fa=!1;this.oa="detourexp";this.groups=1},Ed=function(a){var b=new Od,c;if(b.fa&&b.$)return 0;b.$=!0;if(a){if(b.oa&&void 0!==a.get(b.oa))return R(a,b.oa);if(0==a.get(dc))return 0}if(0==b.V)return 0;void 0===c&&(c=Bd());return 0==c%b.V?Math.floor(c/b.V)%b.groups+1:0};function fc(){var a,b;if((b=(b=O.navigator)?b.plugins:null)&&b.length)for(var c=0;c<b.length&&!a;c++){var d=b[c];-1<d.name.indexOf("Shockwave Flash")&&(a=d.description)}if(!a)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),a="WIN 6,0,21,0",e.AllowScriptAccess="always",a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),a=e.GetVariable("$version")}catch(g){}a&&
41
- (e=a.match(/[\d]+/g))&&3<=e.length&&(a=e[0]+"."+e[1]+" r"+e[2]);return a||void 0};var aa=function(a){var b=Math.min(R(a,dc),100);return La(P(a,Q))%100>=b?!1:!0},gc=function(a){var b={};if(Ec(b)||Fc(b)){var c=b[Eb];void 0==c||Infinity==c||isNaN(c)||(0<c?(Y(b,Gb),Y(b,Jb),Y(b,Ib),Y(b,Fb),Y(b,Hb),Y(b,Kb),Y(b,Lb),Y(b,Ve),Y(b,We),Y(b,Xe),Y(b,Ye),va(function(){a(b)},10)):L(O,"load",function(){gc(a)},!1))}},Ec=function(a){var b=O.performance||O.webkitPerformance;b=b&&b.timing;if(!b)return!1;var c=b.navigationStart;if(0==c)return!1;a[Eb]=b.loadEventStart-c;a[Gb]=b.domainLookupEnd-b.domainLookupStart;
42
- a[Jb]=b.connectEnd-b.connectStart;a[Ib]=b.responseStart-b.requestStart;a[Fb]=b.responseEnd-b.responseStart;a[Hb]=b.fetchStart-c;a[Kb]=b.domInteractive-c;a[Lb]=b.domContentLoadedEventStart-c;a[Ve]=N.L-c;a[We]=N.ya-c;O.google_tag_manager&&O.google_tag_manager._li&&(b=O.google_tag_manager._li,a[Xe]=b.cst,a[Ye]=b.cbt);return!0},Fc=function(a){if(O.top!=O)return!1;var b=O.external,c=b&&b.onloadT;b&&!b.isValidLoadTime&&(c=void 0);2147483648<c&&(c=void 0);0<c&&b.setPageReadyTime();if(void 0==c)return!1;
43
- a[Eb]=c;return!0},Y=function(a,b){var c=a[b];if(isNaN(c)||Infinity==c||0>c)a[b]=void 0},Fd=function(a){return function(b){if("pageview"==b.get(Va)&&!a.I){a.I=!0;var c=aa(b),d=0<E(b.get(kb),"gclid").length;(c||d)&&gc(function(b){c&&a.send("timing",b);d&&a.send("adtiming",b)})}}};var hc=!1,mc=function(a){if("cookie"==P(a,ac)){if(a.get(Hd)||P(a,xd)!=P(a,Q)){var b=1E3*R(a,Zb);ma(a,Q,U,b)}ma(a,I,la,864E5);if(a.get(je)){var c=a.get(ce);if(c){var d=Math.min(R(a,he),1E3*R(a,Zb));d=Math.min(d,1E3*R(a,fe)+d-(new Date).getTime());a.data.set(he,d);b={};var e=a.get(fe),g=a.get(ie),ca=kc(P(a,Yb)),l=lc(P(a,W));a=P(a,Na);g&&"aw.ds"!=g?b&&(b.ua=!0):(c=["1",e,Cc(c)].join("."),0<d&&(b&&(b.ta=!0),zc("_gac_"+Cc(a),c,ca,l,a,d)));le(b)}}else J(75)}},ma=function(a,b,c,d){var e=nd(a,b);if(e){c=
44
- P(a,c);var g=kc(P(a,Yb)),ca=lc(P(a,W)),l=P(a,Na);if("auto"!=ca)zc(c,e,g,ca,l,d)&&(hc=!0);else{J(32);for(var k=id(),w=0;w<k.length;w++)if(ca=k[w],a.data.set(W,ca),e=nd(a,b),zc(c,e,g,ca,l,d)){hc=!0;return}a.data.set(W,"auto")}}},nc=function(a){if("cookie"==P(a,ac)&&!hc&&(mc(a),!hc))throw"abort";},Yc=function(a){if(a.get(Wc)){var b=P(a,W),c=P(a,$b)||xa(),d=Xc("__utma",c,b);d&&(J(19),a.set(Tc,(new Date).getTime(),!0),a.set(Rc,d.R),(b=Xc("__utmz",c,b))&&d.hash==b.hash&&a.set(Sc,b.R))}},nd=function(a,b){b=
45
- Cc(P(a,b));var c=lc(P(a,W)).split(".").length;a=jc(P(a,Yb));1<a&&(c+="-"+a);return b?["GA1",c,b].join("."):""},Xd=function(a,b){return na(b,P(a,W),P(a,Yb))},na=function(a,b,c){if(!a||1>a.length)J(12);else{for(var d=[],e=0;e<a.length;e++){var g=a[e];var ca=g.split(".");var l=ca.shift();("GA1"==l||"1"==l)&&1<ca.length?(g=ca.shift().split("-"),1==g.length&&(g[1]="1"),g[0]*=1,g[1]*=1,ca={H:g,s:ca.join(".")}):ca=kd.test(g)?{H:[0,0],s:g}:void 0;ca&&d.push(ca)}if(1==d.length)return J(13),d[0].s;if(0==d.length)J(12);
46
- else{J(14);d=Gc(d,lc(b).split(".").length,0);if(1==d.length)return d[0].s;d=Gc(d,jc(c),1);1<d.length&&J(41);return d[0]&&d[0].s}}},Gc=function(a,b,c){for(var d=[],e=[],g,ca=0;ca<a.length;ca++){var l=a[ca];l.H[c]==b?d.push(l):void 0==g||l.H[c]<g?(e=[l],g=l.H[c]):l.H[c]==g&&e.push(l)}return 0<d.length?d:e},lc=function(a){return 0==a.indexOf(".")?a.substr(1):a},id=function(){var a=[],b=xa().split(".");if(4==b.length){var c=b[b.length-1];if(parseInt(c,10)==c)return["none"]}for(c=b.length-2;0<=c;c--)a.push(b.slice(c).join("."));
47
- b=M.location.hostname;eb.test(b)||vc.test(b)||a.push("none");return a},kc=function(a){if(!a)return"/";1<a.length&&a.lastIndexOf("/")==a.length-1&&(a=a.substr(0,a.length-1));0!=a.indexOf("/")&&(a="/"+a);return a},jc=function(a){a=kc(a);return"/"==a?1:a.split("/").length},le=function(a){a.ta&&J(77);a.na&&J(74);a.pa&&J(73);a.ua&&J(69)};function Xc(a,b,c){"none"==b&&(b="");var d=[],e=Ca(a);a="__utma"==a?6:2;for(var g=0;g<e.length;g++){var ca=(""+e[g]).split(".");ca.length>=a&&d.push({hash:ca[0],R:e[g],O:ca})}if(0!=d.length)return 1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){if(null==a)var c=a=1;else c=La(a),a=La(D(a,".")?a.substring(1):"."+a);for(var d=0;d<b.length;d++)if(b[d].hash==c||b[d].hash==a)return b[d]};var od=new RegExp(/^https?:\/\/([^\/:]+)/),De=O.google_tag_data.glBridge,pd=/(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)/,me=/(.*)([?&#])(?:_gac=[^&#]*)(?:&?)(.*)/;function Bc(a){if(a.get(Ze))return J(35),De.generate($e(a));var b=a.get(Q),c=a.get(I)||"";b="_ga=2."+K(pa(c+b,0)+"."+c+"-"+b);(a=af(a))?(J(44),a="&_gac=1."+K([pa(a.qa,0),a.timestamp,a.qa].join("."))):a="";return b+a}
48
- function Ic(a,b){var c=new Date,d=O.navigator,e=d.plugins||[];a=[a,d.userAgent,c.getTimezoneOffset(),c.getYear(),c.getDate(),c.getHours(),c.getMinutes()+b];for(b=0;b<e.length;++b)a.push(e[b].description);return La(a.join("."))}function pa(a,b){var c=new Date,d=O.navigator,e=c.getHours()+Math.floor((c.getMinutes()+b)/60);return La([a,d.userAgent,d.language||"",c.getTimezoneOffset(),c.getYear(),c.getDate()+Math.floor(e/24),(24+e)%24,(60+c.getMinutes()+b)%60].join("."))}
49
- var Dc=function(a){J(48);this.target=a;this.T=!1};Dc.prototype.ca=function(a,b){if(a){if(this.target.get(Ze))return De.decorate($e(this.target),a,b);if(a.tagName){if("a"==a.tagName.toLowerCase()){a.href&&(a.href=qd(this,a.href,b));return}if("form"==a.tagName.toLowerCase())return rd(this,a)}if("string"==typeof a)return qd(this,a,b)}};
50
- var qd=function(a,b,c){var d=pd.exec(b);d&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));(d=me.exec(b))&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));a=a.target.get("linkerParam");var e=b.indexOf("?");d=b.indexOf("#");c?b+=(-1==d?"#":"&")+a:(c=-1==e?"?":"&",b=-1==d?b+(c+a):b.substring(0,d)+c+a+b.substring(d));b=b.replace(/&+_ga=/,"&_ga=");return b=b.replace(/&+_gac=/,"&_gac=")},rd=function(a,b){if(b&&b.action)if("get"==b.method.toLowerCase()){a=a.target.get("linkerParam").split("&");for(var c=0;c<a.length;c++){var d=
51
- a[c].split("="),e=d[1];d=d[0];for(var g=b.childNodes||[],ca=!1,l=0;l<g.length;l++)if(g[l].name==d){g[l].setAttribute("value",e);ca=!0;break}ca||(g=M.createElement("input"),g.setAttribute("type","hidden"),g.setAttribute("name",d),g.setAttribute("value",e),b.appendChild(g))}}else"post"==b.method.toLowerCase()&&(b.action=qd(a,b.action))};
52
- Dc.prototype.S=function(a,b,c){function d(c){try{c=c||O.event;a:{var d=c.target||c.srcElement;for(c=100;d&&0<c;){if(d.href&&d.nodeName.match(/^a(?:rea)?$/i)){var g=d;break a}d=d.parentNode;c--}g={}}("http:"==g.protocol||"https:"==g.protocol)&&sd(a,g.hostname||"")&&g.href&&(g.href=qd(e,g.href,b))}catch(k){J(26)}}var e=this;this.target.get(Ze)?De.auto(function(){return $e(e.target)},a,b?"fragment":"",c):(this.T||(this.T=!0,L(M,"mousedown",d,!1),L(M,"keyup",d,!1)),c&&L(M,"submit",function(b){b=b||O.event;
53
- if((b=b.target||b.srcElement)&&b.action){var c=b.action.match(od);c&&sd(a,c[1])&&rd(e,b)}}))};function sd(a,b){if(b==M.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1}function ke(a,b){return b!=Ic(a,0)&&b!=Ic(a,-1)&&b!=Ic(a,-2)&&b!=pa(a,0)&&b!=pa(a,-1)&&b!=pa(a,-2)}function $e(a){var b=af(a);return{_ga:a.get(Q),_gid:a.get(I)||void 0,_gac:b?[b.qa,b.timestamp].join("."):void 0}}
54
- function af(a){function b(a){return void 0==a||""===a?0:Number(a)}var c=a.get(ce);if(c&&a.get(je)){var d=b(a.get(fe));if(1E3*d+b(a.get(he))<=(new Date).getTime())J(76);else return{timestamp:d,qa:c}}};var p=/^(GTM|OPT)-[A-Z0-9]+$/,q=/;_gaexp=[^;]*/g,r=/;((__utma=)|([^;=]+=GAX?\d+\.))[^;]*/g,Aa=/^https?:\/\/[\w\-.]+\.google.com(:\d+)?\/optimize\/opt-launch\.html\?.*$/,t=function(a){function b(a,b){b&&(c+="&"+a+"="+K(b))}var c="https://www.google-analytics.com/gtm/js?id="+K(a.id);"dataLayer"!=a.B&&b("l",a.B);b("t",a.target);b("cid",a.clientId);b("cidt",a.ka);b("gac",a.la);b("aip",a.ia);a.sync&&b("m","sync");b("cycle",a.G);a.qa&&b("gclid",a.qa);Aa.test(M.referrer)&&b("cb",String(hd()));return c};var Jd=function(a,b,c){this.aa=b;(b=c)||(b=(b=P(a,V))&&"t0"!=b?Wd.test(b)?"_gat_"+Cc(P(a,Na)):"_gat_"+Cc(b):"_gat");this.Y=b;this.ra=null},Rd=function(a,b){var c=b.get(Wb);b.set(Wb,function(b){Pd(a,b,ed);Pd(a,b,ia);var d=c(b);Qd(a,b);return d});var d=b.get(Xb);b.set(Xb,function(b){var c=d(b);if(se(b)){if(ne()!==H(a,b)){J(80);var e={U:re(a,b,1),google:re(a,b,2),count:0};pe("https://stats.g.doubleclick.net/j/collect",e.U,e)}else ta(re(a,b,0));b.set(ed,"",!0)}return c})},Pd=function(a,b,c){!1===b.get(Ud)||
55
- b.get(c)||("1"==Ca(a.Y)[0]?b.set(c,"",!0):b.set(c,""+hd(),!0))},Qd=function(a,b){se(b)&&zc(a.Y,"1",b.get(Yb),b.get(W),b.get(Na),6E4)},se=function(a){return!!a.get(ed)&&a.get(Ud)},re=function(a,b,c){var d=new ee,e=function(a){$a(a).F&&d.set($a(a).F,b.get(a))};e(hb);e(ib);e(Na);e(Q);e(ed);if(0==c||1==c)e(Ad),e(ia),e(I);d.set($a(ld).F,Td(b));var g="";d.map(function(a,b){g+=K(a)+"=";g+=K(""+b)+"&"});g+="z="+hd();0==c?g=a.aa+g:1==c?g="t=dc&aip=1&_r=3&"+g:2==c&&(g="t=sr&aip=1&_r=4&slf_rd=1&"+g);return g},
56
- H=function(a,b){null===a.ra&&(a.ra=1===Ed(b),a.ra&&J(33));return a.ra},Wd=/^gtm\d+$/;var fd=function(a,b){a=a.b;if(!a.get("dcLoaded")){var c=new $c(Dd(a));c.set(29);a.set(Gd,c.w);b=b||{};var d;b[U]&&(d=Cc(b[U]));b=new Jd(a,"https://stats.g.doubleclick.net/r/collect?t=dc&aip=1&_r=3&",d);Rd(b,a);a.set("dcLoaded",!0)}};var Sd=function(a){if(!a.get("dcLoaded")&&"cookie"==a.get(ac)){var b=new Jd(a);Pd(b,a,ed);Pd(b,a,ia);Qd(b,a);if(se(a)){var c=ne()!==H(b,a);a.set(Md,1,!0);c?(J(79),a.set(gd,oe()+"/j/collect",!0),a.set(qe,{U:re(b,a,1),google:re(b,a,2),count:0},!0)):a.set(gd,oe()+"/r/collect",!0)}}};var Lc=function(){var a=O.gaGlobal=O.gaGlobal||{};return a.hid=a.hid||hd()};var ad,bd=function(a,b,c){if(!ad){var d=M.location.hash;var e=O.name,g=/^#?gaso=([^&]*)/;if(e=(d=(d=d&&d.match(g)||e&&e.match(g))?d[1]:Ca("GASO")[0]||"")&&d.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))zc("GASO",""+d,c,b,a,0),window._udo||(window._udo=b),window._utcp||(window._utcp=c),a=e[1],wa("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+hd(),"_gasojs");ad=!0}};var wb=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,pc=function(a){function b(a,b){d.b.data.set(a,b)}function c(a,c){b(a,c);d.filters.add(a)}var d=this;this.b=new Ya;this.filters=new Ha;b(V,a[V]);b(Na,sa(a[Na]));b(U,a[U]);b(W,a[W]||xa());b(Yb,a[Yb]);b(Zb,a[Zb]);b(Hd,a[Hd]);b($b,a[$b]);b(Wc,a[Wc]);b(bc,a[bc]);b(cc,a[cc]);b(Ka,a[Ka]);b(dc,a[dc]);b(ec,a[ec]);b(ac,a[ac]);b(Ad,a[Ad]);b(n,a[n]);b(Kd,a[Kd]);b(je,a[je]);b(Ze,a[Ze]);b(hb,1);b(ib,"j72");c(Qb,Ma);c(oa,ua);c(dd,cd);c(Rb,Oa);c(md,vb);c(Sb,nc);c(Uc,Yc);c(Tb,
57
- Ja);c(Vb,Ta);c(Vc,Hc);c(zd,yd);c(Ld,Sd);c(Wb,Pa);c(Xb,Sa);c(Cd,Fd(this));Kc(this.b);Jc(this.b,a[Q]);this.b.set(jb,Lc());bd(this.b.get(Na),this.b.get(W),this.b.get(Yb))},Jc=function(a,b){var c=P(a,U);a.data.set(la,"_ga"==c?"_gid":c+"_gid");if("cookie"==P(a,ac)){hc=!1;c=Ca(P(a,U));c=Xd(a,c);if(!c){c=P(a,W);var d=P(a,$b)||xa();c=Xc("__utma",d,c);void 0!=c?(J(10),c=c.O[1]+"."+c.O[2]):c=void 0}c&&(hc=!0);if(d=c&&!a.get(Hd))if(d=c.split("."),2!=d.length)d=!1;else if(d=Number(d[1])){var e=R(a,Zb);d=d+e<
58
- (new Date).getTime()/1E3}else d=!1;d&&(c=void 0);c&&(a.data.set(xd,c),a.data.set(Q,c),c=Ca(P(a,la)),(c=Xd(a,c))&&a.data.set(I,c));if(a.get(je)&&(c=a.get(ce),d=a.get(ie),!c||d&&"aw.ds"!=d)){c={};if(M){d=[];e=M.cookie.split(";");for(var g=/^\s*_gac_(UA-\d+-\d+)=\s*(.+?)\s*$/,ca=0;ca<e.length;ca++){var l=e[ca].match(g);l&&d.push({ja:l[1],value:l[2]})}e={};if(d&&d.length)for(g=0;g<d.length;g++)(ca=d[g].value.split("."),"1"!=ca[0]||3!=ca.length)?c&&(c.na=!0):ca[1]&&(e[d[g].ja]?c&&(c.pa=!0):e[d[g].ja]=
59
- [],e[d[g].ja].push({timestamp:ca[1],qa:ca[2]}));d=e}else d={};d=d[P(a,Na)];le(c);d&&0!=d.length&&(c=d[0],a.data.set(fe,c.timestamp),a.data.set(ce,c.qa))}}if(a.get(Hd)&&(c=be("_ga",a.get(cc)),d=be("_gl",a.get(cc)),e=De.get(a.get(cc)),g=e._ga,d&&0<d.indexOf("_ga")&&!g&&J(30),c||g))if(c&&g&&J(36),a.get(bc)){if(g&&(J(38),a.data.set(Q,g),e._gid&&(J(51),a.data.set(I,e._gid)),e._gac&&(d=e._gac.split("."))&&2==d.length&&(J(37),a.data.set(ce,d[0]),a.data.set(fe,d[1]))),c)b:if(d=c.indexOf("."),-1==d)J(22);
60
- else{e=c.substring(0,d);g=c.substring(d+1);d=g.indexOf(".");c=g.substring(0,d);g=g.substring(d+1);if("1"==e){if(d=g,ke(d,c)){J(23);break b}}else if("2"==e){d=g.indexOf("-");e="";0<d?(e=g.substring(0,d),d=g.substring(d+1)):d=g.substring(1);if(ke(e+d,c)){J(53);break b}e&&(J(2),a.data.set(I,e))}else{J(22);break b}J(11);a.data.set(Q,d);if(c=be("_gac",a.get(cc)))c=c.split("."),"1"!=c[0]||4!=c.length?J(72):ke(c[3],c[1])?J(71):(a.data.set(ce,c[3]),a.data.set(fe,c[2]),J(70))}}else J(21);b&&(J(9),a.data.set(Q,
61
- K(b)));a.get(Q)||((b=(b=O.gaGlobal&&O.gaGlobal.vid)&&-1!=b.search(jd)?b:void 0)?(J(17),a.data.set(Q,b)):(J(8),a.data.set(Q,ra())));a.get(I)||(J(3),a.data.set(I,ra()));mc(a)},Kc=function(a){var b=O.navigator,c=O.screen,d=M.location;a.set(lb,ya(a.get(ec),a.get(Kd)));if(d){var e=d.pathname||"";"/"!=e.charAt(0)&&(J(31),e="/"+e);a.set(kb,d.protocol+"//"+d.hostname+e+d.search)}c&&a.set(qb,c.width+"x"+c.height);c&&a.set(pb,c.colorDepth+"-bit");c=M.documentElement;var g=(e=M.body)&&e.clientWidth&&e.clientHeight,
62
- ca=[];c&&c.clientWidth&&c.clientHeight&&("CSS1Compat"===M.compatMode||!g)?ca=[c.clientWidth,c.clientHeight]:g&&(ca=[e.clientWidth,e.clientHeight]);c=0>=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);a.set(tb,fc());a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,(b&&(b.language||b.browserLanguage)||"").toLowerCase());a.data.set(ce,be("gclid",!0));a.data.set(ie,be("gclsrc",!0));a.data.set(fe,Math.round((new Date).getTime()/1E3));if(d&&a.get(cc)&&
63
- (b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(c=0;c<b.length;++c)(D(b[c],"utm_id")||D(b[c],"utm_campaign")||D(b[c],"utm_source")||D(b[c],"utm_medium")||D(b[c],"utm_term")||D(b[c],"utm_content")||D(b[c],"gclid")||D(b[c],"dclid")||D(b[c],"gclsrc"))&&d.push(b[c]);0<d.length&&(b="#"+d.join("&"),a.set(kb,a.get(kb)+b))}};pc.prototype.get=function(a){return this.b.get(a)};pc.prototype.set=function(a,b){this.b.set(a,b)};var qc={pageview:[mb],event:[ub,xb,yb,zb],social:[Bb,Cb,Db],timing:[Mb,Nb,Pb,Ob]};
64
- pc.prototype.send=function(a){if(!(1>arguments.length)){if("string"===typeof arguments[0]){var b=arguments[0];var c=[].slice.call(arguments,1)}else b=arguments[0]&&arguments[0][Va],c=arguments;b&&(c=za(qc[b]||[],c),c[Va]=b,this.b.set(c,void 0,!0),this.filters.D(this.b),this.b.data.m={})}};pc.prototype.ma=function(a,b){var c=this;u(a,c,b)||(v(a,function(){u(a,c,b)}),y(String(c.get(V)),a,void 0,b,!0))};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0},z=function(a){if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}};var td=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=td.exec(a[0]);null!=b&&4==b.length&&(this.c=b[1]||"t0",this.K=b[2]||"",this.C=b[3],this.a=[].slice.call(a,1),this.K||(this.A="create"==this.C,this.i="require"==this.C,this.g="provide"==this.C,this.ba="remove"==this.C),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(qa(this.a[1])?this.X=this.a[1]:this.W=this.a[1])));b=a[1];a=a[2];if(!this.C)throw"abort";if(this.i&&(!qa(b)||""==b))throw"abort";
65
- if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.c)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d,A;Yd=new ee;$d=new ee;A=new ee;Zd={ec:45,ecommerce:46,linkid:47};
66
- var u=function(a,b,c){b==N||b.get(V);var d=Yd.get(a);if(!ea(d))return!1;b.plugins_=b.plugins_||new ee;if(b.plugins_.get(a))return!0;b.plugins_.set(a,new d(b,c||{}));return!0},y=function(a,b,c,d,e){if(!ea(Yd.get(b))&&!$d.get(b)){Zd.hasOwnProperty(b)&&J(Zd[b]);if(p.test(b)){J(52);a=N.j(a);if(!a)return!0;c=d||{};d={id:b,B:c.dataLayer||"dataLayer",ia:!!a.get("anonymizeIp"),sync:e,G:!1};a.get("&gtm")==b&&(d.G=!0);var g=String(a.get("name"));"t0"!=g&&(d.target=g);G(String(a.get("trackingId")))||(d.clientId=
67
- String(a.get(Q)),d.ka=Number(a.get(n)),c=c.palindrome?r:q,c=(c=M.cookie.replace(/^|(; +)/g,";").match(c))?c.sort().join("").substring(1):void 0,d.la=c,d.qa=E(a.b.get(kb)||"","gclid"));a=d.B;c=(new Date).getTime();O[a]=O[a]||[];c={"gtm.start":c};e||(c.event="gtm.js");O[a].push(c);c=t(d)}!c&&Zd.hasOwnProperty(b)?(J(39),c=b+".js"):J(43);c&&(c&&0<=c.indexOf("/")||(c=(Ba||"https:"==M.location.protocol?"https:":"http:")+"//www.google-analytics.com/plugins/ua/"+c),d=ae(c),a=d.protocol,c=M.location.protocol,
68
- ("https:"==a||a==c||("http:"!=a?0:"http:"==c))&&B(d)&&(wa(d.url,void 0,e),$d.set(b,!0)))}},v=function(a,b){var c=A.get(a)||[];c.push(b);A.set(a,c)},C=function(a,b){Yd.set(a,b);b=A.get(a)||[];for(var c=0;c<b.length;c++)b[c]();A.set(a,[])},B=function(a){var b=ae(M.location.href);if(D(a.url,"https://www.google-analytics.com/gtm/js?id="))return!0;if(a.query||0<=a.url.indexOf("?")||0<=a.path.indexOf("://"))return!1;if(a.host==b.host&&a.port==b.port)return!0;b="http:"==a.protocol?80:443;return"www.google-analytics.com"==
69
- a.host&&(a.port||b)==b&&D(a.path,"/plugins/")?!0:!1},ae=function(a){function b(a){var b=a.hostname||"",c=0<=b.indexOf("]");b=b.split(c?"]":":")[0].toLowerCase();c&&(b+="]");c=(a.protocol||"").toLowerCase();c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";D(a,"/")||(a="/"+a);return[b,""+c,a]}var c=M.createElement("a");c.href=M.location.href;var d=(c.protocol||"").toLowerCase(),e=b(c),g=c.search||"",ca=d+"//"+e[0]+(e[1]?":"+e[1]:"");D(a,"//")?a=d+a:D(a,"/")?a=ca+a:!a||D(a,"?")?a=ca+e[2]+
70
- (a||g):0>a.split("/")[0].indexOf(":")&&(a=ca+e[2].substring(0,e[2].lastIndexOf("/"))+"/"+a);c.href=a;d=b(c);return{protocol:(c.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],query:c.search||"",url:a||""}};var Z={ga:function(){Z.f=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments);b=Z.f.concat(b);for(Z.f=[];0<b.length&&!Z.v(b[0])&&!(b.shift(),0<Z.f.length););Z.f=Z.f.concat(b)};Z.J=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new sc(arguments[c]);d.g?C(d.a[0],d.a[1]):(d.i&&(d.ha=y(d.c,d.a[0],d.X,d.W)),b.push(d))}catch(e){}return b};
71
- Z.v=function(a){try{if(a.u)a.u.call(O,N.j("t0"));else{var b=a.c==gb?N:N.j(a.c);if(a.A){if("t0"==a.c&&(b=N.create.apply(N,a.a),null===b))return!0}else if(a.ba)N.remove(a.c);else if(b)if(a.i){if(a.ha&&(a.ha=y(a.c,a.a[0],a.X,a.W)),!u(a.a[0],b,a.W))return!0}else if(a.K){var c=a.C,d=a.a,e=b.plugins_.get(a.K);e[c].apply(e,d)}else b[a.C].apply(b,a.a)}}catch(g){}};var N=function(a){J(1);Z.D.apply(Z,[arguments])};N.h={};N.P=[];N.L=0;N.ya=0;N.answer=42;var uc=[Na,W,V];N.create=function(a){var b=za(uc,[].slice.call(arguments));b[V]||(b[V]="t0");var c=""+b[V];if(N.h[c])return N.h[c];if(da(b))return null;b=new pc(b);N.h[c]=b;N.P.push(b);return b};N.remove=function(a){for(var b=0;b<N.P.length;b++)if(N.P[b].get(V)==a){N.P.splice(b,1);N.h[a]=null;break}};N.j=function(a){return N.h[a]};N.getAll=function(){return N.P.slice(0)};
72
- N.N=function(){"ga"!=gb&&J(49);var a=O[gb];if(!a||42!=a.answer){N.L=a&&a.l;N.ya=1*new Date;N.loaded=!0;var b=O[gb]=N;X("create",b,b.create);X("remove",b,b.remove);X("getByName",b,b.j,5);X("getAll",b,b.getAll,6);b=pc.prototype;X("get",b,b.get,7);X("set",b,b.set,4);X("send",b,b.send);X("requireSync",b,b.ma);b=Ya.prototype;X("get",b,b.get);X("set",b,b.set);if("https:"!=M.location.protocol&&!Ba){a:{b=M.getElementsByTagName("script");for(var c=0;c<b.length&&100>c;c++){var d=b[c].src;if(d&&0==d.indexOf("https://www.google-analytics.com/analytics")){b=
73
- !0;break a}}b=!1}b&&(Ba=!0)}(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;C("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);C("displayfeatures",fd);C("adfeatures",fd);a=a&&a.q;ka(a)?Z.D.apply(N,a):J(50)}};N.da=function(){for(var a=N.getAll(),b=0;b<a.length;b++)a[b].get(V)};var Nd=N.N,te=O[gb];te&&te.r?Nd():z(Nd);z(function(){Z.D(["provide","render",ua])});})(window);
1
+ (function(){var k=this||self,l=function(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b};var n=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},p=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};var q=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;var r=window,u=document,v=function(a,b){u.addEventListener?u.addEventListener(a,b,!1):u.attachEvent&&u.attachEvent("on"+a,b)};var w=/:[0-9]+$/,y=function(a,b){b&&(b=String(b).toLowerCase());if("protocol"===b||"port"===b)a.protocol=x(a.protocol)||x(r.location.protocol);"port"===b?a.port=String(Number(a.hostname?a.port:r.location.port)||("http"==a.protocol?80:"https"==a.protocol?443:"")):"host"===b&&(a.hostname=(a.hostname||r.location.hostname).replace(w,"").toLowerCase());var c=x(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":b="";a&&a.href&&(b=a.href.indexOf("#"),b=0>b?a.href:a.href.substr(0,
2
+ b));a=b;break;case "protocol":a=c;break;case "host":a=a.hostname.replace(w,"").toLowerCase();break;case "port":a=String(Number(a.port)||("http"==c?80:"https"==c?443:""));break;case "path":a="/"==a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;a=a.split("/");a:if(b=a[a.length-1],c=[],Array.prototype.indexOf)b=c.indexOf(b),b="number"==typeof b?b:-1;else{for(var d=0;d<c.length;d++)if(c[d]===b){b=d;break a}b=-1}0<=b&&(a[a.length-1]="");a=a.join("/");break;case "query":a=a.search.replace("?","");break;
3
+ case "extension":a=a.pathname.split(".");a=1<a.length?a[a.length-1]:"";a=a.split("/")[0];break;case "fragment":a=a.hash.replace("#","");break;default:a=a&&a.href}return a},x=function(a){return a?a.replace(":","").toLowerCase():""},z=function(a){var b=u.createElement("a");a&&(b.href=a);a=b.pathname;"/"!==a[0]&&(a="/"+a);var c=b.hostname.replace(w,"");return{href:b.href,protocol:b.protocol,host:b.host,hostname:c,pathname:a,search:b.search,hash:b.hash,port:b.port}};function A(){for(var a=B,b={},c=0;c<a.length;++c)b[a[c]]=c;return b}function C(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a.toLowerCase()+"0123456789-_";return a+"."}
4
+ var B,D,E=function(a){B=B||C();D=D||A();for(var b=[],c=0;c<a.length;c+=3){var d=c+1<a.length,e=c+2<a.length,f=a.charCodeAt(c),g=d?a.charCodeAt(c+1):0,h=e?a.charCodeAt(c+2):0,m=f>>2;f=(f&3)<<4|g>>4;g=(g&15)<<2|h>>6;h&=63;e||(h=64,d||(g=64));b.push(B[m],B[f],B[g],B[h])}return b.join("")},F=function(a){function b(m){for(;d<a.length;){var t=a.charAt(d++),J=D[t];if(null!=J)return J;if(!/^[\s\xa0]*$/.test(t))throw Error("Unknown base64 encoding at char: "+t);}return m}B=B||C();D=D||A();for(var c="",d=0;;){var e=
5
+ b(-1),f=b(0),g=b(64),h=b(64);if(64===h&&-1===e)return c;c+=String.fromCharCode(e<<2|f>>4);64!=g&&(c+=String.fromCharCode(f<<4&240|g>>2),64!=h&&(c+=String.fromCharCode(g<<6&192|h)))}};var G;function H(a,b){if(!a||b===u.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1}var I=function(){var a={};var b=r.google_tag_data;r.google_tag_data=void 0===b?a:b;a=r.google_tag_data;b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var K=/(.*?)\*(.*?)\*(.*)/,L=/([^?#]+)(\?[^#]*)?(#.*)?/,M=/(.*?)(^|&)_gl=([^&]*)&?(.*)/,O=function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!==d&&d===d&&null!==d&&"[object Object]"!==d.toString()&&(b.push(c),b.push(E(String(d))))}a=b.join("*");return["1",N(a),a].join("*")},N=function(a,b){a=[window.navigator.userAgent,(new Date).getTimezoneOffset(),window.navigator.userLanguage||window.navigator.language,Math.floor((new Date).getTime()/60/1E3)-(void 0===b?0:b),a].join("*");
6
+ if(!(b=G)){b=Array(256);for(var c=0;256>c;c++){for(var d=c,e=0;8>e;e++)d=d&1?d>>>1^3988292384:d>>>1;b[c]=d}}G=b;b=4294967295;for(c=0;c<a.length;c++)b=b>>>8^G[(b^a.charCodeAt(c))&255];return((b^-1)>>>0).toString(36)},R=function(a){return function(b){var c=z(r.location.href),d=c.search.replace("?","");a:{var e=d.split("&");for(var f=0;f<e.length;f++){var g=e[f].split("=");if("_gl"===decodeURIComponent(g[0]).replace(/\+/g," ")){e=g.slice(1).join("=");break a}}e=void 0}b.query=P(e||"")||{};e=y(c,"fragment");
7
+ f=e.match(M);b.fragment=P(f&&f[3]||"")||{};a&&Q(c,d,e)}};function S(a){var b=M.exec(a);if(b){var c=b[2],d=b[4];a=b[1];d&&(a=a+c+d)}return a}
8
+ var Q=function(a,b,c){function d(e,f){e=S(e);e.length&&(e=f+e);return e}r.history&&r.history.replaceState&&(M.test(b)||M.test(c))&&(a=y(a,"path"),b=d(b,"?"),c=d(c,"#"),r.history.replaceState({},void 0,""+a+b+c))},P=function(a){var b=void 0===b?3:b;try{if(a){a:{for(var c=0;3>c;++c){var d=K.exec(a);if(d){var e=d;break a}a=decodeURIComponent(a)}e=void 0}if(e&&"1"===e[1]){var f=e[2],g=e[3];a:{for(e=0;e<b;++e)if(f===N(g,e)){var h=!0;break a}h=!1}if(h){b={};var m=g?g.split("*"):[];for(g=0;g<m.length;g+=
9
+ 2)b[m[g]]=F(m[g+1]);return b}}}}catch(t){}};function T(a,b,c){function d(h){h=S(h);var m=h.charAt(h.length-1);h&&"&"!==m&&(h+="&");return h+g}c=void 0===c?!1:c;var e=L.exec(b);if(!e)return"";b=e[1];var f=e[2]||"";e=e[3]||"";var g="_gl="+a;c?e="#"+d(e.substring(1)):f="?"+d(f.substring(1));return""+b+f+e}
10
+ function U(a,b,c){for(var d={},e={},f=I().decorators,g=0;g<f.length;++g){var h=f[g];(!c||h.forms)&&H(h.domains,b)&&(h.fragment?n(e,h.callback()):n(d,h.callback()))}p(d)&&(b=O(d),c?V(b,a):W(b,a,!1));!c&&p(e)&&(c=O(e),W(c,a,!0))}function W(a,b,c){b.href&&(a=T(a,b.href,void 0===c?!1:c),q.test(a)&&(b.href=a))}
11
+ function V(a,b){if(b&&b.action){var c=(b.method||"").toLowerCase();if("get"===c){c=b.childNodes||[];for(var d=!1,e=0;e<c.length;e++){var f=c[e];if("_gl"===f.name){f.setAttribute("value",a);d=!0;break}}d||(c=u.createElement("input"),c.setAttribute("type","hidden"),c.setAttribute("name","_gl"),c.setAttribute("value",a),b.appendChild(c))}else"post"===c&&(a=T(a,b.action),q.test(a)&&(b.action=a))}}
12
+ var X=function(a){try{a:{var b=a.target||a.srcElement||{};for(a=100;b&&0<a;){if(b.href&&b.nodeName.match(/^a(?:rea)?$/i)){var c=b;break a}b=b.parentNode;a--}c=null}if(c){var d=c.protocol;"http:"!==d&&"https:"!==d||U(c,c.hostname,!1)}}catch(e){}},Y=function(a){try{var b=a.target||a.srcElement||{};if(b.action){var c=y(z(b.action),"host");U(b,c,!0)}}catch(d){}};l("google_tag_data.glBridge.auto",function(a,b,c,d){var e=I();e.init||(v("mousedown",X),v("keyup",X),v("submit",Y),e.init=!0);a={callback:a,domains:b,fragment:"fragment"===c,forms:!!d};I().decorators.push(a)});l("google_tag_data.glBridge.decorate",function(a,b,c){c=!!c;a=O(a);if(b.tagName){if("a"==b.tagName.toLowerCase())return W(a,b,c);if("form"==b.tagName.toLowerCase())return V(a,b)}if("string"==typeof b)return T(a,b,c)});l("google_tag_data.glBridge.generate",O);
13
+ l("google_tag_data.glBridge.get",function(a,b){var c=R(!!b);b=I();b.data||(b.data={query:{},fragment:{}},c(b.data));c={};if(b=b.data)n(c,b.query),a&&n(c,b.fragment);return c});})(window);
14
+ (function(){function La(a){var b=1,c;if(a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b};var $c=function(a){this.w=a||[]};$c.prototype.set=function(a){this.w[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b<this.w.length;b++)this.w[b]&&(a[Math.floor(b/6)]^=1<<b%6);for(b=0;b<a.length;b++)a[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(a[b]||0);return a.join("")+"~"};var ha=window.GoogleAnalyticsObject,Qa;if(Qa=void 0!=ha)Qa=-1<(ha.constructor+"").indexOf("String");var Za;if(Za=Qa){var te=window.GoogleAnalyticsObject;Za=te?te.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""}var gb=Za||"ga",jd=/^(?:utma\.)?\d+\.\d+$/,kd=/^amp-[\w.-]{22,64}$/,Ba=!1;var vd=new $c;function J(a){vd.set(a)}var Td=function(a){a=Dd(a);a=new $c(a);for(var b=vd.w.slice(),c=0;c<a.w.length;c++)b[c]=b[c]||a.w[c];return(new $c(b)).encode()},Dd=function(a){a=a.get(Gd);ka(a)||(a=[]);return a};var ea=function(a){return"function"==typeof a},ka=function(a){return"[object Array]"==Object.prototype.toString.call(Object(a))},qa=function(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")},D=function(a,b){return 0==a.indexOf(b)},sa=function(a){return a?a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""},ra=function(){for(var a=O.navigator.userAgent+(M.cookie?M.cookie:"")+(M.referrer?M.referrer:""),b=a.length,c=O.history.length;0<c;)a+=c--^b++;return[hd()^La(a)&2147483647,Math.round((new Date).getTime()/
15
+ 1E3)].join(".")},ta=function(a){var b=M.createElement("img");b.width=1;b.height=1;b.src=a;return b},ua=function(){},K=function(a){if(encodeURIComponent instanceof Function)return encodeURIComponent(a);J(28);return a},L=function(a,b,c,d){try{a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){J(27)}},f=/^[\w\-:/.?=&%!\[\]]+$/,Nd=/^[\w+/_-]+[=]{0,2}$/,wa=function(a,b,c){if(a){var d=M.querySelector&&M.querySelector("script[nonce]")||null;d=d?d.nonce||d.getAttribute&&
16
+ d.getAttribute("nonce")||"":"";if(c){var e=c="";b&&f.test(b)&&(c=' id="'+b+'"');d&&Nd.test(d)&&(e=' nonce="'+d+'"');f.test(a)&&M.write("<script"+c+e+' src="'+a+'">\x3c/script>')}else c=M.createElement("script"),c.type="text/javascript",c.async=!0,c.src=a,b&&(c.id=b),d&&c.setAttribute("nonce",d),a=M.getElementsByTagName("script")[0],a.parentNode.insertBefore(c,a)}},be=function(a,b){return E(M.location[b?"href":"search"],a)},E=function(a,b){return(a=a.match("(?:&|#|\\?)"+K(b).replace(/([.*+?^=!:${}()|\[\]\/\\])/g,
17
+ "\\$1")+"=([^&#]*)"))&&2==a.length?a[1]:""},xa=function(){var a=""+M.location.hostname;return 0==a.indexOf("www.")?a.substring(4):a},de=function(a,b){var c=a.indexOf(b);if(5==c||6==c)if(a=a.charAt(c+b.length),"/"==a||"?"==a||""==a||":"==a)return!0;return!1},ya=function(a,b){var c=M.referrer;if(/^(https?|android-app):\/\//i.test(c)){if(a)return c;a="//"+M.location.hostname;if(!de(c,a))return b&&(b=a.replace(/\./g,"-")+".cdn.ampproject.org",de(c,b))?void 0:c}},za=function(a,b){if(1==b.length&&null!=
18
+ b[0]&&"object"===typeof b[0])return b[0];for(var c={},d=Math.min(a.length+1,b.length),e=0;e<d;e++)if("object"===typeof b[e]){for(var g in b[e])b[e].hasOwnProperty(g)&&(c[g]=b[e][g]);break}else e<a.length&&(c[a[e]]=b[e]);return c};var ee=function(){this.keys=[];this.values={};this.m={}};ee.prototype.set=function(a,b,c){this.keys.push(a);c?this.m[":"+a]=b:this.values[":"+a]=b};ee.prototype.get=function(a){return this.m.hasOwnProperty(":"+a)?this.m[":"+a]:this.values[":"+a]};ee.prototype.map=function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b],d=this.get(c);d&&a(c,d)}};var O=window,M=document,va=function(a,b){return setTimeout(a,b)};var F=window,Ea=document,G=function(a){var b=F._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===F["ga-disable-"+a])return!0;try{var c=F.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(g){}a=[];b=String(Ea.cookie||document.cookie).split(";");for(c=0;c<b.length;c++){var d=b[c].split("="),e=d[0].replace(/^\s*|\s*$/g,"");e&&"AMP_TOKEN"==e&&((d=d.slice(1).join("=").replace(/^\s*|\s*$/g,""))&&(d=decodeURIComponent(d)),a.push(d))}for(b=0;b<a.length;b++)if("$OPT_OUT"==a[b])return!0;return Ea.getElementById("__gaOptOutExtension")?
19
+ !0:!1};var Ca=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},zc=function(a,b,c,d,e,g){e=G(e)?!1:eb.test(M.location.hostname)||"/"==c&&vc.test(d)?!1:!0;if(!e)return!1;b&&1200<b.length&&(b=b.substring(0,1200));c=a+"="+b+"; path="+c+"; ";g&&(c+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");d&&"none"!==d&&(c+="domain="+d+";");d=M.cookie;M.cookie=c;if(!(d=d!=M.cookie))a:{a=Ca(a);
20
+ for(d=0;d<a.length;d++)if(b==a[d]){d=!0;break a}d=!1}return d},Cc=function(a){return encodeURIComponent?encodeURIComponent(a).replace(/\(/g,"%28").replace(/\)/g,"%29"):a},vc=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,eb=/(^|\.)doubleclick\.net$/i;var oc,Id=/^.*Version\/?(\d+)[^\d].*$/i,ne=function(){if(void 0!==O.__ga4__)return O.__ga4__;if(void 0===oc){var a=O.navigator.userAgent;if(a){var b=a;try{b=decodeURIComponent(a)}catch(c){}if(a=!(0<=b.indexOf("Chrome"))&&!(0<=b.indexOf("CriOS"))&&(0<=b.indexOf("Safari/")||0<=b.indexOf("Safari,")))b=Id.exec(b),a=11<=(b?Number(b[1]):-1);oc=a}else oc=!1}return oc};var Fa,Ga,fb,Ab,ja=/^https?:\/\/[^/]*cdn\.ampproject\.org\//,Ue=/^(?:www\.|m\.|amp\.)+/,Ub=[],da=function(a){a:{if(ja.test(M.referrer)){var b=M.location.hostname.replace(Ue,"");b:{var c=M.referrer;c=c.replace(/^https?:\/\//,"");var d=c.replace(/^[^/]+/,"").split("/"),e=d[2];d=(d="s"==e?d[3]:e)?decodeURIComponent(d):d;if(!d){if(0==c.indexOf("xn--")){c="";break b}(c=c.match(/(.*)\.cdn\.ampproject\.org\/?$/))&&2==c.length&&(d=c[1].replace(/-/g,".").replace(/\.\./g,"-"))}c=d?d.replace(Ue,""):""}if(b==
21
+ c){b=!0;break a}else J(78)}b=!1}if(b&&!1!==a[Kd]&&(void 0===Ab&&(b=(b=De.get())&&b._ga||void 0)&&(Ab=b,J(81)),void 0!==Ab))return a[Q]||(a[Q]=Ab),!1;if(a[Kd]){J(67);if(a[ac]&&"cookie"!=a[ac])return!1;if(void 0!==Ab)a[Q]||(a[Q]=Ab);else{a:if(b=String(a[W]||xa()),c=String(a[Yb]||"/"),d=Ca(String(a[U]||"_ga")),b=na(d,b,c),!b||jd.test(b))b=!0;else if(b=Ca("AMP_TOKEN"),0==b.length)b=!0;else{if(1==b.length&&(b=decodeURIComponent(b[0]),"$RETRIEVING"==b||"$OPT_OUT"==b||"$ERROR"==b||"$NOT_FOUND"==b)){b=!0;
22
+ break a}b=!1}if(b&&tc(ic,String(a[Na])))return!0}}return!1},ic=function(){Z.D([ua])},tc=function(a,b){var c=Ca("AMP_TOKEN");if(1<c.length)return J(55),!1;c=decodeURIComponent(c[0]||"");if("$OPT_OUT"==c||"$ERROR"==c||G(b))return J(62),!1;if(!ja.test(M.referrer)&&"$NOT_FOUND"==c)return J(68),!1;if(void 0!==Ab)return J(56),va(function(){a(Ab)},0),!0;if(Fa)return Ub.push(a),!0;if("$RETRIEVING"==c)return J(57),va(function(){tc(a,b)},1E4),!0;Fa=!0;c&&"$"!=c[0]||(xc("$RETRIEVING",3E4),setTimeout(Mc,3E4),
23
+ c="");return Pc(c,b)?(Ub.push(a),!0):!1},Pc=function(a,b,c){if(!window.JSON)return J(58),!1;var d=O.XMLHttpRequest;if(!d)return J(59),!1;var e=new d;if(!("withCredentials"in e))return J(60),!1;e.open("POST",(c||"https://ampcid.google.com/v1/publisher:getClientId")+"?key=AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM",!0);e.withCredentials=!0;e.setRequestHeader("Content-Type","text/plain");e.onload=function(){Fa=!1;if(4==e.readyState){try{200!=e.status&&(J(61),Qc("","$ERROR",3E4));var g=JSON.parse(e.responseText);
24
+ g.optOut?(J(63),Qc("","$OPT_OUT",31536E6)):g.clientId?Qc(g.clientId,g.securityToken,31536E6):!c&&g.alternateUrl?(Ga&&clearTimeout(Ga),Fa=!0,Pc(a,b,g.alternateUrl)):(J(64),Qc("","$NOT_FOUND",36E5))}catch(ca){J(65),Qc("","$ERROR",3E4)}e=null}};d={originScope:"AMP_ECID_GOOGLE"};a&&(d.securityToken=a);e.send(JSON.stringify(d));Ga=va(function(){J(66);Qc("","$ERROR",3E4)},1E4);return!0},Mc=function(){Fa=!1},xc=function(a,b){if(void 0===fb){fb="";for(var c=id(),d=0;d<c.length;d++){var e=c[d];if(zc("AMP_TOKEN",
25
+ encodeURIComponent(a),"/",e,"",b)){fb=e;return}}}zc("AMP_TOKEN",encodeURIComponent(a),"/",fb,"",b)},Qc=function(a,b,c){Ga&&clearTimeout(Ga);b&&xc(b,c);Ab=a;b=Ub;Ub=[];for(c=0;c<b.length;c++)b[c](a)};var oe=function(){return(Ba||"https:"==M.location.protocol?"https:":"http:")+"//www.google-analytics.com"},Da=function(a){this.name="len";this.message=a+"-8192"},ba=function(a,b,c){c=c||ua;if(2036>=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},pe=function(a,b,c,d){d=d||ua;wd(a+"?"+b,"",d,c)},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c,d){var e=O.XMLHttpRequest;
26
+ if(!e)return!1;var g=new e;if(!("withCredentials"in g))return!1;a=a.replace(/^http:/,"https:");g.open("POST",a,!0);g.withCredentials=!0;g.setRequestHeader("Content-Type","text/plain");g.onreadystatechange=function(){if(4==g.readyState){if(d)try{var ca=g.responseText;if(1>ca.length)ge("xhr","ver","0"),c();else if("1"!=ca.charAt(0))ge("xhr","ver",String(ca.length)),c();else if(3<d.count++)ge("xhr","tmr",""+d.count),c();else if(1==ca.length)c();else{var l=ca.charAt(1);if("d"==l)pe("https://stats.g.doubleclick.net/j/collect",
27
+ d.U,d,c);else if("g"==l){wc("https://www.google.%/ads/ga-audiences".replace("%","com"),d.google,c);var k=ca.substring(2);k&&(/^[a-z.]{1,6}$/.test(k)?wc("https://www.google.%/ads/ga-audiences".replace("%",k),d.google,ua):ge("tld","bcc",k))}else ge("xhr","brc",l),c()}}catch(w){ge("xhr","rsp"),c()}else c();g=null}};g.send(b);return!0},x=function(a,b,c){return O.navigator.sendBeacon?O.navigator.sendBeacon(a,b)?(c(),!0):!1:!1},ge=function(a,b,c){1<=100*Math.random()||G("?")||(a=["t=error","_e="+a,"_v=j75",
28
+ "sr=1"],b&&a.push("_f="+b),c&&a.push("_m="+K(c.substring(0,100))),a.push("aip=1"),a.push("z="+hd()),wc("https://www.google-analytics.com/u/d",a.join("&"),ua))};var h=function(a){var b=O.gaData=O.gaData||{};return b[a]=b[a]||{}};var Ha=function(){this.M=[]};Ha.prototype.add=function(a){this.M.push(a)};Ha.prototype.D=function(a){try{for(var b=0;b<this.M.length;b++){var c=a.get(this.M[b]);c&&ea(c)&&c.call(O,a)}}catch(d){}b=a.get(Ia);b!=ua&&ea(b)&&(a.set(Ia,ua,!0),setTimeout(b,10))};function Ja(a){if(100!=a.get(Ka)&&La(P(a,Q))%1E4>=100*R(a,Ka))throw"abort";}function Ma(a){if(G(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";}
29
+ function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(c){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var b=[];ue.map(function(c,d){d.F&&(c=a.get(c),void 0!=c&&c!=d.defaultValue&&("boolean"==typeof c&&(c*=1),b.push(d.F+"="+K(""+c))))});b.push("z="+Bd());a.set(Ra,b.join("&"),!0)}
30
+ function Sa(a){var b=P(a,gd)||oe()+"/collect",c=a.get(qe),d=P(a,fa);!d&&a.get(Vd)&&(d="beacon");if(c)pe(b,P(a,Ra),c,a.Z(Ia));else if(d){c=d;d=P(a,Ra);var e=a.Z(Ia);e=e||ua;"image"==c?wc(b,d,e):"xhr"==c&&wd(b,d,e)||"beacon"==c&&x(b,d,e)||ba(b,d,e)}else ba(b,P(a,Ra),a.Z(Ia));b=P(a,Na);b=h(b);c=b.hitcount;b.hitcount=c?c+1:1;b=P(a,Na);delete h(b).pending_experiments;a.set(Ia,ua,!0)}
31
+ function Hc(a){(O.gaData=O.gaData||{}).expId&&a.set(Nc,(O.gaData=O.gaData||{}).expId);(O.gaData=O.gaData||{}).expVar&&a.set(Oc,(O.gaData=O.gaData||{}).expVar);var b=P(a,Na);if(b=h(b).pending_experiments){var c=[];for(d in b)b.hasOwnProperty(d)&&b[d]&&c.push(encodeURIComponent(d)+"."+encodeURIComponent(b[d]));var d=c.join("!")}else d=void 0;d&&a.set(m,d,!0)}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}
32
+ function yd(a){var b=O.gaDevIds;ka(b)&&0!=b.length&&a.set("&did",b.join(","),!0)}function vb(a){if(!a.get(Na))throw"abort";};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}};function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){c=R(a,Wa);var d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0<e&&(c=Math.min(c+e,20),a.set(Xa,d));if(0>=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee};Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){a=a.get(b);return void 0==a?"":""+a},R=function(a,b){a=a.get(b);return void 0==a||""===a?0:Number(a)};Ya.prototype.Z=function(a){return(a=this.get(a))&&ea(a)?a:ua};
33
+ Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)};var ue=new ee,ve=[],bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=ue.get(a);if(!b)for(var c=0;c<ve.length;c++){var d=ve[c],e=d[0].exec(a);if(e){b=d[1](e);ue.set(b.name,b);break}}return b},yc=function(a){var b;ue.map(function(c,d){d.F==a&&(b=d)});return b&&b.name},S=function(a,b,c,d,e){a=new bb(a,b,c,d,e);ue.set(a.name,a);return a.name},cb=function(a,b){ve.push([new RegExp("^"+a+"$"),b])},T=function(a,b,c){return S(a,b,c,void 0,db)},db=function(){};var hb=T("apiVersion","v"),ib=T("clientVersion","_v");S("anonymizeIp","aip");var jb=S("adSenseId","a"),Va=S("hitType","t"),Ia=S("hitCallback"),Ra=S("hitPayload");S("nonInteraction","ni");S("currencyCode","cu");S("dataSource","ds");var Vd=S("useBeacon",void 0,!1),fa=S("transport");S("sessionControl","sc","");S("sessionGroup","sg");S("queueTime","qt");var Ac=S("_s","_s");S("screenName","cd");var kb=S("location","dl",""),lb=S("referrer","dr"),mb=S("page","dp","");S("hostname","dh");
34
+ var nb=S("language","ul"),ob=S("encoding","de");S("title","dt",function(){return M.title||void 0});cb("contentGroup([0-9]+)",function(a){return new bb(a[0],"cg"+a[1])});var pb=S("screenColors","sd"),qb=S("screenResolution","sr"),rb=S("viewportSize","vp"),sb=S("javaEnabled","je"),tb=S("flashVersion","fl");S("campaignId","ci");S("campaignName","cn");S("campaignSource","cs");S("campaignMedium","cm");S("campaignKeyword","ck");S("campaignContent","cc");
35
+ var ub=S("eventCategory","ec"),xb=S("eventAction","ea"),yb=S("eventLabel","el"),zb=S("eventValue","ev"),Bb=S("socialNetwork","sn"),Cb=S("socialAction","sa"),Db=S("socialTarget","st"),Eb=S("l1","plt"),Fb=S("l2","pdt"),Gb=S("l3","dns"),Hb=S("l4","rrt"),Ib=S("l5","srt"),Jb=S("l6","tcp"),Kb=S("l7","dit"),Lb=S("l8","clt"),Ve=S("l9","_gst"),We=S("l10","_gbt"),Xe=S("l11","_cst"),Ye=S("l12","_cbt"),Mb=S("timingCategory","utc"),Nb=S("timingVar","utv"),Ob=S("timingLabel","utl"),Pb=S("timingValue","utt");
36
+ S("appName","an");S("appVersion","av","");S("appId","aid","");S("appInstallerId","aiid","");S("exDescription","exd");S("exFatal","exf");var Nc=S("expId","xid"),Oc=S("expVar","xvar"),m=S("exp","exp"),Rc=S("_utma","_utma"),Sc=S("_utmz","_utmz"),Tc=S("_utmht","_utmht"),Ua=S("_hc",void 0,0),Xa=S("_ti",void 0,0),Wa=S("_to",void 0,20);cb("dimension([0-9]+)",function(a){return new bb(a[0],"cd"+a[1])});cb("metric([0-9]+)",function(a){return new bb(a[0],"cm"+a[1])});S("linkerParam",void 0,void 0,Bc,db);
37
+ var Ze=T("_cd2l",void 0,!1),ld=S("usage","_u"),Gd=S("_um");S("forceSSL",void 0,void 0,function(){return Ba},function(a,b,c){J(34);Ba=!!c});var ed=S("_j1","jid"),ia=S("_j2","gjid");cb("\\&(.*)",function(a){var b=new bb(a[0],a[1]),c=yc(a[0].substring(1));c&&(b.Z=function(d){return d.get(c)},b.o=function(d,e,g,ca){d.set(c,g,ca)},b.F=void 0);return b});
38
+ var Qb=T("_oot"),dd=S("previewTask"),Rb=S("checkProtocolTask"),md=S("validationTask"),Sb=S("checkStorageTask"),Uc=S("historyImportTask"),Tb=S("samplerTask"),Vb=S("_rlt"),Wb=S("buildHitTask"),Xb=S("sendHitTask"),Vc=S("ceTask"),zd=S("devIdTask"),Cd=S("timingTask"),Ld=S("displayFeaturesTask"),oa=S("customTask"),V=T("name"),Q=T("clientId","cid"),n=T("clientIdTime"),xd=T("storedClientId"),Ad=S("userId","uid"),Na=T("trackingId","tid"),U=T("cookieName",void 0,"_ga"),W=T("cookieDomain"),Yb=T("cookiePath",
39
+ void 0,"/"),Zb=T("cookieExpires",void 0,63072E3),Hd=T("cookieUpdate",void 0,!0),$b=T("legacyCookieDomain"),Wc=T("legacyHistoryImport",void 0,!0),ac=T("storage",void 0,"cookie"),bc=T("allowLinker",void 0,!1),cc=T("allowAnchor",void 0,!0),Ka=T("sampleRate","sf",100),dc=T("siteSpeedSampleRate",void 0,1),ec=T("alwaysSendReferrer",void 0,!1),I=T("_gid","_gid"),la=T("_gcn"),Kd=T("useAmpClientId"),ce=T("_gclid"),fe=T("_gt"),he=T("_ge",void 0,7776E6),ie=T("_gclsrc"),je=T("storeGac",void 0,!0),gd=S("transportUrl"),
40
+ Md=S("_r","_r"),qe=S("_dp"),Ud=S("allowAdFeatures",void 0,!0);function X(a,b,c,d){b[a]=function(){try{return d&&J(d),c.apply(this,arguments)}catch(e){throw ge("exc",a,e&&e.name),e;}}};var Od=function(){this.V=100;this.$=this.fa=!1;this.oa="detourexp";this.groups=1},Ed=function(a){var b=new Od,c;if(b.fa&&b.$)return 0;b.$=!0;if(a){if(b.oa&&void 0!==a.get(b.oa))return R(a,b.oa);if(0==a.get(dc))return 0}if(0==b.V)return 0;void 0===c&&(c=Bd());return 0==c%b.V?Math.floor(c/b.V)%b.groups+1:0};function fc(){var a,b;if((b=(b=O.navigator)?b.plugins:null)&&b.length)for(var c=0;c<b.length&&!a;c++){var d=b[c];-1<d.name.indexOf("Shockwave Flash")&&(a=d.description)}if(!a)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),a="WIN 6,0,21,0",e.AllowScriptAccess="always",a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),a=e.GetVariable("$version")}catch(g){}a&&
41
+ (e=a.match(/[\d]+/g))&&3<=e.length&&(a=e[0]+"."+e[1]+" r"+e[2]);return a||void 0};var aa=function(a){var b=Math.min(R(a,dc),100);return La(P(a,Q))%100>=b?!1:!0},gc=function(a){var b={};if(Ec(b)||Fc(b)){var c=b[Eb];void 0==c||Infinity==c||isNaN(c)||(0<c?(Y(b,Gb),Y(b,Jb),Y(b,Ib),Y(b,Fb),Y(b,Hb),Y(b,Kb),Y(b,Lb),Y(b,Ve),Y(b,We),Y(b,Xe),Y(b,Ye),va(function(){a(b)},10)):L(O,"load",function(){gc(a)},!1))}},Ec=function(a){var b=O.performance||O.webkitPerformance;b=b&&b.timing;if(!b)return!1;var c=b.navigationStart;if(0==c)return!1;a[Eb]=b.loadEventStart-c;a[Gb]=b.domainLookupEnd-b.domainLookupStart;
42
+ a[Jb]=b.connectEnd-b.connectStart;a[Ib]=b.responseStart-b.requestStart;a[Fb]=b.responseEnd-b.responseStart;a[Hb]=b.fetchStart-c;a[Kb]=b.domInteractive-c;a[Lb]=b.domContentLoadedEventStart-c;a[Ve]=N.L-c;a[We]=N.ya-c;O.google_tag_manager&&O.google_tag_manager._li&&(b=O.google_tag_manager._li,a[Xe]=b.cst,a[Ye]=b.cbt);return!0},Fc=function(a){if(O.top!=O)return!1;var b=O.external,c=b&&b.onloadT;b&&!b.isValidLoadTime&&(c=void 0);2147483648<c&&(c=void 0);0<c&&b.setPageReadyTime();if(void 0==c)return!1;
43
+ a[Eb]=c;return!0},Y=function(a,b){var c=a[b];if(isNaN(c)||Infinity==c||0>c)a[b]=void 0},Fd=function(a){return function(b){if("pageview"==b.get(Va)&&!a.I){a.I=!0;var c=aa(b),d=0<E(P(b,kb),"gclid").length;(c||d)&&gc(function(e){c&&a.send("timing",e);d&&a.send("adtiming",e)})}}};var hc=!1,mc=function(a){if("cookie"==P(a,ac)){if(a.get(Hd)||P(a,xd)!=P(a,Q)){var b=1E3*R(a,Zb);ma(a,Q,U,b)}ma(a,I,la,864E5);if(a.get(je)){var c=P(a,ce);if(c){var d=Math.min(R(a,he),1E3*R(a,Zb));d=Math.min(d,1E3*R(a,fe)+d-(new Date).getTime());a.data.set(he,d);b={};var e=P(a,fe),g=P(a,ie),ca=kc(P(a,Yb)),l=lc(P(a,W));a=P(a,Na);g&&"aw.ds"!=g?b&&(b.ua=!0):(c=["1",e,Cc(c)].join("."),0<d&&(b&&(b.ta=!0),zc("_gac_"+Cc(a),c,ca,l,a,d)));le(b)}}else J(75)}},ma=function(a,b,c,d){var e=nd(a,b);if(e){c=P(a,c);
44
+ var g=kc(P(a,Yb)),ca=lc(P(a,W)),l=P(a,Na);if("auto"!=ca)zc(c,e,g,ca,l,d)&&(hc=!0);else{J(32);for(var k=id(),w=0;w<k.length;w++)if(ca=k[w],a.data.set(W,ca),e=nd(a,b),zc(c,e,g,ca,l,d)){hc=!0;return}a.data.set(W,"auto")}}},nc=function(a){if("cookie"==P(a,ac)&&!hc&&(mc(a),!hc))throw"abort";},Yc=function(a){if(a.get(Wc)){var b=P(a,W),c=P(a,$b)||xa(),d=Xc("__utma",c,b);d&&(J(19),a.set(Tc,(new Date).getTime(),!0),a.set(Rc,d.R),(b=Xc("__utmz",c,b))&&d.hash==b.hash&&a.set(Sc,b.R))}},nd=function(a,b){b=Cc(P(a,
45
+ b));var c=lc(P(a,W)).split(".").length;a=jc(P(a,Yb));1<a&&(c+="-"+a);return b?["GA1",c,b].join("."):""},Xd=function(a,b){return na(b,P(a,W),P(a,Yb))},na=function(a,b,c){if(!a||1>a.length)J(12);else{for(var d=[],e=0;e<a.length;e++){var g=a[e];var ca=g.split(".");var l=ca.shift();("GA1"==l||"1"==l)&&1<ca.length?(g=ca.shift().split("-"),1==g.length&&(g[1]="1"),g[0]*=1,g[1]*=1,ca={H:g,s:ca.join(".")}):ca=kd.test(g)?{H:[0,0],s:g}:void 0;ca&&d.push(ca)}if(1==d.length)return J(13),d[0].s;if(0==d.length)J(12);
46
+ else{J(14);d=Gc(d,lc(b).split(".").length,0);if(1==d.length)return d[0].s;d=Gc(d,jc(c),1);1<d.length&&J(41);return d[0]&&d[0].s}}},Gc=function(a,b,c){for(var d=[],e=[],g,ca=0;ca<a.length;ca++){var l=a[ca];l.H[c]==b?d.push(l):void 0==g||l.H[c]<g?(e=[l],g=l.H[c]):l.H[c]==g&&e.push(l)}return 0<d.length?d:e},lc=function(a){return 0==a.indexOf(".")?a.substr(1):a},id=function(){var a=[],b=xa().split(".");if(4==b.length){var c=b[b.length-1];if(parseInt(c,10)==c)return["none"]}for(c=b.length-2;0<=c;c--)a.push(b.slice(c).join("."));
47
+ b=M.location.hostname;eb.test(b)||vc.test(b)||a.push("none");return a},kc=function(a){if(!a)return"/";1<a.length&&a.lastIndexOf("/")==a.length-1&&(a=a.substr(0,a.length-1));0!=a.indexOf("/")&&(a="/"+a);return a},jc=function(a){a=kc(a);return"/"==a?1:a.split("/").length},le=function(a){a.ta&&J(77);a.na&&J(74);a.pa&&J(73);a.ua&&J(69)};function Xc(a,b,c){"none"==b&&(b="");var d=[],e=Ca(a);a="__utma"==a?6:2;for(var g=0;g<e.length;g++){var ca=(""+e[g]).split(".");ca.length>=a&&d.push({hash:ca[0],R:e[g],O:ca})}if(0!=d.length)return 1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){if(null==a)var c=a=1;else c=La(a),a=La(D(a,".")?a.substring(1):"."+a);for(var d=0;d<b.length;d++)if(b[d].hash==c||b[d].hash==a)return b[d]};var od=new RegExp(/^https?:\/\/([^\/:]+)/),De=O.google_tag_data.glBridge,pd=/(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)/,me=/(.*)([?&#])(?:_gac=[^&#]*)(?:&?)(.*)/;function Bc(a){if(a.get(Ze))return J(35),De.generate($e(a));var b=P(a,Q),c=P(a,I)||"";b="_ga=2."+K(pa(c+b,0)+"."+c+"-"+b);(a=af(a))?(J(44),a="&_gac=1."+K([pa(a.qa,0),a.timestamp,a.qa].join("."))):a="";return b+a}
48
+ function Ic(a,b){var c=new Date,d=O.navigator,e=d.plugins||[];a=[a,d.userAgent,c.getTimezoneOffset(),c.getYear(),c.getDate(),c.getHours(),c.getMinutes()+b];for(b=0;b<e.length;++b)a.push(e[b].description);return La(a.join("."))}function pa(a,b){var c=new Date,d=O.navigator,e=c.getHours()+Math.floor((c.getMinutes()+b)/60);return La([a,d.userAgent,d.language||"",c.getTimezoneOffset(),c.getYear(),c.getDate()+Math.floor(e/24),(24+e)%24,(60+c.getMinutes()+b)%60].join("."))}
49
+ var Dc=function(a){J(48);this.target=a;this.T=!1};Dc.prototype.ca=function(a,b){if(a){if(this.target.get(Ze))return De.decorate($e(this.target),a,b);if(a.tagName){if("a"==a.tagName.toLowerCase()){a.href&&(a.href=qd(this,a.href,b));return}if("form"==a.tagName.toLowerCase())return rd(this,a)}if("string"==typeof a)return qd(this,a,b)}};
50
+ var qd=function(a,b,c){var d=pd.exec(b);d&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));(d=me.exec(b))&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));a=a.target.get("linkerParam");var e=b.indexOf("?");d=b.indexOf("#");c?b+=(-1==d?"#":"&")+a:(c=-1==e?"?":"&",b=-1==d?b+(c+a):b.substring(0,d)+c+a+b.substring(d));b=b.replace(/&+_ga=/,"&_ga=");return b=b.replace(/&+_gac=/,"&_gac=")},rd=function(a,b){if(b&&b.action)if("get"==b.method.toLowerCase()){a=a.target.get("linkerParam").split("&");for(var c=0;c<a.length;c++){var d=
51
+ a[c].split("="),e=d[1];d=d[0];for(var g=b.childNodes||[],ca=!1,l=0;l<g.length;l++)if(g[l].name==d){g[l].setAttribute("value",e);ca=!0;break}ca||(g=M.createElement("input"),g.setAttribute("type","hidden"),g.setAttribute("name",d),g.setAttribute("value",e),b.appendChild(g))}}else"post"==b.method.toLowerCase()&&(b.action=qd(a,b.action))};
52
+ Dc.prototype.S=function(a,b,c){function d(g){try{g=g||O.event;a:{var ca=g.target||g.srcElement;for(g=100;ca&&0<g;){if(ca.href&&ca.nodeName.match(/^a(?:rea)?$/i)){var l=ca;break a}ca=ca.parentNode;g--}l={}}("http:"==l.protocol||"https:"==l.protocol)&&sd(a,l.hostname||"")&&l.href&&(l.href=qd(e,l.href,b))}catch(k){J(26)}}var e=this;this.target.get(Ze)?De.auto(function(){return $e(e.target)},a,b?"fragment":"",c):(this.T||(this.T=!0,L(M,"mousedown",d,!1),L(M,"keyup",d,!1)),c&&L(M,"submit",function(g){g=
53
+ g||O.event;if((g=g.target||g.srcElement)&&g.action){var ca=g.action.match(od);ca&&sd(a,ca[1])&&rd(e,g)}}))};function sd(a,b){if(b==M.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1}function ke(a,b){return b!=Ic(a,0)&&b!=Ic(a,-1)&&b!=Ic(a,-2)&&b!=pa(a,0)&&b!=pa(a,-1)&&b!=pa(a,-2)}function $e(a){var b=af(a);return{_ga:a.get(Q),_gid:a.get(I)||void 0,_gac:b?[b.qa,b.timestamp].join("."):void 0}}
54
+ function af(a){function b(e){return void 0==e||""===e?0:Number(e)}var c=a.get(ce);if(c&&a.get(je)){var d=b(a.get(fe));if(1E3*d+b(a.get(he))<=(new Date).getTime())J(76);else return{timestamp:d,qa:c}}};var p=/^(GTM|OPT)-[A-Z0-9]+$/,q=/;_gaexp=[^;]*/g,r=/;((__utma=)|([^;=]+=GAX?\d+\.))[^;]*/g,Aa=/^https?:\/\/[\w\-.]+\.google.com(:\d+)?\/optimize\/opt-launch\.html\?.*$/,t=function(a){function b(d,e){e&&(c+="&"+d+"="+K(e))}var c="https://www.google-analytics.com/gtm/js?id="+K(a.id);"dataLayer"!=a.B&&b("l",a.B);b("t",a.target);b("cid",a.clientId);b("cidt",a.ka);b("gac",a.la);b("aip",a.ia);a.sync&&b("m","sync");b("cycle",a.G);a.qa&&b("gclid",a.qa);Aa.test(M.referrer)&&b("cb",String(hd()));return c};var Jd=function(a,b,c){this.aa=b;(b=c)||(b=(b=P(a,V))&&"t0"!=b?Wd.test(b)?"_gat_"+Cc(P(a,Na)):"_gat_"+Cc(b):"_gat");this.Y=b;this.ra=null},Rd=function(a,b){var c=b.get(Wb);b.set(Wb,function(e){Pd(a,e,ed);Pd(a,e,ia);var g=c(e);Qd(a,e);return g});var d=b.get(Xb);b.set(Xb,function(e){var g=d(e);if(se(e)){if(ne()!==H(a,e)){J(80);var ca={U:re(a,e,1),google:re(a,e,2),count:0};pe("https://stats.g.doubleclick.net/j/collect",ca.U,ca)}else ta(re(a,e,0));e.set(ed,"",!0)}return g})},Pd=function(a,b,c){!1===b.get(Ud)||
55
+ b.get(c)||("1"==Ca(a.Y)[0]?b.set(c,"",!0):b.set(c,""+hd(),!0))},Qd=function(a,b){se(b)&&zc(a.Y,"1",P(b,Yb),P(b,W),P(b,Na),6E4)},se=function(a){return!!a.get(ed)&&!1!==a.get(Ud)},re=function(a,b,c){var d=new ee,e=function(ca){$a(ca).F&&d.set($a(ca).F,b.get(ca))};e(hb);e(ib);e(Na);e(Q);e(ed);if(0==c||1==c)e(Ad),e(ia),e(I);d.set($a(ld).F,Td(b));var g="";d.map(function(ca,l){g+=K(ca)+"=";g+=K(""+l)+"&"});g+="z="+hd();0==c?g=a.aa+g:1==c?g="t=dc&aip=1&_r=3&"+g:2==c&&(g="t=sr&aip=1&_r=4&slf_rd=1&"+g);return g},
56
+ H=function(a,b){null===a.ra&&(a.ra=1===Ed(b),a.ra&&J(33));return a.ra},Wd=/^gtm\d+$/;var fd=function(a,b){a=a.b;if(!a.get("dcLoaded")){var c=new $c(Dd(a));c.set(29);a.set(Gd,c.w);b=b||{};var d;b[U]&&(d=Cc(b[U]));b=new Jd(a,"https://stats.g.doubleclick.net/r/collect?t=dc&aip=1&_r=3&",d);Rd(b,a);a.set("dcLoaded",!0)}};var Sd=function(a){if(!a.get("dcLoaded")&&"cookie"==a.get(ac)){var b=new Jd(a);Pd(b,a,ed);Pd(b,a,ia);Qd(b,a);if(se(a)){var c=ne()!==H(b,a);a.set(Md,1,!0);c?(J(79),a.set(gd,oe()+"/j/collect",!0),a.set(qe,{U:re(b,a,1),google:re(b,a,2),count:0},!0)):a.set(gd,oe()+"/r/collect",!0)}}};var Lc=function(){var a=O.gaGlobal=O.gaGlobal||{};return a.hid=a.hid||hd()};var ad,bd=function(a,b,c){if(!ad){var d=M.location.hash;var e=O.name,g=/^#?gaso=([^&]*)/;if(e=(d=(d=d&&d.match(g)||e&&e.match(g))?d[1]:Ca("GASO")[0]||"")&&d.match(/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))zc("GASO",""+d,c,b,a,0),window._udo||(window._udo=b),window._utcp||(window._utcp=c),a=e[1],wa("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+hd(),"_gasojs");ad=!0}};var wb=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,pc=function(a){function b(e,g){d.b.data.set(e,g)}function c(e,g){b(e,g);d.filters.add(e)}var d=this;this.b=new Ya;this.filters=new Ha;b(V,a[V]);b(Na,sa(a[Na]));b(U,a[U]);b(W,a[W]||xa());b(Yb,a[Yb]);b(Zb,a[Zb]);b(Hd,a[Hd]);b($b,a[$b]);b(Wc,a[Wc]);b(bc,a[bc]);b(cc,a[cc]);b(Ka,a[Ka]);b(dc,a[dc]);b(ec,a[ec]);b(ac,a[ac]);b(Ad,a[Ad]);b(n,a[n]);b(Kd,a[Kd]);b(je,a[je]);b(Ze,a[Ze]);b(hb,1);b(ib,"j75");c(Qb,Ma);c(oa,ua);c(dd,cd);c(Rb,Oa);c(md,vb);c(Sb,nc);c(Uc,Yc);c(Tb,
57
+ Ja);c(Vb,Ta);c(Vc,Hc);c(zd,yd);c(Ld,Sd);c(Wb,Pa);c(Xb,Sa);c(Cd,Fd(this));Kc(this.b);Jc(this.b,a[Q]);this.b.set(jb,Lc());bd(P(this.b,Na),P(this.b,W),P(this.b,Yb))},Jc=function(a,b){var c=P(a,U);a.data.set(la,"_ga"==c?"_gid":c+"_gid");if("cookie"==P(a,ac)){hc=!1;c=Ca(P(a,U));c=Xd(a,c);if(!c){c=P(a,W);var d=P(a,$b)||xa();c=Xc("__utma",d,c);void 0!=c?(J(10),c=c.O[1]+"."+c.O[2]):c=void 0}c&&(hc=!0);if(d=c&&!a.get(Hd))if(d=c.split("."),2!=d.length)d=!1;else if(d=Number(d[1])){var e=R(a,Zb);d=d+e<(new Date).getTime()/
58
+ 1E3}else d=!1;d&&(c=void 0);c&&(a.data.set(xd,c),a.data.set(Q,c),c=Ca(P(a,la)),(c=Xd(a,c))&&a.data.set(I,c));if(a.get(je)&&(c=a.get(ce),d=a.get(ie),!c||d&&"aw.ds"!=d)){c={};if(M){d=[];e=M.cookie.split(";");for(var g=/^\s*_gac_(UA-\d+-\d+)=\s*(.+?)\s*$/,ca=0;ca<e.length;ca++){var l=e[ca].match(g);l&&d.push({ja:l[1],value:l[2]})}e={};if(d&&d.length)for(g=0;g<d.length;g++)(ca=d[g].value.split("."),"1"!=ca[0]||3!=ca.length)?c&&(c.na=!0):ca[1]&&(e[d[g].ja]?c&&(c.pa=!0):e[d[g].ja]=[],e[d[g].ja].push({timestamp:ca[1],
59
+ qa:ca[2]}));d=e}else d={};d=d[P(a,Na)];le(c);d&&0!=d.length&&(c=d[0],a.data.set(fe,c.timestamp),a.data.set(ce,c.qa))}}if(a.get(Hd)&&(c=be("_ga",!!a.get(cc)),g=be("_gl",!!a.get(cc)),d=De.get(a.get(cc)),e=d._ga,g&&0<g.indexOf("_ga*")&&!e&&J(30),g=d.gclid,ca=d._gac,c||e||g||ca))if(c&&e&&J(36),a.get(bc)){if(e&&(J(38),a.data.set(Q,e),d._gid&&(J(51),a.data.set(I,d._gid))),g?(J(82),a.data.set(ce,g),d.gclsrc&&a.data.set(ie,d.gclsrc)):ca&&(d=ca.split("."))&&2===d.length&&(J(37),a.data.set(ce,d[0]),a.data.set(fe,
60
+ d[1])),c)b:if(d=c.indexOf("."),-1==d)J(22);else{e=c.substring(0,d);g=c.substring(d+1);d=g.indexOf(".");c=g.substring(0,d);g=g.substring(d+1);if("1"==e){if(d=g,ke(d,c)){J(23);break b}}else if("2"==e){d=g.indexOf("-");e="";0<d?(e=g.substring(0,d),d=g.substring(d+1)):d=g.substring(1);if(ke(e+d,c)){J(53);break b}e&&(J(2),a.data.set(I,e))}else{J(22);break b}J(11);a.data.set(Q,d);if(c=be("_gac",!!a.get(cc)))c=c.split("."),"1"!=c[0]||4!=c.length?J(72):ke(c[3],c[1])?J(71):(a.data.set(ce,c[3]),a.data.set(fe,
61
+ c[2]),J(70))}}else J(21);b&&(J(9),a.data.set(Q,K(b)));a.get(Q)||((b=(b=O.gaGlobal&&O.gaGlobal.vid)&&-1!=b.search(jd)?b:void 0)?(J(17),a.data.set(Q,b)):(J(8),a.data.set(Q,ra())));a.get(I)||(J(3),a.data.set(I,ra()));mc(a)},Kc=function(a){var b=O.navigator,c=O.screen,d=M.location;a.set(lb,ya(!!a.get(ec),!!a.get(Kd)));if(d){var e=d.pathname||"";"/"!=e.charAt(0)&&(J(31),e="/"+e);a.set(kb,d.protocol+"//"+d.hostname+e+d.search)}c&&a.set(qb,c.width+"x"+c.height);c&&a.set(pb,c.colorDepth+"-bit");c=M.documentElement;
62
+ var g=(e=M.body)&&e.clientWidth&&e.clientHeight,ca=[];c&&c.clientWidth&&c.clientHeight&&("CSS1Compat"===M.compatMode||!g)?ca=[c.clientWidth,c.clientHeight]:g&&(ca=[e.clientWidth,e.clientHeight]);c=0>=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);a.set(tb,fc());a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,(b&&(b.language||b.browserLanguage)||"").toLowerCase());a.data.set(ce,be("gclid",!0));a.data.set(ie,be("gclsrc",!0));a.data.set(fe,
63
+ Math.round((new Date).getTime()/1E3));if(d&&a.get(cc)&&(b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(c=0;c<b.length;++c)(D(b[c],"utm_id")||D(b[c],"utm_campaign")||D(b[c],"utm_source")||D(b[c],"utm_medium")||D(b[c],"utm_term")||D(b[c],"utm_content")||D(b[c],"gclid")||D(b[c],"dclid")||D(b[c],"gclsrc"))&&d.push(b[c]);0<d.length&&(b="#"+d.join("&"),a.set(kb,a.get(kb)+b))}};pc.prototype.get=function(a){return this.b.get(a)};pc.prototype.set=function(a,b){this.b.set(a,b)};
64
+ var qc={pageview:[mb],event:[ub,xb,yb,zb],social:[Bb,Cb,Db],timing:[Mb,Nb,Pb,Ob]};pc.prototype.send=function(a){if(!(1>arguments.length)){if("string"===typeof arguments[0]){var b=arguments[0];var c=[].slice.call(arguments,1)}else b=arguments[0]&&arguments[0][Va],c=arguments;b&&(c=za(qc[b]||[],c),c[Va]=b,this.b.set(c,void 0,!0),this.filters.D(this.b),this.b.data.m={})}};pc.prototype.ma=function(a,b){var c=this;u(a,c,b)||(v(a,function(){u(a,c,b)}),y(String(c.get(V)),a,void 0,b,!0))};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0},z=function(a){if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}};var td=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=td.exec(a[0]);null!=b&&4==b.length&&(this.c=b[1]||"t0",this.K=b[2]||"",this.C=b[3],this.a=[].slice.call(a,1),this.K||(this.A="create"==this.C,this.i="require"==this.C,this.g="provide"==this.C,this.ba="remove"==this.C),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(qa(this.a[1])?this.X=this.a[1]:this.W=this.a[1])));b=a[1];a=a[2];if(!this.C)throw"abort";if(this.i&&(!qa(b)||""==b))throw"abort";
65
+ if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.c)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d,A;Yd=new ee;$d=new ee;A=new ee;Zd={ec:45,ecommerce:46,linkid:47};
66
+ var u=function(a,b,c){b==N||b.get(V);var d=Yd.get(a);if(!ea(d))return!1;b.plugins_=b.plugins_||new ee;if(b.plugins_.get(a))return!0;b.plugins_.set(a,new d(b,c||{}));return!0},y=function(a,b,c,d,e){if(!ea(Yd.get(b))&&!$d.get(b)){Zd.hasOwnProperty(b)&&J(Zd[b]);if(p.test(b)){J(52);a=N.j(a);if(!a)return!0;c=d||{};d={id:b,B:c.dataLayer||"dataLayer",ia:!!a.get("anonymizeIp"),sync:e,G:!1};a.get("&gtm")==b&&(d.G=!0);var g=String(a.get("name"));"t0"!=g&&(d.target=g);G(String(a.get("trackingId")))||(d.clientId=
67
+ String(a.get(Q)),d.ka=Number(a.get(n)),c=c.palindrome?r:q,c=(c=M.cookie.replace(/^|(; +)/g,";").match(c))?c.sort().join("").substring(1):void 0,d.la=c,d.qa=E(a.b.get(kb)||"","gclid"));a=d.B;c=(new Date).getTime();O[a]=O[a]||[];c={"gtm.start":c};e||(c.event="gtm.js");O[a].push(c);c=t(d)}!c&&Zd.hasOwnProperty(b)?(J(39),c=b+".js"):J(43);c&&(c&&0<=c.indexOf("/")||(c=(Ba||"https:"==M.location.protocol?"https:":"http:")+"//www.google-analytics.com/plugins/ua/"+c),d=ae(c),a=d.protocol,c=M.location.protocol,
68
+ ("https:"==a||a==c||("http:"!=a?0:"http:"==c))&&B(d)&&(wa(d.url,void 0,e),$d.set(b,!0)))}},v=function(a,b){var c=A.get(a)||[];c.push(b);A.set(a,c)},C=function(a,b){Yd.set(a,b);b=A.get(a)||[];for(var c=0;c<b.length;c++)b[c]();A.set(a,[])},B=function(a){var b=ae(M.location.href);if(D(a.url,"https://www.google-analytics.com/gtm/js?id="))return!0;if(a.query||0<=a.url.indexOf("?")||0<=a.path.indexOf("://"))return!1;if(a.host==b.host&&a.port==b.port)return!0;b="http:"==a.protocol?80:443;return"www.google-analytics.com"==
69
+ a.host&&(a.port||b)==b&&D(a.path,"/plugins/")?!0:!1},ae=function(a){function b(l){var k=l.hostname||"",w=0<=k.indexOf("]");k=k.split(w?"]":":")[0].toLowerCase();w&&(k+="]");w=(l.protocol||"").toLowerCase();w=1*l.port||("http:"==w?80:"https:"==w?443:"");l=l.pathname||"";D(l,"/")||(l="/"+l);return[k,""+w,l]}var c=M.createElement("a");c.href=M.location.href;var d=(c.protocol||"").toLowerCase(),e=b(c),g=c.search||"",ca=d+"//"+e[0]+(e[1]?":"+e[1]:"");D(a,"//")?a=d+a:D(a,"/")?a=ca+a:!a||D(a,"?")?a=ca+e[2]+
70
+ (a||g):0>a.split("/")[0].indexOf(":")&&(a=ca+e[2].substring(0,e[2].lastIndexOf("/"))+"/"+a);c.href=a;d=b(c);return{protocol:(c.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],query:c.search||"",url:a||""}};var Z={ga:function(){Z.f=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments);b=Z.f.concat(b);for(Z.f=[];0<b.length&&!Z.v(b[0])&&!(b.shift(),0<Z.f.length););Z.f=Z.f.concat(b)};Z.J=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new sc(arguments[c]);d.g?C(d.a[0],d.a[1]):(d.i&&(d.ha=y(d.c,d.a[0],d.X,d.W)),b.push(d))}catch(e){}return b};
71
+ Z.v=function(a){try{if(a.u)a.u.call(O,N.j("t0"));else{var b=a.c==gb?N:N.j(a.c);if(a.A){if("t0"==a.c&&(b=N.create.apply(N,a.a),null===b))return!0}else if(a.ba)N.remove(a.c);else if(b)if(a.i){if(a.ha&&(a.ha=y(a.c,a.a[0],a.X,a.W)),!u(a.a[0],b,a.W))return!0}else if(a.K){var c=a.C,d=a.a,e=b.plugins_.get(a.K);e[c].apply(e,d)}else b[a.C].apply(b,a.a)}}catch(g){}};var N=function(a){J(1);Z.D.apply(Z,[arguments])};N.h={};N.P=[];N.L=0;N.ya=0;N.answer=42;var uc=[Na,W,V];N.create=function(a){var b=za(uc,[].slice.call(arguments));b[V]||(b[V]="t0");var c=""+b[V];if(N.h[c])return N.h[c];if(da(b))return null;b=new pc(b);N.h[c]=b;N.P.push(b);return b};N.remove=function(a){for(var b=0;b<N.P.length;b++)if(N.P[b].get(V)==a){N.P.splice(b,1);N.h[a]=null;break}};N.j=function(a){return N.h[a]};N.getAll=function(){return N.P.slice(0)};
72
+ N.N=function(){"ga"!=gb&&J(49);var a=O[gb];if(!a||42!=a.answer){N.L=a&&a.l;N.ya=1*new Date;N.loaded=!0;var b=O[gb]=N;X("create",b,b.create);X("remove",b,b.remove);X("getByName",b,b.j,5);X("getAll",b,b.getAll,6);b=pc.prototype;X("get",b,b.get,7);X("set",b,b.set,4);X("send",b,b.send);X("requireSync",b,b.ma);b=Ya.prototype;X("get",b,b.get);X("set",b,b.set);if("https:"!=M.location.protocol&&!Ba){a:{b=M.getElementsByTagName("script");for(var c=0;c<b.length&&100>c;c++){var d=b[c].src;if(d&&0==d.indexOf("https://www.google-analytics.com/analytics")){b=
73
+ !0;break a}}b=!1}b&&(Ba=!0)}(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;C("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);C("displayfeatures",fd);C("adfeatures",fd);a=a&&a.q;ka(a)?Z.D.apply(N,a):J(50)}};N.da=function(){for(var a=N.getAll(),b=0;b<a.length;b++)a[b].get(V)};var we=N.N,xe=O[gb];xe&&xe.r?we():z(we);z(function(){Z.D(["provide","render",ua])});})(window);
inc/sbp-minifier.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
 
 
 
 
 
 
3
  /*--------------------------------------------------------------------------------------------------------
4
  MINIFIER - increase your page load speed by minifying JavaScript and HTML
5
  ---------------------------------------------------------------------------------------------------------*/
1
  <?php
2
 
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
  /*--------------------------------------------------------------------------------------------------------
9
  MINIFIER - increase your page load speed by minifying JavaScript and HTML
10
  ---------------------------------------------------------------------------------------------------------*/
inc/settings.php CHANGED
@@ -1,5 +1,10 @@
1
  <?php
2
 
 
 
 
 
 
3
  if ( ! class_exists( 'Speed_Booster_Pack_Options' ) ) {
4
 
5
  class Speed_Booster_Pack_Options {
1
  <?php
2
 
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
  if ( ! class_exists( 'Speed_Booster_Pack_Options' ) ) {
9
 
10
  class Speed_Booster_Pack_Options {
inc/template/notice.php CHANGED
@@ -1,4 +1,11 @@
1
- <div class="notice sbp-notice" id="sbp-notice">
 
 
 
 
 
 
 
2
  <img src="<?php echo esc_url(plugins_url('images/logo.png', dirname(__FILE__))); ?>" width="80">
3
  <h1><?php esc_html_e('Welcome to Speed Booster Pack', 'speed-booster-pack'); ?></h1>
4
  <p><?php printf(esc_html__('Thank you for installing Speed Booster Pack! Check out the %sPlugin settings%s for new features that can make your site load faster.', 'speed-booster-pack'), '<a href="admin.php?page=sbp-options">', '</a>'); ?></p>
1
+ <?php
2
+
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
+ ?><div class="notice sbp-notice" id="sbp-notice">
9
  <img src="<?php echo esc_url(plugins_url('images/logo.png', dirname(__FILE__))); ?>" width="80">
10
  <h1><?php esc_html_e('Welcome to Speed Booster Pack', 'speed-booster-pack'); ?></h1>
11
  <p><?php printf(esc_html__('Thank you for installing Speed Booster Pack! Check out the %sPlugin settings%s for new features that can make your site load faster.', 'speed-booster-pack'), '<a href="admin.php?page=sbp-options">', '</a>'); ?></p>
inc/template/options.php CHANGED
@@ -1,7 +1,12 @@
1
  <?php
2
 
 
 
 
 
 
3
  // handle closed postboxes
4
- $user_id = get_current_user_id();
5
  $option_name = 'closedpostboxes_' . 'toplevel_page_sbp-options'; // use the "pagehook" ID
6
  $option_arr = get_user_option( $option_name, $user_id ); // get the options for that page
7
 
@@ -23,7 +28,7 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
23
 
24
  <div class="col-main">
25
 
26
- <h1 class="admin-page-title"><?php echo esc_html( get_admin_page_title() ); ?></h1>
27
 
28
  <h2 class="nav-tab-wrapper wp-clearfix">
29
  <a class="nav-tab" href="#general-options"><span class="dashicons dashicons-admin-generic"></span> <?php _e( 'General', 'speed-booster-pack' ); ?></a>
@@ -50,71 +55,71 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
50
  'type' => 'section',
51
  'label' => 'Safe Optimizations',
52
  'items' => array(
53
- 'query_strings' => array(
54
- 'type' => 'checkbox',
55
- 'label' => __( 'Remove query strings', 'speed-booster-pack' ),
56
- 'tooltip' => __( 'Since most proxies do not cache resources with a ? in their URL, this option allows you to remove any query strings (version numbers) from static resources like CSS & JS files, thus improving your speed scores in services like GTmetrix, PageSpeed, YSlow and Pingdoom.', 'speed-booster-pack' ),
57
  'options_group' => 'sbp_settings',
58
  ),
59
- 'remove_emojis' => array(
60
- 'type' => 'checkbox',
61
- 'label' => __( 'Remove WordPress Emoji scripts', 'speed-booster-pack' ),
62
- 'tooltip' => __( 'Emojis are fun and all, but if you are aren’t using them they actually load a JavaScript file (wp-emoji-release.min.js) on every page of your website. For a lot of businesses, this is not needed and simply adds load time to your site. So we recommend disabling this.', 'speed-booster-pack' ),
63
  'options_group' => 'sbp_settings',
64
  ),
65
- 'remove_wsl' => array(
66
- 'type' => 'checkbox',
67
- 'label' => __( 'Remove WordPress Shortlink', 'speed-booster-pack' ),
68
- 'tooltip' => __( 'WordPress URL shortening is sometimes useful, but it automatically adds an ugly code in your header, so you can remove it.', 'speed-booster-pack' ),
69
  'options_group' => 'sbp_settings',
70
  ),
71
- 'remove_adjacent' => array(
72
- 'type' => 'checkbox',
73
- 'label' => __( 'Remove Adjacent Posts Links', 'speed-booster-pack' ),
74
- 'tooltip' => __( 'WordPress incorrectly implements this feature that supposedly should fix a pagination issues but it messes up, so there is no reason to keep these around. However, some browsers may use Adjacent Posts Links to navigate your site, although you can remove it if you run a well designed theme.', 'speed-booster-pack' ),
75
  'options_group' => 'sbp_settings',
76
  ),
77
- 'wml_link' => array(
78
- 'type' => 'checkbox',
79
- 'label' => __( 'Remove Windows Live Writer Manifest', 'speed-booster-pack' ),
80
- 'tooltip' => __( 'Windows Live Writer (WLW) is a Microsoft application for composing and managing blog posts offline and publish them later. If you are not using Windows Live Writer application, you can remove it from the WP head.', 'speed-booster-pack' ),
81
  'options_group' => 'sbp_settings',
82
  ),
83
- 'wp_generator' => array(
84
- 'type' => 'checkbox',
85
- 'label' => __( 'Remove WordPress Version', 'speed-booster-pack' ),
86
- 'tooltip' => __( 'Windows Live Writer (WLW) is a Microsoft application for composing and managing blog posts offline and publish them later. If you are not using Windows Live Writer application, you can remove it from the WP head.', 'speed-booster-pack' ),
87
  'options_group' => 'sbp_settings',
88
  ),
89
  'disable_self_pingbacks' => array(
90
- 'type' => 'checkbox',
91
- 'label' => __( 'Disable Self Pingbacks', 'speed-booster-pack' ),
92
- 'tooltip' => __( 'A pingback is a special type of comment that’s created when you link to another blog post, as long as the other blog is set to accept pingbacks.', 'speed-booster-pack' ),
93
  'options_group' => 'sbp_settings',
94
  ),
95
  'remove_jquery_migrate' => array(
96
- 'type' => 'checkbox',
97
- 'label' => __( 'Remove jQuery Migrate', 'speed-booster-pack' ),
98
- 'tooltip' => __( 'Remove the jquery-migrate.js script that helps older jQuery plugins to be compatible with new jQuery versions. You safely turn this setting on if your jQuery plugins are all new.', 'speed-booster-pack' ),
99
  'options_group' => 'sbp_settings',
100
  ),
101
- 'disable_dashicons' => array(
102
- 'type' => 'checkbox',
103
- 'label' => __( 'Remove Dashicons', 'speed-booster-pack' ),
104
- 'tooltip' => __( 'Remove Dashicons from front end.', 'speed-booster-pack' ),
105
  'options_group' => 'sbp_settings',
106
  ),
107
- 'disable_heartbeat' => array(
108
- 'type' => 'checkbox',
109
- 'label' => __( 'Disable Heartbeat', 'speed-booster-pack' ),
110
- 'tooltip' => __( 'Disable heartbeat everywhere ( used for autosaving and revision tracking ).', 'speed-booster-pack' ),
111
  'options_group' => 'sbp_settings',
112
  ),
113
- 'heartbeat_frequency' => array(
114
- 'type' => 'select',
115
- 'label' => __( 'Heartbeat frequency', 'speed-booster-pack' ),
116
- 'tooltip' => __( 'Controls how often the WordPress Heartbeat API is allowed to run. ', 'speed-booster-pack' ),
117
- 'options' => array(
118
  '15' => '15',
119
  '30' => '30',
120
  '45' => '45',
@@ -123,29 +128,29 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
123
  'options_group' => 'sbp_settings',
124
  ),
125
  'limit_post_revisions' => array(
126
- 'type' => 'select',
127
- 'label' => __( 'Limit Post Revisions', 'speed-booster-pack' ),
128
- 'tooltip' => __( 'Controls how many revisions WordPress will save ', 'speed-booster-pack' ),
129
- 'options' => array(
130
- '1' => '1',
131
- '2' => '2',
132
- '3' => '3',
133
- '4' => '4',
134
- '5' => '5',
135
- '10' => '10',
136
- '15' => '15',
137
- '20' => '20',
138
- '25' => '25',
139
- '30' => '30',
140
  'false' => 'Disable',
141
  ),
142
  'options_group' => 'sbp_settings',
143
  ),
144
- 'autosave_interval' => array(
145
- 'type' => 'select',
146
- 'label' => __( 'Autosave interval', 'speed-booster-pack' ),
147
- 'tooltip' => __( 'Controls how WordPress will autosave posts and pages while editing.', 'speed-booster-pack' ),
148
- 'options' => array(
149
  '1' => __( '1 minute', 'speed-booster-pack' ),
150
  '2' => __( '2 minutes', 'speed-booster-pack' ),
151
  '3' => __( '3 minutes', 'speed-booster-pack' ),
@@ -167,39 +172,39 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
167
  'label' => __( 'Advanced Optimizations', 'speed-booster-pack' ),
168
  'items' => array(
169
  'enable_instant_page' => array(
170
- 'type' => 'checkbox',
171
- 'label' => __( 'Enable instant.page (BETA)', 'speed-booster-pack' ),
172
- 'tooltip' => __( 'Check this option if you want to use the instant.page link preloader. This is a new and experimental feature; use with caution. If something goes wrong, simply uncheck this option and save the settings.', 'speed-booster-pack' ),
173
  'options_group' => 'sbp_settings',
174
  ),
175
  'disable_cart_fragments' => array(
176
- 'type' => 'checkbox',
177
- 'label' => __( 'Disable cart fragments (BETA)', 'speed-booster-pack' ),
178
- 'tooltip' => __( 'Check this option to disable WooCommerce&#39;s &quot;cart fragments&quot; script, which overrides all caching function to update cart totals on each page load in your theme header. This is a new and experimental feature; use with caution. If something goes wrong, simply uncheck this option and save the settings.', 'speed-booster-pack' ),
179
  'options_group' => 'sbp_settings',
180
  ),
181
- 'disable_google_maps' => array(
182
- 'type' => 'checkbox',
183
- 'label' => __( 'Remove Google Maps', 'speed-booster-pack' ),
184
- 'tooltip' => __( 'Remove Google Maps from front end. ', 'speed-booster-pack' ),
185
  'options_group' => 'sbp_settings',
186
  ),
187
  'remove_rest_api_links' => array(
188
- 'type' => 'checkbox',
189
- 'label' => __( 'Remove REST API Links', 'speed-booster-pack' ),
190
- 'tooltip' => __( 'The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving JSON (JavaScript Object Notation) objects.', 'speed-booster-pack' ),
191
  'options_group' => 'sbp_settings',
192
  ),
193
- 'remove_all_feeds' => array(
194
- 'type' => 'checkbox',
195
- 'label' => __( 'Remove all RSS feed links', 'speed-booster-pack' ),
196
- 'tooltip' => __( 'This option will remove all RSS feed links to cleanup your WordPress header. It is also useful on Unicorn – The W3C Markup Validation Service to get rid out the “feed does not validate” error.', 'speed-booster-pack' ),
197
  'options_group' => 'sbp_settings',
198
  ),
199
  'minify_html_js' => array(
200
- 'type' => 'checkbox',
201
- 'label' => __( 'Minify HTML', 'speed-booster-pack' ),
202
- 'tooltip' => __( 'Activate this option only if you don’t want to use other minify plugins or other speed optimization plugin that has minify option included. If something goes wrong, simply uncheck this option and save the settings.', 'speed-booster-pack' ),
203
  'options_group' => 'sbp_settings',
204
  ),
205
  )
@@ -209,24 +214,24 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
209
  'label' => __( 'JavaScript Optimization', 'speed-booster-pack' ),
210
  'items' => array(
211
  'jquery_to_footer' => array(
212
- 'type' => 'checkbox',
213
- 'label' => __( 'Move scripts to footer', 'speed-booster-pack' ),
214
- 'tooltip' => __( 'This option move all scripts to the footer while keeping stylesheets in the header to improve page loading speed and get a higher score on the major speed testing sites such as GTmetrix or other website speed testing tools', 'speed-booster-pack' ),
215
  'options_group' => 'sbp_settings',
216
  ),
217
- 'defer_parsing' => array(
218
- 'type' => 'checkbox',
219
- 'label' => __( 'Defer parsing of JS files', 'speed-booster-pack' ),
220
- 'tooltip' => __( '!!!Note: This will be disabled IF Move Scripts to Footer is enabled. By deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page.', 'speed-booster-pack' ),
221
  'options_group' => 'sbp_settings',
222
  ),
223
  )
224
  ),
225
  array(
226
- 'type' => 'section',
227
- 'label' => __( 'Exclude scripts from being moved to the footer', 'speed-booster-pack' ),
228
  'description' => __( 'Enter one JS handle per text field. Read more <a href="https://optimocha.com/speed-booster-pack-documentation/#exclude-scripts-from-being-moved-to-the-footer-50">detailed instructions</a> on this option on plugin documentation.', 'speed-booster-pack' ),
229
- 'items' => array(
230
  'sbp_js_footer_exceptions1' => array(
231
  'type' => 'text',
232
  ),
@@ -240,7 +245,7 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
240
  'type' => 'text',
241
  ),
242
  //guidance
243
- 'guidance_options_js' => array(
244
  'type' => 'guidance',
245
  'label' => __( 'As a guidance, here is a list of script handles and script paths of each enqueued script detected by our plugin:', 'speed-booster-pack' ),
246
  ),
@@ -263,10 +268,10 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
263
  'sbp_defer_exceptions4' => array(
264
  'type' => 'text',
265
  ),
266
- 'info' => array(
267
- 'type' => 'guidance',
268
  'description_only' => true,
269
- 'description' => __( 'Enter one by text field, the handle part of the JS files that you want to be excluded from defer parsing option. For example: <code>jquery-core</code> If you want to exclude more than 4 scripts, you can use the following filter: <code>sbp_exclude_defer_scripts</code> which takes an array of script handles as params. If you don\'t know how to handle this, feel free to post on our support forums.', 'speed-booster-pack' ),
270
  ),
271
  ),
272
  ),
@@ -276,21 +281,21 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
276
  'label' => __( 'CSS Optimization', 'speed-booster-pack' ),
277
  'items' => array(
278
  'sbp_css_async' => array(
279
- 'type' => 'checkbox',
280
- 'label' => __( 'Inline all CSS', 'speed-booster-pack' ),
281
- 'tooltip' => __( 'Checking this option will inline the contents of all your stylesheets. This helps with the annoying render blocking error Google Page Speed Insights displays.', 'speed-booster-pack' ),
282
  'options_group' => 'sbp_settings',
283
  ),
284
  'sbp_css_minify' => array(
285
- 'type' => 'checkbox',
286
- 'label' => __( 'Minify all (previously) inlined CSS', 'speed-booster-pack' ),
287
- 'tooltip' => __( 'Minifying all inlined CSS styles will optimize the CSS delivery and will eliminate the annoying message on Google Page Speed regarding to render-blocking css.', 'speed-booster-pack' ),
288
  'options_group' => 'sbp_settings',
289
  ),
290
  'sbp_footer_css' => array(
291
- 'type' => 'checkbox',
292
- 'label' => __( 'Move all inlined CSS into the footer', 'speed-booster-pack' ),
293
- 'tooltip' => __( 'Inserting all CSS styles inline to the footer is a sensitive option that will eliminate render-blocking CSS warning in Google Page Speed test. If there is something broken after activation, you need to disable this option. Please note that before enabling this sensitive option, it is strongly recommended that you also enable the “ Move scripts to the footer” option.', 'speed-booster-pack' ),
294
  'options_group' => 'sbp_settings',
295
  ),
296
  ),
@@ -301,8 +306,8 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
301
  'label' => __( 'Exclude CSS', 'speed-booster-pack' ),
302
  'items' => array(
303
  'sbp_css_exceptions' => array(
304
- 'type' => 'textarea',
305
- 'label' => __( 'Exclude styles from being inlined and/or minified option: ', 'speed-booster-pack' ),
306
  'description' => __( 'Enter one by line, the handles of CSS files or the final part of the style URL.', 'speed-booster-pack' ),
307
  ),
308
  //CSS handle guidance
@@ -314,38 +319,38 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
314
  ),
315
  ),
316
  ),
317
- 'cdn-options' => array(
318
  'sections' => array(
319
  array(
320
- 'type' => 'section',
321
- 'label' => __( 'CDN', 'speed-booster-pack' ),
322
  'description' => __( 'CDN options that allow you to rewrite your site URLs with your CDN URLs.', 'speed-booster-pack' ),
323
- 'items' => array(
324
- 'sbp_enable_cdn' => array(
325
- 'type' => 'checkbox',
326
- 'label' => __( 'Enable CDN Rewrite', 'speed-booster-pack' ),
327
- 'tooltip' => __( 'Enables rewriting of your site URLs with your CDN URLs', 'speed-booster-pack' ),
328
  'options_group' => 'sbp_settings',
329
  ),
330
- 'sbp_cdn_url' => array(
331
- 'type' => 'text',
332
- 'label' => __( 'CDN URL', 'speed-booster-pack' ),
333
- 'tooltip' => __( 'Enter your CDN URL without the trailing slash. Example: https://cdn.example.com', 'speed-booster-pack' ),
334
  'options_group' => 'sbp_settings',
335
  ),
336
  'sbp_cdn_included_directories' => array(
337
- 'type' => 'text',
338
- 'label' => __( 'Included Directories', 'speed-booster-pack' ),
339
- 'tooltip' => __( 'Enter any directories you would like to be included in CDN rewriting, separated by commas (,). Default: wp-content,wp-includes', 'speed-booster-pack' ),
340
  'options_group' => 'sbp_settings',
341
- 'default' => 'wp-content,wp-includes',
342
  ),
343
- 'sbp_cdn_exclusions' => array(
344
- 'type' => 'text',
345
- 'label' => __( 'CDN Exclusions', 'speed-booster-pack' ),
346
- 'tooltip' => __( 'Enter any directories or file extensions you would like to be excluded from CDN rewriting, separated by commas (,). Default: .php', 'speed-booster-pack' ),
347
  'options_group' => 'sbp_settings',
348
- 'default' => '.php',
349
  ),
350
  ),
351
  ),
@@ -354,60 +359,60 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
354
  'google-analytics' => array(
355
  'sections' => array(
356
  array(
357
- 'type' => 'section',
358
- 'label' => __( 'Google Analytics', 'speed-booster-pack' ),
359
  'description' => __( 'Optimization options for Google Analytics.', 'speed-booster-pack' ),
360
- 'items' => array(
361
  'sbp_enable_local_analytics' => array(
362
- 'type' => 'checkbox',
363
- 'label' => __( 'Enable Local Analytics', 'speed-booster-pack' ),
364
- 'tooltip' => __( 'Enable syncing of the Google Analytics script to your own server.', 'speed-booster-pack' ),
365
  'options_group' => 'sbp_settings',
366
  ),
367
- 'sbp_ga_tracking_id' => array(
368
- 'type' => 'text',
369
- 'label' => __( 'Tracking ID', 'speed-booster-pack' ),
370
- 'tooltip' => __( 'Enter your Google Analytics tracking ID', 'speed-booster-pack' ),
371
  'options_group' => 'sbp_settings',
372
  ),
373
- 'sbp_tracking_position' => array(
374
- 'type' => 'select',
375
- 'label' => __( 'Tracking code position', 'speed-booster-pack' ),
376
- 'tooltip' => __( 'Load your GA script in the header or footer of the site. Default - header', 'speed-booster-pack' ),
377
  'options_group' => 'sbp_settings',
378
- 'options' => array(
379
  'header' => 'Header (default)',
380
  'footer' => 'Footer',
381
  ),
382
  ),
383
  'sbp_disable_display_features' => array(
384
- 'type' => 'checkbox',
385
- 'label' => __( 'Disable Display Features', 'speed-booster-pack' ),
386
- 'tooltip' => __( 'Disable marketing and advertising which generates a 2nd HTTP request', 'speed-booster-pack' ),
387
  'options_group' => 'sbp_settings',
388
  ),
389
- 'sbp_anonymize_ip' => array(
390
- 'type' => 'checkbox',
391
- 'label' => __( 'Anonymize IP', 'speed-booster-pack' ),
392
- 'tooltip' => __( 'Shorten visitor IP to comply with privacy restrictions in some countries.', 'speed-booster-pack' ),
393
  'options_group' => 'sbp_settings',
394
  ),
395
- 'sbp_track_loggedin_admins' => array(
396
- 'type' => 'checkbox',
397
- 'label' => __( 'Track Admins', 'speed-booster-pack' ),
398
- 'tooltip' => __( 'Include logged in WordPress admins in your GA report.', 'speed-booster-pack' ),
399
  'options_group' => 'sbp_settings',
400
  ),
401
- 'sbp_bounce_rate' => array(
402
- 'type' => 'text',
403
- 'label' => __( 'Adjust Bounce Rate', 'speed-booster-pack' ),
404
- 'tooltip' => __( 'Set a timeout limit in seconds to better evaluate the quality of your traffic (1 - 100)', 'speed-booster-pack' ),
405
  'options_group' => 'sbp_settings',
406
  ),
407
- 'sbp_monsterinsights' => array(
408
- 'type' => 'checkbox',
409
- 'label' => __( 'MonsterInsights Integration', 'speed-booster-pack' ),
410
- 'tooltip' => __( 'Allows MonsterInsights to manage your Google Analytics while still using the locally hosted analytics.js generated by Speed Booster Pack', 'speed-booster-pack' ),
411
  'options_group' => 'sbp_settings',
412
  ),
413
  ),
@@ -435,17 +440,17 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
435
  <h3><?php echo $values['label']; ?></h3>
436
  <?php
437
  }
438
-
439
 
440
  //Start the sections
441
  foreach ( $values['sections'] as $section => $section_value ) {
442
 
443
  ?>
444
- <div class="postbox" id="<?php echo $section; ?>">
445
  <h3 class="hndle ui-sortable-handle" style="cursor: pointer;"><?php echo ( isset( $section_value['label'] ) ) ? $section_value['label'] : ""; ?></h3>
446
  <div class="inside">
447
  <?php
448
-
449
  //Start the options
450
  foreach ( $section_value['items'] as $item => $item_value ) {
451
 
@@ -453,9 +458,9 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
453
  <div class="onoffswitch-wrapper">
454
  <?php if ( isset( $item_value['tooltip'] ) ) { ?>
455
  <span class="tooltip-right"
456
- data-tooltip="<?php echo $item_value['tooltip']; ?>">
457
- <i class="dashicons dashicons-editor-help"></i>
458
- </span>
459
  <?php } ?>
460
  <span class="chekbox-title"><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></span>
461
 
@@ -481,13 +486,13 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
481
  <p>
482
  <?php if ( isset( $item_value['tooltip'] ) ) { ?>
483
  <span class="tooltip-right"
484
- data-tooltip="<?php echo $item_value['tooltip']; ?>">
485
- <i class="dashicons dashicons-editor-help"></i>
486
- </span>
487
  <?php } ?>
488
  <label for="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>" class="<?php echo ( isset( $item_value['label'] ) ) ? 'label-text' : ''; ?>"><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></label>
489
  <select id="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>"
490
- name="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>">
491
  <?php
492
  foreach ( $item_value['options'] as $option_k => $op_v ) {
493
  ?>
@@ -512,23 +517,22 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
512
  ?>
513
  <?php if ( isset( $item_value['tooltip'] ) ) { ?>
514
  <span class="tooltip-right"
515
- data-tooltip="<?php echo $item_value['tooltip']; ?>">
516
- <i class="dashicons dashicons-editor-help"></i>
517
- </span>
518
  <?php } ?>
519
  <label for="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>" class="<?php echo ( isset( $item_value['label'] ) ) ? 'label-text' : ''; ?>"><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></label>
520
 
521
  <input id="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>"
522
- name="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>" type="text" value="<?php echo esc_attr( $op_text ); ?>" />
523
  </p>
524
  <?php }
525
 
526
  if ( 'textarea' == $item_value['type'] ) { ?>
527
  <h4><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></h4>
528
  <p>
529
- <textarea cols="50" rows="3" name="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>"
530
- id="<?php echo $item; ?>"
531
- value="<?php echo esc_attr( $css_exceptions ); ?>"><?php echo wp_kses_post( $css_exceptions ); ?></textarea>
532
  </p>
533
  <p class="description">
534
  <?php echo isset( $item_value['description'] ) ? $item_value['description'] : ''; ?>
@@ -540,10 +544,6 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
540
  if ( $item == 'guidance_options_css' ) {
541
  ?>
542
 
543
- <p>
544
- <h4><?php $item_value['label']; ?></h4>
545
- </p>
546
-
547
  <div class="sbp-all-enqueued">
548
 
549
  <div class="sbp-div-head">
@@ -615,7 +615,7 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
615
  </div>
616
  </div>
617
  <?php
618
-
619
  }
620
  ?>
621
  </div> <!-- Tab sections -->
@@ -668,7 +668,7 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
668
  </div><!--/.col-main-->
669
 
670
  <div class="col-side">
671
-
672
  <div class="postbox">
673
  <h3 class="hndle">Invest in More Speed!</h3>
674
  <div class="inside">
@@ -677,7 +677,7 @@ if ( is_array( $option_arr ) && in_array( 'defer-from-footer', $option_arr ) ) {
677
  <p><a href="https://optimocha.com/?ref=sbp" target="_blank" class="button button-primary button-large"><?php _e( "Speed Up Your Website!", 'speed-booster-pack' ); ?></a></p>
678
  </div>
679
  </div>
680
-
681
  <div class="postbox">
682
  <h3 class="hndle">Test Your Website</h3>
683
  <div class="inside">
1
  <?php
2
 
3
+ // Security control for vulnerability attempts
4
+ if( !defined( 'ABSPATH' ) ) {
5
+ die;
6
+ }
7
+
8
  // handle closed postboxes
9
+ $user_id = get_current_user_id();
10
  $option_name = 'closedpostboxes_' . 'toplevel_page_sbp-options'; // use the "pagehook" ID
11
  $option_arr = get_user_option( $option_name, $user_id ); // get the options for that page
12
 
28
 
29
  <div class="col-main">
30
 
31
+ <h1 class="admin-page-title"><?php echo esc_html( get_admin_page_title() ); ?></h1>
32
 
33
  <h2 class="nav-tab-wrapper wp-clearfix">
34
  <a class="nav-tab" href="#general-options"><span class="dashicons dashicons-admin-generic"></span> <?php _e( 'General', 'speed-booster-pack' ); ?></a>
55
  'type' => 'section',
56
  'label' => 'Safe Optimizations',
57
  'items' => array(
58
+ 'query_strings' => array(
59
+ 'type' => 'checkbox',
60
+ 'label' => __( 'Remove query strings', 'speed-booster-pack' ),
61
+ 'tooltip' => __( 'Since most proxies do not cache resources with a ? in their URL, this option allows you to remove any query strings (version numbers) from static resources like CSS & JS files, thus improving your speed scores in services like GTmetrix, PageSpeed, YSlow and Pingdoom.', 'speed-booster-pack' ),
62
  'options_group' => 'sbp_settings',
63
  ),
64
+ 'remove_emojis' => array(
65
+ 'type' => 'checkbox',
66
+ 'label' => __( 'Remove WordPress Emoji scripts', 'speed-booster-pack' ),
67
+ 'tooltip' => __( 'Emojis are fun and all, but if you are aren’t using them they actually load a JavaScript file (wp-emoji-release.min.js) on every page of your website. For a lot of businesses, this is not needed and simply adds load time to your site. So we recommend disabling this.', 'speed-booster-pack' ),
68
  'options_group' => 'sbp_settings',
69
  ),
70
+ 'remove_wsl' => array(
71
+ 'type' => 'checkbox',
72
+ 'label' => __( 'Remove WordPress Shortlink', 'speed-booster-pack' ),
73
+ 'tooltip' => __( 'WordPress URL shortening is sometimes useful, but it automatically adds an ugly code in your header, so you can remove it.', 'speed-booster-pack' ),
74
  'options_group' => 'sbp_settings',
75
  ),
76
+ 'remove_adjacent' => array(
77
+ 'type' => 'checkbox',
78
+ 'label' => __( 'Remove Adjacent Posts Links', 'speed-booster-pack' ),
79
+ 'tooltip' => __( 'WordPress incorrectly implements this feature that supposedly should fix a pagination issues but it messes up, so there is no reason to keep these around. However, some browsers may use Adjacent Posts Links to navigate your site, although you can remove it if you run a well designed theme.', 'speed-booster-pack' ),
80
  'options_group' => 'sbp_settings',
81
  ),
82
+ 'wml_link' => array(
83
+ 'type' => 'checkbox',
84
+ 'label' => __( 'Remove Windows Live Writer Manifest', 'speed-booster-pack' ),
85
+ 'tooltip' => __( 'Windows Live Writer (WLW) is a Microsoft application for composing and managing blog posts offline and publish them later. If you are not using Windows Live Writer application, you can remove it from the WP head.', 'speed-booster-pack' ),
86
  'options_group' => 'sbp_settings',
87
  ),
88
+ 'wp_generator' => array(
89
+ 'type' => 'checkbox',
90
+ 'label' => __( 'Remove WordPress Version', 'speed-booster-pack' ),
91
+ 'tooltip' => __( 'Windows Live Writer (WLW) is a Microsoft application for composing and managing blog posts offline and publish them later. If you are not using Windows Live Writer application, you can remove it from the WP head.', 'speed-booster-pack' ),
92
  'options_group' => 'sbp_settings',
93
  ),
94
  'disable_self_pingbacks' => array(
95
+ 'type' => 'checkbox',
96
+ 'label' => __( 'Disable Self Pingbacks', 'speed-booster-pack' ),
97
+ 'tooltip' => __( 'A pingback is a special type of comment that’s created when you link to another blog post, as long as the other blog is set to accept pingbacks.', 'speed-booster-pack' ),
98
  'options_group' => 'sbp_settings',
99
  ),
100
  'remove_jquery_migrate' => array(
101
+ 'type' => 'checkbox',
102
+ 'label' => __( 'Remove jQuery Migrate', 'speed-booster-pack' ),
103
+ 'tooltip' => __( 'Remove the jquery-migrate.js script that helps older jQuery plugins to be compatible with new jQuery versions. You safely turn this setting on if your jQuery plugins are all new.', 'speed-booster-pack' ),
104
  'options_group' => 'sbp_settings',
105
  ),
106
+ 'disable_dashicons' => array(
107
+ 'type' => 'checkbox',
108
+ 'label' => __( 'Remove Dashicons', 'speed-booster-pack' ),
109
+ 'tooltip' => __( 'Remove Dashicons from front end.', 'speed-booster-pack' ),
110
  'options_group' => 'sbp_settings',
111
  ),
112
+ 'disable_heartbeat' => array(
113
+ 'type' => 'checkbox',
114
+ 'label' => __( 'Disable Heartbeat', 'speed-booster-pack' ),
115
+ 'tooltip' => __( 'Disable heartbeat everywhere ( used for autosaving and revision tracking ).', 'speed-booster-pack' ),
116
  'options_group' => 'sbp_settings',
117
  ),
118
+ 'heartbeat_frequency' => array(
119
+ 'type' => 'select',
120
+ 'label' => __( 'Heartbeat frequency', 'speed-booster-pack' ),
121
+ 'tooltip' => __( 'Controls how often the WordPress Heartbeat API is allowed to run. ', 'speed-booster-pack' ),
122
+ 'options' => array(
123
  '15' => '15',
124
  '30' => '30',
125
  '45' => '45',
128
  'options_group' => 'sbp_settings',
129
  ),
130
  'limit_post_revisions' => array(
131
+ 'type' => 'select',
132
+ 'label' => __( 'Limit Post Revisions', 'speed-booster-pack' ),
133
+ 'tooltip' => __( 'Controls how many revisions WordPress will save ', 'speed-booster-pack' ),
134
+ 'options' => array(
135
+ '1' => '1',
136
+ '2' => '2',
137
+ '3' => '3',
138
+ '4' => '4',
139
+ '5' => '5',
140
+ '10' => '10',
141
+ '15' => '15',
142
+ '20' => '20',
143
+ '25' => '25',
144
+ '30' => '30',
145
  'false' => 'Disable',
146
  ),
147
  'options_group' => 'sbp_settings',
148
  ),
149
+ 'autosave_interval' => array(
150
+ 'type' => 'select',
151
+ 'label' => __( 'Autosave interval', 'speed-booster-pack' ),
152
+ 'tooltip' => __( 'Controls how WordPress will autosave posts and pages while editing.', 'speed-booster-pack' ),
153
+ 'options' => array(
154
  '1' => __( '1 minute', 'speed-booster-pack' ),
155
  '2' => __( '2 minutes', 'speed-booster-pack' ),
156
  '3' => __( '3 minutes', 'speed-booster-pack' ),
172
  'label' => __( 'Advanced Optimizations', 'speed-booster-pack' ),
173
  'items' => array(
174
  'enable_instant_page' => array(
175
+ 'type' => 'checkbox',
176
+ 'label' => __( 'Enable instant.page (BETA)', 'speed-booster-pack' ),
177
+ 'tooltip' => __( 'Check this option if you want to use the instant.page link preloader. This is a new and experimental feature; use with caution. If something goes wrong, simply uncheck this option and save the settings.', 'speed-booster-pack' ),
178
  'options_group' => 'sbp_settings',
179
  ),
180
  'disable_cart_fragments' => array(
181
+ 'type' => 'checkbox',
182
+ 'label' => __( 'Disable cart fragments (BETA)', 'speed-booster-pack' ),
183
+ 'tooltip' => __( 'Check this option to disable WooCommerce&#39;s &quot;cart fragments&quot; script, which overrides all caching function to update cart totals on each page load in your theme header. This is a new and experimental feature; use with caution. If something goes wrong, simply uncheck this option and save the settings.', 'speed-booster-pack' ),
184
  'options_group' => 'sbp_settings',
185
  ),
186
+ 'disable_google_maps' => array(
187
+ 'type' => 'checkbox',
188
+ 'label' => __( 'Remove Google Maps', 'speed-booster-pack' ),
189
+ 'tooltip' => __( 'Remove Google Maps from front end. ', 'speed-booster-pack' ),
190
  'options_group' => 'sbp_settings',
191
  ),
192
  'remove_rest_api_links' => array(
193
+ 'type' => 'checkbox',
194
+ 'label' => __( 'Remove REST API Links', 'speed-booster-pack' ),
195
+ 'tooltip' => __( 'The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving JSON (JavaScript Object Notation) objects.', 'speed-booster-pack' ),
196
  'options_group' => 'sbp_settings',
197
  ),
198
+ 'remove_all_feeds' => array(
199
+ 'type' => 'checkbox',
200
+ 'label' => __( 'Remove all RSS feed links', 'speed-booster-pack' ),
201
+ 'tooltip' => __( 'This option will remove all RSS feed links to cleanup your WordPress header. It is also useful on Unicorn – The W3C Markup Validation Service to get rid out the “feed does not validate” error.', 'speed-booster-pack' ),
202
  'options_group' => 'sbp_settings',
203
  ),
204
  'minify_html_js' => array(
205
+ 'type' => 'checkbox',
206
+ 'label' => __( 'Minify HTML', 'speed-booster-pack' ),
207
+ 'tooltip' => __( 'Activate this option only if you don’t want to use other minify plugins or other speed optimization plugin that has minify option included. If something goes wrong, simply uncheck this option and save the settings.', 'speed-booster-pack' ),
208
  'options_group' => 'sbp_settings',
209
  ),
210
  )
214
  'label' => __( 'JavaScript Optimization', 'speed-booster-pack' ),
215
  'items' => array(
216
  'jquery_to_footer' => array(
217
+ 'type' => 'checkbox',
218
+ 'label' => __( 'Move scripts to footer', 'speed-booster-pack' ),
219
+ 'tooltip' => __( 'This option move all scripts to the footer while keeping stylesheets in the header to improve page loading speed and get a higher score on the major speed testing sites such as GTmetrix or other website speed testing tools', 'speed-booster-pack' ),
220
  'options_group' => 'sbp_settings',
221
  ),
222
+ 'defer_parsing' => array(
223
+ 'type' => 'checkbox',
224
+ 'label' => __( 'Defer parsing of JS files', 'speed-booster-pack' ),
225
+ 'tooltip' => __( '!!!Note: This will be disabled IF Move Scripts to Footer is enabled. By deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page.', 'speed-booster-pack' ),
226
  'options_group' => 'sbp_settings',
227
  ),
228
  )
229
  ),
230
  array(
231
+ 'type' => 'section',
232
+ 'label' => __( 'Exclude scripts from being moved to the footer', 'speed-booster-pack' ),
233
  'description' => __( 'Enter one JS handle per text field. Read more <a href="https://optimocha.com/speed-booster-pack-documentation/#exclude-scripts-from-being-moved-to-the-footer-50">detailed instructions</a> on this option on plugin documentation.', 'speed-booster-pack' ),
234
+ 'items' => array(
235
  'sbp_js_footer_exceptions1' => array(
236
  'type' => 'text',
237
  ),
245
  'type' => 'text',
246
  ),
247
  //guidance
248
+ 'guidance_options_js' => array(
249
  'type' => 'guidance',
250
  'label' => __( 'As a guidance, here is a list of script handles and script paths of each enqueued script detected by our plugin:', 'speed-booster-pack' ),
251
  ),
268
  'sbp_defer_exceptions4' => array(
269
  'type' => 'text',
270
  ),
271
+ 'info' => array(
272
+ 'type' => 'guidance',
273
  'description_only' => true,
274
+ 'description' => __( 'Enter one by text field, the handle part of the JS files that you want to be excluded from defer parsing option. For example: <code>jquery-core</code> If you want to exclude more than 4 scripts, you can use the following filter: <code>sbp_exclude_defer_scripts</code> which takes an array of script handles as params. If you don\'t know how to handle this, feel free to post on our support forums.', 'speed-booster-pack' ),
275
  ),
276
  ),
277
  ),
281
  'label' => __( 'CSS Optimization', 'speed-booster-pack' ),
282
  'items' => array(
283
  'sbp_css_async' => array(
284
+ 'type' => 'checkbox',
285
+ 'label' => __( 'Inline all CSS', 'speed-booster-pack' ),
286
+ 'tooltip' => __( 'Checking this option will inline the contents of all your stylesheets. This helps with the annoying render blocking error Google Page Speed Insights displays.', 'speed-booster-pack' ),
287
  'options_group' => 'sbp_settings',
288
  ),
289
  'sbp_css_minify' => array(
290
+ 'type' => 'checkbox',
291
+ 'label' => __( 'Minify all (previously) inlined CSS', 'speed-booster-pack' ),
292
+ 'tooltip' => __( 'Minifying all inlined CSS styles will optimize the CSS delivery and will eliminate the annoying message on Google Page Speed regarding to render-blocking css.', 'speed-booster-pack' ),
293
  'options_group' => 'sbp_settings',
294
  ),
295
  'sbp_footer_css' => array(
296
+ 'type' => 'checkbox',
297
+ 'label' => __( 'Move all inlined CSS into the footer', 'speed-booster-pack' ),
298
+ 'tooltip' => __( 'Inserting all CSS styles inline to the footer is a sensitive option that will eliminate render-blocking CSS warning in Google Page Speed test. If there is something broken after activation, you need to disable this option. Please note that before enabling this sensitive option, it is strongly recommended that you also enable the “ Move scripts to the footer” option.', 'speed-booster-pack' ),
299
  'options_group' => 'sbp_settings',
300
  ),
301
  ),
306
  'label' => __( 'Exclude CSS', 'speed-booster-pack' ),
307
  'items' => array(
308
  'sbp_css_exceptions' => array(
309
+ 'type' => 'textarea',
310
+ 'label' => __( 'Exclude styles from being inlined and/or minified option: ', 'speed-booster-pack' ),
311
  'description' => __( 'Enter one by line, the handles of CSS files or the final part of the style URL.', 'speed-booster-pack' ),
312
  ),
313
  //CSS handle guidance
319
  ),
320
  ),
321
  ),
322
+ 'cdn-options' => array(
323
  'sections' => array(
324
  array(
325
+ 'type' => 'section',
326
+ 'label' => __( 'CDN', 'speed-booster-pack' ),
327
  'description' => __( 'CDN options that allow you to rewrite your site URLs with your CDN URLs.', 'speed-booster-pack' ),
328
+ 'items' => array(
329
+ 'sbp_enable_cdn' => array(
330
+ 'type' => 'checkbox',
331
+ 'label' => __( 'Enable CDN Rewrite', 'speed-booster-pack' ),
332
+ 'tooltip' => __( 'Enables rewriting of your site URLs with your CDN URLs', 'speed-booster-pack' ),
333
  'options_group' => 'sbp_settings',
334
  ),
335
+ 'sbp_cdn_url' => array(
336
+ 'type' => 'text',
337
+ 'label' => __( 'CDN URL', 'speed-booster-pack' ),
338
+ 'tooltip' => __( 'Enter your CDN URL without the trailing slash. Example: https://cdn.example.com', 'speed-booster-pack' ),
339
  'options_group' => 'sbp_settings',
340
  ),
341
  'sbp_cdn_included_directories' => array(
342
+ 'type' => 'text',
343
+ 'label' => __( 'Included Directories', 'speed-booster-pack' ),
344
+ 'tooltip' => __( 'Enter any directories you would like to be included in CDN rewriting, separated by commas (,). Default: wp-content,wp-includes', 'speed-booster-pack' ),
345
  'options_group' => 'sbp_settings',
346
+ 'default' => 'wp-content,wp-includes',
347
  ),
348
+ 'sbp_cdn_exclusions' => array(
349
+ 'type' => 'text',
350
+ 'label' => __( 'CDN Exclusions', 'speed-booster-pack' ),
351
+ 'tooltip' => __( 'Enter any directories or file extensions you would like to be excluded from CDN rewriting, separated by commas (,). Default: .php', 'speed-booster-pack' ),
352
  'options_group' => 'sbp_settings',
353
+ 'default' => '.php',
354
  ),
355
  ),
356
  ),
359
  'google-analytics' => array(
360
  'sections' => array(
361
  array(
362
+ 'type' => 'section',
363
+ 'label' => __( 'Google Analytics', 'speed-booster-pack' ),
364
  'description' => __( 'Optimization options for Google Analytics.', 'speed-booster-pack' ),
365
+ 'items' => array(
366
  'sbp_enable_local_analytics' => array(
367
+ 'type' => 'checkbox',
368
+ 'label' => __( 'Enable Local Analytics', 'speed-booster-pack' ),
369
+ 'tooltip' => __( 'Enable syncing of the Google Analytics script to your own server.', 'speed-booster-pack' ),
370
  'options_group' => 'sbp_settings',
371
  ),
372
+ 'sbp_ga_tracking_id' => array(
373
+ 'type' => 'text',
374
+ 'label' => __( 'Tracking ID', 'speed-booster-pack' ),
375
+ 'tooltip' => __( 'Enter your Google Analytics tracking ID', 'speed-booster-pack' ),
376
  'options_group' => 'sbp_settings',
377
  ),
378
+ 'sbp_tracking_position' => array(
379
+ 'type' => 'select',
380
+ 'label' => __( 'Tracking code position', 'speed-booster-pack' ),
381
+ 'tooltip' => __( 'Load your GA script in the header or footer of the site. Default - header', 'speed-booster-pack' ),
382
  'options_group' => 'sbp_settings',
383
+ 'options' => array(
384
  'header' => 'Header (default)',
385
  'footer' => 'Footer',
386
  ),
387
  ),
388
  'sbp_disable_display_features' => array(
389
+ 'type' => 'checkbox',
390
+ 'label' => __( 'Disable Display Features', 'speed-booster-pack' ),
391
+ 'tooltip' => __( 'Disable marketing and advertising which generates a 2nd HTTP request', 'speed-booster-pack' ),
392
  'options_group' => 'sbp_settings',
393
  ),
394
+ 'sbp_anonymize_ip' => array(
395
+ 'type' => 'checkbox',
396
+ 'label' => __( 'Anonymize IP', 'speed-booster-pack' ),
397
+ 'tooltip' => __( 'Shorten visitor IP to comply with privacy restrictions in some countries.', 'speed-booster-pack' ),
398
  'options_group' => 'sbp_settings',
399
  ),
400
+ 'sbp_track_loggedin_admins' => array(
401
+ 'type' => 'checkbox',
402
+ 'label' => __( 'Track Admins', 'speed-booster-pack' ),
403
+ 'tooltip' => __( 'Include logged in WordPress admins in your GA report.', 'speed-booster-pack' ),
404
  'options_group' => 'sbp_settings',
405
  ),
406
+ 'sbp_bounce_rate' => array(
407
+ 'type' => 'text',
408
+ 'label' => __( 'Adjust Bounce Rate', 'speed-booster-pack' ),
409
+ 'tooltip' => __( 'Set a timeout limit in seconds to better evaluate the quality of your traffic (1 - 100)', 'speed-booster-pack' ),
410
  'options_group' => 'sbp_settings',
411
  ),
412
+ 'sbp_monsterinsights' => array(
413
+ 'type' => 'checkbox',
414
+ 'label' => __( 'MonsterInsights Integration', 'speed-booster-pack' ),
415
+ 'tooltip' => __( 'Allows MonsterInsights to manage your Google Analytics while still using the locally hosted analytics.js generated by Speed Booster Pack', 'speed-booster-pack' ),
416
  'options_group' => 'sbp_settings',
417
  ),
418
  ),
440
  <h3><?php echo $values['label']; ?></h3>
441
  <?php
442
  }
443
+
444
 
445
  //Start the sections
446
  foreach ( $values['sections'] as $section => $section_value ) {
447
 
448
  ?>
449
+ <div class="postbox" id="<?php echo $k . "-" . $section; ?>">
450
  <h3 class="hndle ui-sortable-handle" style="cursor: pointer;"><?php echo ( isset( $section_value['label'] ) ) ? $section_value['label'] : ""; ?></h3>
451
  <div class="inside">
452
  <?php
453
+
454
  //Start the options
455
  foreach ( $section_value['items'] as $item => $item_value ) {
456
 
458
  <div class="onoffswitch-wrapper">
459
  <?php if ( isset( $item_value['tooltip'] ) ) { ?>
460
  <span class="tooltip-right"
461
+ data-tooltip="<?php echo $item_value['tooltip']; ?>">
462
+ <i class="dashicons dashicons-editor-help"></i>
463
+ </span>
464
  <?php } ?>
465
  <span class="chekbox-title"><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></span>
466
 
486
  <p>
487
  <?php if ( isset( $item_value['tooltip'] ) ) { ?>
488
  <span class="tooltip-right"
489
+ data-tooltip="<?php echo $item_value['tooltip']; ?>">
490
+ <i class="dashicons dashicons-editor-help"></i>
491
+ </span>
492
  <?php } ?>
493
  <label for="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>" class="<?php echo ( isset( $item_value['label'] ) ) ? 'label-text' : ''; ?>"><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></label>
494
  <select id="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>"
495
+ name="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>">
496
  <?php
497
  foreach ( $item_value['options'] as $option_k => $op_v ) {
498
  ?>
517
  ?>
518
  <?php if ( isset( $item_value['tooltip'] ) ) { ?>
519
  <span class="tooltip-right"
520
+ data-tooltip="<?php echo $item_value['tooltip']; ?>">
521
+ <i class="dashicons dashicons-editor-help"></i>
522
+ </span>
523
  <?php } ?>
524
  <label for="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>" class="<?php echo ( isset( $item_value['label'] ) ) ? 'label-text' : ''; ?>"><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></label>
525
 
526
  <input id="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>"
527
+ name="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>" type="text" value="<?php echo esc_attr( $op_text ); ?>" />
528
  </p>
529
  <?php }
530
 
531
  if ( 'textarea' == $item_value['type'] ) { ?>
532
  <h4><?php echo ( isset( $item_value['label'] ) ) ? $item_value['label'] : ''; ?></h4>
533
  <p>
534
+ <textarea cols="50" rows="3" name="<?php echo ( isset( $item_value['options_group'] ) ) ? $item_value['options_group'] . '[' . $item . ']' : $item; ?>"
535
+ id="<?php echo $item; ?>" ><?php echo wp_kses_post( $css_exceptions ); ?></textarea>
 
536
  </p>
537
  <p class="description">
538
  <?php echo isset( $item_value['description'] ) ? $item_value['description'] : ''; ?>
544
  if ( $item == 'guidance_options_css' ) {
545
  ?>
546
 
 
 
 
 
547
  <div class="sbp-all-enqueued">
548
 
549
  <div class="sbp-div-head">
615
  </div>
616
  </div>
617
  <?php
618
+
619
  }
620
  ?>
621
  </div> <!-- Tab sections -->
668
  </div><!--/.col-main-->
669
 
670
  <div class="col-side">
671
+
672
  <div class="postbox">
673
  <h3 class="hndle">Invest in More Speed!</h3>
674
  <div class="inside">
677
  <p><a href="https://optimocha.com/?ref=sbp" target="_blank" class="button button-primary button-large"><?php _e( "Speed Up Your Website!", 'speed-booster-pack' ); ?></a></p>
678
  </div>
679
  </div>
680
+
681
  <div class="postbox">
682
  <h3 class="hndle">Test Your Website</h3>
683
  <div class="inside">
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Speed Booster Pack ===
2
  Contributors: optimocha
3
- Tags: speed, optimization, performance, scripts to the footer, google libraries, font awesome cdn, defer parsing of javascript, remove query strings, gtmetrix, google pageSpeed, yslow, compression, instant.page
4
  Requires at least: 4.6
5
- Tested up to: 5.2
6
  Requires PHP: 5.6
7
- Stable tag: 3.8.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -16,9 +16,9 @@ A light, frequently updated and easy to use plugin to help your website load fas
16
 
17
  **Speed Booster Pack is a lightweight, frequently updated, easy to use and well supported plugin which allows you to improve your website's loading speed.**
18
 
19
- Improving your site's speed will get you a better score on major speed testing services such as [Google PageSpeed](https://developers.google.com/speed/pagespeed/insights/), [GTmetrix](https://gtmetrix.com/), [Pingdom](http://tools.pingdom.com/fpt/), [WebPageTest](https://www.webpagetest.org/) and will also improve your overall site's usability. This will persuade Google and other search engines to rank your site higher in search results thus sending more traffic.
20
 
21
- = Why Is Site Speed Important? =
22
 
23
  People abandon pages that take more than a few seconds to load, which means slow pages lose you visitors (and money). You don’t want that to happen, do you? :-)
24
 
@@ -53,7 +53,20 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
53
 
54
  == Changelog ==
55
 
 
 
 
 
 
 
 
 
 
 
56
  = 3.8.1 =
 
 
 
57
  * **Speed Booster Pack turns five!** We're celebrating SBP's birthday (20th May) with a better (WAY better) admin interface. We changed places of some of the options in the General and Advanced tabs, and put a "be careful" warning on top of the Advanced, CDN and Google Analytics tabs. We also updated the CSS, and added a sidebar which has some speed test links that could turn into speed test widgets in the future!
58
  * **New:** Added a "Disable jQuery Migrate" option.
59
  * **Fixed:** Added a WooCommerce check for the "Disable cart fragments" option.
@@ -65,6 +78,9 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
65
  * **Removed:** Some very unnecessary CSS styling both in the plugin's main style.css file and a separate, jQuery UI-related file.
66
 
67
  = 3.8 =
 
 
 
68
  * Fixed most of the typos
69
  * Added option: "Disable cart fragments"
70
  * Added option: "Integrate instant.page"
@@ -75,10 +91,16 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
75
  * Tested for WordPress 5.2
76
 
77
  = 3.7.7 =
 
 
 
78
  * Speed Booster Pack is acquired by [Optimocha](https://optimocha.com/)!
79
  * Updates to the Optimize More tab
80
 
81
  = 3.7.6 =
 
 
 
82
  * Improved admin UI
83
  * Added "Disable Self Pingbacks" option
84
  * Added "Disable Dashicons" option
@@ -94,16 +116,28 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
94
  * Removed "Image compression level" option
95
 
96
  = 3.7.5 =
 
 
 
97
  * removed uninstall feedback
98
 
99
  = 3.7.4 =
 
 
 
100
  * minor backend tweaks - notice
101
  * added language files
102
 
103
  = 3.7.3 =
 
 
 
104
  * minor backend tweaks
105
 
106
  = 3.7.2 =
 
 
 
107
  * minor tweaks & version bump
108
  * removed ShortPixel aff integration
109
 
@@ -243,4 +277,4 @@ Speed Booster Pack is a plugin that can help you speed up your website by tweaki
243
  * Modified Readme file
244
 
245
  = 1.0 =
246
- * Initial release
1
  === Speed Booster Pack ===
2
  Contributors: optimocha
3
+ Tags: speed, speed optimization, performance, scripts to the footer, defer parsing of javascript, remove query strings, gtmetrix, google pagespeed, yslow, compression, instant.page, disable cart fragments, javascript optimization, css optimization, inline css
4
  Requires at least: 4.6
5
+ Tested up to: 5.2.1
6
  Requires PHP: 5.6
7
+ Stable tag: 3.8.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
16
 
17
  **Speed Booster Pack is a lightweight, frequently updated, easy to use and well supported plugin which allows you to improve your website's loading speed.**
18
 
19
+ Improving your site's speed will get you a better score on major speed testing services such as [Google PageSpeed](https://developers.google.com/speed/pagespeed/insights/), [GTmetrix](https://gtmetrix.com/), [Pingdom](https://tools.pingdom.com/), [WebPageTest](https://www.webpagetest.org/) and will also improve your overall site's usability. This will help Google and other search engines to rank your site higher in search results thus sending more traffic.
20
 
21
+ = WordPress Speed Optimization and the Importance of Having a Fast Website =
22
 
23
  People abandon pages that take more than a few seconds to load, which means slow pages lose you visitors (and money). You don’t want that to happen, do you? :-)
24
 
53
 
54
  == Changelog ==
55
 
56
+ = 3.8.2 =
57
+
58
+ *Release Date: 03 June 2019*
59
+
60
+ * **Added:** The new uninstall.php file now removes plugin settings when you delete the plugin. (Deactivating the plugin doesn't remove plugin settings.)
61
+ * **Fixed:** Minor styling & HTML validation fixes for the settings panel.
62
+ * **Updated:** Rewrote part of the Localize Analytics feature, and update the default Google Analytics code.
63
+ * **Updated:** Tags in readme.txt.
64
+ * **Tested:** Ensured the plugin works in WordPress version 5.2.1 and PHP version 5.6.
65
+
66
  = 3.8.1 =
67
+
68
+ *Release Date: 20 May 2019*
69
+
70
  * **Speed Booster Pack turns five!** We're celebrating SBP's birthday (20th May) with a better (WAY better) admin interface. We changed places of some of the options in the General and Advanced tabs, and put a "be careful" warning on top of the Advanced, CDN and Google Analytics tabs. We also updated the CSS, and added a sidebar which has some speed test links that could turn into speed test widgets in the future!
71
  * **New:** Added a "Disable jQuery Migrate" option.
72
  * **Fixed:** Added a WooCommerce check for the "Disable cart fragments" option.
78
  * **Removed:** Some very unnecessary CSS styling both in the plugin's main style.css file and a separate, jQuery UI-related file.
79
 
80
  = 3.8 =
81
+
82
+ *Release Date: 03 May 2019*
83
+
84
  * Fixed most of the typos
85
  * Added option: "Disable cart fragments"
86
  * Added option: "Integrate instant.page"
91
  * Tested for WordPress 5.2
92
 
93
  = 3.7.7 =
94
+
95
+ *Release Date: 02 April 2019*
96
+
97
  * Speed Booster Pack is acquired by [Optimocha](https://optimocha.com/)!
98
  * Updates to the Optimize More tab
99
 
100
  = 3.7.6 =
101
+
102
+ *Release Date: 18 February 2019*
103
+
104
  * Improved admin UI
105
  * Added "Disable Self Pingbacks" option
106
  * Added "Disable Dashicons" option
116
  * Removed "Image compression level" option
117
 
118
  = 3.7.5 =
119
+
120
+ *Release Date: 09 December 2018*
121
+
122
  * removed uninstall feedback
123
 
124
  = 3.7.4 =
125
+
126
+ *Release Date: 05 December 2018*
127
+
128
  * minor backend tweaks - notice
129
  * added language files
130
 
131
  = 3.7.3 =
132
+
133
+ *Release Date: 08 November 2018*
134
+
135
  * minor backend tweaks
136
 
137
  = 3.7.2 =
138
+
139
+ *Release Date: 08 November 2018*
140
+
141
  * minor tweaks & version bump
142
  * removed ShortPixel aff integration
143
 
277
  * Modified Readme file
278
 
279
  = 1.0 =
280
+ * Initial release
speed-booster-pack.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://wordpress.org/plugins/speed-booster-pack/
5
  * Description: Speed Booster Pack helps you improve your page loading speed and get higher scores on speed test services like GTmetrix, Google PageSpeed or WebPageTest.
6
  * Author: Optimocha
7
- * Version: 3.8.1
8
  * Author URI: https://optimocha.com
9
  * License: GPLv3 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -36,13 +36,18 @@
36
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37
  */
38
 
 
 
 
 
 
39
  /*----------------------------------------------------------------------------------------------------------
40
  Define some useful plugin constants
41
  -----------------------------------------------------------------------------------------------------------*/
42
 
43
  define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) );
44
  define( 'SPEED_BOOSTER_PACK_URL', plugin_dir_url( __FILE__ ) );
45
- define( 'SPEED_BOOSTER_PACK_VERSION', '3.8.1' );
46
  // Defining css position
47
  define( 'SBP_FOOTER', 10 );
48
  // Defining css last position
4
  * Plugin URI: http://wordpress.org/plugins/speed-booster-pack/
5
  * Description: Speed Booster Pack helps you improve your page loading speed and get higher scores on speed test services like GTmetrix, Google PageSpeed or WebPageTest.
6
  * Author: Optimocha
7
+ * Version: 3.8.2
8
  * Author URI: https://optimocha.com
9
  * License: GPLv3 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
36
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37
  */
38
 
39
+ // Security control for vulnerability attempts
40
+ if( !defined( 'ABSPATH' ) ) {
41
+ die;
42
+ }
43
+
44
  /*----------------------------------------------------------------------------------------------------------
45
  Define some useful plugin constants
46
  -----------------------------------------------------------------------------------------------------------*/
47
 
48
  define( 'SPEED_BOOSTER_PACK_PATH', plugin_dir_path( __FILE__ ) );
49
  define( 'SPEED_BOOSTER_PACK_URL', plugin_dir_url( __FILE__ ) );
50
+ define( 'SPEED_BOOSTER_PACK_VERSION', '3.8.2' );
51
  // Defining css position
52
  define( 'SBP_FOOTER', 10 );
53
  // Defining css last position
uninstall.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package speed-booster-pack
4
+ */
5
+
6
+ // Security control for vulnerability attempts
7
+ if( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
8
+ die;
9
+ }
10
+
11
+ // Database Tables and Options name Configrations
12
+ $option_names = [ 'sbp_settings', 'sbp_news' ];
13
+ $table_names = '';
14
+
15
+ if( !is_array( $option_names ) ) {
16
+ $option_names = [ $option_names ];
17
+ }
18
+
19
+ if( !is_array( $table_names ) ) {
20
+ $table_names = [ $table_names ];
21
+ }
22
+
23
+ foreach( $option_names as $option_name ) {
24
+
25
+ if( empty( $option_name ) ) continue;
26
+
27
+ if( is_multisite() ) {
28
+ delete_site_option( $option_name );
29
+ }
30
+ else {
31
+ delete_option( $option_name );
32
+ }
33
+ }