You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/Pagination.1263479e.js

253 lines
45 KiB

import{d as se,h as n,r as m,aD as Bt,aE as _t,a1 as lt,aF as je,aG as $t,aH as At,n as re,l as x,m as D,p as Ze,o as Y,q as Me,t as ve,aI as Et,s as B,aJ as Ve,S as De,aK as st,v as Qe,y as qe,aL as Lt,an as He,aM as Ye,aa as Ge,aN as Dt,aO as jt,u as dt,aP as Vt,g as Ne,aQ as Nt,I as ut,aR as Wt,f as Ut,aS as Kt,aT as Je,aU as Ht,aV as Zt,aW as Jt,aX as qt,aY as Qt,aZ as Yt,a_ as Xe,a$ as Gt,k as U,b0 as Xt,x as en,K as tn,_ as nn,N as Oe}from"./index.f480f018.js";import{N as on}from"./Skeleton.57e98fe3.js";var et=se({name:"Backward",render(){return n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M12.2674 15.793C11.9675 16.0787 11.4927 16.0672 11.2071 15.7673L6.20572 10.5168C5.9298 10.2271 5.9298 9.7719 6.20572 9.48223L11.2071 4.23177C11.4927 3.93184 11.9675 3.92031 12.2674 4.206C12.5673 4.49169 12.5789 4.96642 12.2932 5.26634L7.78458 9.99952L12.2932 14.7327C12.5789 15.0326 12.5673 15.5074 12.2674 15.793Z",fill:"currentColor"}))}}),tt=se({name:"FastBackward",render(){return n("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},n("g",{fill:"currentColor","fill-rule":"nonzero"},n("path",{d:"M8.73171,16.7949 C9.03264,17.0795 9.50733,17.0663 9.79196,16.7654 C10.0766,16.4644 10.0634,15.9897 9.76243,15.7051 L4.52339,10.75 L17.2471,10.75 C17.6613,10.75 17.9971,10.4142 17.9971,10 C17.9971,9.58579 17.6613,9.25 17.2471,9.25 L4.52112,9.25 L9.76243,4.29275 C10.0634,4.00812 10.0766,3.53343 9.79196,3.2325 C9.50733,2.93156 9.03264,2.91834 8.73171,3.20297 L2.31449,9.27241 C2.14819,9.4297 2.04819,9.62981 2.01448,9.8386 C2.00308,9.89058 1.99707,9.94459 1.99707,10 C1.99707,10.0576 2.00356,10.1137 2.01585,10.1675 C2.05084,10.3733 2.15039,10.5702 2.31449,10.7254 L8.73171,16.7949 Z"}))))}}),nt=se({name:"FastForward",render(){return n("svg",{viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},n("g",{fill:"currentColor","fill-rule":"nonzero"},n("path",{d:"M11.2654,3.20511 C10.9644,2.92049 10.4897,2.93371 10.2051,3.23464 C9.92049,3.53558 9.93371,4.01027 10.2346,4.29489 L15.4737,9.25 L2.75,9.25 C2.33579,9.25 2,9.58579 2,10.0000012 C2,10.4142 2.33579,10.75 2.75,10.75 L15.476,10.75 L10.2346,15.7073 C9.93371,15.9919 9.92049,16.4666 10.2051,16.7675 C10.4897,17.0684 10.9644,17.0817 11.2654,16.797 L17.6826,10.7276 C17.8489,10.5703 17.9489,10.3702 17.9826,10.1614 C17.994,10.1094 18,10.0554 18,10.0000012 C18,9.94241 17.9935,9.88633 17.9812,9.83246 C17.9462,9.62667 17.8467,9.42976 17.6826,9.27455 L11.2654,3.20511 Z"}))))}}),ot=se({name:"Forward",render(){return n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M7.73271 4.20694C8.03263 3.92125 8.50737 3.93279 8.79306 4.23271L13.7944 9.48318C14.0703 9.77285 14.0703 10.2281 13.7944 10.5178L8.79306 15.7682C8.50737 16.0681 8.03263 16.0797 7.73271 15.794C7.43279 15.5083 7.42125 15.0336 7.70694 14.7336L12.2155 10.0005L7.70694 5.26729C7.42125 4.96737 7.43279 4.49264 7.73271 4.20694Z",fill:"currentColor"}))}}),rt=se({name:"More",render(){return n("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},n("g",{fill:"currentColor","fill-rule":"nonzero"},n("path",{d:"M4,7 C4.55228,7 5,7.44772 5,8 C5,8.55229 4.55228,9 4,9 C3.44772,9 3,8.55229 3,8 C3,7.44772 3.44772,7 4,7 Z M8,7 C8.55229,7 9,7.44772 9,8 C9,8.55229 8.55229,9 8,9 C7.44772,9 7,8.55229 7,8 C7,7.44772 7.44772,7 8,7 Z M12,7 C12.5523,7 13,7.44772 13,8 C13,8.55229 12.5523,9 12,9 C11.4477,9 11,8.55229 11,8 C11,7.44772 11.4477,7 12,7 Z"}))))}});const pe="v-hidden",rn=At("[v-hidden]",{display:"none!important"});var at=se({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateOverflow:Function},setup(e,{slots:r}){const d=m(null),f=m(null);function u(){const{value:g}=d,{getCounter:s,getTail:R}=e;let p;if(s!==void 0?p=s():p=f.value,!g||!p)return;p.hasAttribute(pe)
position: relative;
z-index: auto;
box-shadow: none;
width: 100%;
max-width: 100%;
display: inline-block;
vertical-align: bottom;
border-radius: var(--n-border-radius);
min-height: var(--n-height);
line-height: 1.5;
font-size: var(--n-font-size);
`,[x("base-loading",`
color: var(--n-loading-color);
`),x("base-selection-tags","min-height: var(--n-height);"),D("border, state-border",`
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
pointer-events: none;
border: var(--n-border);
border-radius: inherit;
transition:
box-shadow .3s var(--n-bezier),
border-color .3s var(--n-bezier);
`),D("state-border",`
z-index: 1;
border-color: #0000;
`),x("base-suffix",`
cursor: pointer;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 10px;
`,[D("arrow",`
font-size: var(--n-arrow-size);
color: var(--n-arrow-color);
transition: color .3s var(--n-bezier);
`)]),x("base-selection-overlay",`
display: flex;
align-items: center;
white-space: nowrap;
pointer-events: none;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: var(--n-padding-single);
transition: color .3s var(--n-bezier);
`,[D("wrapper",`
flex-basis: 0;
flex-grow: 1;
overflow: hidden;
text-overflow: ellipsis;
`)]),x("base-selection-placeholder",`
color: var(--n-placeholder-color);
`),x("base-selection-tags",`
cursor: pointer;
outline: none;
box-sizing: border-box;
position: relative;
z-index: auto;
display: flex;
padding: var(--n-padding-multiple);
flex-wrap: wrap;
align-items: center;
width: 100%;
vertical-align: bottom;
background-color: var(--n-color);
border-radius: inherit;
transition:
color .3s var(--n-bezier),
box-shadow .3s var(--n-bezier),
background-color .3s var(--n-bezier);
`),x("base-selection-label",`
height: var(--n-height);
display: inline-flex;
width: 100%;
vertical-align: bottom;
cursor: pointer;
outline: none;
z-index: auto;
box-sizing: border-box;
position: relative;
transition:
color .3s var(--n-bezier),
box-shadow .3s var(--n-bezier),
background-color .3s var(--n-bezier);
border-radius: inherit;
background-color: var(--n-color);
align-items: center;
`,[x("base-selection-input",`
line-height: inherit;
outline: none;
cursor: pointer;
box-sizing: border-box;
border:none;
width: 100%;
padding: var(--n-padding-single);
background-color: #0000;
color: var(--n-text-color);
transition: color .3s var(--n-bezier);
caret-color: var(--n-caret-color);
`,[D("content",`
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`)]),D("render-label",`
color: var(--n-text-color);
`)]),Ze("disabled",[re("&:hover",[D("state-border",`
box-shadow: var(--n-box-shadow-hover);
border: var(--n-border-hover);
`)]),Y("focus",[D("state-border",`
box-shadow: var(--n-box-shadow-focus);
border: var(--n-border-focus);
`)]),Y("active",[D("state-border",`
box-shadow: var(--n-box-shadow-active);
border: var(--n-border-active);
`),x("base-selection-label","background-color: var(--n-color-active);"),x("base-selection-tags","background-color: var(--n-color-active);")])]),Y("disabled","cursor: not-allowed;",[D("arrow",`
color: var(--n-arrow-color-disabled);
`),x("base-selection-label",`
cursor: not-allowed;
background-color: var(--n-color-disabled);
`,[x("base-selection-input",`
cursor: not-allowed;
color: var(--n-text-color-disabled);
`),D("render-label",`
color: var(--n-text-color-disabled);
`)]),x("base-selection-tags",`
cursor: not-allowed;
background-color: var(--n-color-disabled);
`),x("base-selection-placeholder",`
cursor: not-allowed;
color: var(--n-placeholder-color-disabled);
`)]),x("base-selection-input-tag",`
height: calc(var(--n-height) - 6px);
line-height: calc(var(--n-height) - 6px);
outline: none;
display: none;
position: relative;
margin-bottom: 3px;
max-width: 100%;
vertical-align: bottom;
`,[D("input",`
min-width: 1px;
padding: 0;
background-color: #0000;
outline: none;
border: none;
max-width: 100%;
overflow: hidden;
width: 1em;
line-height: inherit;
cursor: pointer;
color: var(--n-text-color);
caret-color: var(--n-caret-color);
`),D("mirror",`
position: absolute;
left: 0;
top: 0;
white-space: pre;
visibility: hidden;
user-select: none;
opacity: 0;
`)]),["warning","error"].map(e=>Y(`${e}-status`,[D("state-border",`border: var(--n-border-${e});`),Ze("disabled",[re("&:hover",[D("state-border",`
box-shadow: var(--n-box-shadow-hover-${e});
border: var(--n-border-hover-${e});
`)]),Y("active",[D("state-border",`
box-shadow: var(--n-box-shadow-active-${e});
border: var(--n-border-active-${e});
`),x("base-selection-label",`background-color: var(--n-color-active-${e});`),x("base-selection-tags",`background-color: var(--n-color-active-${e});`)]),Y("focus",[D("state-border",`
box-shadow: var(--n-box-shadow-focus-${e});
border: var(--n-border-focus-${e});
`)])])]))]),x("base-selection-popover",`
margin-bottom: -3px;
display: flex;
flex-wrap: wrap;
`),x("base-selection-tag-wrapper",`
max-width: 100%;
display: inline-flex;
padding: 0 7px 3px 0;
`,[re("&:last-child","padding-right: 0;"),x("tag",`
font-size: 14px;
max-width: 100%;
`,[D("content",`
line-height: 1.25;
text-overflow: ellipsis;
overflow: hidden;
`)])])]),ln=se({name:"InternalSelection",props:Object.assign(Object.assign({},Me.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeyup:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean}),setup(e){const r=m(null),d=m(null),f=m(null),u=m(null),w=m(null),g=m(null),s=m(null),R=m(null),p=m(null),b=m(null),M=m(!1),S=m(!1),P=m(!1),C=Me("InternalSelection","-internal-selection",an,Et,e,ve(e,"clsPrefix")),y=B(()=>e.clearable&&!e.disabled&&(P.value||e.active)),$=B(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Ve(e.selectedOption.label,e.selectedOption,!0):e.placeholder),O=B(()=>{const o=e.selectedOption;if(!!o)return o.label}),A=B(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function j(){var o;const{value:l}=r;if(l){const{value:_}=d;_&&(_.style.width=`${l.offsetWidth}px`,e.maxTagCount!=="responsive"&&((o=p.value)===null||o===void 0||o.sync()))}}function K(){const{value:o}=b;o&&(o.style.display="none")}function E(){const{value:o}=b;o&&(o.style.display="inline-block")}De(ve(e,"active"),o=>{o||K()}),De(ve(e,"pattern"),()=>{e.multiple&&je(j)});function k(o){const{onFocus:l}=e;l&&l(o)}function W(o){const{onBlur:l}=e;l&&l(o)}function H(o){const{onDeleteOption:l}=e;l&&l(o)}function V(o){const{onClear:l}=e;l&&l(o)}function I(o){const{onPatternInput:l}=e;l&&l(o)}function ae(o){var l;(!o.relatedTarget||!(!((l=f.value)===null||l===void 0)&&l.contains(o.relatedTarget)))&&k(o)}function de(o){var l;!((l=f.value)===null||l===void 0)&&l.contains(o.relatedTarget)||W(o)}function ue(o){V(o)}function ne(){P.value=!0}function ie(){P.value=!1}function ee(o){!e.active||!e.filterable||o.target!==d.value&&o.preventDefault()}function le(o){H(o)}function G(o){if(o.code==="Backspace"&&!Z.value&&!e.pattern.length){const{selectedOptions:l}=e;l!=null&&l.length&&le(l[l.length-1])}}const Z=m(!1);let J=null;function q(o){const{value:l}=r;if(l){const _=o.target.value;l.textContent=_,j()}Z.value?J=o:I(o)}function X(){Z.value=!0}function a(){Z.value=!1,I(J),J=null}function c(o){var l;S.value=!0,(l=e.onPatternFocus)===null||l===void 0||l.call(e,o)}function L(o){var l;S.value=!1,(l=e.onPatternBlur)===null||l===void 0||l.call(e,o)}function N(){var o,l;if(e.filterable)S.value=!1,(o=g.value)===null||o===void 0||o.blur(),(l=d.value)===null||l===void 0||l.blur();else if(e.multiple){const{value:_}=u;_==null||_.blur()}else{const{value:_}=w;_==null||_.blur()}}function Q(){var o,l,_;e.filterable?(S.value=!1,(o=g.value)===null||o===void 0||o.focus()):e.multiple?(l=u.value)===null||l===void 0||l.focus():(_=w.value)===null||_===void 0||_.focus()}function me(){const{value:o}=d;o&&(E(),o.focus())}function ce(){const{value:o}=d;o&&o.blur()}function Ie(o){const{value:l}=s;l&&l.setTextContent(`+${o}`)}function Re(){const{value:o}=R;return o}function Fe(){return d.value}let he=null;function be(){he!==null&&window.clearTimeout(he)}function ke(){e.disabled||e.active||(be(),he=window.setTimeout(()=>{M.value=!0},100))}function Te(){be()}function ze(o){o||(be(),M.value=!1)}lt(()=>{st(()=>{const o=g.value;!o||(o.tabIndex=e.disabled||S.value?-1:0)})});const{inlineThemeDisabled:we}=e,Ce=B(()=>{const{size:o}=e,{common:{cubicBezierEaseInOut:l},self:{borderRadius:_,color:Be,placeholderColor:_e,textColor:$e,paddingSingle:xe,paddingMultiple:ye,caretColor:Ae,colorDisabled:ge,textColorDisabled:Ee,placeholderColorD
z-index: auto;
outline: none;
width: 100%;
position: relative;
`),x("select-menu",`
margin: 4px 0;
box-shadow: var(--n-menu-box-shadow);
`,[jt()])]);const hn=Object.assign(Object.assign({},Me.props),{to:Je.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:{type:Function,default:fn},placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:{type:Function,default:e=>({label:e,value:e})},fallbackOption:{type:[Function,Boolean],default:()=>e=>({label:String(e),value:e})},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,onChange:[Function,Array],items:Array});var bn=se({name:"Select",props:hn,setup(e){const{mergedClsPrefixRef:r,mergedBorderedRef:d,namespaceRef:f,inlineThemeDisabled:u}=dt(e),w=Me("Select","-select",vn,Vt,e,r),g=m(e.defaultValue),s=ve(e,"value"),R=Ne(s,g),p=m(!1),b=m(""),M=B(()=>Nt(I.value,dn)),S=B(()=>cn(V.value)),P=m(!1),C=Ne(ve(e,"show"),P),y=m(null),$=m(null),O=m(null),{localeRef:A}=ut("Select"),j=B(()=>{var t;return(t=e.placeholder)!==null&&t!==void 0?t:A.value.placeholder}),K=Wt(e,["items","options"]),E=m([]),k=m([]),W=m(new Map),H=B(()=>{const{fallbackOption:t}=e;return t?i=>Object.assign(t(i),{value:i}):!1}),V=B(()=>k.value.concat(E.value).concat(K.value)),I=B(()=>{if(e.remote)return K.value;{const{value:t}=V,{value:i}=b;if(!i.length||!e.filterable)return t;{const{filter:v}=e;return un(t,v,i)}}});function ae(t){const i=e.remote,{value:v}=W,{value:F}=S,{value:h}=H,T=[];return t.forEach(z=>{if(F.has(z))T.push(F.get(z));else if(i&&v.has(z))T.push(v.get(z));else if(h){const fe=h(z);fe&&T.push(fe)}}),T}const de=B(()=>{if(e.multiple){const{value:t}=R;return Array.isArray(t)?ae(t):[]}return null}),ue=B(()=>{const{value:t}=R;return!e.multiple&&!Array.isArray(t)?t===null?null:ae([t])[0]||null:null}),ne=Ut(e),{mergedSizeRef:ie,mergedDisabledRef:ee,mergedStatusRef:le}=ne;function G(t,i){const{onChange:v,"onUpdate:value":F,onUpdateValue:h}=e,{nTriggerFormChange:T,nTriggerFormInput:z}=ne;v&&U(v,t,i),h&&U(h,t,i),F&&U(F,t,i),g.value=t,T(),z()}function Z(t){const{onBlur:i}=e,{nTriggerFormBlur:v}=ne;i&&U(i,t),v()}function J(){const{onClear:t}=e;t&&U(t)}function q(t){const{onFocus:i}=e,{nTriggerFormFocus:v}=ne;i&&U(i,t),v()}function X(t){const{onSearch:i}=e;i&&U(i,t)}function a(t){const{onScroll:i}=e;i&&U(i,t)}function c(){var t;const{remote:i,multiple:v}=e;if(i){const{value:F}=W;if(v)(t=de.value)===null||t===void 0||t.forEach(h=>{F.set(h.value,h)});else{const h=ue.value;h&&F.set(h.value,h)}}}function L(t){const{onUpdateShow:i,"onUpdate:show":v}=e;i&&U(i,t),v&&U(v,t),P.value=t}function N(){ee.value||(L(!0),P.value=!0,e.filterable&&Ae())}function Q(){L(!1)}function me(){b.value="",k.value=[]}const ce=m(!1);function Ie(){e.filterable&&(ce.value=!0)}function Re(){e.filterable&&(ce.value=!1,C.value||me())}function Fe(){ee.value||(C.value?e.filterable||Q():N())}function he(t){var i,v;!((v=(i=O.value)===null||i===void 0?void 0:i.selfRef)===null||v===void 0)&&v.contains(t.relatedTarget)||(p.value=!1,Z(t),Q())}function be(t){q(t),p.value=!0}function ke(t){p.value=!0}function Te(t){var i;!((i=y.value)===null||i===void 0)&&i.$el.contains(t.relatedTarget)||(p.value=!1,Z(t),Q())}function ze(){var t;(t=y.value)===null||t===void 0||t.focus(),Q()}function we(t){var i;C.value&&(!((i=y.value)===null||i===void 0)&
display: flex;
vertical-align: middle;
font-size: var(--n-item-font-size);
flex-wrap: nowrap;
`,[x("pagination-prefix",`
display: flex;
align-items: center;
margin: var(--n-prefix-margin);
`),x("pagination-suffix",`
display: flex;
align-items: center;
margin: var(--n-suffix-margin);
`),re("> *:not(:first-child)",{margin:"var(--n-item-margin)"}),x("select",{width:"var(--n-select-width)"}),re("&.transition-disabled",[x("pagination-item",{transition:"none!important"})]),x("pagination-quick-jumper",`
white-space: nowrap;
display: flex;
color: var(--n-jumper-text-color);
transition: color .3s var(--n-bezier);
align-items: center;
font-size: var(--n-jumter-font-size);
`,[x("input",`
margin: var(--n-input-margin);
width: var(--n-input-width);
`)]),x("pagination-item",`
position: relative;
cursor: pointer;
user-select: none;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
min-width: var(--n-item-size);
height: var(--n-item-size);
padding: var(--n-item-padding);
background-color: var(--n-item-color);
color: var(--n-item-text-color);
border-radius: var(--n-item-border-radius);
border: var(--n-item-border);
fill: var(--n-button-icon-color);
transition:
color .3s var(--n-bezier),
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier),
fill .3s var(--n-bezier);
`,[Y("button",`
background: var(--n-button-color);
color: var(--n-button-icon-color);
border: var(--n-button-border);
`,[x("base-icon",`
font-size: var(--n-button-icon-size);
`)]),Ze("disabled",[re("&:hover",{background:"var(--n-item-color-hover)",color:"var(--n-item-text-color-hover)",border:"var(--n-item-border-hover)"},[Y("button",{background:"var(--n-button-color-hover)",border:"var(--n-button-border-hover)",color:"var(--n-button-icon-color-hover)"})]),re("&:active",{background:"var(--n-item-color-pressed)",color:"var(--n-item-text-color-pressed)",border:"var(--n-item-border-pressed)"},[Y("button",{background:"var(--n-button-color-pressed)",border:"var(--n-button-border-pressed)",color:"var(--n-button-icon-color-pressed)"})]),Y("active",{background:"var(--n-item-color-active)",color:"var(--n-item-text-color-active)",border:"var(--n-item-border-active)"},[re("&:hover",{background:"var(--n-item-color-active-hover)"})])]),Y("disabled",`
cursor: not-allowed;
color: var(--n-item-text-color-disabled);
`,[Y("active, button",{backgroundColor:"var(--n-item-color-disabled)",border:"var(--n-item-border-disabled)"})])]),Y("disabled",{cursor:"not-allowed"},[x("pagination-quick-jumper",{color:"var(--n-jumper-text-color-disabled)"})])]);const Cn=Object.assign(Object.assign({},Me.props),{page:Number,defaultPage:{type:Number,default:1},itemCount:Number,pageCount:Number,defaultPageCount:{type:Number,default:1},showSizePicker:Boolean,pageSize:Number,defaultPageSize:{type:Number,default:10},pageSizes:{type:Array,default(){return[10]}},showQuickJumper:Boolean,disabled:Boolean,pageSlot:{type:Number,default:9},prev:Function,next:Function,prefix:Function,suffix:Function,label:Function,"onUpdate:page":[Function,Array],onUpdatePage:[Function,Array],"onUpdate:pageSize":[Function,Array],onUpdatePageSize:[Function,Array],onPageSizeChange:[Function,Array],onChange:[Function,Array]});var Sn=se({name:"Pagination",props:Cn,setup(e){const{mergedComponentPropsRef:r,mergedClsPrefixRef:d,inlineThemeDisabled:f,mergedRtlRef:u}=dt(e),w=Me("Pagination","-pagination",wn,Xt,e,d),{localeRef:g}=ut("Pagination"),s=m(null),R=m(null),p=m(""),b=m(e.defaultPage),M=m(e.defaultPageSize),S=Ne(ve(e,"page"),b),P=Ne(ve(e,"pageSize"),M),C=B(()=>{const{itemCount:a}=e;if(a!==void 0)return Math.max(1,Math.ceil(a/P.value));const{pageCount:c}=e;return c!==void 0?c:1}),y=m(!1),$=m(!1),O=B(()=>{const a=g.value.selectionSuffix;return e.pageSizes.map(c=>typeof c=="number"?{label:`${c} / ${a}`,value:c}:c)}),A=B(()=>{var a,c;return((c=(a=r==null?void 0:r.value)===null||a===void 0?void 0:a.Pagination)===null||c===void 0?void 0:c.inputSize)||"small"}),j=B(()=>{var a,c;return((c=(a=r==null?void 0:r.value)===null||a===void 0?void 0:a.Pagination)===null||c===void 0?void 0:c.selectSize)||"small"}),K=B(()=>(S.value-1)*P.value),E=B(()=>{const a=S.value*P.value-1,{itemCount:c}=e;return c!==void 0&&a>c?c:a}),k=B(()=>{const{itemCount:a}=e;return a!==void 0?a:(e.pageCount||1)*P.value}),W=en("Pagination",u,d),H=()=>{je(()=>{var a;const{value:c}=s;!c||(c.classList.add("transition-disabled"),(a=s.value)===null||a===void 0||a.offsetWidth,c.classList.remove("transition-disabled"))})};function V(a){if(a===S.value)return;const{"onUpdate:page":c,onUpdatePage:L,onChange:N}=e;c&&U(c,a),L&&U(L,a),N&&U(N,a),b.value=a}function I(a){if(a===P.value)return;const{"onUpdate:pageSize":c,onUpdatePageSize:L,onPageSizeChange:N}=e;c&&U(c,a),L&&U(L,a),N&&U(N,a),M.value=a,C.value<S.value&&V(C.value)}function ae(){if(e.disabled)return;const a=Math.min(S.value+1,C.value);V(a)}function de(){if(e.disabled)return;const a=Math.max(S.value-1,1);V(a)}function ue(){if(e.disabled)return;const a=Math.min(S.value+(e.pageSlot-4),C.value);V(a)}function ne(){if(e.disabled)return;const a=Math.max(S.value-(e.pageSlot-4),1);V(a)}function ie(a){I(a)}function ee(a){var c;if(a.code==="Enter"||a.code==="NumpadEnter"){const L=parseInt(p.value);!Number.isNaN(L)&&L>=1&&L<=C.value&&(V(L),p.value="",(c=R.value)===null||c===void 0||c.blur())}}function le(a){if(!e.disabled)switch(a.type){case"page":V(a.label);break;case"fast-backward":ne();break;case"fast-forward":ue();break}}function G(a){if(!e.disabled){switch(a.type){case"fast-backward":$.value=!0;break;case"fast-forward":y.value=!0;break;default:return}H()}}function Z(a){if(!e.disabled){switch(a.type){case"fast-backward":$.value=!1;break;case"fast-forward":y.value=!1;break;default:return}H()}}function J(a){p.value=a}st(()=>{S.value,P.value,H()});const q=B(()=>{const{self:{itemSize:a,itemPadding:c,itemMargin:L,itemMarginRtl:N,inputWidth:Q,selectWidth:me,inputMargin:ce,inputMarginRtl:Ie,selectMargin:Re,buttonBorder:Fe,buttonBorderHover:he,buttonBorderPressed:be,buttonIconColor:ke,buttonIconColorHover:Te,buttonIconColorPressed:ze,buttonIconSize:we,itemTextColor:Ce,itemTextColorHover:te,itemTextColorPressed:o,itemTextColorActive:l,itemTextColorDisabled:_,itemColor:Be,itemColorHover:_e,itemColorPressed:$e,itemColorActive:xe,itemColorActiveHover:ye,itemColorDisabled:Ae,itemBorder:ge,itemBorderHover:Ee,itemBorderPressed:Se,itemBorderActive:oe,itemBorderDisabled:t,itemBorderRadius:i,itemFontSize