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