12345 |
- <<<<<<<< Updated upstream:dist/assets/index-legacy-18c7f5bd.js
- !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,r){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!==e(i))return i;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:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,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 r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(s){c=!0,i=s}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(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 r(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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}System.register(["./index-legacy-1797056f.js","./use-tab-status-legacy-21b28ca2.js","./index-legacy-8dbb4a28.js"],(function(e,r){"use strict";var i,o,a,l,u,c,s,f,d,v,b,p,h,g,y,m,x,w,S,I,k,C,B,T,R,z,A,j,O,W,L,N,Z,$,F,H,M,X,E,P,U,V,D,G,K,Y,q,J,Q,_,ee,te,ne,re,ie,oe,ae,le,ue,ce,se,fe,de;return{setters:[function(e){i=e.b6,o=e.ad,a=e.aS,l=e.b7,u=e.r,c=e.aX,s=e.ay,f=e.aG,d=e.ax,v=e.aU,b=e.c,p=e.n,h=e.m,g=e.b,y=e.d,m=e.aR,x=e.x,w=e.e,S=e.b8,I=e.a9,k=e.i,C=e.w,B=e.Y,T=e.b9,R=e.z,z=e.Z,A=e.ba,j=e.bb,O=e.a,W=e.k,L=e.bc,N=e.y,Z=e.X,$=e.t,F=e.bd,H=e.a7,M=e.aF,X=e.aT,E=e.o,P=e.W,U=e.a8,V=e.be,D=e.bf,G=e.$,K=e.bg,Y=e.av,q=e.as,J=e.a3,Q=e.aa,_=e.aw,ee=e.bh,te=e.bi,ne=e.aN,re=e.ac,ie=e.aK,oe=e.g,ae=e.h,le=e.ae,ue=e.aC,ce=e.v},function(e){se=e.T},function(e){fe=e.S,de=e.a}],execute:function(){function r(e,t){if(s&&window.IntersectionObserver){var n=new IntersectionObserver((function(e){t(e[0].intersectionRatio>0)}),{root:document.body}),r=function(){e.value&&n.unobserve(e.value)};f(r),d(r),v((function(){e.value&&n.observe(e.value)}))}}var ve=n(b("sticky"),2),be=ve[0],pe=ve[1],he={zIndex:p,position:h("top"),container:Object,offsetTop:g(0),offsetBottom:g(0)},ge=y({name:be,props:he,emits:["scroll","change"],setup:function(e,n){var i=n.emit,o=n.slots,l=u(),c=m(l),s=x({fixed:!1,width:0,height:0,transform:0}),f=u(!1),d=w((function(){return S("top"===e.position?e.offsetTop:e.offsetBottom)})),v=w((function(){if(!f.value){var e=s.fixed,t=s.height,n=s.width;return e?{width:"".concat(n,"px"),height:"".concat(t,"px")}:void 0}})),b=w((function(){if(s.fixed&&!f.value){var n=I(k(e.zIndex),t({width:"".concat(s.width,"px"),height:"".concat(s.height,"px")},e.position,"".concat(d.value,"px")));return s.transform&&(n.transform="translate3d(0, ".concat(s.transform,"px, 0)")),n}})),p=function(){if(l.value&&!T(l)){var t=e.container,n=e.position,r=z(l),o=a(window);if(s.width=r.width,s.height=r.height,"top"===n)if(t){var u=z(t),c=u.bottom-d.value-s.height;s.fixed=d.value>r.top&&u.bottom>0,s.transform=c<0?c:0}else s.fixed=d.value>r.top;else{var f=document.documentElement.clientHeight;if(t){var v=z(t),b=f-v.top-d.value-s.height;s.fixed=f-d.value<r.bottom&&f>v.top,s.transform=b<0?-b:0}else s.fixed=f-d.value<r.bottom}!function(e){i("scroll",{scrollTop:e,isFixed:s.fixed})}(o)}};return C((function(){return s.fixed}),(function(e){return i("change",e)})),B("scroll",p,{target:c,passive:!0}),r(l,p),C([A,j],(function(){l.value&&!T(l)&&s.fixed&&(f.value=!0,R((function(){var e=z(l);s.width=e.width,s.height=e.height,f.value=!1})))})),function(){var e;return O("div",{ref:l,style:v.value},[O("div",{class:pe({fixed:s.fixed&&!f.value}),style:b.value},[null==(e=o.default)?void 0:e.call(o)])])}}}),ye=W(ge),me=n(b("tabs"),2),xe=me[0],we=me[1],Se=y({name:xe,props:{count:L(Number),inited:Boolean,animated:Boolean,duration:L(p),swipeable:Boolean,lazyRender:Boolean,currentIndex:L(Number)},emits:["change"],setup:function(e,t){var n=t.emit,r=t.slots,i=u(),o=function(e){return n("change",e)},a=function(t){var n=i.value;n&&n.state.active!==t&&n.swipeTo(t,{immediate:!e.inited})};return C((function(){return e.currentIndex}),a),N((function(){a(e.currentIndex)})),Z({swipeRef:i}),function(){return O("div",{class:we("content",{animated:e.animated||e.swipeable})},[(n=null==(t=r.default)?void 0:t.call(r),e.animated||e.swipeable?O(fe,{ref:i,loop:!1,class:we("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:o},{default:function(){return[n]}}):n)]);var t,n}}}),Ie=n(b("tabs"),2),ke=Ie[0],Ce=Ie[1],Be={type:h("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:g(0),duration:g(.3),animated:Boolean,ellipsis:$,swipeable:Boolean,scrollspy:Boolean,offsetTop:g(0),background:String,lazyRender:$,lineWidth:p,lineHeight:p,beforeChange:Function,swipeThreshold:g(5),titleActiveColor:String,titleInactiveColor:String},Te=Symbol(ke),Re=y({name:ke,props:Be,emits:["change","scroll","rendered","clickTab","update:active"],setup:function(e,s){var f,d,b,p,h,g,y,I=s.emit,k=s.slots,j=u(),W=u(),L=u(),N=u(),$=F(),Y=m(j),q=n((g=u([]),y=[],c((function(){g.value=[]})),[g,function(e){return y[e]||(y[e]=function(t){g.value[e]=t}),y[e]}]),2),J=q[0],Q=q[1],_=H(Te),ee=_.children,te=_.linkChildren,ne=x({inited:!1,position:"",lineStyle:{},currentIndex:-1}),re=w((function(){return ee.length>+e.swipeThreshold||!e.ellipsis||e.shrink})),ie=w((function(){return{borderColor:e.color,background:e.background}})),oe=function(e,t){var n;return null!=(n=e.name)?n:t},ae=w((function(){var e=ee[ne.currentIndex];if(e)return oe(e,ne.currentIndex)})),le=w((function(){return S(e.offsetTop)})),ue=w((function(){return e.sticky?le.value+f:0})),ce=function(t){var n=W.value,r=J.value;if(re.value&&n&&r&&r[ne.currentIndex]){var a=r[ne.currentIndex].$el,l=a.offsetLeft-(n.offsetWidth-a.offsetWidth)/2;p&&p(),p=function(e,t,n){var r,a=0,l=e.scrollLeft,u=0===n?1:Math.round(1e3*n/16);return function n(){e.scrollLeft+=(t-l)/u,++a<u&&(r=o(n))}(),function(){i(r)}}(n,l,t?0:+e.duration)}},se=function(){var t=ne.inited;R((function(){var n=J.value;if(n&&n[ne.currentIndex]&&"line"===e.type&&!T(j.value)){var r=n[ne.currentIndex].$el,i=e.lineWidth,o=e.lineHeight,a=r.offsetLeft+r.offsetWidth/2,l={width:E(i),backgroundColor:e.color,transform:"translateX(".concat(a,"px) translateX(-50%)")};if(t&&(l.transitionDuration="".concat(e.duration,"s")),P(o)){var u=E(o);l.height=u,l.borderRadius=u}ne.lineStyle=l}}))},fe=function(t,n){var r=function(e){for(var t=e<ne.currentIndex?-1:1;e>=0&&e<ee.length;){if(!ee[e].disabled)return e;e+=t}}(t);if(P(r)){var i=ee[r],o=oe(i,r),a=null!==ne.currentIndex;ne.currentIndex!==r&&(ne.currentIndex=r,n||ce(),se()),o!==e.active&&(I("update:active",o),a&&I("change",o,i.title)),b&&!e.scrollspy&&V(Math.ceil(D(j.value)-le.value))}},de=function(e,t){var n=ee.find((function(t,n){return oe(t,n)===e})),r=n?ee.indexOf(n):0;fe(r,t)},ve=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.scrollspy){var n=ee[ne.currentIndex].$el;if(n&&Y.value){var r=D(n,Y.value)-ue.value;d=!0,h&&h(),h=function(e,t,n,r){var u,c=a(e),s=c<t,f=0===n?1:Math.round(1e3*n/16),d=(t-c)/f;return function n(){c+=d,(s&&c>t||!s&&c<t)&&(c=t),l(e,c),s&&c<t||!s&&c>t?u=o(n):r&&(u=o(r))}(),function(){i(u)}}(Y.value,r,t?0:+e.duration,(function(){d=!1}))}}},be=function(t,n,r){var i=ee[n],o=i.title,a=i.disabled,l=oe(ee[n],n);a||(G(e.beforeChange,{args:[l],done:function(){fe(n),ve()}}),K(t)),I("clickTab",{name:l,title:o,event:r,disabled:a})},pe=function(e){b=e.isFixed,I("scroll",e)},he=function(){if("line"===e.type&&ee.length)return O("div",{class:Ce("line"),style:ne.lineStyle},null)},ge=function(){var n,r,i,o=e.type,a=e.border,l=e.sticky,u=[O("div",{ref:l?void 0:L,class:[Ce("wrap"),t({},U,"line"===o&&a)]},[O("div",{ref:W,role:"tablist",class:Ce("nav",[o,{shrink:e.shrink,complete:re.value}]),style:ie.value,"aria-orientation":"horizontal"},[null==(n=k["nav-left"])?void 0:n.call(k),ee.map((function(e){return e.renderTitle(be)})),he(),null==(r=k["nav-right"])?void 0:r.call(k)])]),null==(i=k["nav-bottom"])?void 0:i.call(k)];return l?O("div",{ref:L},[u]):u},me=function(){se(),R((function(){var e,t;ce(!0),null==(t=null==(e=N.value)?void 0:e.swipeRef.value)||t.resize()}))};C((function(){return[e.color,e.duration,e.lineWidth,e.lineHeight]}),se),C(A,me),C((function(){return e.active}),(function(e){e!==ae.value&&de(e)})),C((function(){return ee.length}),(function(){ne.inited&&(de(e.active),se(),R((function(){ce(!0)})))}));return Z({resize:me,scrollTo:function(e){R((function(){de(e),ve(!0)}))}}),M(se),X(se),v((function(){de(e.active,!0),R((function(){ne.inited=!0,L.value&&(f=z(L.value).height),ce(!0)}))})),r(j,se),B("scroll",(function(){if(e.scrollspy&&!d){var t=function(){for(var e=0;e<ee.length;e++)if(z(ee[e].$el).top>ue.value)return 0===e?0:e-1;return ee.length-1}();fe(t)}}),{target:Y,passive:!0}),te({id:$,props:e,setLine:se,scrollable:re,onRendered:function(e,t){return I("rendered",e,t)},currentName:ae,setTitleRefs:Q,scrollIntoView:ce}),function(){return O("div",{ref:j,class:Ce([e.type])},[e.sticky?O(ye,{container:j.value,offsetTop:le.value,onScroll:pe},{default:function(){return[ge()]}}):ge(),O(Se,{ref:N,count:ee.length,inited:ne.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:ne.currentIndex,onChange:fe},{default:function(){var e;return[null==(e=k.default)?void 0:e.call(k)]}})])}}}),ze=n(b("tab"),2),Ae=ze[0],je=ze[1],Oe=y({name:Ae,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:$},setup:function(e,t){var n=t.slots,r=w((function(){var t={},n=e.type,r=e.color,i=e.disabled,o=e.isActive,a=e.activeColor,l=e.inactiveColor;r&&"card"===n&&(t.borderColor=r,i||(o?t.backgroundColor=r:t.color=r));var u=o?a:l;return u&&(t.color=u),t}));return function(){return O("div",{id:e.id,role:"tab",class:[je([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},[(t=O("span",{class:je("text",{ellipsis:!e.scrollable})},[n.title?n.title():e.title]),e.dot||P(e.badge)&&""!==e.badge?O(Y,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:function(){return[t]}}):t)]);var t}}}),We=n(b("tab"),2),Le=We[0],Ne=We[1],Ze=I({},q,{dot:Boolean,name:p,badge:p,title:String,disabled:Boolean,titleClass:J,titleStyle:[String,Object],showZeroBadge:$}),$e=y({name:Le,props:Ze,setup:function(e,t){var n=t.slots,r=F(),i=u(!1),o=ue(),a=Q(Te),l=a.parent,c=a.index;if(l){var s=function(){var t;return null!=(t=e.name)?t:c.value},f=w((function(){var t=s()===l.currentName.value;return t&&!i.value&&(i.value=!0,l.props.lazyRender&&R((function(){l.onRendered(s(),e.title)}))),t})),d=u(""),v=u("");_((function(){var t=e.titleClass,n=e.titleStyle;d.value=t?ee(t):"",v.value=n&&"string"!=typeof n?te(ne(n)):n}));var b=u(!f.value);return C(f,(function(e){e?b.value=!1:re((function(){b.value=!0}))})),C((function(){return e.title}),(function(){l.setLine(),l.scrollIntoView()})),ie(se,f),Z({id:r,renderTitle:function(t){return O(Oe,ae({key:r,id:"".concat(l.id,"-").concat(c.value),ref:l.setTitleRefs(c.value),style:v.value,class:d.value,isActive:f.value,controls:r,scrollable:l.scrollable.value,activeColor:l.props.titleActiveColor,inactiveColor:l.props.titleInactiveColor,onClick:function(e){return t(o.proxy,c.value,e)}},le(l.props,["type","color","shrink"]),le(e,["dot","badge","title","disabled","showZeroBadge"])),{title:n.title})}}),function(){var e,t="".concat(l.id,"-").concat(c.value),o=l.props,a=o.animated,u=o.swipeable,s=o.scrollspy,d=o.lazyRender;if(n.default||a){var v=s||f.value;if(a||u)return O(de,{id:r,role:"tabpanel",class:Ne("panel-wrapper",{inactive:b.value}),tabindex:f.value?0:-1,"aria-hidden":!f.value,"aria-labelledby":t},{default:function(){var e;return[O("div",{class:Ne("panel")},[null==(e=n.default)?void 0:e.call(n)])]}});var p=i.value||s||!d?null==(e=n.default)?void 0:e.call(n):null;return oe(O("div",{id:r,role:"tabpanel",class:Ne("panel"),tabindex:v?0:-1,"aria-labelledby":t},[p]),[[ce,v]])}}}console.error("[Vant] <Tab> must be a child component of <Tabs>.")}});e("a",W($e)),e("T",W(Re))}}}))}();
- ========
- !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,r){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!==e(i))return i;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:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,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 r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(s){c=!0,i=s}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(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 r(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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}System.register(["./index-legacy-d8ca04f1.js","./use-tab-status-legacy-ec74e86d.js","./index-legacy-f5611a78.js"],(function(e,r){"use strict";var i,o,a,l,u,c,s,f,d,v,b,p,h,g,y,m,x,w,S,I,k,B,C,T,R,z,j,A,O,L,W,Z,$,H,N,M,V,E,F,P,U,X,D,Y,G,q,J,K,Q,_,ee,te,ne,re,ie,oe,ae,le,ue,ce,se,fe,de;return{setters:[function(e){i=e.b7,o=e.ad,a=e.aT,l=e.b8,u=e.r,c=e.aY,s=e.az,f=e.aH,d=e.ay,v=e.aV,b=e.c,p=e.n,h=e.m,g=e.b,y=e.d,m=e.aS,x=e.x,w=e.e,S=e.b9,I=e.a9,k=e.i,B=e.w,C=e.Y,T=e.ba,R=e.z,z=e.Z,j=e.bb,A=e.bc,O=e.a,L=e.k,W=e.bd,Z=e.y,$=e.X,H=e.t,N=e.be,M=e.a7,V=e.aG,E=e.aU,F=e.o,P=e.W,U=e.a8,X=e.bf,D=e.bg,Y=e.$,G=e.bh,q=e.aw,J=e.at,K=e.a3,Q=e.aa,_=e.ax,ee=e.bi,te=e.bj,ne=e.aO,re=e.ac,ie=e.aL,oe=e.g,ae=e.v,le=e.h,ue=e.ae,ce=e.aD},function(e){se=e.T},function(e){fe=e.S,de=e.a}],execute:function(){function r(e,t){if(s&&window.IntersectionObserver){var n=new IntersectionObserver((function(e){t(e[0].intersectionRatio>0)}),{root:document.body}),r=function(){e.value&&n.unobserve(e.value)};f(r),d(r),v((function(){e.value&&n.observe(e.value)}))}}var ve=n(b("sticky"),2),be=ve[0],pe=ve[1],he={zIndex:p,position:h("top"),container:Object,offsetTop:g(0),offsetBottom:g(0)},ge=y({name:be,props:he,emits:["scroll","change"],setup:function(e,n){var i=n.emit,o=n.slots,l=u(),c=m(l),s=x({fixed:!1,width:0,height:0,transform:0}),f=u(!1),d=w((function(){return S("top"===e.position?e.offsetTop:e.offsetBottom)})),v=w((function(){if(!f.value){var e=s.fixed,t=s.height,n=s.width;return e?{width:"".concat(n,"px"),height:"".concat(t,"px")}:void 0}})),b=w((function(){if(s.fixed&&!f.value){var n=I(k(e.zIndex),t({width:"".concat(s.width,"px"),height:"".concat(s.height,"px")},e.position,"".concat(d.value,"px")));return s.transform&&(n.transform="translate3d(0, ".concat(s.transform,"px, 0)")),n}})),p=function(){if(l.value&&!T(l)){var t=e.container,n=e.position,r=z(l),o=a(window);if(s.width=r.width,s.height=r.height,"top"===n)if(t){var u=z(t),c=u.bottom-d.value-s.height;s.fixed=d.value>r.top&&u.bottom>0,s.transform=c<0?c:0}else s.fixed=d.value>r.top;else{var f=document.documentElement.clientHeight;if(t){var v=z(t),b=f-v.top-d.value-s.height;s.fixed=f-d.value<r.bottom&&f>v.top,s.transform=b<0?-b:0}else s.fixed=f-d.value<r.bottom}!function(e){i("scroll",{scrollTop:e,isFixed:s.fixed})}(o)}};return B((function(){return s.fixed}),(function(e){return i("change",e)})),C("scroll",p,{target:c,passive:!0}),r(l,p),B([j,A],(function(){l.value&&!T(l)&&s.fixed&&(f.value=!0,R((function(){var e=z(l);s.width=e.width,s.height=e.height,f.value=!1})))})),function(){var e;return O("div",{ref:l,style:v.value},[O("div",{class:pe({fixed:s.fixed&&!f.value}),style:b.value},[null==(e=o.default)?void 0:e.call(o)])])}}}),ye=L(ge),me=n(b("tabs"),2),xe=me[0],we=me[1],Se=y({name:xe,props:{count:W(Number),inited:Boolean,animated:Boolean,duration:W(p),swipeable:Boolean,lazyRender:Boolean,currentIndex:W(Number)},emits:["change"],setup:function(e,t){var n=t.emit,r=t.slots,i=u(),o=function(e){return n("change",e)},a=function(t){var n=i.value;n&&n.state.active!==t&&n.swipeTo(t,{immediate:!e.inited})};return B((function(){return e.currentIndex}),a),Z((function(){a(e.currentIndex)})),$({swipeRef:i}),function(){return O("div",{class:we("content",{animated:e.animated||e.swipeable})},[(n=null==(t=r.default)?void 0:t.call(r),e.animated||e.swipeable?O(fe,{ref:i,loop:!1,class:we("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:o},{default:function(){return[n]}}):n)]);var t,n}}}),Ie=n(b("tabs"),2),ke=Ie[0],Be=Ie[1],Ce={type:h("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:g(0),duration:g(.3),animated:Boolean,ellipsis:H,swipeable:Boolean,scrollspy:Boolean,offsetTop:g(0),background:String,lazyRender:H,lineWidth:p,lineHeight:p,beforeChange:Function,swipeThreshold:g(5),titleActiveColor:String,titleInactiveColor:String},Te=Symbol(ke),Re=y({name:ke,props:Ce,emits:["change","scroll","rendered","clickTab","update:active"],setup:function(e,s){var f,d,b,p,h,g,y,I=s.emit,k=s.slots,A=u(),L=u(),W=u(),Z=u(),H=N(),q=m(A),J=n((g=u([]),y=[],c((function(){g.value=[]})),[g,function(e){return y[e]||(y[e]=function(t){g.value[e]=t}),y[e]}]),2),K=J[0],Q=J[1],_=M(Te),ee=_.children,te=_.linkChildren,ne=x({inited:!1,position:"",lineStyle:{},currentIndex:-1}),re=w((function(){return ee.length>+e.swipeThreshold||!e.ellipsis||e.shrink})),ie=w((function(){return{borderColor:e.color,background:e.background}})),oe=function(e,t){var n;return null!=(n=e.name)?n:t},ae=w((function(){var e=ee[ne.currentIndex];if(e)return oe(e,ne.currentIndex)})),le=w((function(){return S(e.offsetTop)})),ue=w((function(){return e.sticky?le.value+f:0})),ce=function(t){var n=L.value,r=K.value;if(re.value&&n&&r&&r[ne.currentIndex]){var a=r[ne.currentIndex].$el,l=a.offsetLeft-(n.offsetWidth-a.offsetWidth)/2;p&&p(),p=function(e,t,n){var r,a=0,l=e.scrollLeft,u=0===n?1:Math.round(1e3*n/16);return function n(){e.scrollLeft+=(t-l)/u,++a<u&&(r=o(n))}(),function(){i(r)}}(n,l,t?0:+e.duration)}},se=function(){var t=ne.inited;R((function(){var n=K.value;if(n&&n[ne.currentIndex]&&"line"===e.type&&!T(A.value)){var r=n[ne.currentIndex].$el,i=e.lineWidth,o=e.lineHeight,a=r.offsetLeft+r.offsetWidth/2,l={width:F(i),backgroundColor:e.color,transform:"translateX(".concat(a,"px) translateX(-50%)")};if(t&&(l.transitionDuration="".concat(e.duration,"s")),P(o)){var u=F(o);l.height=u,l.borderRadius=u}ne.lineStyle=l}}))},fe=function(t,n){var r=function(e){for(var t=e<ne.currentIndex?-1:1;e>=0&&e<ee.length;){if(!ee[e].disabled)return e;e+=t}}(t);if(P(r)){var i=ee[r],o=oe(i,r),a=null!==ne.currentIndex;ne.currentIndex!==r&&(ne.currentIndex=r,n||ce(),se()),o!==e.active&&(I("update:active",o),a&&I("change",o,i.title)),b&&!e.scrollspy&&X(Math.ceil(D(A.value)-le.value))}},de=function(e,t){var n=ee.find((function(t,n){return oe(t,n)===e})),r=n?ee.indexOf(n):0;fe(r,t)},ve=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.scrollspy){var n=ee[ne.currentIndex].$el;if(n&&q.value){var r=D(n,q.value)-ue.value;d=!0,h&&h(),h=function(e,t,n,r){var u,c=a(e),s=c<t,f=0===n?1:Math.round(1e3*n/16),d=(t-c)/f;return function n(){c+=d,(s&&c>t||!s&&c<t)&&(c=t),l(e,c),s&&c<t||!s&&c>t?u=o(n):r&&(u=o(r))}(),function(){i(u)}}(q.value,r,t?0:+e.duration,(function(){d=!1}))}}},be=function(t,n,r){var i=ee[n],o=i.title,a=i.disabled,l=oe(ee[n],n);a||(Y(e.beforeChange,{args:[l],done:function(){fe(n),ve()}}),G(t)),I("clickTab",{name:l,title:o,event:r,disabled:a})},pe=function(e){b=e.isFixed,I("scroll",e)},he=function(){if("line"===e.type&&ee.length)return O("div",{class:Be("line"),style:ne.lineStyle},null)},ge=function(){var n,r,i,o=e.type,a=e.border,l=e.sticky,u=[O("div",{ref:l?void 0:W,class:[Be("wrap"),t({},U,"line"===o&&a)]},[O("div",{ref:L,role:"tablist",class:Be("nav",[o,{shrink:e.shrink,complete:re.value}]),style:ie.value,"aria-orientation":"horizontal"},[null==(n=k["nav-left"])?void 0:n.call(k),ee.map((function(e){return e.renderTitle(be)})),he(),null==(r=k["nav-right"])?void 0:r.call(k)])]),null==(i=k["nav-bottom"])?void 0:i.call(k)];return l?O("div",{ref:W},[u]):u},me=function(){se(),R((function(){var e,t;ce(!0),null==(t=null==(e=Z.value)?void 0:e.swipeRef.value)||t.resize()}))};B((function(){return[e.color,e.duration,e.lineWidth,e.lineHeight]}),se),B(j,me),B((function(){return e.active}),(function(e){e!==ae.value&&de(e)})),B((function(){return ee.length}),(function(){ne.inited&&(de(e.active),se(),R((function(){ce(!0)})))}));return $({resize:me,scrollTo:function(e){R((function(){de(e),ve(!0)}))}}),V(se),E(se),v((function(){de(e.active,!0),R((function(){ne.inited=!0,W.value&&(f=z(W.value).height),ce(!0)}))})),r(A,se),C("scroll",(function(){if(e.scrollspy&&!d){var t=function(){for(var e=0;e<ee.length;e++)if(z(ee[e].$el).top>ue.value)return 0===e?0:e-1;return ee.length-1}();fe(t)}}),{target:q,passive:!0}),te({id:H,props:e,setLine:se,scrollable:re,onRendered:function(e,t){return I("rendered",e,t)},currentName:ae,setTitleRefs:Q,scrollIntoView:ce}),function(){return O("div",{ref:A,class:Be([e.type])},[e.sticky?O(ye,{container:A.value,offsetTop:le.value,onScroll:pe},{default:function(){return[ge()]}}):ge(),O(Se,{ref:Z,count:ee.length,inited:ne.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:ne.currentIndex,onChange:fe},{default:function(){var e;return[null==(e=k.default)?void 0:e.call(k)]}})])}}}),ze=n(b("tab"),2),je=ze[0],Ae=ze[1],Oe=y({name:je,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:H},setup:function(e,t){var n=t.slots,r=w((function(){var t={},n=e.type,r=e.color,i=e.disabled,o=e.isActive,a=e.activeColor,l=e.inactiveColor;r&&"card"===n&&(t.borderColor=r,i||(o?t.backgroundColor=r:t.color=r));var u=o?a:l;return u&&(t.color=u),t}));return function(){return O("div",{id:e.id,role:"tab",class:[Ae([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},[(t=O("span",{class:Ae("text",{ellipsis:!e.scrollable})},[n.title?n.title():e.title]),e.dot||P(e.badge)&&""!==e.badge?O(q,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:function(){return[t]}}):t)]);var t}}}),Le=n(b("tab"),2),We=Le[0],Ze=Le[1],$e=I({},J,{dot:Boolean,name:p,badge:p,title:String,disabled:Boolean,titleClass:K,titleStyle:[String,Object],showZeroBadge:H}),He=y({name:We,props:$e,setup:function(e,t){var n=t.slots,r=N(),i=u(!1),o=ce(),a=Q(Te),l=a.parent,c=a.index;if(l){var s=function(){var t;return null!=(t=e.name)?t:c.value},f=w((function(){var t=s()===l.currentName.value;return t&&!i.value&&(i.value=!0,l.props.lazyRender&&R((function(){l.onRendered(s(),e.title)}))),t})),d=u(""),v=u("");_((function(){var t=e.titleClass,n=e.titleStyle;d.value=t?ee(t):"",v.value=n&&"string"!=typeof n?te(ne(n)):n}));var b=u(!f.value);return B(f,(function(e){e?b.value=!1:re((function(){b.value=!0}))})),B((function(){return e.title}),(function(){l.setLine(),l.scrollIntoView()})),ie(se,f),$({id:r,renderTitle:function(t){return O(Oe,le({key:r,id:"".concat(l.id,"-").concat(c.value),ref:l.setTitleRefs(c.value),style:v.value,class:d.value,isActive:f.value,controls:r,scrollable:l.scrollable.value,activeColor:l.props.titleActiveColor,inactiveColor:l.props.titleInactiveColor,onClick:function(e){return t(o.proxy,c.value,e)}},ue(l.props,["type","color","shrink"]),ue(e,["dot","badge","title","disabled","showZeroBadge"])),{title:n.title})}}),function(){var e,t="".concat(l.id,"-").concat(c.value),o=l.props,a=o.animated,u=o.swipeable,s=o.scrollspy,d=o.lazyRender;if(n.default||a){var v=s||f.value;if(a||u)return O(de,{id:r,role:"tabpanel",class:Ze("panel-wrapper",{inactive:b.value}),tabindex:f.value?0:-1,"aria-hidden":!f.value,"aria-labelledby":t},{default:function(){var e;return[O("div",{class:Ze("panel")},[null==(e=n.default)?void 0:e.call(n)])]}});var p=i.value||s||!d?null==(e=n.default)?void 0:e.call(n):null;return oe(O("div",{id:r,role:"tabpanel",class:Ze("panel"),tabindex:v?0:-1,"aria-labelledby":t},[p]),[[ae,v]])}}}console.error("[Vant] <Tab> must be a child component of <Tabs>.")}});e("a",L(He)),e("T",L(Re))}}}))}();
- >>>>>>>> Stashed changes:dist/assets/index-legacy-f58136b3.js
|