EWWW Image Optimizer - Version 6.4.1

Version Description

  • added: use decoding=async to prevent images from blocking text render
  • fixed: database upgrade fails on MySQL 8.0.x
  • fixed: Auto-scale incorrectly handles Divi parallax background images
  • fixed: native lazy loading used on inline PNG placeholders
  • fixed: WebP rewriters not recognizing WP Offload Media Path (object prefix) setting
Download this release

Release Info

Developer nosilver4u
Plugin Icon 128x128 EWWW Image Optimizer
Version 6.4.1
Comparing to
See all releases

Code changes from version 6.4.0 to 6.4.1

changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  = 6.4.0 =
2
  * added: free API-based WebP generation for servers that cannot generate WebP images locally
3
  * added: detection for Jetpack Boost lazy load function
1
+ = 6.4.1 =
2
+ * added: use decoding=async to prevent images from blocking text render
3
+ * fixed: database upgrade fails on MySQL 8.0.x
4
+ * fixed: Auto-scale incorrectly handles Divi parallax background images
5
+ * fixed: native lazy loading used on inline PNG placeholders
6
+ * fixed: WebP rewriters not recognizing WP Offload Media Path (object prefix) setting
7
+
8
  = 6.4.0 =
9
  * added: free API-based WebP generation for servers that cannot generate WebP images locally
10
  * added: detection for Jetpack Boost lazy load function
classes/class-eio-base.php CHANGED
@@ -634,6 +634,7 @@ if ( ! class_exists( 'EIO_Base' ) ) {
634
  )
635
  ) {
636
  // We will wait until the paths loop to fix this one.
 
637
  continue;
638
  }
