(()=>{"use strict";var e={},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,r),s.exports}r.rv=()=>"1.4.11",r.ruid="bundler=rspack@1.4.11";var o=function(){if(0===$("#content.container li .liz-project-title").length)return void $("#search").hide();$("#toggle-search, #search-project").tooltip(),$("#toggle-search").click(function(){"#"===$(this).text()?($(this).text("T"),$(".project-keyword").addClass("hide"),$("#search-project-keywords-selected").text("")):($(this).text("#"),$(".project-keyword").removeClass("hide")),$("#content.container .liz-repository-project-item").show(),$("#content.container .liz-repository-title").show(),$("#search-project").keyup()});var e=function(e,t,r){return r.indexOf(e)===t},t=function(){var t=[];return $(".liz-repository-project-item :visible .keywordList").each(function(){if(""!==$(this).text()){var e=$(this).text().toUpperCase().split(", ");if(n)for(var r=0;r<e.length;r++)t=t.concat(e[r].split("/"));else t=t.concat(e)}}),t.filter(e)},r=function(){var e=[];return $(".liz-repository-project-item :visible .keywordList").each(function(){if(""!==$(this).text())for(var t=$(this).text().toUpperCase().split(", "),r=0;r<t.length;r++)for(var o=t[r].split("/"),i=0;i<o.length-1;i++)e.push([o[i],o[i+1]])}),e},o=function(){var e=i();0===e.length?($("#content.container .liz-repository-project-item").show(),$("#content.container .liz-repository-title").show()):($("#content.container .liz-repository-project-item").hide(),$("#content.container .liz-repository-title").hide(),$(".keywordList").each(function(){var t=!1,r=$(this).text().toUpperCase().split(", ");if(n){for(var o=e.join("/"),i=0;i<r.length;i++)if(-1!==r[i].indexOf(o)){t=!0;break}}else t=e.every(function(e){return -1!==r.indexOf(e)});t&&($(this).closest(".liz-repository-project-item").show(),$(this).closest(".liz-repository-project-list").prev(".liz-repository-title").show())}))},i=function(){var e=[];return $("#search-project-keywords-selected .keyword-label").each(function(){e.push($(this).text().toUpperCase())}),e},s=function(){$("#search-project-result .project-keyword").each(function(){$(this).text($(this).text())})},c=function(){var e=i();if(0===e.length)$("#search-project-result .project-keyword").removeClass("hide");else{$("#search-project-result .project-keyword").addClass("hide");for(var o=t(),c=0;c<o.length;c++)-1===e.indexOf(o[c])&&$("#search-project-result .project-keyword.hide").filter(function(){return $(this).text().toUpperCase()===o[c]}).removeClass("hide");if(n){$("#search-project-result .project-keyword").addClass("hide");var a=r(),l=e[e.length-1],p=$("#search-project-result .project-keyword.hide");for(let e=0;e<p.length;e++)for(var h=p.eq(e),d=0;d<a.length;d++)a[d][0]===l&&a[d][1]===h.text().toUpperCase()&&h.removeClass("hide")}}s()};$("#search-project").keyup(function(){$("html").animate({scrollTop:$("#anchor-top-projects").offset().top-$("#header").height()},500);var e=this.value.trim().toUpperCase();"#"===$("#toggle-search").text()?(c(),""===e&&0===i().length?$("#search-project-result .project-keyword").addClass("hide"):$("#search-project-result .project-keyword:visible").each(function(){var t=$(this).text().toUpperCase();if(-1!==t.indexOf(e)){var r=RegExp(e,"g"),o=t.replace(r,'<span class="highlight">'+e+"</span>");$(this).html(o.toLowerCase())}else $(this).addClass("hide")})):""===e?($("#content.container .liz-repository-project-item").show(),$("#content.container .liz-repository-title").show()):($("#content.container .liz-repository-project-item").hide(),$("#content.container .liz-repository-title").hide(),$("#content.container li .liz-project-title").filter(function(){return -1!=$(this).text().toUpperCase().indexOf(e)}).closest(".liz-repository-project-item").show(),$("#content.container li .liz-project-title").filter(function(){return -1!=$(this).text().toUpperCase().indexOf(e)}).closest(".liz-repository-project-list").prev(".liz-repository-title").show())});var n=!1,a=t();if(a.length>0){for(var l=0;l<a.length;l++)if(-1!==a[l].indexOf("/")){n=!0,a=t();break}var p="";for(let e=0;e<a.length;e++)p+='<span class="project-keyword hide">'+a[e].toLowerCase()+"</span>";$("#search-project-result").html(p),$(".project-keyword").click(function(){$("#search-project-keywords-selected").append('<span class="project-keyword"><span class="keyword-label">'+$(this).text()+'</span><span class="remove-keyword">x</span></span>'),$("#search-project-keywords-selected .remove-keyword").click(function(){$(this).parent().remove(),o(),0===$("#search-project-keywords-selected .remove-keyword").length?$("#search-project-result .project-keyword").addClass("hide"):c()}),o(),$("#search-project").val(""),c()})}else $("#toggle-search").hide().parent().removeClass("input-prepend")};window.addEventListener("load",function(){o(),$(".liz-project-show-desc").click(function(){let e=$(this).data("lizmap-modal");return $("#liz-project-modal-"+e).modal("show"),!1})})})();
//# sourceMappingURL=view.js.map