import{g as k,Q as Je,d as de,h as Z,b as f,O as ye,ai as W,T as Le,ah as A,au as _,x as De,P as me,ar as Ke,M as Kt,N as Wt,aq as dt,bH as Ee,aE as Ft,ay as $t,aw as zt,bs as Ht,Y as Xe,Z as jt,ax as Gt,aF as qt}from"./index-82b07f49.js";import{w as Be,i as Pt}from"./_plugin-vue_export-helper-f81f33f1.js";import{K as ie,q as ft,J as Vt}from"./shallowequal-17b27246.js";import{E as Ut,M as Yt,_ as Xt,D as Zt,y as It,m as Jt,j as Qt,k as ea,n as ta,z as aa}from"./Col-5d52aed9.js";import{a as q,i as na,u as bt}from"./useState-e0a5bff5.js";import{R as mt,c as ia,o as ra}from"./vnode-007df887.js";import{u as la}from"./useRefs-e9385981.js";function oa(n){var e=k(),t=k(!1);function r(){for(var a=arguments.length,i=new Array(a),u=0;u$?(T=o,N.value="x"):(T=y,N.value="y"),e(-T,-T)&&p.preventDefault()}var L=k({onTouchStart:d,onTouchMove:R,onTouchEnd:j,onWheel:B});function V(p){L.value.onTouchStart(p)}function D(p){L.value.onTouchMove(p)}function z(p){L.value.onTouchEnd(p)}function ce(p){L.value.onWheel(p)}De(function(){var p,o;document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",z,{passive:!1}),(p=n.value)===null||p===void 0||p.addEventListener("touchstart",V,{passive:!1}),(o=n.value)===null||o===void 0||o.addEventListener("wheel",ce,{passive:!1})}),Je(function(){document.removeEventListener("touchmove",D),document.removeEventListener("touchend",z)})}function pt(n,e){var t=k(n);function r(a){var i=typeof a=="function"?a(t.value):a;i!==t.value&&e(i,t.value),t.value=i}return[t,r]}function ya(n,e,t,r){if(!ft(n))return n;e=It(e,n);for(var a=-1,i=e.length,u=i-1,c=n;c!=null&&++aS?"left":"right"})}),x=_(H,2),d=x[0],R=x[1],j=pt(0,function(h,S){!E.value&&e.onTabScroll&&e.onTabScroll({direction:h>S?"top":"bottom"})}),N=_(j,2),B=N[0],L=N[1],V=q(0),D=_(V,2),z=D[0],ce=D[1],p=q(0),o=_(p,2),y=o[0],T=o[1],K=q(null),$=_(K,2),C=$[0],Se=$[1],he=q(null),w=_(he,2),U=w[0],re=w[1],xe=q(0),ge=_(xe,2),Te=ge[0],ve=ge[1],_e=q(0),Q=_(_e,2),We=Q[0],Re=Q[1],Ae=ua(new Map),pe=_(Ae,2),Fe=pe[0],$e=pe[1],we=va(u,Fe),At=Z(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ce=k(0),Pe=k(0);Le(function(){E.value?e.rtl?(Ce.value=0,Pe.value=Math.max(0,z.value-C.value)):(Ce.value=Math.min(0,C.value-z.value),Pe.value=0):(Ce.value=Math.min(0,U.value-y.value),Pe.value=0)});var ze=function(S){return SPe.value?Pe.value:S},et=k(),wt=q(),tt=_(wt,2),He=tt[0],at=tt[1],je=function(){at(Date.now())},Ge=function(){clearTimeout(et.value)},nt=function(S,m){S(function(O){var P=ze(O+m);return P})};ma(l,function(h,S){if(E.value){if(C.value>=z.value)return!1;nt(R,h)}else{if(U.value>=y.value)return!1;nt(L,S)}return Ge(),je(),!0}),me(He,function(){Ge(),He.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),R(ze(O))}else{var P=B.value;m.top<-B.value?P=-m.top:m.top+m.height>-B.value+U.value&&(P=-(m.top+m.height-U.value)),R(0),L(ze(P))}},qe=k(0),Ve=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=z.value,X=Te.value,m=e.rtl?"right":"left",O=Math.abs(d.value)):(S="height",P=U.value,Y=z.value,X=We.value,m="top",O=-B.value);var ee=P;Y+X>P&&YO+ee){G=te-1;break}}for(var ue=0,J=be-1;J>=0;J-=1){var ne=fe.get(le[J].key)||St;if(ne[m]0,ue=d.value+C.value