1import{C as e,E as t,F as n,K as r,O as i,S as a,T as o,W as s,ct as c,et as l,it as u,k as d,n as f,st as p,ut as m,y as h}from"./vendor-vue-Bu-KQjoC.js";var g={key:0,class:`mt-4 flex flex-col items-center gap-3 text-[13px]`},_={class:`flex flex-wrap items-center justify-center gap-1.5`},v=[`disabled`],y={key:0,class:`px-1 text-muted`},b=[`onClick`],x=[`disabled`],S={class:`text-muted`},C=[`max`],w={type:`submit`,class:`nico-btn nico-btn-sm border border-border bg-base px-3 text-primary`},T=n({__name:`UserProfilePagination`,props:{page:{},totalPages:{}},emits:[`change`],setup(n,{emit:T}){let E=n,D=T,{t:O}=f(),k=u(``),A=o(()=>{let e=[],t=E.totalPages,n=E.page;if(t<=7)for(let n=1;n<=t;n++)e.push(n);else if(n<=4)e.push(1,2,3,4,5,`ellipsis`,t);else if(n>=t-3){e.push(1,`ellipsis`);for(let n=t-4;n<=t;n++)e.push(n)}else e.push(1,`ellipsis`,n-1,n,n+1,`ellipsis`,t);return e});function j(e){e<1||e>E.totalPages||e===E.page||D(`change`,e)}function M(){let e=Number(k.value);Number.isFinite(e)&&(j(e),k.value=``)}return(o,u)=>n.totalPages>1?(s(),d(`div`,g,[t(`div`,_,[t(`button`,{type:`button`,class:`nico-btn nico-btn-sm border border-border bg-base px-3 text-primary disabled:cursor-not-allowed disabled:opacity-40`,disabled:n.page<=1,onClick:u[0]||(u[0]=e=>j(n.page-1))},m(p(O)(`user.prevPage`)),9,v),(s(!0),d(e,null,r(A.value,(t,r)=>(s(),d(e,{key:`${t}-${r}`},[t===`ellipsis`?(s(),d(`span`,y,`â¦`)):(s(),d(`button`,{key:1,type:`button`,class:c([`nico-btn nico-btn-sm min-w-8 px-2`,t===n.page?`nico-btn-primary`:`border border-border bg-base text-primary`]),onClick:e=>j(t)},m(t),11,b))],64))),128)),t(`button`,{type:`button`,class:`nico-btn nico-btn-sm border border-border bg-base px-3 text-primary disabled:cursor-not-allowed disabled:opacity-40`,disabled:n.page>=n.totalPages,onClick:u[1]||(u[1]=e=>j(n.page+1))},m(p(O)(`user.nextPage`)),9,x)]),t(`form`,{class:`flex items-center gap-2`,onSubmit:a(M,[`prevent`])},[t(`label`,S,m(p(O)(`user.jumpTo`)),1),l(t(`input`,{"onUpdate:modelValue":u[2]||(u[2]=e=>k.value=e),type:`number`,min:`1`,max:n.totalPages,class:`h-8 w-16 rounded-[var(--radius-default)] border border-border bg-base px-2 text-primary`},null,8,C),[[h,k.value]]),t(`button`,w,m(p(O)(`user.go`)),1)],32)])):i(``,!0)}});
1export{T as t};
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.