639
  if ( false !== strpos( $url, $allowed_domain ) ) {
@@ -650,6 +651,9 @@ if ( ! class_exists( 'EIO_Base' ) ) {
650
  continue;
651
  }
652
  $this->debug_message( "looking for path $allowed_url in $url" );
 
 
 
653
  if (
654
  ! empty( $this->s3_active ) && // We've got an S3 configuration, and...
655
  false !== strpos( $url, $this->s3_active ) && // the S3 domain is present in the URL, and...
@@ -786,23 +790,24 @@ if ( ! class_exists( 'EIO_Base' ) ) {
786
  } elseif ( ! empty( $s3_bucket ) && ! is_wp_error( $s3_bucket ) && method_exists( $as3cf, 'get_storage_provider' ) ) {
787
  $s3_domain = $as3cf->get_storage_provider()->get_url_domain( $s3_bucket, $s3_region );
788
  }
 
 
 
 
 
 
 
789
  if ( ! empty( $s3_domain ) && $as3cf->get_setting( 'serve-from-s3' ) ) {
790
  $this->s3_active = $s3_domain;
791
  $this->debug_message( "found S3 domain of $s3_domain with bucket $s3_bucket and region $s3_region" );
792
  $this->allowed_urls[] = $s3_scheme . '://' . $s3_domain . '/';
793
  if ( $as3cf->get_setting( 'enable-delivery-domain' ) && $as3cf->get_setting( 'delivery-domain' ) ) {
794
  $delivery_domain = $as3cf->get_setting( 'delivery-domain' );
795
- $this->allowed_urls[] = $s3_scheme . '://' . $delivery_domain . '/';
796
  $this->allowed_domains[] = $delivery_domain;
797
  $this->debug_message( "found WOM delivery domain of $delivery_domain" );
798
  }
799
  }
800
- if ( $as3cf->get_setting( 'enable-object-prefix' ) ) {
801
- $this->s3_object_prefix = $as3cf->get_setting( 'object-prefix' );
802
- $this->debug_message( $as3cf->get_setting( 'object-prefix' ) );
803
- } else {
804
- $this->debug_message( 'no WOM prefix' );
805
- }
806
  if ( $as3cf->get_setting( 'object-versioning' ) ) {
807
  $this->s3_object_version = true;
808
  $this->debug_message( 'object versioning enabled' );
634
  )
635
  ) {
636
  // We will wait until the paths loop to fix this one.
637
+ $this->debug_message( 'skipping domains and going to URLs' );
638
  continue;
639
  }
640
  if ( false !== strpos( $url, $allowed_domain ) ) {
651
  continue;
652
  }
653
  $this->debug_message( "looking for path $allowed_url in $url" );
654
+ if ( ! empty( $this->s3_active ) && ! empty( $this->s3_object_prefix ) ) {
655
+ $this->debug_message( "checking first for $this->s3_active and $allowed_url" . $this->s3_object_prefix );
656
+ }
657
  if (
658
  ! empty( $this->s3_active ) && // We've got an S3 configuration, and...
659
  false !== strpos( $url, $this->s3_active ) && // the S3 domain is present in the URL, and...
790
  } elseif ( ! empty( $s3_bucket ) && ! is_wp_error( $s3_bucket ) && method_exists( $as3cf, 'get_storage_provider' ) ) {
791
  $s3_domain = $as3cf->get_storage_provider()->get_url_domain( $s3_bucket, $s3_region );
792
  }
793
+ if ( $as3cf->get_setting( 'enable-object-prefix' ) ) {
794
+ $this->s3_object_prefix = $as3cf->get_setting( 'object-prefix' );
795
+ $this->debug_message( $this->s3_object_prefix );
796
+ } else {
797
+ $this->s3_object_prefix = '';
798
+ $this->debug_message( 'no WOM prefix' );
799
+ }
800
  if ( ! empty( $s3_domain ) && $as3cf->get_setting( 'serve-from-s3' ) ) {
801
  $this->s3_active = $s3_domain;
802
  $this->debug_message( "found S3 domain of $s3_domain with bucket $s3_bucket and region $s3_region" );
803
  $this->allowed_urls[] = $s3_scheme . '://' . $s3_domain . '/';
804
  if ( $as3cf->get_setting( 'enable-delivery-domain' ) && $as3cf->get_setting( 'delivery-domain' ) ) {
805
  $delivery_domain = $as3cf->get_setting( 'delivery-domain' );
806
+ $this->allowed_urls[] = $s3_scheme . '://' . \trailingslashit( $delivery_domain ) . trailingslashit( trim( $this->s3_object_prefix, '/' ) );
807
  $this->allowed_domains[] = $delivery_domain;
808
  $this->debug_message( "found WOM delivery domain of $delivery_domain" );
809
  }
810
  }
 
 
 
 
 
 
811
  if ( $as3cf->get_setting( 'object-versioning' ) ) {
812
  $this->s3_object_version = true;
813
  $this->debug_message( 'object versioning enabled' );
classes/class-eio-lazy-load.php CHANGED
@@ -543,15 +543,15 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
543
  if ( $this->parsing_exactdn && $this->allow_lqip && apply_filters( 'eio_use_lqip', $this->get_option( $this->prefix . 'use_lqip' ), $file ) ) {
544
  $placeholder_types[] = 'lqip';
545
  }
546
- if ( apply_filters( 'eio_use_siip', $this->get_option( $this->prefix . 'use_siip' ), $file ) ) {
547
- $placeholder_types[] = 'siip';
548
- }
549
  if ( $this->parsing_exactdn && apply_filters( 'eio_use_piip', true, $file ) ) {
550
  $placeholder_types[] = 'epip';
551
  }
552
  if ( $this->allow_piip && apply_filters( 'eio_use_piip', true, $file ) ) {
553
  $placeholder_types[] = 'piip';
554
  }
 
 
 
555
 
556
  if ( // This isn't super helpful. It makes PIIPs that don't help with auto-scaling.
557
  false && ( ! $physical_width || ! $physical_height ) &&
@@ -590,7 +590,9 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
590
  if ( false === strpos( $file, 'nggid' ) && ! preg_match( '#\.svg(\?|$)#', $file ) && strpos( $file, $this->exactdn_domain ) ) {
591
  if ( $physical_width && $physical_height && $this->allow_piip ) {
592
  $placeholder_src = $this->create_piip( $physical_width, $physical_height );
593
- $use_native_lazy = true;
 
 
594
  break 2;
595
  } else {
596
  $placeholder_src = add_query_arg( array( 'lazy' => 2 ), $file );
@@ -615,7 +617,9 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
615
  $png_placeholder_src = $this->create_piip( $physical_width, $physical_height );
616
  if ( $png_placeholder_src ) {
617
  $placeholder_src = $png_placeholder_src;
618
- $use_native_lazy = true;
 
 
619
  break 2;
620
  }
621
  }
@@ -633,6 +637,11 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
633
  if ( ( ! defined( 'EIO_DISABLE_NATIVE_LAZY' ) || ! EIO_DISABLE_NATIVE_LAZY ) && ! $loading_attr && $use_native_lazy ) {
634
  $this->set_attribute( $image, 'loading', 'lazy' );
635
  }
 
 
 
 
 
636
 
637
  if ( $srcset ) {
638
  if ( strpos( $placeholder_src, '64,R0lGOD' ) ) {
543
  if ( $this->parsing_exactdn && $this->allow_lqip && apply_filters( 'eio_use_lqip', $this->get_option( $this->prefix . 'use_lqip' ), $file ) ) {
544
  $placeholder_types[] = 'lqip';
545
  }
 
 
 
546
  if ( $this->parsing_exactdn && apply_filters( 'eio_use_piip', true, $file ) ) {
547
  $placeholder_types[] = 'epip';
548
  }
549
  if ( $this->allow_piip && apply_filters( 'eio_use_piip', true, $file ) ) {
550
  $placeholder_types[] = 'piip';
551
  }
552
+ if ( apply_filters( 'eio_use_siip', $this->get_option( $this->prefix . 'use_siip' ), $file ) ) {
553
+ $placeholder_types[] = 'siip';
554
+ }
555
 
556
  if ( // This isn't super helpful. It makes PIIPs that don't help with auto-scaling.
557
  false && ( ! $physical_width || ! $physical_height ) &&
590
  if ( false === strpos( $file, 'nggid' ) && ! preg_match( '#\.svg(\?|$)#', $file ) && strpos( $file, $this->exactdn_domain ) ) {
591
  if ( $physical_width && $physical_height && $this->allow_piip ) {
592
  $placeholder_src = $this->create_piip( $physical_width, $physical_height );
593
+ if ( false === strpos( $placeholder_src, 'data:image' ) ) {
594
+ $use_native_lazy = true;
595
+ }
596
  break 2;
597
  } else {
598
  $placeholder_src = add_query_arg( array( 'lazy' => 2 ), $file );
617
  $png_placeholder_src = $this->create_piip( $physical_width, $physical_height );
618
  if ( $png_placeholder_src ) {
619
  $placeholder_src = $png_placeholder_src;
620
+ if ( false === strpos( $placeholder_src, 'data:image' ) ) {
621
+ $use_native_lazy = true;
622
+ }
623
  break 2;
624
  }
625
  }
637
  if ( ( ! defined( 'EIO_DISABLE_NATIVE_LAZY' ) || ! EIO_DISABLE_NATIVE_LAZY ) && ! $loading_attr && $use_native_lazy ) {
638
  $this->set_attribute( $image, 'loading', 'lazy' );
639
  }
640
+ // Check for the decoding attribute.
641
+ $decoding_attr = $this->get_attribute( $image, 'decoding' );
642
+ if ( ( ! defined( 'EIO_DISABLE_DECODING_ATTR' ) || ! EIO_DISABLE_DECODING_ATTR ) && ! $decoding_attr ) {
643
+ $this->set_attribute( $image, 'decoding', 'async' );
644
+ }
645
 
646
  if ( $srcset ) {
647
  if ( strpos( $placeholder_src, '64,R0lGOD' ) ) {
common.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  }
16
 
17
- define( 'EWWW_IMAGE_OPTIMIZER_VERSION', '640.0' );
18
 
19
  // Initialize a couple globals.
20
  $eio_debug = '';
@@ -1689,11 +1689,16 @@ function ewww_image_optimizer_install_table() {
1689
  }
1690
  }
1691
  if (
1692
- ( false !== strpos( $mysql_version, '5.7.' ) || false !== strpos( $mysql_version, '10.1.' ) ) &&
 
 
 
 
1693
  $timestamp_upgrade_needed
1694
  ) {
1695
- if ( is_multisite() ) {
1696
- // Just do the upgrade.
 
1697
  $wpdb->query( "ALTER TABLE $wpdb->ewwwio_images MODIFY updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" );
1698
  } else {
1699
  // Do it later via user interaction.
@@ -2285,7 +2290,6 @@ function ewww_image_optimizer_notice_media_listmode() {
2285
  * Instruct the user to run the db upgrade.
2286
  */
2287
  function ewww_image_optimizer_620_upgrade_needed() {
2288
- // $wpdb->query( "ALTER TABLE $wpdb->ewwwio_images MODIFY updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" );
2289
  echo "<div id='ewww-image-optimizer-upgrade-notice' class='notice notice-info'><p>" .
2290
  esc_html__( 'EWWW Image Optimizer needs to upgrade the image log table.', 'ewww-image-optimizer' ) . '<br>' .
2291
  '<a href="' . esc_url( admin_url( 'admin.php?action=ewww_image_optimizer_620_upgrade' ) ) . '" class="button-secondary">' .
@@ -6875,11 +6879,11 @@ function ewww_image_optimizer_remote_fetch( $id, $meta ) {
6875
  }
6876
  } // End if().
6877
  } // End if().
6878
- if ( class_exists( 'Amazon_S3_And_CloudFront' ) ) {
6879
  global $as3cf;
6880
  $full_url = get_attached_file( $id );
6881
  if ( ewww_image_optimizer_stream_wrapped( $full_url ) ) {
6882
- $full_url = $as3cf->get_attachment_url( $id, null, null, $meta );
6883
  }
6884
  $filename = get_attached_file( $id, true );
6885
  ewwwio_debug_message( "amazon s3 fullsize url: $full_url" );
@@ -6955,7 +6959,7 @@ function ewww_image_optimizer_remote_fetch( $id, $meta ) {
6955
  // If this is a unique size.
6956
  if ( ! $dup_size ) {
6957
  $resize_path = $base_dir . wp_basename( $data['file'] );
6958
- $resize_url = $as3cf->get_attachment_url( $id, null, $size, $meta );
6959
  if ( ewwwio_is_file( $resize_path ) ) {
6960
  continue;
6961
  }
@@ -8973,8 +8977,8 @@ function ewww_image_optimizer_relativize_path( $file ) {
8973
  if ( defined( 'EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER' ) && EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER && strpos( $file, EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER ) === 0 ) {
8974
  return str_replace( EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER, 'EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER', $file );
8975
  }
8976
- if ( strpos( $file, ABSPATH ) === 0 ) {
8977
- return str_replace( ABSPATH, 'ABSPATH', $file );
8978
  }
8979
  if ( defined( 'WP_CONTENT_DIR' ) && WP_CONTENT_DIR && strpos( $file, WP_CONTENT_DIR ) === 0 ) {
8980
  return str_replace( WP_CONTENT_DIR, 'WP_CONTENT_DIR', $file );
@@ -9000,7 +9004,7 @@ function ewww_image_optimizer_absolutize_path( $file ) {
9000
  return str_replace( 'EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER', EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER, $file );
9001
  }
9002
  if ( strpos( $file, 'ABSPATH' ) === 0 ) {
9003
- return str_replace( 'ABSPATH', ABSPATH, $file );
9004
  }
9005
  if ( defined( 'WP_CONTENT_DIR' ) && WP_CONTENT_DIR && strpos( $file, 'WP_CONTENT_DIR' ) === 0 ) {
9006
  return str_replace( 'WP_CONTENT_DIR', WP_CONTENT_DIR, $file );
14
  exit;
15
  }
16
 
17
+ define( 'EWWW_IMAGE_OPTIMIZER_VERSION', '641.0' );
18
 
19
  // Initialize a couple globals.
20
  $eio_debug = '';
1689
  }
1690
  }
1691
  if (
1692
+ (
1693
+ false !== strpos( $mysql_version, '5.7.' ) ||
1694
+ false !== strpos( $mysql_version, '8.0.' ) ||
1695
+ false !== strpos( $mysql_version, '10.1.' )
1696
+ ) &&
1697
  $timestamp_upgrade_needed
1698
  ) {
1699
+ $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->ewwwio_images" );
1700
+ if ( is_multisite() || $count < 10000 ) {
1701
+ // Do the upgrade in real-time for multi-site and sites with less than 10k image records.
1702
  $wpdb->query( "ALTER TABLE $wpdb->ewwwio_images MODIFY updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" );
1703
  } else {
1704
  // Do it later via user interaction.
2290
  * Instruct the user to run the db upgrade.
2291
  */
2292
  function ewww_image_optimizer_620_upgrade_needed() {
 
2293
  echo "<div id='ewww-image-optimizer-upgrade-notice' class='notice notice-info'><p>" .
2294
  esc_html__( 'EWWW Image Optimizer needs to upgrade the image log table.', 'ewww-image-optimizer' ) . '<br>' .
2295
  '<a href="' . esc_url( admin_url( 'admin.php?action=ewww_image_optimizer_620_upgrade' ) ) . '" class="button-secondary">' .
6879
  }
6880
  } // End if().
6881
  } // End if().
6882
+ if ( function_exists( 'as3cf_get_attachment_url' ) ) {
6883
  global $as3cf;
6884
  $full_url = get_attached_file( $id );
6885
  if ( ewww_image_optimizer_stream_wrapped( $full_url ) ) {
6886
+ $full_url = as3cf_get_attachment_url( $id );
6887
  }
6888
  $filename = get_attached_file( $id, true );
6889
  ewwwio_debug_message( "amazon s3 fullsize url: $full_url" );
6959
  // If this is a unique size.
6960
  if ( ! $dup_size ) {
6961
  $resize_path = $base_dir . wp_basename( $data['file'] );
6962
+ $resize_url = as3cf_get_attachment_url( $id, $size );
6963
  if ( ewwwio_is_file( $resize_path ) ) {
6964
  continue;
6965
  }
8977
  if ( defined( 'EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER' ) && EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER && strpos( $file, EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER ) === 0 ) {
8978
  return str_replace( EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER, 'EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER', $file );
8979
  }
8980
+ if ( strpos( $file, trailingslashit( ABSPATH ) ) === 0 ) {
8981
+ return str_replace( trailingslashit( ABSPATH ), 'ABSPATH', $file );
8982
  }
8983
  if ( defined( 'WP_CONTENT_DIR' ) && WP_CONTENT_DIR && strpos( $file, WP_CONTENT_DIR ) === 0 ) {
8984
  return str_replace( WP_CONTENT_DIR, 'WP_CONTENT_DIR', $file );
9004
  return str_replace( 'EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER', EWWW_IMAGE_OPTIMIZER_RELATIVE_FOLDER, $file );
9005
  }
9006
  if ( strpos( $file, 'ABSPATH' ) === 0 ) {
9007
+ return str_replace( 'ABSPATH', trailingslashit( ABSPATH ), $file );
9008
  }
9009
  if ( defined( 'WP_CONTENT_DIR' ) && WP_CONTENT_DIR && strpos( $file, 'WP_CONTENT_DIR' ) === 0 ) {
9010
  return str_replace( 'WP_CONTENT_DIR', WP_CONTENT_DIR, $file );
ewww-image-optimizer.php CHANGED
@@ -13,7 +13,7 @@ Plugin Name: EWWW Image Optimizer
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Reduce file sizes for images within WordPress including NextGEN Gallery and GRAND FlAGallery. Uses jpegtran, optipng/pngout, and gifsicle.
15
  Author: Exactly WWW
16
- Version: 6.4.0
17
  Requires at least: 5.6
18
  Requires PHP: 7.2
19
  Author URI: https://ewww.io/
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Reduce file sizes for images within WordPress including NextGEN Gallery and GRAND FlAGallery. Uses jpegtran, optipng/pngout, and gifsicle.
15
  Author: Exactly WWW
16
+ Version: 6.4.1
17
  Requires at least: 5.6
18
  Requires PHP: 7.2
19
  Author URI: https://ewww.io/
includes/check-webp.min.js CHANGED
@@ -1 +1 @@
1
- var ewww_webp_supported=!1;function check_webp_feature(A,e){if(e=void 0!==e?e:function(){},ewww_webp_supported)e(ewww_webp_supported);else{var w=new Image;w.onload=function(){ewww_webp_supported=0<w.width&&0<w.height,e&&e(ewww_webp_supported)},w.onerror=function(){e&&e(!1)},w.src="data:image/webp;base64,"+{alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA=="}[A]}}check_webp_feature("alpha");
1
+ var ewww_webp_supported=!1;function check_webp_feature(A,e){var w;e=void 0!==e?e:function(){},ewww_webp_supported?e(ewww_webp_supported):((w=new Image).onload=function(){ewww_webp_supported=0<w.width&&0<w.height,e&&e(ewww_webp_supported)},w.onerror=function(){e&&e(!1)},w.src="data:image/webp;base64,"+{alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA=="}[A])}check_webp_feature("alpha");
includes/lazysizes.min.js CHANGED
@@ -1 +1 @@
1
- if(void 0===ewww_webp_supported)var ewww_webp_supported=!1;function shouldAutoScale(e){if(1==eio_lazy_vars.skip_autoscale)return!1;if(e.hasAttributes())for(var t=e.attributes,a=/skip-autoscale/,i=t.length-1;0<=i;i--){if(a.test(t[i].name))return!1;if(a.test(t[i].value))return!1}return!0}function constrainSrc(e,t,a,i){if(null===e)return e;var r=/w=(\d+)/,n=/fit=(\d+),(\d+)/,o=/resize=(\d+),(\d+)/,s=decodeURIComponent(e);if("undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com"}),0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var l=o.exec(s);if(l&&t<l[1])return s.replace(o,"resize="+t+","+a);var d=r.exec(e);if(d&&t<=d[1]){if("bg-cover"!==i&&"img-crop"!==i)return e.replace(r,"w="+t);var c=d[1]-t;return 20<c||a<1080?e.replace(r,"resize="+t+","+a):e}var u=n.exec(s);if(u&&t<u[1]){if("bg-cover"!==i&&"img-crop"!==i)return s.replace(n,"fit="+t+","+a);var f=u[1]-t,g=u[2]-a;return 20<f||20<g?e.replace(r,"resize="+t+","+a):e}if(!d&&!u&&!l)return"img"===i?e+"&fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"&resize="+t+","+a:t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===i?e+"?fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"?resize="+t+","+a:t<a?e+"?h="+a:e+"?w="+t:e}window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold),function(e,t){var a=function(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)};t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(o,e,s){"use strict";var l;e.addEventListener&&(l=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a;if(e.detail.instance==s&&(!e.defaultPrevented&&("none"==e.target.preload&&(e.target.preload="auto"),t=e.target.getAttribute("data-bg")))){ewww_webp_supported&&(a=e.target.getAttribute("data-bg-webp"))&&(t=a);var i=o.devicePixelRatio||1,r=Math.round(e.target.offsetWidth*i),n=Math.round(e.target.offsetHeight*i);shouldAutoScale(e.target)&&shouldAutoScale(e.target.parentNode)&&(t=o.lazySizes.hC(e.target,"wp-block-cover")?(o.lazySizes.hC(e.target,"has-parallax")?(r=Math.round(o.screen.width*i),n=Math.round(o.screen.height*i)):n<300&&(n=430),constrainSrc(t,r,n,"bg-cover")):o.lazySizes.hC(e.target,"elementor-bg")?constrainSrc(t,r,n,"bg-cover"):o.lazySizes.hC(e.target,"bg-image-crop")?constrainSrc(t,r,n,"bg-cover"):constrainSrc(t,r,n,"bg")),e.target.style.backgroundImage="url("+(l.test(t)?JSON.stringify(t):t)+")"}},!1))}),document.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),document.addEventListener("lazybeforeunveil",function(e){var t=e.target,a=t.getAttribute("data-srcset");if(t.naturalWidth&&!a&&1<t.naturalWidth&&1<t.naturalHeight){var i=window.devicePixelRatio||1,r=t.naturalWidth,n=t.naturalHeight,o=t.getAttribute("data-eio-rwidth"),s=t.getAttribute("data-eio-rheight");o&&r<o&&(r=o,n=s);var l=t.clientWidth&&1.25*t.clientWidth<r,d=t.clientHeight&&1.25*t.clientHeight<n;if(l||d){var c=Math.round(t.offsetWidth*i),u=Math.round(t.offsetHeight*i),f=t.getAttribute("data-src"),g=t.getAttribute("data-src-webp");if(ewww_webp_supported&&g&&-1==f.search("webp=1")&&(f=g),shouldAutoScale(t)&&shouldAutoScale(t.parentNode))if(window.lazySizes.hC(t,"et_pb_jt_filterable_grid_item_image")||window.lazySizes.hC(t,"ss-foreground-image")||window.lazySizes.hC(t,"img-crop"))h=constrainSrc(f,c,u,"img-crop");else if(window.lazySizes.hC(t,"ct-image")&&window.lazySizes.hC(t,"object-cover"))h=constrainSrc(f,c,u,"img-crop");else h=constrainSrc(f,c,u,"img");else var h=!1;h&&f!=h&&t.setAttribute("data-src",h)}}if(ewww_webp_supported){if(a){var z=t.getAttribute("data-srcset-webp");z&&t.setAttribute("data-srcset",z)}if(!(g=t.getAttribute("data-src-webp")))return;t.setAttribute("data-src",g)}}),function(e,t){var a=function(i,g,n){"use strict";var h,z;if(function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=i.lazySizesConfig||i.lazysizesConfig||{},t)e in z||(z[e]=t[e])}(),!g||!g.getElementsByClassName)return{init:function(){},cfg:z,noSupport:!0};var v=g.documentElement,r=i.HTMLPictureElement,o="addEventListener",m="getAttribute",e=i[o].bind(i),p=i.setTimeout,a=i.requestAnimationFrame||p,s=i.requestIdleCallback,y=/^picture$/i,l=["load","error","lazyincluded","_lazyloaded"],d={},b=Array.prototype.forEach,c=function(e,t){return d[t]||(d[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),d[t].test(e[m]("class")||"")&&d[t]},w=function(e,t){c(e,t)||e.setAttribute("class",(e[m]("class")||"").trim()+" "+t)},_=function(e,t){var a;(a=c(e,t))&&e.setAttribute("class",(e[m]("class")||"").replace(a," "))},C=function(t,a,e){var i=e?o:"removeEventListener";e&&C(t,a),l.forEach(function(e){t[i](e,a)})},A=function(e,t,a,i,r){var n=g.createEvent("Event");return a||(a={}),a.instance=h,n.initEvent(t,!i,!r),n.detail=a,e.dispatchEvent(n),n},S=function(e,t){var a;!r&&(a=i.picturefill||z.pf)?(t&&t.src&&!e[m]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},u=function(e,t){return(getComputedStyle(e,null)||{})[t]},f=function(e,t,a){for(a=a||e.offsetWidth;a<z.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},E=(_e=[],Ce=[],Ae=_e,Se=function(){var e=Ae;for(Ae=_e.length?Ce:_e,we=!(be=!0);e.length;)e.shift()();be=!1},Ee=function(e,t){be&&!t?e.apply(this,arguments):(Ae.push(e),we||(we=!0,(g.hidden?p:a)(Se)))},Ee._lsFlush=Se,Ee),t=function(a,e){return e?function(){E(a)}:function(){var e=this,t=arguments;E(function(){a.apply(e,t)})}},x=function(e){var t,a,i=function(){t=null,e()},r=function(){var e=n.now()-a;e<99?p(r,99-e):(s||i)(i)};return function(){a=n.now(),t||(t=p(r,99))}},M=(ee=/^img$/i,te=/^iframe$/i,ae="onscroll"in i&&!/(gle|ing)bot/.test(navigator.userAgent),ie=0,re=0,ne=-1,oe=function(e){re--,(!e||re<0||!e.target)&&(re=0)},se=function(e){return null==J&&(J="hidden"==u(g.body,"visibility")),J||!("hidden"==u(e.parentNode,"visibility")&&"hidden"==u(e,"visibility"))},le=function(e,t){var a,i=e,r=se(e);for($-=t,U+=t,j-=t,q+=t;r&&(i=i.offsetParent)&&i!=g.body&&i!=v;)(r=0<(u(i,"opacity")||1))&&"visible"!=u(i,"overflow")&&(a=i.getBoundingClientRect(),r=q>a.left&&j<a.right&&U>a.top-1&&$<a.bottom+1);return r},de=function(){var e,t,a,i,r,n,o,s,l,d,c,u,f=h.elements;if((P=z.loadMode)&&re<8&&(e=f.length)){for(t=0,ne++;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(!ae||h.prematureUnveil&&h.prematureUnveil(f[t]))ve(f[t]);else if((s=f[t][m]("data-expand"))&&(n=1*s)||(n=ie),d||(d=!z.expand||z.expand<1?500<v.clientHeight&&500<v.clientWidth?500:370:z.expand,h._defEx=d,c=d*z.expFactor,u=z.hFac,J=null,ie<c&&re<1&&2<ne&&2<P&&!g.hidden?(ie=c,ne=0):ie=1<P&&1<ne&&re<6?d:0),l!==n&&(O=innerWidth+n*u,I=innerHeight+n,o=-1*n,l=n),a=f[t].getBoundingClientRect(),(U=a.bottom)>=o&&($=a.top)<=I&&(q=a.right)>=o*u&&(j=a.left)<=O&&(U||q||j||$)&&(z.loadHidden||se(f[t]))&&(T&&re<3&&!s&&(P<3||ne<4)||le(f[t],n))){if(ve(f[t]),r=!0,9<re)break}else!r&&T&&!i&&re<4&&ne<4&&2<P&&(B[0]||z.preloadAfterLoad)&&(B[0]||!s&&(U||q||j||$||"auto"!=f[t][m](z.sizesAttr)))&&(i=B[0]||f[t]);i&&!r&&ve(i)}},G=de,Q=0,V=z.throttleDelay,X=z.ricTimeout,Y=function(){K=!1,Q=n.now(),G()},Z=s&&49<X?function(){s(Y,{timeout:X}),X!==z.ricTimeout&&(X=z.ricTimeout)}:t(function(){p(Y)},!0),ce=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Z():p(Z,t))},ue=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(oe(e),w(t,z.loadedClass),_(t,z.loadingClass),C(t,ge),A(t,"lazyloaded"))},fe=t(ue),ge=function(e){fe({target:e.target})},he=function(e){var t,a=e[m](z.srcsetAttr);(t=z.customMedia[e[m]("data-media")||e[m]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)},ze=t(function(t,e,a,i,r){var n,o,s,l,d,c,u,f,g;(d=A(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?w(t,z.autosizesClass):t.setAttribute("sizes",i)),o=t[m](z.srcsetAttr),n=t[m](z.srcAttr),r&&(s=t.parentNode,l=s&&y.test(s.nodeName||"")),c=e.firesLoad||"src"in t&&(o||n||l),d={target:t},w(t,z.loadingClass),c&&(clearTimeout(F),F=p(oe,2500),C(t,ge,!0)),l&&b.call(s.getElementsByTagName("source"),he),o?t.setAttribute("srcset",o):n&&!l&&(te.test(t.nodeName)?(f=n,0==(g=(u=t).getAttribute("data-load-mode")||z.iframeLoadMode)?u.contentWindow.location.replace(f):1==g&&(u.src=f)):t.src=n),r&&(o||l)&&S(t,{src:n})),t._lazyRace&&delete t._lazyRace,_(t,z.lazyClass),E(function(){var e=t.complete&&1<t.naturalWidth;c&&!e||(e&&w(t,z.fastLoadedClass),ue(d),t._lazyCache=!0,p(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&re--},!0)}),ve=function(e){if(!e._lazyRace){var t,a=ee.test(e.nodeName),i=a&&(e[m](z.sizesAttr)||e[m]("sizes")),r="auto"==i;(!r&&T||!a||!e[m]("src")&&!e.srcset||e.complete||c(e,z.errorClass)||!c(e,z.lazyClass))&&(t=A(e,"lazyunveilread").detail,r&&W.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,re++,ze(e,t,r,i,a))}},me=x(function(){z.loadMode=3,ce()}),pe=function(){3==z.loadMode&&(z.loadMode=2),me()},ye=function(){T||(n.now()-D<999?p(ye,999):(T=!0,z.loadMode=3,ce(),e("scroll",pe,!0)))},{_:function(){D=n.now(),h.elements=g.getElementsByClassName(z.lazyClass),B=g.getElementsByClassName(z.lazyClass+" "+z.preloadClass),e("scroll",ce,!0),e("resize",ce,!0),e("pageshow",function(e){if(e.persisted){var t=g.querySelectorAll("."+z.loadingClass);t.length&&t.forEach&&a(function(){t.forEach(function(e){e.complete&&ve(e)})})}}),i.MutationObserver?new MutationObserver(ce).observe(v,{childList:!0,subtree:!0,attributes:!0}):(v[o]("DOMNodeInserted",ce,!0),v[o]("DOMAttrModified",ce,!0),setInterval(ce,999)),e("hashchange",ce,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){g[o](e,ce,!0)}),/d$|^c/.test(g.readyState)?ye():(e("load",ye),g[o]("DOMContentLoaded",ce),p(ye,2e4)),h.elements.length?(de(),E._lsFlush()):ce()},checkElems:ce,unveil:ve,_aLSL:pe}),W=(H=t(function(e,t,a,i){var r,n,o;if(e._lazysizesWidth=i,i+="px",e.setAttribute("sizes",i),y.test(t.nodeName||""))for(r=t.getElementsByTagName("source"),n=0,o=r.length;n<o;n++)r[n].setAttribute("sizes",i);a.detail.dataAttr||S(e,a.detail)}),R=function(e,t,a){var i,r=e.parentNode;r&&(a=f(e,r,a),(i=A(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=i.detail.width)&&a!==e._lazysizesWidth&&H(e,r,i,a))},k=x(function(){var e,t=N.length;if(t)for(e=0;e<t;e++)R(N[e])}),{_:function(){N=g.getElementsByClassName(z.autosizesClass),e("resize",k)},checkElems:k,updateElem:R}),L=function(){!L.i&&g.getElementsByClassName&&(L.i=!0,W._(),M._())};var N,H,R,k;var B,T,F,P,D,O,I,$,j,q,U,J,G,K,Q,V,X,Y,Z,ee,te,ae,ie,re,ne,oe,se,le,de,ce,ue,fe,ge,he,ze,ve,me,pe,ye;var be,we,_e,Ce,Ae,Se,Ee;return p(function(){z.init&&L()}),h={cfg:z,autoSizer:W,loader:M,init:L,uP:S,aC:w,rC:_,hC:c,fire:A,gW:f,rAF:E}}(e,e.document,Date);e.lazySizes=a,"object"==typeof module&&module.exports&&(module.exports=a)}("undefined"!=typeof window?window:{});
1
+ var ewww_webp_supported;function shouldAutoScale(e){if(1==eio_lazy_vars.skip_autoscale)return!1;if(e.hasAttributes())for(var t=e.attributes,a=/skip-autoscale/,i=t.length-1;0<=i;i--){if(a.test(t[i].name))return!1;if(a.test(t[i].value))return!1}return!0}function constrainSrc(e,t,a,i){if(null===e)return e;var r=/w=(\d+)/,n=/fit=(\d+),(\d+)/,o=/resize=(\d+),(\d+)/,s=decodeURIComponent(e);if("undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com"}),0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var l=o.exec(s);if(l&&t<l[1])return s.replace(o,"resize="+t+","+a);o=r.exec(e);if(o&&t<=o[1]){if("bg-cover"!==i&&"img-crop"!==i)return e.replace(r,"w="+t);var d=o[1]-t;return 20<d||a<1080?e.replace(r,"resize="+t+","+a):e}d=n.exec(s);if(d&&t<d[1]){if("bg-cover"!==i&&"img-crop"!==i)return s.replace(n,"fit="+t+","+a);s=d[1]-t,n=d[2]-a;return 20<s||20<n?e.replace(r,"resize="+t+","+a):e}if(!o&&!d&&!l)return"img"===i?e+"&fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"&resize="+t+","+a:t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===i?e+"?fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"?resize="+t+","+a:t<a?e+"?h="+a:e+"?w="+t:e}void 0===ewww_webp_supported&&(ewww_webp_supported=!1),window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(n,e,o){"use strict";var s;e.addEventListener&&(s=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,i,r;e.detail.instance==o&&(e.defaultPrevented||("none"==e.target.preload&&(e.target.preload="auto"),(t=e.target.getAttribute("data-bg"))&&(ewww_webp_supported&&(r=e.target.getAttribute("data-bg-webp"))&&(t=r),a=n.devicePixelRatio||1,i=Math.round(e.target.offsetWidth*a),r=Math.round(e.target.offsetHeight*a),shouldAutoScale(e.target)&&shouldAutoScale(e.target.parentNode)&&(t=n.lazySizes.hC(e.target,"wp-block-cover")?(n.lazySizes.hC(e.target,"has-parallax")?(i=Math.round(n.screen.width*a),r=Math.round(n.screen.height*a)):r<300&&(r=430),constrainSrc(t,i,r,"bg-cover")):n.lazySizes.hC(e.target,"elementor-bg")||n.lazySizes.hC(e.target,"et_parallax_bg")||n.lazySizes.hC(e.target,"bg-image-crop")?constrainSrc(t,i,r,"bg-cover"):constrainSrc(t,i,r,"bg")),e.target.style.backgroundImage="url("+(s.test(t)?JSON.stringify(t):t)+")")))},!1))}),document.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),document.addEventListener("lazybeforeunveil",function(e){var t,a,i,r,n,o=e.target,s=o.getAttribute("data-srcset");o.naturalWidth&&!s&&1<o.naturalWidth&&1<o.naturalHeight&&(i=window.devicePixelRatio||1,a=o.naturalWidth,r=o.naturalHeight,t=o.getAttribute("data-eio-rwidth"),e=o.getAttribute("data-eio-rheight"),t&&a<t&&(a=t,r=e),a=o.clientWidth&&1.25*o.clientWidth<a,r=o.clientHeight&&1.25*o.clientHeight<r,(a||r)&&(a=Math.round(o.offsetWidth*i),r=Math.round(o.offsetHeight*i),i=o.getAttribute("data-src"),n=o.getAttribute("data-src-webp"),ewww_webp_supported&&n&&-1==i.search("webp=1")&&(i=n),(r=!(!shouldAutoScale(o)||!shouldAutoScale(o.parentNode))&&(window.lazySizes.hC(o,"et_pb_jt_filterable_grid_item_image")||window.lazySizes.hC(o,"ss-foreground-image")||window.lazySizes.hC(o,"img-crop")||window.lazySizes.hC(o,"ct-image")&&window.lazySizes.hC(o,"object-cover")?constrainSrc(i,a,r,"img-crop"):constrainSrc(i,a,r,"img")))&&i!=r&&o.setAttribute("data-src",r))),ewww_webp_supported&&(!s||(s=o.getAttribute("data-srcset-webp"))&&o.setAttribute("data-srcset",s),(n=o.getAttribute("data-src-webp"))&&o.setAttribute("data-src",n))}),function(e,t){t=t(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{},function(i,f,n){"use strict";var g,h;if(!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in h=i.lazySizesConfig||i.lazysizesConfig||{},t)e in h||(h[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:h,noSupport:!0};function c(e,t){S(e,t)||e.setAttribute("class",(e[p]("class")||"").trim()+" "+t)}function u(e,t){(t=S(e,t))&&e.setAttribute("class",(e[p]("class")||"").replace(t," "))}function z(e,t){var a;!l&&(a=i.picturefill||h.pf)?(t&&t.src&&!e[p]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,r,t,o,s,m=f.documentElement,l=i.HTMLPictureElement,d="addEventListener",p="getAttribute",e=i[d].bind(i),y=i.setTimeout,v=i.requestAnimationFrame||y,b=i.requestIdleCallback,w=/^picture$/i,_=["load","error","lazyincluded","_lazyloaded"],C={},A=Array.prototype.forEach,S=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[p]("class")||"")&&C[t]},E=function(t,a,e){var i=e?d:"removeEventListener";e&&E(t,a),_.forEach(function(e){t[i](e,a)})},x=function(e,t,a,i,r){var n=f.createEvent("Event");return(a=a||{}).instance=g,n.initEvent(t,!i,!r),n.detail=a,e.dispatchEvent(n),n},M=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,a){for(a=a||e.offsetWidth;a<h.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},L=(o=[],s=t=[],H._lsFlush=N,H);function N(){var e=s;for(s=t.length?o:t,r=!(a=!0);e.length;)e.shift()();a=!1}function H(e,t){a&&!t?e.apply(this,arguments):(s.push(e),r||(r=!0,(f.hidden?y:v)(N)))}function R(a,e){return e?function(){L(a)}:function(){var e=this,t=arguments;L(function(){a.apply(e,t)})}}function k(e){function t(){var e=n.now()-i;e<99?y(t,99-e):(b||r)(r)}var a,i,r=function(){a=null,e()};return function(){i=n.now(),a=a||y(t,99)}}var B,T,F,P,D,O,I,$,j,q,U,J,G,K,Q,V,X,Y,Z,ee,te,ae,ie,re,ne,oe,se,le,de,ce,ue,fe=(Z=/^img$/i,ee=/^iframe$/i,te="onscroll"in i&&!/(gle|ing)bot/.test(navigator.userAgent),re=-1,ne=function(e){return(J=null==J?"hidden"==M(f.body,"visibility"):J)||!("hidden"==M(e.parentNode,"visibility")&&"hidden"==M(e,"visibility"))},G=he,Q=ie=ae=0,V=h.throttleDelay,X=h.ricTimeout,Y=b&&49<X?function(){b(ze,{timeout:X}),X!==h.ricTimeout&&(X=h.ricTimeout)}:R(function(){y(ze)},!0),se=R(me),le=function(e){se({target:e.target})},de=R(function(t,e,a,i,r){var n,o,s,l,d;(s=x(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?c(t,h.autosizesClass):t.setAttribute("sizes",i)),n=t[p](h.srcsetAttr),a=t[p](h.srcAttr),r&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,h.loadingClass),l&&(clearTimeout(F),F=y(ge,2500),E(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),pe),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(i=a,0==(d=(e=t).getAttribute("data-load-mode")||h.iframeLoadMode)?e.contentWindow.location.replace(i):1==d&&(e.src=i)):t.src=a),r&&(n||o)&&z(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,h.lazyClass),L(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,h.fastLoadedClass),me(s),t._lazyCache=!0,y(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&ie--},!0)}),ue=k(function(){h.loadMode=3,oe()}),{_:function(){D=n.now(),g.elements=f.getElementsByClassName(h.lazyClass),B=f.getElementsByClassName(h.lazyClass+" "+h.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+h.loadingClass)).length&&t.forEach&&v(function(){t.forEach(function(e){e.complete&&ce(e)})})}),i.MutationObserver?new MutationObserver(oe).observe(m,{childList:!0,subtree:!0,attributes:!0}):(m[d]("DOMNodeInserted",oe,!0),m[d]("DOMAttrModified",oe,!0),setInterval(oe,999)),e("hashchange",oe,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){f[d](e,oe,!0)}),/d$|^c/.test(f.readyState)?ve():(e("load",ve),f[d]("DOMContentLoaded",oe),y(ve,2e4)),g.elements.length?(he(),L._lsFlush()):oe()},checkElems:oe=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Y():y(Y,t))},unveil:ce=function(e){var t,a,i,r;e._lazyRace||(!(r="auto"==(i=(a=Z.test(e.nodeName))&&(e[p](h.sizesAttr)||e[p]("sizes"))))&&T||!a||!e[p]("src")&&!e.srcset||e.complete||S(e,h.errorClass)||!S(e,h.lazyClass))&&(t=x(e,"lazyunveilread").detail,r&&Ce.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ie++,de(e,t,r,i,a))},_aLSL:ye});function ge(e){ie--,e&&!(ie<0)&&e.target||(ie=0)}function he(){var e,t,a,i,r,n,o,s,l,d,c,u=g.elements;if((P=h.loadMode)&&ie<8&&(e=u.length)){for(t=0,re++;t<e;t++)if(u[t]&&!u[t]._lazyRace)if(!te||g.prematureUnveil&&g.prematureUnveil(u[t]))ce(u[t]);else if((o=u[t][p]("data-expand"))&&(r=+o)||(r=ae),l||(l=!h.expand||h.expand<1?500<m.clientHeight&&500<m.clientWidth?500:370:h.expand,d=(g._defEx=l)*h.expFactor,c=h.hFac,J=null,ae<d&&ie<1&&2<re&&2<P&&!f.hidden?(ae=d,re=0):ae=1<P&&1<re&&ie<6?l:0),s!==r&&(O=innerWidth+r*c,I=innerHeight+r,n=-1*r,s=r),d=u[t].getBoundingClientRect(),(U=d.bottom)>=n&&($=d.top)<=I&&(q=d.right)>=n*c&&(j=d.left)<=O&&(U||q||j||$)&&(h.loadHidden||ne(u[t]))&&(T&&ie<3&&!o&&(P<3||re<4)||function(e,t){var a,i=e,r=ne(e);for($-=t,U+=t,j-=t,q+=t;r&&(i=i.offsetParent)&&i!=f.body&&i!=m;)(r=0<(M(i,"opacity")||1))&&"visible"!=M(i,"overflow")&&(a=i.getBoundingClientRect(),r=q>a.left&&j<a.right&&U>a.top-1&&$<a.bottom+1);return r}(u[t],r))){if(ce(u[t]),i=!0,9<ie)break}else!i&&T&&!a&&ie<4&&re<4&&2<P&&(B[0]||h.preloadAfterLoad)&&(B[0]||!o&&(U||q||j||$||"auto"!=u[t][p](h.sizesAttr)))&&(a=B[0]||u[t]);a&&!i&&ce(a)}}function ze(){K=!1,Q=n.now(),G()}function me(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,h.loadedClass),u(t,h.loadingClass),E(t,le),x(t,"lazyloaded"))}function pe(e){var t,a=e[p](h.srcsetAttr);(t=h.customMedia[e[p]("data-media")||e[p]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function ye(){3==h.loadMode&&(h.loadMode=2),ue()}function ve(){T||(n.now()-D<999?y(ve,999):(T=!0,h.loadMode=3,oe(),e("scroll",ye,!0)))}var be,we,_e,Ce=(we=R(function(e,t,a,i){var r,n,o;if(e._lazysizesWidth=i,e.setAttribute("sizes",i+="px"),w.test(t.nodeName||""))for(n=0,o=(r=t.getElementsByTagName("source")).length;n<o;n++)r[n].setAttribute("sizes",i);a.detail.dataAttr||z(e,a.detail)}),{_:function(){be=f.getElementsByClassName(h.autosizesClass),e("resize",_e)},checkElems:_e=k(function(){var e,t=be.length;if(t)for(e=0;e<t;e++)Ae(be[e])}),updateElem:Ae});function Ae(e,t,a){var i=e.parentNode;i&&(a=W(e,i,a),(t=x(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,i,t,a))}function Se(){!Se.i&&f.getElementsByClassName&&(Se.i=!0,Ce._(),fe._())}return y(function(){h.init&&Se()}),g={cfg:h,autoSizer:Ce,loader:fe,init:Se,uP:z,aC:c,rC:u,hC:S,fire:x,gW:W,rAF:L}});
includes/load-webp.min.js CHANGED
@@ -1 +1 @@
1
- var Arrive=function(c,e,w){"use strict";if(c.MutationObserver&&"undefined"!=typeof HTMLElement){var r,t,a=0,u=(r=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector,{matchesSelector:function(e,t){return e instanceof HTMLElement&&r.call(e,t)},addMethod:function(e,t,r){var a=e[t];e[t]=function(){return r.length==arguments.length?r.apply(this,arguments):"function"==typeof a?a.apply(this,arguments):void 0}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var r,a=0;r=e[a];a++)r&&r.callback&&r.callback.call(r.elem,r.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,r,a){for(var i,n=0;i=e[n];n++)r(i,t,a)&&a.push({callback:t.callback,elem:i}),0<i.childNodes.length&&u.checkChildNodesRecursively(i.childNodes,t,r,a)},mergeArrays:function(e,t){var r,a={};for(r in e)e.hasOwnProperty(r)&&(a[r]=e[r]);for(r in t)t.hasOwnProperty(r)&&(a[r]=t[r]);return a},toElementsArray:function(e){return void 0===e||"number"==typeof e.length&&e!==c||(e=[e]),e}}),d=((t=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null}).prototype.addEvent=function(e,t,r,a){var i={target:e,selector:t,options:r,callback:a,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},t.prototype.removeEvent=function(e){for(var t,r=this._eventsBucket.length-1;t=this._eventsBucket[r];r--)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t);var a=this._eventsBucket.splice(r,1);a&&a.length&&(a[0].callback=null)}},t.prototype.beforeAdding=function(e){this._beforeAdding=e},t.prototype.beforeRemoving=function(e){this._beforeRemoving=e},t),o=function(i,n){var o=new d,l=this,s={fireOnAttributesModification:!1};return o.beforeAdding(function(t){var e,r=t.target;r!==c.document&&r!==c||(r=document.getElementsByTagName("html")[0]),e=new MutationObserver(function(e){n.call(this,e,t)});var a=i(t.options);e.observe(r,a),t.observer=e,t.me=l}),o.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,r){t=u.mergeArrays(s,t);for(var a=u.toElementsArray(this),i=0;i<a.length;i++)o.addEvent(a[i],e,t,r)},this.unbindEvent=function(){var r=u.toElementsArray(this);o.removeEvent(function(e){for(var t=0;t<r.length;t++)if(this===w||e.target===r[t])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(r){var e,a=u.toElementsArray(this),i=r;e="function"==typeof r?function(e){for(var t=0;t<a.length;t++)if((this===w||e.target===a[t])&&e.callback===i)return!0;return!1}:function(e){for(var t=0;t<a.length;t++)if((this===w||e.target===a[t])&&e.selector===r)return!0;return!1},o.removeEvent(e)},this.unbindEventWithSelectorAndCallback=function(r,a){var i=u.toElementsArray(this);o.removeEvent(function(e){for(var t=0;t<i.length;t++)if((this===w||e.target===i[t])&&e.selector===r&&e.callback===a)return!0;return!1})},this},i=new function(){var s={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};function n(e,t,r){return!(!u.matchesSelector(e,t.selector)||(e._id===w&&(e._id=a++),-1!=t.firedElems.indexOf(e._id))||(t.firedElems.push(e._id),0))}var c=(i=new o(function(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t},function(e,i){e.forEach(function(e){var t=e.addedNodes,r=e.target,a=[];null!==t&&0<t.length?u.checkChildNodesRecursively(t,i,n,a):"attributes"===e.type&&n(r,i)&&a.push({callback:i.callback,elem:r}),u.callCallbacks(a,i)})})).bindEvent;return i.bindEvent=function(e,t,r){t=void 0===r?(r=t,s):u.mergeArrays(s,t);var a=u.toElementsArray(this);if(t.existing){for(var i=[],n=0;n<a.length;n++)for(var o=a[n].querySelectorAll(e),l=0;l<o.length;l++)i.push({callback:r,elem:o[l]});if(t.onceOnly&&i.length)return r.call(i[0].elem,i[0].elem);setTimeout(u.callCallbacks,1,i)}c.call(this,e,t,r)},i},l=new function(){var a={};function i(e,t){return u.matchesSelector(e,t.selector)}var n=(l=new o(function(){return{childList:!0,subtree:!0}},function(e,a){e.forEach(function(e){var t=e.removedNodes,r=[];null!==t&&0<t.length&&u.checkChildNodesRecursively(t,a,i,r),u.callCallbacks(r,a)})})).bindEvent;return l.bindEvent=function(e,t,r){t=void 0===r?(r=t,a):u.mergeArrays(a,t),n.call(this,e,t,r)},l};e&&g(e.fn),g(HTMLElement.prototype),g(NodeList.prototype),g(HTMLCollection.prototype),g(HTMLDocument.prototype),g(Window.prototype);var n={};return s(i,n,"unbindAllArrive"),s(l,n,"unbindAllLeave"),n}function s(e,t,r){u.addMethod(t,r,e.unbindEvent),u.addMethod(t,r,e.unbindEventWithSelectorOrCallback),u.addMethod(t,r,e.unbindEventWithSelectorAndCallback)}function g(e){e.arrive=i.bindEvent,s(i,e,"unbindArrive"),e.leave=l.bindEvent,s(l,e,"unbindLeave")}}(window,"undefined"==typeof jQuery?null:jQuery,void 0),ewww_webp_supported=!1;function check_webp_feature(e,t){if(ewww_webp_supported)t(ewww_webp_supported);else{var r=new Image;r.onload=function(){ewww_webp_supported=0<r.width&&0<r.height,t(ewww_webp_supported)},r.onerror=function(){t(!1)},r.src="data:image/webp;base64,"+{alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[e]}}function ewwwLoadImages(e){if(e){for(var t=document.querySelectorAll(".batch-image img, .image-wrapper a, .ngg-pro-masonry-item a, .ngg-galleria-offscreen-seo-wrapper a"),r=0,a=t.length;r<a;r++)ewwwAttr(t[r],"data-src",t[r].getAttribute("data-webp")),ewwwAttr(t[r],"data-thumbnail",t[r].getAttribute("data-webp-thumbnail"));for(r=0,a=(n=document.querySelectorAll(".rev_slider ul li")).length;r<a;r++){ewwwAttr(n[r],"data-thumb",n[r].getAttribute("data-webp-thumb"));for(var i=1;i<11;)ewwwAttr(n[r],"data-param"+i,n[r].getAttribute("data-webp-param"+i)),i++}var n;for(r=0,a=(n=document.querySelectorAll(".rev_slider img")).length;r<a;r++)ewwwAttr(n[r],"data-lazyload",n[r].getAttribute("data-webp-lazyload"));var o=document.querySelectorAll("div.woocommerce-product-gallery__image");for(r=0,a=o.length;r<a;r++)ewwwAttr(o[r],"data-thumb",o[r].getAttribute("data-webp-thumb"))}var l=document.querySelectorAll("video");for(r=0,a=l.length;r<a;r++)ewwwAttr(l[r],"poster",e?l[r].getAttribute("data-poster-webp"):l[r].getAttribute("data-poster-image"));var s=document.querySelectorAll("img.ewww_webp_lazy_load");for(r=0,a=s.length;r<a;r++){if(e){ewwwAttr(s[r],"data-lazy-srcset",s[r].getAttribute("data-lazy-srcset-webp")),ewwwAttr(s[r],"data-srcset",s[r].getAttribute("data-srcset-webp")),ewwwAttr(s[r],"data-lazy-src",s[r].getAttribute("data-lazy-src-webp")),ewwwAttr(s[r],"data-src",s[r].getAttribute("data-src-webp")),ewwwAttr(s[r],"data-orig-file",s[r].getAttribute("data-webp-orig-file")),ewwwAttr(s[r],"data-medium-file",s[r].getAttribute("data-webp-medium-file")),ewwwAttr(s[r],"data-large-file",s[r].getAttribute("data-webp-large-file"));var c=s[r].getAttribute("srcset");null!=c&&!1!==c&&c.includes("R0lGOD")&&ewwwAttr(s[r],"src",s[r].getAttribute("data-lazy-src-webp"))}s[r].className=s[r].className.replace(/\bewww_webp_lazy_load\b/,"")}var w=document.querySelectorAll(".ewww_webp");for(r=0,a=w.length;r<a;r++)e?(ewwwAttr(w[r],"srcset",w[r].getAttribute("data-srcset-webp")),ewwwAttr(w[r],"src",w[r].getAttribute("data-src-webp")),ewwwAttr(w[r],"data-orig-file",w[r].getAttribute("data-webp-orig-file")),ewwwAttr(w[r],"data-medium-file",w[r].getAttribute("data-webp-medium-file")),ewwwAttr(w[r],"data-large-file",w[r].getAttribute("data-webp-large-file")),ewwwAttr(w[r],"data-large_image",w[r].getAttribute("data-webp-large_image")),ewwwAttr(w[r],"data-src",w[r].getAttribute("data-webp-src"))):(ewwwAttr(w[r],"srcset",w[r].getAttribute("data-srcset-img")),ewwwAttr(w[r],"src",w[r].getAttribute("data-src-img"))),w[r].className=w[r].className.replace(/\bewww_webp\b/,"ewww_webp_loaded");window.jQuery&&jQuery.fn.isotope&&jQuery.fn.imagesLoaded&&(jQuery(".fusion-posts-container-infinite").imagesLoaded(function(){jQuery(".fusion-posts-container-infinite").hasClass("isotope")&&jQuery(".fusion-posts-container-infinite").isotope()}),jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").imagesLoaded(function(){jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").isotope()}))}function ewwwWebPInit(e){ewwwLoadImages(e),ewwwNggLoadGalleries(e),document.arrive(".ewww_webp",function(){ewwwLoadImages(e)}),document.arrive(".ewww_webp_lazy_load",function(){ewwwLoadImages(e)}),document.arrive("videos",function(){ewwwLoadImages(e)}),"loading"==document.readyState?document.addEventListener("DOMContentLoaded",ewwwJSONParserInit):("undefined"!=typeof galleries&&ewwwNggParseGalleries(e),ewwwWooParseVariations(e))}function ewwwAttr(e,t,r){null!=r&&!1!==r&&e.setAttribute(t,r)}function ewwwJSONParserInit(){"undefined"!=typeof galleries&&check_webp_feature("alpha",ewwwNggParseGalleries),check_webp_feature("alpha",ewwwWooParseVariations)}function ewwwWooParseVariations(e){if(e)for(var t=document.querySelectorAll("form.variations_form"),r=0,a=t.length;r<a;r++){var i=t[r].getAttribute("data-product_variations"),n=!1;try{for(var o in i=JSON.parse(i))void 0!==i[o]&&void 0!==i[o].image&&(void 0!==i[o].image.src_webp&&(i[o].image.src=i[o].image.src_webp,n=!0),void 0!==i[o].image.srcset_webp&&(i[o].image.srcset=i[o].image.srcset_webp,n=!0),void 0!==i[o].image.full_src_webp&&(i[o].image.full_src=i[o].image.full_src_webp,n=!0),void 0!==i[o].image.gallery_thumbnail_src_webp&&(i[o].image.gallery_thumbnail_src=i[o].image.gallery_thumbnail_src_webp,n=!0),void 0!==i[o].image.thumb_src_webp&&(i[o].image.thumb_src=i[o].image.thumb_src_webp,n=!0));n&&ewwwAttr(t[r],"data-product_variations",JSON.stringify(i))}catch(e){}}}function ewwwNggParseGalleries(e){if(e)for(var t in galleries){var r=galleries[t];galleries[t].images_list=ewwwNggParseImageList(r.images_list)}}function ewwwNggLoadGalleries(e){e&&document.addEventListener("ngg.galleria.themeadded",function(e,t){window.ngg_galleria._create_backup=window.ngg_galleria.create,window.ngg_galleria.create=function(e,t){var r=$(e).data("id");return galleries["gallery_"+r].images_list=ewwwNggParseImageList(galleries["gallery_"+r].images_list),window.ngg_galleria._create_backup(e,t)}})}function ewwwNggParseImageList(e){for(var t in e){var r=e[t];if(void 0!==r["image-webp"]&&(e[t].image=r["image-webp"],delete e[t]["image-webp"]),void 0!==r["thumb-webp"]&&(e[t].thumb=r["thumb-webp"],delete e[t]["thumb-webp"]),void 0!==r.full_image_webp&&(e[t].full_image=r.full_image_webp,delete e[t].full_image_webp),void 0!==r.srcsets)for(var a in r.srcsets)nggSrcset=r.srcsets[a],void 0!==r.srcsets[a+"-webp"]&&(e[t].srcsets[a]=r.srcsets[a+"-webp"],delete e[t].srcsets[a+"-webp"]);if(void 0!==r.full_srcsets)for(var i in r.full_srcsets)nggFSrcset=r.full_srcsets[i],void 0!==r.full_srcsets[i+"-webp"]&&(e[t].full_srcsets[i]=r.full_srcsets[i+"-webp"],delete e[t].full_srcsets[i+"-webp"])}return e}check_webp_feature("alpha",ewwwWebPInit);
1
+ var Arrive=function(c,e,w){"use strict";if(c.MutationObserver&&"undefined"!=typeof HTMLElement){var r,a=0,u=(r=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector,{matchesSelector:function(e,t){return e instanceof HTMLElement&&r.call(e,t)},addMethod:function(e,t,r){var a=e[t];e[t]=function(){return r.length==arguments.length?r.apply(this,arguments):"function"==typeof a?a.apply(this,arguments):void 0}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var r,a=0;r=e[a];a++)r&&r.callback&&r.callback.call(r.elem,r.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,r,a){for(var i,n=0;i=e[n];n++)r(i,t,a)&&a.push({callback:t.callback,elem:i}),0<i.childNodes.length&&u.checkChildNodesRecursively(i.childNodes,t,r,a)},mergeArrays:function(e,t){var r,a={};for(r in e)e.hasOwnProperty(r)&&(a[r]=e[r]);for(r in t)t.hasOwnProperty(r)&&(a[r]=t[r]);return a},toElementsArray:function(e){return e=void 0!==e&&("number"!=typeof e.length||e===c)?[e]:e}}),t=(n.prototype.addEvent=function(e,t,r,a){a={target:e,selector:t,options:r,callback:a,firedElems:[]};return this._beforeAdding&&this._beforeAdding(a),this._eventsBucket.push(a),a},n.prototype.removeEvent=function(e){for(var t,r=this._eventsBucket.length-1;t=this._eventsBucket[r];r--)e(t)&&(this._beforeRemoving&&this._beforeRemoving(t),(t=this._eventsBucket.splice(r,1))&&t.length&&(t[0].callback=null))},n.prototype.beforeAdding=function(e){this._beforeAdding=e},n.prototype.beforeRemoving=function(e){this._beforeRemoving=e},n),o=function(i,n){var o=new t,l=this,s={fireOnAttributesModification:!1};return o.beforeAdding(function(t){var e=t.target;e!==c.document&&e!==c||(e=document.getElementsByTagName("html")[0]);var r=new MutationObserver(function(e){n.call(this,e,t)}),a=i(t.options);r.observe(e,a),t.observer=r,t.me=l}),o.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,r){t=u.mergeArrays(s,t);for(var a=u.toElementsArray(this),i=0;i<a.length;i++)o.addEvent(a[i],e,t,r)},this.unbindEvent=function(){var r=u.toElementsArray(this);o.removeEvent(function(e){for(var t=0;t<r.length;t++)if(this===w||e.target===r[t])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(r){var a=u.toElementsArray(this),i=r,e="function"==typeof r?function(e){for(var t=0;t<a.length;t++)if((this===w||e.target===a[t])&&e.callback===i)return!0;return!1}:function(e){for(var t=0;t<a.length;t++)if((this===w||e.target===a[t])&&e.selector===r)return!0;return!1};o.removeEvent(e)},this.unbindEventWithSelectorAndCallback=function(r,a){var i=u.toElementsArray(this);o.removeEvent(function(e){for(var t=0;t<i.length;t++)if((this===w||e.target===i[t])&&e.selector===r&&e.callback===a)return!0;return!1})},this},i=new function(){var s={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};function n(e,t,r){return!(!u.matchesSelector(e,t.selector)||(e._id===w&&(e._id=a++),-1!=t.firedElems.indexOf(e._id)))&&(t.firedElems.push(e._id),!0)}var c=(i=new o(function(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t},function(e,i){e.forEach(function(e){var t=e.addedNodes,r=e.target,a=[];null!==t&&0<t.length?u.checkChildNodesRecursively(t,i,n,a):"attributes"===e.type&&n(r,i)&&a.push({callback:i.callback,elem:r}),u.callCallbacks(a,i)})})).bindEvent;return i.bindEvent=function(e,t,r){t=void 0===r?(r=t,s):u.mergeArrays(s,t);var a=u.toElementsArray(this);if(t.existing){for(var i=[],n=0;n<a.length;n++)for(var o=a[n].querySelectorAll(e),l=0;l<o.length;l++)i.push({callback:r,elem:o[l]});if(t.onceOnly&&i.length)return r.call(i[0].elem,i[0].elem);setTimeout(u.callCallbacks,1,i)}c.call(this,e,t,r)},i},l=new function(){var a={};function i(e,t){return u.matchesSelector(e,t.selector)}var n=(l=new o(function(){return{childList:!0,subtree:!0}},function(e,r){e.forEach(function(e){var t=e.removedNodes,e=[];null!==t&&0<t.length&&u.checkChildNodesRecursively(t,r,i,e),u.callCallbacks(e,r)})})).bindEvent;return l.bindEvent=function(e,t,r){t=void 0===r?(r=t,a):u.mergeArrays(a,t),n.call(this,e,t,r)},l};e&&d(e.fn),d(HTMLElement.prototype),d(NodeList.prototype),d(HTMLCollection.prototype),d(HTMLDocument.prototype),d(Window.prototype);e={};return s(i,e,"unbindAllArrive"),s(l,e,"unbindAllLeave"),e}function n(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null}function s(e,t,r){u.addMethod(t,r,e.unbindEvent),u.addMethod(t,r,e.unbindEventWithSelectorOrCallback),u.addMethod(t,r,e.unbindEventWithSelectorAndCallback)}function d(e){e.arrive=i.bindEvent,s(i,e,"unbindArrive"),e.leave=l.bindEvent,s(l,e,"unbindLeave")}}(window,"undefined"==typeof jQuery?null:jQuery,void 0),ewww_webp_supported=!1;function check_webp_feature(e,t){var r;ewww_webp_supported?t(ewww_webp_supported):((r=new Image).onload=function(){ewww_webp_supported=0<r.width&&0<r.height,t(ewww_webp_supported)},r.onerror=function(){t(!1)},r.src="data:image/webp;base64,"+{alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[e])}function ewwwLoadImages(e){if(e){for(var t=document.querySelectorAll(".batch-image img, .image-wrapper a, .ngg-pro-masonry-item a, .ngg-galleria-offscreen-seo-wrapper a"),r=0,a=t.length;r<a;r++)ewwwAttr(t[r],"data-src",t[r].getAttribute("data-webp")),ewwwAttr(t[r],"data-thumbnail",t[r].getAttribute("data-webp-thumbnail"));for(var i=document.querySelectorAll(".rev_slider ul li"),r=0,a=i.length;r<a;r++){ewwwAttr(i[r],"data-thumb",i[r].getAttribute("data-webp-thumb"));for(var n=1;n<11;)ewwwAttr(i[r],"data-param"+n,i[r].getAttribute("data-webp-param"+n)),n++}for(r=0,a=(i=document.querySelectorAll(".rev_slider img")).length;r<a;r++)ewwwAttr(i[r],"data-lazyload",i[r].getAttribute("data-webp-lazyload"));for(var o=document.querySelectorAll("div.woocommerce-product-gallery__image"),r=0,a=o.length;r<a;r++)ewwwAttr(o[r],"data-thumb",o[r].getAttribute("data-webp-thumb"))}for(var l=document.querySelectorAll("video"),r=0,a=l.length;r<a;r++)ewwwAttr(l[r],"poster",e?l[r].getAttribute("data-poster-webp"):l[r].getAttribute("data-poster-image"));for(var s,c=document.querySelectorAll("img.ewww_webp_lazy_load"),r=0,a=c.length;r<a;r++)e&&(ewwwAttr(c[r],"data-lazy-srcset",c[r].getAttribute("data-lazy-srcset-webp")),ewwwAttr(c[r],"data-srcset",c[r].getAttribute("data-srcset-webp")),ewwwAttr(c[r],"data-lazy-src",c[r].getAttribute("data-lazy-src-webp")),ewwwAttr(c[r],"data-src",c[r].getAttribute("data-src-webp")),ewwwAttr(c[r],"data-orig-file",c[r].getAttribute("data-webp-orig-file")),ewwwAttr(c[r],"data-medium-file",c[r].getAttribute("data-webp-medium-file")),ewwwAttr(c[r],"data-large-file",c[r].getAttribute("data-webp-large-file")),null!=(s=c[r].getAttribute("srcset"))&&!1!==s&&s.includes("R0lGOD")&&ewwwAttr(c[r],"src",c[r].getAttribute("data-lazy-src-webp"))),c[r].className=c[r].className.replace(/\bewww_webp_lazy_load\b/,"");for(var w=document.querySelectorAll(".ewww_webp"),r=0,a=w.length;r<a;r++)e?(ewwwAttr(w[r],"srcset",w[r].getAttribute("data-srcset-webp")),ewwwAttr(w[r],"src",w[r].getAttribute("data-src-webp")),ewwwAttr(w[r],"data-orig-file",w[r].getAttribute("data-webp-orig-file")),ewwwAttr(w[r],"data-medium-file",w[r].getAttribute("data-webp-medium-file")),ewwwAttr(w[r],"data-large-file",w[r].getAttribute("data-webp-large-file")),ewwwAttr(w[r],"data-large_image",w[r].getAttribute("data-webp-large_image")),ewwwAttr(w[r],"data-src",w[r].getAttribute("data-webp-src"))):(ewwwAttr(w[r],"srcset",w[r].getAttribute("data-srcset-img")),ewwwAttr(w[r],"src",w[r].getAttribute("data-src-img"))),w[r].className=w[r].className.replace(/\bewww_webp\b/,"ewww_webp_loaded");window.jQuery&&jQuery.fn.isotope&&jQuery.fn.imagesLoaded&&(jQuery(".fusion-posts-container-infinite").imagesLoaded(function(){jQuery(".fusion-posts-container-infinite").hasClass("isotope")&&jQuery(".fusion-posts-container-infinite").isotope()}),jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").imagesLoaded(function(){jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").isotope()}))}function ewwwWebPInit(e){ewwwLoadImages(e),ewwwNggLoadGalleries(e),document.arrive(".ewww_webp",function(){ewwwLoadImages(e)}),document.arrive(".ewww_webp_lazy_load",function(){ewwwLoadImages(e)}),document.arrive("videos",function(){ewwwLoadImages(e)}),"loading"==document.readyState?document.addEventListener("DOMContentLoaded",ewwwJSONParserInit):("undefined"!=typeof galleries&&ewwwNggParseGalleries(e),ewwwWooParseVariations(e))}function ewwwAttr(e,t,r){null!=r&&!1!==r&&e.setAttribute(t,r)}function ewwwJSONParserInit(){"undefined"!=typeof galleries&&check_webp_feature("alpha",ewwwNggParseGalleries),check_webp_feature("alpha",ewwwWooParseVariations)}function ewwwWooParseVariations(e){if(e)for(var t=document.querySelectorAll("form.variations_form"),r=0,a=t.length;r<a;r++){var i=t[r].getAttribute("data-product_variations"),n=!1;try{for(var o in i=JSON.parse(i))void 0!==i[o]&&void 0!==i[o].image&&(void 0!==i[o].image.src_webp&&(i[o].image.src=i[o].image.src_webp,n=!0),void 0!==i[o].image.srcset_webp&&(i[o].image.srcset=i[o].image.srcset_webp,n=!0),void 0!==i[o].image.full_src_webp&&(i[o].image.full_src=i[o].image.full_src_webp,n=!0),void 0!==i[o].image.gallery_thumbnail_src_webp&&(i[o].image.gallery_thumbnail_src=i[o].image.gallery_thumbnail_src_webp,n=!0),void 0!==i[o].image.thumb_src_webp&&(i[o].image.thumb_src=i[o].image.thumb_src_webp,n=!0));n&&ewwwAttr(t[r],"data-product_variations",JSON.stringify(i))}catch(e){}}}function ewwwNggParseGalleries(e){if(e)for(var t in galleries){var r=galleries[t];galleries[t].images_list=ewwwNggParseImageList(r.images_list)}}function ewwwNggLoadGalleries(e){e&&document.addEventListener("ngg.galleria.themeadded",function(e,t){window.ngg_galleria._create_backup=window.ngg_galleria.create,window.ngg_galleria.create=function(e,t){var r=$(e).data("id");return galleries["gallery_"+r].images_list=ewwwNggParseImageList(galleries["gallery_"+r].images_list),window.ngg_galleria._create_backup(e,t)}})}function ewwwNggParseImageList(e){for(var t in e){var r=e[t];if(void 0!==r["image-webp"]&&(e[t].image=r["image-webp"],delete e[t]["image-webp"]),void 0!==r["thumb-webp"]&&(e[t].thumb=r["thumb-webp"],delete e[t]["thumb-webp"]),void 0!==r.full_image_webp&&(e[t].full_image=r.full_image_webp,delete e[t].full_image_webp),void 0!==r.srcsets)for(var a in r.srcsets)nggSrcset=r.srcsets[a],void 0!==r.srcsets[a+"-webp"]&&(e[t].srcsets[a]=r.srcsets[a+"-webp"],delete e[t].srcsets[a+"-webp"]);if(void 0!==r.full_srcsets)for(var i in r.full_srcsets)nggFSrcset=r.full_srcsets[i],void 0!==r.full_srcsets[i+"-webp"]&&(e[t].full_srcsets[i]=r.full_srcsets[i+"-webp"],delete e[t].full_srcsets[i+"-webp"])}return e}check_webp_feature("alpha",ewwwWebPInit);
includes/load_webp.min.js CHANGED
@@ -1 +1 @@
1
- var Arrive=function(d,e,w){"use strict";if(d.MutationObserver&&"undefined"!=typeof HTMLElement){var a,t,r=0,c=(a=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector,{matchesSelector:function(e,t){return e instanceof HTMLElement&&a.call(e,t)},addMethod:function(e,t,a){var r=e[t];e[t]=function(){return a.length==arguments.length?a.apply(this,arguments):"function"==typeof r?r.apply(this,arguments):void 0}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var a,r=0;a=e[r];r++)a&&a.callback&&a.callback.call(a.elem,a.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,a,r){for(var i,n=0;i=e[n];n++)a(i,t,r)&&r.push({callback:t.callback,elem:i}),0<i.childNodes.length&&c.checkChildNodesRecursively(i.childNodes,t,a,r)},mergeArrays:function(e,t){var a,r={};for(a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);for(a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);return r},toElementsArray:function(e){return void 0===e||"number"==typeof e.length&&e!==d||(e=[e]),e}}),u=((t=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null}).prototype.addEvent=function(e,t,a,r){var i={target:e,selector:t,options:a,callback:r,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},t.prototype.removeEvent=function(e){for(var t,a=this._eventsBucket.length-1;t=this._eventsBucket[a];a--)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t);var r=this._eventsBucket.splice(a,1);r&&r.length&&(r[0].callback=null)}},t.prototype.beforeAdding=function(e){this._beforeAdding=e},t.prototype.beforeRemoving=function(e){this._beforeRemoving=e},t),l=function(i,n){var l=new u,o=this,s={fireOnAttributesModification:!1};return l.beforeAdding(function(t){var e,a=t.target;a!==d.document&&a!==d||(a=document.getElementsByTagName("html")[0]),e=new MutationObserver(function(e){n.call(this,e,t)});var r=i(t.options);e.observe(a,r),t.observer=e,t.me=o}),l.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,a){t=c.mergeArrays(s,t);for(var r=c.toElementsArray(this),i=0;i<r.length;i++)l.addEvent(r[i],e,t,a)},this.unbindEvent=function(){var a=c.toElementsArray(this);l.removeEvent(function(e){for(var t=0;t<a.length;t++)if(this===w||e.target===a[t])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(a){var e,r=c.toElementsArray(this),i=a;e="function"==typeof a?function(e){for(var t=0;t<r.length;t++)if((this===w||e.target===r[t])&&e.callback===i)return!0;return!1}:function(e){for(var t=0;t<r.length;t++)if((this===w||e.target===r[t])&&e.selector===a)return!0;return!1},l.removeEvent(e)},this.unbindEventWithSelectorAndCallback=function(a,r){var i=c.toElementsArray(this);l.removeEvent(function(e){for(var t=0;t<i.length;t++)if((this===w||e.target===i[t])&&e.selector===a&&e.callback===r)return!0;return!1})},this},i=new function(){var s={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};function n(e,t,a){return!(!c.matchesSelector(e,t.selector)||(e._id===w&&(e._id=r++),-1!=t.firedElems.indexOf(e._id))||(t.firedElems.push(e._id),0))}var d=(i=new l(function(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t},function(e,i){e.forEach(function(e){var t=e.addedNodes,a=e.target,r=[];null!==t&&0<t.length?c.checkChildNodesRecursively(t,i,n,r):"attributes"===e.type&&n(a,i)&&r.push({callback:i.callback,elem:a}),c.callCallbacks(r,i)})})).bindEvent;return i.bindEvent=function(e,t,a){t=void 0===a?(a=t,s):c.mergeArrays(s,t);var r=c.toElementsArray(this);if(t.existing){for(var i=[],n=0;n<r.length;n++)for(var l=r[n].querySelectorAll(e),o=0;o<l.length;o++)i.push({callback:a,elem:l[o]});if(t.onceOnly&&i.length)return a.call(i[0].elem,i[0].elem);setTimeout(c.callCallbacks,1,i)}d.call(this,e,t,a)},i},o=new function(){var r={};function i(e,t){return c.matchesSelector(e,t.selector)}var n=(o=new l(function(){return{childList:!0,subtree:!0}},function(e,r){e.forEach(function(e){var t=e.removedNodes,a=[];null!==t&&0<t.length&&c.checkChildNodesRecursively(t,r,i,a),c.callCallbacks(a,r)})})).bindEvent;return o.bindEvent=function(e,t,a){t=void 0===a?(a=t,r):c.mergeArrays(r,t),n.call(this,e,t,a)},o};e&&g(e.fn),g(HTMLElement.prototype),g(NodeList.prototype),g(HTMLCollection.prototype),g(HTMLDocument.prototype),g(Window.prototype);var n={};return s(i,n,"unbindAllArrive"),s(o,n,"unbindAllLeave"),n}function s(e,t,a){c.addMethod(t,a,e.unbindEvent),c.addMethod(t,a,e.unbindEventWithSelectorOrCallback),c.addMethod(t,a,e.unbindEventWithSelectorAndCallback)}function g(e){e.arrive=i.bindEvent,s(i,e,"unbindArrive"),e.leave=o.bindEvent,s(o,e,"unbindLeave")}}(window,"undefined"==typeof jQuery?null:jQuery,void 0),ewww_webp_supported=!1;function check_webp_feature(e,t){if(ewww_webp_supported)t(ewww_webp_supported);else{var a=new Image;a.onload=function(){ewww_webp_supported=0<a.width&&0<a.height,t(ewww_webp_supported)},a.onerror=function(){t(!1)},a.src="data:image/webp;base64,"+{alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[e]}}function ewwwLoadImages(e){var n="data-";function t(e,t){for(var a=["accesskey","align","alt","border","class","contenteditable","contextmenu","crossorigin","dir","draggable","dropzone","height","hidden","hspace","id","ismap","lang","longdesc","sizes","spellcheck","style","tabindex","title","translate","usemap","vspace","width","data-animation","data-attachment-id","data-auto-height","data-caption","data-comments-opened","data-delay","data-event-trigger","data-flex_fx","data-height","data-hide-on-end","data-highlight-color","data-highlight-border-color","data-highlight-border-opacity","data-highlight-border-width","data-highlight-opacity","data-image-meta","data-image-title","data-image-description","data-interval","data-large_image_width","data-large_image_height","data-lazy","data-lazy-type","data-mode","data-name","data-no-lazy","data-orig-size","data-partial","data-per-view","data-permalink","data-pin-description","data-pin-id","data-pin-media","data-pin-url","data-rel","data-ride","data-shadow","data-shadow-direction","data-slide","data-slide-to","data-target","data-vc-zoom","data-width","data-wrap"],r=0,i=a.length;r<i;r++)ewwwAttr(t,a[r],e.getAttribute(n+a[r]));return t}if(e){for(var a=document.querySelectorAll(".batch-image img, .image-wrapper a, .ngg-pro-masonry-item a, .ngg-galleria-offscreen-seo-wrapper a"),r=0,i=a.length;r<i;r++)ewwwAttr(a[r],"data-src",a[r].getAttribute("data-webp")),ewwwAttr(a[r],"data-thumbnail",a[r].getAttribute("data-webp-thumbnail"));for(r=0,i=(o=document.querySelectorAll(".rev_slider ul li")).length;r<i;r++){ewwwAttr(o[r],"data-thumb",o[r].getAttribute("data-webp-thumb"));for(var l=1;l<11;)ewwwAttr(o[r],"data-param"+l,o[r].getAttribute("data-webp-param"+l)),l++}var o;for(r=0,i=(o=document.querySelectorAll(".rev_slider img")).length;r<i;r++)ewwwAttr(o[r],"data-lazyload",o[r].getAttribute("data-webp-lazyload"));var s=document.querySelectorAll("div.woocommerce-product-gallery__image");for(r=0,i=s.length;r<i;r++)ewwwAttr(s[r],"data-thumb",s[r].getAttribute("data-webp-thumb"))}var d=document.querySelectorAll("video");for(r=0,i=d.length;r<i;r++)ewwwAttr(d[r],"poster",e?d[r].getAttribute("data-poster-webp"):d[r].getAttribute("data-poster-image"));var w=document.querySelectorAll("img.ewww_webp_lazy_load");for(r=0,i=w.length;r<i;r++){if(e){ewwwAttr(w[r],"data-lazy-srcset",w[r].getAttribute("data-lazy-srcset-webp")),ewwwAttr(w[r],"data-srcset",w[r].getAttribute("data-srcset-webp")),ewwwAttr(w[r],"data-lazy-src",w[r].getAttribute("data-lazy-src-webp")),ewwwAttr(w[r],"data-src",w[r].getAttribute("data-src-webp")),ewwwAttr(w[r],"data-orig-file",w[r].getAttribute("data-webp-orig-file")),ewwwAttr(w[r],"data-medium-file",w[r].getAttribute("data-webp-medium-file")),ewwwAttr(w[r],"data-large-file",w[r].getAttribute("data-webp-large-file"));var c=w[r].getAttribute("srcset");null!=c&&!1!==c&&c.includes("R0lGOD")&&ewwwAttr(w[r],"src",w[r].getAttribute("data-lazy-src-webp"))}w[r].className=w[r].className.replace(/\bewww_webp_lazy_load\b/,"")}var u=document.querySelectorAll(".ewww_webp");for(r=0,i=u.length;r<i;r++){var g=document.createElement("img");e?(ewwwAttr(g,"src",u[r].getAttribute("data-webp")),ewwwAttr(g,"srcset",u[r].getAttribute("data-srcset-webp")),ewwwAttr(g,"data-orig-file",u[r].getAttribute("data-orig-file")),ewwwAttr(g,"data-orig-file",u[r].getAttribute("data-webp-orig-file")),ewwwAttr(g,"data-medium-file",u[r].getAttribute("data-medium-file")),ewwwAttr(g,"data-medium-file",u[r].getAttribute("data-webp-medium-file")),ewwwAttr(g,"data-large-file",u[r].getAttribute("data-large-file")),ewwwAttr(g,"data-large-file",u[r].getAttribute("data-webp-large-file")),ewwwAttr(g,"data-large_image",u[r].getAttribute("data-large_image")),ewwwAttr(g,"data-large_image",u[r].getAttribute("data-webp-large_image")),ewwwAttr(g,"data-src",u[r].getAttribute("data-src")),ewwwAttr(g,"data-src",u[r].getAttribute("data-webp-src"))):(ewwwAttr(g,"src",u[r].getAttribute("data-img")),ewwwAttr(g,"srcset",u[r].getAttribute("data-srcset-img")),ewwwAttr(g,"data-orig-file",u[r].getAttribute("data-orig-file")),ewwwAttr(g,"data-medium-file",u[r].getAttribute("data-medium-file")),ewwwAttr(g,"data-large-file",u[r].getAttribute("data-large-file")),ewwwAttr(g,"data-large_image",u[r].getAttribute("data-large_image")),ewwwAttr(g,"data-src",u[r].getAttribute("data-src"))),g=t(u[r],g),u[r].parentNode.insertBefore(g,u[r].nextSibling),u[r].className=u[r].className.replace(/\bewww_webp\b/,"")}window.jQuery&&jQuery.fn.isotope&&jQuery.fn.imagesLoaded&&(jQuery(".fusion-posts-container-infinite").imagesLoaded(function(){jQuery(".fusion-posts-container-infinite").hasClass("isotope")&&jQuery(".fusion-posts-container-infinite").isotope()}),jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").imagesLoaded(function(){jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").isotope()}))}function ewwwWebPInit(e){ewwwLoadImages(e),ewwwNggLoadGalleries(e),document.arrive(".ewww_webp",function(){ewwwLoadImages(e)}),document.arrive(".ewww_webp_lazy_load",function(){ewwwLoadImages(e)}),document.arrive("videos",function(){ewwwLoadImages(e)}),"loading"==document.readyState?document.addEventListener("DOMContentLoaded",ewwwJSONParserInit):("undefined"!=typeof galleries&&ewwwNggParseGalleries(e),ewwwWooParseVariations(e))}function ewwwAttr(e,t,a){null!=a&&!1!==a&&e.setAttribute(t,a)}function ewwwJSONParserInit(){"undefined"!=typeof galleries&&check_webp_feature("alpha",ewwwNggParseGalleries),check_webp_feature("alpha",ewwwWooParseVariations)}function ewwwWooParseVariations(e){if(e)for(var t=document.querySelectorAll("form.variations_form"),a=0,r=t.length;a<r;a++){var i=t[a].getAttribute("data-product_variations"),n=!1;try{for(var l in i=JSON.parse(i))void 0!==i[l]&&void 0!==i[l].image&&(void 0!==i[l].image.src_webp&&(i[l].image.src=i[l].image.src_webp,n=!0),void 0!==i[l].image.srcset_webp&&(i[l].image.srcset=i[l].image.srcset_webp,n=!0),void 0!==i[l].image.full_src_webp&&(i[l].image.full_src=i[l].image.full_src_webp,n=!0),void 0!==i[l].image.gallery_thumbnail_src_webp&&(i[l].image.gallery_thumbnail_src=i[l].image.gallery_thumbnail_src_webp,n=!0),void 0!==i[l].image.thumb_src_webp&&(i[l].image.thumb_src=i[l].image.thumb_src_webp,n=!0));n&&ewwwAttr(t[a],"data-product_variations",JSON.stringify(i))}catch(e){}}}function ewwwNggParseGalleries(e){if(e)for(var t in galleries){var a=galleries[t];galleries[t].images_list=ewwwNggParseImageList(a.images_list)}}function ewwwNggLoadGalleries(e){e&&document.addEventListener("ngg.galleria.themeadded",function(e,t){window.ngg_galleria._create_backup=window.ngg_galleria.create,window.ngg_galleria.create=function(e,t){var a=$(e).data("id");return galleries["gallery_"+a].images_list=ewwwNggParseImageList(galleries["gallery_"+a].images_list),window.ngg_galleria._create_backup(e,t)}})}function ewwwNggParseImageList(e){for(var t in e){var a=e[t];if(void 0!==a["image-webp"]&&(e[t].image=a["image-webp"],delete e[t]["image-webp"]),void 0!==a["thumb-webp"]&&(e[t].thumb=a["thumb-webp"],delete e[t]["thumb-webp"]),void 0!==a.full_image_webp&&(e[t].full_image=a.full_image_webp,delete e[t].full_image_webp),void 0!==a.srcsets)for(var r in a.srcsets)nggSrcset=a.srcsets[r],void 0!==a.srcsets[r+"-webp"]&&(e[t].srcsets[r]=a.srcsets[r+"-webp"],delete e[t].srcsets[r+"-webp"]);if(void 0!==a.full_srcsets)for(var i in a.full_srcsets)nggFSrcset=a.full_srcsets[i],void 0!==a.full_srcsets[i+"-webp"]&&(e[t].full_srcsets[i]=a.full_srcsets[i+"-webp"],delete e[t].full_srcsets[i+"-webp"])}return e}check_webp_feature("alpha",ewwwWebPInit);
1
+ var Arrive=function(d,e,w){"use strict";if(d.MutationObserver&&"undefined"!=typeof HTMLElement){var a,r=0,c=(a=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector,{matchesSelector:function(e,t){return e instanceof HTMLElement&&a.call(e,t)},addMethod:function(e,t,a){var r=e[t];e[t]=function(){return a.length==arguments.length?a.apply(this,arguments):"function"==typeof r?r.apply(this,arguments):void 0}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var a,r=0;a=e[r];r++)a&&a.callback&&a.callback.call(a.elem,a.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,a,r){for(var i,n=0;i=e[n];n++)a(i,t,r)&&r.push({callback:t.callback,elem:i}),0<i.childNodes.length&&c.checkChildNodesRecursively(i.childNodes,t,a,r)},mergeArrays:function(e,t){var a,r={};for(a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);for(a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);return r},toElementsArray:function(e){return e=void 0!==e&&("number"!=typeof e.length||e===d)?[e]:e}}),t=(n.prototype.addEvent=function(e,t,a,r){r={target:e,selector:t,options:a,callback:r,firedElems:[]};return this._beforeAdding&&this._beforeAdding(r),this._eventsBucket.push(r),r},n.prototype.removeEvent=function(e){for(var t,a=this._eventsBucket.length-1;t=this._eventsBucket[a];a--)e(t)&&(this._beforeRemoving&&this._beforeRemoving(t),(t=this._eventsBucket.splice(a,1))&&t.length&&(t[0].callback=null))},n.prototype.beforeAdding=function(e){this._beforeAdding=e},n.prototype.beforeRemoving=function(e){this._beforeRemoving=e},n),l=function(i,n){var l=new t,o=this,s={fireOnAttributesModification:!1};return l.beforeAdding(function(t){var e=t.target;e!==d.document&&e!==d||(e=document.getElementsByTagName("html")[0]);var a=new MutationObserver(function(e){n.call(this,e,t)}),r=i(t.options);a.observe(e,r),t.observer=a,t.me=o}),l.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,a){t=c.mergeArrays(s,t);for(var r=c.toElementsArray(this),i=0;i<r.length;i++)l.addEvent(r[i],e,t,a)},this.unbindEvent=function(){var a=c.toElementsArray(this);l.removeEvent(function(e){for(var t=0;t<a.length;t++)if(this===w||e.target===a[t])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(a){var r=c.toElementsArray(this),i=a,e="function"==typeof a?function(e){for(var t=0;t<r.length;t++)if((this===w||e.target===r[t])&&e.callback===i)return!0;return!1}:function(e){for(var t=0;t<r.length;t++)if((this===w||e.target===r[t])&&e.selector===a)return!0;return!1};l.removeEvent(e)},this.unbindEventWithSelectorAndCallback=function(a,r){var i=c.toElementsArray(this);l.removeEvent(function(e){for(var t=0;t<i.length;t++)if((this===w||e.target===i[t])&&e.selector===a&&e.callback===r)return!0;return!1})},this},i=new function(){var s={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};function n(e,t,a){return!(!c.matchesSelector(e,t.selector)||(e._id===w&&(e._id=r++),-1!=t.firedElems.indexOf(e._id)))&&(t.firedElems.push(e._id),!0)}var d=(i=new l(function(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t},function(e,i){e.forEach(function(e){var t=e.addedNodes,a=e.target,r=[];null!==t&&0<t.length?c.checkChildNodesRecursively(t,i,n,r):"attributes"===e.type&&n(a,i)&&r.push({callback:i.callback,elem:a}),c.callCallbacks(r,i)})})).bindEvent;return i.bindEvent=function(e,t,a){t=void 0===a?(a=t,s):c.mergeArrays(s,t);var r=c.toElementsArray(this);if(t.existing){for(var i=[],n=0;n<r.length;n++)for(var l=r[n].querySelectorAll(e),o=0;o<l.length;o++)i.push({callback:a,elem:l[o]});if(t.onceOnly&&i.length)return a.call(i[0].elem,i[0].elem);setTimeout(c.callCallbacks,1,i)}d.call(this,e,t,a)},i},o=new function(){var r={};function i(e,t){return c.matchesSelector(e,t.selector)}var n=(o=new l(function(){return{childList:!0,subtree:!0}},function(e,a){e.forEach(function(e){var t=e.removedNodes,e=[];null!==t&&0<t.length&&c.checkChildNodesRecursively(t,a,i,e),c.callCallbacks(e,a)})})).bindEvent;return o.bindEvent=function(e,t,a){t=void 0===a?(a=t,r):c.mergeArrays(r,t),n.call(this,e,t,a)},o};e&&u(e.fn),u(HTMLElement.prototype),u(NodeList.prototype),u(HTMLCollection.prototype),u(HTMLDocument.prototype),u(Window.prototype);e={};return s(i,e,"unbindAllArrive"),s(o,e,"unbindAllLeave"),e}function n(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null}function s(e,t,a){c.addMethod(t,a,e.unbindEvent),c.addMethod(t,a,e.unbindEventWithSelectorOrCallback),c.addMethod(t,a,e.unbindEventWithSelectorAndCallback)}function u(e){e.arrive=i.bindEvent,s(i,e,"unbindArrive"),e.leave=o.bindEvent,s(o,e,"unbindLeave")}}(window,"undefined"==typeof jQuery?null:jQuery,void 0),ewww_webp_supported=!1;function check_webp_feature(e,t){var a;ewww_webp_supported?t(ewww_webp_supported):((a=new Image).onload=function(){ewww_webp_supported=0<a.width&&0<a.height,t(ewww_webp_supported)},a.onerror=function(){t(!1)},a.src="data:image/webp;base64,"+{alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[e])}function ewwwLoadImages(e){if(e){for(var t=document.querySelectorAll(".batch-image img, .image-wrapper a, .ngg-pro-masonry-item a, .ngg-galleria-offscreen-seo-wrapper a"),a=0,r=t.length;a<r;a++)ewwwAttr(t[a],"data-src",t[a].getAttribute("data-webp")),ewwwAttr(t[a],"data-thumbnail",t[a].getAttribute("data-webp-thumbnail"));for(var i=document.querySelectorAll(".rev_slider ul li"),a=0,r=i.length;a<r;a++){ewwwAttr(i[a],"data-thumb",i[a].getAttribute("data-webp-thumb"));for(var n=1;n<11;)ewwwAttr(i[a],"data-param"+n,i[a].getAttribute("data-webp-param"+n)),n++}for(a=0,r=(i=document.querySelectorAll(".rev_slider img")).length;a<r;a++)ewwwAttr(i[a],"data-lazyload",i[a].getAttribute("data-webp-lazyload"));for(var l=document.querySelectorAll("div.woocommerce-product-gallery__image"),a=0,r=l.length;a<r;a++)ewwwAttr(l[a],"data-thumb",l[a].getAttribute("data-webp-thumb"))}for(var o=document.querySelectorAll("video"),a=0,r=o.length;a<r;a++)ewwwAttr(o[a],"poster",e?o[a].getAttribute("data-poster-webp"):o[a].getAttribute("data-poster-image"));for(var s,d=document.querySelectorAll("img.ewww_webp_lazy_load"),a=0,r=d.length;a<r;a++)e&&(ewwwAttr(d[a],"data-lazy-srcset",d[a].getAttribute("data-lazy-srcset-webp")),ewwwAttr(d[a],"data-srcset",d[a].getAttribute("data-srcset-webp")),ewwwAttr(d[a],"data-lazy-src",d[a].getAttribute("data-lazy-src-webp")),ewwwAttr(d[a],"data-src",d[a].getAttribute("data-src-webp")),ewwwAttr(d[a],"data-orig-file",d[a].getAttribute("data-webp-orig-file")),ewwwAttr(d[a],"data-medium-file",d[a].getAttribute("data-webp-medium-file")),ewwwAttr(d[a],"data-large-file",d[a].getAttribute("data-webp-large-file")),null!=(s=d[a].getAttribute("srcset"))&&!1!==s&&s.includes("R0lGOD")&&ewwwAttr(d[a],"src",d[a].getAttribute("data-lazy-src-webp"))),d[a].className=d[a].className.replace(/\bewww_webp_lazy_load\b/,"");for(var w=document.querySelectorAll(".ewww_webp"),a=0,r=w.length;a<r;a++){var c=document.createElement("img");e?(ewwwAttr(c,"src",w[a].getAttribute("data-webp")),ewwwAttr(c,"srcset",w[a].getAttribute("data-srcset-webp")),ewwwAttr(c,"data-orig-file",w[a].getAttribute("data-orig-file")),ewwwAttr(c,"data-orig-file",w[a].getAttribute("data-webp-orig-file")),ewwwAttr(c,"data-medium-file",w[a].getAttribute("data-medium-file")),ewwwAttr(c,"data-medium-file",w[a].getAttribute("data-webp-medium-file")),ewwwAttr(c,"data-large-file",w[a].getAttribute("data-large-file")),ewwwAttr(c,"data-large-file",w[a].getAttribute("data-webp-large-file")),ewwwAttr(c,"data-large_image",w[a].getAttribute("data-large_image")),ewwwAttr(c,"data-large_image",w[a].getAttribute("data-webp-large_image")),ewwwAttr(c,"data-src",w[a].getAttribute("data-src")),ewwwAttr(c,"data-src",w[a].getAttribute("data-webp-src"))):(ewwwAttr(c,"src",w[a].getAttribute("data-img")),ewwwAttr(c,"srcset",w[a].getAttribute("data-srcset-img")),ewwwAttr(c,"data-orig-file",w[a].getAttribute("data-orig-file")),ewwwAttr(c,"data-medium-file",w[a].getAttribute("data-medium-file")),ewwwAttr(c,"data-large-file",w[a].getAttribute("data-large-file")),ewwwAttr(c,"data-large_image",w[a].getAttribute("data-large_image")),ewwwAttr(c,"data-src",w[a].getAttribute("data-src"))),c=function(e,t){for(var a=["accesskey","align","alt","border","class","contenteditable","contextmenu","crossorigin","dir","draggable","dropzone","height","hidden","hspace","id","ismap","lang","longdesc","sizes","spellcheck","style","tabindex","title","translate","usemap","vspace","width","data-animation","data-attachment-id","data-auto-height","data-caption","data-comments-opened","data-delay","data-event-trigger","data-flex_fx","data-height","data-hide-on-end","data-highlight-color","data-highlight-border-color","data-highlight-border-opacity","data-highlight-border-width","data-highlight-opacity","data-image-meta","data-image-title","data-image-description","data-interval","data-large_image_width","data-large_image_height","data-lazy","data-lazy-type","data-mode","data-name","data-no-lazy","data-orig-size","data-partial","data-per-view","data-permalink","data-pin-description","data-pin-id","data-pin-media","data-pin-url","data-rel","data-ride","data-shadow","data-shadow-direction","data-slide","data-slide-to","data-target","data-vc-zoom","data-width","data-wrap"],r=0,i=a.length;r<i;r++)ewwwAttr(t,a[r],e.getAttribute("data-"+a[r]));return t}(w[a],c),w[a].parentNode.insertBefore(c,w[a].nextSibling),w[a].className=w[a].className.replace(/\bewww_webp\b/,"")}window.jQuery&&jQuery.fn.isotope&&jQuery.fn.imagesLoaded&&(jQuery(".fusion-posts-container-infinite").imagesLoaded(function(){jQuery(".fusion-posts-container-infinite").hasClass("isotope")&&jQuery(".fusion-posts-container-infinite").isotope()}),jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").imagesLoaded(function(){jQuery(".fusion-portfolio:not(.fusion-recent-works) .fusion-portfolio-wrapper").isotope()}))}function ewwwWebPInit(e){ewwwLoadImages(e),ewwwNggLoadGalleries(e),document.arrive(".ewww_webp",function(){ewwwLoadImages(e)}),document.arrive(".ewww_webp_lazy_load",function(){ewwwLoadImages(e)}),document.arrive("videos",function(){ewwwLoadImages(e)}),"loading"==document.readyState?document.addEventListener("DOMContentLoaded",ewwwJSONParserInit):("undefined"!=typeof galleries&&ewwwNggParseGalleries(e),ewwwWooParseVariations(e))}function ewwwAttr(e,t,a){null!=a&&!1!==a&&e.setAttribute(t,a)}function ewwwJSONParserInit(){"undefined"!=typeof galleries&&check_webp_feature("alpha",ewwwNggParseGalleries),check_webp_feature("alpha",ewwwWooParseVariations)}function ewwwWooParseVariations(e){if(e)for(var t=document.querySelectorAll("form.variations_form"),a=0,r=t.length;a<r;a++){var i=t[a].getAttribute("data-product_variations"),n=!1;try{for(var l in i=JSON.parse(i))void 0!==i[l]&&void 0!==i[l].image&&(void 0!==i[l].image.src_webp&&(i[l].image.src=i[l].image.src_webp,n=!0),void 0!==i[l].image.srcset_webp&&(i[l].image.srcset=i[l].image.srcset_webp,n=!0),void 0!==i[l].image.full_src_webp&&(i[l].image.full_src=i[l].image.full_src_webp,n=!0),void 0!==i[l].image.gallery_thumbnail_src_webp&&(i[l].image.gallery_thumbnail_src=i[l].image.gallery_thumbnail_src_webp,n=!0),void 0!==i[l].image.thumb_src_webp&&(i[l].image.thumb_src=i[l].image.thumb_src_webp,n=!0));n&&ewwwAttr(t[a],"data-product_variations",JSON.stringify(i))}catch(e){}}}function ewwwNggParseGalleries(e){if(e)for(var t in galleries){var a=galleries[t];galleries[t].images_list=ewwwNggParseImageList(a.images_list)}}function ewwwNggLoadGalleries(e){e&&document.addEventListener("ngg.galleria.themeadded",function(e,t){window.ngg_galleria._create_backup=window.ngg_galleria.create,window.ngg_galleria.create=function(e,t){var a=$(e).data("id");return galleries["gallery_"+a].images_list=ewwwNggParseImageList(galleries["gallery_"+a].images_list),window.ngg_galleria._create_backup(e,t)}})}function ewwwNggParseImageList(e){for(var t in e){var a=e[t];if(void 0!==a["image-webp"]&&(e[t].image=a["image-webp"],delete e[t]["image-webp"]),void 0!==a["thumb-webp"]&&(e[t].thumb=a["thumb-webp"],delete e[t]["thumb-webp"]),void 0!==a.full_image_webp&&(e[t].full_image=a.full_image_webp,delete e[t].full_image_webp),void 0!==a.srcsets)for(var r in a.srcsets)nggSrcset=a.srcsets[r],void 0!==a.srcsets[r+"-webp"]&&(e[t].srcsets[r]=a.srcsets[r+"-webp"],delete e[t].srcsets[r+"-webp"]);if(void 0!==a.full_srcsets)for(var i in a.full_srcsets)nggFSrcset=a.full_srcsets[i],void 0!==a.full_srcsets[i+"-webp"]&&(e[t].full_srcsets[i]=a.full_srcsets[i+"-webp"],delete e[t].full_srcsets[i+"-webp"])}return e}check_webp_feature("alpha",ewwwWebPInit);
includes/ls.unveilhooks.js CHANGED
@@ -60,6 +60,9 @@
60
  } else if (window.lazySizes.hC(e.target,'elementor-bg')){
61
  console.log('found elementor-bg with data-bg');
62
  bg = constrainSrc(bg,targetWidth,targetHeight,'bg-cover');
 
 
 
63
  } else if (window.lazySizes.hC(e.target,'bg-image-crop')){
64
  console.log('found bg-image-crop with data-bg');
65
  bg = constrainSrc(bg,targetWidth,targetHeight,'bg-cover');
60
  } else if (window.lazySizes.hC(e.target,'elementor-bg')){
61
  console.log('found elementor-bg with data-bg');
62
  bg = constrainSrc(bg,targetWidth,targetHeight,'bg-cover');
63
+ } else if (window.lazySizes.hC(e.target,'et_parallax_bg')){
64
+ console.log('found et_parallax_bg with data-bg');
65
+ bg = constrainSrc(bg,targetWidth,targetHeight,'bg-cover');
66
  } else if (window.lazySizes.hC(e.target,'bg-image-crop')){
67
  console.log('found bg-image-crop with data-bg');
68
  bg = constrainSrc(bg,targetWidth,targetHeight,'bg-cover');
includes/resize-detection.min.js CHANGED
@@ -1 +1 @@
1
- function checkImageSizes(){var e=document.getElementsByTagName("img");for(i=0;i<e.length;i++)e[i].classList.remove("scaled-image"),checkImageScale(e[i]);return!1}function checkImageScale(e){if(e.src&&!("string"==typeof e.src&&-1<e.src.search(/\.svg/))&&!("string"==typeof e.src&&-1<e.src.search(/data:image/))&&e.naturalWidth&&25<e.naturalWidth&&25<e.naturalHeight&&25<e.clientWidth&&25<e.clientHeight){var t=window.devicePixelRatio||1,a=1.5*e.clientWidth*t<e.naturalWidth,i=1.5*e.clientHeight*t<e.naturalHeight;(a||i)&&(e.classList.add("scaled-image"),e.title="Forced to wrong size: "+e.clientWidth+"x"+e.clientHeight+", natural is "+e.naturalWidth+"x"+e.naturalHeight+"!")}}function clearScaledImages(){for(var e=document.querySelectorAll("img.scaled-image"),t=0,a=e.length;t<a;t++)e[t].classList.remove("scaled-image")}window.onload=function(){checkImageSizes();var e=document.getElementById("wp-admin-bar-resize-detection");e&&(e.onclick=function(){e.classList.toggle("ewww-fade"),clearScaledImages(),checkImageSizes(),setTimeout(function(){e.classList.toggle("ewww-fade")},500)})},document.addEventListener("lazyloaded",function(e){e.target.classList.remove("scaled-image"),0===e.target.title.search("Forced to wrong size")&&(e.target.title=""),checkImageScale(e.target)});
1
+ function checkImageSizes(){var e=document.getElementsByTagName("img");for(i=0;i<e.length;i++)e[i].classList.remove("scaled-image"),checkImageScale(e[i]);return!1}function checkImageScale(e){var t,a;e.src&&("string"==typeof e.src&&-1<e.src.search(/\.svg/)||"string"==typeof e.src&&-1<e.src.search(/data:image/)||e.naturalWidth&&25<e.naturalWidth&&25<e.naturalHeight&&25<e.clientWidth&&25<e.clientHeight&&(a=window.devicePixelRatio||1,t=1.5*e.clientWidth*a<e.naturalWidth,a=1.5*e.clientHeight*a<e.naturalHeight,(t||a)&&(e.classList.add("scaled-image"),e.title="Forced to wrong size: "+e.clientWidth+"x"+e.clientHeight+", natural is "+e.naturalWidth+"x"+e.naturalHeight+"!")))}function clearScaledImages(){for(var e=document.querySelectorAll("img.scaled-image"),t=0,a=e.length;t<a;t++)e[t].classList.remove("scaled-image")}window.onload=function(){checkImageSizes();var e=document.getElementById("wp-admin-bar-resize-detection");e&&(e.onclick=function(){e.classList.toggle("ewww-fade"),clearScaledImages(),checkImageSizes(),setTimeout(function(){e.classList.toggle("ewww-fade")},500)})},document.addEventListener("lazyloaded",function(e){e.target.classList.remove("scaled-image"),0===e.target.title.search("Forced to wrong size")&&(e.target.title=""),checkImageScale(e.target)});
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: optimize, image, convert, webp, resize, compress, lazy load, optimization,
5
  Requires at least: 5.6
6
  Tested up to: 5.9
7
  Requires PHP: 7.2
8
- Stable tag: 6.4.0
9
  License: GPLv3
10
 
11
  Smaller Images, Faster Sites, Happier Visitors. Comprehensive image optimization that doesn't require a degree in rocket science.
@@ -137,6 +137,13 @@ That's not a question, but since I made it up, I'll answer it. See this resource
137
  * Feature requests can be viewed and submitted on our [feedback portal](https://feedback.ewww.io/b/features)
138
  * If you would like to help translate this plugin in your language, [join the team](https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/)
139
 
 
 
 
 
 
 
 
140
  = 6.4.0 =
141
  * added: free API-based WebP generation for servers that cannot generate WebP images locally
142
  * added: detection for Jetpack Boost lazy load function
5
  Requires at least: 5.6
6
  Tested up to: 5.9
7
  Requires PHP: 7.2
8
+ Stable tag: 6.4.1
9
  License: GPLv3
10
 
11
  Smaller Images, Faster Sites, Happier Visitors. Comprehensive image optimization that doesn't require a degree in rocket science.
137
  * Feature requests can be viewed and submitted on our [feedback portal](https://feedback.ewww.io/b/features)
138
  * If you would like to help translate this plugin in your language, [join the team](https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/)
139
 
140
+ = 6.4.1 =
141
+ * added: use decoding=async to prevent images from blocking text render
142
+ * fixed: database upgrade fails on MySQL 8.0.x
143
+ * fixed: Auto-scale incorrectly handles Divi parallax background images
144
+ * fixed: native lazy loading used on inline PNG placeholders
145
+ * fixed: WebP rewriters not recognizing WP Offload Media Path (object prefix) setting
146
+
147
  = 6.4.0 =
148
  * added: free API-based WebP generation for servers that cannot generate WebP images locally
149
  * added: detection for Jetpack Boost lazy load function
tests/test-optimize.php CHANGED
@@ -325,7 +325,7 @@ class EWWWIO_Optimize_Tests extends WP_UnitTestCase {
325
  update_site_option( 'ewww_image_optimizer_webp', '' );
326
  $this->assertEquals( 188043, filesize( $results[0] ) );
327
  unlink( $results[0] );
328
- $this->assertEquals( 137108, filesize( $results[0] . '.webp' ) );
329
  if ( ewwwio_is_file( $results[0] . '.webp' ) ) {
330
  unlink( $results[0] . '.webp' );
331
  }
@@ -414,7 +414,7 @@ class EWWWIO_Optimize_Tests extends WP_UnitTestCase {
414
  $results = $this->optimize_png();
415
  update_option( 'ewww_image_optimizer_cloud_key', '' );
416
  update_site_option( 'ewww_image_optimizer_cloud_key', '' );
417
- $this->assertLessThanOrEqual( 39000, filesize( $results[0] ) );
418
  unlink( $results[0] );
419
  }
420
 
325
  update_site_option( 'ewww_image_optimizer_webp', '' );
326
  $this->assertEquals( 188043, filesize( $results[0] ) );
327
  unlink( $results[0] );
328
+ $this->assertLessThanOrEqual( 138000, filesize( $results[0] . '.webp' ) );
329
  if ( ewwwio_is_file( $results[0] . '.webp' ) ) {
330
  unlink( $results[0] . '.webp' );
331
  }
414
  $results = $this->optimize_png();
415
  update_option( 'ewww_image_optimizer_cloud_key', '' );
416
  update_site_option( 'ewww_image_optimizer_cloud_key', '' );
417
+ $this->assertLessThanOrEqual( 39100, filesize( $results[0] ) );
418
  unlink( $results[0] );
419
  }
420
 
unique.php CHANGED
@@ -3000,7 +3000,8 @@ function ewww_image_optimizer( $file, $gallery_type = 4, $converted = false, $ne
3000
  function ewww_image_optimizer_webp_create( $file, $orig_size, $type, $tool, $recreate = false ) {
3001
  ewwwio_debug_message( '<b>' . __FUNCTION__ . '()</b>' );
3002
  global $ewww_force;
3003
- $webpfile = $file . '.webp';
 
3004
  if ( apply_filters( 'ewww_image_optimizer_bypass_webp', false, $file ) ) {
3005
  ewwwio_debug_message( "webp generation bypassed: $file" );
3006
  return '';
@@ -3126,7 +3127,7 @@ function ewww_image_optimizer_install_pngout() {
3126
  $tool_path = trailingslashit( EWWW_IMAGE_OPTIMIZER_TOOL_PATH );
3127
  if ( empty( $pngout_error ) ) {
3128
  if ( PHP_OS === 'Linux' || PHP_OS === 'FreeBSD' ) {
3129
- $download_result = download_url( 'http://static.jonof.id.au/dl/kenutils/pngout-' . $latest . '-' . $os_string . '-static.tar.gz' );
3130
  if ( is_wp_error( $download_result ) ) {
3131
  $pngout_error = $download_result->get_error_message();
3132
  } else {
@@ -3176,7 +3177,7 @@ function ewww_image_optimizer_install_pngout() {
3176
  $latest = '20200115';
3177
  $os_ext = 'tar.gz';
3178
  $os_ext = 'zip';
3179
- $download_result = download_url( 'http://static.jonof.id.au/dl/kenutils/pngout-' . $latest . '-macos.' . $os_ext );
3180
  if ( is_wp_error( $download_result ) ) {
3181
  $pngout_error = $download_result->get_error_message();
3182
  } else {
3000
  function ewww_image_optimizer_webp_create( $file, $orig_size, $type, $tool, $recreate = false ) {
3001
  ewwwio_debug_message( '<b>' . __FUNCTION__ . '()</b>' );
3002
  global $ewww_force;
3003
+ $orig_size = ewww_image_optimizer_filesize( $file );
3004
+ $webpfile = $file . '.webp';
3005
  if ( apply_filters( 'ewww_image_optimizer_bypass_webp', false, $file ) ) {
3006
  ewwwio_debug_message( "webp generation bypassed: $file" );
3007
  return '';
3127
  $tool_path = trailingslashit( EWWW_IMAGE_OPTIMIZER_TOOL_PATH );
3128
  if ( empty( $pngout_error ) ) {
3129
  if ( PHP_OS === 'Linux' || PHP_OS === 'FreeBSD' ) {
3130
+ $download_result = download_url( 'http://www.jonof.id.au/files/kenutils/pngout-' . $latest . '-' . $os_string . '-static.tar.gz' );
3131
  if ( is_wp_error( $download_result ) ) {
3132
  $pngout_error = $download_result->get_error_message();
3133
  } else {
3177
  $latest = '20200115';
3178
  $os_ext = 'tar.gz';
3179
  $os_ext = 'zip';
3180
+ $download_result = download_url( 'http://www.jonof.id.au/files/kenutils/pngout-' . $latest . '-macos.' . $os_ext );
3181
  if ( is_wp_error( $download_result ) ) {
3182
  $pngout_error = $download_result->get_error_message();
3183
  } else {