require(["jquery","xwiki-events-bridge"],function(c){var f=function(a,b){b&&1!=b.active_value&&a.find("td.doc_name").addClass("user disabled")};c(document).on("xwiki:livetable:userdirectory:newrow",function(a,b){f(c(b.row),b.data)});var g=window.livetable_userdirectory;g&&c("table#userdirectory tr[data-index]").each(function(){var a=c(this),b=g.fetchedRows[a.data("index")];f(a,b)});c("form.user-directory-settings").on("change",function(a){a=XWiki.currentDocument;if("UserDirectory"!==a.page||"Main"!==
a.space)a=new XWiki.Document("UserDirectoryConfiguration","XWiki");a=a.getURL("get","customize\x3dtrue");var b=c(this).serialize(),d=c(".xwiki-livetable-container").addClass("loading");c.get(a,b).then(e=>{e=c("\x3cdiv/\x3e").html(e).find(".xwiki-livetable-container");d.replaceWith(e);c(document).trigger("xwiki:dom:updated",{elements:e.toArray()})})});c("#userScopeFilter").on("change",function(a){a=c(this).val();var b=window.livetable_userdirectory,d=b.getUrl;d=0<=d.search("userScope\x3d")?"local"===
a?d.replace("userScope\x3dglobal","userScope\x3dlocal"):d.replace("userScope\x3dlocal","userScope\x3dglobal"):d+"\x26userScope\x3d"+a;b.getUrl=d;b.refresh()})});