django-bootstrap6-admin 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_bootstrap6_admin/__init__.py +3 -0
- django_bootstrap6_admin/apps.py +13 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/css/admin.css +3530 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/css/widgets-overrides.css +47 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/js/admin.js +360 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/js/theme.js +108 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/LICENSE +21 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/css/bootstrap.min.css +2 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/js/bootstrap.bundle.min.js +9 -0
- django_bootstrap6_admin/templates/admin/404.html +17 -0
- django_bootstrap6_admin/templates/admin/500.html +31 -0
- django_bootstrap6_admin/templates/admin/actions.html +40 -0
- django_bootstrap6_admin/templates/admin/app_index.html +43 -0
- django_bootstrap6_admin/templates/admin/app_list.html +59 -0
- django_bootstrap6_admin/templates/admin/auth/user/add_form.html +11 -0
- django_bootstrap6_admin/templates/admin/auth/user/change_password.html +105 -0
- django_bootstrap6_admin/templates/admin/base.html +220 -0
- django_bootstrap6_admin/templates/admin/base_site.html +19 -0
- django_bootstrap6_admin/templates/admin/change_form.html +124 -0
- django_bootstrap6_admin/templates/admin/change_form_object_tools.html +14 -0
- django_bootstrap6_admin/templates/admin/change_list.html +179 -0
- django_bootstrap6_admin/templates/admin/change_list_object_tools.html +10 -0
- django_bootstrap6_admin/templates/admin/change_list_results.html +42 -0
- django_bootstrap6_admin/templates/admin/color_theme_toggle.html +15 -0
- django_bootstrap6_admin/templates/admin/date_hierarchy.html +27 -0
- django_bootstrap6_admin/templates/admin/delete_confirmation.html +89 -0
- django_bootstrap6_admin/templates/admin/delete_selected_confirmation.html +81 -0
- django_bootstrap6_admin/templates/admin/edit_inline/stacked.html +67 -0
- django_bootstrap6_admin/templates/admin/edit_inline/tabular.html +94 -0
- django_bootstrap6_admin/templates/admin/filter.html +17 -0
- django_bootstrap6_admin/templates/admin/includes/fieldset.html +54 -0
- django_bootstrap6_admin/templates/admin/includes/object_delete_summary.html +7 -0
- django_bootstrap6_admin/templates/admin/index.html +136 -0
- django_bootstrap6_admin/templates/admin/login.html +99 -0
- django_bootstrap6_admin/templates/admin/nav_sidebar.html +21 -0
- django_bootstrap6_admin/templates/admin/object_history.html +81 -0
- django_bootstrap6_admin/templates/admin/pagination.html +18 -0
- django_bootstrap6_admin/templates/admin/search_form.html +28 -0
- django_bootstrap6_admin/templates/admin/submit_line.html +35 -0
- django_bootstrap6_admin/templates/admin/widgets/foreign_key_raw_id.html +14 -0
- django_bootstrap6_admin/templates/admin/widgets/related_widget_wrapper.html +49 -0
- django_bootstrap6_admin/templates/registration/logged_out.html +32 -0
- django_bootstrap6_admin/templates/registration/password_change_done.html +30 -0
- django_bootstrap6_admin/templates/registration/password_change_form.html +74 -0
- django_bootstrap6_admin/templatetags/__init__.py +0 -0
- django_bootstrap6_admin/templatetags/bootstrap6_admin.py +38 -0
- django_bootstrap6_admin-0.1.0.dist-info/METADATA +262 -0
- django_bootstrap6_admin-0.1.0.dist-info/RECORD +52 -0
- django_bootstrap6_admin-0.1.0.dist-info/WHEEL +5 -0
- django_bootstrap6_admin-0.1.0.dist-info/licenses/LICENSE +21 -0
- django_bootstrap6_admin-0.1.0.dist-info/licenses/NOTICE +48 -0
- django_bootstrap6_admin-0.1.0.dist-info/top_level.txt +1 -0
django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/js/bootstrap.bundle.min.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Bootstrap v6.0.0-alpha.1 (https://getbootstrap.com/)
|
|
3
|
+
* Copyright 2011-2026 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
|
+
*/
|
|
6
|
+
const elementMap=new Map;var data_default={set(e,t,n){elementMap.has(e)||elementMap.set(e,new Map);const i=elementMap.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${[...i.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 i=n in customEvents;return function s(o){const a=hydrateObj(o,{delegateTarget:e});if(!i||!isMouseEventWithinTarget(a))return s.oneOff&&EventHandler.off(e,n,t),t.apply(e,[a])}}function bootstrapDelegationHandler(e,t,n,i){const s=i in customEvents;return function o(a){const l=e.querySelectorAll(t);for(let{target:r}=a;r&&r!==this;r=r.parentNode)for(const c of l){if(c!==r)continue;const l=hydrateObj(a,{delegateTarget:r});if(s&&isMouseEventWithinTarget(l))return;return o.oneOff&&EventHandler.off(e,i,t,n),n.apply(r,[l])}}}function findHandler(e,t,n,i=null){return Object.values(e).find(e=>e.callable===t&&e.handlerTypeEvent===n&&e.delegationSelector===i)}function normalizeParameters(e,t,n){const i="string"==typeof t,s=i?n:t||n,o=e.replace(stripNameRegex,"");let a=customEvents[o]||o;return nativeEvents.has(a)||(a=e),{isDelegated:i,callable:s,typeEvent:a,handlerTypeEvent:o in customEvents?o:a}}function addHandler(e,t,n,i,s){if("string"!=typeof t||!e)return;const{isDelegated:o,callable:a,typeEvent:l,handlerTypeEvent:r}=normalizeParameters(t,n,i),c=getElementEvents(e),u=c[l]||(c[l]={}),d=findHandler(u,a,r,o?n:null);if(d)return void(d.oneOff=d.oneOff&&s);const h=makeEventUid(a,t.replace(namespaceRegex,"")),_=o?bootstrapDelegationHandler(e,n,a,r):bootstrapHandler(e,a,r);_.delegationSelector=o?n:null,_.callable=a,_.handlerTypeEvent=r,_.oneOff=s,_.uidEvent=h,u[h]=_,e.addEventListener(l,_,o)}function removeHandler(e,t,n,i){e.removeEventListener(n,i,Boolean(i.delegationSelector)),delete t[n][i.uidEvent]}function removeNamespacedHandlers(e,t,n,i){const s=t[n]||{};for(const[o,a]of Object.entries(s))o.includes(i)&&removeHandler(e,t,n,a)}function trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=hydrateObj(new Event(t,{bubbles:!0,cancelable:!0}),n);return e.dispatchEvent(i),i}const EventHandler={on(e,t,n,i){addHandler(e,t,n,i,!1)},one(e,t,n,i){addHandler(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const{isDelegated:s,callable:o,typeEvent:a,handlerTypeEvent:l}=normalizeParameters(t,n,i),r=a!==t&&l!==t,c=getElementEvents(e),u=c[a]||{},d=t.startsWith(".");if(void 0!==o){if(!Object.keys(u).length)return;const t=findHandler(u,o,l,s?n:null);return void(t&&removeHandler(e,c,a,t))}if(d)for(const n of Object.keys(c))removeNamespacedHandlers(e,c,n,t.slice(1));for(const[n,i]of Object.entries(u)){const s=n.replace(stripUidRegex,"");i.handlerTypeEvent!==l||r&&!t.includes(s)||removeHandler(e,c,a,i)}},trigger:trigger};function hydrateObj(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch{Object.defineProperty(e,n,{configurable:!0,get:()=>i})}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 i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=normalizeData(e.dataset[i])}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$1=e=>!(!e||"object"!=typeof e)&&void 0!==e.nodeType,getElement=e=>isElement$1(e)?e:"string"==typeof e&&e.length>0?document.querySelector(parseSelector(e)):null,isVisible=e=>{if(!isElement$1(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$1=()=>"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 i=getTransitionDurationFromElement(t)+5;let s=!1;const o=({target:n})=>{n===t&&(s=!0,t.removeEventListener(TRANSITION_END,o),execute(e))};t.addEventListener(TRANSITION_END,o),setTimeout(()=>{s||triggerTransitionEnd(t)},i)},getNextActiveElement=(e,t,n,i)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[s-1]:e[0]:(o+=n?1:-1,i&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-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$1(t)?Manipulator.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...isElement$1(t)?Manipulator.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,i]of Object.entries(t)){const t=e[n],s=isElement$1(t)?"element":toType(t);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${s}" but expected type "${i}".`)}}};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(i=>{executeAfterTransition(()=>{this._element&&e(),i()},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 i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.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}`,i=e.NAME;EventHandler.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),isDisabled(this))return;const s=SelectorEngine.getElementFromSelector(this)||this.closest(`.${i}, [class*=":${i}"]`);e.getOrCreateInstance(s)[t]()})},eventActionOnPlugin=(e,t,n,i,s=null)=>{eventAction(`${t}.${e.NAME}`,n,t=>{const n=t.targets.filter(Boolean).map(t=>e.getOrCreateInstance(t));"function"==typeof s&&s({...t,instances:n});for(const e of n)e[i]()})},eventAction=(e,t,n)=>{const i=`${t}:not(.disabled):not(:disabled)`;EventHandler.on(document,e,i,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 i=this._normalizeIndex(n,t.length),s=this._navIndex();null!==i&&i!==s&&(EventHandler.trigger(this._element,EVENT_SLIDE,{relatedTarget:t[i],direction:this._direction(s,i),from:s,to:i}).defaultPrevented||(this._isFade()?this._fadeTo(i):this._scrollToIndex(i)))}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 i=this._activeIndex;n>0&&(i=t.findIndex(e=>e>=n-.05)),this._setActive(i),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,i]of this._getItems().entries()){const s=Math.abs(this._scrollDelta(i));s<t&&(t=s,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 i=this._viewport.scrollLeft+n;this._viewport.style.scrollSnapType="none",this._animateScroll(i,()=>{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,i=e-n;if(this._prefersReducedMotion()||"undefined"==typeof requestAnimationFrame)return this._viewport.scrollTo({left:e,behavior:"instant"}),void t();let s=null;const o=a=>{null===s&&(s=a);const l=Math.min((a-s)/300,1);this._viewport.scrollTo({left:n+i*easeInOutCubic(l),behavior:"instant"}),l<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 i=Number.parseFloat(getComputedStyle(this._viewport).scrollPaddingInlineStart)||0;return isRTL$1()?n.right-(t.right-i):n.left-(t.left+i)}_loopTransition(e){const t=this._getItems(),n=t.length-1,i=this._activeIndex,s=e?0:n,o=this._loopDirection(e);if(EventHandler.trigger(this._element,EVENT_SLIDE,{relatedTarget:t[s],direction:o,from:i,to:s}).defaultPrevented)return;this._looping=!0;const a=(e?t[0]:t[n]).cloneNode(!0);a.classList.add(CLASS_NAME_CLONE),a.classList.remove("active"),a.removeAttribute("id");for(const e of SelectorEngine.find("[id]",a))e.removeAttribute("id");a.setAttribute("aria-hidden","true"),a.inert=!0,this._viewport.style.scrollSnapType="none",e?this._viewport.append(a):(this._viewport.prepend(a),this._jumpScroll(this._scrollDelta(t[i]))),this._animateScroll(this._viewport.scrollLeft+this._scrollDelta(a),()=>{a.remove(),this._jumpScroll(this._scrollDelta(t[s])),this._activeIndex=s,this._refreshActiveState(),EventHandler.trigger(this._element,EVENT_SLID,{relatedTarget:t[s],direction:o,from:i,to:s}),this._viewport.style.scrollSnapType="",this._looping=!1})}_loopDirection(e){return isRTL$1()?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,i;if(t>0){const s=Math.abs(e.scrollLeft);n=s<=1,i=s>=t-1}else{const e=this._getItems().length-1;n=this._activeIndex<=0,i=this._activeIndex>=e}this._setControlsDisabled(this._prevControls,n),this._setControlsDisabled(this._nextControls,i)}_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$1()?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 i=this.getAttribute("data-bs-slide-to");i?n.to(i):"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 min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function clamp(e,t,n){return max(e,min(t,n))}function evaluate(e,t){return"function"==typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){void 0===n&&(n=!1);const i=getAlignment(e),s=getAlignmentAxis(e),o=getAxisLength(s);let a="x"===s?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=getOppositePlacement(a)),[a,getOppositePlacement(a)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e,t,n){switch(e){case"top":case"bottom":return n?t?rlPlacement:lrPlacement:t?lrPlacement:rlPlacement;case"left":case"right":return t?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e,t,n,i){const s=getAlignment(e);let o=getSideList(getSide(e),"start"===n,i);return s&&(o=o.map(e=>e+"-"+s),t&&(o=o.concat(o.map(getOppositeAlignmentPlacement)))),o}function getOppositePlacement(e){const t=getSide(e);return oppositeSideMap[t]+e.slice(t.length)}function expandPaddingObject(e){var t,n,i,s;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(i=e.bottom)?i:0,left:null!=(s=e.left)?s:0}}function getPaddingObject(e){return"number"!=typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:i,floating:s}=e;const o=getSideAxis(t),a=getAlignmentAxis(t),l=getAxisLength(a),r=getSide(t),c="y"===o,u=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,h=i[l]/2-s[l]/2;let _;switch(r){case"top":_={x:u,y:i.y-s.height};break;case"bottom":_={x:u,y:i.y+i.height};break;case"right":_={x:i.x+i.width,y:d};break;case"left":_={x:i.x-s.width,y:d};break;default:_={x:i.x,y:i.y}}const m=getAlignment(t);return m&&(_[a]+=h*("end"===m?1:-1)*(n&&c?-1:1)),_}async function detectOverflow(e,t){var n;void 0===t&&(t={});const{x:i,y:s,platform:o,rects:a,elements:l,strategy:r}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:_=0}=evaluate(t,e),m=getPaddingObject(_),g=l[h?"floating"===d?"reference":"floating":d],p=rectToClientRect(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:r})),E="floating"===d?{x:i,y:s,width:a.floating.width,height:a.floating.height}:a.reference,f=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),v=await(null==o.isElement?void 0:o.isElement(f))&&await(null==o.getScale?void 0:o.getScale(f))||{x:1,y:1},T=rectToClientRect(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:f,strategy:r}):E);return{top:(p.top-T.top+m.top)/v.y,bottom:(T.bottom-p.bottom+m.bottom)/v.y,left:(p.left-T.left+m.left)/v.x,right:(T.right-p.right+m.right)/v.x}}const MAX_RESET_COUNT=50,computePosition$1=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:detectOverflow},r=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=computeCoordsFromPlacement(c,i,r),h=i,_=0;const m={};for(let n=0;n<o.length;n++){const g=o[n];if(!g)continue;const{name:p,fn:E}=g,{x:f,y:v,data:T,reset:b}=await E({x:u,y:d,initialPlacement:i,placement:h,strategy:s,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=f?f:u,d=null!=v?v:d,m[p]={...m[p],...T},b&&_<50&&(_++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:s}):b.rects),({x:u,y:d}=computeCoordsFromPlacement(c,h,r))),n=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:m}},arrow$1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:o,platform:a,elements:l,middlewareData:r}=t,{element:c,padding:u=0}=evaluate(e,t)||{};if(null==c)return{};const d=getPaddingObject(u),h={x:n,y:i},_=getAlignmentAxis(s),m=getAxisLength(_),g=await a.getDimensions(c),p="y"===_,E=p?"top":"left",f=p?"bottom":"right",v=p?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[_]-h[_]-o.floating[m],b=h[_]-o.reference[_],y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let A=y?y[v]:0;A&&await(null==a.isElement?void 0:a.isElement(y))||(A=l.floating[v]||o.floating[m]);const S=T/2-b/2,N=A/2-g[m]/2-1,w=min(d[E],N),C=min(d[f],N),D=A-g[m]-C,x=A/2-g[m]/2+S,O=clamp(w,x,D),L=!r.arrow&&null!=getAlignment(s)&&x!==O&&o.reference[m]/2-(x<w?w:C)-g[m]/2<0,M=L?x<w?x-w:x-D:0;return{[_]:h[_]+M,data:{[_]:O,centerOffset:x-O-M,...L&&{alignmentOffset:M}},reset:L}}}),flip$1=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:o,rects:a,initialPlacement:l,platform:r,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...p}=evaluate(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const E=getSide(s),f=getSideAxis(l),v=getSide(l)===l,T=await(null==r.isRTL?void 0:r.isRTL(c.floating)),b=h||(v||!g?[getOppositePlacement(l)]:getExpandedPlacements(l)),y="none"!==m;!h&&y&&b.push(...getOppositeAxisPlacements(l,g,m,T));const A=[l,...b],S=await r.detectOverflow(t,p),N=[];let w=(null==(i=o.flip)?void 0:i.overflows)||[];if(u&&N.push(S[E]),d){const e=getAlignmentSides(s,a,T);N.push(S[e[0]],S[e[1]])}if(w=[...w,{placement:s,overflows:N}],!N.every(e=>e<=0)){var C,D;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=A[e];if(t&&("alignment"!==d||f===getSideAxis(t)||w.every(e=>getSideAxis(e.placement)!==f||e.overflows[0]>0)))return{data:{index:e,overflows:w},reset:{placement:t}};let n=null==(D=w.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:D.placement;if(!n)switch(_){case"bestFit":{var x;const e=null==(x=w.filter(e=>{if(y){const t=getSideAxis(e.placement);return t===f||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:x[0];e&&(n=e);break}case"initialPlacement":n=l}if(s!==n)return{reset:{placement:n}}}return{}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:n,platform:i,elements:s}=e,o=await(null==i.isRTL?void 0:i.isRTL(s.floating)),a=getSide(n),l=getAlignment(n),r="y"===getSideAxis(n),c=originSides.has(a)?-1:1,u=o&&r?-1:1,d=evaluate(t,e);let{mainAxis:h,crossAxis:_,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(_="end"===l?-1*m:m),r?{x:_*u,y:h*c}:{x:h*c,y:_*u}}const offset$1=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:o,placement:a,middlewareData:l}=t,r=await convertValueToCoords(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(i=l.arrow)&&i.alignmentOffset?{}:{x:s+r.x,y:o+r.y,data:{...r,placement:a}}}}},shift$1=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s,platform:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:r={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=evaluate(e,t),u={x:n,y:i},d=await o.detectOverflow(t,c),h=getSideAxis(s),_=getOppositeAxis(h);let m=u[_],g=u[h];const p=(e,t)=>clamp(t+d["y"===e?"top":"left"],t,t-d["y"===e?"bottom":"right"]);a&&(m=p(_,m)),l&&(g=p(h,g));const E=r.fn({...t,[_]:m,[h]:g});return{...E,data:{x:E.x-n,y:E.y-i,enabled:{[_]:a,[h]:l}}}}}};function hasWindow(){return"undefined"!=typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!(!hasWindow()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&"inline"!==s&&"contents"!==s}function isTableElement(e){return/^(table|td|th)$/.test(getNodeName(e))}function isTopLayer(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const willChangeRe=/transform|translate|scale|rotate|perspective|filter/,containRe=/paint|layout|strict|content/,isNotNone=e=>!!e&&"none"!==e;let isWebKitValue;function isContainingBlock(e){const t=isElement(e)?getComputedStyle$1(e):e;return isNotNone(t.transform)||isNotNone(t.translate)||isNotNone(t.scale)||isNotNone(t.rotate)||isNotNone(t.perspective)||!isWebKit()&&(isNotNone(t.backdropFilter)||isNotNone(t.filter))||willChangeRe.test(t.willChange||"")||containRe.test(t.contain||"")}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return null==isWebKitValue&&(isWebKitValue="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),isWebKitValue}function isLastTraversableNode(e){return/^(html|body|#document)$/.test(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?(e.ownerDocument||e).body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const s=getNearestOverflowAncestor(e),o=s===(null==(i=e.ownerDocument)?void 0:i.body),a=getWindow(s);if(o){const e=getFrameElement(a);return t.concat(a,a.visualViewport||[],isOverflowElement(s)?s:[],e&&n?getOverflowAncestors(e):[])}return t.concat(s,getOverflowAncestors(s,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=isHTMLElement(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:i,l=round(n)!==o||round(i)!==a;return l&&(n=o,i=a),{width:n,height:i,$:l}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:o}=getCssDimensions(t);let a=(o?round(n.width):n.width)/i,l=(o?round(n.height):n.height)/s;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==getWindow(e))&&t}function getBoundingClientRect(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect(),o=unwrapElement(e);let a=createCoords(1);t&&(i?isElement(i)&&(a=getScale(i)):a=getScale(e));const l=shouldAddVisualOffsets(o,n,i)?getVisualOffsets(o):createCoords(0);let r=(s.left+l.x)/a.x,c=(s.top+l.y)/a.y,u=s.width/a.x,d=s.height/a.y;if(o){const e=getWindow(o),t=i&&isElement(i)?getWindow(i):i;let n=e,s=getFrameElement(n);for(;s&&i&&t!==n;){const e=getScale(s),t=s.getBoundingClientRect(),i=getComputedStyle$1(s),o=t.left+(s.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.top+(s.clientTop+parseFloat(i.paddingTop))*e.y;r*=e.x,c*=e.y,u*=e.x,d*=e.y,r+=o,c+=a,n=getWindow(s),s=getFrameElement(n)}}return rectToClientRect({width:u,height:d,x:r,y:c})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-getWindowScrollBarX(e,n),y:n.top+t.scrollTop}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const o="fixed"===s,a=getDocumentElement(i),l=!!t&&isTopLayer(t.floating);if(i===a||l&&o)return n;let r={scrollLeft:0,scrollTop:0},c=createCoords(1);const u=createCoords(0),d=isHTMLElement(i);if((d||!d&&!o)&&(("body"!==getNodeName(i)||isOverflowElement(a))&&(r=getNodeScroll(i)),d)){const e=getBoundingClientRect(i);c=getScale(i),u.x=e.x+i.clientLeft,u.y=e.y+i.clientTop}const h=!a||d||o?createCoords(0):getHTMLOffset(a,r);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-r.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-r.scrollTop*c.y+u.y+h.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),i=e.ownerDocument.body,s=max(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=max(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+getWindowScrollBarX(e);const l=-n.scrollTop;return"rtl"===getComputedStyle$1(i).direction&&(a+=max(t.clientWidth,i.clientWidth)-s),{width:s,height:o,x:a,y:l}}const SCROLLBAR_MAX=25;function getViewportRect(e,t){const n=getWindow(e),i=getDocumentElement(e),s=n.visualViewport;let o=i.clientWidth,a=i.clientHeight,l=0,r=0;if(s){o=s.width,a=s.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(l=s.offsetLeft,r=s.offsetTop)}const c=getWindowScrollBarX(i);if(c<=0){const e=i.ownerDocument,t=e.body,n=getComputedStyle(t),s="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(i.clientWidth-t.clientWidth-s);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:l,y:r}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,"fixed"===t),i=n.top+e.clientTop,s=n.left+e.clientLeft,o=isHTMLElement(e)?getScale(e):createCoords(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:s*o.x,y:i*o.y}}function getClientRectFromClippingAncestor(e,t,n){let i;if("viewport"===t)i=getViewportRect(e,n);else if("document"===t)i=getDocumentRect(getDocumentElement(e));else if(isElement(t))i=getInnerBoundingClientRect(t,n);else{const n=getVisualOffsets(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return!(n===t||!isElement(n)||isLastTraversableNode(n))&&("fixed"===getComputedStyle$1(n).position||hasFixedPositionAncestor(n,t))}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let i=getOverflowAncestors(e,[],!1).filter(e=>isElement(e)&&"body"!==getNodeName(e)),s=null;const o="fixed"===getComputedStyle$1(e).position;let a=o?getParentNode(e):e;for(;isElement(a)&&!isLastTraversableNode(a);){const t=getComputedStyle$1(a),n=isContainingBlock(a);n||"fixed"!==t.position||(s=null),(o?!n&&!s:!n&&"static"===t.position&&s&&("absolute"===s.position||"fixed"===s.position)||isOverflowElement(a)&&!n&&hasFixedPositionAncestor(e,a))?i=i.filter(e=>e!==a):s=t,a=getParentNode(a)}return t.set(e,i),i}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const o=[..."clippingAncestors"===n?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),i],a=getClientRectFromClippingAncestor(t,o[0],s);let l=a.top,r=a.right,c=a.bottom,u=a.left;for(let e=1;e<o.length;e++){const n=getClientRectFromClippingAncestor(t,o[e],s);l=max(n.top,l),r=min(n.right,r),c=min(n.bottom,c),u=max(n.left,u)}return{width:r-u,height:c-l,x:u,y:l}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const i=isHTMLElement(t),s=getDocumentElement(t),o="fixed"===n,a=getBoundingClientRect(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const r=createCoords(0);function c(){r.x=getWindowScrollBarX(s)}if(i||!i&&!o)if(("body"!==getNodeName(t)||isOverflowElement(s))&&(l=getNodeScroll(t)),i){const e=getBoundingClientRect(t,!0,o,t);r.x=e.x+t.clientLeft,r.y=e.y+t.clientTop}else s&&c();o&&!i&&s&&c();const u=!s||i||o?createCoords(0):getHTMLOffset(s,l);return{x:a.left+l.scrollLeft-r.x-u.x,y:a.top+l.scrollTop-r.y-u.y,width:a.width,height:a.height}}function isStaticPositioned(e){return"static"===getComputedStyle$1(e).position}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||"fixed"===getComputedStyle$1(e).position)return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement(e)){let t=getParentNode(e);for(;t&&!isLastTraversableNode(t);){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return n}let i=getTrueOffsetParent(e,t);for(;i&&isTableElement(i)&&isStaticPositioned(i);)i=getTrueOffsetParent(i,t);return i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)?n:i||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,i=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return"rtl"===getComputedStyle$1(e).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement,getClippingRect:getClippingRect,getOffsetParent:getOffsetParent,getElementRects:getElementRects,getClientRects:getClientRects,getDimensions:getDimensions,getScale:getScale,isElement:isElement,isRTL:isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n,i=null;const s=getDocumentElement(e);function o(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}return function a(l,r){void 0===l&&(l=!1),void 0===r&&(r=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:_}=c;if(l||t(),!h||!_)return;const m={rootMargin:-floor(d)+"px "+-floor(s.clientWidth-(u+h))+"px "+-floor(s.clientHeight-(d+_))+"px "+-floor(u)+"px",threshold:max(0,min(1,r))||1};let g=!0;function p(t){const i=t[0].intersectionRatio;if(i!==r){if(!g)return a();i?a(!1,i):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==i||rectsAreEqual(c,e.getBoundingClientRect())||a(),g=!1}try{i=new IntersectionObserver(p,{...m,root:s.ownerDocument})}catch(e){i=new IntersectionObserver(p,m)}i.observe(e)}(!0),o}function autoUpdate(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:r=!1}=i,c=unwrapElement(e),u=s||o?[...c?getOverflowAncestors(c):[],...t?getOverflowAncestors(t):[]]:[];u.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});const d=c&&l?observeMove(c,n):null;let h,_=-1,m=null;a&&(m=new ResizeObserver(e=>{let[i]=e;i&&i.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!r&&m.observe(c),t&&m.observe(t));let g=r?getBoundingClientRect(e):null;return r&&function t(){const i=getBoundingClientRect(e);g&&!rectsAreEqual(g,i)&&n(),g=i,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{s&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),d?.(),null==(e=m)||e.disconnect(),m=null,r&&cancelAnimationFrame(h)}}const offset=offset$1,shift=shift$1,flip=flip$1,arrow=arrow$1,computePosition=(e,t,n)=>{const i=new Map,s={platform:platform,...n},o={...s.platform,_c:i};return computePosition$1(e,t,{...s,platform:o})},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+/),i={xs:t};for(const e of n)if(e.includes(":")){const[t,n]=e.split(":");void 0!==BREAKPOINTS[t]&&(i[t]=n)}else i.xs=e;return i},getResponsivePlacement=(e,t="bottom")=>{if(!e)return t;const n=window.innerWidth;let i=e.xs||t;for(const t of["sm","md","lg","xl","2xl"])n>=BREAKPOINTS[t]&&e[t]&&(i=e[t]);return i},createBreakpointListeners=e=>{const t=[];for(const n of Object.keys(BREAKPOINTS)){const i=BREAKPOINTS[n],s=window.matchMedia(`(min-width: ${i}px)`);s.addEventListener("change",e),t.push({mql:s,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$1()?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){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$1(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$1(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$1(this._config.reference)?getElement(this._config.reference):"object"==typeof this._config.reference?this._config.reference:this._element);const t=this._getPlacement(),n=this._getFloatingMiddleware(),i=this._getFloatingConfig(t,n);await this._applyFloatingPosition(e,this._menu,i.placement,i.middleware,i.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,i,s="absolute"){if(!t.isConnected)return null;const{x:o,y:a,placement:l}=await computePosition(e,t,{placement:n,middleware:i,strategy:s});return t.isConnected?(Object.assign(t.style,{position:s,left:`${o}px`,top:`${a}px`,margin:"0"}),Manipulator.setDataAttribute(t,"placement",l),l):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"),i=SelectorEngine.findOne(".menu",n);i&&(this._cancelSubmenuCloseTimeout(i),this._closeSiblingSubmenus(n),this._openSubmenu(t,i,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"),i=SelectorEngine.findOne(".menu",n);i&&(this._openSubmenus.has(i)?this._closeSubmenu(i,n):(this._closeSiblingSubmenus(n),this._openSubmenu(t,i,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 i=this._createSubmenuFloating(e,t,n);this._openSubmenus.set(t,i),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 i=SelectorEngine.findOne(".submenu > .menu-item",t),s=this._openSubmenus.get(e);s&&s(),this._openSubmenus.delete(e),EventHandler.off(e,"mouseenter"),i&&i.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 i=n,s=resolveLogicalPlacement("end-start"),o=[offset({mainAxis:0,crossAxis:-4}),flip({fallbackPlacements:[resolveLogicalPlacement("start-start"),resolveLogicalPlacement("end-end"),resolveLogicalPlacement("start-end")]}),shift({padding:8})],a=()=>this._applyFloatingPosition(i,t,s,o).then(e=>(t.style.opacity="",e));return a(),autoUpdate(i,t,a)}_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(),i={x:e.clientX,y:e.clientY},s={x:this._hoverIntentData.x,y:this._hoverIntentData.y},o=isRTL$1()?n.right:n.left,a={x:o,y:n.top},l={x:o,y:n.bottom};return this._pointInTriangle(i,s,a,l)}_pointInTriangle(e,t,n,i){const s=triangleSign(e,t,n),o=triangleSign(e,n,i),a=triangleSign(e,i,t);return!((s<0||o<0||a<0)&&(s>0||o>0||a>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,i=this._getItemsInMenu(n);if(!i.length)return;const s=getNextActiveElement(i,t,e===ARROW_DOWN_KEY$2,!i.includes(t));s.focus(),this._closeUnrelatedSubmenus(n,s)}_closeUnrelatedSubmenus(e,t){for(const[n]of this._openSubmenus){const i=n.closest(".submenu");i&&i.parentElement===e&&!i.contains(t)&&this._closeSubmenu(n,i)}}_handleSubmenuKeydown(e){const{key:t,target:n}=e,i=isRTL$1(),s=i?ARROW_LEFT_KEY$1:ARROW_RIGHT_KEY$1,o=i?ARROW_RIGHT_KEY$1:ARROW_LEFT_KEY$1,a=n.closest(".submenu"),l=n.matches(".submenu > .menu-item");if((t===ENTER_KEY$1||t===SPACE_KEY$1||t===s)&&a&&l){e.preventDefault(),e.stopPropagation();const t=SelectorEngine.findOne(".menu",a);return t&&(this._closeSiblingSubmenus(a),this._openSubmenu(n,t,a),requestAnimationFrame(()=>{const e=SelectorEngine.findOne(SELECTOR_VISIBLE_ITEMS$1,t);e&&e.focus()})),!0}if(t===o){const t=n.closest(".menu"),i=t?.closest(".submenu");if(i){e.preventDefault(),e.stopPropagation();const n=SelectorEngine.findOne(".submenu > .menu-item",i);return this._closeSubmenu(t,i),n&&n.focus(),!0}}if(t===HOME_KEY$2||t===END_KEY$2){e.preventDefault(),e.stopPropagation();const i=n.closest(".menu"),s=this._getItemsInMenu(i);if(s.length){const e=t===HOME_KEY$2?s[0]:s.at(-1);e.focus(),this._closeUnrelatedSubmenus(i,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(),i=e.includes(n._menu);if(e.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;const s=t.target.closest?.("form"),o=Boolean(s)&&n._menu.contains(s);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 a={relatedTarget:n._element};"click"===t.type&&(a.clickEvent=t),n._completeHide(a)}}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,i="Escape"===t.key,s=[ARROW_UP_KEY$2,ARROW_DOWN_KEY$2].includes(t.key),o=[ARROW_LEFT_KEY$1,ARROW_RIGHT_KEY$1].includes(t.key),a=[HOME_KEY$2,END_KEY$2].includes(t.key),l=[ENTER_KEY$1,SPACE_KEY$1].includes(t.key),r=t.target.matches(".submenu > .menu-item");if(!(s||i||o||a||l&&r))return;if(n&&!i)return;const c=e._getToggleFromKeydownContext(this,t);if(!c)return;const u=e.getOrCreateInstance(c);if(!(o||a||l&&r)||!u._handleSubmenuKeydown(t)){if(s)return t.preventDefault(),t.stopPropagation(),u.show(),void u._selectMenuItem(t);if(i&&u._isShown()){t.preventDefault(),t.stopPropagation();const e=t.target.closest(".menu"),n=e?.closest(".submenu");if(n&&u._openSubmenus.size>0){const t=SelectorEngine.findOne(".submenu > .menu-item",n);return u._closeSubmenu(e,n),void(t&&t.focus())}u.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 i=0;for(const e of n){const n=this._normalizeText(e.textContent.toLowerCase().trim()),s=!t||n.includes(t);e.style.display=s?"":"none",s&&i++}this._noResults&&this._noResults.classList.toggle("d-none",i>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 i=n.matches("input");if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();const i=this._getVisibleItems();return void(i.length>0&&getNextActiveElement(i,n,"ArrowDown"===t,!i.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)&&!i){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)});
|
|
7
|
+
/*! name: vanilla-calendar-pro v3.4.0 | url: https://github.com/uvarov-frontend/vanilla-calendar-pro */
|
|
8
|
+
var e=e=>new Date(`${e}T00:00:00`),t=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,n=(n,i)=>n.reduce((n,s)=>{if(s instanceof Date||"number"==typeof s){let e=s instanceof Date?s:new Date(s);n.push(t(e))}else s.match(/^(\d{4}-\d{2}-\d{2})$/g)?n.push(s):s.replace(/(\d{4}-\d{2}-\d{2}).*?(\d{4}-\d{2}-\d{2})/g,(s,o,a)=>{var l;let r=`${o}:${a}`,c=i?i.start.getTime():-1/0,u=null==i||null==(l=i.cursors)?void 0:l.get(r),d=void 0!==u&&u<=c?new Date(u):e(o),h=e(a).setHours(23,59,59,999);if(i){if(h<c)return s;h=Math.min(h,new Date(i.end).setHours(23,59,59,999))}let _=!1;for(let e=d.getTime();e<=h;e=d.setDate(d.getDate()+1))(!i||e>=c)&&(null!=i&&i.cursors&&!_&&(i.cursors.set(r,e),_=!0),n.push(t(d)));return s});return n},[]),a=(e,t)=>{if(t&&t.values.length===e.length){let n=0;for(;n<e.length&&t.values[n]===e[n];)n++;if(n===e.length)return t}return{values:e.slice(),set:new Set(e)}},l=new WeakMap,o=e=>{var t;let i=null!=(t=e.selectedHolidays)&&t[0]?e.selectedHolidays:[],s=JSON.stringify(i.map(e=>e instanceof Date?e.getTime():e)),o=l.get(e);l.set(e,{holidayKey:s,holidays:(null==o?void 0:o.holidayKey)===s?o.holidays:new Set(n(i)),selected:a(e.context.selectedDates,null==o?void 0:o.selected),disabled:a(e.context.disableDates,null==o?void 0:o.disabled),enabled:a(e.context.enableDates,null==o?void 0:o.enabled),min:Date.parse(`${e.context.displayDateMin}T00:00:00`),max:Date.parse(`${e.context.displayDateMax}T00:00:00`),first:Date.parse(`${e.context.selectedDates[0]}T00:00:00`),last:Date.parse(`${e.context.selectedDates[e.context.selectedDates.length-1]}T00:00:00`)})},r=e=>l.get(e),i=["motion","time","annotations","weeks","months"],s=new WeakMap,c={},d=Object.freeze([]),u=e=>{var t;return null==(t=s.get(e))?c:t},m=(e,t=e)=>{if(t.extensions&&t.extensions!==e.extensions&&(new Set(t.extensions).size!==e.extensions.length||t.extensions.some(t=>!e.extensions.includes(t))))throw Error("Calendar extensions are fixed at construction. Create a new Calendar to change them.");let n=u(e),i=(e,t,i)=>{if(e&&!n[t])throw Error(`The "${i}" option requires ${t}. Import { ${t} } from 'vanilla-calendar-pro' and add it to extensions: [${t}].`)};i(t.animation||t.enableSwipe,"motion",t.animation?"animation":"enableSwipe"),i(t.selectionTimeMode,"time","selectionTimeMode"),i(t.popups&&Object.keys(t.popups).length||t.onCreateDateRangeTooltip,"annotations",t.onCreateDateRangeTooltip?"onCreateDateRangeTooltip":"popups"),i("multiple"===t.type,"months","type"),i("week"===t.type||t.enableCollapse||t.enableWeekNumbers||t.onClickWeekDay,"weeks","week"===t.type?"type":t.enableCollapse?"enableCollapse":t.enableWeekNumbers?"enableWeekNumbers":"onClickWeekDay")},p=(e,t,n)=>{var i;return null==(i=u(e).annotations)?void 0:i.tooltip(e,t,n)},h=new WeakMap,v=e=>{let t=h.get(e);return t||(t={lastDateEl:null,isHovering:!1,rangeMin:void 0,rangeMax:void 0,tooltipEl:null,timeoutId:null,frameId:null},h.set(e,t)),t},y=e=>{e.context.mainElement.querySelectorAll("[data-vc-date-hover]").forEach(e=>e.removeAttribute("data-vc-date-hover"))},g=(e,t,n)=>{e.context[t]=n},f=(e,t)=>void 0===t||("function"==typeof t?t(e):t),x=e=>f(e,e.enableDateToggle),b=e=>{if(e.length<3||e.includes(void 0))return e.sort((e,t)=>+new Date(e)-new Date(t));let t=e.map(e=>({date:e,time:+new Date(e)}));return t.sort((e,t)=>e.time-t.time),t.forEach((t,n)=>e[n]=t.date),e},D=e=>{var t;let n=h.get(e);n&&(null==(t=n.cleanup)||t.call(n),n.cleanup=void 0,null!==n.timeoutId&&clearTimeout(n.timeoutId),null!==n.frameId&&cancelAnimationFrame(n.frameId),n.lastDateEl=null,n.tooltipEl=null,n.timeoutId=null,n.frameId=null,h.delete(e))},M=(i,s,o=!0)=>{let a=v(i);if(a.lastDateEl=s,y(i),!a.cleanup){let n=i.context.mainElement,s=(n=>i=>{if(!n.context.selectedDates[0]||1!==n.context.selectedDates.length&&!n.onCreateDateRangeTooltip)return;let s=v(n);if(s.isHovering)return;let o=i.target;s.isHovering=!0,s.frameId=requestAnimationFrame(()=>{var i;s.frameId=null,s.isHovering=!1,!n.context.isDestroyed&&n.context.mainElement.contains(o)&&(1===n.context.selectedDates.length?((n,i)=>{var s;let o=v(n);if(n.context.mainElement.hasAttribute("data-vc-dragging")||!i||null==n||null==(s=n.context)||!s.selectedDates[0])return;if(!i.closest('[data-vc="dates"]'))return o.lastDateEl=null,p(n,o.tooltipEl,null),void y(n);let a=i.closest("[data-vc-date]");if(!a||o.lastDateEl===a)return;o.lastDateEl=a,p(n,o.tooltipEl,a),y(n);let l=a.dataset.vcDate,r=e(n.context.selectedDates[0]),c=e(l),[u,d]=r<c?[r,c]:[c,r],[h,_]=r<c?[n.context.selectedDates[0],l]:[l,n.context.selectedDates[0]],m=new Set(n.context.disableDates),g=new Date(u);for(;g<=d&&m.has(t(g));)g.setDate(g.getDate()+1);g<=d&&n.context.mainElement.querySelectorAll("[data-vc-date]").forEach(t=>{let n=t.dataset.vcDate;if(n===h||n===_)t.dataset.vcDateHover=h===_?"first-and-last":n===h?"first":"last";else{let i=e(n);i>=u&&i<=d&&!m.has(n)&&(t.dataset.vcDateHover="")}})})(n,o):n.context.selectedDates[0]&&n.onCreateDateRangeTooltip&&(null==(i=u(n).annotations)||i.hover(n,o)))})})(i),o=()=>(e=>{let t=v(e);null!==t.timeoutId&&clearTimeout(t.timeoutId),t.timeoutId=setTimeout(()=>{t.timeoutId=null,!e.context.isDestroyed&&(t.lastDateEl=null,p(e,t.tooltipEl,null),y(e))},50)})(i),l=e=>((e,t)=>{if("Escape"!==t.key||1!==e.context.selectedDates.length)return;let n=v(e);n.lastDateEl=null,g(e,"selectedDates",[]),p(e,n.tooltipEl,null),y(e)})(i,e);n.addEventListener("mousemove",s),n.addEventListener("mouseleave",o),n.addEventListener("keydown",l),a.cleanup=()=>{n.removeEventListener("mousemove",s),n.removeEventListener("mouseleave",o),n.removeEventListener("keydown",l)}}i.disableDatesGaps&&(a.rangeMin??=i.context.displayDateMin,a.rangeMax??=i.context.displayDateMax),a.tooltipEl=i.onCreateDateRangeTooltip?i.context.mainElement.querySelector("[data-vc-date-range-tooltip]"):null;let l=null==s?void 0:s.dataset.vcDate;if(l){let e=1===i.context.selectedDates.length&&i.context.selectedDates[0].includes(l);g(i,"selectedDates",e&&!x(i)?[l,l]:e&&x(i)?[]:i.context.selectedDates.length>1?[l]:[...i.context.selectedDates,l]),i.context.selectedDates.length>1&&b(i.context.selectedDates)}({set:()=>{i.disableDatesGaps&&(n=>{var i,s;if(null==n||null==(i=n.context)||null==(i=i.selectedDates)||!i[0]||null==(s=n.context.disableDates)||!s[0])return;let o=e(n.context.selectedDates[0]),[a,l]=n.context.disableDates.map(t=>e(t)).reduce(([e,t],n)=>[o>=n?n:e,o<n&&null===t?n:t],[null,null]);a&&g(n,"displayDateMin",t(new Date(a.setDate(a.getDate()+1)))),l&&g(n,"displayDateMax",t(new Date(l.setDate(l.getDate()-1)))),n.disableDatesPast&&!n.disableAllDates&&e(n.context.displayDateMin)<e(n.context.dateToday)&&g(n,"displayDateMin",n.context.dateToday)})(i),p(i,a.tooltipEl,s)},reset:()=>{if(!o)return;let[e,t]=[i.context.selectedDates[0],i.context.selectedDates[i.context.selectedDates.length-1]];g(i,"selectedDates",i.context.selectedDates[0]===i.context.selectedDates[i.context.selectedDates.length-1]?[i.context.selectedDates[0],i.context.selectedDates[0]]:i.enableEdgeDatesOnly?[e,t]:(()=>{let s=new Set(i.context.disableDates);return n([`${e}:${t}`]).filter(e=>!s.has(e))})()),i.disableDatesGaps&&(g(i,"displayDateMin",a.rangeMin),g(i,"displayDateMax",a.rangeMax)),i.onCreateDateRangeTooltip&&p(i,a.tooltipEl,i.context.selectedDates[0]?s:null)}})[1===i.context.selectedDates.length?"set":"reset"]()},w=e=>e.getRootNode?e.getRootNode():document,E=new WeakSet,k="data-vc-prev-tabindex",T=e=>e.tabIndex>=0&&!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"),A=e=>{if(e.hasAttribute(k))return;let t=e.getAttribute("tabindex");e.setAttribute(k,null==t?"":t)},C=e=>{if(!e.hasAttribute(k))return;let t=e.getAttribute(k);""===t||null===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t),e.removeAttribute(k)},S=e=>{e.setAttribute("inert",""),e.ariaHidden="true",(e=>{T(e)&&(A(e),e.tabIndex=-1);let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>T(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();){let e=t.currentNode;A(e),e.tabIndex=-1}})(e)},$=e=>{var t;if(H(e),!e.context.isShowInInputMode||!e.context.currentType)return;let n=e.context.mainElement.contains(w(e.context.mainElement).activeElement);e.context.mainElement.dataset.vcCalendarHidden="",g(e,"isShowInInputMode",!1),e.inputMode&&S(e.context.mainElement),null!=(t=e.context.inputElement)&&t.hasAttribute("aria-expanded")&&e.context.inputElement.setAttribute("aria-expanded","false"),e.context.cleanupHandlers[0]&&(e.context.cleanupHandlers.forEach(e=>e()),g(e,"cleanupHandlers",[])),e.inputMode&&e.context.inputElement&&n&&(("function"==typeof e.openOnFocus||!0===e.openOnFocus)&&(e=>{E.add(e)})(e),e.context.inputElement.focus()),e.onHide&&e.onHide(e)};function Y(e){if(null==e||!e.getBoundingClientRect)return{top:0,bottom:0,left:0,right:0};let t=e.getBoundingClientRect(),n=document.documentElement;return{bottom:t.bottom,right:t.right,top:t.top+window.scrollY-n.clientTop,left:t.left+window.scrollX-n.clientLeft}}function N(){return{vw:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),vh:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}function I(e,t,n=5){let i={top:!0,bottom:!0,left:!0,right:!0},s=[];if(!t||!e)return{canShow:i,parentPositions:s};let{bottom:o,top:a}=function(e){let{top:t,left:n}={left:window.scrollX||document.documentElement.scrollLeft||0,top:window.scrollY||document.documentElement.scrollTop||0},{top:i,left:s}=Y(e),{vh:o,vw:a}=N(),l=i-t,r=s-n;return{top:l,bottom:o-(l+e.clientHeight),left:r,right:a-(r+e.clientWidth)}}(e),{top:l,left:r}=Y(e),{height:c,width:u}=t.getBoundingClientRect(),{vh:d,vw:h}=N(),_=h/2,m=d/2;return[{condition:l<m,position:"top"},{condition:l>m,position:"bottom"},{condition:r<_,position:"left"},{condition:r>_,position:"right"}].forEach(({condition:e,position:t})=>{e&&s.push(t)}),Object.assign(i,{top:c<=a-n,bottom:c<=o-n,left:u<=r,right:u<=h-r}),{canShow:i,parentPositions:s}}var L=(e,t,n)=>{if(!e)return;let i="auto"===n?function(e,t){let n="left";if(!t||!e)return n;let{canShow:i,parentPositions:s}=I(e,t),o=i.left&&i.right;return(o&&i.bottom?"center":o&&i.top?["top","center"]:Array.isArray(s)?["bottom"===s[0]?"top":"bottom",...s.slice(1)]:s)||n}(e,t):n,s={top:-t.offsetHeight,bottom:e.offsetHeight,left:0,center:e.offsetWidth/2-t.offsetWidth/2,right:e.offsetWidth-t.offsetWidth},o=Array.isArray(i)?i[0]:"bottom",a=Array.isArray(i)?i[1]:i;t.dataset.vcPosition=o;let{top:l,left:r}=Y(e),c=l+s[o],u=r+s[a],{vw:d}=N();if(u+t.clientWidth>d){let e=window.innerWidth-document.body.clientWidth;u=d-t.clientWidth-e}else u<0&&(u=0);Object.assign(t.style,{left:`${u}px`,top:`${c}px`})},W=new WeakMap,H=e=>{clearTimeout(W.get(e)),W.delete(e)},O=e=>{H(e),W.set(e,setTimeout(()=>{W.delete(e),e.context.isDestroyed||q(e)}))},q=e=>{var t,n;if(H(e),e.context.isShowInInputMode||e.context.isDestroyed)return;if(!e.context.currentType)return void e.context.mainElement.click();g(e,"cleanupHandlers",[]),g(e,"isShowInInputMode",!0),e.inputMode&&((n=e.context.mainElement).removeAttribute("inert"),n.removeAttribute("aria-hidden"),(e=>{C(e),e.querySelectorAll(`[${k}]`).forEach(C)})(n)),L(e.context.inputElement,e.context.mainElement,e.positionToInput),e.context.mainElement.removeAttribute("data-vc-calendar-hidden"),null!=(t=e.context.inputElement)&&t.hasAttribute("aria-expanded")&&e.context.inputElement.setAttribute("aria-expanded","true");let i=()=>{L(e.context.inputElement,e.context.mainElement,e.positionToInput)};window.addEventListener("resize",i),e.context.cleanupHandlers.push(()=>window.removeEventListener("resize",i));let s=t=>{"Escape"===t.key&&$(e)};document.addEventListener("keydown",s),e.context.cleanupHandlers.push(()=>document.removeEventListener("keydown",s));let o=t=>{var n;let i=null==(n=t.composedPath()[0])?t.target:n;i===e.context.inputElement||e.context.mainElement.contains(i)||$(e)};document.addEventListener("click",o,{capture:!0}),e.context.cleanupHandlers.push(()=>document.removeEventListener("click",o,{capture:!0})),e.onShow&&e.onShow(e)},F='The calendar has not been initialized, please initialize it using the "init()" method first.',P="You specified an incorrect language label or did not specify the required number of values for «locale.weekdays» or «locale.months».",_=e=>String(e).replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[e])),R=(e,t)=>`\n <div class="${_(e.styles.header)}" data-vc="header" role="group" aria-label="${_(e.labels.navigation)}">\n${t?` <#ArrowPrev [${t}] />\n`:""} <div class="${_(e.styles.headerContent)}" data-vc-header="content" aria-live="polite" aria-atomic="true">\n <#Month />\n <#Year />\n </div>\n${t?` <#ArrowNext [${t}] />\n`:""} </div>\n`,j=(e,t="month")=>`${R(e,t)} <div class="${_(e.styles.wrapper)}" data-vc="wrapper">\n <#WeekNumbers />\n <div class="${_(e.styles.content)}" data-vc="content" role="grid">\n <#Week />\n <#Dates />\n <#DateRangeTooltip />\n </div>\n </div>\n <#Collapse />\n <#ControlTime />\n`,z=e=>e,K=new WeakMap,B=e=>{var t;null==(t=K.get(e))||t.observer.disconnect(),K.delete(e)},U=B,X=e=>{var t;return!(e.animation||e.enableCollapse||e.onCreateDateEls||e.onCreateDateRangeTooltip||e.disableDatesGaps||e.popups&&Object.keys(e.popups).length||e.sanitizerHTML!==z||"default"!==e.context.currentType&&"multiple"!==e.context.currentType||e.layouts[e.context.currentType]!==("multiple"===e.context.currentType?null==(t=u(e).months)?void 0:t.layout(e):j(e)))},G=e=>JSON.stringify(Object.entries(e).filter(([e])=>"context"!==e&&"selectedDates"!==e),(e,t)=>"function"==typeof t||t),Z=({context:e})=>JSON.stringify([e.currentType,e.locale,e.dateToday,e.dateMin,e.dateMax,e.displayDateMin,e.displayDateMax,e.selectedYear,e.selectedMonth,e.displayMonthsCount,e.selectedHours,e.selectedMinutes,e.selectedKeeping,e.selectedTime]),V=e=>JSON.stringify([Z(e),e.context.displayYear,e.context.displayWeekDate,e.context.selectedDates,e.context.disableDates,e.context.enableDates]),J=(e,t=!1)=>{let n=K.get(e);if(!n||!t&&!n.fullLayout||n.dirty||n.observer.takeRecords().length||!X(e))return;let i=w(e.context.mainElement).activeElement;if(!i||i===e.context.mainElement||!e.context.mainElement.contains(i)||t&&!i.closest('[data-vc="column"], [data-vc="dates"], [data-vc-week="numbers"]'))try{if(n.options===G(e)&&n.context===V(e)&&n.timezone===(new Intl.DateTimeFormat).resolvedOptions().timeZone)return n}catch(e){}},Q=(e,t=!1)=>{if(B(e),X(e)&&!e.context.isDestroyed)try{let n=G(e),i=V(e);if(n.length+i.length>262144)return;let s=Array.from(e.context.mainElement.querySelectorAll('[data-vc="dates"]'));if(s.length!==e.context.displayMonthsCount)return;let o={observer:new MutationObserver(()=>o.dirty=!0),dirty:!1,fullLayout:t,options:n,context:i,structure:Z(e),timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone,month:12*e.context.selectedYear+e.context.selectedMonth,count:s.length};o.observer.observe(e.context.mainElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),K.set(e,o)}catch(t){B(e)}},ee=(e,t,n,i="")=>{t?e.getAttribute(n)!==i&&e.setAttribute(n,i):e.getAttribute(n)===i&&e.removeAttribute(n)},te=(t,n,i,s,o,a,l)=>{var c;let u=(_=a,Date.parse(`${_}T00:00:00`)),d=r(t),h=d.min>u||d.max<u||d.disabled.set.has(a)||!t.selectionMonthsMode&&"current"!==l||!t.selectionYearsMode&&e(a).getFullYear()!==n;var _;ee(i,h,"data-vc-date-disabled"),s&&ee(s,h,"aria-disabled","true"),s&&h&&ee(s,!0,"tabindex","-1"),s&&s.disabled!==!!h&&(s.disabled=!!h),ee(i,!t.disableToday&&t.context.dateToday===a,"data-vc-date-today"),ee(i,!t.disableToday&&t.context.dateToday===a,"aria-current","date"),ee(i,null==(c=t.selectedWeekends)?void 0:c.includes(o),"data-vc-date-weekend"),ee(i,d.holidays.has(a),"data-vc-date-holiday");let m=d.selected.set.has(a),g=m?"":void 0;m?(ee(i,!0,"aria-selected","true"),t.context.selectedDates.length>1&&"multiple-ranged"===t.selectionDatesMode&&(t.context.selectedDates[0]===a&&t.context.selectedDates[t.context.selectedDates.length-1]===a?g="first-and-last":t.context.selectedDates[0]===a?g="first":t.context.selectedDates[t.context.selectedDates.length-1]===a&&(g="last"),t.context.selectedDates[0]!==a&&t.context.selectedDates[t.context.selectedDates.length-1]!==a&&(g="middle"))):i.hasAttribute("data-vc-date-selected")&&i.removeAttribute("aria-selected"),!d.disabled.set.has(a)&&t.enableEdgeDatesOnly&&t.context.selectedDates.length>1&&"multiple-ranged"===t.selectionDatesMode&&(u>d.first&&u<d.last?g="middle":"middle"===g&&(g=void 0)),void 0===g?i.hasAttribute("data-vc-date-selected")&&i.removeAttribute("data-vc-date-selected"):ee(i,!0,"data-vc-date-selected",g)},ne=new Map,ae=new Map,le=(e,t,n)=>{var i,s;let o=null==(i=e.disableWeekdays)?void 0:i.includes(n),a=e.disableAllDates&&!(null==(s=e.context.enableDates)||!s[0]),l=r(e);if((o||a)&&!l.enabled.set.has(t)&&!l.disabled.set.has(t)){let n=e.context.disableDates;if(l.disabled.set.add(t),e.onCreateDateEls)n.push(t),b(n),l.disabled.values=n.slice();else{let e=+new Date(t),i=0,s=n.length;for(;i<s;){let t=i+s>>>1;+new Date(n[t])<=e?i=t+1:s=t}n.splice(i,0,t),l.disabled.values.splice(i,0,t)}}},oe=(t,n,i,s,a,l)=>{var r;let c,d=e(a).getDay(),h="string"==typeof t.locale&&t.locale.length?t.locale:"en",_=document.createElement("div");_.className=t.styles.date,_.dataset.vcDate=a,_.dataset.vcDateMonth=l,_.dataset.vcDateWeekDay=String(d),_.role="gridcell",("current"===l||t.displayDatesOutside)&&(c=document.createElement("button"),c.className=t.styles.dateBtn,c.type="button",c.dataset.vcDateBtn="",c.ariaLabel=((e,t)=>{let n=`${t}:${e}`,i=ae.get(n);if(void 0!==i)return i;let s=ne.get(t);s||(s=new Intl.DateTimeFormat(t,{dateStyle:"long",timeZone:"UTC"}),ne.size>=8&&ne.delete(ne.keys().next().value),ne.set(t,s));let o=s.format(new Date(`${e}T00:00:00.000Z`));return ae.size>=512&&ae.delete(ae.keys().next().value),ae.set(n,o),o})(a,h),c.innerText=String(s),_.appendChild(c)),t.enableWeekNumbers&&(null==(r=u(t).weeks)||r.date(t,_,a)),le(t,a,d),te(t,n,_,c,d,a,l),i.addDate(_),t.onCreateDateEls&&(t.onCreateDateEls(t,_),o(t))},re=[{container:'[data-vc="dates"]',item:"[data-vc-date-btn]",active:["[data-vc-date-selected] [data-vc-date-btn]","[data-vc-date-today] [data-vc-date-btn]"]},{container:'[data-vc="months"]',item:"[data-vc-months-month]",active:["[data-vc-months-month-selected]"]},{container:'[data-vc="years"]',item:"[data-vc-years-year]",active:["[data-vc-years-year-selected]"]}],ie=e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"),se=(e,t,n)=>{if(n&&ie(n))return e.querySelectorAll(`${t.item}:not([tabindex="-1"])`).forEach(e=>{e!==n&&(e.tabIndex=-1)}),void("0"!==n.getAttribute("tabindex")&&(n.tabIndex=0));let i=Array.from(e.querySelectorAll(t.item));if(!i[0])return;let s=((e,t,n)=>{var i;let s=t.active.map(t=>e.querySelector(t)).find(e=>!!e&&ie(e));return null==(i=null==s?n.find(ie):s)?n[0]:i})(e,t,i);i.forEach(e=>{let t=e===s?0:-1;e.getAttribute("tabindex")!==String(t)&&(e.tabIndex=t)})},ce=e=>{let t=e.target,n=re.find(e=>{var n;return null==(n=t.matches)?void 0:n.call(t,e.item)}),i=n?t.closest(n.container):null;n&&i&&se(i,n,t)},de=e=>{re.forEach(t=>{e.context.mainElement.querySelectorAll(t.container).forEach(e=>{e.closest("[data-vc-ghost]")||se(e,t,null)})})},ue=(e,n,i=!0)=>{var s;U(e);let a=new Date(e.context.selectedYear,e.context.selectedMonth,1),l=e.context.mainElement.querySelectorAll('[data-vc="dates"]'),r=u(e).weeks,c=e.enableWeekNumbers?e.context.mainElement.querySelectorAll('[data-vc-week="numbers"]'):[],d=null==(s=u(e).annotations)?void 0:s.prepare(e,l.length);l.forEach((i,s)=>{e.selectionDatesMode||(i.dataset.vcDatesDisabled="");let l=n?12*e.context.selectedYear+e.context.selectedMonth+s-n.month:-1;if(n&&l>=0&&l<n.count)return;if(i.textContent="",o(e),"week"===e.context.currentType)return r?.dates(e,i),d?.(i),void(null==r||r.numbers(e,0,7,c[s],i));let u=new Date(a);u.setMonth(u.getMonth()+s);let h=u.getMonth(),_=u.getFullYear(),m=(new Date(_,h,1).getDay()-e.firstWeekday+7)%7,g=new Date(_,h+1,0).getDate(),p=m+g,E=Math.ceil(p/7),f=7*E-p,v=[];for(let t=0;t<E;t++){let t=document.createElement("div");t.className=e.styles.datesRow,t.setAttribute("data-vc-dates","row"),t.setAttribute("role","row"),v.push(t)}let T=0,b=0,y={addDate:e=>{v[T].appendChild(e),b++,b>=7&&(T++,b=0)}};((e,t,n,i,s)=>{let o=new Date(n,i,0).getDate()-(s-1),a=0===i?n-1:n,l=0===i?12:i<10?`0${i}`:i;for(let i=s;i>0;i--,o++)oe(e,n,t,o,`${a}-${l}-${o}`,"prev")})(e,y,_,h,m),((e,n,i,s,o)=>{for(let a=1;a<=i;a++){let i=new Date(s,o,a);oe(e,s,n,a,t(i),"current")}})(e,y,g,_,h),((e,t,n,i,s)=>{let o=s+1===12?i+1:i,a=s+1===12?"01":s+2<10?`0${s+2}`:s+2;for(let s=1;s<=n;s++){let n=`${o}-${a}-${s<10?`0${s}`:String(s)}`;oe(e,i,t,s,n,"next")}})(e,y,f,_,h);for(let e of v)i.appendChild(e);d?.(i),r?.numbers(e,m,g,c[s],i)}),de(e),i&&Q(e,null==n?void 0:n.fullLayout)},me=(e,t)=>`${R(e,"Years"===t?"year":void 0)} <div class="${_(e.styles.wrapper)}" data-vc="wrapper">\n <div class="${_(e.styles.content)}" data-vc="content">\n <#${t} />\n </div>\n </div>\n`,pe=e=>me(e,"Months"),he=e=>me(e,"Years"),ye=(e,t,n)=>e.labels["arrow"+("prev"===t?"Prev":"Next")][n],ge={ArrowNext:(e,t)=>`<button type="button" class="${_(e.styles.arrowNext)}" data-vc-arrow="next" aria-label="${_(ye(e,"next",t))}"></button>`,ArrowPrev:(e,t)=>`<button type="button" class="${_(e.styles.arrowPrev)}" data-vc-arrow="prev" aria-label="${_(ye(e,"prev",t))}"></button>`,Dates:e=>`<div class="${_(e.styles.dates)}" data-vc="dates" role="rowgroup" aria-label="${_(e.labels.dates)}"></div>`,Month:e=>`<button type="button" class="${_(e.styles.month)}" data-vc="month"></button>`,Months:e=>`<div class="${_(e.styles.months)}" data-vc="months" role="grid" aria-label="${_(e.labels.months)}"></div>`,Week:e=>`<div class="${_(e.styles.week)}" data-vc="week" role="row" aria-label="${_(e.labels.week)}"></div>`,Year:e=>`<button type="button" class="${_(e.styles.year)}" data-vc="year"></button>`,Years:e=>`<div class="${_(e.styles.years)}" data-vc="years" role="grid" aria-label="${_(e.labels.years)}"></div>`},fe=(e,t)=>t.replace(/[\n\t]/g,"").replace(/<#(?!\/?Multiple)(.*?)>/g,(t,n)=>{let i=(n.match(/\[(.*?)\]/)||[])[1],s=((e,t)=>{var n,i,s,o;return"Collapse"===t?null==(n=u(e).weeks)?void 0:n.component:"WeekNumbers"===t?null==(i=u(e).weeks)?void 0:i.numbersComponent:"DateRangeTooltip"===t?null==(s=u(e).annotations)?void 0:s.component:"ControlTime"===t?null==(o=u(e).time)?void 0:o.component:Object.prototype.hasOwnProperty.call(ge,t)?ge[t]:void 0})(e,n.replace(/[/\s\n\t]|\[(.*?)\]/g,"")),o=s?s(e,null==i?null:i):"";return e.sanitizerHTML(o)}).replace(/[\n\t]/g,""),xe=(e,t)=>{var n,i,s;let o=u(e),a={default:j,month:pe,year:he,multiple:null==(n=o.months)?void 0:n.layout,week:null==(i=o.weeks)?void 0:i.layout};var l;Object.keys(a).forEach(t=>{var n,i;let s=t;e.layouts[s].length||(e.layouts[s]=null==(n=null==(i=a[s])?void 0:i.call(a,e))?"":n)}),e.context.mainElement.className=e.styles.calendar,e.context.mainElement.dataset.vc="calendar",e.context.mainElement.dataset.vcType=e.context.currentType,e.context.mainElement.toggleAttribute("data-vc-swipe",e.enableSwipe),e.context.mainElement.role=e.inputMode?"dialog":"group",e.context.mainElement.tabIndex=-1,e.context.mainElement.ariaLabel=e.labels.application,null!=(s=o.months)&&s.render(e,t)||(null==(l=o.time)||l.destroy(e),e.context.mainElement.innerHTML=e.sanitizerHTML(fe(e,e.layouts[e.context.currentType]))),(e=>{let t=["multiple","multiple-ranged"].includes(String(e.selectionDatesMode));e.context.mainElement.querySelectorAll('[data-vc="content"][role="grid"]').forEach(e=>{t?e.setAttribute("aria-multiselectable","true"):e.removeAttribute("aria-multiselectable")})})(e)},be=(e,t,n,i)=>{e.style.visibility=n?"hidden":"",t.style.visibility=i?"hidden":""},De=n=>{if("month"===n.context.currentType)return;let i=n.context.mainElement.querySelector('[data-vc-arrow="prev"]'),s=n.context.mainElement.querySelector('[data-vc-arrow="next"]');i&&s&&{default:()=>((n,i,s)=>{let o=e(t(new Date(n.context.selectedYear,n.context.selectedMonth,1))),a=new Date(o.getTime()),l=new Date(o.getTime());a.setMonth(a.getMonth()-n.monthsToSwitch),l.setMonth(l.getMonth()+n.monthsToSwitch);let r=e(n.context.dateMin),c=e(n.context.dateMax);n.selectionYearsMode||(r.setFullYear(o.getFullYear()),c.setFullYear(o.getFullYear())),be(i,s,!n.selectionMonthsMode||a.getFullYear()<r.getFullYear()||a.getFullYear()===r.getFullYear()&&a.getMonth()<r.getMonth(),!n.selectionMonthsMode||l.getFullYear()>c.getFullYear()||l.getFullYear()===c.getFullYear()&&l.getMonth()>c.getMonth()-(n.context.displayMonthsCount-1))})(n,i,s),year:()=>((t,n,i)=>{let s=e(t.context.dateMin),o=e(t.context.dateMax);be(n,i,!!(s.getFullYear()&&t.context.displayYear-7<=s.getFullYear()),!!(o.getFullYear()&&t.context.displayYear+7>=o.getFullYear()))})(n,i,s),week:()=>{var e;return null==(e=u(n).weeks)?void 0:e.arrows(n,i,s)}}["multiple"===n.context.currentType?"default":n.context.currentType]()},Me=(e,t)=>{let n=e.context.mainElement.querySelectorAll('[data-vc="month"]'),i=e.context.mainElement.querySelectorAll('[data-vc="year"]'),s=new Date(e.context.selectedYear,e.context.selectedMonth,1);[n,i].forEach(n=>null==n?void 0:n.forEach((n,i)=>{(!t||t.includes(i))&&((e,t,n,i,s)=>{let o=new Date(i.setFullYear(e.context.selectedYear,e.context.selectedMonth+n)).getFullYear(),a=new Date(i.setMonth(e.context.selectedMonth+n)).getMonth(),l=e.context.locale.months.long[a],r=t.closest('[data-vc="column"]');r&&(r.ariaLabel=`${l} ${o}`);let c={month:{id:a,label:l},year:{id:o,label:o}};t.innerText=String(c[s].label),t.dataset[`vc${s.charAt(0).toUpperCase()+s.slice(1)}`]=String(c[s].id),t.ariaLabel=`${e.labels[s]} ${c[s].label}`;let u={month:e.selectionMonthsMode,year:e.selectionYearsMode},d=!1===u[s]||"only-arrows"===u[s];d&&(t.tabIndex=-1),t.disabled=d})(e,n,i,s,n.dataset.vc)}))},we=(e,t,n,i,s)=>{let o={month:{selected:"data-vc-months-month-selected",aria:"aria-selected",value:"vcMonthsMonth",selectedProperty:"selectedMonth"},year:{selected:"data-vc-years-year-selected",aria:"aria-selected",value:"vcYearsYear",selectedProperty:"selectedYear"}};var a,l;s&&(null==(a=e.context.mainElement.querySelectorAll({month:"[data-vc-months-month]",year:"[data-vc-years-year]"}[n]))||a.forEach(e=>{var t;e.removeAttribute(o[n].selected),null==(t=e.parentElement)||t.removeAttribute(o[n].aria)}),g(e,o[n].selectedProperty,Number(t.dataset[o[n].value])),Me(e),"year"===n&&De(e)),i&&(t.setAttribute(o[n].selected,""),null==(l=t.parentElement)||l.setAttribute(o[n].aria,"true"))},Ee=(e,t,n,i,s,o,a,l)=>{let r="month"===t?"months":"years",c=document.createElement("div");c.className=e.styles[`${r}Cell`],c.setAttribute(`data-vc-${r}`,"cell"),c.role="gridcell";let u=n.cloneNode(!1);return u.className=e.styles["month"===t?"monthsMonth":"yearsYear"],u.innerText=a,u.ariaLabel=l,u.setAttribute(`data-vc-${r}-${t}`,String(o)),s&&(u.ariaDisabled="true"),s&&(u.tabIndex=-1),u.disabled=s,c.appendChild(u),we(e,u,t,i===o,!1),c},ke=(e,t)=>{var n,i;return null==(n=null==(i=u(e).months)?void 0:i.column(e,t))?{currentValue:null,columnID:0}:n},Te=(t,n)=>{var i;let s=null==n||null==(i=n.closest('[data-vc="header"]'))?void 0:i.querySelector('[data-vc="year"]'),o=s?Number(s.dataset.vcYear):t.context.selectedYear,a=null!=n&&n.dataset.vcMonth?Number(n.dataset.vcMonth):t.context.selectedMonth;g(t,"currentType","month"),xe(t,n),Me(t);let l=t.context.mainElement.querySelector('[data-vc="months"]');if(!t.selectionMonthsMode||!l)return;let r=t.monthsToSwitch>1?t.context.locale.months.long.map((e,n)=>a-t.monthsToSwitch*n).concat(t.context.locale.months.long.map((e,n)=>a+t.monthsToSwitch*n)).filter(e=>e>=0&&e<=12):Array.from(Array(12).keys()),c=document.createElement("button");c.type="button";let u,d=()=>({min:e(t.context.dateMin),max:e(t.context.dateMax),monthCount:t.context.displayMonthsCount-1,columnID:ke(t,"month").columnID}),h=t.onCreateMonthEls?void 0:d();for(let e=0;e<12;e++){e%4==0&&(u=document.createElement("div"),u.className=t.styles.monthsRow,u.dataset.vcMonths="row",u.role="row",l.appendChild(u));let{min:n,max:i,monthCount:s,columnID:_}=null==h?d():h,m=Ee(t,"month",c,a,o<=n.getFullYear()&&e<n.getMonth()+_||o>=i.getFullYear()&&e>i.getMonth()-s+_||o>i.getFullYear()||e!==a&&!r.includes(e),e,t.context.locale.months.short[e],t.context.locale.months.long[e]);u?.appendChild(m),t.onCreateMonthEls&&t.onCreateMonthEls(t,m)}de(t)},Ae=e=>{var t;let n=e.selectedWeekends?[...e.selectedWeekends]:[],i=[...e.context.locale.weekdays.long].map((t,i)=>({id:i,titleShort:e.context.locale.weekdays.short[i],titleLong:t,isWeekend:n.includes(i)})),s=[...i.slice(e.firstWeekday),...i.slice(0,e.firstWeekday)],o=null==(t=u(e).weeks)?void 0:t.weekday(e),a=document.createElement(o?"div":"b");e.context.mainElement.querySelectorAll('[data-vc="week"]').forEach(t=>{s.forEach(n=>{let i=a.cloneNode(!1);i.className=e.styles.weekDay,i.role="columnheader",i.ariaLabel=n.titleLong,i.dataset.vcWeekDay=String(n.id),n.isWeekend&&(i.dataset.vcWeekDayOff=""),o?o(i,n.titleShort,n.titleLong):i.innerText=n.titleShort,t.appendChild(i)})})},Ce=(t,n)=>{let i=null!=n&&n.dataset.vcYear?Number(n.dataset.vcYear):t.context.selectedYear;g(t,"currentType","year"),xe(t,n),Me(t),De(t);let s=t.context.mainElement.querySelector('[data-vc="years"]');if(!t.selectionYearsMode||!s)return;let o="multiple"===t.type?t.context.selectedYear===i?0:1:0,a=document.createElement("button");a.type="button";let l,r=()=>[e(t.context.dateMin).getFullYear(),e(t.context.dateMax).getFullYear()],c=t.onCreateYearEls?void 0:r();for(let e=t.context.displayYear-7;e<t.context.displayYear+8;e++){(e-(t.context.displayYear-7))%5==0&&(l=document.createElement("div"),l.className=t.styles.yearsRow,l.dataset.vcYears="row",l.role="row",s.appendChild(l));let[n,u]=null==c?r():c,d=Ee(t,"year",a,i,e<n+o||e>u,e,String(e),String(e));l?.appendChild(d),t.onCreateYearEls&&t.onCreateYearEls(t,d)}de(t)},Se=new WeakMap,$e=e=>{var t,n;let i="not all"!==window.matchMedia("(prefers-color-scheme)").media;var s,o;if(!i||"system"!==e.selectedTheme)return null==(s=(o=e.context).cleanupSystemTheme)||s.call(o),void(e.context.mainElement.dataset.vcTheme=i?e.selectedTheme:"light");let a=e.themeAttrDetect.length?document.querySelector(e.themeAttrDetect):null,l=e.themeAttrDetect.replace(/^.*\[(.+)\]/g,(e,t)=>t),r=Se.get(e);if((null==r?void 0:r.element)===a&&r.attr===l)return void r.update();null==(t=(n=e.context).cleanupSystemTheme)||t.call(n);let c,u=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{let t=null==a?void 0:a.getAttribute(l),n=!t||"system"===t;e.context.mainElement.dataset.vcTheme=n?u.matches?"dark":"light":t,n&&!c?u.addEventListener?(u.addEventListener("change",d),c=()=>u.removeEventListener("change",d)):(u.addListener(d),c=()=>u.removeListener(d)):!n&&c&&(c(),c=void 0)},h=a?((e,t,n)=>{let i=new MutationObserver(e=>{for(let i=0;i<e.length;i++)if(e[i].attributeName===t){n();break}});return i.observe(e,{attributes:!0,attributeFilter:[t]}),()=>i.disconnect()})(a,l,d):void 0;Se.set(e,{element:a,attr:l,update:d}),g(e,"cleanupSystemTheme",()=>{h?.(),c?.(),Se.delete(e),g(e,"cleanupSystemTheme",void 0)}),d()};function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function Ne(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ye(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ye(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ye(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null==arguments[t]?{}:arguments[t];t%2?Ie(Object(n),!0).forEach(function(t){Ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var We=new Map,He=(e,t,n)=>{let i=new Intl.DateTimeFormat(e,{[t]:n,timeZone:"UTC"});return Array.from({length:"weekday"===t?7:12},(e,n)=>{return(s=i.format(new Date(Date.UTC(1978,"month"===t?n:0,"weekday"===t?n+1:1)))).charAt(0).toUpperCase()+s.slice(1).replace(/\./,"");var s})},Oe=e=>{if(e.context.locale.weekdays.short[6]&&e.context.locale.weekdays.long[6]&&e.context.locale.months.short[11]&&e.context.locale.months.long[11])return;if("string"!=typeof e.locale){var t,n,i,s;if(!(null!=(t=e.locale)&&null!=(t=t.weekdays)&&t.short[6]&&null!=(n=e.locale)&&null!=(n=n.weekdays)&&n.long[6]&&null!=(i=e.locale)&&null!=(i=i.months)&&i.short[11]&&null!=(s=e.locale)&&null!=(s=s.months)&&s.long[11]))throw Error(P);return void g(e,"locale",Le({},e.locale))}if("string"==typeof e.locale&&!e.locale.length)throw Error(P);let o=We.get(e.locale);o||(o={weekdays:{short:He(e.locale,"weekday","short"),long:He(e.locale,"weekday","long")},months:{short:He(e.locale,"month","short"),long:He(e.locale,"month","long")}},We.size>=8&&We.delete(We.keys().next().value),We.set(e.locale,o));for(let t of["weekdays","months"])for(let n of["short","long"])e.context.locale[t][n].push(...o[t][n])},qe=(e,t=!0)=>{var n;U(e),$e(e),Oe(e),xe(e),Me(e),De(e),null==(n=u(e).time)||n.render(e),{default:()=>{Ae(e),ue(e,void 0,!1)},multiple:()=>{Ae(e),ue(e,void 0,!1)},week:()=>{var t;null==(t=u(e).weeks)||t.init(e),Ae(e),ue(e,void 0,!1)},month:()=>Te(e),year:()=>Ce(e)}[e.context.currentType](),t&&Q(e,!0)},Fe=(t,n=!1)=>{o(t),t.context.mainElement.querySelectorAll("[data-vc-date]").forEach(i=>{let s=i.querySelector("[data-vc-date-btn]"),o=i.dataset.vcDate,a=e(o),l=a.getDay();n&&le(t,o,l);let r=n?i.dataset.vcDateMonth:"current";"prev"===r&&a.setMonth(a.getMonth()+1,1),"next"===r&&a.setMonth(a.getMonth()-1,1),te(t,n?a.getFullYear():t.context.selectedYear,i,s,l,o,r)}),de(t)},Pe=e=>{let t=[{container:'[data-vc="dates"]',row:'[data-vc-dates="row"]',item:"[data-vc-date-btn]"},{container:'[data-vc="months"]',row:'[data-vc-months="row"]',item:"[data-vc-months-month]"},{container:'[data-vc="years"]',row:'[data-vc-years="row"]',item:"[data-vc-years-year]"}],n=e=>!e.disabled&&"true"!==e.getAttribute("aria-disabled"),i=e=>{let i=e.target.closest("button");if(!i||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.key))return;let s,o=t.find(e=>i.matches(e.item)),a=o?i.closest(o.container):null;if(o&&a&&!a.closest("[data-vc-ghost]")&&n(i)){if("ArrowUp"===e.key||"ArrowDown"===e.key)s=((e,t,i,s)=>{var o;let a=i.closest(t.row);if(!a)return i;let l=Array.from(e.querySelectorAll(t.row)),r=l.indexOf(a),c=Array.from(a.children).indexOf(i.parentElement),u=l[r+s],d=null==u||null==(o=u.children[c])?void 0:o.querySelector(t.item);return d&&n(d)?d:i})(a,o,i,"ArrowUp"===e.key?-1:1);else{let t=Array.from(a.querySelectorAll(o.item)).filter(n),l=t.indexOf(i);if(-1===l)return;s="ArrowLeft"===e.key?t[Math.max(0,l-1)]:t[Math.min(t.length-1,l+1)]}e.preventDefault(),s?.focus()}};return e.context.mainElement.addEventListener("keydown",i),e.context.mainElement.addEventListener("focusin",ce),()=>{e.context.mainElement.removeEventListener("keydown",i),e.context.mainElement.removeEventListener("focusin",ce)}},_e='[data-vc="dates"]',Re=(e,t)=>"next"===e?t:-t,je=n=>{let i={selector:_e,shift:i=>((n,i)=>{let s=e(t(new Date(n.context.selectedYear,n.context.selectedMonth,1)));s.setMonth(s.getMonth()+Re(i,n.monthsToSwitch)),g(n,"selectedMonth",s.getMonth()),g(n,"selectedYear",s.getFullYear())})(n,i),render:(e,t)=>ue(n,t)};return{default:i,multiple:i,week:{selector:_e,shift:e=>{var t;return null==(t=u(n).weeks)?void 0:t.shift(n,e)},render:()=>ue(n)},year:{selector:'[data-vc="years"]',shift:e=>g(n,"displayYear",n.context.displayYear+Re(e,15)),render:e=>Ce(n,e)},month:null}[n.context.currentType]},ze=(e,t,n)=>{var i;let s=je(e);if(!s)return;let{mainElement:o}=e.context,a=o.contains(w(o).activeElement),l="multiple"===e.context.currentType?J(e,!0):void 0;U(e),s.shift(t);let r=l?null==(i=u(e).months)?void 0:i.rotate(e,l):void 0;r||(l=void 0),Me(e,r),De(e);let c=u(e).motion;c&&e.animation?c.navigate(e,s.selector,t,()=>s.render(n,l)):s.render(n,l),((e,t,n)=>{var i;let{mainElement:s}=e.context;if(!n||s.contains(w(s).activeElement))return;let o=s.querySelector(`[data-vc-arrow="${t}"]`);if(o&&"hidden"!==o.style.visibility)return o.focus();null==(i=Array.from(s.querySelectorAll('[tabindex="0"]')).find(e=>!e.closest("[data-vc-ghost]")))||i.focus()})(e,t,a)},Ke=(e,t,n)=>{let i=t.dataset.vcDate,s=t.closest("[data-vc-date][data-vc-date-selected]"),o=x(e);(!s||o)&&g(e,"selectedDates",s?e.context.selectedDates.filter(e=>e!==i):n?[...e.context.selectedDates,i]:[i])},Be=["month","year"],Ue='[data-vc="column"]',Xe=(e,t,n)=>{let i=u(e).motion;i&&e.animation?i.changeView(e,t,n):n()},Ge=(e,t)=>{var n;let{columnID:i}=ke(e,e.context.currentType);g(e,"currentType",e.type),Xe(e,i,()=>qe(e)),null==(n=e.context.mainElement.querySelector(`[data-vc="${t}"]`))||n.focus()},Ze=e=>{let t=t=>{var n,i;((e,t)=>{let n=t.target,i=n.closest("[data-vc-arrow]");i&&(ze(e,i.dataset.vcArrow,n),e.onClickArrow&&e.onClickArrow(e,t))})(e,t),null==(n=u(e).weeks)||n.click(e,t),((e,t)=>{let n=t.target,i=n.closest("[data-vc-date-btn]");if(!e.selectionDatesMode||!["single","multiple","multiple-ranged"].includes(e.selectionDatesMode)||!i)return;let s=i.closest("[data-vc-date]");({single:()=>Ke(e,s,!1),multiple:()=>Ke(e,s,!0),"multiple-ranged":()=>M(e,s)})[e.selectionDatesMode](),e.context.selectedDates&&b(e.context.selectedDates),e.onClickDate&&e.onClickDate(e,t),e.inputMode&&e.context.inputElement&&e.context.mainElement&&e.onChangeToInput&&e.onChangeToInput(e,t);let o=n.closest('[data-vc-date-month="prev"]'),a=n.closest('[data-vc-date-month="next"]');({prev:()=>e.enableMonthChangeOnDayClick?ze(e,"prev"):Fe(e),next:()=>e.enableMonthChangeOnDayClick?ze(e,"next"):Fe(e),current:()=>Fe(e)})[o?"prev":a?"next":"current"]()})(e,t),((e,t)=>{let n={month:e.selectionMonthsMode,year:e.selectionYearsMode};Be.forEach(i=>{n[i]&&t.target&&((e,t,n)=>{let i=t.target,s=i.closest(`[data-vc="${n}"]`),o=((e,t)=>{let n=t.closest(Ue);return n?Array.from(e.context.mainElement.querySelectorAll(Ue)).indexOf(n):0})(e,i),a={year:()=>Xe(e,o,()=>Ce(e,i)),month:()=>Xe(e,o,()=>Te(e,i))};if(s&&e.onClickTitle&&e.onClickTitle(e,t),s&&e.context.currentType!==n){let t=i.closest(Ue);return a[n](),((e,t,n)=>{var i;return null==(i=(null==n?e.context.mainElement:n).querySelector(`[data-vc-${t}s-${t}][tabindex="0"]`))?void 0:i.focus()})(e,n,t)}let l=i.closest(`[data-vc-${n}s-${n}]`);if(l)return((e,t,n,i)=>{({year:()=>{var t;if("multiple"===e.type)return null==(t=u(e).months)?void 0:t.select(e,"year",i);g(e,"selectedYear",Number(i.dataset.vcYearsYear))},month:()=>{var t;if("multiple"===e.type)return null==(t=u(e).months)?void 0:t.select(e,"month",i);g(e,"selectedMonth",Number(i.dataset.vcMonthsMonth))}})[n](),{year:()=>{var n;return null==(n=e.onClickYear)?void 0:n.call(e,e,t)},month:()=>{var n;return null==(n=e.onClickMonth)?void 0:n.call(e,e,t)}}[n](),e.context.currentType===e.type?we(e,i,n,!0,!0):Ge(e,n)})(e,t,n,l);let r=i.closest('[data-vc="grid"]'),c=i.closest('[data-vc="column"]');(e.context.currentType===n&&s||"multiple"===e.type&&e.context.currentType===n&&r&&!c)&&Ge(e,n)})(e,t,i)})})(e,t),null==(i=u(e).weeks)||i.collapseClick(e,t)};return e.context.mainElement.addEventListener("click",t),()=>e.context.mainElement.removeEventListener("click",t)},Ve=new WeakMap,Je=(e,t)=>{let i=e[t].map(e=>e instanceof Date?e.getTime():e),s=Ve.get(e),o=null==s?void 0:s[t];if(o&&i.length===o.values.length){let e=0;for(;e<i.length&&i[e]===o.values[e];)e++;if(e===i.length&&o.timezone===(new Intl.DateTimeFormat).resolvedOptions().timeZone)return o.dates.slice()}let a=n(e[t]);if(a.length>1&&b(a),a.length>128&&a.length<=1e4&&i.length<=1e4){let n=null==s?{}:s;n[t]={values:i,dates:a.slice(),timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone},Ve.set(e,n)}else s&&delete s[t];return a},Qe=(e,t)=>"today"===e?(()=>{let e=new Date;return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().substring(0,10)})():e instanceof Date||"number"==typeof e||"string"==typeof e?n([e])[0]:t,et=(e,t,n)=>{g(e,"selectedMonth",t),g(e,"selectedYear",n),g(e,"displayYear",n)},tt=t=>{var i,s;if(t.enableCollapse&&!["default","week"].includes(t.type))throw Error("The «enableCollapse» parameter is only supported by the «default» and «week» calendar types.");g(t,"currentType",t.type),(e=>{if("multiple"===e.type&&(e.displayMonthsCount<=1||e.displayMonthsCount>12)||"multiple"!==e.type&&e.displayMonthsCount>1)throw Error("For the «multiple» calendar type, the «displayMonthsCount» parameter can have a value from 2 to 12, and for all others it cannot be greater than 1.");g(e,"displayMonthsCount",e.displayMonthsCount?e.displayMonthsCount:"multiple"===e.type?2:1)})(t),(t=>{var n,i,s;let o=Qe(t.dateMin,t.dateMin),a=Qe(t.dateMax,t.dateMax),l=Qe(t.displayDateMin,o),r=Qe(t.displayDateMax,a);if(g(t,"dateToday",Qe(t.dateToday,t.dateToday)),g(t,"displayDateMin",l?e(o)>=e(l)?o:l:o),g(t,"displayDateMax",r?e(a)<=e(r)?a:r:a),g(t,"displayDateMin",t.disableDatesPast&&!t.disableAllDates&&e(l)<e(t.context.dateToday)||t.disableAllDates?t.context.dateToday:l),g(t,"displayDateMax",t.disableAllDates?t.context.dateToday:r),g(t,"disableDates",t.disableDates[0]&&!t.disableAllDates?Je(t,"disableDates"):t.disableAllDates?[t.context.displayDateMin]:[]),g(t,"enableDates",t.enableDates[0]?Je(t,"enableDates"):[]),null!=(n=t.context.enableDates)&&n[0]&&null!=(i=t.context.disableDates)&&i[0]){let e=new Set(t.context.enableDates);g(t,"disableDates",t.context.disableDates.filter(t=>!e.has(t)))}null!=(s=t.context.enableDates)&&s[0]&&t.disableAllDates&&(g(t,"displayDateMin",t.context.enableDates[0]),g(t,"displayDateMax",t.context.enableDates[t.context.enableDates.length-1])),g(t,"dateMin",t.displayDisabledDates?o:t.context.displayDateMin),g(t,"dateMax",t.displayDisabledDates?a:t.context.displayDateMax)})(t),(t=>{var i;if(t.enableJumpToSelectedDate&&null!=(i=t.selectedDates)&&i[0]&&void 0===t.selectedMonth&&void 0===t.selectedYear){let i=e(n(t.selectedDates)[0]);return void et(t,i.getMonth(),i.getFullYear())}if((t=>{let i=e=>{let n=new Date(e);et(t,n.getMonth(),n.getFullYear())};return t.displayDateMin&&"today"!==t.displayDateMin&&(s=t.displayDateMin,o=new Date,new Date(s).getTime()>o.getTime())?(i(e(Qe(t.selectedDates.length&&t.selectedDates[0]?n(t.selectedDates)[0]:t.displayDateMin,t.displayDateMin))),!0):!(!t.displayDateMax||"today"===t.displayDateMax||!((e,t)=>new Date(e).getTime()<t.getTime())(t.displayDateMax,new Date)||(i(e(Qe(t.selectedDates.length&&t.selectedDates[0]?n(t.selectedDates)[0]:t.displayDateMax,t.displayDateMax))),0));var s,o})(t))return;let s=void 0!==t.selectedMonth&&Number(t.selectedMonth)>=0&&Number(t.selectedMonth)<12,o=void 0!==t.selectedYear&&Number(t.selectedYear)>=0&&Number(t.selectedYear)<=9999;et(t,s?Number(t.selectedMonth):e(t.context.dateToday).getMonth(),o?Number(t.selectedYear):e(t.context.dateToday).getFullYear())})(t),(e=>{var t;g(e,"selectedDates",null!=(t=e.selectedDates)&&t[0]?n(e.selectedDates):[])})(t),null==(i=u(t).weeks)||i.init(t),null==(s=u(t).time)||s.init(t)},nt=(e,{year:t,month:n,dates:i,time:s,locale:o},a=!0,l)=>{var r,c,d,h;U(e);let _=u(e);null==(r=_.motion)||r.reset(e),null==(c=_.time)||c.destroy(e),null==(d=_.annotations)||d.destroy(e),D(e);let m={year:e.selectedYear,month:e.selectedMonth,dates:e.selectedDates,time:e.selectedTime};var p;e.selectedYear=t?m.year:e.context.selectedYear,e.selectedMonth=n?m.month:e.context.selectedMonth,e.selectedTime=s?m.time:e.context.selectedTime,e.selectedDates="only-first"===i&&null!=(h=e.context.selectedDates)&&h[0]?[e.context.selectedDates[0]]:!0===i?m.dates:e.context.selectedDates,o&&g(e,"locale",{months:{short:[],long:[]},weekdays:{short:[],long:[]}}),tt(e),a&&(l&&Oe(e),l&&l.structure===Z(e)?($e(e),null==(p=_.time)||p.render(e),Fe(e,!0)):qe(e,!1)),e.selectedYear=m.year,e.selectedMonth=m.month,e.selectedDates=m.dates,e.selectedTime=m.time,"multiple-ranged"===e.selectionDatesMode&&M(e,null,!!i),a&&Q(e,!0)},at=(e,t,n)=>{if(!e.context.isInit)throw Error(F);m(e),nt(e,Le(Le({},{year:!0,month:!0,dates:!0,time:!0,locale:!0}),t),!(e.inputMode&&!e.context.inputModeInit),n),e.onUpdate&&e.onUpdate(e)},lt=["extensions","context","init","update","destroy","show","hide","set","queryAndMemoize"],ot=(e,t,n=!0)=>{let i=Object.keys(t);for(let s=0;s<i.length;s++){let o=i[s];"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&(n&<.includes(String(o))||("object"!=typeof e[o]||null===e[o]||"object"!=typeof t[o]||null===t[o]||t[o]instanceof Date||Array.isArray(t[o])?void 0!==t[o]&&(e[o]=t[o]):ot(e[o],t[o],!1)))}},rt={application:"Calendar",navigation:"Calendar Navigation",arrowNext:{month:"Next month",year:"Next list of years",week:"Next week"},arrowPrev:{month:"Previous month",year:"Previous list of years",week:"Previous week"},month:"Select month, current selected month:",months:"List of months",year:"Select year, current selected year:",years:"List of years",week:"Days of the week",weekNumber:"Numbers of weeks in a year",collapse:"Collapse to a single week",expand:"Expand to the whole month",dates:"Dates in the current month",selectingTime:"Selecting a time ",inputHour:"Hours",inputMinute:"Minutes",rangeHour:"Slider for selecting hours",rangeMinute:"Slider for selecting minutes",btnKeeping:"Switch AM/PM, current position:"},it={calendar:"vc",controls:"vc-controls",grid:"vc-grid",column:"vc-column",header:"vc-header",headerContent:"vc-header__content",month:"vc-month",year:"vc-year",arrowPrev:"vc-arrow vc-arrow_prev",arrowNext:"vc-arrow vc-arrow_next",wrapper:"vc-wrapper",content:"vc-content",months:"vc-months",monthsRow:"vc-months__row",monthsCell:"vc-months__cell",monthsMonth:"vc-months__month",years:"vc-years",yearsRow:"vc-years__row",yearsCell:"vc-years__cell",yearsYear:"vc-years__year",week:"vc-week",weekDay:"vc-week__day",weekDayBtn:"vc-week__day-btn",weekNumbers:"vc-week-numbers",weekNumbersTitle:"vc-week-numbers__title",weekNumbersContent:"vc-week-numbers__content",weekNumber:"vc-week-number",collapse:"vc-collapse",dates:"vc-dates",datesRow:"vc-dates__row",date:"vc-date",dateBtn:"vc-date__btn",datePopup:"vc-date__popup",dateRangeTooltip:"vc-date-range-tooltip",time:"vc-time",timeContent:"vc-time__content",timeHour:"vc-time__hour",timeMinute:"vc-time__minute",timeKeeping:"vc-time__keeping",timeRanges:"vc-time__ranges",timeRange:"vc-time__range"},st=class{constructor(){Ne(this,"type","default"),Ne(this,"inputMode",!1),Ne(this,"openOnFocus",!0),Ne(this,"positionToInput","left"),Ne(this,"animation",!1),Ne(this,"firstWeekday",1),Ne(this,"monthsToSwitch",1),Ne(this,"themeAttrDetect","html[data-theme]"),Ne(this,"locale","en"),Ne(this,"dateToday","today"),Ne(this,"dateMin","1970-01-01"),Ne(this,"dateMax","2470-12-31"),Ne(this,"displayDateMin",void 0),Ne(this,"displayDateMax",void 0),Ne(this,"displayDatesOutside",!0),Ne(this,"displayDisabledDates",!1),Ne(this,"displayMonthsCount",void 0),Ne(this,"disableDates",[]),Ne(this,"disableAllDates",!1),Ne(this,"disableDatesPast",!1),Ne(this,"disableDatesGaps",!1),Ne(this,"disableWeekdays",[]),Ne(this,"disableToday",!1),Ne(this,"enableDates",[]),Ne(this,"enableEdgeDatesOnly",!0),Ne(this,"enableDateToggle",!0),Ne(this,"enableWeekNumbers",!1),Ne(this,"enableMonthChangeOnDayClick",!0),Ne(this,"enableJumpToSelectedDate",!1),Ne(this,"enableCollapse",!1),Ne(this,"enableSwipe",!1),Ne(this,"selectionDatesMode","single"),Ne(this,"selectionMonthsMode",!0),Ne(this,"selectionYearsMode",!0),Ne(this,"selectionTimeMode",!1),Ne(this,"selectedDates",[]),Ne(this,"selectedMonth",void 0),Ne(this,"selectedYear",void 0),Ne(this,"selectedHolidays",[]),Ne(this,"selectedWeekends",[0,6]),Ne(this,"selectedTime",void 0),Ne(this,"selectedTheme","system"),Ne(this,"timeMinHour",0),Ne(this,"timeMaxHour",23),Ne(this,"timeMinMinute",0),Ne(this,"timeMaxMinute",59),Ne(this,"timeControls","all"),Ne(this,"timeStepHour",1),Ne(this,"timeStepMinute",1),Ne(this,"sanitizerHTML",z),Ne(this,"onClickDate",void 0),Ne(this,"onClickWeekDay",void 0),Ne(this,"onClickWeekNumber",void 0),Ne(this,"onClickTitle",void 0),Ne(this,"onClickMonth",void 0),Ne(this,"onClickYear",void 0),Ne(this,"onClickArrow",void 0),Ne(this,"onChangeTime",void 0),Ne(this,"onChangeToInput",void 0),Ne(this,"onCreateDateRangeTooltip",void 0),Ne(this,"onCreateDateEls",void 0),Ne(this,"onCreateMonthEls",void 0),Ne(this,"onCreateYearEls",void 0),Ne(this,"onInit",void 0),Ne(this,"onUpdate",void 0),Ne(this,"onDestroy",void 0),Ne(this,"onShow",void 0),Ne(this,"onHide",void 0),Ne(this,"popups",{}),Ne(this,"labels",Le(Le({},rt),{},{arrowNext:Le({},rt.arrowNext),arrowPrev:Le({},rt.arrowPrev)})),Ne(this,"layouts",{default:"",multiple:"",month:"",year:"",week:""}),Ne(this,"styles",Le({},it))}},pt=(e,t)=>{var n;if("multiple"!==e.type)return{currentValue:null,columnID:0};let i=e.context.mainElement.querySelectorAll('[data-vc="column"]'),s=Array.from(i).findIndex(e=>e.closest(`[data-vc-column="${t}"]`));return{currentValue:s>=0?Number(null==(n=i[s].querySelector(`[data-vc="${t}"]`))?void 0:n.getAttribute(`data-vc-${t}`)):null,columnID:Math.max(s,0)}},ht=(e,t,n)=>{let{currentValue:i,columnID:s}=pt(e,t);return"month"===e.context.currentType&&s>=0?n-s:"year"===e.context.currentType&&e.context.selectedYear!==i?n-1:n},vt=Object.freeze({name:"months",layout:e=>`\n <div class="${_(e.styles.controls)}" data-vc="controls" role="group" aria-label="${_(e.labels.navigation)}">\n <#ArrowPrev [month] />\n <#ArrowNext [month] />\n </div>\n <div class="${_(e.styles.grid)}" data-vc="grid">\n <#Multiple>\n <div class="${_(e.styles.column)}" data-vc="column" role="group">\n <div class="${_(e.styles.header)}" data-vc="header">\n <div class="${_(e.styles.headerContent)}" data-vc-header="content" aria-live="polite" aria-atomic="true">\n <#Month />\n <#Year />\n </div>\n </div>\n <div class="${_(e.styles.wrapper)}" data-vc="wrapper">\n <#WeekNumbers />\n <div class="${_(e.styles.content)}" data-vc="content" role="grid">\n <#Week />\n <#Dates />\n </div>\n </div>\n </div>\n <#/Multiple>\n <#DateRangeTooltip />\n </div>\n <#ControlTime />\n`,render:(e,t)=>{var n;if("multiple"===e.context.currentType)return null==(n=u(e).time)||n.destroy(e),e.context.mainElement.innerHTML=e.sanitizerHTML(((e,t)=>t.replace(RegExp("<#Multiple>(.*?)<#\\/Multiple>","gs"),(t,n)=>{let i=Array(e.context.displayMonthsCount).fill(n).join("");return e.sanitizerHTML(i)}).replace(/[\n\t]/g,""))(e,fe(e,e.layouts.multiple))),!0;if("multiple"!==e.type||!t)return!1;let i=e.context.mainElement.querySelector('[data-vc="controls"]'),s=e.context.mainElement.querySelector('[data-vc="grid"]'),o=t.closest('[data-vc="column"]');return i&&i.remove(),s&&(s.dataset.vcGrid="hidden"),o&&(o.dataset.vcColumn=e.context.currentType),o&&(o.innerHTML=e.sanitizerHTML(fe(e,e.layouts[e.context.currentType]))),!0},column:pt,select:(t,n,i)=>"month"===n?((t,n)=>{let i=n.closest('[data-vc-column="month"]').querySelector('[data-vc="year"]'),s=ht(t,"month",Number(n.dataset.vcMonthsMonth)),o=Number(i.dataset.vcYear),a=e(t.context.dateMin),l=e(t.context.dateMax),r=s<a.getMonth()&&o<=a.getFullYear(),c=s>l.getMonth()&&o>=l.getFullYear();g(t,"selectedYear",o),g(t,"selectedMonth",r?a.getMonth():c?l.getMonth():s)})(t,i):((t,n)=>{let i=ht(t,"year",Number(n.dataset.vcYearsYear)),s=e(t.context.dateMin),o=e(t.context.dateMax),a=t.context.displayMonthsCount-1,{columnID:l}=pt(t,"year"),r=t.context.selectedMonth<s.getMonth()&&i<=s.getFullYear(),c=t.context.selectedMonth>o.getMonth()-a+l&&i>=o.getFullYear(),u=i<s.getFullYear(),d=i>o.getFullYear(),h=r||u?s.getFullYear():c||d?o.getFullYear():i,_=r||u?s.getMonth():c||d?o.getMonth()-a+l:t.context.selectedMonth;g(t,"selectedYear",h),g(t,"selectedMonth",_)})(t,i),rotate:(e,t)=>{var n;let i=12*e.context.selectedYear+e.context.selectedMonth-t.month;if(!i||Math.abs(i)>=t.count)return;let s=Array.from(e.context.mainElement.querySelectorAll('[data-vc="column"]')),o=null==(n=s[0])?void 0:n.parentElement;if(!o||s.length!==t.count||s.some(e=>e.parentElement!==o)||Array.from(o.childNodes).some(e=>{var t;return 1===e.nodeType?!s.includes(e):3!==e.nodeType||!(null==(t=e.textContent)||!t.trim())}))return;let a=[];if(i>0){let e=s[s.length-1].nextSibling;for(let n=0;n<i;n++){let l=s[n].nextSibling;3===(null==l?void 0:l.nodeType)&&l!==e&&o.insertBefore(l,e),o.insertBefore(s[n],e),a.push(t.count-i+n)}}else for(let e=t.count+i;e<t.count;e++){let n=s[e].previousSibling;o.insertBefore(s[e],s[0]),3===(null==n?void 0:n.nodeType)&&o.insertBefore(n,s[0]),a.push(e-t.count-i)}return a}}),on=class e extends st{constructor(t,n){var o;super(),Ne(this,"extensions",void 0),Ne(this,"init",()=>(e=>{var t;if(e.context.isInit)throw Error("The calendar has already been initialized, calling init() again is not allowed. Create a new Calendar instance instead.");if(m(e),g(e,"originalElement",e.context.mainElement.cloneNode(!0)),g(e,"isInit",!0),e.inputMode){let t=(e=>{g(e,"inputElement",e.context.mainElement);let t=e.context.inputElement;["input","button","textarea"].includes(t.localName)&&(t.setAttribute("aria-haspopup","dialog"),("button"===t.localName||"combobox"===t.getAttribute("role"))&&t.setAttribute("aria-expanded","false"));let n=()=>{e.context.inputModeInit?O(e):(e=>{var t;let n=document.createElement("div");n.className=e.styles.calendar,n.dataset.vc="calendar",n.dataset.vcInput="",n.dataset.vcCalendarHidden="",Object.assign(n.style,{left:"0",top:"0"}),S(n);let i=w(e.context.mainElement),s=i===document?document.body:i;g(e,"inputModeInit",!0),g(e,"isShowInInputMode",!1),g(e,"mainElement",n),s.appendChild(e.context.mainElement),nt(e,{year:!0,month:!0,dates:!0,time:!0,locale:!0}),O(e),e.onInit&&e.onInit(e),e.context.isDestroyed||(Pe(e),null==(t=u(e).motion)||t.bind(e),Ze(e))})(e)};e.context.inputElement.addEventListener("click",n);let i="function"==typeof e.openOnFocus||!0===e.openOnFocus,s=()=>{(e=>E.has(e))(e)?(e=>{E.delete(e)})(e):(e=>f(e,e.openOnFocus))(e)&&n()};i&&e.context.inputElement.addEventListener("focus",s);let o=t=>{let n="Tab"===t.key&&!t.shiftKey,i=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key);(n||i)&&(t=>{var n;if(!e.context.isShowInInputMode||w(e.context.mainElement).activeElement!==e.context.inputElement)return!1;let i=e=>e.tabIndex>=0&&!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"),s=null==(n=document.createTreeWalker(e.context.mainElement,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>i(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}).nextNode())?i(e.context.mainElement)?e.context.mainElement:null:n;!s||s.tabIndex<0||(t.preventDefault(),s.focus())})(t)};return e.context.inputElement.addEventListener("keydown",o),()=>{t.removeEventListener("click",n),i&&t.removeEventListener("focus",s),t.removeEventListener("keydown",o)}})(e);return g(e,"cleanupInput",t),t}if(tt(e),qe(e),"multiple-ranged"===e.selectionDatesMode&&1===e.context.selectedDates.length&&(M(e,null),Fe(e)),e.onInit&&e.onInit(e),!e.context.isDestroyed)return Pe(e),null==(t=u(e).motion)||t.bind(e),Ze(e)})(this)),Ne(this,"update",e=>at(this,e)),Ne(this,"destroy",()=>{let t=this.inputMode?this.context.inputElement:this.context.mainElement;if((e=>{var t,n,i,s,o,a,r,c;if(!e.context.isInit)throw Error(F);if(e.context.isDestroyed)throw Error("The calendar has already been destroyed, calling destroy() again is not allowed.");B(e);let d=u(e);var h,_,m,p,E;null==(t=d.motion)||t.destroy(e),null==(n=d.time)||n.destroy(e),null==(i=d.annotations)||i.destroy(e),D(e),(e=>{l.delete(e)})(e),H(e),null==(s=(o=e.context).cleanupInput)||s.call(o),g(e,"cleanupInput",void 0),null==(a=e.context.cleanupHandlers)||a.forEach(e=>e()),g(e,"cleanupHandlers",[]),g(e,"isShowInInputMode",!1),null==(r=(c=e.context).cleanupSystemTheme)||r.call(c),e.inputMode?(e.context.mainElement!==e.context.inputElement&&(null==(m=e.context.mainElement.parentElement)||m.removeChild(e.context.mainElement)),null==(h=e.context.inputElement)||null==(_=h.replaceWith)||_.call(h,e.context.originalElement),g(e,"inputElement",void 0)):null==(p=(E=e.context.mainElement).replaceWith)||p.call(E,e.context.originalElement),g(e,"mainElement",e.context.originalElement),g(e,"isDestroyed",!0),e.onDestroy&&e.onDestroy(e)})(this),t)for(let[n,i]of e.memoizedElements)i===t&&e.memoizedElements.delete(n)}),Ne(this,"show",()=>q(this)),Ne(this,"hide",()=>$(this)),Ne(this,"set",(e,t)=>((e,t,n)=>{m(e,t);let i=Object.keys(t);t.extensions&&i.splice(i.indexOf("extensions"),1);let s=1===i.length&&"selectedDates"===i[0]?J(e):void 0;ot(e,t),e.context.isInit&&at(e,n,s)})(this,e,t)),Ne(this,"context",void 0),this.context=Le(Le({},this.context),{},{locale:{months:{short:[],long:[]},weekdays:{short:[],long:[]}}}),g(this,"mainElement","string"==typeof t?null==(o=e.memoizedElements.get(t))?this.queryAndMemoize(t):o:t);let a=null==n?void 0:n.extensions;this.extensions=null!=a&&a.length?Object.freeze(Array.from(new Set(a))):d,(e=>{if(!e.extensions.length)return;let t={};for(let n of e.extensions){let e=n,s=e.name;if(!i.includes(s))throw Error("Unknown calendar extension.");if(t[s]&&t[s]!==e)throw Error(`Conflicting calendar extension: ${s}.`);Object.assign(t,{[s]:e})}s.set(e,t)})(this),n&&ot(this,n)}queryAndMemoize(t){let n=document.querySelector(t);if(!n)throw Error((e=>`${e} is not found, check the first argument passed to new Calendar. If the element lives inside a Shadow DOM, a string selector can't reach it - resolve the element yourself (e.g. shadowRoot.querySelector(...)) and pass it directly instead.`)(t));return e.memoizedElements.set(t,n),n}};Ne(on,"memoizedElements",new Map);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 on(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:[vt],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,i]=e.split("-");return new Date(t,n-1,i)}_formatDate(e){const t=this._parseDate(e),n="default"===this._config.locale?void 0:this._config.locale,{dateFormat:i}=this._config;return"function"==typeof i?i(t,n):i&&"object"==typeof i?new Intl.DateTimeFormat(n,i).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 i=SelectorEngine.getElementFromSelector(t);if(!i)return;["A","AREA"].includes(t.tagName)&&n.preventDefault();const s=Manipulator.getDataAttributes(t),o=t.closest("dialog[open]");if(!o||o===i)return EventHandler.one(i,EVENT_SHOW$3,n=>{n.defaultPrevented||e._registerFocusRestoration(i,t)}),void e.getOrCreateInstance(i,s).toggle(t);if(o.classList.contains("dialog-swap-in"))return;const a=e.getOrCreateInstance(i,s),l=e.getOrCreateInstance(o);a._canShow(t)&&l._canHide()&&(e._registerFocusRestoration(i,t),i.classList.add("dialog-swap-in"),EventHandler.one(i,"shown.bs.dialog",()=>{i.classList.remove("dialog-swap-in")}),a._show(t),o.classList.add("dialog-instant"),EventHandler.one(o,EVENT_HIDDEN$4,()=>{o.classList.remove("dialog-instant")}),l._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 i=(new window.DOMParser).parseFromString(e,"text/html"),s=[...i.body.querySelectorAll("*")];for(const e of s){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[...e.attributes],s=[...t["*"]||[],...t[n]||[]];for(const t of i)allowedAttribute(t,s)||e.removeAttribute(t.nodeName)}return i.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 i=document.createElement("button");i.type="button",i.className="nav-link nav-overflow-toggle",i.setAttribute("data-bs-toggle","menu"),i.setAttribute("data-bs-placement",this._config.menuPlacement),i.setAttribute("data-bs-strategy",this._config.menuStrategy),i.setAttribute("aria-expanded","false"),""===t&&i.setAttribute("aria-label","More");const s=document.createElement("span");if(s.className="nav-overflow-icon",s.innerHTML=sanitizeHtml(this._resolveIcon(),DefaultIconAllowlist),""===t)i.append(s);else{const e=document.createElement("span");e.className="nav-overflow-text",e.textContent=t,"end"===this._config.iconPlacement?i.append(e,s):i.append(s,e)}const o=document.createElement("div");o.className="nav-overflow-menu menu",n.append(i,o),this._nav.append(n),this._overflowToggle=i,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 i=this._navGap(),s=e-this._items.filter(e=>e.classList.contains(CLASS_NAME_KEEP)).reduce((e,t)=>e+t.offsetWidth+i,0)-(t?t.offsetWidth+i:0);let o=0,a=[];for(const e of n)o+=e.offsetWidth+i,o>s+1&&a.push(e);this._items.length-a.length<this._config.threshold&&this._items.length>this._config.threshold&&(a=this._items.slice(this._config.threshold).filter(e=>!e.classList.contains(CLASS_NAME_KEEP))),this._applyOverflow(a,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 i=document.createElement("div");return i.className="submenu",i.append(this._cloneAsMenuItem(t,!0),n),i}_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 i=SelectorEngine.findOne(".menu",e);if(i&&!i.classList.contains("nav-overflow-menu"))return this._itemMenus.set(e,i),i;const s=this._itemMenus.get(e);return s?.isConnected?s:(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$1()?e.leftCallback=()=>this.hide():e.rightCallback=()=>this.hide():isRTL$1()?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,i]=this._config.thresholds;return e<=t?"weak":e<=n?"fair":e<=i?"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,i=0;for(let s=0;s<this._length;s++){const o=document.createElement("div");if(o.className="otp-slot",e.append(o),this._slots.push(o),Array.isArray(t)&&t.length>0&&(i++,i===t[n]&&s<this._length-1)){const s=document.createElement("div");s.className="otp-separator",s.textContent=this._config.separator,e.append(s),n=Math.min(n+1,t.length-1),i=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 i=this._input.selectionStart??this._input.value.length,s=this._input.selectionEnd??i;n.length===this._length&&(i=0,s=this._input.value.length);const o=n.slice(0,this._length-this._input.value.length+s-i);e.preventDefault(),o&&(this._input.setRangeText(o,i,s,"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 i=Math.min(this._input.selectionStart??0,this._length-1),s=[...this._input.value];return s[i]=t,this._input.value=s.join("").slice(0,this._length),this._selectSlot(i+1),void this._afterValueChange()}if("deleteContentBackward"===t){e.preventDefault();const t=this._input.selectionStart??0,n=this._input.selectionEnd??t,i=[...this._input.value];n>t?(i.splice(t,n-t),this._input.value=i.join(""),this._selectSlot(t)):t>0&&(i.splice(t-1,1),this._input.value=i.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[i,s]of this._slots.entries()){const o=e[i]??"";s.textContent=o&&this._config.mask?"•":o,s.classList.toggle("otp-slot-filled",Boolean(o)),s.classList.toggle("otp-slot-active",t&&i===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:i=!1}=t,s=this._getChipElements();if(s.includes(e)){if(i&&this._anchorChip){const t=s.indexOf(this._anchorChip),i=s.indexOf(e),o=Math.min(t,i),a=Math.max(t,i);if(!n){const e=this._anchorChip;this.clearSelection(),this._anchorChip=e}for(let e=o;e<=a;e++)this._selectedChips.add(s[e]),s[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 i=this._getChipElements(),s=i.indexOf(n);switch(t){case"Backspace":case"Delete":e.preventDefault(),this._handleChipDelete(s,i);break;case"ArrowLeft":e.preventDefault(),this._navigateChip(i,s,-1,e.shiftKey);break;case"ArrowRight":e.preventDefault(),this._navigateChip(i,s,1,e.shiftKey);break;case"Home":e.preventDefault(),this._navigateToEdge(i,0,e.shiftKey);break;case"End":case"Escape":e.preventDefault(),this.clearSelection(),this._input?.focus();break;case"a":this._handleSelectAll(e,i)}}_handleChipDelete(e,t){if(0===this._selectedChips.size)return;const n=Math.min(e,t.length-this._selectedChips.size-1);this.removeSelected();const i=this._getChipElements();if(i.length>0){const e=Math.max(0,Math.min(n,i.length-1));i[e].focus(),this.selectChip(i[e])}else this._input?.focus()}_navigateChip(e,t,n,i){const s=t+n;if(n<0&&s>=0){const t=e[s];this.selectChip(t,i?{addToSelection:!0,rangeSelect:!0}:{}),t.focus()}else if(n>0&&s<e.length){const t=e[s];this.selectChip(t,i?{addToSelection:!0,rangeSelect:!0}:{}),t.focus()}else n>0&&(this.clearSelection(),this._input?.focus())}_navigateToEdge(e,t,n){if(0===e.length)return;const i=e[t];this.selectChip(i,n?{rangeSelect:!0}:{}),i.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 i=n.split(t);for(const e of i)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 i=SelectorEngine.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?isElement$1(t)?this._putElementInTemplate(getElement(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.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$1()?"left":"right",BOTTOM:"bottom",LEFT:isRTL$1()?"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){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:i}=this._config;const s=this._element.closest("dialog[open]");if(s&&i===document.body&&(i=s),this._element.ownerDocument.documentElement.contains(this.tip)||(i.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 i=this._getFloatingMiddleware(n),s=this._getFloatingConfig(t,i),{x:o,y:a,placement:l,middlewareData:r}=await computePosition(this._element,e,s);if(Object.assign(e.style,{position:"absolute",left:`${o}px`,top:`${a}px`}),n&&(n.style.position="absolute"),Manipulator.setDataAttribute(e,"placement",l),n&&r.arrow){const{x:e,y:t}=r.arrow,i=l.startsWith("top")||l.startsWith("bottom");Object.assign(n.style,{left:i&&void 0!==e?`${e}px`:"",top:i||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(),i=this._max()-n||1,s=[];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)/i,0),1);s.push({ratio:o,label:e.label})}}if(0===s.length)return;s.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,...s.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 s.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 i=this._rootElement||window,s=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-s)<=2)return i.scrollTo?i.scrollTo({top:s,behavior:"auto"}):i.scrollTop=s,void this._settleNavigation(t.hash,n);this._pendingNavigation={hash:t.hash,section:n},this._armSettle(),i.scrollTo?i.scrollTo({top:s,behavior:"smooth"}):i.scrollTop=s}))}_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 i=document.getElementById(e);i&&this._element.contains(i)&&isVisible(i)&&(this._sectionByLink.set(n,i),this._linkBySection.set(i,n),t.has(i)||(t.add(i),this._sections.push(i)))}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 i=(activationIds.get(this._parent)||0)+1;activationIds.set(this._parent,i),this._deactivate(t,e),await this._activate(e,t,i)}async _activate(e,t,n){if(!e)return;if(e.classList.add("active"),"tab"!==e.getAttribute("role"))return void e.classList.add("show");const i=SelectorEngine.getElementFromSelector(e);this._activate(i),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}))},i??e,getTransitionDurationFromElement(i)>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 i;if([HOME_KEY,END_KEY].includes(t.key))i=t.key===HOME_KEY?n[0]:n.at(-1);else{const e=[ARROW_RIGHT_KEY,ARROW_DOWN_KEY].includes(t.key);i=getNextActiveElement(n,t.target,e,!0)}i&&(i.focus({preventScroll:!0}),e.getOrCreateInstance(i).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),i=SelectorEngine.findOne(SELECTOR_MENU_TOGGLE,n);if(!i)return;const s=SelectorEngine.findOne(".menu",n);i.classList.toggle("active",t),s&&s.classList.toggle("show",t),setAriaAttribute(i,"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};
|
|
9
|
+
//# sourceMappingURL=bootstrap.bundle.min.js.map
|