index-legacy-855e67ff.js 18 KB

1
  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(s){c=!0,a=s}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-96b0057e.js","./use-tab-status-legacy-745fa803.js"],(function(e,i){"use strict";var a,r,o,l,u,c,s,v,f,d,p,h,g,b,m,y,w,x,S,I,C,k,B,T,z,R,A,O,j,M,E,P,W,X,$,D,L,N,Y,Z,F,H,V,G,K,U,q,Q,_,J,ee,te,ne,ie,ae,re,oe,le,ue;return{setters:[function(e){a=e.aP,r=e.aF,o=e.aQ,l=e.i,u=e.a0,c=e.z,s=e.aR,v=e.l,f=e.aS,d=e.j,p=e.t,h=e.n,g=e.an,b=e.d,m=e.aD,y=e.O,w=e.E,x=e.aN,S=e.A,I=e.aI,C=e.w,k=e.aj,B=e.g,T=e.aE,z=e.Y,R=e.D,A=e.v,O=e.ax,j=e.K,M=e.ai,E=e.ac,P=e.ao,W=e.ap,X=e.aq,$=e.aT,D=e.o,L=e.aU,N=e.aV,Y=e.y,Z=e.ak,F=e.aW,H=e.al,V=e.ah,G=e.aG,K=e.G,U=e.aX,q=e.aY,Q=e.aZ,_=e.m,J=e.p,ee=e.as,te=e.a_,ne=e.ae,ie=e.aK,ae=e.x,re=e.ay,oe=e.$,le=e.az},function(e){ue=e.T}],execute:function(){function i(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)};s(i),v(i),f((function(){e.value&&n.observe(e.value)}))}}var ce=n(d("sticky"),2),se=ce[0],ve=ce[1],fe={zIndex:p,position:h("top"),container:Object,offsetTop:g(0),offsetBottom:g(0)},de=b({name:se,props:fe,emits:["scroll","change"],setup:function(e,n){var a=n.emit,o=n.slots,u=l(),c=m(u),s=y({fixed:!1,width:0,height:0,transform:0}),v=w((function(){return x("top"===e.position?e.offsetTop:e.offsetBottom)})),f=w((function(){var e=s.fixed,t=s.height,n=s.width;if(e)return{width:"".concat(n,"px"),height:"".concat(t,"px")}})),d=w((function(){if(s.fixed){var n=S(I(e.zIndex),t({width:"".concat(s.width,"px"),height:"".concat(s.height,"px")},e.position,"".concat(v.value,"px")));return s.transform&&(n.transform="translate3d(0, ".concat(s.transform,"px, 0)")),n}})),p=function(){if(u.value&&!T(u)){var t=e.container,n=e.position,i=z(u),o=r(window);if(s.width=i.width,s.height=i.height,"top"===n)if(t){var l=z(t),c=l.bottom-v.value-s.height;s.fixed=v.value>i.top&&l.bottom>0,s.transform=c<0?c:0}else s.fixed=v.value>i.top;else{var f=document.documentElement.clientHeight;if(t){var d=z(t),p=f-d.top-v.value-s.height;s.fixed=f-v.value<i.bottom&&f>d.top,s.transform=p<0?-p:0}else s.fixed=f-v.value<i.bottom}!function(e){a("scroll",{scrollTop:e,isFixed:s.fixed})}(o)}};return C((function(){return s.fixed}),(function(e){return a("change",e)})),k("scroll",p,{target:c,passive:!0}),i(u,p),function(){var e;return B("div",{ref:u,style:f.value},[B("div",{class:ve({fixed:s.fixed}),style:d.value},[null==(e=o.default)?void 0:e.call(o)])])}}}),pe=e("S",R(de)),he=n(d("tab"),2),ge=he[0],be=he[1],me=b({name:ge,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:A},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:[be([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:be("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}}}),ye=n(d("swipe"),2),we=ye[0],xe=ye[1],Se={loop:A,width:p,height:p,vertical:Boolean,autoplay:g(0),duration:g(500),touchable:A,lazyRender:Boolean,initialSwipe:g(0),indicatorColor:String,showIndicators:A,stopPropagation:A},Ie=Symbol(we),Ce=b({name:we,props:Se,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(Ie),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})),R=w((function(){return(c.active+b.value)%b.value})),A=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=H(a,S.value,0)),a},V=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,s=function(t){var n=c.active;return t?e.loop?H(n+t,-1,b.value):H(n+t,0,I.value):n}(i),v=j(s,o);if(e.loop){if(h[0]&&v!==S.value){var f=v<S.value;h[0].setOffset(f?z.value:0)}if(h[b.value-1]&&0!==v){var d=v>0;h[b.value-1].setOffset(d?-z.value:0)}}c.active=s,c.offset=v,l&&s!==u&&a("change",R.value)}},G=function(){c.swiping=!0,c.active<=-1?V({pace:b.value}):c.active>=b.value&&V({pace:-b.value})},K=function(){G(),d.reset(),F((function(){c.swiping=!1,V({pace:1,emitChange:!0})}))},U=function(){return clearTimeout(n)},q=function t(){U(),+e.autoplay>0&&b.value>1&&(n=setTimeout((function(){K(),t()}),+e.autoplay))},Q=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)})),q()};T(o)?Y().then(n):n()}},_=function(){return Q(c.active)},J=function(t){!e.touchable||t.touches.length>1||(d.start(t),f=!1,i=Date.now(),U(),G())},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)&&A.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),V({pace:o,emitChange:!0})}else x.value&&V({pace:0});f=!1,c.swiping=!1,a("dragEnd",{index:R.value}),q()}},te=function(t,n){var i=n===R.value,a=i?{backgroundColor:e.indicatorColor}:void 0;return B("i",{style:a,class:xe("indicator",{active:i})},null)};return P({prev:function(){G(),d.reset(),F((function(){c.swiping=!1,V({pace:-1,emitChange:!0})}))},next:K,state:c,resize:_,swipeTo:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};G(),d.reset(),F((function(){var i;i=e.loop&&t===b.value?0===c.active?0:t:t%b.value,n.immediate?F((function(){c.swiping=!1})):c.swiping=!1,V({pace:i-c.active,emitChange:!0})}))}}),g({size:m,props:e,count:b,activeIndicator:R}),C((function(){return e.initialSwipe}),(function(e){return Q(+e)})),C(b,(function(){return Q(c.active)})),C((function(){return e.autoplay}),q),C([W,X,function(){return e.width},function(){return e.height}],_),C($(),(function(e){"visible"===e?q():U()})),D(Q),L((function(){return Q(c.active)})),N((function(){return Q(c.active)})),s(U),v(U),k("touchmove",(function(t){e.touchable&&c.swiping&&(d.move(t),A.value&&(!e.loop&&(0===c.active&&x.value>0||c.active===b.value-1&&x.value<0)||(Z(t,e.stopPropagation),V({offset:x.value}),f||(a("dragStart",{index:R.value}),f=!0))))}),{target:u}),function(){var t;return B("div",{ref:o,class:xe()},[B("div",{ref:u,style:O.value,class:xe("track",{vertical:e.vertical}),onTouchstartPassive:J,onTouchend:ee,onTouchcancel:ee},[null==(t=r.default)?void 0:t.call(r)]),r.indicator?r.indicator({active:R.value,total:b.value}):e.showIndicators&&b.value>1?B("div",{class:xe("indicators",{vertical:e.vertical})},[Array(b.value).fill("").map(te)]):void 0])}}}),ke=e("b",R(Ce)),Be=n(d("tabs"),2),Te=Be[0],ze=Be[1],Re=b({name:Te,props:{count:V(Number),inited:Boolean,animated:Boolean,duration:V(p),swipeable:Boolean,lazyRender:Boolean,currentIndex:V(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),D((function(){o(e.currentIndex)})),P({swipeRef:a}),function(){return B("div",{class:ze("content",{animated:e.animated||e.swipeable})},[(n=null==(t=i.default)?void 0:t.call(i),e.animated||e.swipeable?B(ke,{ref:a,loop:!1,class:ze("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:r},{default:function(){return[n]}}):n)]);var t,n}}}),Ae=n(d("tabs"),2),Oe=Ae[0],je=Ae[1],Me={type:h("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:g(0),duration:g(.3),animated:Boolean,ellipsis:A,swipeable:Boolean,scrollspy:Boolean,offsetTop:g(0),background:String,lazyRender:A,lineWidth:p,lineHeight:p,beforeChange:Function,swipeThreshold:g(5),titleActiveColor:String,titleInactiveColor:String},Ee=Symbol(Oe),Pe=b({name:Oe,props:Me,emits:["change","scroll","rendered","clickTab","update:active"],setup:function(e,c){var s,v,d,p,h,g=c.emit,b=c.slots,S=l(),I=l(),R=l(),A=l(),j=G(),M=m(S),X=n((p=l([]),h=[],u((function(){p.value=[]})),[p,function(e){return h[e]||(h[e]=function(t){p.value[e]=t}),h[e]}]),2),$=X[0],D=X[1],Z=E(Ee),F=Z.children,H=Z.linkChildren,V=y({inited:!1,position:"",lineStyle:{},currentIndex:-1}),ne=w((function(){return F.length>+e.swipeThreshold||!e.ellipsis||e.shrink})),ie=w((function(){return{borderColor:e.color,background:e.background}})),ae=function(e,t){var n;return null!=(n=e.name)?n:t},re=w((function(){var e=F[V.currentIndex];if(e)return ae(e,V.currentIndex)})),oe=w((function(){return x(e.offsetTop)})),le=w((function(){return e.sticky?oe.value+s:0})),ue=function(t){var n=I.value,i=$.value;if(ne.value&&n&&i&&i[V.currentIndex]){var r=i[V.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)}},ce=function(){var t=V.inited;Y((function(){var n=$.value;if(n&&n[V.currentIndex]&&"line"===e.type&&!T(S.value)){var i=n[V.currentIndex].$el,a=e.lineWidth,r=e.lineHeight,o=i.offsetLeft+i.offsetWidth/2,l={width:K(a),backgroundColor:e.color,transform:"translateX(".concat(o,"px) translateX(-50%)")};if(t&&(l.transitionDuration="".concat(e.duration,"s")),O(r)){var u=K(r);l.height=u,l.borderRadius=u}V.lineStyle=l}}))},se=function(t,n){var i=function(e){for(var t=e<V.currentIndex?-1:1;e>=0&&e<F.length;){if(!F[e].disabled)return e;e+=t}}(t);if(O(i)){var a=F[i],r=ae(a,i),o=null!==V.currentIndex;V.currentIndex!==i&&(V.currentIndex=i,n||ue(),ce()),r!==e.active&&(g("update:active",r),o&&g("change",r,a.title)),d&&!e.scrollspy&&q(Math.ceil(Q(S.value)-oe.value))}},ve=function(e,t){var n=F.find((function(t,n){return ae(t,n)===e})),i=n?F.indexOf(n):0;se(i,t)},fe=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.scrollspy){var n=F[V.currentIndex].$el;if(n&&M.value){var i=Q(n,M.value)-le.value;v=!0,function(e,t,n,i){var l=r(e),u=l<t,c=0===n?1:Math.round(1e3*n/16),s=(t-l)/c;!function n(){l+=s,(u&&l>t||!u&&l<t)&&(l=t),o(e,l),u&&l<t||!u&&l>t?a(n):i&&a(i)}()}(M.value,i,t?0:+e.duration,(function(){v=!1}))}}},de=function(e){d=e.isFixed,g("scroll",e)},he=function(){return F.map((function(t,n){return B(me,_({key:t.id,id:"".concat(j,"-").concat(n),ref:D(n),type:e.type,color:e.color,style:t.titleStyle,class:t.titleClass,shrink:e.shrink,isActive:n===V.currentIndex,controls:t.id,scrollable:ne.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:function(i){return function(t,n,i){var a=F[n],r=a.title,o=a.disabled,l=ae(F[n],n);o||(ee(e.beforeChange,{args:[l],done:function(){se(n),fe()}}),te(t)),g("clickTab",{name:l,title:r,event:i,disabled:o})}(t,n,i)}},J(t,["dot","badge","title","disabled","showZeroBadge"])),{title:t.$slots.title})}))},ge=function(){if("line"===e.type&&F.length)return B("div",{class:je("line"),style:V.lineStyle},null)},be=function(){var n,i,a,r=e.type,o=e.border,l=e.sticky,u=[B("div",{ref:l?void 0:R,class:[je("wrap"),t({},U,"line"===r&&o)]},[B("div",{ref:I,role:"tablist",class:je("nav",[r,{shrink:e.shrink,complete:ne.value}]),style:ie.value,"aria-orientation":"horizontal"},[null==(n=b["nav-left"])?void 0:n.call(b),he(),ge(),null==(i=b["nav-right"])?void 0:i.call(b)])]),null==(a=b["nav-bottom"])?void 0:a.call(b)];return l?B("div",{ref:R},[u]):u};C([function(){return e.color},W],ce),C((function(){return e.active}),(function(e){e!==re.value&&ve(e)})),C((function(){return F.length}),(function(){V.inited&&(ve(e.active),ce(),Y((function(){ue(!0)})))}));return P({resize:function(){ce(),Y((function(){var e,t;return null==(t=null==(e=A.value)?void 0:e.swipeRef.value)?void 0:t.resize()}))},scrollTo:function(e){Y((function(){ve(e),fe(!0)}))}}),L(ce),N(ce),f((function(){ve(e.active,!0),Y((function(){V.inited=!0,R.value&&(s=z(R.value).height),ue(!0)}))})),i(S,ce),k("scroll",(function(){if(e.scrollspy&&!v){var t=function(){for(var e=0;e<F.length;e++)if(z(F[e].$el).top>le.value)return 0===e?0:e-1;return F.length-1}();se(t)}}),{target:M,passive:!0}),H({id:j,props:e,setLine:ce,onRendered:function(e,t){return g("rendered",e,t)},currentName:re,scrollIntoView:ue}),function(){return B("div",{ref:S,class:je([e.type])},[e.sticky?B(pe,{container:S.value,offsetTop:oe.value,onScroll:de},{default:function(){return[be()]}}):be(),B(Re,{ref:A,count:F.length,inited:V.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:V.currentIndex,onChange:se},{default:function(){var e;return[null==(e=b.default)?void 0:e.call(b)]}})])}}}),We=n(d("swipe-item"),2),Xe=We[0],$e=We[1],De=b({name:Xe,setup:function(e,t){var n,i=t.slots,a=y({offset:0,inited:!1,mounted:!1}),r=ne(Ie),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 D((function(){Y((function(){a.mounted=!0}))})),P({setOffset:function(e){a.offset=e}}),function(){var e;return B("div",{class:$e(),style:u.value},[c.value?null==(e=i.default)?void 0:e.call(i):null])}}}}),Le=e("c",R(De)),Ne=n(d("tab"),2),Ye=Ne[0],Ze=Ne[1],Fe=S({},ie,{dot:Boolean,name:p,badge:p,title:String,disabled:Boolean,titleClass:ae,titleStyle:[String,Object],showZeroBadge:A}),He=b({name:Ye,props:Fe,setup:function(e,t){var n=t.slots,i=G(),a=l(!1),r=ne(Ee),o=r.parent,u=r.index;if(o){var c=function(){var t;return null!=(t=e.name)?t:u.value},s=w((function(){var t=c()===o.currentName.value;return t&&!a.value&&(a.value=!0,o.props.lazyRender&&Y((function(){o.onRendered(c(),e.title)}))),t})),v=l(!s.value);return C(s,(function(e){e?v.value=!1:F((function(){v.value=!0}))})),C((function(){return e.title}),(function(){o.setLine(),o.scrollIntoView()})),oe(ue,s),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||s.value;if(l||c)return B(Le,{id:i,role:"tabpanel",class:Ze("panel-wrapper",{inactive:v.value}),tabindex:s.value?0:-1,"aria-hidden":!s.value,"aria-labelledby":t},{default:function(){var e;return[B("div",{class:Ze("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 P({id:i}),re(B("div",{id:i,role:"tabpanel",class:Ze("panel"),tabindex:p?0:-1,"aria-labelledby":t},[h]),[[le,p]])}}}}});e("a",R(He)),e("T",R(Pe))}}}))}();