function json2tr(a){var t=[];return $.each(a,(function(a,l){var n="";$.each(this,(function(a,t){"url"===a?n+="":null===t?n+="<td>-</td>":$.isNumeric(t)&&t<0?n+="<td class='text-danger'>"+t+"</td>":t.length>40?n+="<td>"+t.substring(0,40)+"...</td>":n+="<td>"+t+"</td>"})),t.push("<tr class='clickableRow' data-href='"+l.url+"'>"+n+"</tr>")})),t}function reloadClickableRow(){$(".clickableRow").mousedown((function(a){if(1===a.which){var t=$(this).attr("data-href"),l=$(this).attr("data-bs-target");void 0!==t&&!1!==t&&(void 0!==l&&"_blank"===l?window.open($(this).attr("data-href")):parent.document.location=$(this).attr("data-href"))}}))}function searchOnSection(a){$.getJSON(a,(function(a){$.each(a,(function(a,t){var l=json2tr(t.results);if(l.length>0){$("#v-pills-tab").append("<a class='nav-link' id='v-pills-"+a+"-tab' data-bs-toggle='pill' href='#v-pills-"+a+"' role='tab' aria-controls='v-pills-"+a+"' aria-expanded='true'>\n                    <span class='badge bg-secondary float-end'>"+l.length+"</span>\n                    <i class='"+t.icon+" fa-fw'></i>\n                    "+t.title+"\n                </a>");var n="<thead><tr>";$.each(t.columns,(function(a,t){n+="<th>"+t+"</th>"})),n+="<tr></thead>",$.each(l,(function(a,t){n+=t})),$("#v-pills-tabContent").append("<div class='tab-pane fade' id='v-pills-"+a+"' role='tabpanel' aria-labelledby='v-pills-"+a+"-tab'>\n                    <div class='card shadow'><div class='table-responsive'>\n                    <table class='table table-striped table-hover mb-0'>"+n+"</table>\n                    </div>\n</div>\n</div>"),$("#v-pills-tab a:first").tab("show"),reloadClickableRow(),$("#no-data-msg").hide()}}))}))}function searchOnSections(a){var t=Object.values(a),l=0;!function a(){if(l<t.length){var n=t[l];l++,$.getJSON(n,(function(a){$.each(a,(function(a,t){var l=json2tr(t.results);if(l.length>0){$("#v-pills-tab").append("<a class='nav-link text-nowrap' id='v-pills-"+a+"-tab' data-bs-toggle='pill' href='#v-pills-"+a+"' role='tab' aria-controls='v-pills-"+a+"' aria-expanded='true'>\n                            <i class='"+t.icon+" fa-fw me-1 d-none d-lg-inline-block'></i>\n                            <span class='d-inline d-lg-inline'>"+t.title+"</span>\n                            <span class='badge bg-secondary ms-1 mt-lg-1 mb-lg-1 float-lg-end'>"+l.length+"</span>\n                        </a>");var n="<thead><tr>";$.each(t.columns,(function(a,t){n+="<th>"+t+"</th>"})),n+="<tr></thead>",$.each(l,(function(a,t){n+=t})),$("#v-pills-tabContent").append("<div class='tab-pane fade' id='v-pills-"+a+"' role='tabpanel' aria-labelledby='v-pills-"+a+"-tab'>\n                            <div class='card shadow'><div class='table-responsive'>\n                            <table class='table table-striped table-hover mb-0'>"+n+"</table>\n                            </div>\n</div>\n</div>"),$("#v-pills-tab a:first").tab("show"),reloadClickableRow(),$("#no-data-msg").hide()}}))})).always((function(){a()}))}}()}