import{v as k,U as Je,cd as Be,a as ce,f as Z,n as f,c3 as ie,Y as ye,Z as W,T as Le,_ as R,ce as G,ac as _,J as De,K as me,cf as Dt,b8 as Kt,cg as Wt,ch as jt,O as Ke,aa as Ft,S as $t,bd as zt,a1 as dt,ci as Ee,cj as ft,ck as Ct,cl as Ht,r as Vt,aw as Pt,W as Gt,c2 as Ut,a5 as qt,cm as Yt,c6 as Xe,R as Xt,a2 as Zt,cn as Jt,co as bt,c8 as Qt}from"./index.15bf95a0.js";import{u as ea}from"./useRefs.5c9b400e.js";function ta(o){var e=k(),t=k(!1);function r(){for(var a=arguments.length,n=new Array(a),u=0;uF?(x=i,N.value="x"):(x=y,N.value="y"),e(-x,-x)&&p.preventDefault()}var L=k({onTouchStart:d,onTouchMove:A,onTouchEnd:H,onWheel:B});function U(p){L.value.onTouchStart(p)}function D(p){L.value.onTouchMove(p)}function $(p){L.value.onTouchEnd(p)}function ve(p){L.value.onWheel(p)}De(function(){var p,i;document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",$,{passive:!1}),(p=o.value)===null||p===void 0||p.addEventListener("touchstart",U,{passive:!1}),(i=o.value)===null||i===void 0||i.addEventListener("wheel",ve,{passive:!1})}),Je(function(){document.removeEventListener("touchmove",D),document.removeEventListener("touchend",$)})}function gt(o,e){var t=k(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 pt={width:0,height:0,left:0,top:0,right:0},ca=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:Ke.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}}},St=ce({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:ca(),slots:["moreIcon","leftExtra","rightExtra","tabBarExtraContent"],emits:["tabClick","tabScroll"],setup:function(e,t){var r=t.attrs,a=t.slots,n=Bt(),u=n.tabs,v=n.prefixCls,l=k(),s=k(),c=k(),b=k(),g=ea(),M=_(g,2),I=M[0],j=M[1],E=Z(function(){return e.tabPosition==="top"||e.tabPosition==="bottom"}),z=gt(0,function(h,S){E.value&&e.onTabScroll&&e.onTabScroll({direction:h>S?"left":"right"})}),T=_(z,2),d=T[0],A=T[1],H=gt(0,function(h,S){!E.value&&e.onTabScroll&&e.onTabScroll({direction:h>S?"top":"bottom"})}),N=_(H,2),B=N[0],L=N[1],U=G(0),D=_(U,2),$=D[0],ve=D[1],p=G(0),i=_(p,2),y=i[0],x=i[1],K=G(null),F=_(K,2),C=F[0],Se=F[1],he=G(null),w=_(he,2),q=w[0],re=w[1],Te=G(0),ge=_(Te,2),xe=ge[0],se=ge[1],_e=G(0),Q=_(_e,2),We=Q[0],Ae=Q[1],Re=aa(new Map),pe=_(Re,2),je=pe[0],Fe=pe[1],we=ia(u,je),At=Z(function(){return"".concat(v.value,"-nav-operations-hidden")}),Ce=k(0),Pe=k(0);Le(function(){E.value?e.rtl?(Ce.value=0,Pe.value=Math.max(0,$.value-C.value)):(Ce.value=Math.min(0,C.value-$.value),Pe.value=0):(Ce.value=Math.min(0,q.value-y.value),Pe.value=0)});var $e=function(S){return SPe.value?Pe.value:S},et=k(),Rt=G(),tt=_(Rt,2),ze=tt[0],at=tt[1],He=function(){at(Date.now())},Ve=function(){clearTimeout(et.value)},nt=function(S,m){S(function(O){var P=$e(O+m);return P})};ua(l,function(h,S){if(E.value){if(C.value>=$.value)return!1;nt(A,h)}else{if(q.value>=y.value)return!1;nt(L,S)}return Ve(),He(),!0}),me(ze,function(){Ve(),ze.value&&(et.value=setTimeout(function(){at(0)},100))});var it=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey,m=we.value.get(S)||{width:0,height:0,left:0,right:0,top:0};if(E.value){var O=d.value;e.rtl?m.rightd.value+C.value&&(O=m.right+m.width-C.value):m.left<-d.value?O=-m.left:m.left+m.width>-d.value+C.value&&(O=-(m.left+m.width-C.value)),L(0),A($e(O))}else{var P=B.value;m.top<-B.value?P=-m.top:m.top+m.height>-B.value+q.value&&(P=-(m.top+m.height-q.value)),A(0),L($e(P))}},Ge=k(0),Ue=k(0);Le(function(){var h,S,m,O,P,Y,X,fe=we.value;["top","bottom"].includes(e.tabPosition)?(S="width",P=C.value,Y=$.value,X=xe.value,m=e.rtl?"right":"left",O=Math.abs(d.value)):(S="height",P=q.value,Y=$.value,X=We.value,m="top",O=-B.value);var ee=P;Y+X>P&&YO+ee){V=te-1;break}}for(var ue=0,J=be-1;J>=0;J-=1){var ne=fe.get(le[J].key)||pt;if(ne[m]0,ue=d.value+C.value<$.value):(ue=d.value<0,J=-d.value+C.value<$.value):(ne=B.value<0,ct=-B.value+q.value