UNPKG

@coreui/coreui-pro

Version:

The most popular front-end framework for developing responsive, mobile-first projects on the web rewritten by the CoreUI Team

6 lines 172 kB
/*! * CoreUI v5.14.2 (https://coreui.io) * Copyright 2025 The CoreUI Team (https://github.com/orgs/coreui/people) * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE) */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap=t(e.Popper)}(this,(function(e){"use strict";function t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const i in e)if("default"!==i){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}return t.default=e,Object.freeze(t)}const i=t(e),s=new Map,n={set(e,t,i){s.has(e)||s.set(e,new Map);const n=s.get(e);n.has(t)||0===n.size?n.set(t,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(e,t)=>s.has(e)&&s.get(e).get(t)||null,remove(e,t){if(!s.has(e))return;const i=s.get(e);i.delete(t),0===i.size&&s.delete(e)}},a="transitionend",o=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),r=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},l=e=>{e.dispatchEvent(new Event(a))},c=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),h=e=>c(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(o(e)):null,d=e=>{if(!c(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),i=e.closest("details:not([open])");if(!i)return t;if(i!==e){const t=e.closest("summary");if(t&&t.parentNode!==i)return!1;if(null===t)return!1}return t},u=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),_=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?_(e.parentNode):null},g=()=>{},m=e=>{e.offsetHeight},p=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],b=()=>"rtl"===document.documentElement.dir,v=e=>{var t;t=()=>{const t=p();if(t){const i=e.NAME,s=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=s,e.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of f)e()})),f.push(t)):t()},y=(e,t=[],i=e)=>"function"==typeof e?e.call(...t):i,w=(e,t,i=!0)=>{if(!i)return void y(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const s=Number.parseFloat(t),n=Number.parseFloat(i);return s||n?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let n=!1;const o=({target:i})=>{i===t&&(n=!0,t.removeEventListener(a,o),y(e))};t.addEventListener(a,o),setTimeout((()=>{n||l(t)}),s)},D=(e,t,i,s)=>{const n=e.length;let a=e.indexOf(t);return-1===a?!i&&s?e[n-1]:e[0]:(a+=i?1:-1,s&&(a=(a+n)%n),e[Math.max(0,Math.min(a,n-1))])},k=/[^.]*(?=\..*)\.|.*/,E=/\..*/,L=/::\d+$/,C={};let A=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","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"]);function $(e,t){return t&&`${t}::${A++}`||e.uidEvent||A++}function N(e){const t=$(e);return e.uidEvent=t,C[t]=C[t]||{},C[t]}function I(e,t,i=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===i))}function O(e,t,i){const s="string"==typeof t,n=s?i:t||i;let a=B(e);return S.has(a)||(a=e),[s,n,a]}function x(e,t,i,s,n){if("string"!=typeof t||!e)return;let[a,o,r]=O(t,i,s);if(t in T){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};o=e(o)}const l=N(e),c=l[r]||(l[r]={}),h=I(c,o,a?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=$(o,t.replace(k,"")),u=a?function(e,t,i){return function s(n){const a=e.querySelectorAll(t);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(const r of a)if(r===o)return j(n,{delegateTarget:o}),s.oneOff&&F.off(e,n.type,t,i),i.apply(o,[n])}}(e,i,o):function(e,t){return function i(s){return j(s,{delegateTarget:e}),i.oneOff&&F.off(e,s.type,t),t.apply(e,[s])}}(e,o);u.delegationSelector=a?i:null,u.callable=o,u.oneOff=n,u.uidEvent=d,c[d]=u,e.addEventListener(r,u,a)}function P(e,t,i,s,n){const a=I(t[i],s,n);a&&(e.removeEventListener(i,a,Boolean(n)),delete t[i][a.uidEvent])}function M(e,t,i,s){const n=t[i]||{};for(const[a,o]of Object.entries(n))a.includes(s)&&P(e,t,i,o.callable,o.delegationSelector)}function B(e){return e=e.replace(E,""),T[e]||e}const F={on(e,t,i,s){x(e,t,i,s,!1)},one(e,t,i,s){x(e,t,i,s,!0)},off(e,t,i,s){if("string"!=typeof t||!e)return;const[n,a,o]=O(t,i,s),r=o!==t,l=N(e),c=l[o]||{},h=t.startsWith(".");if(void 0===a){if(h)for(const i of Object.keys(l))M(e,l,i,t.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(L,"");r&&!t.includes(n)||P(e,l,o,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;P(e,l,o,a,n?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const s=p();let n=null,a=!0,o=!0,r=!1;t!==B(t)&&s&&(n=s.Event(t,i),s(e).trigger(n),a=!n.isPropagationStopped(),o=!n.isImmediatePropagationStopped(),r=n.isDefaultPrevented());const l=j(new Event(t,{bubbles:a,cancelable:!0}),i);return r&&l.preventDefault(),o&&e.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function j(e,t={}){for(const[i,s]of Object.entries(t))try{e[i]=s}catch(t){Object.defineProperty(e,i,{configurable:!0,get:()=>s})}return e}function H(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(t){return e}}function z(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const V={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${z(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${z(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),t[i]=H(e.dataset[s])}return t},getDataAttribute:(e,t)=>H(e.getAttribute(`data-bs-${z(t)}`))};class R{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 i=c(t)?V.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...c(t)?V.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[s,n]of Object.entries(t)){const t=e[s],a=c(t)?"element":null==(i=t)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${a}" but expected type "${n}".`)}var i}}class Y extends R{constructor(e,t){super(),(e=h(e))&&(this._element=e,this._config=this._getConfig(t),n.set(this._element,this.constructor.DATA_KEY,this))}dispose(){n.remove(this._element,this.constructor.DATA_KEY),F.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){w(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return n.get(h(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.14.2"}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 W=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t?t.split(",").map((e=>o(e))).join(","):null},q={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let s=e.parentNode.closest(t);for(;s;)i.push(s),s=s.parentNode.closest(t);return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!u(e)&&d(e)))},getSelectorFromElement(e){const t=W(e);return t&&q.findOne(t)?t:null},getElementFromSelector(e){const t=W(e);return t?q.findOne(t):null},getMultipleElementsFromSelector(e){const t=W(e);return t?q.find(t):[]}},U=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,s=e.NAME;F.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),u(this))return;const n=q.getElementFromSelector(this)||this.closest(`.${s}`);e.getOrCreateInstance(n)[t]()}))},Q=".bs.alert",K=`close${Q}`,X=`closed${Q}`;class G extends Y{static get NAME(){return"alert"}close(){if(F.trigger(this._element,K).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),F.trigger(this._element,X),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=G.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}U(G,"close"),v(G);const Z='[data-bs-toggle="button"]';class J extends Y{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=J.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}F.on(document,"click.bs.button.data-api",Z,(e=>{e.preventDefault();const t=e.target.closest(Z);J.getOrCreateInstance(t).toggle()})),v(J);const ee=(e,t)=>{if(null===e)return null;if(e instanceof Date)return e;if("week"===t)return(e=>{const[t,i]=e.split(/[Ww]/),s=new Date(Number(t),0,4);return s.setDate(s.getDate()-(s.getDay()||7)+1+7*(Number(i)-1)),s})(e);if("month"===t||"year"===t){const t=new Date(Date.parse(e)),i=6e4*t.getTimezoneOffset();return new Date(t.getTime()+i)}return new Date(Date.parse(e))},te=(e,t)=>{const i=Math.ceil(e.length/t);return Array.from({length:t}).fill("").map(((t,s)=>e.slice(s*i,(s+1)*i)))},ie=(e,t)=>{if(null===e)return null;if("week"===t)return`${e.getFullYear()}W${se(e)}`;if("month"===t){const t=`0${e.getMonth()+1}`.slice(-2);return`${e.getFullYear()}-${t}`}return"year"===t?`${e.getFullYear()}`:e},se=e=>{const t=new Date(e);t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);const i=new Date(t.getFullYear(),0,4);return 1+Math.round((t.getTime()-i.getTime())/864e5/7)},ne=(e,t,i,s)=>{if(t&&e<t)return!0;if(i&&e>i)return!0;if(void 0===s)return!1;if("function"==typeof s)return s(e);if(s instanceof Date&&ce(e,s))return!0;if(Array.isArray(s)&&s)for(const t of s){if("function"==typeof t&&t(e))return!0;if(Array.isArray(t)&&ae(e,t[0],t[1]))return!0;if(t instanceof Date&&ce(e,t))return!0}return!1},ae=(e,t,i)=>{const s=ue(e),n=t?ue(t):null,a=i?ue(i):null;return Boolean(n&&a&&n<=s&&s<=a)},oe=(e,t,i)=>!(null===t||!ce(t,e))||!(null===i||!ce(i,e)),re=(e,t,i)=>{if(e&&t){const s=new Date(e);let n=!1;for(;s<t;)if(s.setDate(s.getDate()+1),ne(s,null,null,i)){n=!0;break}return n}return!1},le=(e,t,i)=>{const s=e.getFullYear(),n=e.getMonth(),a=t?12*t.getFullYear()+t.getMonth():null,o=i?12*i.getFullYear()+i.getMonth():null,r=12*s+n;return Boolean(a&&o&&a<=r&&r<=o)},ce=(e,t)=>e instanceof Date&&t instanceof Date?e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear():null===e&&null===t,he=e=>{const t=new Date;return ce(e,t)},de=(e,t,i)=>{const s=e.getFullYear(),n=t?t.getFullYear():null,a=i?i.getFullYear():null;return Boolean(n&&a&&n<=s&&s<=a)},ue=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},_e=(e,t)=>{if(null===e)return null;if(!(t instanceof Date))return e;const i=new Date(e);return i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i},ge=".bs.calendar",me=".data-api",pe="ArrowUp",fe="ArrowRight",be="ArrowDown",ve="ArrowLeft",ye=`blur${ge}`,we=`calendarDateChange${ge}`,De=`calendarMouseleave${ge}`,ke=`cellHover${ge}`,Ee=`endDateChange${ge}`,Le=`focus${ge}`,Ce=`keydown${ge}`,Ae=`selectEndChange${ge}`,Te=`startDateChange${ge}`,Se=`mouseenter${ge}`,$e=`mouseleave${ge}`,Ne=`load${ge}${me}`,Ie=`click${ge}${me}`,Oe="calendar-cell",xe="calendar-cell-inner",Pe="calendar-row",Me=".btn-double-next",Be=".btn-double-prev",Fe=".btn-month",je=".btn-next",He=".btn-prev",ze=".btn-year",Ve=".calendar-cell",Re=`${Ve}[tabindex="0"]`,Ye=".calendar-row",We=`${Ye}[tabindex="0"]`,qe={ariaNavNextMonthLabel:"Next month",ariaNavNextYearLabel:"Next year",ariaNavPrevMonthLabel:"Previous month",ariaNavPrevYearLabel:"Previous year",calendarDate:null,calendars:1,disabledDates:null,endDate:null,firstDayOfWeek:1,locale:"default",maxDate:null,minDate:null,range:!1,selectAdjacementDays:!1,selectEndDate:!1,selectionType:"day",showAdjacementDays:!0,showWeekNumber:!1,startDate:null,weekdayFormat:2,weekNumbersLabel:null},Ue={ariaNavNextMonthLabel:"string",ariaNavNextYearLabel:"string",ariaNavPrevMonthLabel:"string",ariaNavPrevYearLabel:"string",calendarDate:"(date|number|string|null)",calendars:"number",disabledDates:"(array|date|function|null)",endDate:"(date|number|string|null)",firstDayOfWeek:"number",locale:"string",maxDate:"(date|number|string|null)",minDate:"(date|number|string|null)",range:"boolean",selectAdjacementDays:"boolean",selectEndDate:"boolean",selectionType:"string",showAdjacementDays:"boolean",showWeekNumber:"boolean",startDate:"(date|number|string|null)",weekdayFormat:"(number|string)",weekNumbersLabel:"(string|null)"};class Qe extends Y{constructor(e,t){super(e),this._config=this._getConfig(t),this._initializeDates(),this._initializeView(),this._createCalendar(),this._addEventListeners()}static get Default(){return qe}static get DefaultType(){return Ue}static get NAME(){return"calendar"}update(e){this._config=this._getConfig(e),this._initializeDates(),this._initializeView(),this._element.innerHTML="",this._createCalendar()}_focusOnFirstAvailableCell(){const e=q.findOne(Re,this._element);e&&e.focus()}_getDate(e){if("week"===this._config.selectionType){const t=q.findOne(Ve,e.closest(Ye));return new Date(V.getDataAttribute(t,"date"))}return new Date(V.getDataAttribute(e,"date"))}_handleCalendarClick(e){const t=e.target.classList.contains(xe)?e.target.parentElement:e.target,i=this._getDate(t),s=new Date(i),n=V.getDataAttribute(t.closest(".calendar"),"calendar-index");return"days"===this._view&&this._setCalendarDate(n?new Date(s.setMonth(s.getMonth()-n)):i),"months"===this._view&&"month"!==this._config.selectionType?(this._setCalendarDate(n?new Date(s.setMonth(s.getMonth()-n)):i),this._view="days",void this._updateCalendar(this._focusOnFirstAvailableCell.bind(this))):"years"===this._view&&"year"!==this._config.selectionType?(this._setCalendarDate(n?new Date(s.setFullYear(s.getFullYear()-n)):i),this._view="months",void this._updateCalendar(this._focusOnFirstAvailableCell.bind(this))):void(ne(i,this._minDate,this._maxDate,this._config.disabledDates)||(this._hoverDate=null,this._selectDate(i),this._updateClassNamesAndAriaLabels()))}_handleCalendarKeydown(e){const t=this._getDate(e.target);if("Space"!==e.code&&"Enter"!==e.key||(e.preventDefault(),this._handleCalendarClick(e)),e.key===fe||e.key===ve||e.key===pe||e.key===be){if(e.preventDefault(),this._maxDate&&t>=ee(this._maxDate,this._config.selectionType)&&(e.key===fe||e.key===be))return;if(this._minDate&&t<=ee(this._minDate,this._config.selectionType)&&(e.key===ve||e.key===pe))return;let i=e.target;"week"===this._config.selectionType&&-1===i.tabIndex&&(i=i.closest(We));const s=q.find("week"===this._config.selectionType?We:Re,this._element),n=s.indexOf(i),a=0===n,o=n===s.length-1,r={start:n,end:s.length-(n+1)},l={ArrowRight:1,ArrowLeft:-1,ArrowUp:"week"===this._config.selectionType&&"days"===this._view?-1:"days"===this._view?-7:-3,ArrowDown:"week"===this._config.selectionType&&"days"===this._view?1:"days"===this._view?7:3};if(e.key===fe&&o||e.key===be&&r.end<l.ArrowDown||e.key===ve&&a||e.key===pe&&r.start<Math.abs(l.ArrowUp)){const t=e=>{const t=q.find(`${Re}, ${We}`,this._element);t.length&&e===fe&&t[0].focus(),t.length&&e===ve&&t[t.length-1].focus(),t.length&&e===be&&t[l.ArrowDown-(s.length-n)].focus(),t.length&&e===pe&&t[t.length-(Math.abs(l.ArrowUp)+1-(n+1))].focus()};return"days"===this._view&&this._modifyCalendarDate(0,e.key===fe||e.key===be?1:-1,t.bind(this,e.key)),"months"===this._view&&this._modifyCalendarDate(e.key===fe||e.key===be?1:-1,0,t.bind(this,e.key)),void("years"===this._view&&this._modifyCalendarDate(e.key===fe||e.key===be?10:-10,0,t.bind(this,e.key)))}if(0===s[n+l[e.key]].tabIndex)return void s[n+l[e.key]].focus();for(let t=n;t<s.length;e.key===fe||e.key===be?t++:t--)if(0===s[t+l[e.key]].tabIndex){s[t+l[e.key]].focus();break}}}_handleCalendarMouseEnter(e){const t=e.target.classList.contains(xe)?e.target.parentElement:e.target,i=this._getDate(t);ne(i,this._minDate,this._maxDate,this._config.disabledDates)||(this._hoverDate=_e(i,this._selectEndDate?this._endDate:this._startDate),F.trigger(this._element,ke,{date:ie(this._hoverDate,this._config.selectionType)}),this._updateClassNamesAndAriaLabels())}_handleCalendarMouseLeave(){this._hoverDate=null,F.trigger(this._element,ke,{date:null}),this._updateClassNamesAndAriaLabels()}_addEventListeners(){F.on(this._element,Ie,Re,(e=>{this._handleCalendarClick(e)})),F.on(this._element,Ce,Re,(e=>{this._handleCalendarKeydown(e)})),F.on(this._element,Se,Re,(e=>{this._handleCalendarMouseEnter(e)})),F.on(this._element,$e,Re,(()=>{this._handleCalendarMouseLeave()})),F.on(this._element,Le,Re,(e=>{this._handleCalendarMouseEnter(e)})),F.on(this._element,ye,Re,(()=>{this._handleCalendarMouseLeave()})),F.on(this._element,Ie,We,(e=>{this._handleCalendarClick(e)})),F.on(this._element,Ce,We,(e=>{this._handleCalendarKeydown(e)})),F.on(this._element,Se,We,(e=>{this._handleCalendarMouseEnter(e)})),F.on(this._element,$e,We,(()=>{this._handleCalendarMouseLeave()})),F.on(this._element,Le,We,(e=>{this._handleCalendarMouseEnter(e)})),F.on(this._element,ye,We,(()=>{this._handleCalendarMouseLeave()})),this._addNavigationEventListeners(),F.on(this._element,$e,"table",(()=>{F.trigger(this._element,De)}))}_addNavigationEventListeners(){const e={[He]:()=>this._modifyCalendarDate(0,-1),[Be]:()=>this._modifyCalendarDate("years"===this._view?-10:-1),[je]:()=>this._modifyCalendarDate(0,1),[Me]:()=>this._modifyCalendarDate("years"===this._view?10:1),[Fe]:()=>{this._view="months",this._updateCalendar()},[ze]:()=>{this._view="years",this._updateCalendar()}};for(const[t,i]of Object.entries(e))F.on(this._element,Ie,t,(e=>{e.preventDefault();const s=q.find(t,this._element).indexOf(e.target.closest(t));i();const n=q.find(t,this._element);n&&n[s]&&n[s].focus()}))}_setCalendarDate(e){this._calendarDate=e,F.trigger(this._element,we,{date:e})}_modifyCalendarDate(e,t=0,i){const s=this._calendarDate.getFullYear(),n=this._calendarDate.getMonth(),a=new Date(s,n,1);e&&a.setFullYear(a.getFullYear()+e),t&&a.setMonth(a.getMonth()+t),this._calendarDate=a,"days"===this._view&&F.trigger(this._element,we,{date:a}),this._updateCalendar(i)}_setEndDate(e){this._endDate=_e(e,this._endDate),F.trigger(this._element,Ee,{date:ie(this._endDate,this._config.selectionType)})}_setStartDate(e){this._startDate=_e(e,this._startDate),F.trigger(this._element,Te,{date:ie(this._startDate,this._config.selectionType)})}_setSelectEndDate(e){this._selectEndDate=e,F.trigger(this._element,Ae,{value:e})}_selectDate(e){if(!ne(e,this._minDate,this._maxDate,this._config.disabledDates))return this._config.range?this._selectEndDate?(this._setSelectEndDate(!1),this._startDate&&this._startDate>e||re(this._startDate,e,this._config.disabledDates)?(this._setStartDate(null),void this._setEndDate(null)):void this._setEndDate(e)):this._endDate&&this._endDate<e||re(e,this._endDate,this._config.disabledDates)?(this._setStartDate(null),void this._setEndDate(null)):(this._setSelectEndDate(!0),void this._setStartDate(e)):void this._setStartDate(e)}_createCalendarPanel(e){var t;const i=((e,t,i)=>0!==t&&"days"===i?new Date(e.getFullYear(),e.getMonth()+t,1):0!==t&&"months"===i?new Date(e.getFullYear()+t,e.getMonth(),1):0!==t&&"years"===i?new Date(e.getFullYear()+12*t,e.getMonth(),1):e)(this._calendarDate,e,this._view),s=i.getFullYear(),n=i.getMonth(),a=document.createElement("div");a.classList.add("calendar"),V.setDataAttribute(a,"calendar-index",e);const o=document.createElement("div");o.classList.add("calendar-nav"),o.innerHTML=`\n <div class="calendar-nav-prev">\n <button class="btn btn-transparent btn-sm btn-double-prev" aria-label="${this._config.ariaNavPrevYearLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-double-prev"></span>\n </button>\n ${"days"===this._view?`<button class="btn btn-transparent btn-sm btn-prev" aria-label="${this._config.ariaNavPrevMonthLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-prev"></span>\n </button>`:""}\n </div>\n <div class="calendar-nav-date" aria-live="polite">\n ${"days"===this._view?`<button class="btn btn-transparent btn-sm btn-month">\n ${i.toLocaleDateString(this._config.locale,{month:"long"})}\n </button>`:""}\n <button class="btn btn-transparent btn-sm btn-year">\n ${i.toLocaleDateString(this._config.locale,{year:"numeric"})}\n </button>\n </div>\n <div class="calendar-nav-next">\n ${"days"===this._view?`<button class="btn btn-transparent btn-sm btn-next" aria-label="${this._config.ariaNavNextMonthLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-next"></span>\n </button>`:""}\n <button class="btn btn-transparent btn-sm btn-double-next" aria-label="${this._config.ariaNavNextYearLabel}">\n <span class="calendar-nav-icon calendar-nav-icon-double-next"></span>\n </button>\n </div>\n `;const r=((e,t,i)=>{const s=((e,t,i)=>{const s=[],n=new Date(e,t),a=n.getFullYear(),o=n.getMonth();let r=6-(6-new Date(a,o,1).getDay())-i;i&&(r=r<0?7+r:r);for(let e=-1*r;e<0;e++)s.push({date:new Date(a,o,e+1),month:"previous"});return s})(e,t,i),n=((e,t)=>{const i=[],s=new Date(e,t+1,0).getDate();for(let n=1;n<=s;n++)i.push({date:new Date(e,t,n),month:"current"});return i})(e,t),a=((e,t,i,s)=>{const n=[],a=42-(i.length+s.length);for(let i=1;i<=a;i++)n.push({date:new Date(e,t+1,i),month:"next"});return n})(e,t,s,n),o=[...s,...n,...a],r=[];for(const[e,t]of o.entries())e%7!=0&&0!==r.length||r.push({days:[]}),(e+1)%7==0&&(r[r.length-1].weekNumber=se(t.date)),r[r.length-1].days.push(t);return r})(s,n,this._config.firstDayOfWeek),l=te(((e,t="short")=>Array.from({length:12},((i,s)=>new Date(2e3,s,1).toLocaleString(e,{month:t}))))(this._config.locale),4),c=te(((e,t=6)=>Array.from({length:2*t},((i,s)=>e-t+s)))(i.getFullYear()),4),h=r[0].days,d=document.createElement("table");return d.innerHTML=`\n ${"days"===this._view?`\n <thead>\n <tr>\n ${this._config.showWeekNumber?`<th class="${Oe}">\n <div class="calendar-header-cell-inner">\n ${null!=(t=this._config.weekNumbersLabel)?t:""}\n </div>\n </th>`:""}\n ${h.map((({date:e})=>`<th class="${Oe}" abbr="${e.toLocaleDateString(this._config.locale,{weekday:"long"})}">\n <div class="calendar-header-cell-inner">\n ${"string"==typeof this._config.weekdayFormat?e.toLocaleDateString(this._config.locale,{weekday:this._config.weekdayFormat}):e.toLocaleDateString(this._config.locale,{weekday:"long"}).slice(0,this._config.weekdayFormat)}\n </div>\n </th>`)).join("")}\n </tr>\n </thead>`:""}\n <tbody>\n ${"days"===this._view?r.map((e=>{const t=ee(0===e.weekNumber?`${i.getFullYear()}W53`:`${i.getFullYear()}W${e.weekNumber}`,this._config.selectionType),s=this._rowWeekAttributes(t);return`<tr \n class="${s.className}"\n tabindex="${s.tabIndex}"\n ${s.ariaSelected?'aria-selected="true"':""}\n >\n ${this._config.showWeekNumber?`<th class="calendar-cell-week-number">${0===e.weekNumber?53:e.weekNumber}</td>`:""}\n ${e.days.map((({date:e,month:t})=>{const i=this._cellDayAttributes(e,t);return"current"===t||this._config.showAdjacementDays?`<td \n class="${i.className}"\n tabindex="${i.tabIndex}"\n ${i.ariaSelected?'aria-selected="true"':""}\n data-bs-date="${e}"\n >\n <div class="calendar-cell-inner day">\n ${e.toLocaleDateString(this._config.locale,{day:"numeric"})}\n </div>\n </td>`:"<td></td>"})).join("")}</tr>`})).join(""):""}\n ${"months"===this._view?l.map(((e,t)=>`<tr>\n ${e.map(((e,s)=>{const n=new Date(i.getFullYear(),3*t+s,1),a=this._cellMonthAttributes(n);return`<td\n class="${a.className}"\n tabindex="${a.tabIndex}"\n ${a.ariaSelected?'aria-selected="true"':""}\n data-bs-date="${n.toDateString()}"\n >\n <div class="calendar-cell-inner month">\n ${e}\n </div>\n </td>`})).join("")}\n </tr>`)).join(""):""}\n ${"years"===this._view?c.map((e=>`<tr>\n ${e.map((e=>{const t=new Date(e,0,1),i=this._cellYearAttributes(t);return`<td\n class="${i.className}"\n tabindex="${i.tabIndex}"\n ${i.ariaSelected?'aria-selected="true"':""}\n data-bs-date="${t.toDateString()}"\n >\n <div class="calendar-cell-inner year">\n ${e}\n </div>\n </td>`})).join("")}\n </tr>`)).join(""):""}\n </tbody>\n `,a.append(o,d),a}_createCalendar(){this._config.selectionType&&"days"===this._view&&this._element.classList.add(`select-${this._config.selectionType}`),this._config.showWeekNumber&&this._element.classList.add("show-week-numbers");for(const[e,t]of Array.from({length:this._config.calendars}).entries())this._element.append(this._createCalendarPanel(e));this._element.classList.add("calendars")}_initializeDates(){this._calendarDate=ee(this._config.calendarDate||this._config.startDate||this._config.endDate||new Date,this._config.selectionType),this._startDate=ee(this._config.startDate,this._config.selectionType),this._endDate=ee(this._config.endDate,this._config.selectionType),this._minDate=ee(this._config.minDate,this._config.selectionType),this._maxDate=ee(this._config.maxDate,this._config.selectionType),this._hoverDate=null,this._selectEndDate=this._config.selectEndDate}_initializeView(){this._view={day:"days",week:"days",month:"months",year:"years"}[this._config.selectionType]||"days"}_updateCalendar(e){this._element.innerHTML="",this._createCalendar(),e&&setTimeout(e,1)}_updateClassNamesAndAriaLabels(){if("week"===this._config.selectionType){const e=q.find(Ye,this._element);for(const t of e){const e=q.findOne(Ve,t),i=new Date(V.getDataAttribute(e,"date")),s=this._rowWeekAttributes(i);t.className=s.className,t.tabIndex=s.tabIndex,s.ariaSelected?t.setAttribute("aria-selected",!0):t.removeAttribute("aria-selected")}return}const e=q.find(Re,this._element);for(const t of e){const e=new Date(V.getDataAttribute(t,"date"));let i;i="days"===this._view?this._cellDayAttributes(e,"current"):"months"===this._view?this._cellMonthAttributes(e):this._cellYearAttributes(e),t.className=i.className,t.tabIndex=i.tabIndex,i.ariaSelected?t.setAttribute("aria-selected",!0):t.removeAttribute("aria-selected")}}_classNames(e){return Object.entries(e).filter((([e,t])=>Boolean(t))).map((([e])=>e)).join(" ")}_cellDayAttributes(e,t){const i="current"===t,s=ne(e,this._minDate,this._maxDate,this._config.disabledDates),n=oe(e,this._startDate,this._endDate);return{className:this._classNames({[Oe]:!0,..."day"===this._config.selectionType&&"days"===this._view&&{clickable:!i&&this._config.selectAdjacementDays,disabled:s,range:i&&ae(e,this._startDate,this._endDate),"range-hover":i&&(this._hoverDate&&this._selectEndDate?ae(e,this._startDate,this._hoverDate):ae(e,this._hoverDate,this._endDate)),selected:n},today:he(e),[t]:!0}),tabIndex:"day"!==this._config.selectionType||!i&&!this._config.selectAdjacementDays||s?-1:0,ariaSelected:n}}_cellMonthAttributes(e){const t=((e,t,i,s)=>{const n=12*e.getFullYear()+e.getMonth(),a=t?12*t.getFullYear()+t.getMonth():null,o=i?12*i.getFullYear()+i.getMonth():null;if(a&&n<a)return!0;if(o&&n>o)return!0;if(void 0===s)return!1;const r=t?Math.max(e.getTime(),t.getTime()):e,l=i?Math.min(e.getTime(),i.getTime()):new Date((new Date).getFullYear(),11,31);for(const e=new Date(r);e<=l;e.setDate(e.getDate()+1))if(!ne(e,t,i,s))return!1;return!1})(e,this._minDate,this._maxDate,this._config.disabledDates),i=((e,t,i)=>{const s=e.getFullYear(),n=e.getMonth();return null!==t&&s===t.getFullYear()&&n===t.getMonth()||null!==i&&s===i.getFullYear()&&n===i.getMonth()})(e,this._startDate,this._endDate);return{className:this._classNames({[Oe]:!0,disabled:t,"range-hover":"month"===this._config.selectionType&&(this._hoverDate&&this._selectEndDate?le(e,this._startDate,this._hoverDate):le(e,this._hoverDate,this._endDate)),range:le(e,this._startDate,this._endDate),selected:i}),tabIndex:t?-1:0,ariaSelected:i}}_cellYearAttributes(e){const t=((e,t,i,s)=>{const n=e.getFullYear(),a=t?t.getFullYear():null,o=i?i.getFullYear():null;if(a&&n<a)return!0;if(o&&n>o)return!0;if(void 0===s)return!1;const r=t?Math.max(e.getTime(),t.getTime()):e,l=i?Math.min(e.getTime(),i.getTime()):new Date((new Date).getFullYear(),11,31);for(const e=new Date(r);e<=l;e.setDate(e.getDate()+1))if(!ne(e,t,i,s))return!1;return!1})(e,this._minDate,this._maxDate,this._config.disabledDates),i=((e,t,i)=>{const s=e.getFullYear();return null!==t&&s===t.getFullYear()||null!==i&&s===i.getFullYear()})(e,this._startDate,this._endDate);return{className:this._classNames({[Oe]:!0,disabled:t,"range-hover":"year"===this._config.selectionType&&(this._hoverDate&&this._selectEndDate?de(e,this._startDate,this._hoverDate):de(e,this._hoverDate,this._endDate)),range:de(e,this._startDate,this._endDate),selected:i}),tabIndex:t?-1:0,ariaSelected:i}}_rowWeekAttributes(e){const t=ne(e,this._minDate,this._maxDate,this._config.disabledDates),i=oe(e,this._startDate,this._endDate);return{className:this._classNames({[Pe]:!0,disabled:t,range:"week"===this._config.selectionType&&ae(e,this._startDate,this._endDate),"range-hover":"week"===this._config.selectionType&&(this._hoverDate&&this._selectEndDate?de(e,this._startDate,this._hoverDate):de(e,this._hoverDate,this._endDate)),selected:i}),tabIndex:"week"!==this._config.selectionType||t?-1:0,ariaSelected:i}}static calendarInterface(e,t){const i=Qe.getOrCreateInstance(e,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}static jQueryInterface(e){return this.each((function(){const t=Qe.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}F.on(window,Ne,(()=>{for(const e of Array.from(document.querySelectorAll('[data-bs-toggle="calendar"]')))Qe.calendarInterface(e)})),v(Qe);const Ke=".bs.swipe",Xe=`touchstart${Ke}`,Ge=`touchmove${Ke}`,Ze=`touchend${Ke}`,Je=`pointerdown${Ke}`,et=`pointerup${Ke}`,tt={endCallback:null,leftCallback:null,rightCallback:null},it={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class st extends R{constructor(e,t){super(),this._element=e,e&&st.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return tt}static get DefaultType(){return it}static get NAME(){return"swipe"}dispose(){F.off(this._element,Ke)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),y(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&y(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(F.on(this._element,Je,(e=>this._start(e))),F.on(this._element,et,(e=>this._end(e))),this._element.classList.add("pointer-event")):(F.on(this._element,Xe,(e=>this._start(e))),F.on(this._element,Ge,(e=>this._move(e))),F.on(this._element,Ze,(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 nt=".bs.carousel",at=".data-api",ot="ArrowLeft",rt="ArrowRight",lt="next",ct="prev",ht="left",dt="right",ut=`slide${nt}`,_t=`slid${nt}`,gt=`keydown${nt}`,mt=`mouseenter${nt}`,pt=`mouseleave${nt}`,ft=`dragstart${nt}`,bt=`load${nt}${at}`,vt=`click${nt}${at}`,yt="carousel",wt="active",Dt=".active",kt=".carousel-item",Et=Dt+kt,Lt={[ot]:dt,[rt]:ht},Ct={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},At={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Tt extends Y{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=q.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===yt&&this.cycle()}static get Default(){return Ct}static get DefaultType(){return At}static get NAME(){return"carousel"}next(){this._slide(lt)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(ct)}pause(){this._isSliding&&l(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?F.one(this._element,_t,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void F.one(this._element,_t,(()=>this.to(e)));const i=this._getItemIndex(this._getActive());if(i===e)return;const s=e>i?lt:ct;this._slide(s,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&F.on(this._element,gt,(e=>this._keydown(e))),"hover"===this._config.pause&&(F.on(this._element,mt,(()=>this.pause())),F.on(this._element,pt,(()=>this._maybeEnableCycle()))),this._config.touch&&st.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of q.find(".carousel-item img",this._element))F.on(e,ft,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(ht)),rightCallback:()=>this._slide(this._directionToOrder(dt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new st(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Lt[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=q.findOne(Dt,this._indicatorsElement);t.classList.remove(wt),t.removeAttribute("aria-current");const i=q.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(wt),i.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const i=this._getActive(),s=e===lt,n=t||D(this._getItems(),i,s,this._config.wrap);if(n===i)return;const a=this._getItemIndex(n),o=t=>F.trigger(this._element,t,{relatedTarget:n,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:a});if(o(ut).defaultPrevented)return;if(!i||!n)return;const r=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),m(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(wt),i.classList.remove(wt,c,l),this._isSliding=!1,o(_t)}),i,this._isAnimated()),r&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return q.findOne(Et,this._element)}_getItems(){return q.find(kt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return b()?e===ht?ct:lt:e===ht?lt:ct}_orderToDirection(e){return b()?e===ct?ht:dt:e===ct?dt:ht}static jQueryInterface(e){return this.each((function(){const t=Tt.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}F.on(document,vt,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=q.getElementFromSelector(this);if(!t||!t.classList.contains(yt))return;e.preventDefault();const i=Tt.getOrCreateInstance(t),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===V.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),F.on(window,bt,(()=>{const e=q.find('[data-bs-ride="carousel"]');for(const t of e)Tt.getOrCreateInstance(t)})),v(Tt);const St=".bs.collapse",$t=`show${St}`,Nt=`shown${St}`,It=`hide${St}`,Ot=`hidden${St}`,xt=`click${St}.data-api`,Pt="show",Mt="collapse",Bt="collapsing",Ft=`:scope .${Mt} .${Mt}`,jt='[data-bs-toggle="collapse"]',Ht={parent:null,toggle:!0},zt={parent:"(null|element)",toggle:"boolean"};class Vt extends Y{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=q.find(jt);for(const e of i){const t=q.getSelectorFromElement(e),i=q.find(t).filter((e=>e===this._element));null!==t&&i.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ht}static get DefaultType(){return zt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>Vt.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(F.trigger(this._element,$t).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(Mt),this._element.classList.add(Bt),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Bt),this._element.classList.add(Mt,Pt),this._element.style[t]="",F.trigger(this._element,Nt)}),this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(F.trigger(this._element,It).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,m(this._element),this._element.classList.add(Bt),this._element.classList.remove(Mt,Pt);for(const e of this._triggerArray){const t=q.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Bt),this._element.classList.add(Mt),F.trigger(this._element,Ot)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(Pt)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=h(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(jt);for(const t of e){const e=q.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=q.find(Ft,this._config.parent);return q.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const i of e)i.classList.toggle("collapsed",!t),i.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const i=Vt.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}}F.on(document,xt,jt,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of q.getMultipleElementsFromSelector(this))Vt.getOrCreateInstance(e,{toggle:!1}).toggle()})),v(Vt);const Rt=(e,t)=>e.toLocaleTimeString(t).includes("AM")?"am":e.toLocaleTimeString(t).includes("PM")||e.getHours()>=12?"pm":"am",Yt=(e,t,i)=>{const s=new Date,n=qt(t),a=new Intl.DateTimeFormat(t,{hour:n?"2-digit":"numeric",minute:"2-digit",second:"2-digit"});return e.map((e=>{var t;return"hour"===i&&s.setHours(e),"minute"===i&&s.setMinutes(e),"second"===i&&s.setSeconds(e),{value:e,label:(null==(t=a.formatToParts(s).find((e=>e.type===i)))?void 0:t.value)||""}}))},Wt=e=>["am","AM","pm","PM"].some((t=>(new Date).toLocaleString(e).includes(t))),qt=e=>new Date(2020,0,1,7,5,7).toLocaleTimeString(e).startsWith("0"),Ut=".bs.time-picker",Qt=".data-api",Kt="Enter",Xt=`click${Ut}`,Gt=`hide${Ut}`,Zt=`hidden${Ut}`,Jt=`keydown${Ut}`,ei=`show${Ut}`,ti=`shown${Ut}`,ii=`timeChange${Ut}`,si=`click${Ut}${Qt}`,ni=`keyup${Ut}${Qt}`,ai=`load${Ut}${Qt}`,oi="is-invalid",ri="is-valid",li="selected",ci="show",hi="time-picker",di='[data-bs-toggle="time-picker"]:not(.disabled):not(:disabled)',ui=`${di}.${ci}`,_i={cancelButton:"Cancel",cancelButtonClasses:["btn","btn-sm","btn-ghost-primary"],cleaner:!0,confirmButton:"OK",confirmButtonClasses:["btn","btn-sm","btn-primary"],container:!1,disabled:!1,footer:!0,hours:null,indicator:!0,inputReadOnly:!1,invalid:!1,locale:"default",minutes:!0,name:null,placeholder:"Select time",required:!0,seconds:!0,size:null,time:null,type:"dropdown",valid:!1,variant:"roll"},gi={cancelButton:"(boolean|string)",cancelButtonClasses:"(array|string)",cleaner:"boolean",confirmButton:"(boolean|string)",confirmButtonClasses:"(array|string)",container:"(string|element|boolean)",disabled:"boolean",footer:"boolean",hours:"(array|function|null)",indicator:"boolean",inputReadOnly:"boolean",invalid:"boolean",locale:"string",minutes:"(array|boolean|function)",name:"(string|null)",placeholder:"string",required:"boolean",seconds:"(array|boolean|function)",size:"(string|null)",time:"(date|string|null)",type:"string",valid:"boolean",variant:"string"};class mi extends Y{constructor(e,t){super(e),this._handleTimeChange=(e,t)=>{const i=this._date||new Date("1970-01-01");var s,n;"toggle"===e&&("am"===t&&(this._ampm="am",i.setHours(i.getHours()-12)),"pm"===t&&(this._ampm="pm",i.setHours(i.getHours()+12))),"hours"===e&&(Wt(this._config.locale)?i.setHours((s=this._ampm,n=Number.parseInt(t,10),"am"===s&&12===n?0:"am"===s?n:"pm"===s&&12===n?12:n+12)):i.setHours(Number.parseInt(t,10))),"minutes"===e&&i.setMinutes(Number.parseInt(t,10)),"seconds"===e&&i.setSeconds(Number.parseInt(t,10)),this._date=new Date(i),this._input&&(this._setInputValue(i),this._input.dispatchEvent(new Event("change"))),F.trigger(this._element,ii,{timeString:i.toTimeString(),localeTimeString:i.toLocaleTimeString(),date:i})},this._config=this._getConfig(t),this._date=this._convertStringToDate(this._config.time),this._initialDate=null,this._ampm=this._date?Rt(new Date(this._date),this._config.locale):"am",this._popper=null,this._indicatorElement=null,this._input=null,this._menu=null,this._timePickerBody=null,this._localizedTimePartials=((e,t="auto",i=[],s=[],n=[])=>{const a="auto"===t&&Wt(e)||!0===t,o=Array.isArray(i)&&i.length>0?i:"function"==typeof i?Array.from({length:a?12:24},((e,t)=>a?t+1:t)).filter((e=>i(e))):Array.from({length:a?12:24},((e,t)=>a?t+1:t)),r=Array.isArray(s)&&s.length>0?s:"function"==typeof s?Array.from({length:60},((e,t)=>t)).filter((e=>s(e))):Array.from({length:60},((e,t)=>t)),l=Array.isArray(n)&&n.length>0?n:"function"==typeof n?Array.from({length:60},((e,t)=>t)).filter((e=>n(e))):Array.from({length:60},((e,t)=>t));return{listOfHours:Yt(o,e,"hour"),listOfMinutes:Yt(r,e,"minute"),listOfSeconds:Yt(l,e,"second"),hour12:a}})(this._config.locale,this.ampm,this._config.hours,this._config.minutes,this._config.seconds),this._createTimePicker(),this._createTimePickerSelection(),this._addEventListeners(),this._setUpSelects()}static get Default(){return _i}static get DefaultType(){return gi}static get NAME(){return"time-picker"}toggle(){return this._isShown()?this.hide():this.show()}show(){this._config.disabled||this._isShown()||(this._initialDate=new Date(this._date),F.trigger(this._element,ei),this._element.classList.add(ci),this._element.setAttribute("aria-expanded",!0),this._config.container&&this._menu.classList.add(ci),F.trigger(this._element,ti),this._createPopper())}hide(){F.trigger(this._element,Gt),this._popper&&this._popper.destroy(),this._element.classList.remove(ci),this._element.setAttribute("aria-expanded","false"),this._config.container&&this._menu.classList.remove(ci),F.trigger(this._element,Zt)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}cancel(){this._date=this._initialDate,this._setInputValue(this._initialDate||""),this._timePickerBody.innerHTML="",this.hide(),this._createTimePickerSelection(),this._emitChangeEvent(this._date)}clear(){this._date=null,this._setInputValue(""),this._timePickerBody.innerHTML="",this._createTimePickerSelection(),this._emitChangeEvent(this._date)}reset(){this._date=this._convertStringToDate(this._config.time),this._setInputValue(this._config.time),this._timePickerBody.innerHTML="",this._createTimePickerSelection(),this._emitChangeEvent(this._date)}update(e){this._config=this._getConfig(e),this._date=this._convertStringToDate(this._config.time),this._ampm=this._date?Rt(new Date(this._date),this._config.locale):"am",this._timePickerBody.innerHTML="",this._createTimePickerSelection(),this._setUpSelects()}_addEventListeners(){F.on(this._indicatorElement,Xt,(()=>{this._config.disabled||this.toggle()})),F.on(this._indicatorElement,Jt,(e=>{this._config.disabled||e.key!==Kt||this.toggle()})),F.on(this._togglerElement,Xt,(e=>{this._config.disabled||e.target===this._indicatorElement||(this.show(),"roll"===this._config.variant&&this._setUpRolls(!0),"select"===this._config.variant&&this._setUpSelects())})),F.on(this._element,Jt,(e=>{"Escape"===e.key&&this.hide()})),F.on(this._element,"timeChange.bs.time-picker",(()=>{"roll"===this._config.variant&&this._setUpRolls(),"select"===this._config.variant&&this._setUpSelects()})),F.on(this._element,"onCancelClick.bs.picker",(()=>{this.cancel()})),F.on(this._input,"input",(e=>{(e=>{const t=new Date(`1970-01-01 ${e}`);return t instanceof Date&&!Number.isNaN(t.getTime())})(e.target.value)&&(this._date=this._convertStringToDate(e.target.value),F.trigger(this._element,ii,{timeString:this._date?this._date.toTimeString():null,localeTimeString:this._date?this._date.toLocaleTimeString():null,date:this._date}))})),"dropdown"===this._config.type&&F.on(this._input.form,"submit",(()=>{if(this._input.form.cl