WordPress Infinite Scroll – Ajax Load More - Version 3.1.2

Version Description

  • July 11, 2017 =

  • FIX - Bug fix for JavaScript issues introduced for IE11 & Edge browsers in ALM 3.1.1 - I reverted the problematic new functions and everything is working as expected.

Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 WordPress Infinite Scroll – Ajax Load More
Version 3.1.2
Comparing to
See all releases

Code changes from version 3.1.1 to 3.1.2

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, ajax load posts, woocommerce, ajax load more
5
  Requires at least: 3.6
6
  Tested up to: 4.8
7
- Stable tag: 3.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,11 +12,11 @@ The ultimate infinite scroll and lazy load solution for your WordPress powered w
12
 
13
  == Description ==
14
 
15
- Ajax Load More is a powerful solution for infinite scrolling and lazy loading WordPress posts, custom post types, single posts, pages and comments with Ajax powered queries.
16
 
17
- Build complex custom WordPress queries using the Ajax Load More shortcode builder then add the generated shortcode to your page via the content editor or directly into your template files.
18
 
19
- Ajax Load More is fully compatible for endless scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
  [→ Get More Information](https://connekthq.com/plugins/ajax-load-more/)
22
 
@@ -24,13 +24,13 @@ Ajax Load More is fully compatible for endless scrolling with popular eCommerce
24
 
25
 
26
  ### Features
27
- * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder (see Shortcode Parameters).
28
  * **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Date, Category, Tags, Custom Taxonomies, Search Term, Authors and more!
29
  * **Repeater Templates** - Edit and extend the functionality of Ajax Load More by creating your own repeater template to match the look and feel of your website (see screenshots).
30
- * **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings.
31
  * **Multiple Instances** - You can include multiple instances of Ajax Load More on a single page, post or template.
32
  * **Ajax Filtering** - The Ajax Load More [custom filtering](https://connekthq.com/plugins/ajax-load-more/examples/filtering/) method will allow you to filter and update your Ajax query results.
33
  * **Multisite Compatibility** - Manage repeater templates across all sites in your network.
 
34
 
35
  Check out the **[demo site](https://connekthq.com/plugins/ajax-load-more/)** for more information!
36
 
@@ -53,12 +53,12 @@ Check out the examples below:
53
  * [Standard Posts](https://connekthq.com/plugins/ajax-load-more/examples/default/)
54
  * [Custom Post Types](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)
55
  * [Pages](https://connekthq.com/plugins/ajax-load-more/examples/search-results/)
56
- * [Multipage Posts & Pages](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/next-page-default/) **
57
- * [Single Posts](https://connekthq.com/ajax-load-more-posts/alm-post-example/) **
58
- * [Comments](http://examples.connekthq.com/alm-comments/example-post/) **
59
  * [Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields/)
60
 
61
- ** Add-on required
62
 
63
 
64
 
@@ -354,6 +354,11 @@ How to install Ajax Load More.
354
 
355
  == Changelog ==
356
 
 
 
 
 
 
357
  = 3.1.1 - July 10, 2017 =
358
 
359
  * UPGRADE NOTICE - Version 3.1.1 drops support for IE8.
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, ajax load posts, woocommerce, ajax load more
5
  Requires at least: 3.6
6
  Tested up to: 4.8
7
+ Stable tag: 3.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ Ajax Load More is the ultimate WordPress infinite scroll plugin for lazy loading posts, single posts, pages, comments and more with Ajax powered queries.
16
 
17
+ Build complex custom WordPress queries with the Ajax Load More shortcode builder then add the generated shortcode to your page via the content editor or directly into your template files.
18
 
19
+ Ajax Load More is compatible for endless scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
  [→ Get More Information](https://connekthq.com/plugins/ajax-load-more/)
22
 
24
 
25
 
26
  ### Features
27
+ * **Shortcode Builder** - Create your own custom Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder (see Shortcode Parameters).
28
  * **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Date, Category, Tags, Custom Taxonomies, Search Term, Authors and more!
29
  * **Repeater Templates** - Edit and extend the functionality of Ajax Load More by creating your own repeater template to match the look and feel of your website (see screenshots).
 
30
  * **Multiple Instances** - You can include multiple instances of Ajax Load More on a single page, post or template.
31
  * **Ajax Filtering** - The Ajax Load More [custom filtering](https://connekthq.com/plugins/ajax-load-more/examples/filtering/) method will allow you to filter and update your Ajax query results.
32
  * **Multisite Compatibility** - Manage repeater templates across all sites in your network.
33
+ * **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings.
34
 
35
  Check out the **[demo site](https://connekthq.com/plugins/ajax-load-more/)** for more information!
36
 
53
  * [Standard Posts](https://connekthq.com/plugins/ajax-load-more/examples/default/)
54
  * [Custom Post Types](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)
55
  * [Pages](https://connekthq.com/plugins/ajax-load-more/examples/search-results/)
56
+ * [Multipage Posts & Pages](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/next-page-default/) *
57
+ * [Single Posts](https://connekthq.com/ajax-load-more-posts/alm-post-example/) *
58
+ * [Comments](http://examples.connekthq.com/alm-comments/example-post/) *
59
  * [Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields/)
60
 
61
+ * _Add-on required_
62
 
63
 
64
 
354
 
355
  == Changelog ==
356
 
357
+ = 3.1.2 - July 11, 2017 =
358
+
359
+ * FIX - Bug fix for JavaScript issues introduced for IE11 & Edge browsers in ALM 3.1.1 - I reverted the problematic new functions and everything is working as expected.
360
+
361
+
362
  = 3.1.1 - July 10, 2017 =
363
 
364
  * UPGRADE NOTICE - Version 3.1.1 drops support for IE8.
ajax-load-more.php CHANGED
@@ -7,15 +7,15 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: https://connekthq.com
10
- Version: 3.1.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
 
17
- define('ALM_VERSION', '3.1.1');
18
- define('ALM_RELEASE', 'July 10, 2017');
19
  define('ALM_STORE_URL', 'https://connekthq.com');
20
 
21
 
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: https://connekthq.com
10
+ Version: 3.1.2
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
 
17
+ define('ALM_VERSION', '3.1.2');
18
+ define('ALM_RELEASE', 'July 11, 2017');
19
  define('ALM_STORE_URL', 'https://connekthq.com');
20
 
21
 
core/dist/js/ajax-load-more.js CHANGED
@@ -1639,9 +1639,11 @@ var almMasonry = function almMasonry(container, items, selector, init, filtering
1639
  * Initiate instances of Ajax load More via filters or external functions
1640
  * @since 2.1.2
1641
  */
 
1642
  $.fn.ajaxloadmore = function () {
1643
- $(this).data('alm', new $.ajaxloadmore($(this), 0));
1644
  };
 
1645
 
1646
  /*
1647
  * Initiate Ajax load More instances
@@ -1650,12 +1652,33 @@ var almMasonry = function almMasonry(container, items, selector, init, filtering
1650
  * @since 2.1.2
1651
  */
1652
 
1653
- var alm = document.querySelectorAll('.ajax-load-more-wrap');
1654
- if (alm) {
 
1655
  // Loop each alm element
1656
- alm.forEach(function (alm, e) {
1657
- $(alm).data('alm', new $.ajaxloadmore($(alm), e));
 
 
 
 
 
 
 
 
 
 
 
 
1658
  });
 
 
 
 
 
 
 
 
1659
  }
1660
  })(jQuery);
1661
  'use strict';
1639
  * Initiate instances of Ajax load More via filters or external functions
1640
  * @since 2.1.2
1641
  */
1642
+ /*
1643
  $.fn.ajaxloadmore = function () {
1644
+ //$(this).data('alm', new $.ajaxloadmore($(this), 0));
1645
  };
1646
+ */
1647
 
1648
  /*
1649
  * Initiate Ajax load More instances
1652
  * @since 2.1.2
1653
  */
1654
 
1655
+ /*
1656
+ let alm = [...document.querySelectorAll('.ajax-load-more-wrap')];
1657
+ if(alm){
1658
  // Loop each alm element
1659
+ alm.forEach((alm, e) => {
1660
+ $(alm).data('alm', new $.ajaxloadmore($(alm), e));
1661
+ });
1662
+ }
1663
+ */
1664
+
1665
+ /* $.fn.ajaxloadmore()
1666
+ *
1667
+ * Initiate all instances of Ajax load More
1668
+ * @since 2.1.2
1669
+ */
1670
+ $.fn.ajaxloadmore = function () {
1671
+ return this.each(function (e) {
1672
+ $(this).data('alm', new $.ajaxloadmore($(this), e));
1673
  });
1674
+ };
1675
+
1676
+ /*
1677
+ * Initiate Ajax load More if div is present on screen
1678
+ * @since 2.1.2
1679
+ */
1680
+ if ($(".ajax-load-more-wrap").length) {
1681
+ $(".ajax-load-more-wrap").ajaxloadmore();
1682
  }
1683
  })(jQuery);
1684
  'use strict';
core/dist/js/ajax-load-more.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";var almMasonryInit=!0,almMasonry=function t(a,e,o,n,r){r?(a.masonry("destroy"),almMasonryInit=!0,a.append(e),t(a,e,o,!0,!1)):almMasonryInit&&n?(almMasonryInit=!1,a.imagesLoaded(function(){e.fadeIn(250),a.masonry({itemSelector:o}),a.masonry("reloadItems")})):(a.append(e),a.imagesLoaded(function(){e.show(),a.masonry("appended",e)}))};!function(t){var a=!1;t.ajaxloadmore=function(e,o){"true"===alm_localize.scrolltop&&t(window).scrollTop(0);var n=this;n.AjaxLoadMore={},n.window=t(window),n.page=0,n.posts=0,n.totalposts=0,n.proceed=!1,n.disable_ajax=!1,n.init=!0,n.loading=!0,n.finished=!1,n.button_label="",n.el=e,n.container=e,n.container.addClass("alm-"+o).attr("data-alm-id",o),n.content=t(".alm-ajax",n.container),n.content_preloaded=t(".alm-listing.alm-preloaded",n.container),n.canonical_url=n.el.attr("data-canonical-url"),n.is_search=n.el.attr("data-search"),n.slug=n.el.attr("data-slug"),n.post_id=n.el.attr("data-post-id"),n.prefix="alm-",n.cache=n.content.attr("data-cache"),n.cache_id=n.content.attr("data-cache-id"),n.cache_path=n.content.attr("data-cache-path"),n.cache_logged_in=n.content.attr("data-cache-logged-in"),n.repeater=n.content.attr("data-repeater"),n.theme_repeater=n.content.attr("data-theme-repeater"),n.scroll_distance=parseInt(n.content.attr("data-scroll-distance")),n.max_pages=parseInt(n.content.attr("data-max-pages")),n.pause_override=n.content.attr("data-pause-override"),n.pause=n.content.attr("data-pause"),n.transition=n.content.attr("data-transition"),n.transition_container=n.content.attr("data-transition-container"),n.speed=n.content.attr("data-transition-speed"),n.images_loaded=n.content.attr("data-images-loaded"),n.destroy_after=n.content.attr("data-destroy-after"),n.lang=n.content.attr("data-lang"),n.orginal_posts_per_page=n.content.attr("data-posts-per-page"),n.posts_per_page=n.content.attr("data-posts-per-page"),n.cta_array="",n.cta=n.content.attr("data-cta"),n.cta_position=n.content.attr("data-cta-position"),n.cta_repeater=n.content.attr("data-cta-repeater"),n.cta_theme_repeater=n.content.attr("data-cta-theme-repeater"),n.acf_array="",n.acf=n.content.attr("data-acf"),n.acf_field_type=n.content.attr("data-acf-field-type"),n.acf_field_name=n.content.attr("data-acf-field-name"),n.acf_post_id=n.content.attr("data-acf-post-id"),n.nextpage_array="",n.nextpage=n.content.attr("data-nextpage"),n.nextpage_urls=n.content.attr("data-nextpage-urls"),n.nextpage_scroll=n.content.attr("data-nextpage-scroll"),n.nextpage_pageviews=n.content.attr("data-nextpage-pageviews"),n.nextpage_post_id=n.content.attr("data-nextpage-post-id"),n.nextpage_startpage=n.content.attr("data-nextpage-startpage"),n.previous_post=n.content.attr("data-previous-post"),n.previous_post_id=n.content.attr("data-previous-post-id"),n.previous_post_taxonomy=n.content.attr("data-previous-post-taxonomy"),n.comments=n.content.attr("data-comments"),"true"===n.comments&&(n.content=t(".alm-comments",n.container)),n.comments_array="",n.comments_post_id=n.content.attr("data-comments_post_id"),n.comments_per_page=n.content.attr("data-comments_per_page"),n.comments_type=n.content.attr("data-comments_type"),n.comments_style=n.content.attr("data-comments_style"),n.comments_template=n.content.attr("data-comments_template"),n.comments_callback=n.content.attr("data-comments_callback"),n.restapi=n.content.attr("data-restapi"),n.restapi_base_url=n.content.attr("data-restapi-base-url"),n.restapi_namespace=n.content.attr("data-restapi-namespace"),n.restapi_endpoint=n.content.attr("data-restapi-endpoint"),n.restapi_template_id=n.content.attr("data-restapi-template-id"),n.restapi_debug=n.content.attr("data-restapi-debug"),n.seo=n.content.attr("data-seo"),n.preloaded=n.content.attr("data-preloaded"),n.preloaded_amount=n.content.attr("data-preloaded-amount"),n.paging=n.content.attr("data-paging"),n.paging_controls=n.content.attr("data-paging-controls"),n.paging_show_at_most=n.content.attr("data-paging-show-at-most"),n.paging_classes=n.content.attr("data-paging-classes"),n.paging_init=!0,"true"===n.restapi?(n.restapi=!0,void 0===n.restapi_debug&&(n.restapi_debug=!1),""===n.restapi_template_id&&(n.restapi=!1)):n.restapi=!1,"true"===n.paging?(n.paging=!0,void 0===n.paging_show_at_most&&(n.paging_show_at_most=7),"true"===n.preloaded&&(n.pause=!0)):n.paging=!1,"true"===n.paging_controls?n.paging_controls=!0:n.paging_controls=!1,void 0===n.cache&&(n.cache=!1),void 0===n.cache_logged_in&&(n.cache_logged_in=!1),void 0===n.comments_per_page&&(n.comments_per_page="5"),"true"===n.preloaded?(n.preload_wrap=n.content.prev(".alm-preloaded"),n.preloaded_total_posts=parseInt(n.preload_wrap.attr("data-total-posts")),void 0===n.preloaded_amount&&(n.preloaded_amount=!1),n.preloaded_total_posts<=n.preloaded_amount&&(n.disable_ajax=!0)):n.preloaded="false",void 0===n.seo&&(n.seo=!1),"true"===n.seo&&(n.seo=!0),void 0===n.is_search&&(n.is_search=!1),n.search_value="true"===n.is_search?n.slug:"",n.permalink=n.content.attr("data-seo-permalink"),n.pageview=n.content.attr("data-seo-pageview"),n.start_page=n.content.attr("data-seo-start-page"),n.start_page?(n.seo_scroll=n.content.attr("data-seo-scroll"),n.seo_scroll_speed=n.content.attr("data-seo-scroll-speed"),n.seo_scrolltop=n.content.attr("data-seo-scrolltop"),n.isPaged=!1,n.start_page>1&&(n.isPaged=!0,n.posts_per_page=n.start_page*n.posts_per_page),n.paging&&(n.posts_per_page=n.orginal_posts_per_page)):n.start_page=1,"true"===n.nextpage?(n.nextpage=!0,n.posts_per_page=1):n.nextpage=!1,void 0===n.nextpage_urls&&(n.nextpage="true"),void 0===n.nextpage_scroll&&(n.nextpage_scroll="250:30"),void 0===n.nextpage_pageviews&&(n.nextpage_pageviews="true"),void 0===n.nextpage_post_id&&(n.nextpage=!1,n.nextpage_post_id=null),void 0===n.nextpage_startpage&&(n.nextpage_startpage=1),n.nextpage_startpage>1&&(n.isPaged=!0),"true"===n.acf?n.acf=!0:n.acf=!1,void 0!==n.acf_field_type&&void 0!==n.acf_field_name&&void 0!==n.acf_post_id||(n.acf=!1),"true"===n.previous_post?(n.previous_post=!0,n.previous_post_permalink="",n.previous_post_title="",n.previous_post_slug=""):n.previous_post=!1,void 0===n.previous_post_id&&(n.previous_post_id=""),void 0===n.previous_post_taxonomy&&(n.previous_post_taxonomy=""),n.previous_post_title_template=n.content.attr("data-previous-post-title-template"),n.siteTitle=n.content.attr("data-previous-post-site-title"),n.siteTagline=n.content.attr("data-previous-post-site-tagline"),n.previous_post_pageview=n.content.attr("data-previous-post-pageview"),n.previous_post_scroll=n.content.attr("data-previous-post-scroll"),n.previous_post_scroll_speed=n.content.attr("data-previous-post-scroll-speed"),n.previous_post_scroll_top=n.content.attr("data-previous-post-scrolltop"),void 0===n.content.attr("data-offset")?n.offset=0:n.offset=n.content.attr("data-offset"),(void 0===n.pause||n.seo&&n.start_page>1)&&(n.pause=!1),"true"===n.preloaded&&n.seo&&n.start_page>0&&(n.pause=!1),"true"===n.preloaded&&n.paging&&(n.pause=!0),void 0===n.repeater&&(n.repeater="default"),void 0===n.theme_repeater&&(n.theme_repeater="null"),void 0===n.max_pages&&(n.max_pages=0),0===n.max_pages&&(n.max_pages=1e4),void 0===n.scroll_distance&&(n.scroll_distance=150),void 0===n.transition&&(n.transition="slide"),n.is_masonry_preloaded=!1,"masonry"===n.transition&&(n.masonry_selector=n.content.attr("data-masonry-selector"),n.masonry_wrap=n.content,n.transition_container=!1,document.body.contains(n.content_preloaded.get(0))&&(n.masonry_wrap=n.content_preloaded,n.is_masonry_preloaded=!0)),void 0===n.speed?n.speed=250:n.speed=parseInt(n.speed),void 0===n.transition_container||"true"===n.transition_container?n.transition_container=!0:n.transition_container=!1,void 0===n.images_loaded&&(n.images_loaded="false"),n.destroy_after,void 0===n.content.attr("data-button-label")?n.button_label="Older Posts":n.button_label=n.content.attr("data-button-label"),n.button_loading_label=n.content.attr("data-button-loading-label"),void 0===n.button_loading_label&&(n.button_loading_label=!1),void 0===n.content.attr("data-button-class")?n.button_class="":n.button_class=" "+n.content.attr("data-button-class"),void 0===n.content.attr("data-scroll")?n.scroll=!0:"false"===n.content.attr("data-scroll")?n.scroll=!1:n.scroll=!0,n.post_type=n.content.attr("data-post-type"),n.post_type=n.post_type.split(","),n.sticky_posts=n.content.attr("data-sticky-posts"),n.container.append('<div class="'+n.prefix+'btn-wrap"/>'),n.btnWrap=t("."+n.prefix+"btn-wrap",n.container),n.paging?n.content.parent().addClass("loading"):(t("."+n.prefix+"btn-wrap",n.container).append('<button id="load-more" class="'+n.prefix+"load-more-btn more"+n.button_class+'">'+n.button_label+"</button>"),n.button=t(".alm-load-more-btn",n.container)),n.AjaxLoadMore.loadPosts=function(){if(!n.disable_ajax)if(n.paging||(n.button.addClass("loading"),!1!==n.button_loading_label&&n.button.text(n.button_loading_label)),n.container.addClass("alm-loading"),n.loading=!0,"true"!==n.cache||n.cache_logged_in)n.AjaxLoadMore.ajax("standard");else{var a;if(n.init&&n.seo&&n.isPaged){a=n.cache_path+n.cache_id+"/page-1-"+n.start_page+".html"}else if(n.nextpage){var e;n.paging?e=parseInt(n.page)+1:(e=parseInt(n.page)+2,n.isPaged&&(e=parseInt(n.page)+parseInt(n.nextpage_startpage)+1)),a=n.cache_path+n.cache_id+"/page-"+e+".html"}else a=n.previous_post?n.cache_path+n.cache_id+"/"+n.previous_post_slug+".html":n.cache_path+n.cache_id+"/page-"+(n.page+1)+".html";t.get(a,function(t){n.AjaxLoadMore.success(t,!0)}).fail(function(){n.AjaxLoadMore.ajax("standard")})}},n.AjaxLoadMore.ajax=function(a){var o="alm_query_posts";if(n.acf&&("relationship"!==n.acf_field_type&&(o="alm_acf_query"),n.acf_array={acf:"true",post_id:n.acf_post_id,field_type:n.acf_field_type,field_name:n.acf_field_name}),n.nextpage&&(o="alm_nextpage_query",n.nextpage_array={nextpage:"true",urls:n.nextpage_urls,scroll:n.nextpage_scroll,pageviews:n.nextpage_pageviews,post_id:n.nextpage_post_id,startpage:n.nextpage_startpage}),n.previous_post&&(n.previous_post_array={previous_post:"true",id:n.previous_post_id,slug:n.previous_post_slug}),"true"===n.comments&&(o="alm_comments_query",n.posts_per_page=n.comments_per_page,n.comments_array={comments:"true",post_id:n.comments_post_id,per_page:n.comments_per_page,type:n.comments_type,style:n.comments_style,template:n.comments_template,callback:n.comments_callback}),"true"===n.cta&&(n.cta_array={cta:"true",cta_position:n.cta_position,cta_repeater:n.cta_repeater,cta_theme_repeater:n.cta_theme_repeater}),n.restapi){var r=wp.template(n.restapi_template_id),s=n.restapi_base_url+"/"+n.restapi_namespace+"/"+n.restapi_endpoint,i={posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,slug:n.slug,canonical_url:n.canonical_url,post_type:n.post_type,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),lang:n.lang,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,id:e.attr("data-id")};t.ajax({type:"GET",url:s,data:i,dataType:"JSON",beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(a){var e,o=a.html,s=a.meta,i=s.postcount,p=s.totalposts;t.each(o,function(t){var a=o[t];"true"===n.restapi_debug&&console.log(a),e+=r(a)});var d={html:e,meta:{postcount:i,totalposts:p}};n.AjaxLoadMore.success(d,!1)}})}else t.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:o,query_type:a,nonce:alm_localize.alm_nonce,cache_id:n.cache_id,repeater:n.repeater,theme_repeater:n.theme_repeater,acf:n.acf_array,nextpage:n.nextpage_array,cta:n.cta_array,comments:n.comments_array,post_type:n.post_type,sticky_posts:n.sticky_posts,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),exclude:n.content.attr("data-exclude"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,paging:n.paging,previous_post:n.previous_post_array,lang:n.lang,slug:n.slug,canonical_url:n.canonical_url,id:e.attr("data-id")},beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(e){"standard"===a?n.AjaxLoadMore.success(e,!1):"totalpages"===a&&n.paging&&n.nextpage?t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n):"totalposts"===a&&n.paging&&t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n)},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e)}})},n.paging&&(n.nextpage?n.AjaxLoadMore.ajax("totalpages"):n.AjaxLoadMore.ajax("totalposts")),n.AjaxLoadMore.success=function(e,o){n.previous_post&&n.AjaxLoadMore.getPreviousPost();var r,s,i;if(o?r=e:(r=e.html,s=e.meta,n.posts=n.posts+s.postcount,i=s.postcount,n.totalposts=s.totalposts,"true"===n.preloaded&&(n.totalposts=n.totalposts-n.preloaded_amount)),n.data=t(r),o&&(i=n.data.length),n.init&&(n.paging?i>0&&(n.el=t('<div class="alm-reveal"/>'),n.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>'),t(".alm-paging-content",n.el).append(n.data).hide(),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText(),t(".alm-paging-content",n.el).fadeIn(n.speed,"alm_easeInOutQuad",function(){var a=parseInt(n.content.css("padding-top")),e=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+a+e+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)})):n.button.text(n.button_label),0===i&&t.isFunction(t.fn.almEmpty)&&t.fn.almEmpty(n),n.isPaged&&(n.posts_per_page=n.content.attr("data-posts-per-page"),n.page=n.start_page-1)),i>0){if(n.paging)n.init?(n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):t(".alm-paging-content",n.el).html("").append(n.data).almWaitForImages().done(function(){t(".alm-paging-loading",n.el).fadeOut(n.speed),t.isFunction(t.fn.almOnPagingComplete)&&t.fn.almOnPagingComplete(n),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)});else{if(n.previous_post)n.el=t('<div class="alm-reveal alm-previous-post post-'+n.previous_post_id+'" data-id="'+n.previous_post_id+'" data-title="'+n.previous_post_title+'" data-url="'+n.previous_post_permalink+'" data-page="'+n.page+'"/>'),n.el.append(n.data).hide();else if(n.transition_container){var p;if(n.init&&n.start_page>1){var d=[],l=parseInt(n.posts_per_page);"true"===n.cta&&(l+=1);Math.ceil(i/l);for(var c=0;c<i;c+=l)d.push(n.data.slice(c,l+c));n.el=n.content;for(var g=0;g<d.length;g++){var _,m="true"===n.preloaded?1:0;g>0||"true"===n.preloaded?(p=g+1+m,_=t("default"===n.permalink?'<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+"&paged="+p+'" data-page="'+p+'" />':'<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+"page/"+p+"/"+n.search_value+'" data-page="'+p+'" />')):_=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'),_.append(d[g]),_=t(_),n.el.append(_).hide()}}else{if(n.seo&&n.page>0||"true"===n.preloaded){var u="true"===n.preloaded?1:0;p=n.page+1+u,n.seo?"default"===n.permalink?n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+"&paged="+p+'" data-page="'+p+'" />'):n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+"page/"+p+"/"+n.search_value+'" data-page="'+p+'" />'):n.el=t('<div class="alm-reveal" />')}else n.seo?n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'):n.el=t('<div class="alm-reveal" />');n.el.append(n.data).hide()}}else n.data.hide(),n.el=n.data;("masonry"!==n.transition||n.init&&!n.is_masonry_preloaded)&&n.content.append(n.el),"fade"===n.transition?"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)}):"masonry"===n.transition?(almMasonry(n.masonry_wrap,n.el,n.masonry_selector,n.init,a),n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.loading=!1,n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):"none"===n.transition?("true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.show(),n.AjaxLoadMore.triggerAddons(n)}):(n.el.show(),n.AjaxLoadMore.triggerAddons(n)),n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText())):"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}t.isFunction(t.fn.almComplete)&&("true"===n.images_loaded?n.el.almWaitForImages().done(function(){t.fn.almComplete(n)}):t.fn.almComplete(n)),n.cache?i<n.posts_per_page&&n.AjaxLoadMore.triggerDone():n.posts>=n.totalposts&&!n.previous_post&&n.AjaxLoadMore.triggerDone()}else n.paging||(n.button.delay(n.speed).removeClass("loading").addClass("done"),n.AjaxLoadMore.resetBtnText()),n.AjaxLoadMore.triggerDone();if(void 0!==n.destroy_after&&""!==n.destroy_after){var f=n.page+1;n.preload&&f++,f==n.destroy_after&&(n.disable_ajax=!0,n.paging||n.button.delay(n.speed).fadeOut(n.speed))}a=!1,n.init=!1},n.AjaxLoadMore.pagingPreloadedInit=function(a){n.el=t('<div class="alm-reveal"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)},n.AjaxLoadMore.pagingNextpageInit=function(a){n.el=t('<div class="alm-reveal alm-nextpage"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.el.appendTo(n.content),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almSetNextPageVars)&&t.fn.almSetNextPageVars(n),setTimeout(function(){t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap),t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)},200)},n.fetchingPreviousPost=!1,n.AjaxLoadMore.getPreviousPost=function(){n.fetchingPreviousPost=!0,t.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:{action:"alm_query_previous_post",id:n.previous_post_id,taxonomy:n.previous_post_taxonomy},success:function(a){a.has_previous_post?(n.content.attr("data-previous-post-id",a.prev_id),n.previous_post_id=a.prev_id,n.previous_post_permalink=a.prev_permalink,n.previous_post_title=a.prev_title,n.previous_post_slug=a.prev_slug):a.has_previous_post||n.AjaxLoadMore.triggerDone(),t.isFunction(t.fn.almSetPreviousPost)&&t.fn.almSetPreviousPost(n,a.current_id,a.permalink,a.title),n.fetchingPreviousPost=!1},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e),n.fetchingPreviousPost=!1}})},n.AjaxLoadMore.triggerAddons=function(a){t.isFunction(t.fn.almSEO)&&a.seo&&t.fn.almSEO(a),t.isFunction(t.fn.almSetNextPage)&&t.fn.almSetNextPage(a)},n.AjaxLoadMore.triggerDone=function(){n.loading=!1,n.finished=!0,n.paging||n.button.addClass("done"),t.isFunction(t.fn.almDone)&&setTimeout(function(){t.fn.almDone(n)},n.speed+10)},n.AjaxLoadMore.resetBtnText=function(){!1!==n.button_loading_label&&(n.paging||n.button.text(n.button_label))},n.AjaxLoadMore.error=function(t,a,e){n.loading=!1,n.paging||(n.button.removeClass("loading"),n.AjaxLoadMore.resetBtnText()),console.log(e)},n.paging||n.fetchingPreviousPost||n.button.on("click",function(){"true"===n.pause&&(n.pause=!1,n.pause_override=!1,n.AjaxLoadMore.loadPosts()),n.loading||n.finished||t(this).hasClass("done")||(n.loading=!0,n.page++,n.AjaxLoadMore.loadPosts())}),n.paging&&(n.window.bind("resizeEnd",function(){t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)}),n.window.resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){t(this).trigger("resizeEnd")},250)})),n.AjaxLoadMore.isVisible=function(){return n.visible=!1,n.el.is(":visible")&&(n.visible=!0),n.visible},n.scroll&&!n.paging&&n.window.bind("scroll touchstart",function(){if(n.AjaxLoadMore.isVisible()&&!n.fetchingPreviousPost){var t=n.button.offset(),a=Math.round(t.top-(n.window.height()-n.scroll_distance));!n.loading&&!n.finished&&n.window.scrollTop()>=a&&n.page<n.max_pages-1&&n.proceed&&"true"===n.pause&&"true"===n.pause_override?n.button.trigger("click"):!n.loading&&!n.finished&&n.window.scrollTop()>=a&&n.page<n.max_pages-1&&n.proceed&&"true"!==n.pause&&(n.page++,n.AjaxLoadMore.loadPosts())}}),n.AjaxLoadMore.init=function(){n.paging||n.previous_post||(n.disable_ajax?(n.finished=!0,n.button.addClass("done")):"true"===n.pause?(n.button.text(n.button_label),n.loading=!1):n.AjaxLoadMore.loadPosts()),n.previous_post&&(n.AjaxLoadMore.getPreviousPost(),n.loading=!1),n.nextpage&&t(".alm-nextpage").length>1&&t(".alm-nextpage").length==t(".alm-nextpage").eq(0).data("total-pages")&&n.AjaxLoadMore.triggerDone(),n.window.bind("load",function(){n.is_masonry_preloaded&&almMasonry(n.masonry_wrap,n.el,n.masonry_selector,!0,!1)})},n.AjaxLoadMore.init(),setTimeout(function(){n.proceed=!0},300),t.fn.almUpdateCurrentPage=function(a,e,o){o.page=a,o.nextpage&&!o.paging&&(o.page=o.page-1);var n="";o.paging_init&&"true"===o.preloaded?(n=t(".alm-preloaded .alm-reveal",o.el).html(),t(".alm-preloaded",o.el).remove(),o.preloaded_amount=0,o.AjaxLoadMore.pagingPreloadedInit(n),o.paging_init=!1,o.init=!1):o.paging_init&&o.nextpage?(n=t(".alm-nextpage",o.el).html(),t(".alm-nextpage",o.el).remove(),o.AjaxLoadMore.pagingNextpageInit(n),o.paging_init=!1,o.init=!1):o.AjaxLoadMore.loadPosts()},t.fn.almGetParentContainer=function(){return n.el.closest("#ajax-load-more")},t.fn.almGetObj=function(){return n},t.fn.almTriggerClick=function(){n.button.trigger("click")},t.easing.alm_easeInOutQuad=function(t,a,e,o,n){return(a/=n/2)<1?o/2*a*a+e:-o/2*(--a*(a-2)-1)+e}},t.fn.almFilter=function(a,e,o){o.target?t(".ajax-load-more-wrap[data-id='"+o.target+"']").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)}):t(".ajax-load-more-wrap").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)})},t.fn.almFilterTransition=function(a,o,n,r){"slide"===a?r.slideUp(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"fade"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"masonry"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):(t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n))};var e=function(e,o){t.each(o,function(a,o){a=a.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),t(".alm-listing",e).attr("data-"+a,o)}),t.isFunction(t.fn.almFilterComplete)&&t.fn.almFilterComplete(),a=!0,o.target?t(".ajax-load-more-wrap[data-id="+o.target+"]").ajaxloadmore():t(".ajax-load-more-wrap").ajaxloadmore()};t.fn.ajaxloadmore=function(){t(this).data("alm",new t.ajaxloadmore(t(this),0))};var o=document.querySelectorAll(".ajax-load-more-wrap");o&&o.forEach(function(a,e){t(a).data("alm",new t.ajaxloadmore(t(a),e))})}(jQuery);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(jQuery)}(function(t){t.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},t.expr[":"]["has-src"]=function(a){return t(a).is('img[src][src!=""]')},t.expr[":"].uncached=function(a){return!!t(a).is(":has-src")&&!a.complete},t.fn.almWaitForImages=function(){var a,e,o,n=0,r=0,s=t.Deferred();if(t.isPlainObject(arguments[0])?(o=arguments[0].waitForAll,e=arguments[0].each,a=arguments[0].finished):1===arguments.length&&"boolean"===t.type(arguments[0])?o=arguments[0]:(a=arguments[0],e=arguments[1],o=arguments[2]),a=a||t.noop,e=e||t.noop,o=!!o,!t.isFunction(a)||!t.isFunction(e))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var i=t(this),p=[],d=t.almWaitForImages.hasImageProperties||[],l=t.almWaitForImages.hasImageAttributes||[],c=/url\(\s*(['"]?)(.*?)\1\s*\)/g;o?i.find("*").addBack().each(function(){var a=t(this);a.is("img:has-src")&&p.push({src:a.attr("src"),element:a[0]}),t.each(d,function(t,e){var o,n=a.css(e);if(!n)return!0;for(;o=c.exec(n);)p.push({src:o[2],element:a[0]})}),t.each(l,function(e,o){var n,r=a.attr(o);if(!r)return!0;n=r.split(","),t.each(n,function(e,o){o=t.trim(o).split(" ")[0],p.push({src:o,element:a[0]})})})}):i.find("img:has-src").each(function(){p.push({src:this.src,element:this})}),n=p.length,r=0,0===n&&(a.call(i[0]),s.resolveWith(i[0])),t.each(p,function(o,p){var d=new Image,l="load.almWaitForImages error.almWaitForImages";t(d).one(l,function o(d){var c=[r,n,"load"==d.type];if(r++,e.apply(p.element,c),s.notifyWith(p.element,c),t(this).off(l,o),r==n)return a.call(i[0]),s.resolveWith(i[0]),!1}),d.src=p.src})}),s.promise()}});
1
+ "use strict";var almMasonryInit=!0,almMasonry=function t(a,e,o,n,r){r?(a.masonry("destroy"),almMasonryInit=!0,a.append(e),t(a,e,o,!0,!1)):almMasonryInit&&n?(almMasonryInit=!1,a.imagesLoaded(function(){e.fadeIn(250),a.masonry({itemSelector:o}),a.masonry("reloadItems")})):(a.append(e),a.imagesLoaded(function(){e.show(),a.masonry("appended",e)}))};!function(t){var a=!1;t.ajaxloadmore=function(e,o){"true"===alm_localize.scrolltop&&t(window).scrollTop(0);var n=this;n.AjaxLoadMore={},n.window=t(window),n.page=0,n.posts=0,n.totalposts=0,n.proceed=!1,n.disable_ajax=!1,n.init=!0,n.loading=!0,n.finished=!1,n.button_label="",n.el=e,n.container=e,n.container.addClass("alm-"+o).attr("data-alm-id",o),n.content=t(".alm-ajax",n.container),n.content_preloaded=t(".alm-listing.alm-preloaded",n.container),n.canonical_url=n.el.attr("data-canonical-url"),n.is_search=n.el.attr("data-search"),n.slug=n.el.attr("data-slug"),n.post_id=n.el.attr("data-post-id"),n.prefix="alm-",n.cache=n.content.attr("data-cache"),n.cache_id=n.content.attr("data-cache-id"),n.cache_path=n.content.attr("data-cache-path"),n.cache_logged_in=n.content.attr("data-cache-logged-in"),n.repeater=n.content.attr("data-repeater"),n.theme_repeater=n.content.attr("data-theme-repeater"),n.scroll_distance=parseInt(n.content.attr("data-scroll-distance")),n.max_pages=parseInt(n.content.attr("data-max-pages")),n.pause_override=n.content.attr("data-pause-override"),n.pause=n.content.attr("data-pause"),n.transition=n.content.attr("data-transition"),n.transition_container=n.content.attr("data-transition-container"),n.speed=n.content.attr("data-transition-speed"),n.images_loaded=n.content.attr("data-images-loaded"),n.destroy_after=n.content.attr("data-destroy-after"),n.lang=n.content.attr("data-lang"),n.orginal_posts_per_page=n.content.attr("data-posts-per-page"),n.posts_per_page=n.content.attr("data-posts-per-page"),n.cta_array="",n.cta=n.content.attr("data-cta"),n.cta_position=n.content.attr("data-cta-position"),n.cta_repeater=n.content.attr("data-cta-repeater"),n.cta_theme_repeater=n.content.attr("data-cta-theme-repeater"),n.acf_array="",n.acf=n.content.attr("data-acf"),n.acf_field_type=n.content.attr("data-acf-field-type"),n.acf_field_name=n.content.attr("data-acf-field-name"),n.acf_post_id=n.content.attr("data-acf-post-id"),n.nextpage_array="",n.nextpage=n.content.attr("data-nextpage"),n.nextpage_urls=n.content.attr("data-nextpage-urls"),n.nextpage_scroll=n.content.attr("data-nextpage-scroll"),n.nextpage_pageviews=n.content.attr("data-nextpage-pageviews"),n.nextpage_post_id=n.content.attr("data-nextpage-post-id"),n.nextpage_startpage=n.content.attr("data-nextpage-startpage"),n.previous_post=n.content.attr("data-previous-post"),n.previous_post_id=n.content.attr("data-previous-post-id"),n.previous_post_taxonomy=n.content.attr("data-previous-post-taxonomy"),n.comments=n.content.attr("data-comments"),"true"===n.comments&&(n.content=t(".alm-comments",n.container)),n.comments_array="",n.comments_post_id=n.content.attr("data-comments_post_id"),n.comments_per_page=n.content.attr("data-comments_per_page"),n.comments_type=n.content.attr("data-comments_type"),n.comments_style=n.content.attr("data-comments_style"),n.comments_template=n.content.attr("data-comments_template"),n.comments_callback=n.content.attr("data-comments_callback"),n.restapi=n.content.attr("data-restapi"),n.restapi_base_url=n.content.attr("data-restapi-base-url"),n.restapi_namespace=n.content.attr("data-restapi-namespace"),n.restapi_endpoint=n.content.attr("data-restapi-endpoint"),n.restapi_template_id=n.content.attr("data-restapi-template-id"),n.restapi_debug=n.content.attr("data-restapi-debug"),n.seo=n.content.attr("data-seo"),n.preloaded=n.content.attr("data-preloaded"),n.preloaded_amount=n.content.attr("data-preloaded-amount"),n.paging=n.content.attr("data-paging"),n.paging_controls=n.content.attr("data-paging-controls"),n.paging_show_at_most=n.content.attr("data-paging-show-at-most"),n.paging_classes=n.content.attr("data-paging-classes"),n.paging_init=!0,"true"===n.restapi?(n.restapi=!0,void 0===n.restapi_debug&&(n.restapi_debug=!1),""===n.restapi_template_id&&(n.restapi=!1)):n.restapi=!1,"true"===n.paging?(n.paging=!0,void 0===n.paging_show_at_most&&(n.paging_show_at_most=7),"true"===n.preloaded&&(n.pause=!0)):n.paging=!1,"true"===n.paging_controls?n.paging_controls=!0:n.paging_controls=!1,void 0===n.cache&&(n.cache=!1),void 0===n.cache_logged_in&&(n.cache_logged_in=!1),void 0===n.comments_per_page&&(n.comments_per_page="5"),"true"===n.preloaded?(n.preload_wrap=n.content.prev(".alm-preloaded"),n.preloaded_total_posts=parseInt(n.preload_wrap.attr("data-total-posts")),void 0===n.preloaded_amount&&(n.preloaded_amount=!1),n.preloaded_total_posts<=n.preloaded_amount&&(n.disable_ajax=!0)):n.preloaded="false",void 0===n.seo&&(n.seo=!1),"true"===n.seo&&(n.seo=!0),void 0===n.is_search&&(n.is_search=!1),n.search_value="true"===n.is_search?n.slug:"",n.permalink=n.content.attr("data-seo-permalink"),n.pageview=n.content.attr("data-seo-pageview"),n.start_page=n.content.attr("data-seo-start-page"),n.start_page?(n.seo_scroll=n.content.attr("data-seo-scroll"),n.seo_scroll_speed=n.content.attr("data-seo-scroll-speed"),n.seo_scrolltop=n.content.attr("data-seo-scrolltop"),n.isPaged=!1,n.start_page>1&&(n.isPaged=!0,n.posts_per_page=n.start_page*n.posts_per_page),n.paging&&(n.posts_per_page=n.orginal_posts_per_page)):n.start_page=1,"true"===n.nextpage?(n.nextpage=!0,n.posts_per_page=1):n.nextpage=!1,void 0===n.nextpage_urls&&(n.nextpage="true"),void 0===n.nextpage_scroll&&(n.nextpage_scroll="250:30"),void 0===n.nextpage_pageviews&&(n.nextpage_pageviews="true"),void 0===n.nextpage_post_id&&(n.nextpage=!1,n.nextpage_post_id=null),void 0===n.nextpage_startpage&&(n.nextpage_startpage=1),n.nextpage_startpage>1&&(n.isPaged=!0),"true"===n.acf?n.acf=!0:n.acf=!1,void 0!==n.acf_field_type&&void 0!==n.acf_field_name&&void 0!==n.acf_post_id||(n.acf=!1),"true"===n.previous_post?(n.previous_post=!0,n.previous_post_permalink="",n.previous_post_title="",n.previous_post_slug=""):n.previous_post=!1,void 0===n.previous_post_id&&(n.previous_post_id=""),void 0===n.previous_post_taxonomy&&(n.previous_post_taxonomy=""),n.previous_post_title_template=n.content.attr("data-previous-post-title-template"),n.siteTitle=n.content.attr("data-previous-post-site-title"),n.siteTagline=n.content.attr("data-previous-post-site-tagline"),n.previous_post_pageview=n.content.attr("data-previous-post-pageview"),n.previous_post_scroll=n.content.attr("data-previous-post-scroll"),n.previous_post_scroll_speed=n.content.attr("data-previous-post-scroll-speed"),n.previous_post_scroll_top=n.content.attr("data-previous-post-scrolltop"),void 0===n.content.attr("data-offset")?n.offset=0:n.offset=n.content.attr("data-offset"),(void 0===n.pause||n.seo&&n.start_page>1)&&(n.pause=!1),"true"===n.preloaded&&n.seo&&n.start_page>0&&(n.pause=!1),"true"===n.preloaded&&n.paging&&(n.pause=!0),void 0===n.repeater&&(n.repeater="default"),void 0===n.theme_repeater&&(n.theme_repeater="null"),void 0===n.max_pages&&(n.max_pages=0),0===n.max_pages&&(n.max_pages=1e4),void 0===n.scroll_distance&&(n.scroll_distance=150),void 0===n.transition&&(n.transition="slide"),n.is_masonry_preloaded=!1,"masonry"===n.transition&&(n.masonry_selector=n.content.attr("data-masonry-selector"),n.masonry_wrap=n.content,n.transition_container=!1,document.body.contains(n.content_preloaded.get(0))&&(n.masonry_wrap=n.content_preloaded,n.is_masonry_preloaded=!0)),void 0===n.speed?n.speed=250:n.speed=parseInt(n.speed),void 0===n.transition_container||"true"===n.transition_container?n.transition_container=!0:n.transition_container=!1,void 0===n.images_loaded&&(n.images_loaded="false"),n.destroy_after,void 0===n.content.attr("data-button-label")?n.button_label="Older Posts":n.button_label=n.content.attr("data-button-label"),n.button_loading_label=n.content.attr("data-button-loading-label"),void 0===n.button_loading_label&&(n.button_loading_label=!1),void 0===n.content.attr("data-button-class")?n.button_class="":n.button_class=" "+n.content.attr("data-button-class"),void 0===n.content.attr("data-scroll")?n.scroll=!0:"false"===n.content.attr("data-scroll")?n.scroll=!1:n.scroll=!0,n.post_type=n.content.attr("data-post-type"),n.post_type=n.post_type.split(","),n.sticky_posts=n.content.attr("data-sticky-posts"),n.container.append('<div class="'+n.prefix+'btn-wrap"/>'),n.btnWrap=t("."+n.prefix+"btn-wrap",n.container),n.paging?n.content.parent().addClass("loading"):(t("."+n.prefix+"btn-wrap",n.container).append('<button id="load-more" class="'+n.prefix+"load-more-btn more"+n.button_class+'">'+n.button_label+"</button>"),n.button=t(".alm-load-more-btn",n.container)),n.AjaxLoadMore.loadPosts=function(){if(!n.disable_ajax)if(n.paging||(n.button.addClass("loading"),!1!==n.button_loading_label&&n.button.text(n.button_loading_label)),n.container.addClass("alm-loading"),n.loading=!0,"true"!==n.cache||n.cache_logged_in)n.AjaxLoadMore.ajax("standard");else{var a;if(n.init&&n.seo&&n.isPaged){a=n.cache_path+n.cache_id+"/page-1-"+n.start_page+".html"}else if(n.nextpage){var e;n.paging?e=parseInt(n.page)+1:(e=parseInt(n.page)+2,n.isPaged&&(e=parseInt(n.page)+parseInt(n.nextpage_startpage)+1)),a=n.cache_path+n.cache_id+"/page-"+e+".html"}else a=n.previous_post?n.cache_path+n.cache_id+"/"+n.previous_post_slug+".html":n.cache_path+n.cache_id+"/page-"+(n.page+1)+".html";t.get(a,function(t){n.AjaxLoadMore.success(t,!0)}).fail(function(){n.AjaxLoadMore.ajax("standard")})}},n.AjaxLoadMore.ajax=function(a){var o="alm_query_posts";if(n.acf&&("relationship"!==n.acf_field_type&&(o="alm_acf_query"),n.acf_array={acf:"true",post_id:n.acf_post_id,field_type:n.acf_field_type,field_name:n.acf_field_name}),n.nextpage&&(o="alm_nextpage_query",n.nextpage_array={nextpage:"true",urls:n.nextpage_urls,scroll:n.nextpage_scroll,pageviews:n.nextpage_pageviews,post_id:n.nextpage_post_id,startpage:n.nextpage_startpage}),n.previous_post&&(n.previous_post_array={previous_post:"true",id:n.previous_post_id,slug:n.previous_post_slug}),"true"===n.comments&&(o="alm_comments_query",n.posts_per_page=n.comments_per_page,n.comments_array={comments:"true",post_id:n.comments_post_id,per_page:n.comments_per_page,type:n.comments_type,style:n.comments_style,template:n.comments_template,callback:n.comments_callback}),"true"===n.cta&&(n.cta_array={cta:"true",cta_position:n.cta_position,cta_repeater:n.cta_repeater,cta_theme_repeater:n.cta_theme_repeater}),n.restapi){var r=wp.template(n.restapi_template_id),s=n.restapi_base_url+"/"+n.restapi_namespace+"/"+n.restapi_endpoint,i={posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,slug:n.slug,canonical_url:n.canonical_url,post_type:n.post_type,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),lang:n.lang,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,id:e.attr("data-id")};t.ajax({type:"GET",url:s,data:i,dataType:"JSON",beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(a){var e,o=a.html,s=a.meta,i=s.postcount,p=s.totalposts;t.each(o,function(t){var a=o[t];"true"===n.restapi_debug&&console.log(a),e+=r(a)});var d={html:e,meta:{postcount:i,totalposts:p}};n.AjaxLoadMore.success(d,!1)}})}else t.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:o,query_type:a,nonce:alm_localize.alm_nonce,cache_id:n.cache_id,repeater:n.repeater,theme_repeater:n.theme_repeater,acf:n.acf_array,nextpage:n.nextpage_array,cta:n.cta_array,comments:n.comments_array,post_type:n.post_type,sticky_posts:n.sticky_posts,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),exclude:n.content.attr("data-exclude"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,paging:n.paging,previous_post:n.previous_post_array,lang:n.lang,slug:n.slug,canonical_url:n.canonical_url,id:e.attr("data-id")},beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(e){"standard"===a?n.AjaxLoadMore.success(e,!1):"totalpages"===a&&n.paging&&n.nextpage?t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n):"totalposts"===a&&n.paging&&t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n)},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e)}})},n.paging&&(n.nextpage?n.AjaxLoadMore.ajax("totalpages"):n.AjaxLoadMore.ajax("totalposts")),n.AjaxLoadMore.success=function(e,o){n.previous_post&&n.AjaxLoadMore.getPreviousPost();var r,s,i;if(o?r=e:(r=e.html,s=e.meta,n.posts=n.posts+s.postcount,i=s.postcount,n.totalposts=s.totalposts,"true"===n.preloaded&&(n.totalposts=n.totalposts-n.preloaded_amount)),n.data=t(r),o&&(i=n.data.length),n.init&&(n.paging?i>0&&(n.el=t('<div class="alm-reveal"/>'),n.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>'),t(".alm-paging-content",n.el).append(n.data).hide(),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText(),t(".alm-paging-content",n.el).fadeIn(n.speed,"alm_easeInOutQuad",function(){var a=parseInt(n.content.css("padding-top")),e=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+a+e+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)})):n.button.text(n.button_label),0===i&&t.isFunction(t.fn.almEmpty)&&t.fn.almEmpty(n),n.isPaged&&(n.posts_per_page=n.content.attr("data-posts-per-page"),n.page=n.start_page-1)),i>0){if(n.paging)n.init?(n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):t(".alm-paging-content",n.el).html("").append(n.data).almWaitForImages().done(function(){t(".alm-paging-loading",n.el).fadeOut(n.speed),t.isFunction(t.fn.almOnPagingComplete)&&t.fn.almOnPagingComplete(n),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)});else{if(n.previous_post)n.el=t('<div class="alm-reveal alm-previous-post post-'+n.previous_post_id+'" data-id="'+n.previous_post_id+'" data-title="'+n.previous_post_title+'" data-url="'+n.previous_post_permalink+'" data-page="'+n.page+'"/>'),n.el.append(n.data).hide();else if(n.transition_container){var p;if(n.init&&n.start_page>1){var d=[],l=parseInt(n.posts_per_page);"true"===n.cta&&(l+=1);Math.ceil(i/l);for(var c=0;c<i;c+=l)d.push(n.data.slice(c,l+c));n.el=n.content;for(var g=0;g<d.length;g++){var _,m="true"===n.preloaded?1:0;g>0||"true"===n.preloaded?(p=g+1+m,_=t("default"===n.permalink?'<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+"&paged="+p+'" data-page="'+p+'" />':'<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+"page/"+p+"/"+n.search_value+'" data-page="'+p+'" />')):_=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'),_.append(d[g]),_=t(_),n.el.append(_).hide()}}else{if(n.seo&&n.page>0||"true"===n.preloaded){var u="true"===n.preloaded?1:0;p=n.page+1+u,n.seo?"default"===n.permalink?n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+"&paged="+p+'" data-page="'+p+'" />'):n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+"page/"+p+"/"+n.search_value+'" data-page="'+p+'" />'):n.el=t('<div class="alm-reveal" />')}else n.seo?n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'):n.el=t('<div class="alm-reveal" />');n.el.append(n.data).hide()}}else n.data.hide(),n.el=n.data;("masonry"!==n.transition||n.init&&!n.is_masonry_preloaded)&&n.content.append(n.el),"fade"===n.transition?"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)}):"masonry"===n.transition?(almMasonry(n.masonry_wrap,n.el,n.masonry_selector,n.init,a),n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.loading=!1,n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):"none"===n.transition?("true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.show(),n.AjaxLoadMore.triggerAddons(n)}):(n.el.show(),n.AjaxLoadMore.triggerAddons(n)),n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText())):"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}t.isFunction(t.fn.almComplete)&&("true"===n.images_loaded?n.el.almWaitForImages().done(function(){t.fn.almComplete(n)}):t.fn.almComplete(n)),n.cache?i<n.posts_per_page&&n.AjaxLoadMore.triggerDone():n.posts>=n.totalposts&&!n.previous_post&&n.AjaxLoadMore.triggerDone()}else n.paging||(n.button.delay(n.speed).removeClass("loading").addClass("done"),n.AjaxLoadMore.resetBtnText()),n.AjaxLoadMore.triggerDone();if(void 0!==n.destroy_after&&""!==n.destroy_after){var f=n.page+1;n.preload&&f++,f==n.destroy_after&&(n.disable_ajax=!0,n.paging||n.button.delay(n.speed).fadeOut(n.speed))}a=!1,n.init=!1},n.AjaxLoadMore.pagingPreloadedInit=function(a){n.el=t('<div class="alm-reveal"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)},n.AjaxLoadMore.pagingNextpageInit=function(a){n.el=t('<div class="alm-reveal alm-nextpage"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.el.appendTo(n.content),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almSetNextPageVars)&&t.fn.almSetNextPageVars(n),setTimeout(function(){t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap),t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)},200)},n.fetchingPreviousPost=!1,n.AjaxLoadMore.getPreviousPost=function(){n.fetchingPreviousPost=!0,t.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:{action:"alm_query_previous_post",id:n.previous_post_id,taxonomy:n.previous_post_taxonomy},success:function(a){a.has_previous_post?(n.content.attr("data-previous-post-id",a.prev_id),n.previous_post_id=a.prev_id,n.previous_post_permalink=a.prev_permalink,n.previous_post_title=a.prev_title,n.previous_post_slug=a.prev_slug):a.has_previous_post||n.AjaxLoadMore.triggerDone(),t.isFunction(t.fn.almSetPreviousPost)&&t.fn.almSetPreviousPost(n,a.current_id,a.permalink,a.title),n.fetchingPreviousPost=!1},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e),n.fetchingPreviousPost=!1}})},n.AjaxLoadMore.triggerAddons=function(a){t.isFunction(t.fn.almSEO)&&a.seo&&t.fn.almSEO(a),t.isFunction(t.fn.almSetNextPage)&&t.fn.almSetNextPage(a)},n.AjaxLoadMore.triggerDone=function(){n.loading=!1,n.finished=!0,n.paging||n.button.addClass("done"),t.isFunction(t.fn.almDone)&&setTimeout(function(){t.fn.almDone(n)},n.speed+10)},n.AjaxLoadMore.resetBtnText=function(){!1!==n.button_loading_label&&(n.paging||n.button.text(n.button_label))},n.AjaxLoadMore.error=function(t,a,e){n.loading=!1,n.paging||(n.button.removeClass("loading"),n.AjaxLoadMore.resetBtnText()),console.log(e)},n.paging||n.fetchingPreviousPost||n.button.on("click",function(){"true"===n.pause&&(n.pause=!1,n.pause_override=!1,n.AjaxLoadMore.loadPosts()),n.loading||n.finished||t(this).hasClass("done")||(n.loading=!0,n.page++,n.AjaxLoadMore.loadPosts())}),n.paging&&(n.window.bind("resizeEnd",function(){t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)}),n.window.resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){t(this).trigger("resizeEnd")},250)})),n.AjaxLoadMore.isVisible=function(){return n.visible=!1,n.el.is(":visible")&&(n.visible=!0),n.visible},n.scroll&&!n.paging&&n.window.bind("scroll touchstart",function(){if(n.AjaxLoadMore.isVisible()&&!n.fetchingPreviousPost){var t=n.button.offset(),a=Math.round(t.top-(n.window.height()-n.scroll_distance));!n.loading&&!n.finished&&n.window.scrollTop()>=a&&n.page<n.max_pages-1&&n.proceed&&"true"===n.pause&&"true"===n.pause_override?n.button.trigger("click"):!n.loading&&!n.finished&&n.window.scrollTop()>=a&&n.page<n.max_pages-1&&n.proceed&&"true"!==n.pause&&(n.page++,n.AjaxLoadMore.loadPosts())}}),n.AjaxLoadMore.init=function(){n.paging||n.previous_post||(n.disable_ajax?(n.finished=!0,n.button.addClass("done")):"true"===n.pause?(n.button.text(n.button_label),n.loading=!1):n.AjaxLoadMore.loadPosts()),n.previous_post&&(n.AjaxLoadMore.getPreviousPost(),n.loading=!1),n.nextpage&&t(".alm-nextpage").length>1&&t(".alm-nextpage").length==t(".alm-nextpage").eq(0).data("total-pages")&&n.AjaxLoadMore.triggerDone(),n.window.bind("load",function(){n.is_masonry_preloaded&&almMasonry(n.masonry_wrap,n.el,n.masonry_selector,!0,!1)})},n.AjaxLoadMore.init(),setTimeout(function(){n.proceed=!0},300),t.fn.almUpdateCurrentPage=function(a,e,o){o.page=a,o.nextpage&&!o.paging&&(o.page=o.page-1);var n="";o.paging_init&&"true"===o.preloaded?(n=t(".alm-preloaded .alm-reveal",o.el).html(),t(".alm-preloaded",o.el).remove(),o.preloaded_amount=0,o.AjaxLoadMore.pagingPreloadedInit(n),o.paging_init=!1,o.init=!1):o.paging_init&&o.nextpage?(n=t(".alm-nextpage",o.el).html(),t(".alm-nextpage",o.el).remove(),o.AjaxLoadMore.pagingNextpageInit(n),o.paging_init=!1,o.init=!1):o.AjaxLoadMore.loadPosts()},t.fn.almGetParentContainer=function(){return n.el.closest("#ajax-load-more")},t.fn.almGetObj=function(){return n},t.fn.almTriggerClick=function(){n.button.trigger("click")},t.easing.alm_easeInOutQuad=function(t,a,e,o,n){return(a/=n/2)<1?o/2*a*a+e:-o/2*(--a*(a-2)-1)+e}},t.fn.almFilter=function(a,e,o){o.target?t(".ajax-load-more-wrap[data-id='"+o.target+"']").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)}):t(".ajax-load-more-wrap").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)})},t.fn.almFilterTransition=function(a,o,n,r){"slide"===a?r.slideUp(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"fade"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"masonry"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):(t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n))};var e=function(e,o){t.each(o,function(a,o){a=a.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),t(".alm-listing",e).attr("data-"+a,o)}),t.isFunction(t.fn.almFilterComplete)&&t.fn.almFilterComplete(),a=!0,o.target?t(".ajax-load-more-wrap[data-id="+o.target+"]").ajaxloadmore():t(".ajax-load-more-wrap").ajaxloadmore()};t.fn.ajaxloadmore=function(){return this.each(function(a){t(this).data("alm",new t.ajaxloadmore(t(this),a))})},t(".ajax-load-more-wrap").length&&t(".ajax-load-more-wrap").ajaxloadmore()}(jQuery);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(jQuery)}(function(t){t.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},t.expr[":"]["has-src"]=function(a){return t(a).is('img[src][src!=""]')},t.expr[":"].uncached=function(a){return!!t(a).is(":has-src")&&!a.complete},t.fn.almWaitForImages=function(){var a,e,o,n=0,r=0,s=t.Deferred();if(t.isPlainObject(arguments[0])?(o=arguments[0].waitForAll,e=arguments[0].each,a=arguments[0].finished):1===arguments.length&&"boolean"===t.type(arguments[0])?o=arguments[0]:(a=arguments[0],e=arguments[1],o=arguments[2]),a=a||t.noop,e=e||t.noop,o=!!o,!t.isFunction(a)||!t.isFunction(e))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var i=t(this),p=[],d=t.almWaitForImages.hasImageProperties||[],l=t.almWaitForImages.hasImageAttributes||[],c=/url\(\s*(['"]?)(.*?)\1\s*\)/g;o?i.find("*").addBack().each(function(){var a=t(this);a.is("img:has-src")&&p.push({src:a.attr("src"),element:a[0]}),t.each(d,function(t,e){var o,n=a.css(e);if(!n)return!0;for(;o=c.exec(n);)p.push({src:o[2],element:a[0]})}),t.each(l,function(e,o){var n,r=a.attr(o);if(!r)return!0;n=r.split(","),t.each(n,function(e,o){o=t.trim(o).split(" ")[0],p.push({src:o,element:a[0]})})})}):i.find("img:has-src").each(function(){p.push({src:this.src,element:this})}),n=p.length,r=0,0===n&&(a.call(i[0]),s.resolveWith(i[0])),t.each(p,function(o,p){var d=new Image,l="load.almWaitForImages error.almWaitForImages";t(d).one(l,function o(d){var c=[r,n,"load"==d.type];if(r++,e.apply(p.element,c),s.notifyWith(p.element,c),t(this).off(l,o),r==n)return a.call(i[0]),s.resolveWith(i[0]),!1}),d.src=p.src})}),s.promise()}});
core/js/ajax-load-more.js CHANGED
@@ -1694,9 +1694,11 @@
1694
  * Initiate instances of Ajax load More via filters or external functions
1695
  * @since 2.1.2
1696
  */
 
1697
  $.fn.ajaxloadmore = function () {
1698
- $(this).data('alm', new $.ajaxloadmore($(this), 0));
1699
  };
 
1700
 
1701
 
1702
 
@@ -1707,14 +1709,37 @@
1707
  * @since 2.1.2
1708
  */
1709
 
1710
- let alm = document.querySelectorAll('.ajax-load-more-wrap');
 
1711
  if(alm){
1712
  // Loop each alm element
1713
  alm.forEach((alm, e) => {
1714
  $(alm).data('alm', new $.ajaxloadmore($(alm), e));
1715
  });
1716
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1717
 
 
 
 
 
 
 
 
1718
 
1719
 
1720
  })(jQuery);
1694
  * Initiate instances of Ajax load More via filters or external functions
1695
  * @since 2.1.2
1696
  */
1697
+ /*
1698
  $.fn.ajaxloadmore = function () {
1699
+ //$(this).data('alm', new $.ajaxloadmore($(this), 0));
1700
  };
1701
+ */
1702
 
1703
 
1704
 
1709
  * @since 2.1.2
1710
  */
1711
 
1712
+ /*
1713
+ let alm = [...document.querySelectorAll('.ajax-load-more-wrap')];
1714
  if(alm){
1715
  // Loop each alm element
1716
  alm.forEach((alm, e) => {
1717
  $(alm).data('alm', new $.ajaxloadmore($(alm), e));
1718
  });
1719
  }
1720
+ */
1721
+
1722
+
1723
+ /* $.fn.ajaxloadmore()
1724
+ *
1725
+ * Initiate all instances of Ajax load More
1726
+ * @since 2.1.2
1727
+ */
1728
+ $.fn.ajaxloadmore = function () {
1729
+ return this.each(function (e) {
1730
+ $(this).data('alm', new $.ajaxloadmore($(this), e));
1731
+ });
1732
+ };
1733
+
1734
+
1735
 
1736
+ /*
1737
+ * Initiate Ajax load More if div is present on screen
1738
+ * @since 2.1.2
1739
+ */
1740
+ if ($(".ajax-load-more-wrap").length){
1741
+ $(".ajax-load-more-wrap").ajaxloadmore();
1742
+ }
1743
 
1744
 
1745
  })(jQuery);