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