1 |
- !function(){function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,i,o=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(u){l=!0,i=u}finally{try{a||null==t.return||t.return()}finally{if(l)throw i}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e,n)||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 t(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}System.register(["./index-legacy.59567947.js","./index-legacy.aa38c690.js"],(function(t){"use strict";var r,i,o,a,l,u,c,s,d,f,v,p,h,b,g,y,m,x,w,I,S,k,C,B,A,R,z,T,j,O,L,W,Z,$,N,M,E,F,H,V,X,q,D,U,G,P,Q,Y,J,K,_,ee,ne,te,re,ie;return{setters:[function(e){r=e.ae,i=e.af,o=e.ag,a=e.S,l=e.ah,u=e.a6,c=e.ai,s=e.a7,d=e.aj,f=e.m,v=e.w,p=e.n,h=e.q,b=e.d,g=e.ak,y=e.R,m=e.v,x=e.al,w=e.N,I=e.am,S=e.C,k=e.Y,C=e.k,B=e.an,A=e.ao,R=e.y,z=e.t,T=e.Z,j=e.ap,O=e.aq,L=e.W,W=e.D,Z=e.Q,$=e.u,N=e.ar,M=e.as,E=e.at,F=e.X,H=e.U,V=e.G,X=e.I,q=e.au,D=e.E,U=e.av,G=e.aw,P=e.ax,Q=e.ay,Y=e.aa,J=e.O,K=e.x,_=e.V,ee=e.a8,ne=e.az,te=e.aA},function(e){re=e.S,ie=e.a}],execute:function(){function oe(e,n,t,a){var l=i(e),u=l<n,c=0===t?1:Math.round(1e3*t/16),s=(n-l)/c;!function t(){l+=s,(u&&l>n||!u&&l<n)&&(l=n),o(e,l),u&&l<n||!u&&l>n?r(t):a&&r(a)}()}var ae=n(f("sticky"),2),le=ae[0],ue=ae[1],ce={zIndex:v,position:p("top"),container:Object,offsetTop:h(0),offsetBottom:h(0)},se=b({name:le,props:ce,emits:["scroll","change"],setup:function(n,t){var r=t.emit,o=t.slots,l=a(),f=g(l),v=y({fixed:!1,width:0,height:0,transform:0}),p=m((function(){return x("top"===n.position?n.offsetTop:n.offsetBottom)})),h=m((function(){var e=v.fixed,n=v.height,t=v.width;if(e)return{width:"".concat(t,"px"),height:"".concat(n,"px")}})),b=m((function(){if(v.fixed){var t=w(I(n.zIndex),e({width:"".concat(v.width,"px"),height:"".concat(v.height,"px")},n.position,"".concat(p.value,"px")));return v.transform&&(t.transform="translate3d(0, ".concat(v.transform,"px, 0)")),t}})),R=function(){if(l.value&&!B(l)){var e=n.container,t=n.position,o=A(l),a=i(window);if(v.width=o.width,v.height=o.height,"top"===t)if(e){var u=A(e),c=u.bottom-p.value-v.height;v.fixed=p.value>o.top&&u.bottom>0,v.transform=c<0?c:0}else v.fixed=p.value>o.top;else{var s=document.documentElement.clientHeight;if(e){var d=A(e),f=s-d.top-p.value-v.height;v.fixed=s-p.value<o.bottom&&s>d.top,v.transform=f<0?-f:0}else v.fixed=s-p.value<o.bottom}!function(e){r("scroll",{scrollTop:e,isFixed:v.fixed})}(a)}};return S((function(){return v.fixed}),(function(e){return r("change",e)})),k("scroll",R,{target:f,passive:!0}),function(e,n){if(u&&window.IntersectionObserver){var t=new IntersectionObserver((function(e){n(e[0].intersectionRatio>0)}),{root:document.body}),r=function(){e.value&&t.unobserve(e.value)};c(r),s(r),d((function(){e.value&&t.observe(e.value)}))}}(l,R),function(){var e;return C("div",{ref:l,style:h.value},[C("div",{class:ue({fixed:v.fixed}),style:b.value},[null==(e=o.default)?void 0:e.call(o)])])}}}),de=t("S",R(se)),fe=n(f("tab"),2),ve=fe[0],pe=fe[1],he=b({name:ve,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:v,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:z},setup:function(e,n){var t=n.slots,r=m((function(){var n={},t=e.type,r=e.color,i=e.disabled,o=e.isActive,a=e.activeColor,l=e.inactiveColor;r&&"card"===t&&(n.borderColor=r,i||(o?n.backgroundColor=r:n.color=r));var u=o?a:l;return u&&(n.color=u),n}));return function(){return C("div",{id:e.id,role:"tab",class:[pe([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:r.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[(n=C("span",{class:pe("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]),e.dot||T(e.badge)&&""!==e.badge?C(j,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:function(){return[n]}}):n)]);var n}}}),be=n(f("tabs"),2),ge=be[0],ye=be[1],me=b({name:ge,props:{count:O(Number),inited:Boolean,animated:Boolean,duration:O(v),swipeable:Boolean,lazyRender:Boolean,currentIndex:O(Number)},emits:["change"],setup:function(e,n){var t=n.emit,r=n.slots,i=a(),o=function(e){return t("change",e)},l=function(n){var t=i.value;t&&t.state.active!==n&&t.swipeTo(n,{immediate:!e.inited})};return S((function(){return e.currentIndex}),l),L((function(){l(e.currentIndex)})),W({swipeRef:i}),function(){return C("div",{class:ye("content",{animated:e.animated||e.swipeable})},[(t=null==(n=r.default)?void 0:n.call(r),e.animated||e.swipeable?C(re,{ref:i,loop:!1,class:ye("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:o},{default:function(){return[t]}}):t)]);var n,t}}}),xe=n(f("tabs"),2),we=xe[0],Ie=xe[1],Se={type:p("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:h(0),duration:h(.3),animated:Boolean,ellipsis:z,swipeable:Boolean,scrollspy:Boolean,offsetTop:h(0),background:String,lazyRender:z,lineWidth:v,lineHeight:v,beforeChange:Function,swipeThreshold:h(5),titleActiveColor:String,titleInactiveColor:String},ke=Symbol(we),Ce=b({name:we,props:Se,emits:["change","scroll","rendered","clickTab","update:active"],setup:function(t,i){var o,u,c,s,f,v=i.emit,p=i.slots,h=a(),b=a(),w=a(),I=a(),R=Z(),z=g(h),j=n((s=a([]),f=[],l((function(){s.value=[]})),[s,function(e){return f[e]||(f[e]=function(n){s.value[e]=n}),f[e]}]),2),O=j[0],L=j[1],Q=$(ke),Y=Q.children,J=Q.linkChildren,K=y({inited:!1,position:"",lineStyle:{},currentIndex:-1}),_=m((function(){return Y.length>t.swipeThreshold||!t.ellipsis||t.shrink})),ee=m((function(){return{borderColor:t.color,background:t.background}})),ne=function(e,n){var t;return null!=(t=e.name)?t:n},te=m((function(){var e=Y[K.currentIndex];if(e)return ne(e,K.currentIndex)})),re=m((function(){return x(t.offsetTop)})),ie=m((function(){return t.sticky?re.value+o:0})),ae=function(e){var n=b.value,i=O.value;if(_.value&&n&&i&&i[K.currentIndex]){var o=i[K.currentIndex].$el;!function(e,n,t){var i=0,o=e.scrollLeft,a=0===t?1:Math.round(1e3*t/16);!function t(){e.scrollLeft+=(n-o)/a,++i<a&&r(t)}()}(n,o.offsetLeft-(n.offsetWidth-o.offsetWidth)/2,e?0:+t.duration)}},le=function(){var e=K.inited;F((function(){var n=O.value;if(n&&n[K.currentIndex]&&"line"===t.type&&!B(h.value)){var r=n[K.currentIndex].$el,i=t.lineWidth,o=t.lineHeight,a=r.offsetLeft+r.offsetWidth/2,l={width:H(i),backgroundColor:t.color,transform:"translateX(".concat(a,"px) translateX(-50%)")};if(e&&(l.transitionDuration="".concat(t.duration,"s")),T(o)){var u=H(o);l.height=u,l.borderRadius=u}K.lineStyle=l}}))},ue=function(e,n){var r=function(e){for(var n=e<K.currentIndex?-1:1;e>=0&&e<Y.length;){if(!Y[e].disabled)return e;e+=n}}(e);if(T(r)){var i=Y[r],o=ne(i,r),a=null!==K.currentIndex;K.currentIndex!==r&&(K.currentIndex=r,n||ae(),le()),o!==t.active&&(v("update:active",o),a&&v("change",o,i.title)),c&&!t.scrollspy&&X(Math.ceil(q(h.value)-re.value))}},ce=function(e,n){var t=Y.find((function(n,t){return ne(n,t)===e})),r=t?Y.indexOf(t):0;ue(r,n)},se=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t.scrollspy){var n=Y[K.currentIndex].$el;if(n&&z.value){var r=q(n,z.value)-ie.value;u=!0,oe(z.value,r,e?0:+t.duration,(function(){u=!1}))}}},fe=function(e){c=e.isFixed,v("scroll",e)},ve=function(){return Y.map((function(e,n){return C(he,D({key:e.id,id:"".concat(R,"-").concat(n),ref:L(n),type:t.type,color:t.color,style:e.titleStyle,class:e.titleClass,shrink:t.shrink,isActive:n===K.currentIndex,controls:e.id,scrollable:_.value,activeColor:t.titleActiveColor,inactiveColor:t.titleInactiveColor,onClick:function(r){return function(e,n,r){var i=Y[n],o=i.title,a=i.disabled,l=ne(Y[n],n);a||(G(t.beforeChange,{args:[l],done:function(){ue(n),se()}}),P(e)),v("clickTab",{name:l,title:o,event:r,disabled:a})}(e,n,r)}},U(e,["dot","badge","title","disabled","showZeroBadge"])),{title:e.$slots.title})}))},pe=function(){if("line"===t.type&&Y.length)return C("div",{class:Ie("line"),style:K.lineStyle},null)},be=function(){var n,r,i,o=t.type,a=t.border,l=t.sticky,u=[C("div",{ref:l?void 0:w,class:[Ie("wrap"),e({},V,"line"===o&&a)]},[C("div",{ref:b,role:"tablist",class:Ie("nav",[o,{shrink:t.shrink,complete:_.value}]),style:ee.value,"aria-orientation":"horizontal"},[null==(n=p["nav-left"])?void 0:n.call(p),ve(),pe(),null==(r=p["nav-right"])?void 0:r.call(p)])]),null==(i=p["nav-bottom"])?void 0:i.call(p)];return l?C("div",{ref:w},[u]):u};S([function(){return t.color},N],le),S((function(){return t.active}),(function(e){e!==te.value&&ce(e)})),S((function(){return Y.length}),(function(){K.inited&&(ce(t.active),le(),F((function(){ae(!0)})))}));return W({resize:function(){le(),F((function(){var e,n;return null==(n=null==(e=I.value)?void 0:e.swipeRef.value)?void 0:n.resize()}))},scrollTo:function(e){F((function(){ce(e),se(!0)}))}}),M(le),E(le),d((function(){ce(t.active,!0),F((function(){K.inited=!0,w.value&&(o=A(w.value).height),ae(!0)}))})),k("scroll",(function(){if(t.scrollspy&&!u){var e=function(){for(var e=0;e<Y.length;e++)if(A(Y[e].$el).top>ie.value)return 0===e?0:e-1;return Y.length-1}();ue(e)}}),{target:z,passive:!0}),J({id:R,props:t,setLine:le,onRendered:function(e,n){return v("rendered",e,n)},currentName:te,scrollIntoView:ae}),function(){return C("div",{ref:h,class:Ie([t.type])},[t.sticky?C(de,{container:h.value,offsetTop:re.value,onScroll:fe},{default:function(){return[be()]}}):be(),C(me,{ref:I,count:Y.length,inited:K.inited,animated:t.animated,duration:t.duration,swipeable:t.swipeable,lazyRender:t.lazyRender,currentIndex:K.currentIndex,onChange:ue},{default:function(){var e;return[null==(e=p.default)?void 0:e.call(p)]}})])}}}),Be=Symbol(),Ae=(t("u",(function(){return Q(Be,null)})),n(f("tab"),2)),Re=Ae[0],ze=Ae[1],Te=w({},Y,{dot:Boolean,name:v,badge:v,title:String,disabled:Boolean,titleClass:J,titleStyle:[String,Object],showZeroBadge:z}),je=b({name:Re,props:Te,setup:function(e,n){var t=n.slots,r=Z(),i=a(!1),o=K(ke),l=o.parent,u=o.index;if(l){var c=function(){var n;return null!=(n=e.name)?n:u.value},s=m((function(){var n=c()===l.currentName.value;return n&&!i.value&&(i.value=!0,l.props.lazyRender&&F((function(){l.onRendered(c(),e.title)}))),n})),d=a(!s.value);return S(s,(function(e){e?d.value=!1:ne((function(){d.value=!0}))})),S((function(){return e.title}),(function(){l.setLine(),l.scrollIntoView()})),_(Be,s),function(){var e,n="".concat(l.id,"-").concat(u.value),o=l.props,a=o.animated,c=o.swipeable,f=o.scrollspy,v=o.lazyRender;if(t.default||a){var p=f||s.value;if(a||c)return C(ie,{id:r,role:"tabpanel",class:ze("panel-wrapper",{inactive:d.value}),tabindex:s.value?0:-1,"aria-hidden":!s.value,"aria-labelledby":n},{default:function(){var e;return[C("div",{class:ze("panel")},[null==(e=t.default)?void 0:e.call(t)])]}});var h=i.value||f||!v?null==(e=t.default)?void 0:e.call(t):null;return W({id:r}),ee(C("div",{id:r,role:"tabpanel",class:ze("panel"),tabindex:p?0:-1,"aria-labelledby":n},[h]),[[te,p]])}}}}});t("a",R(je)),t("T",R(Ce))}}}))}();
|