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 224 kB
/*! * CoreUI v5.23.0 (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():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).coreui=t()}(this,function(){"use strict";const e=new Map,t={set(t,i,n){e.has(t)||e.set(t,new Map);const s=e.get(t);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,i)=>e.has(t)&&e.get(t).get(i)||null,remove(t,i){if(!e.has(t))return;const n=e.get(t);n.delete(i),0===n.size&&e.delete(t)}},i="transitionend",n=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),s=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),a=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},o=e=>{e.dispatchEvent(new Event(i))},r=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),l=e=>r(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(n(e)):null,c=e=>{if(!r(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},h=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),d=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?d(e.parentNode):null},u=()=>{},_=e=>{e.offsetHeight},p=()=>window.jQuery&&!document.body.hasAttribute("data-coreui-no-jquery")?window.jQuery:null,f=[],g=()=>"rtl"===document.documentElement.dir,m=e=>{var t;t=()=>{const t=p();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of f)e()}),f.push(t)):t()},b=(e,t=[],i=e)=>"function"==typeof e?e.call(...t):i,v=(e,t,n=!0)=>{if(!n)return void b(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:i}=window.getComputedStyle(e);const n=Number.parseFloat(t),s=Number.parseFloat(i);return n||s?(t=t.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(i))):0})(t)+5;let a=!1;const r=({target:n})=>{n===t&&(a=!0,t.removeEventListener(i,r),b(e))};t.addEventListener(i,r),setTimeout(()=>{a||o(t)},s)},y=(e,t,i,n)=>{const s=e.length;let a=e.indexOf(t);return-1===a?!i&&n?e[s-1]:e[0]:(a+=i?1:-1,n&&(a=(a+s)%s),e[Math.max(0,Math.min(a,s-1))])},w=/[^.]*(?=\..*)\.|.*/,D=/\..*/,E=/::\d+$/,k={};let L=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},T=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","input","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function C(e,t){return t&&`${t}::${L++}`||e.uidEvent||L++}function S(e){const t=C(e);return e.uidEvent=t,k[t]=k[t]||{},k[t]}function O(e,t,i=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===i)}function x(e,t,i){const n="string"==typeof t,s=n?i:t||i;let a=P(e);return T.has(a)||(a=e),[n,s,a]}function I(e,t,i,n,s){if("string"!=typeof t||!e)return;let[a,o,r]=x(t,i,n);if(t in A){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=S(e),c=l[r]||(l[r]={}),h=O(c,o,a?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=C(o,t.replace(w,"")),u=a?function(e,t,i){return function n(s){const a=e.querySelectorAll(t);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const r of a)if(r===o)return B(s,{delegateTarget:o}),n.oneOff&&M.off(e,s.type,t,i),i.apply(o,[s])}}(e,i,o):function(e,t){return function i(n){return B(n,{delegateTarget:e}),i.oneOff&&M.off(e,n.type,t),t.apply(e,[n])}}(e,o);u.delegationSelector=a?i:null,u.callable=o,u.oneOff=s,u.uidEvent=d,c[d]=u,e.addEventListener(r,u,a)}function $(e,t,i,n,s){const a=O(t[i],n,s);a&&(e.removeEventListener(i,a,Boolean(s)),delete t[i][a.uidEvent])}function N(e,t,i,n){const s=t[i]||{};for(const[a,o]of Object.entries(s))a.includes(n)&&$(e,t,i,o.callable,o.delegationSelector)}function P(e){return e=e.replace(D,""),A[e]||e}const M={on(e,t,i,n){I(e,t,i,n,!1)},one(e,t,i,n){I(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,a,o]=x(t,i,n),r=o!==t,l=S(e),c=l[o]||{},h=t.startsWith(".");if(void 0===a){if(h)for(const i of Object.keys(l))N(e,l,i,t.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(E,"");r&&!t.includes(s)||$(e,l,o,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(e,l,o,a,s?i:null)}},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=p();let s=null,a=!0,o=!0,r=!1;t!==P(t)&&n&&(s=n.Event(t,i),n(e).trigger(s),a=!s.isPropagationStopped(),o=!s.isImmediatePropagationStopped(),r=s.isDefaultPrevented());const l=B(new Event(t,{bubbles:a,cancelable:!0}),i);return r&&l.preventDefault(),o&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function B(e,t={}){for(const[i,n]of Object.entries(t))try{e[i]=n}catch(t){Object.defineProperty(e,i,{configurable:!0,get:()=>n})}return e}function j(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 F={setDataAttribute(e,t,i){e.setAttribute(`data-coreui-${H(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-coreui-${H(t)}`)},getDataAttributes(e){if(!e)return{};const t={},i=Object.keys(e.dataset).filter(e=>e.startsWith("coreui")&&!e.startsWith("coreuiConfig"));for(const n of i){let i=n.replace(/^coreui/,"");i=i.charAt(0).toLowerCase()+i.slice(1),t[i]=j(e.dataset[n])}return t},getDataAttribute:(e,t)=>j(e.getAttribute(`data-coreui-${H(t)}`))};class z{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=r(t)?F.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...r(t)?F.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[i,n]of Object.entries(t)){const t=e[i],a=r(t)?"element":s(t);if(!new RegExp(n).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${a}" but expected type "${n}".`)}}}class V extends z{constructor(e,i){super(),(e=l(e))&&(this._element=e,this._config=this._getConfig(i),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),M.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,i=!0){v(e,t,i)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(l(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.23.0"}static get DATA_KEY(){return`coreui.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const R=e=>{let t=e.getAttribute("data-coreui-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=>n(e)).join(","):null},W={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 n=e.parentNode.closest(t);for(;n;)i.push(n),n=n.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=>!h(e)&&c(e))},getSelectorFromElement(e){const t=R(e);return t&&W.findOne(t)?t:null},getElementFromSelector(e){const t=R(e);return t?W.findOne(t):null},getMultipleElementsFromSelector(e){const t=R(e);return t?W.find(t):[]}},q=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;M.on(document,i,`[data-coreui-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),h(this))return;const s=W.getElementFromSelector(this)||this.closest(`.${n}`);e.getOrCreateInstance(s)[t]()})},Y=".coreui.alert",U=`close${Y}`,G=`closed${Y}`;class K extends V{static get NAME(){return"alert"}close(){if(M.trigger(this._element,U).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(),M.trigger(this._element,G),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=K.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(K,"close"),m(K);var Q="top",X="bottom",J="right",Z="left",ee="auto",te=[Q,X,J,Z],ie="start",ne="end",se="clippingParents",ae="viewport",oe="popper",re="reference",le=te.reduce(function(e,t){return e.concat([t+"-"+ie,t+"-"+ne])},[]),ce=[].concat(te,[ee]).reduce(function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ne])},[]),he="beforeRead",de="read",ue="afterRead",_e="beforeMain",pe="main",fe="afterMain",ge="beforeWrite",me="write",be="afterWrite",ve=[he,de,ue,_e,pe,fe,ge,me,be];function ye(e){return e?(e.nodeName||"").toLowerCase():null}function we(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function De(e){return e instanceof we(e).Element||e instanceof Element}function Ee(e){return e instanceof we(e).HTMLElement||e instanceof HTMLElement}function ke(e){return"undefined"!=typeof ShadowRoot&&(e instanceof we(e).ShadowRoot||e instanceof ShadowRoot)}const Le={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];Ee(s)&&ye(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],s=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});Ee(n)&&ye(n)&&(Object.assign(n.style,a),Object.keys(s).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};function Ae(e){return e.split("-")[0]}var Te=Math.max,Ce=Math.min,Se=Math.round;function Oe(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function xe(){return!/^((?!chrome|android).)*safari/i.test(Oe())}function Ie(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),s=1,a=1;t&&Ee(e)&&(s=e.offsetWidth>0&&Se(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Se(n.height)/e.offsetHeight||1);var o=(De(e)?we(e):window).visualViewport,r=!xe()&&i,l=(n.left+(r&&o?o.offsetLeft:0))/s,c=(n.top+(r&&o?o.offsetTop:0))/a,h=n.width/s,d=n.height/a;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function $e(e){var t=Ie(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Ne(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&ke(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Pe(e){return we(e).getComputedStyle(e)}function Me(e){return["table","td","th"].indexOf(ye(e))>=0}function Be(e){return((De(e)?e.ownerDocument:e.document)||window.document).documentElement}function je(e){return"html"===ye(e)?e:e.assignedSlot||e.parentNode||(ke(e)?e.host:null)||Be(e)}function He(e){return Ee(e)&&"fixed"!==Pe(e).position?e.offsetParent:null}function Fe(e){for(var t=we(e),i=He(e);i&&Me(i)&&"static"===Pe(i).position;)i=He(i);return i&&("html"===ye(i)||"body"===ye(i)&&"static"===Pe(i).position)?t:i||function(e){var t=/firefox/i.test(Oe());if(/Trident/i.test(Oe())&&Ee(e)&&"fixed"===Pe(e).position)return null;var i=je(e);for(ke(i)&&(i=i.host);Ee(i)&&["html","body"].indexOf(ye(i))<0;){var n=Pe(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function ze(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ve(e,t,i){return Te(e,Ce(t,i))}function Re(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function We(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}const qe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,s=e.options,a=i.elements.arrow,o=i.modifiersData.popperOffsets,r=Ae(i.placement),l=ze(r),c=[Z,J].indexOf(r)>=0?"height":"width";if(a&&o){var h=function(e,t){return Re("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:We(e,te))}(s.padding,i),d=$e(a),u="y"===l?Q:Z,_="y"===l?X:J,p=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],f=o[l]-i.rects.reference[l],g=Fe(a),m=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-f/2,v=h[u],y=m-d[c]-h[_],w=m/2-d[c]/2+b,D=Ve(v,w,y),E=l;i.modifiersData[n]=((t={})[E]=D,t.centerOffset=D-w,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Ne(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ye(e){return e.split("-")[1]}var Ue={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ge(e){var t,i=e.popper,n=e.popperRect,s=e.placement,a=e.variation,o=e.offsets,r=e.position,l=e.gpuAcceleration,c=e.adaptive,h=e.roundOffsets,d=e.isFixed,u=o.x,_=void 0===u?0:u,p=o.y,f=void 0===p?0:p,g="function"==typeof h?h({x:_,y:f}):{x:_,y:f};_=g.x,f=g.y;var m=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=Z,y=Q,w=window;if(c){var D=Fe(i),E="clientHeight",k="clientWidth";D===we(i)&&"static"!==Pe(D=Be(i)).position&&"absolute"===r&&(E="scrollHeight",k="scrollWidth"),(s===Q||(s===Z||s===J)&&a===ne)&&(y=X,f-=(d&&D===w&&w.visualViewport?w.visualViewport.height:D[E])-n.height,f*=l?1:-1),s!==Z&&(s!==Q&&s!==X||a!==ne)||(v=J,_-=(d&&D===w&&w.visualViewport?w.visualViewport.width:D[k])-n.width,_*=l?1:-1)}var L,A=Object.assign({position:r},c&&Ue),T=!0===h?function(e,t){var i=e.x,n=e.y,s=t.devicePixelRatio||1;return{x:Se(i*s)/s||0,y:Se(n*s)/s||0}}({x:_,y:f},we(i)):{x:_,y:f};return _=T.x,f=T.y,l?Object.assign({},A,((L={})[y]=b?"0":"",L[v]=m?"0":"",L.transform=(w.devicePixelRatio||1)<=1?"translate("+_+"px, "+f+"px)":"translate3d("+_+"px, "+f+"px, 0)",L)):Object.assign({},A,((t={})[y]=b?f+"px":"",t[v]=m?_+"px":"",t.transform="",t))}const Ke={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,a=i.adaptive,o=void 0===a||a,r=i.roundOffsets,l=void 0===r||r,c={placement:Ae(t.placement),variation:Ye(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ge(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ge(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Qe={passive:!0};const Xe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,a=void 0===s||s,o=n.resize,r=void 0===o||o,l=we(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",i.update,Qe)}),r&&l.addEventListener("resize",i.update,Qe),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",i.update,Qe)}),r&&l.removeEventListener("resize",i.update,Qe)}},data:{}};var Je={left:"right",right:"left",bottom:"top",top:"bottom"};function Ze(e){return e.replace(/left|right|bottom|top/g,function(e){return Je[e]})}var et={start:"end",end:"start"};function tt(e){return e.replace(/start|end/g,function(e){return et[e]})}function it(e){var t=we(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nt(e){return Ie(Be(e)).left+it(e).scrollLeft}function st(e){var t=Pe(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function at(e){return["html","body","#document"].indexOf(ye(e))>=0?e.ownerDocument.body:Ee(e)&&st(e)?e:at(je(e))}function ot(e,t){var i;void 0===t&&(t=[]);var n=at(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),a=we(n),o=s?[a].concat(a.visualViewport||[],st(n)?n:[]):n,r=t.concat(o);return s?r:r.concat(ot(je(o)))}function rt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lt(e,t,i){return t===ae?rt(function(e,t){var i=we(e),n=Be(e),s=i.visualViewport,a=n.clientWidth,o=n.clientHeight,r=0,l=0;if(s){a=s.width,o=s.height;var c=xe();(c||!c&&"fixed"===t)&&(r=s.offsetLeft,l=s.offsetTop)}return{width:a,height:o,x:r+nt(e),y:l}}(e,i)):De(t)?function(e,t){var i=Ie(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}(t,i):rt(function(e){var t,i=Be(e),n=it(e),s=null==(t=e.ownerDocument)?void 0:t.body,a=Te(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Te(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),r=-n.scrollLeft+nt(e),l=-n.scrollTop;return"rtl"===Pe(s||i).direction&&(r+=Te(i.clientWidth,s?s.clientWidth:0)-a),{width:a,height:o,x:r,y:l}}(Be(e)))}function ct(e){var t,i=e.reference,n=e.element,s=e.placement,a=s?Ae(s):null,o=s?Ye(s):null,r=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(a){case Q:t={x:r,y:i.y-n.height};break;case X:t={x:r,y:i.y+i.height};break;case J:t={x:i.x+i.width,y:l};break;case Z:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=a?ze(a):null;if(null!=c){var h="y"===c?"height":"width";switch(o){case ie:t[c]=t[c]-(i[h]/2-n[h]/2);break;case ne:t[c]=t[c]+(i[h]/2-n[h]/2)}}return t}function ht(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,a=i.strategy,o=void 0===a?e.strategy:a,r=i.boundary,l=void 0===r?se:r,c=i.rootBoundary,h=void 0===c?ae:c,d=i.elementContext,u=void 0===d?oe:d,_=i.altBoundary,p=void 0!==_&&_,f=i.padding,g=void 0===f?0:f,m=Re("number"!=typeof g?g:We(g,te)),b=u===oe?re:oe,v=e.rects.popper,y=e.elements[p?b:u],w=function(e,t,i,n){var s="clippingParents"===t?function(e){var t=ot(je(e)),i=["absolute","fixed"].indexOf(Pe(e).position)>=0&&Ee(e)?Fe(e):e;return De(i)?t.filter(function(e){return De(e)&&Ne(e,i)&&"body"!==ye(e)}):[]}(e):[].concat(t),a=[].concat(s,[i]),o=a[0],r=a.reduce(function(t,i){var s=lt(e,i,n);return t.top=Te(s.top,t.top),t.right=Ce(s.right,t.right),t.bottom=Ce(s.bottom,t.bottom),t.left=Te(s.left,t.left),t},lt(e,o,n));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(De(y)?y:y.contextElement||Be(e.elements.popper),l,h,o),D=Ie(e.elements.reference),E=ct({reference:D,element:v,placement:s}),k=rt(Object.assign({},v,E)),L=u===oe?k:D,A={top:w.top-L.top+m.top,bottom:L.bottom-w.bottom+m.bottom,left:w.left-L.left+m.left,right:L.right-w.right+m.right},T=e.modifiersData.offset;if(u===oe&&T){var C=T[s];Object.keys(A).forEach(function(e){var t=[J,X].indexOf(e)>=0?1:-1,i=[Q,X].indexOf(e)>=0?"y":"x";A[e]+=C[i]*t})}return A}function dt(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,a=i.rootBoundary,o=i.padding,r=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?ce:l,h=Ye(n),d=h?r?le:le.filter(function(e){return Ye(e)===h}):te,u=d.filter(function(e){return c.indexOf(e)>=0});0===u.length&&(u=d);var _=u.reduce(function(t,i){return t[i]=ht(e,{placement:i,boundary:s,rootBoundary:a,padding:o})[Ae(i)],t},{});return Object.keys(_).sort(function(e,t){return _[e]-_[t]})}const ut={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,a=void 0===s||s,o=i.altAxis,r=void 0===o||o,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,_=i.flipVariations,p=void 0===_||_,f=i.allowedAutoPlacements,g=t.options.placement,m=Ae(g),b=l||(m!==g&&p?function(e){if(Ae(e)===ee)return[];var t=Ze(e);return[tt(e),t,tt(t)]}(g):[Ze(g)]),v=[g].concat(b).reduce(function(e,i){return e.concat(Ae(i)===ee?dt(t,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:f}):i)},[]),y=t.rects.reference,w=t.rects.popper,D=new Map,E=!0,k=v[0],L=0;L<v.length;L++){var A=v[L],T=Ae(A),C=Ye(A)===ie,S=[Q,X].indexOf(T)>=0,O=S?"width":"height",x=ht(t,{placement:A,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),I=S?C?J:Z:C?X:Q;y[O]>w[O]&&(I=Ze(I));var $=Ze(I),N=[];if(a&&N.push(x[T]<=0),r&&N.push(x[I]<=0,x[$]<=0),N.every(function(e){return e})){k=A,E=!1;break}D.set(A,N)}if(E)for(var P=function(e){var t=v.find(function(t){var i=D.get(t);if(i)return i.slice(0,e).every(function(e){return e})});if(t)return k=t,"break"},M=p?3:1;M>0&&"break"!==P(M);M--);t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function pt(e){return[Q,J,X,Z].some(function(t){return e[t]>=0})}const ft={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,a=t.modifiersData.preventOverflow,o=ht(t,{elementContext:"reference"}),r=ht(t,{altBoundary:!0}),l=_t(o,n),c=_t(r,s,a),h=pt(l),d=pt(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},gt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.offset,a=void 0===s?[0,0]:s,o=ce.reduce(function(e,i){return e[i]=function(e,t,i){var n=Ae(e),s=[Z,Q].indexOf(n)>=0?-1:1,a="function"==typeof i?i(Object.assign({},t,{placement:e})):i,o=a[0],r=a[1];return o=o||0,r=(r||0)*s,[Z,J].indexOf(n)>=0?{x:r,y:o}:{x:o,y:r}}(i,t.rects,a),e},{}),r=o[t.placement],l=r.x,c=r.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}},mt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=ct({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},bt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,a=void 0===s||s,o=i.altAxis,r=void 0!==o&&o,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,_=void 0===u||u,p=i.tetherOffset,f=void 0===p?0:p,g=ht(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),m=Ae(t.placement),b=Ye(t.placement),v=!b,y=ze(m),w="x"===y?"y":"x",D=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,L="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,A="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(D){if(a){var S,O="y"===y?Q:Z,x="y"===y?X:J,I="y"===y?"height":"width",$=D[y],N=$+g[O],P=$-g[x],M=_?-k[I]/2:0,B=b===ie?E[I]:k[I],j=b===ie?-k[I]:-E[I],H=t.elements.arrow,F=_&&H?$e(H):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=z[O],R=z[x],W=Ve(0,E[I],F[I]),q=v?E[I]/2-M-W-V-A.mainAxis:B-W-V-A.mainAxis,Y=v?-E[I]/2+M+W+R+A.mainAxis:j+W+R+A.mainAxis,U=t.elements.arrow&&Fe(t.elements.arrow),G=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,K=null!=(S=null==T?void 0:T[y])?S:0,ee=$+Y-K,te=Ve(_?Ce(N,$+q-K-G):N,$,_?Te(P,ee):P);D[y]=te,C[y]=te-$}if(r){var ne,se="x"===y?Q:Z,ae="x"===y?X:J,oe=D[w],re="y"===w?"height":"width",le=oe+g[se],ce=oe-g[ae],he=-1!==[Q,Z].indexOf(m),de=null!=(ne=null==T?void 0:T[w])?ne:0,ue=he?le:oe-E[re]-k[re]-de+A.altAxis,_e=he?oe+E[re]+k[re]-de-A.altAxis:ce,pe=_&&he?function(e,t,i){var n=Ve(e,t,i);return n>i?i:n}(ue,oe,_e):Ve(_?ue:le,oe,_?_e:ce);D[w]=pe,C[w]=pe-oe}t.modifiersData[n]=C}},requiresIfExists:["offset"]};function vt(e,t,i){void 0===i&&(i=!1);var n,s,a=Ee(t),o=Ee(t)&&function(e){var t=e.getBoundingClientRect(),i=Se(t.width)/e.offsetWidth||1,n=Se(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),r=Be(t),l=Ie(e,o,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(a||!a&&!i)&&(("body"!==ye(t)||st(r))&&(c=(n=t)!==we(n)&&Ee(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:it(n)),Ee(t)?((h=Ie(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):r&&(h.x=nt(r))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function yt(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){i.has(e.name)||s(e)}),n}var wt={placement:"bottom",modifiers:[],strategy:"absolute"};function Dt(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Et(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,s=t.defaultOptions,a=void 0===s?wt:s;return function(e,t,i){void 0===i&&(i=a);var s,o,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},wt,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,h={state:r,setOptions:function(i){var s="function"==typeof i?i(r.options):i;d(),r.options=Object.assign({},a,r.options,s),r.scrollParents={reference:De(e)?ot(e):e.contextElement?ot(e.contextElement):[],popper:ot(t)};var o,c,u=function(e){var t=yt(e);return ve.reduce(function(e,i){return e.concat(t.filter(function(e){return e.phase===i}))},[])}((o=[].concat(n,r.options.modifiers),c=o.reduce(function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return r.orderedModifiers=u.filter(function(e){return e.enabled}),r.orderedModifiers.forEach(function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,s=e.effect;if("function"==typeof s){var a=s({state:r,name:t,instance:h,options:n});l.push(a||function(){})}}),h.update()},forceUpdate:function(){if(!c){var e=r.elements,t=e.reference,i=e.popper;if(Dt(t,i)){r.rects={reference:vt(t,Fe(i),"fixed"===r.options.strategy),popper:$e(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach(function(e){return r.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<r.orderedModifiers.length;n++)if(!0!==r.reset){var s=r.orderedModifiers[n],a=s.fn,o=s.options,l=void 0===o?{}:o,d=s.name;"function"==typeof a&&(r=a({state:r,options:l,name:d,instance:h})||r)}else r.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(e){h.forceUpdate(),e(r)})},function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(s())})})),o}),destroy:function(){d(),c=!0}};if(!Dt(e,t))return h;function d(){l.forEach(function(e){return e()}),l=[]}return h.setOptions(i).then(function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)}),h}}var kt=Et(),Lt=Et({defaultModifiers:[Xe,mt,Ke,Le]}),At=Et({defaultModifiers:[Xe,mt,Ke,Le,gt,ut,bt,qe,ft]});const Tt=Object.freeze(Object.defineProperty({__proto__:null,afterMain:fe,afterRead:ue,afterWrite:be,applyStyles:Le,arrow:qe,auto:ee,basePlacements:te,beforeMain:_e,beforeRead:he,beforeWrite:ge,bottom:X,clippingParents:se,computeStyles:Ke,createPopper:At,createPopperBase:kt,createPopperLite:Lt,detectOverflow:ht,end:ne,eventListeners:Xe,flip:ut,hide:ft,left:Z,main:pe,modifierPhases:ve,offset:gt,placements:ce,popper:oe,popperGenerator:Et,popperOffsets:mt,preventOverflow:bt,read:de,reference:re,right:J,start:ie,top:Q,variationPlacements:le,viewport:ae,write:me},Symbol.toStringTag,{value:"Module"})),Ct={"*":["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:[]},St=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ot=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,xt=(e,t)=>{const i=e.nodeName.toLowerCase();return t.includes(i)?!St.has(i)||Boolean(Ot.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(i))};function It(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const n=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const e of s){const i=e.nodeName.toLowerCase();if(!Object.keys(t).includes(i)){e.remove();continue}const n=[].concat(...e.attributes),s=[].concat(t["*"]||[],t[i]||[]);for(const t of n)xt(t,s)||e.removeAttribute(t.nodeName)}return n.body.innerHTML}const $t="coreui.autocomplete",Nt=`.${$t}`,Pt=".data-api",Mt="ArrowUp",Bt="ArrowDown",jt="Backspace",Ht="Delete",Ft="Enter",zt="Tab",Vt=`blur${Nt}`,Rt=`changed${Nt}`,Wt=`click${Nt}`,qt=`hide${Nt}`,Yt=`hidden${Nt}`,Ut=`input${Nt}`,Gt=`keydown${Nt}`,Kt=`keyup${Nt}`,Qt=`show${Nt}`,Xt=`shown${Nt}`,Jt=`click${Nt}${Pt}`,Zt=`keyup${Nt}${Pt}`,ei=`load${Nt}${Pt}`,ti="disabled",ii="autocomplete-input",ni="autocomplete-option",si="selected",ai="show",oi=`.autocomplete:not(.disabled).${ai}`,ri=".autocomplete-option",li=".autocomplete-options-empty",ci={allowList:Ct,allowOnlyDefinedOptions:!1,ariaCleanerLabel:"Clear selection",ariaIndicatorLabel:"Toggle visibility of options menu",cleaner:!1,clearSearchOnSelect:!0,container:!1,disabled:!1,highlightOptionsOnSearch:!1,id:null,indicator:!1,invalid:!1,name:null,options:!1,optionsGroupsTemplate:null,optionsMaxHeight:"auto",optionsTemplate:null,placeholder:null,required:!1,sanitize:!0,sanitizeFn:null,search:null,searchNoResultsLabel:!1,showHints:!1,valid:!1,value:null},hi={allowList:"object",allowOnlyDefinedOptions:"boolean",ariaCleanerLabel:"string",ariaIndicatorLabel:"string",cleaner:"boolean",clearSearchOnSelect:"boolean",container:"(string|element|boolean)",disabled:"boolean",highlightOptionsOnSearch:"boolean",id:"(string|null)",indicator:"boolean",invalid:"boolean",name:"(string|null)",options:"(array|null)",optionsGroupsTemplate:"(function|null)",optionsMaxHeight:"(number|string)",optionsTemplate:"(function|null)",placeholder:"(string|null)",required:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",search:"(array|string|null)",searchNoResultsLabel:"boolean|string",showHints:"boolean",valid:"boolean",value:"(number|string|null)"};class di extends V{constructor(e,i){var n;super(e,i),this._uniqueId=null!=(n=this._config.id)?n:a(`${this.constructor.NAME}`),this._indicatorElement=null,this._inputElement=null,this._inputHintElement=null,this._togglerElement=null,this._optionsElement=null,this._menu=null,this._selected=[],this._options=this._getOptionsFromConfig(),this._popper=null,this._search="",this._createAutocomplete(),this._addEventListeners(),t.set(this._element,$t,this)}static get Default(){return ci}static get DefaultType(){return hi}static get NAME(){return"autocomplete"}toggle(){return this._isShown()?this.hide():this.show()}show(){this._config.disabled||this._isShown()||(this._config.searchNoResultsLabel||0!==this._flattenOptions().filter(e=>e.label.toLowerCase().includes(this._search.toLowerCase())).length)&&(M.trigger(this._element,Qt),this._element.classList.add(ai),this._inputElement.setAttribute("aria-expanded","true"),this._config.container&&(this._menu.style.minWidth=`${this._element.offsetWidth}px`,this._menu.classList.add(ai)),M.trigger(this._element,Xt),this._createPopper())}hide(){M.trigger(this._element,qt),this._popper&&this._popper.destroy(),this._element.classList.remove(ai),this._inputElement.setAttribute("aria-expanded","false"),this._config.container&&this._menu.classList.remove(ai),this._inputHintElement&&(this._inputHintElement.value=""),M.trigger(this._element,Yt)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}clear(){this.deselectAll(),this.search(""),this._filterOptionsList(),this._inputElement.value="",M.trigger(this._element,Rt,{value:this._selected})}search(e){this._search=e.length>0?e.toLowerCase():"",this._isExternalSearch()||this._filterOptionsList(),M.trigger(this._element,Ut,{value:e})}update(e){e.value&&this.deselectAll(),this._config={...this._config,...this._configAfterMerge(e)},this._options=this._getOptionsFromConfig(),this._optionsElement.innerHTML="",this._createOptions(this._optionsElement,this._options)}deselectAll(e=this._selected){if(0!==this._selected.length)for(const t of e)t.disabled||(Array.isArray(t.options)?this.deselectAll(t.options):(this._deselectOption(t.value),this._updateCleaner()))}_flattenOptions(e=this._options,t=[]){for(const i of e)i&&Array.isArray(i.options)?this._flattenOptions(i.options,t):t.push(i);return t}_getClassNames(){return this._element.classList.value.split(" ")}_highlightOption(e){const t=new RegExp(this._search,"gi");return e.replace(t,e=>`<strong>${e}</strong>`)}_isExternalSearch(){return Array.isArray(this._config.search)&&this._config.search.includes("external")}_isGlobalSearch(){return Array.isArray(this._config.search)&&this._config.search.includes("global")}_isVisible(e){return"none"!==window.getComputedStyle(e).display}_isShown(){return this._element.classList.contains(ai)}_addEventListeners(){M.on(this._element,Wt,e=>{this._config.disabled||e.target.closest(".autocomplete-indicator")||this.show()}),M.on(this._element,Gt,e=>{if("Escape"===e.key)return this.hide(),void(this._config.allowOnlyDefinedOptions&&0===this._selected.length&&(this.search(""),this._inputElement.value=""));!this._isGlobalSearch()||1!==e.key.length&&e.key!==jt&&e.key!==Ht||this._inputElement.focus()}),M.on(this._menu,Gt,e=>{!this._isGlobalSearch()||1!==e.key.length&&e.key!==jt&&e.key!==Ht||this._inputElement.focus()}),M.on(this._togglerElement,Gt,e=>{if(!this._isShown()&&(e.key===Ft||e.key===Bt))return e.preventDefault(),void this.show();this._isShown()&&e.key===Bt&&(e.preventDefault(),this._selectMenuItem(e))}),M.on(this._indicatorElement,Wt,e=>{e.preventDefault(),this.toggle()}),M.on(this._inputElement,Vt,()=>{const e=this._flattenOptions().filter(e=>e.label.toLowerCase().startsWith(this._inputElement.value.toLowerCase()));this._config.allowOnlyDefinedOptions&&0===this._selected.length&&0===e.length&&this.clear()}),M.on(this._inputElement,Gt,e=>{if(this._isShown()||e.key===zt||this.show(),e.key!==Bt||this._inputElement.value.length!==this._inputElement.selectionStart){if(e.key===zt&&this._config.showHints&&this._inputElement.value.length>0){this._inputHintElement.value&&(e.preventDefault(),e.stopPropagation());const t=this._flattenOptions().filter(e=>e.label.toLowerCase().startsWith(this._inputElement.value.toLowerCase()));t.length>0&&this._selectOption(t[0])}if(e.key===Ft){if(e.preventDefault(),e.stopPropagation(),0===this._inputElement.value.length)return;const t=this._flattenOptions().filter(e=>e.label.toLowerCase()===this._inputElement.value.toLowerCase());t.length>0&&this._selectOption(t[0]),0!==t.length||this._config.allowOnlyDefinedOptions||(M.trigger(this._element,Rt,{value:this._inputElement.value}),this.hide(),this._config.clearSearchOnSelect&&this.search(""))}}else this._selectMenuItem(e)}),M.on(this._inputElement,Kt,e=>{if(1===e.key.length||e.key===jt||e.key===Ht){const{value:t}=e.target;if(this.search(t),this._config.showHints){const e=t?this._flattenOptions().filter(e=>e.label.toLowerCase().startsWith(t.toLowerCase())):[];this._inputHintElement.value=e.length>0?`${t}${e[0].label.slice(t.length)}`:""}this._selected.length>0&&(this.deselectAll(),M.trigger(this._element,Rt,{value:this._selected}))}}),M.on(this._optionsElement,Wt,e=>{e.preventDefault(),e.stopPropagation(),this._onOptionsClick(e.target)}),M.on(this._cleanerElement,Wt,e=>{this._config.disabled||(e.preventDefault(),e.stopPropagation(),this.clear())}),M.on(this._cleanerElement,Gt,e=>{this._config.disabled||e.key!==Ft||(e.preventDefault(),e.stopPropagation(),this.clear())}),M.on(this._optionsElement,Gt,e=>{e.key===Ft&&this._onOptionsClick(e.target),[Mt,Bt].includes(e.key)&&(e.preventDefault(),this._selectMenuItem(e))})}_getOptionsFromConfig(e=this._config.options){if(!e||!Array.isArray(e))return[];const t=[];for(const n of e){var i;if(n.options&&Array.isArray(n.options)){const e={...n};delete e.label,delete e.options,t.push({...e,label:n.label,options:this._getOptionsFromConfig(n.options)});continue}const e="string"==typeof n?n:n.label,s=null!=(i=n.value)?i:"string"==typeof n?n:n.label,a=n.selected||this._config.value&&this._config.value===s,o="object"==typeof n?{...n}:{};delete o.label,delete o.value,delete o.selected,delete o.disabled,t.push({...o,label:e,value:String(s),...a&&{selected:!0},...n.disabled&&{disabled:!0}}),a&&this._selected.push({label:n.label,value:String(s)})}return t}_createAutocomplete(){this._element.classList.add("autocomplete"),this._element.classList.toggle("is-invalid",this._config.invalid),this._element.classList.toggle("is-valid",this._config.valid),this._config.disabled&&this._element.classList.add(ti);for(const e of this._getClassNames())this._element.classList.add(e);this._createInputGroup(),this._createButtons(),this._createOptionsContainer(),this._updateOptionsList()}_createInputGroup(){var e;const t=document.createElement("div");if(t.classList.add("autocomplete-input-group"),this._togglerElement=t,this._config.search||this._config.disabled||(t.tabIndex=-1),!this._config.disabled&&this._config.showHints){const e=document.createElement("input");e.classList.add(ii,"autocomplete-input-hint"),e.setAttribute("name",(this._config.name||`${this._uniqueId}-hint`).toString()),e.autocomplete="off",e.readOnly=!0,e.tabIndex=-1,e.setAttribute("aria-hidden",!0),t.append(e),this._inputHintElement=e}const i=document.createElement("input");i.classList.add(ii),i.id=this._uniqueId,i.setAttribute("name",(this._config.name||this._uniqueId).toString()),i.autocomplete="off",i.placeholder=null!=(e=this._config.placeholder)?e:"",i.role="combobox",i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded","false"),i.setAttribute("aria-haspopup","listbox"),this._config.disabled&&(i.setAttribute("disabled",!0),i.tabIndex=-1),this._config.required&&i.setAttribute("required",!0),t.append(i),this._inputElement=i,this._element.append(t)}_createButtons(){if(!this._config.cleaner&&!this._config.indicator)return;const e=document.createElement("div");if(e.classList.add("autocomplete-buttons"),!this._config.disabled&&this._config.cleaner){const t=document.createElement("button");t.type="button",t.classList.add("autocomplete-cleaner"),t.style.display="none",t.setAttribute("aria-label",this._config.ariaCleanerLabel),e.append(t),this._cleanerElement=t}if(this._config.indicator){const t=document.createElement("button");t.type="button",t.classList.add("autocomplete-indicator"),t.setAttribute("aria-label",this._config.ariaIndicatorLabel),this._config.disabled&&(t.tabIndex=-1),e.append(t),this._indicatorElement=t,this._indicatorElement=t}this._togglerElement.append(e),this._updateCleaner()}_createPopper(){if(void 0===Tt)throw new TypeError("CoreUI's Auto Complete component require Popper (https://popper.js.org)");const e={modifiers:[{name:"preventOverflow",options:{boundary:"clippingParents"}},{name:"offset",options:{offset:[0,2]}}],placement:g()?"bottom-end":"bottom-start"};this._popper=At(this._togglerElement,this._menu,e)}_createOptionsContainer(){const e=document.createElement("div");e.classList.add("autocomplete-dropdown"),e.role="listbox",e.setAttribute("aria-labelledby",this._uniqueId),e.setAttribute("id",`${this._uniqueId}-listbox`);const t=document.createElement("div");t.classList.add("autocomplete-options"),"auto"!==this._config.optionsMaxHeight&&(t.style.maxHeight=`${this._config.optionsMaxHeight}px`,t.style.overflow="auto"),e.append(t);const{container:i}=this._config;i?(this._inputElement.setAttribute("aria-owns",`${this._uniqueId}-listbox`),e.id=`${this._uniqueId}-listbox`,i.append(e)):this._element.append(e),this._createOptions(t,this._options),this._optionsElement=t,this._menu=e}_createOptions(e,t){for(const i of t){if(Array.isArray(i.options)){const t=document.createElement("div");t.classList.add("autocomplete-optgroup"),t.setAttribute("role","group");const n=document.createElement("div");this._config.optionsGroupsTemplate&&"function"==typeof this._config.optionsGroupsTemplate?n.innerHTML=this._config.sanitize?It(this._config.optionsGroupsTemplate(i),this._config.allowList,this._config.sanitizeFn):this._config.optionsGroupsTemplate(i):n.textContent=i.label,n.classList.add("autocomplete-optgroup-label"),t.append(n),this._createOptions(t,i.options),e.append(t);continue}const t=document.createElement("div");t.classList.add(ni),i.disabled&&(t.classList.add(ti),t.setAttribute("aria-disabled","true")),t.dataset.value=i.value,t.tabIndex=0,this._isExternalSearch()&&this._config.highlightOptionsOnSearch&&this._search?t.innerHTML=this._highlightOption(i.label):this._config.optionsTemplate&&"function"==typeof this._config.optionsTemplate?t.innerHTML=this._config.sanitize?It(this._config.optionsTemplate(i),this._config.allowList,this._config.sanitizeFn):this._config.optionsTemplate(i):t.textContent=i.label,e.append(t)}}_onOptionsClick(e){if(e.classList.contains("label"))return;if(!e.classList.contains(ni)&&!(e=e.closest(ri)))return;const{value:t}=e.dataset,i=this._findOptionByValue(t);i&&(this._selectOption(i),this._inputElement.focus())}_findOptionByValue(e,t=this._options){for(const i of t){if(i.value===e)return i;if(i.options&&Array.isArray(i.options)){const t=this._findOptionByValue(e,i.options);if(t)return t}}return null}_selectOption(e){this.deselectAll(),0===this._selected.filter(t=>t.value===e.value).length&&this._selected.push(e);const t=W.findOne(`[data-value="${e.value}"]`,this._optionsElement);t&&(t.classList.add(si),t.setAttribute("aria-selected",!0)),M.trigger(this._element,Rt,{value:e}),this._inputElement.value=e.label,this._config.showHints&&(this._inputHintElement.value=""),this.hide(),this._config.clearSearchOnSelect&&this.search(""),this._updateCleaner()}_deselectOption(e){this._selected=this._selected.filter(t=>t.value!==e);const t=W.findOne(`[data-value="${e}"]`,this._optionsElement);t&&(t.classList.remove(si),t.setAttribute("aria-selected",!1))}_updateCleaner(){this._config.cleaner&&null!==this._cleanerElement&&(this._selected.length>0?this._cleanerElement.style.removeProperty("display"):this._cleanerElement.style.display="none")}_updateOptionsList(e=this._options){for(const t of e)Array.isArray(t.options)?this._updateOptionsList(t.options):t.selected&&this._selectOption(t)}_filterOptionsList(){const e=W.find(ri,this._menu);let t=0;for(const i of e){-1===i.textContent.toLowerCase().indexOf(this._search)?i.style.display="none":(this._config.highlightOptionsOnSearch&&!this._config.optionsTemplate&&(i.innerHTML=this._highlightOption(i.textContent)),i.style.removeProperty("display"),t++);const e=i.closest(".autocomplete-optgroup");e&&(W.children(e,ri).filter(e=>this._isVisible(e)).length>0?e.style.removeProperty("display"):e.style.display="none")}if(t>0)W.findOne(li,this._menu)&&W.findOne(li,this._menu).remove();else if(0===t){if(this._config.searchNoResultsLabel){const e=document.createElement("div");return e.classList.add("autocomplete-options-empty"),e.innerHTML=this._config.searchNoResultsLabel,void(W.findOne(li,this._menu)||W.findOne(".autocomplete-options",this._menu).append(e))}this.hide()}}_selectMenuItem({key:e,target:t}){const i=W.find(".autocomplete-options .autocomplete-option:not(.disabled):not(:disabled)",this._menu).filter(e=>c(e));i.length&&y(i,t,e===Bt,!i.includes(t)).focus()}_configAfterMerge(e){return!0===e.container&&(e.container=document.body),"object"!=typeof e.container&&"string"!=typeof e.container||(e.container=l(e.container)),"string"==typeof e.options&&(e.options=e.options.split(/,\s*/).map(String)),"string"==typeof e.search&&(e.search=e.search.split(/,\s*/).map(String)),e}static autocompleteInterface(e,t){const i=di.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(){di.autocompleteInterface(this,e)})}static clearMenus(e){if(2===e.button||"keyup"===e.type&&e.key!==zt)return;const t=W.find(oi);for(const i of t){const t=di.getInstance(i);t&&(e.composedPath().includes(t._element)||(t._element,e.type,t.hide(),t.search(""),t._config.allowOnlyDefinedOptions&&0===t._selected.length&&(t._inputElement.value="")))}}}M.on(window,ei,()=>{for(const e of W.find('[data-coreui-toggle="autocomplete"]:not(.disabled)'))di.autocompleteInterface(e)}),M.on(document,Jt,di.clearMenus),M.on(document,Zt,di.clearMenus),m(di);const ui='[data-coreui-toggle="button"]';class _i 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=_i.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}M.on(document,"click.coreui.button.data-api",ui,e=>{e.preventDefault();const t=e.target.closest(ui);_i.getOrCreateInstance(t).toggle()}),m(_i);let pi,fi,gi,mi,bi,vi,yi,wi=e=>e;const Di=(e,t)=>{const i=(e=>{const t=new Date(e,0,4),i=t.getDay(),n=0===i?6:i-1,s=new Date(t);return s.setDate(t.getDate()-n),s})(e),n=new Date(i);return n.setDate(i.getDate()+7*(t-1)),n},Ei=e=>12*e.getFullYear()+e.getMonth(),ki=(e,t,i)=>null!==t&&e<t||null!==i&&e>i,Li=(e,t)=>{let i=e.replaceAll(/[.*+?^${}()|[\\]\\]/g,"\\$&");return i=i.replace("2013",String.raw(fi||(fi=wi`(?<year>\d{2,4})`))).replace("12",String.raw(gi||(gi=wi`(?<month>\d{1,2})`))).replace("31",String.raw(mi||(mi=wi`(?<day>\d{1,2})`))),t&&(i=i.replaceAll(/17|5/g,String.raw(bi||(bi=wi`(?<hour>\d{1,2})`))).replace("19",String.raw(vi||(vi=wi`(?<minute>\d{1,2})`))).replace("22",String.raw(yi||(yi=wi`(?<second>\d{1,2})`))).replaceAll(/AM|PM/gi,"(?<ampm>[APap][Mm])")),i},Ai=(e,t)=>{const i=Number.parseInt(e,10)-1,n=Number.parseInt(t,10);return i>=0&&i<=11&&n>=1&&n<=31},Ti=(e,t,i)=>{const n=((e,t)=>{const i=new Date(2013,11,31,17,19,22),n=[];try{const s=t?i.toLocaleString(e):i.toLocaleDateString(e);n.push(s)}catch(e){const s=t?i.toLocaleString("en-US"):i.toLocaleDateString("en-US");n.push(s)}const s=["/","-","."," "],a=n[0];let o="/";a.includes("/")?o="/":a.includes("-")?o="-":a.includes(".")&&(o=".");for(const e of s)if(e!==o){const t=o.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw(pi||(pi=wi`\$&`))),i=a.replaceAll(new RegExp(t,"g"),e);n.push(i)}return n})(t,i),s=((e,t,i)=>{for(const n of t){const t=Li(n,i),s=new RegExp(`^${t}$`),a=e.trim().match(s);if(null!=a&&a.groups)return a.groups}return null})(e,n,i);if(!s){const t=e.trim(),i=/[-/.:]/.test(t),