@coreui/coreui
Version:
The most popular front-end framework for developing responsive, mobile-first projects on the web rewritten and maintained by the CoreUI Team
6 lines • 92.4 kB
JavaScript
/*!
* CoreUI v5.9.0 (https://coreui.io)
* Copyright 2026 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)}},o="transitionend",r=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),a=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),l=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},c=e=>{e.dispatchEvent(new Event(o))},h=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),d=e=>h(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(r(e)):null,u=e=>{if(!h(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},_=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),g=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?g(e.parentNode):null},p=()=>{},f=e=>{e.offsetHeight},m=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,b=[],v=()=>"rtl"===document.documentElement.dir,y=e=>{var t;t=()=>{const t=m();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?(b.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of b)e()}),b.push(t)):t()},w=(e,t=[],i=e)=>"function"==typeof e?e.call(...t):i,C=(e,t,i=!0)=>{if(!i)return void w(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 r=({target:i})=>{i===t&&(n=!0,t.removeEventListener(o,r),w(e))};t.addEventListener(o,r),setTimeout(()=>{n||c(t)},s)},A=(e,t,i,s)=>{const n=e.length;let o=e.indexOf(t);return-1===o?!i&&s?e[n-1]:e[0]:(o+=i?1:-1,s&&(o=(o+n)%n),e[Math.max(0,Math.min(o,n-1))])},k=/[^.]*(?=\..*)\.|.*/,E=/\..*/,T=/::\d+$/,L={};let S=1;const I={mouseenter:"mouseover",mouseleave:"mouseout"},$=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 D(e,t){return t&&`${t}::${S++}`||e.uidEvent||S++}function O(e){const t=D(e);return e.uidEvent=t,L[t]=L[t]||{},L[t]}function N(e,t,i=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===i)}function x(e,t,i){const s="string"==typeof t,n=s?i:t||i;let o=F(e);return $.has(o)||(o=e),[s,n,o]}function M(e,t,i,s,n){if("string"!=typeof t||!e)return;let[o,r,a]=x(t,i,s);if(t in I){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=O(e),c=l[a]||(l[a]={}),h=N(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=D(r,t.replace(k,"")),u=o?function(e,t,i){return function s(n){const o=e.querySelectorAll(t);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return K(n,{delegateTarget:r}),s.oneOff&&z.off(e,n.type,t,i),i.apply(r,[n])}}(e,i,r):function(e,t){return function i(s){return K(s,{delegateTarget:e}),i.oneOff&&z.off(e,s.type,t),t.apply(e,[s])}}(e,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,e.addEventListener(a,u,o)}function P(e,t,i,s,n){const o=N(t[i],s,n);o&&(e.removeEventListener(i,o,Boolean(n)),delete t[i][o.uidEvent])}function j(e,t,i,s){const n=t[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&P(e,t,i,r.callable,r.delegationSelector)}function F(e){return e=e.replace(E,""),I[e]||e}const z={on(e,t,i,s){M(e,t,i,s,!1)},one(e,t,i,s){M(e,t,i,s,!0)},off(e,t,i,s){if("string"!=typeof t||!e)return;const[n,o,r]=x(t,i,s),a=r!==t,l=O(e),c=l[r]||{},h=t.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))j(e,l,i,t.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(T,"");a&&!t.includes(n)||P(e,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;P(e,l,r,o,n?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const s=m();let n=null,o=!0,r=!0,a=!1;t!==F(t)&&s&&(n=s.Event(t,i),s(e).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());const l=K(new Event(t,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function K(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 B(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 H(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const R={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${H(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${H(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]=B(e.dataset[s])}return t},getDataAttribute:(e,t)=>B(e.getAttribute(`data-bs-${H(t)}`))};class q{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=h(t)?R.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...h(t)?R.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,s]of Object.entries(t)){const t=e[i],n=h(t)?"element":a(t);if(!new RegExp(s).test(n))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${n}" but expected type "${s}".`)}}}class V extends q{constructor(e,t){super(),(e=d(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),z.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){C(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(d(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.9.0"}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=>r(e)).join(","):null},U={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=>!_(e)&&u(e))},getSelectorFromElement(e){const t=W(e);return t&&U.findOne(t)?t:null},getElementFromSelector(e){const t=W(e);return t?U.findOne(t):null},getMultipleElementsFromSelector(e){const t=W(e);return t?U.find(t):[]}},Q=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,s=e.NAME;z.on(document,i,`[data-bs-dismiss="${s}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),_(this))return;const n=U.getElementFromSelector(this)||this.closest(`.${s}`);e.getOrCreateInstance(n)[t]()})},Y=".bs.alert",X=`close${Y}`,G=`closed${Y}`;class J extends V{static get NAME(){return"alert"}close(){if(z.trigger(this._element,X).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(),z.trigger(this._element,G),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=J.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)}})}}Q(J,"close"),y(J);const Z='[data-bs-toggle="button"]';class ee extends V{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=ee.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}z.on(document,"click.bs.button.data-api",Z,e=>{e.preventDefault();const t=e.target.closest(Z);ee.getOrCreateInstance(t).toggle()}),y(ee);const te=".bs.swipe",ie=`touchstart${te}`,se=`touchmove${te}`,ne=`touchend${te}`,oe=`pointerdown${te}`,re=`pointerup${te}`,ae={endCallback:null,leftCallback:null,rightCallback:null},le={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ce extends q{constructor(e,t){super(),this._element=e,e&&ce.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return ae}static get DefaultType(){return le}static get NAME(){return"swipe"}dispose(){z.off(this._element,te)}_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(),w(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&&w(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(z.on(this._element,oe,e=>this._start(e)),z.on(this._element,re,e=>this._end(e)),this._element.classList.add("pointer-event")):(z.on(this._element,ie,e=>this._start(e)),z.on(this._element,se,e=>this._move(e)),z.on(this._element,ne,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 he=".bs.carousel",de=".data-api",ue="ArrowLeft",_e="ArrowRight",ge="next",pe="prev",fe="left",me="right",be=`slide${he}`,ve=`slid${he}`,ye=`keydown${he}`,we=`mouseenter${he}`,Ce=`mouseleave${he}`,Ae=`dragstart${he}`,ke=`load${he}${de}`,Ee=`click${he}${de}`,Te="carousel",Le="active",Se=".active",Ie=".carousel-item",$e=Se+Ie,De={[ue]:me,[_e]:fe},Oe={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ne={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class xe extends V{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=U.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Te&&this.cycle()}static get Default(){return Oe}static get DefaultType(){return Ne}static get NAME(){return"carousel"}next(){this._slide(ge)}nextWhenVisible(){!document.hidden&&u(this._element)&&this.next()}prev(){this._slide(pe)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?z.one(this._element,ve,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void z.one(this._element,ve,()=>this.to(e));const i=this._getItemIndex(this._getActive());if(i===e)return;const s=e>i?ge:pe;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&&z.on(this._element,ye,e=>this._keydown(e)),"hover"===this._config.pause&&(z.on(this._element,we,()=>this.pause()),z.on(this._element,Ce,()=>this._maybeEnableCycle())),this._config.touch&&ce.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of U.find(".carousel-item img",this._element))z.on(e,Ae,e=>e.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(fe)),rightCallback:()=>this._slide(this._directionToOrder(me)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ce(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=De[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=U.findOne(Se,this._indicatorsElement);t.classList.remove(Le),t.removeAttribute("aria-current");const i=U.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);i&&(i.classList.add(Le),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===ge,n=t||A(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=t=>z.trigger(this._element,t,{relatedTarget:n,direction:this._orderToDirection(e),from:this._getItemIndex(i),to:o});if(r(be).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),f(n),i.classList.add(l),n.classList.add(l),this._queueCallback(()=>{n.classList.remove(l,c),n.classList.add(Le),i.classList.remove(Le,c,l),this._isSliding=!1,r(ve)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return U.findOne($e,this._element)}_getItems(){return U.find(Ie,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return v()?e===fe?pe:ge:e===fe?ge:pe}_orderToDirection(e){return v()?e===pe?fe:me:e===pe?me:fe}static jQueryInterface(e){return this.each(function(){const t=xe.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)})}}z.on(document,Ee,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=U.getElementFromSelector(this);if(!t||!t.classList.contains(Te))return;e.preventDefault();const i=xe.getOrCreateInstance(t),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===R.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),z.on(window,ke,()=>{const e=U.find('[data-bs-ride="carousel"]');for(const t of e)xe.getOrCreateInstance(t)}),y(xe);const Me={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],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:[]},Pe={...Me,svg:["xmlns","version","baseprofile","width","height","viewbox","preserveaspectratio","aria-hidden","role","focusable","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin"],g:["id","class","transform","style"],path:["id","class","d","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-dasharray","stroke-dashoffset","stroke-opacity"],circle:["id","class","cx","cy","r","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],rect:["id","class","x","y","width","height","rx","ry","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],ellipse:["id","class","cx","cy","rx","ry","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],line:["id","class","x1","y1","x2","y2","stroke","stroke-width","stroke-linecap","stroke-opacity"],polygon:["id","class","points","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],polyline:["id","class","points","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],text:["id","class","x","y","dx","dy","text-anchor","font-family","font-size","font-weight","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],tspan:["id","class","x","y","dx","dy","text-anchor","font-family","font-size","font-weight","fill","fill-opacity","stroke","stroke-width","stroke-opacity"],defs:[],symbol:["id","class","viewbox","preserveaspectratio"],use:["id","class","x","y","width","height","href"],image:["id","class","x","y","width","height","href","preserveaspectratio","xlink:href"],pattern:["id","class","x","y","width","height","patternunits","patterncontentunits","patterntransform","preserveaspectratio"],lineargradient:["id","class","gradientunits","x1","y1","x2","y2","spreadmethod","gradienttransform"],radialgradient:["id","class","gradientunits","cx","cy","r","fx","fy","spreadmethod","gradienttransform"],mask:["id","class","x","y","width","height","maskunits","maskcontentunits","masktransform"],clippath:["id","class","clippathunits"],marker:["id","class","markerunits","markerwidth","markerheight","orient","preserveaspectratio","viewbox","refx","refy"],title:[],desc:[]},je=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Fe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ze=(e,t)=>{const i=e.nodeName.toLowerCase();return t.includes(i)?!je.has(i)||Boolean(Fe.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(i))};function Ke(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const s=(new window.DOMParser).parseFromString(e,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const e of n){const i=e.nodeName.toLowerCase();if(!Object.keys(t).includes(i)){e.remove();continue}const s=[].concat(...e.attributes),n=[].concat(t["*"]||[],t[i]||[]);for(const t of s)ze(t,n)||e.removeAttribute(t.nodeName)}return s.body.innerHTML}const Be=".bs.chip",He=`remove${Be}`,Re=`removed${Be}`,qe=`select${Be}`,Ve=`selected${Be}`,We=`deselect${Be}`,Ue=`deselected${Be}`,Qe=".chip-check",Ye=".chip-remove",Xe="active",Ge="disabled",Je=new Set(["sanitize","allowList","sanitizeFn"]),Ze={allowList:Pe,ariaRemoveLabel:"Remove",disabled:!1,filter:!1,removable:!1,removeIcon:'<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>',sanitize:!0,sanitizeFn:null,selectable:!1,selected:!1,selectedIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 512 512" fill="currentColor"><path d="M425.373 89.373 196 318.745 86.627 209.373l-45.254 45.254L196 409.255l274.627-274.628z"/></svg>'},et={allowList:"object",ariaRemoveLabel:"string",disabled:"boolean",filter:"boolean",removable:"boolean",removeIcon:"string",sanitize:"boolean",sanitizeFn:"(null|function)",selectable:"boolean",selected:"boolean",selectedIcon:"string"};class tt extends V{constructor(e,t){super(e,t),this._disabled=this._config.disabled||this._element.classList.contains(Ge),this._selected=this._config.selected||this._element.classList.contains(Xe),this._ensureRemoveButton(),this._applyState(),(this._config.selectable||this._config.removable)&&this._makeFocusable(),this._addEventListeners()}static get Default(){return Ze}static get DefaultType(){return et}static get NAME(){return"chip"}remove(){z.trigger(this._element,He).defaultPrevented||this._destroyElement()}toggle(){this._config.selectable&&(this._selected?this.deselect():this.select())}select(){this._config.selectable&&(this._selected||z.trigger(this._element,qe).defaultPrevented||(this._selected=!0,this._applyState(),z.trigger(this._element,Ve)))}deselect(){this._config.selectable&&this._selected&&(z.trigger(this._element,We).defaultPrevented||(this._selected=!1,this._applyState(),z.trigger(this._element,Ue)))}_configAfterMerge(e){return e.filter&&(e.selectable=!0),e}_addEventListeners(){z.on(this._element,"keydown",e=>this._handleKeydown(e)),z.on(this._element,"click",e=>{this._disabled||e.target.closest(Ye)||this.toggle()}),z.on(this._element,"click",Ye,e=>{e.stopPropagation(),this.remove()})}_applyState(){var e;this._disabled||!this._config.clickable&&!this._config.selectable||this._element.classList.add("chip-clickable"),this._disabled?(this._element.classList.add(Ge),this._element.setAttribute("aria-disabled","true")):(this._element.classList.remove(Ge),"true"===this._element.getAttribute("aria-disabled")&&this._element.setAttribute("aria-disabled","false")),this._config.selectable?(this._element.classList.toggle(Xe,this._selected),this._element.setAttribute("aria-selected",this._selected?"true":"false"),this._config.filter&&(this._selected?this._ensureCheckIcon():null==(e=U.findOne(Qe,this._element))||e.remove())):(this._element.classList.remove(Xe),"true"===this._element.getAttribute("aria-selected")&&this._element.setAttribute("aria-selected","false"))}_ensureCheckIcon(){if(U.findOne(Qe,this._element))return;const e=document.createElement("span");e.className="chip-check",e.setAttribute("aria-hidden","true"),e.innerHTML=this._sanitizeIcon(this._config.selectedIcon),this._element.prepend(e)}_createRemoveButton(){const e=document.createElement("button");return e.type="button",e.className="chip-remove",e.setAttribute("aria-label",this._config.ariaRemoveLabel),e.setAttribute("tabindex","-1"),e.innerHTML=this._sanitizeIcon(this._config.removeIcon),e}_ensureRemoveButton(){this._config.removable&&!this._disabled&&(U.findOne(Ye,this._element)||this._element.append(this._createRemoveButton()))}_makeFocusable(){this._element.hasAttribute("tabindex")||this._disabled||this._element.setAttribute("tabindex","0")}_handleKeydown(e){const{key:t}=e;if(!this._disabled)switch(t){case"Enter":case" ":case"Spacebar":if(!this._config.selectable)return;e.preventDefault(),this.toggle();break;case"Backspace":case"Delete":this._config.removable&&(e.preventDefault(),this.remove())}}_destroyElement(){z.trigger(this._element,Re),this._element.remove(),this.dispose()}_sanitizeIcon(e){return this._config.sanitize?Ke(e,this._config.allowList,this._config.sanitizeFn):e}_getConfig(e){const t=R.getDataAttributes(this._element);for(const e of Object.keys(t))Je.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}static chipInterface(e,t){const i=tt.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=tt.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)}})}}z.on(document,`DOMContentLoaded${Be}.data-api`,()=>{for(const e of U.find("[data-bs-chip]"))tt.chipInterface(e)}),y(tt);const it="change",st="select",nt=".chip",ot=`${nt}.active`,rt="disabled",at={ariaRemoveLabel:"Remove",chipClassName:null,disabled:!1,filter:!1,maxChips:null,removable:!1,removeIcon:'<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>',selectable:!1,selectedIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 512 512" fill="currentColor"><path d="M425.373 89.373 196 318.745 86.627 209.373l-45.254 45.254L196 409.255l274.627-274.628z"/></svg>',selectionMode:"multiple",unique:!1},lt={ariaRemoveLabel:"string",chipClassName:"(string|function|null)",disabled:"boolean",filter:"boolean",maxChips:"(number|null)",removable:"boolean",removeIcon:"string",selectable:"boolean",selectedIcon:"string",selectionMode:"string",unique:"boolean"};class ct extends V{constructor(e,t){super(e,t),this._disabled=this._config.disabled||this._element.classList.contains(rt),this._pendingFocus=null,this._chips=[],this._initChips(),this._addEventListeners()}static get Default(){return at}static get DefaultType(){return lt}static get NAME(){return"chip-set"}add(e){var t;if(!this._canModify())return null;const i="string"!=typeof e,s=i?this._getChipValue(e):String(e).trim();if(!s)return null;if(this._config.unique&&this._chips.includes(s))return null;if(null!==this._config.maxChips&&this._chips.length>=this._config.maxChips)return null;if(z.trigger(this._element,this.constructor.eventName("add"),{value:s,relatedTarget:null!=(t=this._input)?t:null}).defaultPrevented)return null;const n=i?e:this._createChip(s);return this._appendChip(n),this._setupChip(n),this._chips.push(s),z.trigger(this._element,this.constructor.eventName(it),{values:this.getValues()}),n}remove(e){var t;if(!this._canModify())return!1;let i,s;if("string"==typeof e?(s=e,i=this._findChipByValue(s)):(i=e,s=this._getChipValue(i)),!i||!s)return!1;if(z.trigger(this._element,this.constructor.eventName("remove"),{value:s,chip:i,relatedTarget:null!=(t=this._input)?t:null}).defaultPrevented)return!1;const n=tt.getInstance(i);return n?n.remove():(i.remove(),this._handleChipRemoval(i,s)),!i.isConnected}removeSelected(){for(const e of this.getSelected())this.remove(e)}clear(){for(const e of this._getChipElements())this.remove(e)}selectChip(e){var t;this._getChipElements().includes(e)&&(null==(t=tt.getInstance(e))||t.select())}selectAll(){if(this._config.selectable)for(const t of this._getChipElements()){var e;null==(e=tt.getInstance(t))||e.select()}}deselectAll(){for(const t of this.getSelected()){var e;null==(e=tt.getInstance(t))||e.deselect()}}clearSelection(){this.deselectAll(),z.trigger(this._element,this.constructor.eventName(st),{selected:this.getSelectedValues()})}getSelected(){return U.find(ot,this._element)}getValues(){return[...this._chips]}getSelectedValues(){return this.getSelected().map(e=>this._getChipValue(e))}dispose(){z.off(this._element,tt.EVENT_KEY),super.dispose()}_configAfterMerge(e){return e.filter&&(e.selectable=!0),e}_canModify(){return!this._disabled}_appendChip(e){this._element.append(e)}_getChipElements(){return U.find(nt,this._element)}_findChipByValue(e){return this._getChipElements().find(t=>this._getChipValue(t)===e)}_getChipValue(e){var t;if(e.dataset.bsChipValue)return e.dataset.bsChipValue;const i=e.cloneNode(!0),s=U.findOne(".chip-remove",i);return s&&s.remove(),(null==(t=i.textContent)?void 0:t.trim())||""}_getFocusableChips(){return U.find(".chip:not(.disabled)",this._element)}_initChips(){for(const e of this._getChipElements()){const t=this._getChipValue(e);t&&(this._chips.push(t),this._applyChipClassName(e,t)),this._setupChip(e)}}_setupChip(e){tt.getOrCreateInstance(e,this._getChipConfig(e))}_getChipConfig(e){return{ariaRemoveLabel:this._config.ariaRemoveLabel,disabled:this._disabled,filter:this._config.filter,removable:this._config.removable,removeIcon:this._config.removeIcon,selectable:this._config.selectable,selectedIcon:this._config.selectedIcon,...R.getDataAttributes(e)}}_createChip(e){const t=document.createElement("span");return t.className="chip",t.dataset.bsChipValue=e,t.append(document.createTextNode(e)),this._applyChipClassName(t,e),t}_applyChipClassName(e,t){const i=this._resolveChipClassName(t);i&&e.classList.add(...i.split(/\s+/).filter(Boolean))}_resolveChipClassName(e){const{chipClassName:t}=this._config;if(!t)return"";if("function"==typeof t){const i=t(e);return"string"==typeof i?i:""}return"string"==typeof t?t:""}_addEventListeners(){z.on(this._element,this.constructor.eventName("keydown"),nt,e=>this._handleKeydown(e)),z.on(this._element,"selected.bs.chip",nt,e=>this._handleSelectionChange(e)),z.on(this._element,"deselected.bs.chip",nt,e=>this._handleSelectionChange(e)),z.on(this._element,"remove.bs.chip",nt,e=>this._handleChipRemove(e)),z.on(this._element,"removed.bs.chip",nt,e=>this._handleChipRemoved(e))}_handleKeydown(e){const t=e.target.closest(nt);if(t&&!t.classList.contains(rt))switch(e.key){case"ArrowLeft":e.preventDefault(),this._focusSibling(t,v());break;case"ArrowRight":e.preventDefault(),this._focusSibling(t,!v());break;case"Home":e.preventDefault(),this._navigateToEdge(0);break;case"End":e.preventDefault(),this._navigateToEdge(-1)}}_focusSibling(e,t){const i=this._getFocusableChips();if(0===i.length)return;const s=A(i,e,t,!1);s&&s!==e&&s.focus()}_getRemovalNeighbor(e){const t=this._getFocusableChips();if(0===t.length)return null;const i=A(t,e,!0,!1);if(i&&i!==e)return i;const s=A(t,e,!1,!1);return s&&s!==e?s:null}_navigateToEdge(e){var t;const i=this._getFocusableChips();null==(t=i[e<0?i.length+e:e])||t.focus()}_handleSelectionChange(e){const t=e.target.closest(nt);"single"===this._config.selectionMode&&null!=t&&t.matches(ot)&&this._enforceSingleSelection(t),z.trigger(this._element,this.constructor.eventName(st),{selected:this.getSelectedValues()})}_enforceSingleSelection(e){for(const i of this.getSelected()){var t;i!==e&&(null==(t=tt.getInstance(i))||t.deselect())}}_handleChipRemove(e){const t=e.target.closest(nt);this._pendingFocus=t?this._getRemovalNeighbor(t):null}_handleChipRemoved(e){var t;const i=e.target.closest(nt);null==(t=this._pendingFocus)||t.focus(),this._pendingFocus=null,this._handleChipRemoval(i,this._getChipValue(i))}_handleChipRemoval(e,t){const i=this._chips.indexOf(t);-1!==i&&this._chips.splice(i,1),z.trigger(this._element,this.constructor.eventName(it),{values:this.getValues()}),z.trigger(this._element,this.constructor.eventName(st),{selected:this.getSelectedValues()})}static chipSetInterface(e,t){const i=ct.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=ct.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)}})}}z.on(document,"DOMContentLoaded.bs.chip-set.data-api",()=>{for(const e of U.find("[data-bs-chip-set]"))ct.chipSetInterface(e)}),y(ct);const ht="chip-input",dt=".bs.chip-input",ut=`input${dt}`,_t={...ct.Default,createOnBlur:!0,id:null,name:null,placeholder:"",readonly:!1,removable:!0,separator:",",unique:!0},gt={...ct.DefaultType,createOnBlur:"boolean",id:"(string|null)",name:"(string|null)",placeholder:"string",readonly:"boolean",separator:"(string|null)"};class pt extends ct{constructor(e,t){var i;super(e,t),this._uniqueId=null!=(i=this._config.id)?i:l(ht),this._hiddenInput=null,this._input=U.findOne("input",this._element),this._input?this._setInputSize():this._createInput(),this._applyInteractionState(),this._createHiddenInput(),this._addInputEventListeners()}static get Default(){return _t}static get DefaultType(){return gt}static get NAME(){return ht}add(e){const t=super.add(e);return t&&this._syncHiddenInput(),t}focus(){var e;null==(e=this._input)||e.focus()}_canModify(){return!this._disabled&&!this._config.readonly}_appendChip(e){this._element.insertBefore(e,this._input)}_getChipConfig(e){return{ariaRemoveLabel:`Remove ${this._getChipValue(e)}`,disabled:this._disabled,removable:this._config.removable&&!this._config.readonly&&!this._disabled,removeIcon:this._config.removeIcon,selectable:this._config.selectable}}_setupChip(e){super._setupChip(e);const t=U.findOne(".chip-remove",e);t&&(t.disabled=this._disabled||this._config.readonly)}_handleChipRemoved(e){var t;super._handleChipRemoved(e),this._syncHiddenInput(),null==(t=this._input)||t.focus()}_syncHiddenInput(){this._hiddenInput&&(this._hiddenInput.value=this.getValues().join(","))}_addInputEventListeners(){z.on(this._element,"keydown",e=>{if(e.target!==this._input){if(e.key===(v()?"ArrowLeft":"ArrowRight")){const t=this._getFocusableChips();if(t.length>0&&t[t.length-1].contains(e.target))return e.preventDefault(),void this._input.focus()}1===e.key.length&&this._input.focus()}}),z.on(this._input,"keydown",e=>this._handleInputKeydown(e)),z.on(this._input,"input",e=>this._handleInput(e)),z.on(this._input,"paste",e=>this._handlePaste(e)),z.on(this._input,"focus",()=>this.clearSelection()),this._config.createOnBlur&&z.on(this._input,"blur",e=>{var t;null!=(t=e.relatedTarget)&&t.closest(".chip")||this._createChipFromInput()}),z.on(this._element,"click",e=>{var t;e.target===this._element&&(null==(t=this._input)||t.focus())})}_createInput(){const e=document.createElement("input"),t=U.findOne(".chip-input-label",this._element),i=null==t?void 0:t.getAttribute("for"),s=i||l(`${ht}-input`);e.type="text",e.className="chip-input-field",e.id=s,this._config.placeholder&&(e.placeholder=this._config.placeholder),t&&!i&&t.setAttribute("for",s),this._input=e,this._setInputSize(),this._element.append(e)}_createHiddenInput(){const e=document.createElement("input");e.type="hidden",e.id=this._uniqueId,e.name=this._config.name||this._uniqueId,this._element.append(e),this._hiddenInput=e,this._hiddenInput.value=this.getValues().join(",")}_createChipFromInput(){if(!this._canModify())return;const e=this._input.value.trim();e&&(this.add(e),this._input.value="",this._setInputSize())}_applyInteractionState(){const{readonly:e}=this._config;this._element.classList.toggle("disabled",this._disabled),this._input.disabled=this._disabled,this._input.readOnly=!this._disabled&&e,this._element.setAttribute("aria-disabled",this._disabled?"true":"false"),this._element.setAttribute("aria-readonly",e?"true":"false")}_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();t.length>0&&t[t.length-1].focus()}break;case"ArrowLeft":case"ArrowRight":if(t===(v()?"ArrowRight":"ArrowLeft")&&0===this._input.selectionStart&&0===this._input.selectionEnd){e.preventDefault();const t=this._getChipElements();t.length>0&&t[t.length-1].focus()}break;case"Escape":this._input.value="",this._input.blur()}}_handleInput(e){if(!this._canModify())return;const{value:t}=e.target,{separator:i}=this._config;if(i&&t.includes(i)){const e=t.split(i);for(const t of e.slice(0,-1))this.add(t.trim());this._input.value=e[e.length-1]}this._setInputSize(),z.trigger(this._element,ut,{value:this._input.value,relatedTarget:this._input})}_handlePaste(e){if(!this._canModify())return;const{separator:t}=this._config;if(!t)return;const i=(e.clipboardData||window.clipboardData).getData("text");if(i.includes(t)){e.preventDefault();const s=i.split(t);for(const e of s)this.add(e.trim())}}_setInputSize(){this._input&&(this._input.size=Math.max(this._input.placeholder.length,this._input.value.length)||1)}}z.on(document,`DOMContentLoaded${dt}.data-api`,()=>{for(const e of U.find("[data-bs-chip-input]"))pt.getOrCreateInstance(e)});const ft=".bs.collapse",mt=`show${ft}`,bt=`shown${ft}`,vt=`hide${ft}`,yt=`hidden${ft}`,wt=`click${ft}.data-api`,Ct="show",At="collapse",kt="collapsing",Et=`:scope .${At} .${At}`,Tt='[data-bs-toggle="collapse"]',Lt={parent:null,toggle:!0},St={parent:"(null|element)",toggle:"boolean"};class It extends V{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const i=U.find(Tt);for(const e of i){const t=U.getSelectorFromElement(e),i=U.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 Lt}static get DefaultType(){return St}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=>It.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(z.trigger(this._element,mt).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(At),this._element.classList.add(kt),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(kt),this._element.classList.add(At,Ct),this._element.style[t]="",z.trigger(this._element,bt)},this._element,!0),this._element.style[t]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(z.trigger(this._element,vt).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,f(this._element),this._element.classList.add(kt),this._element.classList.remove(At,Ct);for(const e of this._triggerArray){const t=U.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(kt),this._element.classList.add(At),z.trigger(this._element,yt)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(Ct)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=d(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Tt);for(const t of e){const e=U.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=U.find(Et,this._config.parent);return U.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=It.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}})}}z.on(document,wt,Tt,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of U.getMultipleElementsFromSelector(this))It.getOrCreateInstance(e,{toggle:!1}).toggle()}),y(It);const $t="dropdown",Dt=".bs.dropdown",Ot=".data-api",Nt="ArrowUp",xt="ArrowDown",Mt=`hide${Dt}`,Pt=`hidden${Dt}`,jt=`show${Dt}`,Ft=`shown${Dt}`,zt=`click${Dt}${Ot}`,Kt=`keydown${Dt}${Ot}`,Bt=`keyup${Dt}${Ot}`,Ht="show",Rt='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',qt=`${Rt}.${Ht}`,Vt=".dropdown-menu",Wt=v()?"top-end":"top-start",Ut=v()?"top-start":"top-end",Qt=v()?"bottom-end":"bottom-start",Yt=v()?"bottom-start":"bottom-end",Xt=v()?"left-start":"right-start",Gt=v()?"right-start":"left-start",Jt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Zt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class ei extends V{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=U.next(this._element,Vt)[0]||U.prev(this._element,Vt)[0]||U.findOne(Vt,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Jt}static get DefaultType(){return Zt}static get NAME(){return $t}toggle(){return this._isShown()?this.hide():this.show()}show(){if(_(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!z.trigger(this._element,jt,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))z.on(e,"mouseover",p);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ht),this._element.classList.add(Ht),z.trigger(this._element,Ft,e)}}hide(){if(_(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!z.trigger(this._element,Mt,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))z.off(e,"mouseover",p);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ht),this._element.classList.remove(Ht),this._element.setAttribute("aria-expanded","false"),R.removeDataAttribute(this._menu,"popper"),z.trigger(this._element,Pt,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!h(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${$t.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===i)throw new TypeError("CoreUI's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;"parent"===this._config.reference?e=this._parent:h(this._config.reference)?e=d(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=i.createPopper(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Ht)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Xt;if(e.classList.contains("dropstart"))return Gt;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Ut:Wt:t?Yt:Qt}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(R.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...w(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const i=U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(e=>u(e));i.length&&A(i,t,e===xt,!i.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=ei.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=U.find(qt);for(const i of t){const t=ei.getInstance(i);if(!t||!1===t._config.autoClose)continue;const s=e.composedPath(),n=s.includes(t._menu);if(s.includes(t._element)||"inside"===t._config.autoClose&&!n||"outside"===t._config.autoClose&&n)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),i="Escape"===e.key,s=[Nt,xt].includes(e.key);if(!s&&!i)return;if(t&&!i)return;e.preventDefault();const n=this.matches(Rt)?this:U.prev(this,Rt)[0]||U.next(this,Rt)[0]||U.findOne(Rt,e.delegateTarget.parentNode),o=ei.getOrCreateInstance(n);if(s)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),n.focus())}}z.on(document,Kt,Rt,ei.dataApiKeydownHandler),z.on(document,Kt,Vt,ei.dataApiKeydownHandler),z.on(document,zt,ei.clearMenus),z.on(document,Bt,ei.clearMenus),z.on(document,zt,Rt,function(e){e.preventDefault(),ei.getOrCreateInstance(this).toggle()}),y(ei);const ti="backdrop",ii="show",si=`mousedown.bs.${ti}`,ni={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},oi={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ri extends q{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return ni}static get DefaultType(){return oi}static get NAME(){return ti}show(e){if(!this._config.isVisible)return void w(e);this._append();const t=this._getElement();this._config.isAnimated&&f(t),t.classList.add(ii),this._emulateAnimation(()=>{w(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(ii),this._emulateAnimation(()=>{this.dispose(),w(e)})):w(e)}dispose(){this._isAppended&&(z.off(this._element,si),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=d(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),z.on(e,si,()=>{w(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){C(e,this._getElement(),this._config.isAnimated)}}const ai=".bs.focustrap",li=`focusin${ai}`,ci=`keydown.tab${ai}`,hi="backward",di={autofocus:!0,trapElement:null},ui={autofocus:"boolean",trapElement:"element"};class _i extends q{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return di}static get DefaultType(){return ui}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),z.off(document,ai),z.on(document,li,e=>this._handleFocusin(e)),z.on(document,ci,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,ai))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const i=U.focusableChildren(t);0===i.length?t.focus():this._lastTabNavDirection===hi?i[i.length-1].focus():i[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?hi:"forward")}}const gi=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pi=".sticky-top",fi="padding-right",mi="margin-right";class bi{constructor(){this._element=document.body}getWidth(){const e=document.documentEl