!function(r){var a={bind:function(){var t=this;r(".llms-favorite-wrapper").on("click",function(a){a.preventDefault();a=r(this).find(".llms-heart-btn");a&&t.favorite(a)}),r(".llms-favorite-wrapper").parent().addClass("llms-has-favorite")},favorite:function(a){var e=a.attr("data-id"),i=a.attr("data-type"),o=a.attr("data-action");LLMS.Ajax.call({data:{action:"favorite_object",object_id:e,object_type:i,user_action:o},beforeSend:function(){},success:function(a){var t=r("[data-id="+e+"][data-type="+i+"][data-action="+o+"]");a.success&&t.each(function(){"favorite"===o?(r(this).removeClass("fa-heart-o").addClass("fa-heart"),r(this).attr("data-action","unfavorite")):"unfavorite"===o&&(r(this).removeClass("fa-heart").addClass("fa-heart-o"),r(this).attr("data-action","favorite")),r(this).closest(".llms-favorite-wrapper").find(".llms-favorites-count").text(a.total_favorites)})}})}};a.bind(),window.llms=window.llms||{},window.llms.favorites=a}(jQuery); //# sourceMappingURL=../maps/js/llms-favorites.min.js.map