!function(){function t(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,i,r,u,o=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){c=!0,i=v}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw i}}return o}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e(t,n)}(t,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 e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,a=e*R.value;t.loop||(a=Math.min(a,-G.value));var i=n-a;return t.loop||(i=T(i,G.value,0)),i},J=function(e){var n=e.pace,a=void 0===n?0:n,r=e.offset,u=void 0===r?0:r,o=e.emitChange;if(!(H.value<=1)){var l=j.active,c=function(e){var n=j.active;return e?t.loop?T(n+e,-1,H.value):T(n+e,0,V.value):n}(a),v=F(c,u);if(t.loop){if(P[0]&&v!==G.value){var f=v0;P[H.value-1].setOffset(s?-W.value:0)}}j.active=c,j.offset=v,o&&c!==l&&i("change",$.value)}},K=function(){j.swiping=!0,j.active<=-1?J({pace:H.value}):j.active>=H.value&&J({pace:-H.value})},L=function(){K(),Y.reset(),O((function(){j.swiping=!1,J({pace:1,emitChange:!0})}))},N=function(){return clearTimeout(n)},Q=function e(){N(),+t.autoplay>0&&H.value>1&&(n=setTimeout((function(){L(),e()}),+t.autoplay))},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+t.initialSwipe;if(u.value){var n=function(){var n,a;if(!I(u)){var i={width:u.value.offsetWidth,height:u.value.offsetHeight};j.rect=i,j.width=+(null!=(n=t.width)?n:i.width),j.height=+(null!=(a=t.height)?a:i.height)}H.value&&-1===(e=Math.min(H.value-1,e))&&(e=H.value-1),j.active=e,j.swiping=!0,j.offset=F(e),P.forEach((function(t){t.setOffset(0)})),Q()};I(u)?M().then(n):n()}},tt=function(){return Z(j.active)},et=function(e){!t.touchable||e.touches.length>1||(Y.start(e),X=!1,a=Date.now(),N(),K())},nt=function(){if(t.touchable&&j.swiping){var e=Date.now()-a,n=U.value/e;if((Math.abs(n)>.25||Math.abs(U.value)>R.value/2)&&_.value){var r=t.vertical?Y.offsetY.value:Y.offsetX.value,u=0;u=t.loop?r>0?U.value>0?-1:1:0:-Math[U.value>0?"ceil":"floor"](U.value/R.value),J({pace:u,emitChange:!0})}else U.value&&J({pace:0});X=!1,j.swiping=!1,i("dragEnd",{index:$.value}),Q()}},at=function(e,n){var a=n===$.value,i=a?{backgroundColor:t.indicatorColor}:void 0;return z("i",{style:i,class:k("indicator",{active:a})},null)};return h({prev:function(){K(),Y.reset(),O((function(){j.swiping=!1,J({pace:-1,emitChange:!0})}))},next:L,state:j,resize:tt,swipeTo:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};K(),Y.reset(),O((function(){var a;a=t.loop&&e===H.value?0===j.active?0:e:e%H.value,n.immediate?O((function(){j.swiping=!1})):j.swiping=!1,J({pace:a-j.active,emitChange:!0})}))}}),B({size:R,props:t,count:H,activeIndicator:$}),d((function(){return t.initialSwipe}),(function(t){return Z(+t)})),d(H,(function(){return Z(j.active)})),d((function(){return t.autoplay}),Q),d([p,g,function(){return t.width},function(){return t.height}],tt),d(m(),(function(t){"visible"===t?Q():N()})),w(Z),y((function(){return Z(j.active)})),b((function(){return Z(j.active)})),S(N),x(N),C("touchmove",(function(e){t.touchable&&j.swiping&&(Y.move(e),_.value&&(!t.loop&&(0===j.active&&U.value>0||j.active===H.value-1&&U.value<0)||(A(e,t.stopPropagation),J({offset:U.value}),X||(i("dragStart",{index:$.value}),X=!0))))}),{target:o}),function(){var e;return z("div",{ref:u,class:k()},[z("div",{ref:o,style:q.value,class:k("track",{vertical:t.vertical}),onTouchstartPassive:et,onTouchend:nt,onTouchcancel:nt},[null==(e=r.default)?void 0:e.call(r)]),r.indicator?r.indicator({active:$.value,total:H.value}):t.showIndicators&&H.value>1?z("div",{class:k("indicators",{vertical:t.vertical})},[Array(H.value).fill("").map(at)]):void 0])}}}),B=(e("S",j(P)),t(a("swipe-item"),2)),H=B[0],R=B[1],U=o({name:H,setup:function(t,e){var n,a=e.slots,i=c({offset:0,inited:!1,mounted:!1}),r=X(D),u=r.parent,o=r.index;if(u){var l=s((function(){var t={},e=u.props.vertical;return u.size.value&&(t[e?"height":"width"]="".concat(u.size.value,"px")),i.offset&&(t.transform="translate".concat(e?"Y":"X","(").concat(i.offset,"px)")),t})),v=s((function(){var t=u.props,e=t.loop;if(!t.lazyRender||n)return!0;if(!i.mounted)return!1;var a=u.activeIndicator.value,r=u.count.value-1,l=0===a&&e?r:a-1,c=a===r&&e?0:a+1;return n=o.value===a||o.value===l||o.value===c}));return w((function(){M((function(){i.mounted=!0}))})),h({setOffset:function(t){i.offset=t}}),function(){var t;return z("div",{class:R(),style:l.value},[v.value?null==(t=a.default)?void 0:t.call(a):null])}}console.error("[Vant] must be a child component of .")}});e("a",j(U))}}}))}();