|
import{arrow,autoUpdate,computePosition,flip,offset,shift}from"@floating-ui/dom";import{Calendar,months}from"vanilla-calendar-pro";const elementMap=new Map;var data_default={set(e,t,n){elementMap.has(e)||elementMap.set(e,new Map);const s=elementMap.get(e);s.has(t)||0===s.size?s.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${[...s.keys()][0]}.`)},get:(e,t)=>e&&elementMap.has(e)&&elementMap.get(e).get(t)||null,getAny:e=>e&&elementMap.has(e)&&elementMap.get(e).values().next().value||null,remove(e,t){if(!elementMap.has(e))return;const n=elementMap.get(e);n.delete(t),0===n.size&&elementMap.delete(e)}};const namespaceRegex=/[^.]*(?=\..*)\.|.*/,stripNameRegex=/\..*/,stripUidRegex=/::\d+$/,eventRegistry={};let uidEvent=1;const customEvents={mouseenter:"mouseover",mouseleave:"mouseout"},nativeEvents=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","input","paste","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll","scrollend"]);function makeEventUid(e,t){return t&&`${t}::${uidEvent++}`||e.uidEvent||uidEvent++}function getElementEvents(e){const t=makeEventUid(e);return e.uidEvent=t,eventRegistry[t]=eventRegistry[t]||{},eventRegistry[t]}function isMouseEventWithinTarget(e){const{delegateTarget:t,relatedTarget:n}=e;return Boolean(n&&t.contains(n))}function bootstrapHandler(e,t,n){const s=n in customEvents;return function i(o){const r=hydrateObj(o,{delegateTarget:e});if(!s||!isMouseEventWithinTarget(r))return i.oneOff&&EventHandler.off(e,n,t),t.apply(e,[r])}}function bootstrapDelegationHandler(e,t,n,s){const i=s in customEvents;return function o(r){const a=e.querySelectorAll(t);for(let{target:l}=r;l&&l!==this;l=l.parentNode)for(const c of a){if(c!==l)continue;const a=hydrateObj(r,{delegateTarget:l});if(i&&isMouseEventWithinTarget(a))return;return o.oneOff&&EventHandler.off(e,s,t,n),n.apply(l,[a])}}}function findHandler(e,t,n,s=null){return Object.values(e).find(e=>e.callable===t&&e.handlerTypeEvent===n&&e.delegationSelector===s)}function normalizeParameters(e,t,n){const s="string"==typeof t,i=s?n:t||n,o=e.replace(stripNameRegex,"");let r=customEvents[o]||o;return nativeEvents.has(r)||(r=e),{isDelegated:s,callable:i,typeEvent:r,handlerTypeEvent:o in customEvents?o:r}}function addHandler(e,t,n,s,i){if("string"!=typeof t||!e)return;const{isDelegated:o,callable:r,typeEvent:a,handlerTypeEvent:l}=normalizeParameters(t,n,s),c=getElementEvents(e),_=c[a]||(c[a]={}),h=findHandler(_,r,l,o?n:null);if(h)return void(h.oneOff=h.oneOff&&i);const u=makeEventUid(r,t.replace(namespaceRegex,"")),d=o?bootstrapDelegationHandler(e,n,r,l):bootstrapHandler(e,r,l);d.delegationSelector=o?n:null,d.callable=r,d.handlerTypeEvent=l,d.oneOff=i,d.uidEvent=u,_[u]=d,e.addEventListener(a,d,o)}function removeHandler(e,t,n,s){e.removeEventListener(n,s,Boolean(s.delegationSelector)),delete t[n][s.uidEvent]}function removeNamespacedHandlers(e,t,n,s){const i=t[n]||{};for(const[o,r]of Object.entries(i))o.includes(s)&&removeHandler(e,t,n,r)}function trigger(e,t,n){if("string"!=typeof t||!e)return null;const s=hydrateObj(new Event(t,{bubbles:!0,cancelable:!0}),n);return e.dispatchEvent(s),s}const EventHandler={on(e,t,n,s){addHandler(e,t,n,s,!1)},one(e,t,n,s){addHandler(e,t,n,s,!0)},off(e,t,n,s){if("string"!=typeof t||!e)return;const{isDelegated:i,callable:o,typeEvent:r,handlerTypeEvent:a}=normalizeParameters(t,n,s),l=r!==t&&a!==t,c=getElementEvents(e),_=c[r]||{},h=t.startsWith(".");if(void 0!==o){if(!Object.keys(_).length)return;const t=findHandler(_,o,a,i?n:null);return void(t&&removeHandler(e,c,r,t))}if(h)for(const n of Object.keys(c))removeNamespacedHandlers(e,c,n,t.slice(1));for(const[n,s]of Object.entries(_)){const i=n.replace(stripUidRegex,"");s.handlerTypeEvent!==a||l&&!t.includes(i)||removeHandler(e,c,r,s)}},trigger:trigger};function hydrateObj(e,t={}){for(const[n,s]of Object.entries(t))try{e[n]=s}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>s})}return e}function normalizeData(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function normalizeDataKey(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Manipulator={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${normalizeDataKey(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${normalizeDataKey(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const s of n){let n=s.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=normalizeData(e.dataset[s])}return t},getDataAttribute:(e,t)=>normalizeData(e.getAttribute(`data-bs-${normalizeDataKey(t)}`))},MAX_UID=1e6,MILLISECONDS_MULTIPLIER=1e3,TRANSITION_END="transitionend",parseSelector=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),toType=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),getUID=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},getTransitionDurationFromElement=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);return Number.parseFloat(t)||Number.parseFloat(n)?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0},triggerTransitionEnd=e=>{e.dispatchEvent(new Event(TRANSITION_END))},isElement=e=>!(!e||"object"!=typeof e)&&void 0!==e.nodeType,getElement=e=>isElement(e)?e:"string"==typeof e&&e.length>0?document.querySelector(parseSelector(e)):null,isVisible=e=>{if(!isElement(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},isDisabled=e=>{if(!e||e.nodeType!==Node.ELEMENT_NODE)return!0;if(e.classList.contains("disabled"))return!0;const t=e;return void 0!==t.disabled?t.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")},setAriaAttribute=(e,t,n)=>{e.setAttribute(t,String(n))},findShadowRoot=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?findShadowRoot(e.parentNode):null},noop=()=>{},isRTL=()=>"rtl"===document.documentElement.dir,execute=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,executeAfterTransition=(e,t,n=!0)=>{if(!n)return void execute(e);const s=getTransitionDurationFromElement(t)+5;let i=!1;const o=({target:n})=>{n===t&&(i=!0,t.removeEventListener(TRANSITION_END,o),execute(e))};t.addEventListener(TRANSITION_END,o),setTimeout(()=>{i||triggerTransitionEnd(t)},s)},getNextActiveElement=(e,t,n,s)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&s?e[i-1]:e[0]:(o+=n?1:-1,s&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])};var Config=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=isElement(t)?Manipulator.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...isElement(t)?Manipulator.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,s]of Object.entries(t)){const t=e[n],i=isElement(t)?"element":toType(t);if(!new RegExp(s).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${s}".`)}}};const VERSION="6.0.0-alpha.1";var BaseComponent=class extends Config{constructor(e,t){if(super(),!(e=getElement(e)))return;this._element=e,this._config=this._getConfig(t);const n=data_default.get(this._element,this.constructor.DATA_KEY);n&&n.dispose(),data_default.set(this._element,this.constructor.DATA_KEY,this)}dispose(){data_default.remove(this._element,this.constructor.DATA_KEY),EventHandler.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){return new Promise(s=>{executeAfterTransition(()=>{this._element&&e(),s()},t,n)})}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return data_default.get(getElement(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return VERSION}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}};const getSelector=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(e=>parseSelector(e)).join(","):null},SelectorEngine={find:(e,t=document.documentElement)=>[...Element.prototype.querySelectorAll.call(t,e)],findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),parents(e,t){const n=[];let s=e.parentNode.closest(t);for(;s;)n.push(s),s=s.parentNode.closest(t);return n},closest:(e,t)=>Element.prototype.closest.call(e,t),prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},getSelectorFromElement(e){const t=getSelector(e);return t&&SelectorEngine.findOne(t)?t:null},getElementFromSelector(e){const t=getSelector(e);return t?SelectorEngine.findOne(t):null},getMultipleElementsFromSelector(e){const t=getSelector(e);return t?SelectorEngine.find(t):[]}},enableDismissTrigger=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,s=e.NAME;EventHandler.on(document,n,`[data-bs-dismiss="${s}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),isDisabled(this))return;const i=SelectorEngine.getElementFromSelector(this)||this.closest(`.${s}, [class*=":${s}"]`);e.getOrCreateInstance(i)[t]()})},eventActionOnPlugin=(e,t,n,s,i=null)=>{eventAction(`${t}.${e.NAME}`,n,t=>{const n=t.targets.filter(Boolean).map(t=>e.getOrCreateInstance(t));"function"==typeof i&&i({...t,instances:n});for(const e of n)e[s]()})},eventAction=(e,t,n)=>{const s=`${t}:not(.disabled):not(:disabled)`;EventHandler.on(document,e,s,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault();const t=SelectorEngine.getSelectorFromElement(this);n({targets:t?SelectorEngine.find(t):[this],event:e})})},NAME$21="alert",EVENT_KEY$18=".bs.alert",EVENT_CLOSE="close.bs.alert",EVENT_CLOSED="closed.bs.alert",CLASS_NAME_HIDING="hiding",CLASS_NAME_SHOW$7="show";var Alert=class extends BaseComponent{static get NAME(){return"alert"}async close(){if(EventHandler.trigger(this._element,EVENT_CLOSE).defaultPrevented)return;this._element.classList.remove("show"),this._element.classList.add("hiding");const e=getTransitionDurationFromElement(this._element)>0;await this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),EventHandler.trigger(this._element,EVENT_CLOSED),this.dispose()}};enableDismissTrigger(Alert,"close");const NAME$20="button",EVENT_KEY$17=".bs.button",DATA_API_KEY$12=".data-api",CLASS_NAME_ACTIVE$4="active",SELECTOR_DATA_TOGGLE$10='[data-bs-toggle="button"]',EVENT_CLICK_DATA_API$8="click.bs.button.data-api",EVENT_DOM_CONTENT_LOADED$1="DOMContentLoaded.bs.button.data-api";var Button=class extends BaseComponent{static get NAME(){return NAME$20}toggle(){setAriaAttribute(this._element,"aria-pressed",this._element.classList.toggle("active"))}};EventHandler.on(document,EVENT_CLICK_DATA_API$8,SELECTOR_DATA_TOGGLE$10,e=>{e.preventDefault();const t=e.target.closest(SELECTOR_DATA_TOGGLE$10);Button.getOrCreateInstance(t).toggle()}),EventHandler.on(document,EVENT_DOM_CONTENT_LOADED$1,()=>{for(const e of SelectorEngine.find(SELECTOR_DATA_TOGGLE$10))e.hasAttribute("aria-pressed")||setAriaAttribute(e,"aria-pressed",e.classList.contains("active"))});const NAME$19="carousel",EVENT_KEY$16=".bs.carousel",DATA_API_KEY$11=".data-api",ARROW_LEFT_KEY$2="ArrowLeft",ARROW_RIGHT_KEY$2="ArrowRight",DIRECTION_LEFT="left",DIRECTION_RIGHT="right",EVENT_SLIDE=`slide${EVENT_KEY$16}`,EVENT_SLID=`slid${EVENT_KEY$16}`,EVENT_KEYDOWN$2=`keydown${EVENT_KEY$16}`,EVENT_MOUSEENTER$2=`mouseenter${EVENT_KEY$16}`,EVENT_MOUSELEAVE$1=`mouseleave${EVENT_KEY$16}`,EVENT_POINTERDOWN$3=`pointerdown${EVENT_KEY$16}`,EVENT_LOAD_DATA_API$3=`load${EVENT_KEY$16}.data-api`,EVENT_CLICK_DATA_API$7=`click${EVENT_KEY$16}.data-api`,CLASS_NAME_CAROUSEL="carousel",CLASS_NAME_ACTIVE$3="active",CLASS_NAME_FADE="carousel-fade",CLASS_NAME_CENTER="carousel-center",CLASS_NAME_AUTO="carousel-auto",CLASS_NAME_CLONE="carousel-item-clone",CLASS_NAME_PAUSED="paused",CLASS_NAME_PLAYING="carousel-playing",PROPERTY_INTERVAL="--bs-carousel-interval",SCROLL_DURATION=300,ACTIVE_RATIO_TOLERANCE=.05,SELECTOR_ACTIVE=".active",SELECTOR_ITEM=`.carousel-item:not(.${CLASS_NAME_CLONE})`,SELECTOR_ACTIVE_ITEM=".active"+SELECTOR_ITEM,SELECTOR_INNER$1=".carousel-inner",SELECTOR_INDICATORS=".carousel-indicators",SELECTOR_PLAY_PAUSE=".carousel-control-play-pause",SELECTOR_DATA_SLIDE="[data-bs-slide], [data-bs-slide-to]",SELECTOR_DATA_SLIDE_PREV='[data-bs-slide="prev"]',SELECTOR_DATA_SLIDE_NEXT='[data-bs-slide="next"]',SELECTOR_DATA_AUTOPLAY='[data-bs-autoplay="true"]',KEY_TO_DIRECTION={[ARROW_LEFT_KEY$2]:"right",[ARROW_RIGHT_KEY$2]:"left"},ENDS_STOP="stop",ENDS_WRAP="wrap",ENDS_LOOP="loop",Default$18={autoplay:!1,ends:ENDS_LOOP,interval:5e3,keyboard:!0,pause:"hover"},DefaultType$18={autoplay:"boolean",ends:"string",interval:"number",keyboard:"boolean",pause:"(string|boolean)"},easeInOutCubic=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2;var Carousel=class extends BaseComponent{constructor(e,t){super(e,t),this._viewport=SelectorEngine.findOne(SELECTOR_INNER$1,this._element)||this._element,this._indicatorsElement=SelectorEngine.findOne(SELECTOR_INDICATORS,this._element),this._playPauseElement=SelectorEngine.findOne(SELECTOR_PLAY_PAUSE,this._element),this._prevControls=SelectorEngine.find('[data-bs-slide="prev"]',this._element),this._nextControls=SelectorEngine.find('[data-bs-slide="next"]',this._element),this._interval=null,this._observer=null,this._scrollFrame=null,this._looping=!1,this._visibility=new Map,this._playing=this._config.autoplay,this._activeIndex=this._initialActiveIndex(),this._addEventListeners(),this._observeItems(),this._refreshActiveState(),this._playing&&this.cycle(),this._updatePlayPauseControl()}static get Default(){return Default$18}static get DefaultType(){return DefaultType$18}static get NAME(){return NAME$19}next(){this.to(this._navIndex()+1)}nextWhenVisible(){"visible"===document.visibilityState&&isVisible(this._element)&&this.next()}prev(){this.to(this._navIndex()-1)}pause(){this._clearInterval(),this._element.classList.remove("carousel-playing")}cycle(){this._clearInterval(),this._scheduleAutoplay(),this._element.classList.add("carousel-playing")}to(e){if(this._looping)return;const t=this._getItems(),n=Number.parseInt(e,10);if(this._config.ends===ENDS_LOOP&&!this._prefersReducedMotion()&&this._canLoop()){if(n>t.length-1)return void this._loopTransition(!0);if(n<0)return void this._loopTransition(!1)}const s=this._normalizeIndex(n,t.length),i=this._navIndex();null!==s&&s!==i&&(EventHandler.trigger(this._element,EVENT_SLIDE,{relatedTarget:t[s],direction:this._direction(i,s),from:i,to:s}).defaultPrevented||(this._isFade()?this._fadeTo(s):this._scrollToIndex(s)))}dispose(){this._clearInterval(),this._observer&&this._observer.disconnect(),null!==this._scrollFrame&&cancelAnimationFrame(this._scrollFrame);for(const e of SelectorEngine.find(`.${CLASS_NAME_CLONE}`,this._viewport))e.remove();this._viewport.style.scrollSnapType="",EventHandler.off(this._viewport,EVENT_KEY$16),super.dispose()}_configAfterMerge(e){return[ENDS_STOP,ENDS_WRAP,ENDS_LOOP].includes(e.ends)||(e.ends=Default$18.ends),e}_initialActiveIndex(){const e=SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM,this._element),t=e?this._getItems().indexOf(e):0;return Math.max(t,0)}_addEventListeners(){this._config.keyboard&&EventHandler.on(this._element,EVENT_KEYDOWN$2,e=>this._keydown(e)),"hover"===this._config.pause&&(EventHandler.on(this._element,EVENT_MOUSEENTER$2,()=>this.pause()),EventHandler.on(this._element,EVENT_MOUSELEAVE$1,()=>this._maybeEnableCycle())),EventHandler.on(this._viewport,EVENT_POINTERDOWN$3,()=>this._pauseFromInteraction())}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=KEY_TO_DIRECTION[e.key];t&&(e.preventDefault(),this._pauseFromInteraction(),"right"===t?this.prev():this.next())}_observeItems(){if(!this._isFade()&&"undefined"!=typeof IntersectionObserver){this._observer=new IntersectionObserver(e=>this._handleIntersection(e),{root:this._viewport,threshold:[0,.25,.5,.75,1]});for(const e of this._getItems())this._observer.observe(e)}}_handleIntersection(e){if(this._looping)return;for(const t of e)this._visibility.set(t.target,t.isIntersecting?t.intersectionRatio:0);const t=this._getItems().map(e=>this._visibility.get(e)??0),n=Math.max(...t);let s=this._activeIndex;n>0&&(s=t.findIndex(e=>e>=n-.05)),this._setActive(s),this._updateEndControls()}_navIndex(){if(this._isFade()||this._viewport.scrollWidth-this._viewport.clientWidth<=0)return this._activeIndex;let e=this._activeIndex,t=Number.POSITIVE_INFINITY;for(const[n,s]of this._getItems().entries()){const i=Math.abs(this._scrollDelta(s));i<t&&(t=i,e=n)}return e}_scrollToIndex(e){const t=this._getItems()[e];if(!t)return;const n=this._scrollDelta(t);if(Math.abs(n)<1)return;const s=this._viewport.scrollLeft+n;this._viewport.style.scrollSnapType="none",this._animateScroll(s,()=>{this._viewport.style.scrollSnapType="",this._observer||this._setActive(e),this._updateEndControls()})}_animateScroll(e,t){null!==this._scrollFrame&&(cancelAnimationFrame(this._scrollFrame),this._scrollFrame=null);const n=this._viewport.scrollLeft,s=e-n;if(this._prefersReducedMotion()||"undefined"==typeof requestAnimationFrame)return this._viewport.scrollTo({left:e,behavior:"instant"}),void t();let i=null;const o=r=>{null===i&&(i=r);const a=Math.min((r-i)/300,1);this._viewport.scrollTo({left:n+s*easeInOutCubic(a),behavior:"instant"}),a<1?this._scrollFrame=requestAnimationFrame(o):(this._viewport.scrollTo({left:e,behavior:"instant"}),this._scrollFrame=null,t())};this._scrollFrame=requestAnimationFrame(o)}_scrollDelta(e){const t=this._viewport.getBoundingClientRect(),n=e.getBoundingClientRect();if(this._element.classList.contains("carousel-center"))return n.left+n.width/2-(t.left+t.width/2);const s=Number.parseFloat(getComputedStyle(this._viewport).scrollPaddingInlineStart)||0;return isRTL()?n.right-(t.right-s):n.left-(t.left+s)}_loopTransition(e){const t=this._getItems(),n=t.length-1,s=this._activeIndex,i=e?0:n,o=this._loopDirection(e);if(EventHandler.trigger(this._element,EVENT_SLIDE,{relatedTarget:t[i],direction:o,from:s,to:i}).defaultPrevented)return;this._looping=!0;const r=(e?t[0]:t[n]).cloneNode(!0);r.classList.add(CLASS_NAME_CLONE),r.classList.remove("active"),r.removeAttribute("id");for(const e of SelectorEngine.find("[id]",r))e.removeAttribute("id");r.setAttribute("aria-hidden","true"),r.inert=!0,this._viewport.style.scrollSnapType="none",e?this._viewport.append(r):(this._viewport.prepend(r),this._jumpScroll(this._scrollDelta(t[s]))),this._animateScroll(this._viewport.scrollLeft+this._scrollDelta(r),()=>{r.remove(),this._jumpScroll(this._scrollDelta(t[i])),this._activeIndex=i,this._refreshActiveState(),EventHandler.trigger(this._element,EVENT_SLID,{relatedTarget:t[i],direction:o,from:s,to:i}),this._viewport.style.scrollSnapType="",this._looping=!1})}_loopDirection(e){return isRTL()?e?"right":"left":e?"left":"right"}_jumpScroll(e){this._viewport.style.scrollSnapType="none",this._viewport.scrollBy({left:e,top:0,behavior:"instant"})}_fadeTo(e){this._setActive(e)}_setActive(e){const t=this._getItems();if(e===this._activeIndex||!t[e])return;const n=this._activeIndex;this._activeIndex=e,this._refreshActiveState(),EventHandler.trigger(this._element,EVENT_SLID,{relatedTarget:t[e],direction:this._direction(n,e),from:n,to:e})}_refreshActiveState(){const e=this._getItems();for(const[t,n]of e.entries())n.classList.toggle("active",t===this._activeIndex);this._setActiveIndicatorElement(this._activeIndex),this._updateEndControls()}_updateEndControls(){if(this._config.ends!==ENDS_STOP)return;const e=this._viewport,t=e.scrollWidth-e.clientWidth;let n,s;if(t>0){const i=Math.abs(e.scrollLeft);n=i<=1,s=i>=t-1}else{const e=this._getItems().length-1;n=this._activeIndex<=0,s=this._activeIndex>=e}this._setControlsDisabled(this._prevControls,n),this._setControlsDisabled(this._nextControls,s)}_setControlsDisabled(e,t){for(const n of e)t&&n===document.activeElement&&((e===this._prevControls?this._nextControls:this._prevControls)[0]??this._viewport).focus({preventScroll:!0}),n.disabled=t}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=SelectorEngine.findOne(".active",this._indicatorsElement);t&&(t.classList.remove("active"),t.removeAttribute("aria-current"));const n=SelectorEngine.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add("active"),n.setAttribute("aria-current","true"))}_normalizeIndex(e,t){return Number.isNaN(e)||0===t?null:e<0?this._wrapsAround()?t-1:null:e>t-1?this._wrapsAround()?0:null:e}_wrapsAround(){return this._config.ends===ENDS_WRAP||this._config.ends===ENDS_LOOP}_canLoop(){if(this._isFade()||this._getItems().length<2)return!1;const e=getComputedStyle(this._element),t=t=>Number.parseFloat(e.getPropertyValue(t))||0;return 1===(t("--bs-carousel-items")||1)&&0===t("--bs-carousel-items-peek")&&!this._element.classList.contains("carousel-center")&&!this._element.classList.contains("carousel-auto")}_direction(e,t){const n=t>e;return isRTL()?n?"right":"left":n?"left":"right"}_scheduleAutoplay(e=this._activeIndex){const t=this._itemInterval(e);this._element.style.setProperty(PROPERTY_INTERVAL,`${t}ms`),this._interval=setTimeout(()=>{const e=this._upcomingIndex();this.nextWhenVisible(),null!==e?this._scheduleAutoplay(e):this.pause()},t)}_upcomingIndex(){return this._normalizeIndex(this._navIndex()+1,this._getItems().length)}_itemInterval(e=this._activeIndex){const t=this._getItems()[e],n=t?Number.parseInt(t.getAttribute("data-bs-interval"),10):NaN;return Number.isNaN(n)?this._config.interval:n}_maybeEnableCycle(){this._playing&&this.cycle()}_pauseFromInteraction(){this._playing=!1,this.pause(),this._updatePlayPauseControl()}_togglePlayPause(){this._playing?this._pauseFromInteraction():(this._playing=!0,this.cycle(),this._updatePlayPauseControl())}_updatePlayPauseControl(){if(!this._playPauseElement)return;this._playPauseElement.classList.toggle("paused",!this._playing);const e=this._playPauseElement.getAttribute(this._playing?"data-bs-pause-label":"data-bs-play-label");e&&this._playPauseElement.setAttribute("aria-label",e)}_isFade(){return this._element.classList.contains("carousel-fade")}_prefersReducedMotion(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}_getItems(){return SelectorEngine.find(SELECTOR_ITEM,this._element)}_clearInterval(){this._interval&&(clearTimeout(this._interval),this._interval=null)}};EventHandler.on(document,EVENT_CLICK_DATA_API$7,SELECTOR_DATA_SLIDE,function(e){const t=SelectorEngine.getElementFromSelector(this);if(!t||!t.classList.contains("carousel"))return;e.preventDefault();const n=Carousel.getOrCreateInstance(t);n._pauseFromInteraction();const s=this.getAttribute("data-bs-slide-to");s?n.to(s):"next"!==Manipulator.getDataAttribute(this,"slide")?n.prev():n.next()}),EventHandler.on(document,EVENT_CLICK_DATA_API$7,SELECTOR_PLAY_PAUSE,function(e){const t=SelectorEngine.getElementFromSelector(this);t&&t.classList.contains("carousel")&&(e.preventDefault(),Carousel.getOrCreateInstance(t)._togglePlayPause())}),EventHandler.on(window,EVENT_LOAD_DATA_API$3,()=>{const e=SelectorEngine.find(SELECTOR_DATA_AUTOPLAY);for(const t of e)Carousel.getOrCreateInstance(t)});const NAME$18="collapse",EVENT_KEY$15=".bs.collapse",DATA_API_KEY$10=".data-api",EVENT_SHOW$7=`show${EVENT_KEY$15}`,EVENT_SHOWN$6=`shown${EVENT_KEY$15}`,EVENT_HIDE$6=`hide${EVENT_KEY$15}`,EVENT_HIDDEN$8=`hidden${EVENT_KEY$15}`,EVENT_CLICK_DATA_API$6=`click${EVENT_KEY$15}.data-api`,CLASS_NAME_SHOW$6="show",CLASS_NAME_COLLAPSE="collapse",CLASS_NAME_DEEPER_CHILDREN=":scope .collapse .collapse",SELECTOR_ACTIVES=".collapse.show",SELECTOR_DATA_TOGGLE$9='[data-bs-toggle="collapse"]',Default$17={parent:null},DefaultType$17={parent:"(null|element)"};var Collapse=class e extends BaseComponent{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=SelectorEngine.find(SELECTOR_DATA_TOGGLE$9);for(const e of n){const t=SelectorEngine.getSelectorFromElement(e),n=SelectorEngine.find(t).filter(e=>e===this._element);null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._setAriaExpanded(this._triggerArray,this._isShown())}static get Default(){return Default$17}static get DefaultType(){return DefaultType$17}static get NAME(){return NAME$18}toggle(){return this._isShown()?this.hide():this.show()}async show(){if(this._isTransitioning||this._isShown())return;let t=[];if(!(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show").filter(e=>e!==this._element&&!this._sharesTrigger(e)).map(t=>e.getOrCreateInstance(t))),t.length&&t[0]._isTransitioning||EventHandler.trigger(this._element,EVENT_SHOW$7).defaultPrevented)){for(const e of t)e.hide();this._element.classList.add("show"),this._setAriaExpanded(this._triggerArray,!0),this._isTransitioning=!0,await this._queueCallback(()=>{this._isTransitioning=!1,EventHandler.trigger(this._element,EVENT_SHOWN$6)},this._element,this._isAnimated())}}async hide(){if(!this._isTransitioning&&this._isShown()&&!EventHandler.trigger(this._element,EVENT_HIDE$6).defaultPrevented){this._element.classList.remove("show");for(const e of this._triggerArray){const t=SelectorEngine.getElementFromSelector(e);t&&!this._isShown(t)&&this._setAriaExpanded([e],!1)}this._isTransitioning=!0,await this._queueCallback(()=>{this._isTransitioning=!1,EventHandler.trigger(this._element,EVENT_HIDDEN$8)},this._element,this._isAnimated())}}_isShown(e=this._element){return e.classList.contains("show")}_isAnimated(){return getTransitionDurationFromElement(this._element)>0}_sharesTrigger(e){return this._triggerArray.some(t=>SelectorEngine.getMultipleElementsFromSelector(t).includes(e))}_configAfterMerge(e){return e.parent=getElement(e.parent),e}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$9);for(const t of e){const e=SelectorEngine.getElementFromSelector(t);e&&this._setAriaExpanded([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN,this._config.parent);return SelectorEngine.find(e,this._config.parent).filter(e=>!t.includes(e))}_setAriaExpanded(e,t){if(e.length)for(const n of e)setAriaAttribute(n,"aria-expanded",t)}};EventHandler.on(document,EVENT_CLICK_DATA_API$6,SELECTOR_DATA_TOGGLE$9,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of SelectorEngine.getMultipleElementsFromSelector(this))Collapse.getOrCreateInstance(e).toggle()});const BREAKPOINTS={sm:576,md:768,lg:1024,xl:1280,"2xl":1536},parseResponsivePlacement=(e,t="bottom")=>{if(!e||!e.includes(":"))return null;const n=e.split(/\s+/),s={xs:t};for(const e of n)if(e.includes(":")){const[t,n]=e.split(":");void 0!==BREAKPOINTS[t]&&(s[t]=n)}else s.xs=e;return s},getResponsivePlacement=(e,t="bottom")=>{if(!e)return t;const n=window.innerWidth;let s=e.xs||t;for(const t of["sm","md","lg","xl","2xl"])n>=BREAKPOINTS[t]&&e[t]&&(s=e[t]);return s},createBreakpointListeners=e=>{const t=[];for(const n of Object.keys(BREAKPOINTS)){const s=BREAKPOINTS[n],i=window.matchMedia(`(min-width: ${s}px)`);i.addEventListener("change",e),t.push({mql:i,handler:e})}return t},disposeBreakpointListeners=e=>{for(const{mql:t,handler:n}of e)t.removeEventListener("change",n)},toFloatingOffset=e=>Array.isArray(e)?{mainAxis:e[1]||0,crossAxis:e[0]||0}:e,NAME$17="menu",EVENT_KEY$14=".bs.menu",DATA_API_KEY$9=".data-api",ESCAPE_KEY$2="Escape",TAB_KEY$1="Tab",ARROW_UP_KEY$2="ArrowUp",ARROW_DOWN_KEY$2="ArrowDown",ARROW_LEFT_KEY$1="ArrowLeft",ARROW_RIGHT_KEY$1="ArrowRight",HOME_KEY$2="Home",END_KEY$2="End",ENTER_KEY$1="Enter",SPACE_KEY$1=" ",RIGHT_MOUSE_BUTTON=2,SUBMENU_CLOSE_DELAY=100,EVENT_HIDE$5="hide.bs.menu",EVENT_HIDDEN$7="hidden.bs.menu",EVENT_SHOW$6="show.bs.menu",EVENT_SHOWN$5="shown.bs.menu",EVENT_CLICK_DATA_API$5="click.bs.menu.data-api",EVENT_KEYDOWN_DATA_API="keydown.bs.menu.data-api",EVENT_KEYUP_DATA_API="keyup.bs.menu.data-api",CLASS_NAME_SHOW$5="show",SELECTOR_DATA_TOGGLE$8='[data-bs-toggle="menu"]:not(.disabled):not(:disabled)',SELECTOR_MENU$3=".menu",SELECTOR_SUBMENU=".submenu",SELECTOR_SUBMENU_TOGGLE=".submenu > .menu-item",SELECTOR_NAVBAR_NAV=".navbar-nav",SELECTOR_VISIBLE_ITEMS$1=".menu-item:not(.disabled):not(:disabled)",DEFAULT_PLACEMENT="bottom-start",SUBMENU_PLACEMENT="end-start",resolveLogicalPlacement=e=>isRTL()?e.replace(/^start(?=-|$)/,"right").replace(/^end(?=-|$)/,"left"):e.replace(/^start(?=-|$)/,"left").replace(/^end(?=-|$)/,"right"),triangleSign=(e,t,n)=>(e.x-n.x)*(t.y-n.y)-(t.x-n.x)*(e.y-n.y),Default$16={autoClose:!0,boundary:"clippingParents",container:!1,display:"dynamic",offset:[0,2],floatingConfig:null,menu:null,placement:"bottom-start",reference:"toggle",strategy:"absolute",submenuTrigger:"both",submenuDelay:100},DefaultType$16={autoClose:"(boolean|string)",boundary:"(string|element)",container:"(string|element|boolean)",display:"string",offset:"(array|string|function)",floatingConfig:"(null|object|function)",menu:"(null|element)",placement:"string",reference:"(string|element|object)",strategy:"string",submenuTrigger:"string",submenuDelay:"number"};var Menu=class e extends BaseComponent{static _openInstances=new Set;constructor(e,t){if(void 0===computePosition)throw new TypeError("Bootstrap's menus require Floating UI (https://floating-ui.com)");super(e,t),this._floatingCleanup=null,this._mediaQueryListeners=[],this._responsivePlacements=null,this._parent=this._element.parentNode,this._openSubmenus=new Map,this._submenuCloseTimeouts=new Map,this._hoverIntentData=null,this._menu=this._config.menu||this._findMenu(),!this._config.menu&&this._menu&&(this._parent=this._findWrapper(this._menu)),this._isSubmenu=this._parent.classList?.contains("submenu"),this._menuOriginalParent=this._menu?.parentNode,this._parseResponsivePlacements(),this._setupSubmenuListeners(),this._initSubmenuTriggers()}static get Default(){return Default$16}static get DefaultType(){return DefaultType$16}static get NAME(){return"menu"}toggle(){return this._isShown()?this.hide():this.show()}async show(){if(isDisabled(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!EventHandler.trigger(this._element,EVENT_SHOW$6,t).defaultPrevented){if(this._moveMenuToContainer(),this._createFloating(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of document.body.children)EventHandler.on(e,"mouseover",noop);this._element.focus({focusVisible:!1}),this._element.setAttribute("aria-expanded","true"),this._menu.classList.add("show"),this._element.classList.add("show"),this._parent&&this._parent.classList.add("show"),e._openInstances.add(this),await this._queueCallback(()=>{this._isShown()&&EventHandler.trigger(this._element,EVENT_SHOWN$5,t)},this._menu,this._isAnimated())}}async hide(){if(isDisabled(this._element)||!this._isShown())return;const e={relatedTarget:this._element};await this._completeHide(e)}dispose(){this._disposeFloating(),this._restoreMenuToOriginalParent(),this._disposeMediaQueryListeners(),this._closeAllSubmenus(),this._clearAllSubmenuTimeouts(),e._openInstances.delete(this),super.dispose()}update(){this._floatingCleanup&&this._updateFloatingPosition()}_findMenu(){const e=SelectorEngine.closest(this._element,":has(.menu)");return SelectorEngine.next(this._element,".menu")[0]||SelectorEngine.prev(this._element,".menu")[0]||SelectorEngine.findOne(".menu",e||this._parent)}_findWrapper(e){let t=this._element.parentNode;for(;t instanceof Element&&!t.contains(e);)t=t.parentNode;return t instanceof Element?t:this._element.parentNode}async _completeHide(t){if(!EventHandler.trigger(this._element,EVENT_HIDE$5,t).defaultPrevented){if(this._closeAllSubmenus(),"ontouchstart"in document.documentElement)for(const e of document.body.children)EventHandler.off(e,"mouseover",noop);this._menu.classList.remove("show"),this._element.classList.remove("show"),this._parent&&this._parent.classList.remove("show"),this._element.setAttribute("aria-expanded","false"),e._openInstances.delete(this),await this._queueCallback(()=>{this._isShown()||(this._disposeFloating(),this._restoreMenuToOriginalParent(),Manipulator.removeDataAttribute(this._menu,"placement"),Manipulator.removeDataAttribute(this._menu,"display"),EventHandler.trigger(this._element,EVENT_HIDDEN$7,t))},this._menu,this._isAnimated())}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!isElement(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${"menu".toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createFloating(){if("static"===this._config.display)return void Manipulator.setDataAttribute(this._menu,"display","static");let e=this._element;"parent"===this._config.reference?e=this._parent:isElement(this._config.reference)?e=getElement(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference),this._updateFloatingPosition(e),this._floatingCleanup=autoUpdate(e,this._menu,()=>this._updateFloatingPosition(e))}async _updateFloatingPosition(e=null){if(!this._menu)return;e||(e="parent"===this._config.reference?this._parent:isElement(this._config.reference)?getElement(this._config.reference):"object"==typeof this._config.reference?this._config.reference:this._element);const t=this._getPlacement(),n=this._getFloatingMiddleware(),s=this._getFloatingConfig(t,n);await this._applyFloatingPosition(e,this._menu,s.placement,s.middleware,s.strategy)}_isShown(){return this._menu.classList.contains("show")}_isAnimated(){return getTransitionDurationFromElement(this._menu)>0}_getPlacement(){const e=this._responsivePlacements?getResponsivePlacement(this._responsivePlacements,"bottom-start"):this._config.placement;return resolveLogicalPlacement(e)}_parseResponsivePlacements(){this._responsivePlacements=parseResponsivePlacement(this._config.placement,"bottom-start"),this._responsivePlacements&&this._setupMediaQueryListeners()}_setupMediaQueryListeners(){this._disposeMediaQueryListeners(),this._mediaQueryListeners=createBreakpointListeners(()=>{this._isShown()&&this._updateFloatingPosition()})}_disposeMediaQueryListeners(){disposeBreakpointListeners(this._mediaQueryListeners),this._mediaQueryListeners=[]}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?({placement:t,rects:n})=>toFloatingOffset(e({placement:t,reference:n.reference,floating:n.floating},this._element)):e}_getFloatingMiddleware(){const e=this._getOffset();return[offset("function"==typeof e?e:toFloatingOffset(e)),flip({fallbackPlacements:this._getFallbackPlacements(),fallbackStrategy:"initialPlacement"}),shift({boundary:"clippingParents"===this._config.boundary?"clippingAncestors":this._config.boundary})]}_getFallbackPlacements(){return{bottom:["top","bottom-start","bottom-end","top-start","top-end"],"bottom-start":["top-start","bottom-end","top-end"],"bottom-end":["top-end","bottom-start","top-start"],top:["bottom","top-start","top-end","bottom-start","bottom-end"],"top-start":["bottom-start","top-end","bottom-end"],"top-end":["bottom-end","top-start","bottom-start"],right:["left","right-start","right-end","left-start","left-end"],"right-start":["left-start","right-end","left-end","top-start","bottom-start"],"right-end":["left-end","right-start","left-start","top-end","bottom-end"],left:["right","left-start","left-end","right-start","right-end"],"left-start":["right-start","left-end","right-end","top-start","bottom-start"],"left-end":["right-end","left-start","right-start","top-end","bottom-end"]}[this._getPlacement()]||["top","bottom","right","left"]}_getFloatingConfig(e,t){const n={placement:e,middleware:t,strategy:this._config.strategy};return{...n,...execute(this._config.floatingConfig,[void 0,n])}}_disposeFloating(){this._floatingCleanup&&(this._floatingCleanup(),this._floatingCleanup=null)}_getContainer(){const{container:e}=this._config;return!1===e?null:!0===e?document.body:getElement(e)}_moveMenuToContainer(){const e=this._getContainer();e&&this._menu&&this._menu.parentNode!==e&&e.append(this._menu)}_restoreMenuToOriginalParent(){this._menuOriginalParent&&this._menu&&this._menu.parentNode!==this._menuOriginalParent&&this._menuOriginalParent.append(this._menu)}async _applyFloatingPosition(e,t,n,s,i="absolute"){if(!t.isConnected)return null;const{x:o,y:r,placement:a}=await computePosition(e,t,{placement:n,middleware:s,strategy:i});return t.isConnected?(Object.assign(t.style,{position:i,left:`${o}px`,top:`${r}px`,margin:"0"}),Manipulator.setDataAttribute(t,"placement",a),a):null}_setupSubmenuListeners(){"hover"!==this._config.submenuTrigger&&"both"!==this._config.submenuTrigger||(EventHandler.on(this._menu,"mouseenter",".submenu > .menu-item",e=>{this._onSubmenuTriggerEnter(e)}),EventHandler.on(this._menu,"mouseleave",".submenu",e=>{this._onSubmenuLeave(e)}),EventHandler.on(this._menu,"mousemove",e=>{this._trackMousePosition(e)})),"click"!==this._config.submenuTrigger&&"both"!==this._config.submenuTrigger||EventHandler.on(this._menu,"click",".submenu > .menu-item",e=>{this._onSubmenuTriggerClick(e)})}_onSubmenuTriggerEnter(e){const t=e.target.closest(".submenu > .menu-item");if(!t)return;const n=t.closest(".submenu"),s=SelectorEngine.findOne(".menu",n);s&&(this._cancelSubmenuCloseTimeout(s),this._closeSiblingSubmenus(n),this._openSubmenu(t,s,n))}_onSubmenuLeave(e){const t=e.target.closest(".submenu"),n=SelectorEngine.findOne(".menu",t);n&&this._openSubmenus.has(n)&&(this._isMovingTowardSubmenu(e,n)||this._scheduleSubmenuClose(n,t))}_onSubmenuTriggerClick(e){const t=e.target.closest(".submenu > .menu-item");if(!t)return;e.preventDefault(),e.stopPropagation();const n=t.closest(".submenu"),s=SelectorEngine.findOne(".menu",n);s&&(this._openSubmenus.has(s)?this._closeSubmenu(s,n):(this._closeSiblingSubmenus(n),this._openSubmenu(t,s,n)))}_initSubmenuTriggers(){if(this._menu)for(const e of SelectorEngine.find(".submenu > .menu-item",this._menu))SelectorEngine.findOne(".menu",e.parentElement)&&(e.setAttribute("aria-haspopup","true"),e.hasAttribute("aria-expanded")||e.setAttribute("aria-expanded","false"))}_openSubmenu(e,t,n){if(this._openSubmenus.has(t))return;e.setAttribute("aria-expanded","true"),e.setAttribute("aria-haspopup","true"),t.style.opacity="0",t.classList.add("show"),n.classList.add("show");const s=this._createSubmenuFloating(e,t,n);this._openSubmenus.set(t,s),EventHandler.on(t,"mouseenter",()=>{this._cancelSubmenuCloseTimeout(t)})}_closeSubmenu(e,t){if(!this._openSubmenus.has(e))return;const n=SelectorEngine.find(".submenu .menu.show",e);for(const e of n){const t=e.closest(".submenu");this._closeSubmenu(e,t)}const s=SelectorEngine.findOne(".submenu > .menu-item",t),i=this._openSubmenus.get(e);i&&i(),this._openSubmenus.delete(e),EventHandler.off(e,"mouseenter"),s&&s.setAttribute("aria-expanded","false"),e.classList.remove("show"),t.classList.remove("show"),e.style.opacity=""}_closeAllSubmenus(){for(const[e]of this._openSubmenus){const t=e.closest(".submenu");this._closeSubmenu(e,t)}}_closeSiblingSubmenus(e){const t=e.parentNode,n=SelectorEngine.find(".submenu > .menu.show",t);for(const t of n){const n=t.closest(".submenu");n!==e&&this._closeSubmenu(t,n)}}_createSubmenuFloating(e,t,n){const s=n,i=resolveLogicalPlacement("end-start"),o=[offset({mainAxis:0,crossAxis:-4}),flip({fallbackPlacements:[resolveLogicalPlacement("start-start"),resolveLogicalPlacement("end-end"),resolveLogicalPlacement("start-end")]}),shift({padding:8})],r=()=>this._applyFloatingPosition(s,t,i,o).then(e=>(t.style.opacity="",e));return r(),autoUpdate(s,t,r)}_scheduleSubmenuClose(e,t){this._cancelSubmenuCloseTimeout(e);const n=setTimeout(()=>{this._closeSubmenu(e,t),this._submenuCloseTimeouts.delete(e)},this._config.submenuDelay);this._submenuCloseTimeouts.set(e,n)}_cancelSubmenuCloseTimeout(e){const t=this._submenuCloseTimeouts.get(e);t&&(clearTimeout(t),this._submenuCloseTimeouts.delete(e))}_clearAllSubmenuTimeouts(){for(const e of this._submenuCloseTimeouts.values())clearTimeout(e);this._submenuCloseTimeouts.clear()}_trackMousePosition(e){this._hoverIntentData={x:e.clientX,y:e.clientY,timestamp:Date.now()}}_isMovingTowardSubmenu(e,t){if(!this._hoverIntentData)return!1;const n=t.getBoundingClientRect(),s={x:e.clientX,y:e.clientY},i={x:this._hoverIntentData.x,y:this._hoverIntentData.y},o=isRTL()?n.right:n.left,r={x:o,y:n.top},a={x:o,y:n.bottom};return this._pointInTriangle(s,i,r,a)}_pointInTriangle(e,t,n,s){const i=triangleSign(e,t,n),o=triangleSign(e,n,s),r=triangleSign(e,s,t);return!((i<0||o<0||r<0)&&(i>0||o>0||r>0))}_getItemsInMenu(e){return SelectorEngine.find(`:scope > ${SELECTOR_VISIBLE_ITEMS$1}, :scope > .submenu > ${SELECTOR_VISIBLE_ITEMS$1}`,e).filter(e=>isVisible(e))}_selectMenuItem({key:e,target:t}){const n=t.closest(".menu")||this._menu,s=this._getItemsInMenu(n);if(!s.length)return;const i=getNextActiveElement(s,t,e===ARROW_DOWN_KEY$2,!s.includes(t));i.focus(),this._closeUnrelatedSubmenus(n,i)}_closeUnrelatedSubmenus(e,t){for(const[n]of this._openSubmenus){const s=n.closest(".submenu");s&&s.parentElement===e&&!s.contains(t)&&this._closeSubmenu(n,s)}}_handleSubmenuKeydown(e){const{key:t,target:n}=e,s=isRTL(),i=s?ARROW_LEFT_KEY$1:ARROW_RIGHT_KEY$1,o=s?ARROW_RIGHT_KEY$1:ARROW_LEFT_KEY$1,r=n.closest(".submenu"),a=n.matches(".submenu > .menu-item");if((t===ENTER_KEY$1||t===SPACE_KEY$1||t===i)&&r&&a){e.preventDefault(),e.stopPropagation();const t=SelectorEngine.findOne(".menu",r);return t&&(this._closeSiblingSubmenus(r),this._openSubmenu(n,t,r),requestAnimationFrame(()=>{const e=SelectorEngine.findOne(SELECTOR_VISIBLE_ITEMS$1,t);e&&e.focus()})),!0}if(t===o){const t=n.closest(".menu"),s=t?.closest(".submenu");if(s){e.preventDefault(),e.stopPropagation();const n=SelectorEngine.findOne(".submenu > .menu-item",s);return this._closeSubmenu(t,s),n&&n.focus(),!0}}if(t===HOME_KEY$2||t===END_KEY$2){e.preventDefault(),e.stopPropagation();const s=n.closest(".menu"),i=this._getItemsInMenu(s);if(i.length){const e=t===HOME_KEY$2?i[0]:i.at(-1);e.focus(),this._closeUnrelatedSubmenus(s,e)}return!0}return!1}static clearMenus(t){if(2!==t.button&&("keyup"!==t.type||"Tab"===t.key))for(const n of e._openInstances){if(!1===n._config.autoClose)continue;const e=t.composedPath(),s=e.includes(n._menu);if(e.includes(n._element)||"inside"===n._config.autoClose&&!s||"outside"===n._config.autoClose&&s)continue;const i=t.target.closest?.("form"),o=Boolean(i)&&n._menu.contains(i);if(n._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)||o))continue;const r={relatedTarget:n._element};"click"===t.type&&(r.clickEvent=t),n._completeHide(r)}}static _getToggleFromKeydownContext(t,n){if(t.matches(SELECTOR_DATA_TOGGLE$8))return t;for(const t of e._openInstances)if(t._element===n.target||t._menu?.contains(n.target))return t._element;return SelectorEngine.prev(t,SELECTOR_DATA_TOGGLE$8)[0]||SelectorEngine.next(t,SELECTOR_DATA_TOGGLE$8)[0]||SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$8,n.delegateTarget.parentNode)}static dataApiKeydownHandler(t){const n=/input|textarea/i.test(t.target.tagName)||t.target.isContentEditable,s="Escape"===t.key,i=[ARROW_UP_KEY$2,ARROW_DOWN_KEY$2].includes(t.key),o=[ARROW_LEFT_KEY$1,ARROW_RIGHT_KEY$1].includes(t.key),r=[HOME_KEY$2,END_KEY$2].includes(t.key),a=[ENTER_KEY$1,SPACE_KEY$1].includes(t.key),l=t.target.matches(".submenu > .menu-item");if(!(i||s||o||r||a&&l))return;if(n&&!s)return;const c=e._getToggleFromKeydownContext(this,t);if(!c)return;const _=e.getOrCreateInstance(c);if(!(o||r||a&&l)||!_._handleSubmenuKeydown(t)){if(i)return t.preventDefault(),t.stopPropagation(),_.show(),void _._selectMenuItem(t);if(s&&_._isShown()){t.preventDefault(),t.stopPropagation();const e=t.target.closest(".menu"),n=e?.closest(".submenu");if(n&&_._openSubmenus.size>0){const t=SelectorEngine.findOne(".submenu > .menu-item",n);return _._closeSubmenu(e,n),void(t&&t.focus())}_.hide(),c.focus()}}}};EventHandler.on(document,EVENT_KEYDOWN_DATA_API,SELECTOR_DATA_TOGGLE$8,Menu.dataApiKeydownHandler),EventHandler.on(document,EVENT_KEYDOWN_DATA_API,".menu",Menu.dataApiKeydownHandler),EventHandler.on(document,EVENT_CLICK_DATA_API$5,Menu.clearMenus),EventHandler.on(document,EVENT_KEYUP_DATA_API,Menu.clearMenus),EventHandler.on(document,EVENT_CLICK_DATA_API$5,SELECTOR_DATA_TOGGLE$8,function(e){e.preventDefault(),Menu.getOrCreateInstance(this).toggle()});const NAME$16="combobox",EVENT_KEY$13=".bs.combobox",DATA_API_KEY$8=".data-api",ESCAPE_KEY$1="Escape",TAB_KEY="Tab",ARROW_UP_KEY$1="ArrowUp",ARROW_DOWN_KEY$1="ArrowDown",HOME_KEY$1="Home",END_KEY$1="End",ENTER_KEY="Enter",SPACE_KEY=" ",EVENT_CHANGE$3=`change${EVENT_KEY$13}`,EVENT_SHOW$5=`show${EVENT_KEY$13}`,EVENT_SHOWN$4=`shown${EVENT_KEY$13}`,EVENT_HIDE$4=`hide${EVENT_KEY$13}`,EVENT_HIDDEN$6=`hidden${EVENT_KEY$13}`,EVENT_CLICK_DATA_API$4=`click${EVENT_KEY$13}.data-api`,CLASS_NAME_SHOW$4="show",CLASS_NAME_SELECTED="selected",CLASS_NAME_PLACEHOLDER="combobox-placeholder",SELECTOR_DATA_TOGGLE$7='[data-bs-toggle="combobox"]',SELECTOR_MENU$2=".menu",SELECTOR_MENU_ITEM=".menu-item[data-bs-value]",SELECTOR_VISIBLE_ITEMS=".menu-item[data-bs-value]:not(.disabled):not(:disabled)",SELECTOR_VALUE=".combobox-value",SELECTOR_SEARCH_INPUT=".combobox-search-input",SELECTOR_NO_RESULTS=".combobox-no-results",Default$15={boundary:"clippingParents",multiple:!1,name:null,offset:[0,2],placeholder:"",placement:"bottom-start",search:!1,searchNormalize:!1},DefaultType$15={boundary:"(string|element)",multiple:"boolean",name:"(string|null)",offset:"(array|string|function)",placeholder:"string",placement:"string",search:"boolean",searchNormalize:"boolean"};var Combobox=class extends BaseComponent{constructor(e,t){super(e,t),this._toggle=this._element,this._menu=SelectorEngine.next(this._toggle,".menu")[0],this._valueDisplay=SelectorEngine.findOne(SELECTOR_VALUE,this._toggle),this._searchInput=SelectorEngine.findOne(SELECTOR_SEARCH_INPUT,this._menu),this._noResults=SelectorEngine.findOne(SELECTOR_NO_RESULTS,this._menu),this._hiddenInput=null,this._menuInstance=null,this._createHiddenInput(),this._createMenuInstance(),this._syncInitialSelection(),this._addEventListeners()}static get Default(){return Default$15}static get DefaultType(){return DefaultType$15}static get NAME(){return NAME$16}toggle(){return this._isShown()?this.hide():this.show()}async show(){isDisabled(this._toggle)||this._isShown()||EventHandler.trigger(this._toggle,EVENT_SHOW$5).defaultPrevented||(this._menuInstance.show(),this._searchInput&&(this._searchInput.value="",this._filterItems(""),requestAnimationFrame(()=>this._searchInput.focus())),EventHandler.trigger(this._toggle,EVENT_SHOWN$4))}async hide(){this._isShown()&&(EventHandler.trigger(this._toggle,EVENT_HIDE$4).defaultPrevented||(this._menuInstance.hide(),EventHandler.trigger(this._toggle,EVENT_HIDDEN$6)))}dispose(){this._menuInstance&&(this._menuInstance.dispose(),this._menuInstance=null),this._hiddenInput&&(this._hiddenInput.remove(),this._hiddenInput=null),EventHandler.off(this._menu,EVENT_KEY$13),EventHandler.off(this._toggle,EVENT_KEY$13),EventHandler.off(this._searchInput,EVENT_KEY$13),super.dispose()}_isShown(){return this._menu.classList.contains("show")}_createHiddenInput(){const{name:e}=this._config;e&&(this._hiddenInput=document.createElement("input"),this._hiddenInput.type="hidden",this._hiddenInput.name=e,this._hiddenInput.value="",this._toggle.parentNode.insertBefore(this._hiddenInput,this._toggle))}_createMenuInstance(){this._menuInstance=new Menu(this._toggle,{menu:this._menu,autoClose:!this._config.multiple||"outside",boundary:this._config.boundary,offset:this._config.offset,placement:this._config.placement})}_syncInitialSelection(){this._getSelectedItems().length>0?(this._updateToggleText(),this._updateHiddenInput()):this._showPlaceholder()}_addEventListeners(){EventHandler.on(this._menu,`click${EVENT_KEY$13}`,SELECTOR_MENU_ITEM,e=>{const t=e.target.closest(SELECTOR_MENU_ITEM);t&&!isDisabled(t)&&(e.preventDefault(),e.stopPropagation(),this._selectItem(t))}),EventHandler.on(this._toggle,`keydown${EVENT_KEY$13}`,e=>{this._handleToggleKeydown(e)}),EventHandler.on(this._menu,`keydown${EVENT_KEY$13}`,e=>{this._handleMenuKeydown(e)}),this._searchInput&&(EventHandler.on(this._searchInput,`input${EVENT_KEY$13}`,()=>{this._filterItems(this._searchInput.value)}),EventHandler.on(this._searchInput,`keydown${EVENT_KEY$13}`,e=>{if("ArrowDown"===e.key){e.preventDefault();const t=this._getVisibleItems();t.length>0&&t[0].focus()}"Escape"===e.key&&(this.hide(),this._toggle.focus())}))}_selectItem(e){if(this._config.multiple)e.classList.toggle("selected"),setAriaAttribute(e,"aria-selected",e.classList.contains("selected"));else{const t=SelectorEngine.find(".selected",this._menu);for(const e of t)e.classList.remove("selected"),e.setAttribute("aria-selected","false");e.classList.add("selected"),e.setAttribute("aria-selected","true")}this._updateToggleText(),this._updateHiddenInput();const t=this._config.multiple?this._getSelectedItems().map(e=>e.dataset.bsValue):e.dataset.bsValue;EventHandler.trigger(this._toggle,EVENT_CHANGE$3,{value:t,item:e}),this._config.multiple||(this.hide(),this._toggle.focus())}_updateToggleText(){const e=this._getSelectedItems();if(0!==e.length)if(this._valueDisplay.classList.remove("combobox-placeholder"),this._config.multiple&&e.length>1)this._valueDisplay.textContent=`${e.length} selected`;else{const t=e[0],n=SelectorEngine.findOne(".menu-item-content > span:first-child",t);this._valueDisplay.textContent=n?n.textContent:t.textContent.trim()}else this._showPlaceholder()}_showPlaceholder(){const{placeholder:e}=this._config;e&&(this._valueDisplay.textContent=e,this._valueDisplay.classList.add("combobox-placeholder"))}_updateHiddenInput(){if(!this._hiddenInput)return;const e=this._getSelectedItems().map(e=>e.dataset.bsValue);this._hiddenInput.value=this._config.multiple?e.join(","):e[0]||""}_getSelectedItems(){return SelectorEngine.find(".selected",this._menu)}_getVisibleItems(){return SelectorEngine.find(SELECTOR_VISIBLE_ITEMS,this._menu).filter(e=>isVisible(e))}_filterItems(e){const t=this._normalizeText(e.toLowerCase().trim()),n=SelectorEngine.find(SELECTOR_MENU_ITEM,this._menu);let s=0;for(const e of n){const n=this._normalizeText(e.textContent.toLowerCase().trim()),i=!t||n.includes(t);e.style.display=i?"":"none",i&&s++}this._noResults&&this._noResults.classList.toggle("d-none",s>0)}_normalizeText(e){return this._config.searchNormalize?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}_handleToggleKeydown(e){const{key:t}=e;if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault(),this._isShown()||this.show();const n=this._getVisibleItems();return void(n.length>0&&("ArrowDown"===t?n[0]:n.at(-1)).focus())}"Enter"!==t&&" "!==t||this._isShown()||(e.preventDefault(),this.show())}_handleMenuKeydown(e){const{key:t,target:n}=e;if("Escape"===t)return e.preventDefault(),e.stopPropagation(),this.hide(),void this._toggle.focus();if("Tab"===t)return void this.hide();const s=n.matches("input");if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();const s=this._getVisibleItems();return void(s.length>0&&getNextActiveElement(s,n,"ArrowDown"===t,!s.includes(n)).focus())}if("Home"===t||"End"===t){e.preventDefault();const n=this._getVisibleItems();return void(n.length>0&&("Home"===t?n[0]:n.at(-1)).focus())}if(("Enter"===t||" "===t)&&!s){e.preventDefault();const t=n.closest(SELECTOR_MENU_ITEM);t&&!isDisabled(t)&&this._selectItem(t)}}};EventHandler.on(document,EVENT_CLICK_DATA_API$4,SELECTOR_DATA_TOGGLE$7,function(e){e.preventDefault(),Combobox.getOrCreateInstance(this).toggle()}),EventHandler.on(document,"DOMContentLoaded",()=>{for(const e of SelectorEngine.find(SELECTOR_DATA_TOGGLE$7))Combobox.getOrCreateInstance(e)});const NAME$15="datepicker",EVENT_KEY$12=".bs.datepicker",DATA_API_KEY$7=".data-api",EVENT_CHANGE$2=`change${EVENT_KEY$12}`,EVENT_SHOW$4=`show${EVENT_KEY$12}`,EVENT_SHOWN$3=`shown${EVENT_KEY$12}`,EVENT_HIDE$3=`hide${EVENT_KEY$12}`,EVENT_HIDDEN$5=`hidden${EVENT_KEY$12}`,EVENT_FOCUSIN$3=`focusin${EVENT_KEY$12}`,EVENT_POINTERDOWN$2=`pointerdown${EVENT_KEY$12}`,EVENT_CLICK$4=`click${EVENT_KEY$12}`,EVENT_CLICK_DATA_API$3=`click${EVENT_KEY$12}.data-api`,EVENT_FOCUSIN_DATA_API=`focusin${EVENT_KEY$12}.data-api`,SELECTOR_DATA_TOGGLE$6='[data-bs-toggle="datepicker"]',HIDE_DELAY=100,Default$14={datepickerTheme:null,dateMin:null,dateMax:null,dateFormat:null,displayElement:null,displayMonthsCount:1,firstWeekday:1,inline:!1,locale:"default",positionElement:null,selectedDates:[],selectionMode:"single",placement:"left",vcpOptions:{}},DefaultType$14={datepickerTheme:"(null|string)",dateMin:"(null|string|number|object)",dateMax:"(null|string|number|object)",dateFormat:"(null|object|function)",displayElement:"(null|string|element|boolean)",displayMonthsCount:"number",firstWeekday:"number",inline:"boolean",locale:"string",positionElement:"(null|string|element)",selectedDates:"array",selectionMode:"string",placement:"string",vcpOptions:"object"};var Datepicker=class extends BaseComponent{constructor(e,t){super(e,t),this._calendar=null,this._isShown=!1,this._initCalendar()}static get Default(){return Default$14}static get DefaultType(){return DefaultType$14}static get NAME(){return NAME$15}toggle(){return this._config.inline?Promise.resolve():this._isShown?this.hide():this.show()}async show(){this._config.inline||!this._calendar||isDisabled(this._element)||this._isShown||EventHandler.trigger(this._element,EVENT_SHOW$4).defaultPrevented||(this._calendar.show(),this._isShown=!0,EventHandler.trigger(this._element,EVENT_SHOWN$3))}async hide(){this._config.inline||this._calendar&&this._isShown&&(EventHandler.trigger(this._element,EVENT_HIDE$3).defaultPrevented||(this._calendar.hide(),this._isShown=!1,EventHandler.trigger(this._element,EVENT_HIDDEN$5)))}dispose(){this._themeObserver&&(this._themeObserver.disconnect(),this._themeObserver=null),this._onOutside&&(EventHandler.off(document,EVENT_FOCUSIN$3,this._onOutside),EventHandler.off(document,EVENT_POINTERDOWN$2,this._onOutside)),this._onTriggerClick&&EventHandler.off(this._positionElement,EVENT_CLICK$4,this._onTriggerClick),this._calendar&&this._calendar.destroy(),this._calendar=null,super.dispose()}getSelectedDates(){const e=this._calendar?.context?.selectedDates;return e?[...e]:[]}setSelectedDates(e){this._calendar&&(this._calendar.set({selectedDates:e}),this._syncSelectedDates([...this._calendar.context.selectedDates]))}_initCalendar(){this._isInput="INPUT"===this._element.tagName,this._isInline=this._config.inline,this._isInline&&!this._isInput&&(this._boundInput=this._element.querySelector('input[type="hidden"], input[name]')),this._positionElement=this._resolvePositionElement(),this._displayElement=this._resolveDisplayElement();const e=this._buildCalendarOptions();this._calendar=new Calendar(this._positionElement,e),this._calendar.init(),this._setupThemeObserver(),this._setupDismiss(),this._isInput&&this._element.value&&this._parseInputValue(),this._updateDisplayWithSelectedDates()}_updateDisplayWithSelectedDates(){const e=[...this._calendar?.context.selectedDates||[]],t=e.length>0?e:this._config.selectedDates;t.length>0&&this._syncSelectedDates(t)}_syncSelectedDates(e){const t=this._formatDateForInput(e);this._isInput&&(this._element.value=t),this._boundInput&&(this._boundInput.value=e.join(",")),this._displayElement&&(this._displayElement.textContent=t)}_resolvePositionElement(){let{positionElement:e}=this._config;if("string"==typeof e&&(e=document.querySelector(e)),!e&&this._isInput&&!this._isInline){const t=this._element.closest(".form-adorn");t&&(e=t)}return e||this._element}_resolveDisplayElement(){const{displayElement:e}=this._config;return"string"==typeof e?document.querySelector(e):!0===e||null===e&&!this._isInput&&!this._isInline?this._element.querySelector("[data-bs-datepicker-display]")||this._element:e}_getThemeAncestor(){return void 0===this._themeAncestor&&(this._themeAncestor=this._element.closest("[data-bs-theme]")),this._themeAncestor}_getEffectiveTheme(){const{datepickerTheme:e}=this._config;return e||this._getThemeAncestor()?.getAttribute("data-bs-theme")||null}_syncThemeAttribute(e){if(!e)return;const t=this._getEffectiveTheme();t?e.setAttribute("data-bs-theme",t):e.removeAttribute("data-bs-theme")}_setupThemeObserver(){const e=this._getThemeAncestor();e&&!this._config.datepickerTheme&&(this._themeObserver=new MutationObserver(()=>{this._syncThemeAttribute(this._calendar?.context?.mainElement)}),this._themeObserver.observe(e,{attributes:!0,attributeFilter:["data-bs-theme"]}))}_setupDismiss(){this._isInline||(this._isInput||(this._onTriggerClick=()=>{this._isShown||this._calendar?.hide()},EventHandler.on(this._positionElement,EVENT_CLICK$4,this._onTriggerClick)),this._onOutside=({target:e})=>{const t=this._calendar?.context?.mainElement,n=!(e instanceof Node)||!this._element.contains(e)&&!t?.contains(e);this._isShown&&n&&this.hide()},EventHandler.on(document,EVENT_FOCUSIN$3,this._onOutside),EventHandler.on(document,EVENT_POINTERDOWN$2,this._onOutside))}_buildCalendarOptions(){const e=this._getEffectiveTheme(),t=e&&"auto"!==e?e:"system",n={...this._config.vcpOptions,extensions:[months],inputMode:!this._isInline,positionToInput:this._config.placement,firstWeekday:this._config.firstWeekday,locale:this._config.locale,selectionDatesMode:this._config.selectionMode,selectedDates:this._config.selectedDates,displayMonthsCount:this._config.displayMonthsCount,type:this._config.displayMonthsCount>1?"multiple":"default",selectedTheme:t,themeAttrDetect:"[data-bs-theme]",onClickDate:(e,t)=>this._handleDateClick(e,t),onInit:e=>{this._syncThemeAttribute(e.context.mainElement)},onShow:()=>{this._calendar&&(this._isShown=!0,this._syncThemeAttribute(this._calendar.context.mainElement))},onHide:()=>{this._isShown=!1}};if(this._config.selectedDates.length>0){const e=this._parseDate(this._config.selectedDates[0]);n.selectedMonth=e.getMonth(),n.selectedYear=e.getFullYear()}return this._config.dateMin&&(n.dateMin=this._config.dateMin),this._config.dateMax&&(n.dateMax=this._config.dateMax),n}_handleDateClick(e,t){const n=[...e.context.selectedDates];this._syncSelectedDates(n),EventHandler.trigger(this._element,EVENT_CHANGE$2,{dates:n,event:t}),this._maybeHideAfterSelection(n)}_maybeHideAfterSelection(e){this._isInline||("single"===this._config.selectionMode&&e.length>0||"multiple-ranged"===this._config.selectionMode&&e.length>=2)&&setTimeout(()=>this.hide(),100)}_parseDate(e){const[t,n,s]=e.split("-");return new Date(t,n-1,s)}_formatDate(e){const t=this._parseDate(e),n="default"===this._config.locale?void 0:this._config.locale,{dateFormat:s}=this._config;return"function"==typeof s?s(t,n):s&&"object"==typeof s?new Intl.DateTimeFormat(n,s).format(t):t.toLocaleDateString(n)}_formatDateForInput(e){if(0===e.length)return"";if(1===e.length)return this._formatDate(e[0]);const t="multiple-ranged"===this._config.selectionMode?" – ":", ";return e.map(e=>this._formatDate(e)).join(t)}_parseInputValue(){const e=this._element.value.trim();if(!e)return;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),n=t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e);if(!Number.isNaN(n.getTime())){const e=`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`;this._calendar.set({selectedDates:[e]})}}};EventHandler.on(document,EVENT_CLICK_DATA_API$3,SELECTOR_DATA_TOGGLE$6,function(e){"INPUT"!==this.tagName&&"true"!==this.dataset.bsInline&&(e.preventDefault(),Datepicker.getOrCreateInstance(this).toggle())}),EventHandler.on(document,EVENT_FOCUSIN_DATA_API,SELECTOR_DATA_TOGGLE$6,function(){"INPUT"===this.tagName&&Datepicker.getOrCreateInstance(this).show()}),EventHandler.on(document,`DOMContentLoaded${EVENT_KEY$12}.data-api`,()=>{const e=`${SELECTOR_DATA_TOGGLE$6}[data-bs-inline="true"], ${SELECTOR_DATA_TOGGLE$6}[data-bs-selected-dates]`;for(const t of document.querySelectorAll(e))Datepicker.getOrCreateInstance(t)});const CLASS_NAME_OPEN="dialog-open";var DialogBase=class extends BaseComponent{constructor(e,t){super(e,t),this._isTransitioning=!1,this._openedAsModal=!1,this._addDialogListeners()}static get NAME(){return"dialogbase"}toggle(e){return this._element.open?this.hide():this.show(e)}async show(e){this._canShow(e)&&await this._show(e)}async hide(){this._canHide()&&await this._hide()}_canShow(e){return!this._element.open&&!this._isTransitioning&&!EventHandler.trigger(this._element,this.constructor.eventName("show"),{relatedTarget:e}).defaultPrevented}async _show(e){this._isTransitioning=!0,this._onBeforeShow();const{modal:t,preventBodyScroll:n}=this._getShowOptions();this._showElement({modal:t,preventBodyScroll:n}),await this._queueCallback(()=>{this._isTransitioning=!1,EventHandler.trigger(this._element,this.constructor.eventName("shown"),{relatedTarget:e})},this._element,this._isAnimated())}_canHide(){return!(!this._element.open||this._isTransitioning||EventHandler.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)}async _hide(){this._isTransitioning=!0,this._hideElement(),await this._queueCallback(()=>{this._element.open&&this._closeAndCleanup(),this._element.classList.remove("hiding"),this._onAfterHide(),this._isTransitioning=!1,EventHandler.trigger(this._element,this.constructor.eventName("hidden"))},this._element,this._isAnimated())}dispose(){this._element.open&&this._closeAndCleanup(),EventHandler.off(this._element,"cancel",this._cancelHandler),super.dispose()}_getShowOptions(){return{modal:!0,preventBodyScroll:!0}}_onBeforeShow(){}_onAfterHide(){}_isAnimated(){return!this._element.classList.contains(this._getInstantClassName())}_getInstantClassName(){return"dialog-instant"}_getStaticClassName(){return"dialog-static"}_onCancel(){}_showElement({modal:e=!0,preventBodyScroll:t=!0}={}){this._openedAsModal=e,e?this._element.showModal():this._element.show(),t&&document.documentElement.classList.add("dialog-open")}_hideElement(){this._hideChildComponents(),this._element.classList.add("hiding"),this._shouldDeferClose()||this._closeAndCleanup()}_closeAndCleanup(){this._element.close(),this._openedAsModal=!1,document.querySelector("dialog[open]:modal")||document.documentElement.classList.remove("dialog-open")}_shouldDeferClose(){return!1}_triggerBackdropTransition(){if(EventHandler.trigger(this._element,this.constructor.eventName("hidePrevented")).defaultPrevented)return;const e=this._getStaticClassName();this._element.classList.add(e),this._queueCallback(()=>{this._element.classList.remove(e)},this._element)}_hideChildComponents(){for(const e of SelectorEngine.find('[data-bs-toggle="tooltip"], [data-bs-toggle="popover"]',this._element)){const t=data_default.getAny(e);t&&"function"==typeof t.hide&&t.hide()}for(const e of SelectorEngine.find(".toast.show",this._element)){const t=data_default.getAny(e);t&&"function"==typeof t.hide&&t.hide()}}_addDialogListeners(){const e=this.constructor.EVENT_KEY;this._cancelHandler=e=>{e.preventDefault(),this._config.keyboard?(this._onCancel(),this.hide()):this._triggerBackdropTransition()},EventHandler.on(this._element,"cancel",this._cancelHandler),EventHandler.on(this._element,`keydown${e}`,e=>{"Escape"!==e.key||this._openedAsModal||(e.preventDefault(),this._config.keyboard&&(this._onCancel(),this.hide()))}),EventHandler.on(this._element,`click${e}`,e=>{e.target===this._element&&this._openedAsModal&&!1!==this._config.backdrop&&("static"!==this._config.backdrop?this.hide():this._triggerBackdropTransition())})}};const NAME$14="dialog",EVENT_KEY$11=".bs.dialog",DATA_API_KEY$6=".data-api",EVENT_SHOW$3="show.bs.dialog",EVENT_HIDDEN$4="hidden.bs.dialog",EVENT_CANCEL="cancel.bs.dialog",EVENT_CLICK_DATA_API$2="click.bs.dialog.data-api",CLASS_NAME_NONMODAL="dialog-nonmodal",CLASS_NAME_INSTANT$1="dialog-instant",CLASS_NAME_SWAP_IN="dialog-swap-in",SELECTOR_DATA_TOGGLE$5='[data-bs-toggle="dialog"]',Default$13={backdrop:!0,keyboard:!0,modal:!0},DefaultType$13={backdrop:"(boolean|string)",keyboard:"boolean",modal:"boolean"};var Dialog=class e extends DialogBase{constructor(e,t){super(e,t)}static get Default(){return Default$13}static get DefaultType(){return DefaultType$13}static get NAME(){return NAME$14}static{EventHandler.on(document,EVENT_CLICK_DATA_API$2,SELECTOR_DATA_TOGGLE$5,function(t){e._handleDataApiClick(this,t)})}static _handleDataApiClick(t,n){const s=SelectorEngine.getElementFromSelector(t);if(!s)return;["A","AREA"].includes(t.tagName)&&n.preventDefault();const i=Manipulator.getDataAttributes(t),o=t.closest("dialog[open]");if(!o||o===s)return EventHandler.one(s,EVENT_SHOW$3,n=>{n.defaultPrevented||e._registerFocusRestoration(s,t)}),void e.getOrCreateInstance(s,i).toggle(t);if(o.classList.contains("dialog-swap-in"))return;const r=e.getOrCreateInstance(s,i),a=e.getOrCreateInstance(o);r._canShow(t)&&a._canHide()&&(e._registerFocusRestoration(s,t),s.classList.add("dialog-swap-in"),EventHandler.one(s,"shown.bs.dialog",()=>{s.classList.remove("dialog-swap-in")}),r._show(t),o.classList.add("dialog-instant"),EventHandler.one(o,EVENT_HIDDEN$4,()=>{o.classList.remove("dialog-instant")}),a._hide())}static _registerFocusRestoration(e,t){EventHandler.one(e,EVENT_HIDDEN$4,()=>{isVisible(t)&&t.focus({preventScroll:!0})})}handleUpdate(){}_getShowOptions(){return{modal:this._config.modal,preventBodyScroll:this._config.modal}}_onBeforeShow(){this._config.modal||this._element.classList.add("dialog-nonmodal")}_onAfterHide(){this._element.classList.remove("dialog-nonmodal")}_shouldDeferClose(){return this._isAnimated()}_onCancel(){EventHandler.trigger(this._element,EVENT_CANCEL)}};enableDismissTrigger(Dialog);const ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,DefaultAllowlist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},DefaultIconAllowlist={"*":["class","role",ARIA_ATTRIBUTE_PATTERN],svg:["xmlns","width","height","viewbox","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","focusable"],path:["d","fill","stroke","stroke-width","fill-rule","clip-rule"],line:["x1","y1","x2","y2","stroke","stroke-width","stroke-linecap"],circle:["cx","cy","r","fill","stroke","stroke-width"],rect:["x","y","width","height","rx","ry","fill","stroke","stroke-width"],polyline:["points","fill","stroke","stroke-width"],polygon:["points","fill","stroke","stroke-width"],g:["fill","stroke","stroke-width","transform"],span:[],i:[]},uriAttributes=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),SAFE_URL_PATTERN=/^(?!(?:javascript|data|vbscript):)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z=]+$/i,allowedAttribute=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!uriAttributes.has(n)||Boolean(SAFE_URL_PATTERN.test(e.nodeValue)||DATA_URL_PATTERN.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(n))};function sanitizeHtml(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const s=(new window.DOMParser).parseFromString(e,"text/html"),i=[...s.body.querySelectorAll("*")];for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const s=[...e.attributes],i=[...t["*"]||[],...t[n]||[]];for(const t of s)allowedAttribute(t,i)||e.removeAttribute(t.nodeName)}return s.body.innerHTML}const NAME$13="navoverflow",EVENT_KEY$10=".bs.navoverflow",EVENT_UPDATE=`update${EVENT_KEY$10}`,EVENT_OVERFLOW=`overflow${EVENT_KEY$10}`,EVENT_RESIZE$2=`resize${EVENT_KEY$10}`,CLASS_NAME_OVERFLOW="nav-overflow",CLASS_NAME_OVERFLOW_MENU="nav-overflow-menu",CLASS_NAME_HIDDEN="d-none",CLASS_NAME_KEEP="nav-overflow-keep",CLASS_NAME_INITIALIZED="nav-overflow-initialized",CLASS_NAME_SUBMENU="submenu",CLASS_NAME_SHOW$3="show",SELECTOR_NAV=".nav",SELECTOR_NAV_ITEM=".nav-item",SELECTOR_NAV_LINK=".nav-link",SELECTOR_OVERFLOW_TOGGLE=".nav-overflow-toggle",SELECTOR_OVERFLOW_MENU=".nav-overflow-menu",SELECTOR_CUSTOM_ICON="[data-bs-overflow-icon]",SELECTOR_MENU$1=".menu",SELECTOR_MENU_TOGGLE$2='[data-bs-toggle="menu"]',DEFAULT_TEXT="More",Default$12={collapseBelow:0,iconPlacement:"start",menuPlacement:"bottom-end",menuStrategy:"absolute",moreText:"More",moreIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"/></svg>',threshold:0},DefaultType$12={collapseBelow:"(number|string)",iconPlacement:"string",menuPlacement:"string",menuStrategy:"string",moreText:"(string|boolean)",moreIcon:"string",threshold:"number"};var NavOverflow=class extends BaseComponent{constructor(e,t){super(e,t);const n=SelectorEngine.findOne(".nav",this._element);if(!n)throw new TypeError(`${this._element.outerHTML} has no child .nav to collapse`);this._nav=n,this._items=[],this._overflowItems=[],this._overflowMenu=null,this._overflowToggle=null,this._resizeObserver=null,this._resizeHandler=null,this._collapseBelow=0,this._itemMenus=new Map,this._relocatedMenus=new Map,this._init()}static get Default(){return Default$12}static get DefaultType(){return DefaultType$12}static get NAME(){return NAME$13}update(){this._calculateOverflow(),EventHandler.trigger(this._element,EVENT_UPDATE)}dispose(){this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeHandler&&EventHandler.off(window,EVENT_RESIZE$2,this._resizeHandler),this._restoreItems(),this._overflowToggle&&this._overflowToggle.parentElement&&this._overflowToggle.parentElement.remove(),super.dispose()}_init(){this._element.classList.add("nav-overflow"),this._items=SelectorEngine.find(".nav-item",this._nav).filter(e=>!e.querySelector(".nav-overflow-toggle"));for(const[e,t]of this._items.entries()){t.dataset.bsNavOrder=e;const n=SelectorEngine.findOne(".nav-link",t);n?.matches(SELECTOR_MENU_TOGGLE$2)&&this._findItemMenu(t,n)}this._collapseBelow=this._resolveCollapseBelow(),this._createOverflowMenu(),this._setupResizeObserver(),this._calculateOverflow(),this._element.classList.add(CLASS_NAME_INITIALIZED)}_createOverflowMenu(){if(this._overflowToggle=SelectorEngine.findOne(".nav-overflow-toggle",this._element),this._overflowToggle)return void(this._overflowMenu=SelectorEngine.findOne(".nav-overflow-menu",this._element));const{moreText:e}=this._config,t="string"==typeof e?e:"",n=document.createElement("li");n.className="nav-item nav-overflow-item";const s=document.createElement("button");s.type="button",s.className="nav-link nav-overflow-toggle",s.setAttribute("data-bs-toggle","menu"),s.setAttribute("data-bs-placement",this._config.menuPlacement),s.setAttribute("data-bs-strategy",this._config.menuStrategy),s.setAttribute("aria-expanded","false"),""===t&&s.setAttribute("aria-label","More");const i=document.createElement("span");if(i.className="nav-overflow-icon",i.innerHTML=sanitizeHtml(this._resolveIcon(),DefaultIconAllowlist),""===t)s.append(i);else{const e=document.createElement("span");e.className="nav-overflow-text",e.textContent=t,"end"===this._config.iconPlacement?s.append(e,i):s.append(i,e)}const o=document.createElement("div");o.className="nav-overflow-menu menu",n.append(s,o),this._nav.append(n),this._overflowToggle=s,this._overflowMenu=o}_resolveIcon(){const e=SelectorEngine.findOne(SELECTOR_CUSTOM_ICON,this._element);if(!e)return this._config.moreIcon;const t=e.cloneNode(!0);t.removeAttribute("data-bs-overflow-icon");const n=t.outerHTML;return e.remove(),n}_resolveCollapseBelow(){const e=this._config.collapseBelow;if("number"==typeof e)return e;if("string"==typeof e&&""!==e){const t=getComputedStyle(document.documentElement).getPropertyValue(`--bs-breakpoint-${e}`);return Number.parseFloat(t)||0}return 0}_setupResizeObserver(){if("undefined"==typeof ResizeObserver)return this._resizeHandler=()=>this._calculateOverflow(),void EventHandler.on(window,EVENT_RESIZE$2,this._resizeHandler);this._resizeObserver=new ResizeObserver(()=>{this._calculateOverflow()}),this._resizeObserver.observe(this._element)}_availableWidth(){const{paddingInlineStart:e,paddingInlineEnd:t}=getComputedStyle(this._element),n=(Number.parseFloat(e)||0)+(Number.parseFloat(t)||0);return this._element.clientWidth-n}_navGap(){return Number.parseFloat(getComputedStyle(this._nav).columnGap)||0}_calculateOverflow(){this._restoreItems();const e=this._availableWidth(),t=this._overflowToggle?.closest(".nav-item")??null,n=this._items.filter(e=>!e.classList.contains(CLASS_NAME_KEEP));if(this._collapseBelow>0&&e<this._collapseBelow)return void this._applyOverflow(n,t);const s=this._navGap(),i=e-this._items.filter(e=>e.classList.contains(CLASS_NAME_KEEP)).reduce((e,t)=>e+t.offsetWidth+s,0)-(t?t.offsetWidth+s:0);let o=0,r=[];for(const e of n)o+=e.offsetWidth+s,o>i+1&&r.push(e);this._items.length-r.length<this._config.threshold&&this._items.length>this._config.threshold&&(r=this._items.slice(this._config.threshold).filter(e=>!e.classList.contains(CLASS_NAME_KEEP))),this._applyOverflow(r,t)}_applyOverflow(e,t){this._moveToOverflow(e),t?.classList.toggle("d-none",0===e.length),e.length>0&&EventHandler.trigger(this._element,EVENT_OVERFLOW,{overflowCount:e.length,visibleCount:this._items.length-e.length})}_moveToOverflow(e){if(this._overflowMenu){this._overflowMenu.replaceChildren(),this._overflowItems=[];for(const t of e){const e=SelectorEngine.findOne(".nav-link",t);if(!e)continue;const n=this._findItemMenu(t,e);n&&e.matches(SELECTOR_MENU_TOGGLE$2)?this._overflowMenu.append(this._relocateAsSubmenu(t,e,n)):this._overflowMenu.append(this._cloneAsMenuItem(e)),t.classList.add("d-none"),t.dataset.bsNavOverflow="true",this._overflowItems.push(t)}}}_relocateAsSubmenu(e,t,n){this._resetMenu(t,n),e.classList.remove("show"),this._relocatedMenus.set(e,{menu:n,parent:n.parentNode,nextSibling:n.nextSibling});const s=document.createElement("div");return s.className="submenu",s.append(this._cloneAsMenuItem(t,!0),n),s}_cloneAsMenuItem(e,t=!1){const n=e.cloneNode(!0);if(n.className="menu-item",n.removeAttribute("id"),e.classList.contains("active")&&n.classList.add("active"),(e.classList.contains("disabled")||e.hasAttribute("disabled"))&&n.classList.add("disabled"),t){for(const e of n.getAttributeNames())e.startsWith("data-bs-")&&"data-bs-theme"!==e&&n.removeAttribute(e);n.removeAttribute("href"),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false"),"A"===n.tagName&&(n.setAttribute("role","button"),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"))}return n}_findItemMenu(e,t){const n=SelectorEngine.next(t,".menu")[0];if(n&&!n.classList.contains("nav-overflow-menu"))return this._itemMenus.set(e,n),n;const s=SelectorEngine.findOne(".menu",e);if(s&&!s.classList.contains("nav-overflow-menu"))return this._itemMenus.set(e,s),s;const i=this._itemMenus.get(e);return i?.isConnected?i:(this._itemMenus.delete(e),null)}_resetMenu(e,t){Menu.getInstance(e)?.dispose(),e.classList.remove("show"),e.setAttribute("aria-expanded","false"),e.parentElement?.classList.remove("show"),t.classList.remove("show")}_restoreRelocatedMenus(){for(const{menu:e,parent:t,nextSibling:n}of this._relocatedMenus.values())n?n.before(e):t.append(e);this._relocatedMenus.clear()}_restoreItems(){this._overflowToggle&&this._overflowMenu&&(this._resetMenu(this._overflowToggle,this._overflowMenu),this._overflowToggle.closest(".nav-item")?.classList.remove("show")),this._restoreRelocatedMenus();for(const e of this._items)e.classList.remove("d-none"),delete e.dataset.bsNavOverflow;this._overflowToggle?.closest(".nav-item")?.classList.remove("d-none"),this._overflowMenu?.replaceChildren(),this._overflowItems=[]}};EventHandler.on(document,"DOMContentLoaded",()=>{for(const e of SelectorEngine.find('[data-bs-toggle="nav-overflow"]'))NavOverflow.getOrCreateInstance(e)});const NAME$12="swipe",EVENT_KEY$9=".bs.swipe",EVENT_TOUCHSTART="touchstart.bs.swipe",EVENT_TOUCHMOVE="touchmove.bs.swipe",EVENT_TOUCHEND="touchend.bs.swipe",EVENT_POINTERDOWN$1="pointerdown.bs.swipe",EVENT_POINTERUP$1="pointerup.bs.swipe",POINTER_TYPE_TOUCH="touch",POINTER_TYPE_PEN="pen",CLASS_NAME_POINTER_EVENT="pointer-event",SWIPE_THRESHOLD=40,Default$11={endCallback:null,leftCallback:null,rightCallback:null,upCallback:null,downCallback:null},DefaultType$11={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)",upCallback:"(function|null)",downCallback:"(function|null)"};var Swipe=class e extends Config{constructor(t,n){super(),this._element=t,t&&e.isSupported()&&(this._config=this._getConfig(n),this._deltaX=0,this._deltaY=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Default$11}static get DefaultType(){return DefaultType$11}static get NAME(){return"swipe"}dispose(){EventHandler.off(this._element,".bs.swipe")}_start(e){if(!this._supportPointerEvents)return this._deltaX=e.touches[0].clientX,void(this._deltaY=e.touches[0].clientY);this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX,this._deltaY=e.clientY)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX,this._deltaY=e.clientY-this._deltaY),this._handleSwipe(),execute(this._config.endCallback)}_move(e){if(e.touches&&e.touches.length>1)return this._deltaX=0,void(this._deltaY=0);this._deltaX=e.touches[0].clientX-this._deltaX,this._deltaY=e.touches[0].clientY-this._deltaY}_handleSwipe(){const e=Math.abs(this._deltaX),t=Math.abs(this._deltaY);if(t>e&&t>40){const e=this._deltaY>0?"down":"up";return this._deltaX=0,this._deltaY=0,void execute("down"===e?this._config.downCallback:this._config.upCallback)}if(e>40){const t=e/this._deltaX;if(this._deltaX=0,this._deltaY=0,!t)return;return void execute(t>0?this._config.rightCallback:this._config.leftCallback)}this._deltaX=0,this._deltaY=0}_initEvents(){this._supportPointerEvents?(EventHandler.on(this._element,EVENT_POINTERDOWN$1,e=>this._start(e)),EventHandler.on(this._element,EVENT_POINTERUP$1,e=>this._end(e)),this._element.classList.add("pointer-event")):(EventHandler.on(this._element,EVENT_TOUCHSTART,e=>this._start(e)),EventHandler.on(this._element,EVENT_TOUCHMOVE,e=>this._move(e)),EventHandler.on(this._element,EVENT_TOUCHEND,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}};const NAME$11="drawer",EVENT_KEY$8=".bs.drawer",DATA_API_KEY$5=".data-api",EVENT_LOAD_DATA_API$2=`load${EVENT_KEY$8}.data-api`,EVENT_HIDDEN$3=`hidden${EVENT_KEY$8}`,EVENT_RESIZE$1=`resize${EVENT_KEY$8}`,EVENT_CLICK_DATA_API$1=`click${EVENT_KEY$8}.data-api`,SELECTOR_DATA_TOGGLE$4='[data-bs-toggle="drawer"]',SELECTOR_OPEN='dialog.drawer[open], dialog[open][class*="\\:drawer"]',Default$10={backdrop:!0,keyboard:!0,scroll:!1},DefaultType$10={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};var Drawer=class extends DialogBase{constructor(e,t){super(e,t),this._swipeHelper=null,this._resizeObserver=null,this._resizeFrame=null,this._initResizeObserver()}static get Default(){return Default$10}static get DefaultType(){return DefaultType$10}static get NAME(){return NAME$11}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),this._resizeObserver&&this._resizeObserver.disconnect(),null!==this._resizeFrame&&cancelAnimationFrame(this._resizeFrame),super.dispose()}_getShowOptions(){return{modal:Boolean(this._config.backdrop)||!this._config.scroll,preventBodyScroll:!this._config.scroll}}_onBeforeShow(){this._initSwipe()}_getInstantClassName(){return"drawer-instant"}_getStaticClassName(){return"drawer-static"}_initResizeObserver(){const e=this._element.closest(".navbar");e&&"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(()=>{null!==this._resizeFrame&&cancelAnimationFrame(this._resizeFrame),this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null,this._element.open&&"fixed"!==getComputedStyle(this._element).position&&this.hide()})}),this._resizeObserver.observe(e))}_initSwipe(){if(this._swipeHelper||!Swipe.isSupported())return;const e={},t=this._element;t.classList.contains("drawer-bottom")?e.downCallback=()=>this.hide():t.classList.contains("drawer-top")?e.upCallback=()=>this.hide():t.classList.contains("drawer-end")?isRTL()?e.leftCallback=()=>this.hide():e.rightCallback=()=>this.hide():isRTL()?e.rightCallback=()=>this.hide():e.leftCallback=()=>this.hide(),this._swipeHelper=new Swipe(t,e)}};EventHandler.on(document,EVENT_CLICK_DATA_API$1,SELECTOR_DATA_TOGGLE$4,function(e){const t=SelectorEngine.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),isDisabled(this))return;EventHandler.one(t,EVENT_HIDDEN$3,()=>{isVisible(this)&&this.focus({preventScroll:!0})});const n=SelectorEngine.findOne("dialog.drawer[open]");n&&n!==t&&Drawer.getInstance(n).hide(),Drawer.getOrCreateInstance(t).toggle(this)}),EventHandler.on(window,EVENT_LOAD_DATA_API$2,()=>{for(const e of SelectorEngine.find("dialog.drawer[open]"))Drawer.getOrCreateInstance(e).show()}),EventHandler.on(window,EVENT_RESIZE$1,()=>{for(const e of SelectorEngine.find(SELECTOR_OPEN))"fixed"!==getComputedStyle(e).position&&Drawer.getOrCreateInstance(e).hide()}),enableDismissTrigger(Drawer);const NAME$10="strength",EVENT_KEY$7=".bs.strength",DATA_API_KEY$4=".data-api",EVENT_STRENGTH_CHANGE=`strengthChange${EVENT_KEY$7}`,SELECTOR_DATA_STRENGTH="[data-bs-strength]",STRENGTH_LEVELS=["weak","fair","good","strong"],Default$9={input:null,minLength:8,messages:{weak:"Weak",fair:"Fair",good:"Good",strong:"Strong"},weights:{minLength:1,extraLength:1,lowercase:1,uppercase:1,numbers:1,special:1,multipleSpecial:1,longPassword:1},thresholds:[2,4,6],scorer:null},DefaultType$9={input:"(string|element|null)",minLength:"number",messages:"object",weights:"object",thresholds:"array",scorer:"(function|null)"};var Strength=class extends BaseComponent{constructor(e,t){super(e,t),this._input=this._getInput(),this._segments=SelectorEngine.find(".strength-segment",this._element),this._textElement=SelectorEngine.findOne(".strength-text",this._element.parentElement),this._currentStrength=null,this._input&&(this._addEventListeners(),this._evaluate())}static get Default(){return Default$9}static get DefaultType(){return DefaultType$9}static get NAME(){return NAME$10}getStrength(){return this._currentStrength}evaluate(){this._evaluate()}dispose(){EventHandler.off(this._input,EVENT_KEY$7),super.dispose()}_getInput(){if(this._config.input)return"string"==typeof this._config.input?SelectorEngine.findOne(this._config.input):this._config.input;const e=this._element.parentElement;return SelectorEngine.findOne('input[type="password"]',e)}_addEventListeners(){EventHandler.on(this._input,`input${EVENT_KEY$7}`,()=>this._evaluate()),EventHandler.on(this._input,`change${EVENT_KEY$7}`,()=>this._evaluate())}_evaluate(){const e=this._input.value,t=this._calculateScore(e),n=this._scoreToStrength(t);n!==this._currentStrength&&(this._currentStrength=n,this._updateUI(n),EventHandler.trigger(this._element,EVENT_STRENGTH_CHANGE,{strength:n,score:t,password:e.length>0?"***":""}))}_calculateScore(e){if(!e)return 0;if("function"==typeof this._config.scorer)return this._config.scorer(e);const{weights:t}=this._config;let n=0;return e.length>=this._config.minLength&&(n+=t.minLength),e.length>=this._config.minLength+4&&(n+=t.extraLength),/[a-z]/.test(e)&&(n+=t.lowercase),/[A-Z]/.test(e)&&(n+=t.uppercase),/\d/.test(e)&&(n+=t.numbers),/[!@#$%^&*(),.?":{}|<>]/.test(e)&&(n+=t.special),/[!@#$%^&*(),.?":{}|<>].*[!@#$%^&*(),.?":{}|<>]/.test(e)&&(n+=t.multipleSpecial),e.length>=16&&(n+=t.longPassword),n}_scoreToStrength(e){if(0===e)return null;const[t,n,s]=this._config.thresholds;return e<=t?"weak":e<=n?"fair":e<=s?"good":"strong"}_updateUI(e){e?this._element.dataset.bsStrength=e:delete this._element.dataset.bsStrength;const t=e?STRENGTH_LEVELS.indexOf(e):-1;for(const[e,n]of this._segments.entries())e<=t?n.classList.add("active"):n.classList.remove("active");this._textElement&&(e&&this._config.messages[e]?(this._textElement.textContent=this._config.messages[e],this._textElement.dataset.bsStrength=e,this._textElement.style.setProperty("--strength-color",`var(--${{weak:"danger",fair:"warning",good:"info",strong:"success"}[e]}-text)`)):(this._textElement.textContent="",delete this._textElement.dataset.bsStrength))}};EventHandler.on(document,`DOMContentLoaded${EVENT_KEY$7}.data-api`,()=>{for(const e of SelectorEngine.find("[data-bs-strength]"))Strength.getOrCreateInstance(e)});const NAME$9="otpInput",EVENT_KEY$6=".bs.otpInput",DATA_API_KEY$3=".data-api",EVENT_COMPLETE=`complete${EVENT_KEY$6}`,EVENT_INPUT$1=`input${EVENT_KEY$6}`,EVENT_DOMCONTENT_LOADED=`DOMContentLoaded${EVENT_KEY$6}.data-api`,SELECTOR_DATA_OTP="[data-bs-otp]",SELECTOR_INPUT$1="input",CLASS_NAME_INPUT="otp-input",CLASS_NAME_RENDERED="otp-rendered",CLASS_NAME_SLOTS="otp-slots",CLASS_NAME_SLOT="otp-slot",CLASS_NAME_SLOT_FILLED="otp-slot-filled",CLASS_NAME_SLOT_ACTIVE="otp-slot-active",CLASS_NAME_SEPARATOR="otp-separator",MASK_CHARACTER="•",TYPES={numeric:{inputmode:"numeric",pattern:"[0-9]*",filter:/[^0-9]/g},alphanumeric:{inputmode:"text",pattern:"[A-Za-z0-9]*",filter:/[^A-Za-z0-9]/g},alpha:{inputmode:"text",pattern:"[A-Za-z]*",filter:/[^A-Za-z]/g}},Default$8={groups:null,length:null,mask:!1,separator:"·",type:"numeric"},DefaultType$8={groups:"(array|null)",length:"(number|null)",mask:"boolean",separator:"string",type:"string"};var OtpInput=class extends BaseComponent{constructor(e,t){super(e,t);const n=SelectorEngine.findOne("input",this._element);n&&(this._input=n,this._type=TYPES[this._config.type]||TYPES.numeric,this._length=this._resolveLength(),this._slots=[],this._pointerActive=!1,this._pointerIndex=0,this._setupInput(),this._renderSlots(),this._addEventListeners(),this._render())}static get Default(){return Default$8}static get DefaultType(){return DefaultType$8}static get NAME(){return NAME$9}getValue(){return this._input.value}setValue(e){this._input.value=this._sanitize(String(e)),this._render(),this._checkComplete()}clear(){this._input.value="",this._render(),this._input.focus()}focus(){this._input.focus(),this._selectSlot(this._firstEmptyIndex()),this._render()}dispose(){for(const[e,t]of Object.entries(this._inputListeners??{}))EventHandler.off(this._input,e,t);EventHandler.off(document,"selectionchange",this._onSelectionChange),this._slotsContainer?.remove(),this._element.classList.remove("otp-rendered"),super.dispose()}_resolveLength(){if(this._config.length)return this._config.length;const e=Number.parseInt(this._input.getAttribute("maxlength"),10);return Number.isNaN(e)||e<1?6:e}_setupInput(){const e=this._input;"number"!==e.type&&"password"!==e.type||(e.type="text"),e.classList.add("otp-input"),e.setAttribute("maxlength",String(this._length)),e.setAttribute("inputmode",this._type.inputmode),e.setAttribute("pattern",this._type.pattern),e.getAttribute("autocomplete")||e.setAttribute("autocomplete","one-time-code"),e.value&&(e.value=this._sanitize(e.value))}_renderSlots(){const e=document.createElement("div");e.className="otp-slots",e.setAttribute("aria-hidden","true");const{groups:t}=this._config;let n=0,s=0;for(let i=0;i<this._length;i++){const o=document.createElement("div");if(o.className="otp-slot",e.append(o),this._slots.push(o),Array.isArray(t)&&t.length>0&&(s++,s===t[n]&&i<this._length-1)){const i=document.createElement("div");i.className="otp-separator",i.textContent=this._config.separator,e.append(i),n=Math.min(n+1,t.length-1),s=0}}this._slotsContainer=e,this._element.append(e),this._element.classList.add("otp-rendered")}_addEventListeners(){this._inputListeners={input:()=>this._handleInput(),beforeinput:e=>this._handleBeforeInput(e),paste:e=>this._handlePaste(e),pointerdown:e=>this._handlePointerDown(e)},this._inputListeners.focus=()=>{if(this._pointerActive)return this._pointerActive=!1,this._selectSlot(this._pointerIndex),void this._render();this._selectSlot(this._firstEmptyIndex()),this._render()};const e=()=>this._render();this._onSelectionChange=()=>{document.activeElement===this._input&&this._render()};for(const t of["blur","keyup","select"])this._inputListeners[t]=e;for(const[e,t]of Object.entries(this._inputListeners))EventHandler.on(this._input,e,t);EventHandler.on(document,"selectionchange",this._onSelectionChange)}_handleInput(){const e=this._sanitize(this._input.value);e!==this._input.value&&(this._input.value=e),document.activeElement===this._input&&this._selectSlot(this._firstEmptyIndex()),this._afterValueChange()}_handlePaste(e){const t=e.clipboardData?.getData("text");if(!t||this._input.readOnly)return;const n=this._sanitize(t);let s=this._input.selectionStart??this._input.value.length,i=this._input.selectionEnd??s;n.length===this._length&&(s=0,i=this._input.value.length);const o=n.slice(0,this._length-this._input.value.length+i-s);e.preventDefault(),o&&(this._input.setRangeText(o,s,i,"end"),this._afterValueChange())}_handleBeforeInput(e){const{inputType:t,data:n}=e;if("insertText"===t&&n&&1===n.length){e.preventDefault();const t=this._sanitize(n);if(!t)return;const s=Math.min(this._input.selectionStart??0,this._length-1),i=[...this._input.value];return i[s]=t,this._input.value=i.join("").slice(0,this._length),this._selectSlot(s+1),void this._afterValueChange()}if("deleteContentBackward"===t){e.preventDefault();const t=this._input.selectionStart??0,n=this._input.selectionEnd??t,s=[...this._input.value];n>t?(s.splice(t,n-t),this._input.value=s.join(""),this._selectSlot(t)):t>0&&(s.splice(t-1,1),this._input.value=s.join(""),this._selectSlot(t-1)),this._afterValueChange()}}_handlePointerDown(e){const t=this._slotIndexFromPoint(e.clientX);if(null===t)return;const n=Math.min(t,this._firstEmptyIndex());if(document.activeElement===this._input)return e.preventDefault(),this._selectSlot(n),void this._render();this._pointerActive=!0,this._pointerIndex=n}_slotIndexFromPoint(e){for(const[t,n]of this._slots.entries())if(e<=n.getBoundingClientRect().right||t===this._slots.length-1)return t;return null}_afterValueChange(){this._render(),EventHandler.trigger(this._element,EVENT_INPUT$1,{value:this._input.value}),this._checkComplete()}_firstEmptyIndex(){return Math.min(this._input.value.length,this._length-1)}_selectSlot(e){const t=Math.max(0,Math.min(e,this._length-1)),n=t<this._input.value.length?t+1:t;this._input.setSelectionRange(t,n)}_sanitize(e){return e.replace(this._type.filter,"").slice(0,this._length)}_render(){const{value:e}=this._input,t=document.activeElement===this._input,n=Math.min(this._input.selectionStart??e.length,this._length-1);for(const[s,i]of this._slots.entries()){const o=e[s]??"";i.textContent=o&&this._config.mask?"•":o,i.classList.toggle("otp-slot-filled",Boolean(o)),i.classList.toggle("otp-slot-active",t&&s===n)}}_checkComplete(){const{value:e}=this._input;e.length===this._length&&EventHandler.trigger(this._element,EVENT_COMPLETE,{value:e})}};EventHandler.on(document,EVENT_DOMCONTENT_LOADED,()=>{for(const e of SelectorEngine.find("[data-bs-otp]"))OtpInput.getOrCreateInstance(e)});const NAME$8="chips",EVENT_KEY$5=".bs.chips",DATA_API_KEY$2=".data-api",EVENT_ADD="add.bs.chips",EVENT_REMOVE="remove.bs.chips",EVENT_CHANGE$1="change.bs.chips",EVENT_SELECT="select.bs.chips",SELECTOR_DATA_CHIPS="[data-bs-chips]",SELECTOR_GHOST_INPUT=".form-ghost",SELECTOR_CHIP=".chip",SELECTOR_CHIP_DISMISS=".chip-dismiss",CLASS_NAME_CHIP="chip",CLASS_NAME_CHIP_DISMISS="chip-dismiss",CLASS_NAME_ACTIVE$2="active",Default$7={separator:",",allowDuplicates:!1,maxChips:null,placeholder:"",dismissible:!0,dismissIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>',createOnBlur:!0},DefaultType$7={separator:"(string|null)",allowDuplicates:"boolean",maxChips:"(number|null)",placeholder:"string",dismissible:"boolean",dismissIcon:"string",createOnBlur:"boolean"};var Chips=class extends BaseComponent{constructor(e,t){super(e,t);const n=SelectorEngine.findOne(".form-ghost",this._element);this._chips=[],this._selectedChips=new Set,this._anchorChip=null,n?this._input=n:this._createInput(),this._initializeExistingChips(),this._addEventListeners()}static get Default(){return Default$7}static get DefaultType(){return DefaultType$7}static get NAME(){return NAME$8}add(e){const t=String(e).trim();if(!t)return null;if(!this._config.allowDuplicates&&this._chips.includes(t))return null;if(null!==this._config.maxChips&&this._chips.length>=this._config.maxChips)return null;if(EventHandler.trigger(this._element,EVENT_ADD,{value:t,relatedTarget:this._input}).defaultPrevented)return null;const n=this._createChip(t);return this._element.insertBefore(n,this._input),this._chips.push(t),EventHandler.trigger(this._element,EVENT_CHANGE$1,{values:this.getValues()}),n}remove(e){let t,n;return"string"==typeof e?(n=e,t=this._findChipByValue(n)):(t=e,n=this._getChipValue(t)),!(!t||!n||EventHandler.trigger(this._element,EVENT_REMOVE,{value:n,chip:t,relatedTarget:this._input}).defaultPrevented||(this._selectedChips.delete(t),this._anchorChip===t&&(this._anchorChip=null),t.remove(),this._chips=this._getChipElements().map(e=>this._getChipValue(e)).filter(Boolean),EventHandler.trigger(this._element,EVENT_CHANGE$1,{values:this.getValues()}),0))}removeSelected(){const e=[...this._selectedChips];for(const t of e)this.remove(t);this._input?.focus()}getValues(){return[...this._chips]}getSelectedValues(){return[...this._selectedChips].map(e=>this._getChipValue(e))}clear(){const e=SelectorEngine.find(".chip",this._element);for(const t of e)t.remove();this._chips=[],this._selectedChips.clear(),this._anchorChip=null,EventHandler.trigger(this._element,EVENT_CHANGE$1,{values:[]})}clearSelection(){for(const e of this._selectedChips)e.classList.remove("active");this._selectedChips.clear(),this._anchorChip=null,EventHandler.trigger(this._element,EVENT_SELECT,{selected:[]})}selectChip(e,t={}){const{addToSelection:n=!1,rangeSelect:s=!1}=t,i=this._getChipElements();if(i.includes(e)){if(s&&this._anchorChip){const t=i.indexOf(this._anchorChip),s=i.indexOf(e),o=Math.min(t,s),r=Math.max(t,s);if(!n){const e=this._anchorChip;this.clearSelection(),this._anchorChip=e}for(let e=o;e<=r;e++)this._selectedChips.add(i[e]),i[e].classList.add("active")}else n?this._selectedChips.has(e)?(this._selectedChips.delete(e),e.classList.remove("active")):(this._selectedChips.add(e),e.classList.add("active"),this._anchorChip=e):(this.clearSelection(),this._selectedChips.add(e),e.classList.add("active"),this._anchorChip=e);EventHandler.trigger(this._element,EVENT_SELECT,{selected:this.getSelectedValues()})}}focus(){this._input?.focus()}dispose(){EventHandler.off(this._input,".bs.chips"),super.dispose()}_getChipElements(){return SelectorEngine.find(".chip",this._element)}_createInput(){const e=document.createElement("input");e.type="text",e.className="form-ghost",this._config.placeholder&&(e.placeholder=this._config.placeholder),this._element.append(e),this._input=e}_initializeExistingChips(){const e=SelectorEngine.find(".chip",this._element);for(const t of e){const e=this._getChipValue(t);e&&(this._chips.push(e),this._setupChip(t))}}_setupChip(e){e.setAttribute("tabindex","0"),this._config.dismissible&&!SelectorEngine.findOne(".chip-dismiss",e)&&e.append(this._createDismissButton())}_createChip(e){const t=document.createElement("span");return t.className="chip",t.dataset.bsChipValue=e,t.append(document.createTextNode(e)),this._setupChip(t),t}_createDismissButton(){const e=document.createElement("button");return e.type="button",e.className="chip-dismiss",e.setAttribute("aria-label","Remove"),e.setAttribute("tabindex","-1"),e.innerHTML=sanitizeHtml(this._config.dismissIcon,DefaultIconAllowlist),e}_findChipByValue(e){return this._getChipElements().find(t=>this._getChipValue(t)===e)}_getChipValue(e){if(e.dataset.bsChipValue)return e.dataset.bsChipValue;const t=e.cloneNode(!0),n=SelectorEngine.findOne(".chip-dismiss",t);return n&&n.remove(),t.textContent?.trim()||""}_addEventListeners(){EventHandler.on(this._input,"keydown.bs.chips",e=>this._handleInputKeydown(e)),EventHandler.on(this._input,"input.bs.chips",e=>this._handleInput(e)),EventHandler.on(this._input,"paste.bs.chips",e=>this._handlePaste(e)),EventHandler.on(this._input,"focus.bs.chips",()=>this.clearSelection()),this._config.createOnBlur&&EventHandler.on(this._input,"blur.bs.chips",e=>{e.relatedTarget?.closest(".chip")||this._createChipFromInput()}),EventHandler.on(this._element,"click.bs.chips",".chip",e=>{if(e.target.closest(".chip-dismiss"))return;const t=e.target.closest(".chip");t&&(e.preventDefault(),this.selectChip(t,{addToSelection:e.metaKey||e.ctrlKey,rangeSelect:e.shiftKey}),t.focus())}),EventHandler.on(this._element,"click.bs.chips",".chip-dismiss",e=>{e.stopPropagation();const t=e.target.closest(".chip");t&&(this.remove(t),this._input?.focus())}),EventHandler.on(this._element,"keydown.bs.chips",".chip",e=>{this._handleChipKeydown(e)}),EventHandler.on(this._element,"click.bs.chips",e=>{e.target===this._element&&(this.clearSelection(),this._input?.focus())})}_handleInputKeydown(e){const{key:t}=e;switch(t){case"Enter":e.preventDefault(),this._createChipFromInput();break;case"Backspace":case"Delete":if(""===this._input.value){e.preventDefault();const t=this._getChipElements();if(t.length>0){const e=t.at(-1);this.selectChip(e),e.focus()}}break;case"ArrowLeft":if(0===this._input.selectionStart&&0===this._input.selectionEnd){e.preventDefault();const t=this._getChipElements();if(t.length>0){const n=t.at(-1);e.shiftKey?this.selectChip(n,{addToSelection:!0}):this.selectChip(n),n.focus()}}break;case"Escape":this._input.value="",this.clearSelection(),this._input.blur()}}_handleChipKeydown(e){const{key:t}=e,n=e.target.closest(".chip");if(!n)return;const s=this._getChipElements(),i=s.indexOf(n);switch(t){case"Backspace":case"Delete":e.preventDefault(),this._handleChipDelete(i,s);break;case"ArrowLeft":e.preventDefault(),this._navigateChip(s,i,-1,e.shiftKey);break;case"ArrowRight":e.preventDefault(),this._navigateChip(s,i,1,e.shiftKey);break;case"Home":e.preventDefault(),this._navigateToEdge(s,0,e.shiftKey);break;case"End":case"Escape":e.preventDefault(),this.clearSelection(),this._input?.focus();break;case"a":this._handleSelectAll(e,s)}}_handleChipDelete(e,t){if(0===this._selectedChips.size)return;const n=Math.min(e,t.length-this._selectedChips.size-1);this.removeSelected();const s=this._getChipElements();if(s.length>0){const e=Math.max(0,Math.min(n,s.length-1));s[e].focus(),this.selectChip(s[e])}else this._input?.focus()}_navigateChip(e,t,n,s){const i=t+n;if(n<0&&i>=0){const t=e[i];this.selectChip(t,s?{addToSelection:!0,rangeSelect:!0}:{}),t.focus()}else if(n>0&&i<e.length){const t=e[i];this.selectChip(t,s?{addToSelection:!0,rangeSelect:!0}:{}),t.focus()}else n>0&&(this.clearSelection(),this._input?.focus())}_navigateToEdge(e,t,n){if(0===e.length)return;const s=e[t];this.selectChip(s,n?{rangeSelect:!0}:{}),s.focus()}_handleSelectAll(e,t){if(e.metaKey||e.ctrlKey){e.preventDefault();for(const e of t)this._selectedChips.add(e),e.classList.add("active");EventHandler.trigger(this._element,EVENT_SELECT,{selected:this.getSelectedValues()})}}_handleInput(e){const{value:t}=e.target,{separator:n}=this._config;if(n&&t.includes(n)){const e=t.split(n);for(const t of e.slice(0,-1))this.add(t.trim());this._input.value=e.at(-1)}}_handlePaste(e){const{separator:t}=this._config;if(!t)return;const n=(e.clipboardData||window.clipboardData).getData("text");if(n.includes(t)){e.preventDefault();const s=n.split(t);for(const e of s)this.add(e.trim())}}_createChipFromInput(){const e=this._input.value.trim();e&&(this.add(e),this._input.value="")}};EventHandler.on(document,"DOMContentLoaded.bs.chips.data-api",()=>{for(const e of SelectorEngine.find("[data-bs-chips]"))Chips.getOrCreateInstance(e)});const NAME$7="TemplateFactory",Default$6={allowList:DefaultAllowlist,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},DefaultType$6={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},DefaultContentType={entry:"(string|element|function|null)",selector:"(string|element)"};var TemplateFactory=class extends Config{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Default$6}static get DefaultType(){return DefaultType$6}static get NAME(){return NAME$7}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},DefaultContentType)}_setContent(e,t,n){const s=SelectorEngine.findOne(n,e);s&&((t=this._resolvePossibleFunction(t))?isElement(t)?this._putElementInTemplate(getElement(t),s):this._config.html?s.innerHTML=this._maybeSanitize(t):s.textContent=t:s.remove())}_maybeSanitize(e){return this._config.sanitize?sanitizeHtml(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return execute(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}};const NAME$6="tooltip",DISALLOWED_ATTRIBUTES=new Set(["sanitize","allowList","sanitizeFn"]),ESCAPE_KEY="Escape",CLASS_NAME_MODAL="modal",CLASS_NAME_SHOW$2="show",SELECTOR_TOOLTIP_INNER=".tooltip-inner",SELECTOR_MODAL=".modal",SELECTOR_DATA_TOGGLE$3='[data-bs-toggle="tooltip"]',EVENT_MODAL_HIDE="hide.bs.modal",TRIGGER_HOVER="hover",TRIGGER_FOCUS="focus",TRIGGER_CLICK="click",TRIGGER_MANUAL="manual",EVENT_HIDE$2="hide",EVENT_HIDDEN$2="hidden",EVENT_SHOW$2="show",EVENT_SHOWN$2="shown",EVENT_INSERTED="inserted",EVENT_CLICK$3="click",EVENT_FOCUSIN$2="focusin",EVENT_FOCUSOUT$1="focusout",EVENT_MOUSEENTER$1="mouseenter",EVENT_MOUSELEAVE="mouseleave",EVENT_POINTERDOWN="pointerdown",EVENT_POINTERUP="pointerup",EVENT_KEYDOWN$1="keydown",AttachmentMap={AUTO:"auto",TOP:"top",RIGHT:isRTL()?"left":"right",BOTTOM:"bottom",LEFT:isRTL()?"right":"left"},Default$5={allowList:DefaultAllowlist,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",floatingConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},DefaultType$5={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",floatingConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};var Tooltip=class extends BaseComponent{constructor(e,t){if(void 0===computePosition)throw new TypeError("Bootstrap's tooltips require Floating UI (https://floating-ui.com)");super(e,t),this._isEnabled=!0,this._timeout=0,this._resolveTimeout=null,this._isHovered=null,this._activeTrigger={},this._floatingCleanup=null,this._keydownHandler=null,this._tipEventOut=null,this._outsidePointerHandler=null,this._tipPointerUpHandler=null,this._tipPointerDown=!1,this._templateFactory=null,this._newContent=null,this._mediaQueryListeners=[],this._responsivePlacements=null,this.tip=null,this._parseResponsivePlacements(),this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Default$5}static get DefaultType(){return DefaultType$5}static get NAME(){return NAME$6}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){return this._isEnabled?this._isShown()?this._leave():this._enter():Promise.resolve()}dispose(){this._clearTimeout(),this._removeEscapeListener(),this._removeFocusOutsideListener(),EventHandler.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposeFloating(),this._disposeMediaQueryListeners(),super.dispose()}async show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=EventHandler.trigger(this._element,this.constructor.eventName("show")),t=(findShadowRoot(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return void(this._isHovered=!1);this._disposeFloating();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));let{container:s}=this._config;const i=this._element.closest("dialog[open]");if(i&&s===document.body&&(s=i),this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(n),EventHandler.trigger(this._element,this.constructor.eventName("inserted")),this._setTipListeners(n)),await this._createFloating(n),n.classList.add("show"),this._setEscapeListener(),this._setFocusOutsideListener(),"ontouchstart"in document.documentElement)for(const e of document.body.children)EventHandler.on(e,"mouseover",noop);await this._queueCallback(()=>{EventHandler.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}async hide(){if(this._isShown()&&!EventHandler.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._removeEscapeListener(),this._removeFocusOutsideListener(),this._getTipElement().classList.remove("show"),"ontouchstart"in document.documentElement)for(const e of document.body.children)EventHandler.off(e,"mouseover",noop);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,await this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposeFloating(),this._element.removeAttribute("aria-describedby"),EventHandler.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._floatingCleanup&&this.tip&&this._updateFloatingPosition()}_isWithContent(){return Boolean(this._getTitle())||this._hasNewContent()}_hasNewContent(){return Boolean(this._newContent)&&Object.values(this._newContent).some(Boolean)}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();t.classList.remove("show"),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=getUID(this.constructor.NAME).toString();return t.setAttribute("id",n),this._config.animation||t.classList.add(this._getInstantClassName()),this._setFocusTipListeners(t),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposeFloating(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new TemplateFactory({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[SELECTOR_TOOLTIP_INNER]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_getInstantClassName(){return`${this.constructor.NAME}-instant`}_isAnimated(){return getTransitionDurationFromElement(this.tip)>0}_isShown(){return this.tip&&this.tip.classList.contains("show")}_getPlacement(e){if(this._responsivePlacements){const e=getResponsivePlacement(this._responsivePlacements,"top");return AttachmentMap[e.toUpperCase()]||e}const t=execute(this._config.placement,[this,e,this._element]);return AttachmentMap[t.toUpperCase()]||t}_parseResponsivePlacements(){"string"==typeof this._config.placement?(this._responsivePlacements=parseResponsivePlacement(this._config.placement,"top"),this._responsivePlacements&&this._setupMediaQueryListeners()):this._responsivePlacements=null}_setupMediaQueryListeners(){this._disposeMediaQueryListeners(),this._mediaQueryListeners=createBreakpointListeners(()=>{this._isShown()&&this._updateFloatingPosition()})}_disposeMediaQueryListeners(){disposeBreakpointListeners(this._mediaQueryListeners),this._mediaQueryListeners=[]}async _createFloating(e){const t=this._getPlacement(e),n=e.querySelector(`.${this.constructor.NAME}-arrow`);await this._updateFloatingPosition(e,t,n),this._floatingCleanup=autoUpdate(this._element,e,()=>this._updateFloatingPosition(e,null,n))}async _updateFloatingPosition(e=this.tip,t=null,n=null){if(!e)return;t||(t=this._getPlacement(e)),n||(n=e.querySelector(`.${this.constructor.NAME}-arrow`));const s=this._getFloatingMiddleware(n),i=this._getFloatingConfig(t,s),{x:o,y:r,placement:a,middlewareData:l}=await computePosition(this._element,e,i);if(Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${r}px`}),n&&(n.style.position="absolute"),Manipulator.setDataAttribute(e,"placement",a),n&&l.arrow){const{x:e,y:t}=l.arrow,s=a.startsWith("top")||a.startsWith("bottom");Object.assign(n.style,{left:s&&void 0!==e?`${e}px`:"",top:s||void 0===t?"":`${t}px`,right:"",bottom:""})}}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?({placement:t,rects:n})=>toFloatingOffset(e({placement:t,reference:n.reference,floating:n.floating},this._element)):e}_resolvePossibleFunction(e){return execute(e,[this._element,this._element])}_getFloatingMiddleware(e){const t=this._getOffset(),n=[offset("function"==typeof t?t:toFloatingOffset(t)),flip({fallbackPlacements:this._config.fallbackPlacements}),shift({boundary:"clippingParents"===this._config.boundary?"clippingAncestors":this._config.boundary})];return e&&n.push(arrow({element:e})),n}_getFloatingConfig(e,t){const n={placement:e,middleware:t};return{...n,...execute(this._config.floatingConfig,[void 0,n])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)EventHandler.on(this._element,this.constructor.eventName("click"),this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger.click=!(t._isShown()&&t._activeTrigger.click),t.toggle()});else if("manual"!==t){const[e,n]=this._getTriggerEvents(t);EventHandler.on(this._element,e,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?"focus":"hover"]=!0,t._enter()}),EventHandler.on(this._element,n,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);"focusout"===e.type?t._activeTrigger.focus=t._isInside(e.relatedTarget)||t._tipPointerDown:t._activeTrigger.hover=t._isInside(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},EventHandler.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler)}_setTipListeners(e){const t=this._getTrigger();if("manual"!==t&&!t.includes("click")){this._tipEventOut=e=>{this._activeTrigger["focusout"===e.type?"focus":"hover"]=this._isInside(e.relatedTarget),this._leave()};for(const n of t.split(" "))if("hover"===n||"focus"===n){const[,t]=this._getTriggerEvents(n);EventHandler.on(e,t,this._tipEventOut)}}}_removeTipListeners(e){if(!this._tipEventOut)return;const t=this._getTrigger();for(const n of t.split(" "))if("hover"===n||"focus"===n){const[,t]=this._getTriggerEvents(n);EventHandler.off(e,t,this._tipEventOut)}this._tipEventOut=null}_isInside(e){return e instanceof Node&&(this._element.contains(e)||Boolean(this.tip?.contains(e)))}_getTrigger(){return this._config._trigger}_getTriggerEvents(e){return{[TRIGGER_HOVER]:[this.constructor.eventName("mouseenter"),this.constructor.eventName("mouseleave")],[TRIGGER_FOCUS]:[this.constructor.eventName("focusin"),this.constructor.eventName("focusout")]}[e]}_hasFocusTrigger(){return this._getTrigger().split(" ").includes("focus")}_setFocusTipListeners(e){this._hasFocusTrigger()&&(EventHandler.on(e,this.constructor.eventName("pointerdown"),()=>{this._tipPointerDown=!0,this._activeTrigger.focus=!0}),EventHandler.on(e,this.constructor.eventName("focusin"),()=>{this._activeTrigger.focus=!0}),EventHandler.on(e,this.constructor.eventName("focusout"),e=>{this._activeTrigger.focus=this._isInside(e.relatedTarget)||this._tipPointerDown,this._leave()}))}_setFocusOutsideListener(){if(this._outsidePointerHandler||!this._hasFocusTrigger())return;this._tipPointerUpHandler=()=>{this._tipPointerDown=!1},this._outsidePointerHandler=e=>{this._isShown()&&!this._isInside(e.target)&&(this._activeTrigger.focus=!1,this.hide())};const e=this._element.ownerDocument;e.addEventListener("pointerup",this._tipPointerUpHandler,!0),e.addEventListener("pointerdown",this._outsidePointerHandler,!0)}_removeFocusOutsideListener(){const e=this._element?.ownerDocument;this._tipPointerUpHandler&&e&&e.removeEventListener("pointerup",this._tipPointerUpHandler,!0),this._outsidePointerHandler&&e&&e.removeEventListener("pointerdown",this._outsidePointerHandler,!0),this._tipPointerUpHandler=null,this._outsidePointerHandler=null,this._tipPointerDown=!1}_setEscapeListener(){this._keydownHandler||(this._keydownHandler=e=>{"Escape"===e.key&&this._isShown()&&this.tip.isConnected&&(e.preventDefault(),e.stopPropagation(),this.hide())},this._element.ownerDocument.addEventListener("keydown",this._keydownHandler,!0))}_removeEscapeListener(){this._keydownHandler&&(this._element.ownerDocument.removeEventListener("keydown",this._keydownHandler,!0),this._keydownHandler=null)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){return this._isShown()||this._isHovered?(this._isHovered=!0,Promise.resolve()):(this._isHovered=!0,this._setTimeout(()=>this._isHovered?this.show():void 0,this._config.delay.show))}_leave(){return this._isWithActiveTrigger()?Promise.resolve():(this._isHovered=!1,this._setTimeout(()=>this._isHovered?void 0:this.hide(),this._config.delay.hide))}_setTimeout(e,t){return this._clearTimeout(),new Promise(n=>{this._resolveTimeout=n,this._timeout=setTimeout(()=>{this._resolveTimeout=null,n(e())},t)})}_clearTimeout(){clearTimeout(this._timeout),this._resolveTimeout&&(this._resolveTimeout(),this._resolveTimeout=null)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=Manipulator.getDataAttributes(this._element);for(const e of Object.keys(t))DISALLOWED_ATTRIBUTES.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:getElement(e.container),e._trigger=e._trigger||e.trigger,"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"!=typeof e.title&&"boolean"!=typeof e.title||(e.title=e.title.toString()),"number"!=typeof e.content&&"boolean"!=typeof e.content||(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposeFloating(){this._floatingCleanup&&(this._floatingCleanup(),this._floatingCleanup=null),this.tip&&(this._removeTipListeners(this.tip),EventHandler.off(this.tip,this.constructor.EVENT_KEY),this.tip.remove(),this.tip=null)}};const initTooltip=e=>{const t=e.target.closest(SELECTOR_DATA_TOGGLE$3);t&&Tooltip.getOrCreateInstance(t)};EventHandler.on(document,"focusin",SELECTOR_DATA_TOGGLE$3,initTooltip),EventHandler.on(document,"mouseenter",SELECTOR_DATA_TOGGLE$3,initTooltip);const NAME$5="popover",SELECTOR_TITLE=".popover-header",SELECTOR_CONTENT=".popover-body",SELECTOR_DATA_TOGGLE$2='[data-bs-toggle="popover"]',EVENT_CLICK$2="click",EVENT_FOCUSIN$1="focusin",EVENT_MOUSEENTER="mouseenter",Default$4={...Tooltip.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},DefaultType$4={...Tooltip.DefaultType,content:"(null|string|element|function)"};var Popover=class extends Tooltip{constructor(e,t){super(e,t)}static get Default(){return Default$4}static get DefaultType(){return DefaultType$4}static get NAME(){return NAME$5}_isWithContent(){return Boolean(this._getTitle()||this._getContent())||this._hasNewContent()}_getContentForTemplate(){return{[SELECTOR_TITLE]:this._getTitle(),[SELECTOR_CONTENT]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}};const initPopover=e=>{const t=e.target.closest(SELECTOR_DATA_TOGGLE$2);t&&("click"===e.type&&e.preventDefault(),Popover.getOrCreateInstance(t))};EventHandler.on(document,"click",SELECTOR_DATA_TOGGLE$2,initPopover),EventHandler.on(document,"focusin",SELECTOR_DATA_TOGGLE$2,initPopover),EventHandler.on(document,"mouseenter",SELECTOR_DATA_TOGGLE$2,initPopover);const NAME$4="range",EVENT_KEY$4=".bs.range",DATA_API_KEY$1=".data-api",EVENT_CHANGED="changed.bs.range",EVENT_DOM_CONTENT_LOADED="DOMContentLoaded.bs.range.data-api",EVENT_INPUT="input",EVENT_CHANGE="change",SELECTOR_RANGE=".form-range",SELECTOR_INPUT=".form-range-input",CLASS_NAME_BUBBLE="form-range-bubble",CLASS_NAME_TICKS="form-range-ticks",CLASS_NAME_TICK="form-range-tick",CLASS_NAME_TICK_LABEL="form-range-tick-label",PROPERTY_FILL="--bs-range-fill",Default$3={bubble:!1,formatter:null},DefaultType$3={bubble:"(boolean|null)",formatter:"(function|null)"};var Range=class extends BaseComponent{constructor(e,t){super(e,t),this._element&&(this._input=SelectorEngine.findOne(SELECTOR_INPUT,this._element),this._input&&(this._bubble=null,this._bubbleText=null,this._ticks=null,this._updateHandler=()=>this._update(),this._config.bubble&&this._createBubble(),this._createTicks(),this._addEventListeners(),this._update()))}static get Default(){return Default$3}static get DefaultType(){return DefaultType$3}static get NAME(){return NAME$4}update(){this._update()}dispose(){EventHandler.off(this._input,"input",this._updateHandler),EventHandler.off(this._input,"change",this._updateHandler),this._bubble?.remove(),this._ticks?.remove(),super.dispose()}_configAfterMerge(e){return null===e.bubble&&(e.bubble=!0),e}_addEventListeners(){EventHandler.on(this._input,"input",this._updateHandler),EventHandler.on(this._input,"change",this._updateHandler)}_min(){return""===this._input.min?0:Number.parseFloat(this._input.min)}_max(){return""===this._input.max?100:Number.parseFloat(this._input.max)}_value(){return Number.parseFloat(this._input.value)}_ratio(){const e=this._max()-this._min();return e>0?(this._value()-this._min())/e:0}_update(){this._element.style.setProperty(PROPERTY_FILL,`${this._ratio()}`),this._bubbleText&&(this._bubbleText.textContent=this._format(this._value())),EventHandler.trigger(this._input,EVENT_CHANGED,{value:this._value()})}_format(e){return"function"==typeof this._config.formatter?this._config.formatter(e):String(e)}_createBubble(){this._bubble=document.createElement("output"),this._bubble.className=`${CLASS_NAME_BUBBLE} tooltip bs-tooltip-top show`,this._bubble.setAttribute("aria-hidden","true");const e=document.createElement("div");e.className="tooltip-arrow",this._bubbleText=document.createElement("div"),this._bubbleText.className="tooltip-inner",this._bubble.append(e,this._bubbleText),this._input.insertAdjacentElement("afterend",this._bubble)}_createTicks(){const e=this._input.getAttribute("list"),t=e?document.getElementById(e):null;if(!t)return;const n=this._min(),s=this._max()-n||1,i=[];for(const e of SelectorEngine.find("option",t)){const t=Number.parseFloat(e.value);if(!Number.isNaN(t)){const o=Math.min(Math.max((t-n)/s,0),1);i.push({ratio:o,label:e.label})}}if(0===i.length)return;i.sort((e,t)=>e.ratio-t.ratio),this._ticks=document.createElement("div"),this._ticks.className=CLASS_NAME_TICKS,this._ticks.setAttribute("aria-hidden","true");const o=[0,...i.map(e=>e.ratio),1];this._ticks.style.gridTemplateColumns=o.slice(1).map((e,t)=>e-o[t]+"fr").join(" ");for(const[e,t]of i.entries()){const n=document.createElement("span");if(n.className=CLASS_NAME_TICK,n.style.gridColumnStart=`${e+2}`,t.label){const e=document.createElement("span");e.className=CLASS_NAME_TICK_LABEL,e.textContent=t.label,n.append(e)}this._ticks.append(n)}this._element.append(this._ticks)}};EventHandler.on(document,EVENT_DOM_CONTENT_LOADED,()=>{for(const e of SelectorEngine.find(".form-range"))Range.getOrCreateInstance(e)});const NAME$3="scrollspy",EVENT_KEY$3=".bs.scrollspy",DATA_API_KEY=".data-api",EVENT_ACTIVATE=`activate${EVENT_KEY$3}`,EVENT_CLICK$1=`click${EVENT_KEY$3}`,EVENT_SCROLL=`scroll${EVENT_KEY$3}`,EVENT_SCROLLEND=`scrollend${EVENT_KEY$3}`,EVENT_RESIZE=`resize${EVENT_KEY$3}`,EVENT_LOAD_DATA_API$1=`load${EVENT_KEY$3}.data-api`,CLASS_NAME_MENU_ITEM="menu-item",CLASS_NAME_ACTIVE$1="active",SELECTOR_DATA_SPY='[data-bs-spy="scroll"]',SELECTOR_TARGET_LINKS="[href]",SELECTOR_NAV_LIST_GROUP=".nav, .list-group",SELECTOR_NAV_LINKS=".nav-link",SELECTOR_LINK_ITEMS=".nav-link, .nav-item > .nav-link, .list-group-item",SELECTOR_MENU_TOGGLE$1='[data-bs-toggle="menu"]',SCROLL_IDLE_TIMEOUT=100,RESIZE_DEBOUNCE=100,Default$2={rootMargin:null,smoothScroll:!1,target:null,threshold:[0],topMargin:"12%"},DefaultType$2={rootMargin:"(string|null)",smoothScroll:"boolean",target:"element",threshold:"array",topMargin:"string"};var ScrollSpy=class extends BaseComponent{constructor(e,t){super(e,t),this._sections=[],this._linkBySection=new Map,this._sectionByLink=new Map,this._intersecting=new Set,this._activeTarget=null,this._lastActive=null,this._atBottom=!1,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._observer=null,this._sentinel=null,this._sentinelObserver=null,this._pendingNavigation=null,this._settleTimeout=null,this._settleHandler=null,this._scrollIdleHandler=null,this._resizeHandler=null,this._resizeTimeout=null,this.refresh()}static get Default(){return Default$2}static get DefaultType(){return DefaultType$2}static get NAME(){return NAME$3}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?.disconnect(),this._intersecting.clear(),this._observer=this._getNewObserver();for(const e of this._sections)this._observer.observe(e);this._setUpSentinel(),this._maybeAddResizeListener()}dispose(){this._observer?.disconnect(),this._teardownSentinel(),this._disarmSettle(),this._removeResizeListener(),EventHandler.off(this._config.target,EVENT_CLICK$1),super.dispose()}_configAfterMerge(e){return e.target=getElement(e.target)||document.body,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map(e=>Number.parseFloat(e))),e}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin??this._getDerivedRootMargin()};return new IntersectionObserver(e=>this._onIntersect(e),e)}_onIntersect(e){for(const t of e)t.isIntersecting?this._intersecting.add(t.target):this._intersecting.delete(t.target);this._computeActive()}_computeActive(){if(!this._element?.isConnected||0===this._sections.length)return;let e=null;if(this._atBottom)e=this._sections.at(-1);else{for(const t of this._sections)this._intersecting.has(t)&&(e=t);e||=this._lastActive??this._sections.at(0)}if(!e)return;this._lastActive=e;const t=this._linkBySection.get(e);t&&this._process(t)}_parseTopMargin(){const e=String(this._config.topMargin);return{value:Number.parseFloat(e)||0,unit:e.endsWith("%")?"%":"px"}}_getDerivedRootMargin(){const{value:e,unit:t}=this._parseTopMargin();let n=e;if("px"===t){const t=this._rootElement?this._rootElement.clientHeight:document.documentElement.clientHeight||window.innerHeight;n=t?e/t*100:12}return`0px 0px -${Math.min(Math.max(100-n,0),100)}% 0px`}_usesPixelMargin(){return!this._config.rootMargin&&"px"===this._parseTopMargin().unit}_setUpSentinel(){if(this._teardownSentinel(),0===this._sections.length)return;const e=document.createElement("div");e.setAttribute("aria-hidden","true"),e.style.cssText="position:relative;width:0;height:0;margin:0;padding:0;border:0;visibility:hidden;",this._element.append(e),this._sentinel=e,this._sentinelObserver=new IntersectionObserver(e=>this._onSentinel(e),{root:this._rootElement,threshold:[0]}),this._sentinelObserver.observe(e)}_onSentinel(e){const t=e.at(-1);this._atBottom=Boolean(t?.isIntersecting)&&this._isOverflowing(),this._computeActive()}_isOverflowing(){const e=this._rootElement||document.scrollingElement||document.documentElement;return e.scrollHeight>e.clientHeight}_teardownSentinel(){this._sentinelObserver?.disconnect(),this._sentinelObserver=null,this._sentinel?.remove(),this._sentinel=null,this._atBottom=!1}_maybeAddResizeListener(){this._removeResizeListener(),this._usesPixelMargin()&&(this._resizeHandler=()=>{clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(()=>this._rebuildObserver(),100)},EventHandler.on(window,EVENT_RESIZE,this._resizeHandler))}_removeResizeListener(){clearTimeout(this._resizeTimeout),this._resizeTimeout=null,this._resizeHandler&&(EventHandler.off(window,EVENT_RESIZE,this._resizeHandler),this._resizeHandler=null)}_rebuildObserver(){if(this._observer){this._observer.disconnect(),this._intersecting.clear(),this._observer=this._getNewObserver();for(const e of this._sections)this._observer.observe(e)}}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(EventHandler.off(this._config.target,EVENT_CLICK$1),EventHandler.on(this._config.target,EVENT_CLICK$1,"[href]",e=>{const t=e.target.closest("[href]"),n=t&&this._sectionByLink.get(t);if(!n||!this._element)return;e.preventDefault();const s=this._rootElement||window,i=n.offsetTop-this._element.offsetTop,o=this._rootElement?this._rootElement.scrollTop:window.scrollY??window.pageYOffset;if(matchMedia("(prefers-reduced-motion: reduce)").matches||Math.abs(o-i)<=2)return s.scrollTo?s.scrollTo({top:i,behavior:"auto"}):s.scrollTop=i,void this._settleNavigation(t.hash,n);this._pendingNavigation={hash:t.hash,section:n},this._armSettle(),s.scrollTo?s.scrollTo({top:i,behavior:"smooth"}):s.scrollTop=i}))}_armSettle(){this._disarmSettle();const e=this._getSettleTarget();this._settleHandler=()=>this._onSettle(),this._scrollIdleHandler=()=>{clearTimeout(this._settleTimeout),this._settleTimeout=setTimeout(()=>this._onSettle(),100)},EventHandler.on(e,EVENT_SCROLLEND,this._settleHandler),EventHandler.on(e,EVENT_SCROLL,this._scrollIdleHandler)}_disarmSettle(){clearTimeout(this._settleTimeout),this._settleTimeout=null;const e=this._getSettleTarget();this._settleHandler&&(EventHandler.off(e,EVENT_SCROLLEND,this._settleHandler),this._settleHandler=null),this._scrollIdleHandler&&(EventHandler.off(e,EVENT_SCROLL,this._scrollIdleHandler),this._scrollIdleHandler=null)}_getSettleTarget(){return this._rootElement||document}_onSettle(){if(this._disarmSettle(),!this._pendingNavigation)return;const{hash:e,section:t}=this._pendingNavigation;this._settleNavigation(e,t)}_settleNavigation(e,t){this._pendingNavigation=null,window.history?.replaceState&&window.history.replaceState(null,"",e),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0})}_initializeTargetsAndObservables(){this._sections=[],this._linkBySection=new Map,this._sectionByLink=new Map;const e=SelectorEngine.find("[href]",this._config.target),t=new Set;for(const n of e){if(!n.hash||isDisabled(n))continue;const e=decodeFragment(n.hash.slice(1));if(!e)continue;const s=document.getElementById(e);s&&this._element.contains(s)&&isVisible(s)&&(this._sectionByLink.set(n,s),this._linkBySection.set(s,n),t.has(s)||(t.add(s),this._sections.push(s)))}this._sections.sort((e,t)=>e.getBoundingClientRect().top-t.getBoundingClientRect().top)}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add("active"),this._activateParents(e),EventHandler.trigger(this._element,EVENT_ACTIVATE,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("menu-item")){const t=e.closest(".menu")?.previousElementSibling;return void(t?.matches(SELECTOR_MENU_TOGGLE$1)&&t.classList.add("active"))}for(const t of SelectorEngine.parents(e,".nav, .list-group"))for(const e of SelectorEngine.prev(t,SELECTOR_LINK_ITEMS))e.classList.add("active")}_clearActiveClass(e){e.classList.remove("active");const t=SelectorEngine.find("[href].active",e);for(const e of t)e.classList.remove("active")}};function decodeFragment(e){try{return decodeURIComponent(e)}catch{return e}}EventHandler.on(window,EVENT_LOAD_DATA_API$1,()=>{for(const e of SelectorEngine.find(SELECTOR_DATA_SPY))ScrollSpy.getOrCreateInstance(e)});const NAME$2="tab",EVENT_KEY$2=".bs.tab",EVENT_HIDE$1="hide.bs.tab",EVENT_HIDDEN$1="hidden.bs.tab",EVENT_SHOW$1="show.bs.tab",EVENT_SHOWN$1="shown.bs.tab",EVENT_CLICK_DATA_API="click.bs.tab",EVENT_KEYDOWN="keydown.bs.tab",EVENT_LOAD_DATA_API="load.bs.tab",ARROW_LEFT_KEY="ArrowLeft",ARROW_RIGHT_KEY="ArrowRight",ARROW_UP_KEY="ArrowUp",ARROW_DOWN_KEY="ArrowDown",HOME_KEY="Home",END_KEY="End",CLASS_NAME_ACTIVE="active",CLASS_NAME_SHOW$1="show",SELECTOR_MENU_TOGGLE='[data-bs-toggle="menu"]',SELECTOR_MENU=".menu",NOT_SELECTOR_MENU_TOGGLE=`:not(${SELECTOR_MENU_TOGGLE})`,SELECTOR_TAB_PANEL='.list-group, .nav, [role="tablist"]',SELECTOR_OUTER=".nav-item, .list-group-item",SELECTOR_INNER=`.nav-link${NOT_SELECTOR_MENU_TOGGLE}, .list-group-item${NOT_SELECTOR_MENU_TOGGLE}, [role="tab"]${NOT_SELECTOR_MENU_TOGGLE}`,SELECTOR_DATA_TOGGLE$1='[data-bs-toggle="tab"]',SELECTOR_INNER_ELEM=`${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE$1}`,SELECTOR_DATA_TOGGLE_ACTIVE='.active[data-bs-toggle="tab"]',activationIds=new WeakMap;var Tab=class e extends BaseComponent{constructor(e){if(super(e),this._parent=this._element.closest(SELECTOR_TAB_PANEL),!this._parent)throw new TypeError(`${this._element.outerHTML} has no valid parent ${SELECTOR_TAB_PANEL}`);this._setInitialAttributes(this._parent,this._getChildren()),EventHandler.on(this._element,EVENT_KEYDOWN,e=>this._keydown(e))}static get NAME(){return"tab"}async show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?EventHandler.trigger(t,EVENT_HIDE$1,{relatedTarget:e}):null;if(EventHandler.trigger(e,EVENT_SHOW$1,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented)return;const s=(activationIds.get(this._parent)||0)+1;activationIds.set(this._parent,s),this._deactivate(t,e),await this._activate(e,t,s)}async _activate(e,t,n){if(!e)return;if(e.classList.add("active"),"tab"!==e.getAttribute("role"))return void e.classList.add("show");const s=SelectorEngine.getElementFromSelector(e);this._activate(s),await this._queueCallback(()=>{n===activationIds.get(this._parent)&&this._elemIsActive(e)&&(e.removeAttribute("tabindex"),setAriaAttribute(e,"aria-selected",!0),this._toggleMenu(e,!0),EventHandler.trigger(e,EVENT_SHOWN$1,{relatedTarget:t}))},s??e,getTransitionDurationFromElement(s)>0)}async _deactivate(e,t){e&&(e.classList.remove("active"),e.blur(),"tab"===e.getAttribute("role")?(this._deactivate(SelectorEngine.getElementFromSelector(e)),await this._queueCallback(()=>{setAriaAttribute(e,"aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleMenu(e,!1),EventHandler.trigger(e,EVENT_HIDDEN$1,{relatedTarget:t})},e,!1)):e.classList.remove("show"))}_keydown(t){if(![ARROW_LEFT_KEY,ARROW_RIGHT_KEY,ARROW_UP_KEY,ARROW_DOWN_KEY,HOME_KEY,END_KEY].includes(t.key))return;if(t.altKey||t.ctrlKey||t.metaKey)return;t.stopPropagation(),t.preventDefault();const n=this._getChildren().filter(e=>!isDisabled(e));let s;if([HOME_KEY,END_KEY].includes(t.key))s=t.key===HOME_KEY?n[0]:n.at(-1);else{const e=[ARROW_RIGHT_KEY,ARROW_DOWN_KEY].includes(t.key);s=getNextActiveElement(n,t.target,e,!0)}s&&(s.focus({preventScroll:!0}),e.getOrCreateInstance(s).show())}_getChildren(){return SelectorEngine.find(SELECTOR_INNER_ELEM,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);setAriaAttribute(e,"aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=SelectorEngine.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleMenu(e,t){const n=this._getOuterElement(e),s=SelectorEngine.findOne(SELECTOR_MENU_TOGGLE,n);if(!s)return;const i=SelectorEngine.findOne(".menu",n);s.classList.toggle("active",t),i&&i.classList.toggle("show",t),setAriaAttribute(s,"aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains("active")}_getInnerElement(e){return e.matches(SELECTOR_INNER_ELEM)?e:SelectorEngine.findOne(SELECTOR_INNER_ELEM,e)}_getOuterElement(e){return e.closest(SELECTOR_OUTER)||e}};EventHandler.on(document,"click.bs.tab",SELECTOR_DATA_TOGGLE$1,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),isDisabled(this)||Tab.getOrCreateInstance(this).show()}),EventHandler.on(window,"load.bs.tab",()=>{for(const e of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE))Tab.getOrCreateInstance(e)});const NAME$1="toast",EVENT_KEY$1=".bs.toast",EVENT_MOUSEOVER="mouseover.bs.toast",EVENT_MOUSEOUT="mouseout.bs.toast",EVENT_FOCUSIN="focusin.bs.toast",EVENT_FOCUSOUT="focusout.bs.toast",EVENT_HIDE="hide.bs.toast",EVENT_HIDDEN="hidden.bs.toast",EVENT_SHOW="show.bs.toast",EVENT_SHOWN="shown.bs.toast",CLASS_NAME_INSTANT="toast-instant",CLASS_NAME_SHOW="show",DefaultType$1={autohide:"boolean",delay:"number"},Default$1={autohide:!0,delay:5e3};var Toast=class extends BaseComponent{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Default$1}static get DefaultType(){return DefaultType$1}static get NAME(){return NAME$1}async show(){EventHandler.trigger(this._element,EVENT_SHOW).defaultPrevented||(this._clearTimeout(),this._element.classList.add("show"),await this._queueCallback(()=>{EventHandler.trigger(this._element,EVENT_SHOWN),this._maybeScheduleHide()},this._element,this._isAnimated()))}async hide(){this.isShown()&&(EventHandler.trigger(this._element,EVENT_HIDE).defaultPrevented||(this._element.classList.remove("show"),await this._queueCallback(()=>{EventHandler.trigger(this._element,EVENT_HIDDEN)},this._element,this._isAnimated())))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove("show"),super.dispose()}isShown(){return this._element.classList.contains("show")}_isAnimated(){return!this._element.classList.contains("toast-instant")}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){EventHandler.on(this._element,EVENT_MOUSEOVER,e=>this._onInteraction(e,!0)),EventHandler.on(this._element,EVENT_MOUSEOUT,e=>this._onInteraction(e,!1)),EventHandler.on(this._element,EVENT_FOCUSIN,e=>this._onInteraction(e,!0)),EventHandler.on(this._element,EVENT_FOCUSOUT,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}};enableDismissTrigger(Toast);const NAME="toggler",EVENT_KEY=".bs.toggler",EVENT_TOGGLE=`toggle${EVENT_KEY}`,EVENT_TOGGLED=`toggled${EVENT_KEY}`,EVENT_CLICK="click",SELECTOR_DATA_TOGGLE='[data-bs-toggle="toggler"]',DefaultType={attribute:"string",value:"(string|number|boolean|null)"},Default={attribute:"class",value:null};var Toggler=class extends BaseComponent{static get Default(){return Default}static get DefaultType(){return DefaultType}static get NAME(){return NAME}toggle(){EventHandler.trigger(this._element,EVENT_TOGGLE).defaultPrevented||(this._execute(),EventHandler.trigger(this._element,EVENT_TOGGLED))}_execute(){const{attribute:e,value:t}=this._config;"id"!==e&&null!=t&&("class"!==e?this._element.getAttribute(e)!==String(t)?this._element.setAttribute(e,t):this._element.removeAttribute(e):this._element.classList.toggle(t))}};eventActionOnPlugin(Toggler,"click",SELECTOR_DATA_TOGGLE,"toggle");export{Alert,Button,Carousel,Chips,Collapse,Combobox,Datepicker,Dialog,Drawer,Menu,NavOverflow,OtpInput,Popover,Range,ScrollSpy,Strength,Tab,Toast,Toggler,Tooltip}; |