<<<<<<<< HEAD:dist/assets/index-e5198b82.js import{aH as he,aI as Ce,aE as Xe,i as A,a0 as Ze,z as Ke,aW as ke,l as Ie,aG as $e,j as Z,t as H,n as Re,am as N,d as K,aK as Be,O as oe,E as S,aU as _e,A as Pe,aM as Ue,w as B,ai as be,g as y,aT as le,Y as G,D as q,v as W,aw as ge,K as Ve,ah as je,ac as Ae,an as J,ao as ze,ap as Fe,aX as Ge,o as me,aY as Oe,aZ as Ee,y as L,aj as qe,a_ as F,ak as de,ag as fe,aJ as Me,G as ye,a$ as Je,b0 as Qe,b1 as xe,m as pe,p as et,ar as tt,b2 as at,ae as De,aP as nt,x as it,ax as lt,$ as ot,ay as st}from"./index-6ef77773.js";import{T as rt}from"./use-tab-status-875823de.js";function ct(e,r,u){let o=0;const n=e.scrollLeft,t=u===0?1:Math.round(u*1e3/16);function d(){e.scrollLeft+=(r-n)/t,++or||!t&&nr?he(f):o&&he(o)}f()}function dt(){const e=A([]),r=[];return Ze(()=>{e.value=[]}),[e,o=>(r[o]||(r[o]=n=>{e.value[o]=n}),r[o])]}function Ne(e,r){if(!Ke||!window.IntersectionObserver)return;const u=new IntersectionObserver(t=>{r(t[0].intersectionRatio>0)},{root:document.body}),o=()=>{e.value&&u.observe(e.value)},n=()=>{e.value&&u.unobserve(e.value)};ke(n),Ie(n),$e(o)}const[ft,vt]=Z("sticky"),ht={zIndex:H,position:Re("top"),container:Object,offsetTop:N(0),offsetBottom:N(0)};var gt=K({name:ft,props:ht,emits:["scroll","change"],setup(e,{emit:r,slots:u}){const o=A(),n=Be(o),t=oe({fixed:!1,width:0,height:0,transform:0}),d=S(()=>_e(e.position==="top"?e.offsetTop:e.offsetBottom)),g=S(()=>{const{fixed:c,height:m,width:C}=t;if(c)return{width:`${C}px`,height:`${m}px`}}),f=S(()=>{if(!t.fixed)return;const c=Pe(Ue(e.zIndex),{width:`${t.width}px`,height:`${t.height}px`,[e.position]:`${d.value}px`});return t.transform&&(c.transform=`translate3d(0, ${t.transform}px, 0)`),c}),w=c=>r("scroll",{scrollTop:c,isFixed:t.fixed}),l=()=>{if(!o.value||le(o))return;const{container:c,position:m}=e,C=G(o),b=Ce(window);if(t.width=C.width,t.height=C.height,m==="top")if(c){const I=G(c),v=I.bottom-d.value-t.height;t.fixed=d.value>C.top&&I.bottom>0,t.transform=v<0?v:0}else t.fixed=d.value>C.top;else{const{clientHeight:I}=document.documentElement;if(c){const v=G(c),z=I-v.top-d.value-t.height;t.fixed=I-d.valuev.top,t.transform=z<0?-z:0}else t.fixed=I-d.valuet.fixed,c=>r("change",c)),be("scroll",l,{target:n,passive:!0}),Ne(o,l),()=>{var c;return y("div",{ref:o,style:g.value},[y("div",{class:vt({fixed:t.fixed}),style:f.value},[(c=u.default)==null?void 0:c.call(u)])])}}});const bt=q(gt),[mt,Te]=Z("tab");var wt=K({name:mt,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:H,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:W},setup(e,{slots:r}){const u=S(()=>{const n={},{type:t,color:d,disabled:g,isActive:f,activeColor:w,inactiveColor:l}=e;d&&t==="card"&&(n.borderColor=d,g||(f?n.backgroundColor=d:n.color=d));const m=f?w:l;return m&&(n.color=m),n}),o=()=>{const n=y("span",{class:Te("text",{ellipsis:!e.scrollable})},[r.title?r.title():e.title]);return e.dot||ge(e.badge)&&e.badge!==""?y(Ve,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[n]}):n};return()=>y("div",{id:e.id,role:"tab",class:[Te([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:u.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[o()])}});const[He,ne]=Z("swipe"),yt={loop:W,width:H,height:H,vertical:Boolean,autoplay:N(0),duration:N(500),touchable:W,lazyRender:Boolean,initialSwipe:N(0),indicatorColor:String,showIndicators:W,stopPropagation:W},Le=Symbol(He);var xt=K({name:He,props:yt,emits:["change","dragStart","dragEnd"],setup(e,{emit:r,slots:u}){const o=A(),n=A(),t=oe({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let d=!1;const g=je(),{children:f,linkChildren:w}=Ae(Le),l=S(()=>f.length),c=S(()=>t[e.vertical?"height":"width"]),m=S(()=>e.vertical?g.deltaY.value:g.deltaX.value),C=S(()=>t.rect?(e.vertical?t.rect.height:t.rect.width)-c.value*l.value:0),b=S(()=>c.value?Math.ceil(Math.abs(C.value)/c.value):l.value),I=S(()=>l.value*c.value),v=S(()=>(t.active+l.value)%l.value),z=S(()=>{const s=e.vertical?"vertical":"horizontal";return g.direction.value===s}),V=S(()=>{const s={transitionDuration:`${t.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${t.offset}px)`};if(c.value){const x=e.vertical?"height":"width",T=e.vertical?"width":"height";s[x]=`${I.value}px`,s[T]=e[T]?`${e[T]}px`:""}return s}),M=s=>{const{active:x}=t;return s?e.loop?de(x+s,-1,l.value):de(x+s,0,b.value):x},j=(s,x=0)=>{let T=s*c.value;e.loop||(T=Math.min(T,-C.value));let a=x-T;return e.loop||(a=de(a,C.value,0)),a},R=({pace:s=0,offset:x=0,emitChange:T})=>{if(l.value<=1)return;const{active:a}=t,i=M(s),h=j(i,x);if(e.loop){if(f[0]&&h!==C.value){const k=h0;f[l.value-1].setOffset(k?-I.value:0)}}t.active=i,t.offset=h,T&&i!==a&&r("change",v.value)},Y=()=>{t.swiping=!0,t.active<=-1?R({pace:l.value}):t.active>=l.value&&R({pace:-l.value})},U=()=>{Y(),g.reset(),F(()=>{t.swiping=!1,R({pace:-1,emitChange:!0})})},_=()=>{Y(),g.reset(),F(()=>{t.swiping=!1,R({pace:1,emitChange:!0})})};let Q;const O=()=>clearTimeout(Q),E=()=>{O(),+e.autoplay>0&&l.value>1&&(Q=setTimeout(()=>{_(),E()},+e.autoplay))},D=(s=+e.initialSwipe)=>{if(!o.value)return;const x=()=>{var T,a;if(!le(o)){const i={width:o.value.offsetWidth,height:o.value.offsetHeight};t.rect=i,t.width=+((T=e.width)!=null?T:i.width),t.height=+((a=e.height)!=null?a:i.height)}l.value&&(s=Math.min(l.value-1,s),s===-1&&(s=l.value-1)),t.active=s,t.swiping=!0,t.offset=j(s),f.forEach(i=>{i.setOffset(0)}),E()};le(o)?L().then(x):x()},p=()=>D(t.active);let ee;const se=s=>{!e.touchable||s.touches.length>1||(g.start(s),d=!1,ee=Date.now(),O(),Y())},re=s=>{e.touchable&&t.swiping&&(g.move(s),z.value&&(!e.loop&&(t.active===0&&m.value>0||t.active===l.value-1&&m.value<0)||(qe(s,e.stopPropagation),R({offset:m.value}),d||(r("dragStart",{index:v.value}),d=!0))))},te=()=>{if(!e.touchable||!t.swiping)return;const s=Date.now()-ee,x=m.value/s;if((Math.abs(x)>.25||Math.abs(m.value)>c.value/2)&&z.value){const a=e.vertical?g.offsetY.value:g.offsetX.value;let i=0;e.loop?i=a>0?m.value>0?-1:1:0:i=-Math[m.value>0?"ceil":"floor"](m.value/c.value),R({pace:i,emitChange:!0})}else m.value&&R({pace:0});d=!1,t.swiping=!1,r("dragEnd",{index:v.value}),E()},ce=(s,x={})=>{Y(),g.reset(),F(()=>{let T;e.loop&&s===l.value?T=t.active===0?0:s:T=s%l.value,x.immediate?F(()=>{t.swiping=!1}):t.swiping=!1,R({pace:T-t.active,emitChange:!0})})},ue=(s,x)=>{const T=x===v.value,a=T?{backgroundColor:e.indicatorColor}:void 0;return y("i",{style:a,class:ne("indicator",{active:T})},null)},ae=()=>{if(u.indicator)return u.indicator({active:v.value,total:l.value});if(e.showIndicators&&l.value>1)return y("div",{class:ne("indicators",{vertical:e.vertical})},[Array(l.value).fill("").map(ue)])};return J({prev:U,next:_,state:t,resize:p,swipeTo:ce}),w({size:c,props:e,count:l,activeIndicator:v}),B(()=>e.initialSwipe,s=>D(+s)),B(l,()=>D(t.active)),B(()=>e.autoplay,E),B([ze,Fe,()=>e.width,()=>e.height],p),B(Ge(),s=>{s==="visible"?E():O()}),me(D),Oe(()=>D(t.active)),Ee(()=>D(t.active)),ke(O),Ie(O),be("touchmove",re,{target:n}),()=>{var s;return y("div",{ref:o,class:ne()},[y("div",{ref:n,style:V.value,class:ne("track",{vertical:e.vertical}),onTouchstartPassive:se,onTouchend:te,onTouchcancel:te},[(s=u.default)==null?void 0:s.call(u)]),ae()])}}});const Tt=q(xt),[St,Se]=Z("tabs");var Ct=K({name:St,props:{count:fe(Number),inited:Boolean,animated:Boolean,duration:fe(H),swipeable:Boolean,lazyRender:Boolean,currentIndex:fe(Number)},emits:["change"],setup(e,{emit:r,slots:u}){const o=A(),n=g=>r("change",g),t=()=>{var g;const f=(g=u.default)==null?void 0:g.call(u);return e.animated||e.swipeable?y(Tt,{ref:o,loop:!1,class:Se("track"),duration:+e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:n},{default:()=>[f]}):f},d=g=>{const f=o.value;f&&f.state.active!==g&&f.swipeTo(g,{immediate:!e.inited})};return B(()=>e.currentIndex,d),me(()=>{d(e.currentIndex)}),J({swipeRef:o}),()=>y("div",{class:Se("content",{animated:e.animated||e.swipeable})},[t()])}});const[We,ie]=Z("tabs"),kt={type:Re("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:N(0),duration:N(.3),animated:Boolean,ellipsis:W,swipeable:Boolean,scrollspy:Boolean,offsetTop:N(0),background:String,lazyRender:W,lineWidth:H,lineHeight:H,beforeChange:Function,swipeThreshold:N(5),titleActiveColor:String,titleInactiveColor:String},Ye=Symbol(We);var It=K({name:We,props:kt,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:r,slots:u}){let o,n,t;const d=A(),g=A(),f=A(),w=A(),l=Me(),c=Be(d),[m,C]=dt(),{children:b,linkChildren:I}=Ae(Ye),v=oe({inited:!1,position:"",lineStyle:{},currentIndex:-1}),z=S(()=>b.length>+e.swipeThreshold||!e.ellipsis||e.shrink),V=S(()=>({borderColor:e.color,background:e.background})),M=(a,i)=>{var h;return(h=a.name)!=null?h:i},j=S(()=>{const a=b[v.currentIndex];if(a)return M(a,v.currentIndex)}),R=S(()=>_e(e.offsetTop)),Y=S(()=>e.sticky?R.value+o:0),U=a=>{const i=g.value,h=m.value;if(!z.value||!i||!h||!h[v.currentIndex])return;const k=h[v.currentIndex].$el,$=k.offsetLeft-(i.offsetWidth-k.offsetWidth)/2;ct(i,$,a?0:+e.duration)},_=()=>{const a=v.inited;L(()=>{const i=m.value;if(!i||!i[v.currentIndex]||e.type!=="line"||le(d.value))return;const h=i[v.currentIndex].$el,{lineWidth:k,lineHeight:$}=e,P=h.offsetLeft+h.offsetWidth/2,X={width:ye(k),backgroundColor:e.color,transform:`translateX(${P}px) translateX(-50%)`};if(a&&(X.transitionDuration=`${e.duration}s`),ge($)){const we=ye($);X.height=we,X.borderRadius=we}v.lineStyle=X})},Q=a=>{const i=a=0&&a{const h=Q(a);if(!ge(h))return;const k=b[h],$=M(k,h),P=v.currentIndex!==null;v.currentIndex!==h&&(v.currentIndex=h,i||U(),_()),$!==e.active&&(r("update:active",$),P&&r("change",$,k.title)),t&&!e.scrollspy&&Qe(Math.ceil(xe(d.value)-R.value))},E=(a,i)=>{const h=b.find(($,P)=>M($,P)===a),k=h?b.indexOf(h):0;O(k,i)},D=(a=!1)=>{if(e.scrollspy){const i=b[v.currentIndex].$el;if(i&&c.value){const h=xe(i,c.value)-Y.value;n=!0,ut(c.value,h,a?0:+e.duration,()=>{n=!1})}}},p=(a,i,h)=>{const{title:k,disabled:$}=b[i],P=M(b[i],i);$||(tt(e.beforeChange,{args:[P],done:()=>{O(i),D()}}),at(a)),r("clickTab",{name:P,title:k,event:h,disabled:$})},ee=a=>{t=a.isFixed,r("scroll",a)},se=a=>{L(()=>{E(a),D(!0)})},re=()=>{for(let a=0;aY.value)return a===0?0:a-1}return b.length-1},te=()=>{if(e.scrollspy&&!n){const a=re();O(a)}},ce=()=>b.map((a,i)=>y(wt,pe({key:a.id,id:`${l}-${i}`,ref:C(i),type:e.type,color:e.color,style:a.titleStyle,class:a.titleClass,shrink:e.shrink,isActive:i===v.currentIndex,controls:a.id,scrollable:z.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:h=>p(a,i,h)},et(a,["dot","badge","title","disabled","showZeroBadge"])),{title:a.$slots.title})),ue=()=>{if(e.type==="line"&&b.length)return y("div",{class:ie("line"),style:v.lineStyle},null)},ae=()=>{var a,i,h;const{type:k,border:$,sticky:P}=e,X=[y("div",{ref:P?void 0:f,class:[ie("wrap"),{[Je]:k==="line"&&$}]},[y("div",{ref:g,role:"tablist",class:ie("nav",[k,{shrink:e.shrink,complete:z.value}]),style:V.value,"aria-orientation":"horizontal"},[(a=u["nav-left"])==null?void 0:a.call(u),ce(),ue(),(i=u["nav-right"])==null?void 0:i.call(u)])]),(h=u["nav-bottom"])==null?void 0:h.call(u)];return P?y("div",{ref:f},[X]):X};B([()=>e.color,ze],_),B(()=>e.active,a=>{a!==j.value&&E(a)}),B(()=>b.length,()=>{v.inited&&(E(e.active),_(),L(()=>{U(!0)}))});const s=()=>{E(e.active,!0),L(()=>{v.inited=!0,f.value&&(o=G(f.value).height),U(!0)})},x=(a,i)=>r("rendered",a,i);return J({resize:()=>{_(),L(()=>{var a,i;return(i=(a=w.value)==null?void 0:a.swipeRef.value)==null?void 0:i.resize()})},scrollTo:se}),Oe(_),Ee(_),$e(s),Ne(d,_),be("scroll",te,{target:c,passive:!0}),I({id:l,props:e,setLine:_,onRendered:x,currentName:j,scrollIntoView:U}),()=>y("div",{ref:d,class:ie([e.type])},[e.sticky?y(bt,{container:d.value,offsetTop:R.value,onScroll:ee},{default:()=>[ae()]}):ae(),y(Ct,{ref:w,count:b.length,inited:v.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:v.currentIndex,onChange:O},{default:()=>{var a;return[(a=u.default)==null?void 0:a.call(u)]}})])}});const[$t,Rt]=Z("swipe-item");var Bt=K({name:$t,setup(e,{slots:r}){let u;const o=oe({offset:0,inited:!1,mounted:!1}),{parent:n,index:t}=De(Le);if(!n)return;const d=S(()=>{const w={},{vertical:l}=n.props;return n.size.value&&(w[l?"height":"width"]=`${n.size.value}px`),o.offset&&(w.transform=`translate${l?"Y":"X"}(${o.offset}px)`),w}),g=S(()=>{const{loop:w,lazyRender:l}=n.props;if(!l||u)return!0;if(!o.mounted)return!1;const c=n.activeIndicator.value,m=n.count.value-1,C=c===0&&w?m:c-1,b=c===m&&w?0:c+1;return u=t.value===c||t.value===C||t.value===b,u}),f=w=>{o.offset=w};return me(()=>{L(()=>{o.mounted=!0})}),J({setOffset:f}),()=>{var w;return y("div",{class:Rt(),style:d.value},[g.value?(w=r.default)==null?void 0:w.call(r):null])}}});const _t=q(Bt),[Pt,ve]=Z("tab"),At=Pe({},nt,{dot:Boolean,name:H,badge:H,title:String,disabled:Boolean,titleClass:it,titleStyle:[String,Object],showZeroBadge:W});var zt=K({name:Pt,props:At,setup(e,{slots:r}){const u=Me(),o=A(!1),{parent:n,index:t}=De(Ye);if(!n)return;const d=()=>{var l;return(l=e.name)!=null?l:t.value},g=()=>{o.value=!0,n.props.lazyRender&&L(()=>{n.onRendered(d(),e.title)})},f=S(()=>{const l=d()===n.currentName.value;return l&&!o.value&&g(),l}),w=A(!f.value);return B(f,l=>{l?w.value=!1:F(()=>{w.value=!0})}),B(()=>e.title,()=>{n.setLine(),n.scrollIntoView()}),ot(rt,f),()=>{var l;const c=`${n.id}-${t.value}`,{animated:m,swipeable:C,scrollspy:b,lazyRender:I}=n.props;if(!r.default&&!m)return;const v=b||f.value;if(m||C)return y(_t,{id:u,role:"tabpanel",class:ve("panel-wrapper",{inactive:w.value}),tabindex:f.value?0:-1,"aria-hidden":!f.value,"aria-labelledby":c},{default:()=>{var M;return[y("div",{class:ve("panel")},[(M=r.default)==null?void 0:M.call(r)])]}});const V=o.value||b||!I?(l=r.default)==null?void 0:l.call(r):null;return J({id:u}),lt(y("div",{id:u,role:"tabpanel",class:ve("panel"),tabindex:v?0:-1,"aria-labelledby":c},[V]),[[st,v]])}}});const Mt=q(zt),Dt=q(It);export{bt as S,Dt as T,Mt as a,Tt as b,_t as c,dt as u}; ======== import{aH as he,aI as Ce,aE as Xe,i as A,a0 as Ze,z as Ke,aW as ke,l as Ie,aG as $e,j as Z,t as H,n as Re,am as N,d as K,aK as Be,O as oe,E as S,aU as _e,A as Pe,aM as Ue,w as B,ai as be,g as y,aT as le,Y as G,D as q,v as W,aw as ge,K as Ve,ah as je,ac as Ae,an as J,ao as ze,ap as Fe,aX as Ge,o as me,aY as Oe,aZ as Ee,y as L,aj as qe,a_ as F,ak as de,ag as fe,aJ as Me,G as ye,a$ as Je,b0 as Qe,b1 as xe,m as pe,p as et,ar as tt,b2 as at,ae as De,aP as nt,x as it,ax as lt,$ as ot,ay as st}from"./index-dbd58bee.js";import{T as rt}from"./use-tab-status-855575aa.js";function ct(e,r,u){let o=0;const n=e.scrollLeft,t=u===0?1:Math.round(u*1e3/16);function d(){e.scrollLeft+=(r-n)/t,++or||!t&&nr?he(f):o&&he(o)}f()}function dt(){const e=A([]),r=[];return Ze(()=>{e.value=[]}),[e,o=>(r[o]||(r[o]=n=>{e.value[o]=n}),r[o])]}function Ne(e,r){if(!Ke||!window.IntersectionObserver)return;const u=new IntersectionObserver(t=>{r(t[0].intersectionRatio>0)},{root:document.body}),o=()=>{e.value&&u.observe(e.value)},n=()=>{e.value&&u.unobserve(e.value)};ke(n),Ie(n),$e(o)}const[ft,vt]=Z("sticky"),ht={zIndex:H,position:Re("top"),container:Object,offsetTop:N(0),offsetBottom:N(0)};var gt=K({name:ft,props:ht,emits:["scroll","change"],setup(e,{emit:r,slots:u}){const o=A(),n=Be(o),t=oe({fixed:!1,width:0,height:0,transform:0}),d=S(()=>_e(e.position==="top"?e.offsetTop:e.offsetBottom)),g=S(()=>{const{fixed:c,height:m,width:C}=t;if(c)return{width:`${C}px`,height:`${m}px`}}),f=S(()=>{if(!t.fixed)return;const c=Pe(Ue(e.zIndex),{width:`${t.width}px`,height:`${t.height}px`,[e.position]:`${d.value}px`});return t.transform&&(c.transform=`translate3d(0, ${t.transform}px, 0)`),c}),w=c=>r("scroll",{scrollTop:c,isFixed:t.fixed}),l=()=>{if(!o.value||le(o))return;const{container:c,position:m}=e,C=G(o),b=Ce(window);if(t.width=C.width,t.height=C.height,m==="top")if(c){const I=G(c),v=I.bottom-d.value-t.height;t.fixed=d.value>C.top&&I.bottom>0,t.transform=v<0?v:0}else t.fixed=d.value>C.top;else{const{clientHeight:I}=document.documentElement;if(c){const v=G(c),z=I-v.top-d.value-t.height;t.fixed=I-d.valuev.top,t.transform=z<0?-z:0}else t.fixed=I-d.valuet.fixed,c=>r("change",c)),be("scroll",l,{target:n,passive:!0}),Ne(o,l),()=>{var c;return y("div",{ref:o,style:g.value},[y("div",{class:vt({fixed:t.fixed}),style:f.value},[(c=u.default)==null?void 0:c.call(u)])])}}});const bt=q(gt),[mt,Te]=Z("tab");var wt=K({name:mt,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:H,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:W},setup(e,{slots:r}){const u=S(()=>{const n={},{type:t,color:d,disabled:g,isActive:f,activeColor:w,inactiveColor:l}=e;d&&t==="card"&&(n.borderColor=d,g||(f?n.backgroundColor=d:n.color=d));const m=f?w:l;return m&&(n.color=m),n}),o=()=>{const n=y("span",{class:Te("text",{ellipsis:!e.scrollable})},[r.title?r.title():e.title]);return e.dot||ge(e.badge)&&e.badge!==""?y(Ve,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[n]}):n};return()=>y("div",{id:e.id,role:"tab",class:[Te([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:u.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[o()])}});const[He,ne]=Z("swipe"),yt={loop:W,width:H,height:H,vertical:Boolean,autoplay:N(0),duration:N(500),touchable:W,lazyRender:Boolean,initialSwipe:N(0),indicatorColor:String,showIndicators:W,stopPropagation:W},Le=Symbol(He);var xt=K({name:He,props:yt,emits:["change","dragStart","dragEnd"],setup(e,{emit:r,slots:u}){const o=A(),n=A(),t=oe({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let d=!1;const g=je(),{children:f,linkChildren:w}=Ae(Le),l=S(()=>f.length),c=S(()=>t[e.vertical?"height":"width"]),m=S(()=>e.vertical?g.deltaY.value:g.deltaX.value),C=S(()=>t.rect?(e.vertical?t.rect.height:t.rect.width)-c.value*l.value:0),b=S(()=>c.value?Math.ceil(Math.abs(C.value)/c.value):l.value),I=S(()=>l.value*c.value),v=S(()=>(t.active+l.value)%l.value),z=S(()=>{const s=e.vertical?"vertical":"horizontal";return g.direction.value===s}),V=S(()=>{const s={transitionDuration:`${t.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${t.offset}px)`};if(c.value){const x=e.vertical?"height":"width",T=e.vertical?"width":"height";s[x]=`${I.value}px`,s[T]=e[T]?`${e[T]}px`:""}return s}),M=s=>{const{active:x}=t;return s?e.loop?de(x+s,-1,l.value):de(x+s,0,b.value):x},j=(s,x=0)=>{let T=s*c.value;e.loop||(T=Math.min(T,-C.value));let a=x-T;return e.loop||(a=de(a,C.value,0)),a},R=({pace:s=0,offset:x=0,emitChange:T})=>{if(l.value<=1)return;const{active:a}=t,i=M(s),h=j(i,x);if(e.loop){if(f[0]&&h!==C.value){const k=h0;f[l.value-1].setOffset(k?-I.value:0)}}t.active=i,t.offset=h,T&&i!==a&&r("change",v.value)},Y=()=>{t.swiping=!0,t.active<=-1?R({pace:l.value}):t.active>=l.value&&R({pace:-l.value})},U=()=>{Y(),g.reset(),F(()=>{t.swiping=!1,R({pace:-1,emitChange:!0})})},_=()=>{Y(),g.reset(),F(()=>{t.swiping=!1,R({pace:1,emitChange:!0})})};let Q;const O=()=>clearTimeout(Q),E=()=>{O(),+e.autoplay>0&&l.value>1&&(Q=setTimeout(()=>{_(),E()},+e.autoplay))},D=(s=+e.initialSwipe)=>{if(!o.value)return;const x=()=>{var T,a;if(!le(o)){const i={width:o.value.offsetWidth,height:o.value.offsetHeight};t.rect=i,t.width=+((T=e.width)!=null?T:i.width),t.height=+((a=e.height)!=null?a:i.height)}l.value&&(s=Math.min(l.value-1,s),s===-1&&(s=l.value-1)),t.active=s,t.swiping=!0,t.offset=j(s),f.forEach(i=>{i.setOffset(0)}),E()};le(o)?L().then(x):x()},p=()=>D(t.active);let ee;const se=s=>{!e.touchable||s.touches.length>1||(g.start(s),d=!1,ee=Date.now(),O(),Y())},re=s=>{e.touchable&&t.swiping&&(g.move(s),z.value&&(!e.loop&&(t.active===0&&m.value>0||t.active===l.value-1&&m.value<0)||(qe(s,e.stopPropagation),R({offset:m.value}),d||(r("dragStart",{index:v.value}),d=!0))))},te=()=>{if(!e.touchable||!t.swiping)return;const s=Date.now()-ee,x=m.value/s;if((Math.abs(x)>.25||Math.abs(m.value)>c.value/2)&&z.value){const a=e.vertical?g.offsetY.value:g.offsetX.value;let i=0;e.loop?i=a>0?m.value>0?-1:1:0:i=-Math[m.value>0?"ceil":"floor"](m.value/c.value),R({pace:i,emitChange:!0})}else m.value&&R({pace:0});d=!1,t.swiping=!1,r("dragEnd",{index:v.value}),E()},ce=(s,x={})=>{Y(),g.reset(),F(()=>{let T;e.loop&&s===l.value?T=t.active===0?0:s:T=s%l.value,x.immediate?F(()=>{t.swiping=!1}):t.swiping=!1,R({pace:T-t.active,emitChange:!0})})},ue=(s,x)=>{const T=x===v.value,a=T?{backgroundColor:e.indicatorColor}:void 0;return y("i",{style:a,class:ne("indicator",{active:T})},null)},ae=()=>{if(u.indicator)return u.indicator({active:v.value,total:l.value});if(e.showIndicators&&l.value>1)return y("div",{class:ne("indicators",{vertical:e.vertical})},[Array(l.value).fill("").map(ue)])};return J({prev:U,next:_,state:t,resize:p,swipeTo:ce}),w({size:c,props:e,count:l,activeIndicator:v}),B(()=>e.initialSwipe,s=>D(+s)),B(l,()=>D(t.active)),B(()=>e.autoplay,E),B([ze,Fe,()=>e.width,()=>e.height],p),B(Ge(),s=>{s==="visible"?E():O()}),me(D),Oe(()=>D(t.active)),Ee(()=>D(t.active)),ke(O),Ie(O),be("touchmove",re,{target:n}),()=>{var s;return y("div",{ref:o,class:ne()},[y("div",{ref:n,style:V.value,class:ne("track",{vertical:e.vertical}),onTouchstartPassive:se,onTouchend:te,onTouchcancel:te},[(s=u.default)==null?void 0:s.call(u)]),ae()])}}});const Tt=q(xt),[St,Se]=Z("tabs");var Ct=K({name:St,props:{count:fe(Number),inited:Boolean,animated:Boolean,duration:fe(H),swipeable:Boolean,lazyRender:Boolean,currentIndex:fe(Number)},emits:["change"],setup(e,{emit:r,slots:u}){const o=A(),n=g=>r("change",g),t=()=>{var g;const f=(g=u.default)==null?void 0:g.call(u);return e.animated||e.swipeable?y(Tt,{ref:o,loop:!1,class:Se("track"),duration:+e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:n},{default:()=>[f]}):f},d=g=>{const f=o.value;f&&f.state.active!==g&&f.swipeTo(g,{immediate:!e.inited})};return B(()=>e.currentIndex,d),me(()=>{d(e.currentIndex)}),J({swipeRef:o}),()=>y("div",{class:Se("content",{animated:e.animated||e.swipeable})},[t()])}});const[We,ie]=Z("tabs"),kt={type:Re("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:N(0),duration:N(.3),animated:Boolean,ellipsis:W,swipeable:Boolean,scrollspy:Boolean,offsetTop:N(0),background:String,lazyRender:W,lineWidth:H,lineHeight:H,beforeChange:Function,swipeThreshold:N(5),titleActiveColor:String,titleInactiveColor:String},Ye=Symbol(We);var It=K({name:We,props:kt,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:r,slots:u}){let o,n,t;const d=A(),g=A(),f=A(),w=A(),l=Me(),c=Be(d),[m,C]=dt(),{children:b,linkChildren:I}=Ae(Ye),v=oe({inited:!1,position:"",lineStyle:{},currentIndex:-1}),z=S(()=>b.length>+e.swipeThreshold||!e.ellipsis||e.shrink),V=S(()=>({borderColor:e.color,background:e.background})),M=(a,i)=>{var h;return(h=a.name)!=null?h:i},j=S(()=>{const a=b[v.currentIndex];if(a)return M(a,v.currentIndex)}),R=S(()=>_e(e.offsetTop)),Y=S(()=>e.sticky?R.value+o:0),U=a=>{const i=g.value,h=m.value;if(!z.value||!i||!h||!h[v.currentIndex])return;const k=h[v.currentIndex].$el,$=k.offsetLeft-(i.offsetWidth-k.offsetWidth)/2;ct(i,$,a?0:+e.duration)},_=()=>{const a=v.inited;L(()=>{const i=m.value;if(!i||!i[v.currentIndex]||e.type!=="line"||le(d.value))return;const h=i[v.currentIndex].$el,{lineWidth:k,lineHeight:$}=e,P=h.offsetLeft+h.offsetWidth/2,X={width:ye(k),backgroundColor:e.color,transform:`translateX(${P}px) translateX(-50%)`};if(a&&(X.transitionDuration=`${e.duration}s`),ge($)){const we=ye($);X.height=we,X.borderRadius=we}v.lineStyle=X})},Q=a=>{const i=a=0&&a{const h=Q(a);if(!ge(h))return;const k=b[h],$=M(k,h),P=v.currentIndex!==null;v.currentIndex!==h&&(v.currentIndex=h,i||U(),_()),$!==e.active&&(r("update:active",$),P&&r("change",$,k.title)),t&&!e.scrollspy&&Qe(Math.ceil(xe(d.value)-R.value))},E=(a,i)=>{const h=b.find(($,P)=>M($,P)===a),k=h?b.indexOf(h):0;O(k,i)},D=(a=!1)=>{if(e.scrollspy){const i=b[v.currentIndex].$el;if(i&&c.value){const h=xe(i,c.value)-Y.value;n=!0,ut(c.value,h,a?0:+e.duration,()=>{n=!1})}}},p=(a,i,h)=>{const{title:k,disabled:$}=b[i],P=M(b[i],i);$||(tt(e.beforeChange,{args:[P],done:()=>{O(i),D()}}),at(a)),r("clickTab",{name:P,title:k,event:h,disabled:$})},ee=a=>{t=a.isFixed,r("scroll",a)},se=a=>{L(()=>{E(a),D(!0)})},re=()=>{for(let a=0;aY.value)return a===0?0:a-1}return b.length-1},te=()=>{if(e.scrollspy&&!n){const a=re();O(a)}},ce=()=>b.map((a,i)=>y(wt,pe({key:a.id,id:`${l}-${i}`,ref:C(i),type:e.type,color:e.color,style:a.titleStyle,class:a.titleClass,shrink:e.shrink,isActive:i===v.currentIndex,controls:a.id,scrollable:z.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:h=>p(a,i,h)},et(a,["dot","badge","title","disabled","showZeroBadge"])),{title:a.$slots.title})),ue=()=>{if(e.type==="line"&&b.length)return y("div",{class:ie("line"),style:v.lineStyle},null)},ae=()=>{var a,i,h;const{type:k,border:$,sticky:P}=e,X=[y("div",{ref:P?void 0:f,class:[ie("wrap"),{[Je]:k==="line"&&$}]},[y("div",{ref:g,role:"tablist",class:ie("nav",[k,{shrink:e.shrink,complete:z.value}]),style:V.value,"aria-orientation":"horizontal"},[(a=u["nav-left"])==null?void 0:a.call(u),ce(),ue(),(i=u["nav-right"])==null?void 0:i.call(u)])]),(h=u["nav-bottom"])==null?void 0:h.call(u)];return P?y("div",{ref:f},[X]):X};B([()=>e.color,ze],_),B(()=>e.active,a=>{a!==j.value&&E(a)}),B(()=>b.length,()=>{v.inited&&(E(e.active),_(),L(()=>{U(!0)}))});const s=()=>{E(e.active,!0),L(()=>{v.inited=!0,f.value&&(o=G(f.value).height),U(!0)})},x=(a,i)=>r("rendered",a,i);return J({resize:()=>{_(),L(()=>{var a,i;return(i=(a=w.value)==null?void 0:a.swipeRef.value)==null?void 0:i.resize()})},scrollTo:se}),Oe(_),Ee(_),$e(s),Ne(d,_),be("scroll",te,{target:c,passive:!0}),I({id:l,props:e,setLine:_,onRendered:x,currentName:j,scrollIntoView:U}),()=>y("div",{ref:d,class:ie([e.type])},[e.sticky?y(bt,{container:d.value,offsetTop:R.value,onScroll:ee},{default:()=>[ae()]}):ae(),y(Ct,{ref:w,count:b.length,inited:v.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:v.currentIndex,onChange:O},{default:()=>{var a;return[(a=u.default)==null?void 0:a.call(u)]}})])}});const[$t,Rt]=Z("swipe-item");var Bt=K({name:$t,setup(e,{slots:r}){let u;const o=oe({offset:0,inited:!1,mounted:!1}),{parent:n,index:t}=De(Le);if(!n)return;const d=S(()=>{const w={},{vertical:l}=n.props;return n.size.value&&(w[l?"height":"width"]=`${n.size.value}px`),o.offset&&(w.transform=`translate${l?"Y":"X"}(${o.offset}px)`),w}),g=S(()=>{const{loop:w,lazyRender:l}=n.props;if(!l||u)return!0;if(!o.mounted)return!1;const c=n.activeIndicator.value,m=n.count.value-1,C=c===0&&w?m:c-1,b=c===m&&w?0:c+1;return u=t.value===c||t.value===C||t.value===b,u}),f=w=>{o.offset=w};return me(()=>{L(()=>{o.mounted=!0})}),J({setOffset:f}),()=>{var w;return y("div",{class:Rt(),style:d.value},[g.value?(w=r.default)==null?void 0:w.call(r):null])}}});const _t=q(Bt),[Pt,ve]=Z("tab"),At=Pe({},nt,{dot:Boolean,name:H,badge:H,title:String,disabled:Boolean,titleClass:it,titleStyle:[String,Object],showZeroBadge:W});var zt=K({name:Pt,props:At,setup(e,{slots:r}){const u=Me(),o=A(!1),{parent:n,index:t}=De(Ye);if(!n)return;const d=()=>{var l;return(l=e.name)!=null?l:t.value},g=()=>{o.value=!0,n.props.lazyRender&&L(()=>{n.onRendered(d(),e.title)})},f=S(()=>{const l=d()===n.currentName.value;return l&&!o.value&&g(),l}),w=A(!f.value);return B(f,l=>{l?w.value=!1:F(()=>{w.value=!0})}),B(()=>e.title,()=>{n.setLine(),n.scrollIntoView()}),ot(rt,f),()=>{var l;const c=`${n.id}-${t.value}`,{animated:m,swipeable:C,scrollspy:b,lazyRender:I}=n.props;if(!r.default&&!m)return;const v=b||f.value;if(m||C)return y(_t,{id:u,role:"tabpanel",class:ve("panel-wrapper",{inactive:w.value}),tabindex:f.value?0:-1,"aria-hidden":!f.value,"aria-labelledby":c},{default:()=>{var M;return[y("div",{class:ve("panel")},[(M=r.default)==null?void 0:M.call(r)])]}});const V=o.value||b||!I?(l=r.default)==null?void 0:l.call(r):null;return J({id:u}),lt(y("div",{id:u,role:"tabpanel",class:ve("panel"),tabindex:v?0:-1,"aria-labelledby":c},[V]),[[st,v]])}}});const Mt=q(zt),Dt=q(It);export{bt as S,Dt as T,Mt as a,Tt as b,_t as c,dt as u}; >>>>>>>> 87d4d1b1 (更新):dist/assets/index-96c8c221.js