PageSourceSearch

https://www.how-green-works.de/_nuxt/IPT-DHKh.js

js how-green-works.de collected 2026-10-02 18:51:07 UTC 2,768 bytes, 1 lines download raw bytes

1import{d as $,B as R,L as V,aO as O,ad as T,x as c,e as s,m as d,k as j,w as m,f as k,az as b,g as y,bp as x,a0 as N,q as C,v as w,Q as z,Y as D,j as I,t as B,i as M,_ as S}from"./BnP3yFtX.js";const U={key:0,class:"pagination-navigation"},F={key:1,class:"pagination-navigation__dots"},Q=$({__name:"PaginationNavigation",props:{currentPage:{},maxPages:{},externalEventHandling:{type:Boolean}},emits:["onNavigate"],setup(o,{emit:E}){const i=o,H=E,v=R(),_=V(),P=O(),g=e=>{if(i.externalEventHandling||e===i.currentPage||e===0||e>i.maxPages)return null;const t={...v.query,page:e};return{path:v.path,query:t,hash:v.hash}},f=e=>{H("onNavigate",e),e!==i.currentPage&&window.scrollTo({top:0,behavior:"smooth"})},p=c(()=>i.currentPage>1?g(i.currentPage-1):null),h=c(()=>i.currentPage<i.maxPages?g(i.currentPage+1):null);T(c(()=>{const e=[];return p.value&&e.push({rel:"prev",href:P.origin+_.resolve(p.value).href}),h.value&&e.push({rel:"next",href:P.origin+_.resolve(h.value).href}),{link:e}}));const q=c(()=>L(i.currentPage,i.maxPages)),L=(e,t)=>{const l=[];if(t<=5){for(let a=1;a<=t;a++)l.push({page:a,label:a,current:a===e});return l}const n=new Set([1,t]);e===1||e===t?(n.add(2),n.add(t-1)):e===2?(n.add(2),n.add(3),n.add(t-1)):e===t-1?(n.add(2),n.add(t-2),n.add(t-1)):(n.add(e-1),n.add(e),n.add(e+1));const u=[...n].sort((a,r)=>a-r);for(let a=0;a<u.length;a++){const r=u[a];a>0&&r-u[a-1]>1&&l.push({page:void 0,label:"...",current:!1}),l.push({page:r,label:r,current:r===e})}return l};return(e,t)=>{const l=S;return o.maxPages>1?(s(),d("nav",U,[j(l,null,{fallback:m(()=>[...t[2]||(t[2]=[M("div",{style:{height:"1.75rem",width:"100%"}},null,-1)])]),default:m(()=>[o.currentPage>1?(s(),k(b(o.externalEventHandling?"button":y(x)),{key:0,to:p.value,class:"pagination-navigation__icon-item icon-chevron-left","aria-label":e.$t("pagination.prev"),rel:"prev",onClick:t[0]||(t[0]=N(n=>f(o.currentPage-1),["prevent"]))},null,8,["to","aria-label"])):C("",!0),(s(!0),d(w,null,z(q.value,(n,u)=>(s(),d(w,{key:u},[n.page!==void 0?(s(),k(b(n.current?"span":o.externalEventHandling?"button":y(x)),{key:0,to:g(n.page),class:D(["pagination-navigation__item",{"pagination-navigation__item--active":n.current}]),onClick:N(a=>n.current?null:f(n.page),["prevent"])},{default:m(()=>[I(B(n.label),1)]),_:2},1032,["to","class","onClick"])):(s(),d("span",F,B(n.label),1))],64))),128)),o.currentPage<o.maxPages?(s(),k(b(o.externalEventHandling?"button":y(x)),{key:1,to:h.value,rel:"next",class:"pagination-navigation__icon-item icon-chevron-right","aria-label":e.$t("pagination.next"),onClick:t[1]||(t[1]=N(n=>f(o.currentPage+1),["prevent"]))},null,8,["to","aria-label"])):C("",!0)]),_:1})])):C("",!0)}}}),A=Object.assign(Q,{__name:"MoleculesNavigationsPaginationNavigation"});export{A as default};

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.