/*! WPMU Dev code library - v3.0.9 * http://premium.wpmudev.org/ * Copyright (c) 2018; * Licensed GPLv2+ */ jQuery(function(){function a(a){var b=jQuery(".wpmui-list-table.has-details"),c=b.find(".list-card.detail-mode"),d=jQuery(window).innerHeight()-132;c.length&&c.height(d)}function b(b){var d=jQuery(this).parents(".list-card"),e=d.parents(".wpmui-list-table"),f=jQuery(window).innerHeight()-132;e.hasClass("has-details")?c():(window.scrollTo(0,0),e.addClass("has-details"),d.addClass("detail-mode"),d.height(f),d.hide(),jQuery(window).on("resize",a),a(),window.setTimeout(function(){d.show()},10))}function c(b){var c=!1;if(void 0===b&&(c=!0),void 0!==b&&void 0!==b.target){jQuery(b.target).hasClass("wpmui-list-table")&&(c=!0)}if(c){var d=jQuery(".list-card.detail-mode");jQuery(".wpmui-list-table.has-details").removeClass("has-details"),d.removeClass("detail-mode"),d.height("auto"),jQuery(window).off("resize",a)}}function d(a,b,c){var d=jQuery(this),e=d.parents(".list-card");!0!==b._is_detail&&(b.value?e.addClass("active"):e.removeClass("active"))}function e(a){var b=jQuery(this),c=b.data("filter"),d=jQuery(".list-card");switch(b.parents(".wp-filter").find(".current").removeClass("current"),b.addClass("current"),c){case"active":d.hide().filter(".active").show();break;case"inactive":d.show().filter(".active").hide();break;case"all":d.show();break;default:jQuery(document).trigger("list-filter",[c,d])}return!1}jQuery(document).on("wpmui-radio-slider-updated",".wpmui-radio-slider",d),jQuery(document).on("click",".toggle-details",b),jQuery(document).on("click",".has-details",c),jQuery(document).on("click",".wp-filter .filter",e)});