import{r as I,bm as Ae,a7 as et,a as ce,f as Y,j as f,bl as ne,S as ge,J as D,a3 as De,_ as Z,aO as Wt,bv as G,R as B,ak as je,V as he,dU as Dt,cW as jt,dV as Ft,dW as zt,aa as Fe,N as Ht,O as Vt,aH as Gt,C as ft,dX as Be,aS as bt,T as ue,bw as Pt,aA as Ut,ah as It,aQ as $t,G as qt,bA as Xt,aF as Yt,bL as Je,U as Zt,D as Jt,cS as Qt,bp as yt,aE as ea}from"./index.656c725e.js";import{u as ta}from"./uniqBy.73b96c75.js";function aa(o){var e=I(),t=I(!1);function r(){for(var a=arguments.length,n=new Array(a),l=0;lR?(T=i,L.value="x"):(T=y,L.value="y"),e(-T,-T)&&S.preventDefault()}var M=I({onTouchStart:d,onTouchMove:A,onTouchEnd:H,onWheel:E});function U(S){M.value.onTouchStart(S)}function K(S){M.value.onTouchMove(S)}function F(S){M.value.onTouchEnd(S)}function ve(S){M.value.onWheel(S)}je(function(){var S,i;document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",F,{passive:!1}),(S=o.value)===null||S===void 0||S.addEventListener("touchstart",U,{passive:!1}),(i=o.value)===null||i===void 0||i.addEventListener("wheel",ve,{passive:!1})}),et(function(){document.removeEventListener("touchmove",K),document.removeEventListener("touchend",F)})}function pt(o,e){var t=I(o);function r(a){var n=typeof a=="function"?a(t.value):a;n!==t.value&&e(n,t.value),t.value=n}return[t,r]}var xt={width:0,height:0,left:0,top:0,right:0},ba=function(){return{id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:{type:Object,default:void 0},editable:{type:Object},moreIcon:Fe.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:{type:Object,default:void 0},onTabClick:{type:Function},onTabScroll:{type:Function}}},Tt=ce({name:"TabNavList",inheritAttrs:!1,props:ba(),slots:["moreIcon","leftExtra","rightExtra","tabBarExtraContent"],emits:["tabClick","tabScroll"],setup:function(e,t){var r=t.attrs,a=t.slots,n=Bt(),l=n.tabs,c=n.prefixCls,u=I(),v=I(),s=I(),b=I(),g=ta(),O=B(g,2),P=O[0],j=O[1],k=Y(function(){return e.tabPosition==="top"||e.tabPosition==="bottom"}),z=pt(0,function(h,p){k.value&&e.onTabScroll&&e.onTabScroll({direction:h>p?"left":"right"})}),x=B(z,2),d=x[0],A=x[1],H=pt(0,function(h,p){!k.value&&e.onTabScroll&&e.onTabScroll({direction:h>p?"top":"bottom"})}),L=B(H,2),E=L[0],M=L[1],U=G(0),K=B(U,2),F=K[0],ve=K[1],S=G(0),i=B(S,2),y=i[0],T=i[1],W=G(null),R=B(W,2),_=R[0],xe=R[1],Se=G(null),w=B(Se,2),$=w[0],ie=w[1],Te=G(0),pe=B(Te,2),Ce=pe[0],se=pe[1],we=G(0),J=B(we,2),ze=J[0],Re=J[1],Ne=na(new Map),Oe=B(Ne,2),He=Oe[0],Pe=Oe[1],Le=ra(l,He),wt=Y(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ie=I(0),ke=I(0);De(function(){k.value?e.rtl?(Ie.value=0,ke.value=Math.max(0,F.value-_.value)):(Ie.value=Math.min(0,_.value-F.value),ke.value=0):(Ie.value=Math.min(0,$.value-y.value),ke.value=0)});var Ve=function(p){return pke.value?ke.value:p},at=I(),Rt=G(),nt=B(Rt,2),Ge=nt[0],it=nt[1],Ue=function(){it(Date.now())},$e=function(){clearTimeout(at.value)},rt=function(p,m){p(function(N){var C=Ve(N+m);return C})};fa(u,function(h,p){if(k.value){if(_.value>=F.value)return!1;rt(A,h)}else{if($.value>=y.value)return!1;rt(M,p)}return $e(),Ue(),!0}),he(Ge,function(){$e(),Ge.value&&(at.value=setTimeout(function(){it(0)},100))});var lt=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey,m=Le.value.get(p)||{width:0,height:0,left:0,right:0,top:0};if(k.value){var N=d.value;e.rtl?m.rightd.value+_.value&&(N=m.right+m.width-_.value):m.left<-d.value?N=-m.left:m.left+m.width>-d.value+_.value&&(N=-(m.left+m.width-_.value)),M(0),A(Ve(N))}else{var C=E.value;m.top<-E.value?C=-m.top:m.top+m.height>-E.value+$.value&&(C=-(m.top+m.height-$.value)),A(0),M(Ve(C))}},qe=I(0),Xe=I(0);De(function(){var h,p,m,N,C,q,X,be=Le.value;["top","bottom"].includes(e.tabPosition)?(p="width",C=_.value,q=F.value,X=Ce.value,m=e.rtl?"right":"left",N=Math.abs(d.value)):(p="height",C=$.value,q=F.value,X=ze.value,m="top",N=-E.value);var Q=C;q+X>C&&qN+Q){V=te-1;break}}for(var oe=0,ee=ye-1;ee>=0;ee-=1){var me=be.get(re[ee].key)||xt;if(me[m]0,oe=d.value+_.value