1 |
- !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,n||"default");if("object"!==e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,a,r,o,l=[],u=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=r.call(n)).done)&&(l.push(i.value),l.length!==t);u=!0);}catch(v){c=!0,a=v}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}System.register(["./index-legacy-9572cf39.js","./use-tab-status-legacy-9b408efd.js"],(function(e,i){"use strict";var a,r,o,l,u,c,v,s,f,d,p,h,g,b,m,y,w,x,S,I,C,k,B,T,z,A,R,O,j,M,E,$,P,W,X,L,Y,Z,D,H,N,F,G,K,U,V,J,_,q,Q,ee,te,ne,ie,ae,re,oe,le,ue;return{setters:[function(e){a=e.aH,r=e.aI,o=e.aE,l=e.i,u=e.a0,c=e.z,v=e.aW,s=e.l,f=e.aG,d=e.j,p=e.t,h=e.n,g=e.am,b=e.d,m=e.aK,y=e.O,w=e.E,x=e.aU,S=e.A,I=e.aM,C=e.w,k=e.ai,B=e.g,T=e.aT,z=e.Y,A=e.D,R=e.v,O=e.aw,j=e.K,M=e.ah,E=e.ac,$=e.an,P=e.ao,W=e.ap,X=e.aX,L=e.o,Y=e.aY,Z=e.aZ,D=e.y,H=e.aj,N=e.a_,F=e.ak,G=e.ag,K=e.aJ,U=e.G,V=e.a$,J=e.b0,_=e.b1,q=e.m,Q=e.p,ee=e.ar,te=e.b2,ne=e.ae,ie=e.aP,ae=e.x,re=e.ax,oe=e.$,le=e.ay},function(e){ue=e.T}],execute:function(){function i(){var e=l([]),t=[];u((function(){e.value=[]}));return[e,function(n){return t[n]||(t[n]=function(t){e.value[n]=t}),t[n]}]}function ce(e,t){if(c&&window.IntersectionObserver){var n=new IntersectionObserver((function(e){t(e[0].intersectionRatio>0)}),{root:document.body}),i=function(){e.value&&n.unobserve(e.value)};v(i),s(i),f((function(){e.value&&n.observe(e.value)}))}}e("u",i);var ve=n(d("sticky"),2),se=ve[0],fe=ve[1],de={zIndex:p,position:h("top"),container:Object,offsetTop:g(0),offsetBottom:g(0)},pe=b({name:se,props:de,emits:["scroll","change"],setup:function(e,n){var i=n.emit,a=n.slots,o=l(),u=m(o),c=y({fixed:!1,width:0,height:0,transform:0}),v=w((function(){return x("top"===e.position?e.offsetTop:e.offsetBottom)})),s=w((function(){var e=c.fixed,t=c.height,n=c.width;if(e)return{width:"".concat(n,"px"),height:"".concat(t,"px")}})),f=w((function(){if(c.fixed){var n=S(I(e.zIndex),t({width:"".concat(c.width,"px"),height:"".concat(c.height,"px")},e.position,"".concat(v.value,"px")));return c.transform&&(n.transform="translate3d(0, ".concat(c.transform,"px, 0)")),n}})),d=function(){if(o.value&&!T(o)){var t=e.container,n=e.position,a=z(o),l=r(window);if(c.width=a.width,c.height=a.height,"top"===n)if(t){var u=z(t),s=u.bottom-v.value-c.height;c.fixed=v.value>a.top&&u.bottom>0,c.transform=s<0?s:0}else c.fixed=v.value>a.top;else{var f=document.documentElement.clientHeight;if(t){var d=z(t),p=f-d.top-v.value-c.height;c.fixed=f-v.value<a.bottom&&f>d.top,c.transform=p<0?-p:0}else c.fixed=f-v.value<a.bottom}!function(e){i("scroll",{scrollTop:e,isFixed:c.fixed})}(l)}};return C((function(){return c.fixed}),(function(e){return i("change",e)})),k("scroll",d,{target:u,passive:!0}),ce(o,d),function(){var e;return B("div",{ref:o,style:s.value},[B("div",{class:fe({fixed:c.fixed}),style:f.value},[null==(e=a.default)?void 0:e.call(a)])])}}}),he=e("S",A(pe)),ge=n(d("tab"),2),be=ge[0],me=ge[1],ye=b({name:be,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:p,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:R},setup:function(e,t){var n=t.slots,i=w((function(){var t={},n=e.type,i=e.color,a=e.disabled,r=e.isActive,o=e.activeColor,l=e.inactiveColor;i&&"card"===n&&(t.borderColor=i,a||(r?t.backgroundColor=i:t.color=i));var u=r?o:l;return u&&(t.color=u),t}));return function(){return B("div",{id:e.id,role:"tab",class:[me([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:i.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[(t=B("span",{class:me("text",{ellipsis:!e.scrollable})},[n.title?n.title():e.title]),e.dot||O(e.badge)&&""!==e.badge?B(j,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:function(){return[t]}}):t)]);var t}}}),we=n(d("swipe"),2),xe=we[0],Se=we[1],Ie={loop:R,width:p,height:p,vertical:Boolean,autoplay:g(0),duration:g(500),touchable:R,lazyRender:Boolean,initialSwipe:g(0),indicatorColor:String,showIndicators:R,stopPropagation:R},Ce=Symbol(xe),ke=b({name:xe,props:Ie,emits:["change","dragStart","dragEnd"],setup:function(e,t){var n,i,a=t.emit,r=t.slots,o=l(),u=l(),c=y({rect:null,width:0,height:0,offset:0,active:0,swiping:!1}),f=!1,d=M(),p=E(Ce),h=p.children,g=p.linkChildren,b=w((function(){return h.length})),m=w((function(){return c[e.vertical?"height":"width"]})),x=w((function(){return e.vertical?d.deltaY.value:d.deltaX.value})),S=w((function(){return c.rect?(e.vertical?c.rect.height:c.rect.width)-m.value*b.value:0})),I=w((function(){return m.value?Math.ceil(Math.abs(S.value)/m.value):b.value})),z=w((function(){return b.value*m.value})),A=w((function(){return(c.active+b.value)%b.value})),R=w((function(){var t=e.vertical?"vertical":"horizontal";return d.direction.value===t})),O=w((function(){var t={transitionDuration:"".concat(c.swiping?0:e.duration,"ms"),transform:"translate".concat(e.vertical?"Y":"X","(").concat(c.offset,"px)")};if(m.value){var n=e.vertical?"height":"width",i=e.vertical?"width":"height";t[n]="".concat(z.value,"px"),t[i]=e[i]?"".concat(e[i],"px"):""}return t})),j=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t*m.value;e.loop||(i=Math.min(i,-S.value));var a=n-i;return e.loop||(a=F(a,S.value,0)),a},G=function(t){var n=t.pace,i=void 0===n?0:n,r=t.offset,o=void 0===r?0:r,l=t.emitChange;if(!(b.value<=1)){var u=c.active,v=function(t){var n=c.active;return t?e.loop?F(n+t,-1,b.value):F(n+t,0,I.value):n}(i),s=j(v,o);if(e.loop){if(h[0]&&s!==S.value){var f=s<S.value;h[0].setOffset(f?z.value:0)}if(h[b.value-1]&&0!==s){var d=s>0;h[b.value-1].setOffset(d?-z.value:0)}}c.active=v,c.offset=s,l&&v!==u&&a("change",A.value)}},K=function(){c.swiping=!0,c.active<=-1?G({pace:b.value}):c.active>=b.value&&G({pace:-b.value})},U=function(){K(),d.reset(),N((function(){c.swiping=!1,G({pace:1,emitChange:!0})}))},V=function(){return clearTimeout(n)},J=function t(){V(),+e.autoplay>0&&b.value>1&&(n=setTimeout((function(){U(),t()}),+e.autoplay))},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+e.initialSwipe;if(o.value){var n=function(){var n,i;if(!T(o)){var a={width:o.value.offsetWidth,height:o.value.offsetHeight};c.rect=a,c.width=+(null!=(n=e.width)?n:a.width),c.height=+(null!=(i=e.height)?i:a.height)}b.value&&-1===(t=Math.min(b.value-1,t))&&(t=b.value-1),c.active=t,c.swiping=!0,c.offset=j(t),h.forEach((function(e){e.setOffset(0)})),J()};T(o)?D().then(n):n()}},q=function(){return _(c.active)},Q=function(t){!e.touchable||t.touches.length>1||(d.start(t),f=!1,i=Date.now(),V(),K())},ee=function(){if(e.touchable&&c.swiping){var t=Date.now()-i,n=x.value/t;if((Math.abs(n)>.25||Math.abs(x.value)>m.value/2)&&R.value){var r=e.vertical?d.offsetY.value:d.offsetX.value,o=0;o=e.loop?r>0?x.value>0?-1:1:0:-Math[x.value>0?"ceil":"floor"](x.value/m.value),G({pace:o,emitChange:!0})}else x.value&&G({pace:0});f=!1,c.swiping=!1,a("dragEnd",{index:A.value}),J()}},te=function(t,n){var i=n===A.value,a=i?{backgroundColor:e.indicatorColor}:void 0;return B("i",{style:a,class:Se("indicator",{active:i})},null)};return $({prev:function(){K(),d.reset(),N((function(){c.swiping=!1,G({pace:-1,emitChange:!0})}))},next:U,state:c,resize:q,swipeTo:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};K(),d.reset(),N((function(){var i;i=e.loop&&t===b.value?0===c.active?0:t:t%b.value,n.immediate?N((function(){c.swiping=!1})):c.swiping=!1,G({pace:i-c.active,emitChange:!0})}))}}),g({size:m,props:e,count:b,activeIndicator:A}),C((function(){return e.initialSwipe}),(function(e){return _(+e)})),C(b,(function(){return _(c.active)})),C((function(){return e.autoplay}),J),C([P,W,function(){return e.width},function(){return e.height}],q),C(X(),(function(e){"visible"===e?J():V()})),L(_),Y((function(){return _(c.active)})),Z((function(){return _(c.active)})),v(V),s(V),k("touchmove",(function(t){e.touchable&&c.swiping&&(d.move(t),R.value&&(!e.loop&&(0===c.active&&x.value>0||c.active===b.value-1&&x.value<0)||(H(t,e.stopPropagation),G({offset:x.value}),f||(a("dragStart",{index:A.value}),f=!0))))}),{target:u}),function(){var t;return B("div",{ref:o,class:Se()},[B("div",{ref:u,style:O.value,class:Se("track",{vertical:e.vertical}),onTouchstartPassive:Q,onTouchend:ee,onTouchcancel:ee},[null==(t=r.default)?void 0:t.call(r)]),r.indicator?r.indicator({active:A.value,total:b.value}):e.showIndicators&&b.value>1?B("div",{class:Se("indicators",{vertical:e.vertical})},[Array(b.value).fill("").map(te)]):void 0])}}}),Be=e("b",A(ke)),Te=n(d("tabs"),2),ze=Te[0],Ae=Te[1],Re=b({name:ze,props:{count:G(Number),inited:Boolean,animated:Boolean,duration:G(p),swipeable:Boolean,lazyRender:Boolean,currentIndex:G(Number)},emits:["change"],setup:function(e,t){var n=t.emit,i=t.slots,a=l(),r=function(e){return n("change",e)},o=function(t){var n=a.value;n&&n.state.active!==t&&n.swipeTo(t,{immediate:!e.inited})};return C((function(){return e.currentIndex}),o),L((function(){o(e.currentIndex)})),$({swipeRef:a}),function(){return B("div",{class:Ae("content",{animated:e.animated||e.swipeable})},[(n=null==(t=i.default)?void 0:t.call(i),e.animated||e.swipeable?B(Be,{ref:a,loop:!1,class:Ae("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:r},{default:function(){return[n]}}):n)]);var t,n}}}),Oe=n(d("tabs"),2),je=Oe[0],Me=Oe[1],Ee={type:h("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:g(0),duration:g(.3),animated:Boolean,ellipsis:R,swipeable:Boolean,scrollspy:Boolean,offsetTop:g(0),background:String,lazyRender:R,lineWidth:p,lineHeight:p,beforeChange:Function,swipeThreshold:g(5),titleActiveColor:String,titleInactiveColor:String},$e=Symbol(je),Pe=b({name:je,props:Ee,emits:["change","scroll","rendered","clickTab","update:active"],setup:function(e,u){var c,v,s,d=u.emit,p=u.slots,h=l(),g=l(),b=l(),S=l(),I=K(),A=m(h),R=n(i(),2),j=R[0],M=R[1],W=E($e),X=W.children,L=W.linkChildren,H=y({inited:!1,position:"",lineStyle:{},currentIndex:-1}),N=w((function(){return X.length>+e.swipeThreshold||!e.ellipsis||e.shrink})),F=w((function(){return{borderColor:e.color,background:e.background}})),G=function(e,t){var n;return null!=(n=e.name)?n:t},ne=w((function(){var e=X[H.currentIndex];if(e)return G(e,H.currentIndex)})),ie=w((function(){return x(e.offsetTop)})),ae=w((function(){return e.sticky?ie.value+c:0})),re=function(t){var n=g.value,i=j.value;if(N.value&&n&&i&&i[H.currentIndex]){var r=i[H.currentIndex].$el;!function(e,t,n){var i=0,r=e.scrollLeft,o=0===n?1:Math.round(1e3*n/16);!function n(){e.scrollLeft+=(t-r)/o,++i<o&&a(n)}()}(n,r.offsetLeft-(n.offsetWidth-r.offsetWidth)/2,t?0:+e.duration)}},oe=function(){var t=H.inited;D((function(){var n=j.value;if(n&&n[H.currentIndex]&&"line"===e.type&&!T(h.value)){var i=n[H.currentIndex].$el,a=e.lineWidth,r=e.lineHeight,o=i.offsetLeft+i.offsetWidth/2,l={width:U(a),backgroundColor:e.color,transform:"translateX(".concat(o,"px) translateX(-50%)")};if(t&&(l.transitionDuration="".concat(e.duration,"s")),O(r)){var u=U(r);l.height=u,l.borderRadius=u}H.lineStyle=l}}))},le=function(t,n){var i=function(e){for(var t=e<H.currentIndex?-1:1;e>=0&&e<X.length;){if(!X[e].disabled)return e;e+=t}}(t);if(O(i)){var a=X[i],r=G(a,i),o=null!==H.currentIndex;H.currentIndex!==i&&(H.currentIndex=i,n||re(),oe()),r!==e.active&&(d("update:active",r),o&&d("change",r,a.title)),s&&!e.scrollspy&&J(Math.ceil(_(h.value)-ie.value))}},ue=function(e,t){var n=X.find((function(t,n){return G(t,n)===e})),i=n?X.indexOf(n):0;le(i,t)},ve=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.scrollspy){var n=X[H.currentIndex].$el;if(n&&A.value){var i=_(n,A.value)-ae.value;v=!0,function(e,t,n,i){var l=r(e),u=l<t,c=0===n?1:Math.round(1e3*n/16),v=(t-l)/c;!function n(){l+=v,(u&&l>t||!u&&l<t)&&(l=t),o(e,l),u&&l<t||!u&&l>t?a(n):i&&a(i)}()}(A.value,i,t?0:+e.duration,(function(){v=!1}))}}},se=function(e){s=e.isFixed,d("scroll",e)},fe=function(){return X.map((function(t,n){return B(ye,q({key:t.id,id:"".concat(I,"-").concat(n),ref:M(n),type:e.type,color:e.color,style:t.titleStyle,class:t.titleClass,shrink:e.shrink,isActive:n===H.currentIndex,controls:t.id,scrollable:N.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:function(i){return function(t,n,i){var a=X[n],r=a.title,o=a.disabled,l=G(X[n],n);o||(ee(e.beforeChange,{args:[l],done:function(){le(n),ve()}}),te(t)),d("clickTab",{name:l,title:r,event:i,disabled:o})}(t,n,i)}},Q(t,["dot","badge","title","disabled","showZeroBadge"])),{title:t.$slots.title})}))},de=function(){if("line"===e.type&&X.length)return B("div",{class:Me("line"),style:H.lineStyle},null)},pe=function(){var n,i,a,r=e.type,o=e.border,l=e.sticky,u=[B("div",{ref:l?void 0:b,class:[Me("wrap"),t({},V,"line"===r&&o)]},[B("div",{ref:g,role:"tablist",class:Me("nav",[r,{shrink:e.shrink,complete:N.value}]),style:F.value,"aria-orientation":"horizontal"},[null==(n=p["nav-left"])?void 0:n.call(p),fe(),de(),null==(i=p["nav-right"])?void 0:i.call(p)])]),null==(a=p["nav-bottom"])?void 0:a.call(p)];return l?B("div",{ref:b},[u]):u};C([function(){return e.color},P],oe),C((function(){return e.active}),(function(e){e!==ne.value&&ue(e)})),C((function(){return X.length}),(function(){H.inited&&(ue(e.active),oe(),D((function(){re(!0)})))}));return $({resize:function(){oe(),D((function(){var e,t;return null==(t=null==(e=S.value)?void 0:e.swipeRef.value)?void 0:t.resize()}))},scrollTo:function(e){D((function(){ue(e),ve(!0)}))}}),Y(oe),Z(oe),f((function(){ue(e.active,!0),D((function(){H.inited=!0,b.value&&(c=z(b.value).height),re(!0)}))})),ce(h,oe),k("scroll",(function(){if(e.scrollspy&&!v){var t=function(){for(var e=0;e<X.length;e++)if(z(X[e].$el).top>ae.value)return 0===e?0:e-1;return X.length-1}();le(t)}}),{target:A,passive:!0}),L({id:I,props:e,setLine:oe,onRendered:function(e,t){return d("rendered",e,t)},currentName:ne,scrollIntoView:re}),function(){return B("div",{ref:h,class:Me([e.type])},[e.sticky?B(he,{container:h.value,offsetTop:ie.value,onScroll:se},{default:function(){return[pe()]}}):pe(),B(Re,{ref:S,count:X.length,inited:H.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:H.currentIndex,onChange:le},{default:function(){var e;return[null==(e=p.default)?void 0:e.call(p)]}})])}}}),We=n(d("swipe-item"),2),Xe=We[0],Le=We[1],Ye=b({name:Xe,setup:function(e,t){var n,i=t.slots,a=y({offset:0,inited:!1,mounted:!1}),r=ne(Ce),o=r.parent,l=r.index;if(o){var u=w((function(){var e={},t=o.props.vertical;return o.size.value&&(e[t?"height":"width"]="".concat(o.size.value,"px")),a.offset&&(e.transform="translate".concat(t?"Y":"X","(").concat(a.offset,"px)")),e})),c=w((function(){var e=o.props,t=e.loop;if(!e.lazyRender||n)return!0;if(!a.mounted)return!1;var i=o.activeIndicator.value,r=o.count.value-1,u=0===i&&t?r:i-1,c=i===r&&t?0:i+1;return n=l.value===i||l.value===u||l.value===c}));return L((function(){D((function(){a.mounted=!0}))})),$({setOffset:function(e){a.offset=e}}),function(){var e;return B("div",{class:Le(),style:u.value},[c.value?null==(e=i.default)?void 0:e.call(i):null])}}}}),Ze=e("c",A(Ye)),De=n(d("tab"),2),He=De[0],Ne=De[1],Fe=S({},ie,{dot:Boolean,name:p,badge:p,title:String,disabled:Boolean,titleClass:ae,titleStyle:[String,Object],showZeroBadge:R}),Ge=b({name:He,props:Fe,setup:function(e,t){var n=t.slots,i=K(),a=l(!1),r=ne($e),o=r.parent,u=r.index;if(o){var c=function(){var t;return null!=(t=e.name)?t:u.value},v=w((function(){var t=c()===o.currentName.value;return t&&!a.value&&(a.value=!0,o.props.lazyRender&&D((function(){o.onRendered(c(),e.title)}))),t})),s=l(!v.value);return C(v,(function(e){e?s.value=!1:N((function(){s.value=!0}))})),C((function(){return e.title}),(function(){o.setLine(),o.scrollIntoView()})),oe(ue,v),function(){var e,t="".concat(o.id,"-").concat(u.value),r=o.props,l=r.animated,c=r.swipeable,f=r.scrollspy,d=r.lazyRender;if(n.default||l){var p=f||v.value;if(l||c)return B(Ze,{id:i,role:"tabpanel",class:Ne("panel-wrapper",{inactive:s.value}),tabindex:v.value?0:-1,"aria-hidden":!v.value,"aria-labelledby":t},{default:function(){var e;return[B("div",{class:Ne("panel")},[null==(e=n.default)?void 0:e.call(n)])]}});var h=a.value||f||!d?null==(e=n.default)?void 0:e.call(n):null;return $({id:i}),re(B("div",{id:i,role:"tabpanel",class:Ne("panel"),tabindex:p?0:-1,"aria-labelledby":t},[h]),[[le,p]])}}}}});e("a",A(Ge)),e("T",A(Pe))}}}))}();
|