PageSourceSearch

https://cm-lajesdopico.pt/UtilityComponents/Paginator/paginator.es5.min.js?v=1.19

js cm-lajesdopico.pt collected 2026-10-02 08:17:33 UTC 4,595 bytes, 1 lines download raw bytes

1"use strict";function QueryStringToJSON(){var t=location.search.slice(1).split("&"),n={};return t.forEach(function(t){t=t.split("=");t[0].length>0&&t[1].length>0&&(n[t[0]]=decodeURIComponent(t[1]||""))}),JSON.parse(JSON.stringify(n))}var getContent;$(document).ready(function(){$(".paginator").each(function(){var n=this,t=arguments;$(this).attr("data-ajax")!=null&&(bindPageNumberElements(this.id),bindPaginatorElements(this.id),$(this).data("ajaxRerender",function(i){var r=arguments.length<=1||arguments[1]===undefined?i:arguments[1];return function(){(r==undefined||r==null)&&(r=i);$(this).data("requestData",i);getContent(1,$(this),!0,r)}.apply(n,t)}))})});getContent=function(n,t,i,r){var f,e,c,o,l,s,u,h;for(t.attr("data-keep-page-history")!=null&&t.attr("data-keep-page-history").trim().toLowerCase()=="true"&&(f=QueryStringToJSON(),f.page=n,r!=null&&$.each(r,function(n,t){t==""?delete f[n]:f[n]=t}),e=$.param(f),history.pushState&&i&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+e,window.history.pushState({path:c},"",c))),o={page:n},e!=null&&(o.query=e),l=parseInt(t.attr("data-ajax-size")),s=t.data("requestData"),u=0;u<l;u++)h=t.attr("data-ajax-key-"+u),s!=null&&s[h]!=null&&t.attr("data-ajax-value-"+u,s[h]),o[h]=t.attr("data-ajax-value-"+u);$.ajax({url:t.attr("data-ajax"),data:JSON.stringify(o),contentType:"application/JSON",type:"POST",success:function(i){var r=i;t.attr("data-ajax-response-property")!=null&&t.attr("data-ajax-response-property").length&&(r=i[t.attr("data-ajax-response-property")]);t.attr("data-ajax-page-count-property")!=null&&t.attr("data-ajax-page-count-property").length&&t.attr("data-total-pages",i[t.attr("data-ajax-page-count-property")]);t.attr("data-ajax-success")!=null&&t.attr("data-ajax-success").length&&window[t.attr("data-ajax-success")](t,i);$("#"+t.attr("data-pagedsection")).html(r);$.contains(document.documentElement,t.get(0))?rerenderPager(t,n):rebindPager(t)},error:function(){t.attr("data-ajax-error")!=null&&t.attr("data-ajax-error").length&&window[t.attr("data-ajax-error")](t)},complete:function(){t.attr("data-ajax-complete")!=null&&t.attr("data-ajax-complete").length&&window[t.attr("data-ajax-complete")](t)}})};var rerenderPager=function(n,t){var r=n.find(".paginator-wrapper"),h=$(r.find(".page-number-link").get(0).cloneNode(!0)),o=$(r.find(".paginator-more").get(0).cloneNode(!0)),s=parseInt(n.attr("data-shown-pages")),f=parseInt(n.attr("data-total-pages")),u=parseInt(n.attr("data-leftright-pagecount")),c,l,e,i;if(f>0?(r.empty(),n.removeClass("d-none")):(n.addClass("d-none"),r.children(".page-number-link").not(":first").remove()),f<=s){for(i=1;i<=f;i++)r.append(buildPageItem(h,i,t));o.addClass("d-none");r.append(o.clone())}else{for(e=0,o.removeClass("d-none"),t<s-u?(c=s-u,l=u):t>f-s+u+1?(c=u,l=s-u):(c=u,e=s-2*u,l=u),i=1;i<=c;i++)r.append(buildPageItem(h,i,t));if(r.append(o.clone()),e>0){for(i=e>2?t-1:t;i<(e>2?t+e-1:t+e);i++)r.append(buildPageItem(h,i,t));r.append(o.clone())}for(i=f-l+1;i<=f;i++)r.append(buildPageItem(h,i,t))}t==1?n.find(".paginator-prev").addClass("paginator-no-prev-page"):n.find(".paginator-prev").removeClass("paginator-no-prev-page");t==f?n.find(".paginator-next").addClass("paginator-no-next-page"):n.find(".paginator-next").removeClass("paginator-no-next-page");h.remove();o.remove()},buildPageItem=function(n,t,i){var r=n.clone();return t==i?(r.removeClass("active"),r.addClass("current")):(r.addClass("active"),r.removeClass("current")),r.attr("href",r.attr("href").replace(/page=\d*/,"page="+t)),r.find(".page-number").text(t),r},rebindPager=function(n){bindPageNumberElements(n.get(0).id);bindPaginatorElements(n.get(0).id)},bindPageNumberElements=function(n){var t=$("#"+n);t.on("click",".page-number-link.current",function(n){return n.preventDefault(),n.stopPropagation(),!1});t.on("click",".page-number-link.active",function(n){n.preventDefault();n.stopPropagation();var i=parseInt($(this).find(".page-number").html());return getContent(i,t,!0,null),!1})},bindPaginatorElements=function(n){var t=$("#"+n);t.find(".paginator-prev").on("click",function(){var n=parseInt(t.find(".current .page-number").first().html());n-1>0&&getContent(n-1,t,!0,null)});t.find(".paginator-next").on("click",function(){var n=parseInt(t.find(".current .page-number").first().html());n+1<=parseInt(t.attr("data-total-pages"))&&getContent(n+1,t,!0,null)});t.attr("data-keep-page-history")!=null&&t.attr("data-keep-page-history").trim().toLowerCase()=="true"&&(window.onpopstate=function(){var n=QueryStringToJSON(),i=parseInt(n.page)||1;getContent(i,t,!1,null)})};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.