text: /**
   * Minified by jsDelivr using Terser v3.14.1.
   * Original file: /npm/bootstrap@4.5.0/js/src/carousel.js
   *
   * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
   */
  import $ from"jquery";import Util from"./util";const NAME="carousel",VERSION="4.5.0",DATA_KEY="bs.carousel",EVENT_KEY=`.${DATA_KEY}`,DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],ARROW_LEFT_KEYCODE=37,ARROW_RIGHT_KEYCODE=39,TOUCHEVENT_COMPAT_WAIT=500,SWIPE_THRESHOLD=40,Default={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},DefaultType={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},DIRECTION_NEXT="next",DIRECTION_PREV="prev",DIRECTION_LEFT="left",DIRECTION_RIGHT="right",EVENT_SLIDE=`slide${EVENT_KEY}`,EVENT_SLID=`slid${EVENT_KEY}`,EVENT_KEYDOWN=`keydown${EVENT_KEY}`,EVENT_MOUSEENTER=`mouseenter${EVENT_KEY}`,EVENT_MOUSELEAVE=`mouseleave${EVENT_KEY}`,EVENT_TOUCHSTART=`touchstart${EVENT_KEY}`,EVENT_TOUCHMOVE=`touchmove${EVENT_KEY}`,EVENT_TOUCHEND=`touchend${EVENT_KEY}`,EVENT_POINTERDOWN=`pointerdown${EVENT_KEY}`,EVENT_POINTERUP=`pointerup${EVENT_KEY}`,EVENT_DRAG_START=`dragstart${EVENT_KEY}`,EVENT_LOAD_DATA_API=`load${EVENT_KEY}.data-api`,EVENT_CLICK_DATA_API=`click${EVENT_KEY}.data-api`,CLASS_NAME_CAROUSEL="carousel",CLASS_NAME_ACTIVE="active",CLASS_NAME_SLIDE="slide",CLASS_NAME_RIGHT="carousel-item-right",CLASS_NAME_LEFT="carousel-item-left",CLASS_NAME_NEXT="carousel-item-next",CLASS_NAME_PREV="carousel-item-prev",CLASS_NAME_POINTER_EVENT="pointer-event",SELECTOR_ACTIVE=".active",SELECTOR_ACTIVE_ITEM=".active.carousel-item",SELECTOR_ITEM=".carousel-item",SELECTOR_ITEM_IMG=".carousel-item img",SELECTOR_NEXT_PREV=".carousel-item-next, .carousel-item-prev",SELECTOR_INDICATORS=".carousel-indicators",SELECTOR_DATA_SLIDE="[data-slide], [data-slide-to]",SELECTOR_DATA_RIDE='[data-ride="carousel"]',PointerType={TOUCH:"touch",PEN:"pen"};class Carousel{constructor(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(SELECTOR_INDICATORS),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}static get VERSION(){return VERSION}static get Default(){return Default}next(){this._isSliding||this._slide(DIRECTION_NEXT)}nextWhenVisible(){!document.hidden&&$(this._element).is(":visible")&&"hidden"!==$(this._element).css("visibility")&&this.next()}prev(){this._isSliding||this._slide(DIRECTION_PREV)}pause(t){t||(this._isPaused=!0),this._element.querySelector(SELECTOR_NEXT_PREV)&&(Util.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=this._element.querySelector(SELECTOR_ACTIVE_ITEM);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void $(this._element).one(EVENT_SLID,()=>this.to(t));if(e===t)return this.pause(),void this.cycle();const i=t>e?DIRECTION_NEXT:DIRECTION_PREV;this._slide(i,this._items[t])}dispose(){$(this._element).off(EVENT_KEY),$.removeData(this._element,DATA_KEY),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}_getConfig(t){return t={...Default,...t},Util.typeCheckConfig(NAME,t,DefaultType),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=SWIPE_THRESHOLD)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}_addEventListeners(){this._config.keyboard&&$(this._element).on(EVENT_KEYDOWN,t=>this._keydown(t)),"hover"===this._config.pause&&$(this._element).on(EVENT_MOUSEENTER,t=>this.pause(t)).on(EVENT_MOUSELEAVE,t=>this.cycle(t)),this._config.touch&&this._addTouchEventListeners()}_addTouchEventListeners(){if(!this._touchSupported)return;const t=t=>{this._pointerEvent&&PointerType[t.originalEvent.pointerType.toUpperCase()]?this.touchStartX=t.originalEvent.clientX:this._pointerEvent||(this.touchStartX=t.originalEvent.touches[0].clientX)},e=t=>{t.originalEvent.touches&&t.originalEvent.touches.length>1?this.touchDeltaX=0:this.touchDeltaX=t.originalEvent.touches[0].clientX-this.touchStartX},i=t=>{this._pointerEvent&&PointerType[t.originalEvent.pointerType.toUpperCase()]&&(this.touchDeltaX=t.originalEvent.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),TOUCHEVENT_COMPAT_WAIT+this._config.interval))};$(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START,t=>t.preventDefault()),this._pointerEvent?($(this._element).on(EVENT_POINTERDOWN,e=>t(e)),$(this._element).on(EVENT_POINTERUP,t=>i(t)),this._element.classList.add(CLASS_NAME_POINTER_EVENT)):($(this._element).on(EVENT_TOUCHSTART,e=>t(e)),$(this._element).on(EVENT_TOUCHMOVE,t=>e(t)),$(this._element).on(EVENT_TOUCHEND,t=>i(t)))}_keydown(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case ARROW_LEFT_KEYCODE:t.preventDefault(),this.prev();break;case ARROW_RIGHT_KEYCODE:t.preventDefault(),this.next()}}_getItemIndex(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(SELECTOR_ITEM)):[],this._items.indexOf(t)}_getItemByDirection(t,e){const i=t===DIRECTION_NEXT,s=t===DIRECTION_PREV,n=this._getItemIndex(e),E=this._items.length-1;if((s&&0===n||i&&n===E)&&!this._config.wrap)return e;const _=(n+(t===DIRECTION_PREV?-1:1))%this._items.length;return-1===_?this._items[this._items.length-1]:this._items[_]}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),s=this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM)),n=$.Event(EVENT_SLIDE,{relatedTarget:t,direction:e,from:s,to:i});return $(this._element).trigger(n),n}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=[].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));$(e).removeClass(CLASS_NAME_ACTIVE);const i=this._indicatorsElement.children[this._getItemIndex(t)];i&&$(i).addClass(CLASS_NAME_ACTIVE)}}_slide(t,e){const i=this._element.querySelector(SELECTOR_ACTIVE_ITEM),s=this._getItemIndex(i),n=e||i&&this._getItemByDirection(t,i),E=this._getItemIndex(n),_=Boolean(this._interval);let l,o,r;if(t===DIRECTION_NEXT?(l=CLASS_NAME_LEFT,o=CLASS_NAME_NEXT,r=DIRECTION_LEFT):(l=CLASS_NAME_RIGHT,o=CLASS_NAME_PREV,r=DIRECTION_RIGHT),n&&$(n).hasClass(CLASS_NAME_ACTIVE))return void(this._isSliding=!1);if(this._triggerSlideEvent(n,r).isDefaultPrevented())return;if(!i||!n)return;this._isSliding=!0,_&&this.pause(),this._setActiveIndicatorElement(n);const a=$.Event(EVENT_SLID,{relatedTarget:n,direction:r,from:s,to:E});if($(this._element).hasClass(CLASS_NAME_SLIDE)){$(n).addClass(o),Util.reflow(n),$(i).addClass(l),$(n).addClass(l);const t=parseInt(n.getAttribute("data-interval"),10);t?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=t):this._config.interval=this._config.defaultInterval||this._config.interval;const e=Util.getTransitionDurationFromElement(i);$(i).one(Util.TRANSITION_END,()=>{$(n).removeClass(`${l} ${o}`).addClass(CLASS_NAME_ACTIVE),$(i).removeClass(`${CLASS_NAME_ACTIVE} ${o} ${l}`),this._isSliding=!1,setTimeout(()=>$(this._element).trigger(a),0)}).emulateTransitionEnd(e)}else $(i).removeClass(CLASS_NAME_ACTIVE),$(n).addClass(CLASS_NAME_ACTIVE),this._isSliding=!1,$(this._element).trigger(a);_&&this.cycle()}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(DATA_KEY),i={...Default,...$(this).data()};"object"==typeof t&&(i={...i,...t});const s="string"==typeof t?t:i.slide;if(e||(e=new Carousel(this,i),$(this).data(DATA_KEY,e)),"number"==typeof t)e.to(t);else if("string"==typeof s){if(void 0===e[s])throw new TypeError(`No method named "${s}"`);e[s]()}else i.interval&&i.ride&&(e.pause(),e.cycle())})}static _dataApiClickHandler(t){const e=Util.getSelectorFromElement(this);if(!e)return;const i=$(e)[0];if(!i||!$(i).hasClass(CLASS_NAME_CAROUSEL))return;const s={...$(i).data(),...$(this).data()},n=this.getAttribute("data-slide-to");n&&(s.interval=!1),Carousel._jQueryInterface.call($(i),s),n&&$(i).data(DATA_KEY).to(n),t.preventDefault()}}$(document).on(EVENT_CLICK_DATA_API,SELECTOR_DATA_SLIDE,Carousel._dataApiClickHandler),$(window).on(EVENT_LOAD_DATA_API,()=>{const t=[].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));for(let e=0,i=t.length;e<i;e++){const i=$(t[e]);Carousel._jQueryInterface.call(i,i.data())}}),$.fn[NAME]=Carousel._jQueryInterface,$.fn[NAME].Constructor=Carousel,$.fn[NAME].noConflict=(()=>($.fn[NAME]=JQUERY_NO_CONFLICT,Carousel._jQueryInterface));export default Carousel;
  //# sourceMappingURL=/sm/4ff2d796b5130c048c316fe00fee28390c67e95fc57c633a8ac3037d099c9143.map