"}})}))}destroyForm(t){[].slice.call(t.querySelectorAll(this.selector)).map((t=>{t.tomselect&&t.tomselect.destroy()}))}}class Si extends ui{constructor(t,e){super(),this._selector=t,this._apiSelects=e}getId(){return"form-select"}init(){document.addEventListener("reset",(t=>{"FORM"===t.target.tagName.toUpperCase()&&setTimeout((()=>{const e=t.target.querySelectorAll(this._selector);for(let t of e)"SELECT"===t.tagName.toUpperCase()&&t.dispatchEvent(new Event("data-reloaded"))}),10)}))}activateSelectPickerByElement(t){let e=["change_listener"];void 0!==t.multiple&&!0===t.multiple&&e.push("remove_button");let n={lockOptgroupOrder:!0,allowEmptyOption:!0,plugins:e,maxOptions:500},i={option_create:(t,e)=>{const n=e(t.input);if(n.length<3)return null;return'
"}};const s=new(Ei())(t,n);t.addEventListener("data-reloaded",(t=>{s.clear(!0),s.clearOptionGroups(),s.clearOptions(),s.sync(),s.setValue(t.detail),s.refreshItems(),s.refreshOptions(!1)})),void 0!==t.dataset.reload&&t.addEventListener("reload",(()=>{s.disable(),t.disabled=!0;this.getContainer().getPlugin("api").get(t.dataset.reload,{},(e=>{this._updateSelect(t,e),s.enable(),t.disabled=!1})),t.dispatchEvent(new Event("change"))}))}supportsForm(t){return!0}activateForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{this.activateSelectPickerByElement(t)})),this._activateApiSelects(this._apiSelects)}destroyForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{t.tomselect&&t.tomselect.destroy()}))}_updateOptions(t,e){let n=null,i=null;if(i=t instanceof Element?t:document.querySelector(t),null===i)return void console.log("Missing select: "+t);const s=i.value;for(let t=0;ti.appendChild(t))),o.forEach((t=>i.appendChild(t))),i.value=s,""===i.value||null===i.value){const t=i.options,e=t.length;let s="";1===e&&void 0===i.dataset.autoselect?s=t[0].value:2===e&&null!==n&&(s=t[1].value),""!==s&&(i.value=s)}i.dispatchEvent(new CustomEvent("data-reloaded",{detail:i.value})),i.dispatchEvent(new Event("change"))}_getTitleFromPattern(t,e){const n=this.getDateUtils(),i=new RegExp("{[^}]*?}","g");let s=t,o=null;for(;null!==(o=i.exec(t));){const t=o[0].slice(1,-1);let i=void 0===e[t]?null:e[t];"start"!==t&&"end"!==t||(i=null===i?"?":n.getFormattedDate(i)),s=s.replace(new RegExp("{"+t+"}","g"),i??"")}s=s.replace(/- \?-\?/,""),s=s.replace(/\r\n|\r|\n/g," "),s=s.substring(0,110);let r=0,a=s.length;for(;r=0;)++r;for(;a>r&&"- ".indexOf(s[a-1])>=0;)--a;return r>0||a{if(null===e.target||!e.target.matches(t))return;const n=e.target,i="#"+n.dataset.relatedSelect,s=document.getElementById(n.dataset.relatedSelect);if(null===s||"1"===s.dataset.reloading)return;s.dataset.reloading="1",void 0!==s.tomselect&&s.tomselect.disable(),s.disabled=!0;let o=n.dataset.formPrefix;null==o?o="":o.length>0&&(o+="_");let r=this._buildUrlWithFormFields(n.dataset.apiUrl,o);const a=n.value;if(null==a||""===a||Array.isArray(a)&&0===a.length){if(void 0===n.dataset.emptyUrl)return this._updateSelect(i,{}),void(s.dataset.reloading="0");r=this._buildUrlWithFormFields(n.dataset.emptyUrl,o)}this.getContainer().getPlugin("api").get(r,{},(t=>{this._updateSelect(i,t),void 0!==s.tomselect&&s.tomselect.enable(),s.dataset.reloading="0",s.disabled=!1}))},document.addEventListener("change",this._eventHandlerApiSelects))}_buildUrlWithFormFields(t,e){let n=t;return t.split("?")[1].split("&").forEach((t=>{const[i,s]=t.split("="),o=decodeURIComponent(s).match(/%(.*)%/);if(null!==o){const i=o[1],r=(e+i).replace(/\[/,"").replace(/]/,""),a=document.getElementById(r);let l="";if(null===a);else if(null!==a.value)if(l=a.value,"SELECT"===a.tagName&&a.multiple)l=[...a.selectedOptions].map((t=>t.value));else if(""!==l)if("date"===a.type){const t=a.id.replace("_date","_time"),e=document.getElementById(t),n=null===e?"12:00:00":e.value,i=this.getDateUtils().fromHtml5Input(l,n);l=this.getDateUtils().formatForAPI(i,!1)}else if("text"===a.type&&a.name.includes("date")){const t=a.id.replace("_date","_time"),e=document.getElementById(t);let n="12:00:00",i="HH:mm";null!==e&&(n=e.value,i=e.dataset.format);const s=this.getDateUtils().fromFormat(l.trim()+" "+n.trim(),a.dataset.format+" "+i);l=this.getDateUtils().formatForAPI(s,!1)}else void 0!==a.dataset.format&&this.getDateUtils().isValidDateTime(l,a.dataset.format)&&(l=this.getDateUtils().format(a.dataset.format,l));if(Array.isArray(l)){let e=[];for(let t of l)null===t&&(t=""),e.push(i+"="+t);n=n.replace(t,e.join("&"))}else null===l&&(l=""),n=n.replace(s,l)}})),n}_updateSelect(t,e){const n={};for(const t of e){let e="__empty__";void 0!==t.parentTitle&&null!==t.parentTitle&&(e=t.parentTitle),void 0===n[e]&&(n[e]=[]),n[e].push(t)}const i={};Object.keys(n).sort().forEach((function(t){i[t]=n[t]})),this._updateOptions(t,i)}}class Oi extends si{getId(){return"form"}activateForm(t){[].slice.call(document.querySelectorAll(t)).map((t=>{for(const e of this.getContainer().getPlugins())e instanceof ui&&e.supportsForm(t)&&e.activateForm(t)}))}destroyForm(t){[].slice.call(document.querySelectorAll(t)).map((t=>{for(const e of this.getContainer().getPlugins())e instanceof ui&&e.supportsForm(t)&&e.destroyForm(t)}))}convertFormDataToQueryString(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],s=new FormData(t);for(const t in e)s.set(t,e[t]);for(let t of s)n&&""===t[1]||i.push(encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]));return i.join("&")}}class Ci extends si{constructor(t){super(),this._selector=t}init(){document.addEventListener("click",(t=>{let e=t.target;for(;null!==e&&"function"==typeof e.matches&&!e.matches("body");){if(e.classList.contains(this._selector)){const n=e.dataset;let i=n.href;i||(i=e.getAttribute("href"));let s=null;"submit"===e.type&&void 0!==e.form&&(s=e.form),void 0!==n.question&&this.getContainer().getPlugin("alert").question(n.question,(function(t){t&&(null===s?document.location=i:(null!==i&&(s.action=i),s.submit()))})),t.preventDefault(),t.stopPropagation()}e=e.parentNode}}))}}class Li extends si{init(){if(null===document.getElementById("multi_update_all"))return;const t=document.querySelector("div.page-body");t.addEventListener("change",(t=>{if(t.target.matches("#multi_update_all")){const e=t.target.checked;for(const t of document.querySelectorAll(".multi_update_single"))t.checked=e;this._toggleForm(),t.stopPropagation()}else t.target.matches(".multi_update_single")&&(this._toggleForm(),t.stopPropagation())})),t.addEventListener("click",(t=>{if(t.target.matches(".multi_update_table_action")){const e=t.target,n=this._getSelectedIds(),i=document.getElementById("multi_update_form").dataset.question.replace(/%action%/,e.textContent).replace(/%count%/,n.length.toString());this.getPlugin("alert").question(i,(function(t){if(t){const t=document.getElementById("multi_update_form");t.action=e.dataset.href,t.submit()}}))}}))}_getSelectedIds(){let t=[];for(const e of document.querySelectorAll("input.multi_update_single:checked"))t.push(e.value);return t}_toggleForm(){const t=this._getSelectedIds();if(document.getElementById("multi_update_table_entities").value=t.join(","),t.length>0){for(const t of document.getElementsByClassName("multi_update_form_hide"))t.style.setProperty("display","none","important");document.getElementById("multi_update_form").style.display=null}else{document.getElementById("multi_update_form").style.setProperty("display","none","important");for(const t of document.getElementsByClassName("multi_update_form_hide"))t.style.display=null}}}class Mi extends si{getId(){return"date"}init(){this.getConfigurations().is24Hours()?this.timeFormat="HH:mm":this.timeFormat="hh:mm a",this.durationFormat=this.getConfiguration("formatDuration"),this.dateFormat=this.getConfiguration("formatDate")}_parseFormat(t){return t=(t=(t=(t=(t=(t=(t=t.replace("DD","dd")).replace("D","d")).replace("MM","LL")).replace("M","L")).replace("YYYY","yyyy")).replace("YY","yy")).replace("A","a")}format(t,e){let n=null;return n=null==e?ti.now():e instanceof Date?ti.fromJSDate(e):ti.fromISO(e),n.toFormat(this._parseFormat(t),{locale:"en-us"})}getFormattedDate(t){return this.format(this._parseFormat(this.dateFormat),t)}formatForAPI(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t instanceof Date&&(t=ti.fromJSDate(t)),void 0!==e&&e||(t=t.toUTC()),t.toISO({includeOffset:!1,suppressMilliseconds:!0})}fromFormat(t,e){return ti.fromFormat(t,this._parseFormat(e),{locale:"en-us"})}fromHtml5Input(t,e){return e=e??"",""===(t=t??"")&&""===e?ti.invalid("Empty date and time given"):(""!==t&&""!==e&&(t=t+"T"+e),ti.fromISO(t))}isValidDateTime(t,e){return this.fromFormat(t,e).isValid}addHumanDuration(t,e){let n=null;if(t instanceof Date)n=ti.fromJSDate(t);else{if(!(t instanceof ti))throw"addHumanDuration() needs a JS Date";n=t}const i=ti.fromISO(e),s=ti.now().startOf("day"),o=i.diff(s);return n.plus(o).toJSDate()}formatDuration(t){let e=null;return e="string"==typeof t?ti.now().diff(ti.fromISO(t)):Je.fromISO("PT"+(null===t?0:t)+"S"),this.formatLuxonDuration(e)}formatSeconds(t){return this.formatLuxonDuration(Je.fromObject({seconds:t}))}formatLuxonDuration(t){return t=t.shiftTo("hours","minutes","seconds"),this.formatAsDuration(t.hours,t.minutes)}formatTime(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ti.fromJSDate(t);return void 0!==e&&e||(n=n.toUTC()),n.toFormat(this.timeFormat)}formatAsDuration(t,e){let n=this.durationFormat;return(t<0||e<0)&&(t=Math.abs(t),e=Math.abs(e),n="-"+n),n.replace("%h",t.toString()).replace("%m",("0"+e).slice(-2))}getSecondsFromDurationString(t){const e=this.parseDuration(t);return null!==e&&e.isValid?e.as("seconds"):0}parseDuration(t){if(null==t||""===t)return new Je({seconds:0});let e=null;if(-1!==(t=t.trim().toUpperCase()).indexOf(":")){const[,n,i,s]=t.match(/(\d+):(\d+)(?::(\d+))*/);e=Je.fromObject({hours:n,minutes:i,seconds:s})}else if(-1!==t.indexOf(".")||-1!==t.indexOf(","))t=t.replace(/,/,"."),t=(3600*parseFloat(t)).toString(),e=Je.fromISO("PT"+t+"S");else if(-1!==t.indexOf("H")||-1!==t.indexOf("M")||-1!==t.indexOf("S"))e=Je.fromISO("PT"+t);else{let n=parseInt(t);const i=parseInt(t).toFixed();isNaN(n)||t!==i||(t=(3600*n).toString(),e=Je.fromISO("PT"+t+"S"))}return null!==e&&e.isValid?"-"===t[0]&&e.valueOf()>0?e.negate():e:new Je({seconds:0})}}class Ii extends si{getId(){return"escape"}escapeForHtml(t){if(null==t)return"";const e={"&":"&","<":"<",">":">"};return t.replace(/[&<>]/g,(function(t){return e[t]||t}))}}class Ai extends si{getId(){return"fetch"}fetch(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===e.headers&&(e.headers=new Headers),e.headers.append("X-Requested-With","Kimai"),e={redirect:"follow",...e},new Promise(((n,i)=>{fetch(t,e).then((t=>{if(t.ok)return 201===t.status&&t.headers.has("x-modal-redirect")?void(window.location=t.headers.get("x-modal-redirect")):void n(t);let e=!1;if(403===t.status){if(t.headers.has("login-required")){const t=this.getConfiguration("login").toString();this.getContainer().getPlugin("alert").question(this.translate("login.required"),(e=>{!0===e&&window.location.replace(t)})),e=!0}}else console.log("Some error occurred");e||i(t)})).catch((t=>{console.log("Error occurred while talking to Kimai backend",t),i(t)}))}))}}class Ni extends ui{supportsForm(t){return"timesheet_edit_form"===t.name||"timesheet_admin_edit_form"===t.name||"timesheet_multi_user_edit_form"===t.name}destroyForm(t){this.supportsForm(t)&&(void 0!==this._beginDate&&(this._beginDate.removeEventListener("change",this._beginListener),delete this._beginListener,delete this._beginDate),void 0!==this._beginTime&&(this._beginTime.removeEventListener("change",this._beginListener),delete this._beginTime),void 0!==this._endTime&&(this._endTime.removeEventListener("change",this._endListener),delete this._endTime),void 0!==this._duration&&(this._duration.removeEventListener("change",this._durationListener),delete this._durationListener,delete this._duration),void 0!==this._durationToggle&&null!==this._durationToggle&&(this._durationToggle.removeEventListener("change",this._durationToggleListener),delete this._durationToggleListener,delete this._durationToggle),void 0!==this._activity&&(this._activity.removeEventListener("create",this._activityListener),delete this._activityListener,delete this._activity),void 0!==this._project&&delete this._project)}activateForm(t){if(!this.supportsForm(t))return;const e=t.name;this._activity=document.getElementById(e+"_activity"),this._project=document.getElementById(e+"_project"),this._activityListener=t=>{const e=this._project.value;this.getContainer().getPlugin("api").post(this._activity.dataset.create,{name:t.detail.value,project:""===e?null:e,visible:!0},(()=>{this._project.dispatchEvent(new Event("change"))}))},this._activity.addEventListener("create",this._activityListener),this._beginDate=document.getElementById(e+"_begin_date"),this._beginTime=document.getElementById(e+"_begin_time"),this._endTime=document.getElementById(e+"_end_time"),this._duration=document.getElementById(e+"_duration"),this._durationToggle=document.getElementById(e+"_duration_toggle"),null!==this._beginDate&&null!==this._beginTime&&null!==this._endTime&&null!==this._duration&&(this._beginListener=()=>this._changedBegin(),this._endListener=()=>this._changedEnd(),this._durationListener=()=>this._changedDuration(),this._beginDate.addEventListener("change",this._beginListener),this._beginTime.addEventListener("change",this._beginListener),this._endTime.addEventListener("change",this._endListener),this._duration.addEventListener("change",this._durationListener),null!==this._duration&&null!==this._durationToggle&&(this._durationToggleListener=()=>{this._durationToggle.classList.toggle("text-success")},this._durationToggle.addEventListener("click",this._durationToggleListener)))}_isDurationConnected(){return(null!==this._duration||null!==this._durationToggle)&&(null===this._durationToggle||this._durationToggle.classList.contains("text-success"))}_getBegin(){if(""===this._beginDate.value||""===this._beginTime.value)return null;const t=this.getDateUtils().fromFormat(this._beginDate.value+" "+this._beginTime.value,this._beginDate.dataset.format+" "+this._beginTime.dataset.format);return t.invalid?null:t}_getEnd(){if(""===this._endTime.value)return null;let t=this.getDateUtils().fromFormat(ti.now().toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+this._endTime.dataset.format);const e=this._getBegin();return null!==e&&(t=this.getDateUtils().fromFormat(e.toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+this._endTime.dataset.format),t0;null===this._getEnd()&&n?this._applyDateToField(t.plus(e),null,this._endTime):this._updateDuration()}_changedEnd(){const t=this._getEnd();if(null===t)return;const e=this._getParsedDuration(),n=e.as("seconds")>0;null===this._getBegin()&&n?this._applyDateToField(t.minus(e),this._beginDate,this._beginTime):this._updateDuration()}_updateDuration(){const t=this._getBegin(),e=this._getEnd();let n=null;null!==t&&null!==e&&(n=e.diff(t)),this._setDurationAsString(n)}_changedDuration(){if(!this._isDurationConnected())return;const t=this._getParsedDuration();if(!t.isValid)return void this._setDurationAsString(null);const e=this._getBegin();let n=this._getEnd();const i=t.as("seconds");if(i<0&&(n=null),null===e&&null===n){const t=ti.now();this._applyDateToField(t,this._beginDate,this._beginTime),this._applyDateToField(t.plus({seconds:i}),null,this._endTime)}else null===e&&null!==n?this._applyDateToField(n.minus({seconds:i}),this._beginDate,this._beginTime):null!==e&&i>0&&this._applyDateToField(e.plus({seconds:i}),null,this._endTime)}_setDurationAsString(t){if(!this._isDurationConnected())return;if(null===t)return void(this._duration.value="");if(!t.isValid)return;const e=t.as("seconds");if(e<0)return void(this._duration.value="");const n=Math.floor(e/3600);let i=Math.floor((e-3600*n)/60);i<10&&(i="0"+i),this._duration.value=n+":"+i}_getParsedDuration(){return this.getDateUtils().parseDuration(this._duration.value.toUpperCase())}_applyDateToField(t,e,n){if(null===t||t.invalid)return e.value="",void(n.value="");null!==e&&(e.value=this.getDateUtils().format(e.dataset.format,t)),n.value=this.getDateUtils().format(n.dataset.format,t)}}var Pi,Fi,ji=n(7169);class qi extends ui{init(){this.usersId="team_edit_form_users"}supportsForm(t){return"team_edit_form"===t.name}_getPrototype(){return document.getElementById("team_edit_form_members")}activateForm(t){this.supportsForm(t)&&(t.addEventListener("click",(t=>this._removeMember(t))),document.getElementById(this.usersId).addEventListener("change",(t=>{const e=t.target,n=e.options[e.selectedIndex],i=this._createMember(n);this._getPrototype().append(i),this.getPlugin("form-select").removeOption(e,n)})))}_createMember(t){const e=this._getPrototype();let n=e.dataset.widgetCounter||e.childNodes.length,i=e.dataset.prototype;i=i.replace(/__name__/g,n),i=i.replace(/#000000/g,ji.Z.calculateContrastColor(t.dataset.color)),i=i.replace(/__DISPLAY__/g,t.dataset.display),i=i.replace(/__COLOR__/g,t.dataset.color),i=i.replace(/__INITIALS__/g,t.dataset.initials),i=i.replace(/__TITLE__/g,t.dataset.title),i=i.replace(/__USERNAME__/g,t.text),e.dataset.widgetCounter=(++n).toString();const s=document.createElement("div");s.innerHTML=i,s.querySelector("input[type=hidden]").value=t.value;const o=s.firstElementChild;for(const e in t.dataset)o.dataset[e]=t.dataset[e];return o}_removeMember(t){let e=t.target;if(e.parentNode.matches(".remove-member")&&(e=e.parentNode),e.matches(".remove-member")){e.parentNode.parentNode.parentNode.parentNode.parentNode.remove(),t.stopPropagation(),t.preventDefault()}}destroyForm(t){this.supportsForm(t)&&t.removeEventListener("click",this._removeMember)}}class Hi extends ui{supportsForm(t){return!0}activateForm(t){void 0===this._eventHandler&&(this._eventHandler=t=>{let e=t.target;if(e.matches('a[data-form-widget="copy-data"]')||(e=e.parentNode),!e.matches('a[data-form-widget="copy-data"]')||void 0===e.dataset.target)return;const n=document.querySelector(e.dataset.target);if(null!==n){if(n.value=e.dataset.value,void 0!==e.dataset.event)for(const t of e.dataset.event.split(" "))n.dispatchEvent(new Event(t));else if(void 0!==e.dataset.eventBubbles)for(const t of e.dataset.eventBubbles.split(" "))n.dispatchEvent(new Event(t,{bubbles:!0}));t.preventDefault()}}),t.addEventListener("click",this._eventHandler)}destroyForm(t){t.removeEventListener("click",this._eventHandler)}}class Vi extends ui{init(){this.selector='a[data-form-widget="date-now"]'}supportsForm(t){return!0}activateForm(t){[].slice.call(t.querySelectorAll(this.selector)).map((t=>{void 0!==t.dataset.format&&void 0!==t.dataset.target&&(void 0===this._eventHandler&&(this._eventHandler=t=>{const e=t.currentTarget,n=document.getElementById(e.dataset.target);n.disabled||(n.value=this.getDateUtils().format(e.dataset.format,null),n.dispatchEvent(new Event("change",{bubbles:!0}))),t.preventDefault()}),t.addEventListener("click",this._eventHandler))}))}destroyForm(t){[].slice.call(t.querySelectorAll(this.selector)).map((t=>{void 0!==t.dataset.format&&void 0!==t.dataset.target&&t.removeEventListener("click",this._eventHandler)}))}}class $i extends si{getId(){return"notification"}isSupported(){return!!window.Notification&&("denied"!==Notification.permission&&"granted"===Notification.permission)}request(t){try{Notification.requestPermission().then((e=>{t("granted"===e||"default"===e&&null)}))}catch(e){Notification.requestPermission((e=>{t("granted"===e||"default"===e&&null)}))}}notify(t,e,n,i){this.request((s=>{if(!0!==s){this.getPlugin("alert").info(e)}let o={body:e,dir:this.getConfigurations().isRTL()?"rtl":"ltr"};null!=n&&(o.icon=n);let r="Kimai";null!==t&&(r=r+": "+t),null!=i&&(o={...o,...i});const a=new window.Notification(r,o);a.onclick=function(){window.focus(),a.close()}}))}}class Bi extends si{getId(){return"hotkeys"}init(){window.addEventListener("keyup",(t=>{if(t.ctrlKey&&"Enter"===t.key){const e=[...document.querySelectorAll('[data-hotkey="ctrl+Enter"]')].filter((t=>this.isVisible(t)));e.length>1&&console.warn("KimaiHotkeys: More than one visible element matches ${selector}. No action triggered."),1===e.length&&(t.stopPropagation(),t.preventDefault(),e[0].click())}}))}isVisible(t){return!(!t||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility")}}class Ri extends si{constructor(){super(),this._selector="a.remote-modal-load"}getId(){return"remote-modal"}init(){this.handle=t=>{this._showModal(t.currentTarget),t.stopPropagation(),t.preventDefault()};for(let t of document.querySelectorAll(this._selector))t.addEventListener("click",this.handle);document.addEventListener("kimai.closeRemoteModal",(()=>{this._hide()}))}_initElement(t){for(let e of t.querySelectorAll("a.remote-modal-reload"))e.addEventListener("click",this.handle)}_hide(){this._getModal().hide()}_getModalElement(){return document.getElementById("remote_modal")}_getModal(){return ai.u_.getOrCreateInstance(this._getModalElement())}_showModal(t){this.fetch(t.href,{method:"GET"}).then((e=>{if(e.ok)return e.text().then((e=>{const n=document.createElement("div");n.classList.add("modal-body"),n.classList.add("p-0"),n.innerHTML=e,this._initElement(n);const i=this._getModalElement();i.querySelector(".modal-body").replaceWith(n),void 0!==t.dataset.modalTitle&&(i.querySelector(".modal-title").textContent=t.dataset.modalTitle),this._getModal().show()}))})).catch((t=>{console.log("Failed to load remote modal",t)}))}}t=n.hmd(t),Pi="undefined"!=typeof self?self:void 0,Fi=function(){return class extends class{constructor(t,e){dt.defaultLocale=t.locale.replace("_","-").toLowerCase(),dt.defaultZone=t.timezone;const n=new oi(new ii(t),new ni(e));n.registerPlugin(new Ii),n.registerPlugin(new wi),n.registerPlugin(new gi),n.registerPlugin(new Ti),n.registerPlugin(new Ai),n.registerPlugin(new Mi),n.registerPlugin(new $i),n.registerPlugin(new Si(".selectpicker","select[data-related-select]")),n.registerPlugin(new hi('input[data-daterangepicker="on"]')),n.registerPlugin(new di('input[data-datepicker="on"]')),n.registerPlugin(new Di),n.registerPlugin(new Ni),n.registerPlugin(new qi),n.registerPlugin(new Hi),n.registerPlugin(new Vi),n.registerPlugin(new Oi),n.registerPlugin(new Bi),n.registerPlugin(new Ci("confirmation-link")),n.registerPlugin(new ri("data-column-visibility")),n.registerPlugin(new mi("section.content","table.dataTable")),n.registerPlugin(new fi("form.searchform","toolbar-action")),n.registerPlugin(new yi(".alternative-link")),n.registerPlugin(new bi(".modal-ajax-form")),n.registerPlugin(new Ri),n.registerPlugin(new _i),n.registerPlugin(new ki("api-link")),n.registerPlugin(new Li),n.registerPlugin(new li),document.dispatchEvent(new CustomEvent("kimai.pluginRegister",{detail:{kimai:n}})),n.getPlugins().map((t=>{t.init()})),document.dispatchEvent(new CustomEvent("kimai.initialized",{detail:{kimai:n}})),this.kimai=n}getKimai(){return this.kimai}}{}},"function"==typeof define&&n.amdO?define([],(function(){return Pi.KimaiWebLoader=Fi()})):t.exports?t.exports=Fi():Pi.KimaiWebLoader=Fi()},7169:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{static calculateContrastColor(t){"#"===t.slice(0,1)&&(t=t.slice(1)),3===t.length&&(t=t.split("").map((function(t){return t+t})).join(""));return(299*parseInt(t.substring(0,2),16)+587*parseInt(t.substring(2,4),16)+114*parseInt(t.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}},3187:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{constructor(t){this.id=t}getContextMenuElement(){if(null===document.getElementById(this.id)){const t=document.createElement("div");t.id=this.id,t.classList.add("dropdown-menu","d-none"),document.body.appendChild(t)}return document.getElementById(this.id)}createFromApi(t,e){let n="";for(const t of e)if(!0===t.divider&&(n+=''),null!==t.url){if(n+='"+t.title+""}this.createFromClickEvent(t,n)}createFromClickEvent(t,e){const n=this.getContextMenuElement();n.style.zIndex="1021",n.innerHTML=e,n.style.position="fixed",n.style.top=t.clientY+"px",n.style.left=t.clientX+"px";const i=t=>{t.target.classList.contains("dropdown-toggle")||t.target.classList.contains("dropdown-divider")||(n.classList.remove("d-block"),n.classList.contains("d-none")||n.classList.add("d-none"),n.removeEventListener("click",i),document.removeEventListener("click",i))};n.addEventListener("click",i),document.addEventListener("click",i),n.classList.remove("d-none"),n.classList.contains("d-block")||n.classList.add("d-block")}static createForDataTable(t){[].slice.call(document.querySelectorAll(t)).map((t=>{null!==t.querySelector("td.actions div.dropdown-menu")&&t.addEventListener("contextmenu",(e=>{let n=e.target;for(;null!==n;){const t=n.tagName.toUpperCase();if("TH"===t||"TABLE"===t||"BODY"===t)return;if("TR"===t)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const s=n.querySelector("td.actions div.dropdown-menu");if(null===s)return;e.preventDefault();new i(t.dataset.contextMenu).createFromClickEvent(e,s.innerHTML)}))}))}}},985:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(3187);class s{constructor(t){this.selector=t;const e=document.querySelector(this.selector);if(this.href=e.dataset.href,void 0!==e.dataset.reload){this.events=e.dataset.reload.split(" ");const t=()=>{let t=null;t=void 0!==document.querySelector(this.selector).dataset.reloadHref?document.querySelector(this.selector).dataset.reloadHref:document.querySelector(this.selector+" ul.pagination li.active a").href,this.loadPage(t)};for(const e of this.events)document.addEventListener(e,t)}document.body.addEventListener("click",(t=>{let e=t.target;e.matches(this.selector+" a.pagination-link")||(e=e.parentNode),e.matches(this.selector+" a.pagination-link")&&(t.preventDefault(),this.loadPage(e.href))}))}static create(t){return new s(t)}loadPage(t){const e=this.selector;document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this.selector}));const n=()=>{document.dispatchEvent(new Event("kimai.reloadedContent"))};window.kimai.getPlugin("fetch").fetch(t).then((t=>{t.text().then((t=>{const s=document.createElement("div");s.innerHTML=t,document.querySelector(e).replaceWith(this._makeScriptExecutable(s.firstElementChild)),i.Z.createForDataTable(e+" table.dataTable"),n()}))})).catch((()=>{window.kimai.getPlugin("alert").error("Failed loading selected page"),n()}))}_makeScriptExecutable(t){if(void 0!==t.tagName&&"SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,t.parentNode.replaceChild(e,t)}else for(const e of t.childNodes)this._makeScriptExecutable(e);return t}}},8227:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{constructor(t,e){const n=()=>{e?document.location.reload():this._loadPage(document.location)};for(const e of t.split(" "))document.addEventListener(e,n)}static create(t,e){return null==e&&(e=!1),new i(t,e)}_showOverlay(){document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:"div.page-wrapper"}))}_hideOverlay(){document.dispatchEvent(new Event("kimai.reloadedContent"))}_loadPage(t){this._showOverlay(),window.kimai.getPlugin("fetch").fetch(t).then((t=>{t.text().then((t=>{const e=document.createElement("div");e.innerHTML=t;const n=e.querySelector("section.content");document.querySelector("section.content").replaceWith(n),document.dispatchEvent(new Event("kimai.reloadPage")),this._hideOverlay()}))})).catch((()=>{this._hideOverlay(),document.location=t}))}}},6654:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{static set(t,e){window.localStorage.setItem(t,JSON.stringify(e))}static get(t){let e=window.localStorage.getItem(t);return null==e?null:JSON.parse(e)}static remove(t){window.localStorage.removeItem(t)}}},3138:function(t,e,n){"use strict";n.d(e,{u_:function(){return Bn},J2:function(){return _i},FN:function(){return Bi},u:function(){return vi}});var i={};n.r(i),n.d(i,{afterMain:function(){return T},afterRead:function(){return _},afterWrite:function(){return D},applyStyles:function(){return A},arrow:function(){return X},auto:function(){return l},basePlacements:function(){return c},beforeMain:function(){return w},beforeRead:function(){return y},beforeWrite:function(){return x},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return it},createPopper:function(){return At},createPopperBase:function(){return It},createPopperLite:function(){return Nt},detectOverflow:function(){return bt},end:function(){return d},eventListeners:function(){return ot},flip:function(){return _t},hide:function(){return Tt},left:function(){return a},main:function(){return k},modifierPhases:function(){return S},offset:function(){return xt},placements:function(){return v},popper:function(){return m},popperGenerator:function(){return Mt},popperOffsets:function(){return Et},preventOverflow:function(){return Dt},read:function(){return b},reference:function(){return f},right:function(){return r},start:function(){return u},top:function(){return s},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return E}});var s="top",o="bottom",r="right",a="left",l="auto",c=[s,o,r,a],u="start",d="end",h="clippingParents",p="viewport",m="popper",f="reference",g=c.reduce((function(t,e){return t.concat([e+"-"+u,e+"-"+d])}),[]),v=[].concat(c,[l]).reduce((function(t,e){return t.concat([e,e+"-"+u,e+"-"+d])}),[]),y="beforeRead",b="read",_="afterRead",w="beforeMain",k="main",T="afterMain",x="beforeWrite",E="write",D="afterWrite",S=[y,b,_,w,k,T,x,E,D];function O(t){return t?(t.nodeName||"").toLowerCase():null}function C(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function L(t){return t instanceof C(t).Element||t instanceof Element}function M(t){return t instanceof C(t).HTMLElement||t instanceof HTMLElement}function I(t){return"undefined"!=typeof ShadowRoot&&(t instanceof C(t).ShadowRoot||t instanceof ShadowRoot)}var A={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];M(s)&&O(s)&&(Object.assign(s.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});M(i)&&O(i)&&(Object.assign(i.style,o),Object.keys(s).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};function N(t){return t.split("-")[0]}var P=Math.max,F=Math.min,j=Math.round;function q(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function H(){return!/^((?!chrome|android).)*safari/i.test(q())}function V(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),s=1,o=1;e&&M(t)&&(s=t.offsetWidth>0&&j(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&j(i.height)/t.offsetHeight||1);var r=(L(t)?C(t):window).visualViewport,a=!H()&&n,l=(i.left+(a&&r?r.offsetLeft:0))/s,c=(i.top+(a&&r?r.offsetTop:0))/o,u=i.width/s,d=i.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function $(t){var e=V(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function B(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&I(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function R(t){return C(t).getComputedStyle(t)}function z(t){return["table","td","th"].indexOf(O(t))>=0}function Y(t){return((L(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(I(t)?t.host:null)||Y(t)}function W(t){return M(t)&&"fixed"!==R(t).position?t.offsetParent:null}function Z(t){for(var e=C(t),n=W(t);n&&z(n)&&"static"===R(n).position;)n=W(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===R(n).position)?e:n||function(t){var e=/firefox/i.test(q());if(/Trident/i.test(q())&&M(t)&&"fixed"===R(t).position)return null;var n=U(t);for(I(n)&&(n=n.host);M(n)&&["html","body"].indexOf(O(n))<0;){var i=R(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function J(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function K(t,e,n){return P(t,F(e,n))}function G(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var X={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,l=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,h=N(n.placement),p=J(h),m=[a,r].indexOf(h)>=0?"height":"width";if(u&&d){var f=function(t,e){return G("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,c))}(l.padding,n),g=$(u),v="y"===p?s:a,y="y"===p?o:r,b=n.rects.reference[m]+n.rects.reference[p]-d[p]-n.rects.popper[m],_=d[p]-n.rects.reference[p],w=Z(u),k=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,T=b/2-_/2,x=f[v],E=k-g[m]-f[y],D=k/2-g[m]/2+T,S=K(x,D,E),O=p;n.modifiersData[i]=((e={})[O]=S,e.centerOffset=S-D,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&B(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tt(t){return t.split("-")[1]}var et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nt(t){var e,n=t.popper,i=t.popperRect,l=t.placement,c=t.variation,u=t.offsets,h=t.position,p=t.gpuAcceleration,m=t.adaptive,f=t.roundOffsets,g=t.isFixed,v=u.x,y=void 0===v?0:v,b=u.y,_=void 0===b?0:b,w="function"==typeof f?f({x:y,y:_}):{x:y,y:_};y=w.x,_=w.y;var k=u.hasOwnProperty("x"),T=u.hasOwnProperty("y"),x=a,E=s,D=window;if(m){var S=Z(n),O="clientHeight",L="clientWidth";if(S===C(n)&&"static"!==R(S=Y(n)).position&&"absolute"===h&&(O="scrollHeight",L="scrollWidth"),l===s||(l===a||l===r)&&c===d)E=o,_-=(g&&S===D&&D.visualViewport?D.visualViewport.height:S[O])-i.height,_*=p?1:-1;if(l===a||(l===s||l===o)&&c===d)x=r,y-=(g&&S===D&&D.visualViewport?D.visualViewport.width:S[L])-i.width,y*=p?1:-1}var M,I=Object.assign({position:h},m&&et),A=!0===f?function(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:j(e*i)/i||0,y:j(n*i)/i||0}}({x:y,y:_}):{x:y,y:_};return y=A.x,_=A.y,p?Object.assign({},I,((M={})[E]=T?"0":"",M[x]=k?"0":"",M.transform=(D.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",M)):Object.assign({},I,((e={})[E]=T?_+"px":"",e[x]=k?y+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=void 0===i||i,o=n.adaptive,r=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),variation:tt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,nt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,nt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},st={passive:!0};var ot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,o=void 0===s||s,r=i.resize,a=void 0===r||r,l=C(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,st)})),a&&l.addEventListener("resize",n.update,st),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,st)})),a&&l.removeEventListener("resize",n.update,st)}},data:{}},rt={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function ct(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ut(t){var e=C(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(t){return V(Y(t)).left+ut(t).scrollLeft}function ht(t){var e=R(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:M(t)&&ht(t)?t:pt(U(t))}function mt(t,e){var n;void 0===e&&(e=[]);var i=pt(t),s=i===(null==(n=t.ownerDocument)?void 0:n.body),o=C(i),r=s?[o].concat(o.visualViewport||[],ht(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(mt(U(r)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,n){return e===p?ft(function(t,e){var n=C(t),i=Y(t),s=n.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=H();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+dt(t),y:l}}(t,n)):L(e)?function(t,e){var n=V(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=Y(t),i=ut(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=P(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=P(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+dt(t),l=-i.scrollTop;return"rtl"===R(s||n).direction&&(a+=P(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(Y(t)))}function vt(t,e,n,i){var s="clippingParents"===e?function(t){var e=mt(U(t)),n=["absolute","fixed"].indexOf(R(t).position)>=0&&M(t)?Z(t):t;return L(n)?e.filter((function(t){return L(t)&&B(t,n)&&"body"!==O(t)})):[]}(t):[].concat(e),o=[].concat(s,[n]),r=o[0],a=o.reduce((function(e,n){var s=gt(t,n,i);return e.top=P(s.top,e.top),e.right=F(s.right,e.right),e.bottom=F(s.bottom,e.bottom),e.left=P(s.left,e.left),e}),gt(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function yt(t){var e,n=t.reference,i=t.element,l=t.placement,c=l?N(l):null,h=l?tt(l):null,p=n.x+n.width/2-i.width/2,m=n.y+n.height/2-i.height/2;switch(c){case s:e={x:p,y:n.y-i.height};break;case o:e={x:p,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:m};break;case a:e={x:n.x-i.width,y:m};break;default:e={x:n.x,y:n.y}}var f=c?J(c):null;if(null!=f){var g="y"===f?"height":"width";switch(h){case u:e[f]=e[f]-(n[g]/2-i[g]/2);break;case d:e[f]=e[f]+(n[g]/2-i[g]/2)}}return e}function bt(t,e){void 0===e&&(e={});var n=e,i=n.placement,a=void 0===i?t.placement:i,l=n.strategy,u=void 0===l?t.strategy:l,d=n.boundary,g=void 0===d?h:d,v=n.rootBoundary,y=void 0===v?p:v,b=n.elementContext,_=void 0===b?m:b,w=n.altBoundary,k=void 0!==w&&w,T=n.padding,x=void 0===T?0:T,E=G("number"!=typeof x?x:Q(x,c)),D=_===m?f:m,S=t.rects.popper,O=t.elements[k?D:_],C=vt(L(O)?O:O.contextElement||Y(t.elements.popper),g,y,u),M=V(t.elements.reference),I=yt({reference:M,element:S,strategy:"absolute",placement:a}),A=ft(Object.assign({},S,I)),N=_===m?A:M,P={top:C.top-N.top+E.top,bottom:N.bottom-C.bottom+E.bottom,left:C.left-N.left+E.left,right:N.right-C.right+E.right},F=t.modifiersData.offset;if(_===m&&F){var j=F[a];Object.keys(P).forEach((function(t){var e=[r,o].indexOf(t)>=0?1:-1,n=[s,o].indexOf(t)>=0?"y":"x";P[t]+=j[n]*e}))}return P}var _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var d=n.mainAxis,h=void 0===d||d,p=n.altAxis,m=void 0===p||p,f=n.fallbackPlacements,y=n.padding,b=n.boundary,_=n.rootBoundary,w=n.altBoundary,k=n.flipVariations,T=void 0===k||k,x=n.allowedAutoPlacements,E=e.options.placement,D=N(E),S=f||(D===E||!T?[at(E)]:function(t){if(N(t)===l)return[];var e=at(t);return[ct(t),e,ct(e)]}(E)),O=[E].concat(S).reduce((function(t,n){return t.concat(N(n)===l?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?v:l,d=tt(i),h=d?a?g:g.filter((function(t){return tt(t)===d})):c,p=h.filter((function(t){return u.indexOf(t)>=0}));0===p.length&&(p=h);var m=p.reduce((function(e,n){return e[n]=bt(t,{placement:n,boundary:s,rootBoundary:o,padding:r})[N(n)],e}),{});return Object.keys(m).sort((function(t,e){return m[t]-m[e]}))}(e,{placement:n,boundary:b,rootBoundary:_,padding:y,flipVariations:T,allowedAutoPlacements:x}):n)}),[]),C=e.rects.reference,L=e.rects.popper,M=new Map,I=!0,A=O[0],P=0;P=0,V=H?"width":"height",$=bt(e,{placement:F,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),B=H?q?r:a:q?o:s;C[V]>L[V]&&(B=at(B));var R=at(B),z=[];if(h&&z.push($[j]<=0),m&&z.push($[B]<=0,$[R]<=0),z.every((function(t){return t}))){A=F,I=!1;break}M.set(F,z)}if(I)for(var Y=function(t){var e=O.find((function(e){var n=M.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},U=T?3:1;U>0;U--){if("break"===Y(U))break}e.placement!==A&&(e.modifiersData[i]._skip=!0,e.placement=A,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function wt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function kt(t){return[s,r,o,a].some((function(e){return t[e]>=0}))}var Tt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=bt(e,{elementContext:"reference"}),a=bt(e,{altBoundary:!0}),l=wt(r,i),c=wt(a,s,o),u=kt(l),d=kt(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.offset,l=void 0===o?[0,0]:o,c=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=N(t),o=[a,s].indexOf(i)>=0?-1:1,l="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=l[0],u=l[1];return c=c||0,u=(u||0)*o,[a,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,l),t}),{}),u=c[e.placement],d=u.x,h=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=h),e.modifiersData[i]=c}};var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Dt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.mainAxis,c=void 0===l||l,d=n.altAxis,h=void 0!==d&&d,p=n.boundary,m=n.rootBoundary,f=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,b=n.tetherOffset,_=void 0===b?0:b,w=bt(e,{boundary:p,rootBoundary:m,padding:g,altBoundary:f}),k=N(e.placement),T=tt(e.placement),x=!T,E=J(k),D="x"===E?"y":"x",S=e.modifiersData.popperOffsets,O=e.rects.reference,C=e.rects.popper,L="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,M="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(S){if(c){var j,q="y"===E?s:a,H="y"===E?o:r,V="y"===E?"height":"width",B=S[E],R=B+w[q],z=B-w[H],Y=y?-C[V]/2:0,U=T===u?O[V]:C[V],W=T===u?-C[V]:-O[V],G=e.elements.arrow,Q=y&&G?$(G):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=X[q],nt=X[H],it=K(0,O[V],Q[V]),st=x?O[V]/2-Y-it-et-M.mainAxis:U-it-et-M.mainAxis,ot=x?-O[V]/2+Y+it+nt+M.mainAxis:W+it+nt+M.mainAxis,rt=e.elements.arrow&&Z(e.elements.arrow),at=rt?"y"===E?rt.clientTop||0:rt.clientLeft||0:0,lt=null!=(j=null==I?void 0:I[E])?j:0,ct=B+ot-lt,ut=K(y?F(R,B+st-lt-at):R,B,y?P(z,ct):z);S[E]=ut,A[E]=ut-B}if(h){var dt,ht="x"===E?s:a,pt="x"===E?o:r,mt=S[D],ft="y"===D?"height":"width",gt=mt+w[ht],vt=mt-w[pt],yt=-1!==[s,a].indexOf(k),_t=null!=(dt=null==I?void 0:I[D])?dt:0,wt=yt?gt:mt-O[ft]-C[ft]-_t+M.altAxis,kt=yt?mt+O[ft]+C[ft]-_t-M.altAxis:vt,Tt=y&&yt?function(t,e,n){var i=K(t,e,n);return i>n?n:i}(wt,mt,kt):K(y?wt:gt,mt,y?kt:vt);S[D]=Tt,A[D]=Tt-mt}e.modifiersData[i]=A}},requiresIfExists:["offset"]};function St(t,e,n){void 0===n&&(n=!1);var i,s,o=M(e),r=M(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,i=j(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=Y(e),l=V(t,r,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==O(e)||ht(a))&&(c=(i=e)!==C(i)&&M(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:ut(i)),M(e)?((u=V(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=dt(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ot(t){var e=new Map,n=new Set,i=[];function s(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&s(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||s(t)})),i}var Ct={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,e=new Array(t),n=0;n{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},jt=t=>{const e=Ft(t);return e&&document.querySelector(e)?e:null},qt=t=>{const e=Ft(t);return e?document.querySelector(e):null},Ht=t=>{t.dispatchEvent(new Event(Pt))},Vt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),$t=t=>Vt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Bt=t=>{if(!Vt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},Rt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),zt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?zt(t.parentNode):null},Yt=()=>{},Ut=t=>{t.offsetHeight},Wt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Zt=[],Jt=()=>"rtl"===document.documentElement.dir,Kt=t=>{var e;e=()=>{const e=Wt();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}},"loading"===document.readyState?(Zt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Zt)t()})),Zt.push(e)):e()},Gt=t=>{"function"==typeof t&&t()},Qt=(t,e,n=!0)=>{if(!n)return void Gt(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e),s=Number.parseFloat(n);return i||s?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0})(e)+5;let s=!1;const o=({target:n})=>{n===e&&(s=!0,e.removeEventListener(Pt,o),Gt(t))};e.addEventListener(Pt,o),setTimeout((()=>{s||Ht(e)}),i)},Xt=(t,e,n,i)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[s-1]:t[0]:(o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},te=/[^.]*(?=\..*)\.|.*/,ee=/\..*/,ne=/::\d+$/,ie={};let se=1;const oe={mouseenter:"mouseover",mouseleave:"mouseout"},re=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 ae(t,e){return e&&`${e}::${se++}`||t.uidEvent||se++}function le(t){const e=ae(t);return t.uidEvent=e,ie[e]=ie[e]||{},ie[e]}function ce(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function ue(t,e,n){const i="string"==typeof e,s=i?n:e||n;let o=me(t);return re.has(o)||(o=t),[i,s,o]}function de(t,e,n,i,s){if("string"!=typeof e||!t)return;let[o,r,a]=ue(e,n,i);if(e in oe){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=le(t),c=l[a]||(l[a]={}),u=ce(c,r,o?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=ae(r,e.replace(te,"")),h=o?function(t,e,n){return function i(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return ge(s,{delegateTarget:r}),i.oneOff&&fe.off(t,s.type,e,n),n.apply(r,[s])}}(t,n,r):function(t,e){return function n(i){return ge(i,{delegateTarget:t}),n.oneOff&&fe.off(t,i.type,e),e.apply(t,[i])}}(t,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=d,c[d]=h,t.addEventListener(a,h,o)}function he(t,e,n,i,s){const o=ce(e[n],i,s);o&&(t.removeEventListener(n,o,Boolean(s)),delete e[n][o.uidEvent])}function pe(t,e,n,i){const s=e[n]||{};for(const o of Object.keys(s))if(o.includes(i)){const i=s[o];he(t,e,n,i.callable,i.delegationSelector)}}function me(t){return t=t.replace(ee,""),oe[t]||t}const fe={on(t,e,n,i){de(t,e,n,i,!1)},one(t,e,n,i){de(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[s,o,r]=ue(e,n,i),a=r!==e,l=le(t),c=l[r]||{},u=e.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))pe(t,l,n,e.slice(1));for(const n of Object.keys(c)){const i=n.replace(ne,"");if(!a||e.includes(i)){const e=c[n];he(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;he(t,l,r,o,s?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=Wt();let s=null,o=!0,r=!0,a=!1;e!==me(e)&&i&&(s=i.Event(e,n),i(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=ge(l,n),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function ge(t,e){for(const[n,i]of Object.entries(e||{}))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}const ve=new Map,ye={set(t,e,n){ve.has(t)||ve.set(t,new Map);const i=ve.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>ve.has(t)&&ve.get(t).get(e)||null,remove(t,e){if(!ve.has(t))return;const n=ve.get(t);n.delete(e),0===n.size&&ve.delete(t)}};function be(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function _e(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const we={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${_e(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${_e(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=be(t.dataset[i])}return e},getDataAttribute:(t,e)=>be(t.getAttribute(`data-bs-${_e(e)}`))};class ke{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(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=Vt(e)?we.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...Vt(e)?we.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const i of Object.keys(e)){const s=e[i],o=t[i],r=Vt(o)?"element":null==(n=o)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}var n}}class Te extends ke{constructor(t,e){super(),(t=$t(t))&&(this._element=t,this._config=this._getConfig(e),ye.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ye.remove(this._element,this.constructor.DATA_KEY),fe.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){Qt(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return ye.get($t(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.2"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const xe=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;fe.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Rt(this))return;const s=qt(this)||this.closest(`.${i}`);t.getOrCreateInstance(s)[e]()}))};class Ee extends Te{static get NAME(){return"alert"}close(){if(fe.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),fe.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Ee.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}xe(Ee,"close"),Kt(Ee);const De='[data-bs-toggle="button"]';class Se extends Te{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Se.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}fe.on(document,"click.bs.button.data-api",De,(t=>{t.preventDefault();const e=t.target.closest(De);Se.getOrCreateInstance(e).toggle()})),Kt(Se);const Oe={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Rt(t)&&Bt(t)))}},Ce=".bs.swipe",Le={endCallback:null,leftCallback:null,rightCallback:null},Me={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ie extends ke{constructor(t,e){super(),this._element=t,t&&Ie.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Le}static get DefaultType(){return Me}static get NAME(){return"swipe"}dispose(){fe.off(this._element,Ce)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Gt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Gt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(fe.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),fe.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(fe.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),fe.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),fe.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Ae="next",Ne="prev",Pe="left",Fe="right",je="slid.bs.carousel",qe="carousel",He="active",Ve=".active",$e=".carousel-item",Be={ArrowLeft:Fe,ArrowRight:Pe},Re={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ze={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ye extends Te{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Oe.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===qe&&this.cycle()}static get Default(){return Re}static get DefaultType(){return ze}static get NAME(){return"carousel"}next(){this._slide(Ae)}nextWhenVisible(){!document.hidden&&Bt(this._element)&&this.next()}prev(){this._slide(Ne)}pause(){this._isSliding&&Ht(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?fe.one(this._element,je,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void fe.one(this._element,je,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?Ae:Ne;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&fe.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(fe.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),fe.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&Ie.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Oe.find(".carousel-item img",this._element))fe.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Pe)),rightCallback:()=>this._slide(this._directionToOrder(Fe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Ie(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Be[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Oe.findOne(Ve,this._indicatorsElement);e.classList.remove(He),e.removeAttribute("aria-current");const n=Oe.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(He),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===Ae,s=e||Xt(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=e=>fe.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Ut(s),n.classList.add(l),s.classList.add(l);this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(He),n.classList.remove(He,c,l),this._isSliding=!1,r(je)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Oe.findOne(".active.carousel-item",this._element)}_getItems(){return Oe.find($e,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Jt()?t===Pe?Ne:Ae:t===Pe?Ae:Ne}_orderToDirection(t){return Jt()?t===Ne?Pe:Fe:t===Ne?Fe:Pe}static jQueryInterface(t){return this.each((function(){const e=Ye.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}fe.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=qt(this);if(!e||!e.classList.contains(qe))return;t.preventDefault();const n=Ye.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===we.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),fe.on(window,"load.bs.carousel.data-api",(()=>{const t=Oe.find('[data-bs-ride="carousel"]');for(const e of t)Ye.getOrCreateInstance(e)})),Kt(Ye);const Ue="show",We="collapse",Ze="collapsing",Je='[data-bs-toggle="collapse"]',Ke={parent:null,toggle:!0},Ge={parent:"(null|element)",toggle:"boolean"};class Qe extends Te{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Oe.find(Je);for(const t of n){const e=jt(t),n=Oe.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ke}static get DefaultType(){return Ge}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Qe.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(fe.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(We),this._element.classList.add(Ze),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ze),this._element.classList.add(We,Ue),this._element.style[e]="",fe.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(fe.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Ut(this._element),this._element.classList.add(Ze),this._element.classList.remove(We,Ue);for(const t of this._triggerArray){const e=qt(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ze),this._element.classList.add(We),fe.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ue)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=$t(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Je);for(const e of t){const t=qt(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Oe.find(":scope .collapse .collapse",this._config.parent);return Oe.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle("collapsed",!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const n=Qe.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}fe.on(document,"click.bs.collapse.data-api",Je,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=jt(this),n=Oe.find(e);for(const t of n)Qe.getOrCreateInstance(t,{toggle:!1}).toggle()})),Kt(Qe);const Xe="dropdown",tn="ArrowUp",en="ArrowDown",nn="click.bs.dropdown.data-api",sn="keydown.bs.dropdown.data-api",on="show",rn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',an=`${rn}.show`,ln=".dropdown-menu",cn=Jt()?"top-end":"top-start",un=Jt()?"top-start":"top-end",dn=Jt()?"bottom-end":"bottom-start",hn=Jt()?"bottom-start":"bottom-end",pn=Jt()?"left-start":"right-start",mn=Jt()?"right-start":"left-start",fn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},gn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class vn extends Te{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Oe.next(this._element,ln)[0]||Oe.prev(this._element,ln)[0]||Oe.findOne(ln,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return fn}static get DefaultType(){return gn}static get NAME(){return Xe}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Rt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!fe.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))fe.on(t,"mouseover",Yt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(on),this._element.classList.add(on),fe.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(Rt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!fe.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.off(t,"mouseover",Yt);this._popper&&this._popper.destroy(),this._menu.classList.remove(on),this._element.classList.remove(on),this._element.setAttribute("aria-expanded","false"),we.removeDataAttribute(this._menu,"popper"),fe.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Vt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Xe.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:Vt(this._config.reference)?t=$t(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=At(t,this._menu,e)}_isShown(){return this._menu.classList.contains(on)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return pn;if(t.classList.contains("dropstart"))return mn;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?un:cn:e?hn:dn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(we.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=Oe.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Bt(t)));n.length&&Xt(n,e,t===en,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=vn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Oe.find(an);for(const n of e){const e=vn.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),s=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n="Escape"===t.key,i=[tn,en].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const s=this.matches(rn)?this:Oe.prev(this,rn)[0]||Oe.next(this,rn)[0]||Oe.findOne(rn,t.delegateTarget.parentNode),o=vn.getOrCreateInstance(s);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}fe.on(document,sn,rn,vn.dataApiKeydownHandler),fe.on(document,sn,ln,vn.dataApiKeydownHandler),fe.on(document,nn,vn.clearMenus),fe.on(document,"keyup.bs.dropdown.data-api",vn.clearMenus),fe.on(document,nn,rn,(function(t){t.preventDefault(),vn.getOrCreateInstance(this).toggle()})),Kt(vn);const yn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",bn=".sticky-top",_n="padding-right",wn="margin-right";class kn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,_n,(e=>e+t)),this._setElementAttributes(yn,_n,(e=>e+t)),this._setElementAttributes(bn,wn,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,_n),this._resetElementAttributes(yn,_n),this._resetElementAttributes(bn,wn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&we.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const n=we.getDataAttribute(t,e);null!==n?(we.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(Vt(t))e(t);else for(const n of Oe.find(t,this._element))e(n)}}const Tn="backdrop",xn="show",En="mousedown.bs.backdrop",Dn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Sn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class On extends ke{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Dn}static get DefaultType(){return Sn}static get NAME(){return Tn}show(t){if(!this._config.isVisible)return void Gt(t);this._append();const e=this._getElement();this._config.isAnimated&&Ut(e),e.classList.add(xn),this._emulateAnimation((()=>{Gt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(xn),this._emulateAnimation((()=>{this.dispose(),Gt(t)}))):Gt(t)}dispose(){this._isAppended&&(fe.off(this._element,En),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=$t(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),fe.on(t,En,(()=>{Gt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){Qt(t,this._getElement(),this._config.isAnimated)}}const Cn=".bs.focustrap",Ln="backward",Mn={autofocus:!0,trapElement:null},In={autofocus:"boolean",trapElement:"element"};class An extends ke{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Mn}static get DefaultType(){return In}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),fe.off(document,Cn),fe.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),fe.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,fe.off(document,Cn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=Oe.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===Ln?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ln:"forward")}}const Nn=".bs.modal",Pn="hidden.bs.modal",Fn="show.bs.modal",jn="modal-open",qn="show",Hn="modal-static",Vn={backdrop:!0,focus:!0,keyboard:!0},$n={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Bn extends Te{constructor(t,e){super(t,e),this._dialog=Oe.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new kn,this._addEventListeners()}static get Default(){return Vn}static get DefaultType(){return $n}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;fe.trigger(this._element,Fn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(jn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;fe.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(qn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){for(const t of[window,this._dialog])fe.off(t,Nn);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new On({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new An({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Oe.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Ut(this._element),this._element.classList.add(qn);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,fe.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){fe.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),fe.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),fe.on(this._element,"mousedown.dismiss.bs.modal",(t=>{fe.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(jn),this._resetAdjustments(),this._scrollBar.reset(),fe.trigger(this._element,Pn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(fe.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Hn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Hn),this._queueCallback((()=>{this._element.classList.remove(Hn),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=Jt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=Jt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=Bn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}fe.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=qt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),fe.one(e,Fn,(t=>{t.defaultPrevented||fe.one(e,Pn,(()=>{Bt(this)&&this.focus()}))}));const n=Oe.findOne(".modal.show");n&&Bn.getInstance(n).hide();Bn.getOrCreateInstance(e).toggle(this)})),xe(Bn),Kt(Bn);const Rn="show",zn="showing",Yn="hiding",Un=".offcanvas.show",Wn="hidePrevented.bs.offcanvas",Zn="hidden.bs.offcanvas",Jn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Gn extends Te{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Jn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(fe.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new kn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(zn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Rn),this._element.classList.remove(zn),fe.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(fe.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Yn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(Rn,Yn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new kn).reset(),fe.trigger(this._element,Zn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new On({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():fe.trigger(this._element,Wn)}:null})}_initializeFocusTrap(){return new An({trapElement:this._element})}_addEventListeners(){fe.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():fe.trigger(this._element,Wn))}))}static jQueryInterface(t){return this.each((function(){const e=Gn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}fe.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=qt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Rt(this))return;fe.one(e,Zn,(()=>{Bt(this)&&this.focus()}));const n=Oe.findOne(Un);n&&n!==e&&Gn.getInstance(n).hide();Gn.getOrCreateInstance(e).toggle(this)})),fe.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of Oe.find(Un))Gn.getOrCreateInstance(t).show()})),fe.on(window,"resize.bs.offcanvas",(()=>{for(const t of Oe.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Gn.getOrCreateInstance(t).hide()})),xe(Gn),Kt(Gn);const Qn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Xn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ti=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,ei=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!Qn.has(n)||Boolean(Xn.test(t.nodeValue)||ti.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(n)))},ni={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],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:[]};const ii={allowList:ni,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},si={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},oi={entry:"(string|element|function|null)",selector:"(string|element)"};class ri extends ke{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ii}static get DefaultType(){return si}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},oi)}_setContent(t,e,n){const i=Oe.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?Vt(e)?this._putElementInTemplate($t(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const t of s){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[n]||[]);for(const e of i)ei(e,s)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ai=new Set(["sanitize","allowList","sanitizeFn"]),li="fade",ci="show",ui=".modal",di="hide.bs.modal",hi="hover",pi="focus",mi={AUTO:"auto",TOP:"top",RIGHT:Jt()?"left":"right",BOTTOM:"bottom",LEFT:Jt()?"right":"left"},fi={allowList:ni,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'
',title:"",trigger:"hover focus"},gi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class vi extends Te{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return fi}static get DefaultType(){return gi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),fe.off(this._element.closest(ui),di,this._hideModalHandler),this.tip&&this.tip.remove(),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=fe.trigger(this._element,this.constructor.eventName("show")),e=(zt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),fe.trigger(this._element,this.constructor.eventName("inserted"))),this._popper?this._popper.update():this._popper=this._createPopper(n),n.classList.add(ci),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.on(t,"mouseover",Yt);this._queueCallback((()=>{fe.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(fe.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;const t=this._getTipElement();if(t.classList.remove(ci),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.off(t,"mouseover",Yt);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||t.remove(),this._element.removeAttribute("aria-describedby"),fe.trigger(this._element,this.constructor.eventName("hidden")),this._disposePopper())}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(li,ci),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(li),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ri({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(li)}_isShown(){return this.tip&&this.tip.classList.contains(ci)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,n=mi[e.toUpperCase()];return At(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)fe.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===hi?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===hi?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");fe.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?pi:hi]=!0,e._enter()})),fe.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?pi:hi]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},fe.on(this._element.closest(ui),di,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=we.getDataAttributes(this._element);for(const t of Object.keys(e))ai.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:$t(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=vi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Kt(vi);const yi={...vi.Default,content:"",offset:[0,8],placement:"right",template:'
"}})}))}destroyForm(t){[].slice.call(t.querySelectorAll(this.selector)).map((t=>{t.tomselect&&t.tomselect.destroy()}))}}class Si extends ui{constructor(t,e){super(),this._selector=t,this._apiSelects=e}getId(){return"form-select"}init(){document.addEventListener("reset",(t=>{"FORM"===t.target.tagName.toUpperCase()&&setTimeout((()=>{const e=t.target.querySelectorAll(this._selector);for(let t of e)"SELECT"===t.tagName.toUpperCase()&&t.dispatchEvent(new Event("data-reloaded"))}),10)}))}activateSelectPickerByElement(t){let e=["change_listener"];void 0!==t.multiple&&!0===t.multiple&&e.push("remove_button");let n={lockOptgroupOrder:!0,allowEmptyOption:!0,plugins:e,maxOptions:500},i={option_create:(t,e)=>{const n=e(t.input);if(n.length<3)return null;return'
"}};const s=new(Ei())(t,n);t.addEventListener("data-reloaded",(t=>{s.clear(!0),s.clearOptionGroups(),s.clearOptions(),s.sync(),s.setValue(t.detail),s.refreshItems(),s.refreshOptions(!1)})),void 0!==t.dataset.reload&&t.addEventListener("reload",(()=>{s.disable(),t.disabled=!0;this.getContainer().getPlugin("api").get(t.dataset.reload,{},(e=>{this._updateSelect(t,e),s.enable(),t.disabled=!1})),t.dispatchEvent(new Event("change"))}))}supportsForm(t){return!0}activateForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{this.activateSelectPickerByElement(t)})),this._activateApiSelects(this._apiSelects)}destroyForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{t.tomselect&&t.tomselect.destroy()}))}_updateOptions(t,e){let n=null,i=null;if(i=t instanceof Element?t:document.querySelector(t),null===i)return void console.log("Missing select: "+t);const s=i.value;for(let t=0;ti.appendChild(t))),o.forEach((t=>i.appendChild(t))),i.value=s,""===i.value||null===i.value){const t=i.options,e=t.length;let s="";1===e&&void 0===i.dataset.autoselect?s=t[0].value:2===e&&null!==n&&(s=t[1].value),""!==s&&(i.value=s)}i.dispatchEvent(new CustomEvent("data-reloaded",{detail:i.value})),i.dispatchEvent(new Event("change"))}_getTitleFromPattern(t,e){const n=this.getDateUtils(),i=new RegExp("{[^}]*?}","g");let s=t,o=null;for(;null!==(o=i.exec(t));){const t=o[0].slice(1,-1);let i=void 0===e[t]?null:e[t];"start"!==t&&"end"!==t||(i=null===i?"?":n.getFormattedDate(i)),s=s.replace(new RegExp("{"+t+"}","g"),i??"")}s=s.replace(/- \?-\?/,""),s=s.replace(/\r\n|\r|\n/g," "),s=s.substring(0,110);let r=0,a=s.length;for(;r=0;)++r;for(;a>r&&"- ".indexOf(s[a-1])>=0;)--a;return r>0||a{if(null===e.target||!e.target.matches(t))return;const n=e.target,i="#"+n.dataset.relatedSelect,s=document.getElementById(n.dataset.relatedSelect);if(null===s||"1"===s.dataset.reloading)return;s.dataset.reloading="1",void 0!==s.tomselect&&s.tomselect.disable(),s.disabled=!0;let o=n.dataset.formPrefix;null==o?o="":o.length>0&&(o+="_");let r=this._buildUrlWithFormFields(n.dataset.apiUrl,o);const a=n.value;if(null==a||""===a||Array.isArray(a)&&0===a.length){if(void 0===n.dataset.emptyUrl)return this._updateSelect(i,{}),void(s.dataset.reloading="0");r=this._buildUrlWithFormFields(n.dataset.emptyUrl,o)}this.getContainer().getPlugin("api").get(r,{},(t=>{this._updateSelect(i,t),void 0!==s.tomselect&&s.tomselect.enable(),s.dataset.reloading="0",s.disabled=!1}))},document.addEventListener("change",this._eventHandlerApiSelects))}_buildUrlWithFormFields(t,e){let n=t;return t.split("?")[1].split("&").forEach((t=>{const[i,s]=t.split("="),o=decodeURIComponent(s).match(/%(.*)%/);if(null!==o){const i=o[1],r=(e+i).replace(/\[/,"").replace(/]/,""),a=document.getElementById(r);let l="";if(null===a);else if(null!==a.value)if(l=a.value,"SELECT"===a.tagName&&a.multiple)l=[...a.selectedOptions].map((t=>t.value));else if(""!==l)if("date"===a.type){const t=a.id.replace("_date","_time"),e=document.getElementById(t),n=null===e?"12:00:00":e.value,i=this.getDateUtils().fromHtml5Input(l,n);l=this.getDateUtils().formatForAPI(i,!1)}else if("text"===a.type&&a.name.includes("date")){const t=a.id.replace("_date","_time"),e=document.getElementById(t);let n="12:00:00",i="HH:mm";null!==e&&(n=e.value,i=e.dataset.format);const s=this.getDateUtils().fromFormat(l.trim()+" "+n.trim(),a.dataset.format+" "+i);l=this.getDateUtils().formatForAPI(s,!1)}else void 0!==a.dataset.format&&this.getDateUtils().isValidDateTime(l,a.dataset.format)&&(l=this.getDateUtils().format(a.dataset.format,l));if(Array.isArray(l)){let e=[];for(let t of l)null===t&&(t=""),e.push(i+"="+t);n=n.replace(t,e.join("&"))}else null===l&&(l=""),n=n.replace(s,l)}})),n}_updateSelect(t,e){const n={};for(const t of e){let e="__empty__";void 0!==t.parentTitle&&null!==t.parentTitle&&(e=t.parentTitle),void 0===n[e]&&(n[e]=[]),n[e].push(t)}const i={};Object.keys(n).sort().forEach((function(t){i[t]=n[t]})),this._updateOptions(t,i)}}class Oi extends si{getId(){return"form"}activateForm(t){[].slice.call(document.querySelectorAll(t)).map((t=>{for(const e of this.getContainer().getPlugins())e instanceof ui&&e.supportsForm(t)&&e.activateForm(t)}))}destroyForm(t){[].slice.call(document.querySelectorAll(t)).map((t=>{for(const e of this.getContainer().getPlugins())e instanceof ui&&e.supportsForm(t)&&e.destroyForm(t)}))}convertFormDataToQueryString(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],s=new FormData(t);for(const t in e)s.set(t,e[t]);for(let t of s)n&&""===t[1]||i.push(encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]));return i.join("&")}}class Ci extends si{constructor(t){super(),this._selector=t}init(){document.addEventListener("click",(t=>{let e=t.target;for(;null!==e&&"function"==typeof e.matches&&!e.matches("body");){if(e.classList.contains(this._selector)){const n=e.dataset;let i=n.href;i||(i=e.getAttribute("href"));let s=null;"submit"===e.type&&void 0!==e.form&&(s=e.form),void 0!==n.question&&this.getContainer().getPlugin("alert").question(n.question,(function(t){t&&(null===s?document.location=i:(null!==i&&(s.action=i),s.submit()))})),t.preventDefault(),t.stopPropagation()}e=e.parentNode}}))}}class Li extends si{init(){if(null===document.getElementById("multi_update_all"))return;const t=document.querySelector("div.page-body");t.addEventListener("change",(t=>{if(t.target.matches("#multi_update_all")){const e=t.target.checked;for(const t of document.querySelectorAll(".multi_update_single"))t.checked=e;this._toggleForm(),t.stopPropagation()}else t.target.matches(".multi_update_single")&&(this._toggleForm(),t.stopPropagation())})),t.addEventListener("click",(t=>{if(t.target.matches(".multi_update_table_action")){const e=t.target,n=this._getSelectedIds(),i=document.getElementById("multi_update_form").dataset.question.replace(/%action%/,e.textContent).replace(/%count%/,n.length.toString());this.getPlugin("alert").question(i,(function(t){if(t){const t=document.getElementById("multi_update_form");t.action=e.dataset.href,t.submit()}}))}}))}_getSelectedIds(){let t=[];for(const e of document.querySelectorAll("input.multi_update_single:checked"))t.push(e.value);return t}_toggleForm(){const t=this._getSelectedIds();if(document.getElementById("multi_update_table_entities").value=t.join(","),t.length>0){for(const t of document.getElementsByClassName("multi_update_form_hide"))t.style.setProperty("display","none","important");document.getElementById("multi_update_form").style.display=null}else{document.getElementById("multi_update_form").style.setProperty("display","none","important");for(const t of document.getElementsByClassName("multi_update_form_hide"))t.style.display=null}}}class Mi extends si{getId(){return"date"}init(){this.getConfigurations().is24Hours()?this.timeFormat="HH:mm":this.timeFormat="hh:mm a",this.durationFormat=this.getConfiguration("formatDuration"),this.dateFormat=this.getConfiguration("formatDate")}_parseFormat(t){return t=(t=(t=(t=(t=(t=(t=t.replace("DD","dd")).replace("D","d")).replace("MM","LL")).replace("M","L")).replace("YYYY","yyyy")).replace("YY","yy")).replace("A","a")}format(t,e){let n=null;return n=null==e?ti.now():e instanceof Date?ti.fromJSDate(e):ti.fromISO(e),n.toFormat(this._parseFormat(t),{locale:"en-us"})}getFormattedDate(t){return this.format(this._parseFormat(this.dateFormat),t)}formatForAPI(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t instanceof Date&&(t=ti.fromJSDate(t)),void 0!==e&&e||(t=t.toUTC()),t.toISO({includeOffset:!1,suppressMilliseconds:!0})}fromFormat(t,e){return ti.fromFormat(t,this._parseFormat(e),{locale:"en-us"})}fromHtml5Input(t,e){return e=e??"",""===(t=t??"")&&""===e?ti.invalid("Empty date and time given"):(""!==t&&""!==e&&(t=t+"T"+e),ti.fromISO(t))}isValidDateTime(t,e){return this.fromFormat(t,e).isValid}addHumanDuration(t,e){let n=null;if(t instanceof Date)n=ti.fromJSDate(t);else{if(!(t instanceof ti))throw"addHumanDuration() needs a JS Date";n=t}const i=ti.fromISO(e),s=ti.now().startOf("day"),o=i.diff(s);return n.plus(o).toJSDate()}formatDuration(t){let e=null;return e="string"==typeof t?ti.now().diff(ti.fromISO(t)):Je.fromISO("PT"+(null===t?0:t)+"S"),this.formatLuxonDuration(e)}formatSeconds(t){return this.formatLuxonDuration(Je.fromObject({seconds:t}))}formatLuxonDuration(t){return t=t.shiftTo("hours","minutes","seconds"),this.formatAsDuration(t.hours,t.minutes)}formatTime(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ti.fromJSDate(t);return void 0!==e&&e||(n=n.toUTC()),n.toFormat(this.timeFormat)}formatAsDuration(t,e){let n=this.durationFormat;return(t<0||e<0)&&(t=Math.abs(t),e=Math.abs(e),n="-"+n),n.replace("%h",t.toString()).replace("%m",("0"+e).slice(-2))}getSecondsFromDurationString(t){const e=this.parseDuration(t);return null!==e&&e.isValid?e.as("seconds"):0}parseDuration(t){if(null==t||""===t)return new Je({seconds:0});let e=null;if(-1!==(t=t.trim().toUpperCase()).indexOf(":")){const[,n,i,s]=t.match(/(\d+):(\d+)(?::(\d+))*/);e=Je.fromObject({hours:n,minutes:i,seconds:s})}else if(-1!==t.indexOf(".")||-1!==t.indexOf(","))t=t.replace(/,/,"."),t=(3600*parseFloat(t)).toString(),e=Je.fromISO("PT"+t+"S");else if(-1!==t.indexOf("H")||-1!==t.indexOf("M")||-1!==t.indexOf("S"))e=Je.fromISO("PT"+t);else{let n=parseInt(t);const i=parseInt(t).toFixed();isNaN(n)||t!==i||(t=(3600*n).toString(),e=Je.fromISO("PT"+t+"S"))}return null!==e&&e.isValid?"-"===t[0]&&e.valueOf()>0?e.negate():e:new Je({seconds:0})}}class Ii extends si{getId(){return"escape"}escapeForHtml(t){if(null==t)return"";const e={"&":"&","<":"<",">":">"};return t.replace(/[&<>]/g,(function(t){return e[t]||t}))}}class Ai extends si{getId(){return"fetch"}fetch(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===e.headers&&(e.headers=new Headers),e.headers.append("X-Requested-With","Kimai"),e={redirect:"follow",...e},new Promise(((n,i)=>{fetch(t,e).then((t=>{if(t.ok)return 201===t.status&&t.headers.has("x-modal-redirect")?void(window.location=t.headers.get("x-modal-redirect")):void n(t);let e=!1;if(403===t.status){if(t.headers.has("login-required")){const t=this.getConfiguration("login").toString();this.getContainer().getPlugin("alert").question(this.translate("login.required"),(e=>{!0===e&&window.location.replace(t)})),e=!0}}else console.log("Some error occurred");e||i(t)})).catch((t=>{console.log("Error occurred while talking to Kimai backend",t),i(t)}))}))}}class Ni extends ui{supportsForm(t){return"timesheet_edit_form"===t.name||"timesheet_admin_edit_form"===t.name||"timesheet_multi_user_edit_form"===t.name}destroyForm(t){this.supportsForm(t)&&(void 0!==this._beginDate&&(this._beginDate.removeEventListener("change",this._beginListener),delete this._beginListener,delete this._beginDate),void 0!==this._beginTime&&(this._beginTime.removeEventListener("change",this._beginListener),delete this._beginTime),void 0!==this._endTime&&(this._endTime.removeEventListener("change",this._endListener),delete this._endTime),void 0!==this._duration&&(this._duration.removeEventListener("change",this._durationListener),delete this._durationListener,delete this._duration),void 0!==this._durationToggle&&null!==this._durationToggle&&(this._durationToggle.removeEventListener("change",this._durationToggleListener),delete this._durationToggleListener,delete this._durationToggle),void 0!==this._activity&&(this._activity.removeEventListener("create",this._activityListener),delete this._activityListener,delete this._activity),void 0!==this._project&&delete this._project)}activateForm(t){if(!this.supportsForm(t))return;const e=t.name;this._activity=document.getElementById(e+"_activity"),this._project=document.getElementById(e+"_project"),this._activityListener=t=>{const e=this._project.value;this.getContainer().getPlugin("api").post(this._activity.dataset.create,{name:t.detail.value,project:""===e?null:e,visible:!0},(()=>{this._project.dispatchEvent(new Event("change"))}))},this._activity.addEventListener("create",this._activityListener),this._beginDate=document.getElementById(e+"_begin_date"),this._beginTime=document.getElementById(e+"_begin_time"),this._endTime=document.getElementById(e+"_end_time"),this._duration=document.getElementById(e+"_duration"),this._durationToggle=document.getElementById(e+"_duration_toggle"),null!==this._beginDate&&null!==this._beginTime&&null!==this._endTime&&null!==this._duration&&(this._beginListener=()=>this._changedBegin(),this._endListener=()=>this._changedEnd(),this._durationListener=()=>this._changedDuration(),this._beginDate.addEventListener("change",this._beginListener),this._beginTime.addEventListener("change",this._beginListener),this._endTime.addEventListener("change",this._endListener),this._duration.addEventListener("change",this._durationListener),null!==this._duration&&null!==this._durationToggle&&(this._durationToggleListener=()=>{this._durationToggle.classList.toggle("text-success")},this._durationToggle.addEventListener("click",this._durationToggleListener)))}_isDurationConnected(){return(null!==this._duration||null!==this._durationToggle)&&(null===this._durationToggle||this._durationToggle.classList.contains("text-success"))}_getBegin(){if(""===this._beginDate.value||""===this._beginTime.value)return null;const t=this.getDateUtils().fromFormat(this._beginDate.value+" "+this._beginTime.value,this._beginDate.dataset.format+" "+this._beginTime.dataset.format);return t.invalid?null:t}_getEnd(){if(""===this._endTime.value)return null;let t=this.getDateUtils().fromFormat(ti.now().toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+this._endTime.dataset.format);const e=this._getBegin();return null!==e&&(t=this.getDateUtils().fromFormat(e.toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+this._endTime.dataset.format),t0;null===this._getEnd()&&n?this._applyDateToField(t.plus(e),null,this._endTime):this._updateDuration()}_changedEnd(){const t=this._getEnd();if(null===t)return;const e=this._getParsedDuration(),n=e.as("seconds")>0;null===this._getBegin()&&n?this._applyDateToField(t.minus(e),this._beginDate,this._beginTime):this._updateDuration()}_updateDuration(){const t=this._getBegin(),e=this._getEnd();let n=null;null!==t&&null!==e&&(n=e.diff(t)),this._setDurationAsString(n)}_changedDuration(){if(!this._isDurationConnected())return;const t=this._getParsedDuration();if(!t.isValid)return void this._setDurationAsString(null);const e=this._getBegin();let n=this._getEnd();const i=t.as("seconds");if(i<0&&(n=null),null===e&&null===n){const t=ti.now();this._applyDateToField(t,this._beginDate,this._beginTime),this._applyDateToField(t.plus({seconds:i}),null,this._endTime)}else null===e&&null!==n?this._applyDateToField(n.minus({seconds:i}),this._beginDate,this._beginTime):null!==e&&i>0&&this._applyDateToField(e.plus({seconds:i}),null,this._endTime)}_setDurationAsString(t){if(!this._isDurationConnected())return;if(null===t)return void(this._duration.value="");if(!t.isValid)return;const e=t.as("seconds");if(e<0)return void(this._duration.value="");const n=Math.floor(e/3600);let i=Math.floor((e-3600*n)/60);i<10&&(i="0"+i),this._duration.value=n+":"+i}_getParsedDuration(){return this.getDateUtils().parseDuration(this._duration.value.toUpperCase())}_applyDateToField(t,e,n){if(null===t||t.invalid)return e.value="",void(n.value="");null!==e&&(e.value=this.getDateUtils().format(e.dataset.format,t)),n.value=this.getDateUtils().format(n.dataset.format,t)}}var Pi,Fi,ji=n(7169);class qi extends ui{init(){this.usersId="team_edit_form_users"}supportsForm(t){return"team_edit_form"===t.name}_getPrototype(){return document.getElementById("team_edit_form_members")}activateForm(t){this.supportsForm(t)&&(t.addEventListener("click",(t=>this._removeMember(t))),document.getElementById(this.usersId).addEventListener("change",(t=>{const e=t.target,n=e.options[e.selectedIndex],i=this._createMember(n);this._getPrototype().append(i),this.getPlugin("form-select").removeOption(e,n)})))}_createMember(t){const e=this.getPlugin("escape"),n=this._getPrototype();let i=n.dataset.widgetCounter||n.childNodes.length,s=n.dataset.prototype;s=s.replace(/__name__/g,i),s=s.replace(/#000000/g,ji.Z.calculateContrastColor(t.dataset.color)),s=s.replace(/__DISPLAY__/g,e.escapeForHtml(t.dataset.display)),s=s.replace(/__COLOR__/g,t.dataset.color),s=s.replace(/__INITIALS__/g,e.escapeForHtml(t.dataset.initials)),s=s.replace(/__TITLE__/g,e.escapeForHtml(t.dataset.title)),s=s.replace(/__USERNAME__/g,e.escapeForHtml(t.text)),n.dataset.widgetCounter=(++i).toString();const o=document.createElement("div");o.innerHTML=s,o.querySelector("input[type=hidden]").value=t.value;const r=o.firstElementChild;for(const e in t.dataset)r.dataset[e]=t.dataset[e];return r}_removeMember(t){let e=t.target;if(e.parentNode.matches(".remove-member")&&(e=e.parentNode),e.matches(".remove-member")){e.parentNode.parentNode.parentNode.parentNode.parentNode.remove(),t.stopPropagation(),t.preventDefault()}}destroyForm(t){this.supportsForm(t)&&t.removeEventListener("click",this._removeMember)}}class Hi extends ui{supportsForm(t){return!0}activateForm(t){void 0===this._eventHandler&&(this._eventHandler=t=>{let e=t.target;if(e.matches('a[data-form-widget="copy-data"]')||(e=e.parentNode),!e.matches('a[data-form-widget="copy-data"]')||void 0===e.dataset.target)return;const n=document.querySelector(e.dataset.target);if(null!==n){if(n.value=e.dataset.value,void 0!==e.dataset.event)for(const t of e.dataset.event.split(" "))n.dispatchEvent(new Event(t));else if(void 0!==e.dataset.eventBubbles)for(const t of e.dataset.eventBubbles.split(" "))n.dispatchEvent(new Event(t,{bubbles:!0}));t.preventDefault()}}),t.addEventListener("click",this._eventHandler)}destroyForm(t){t.removeEventListener("click",this._eventHandler)}}class Vi extends ui{init(){this.selector='a[data-form-widget="date-now"]'}supportsForm(t){return!0}activateForm(t){[].slice.call(t.querySelectorAll(this.selector)).map((t=>{void 0!==t.dataset.format&&void 0!==t.dataset.target&&(void 0===this._eventHandler&&(this._eventHandler=t=>{const e=t.currentTarget,n=document.getElementById(e.dataset.target);n.disabled||(n.value=this.getDateUtils().format(e.dataset.format,null),n.dispatchEvent(new Event("change",{bubbles:!0}))),t.preventDefault()}),t.addEventListener("click",this._eventHandler))}))}destroyForm(t){[].slice.call(t.querySelectorAll(this.selector)).map((t=>{void 0!==t.dataset.format&&void 0!==t.dataset.target&&t.removeEventListener("click",this._eventHandler)}))}}class $i extends si{getId(){return"notification"}isSupported(){return!!window.Notification&&("denied"!==Notification.permission&&"granted"===Notification.permission)}request(t){try{Notification.requestPermission().then((e=>{t("granted"===e||"default"===e&&null)}))}catch(e){Notification.requestPermission((e=>{t("granted"===e||"default"===e&&null)}))}}notify(t,e,n,i){this.request((s=>{if(!0!==s){this.getPlugin("alert").info(e)}let o={body:e,dir:this.getConfigurations().isRTL()?"rtl":"ltr"};null!=n&&(o.icon=n);let r="Kimai";null!==t&&(r=r+": "+t),null!=i&&(o={...o,...i});const a=new window.Notification(r,o);a.onclick=function(){window.focus(),a.close()}}))}}class Bi extends si{getId(){return"hotkeys"}init(){window.addEventListener("keyup",(t=>{if(t.ctrlKey&&"Enter"===t.key){const e=[...document.querySelectorAll('[data-hotkey="ctrl+Enter"]')].filter((t=>this.isVisible(t)));e.length>1&&console.warn("KimaiHotkeys: More than one visible element matches ${selector}. No action triggered."),1===e.length&&(t.stopPropagation(),t.preventDefault(),e[0].click())}}))}isVisible(t){return!(!t||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility")}}class Ri extends si{constructor(){super(),this._selector="a.remote-modal-load"}getId(){return"remote-modal"}init(){this.handle=t=>{this._showModal(t.currentTarget),t.stopPropagation(),t.preventDefault()};for(let t of document.querySelectorAll(this._selector))t.addEventListener("click",this.handle);document.addEventListener("kimai.closeRemoteModal",(()=>{this._hide()}))}_initElement(t){for(let e of t.querySelectorAll("a.remote-modal-reload"))e.addEventListener("click",this.handle)}_hide(){this._getModal().hide()}_getModalElement(){return document.getElementById("remote_modal")}_getModal(){return ai.u_.getOrCreateInstance(this._getModalElement())}_showModal(t){this.fetch(t.href,{method:"GET"}).then((e=>{if(e.ok)return e.text().then((e=>{const n=document.createElement("div");n.classList.add("modal-body"),n.classList.add("p-0"),n.innerHTML=e,this._initElement(n);const i=this._getModalElement();i.querySelector(".modal-body").replaceWith(n),void 0!==t.dataset.modalTitle&&(i.querySelector(".modal-title").textContent=t.dataset.modalTitle),this._getModal().show()}))})).catch((t=>{console.log("Failed to load remote modal",t)}))}}t=n.hmd(t),Pi="undefined"!=typeof self?self:void 0,Fi=function(){return class extends class{constructor(t,e){dt.defaultLocale=t.locale.replace("_","-").toLowerCase(),dt.defaultZone=t.timezone;const n=new oi(new ii(t),new ni(e));n.registerPlugin(new Ii),n.registerPlugin(new wi),n.registerPlugin(new gi),n.registerPlugin(new Ti),n.registerPlugin(new Ai),n.registerPlugin(new Mi),n.registerPlugin(new $i),n.registerPlugin(new Si(".selectpicker","select[data-related-select]")),n.registerPlugin(new hi('input[data-daterangepicker="on"]')),n.registerPlugin(new di('input[data-datepicker="on"]')),n.registerPlugin(new Di),n.registerPlugin(new Ni),n.registerPlugin(new qi),n.registerPlugin(new Hi),n.registerPlugin(new Vi),n.registerPlugin(new Oi),n.registerPlugin(new Bi),n.registerPlugin(new Ci("confirmation-link")),n.registerPlugin(new ri("data-column-visibility")),n.registerPlugin(new mi("section.content","table.dataTable")),n.registerPlugin(new fi("form.searchform","toolbar-action")),n.registerPlugin(new yi(".alternative-link")),n.registerPlugin(new bi(".modal-ajax-form")),n.registerPlugin(new Ri),n.registerPlugin(new _i),n.registerPlugin(new ki("api-link")),n.registerPlugin(new Li),n.registerPlugin(new li),document.dispatchEvent(new CustomEvent("kimai.pluginRegister",{detail:{kimai:n}})),n.getPlugins().map((t=>{t.init()})),document.dispatchEvent(new CustomEvent("kimai.initialized",{detail:{kimai:n}})),this.kimai=n}getKimai(){return this.kimai}}{}},"function"==typeof define&&n.amdO?define([],(function(){return Pi.KimaiWebLoader=Fi()})):t.exports?t.exports=Fi():Pi.KimaiWebLoader=Fi()},7169:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{static calculateContrastColor(t){"#"===t.slice(0,1)&&(t=t.slice(1)),3===t.length&&(t=t.split("").map((function(t){return t+t})).join(""));return(299*parseInt(t.substring(0,2),16)+587*parseInt(t.substring(2,4),16)+114*parseInt(t.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}},3187:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{constructor(t){this.id=t}getContextMenuElement(){if(null===document.getElementById(this.id)){const t=document.createElement("div");t.id=this.id,t.classList.add("dropdown-menu","d-none"),document.body.appendChild(t)}return document.getElementById(this.id)}createFromApi(t,e){let n="";for(const t of e)if(!0===t.divider&&(n+=''),null!==t.url){if(n+='"+t.title+""}this.createFromClickEvent(t,n)}createFromClickEvent(t,e){const n=this.getContextMenuElement();n.style.zIndex="1021",n.innerHTML=e,n.style.position="fixed",n.style.top=t.clientY+"px",n.style.left=t.clientX+"px";const i=t=>{t.target.classList.contains("dropdown-toggle")||t.target.classList.contains("dropdown-divider")||(n.classList.remove("d-block"),n.classList.contains("d-none")||n.classList.add("d-none"),n.removeEventListener("click",i),document.removeEventListener("click",i))};n.addEventListener("click",i),document.addEventListener("click",i),n.classList.remove("d-none"),n.classList.contains("d-block")||n.classList.add("d-block")}static createForDataTable(t){[].slice.call(document.querySelectorAll(t)).map((t=>{null!==t.querySelector("td.actions div.dropdown-menu")&&t.addEventListener("contextmenu",(e=>{let n=e.target;for(;null!==n;){const t=n.tagName.toUpperCase();if("TH"===t||"TABLE"===t||"BODY"===t)return;if("TR"===t)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const s=n.querySelector("td.actions div.dropdown-menu");if(null===s)return;e.preventDefault();new i(t.dataset.contextMenu).createFromClickEvent(e,s.innerHTML)}))}))}}},985:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var i=n(3187);class s{constructor(t){this.selector=t;const e=document.querySelector(this.selector);if(this.href=e.dataset.href,void 0!==e.dataset.reload){this.events=e.dataset.reload.split(" ");const t=()=>{let t=null;t=void 0!==document.querySelector(this.selector).dataset.reloadHref?document.querySelector(this.selector).dataset.reloadHref:document.querySelector(this.selector+" ul.pagination li.active a").href,this.loadPage(t)};for(const e of this.events)document.addEventListener(e,t)}document.body.addEventListener("click",(t=>{let e=t.target;e.matches(this.selector+" a.pagination-link")||(e=e.parentNode),e.matches(this.selector+" a.pagination-link")&&(t.preventDefault(),this.loadPage(e.href))}))}static create(t){return new s(t)}loadPage(t){const e=this.selector;document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this.selector}));const n=()=>{document.dispatchEvent(new Event("kimai.reloadedContent"))};window.kimai.getPlugin("fetch").fetch(t).then((t=>{t.text().then((t=>{const s=document.createElement("div");s.innerHTML=t,document.querySelector(e).replaceWith(this._makeScriptExecutable(s.firstElementChild)),i.Z.createForDataTable(e+" table.dataTable"),n()}))})).catch((()=>{window.kimai.getPlugin("alert").error("Failed loading selected page"),n()}))}_makeScriptExecutable(t){if(void 0!==t.tagName&&"SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,t.parentNode.replaceChild(e,t)}else for(const e of t.childNodes)this._makeScriptExecutable(e);return t}}},8227:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{constructor(t,e){const n=()=>{e?document.location.reload():this._loadPage(document.location)};for(const e of t.split(" "))document.addEventListener(e,n)}static create(t,e){return null==e&&(e=!1),new i(t,e)}_showOverlay(){document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:"div.page-wrapper"}))}_hideOverlay(){document.dispatchEvent(new Event("kimai.reloadedContent"))}_loadPage(t){this._showOverlay(),window.kimai.getPlugin("fetch").fetch(t).then((t=>{t.text().then((t=>{const e=document.createElement("div");e.innerHTML=t;const n=e.querySelector("section.content");document.querySelector("section.content").replaceWith(n),document.dispatchEvent(new Event("kimai.reloadPage")),this._hideOverlay()}))})).catch((()=>{this._hideOverlay(),document.location=t}))}}},6654:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});class i{static set(t,e){window.localStorage.setItem(t,JSON.stringify(e))}static get(t){let e=window.localStorage.getItem(t);return null==e?null:JSON.parse(e)}static remove(t){window.localStorage.removeItem(t)}}},3138:function(t,e,n){"use strict";n.d(e,{u_:function(){return Bn},J2:function(){return _i},FN:function(){return Bi},u:function(){return vi}});var i={};n.r(i),n.d(i,{afterMain:function(){return T},afterRead:function(){return _},afterWrite:function(){return D},applyStyles:function(){return A},arrow:function(){return X},auto:function(){return l},basePlacements:function(){return c},beforeMain:function(){return w},beforeRead:function(){return y},beforeWrite:function(){return x},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return it},createPopper:function(){return At},createPopperBase:function(){return It},createPopperLite:function(){return Nt},detectOverflow:function(){return bt},end:function(){return d},eventListeners:function(){return ot},flip:function(){return _t},hide:function(){return Tt},left:function(){return a},main:function(){return k},modifierPhases:function(){return S},offset:function(){return xt},placements:function(){return v},popper:function(){return m},popperGenerator:function(){return Mt},popperOffsets:function(){return Et},preventOverflow:function(){return Dt},read:function(){return b},reference:function(){return f},right:function(){return r},start:function(){return u},top:function(){return s},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return E}});var s="top",o="bottom",r="right",a="left",l="auto",c=[s,o,r,a],u="start",d="end",h="clippingParents",p="viewport",m="popper",f="reference",g=c.reduce((function(t,e){return t.concat([e+"-"+u,e+"-"+d])}),[]),v=[].concat(c,[l]).reduce((function(t,e){return t.concat([e,e+"-"+u,e+"-"+d])}),[]),y="beforeRead",b="read",_="afterRead",w="beforeMain",k="main",T="afterMain",x="beforeWrite",E="write",D="afterWrite",S=[y,b,_,w,k,T,x,E,D];function O(t){return t?(t.nodeName||"").toLowerCase():null}function C(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function L(t){return t instanceof C(t).Element||t instanceof Element}function M(t){return t instanceof C(t).HTMLElement||t instanceof HTMLElement}function I(t){return"undefined"!=typeof ShadowRoot&&(t instanceof C(t).ShadowRoot||t instanceof ShadowRoot)}var A={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];M(s)&&O(s)&&(Object.assign(s.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});M(i)&&O(i)&&(Object.assign(i.style,o),Object.keys(s).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]};function N(t){return t.split("-")[0]}var P=Math.max,F=Math.min,j=Math.round;function q(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function H(){return!/^((?!chrome|android).)*safari/i.test(q())}function V(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),s=1,o=1;e&&M(t)&&(s=t.offsetWidth>0&&j(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&j(i.height)/t.offsetHeight||1);var r=(L(t)?C(t):window).visualViewport,a=!H()&&n,l=(i.left+(a&&r?r.offsetLeft:0))/s,c=(i.top+(a&&r?r.offsetTop:0))/o,u=i.width/s,d=i.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function $(t){var e=V(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function B(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&I(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function R(t){return C(t).getComputedStyle(t)}function z(t){return["table","td","th"].indexOf(O(t))>=0}function Y(t){return((L(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(I(t)?t.host:null)||Y(t)}function W(t){return M(t)&&"fixed"!==R(t).position?t.offsetParent:null}function Z(t){for(var e=C(t),n=W(t);n&&z(n)&&"static"===R(n).position;)n=W(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===R(n).position)?e:n||function(t){var e=/firefox/i.test(q());if(/Trident/i.test(q())&&M(t)&&"fixed"===R(t).position)return null;var n=U(t);for(I(n)&&(n=n.host);M(n)&&["html","body"].indexOf(O(n))<0;){var i=R(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function J(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function K(t,e,n){return P(t,F(e,n))}function G(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var X={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,l=t.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,h=N(n.placement),p=J(h),m=[a,r].indexOf(h)>=0?"height":"width";if(u&&d){var f=function(t,e){return G("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,c))}(l.padding,n),g=$(u),v="y"===p?s:a,y="y"===p?o:r,b=n.rects.reference[m]+n.rects.reference[p]-d[p]-n.rects.popper[m],_=d[p]-n.rects.reference[p],w=Z(u),k=w?"y"===p?w.clientHeight||0:w.clientWidth||0:0,T=b/2-_/2,x=f[v],E=k-g[m]-f[y],D=k/2-g[m]/2+T,S=K(x,D,E),O=p;n.modifiersData[i]=((e={})[O]=S,e.centerOffset=S-D,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&B(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tt(t){return t.split("-")[1]}var et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nt(t){var e,n=t.popper,i=t.popperRect,l=t.placement,c=t.variation,u=t.offsets,h=t.position,p=t.gpuAcceleration,m=t.adaptive,f=t.roundOffsets,g=t.isFixed,v=u.x,y=void 0===v?0:v,b=u.y,_=void 0===b?0:b,w="function"==typeof f?f({x:y,y:_}):{x:y,y:_};y=w.x,_=w.y;var k=u.hasOwnProperty("x"),T=u.hasOwnProperty("y"),x=a,E=s,D=window;if(m){var S=Z(n),O="clientHeight",L="clientWidth";if(S===C(n)&&"static"!==R(S=Y(n)).position&&"absolute"===h&&(O="scrollHeight",L="scrollWidth"),l===s||(l===a||l===r)&&c===d)E=o,_-=(g&&S===D&&D.visualViewport?D.visualViewport.height:S[O])-i.height,_*=p?1:-1;if(l===a||(l===s||l===o)&&c===d)x=r,y-=(g&&S===D&&D.visualViewport?D.visualViewport.width:S[L])-i.width,y*=p?1:-1}var M,I=Object.assign({position:h},m&&et),A=!0===f?function(t){var e=t.x,n=t.y,i=window.devicePixelRatio||1;return{x:j(e*i)/i||0,y:j(n*i)/i||0}}({x:y,y:_}):{x:y,y:_};return y=A.x,_=A.y,p?Object.assign({},I,((M={})[E]=T?"0":"",M[x]=k?"0":"",M.transform=(D.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",M)):Object.assign({},I,((e={})[E]=T?_+"px":"",e[x]=k?y+"px":"",e.transform="",e))}var it={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=void 0===i||i,o=n.adaptive,r=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),variation:tt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,nt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,nt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},st={passive:!0};var ot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,o=void 0===s||s,r=i.resize,a=void 0===r||r,l=C(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,st)})),a&&l.addEventListener("resize",n.update,st),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,st)})),a&&l.removeEventListener("resize",n.update,st)}},data:{}},rt={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function ct(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ut(t){var e=C(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(t){return V(Y(t)).left+ut(t).scrollLeft}function ht(t){var e=R(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:M(t)&&ht(t)?t:pt(U(t))}function mt(t,e){var n;void 0===e&&(e=[]);var i=pt(t),s=i===(null==(n=t.ownerDocument)?void 0:n.body),o=C(i),r=s?[o].concat(o.visualViewport||[],ht(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(mt(U(r)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,n){return e===p?ft(function(t,e){var n=C(t),i=Y(t),s=n.visualViewport,o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=H();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+dt(t),y:l}}(t,n)):L(e)?function(t,e){var n=V(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ft(function(t){var e,n=Y(t),i=ut(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=P(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=P(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+dt(t),l=-i.scrollTop;return"rtl"===R(s||n).direction&&(a+=P(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(Y(t)))}function vt(t,e,n,i){var s="clippingParents"===e?function(t){var e=mt(U(t)),n=["absolute","fixed"].indexOf(R(t).position)>=0&&M(t)?Z(t):t;return L(n)?e.filter((function(t){return L(t)&&B(t,n)&&"body"!==O(t)})):[]}(t):[].concat(e),o=[].concat(s,[n]),r=o[0],a=o.reduce((function(e,n){var s=gt(t,n,i);return e.top=P(s.top,e.top),e.right=F(s.right,e.right),e.bottom=F(s.bottom,e.bottom),e.left=P(s.left,e.left),e}),gt(t,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function yt(t){var e,n=t.reference,i=t.element,l=t.placement,c=l?N(l):null,h=l?tt(l):null,p=n.x+n.width/2-i.width/2,m=n.y+n.height/2-i.height/2;switch(c){case s:e={x:p,y:n.y-i.height};break;case o:e={x:p,y:n.y+n.height};break;case r:e={x:n.x+n.width,y:m};break;case a:e={x:n.x-i.width,y:m};break;default:e={x:n.x,y:n.y}}var f=c?J(c):null;if(null!=f){var g="y"===f?"height":"width";switch(h){case u:e[f]=e[f]-(n[g]/2-i[g]/2);break;case d:e[f]=e[f]+(n[g]/2-i[g]/2)}}return e}function bt(t,e){void 0===e&&(e={});var n=e,i=n.placement,a=void 0===i?t.placement:i,l=n.strategy,u=void 0===l?t.strategy:l,d=n.boundary,g=void 0===d?h:d,v=n.rootBoundary,y=void 0===v?p:v,b=n.elementContext,_=void 0===b?m:b,w=n.altBoundary,k=void 0!==w&&w,T=n.padding,x=void 0===T?0:T,E=G("number"!=typeof x?x:Q(x,c)),D=_===m?f:m,S=t.rects.popper,O=t.elements[k?D:_],C=vt(L(O)?O:O.contextElement||Y(t.elements.popper),g,y,u),M=V(t.elements.reference),I=yt({reference:M,element:S,strategy:"absolute",placement:a}),A=ft(Object.assign({},S,I)),N=_===m?A:M,P={top:C.top-N.top+E.top,bottom:N.bottom-C.bottom+E.bottom,left:C.left-N.left+E.left,right:N.right-C.right+E.right},F=t.modifiersData.offset;if(_===m&&F){var j=F[a];Object.keys(P).forEach((function(t){var e=[r,o].indexOf(t)>=0?1:-1,n=[s,o].indexOf(t)>=0?"y":"x";P[t]+=j[n]*e}))}return P}var _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var d=n.mainAxis,h=void 0===d||d,p=n.altAxis,m=void 0===p||p,f=n.fallbackPlacements,y=n.padding,b=n.boundary,_=n.rootBoundary,w=n.altBoundary,k=n.flipVariations,T=void 0===k||k,x=n.allowedAutoPlacements,E=e.options.placement,D=N(E),S=f||(D===E||!T?[at(E)]:function(t){if(N(t)===l)return[];var e=at(t);return[ct(t),e,ct(e)]}(E)),O=[E].concat(S).reduce((function(t,n){return t.concat(N(n)===l?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?v:l,d=tt(i),h=d?a?g:g.filter((function(t){return tt(t)===d})):c,p=h.filter((function(t){return u.indexOf(t)>=0}));0===p.length&&(p=h);var m=p.reduce((function(e,n){return e[n]=bt(t,{placement:n,boundary:s,rootBoundary:o,padding:r})[N(n)],e}),{});return Object.keys(m).sort((function(t,e){return m[t]-m[e]}))}(e,{placement:n,boundary:b,rootBoundary:_,padding:y,flipVariations:T,allowedAutoPlacements:x}):n)}),[]),C=e.rects.reference,L=e.rects.popper,M=new Map,I=!0,A=O[0],P=0;P=0,V=H?"width":"height",$=bt(e,{placement:F,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),B=H?q?r:a:q?o:s;C[V]>L[V]&&(B=at(B));var R=at(B),z=[];if(h&&z.push($[j]<=0),m&&z.push($[B]<=0,$[R]<=0),z.every((function(t){return t}))){A=F,I=!1;break}M.set(F,z)}if(I)for(var Y=function(t){var e=O.find((function(e){var n=M.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},U=T?3:1;U>0;U--){if("break"===Y(U))break}e.placement!==A&&(e.modifiersData[i]._skip=!0,e.placement=A,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function wt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function kt(t){return[s,r,o,a].some((function(e){return t[e]>=0}))}var Tt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=bt(e,{elementContext:"reference"}),a=bt(e,{altBoundary:!0}),l=wt(r,i),c=wt(a,s,o),u=kt(l),d=kt(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var xt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.offset,l=void 0===o?[0,0]:o,c=v.reduce((function(t,n){return t[n]=function(t,e,n){var i=N(t),o=[a,s].indexOf(i)>=0?-1:1,l="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=l[0],u=l[1];return c=c||0,u=(u||0)*o,[a,r].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,e.rects,l),t}),{}),u=c[e.placement],d=u.x,h=u.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=h),e.modifiersData[i]=c}};var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=yt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};var Dt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,l=n.mainAxis,c=void 0===l||l,d=n.altAxis,h=void 0!==d&&d,p=n.boundary,m=n.rootBoundary,f=n.altBoundary,g=n.padding,v=n.tether,y=void 0===v||v,b=n.tetherOffset,_=void 0===b?0:b,w=bt(e,{boundary:p,rootBoundary:m,padding:g,altBoundary:f}),k=N(e.placement),T=tt(e.placement),x=!T,E=J(k),D="x"===E?"y":"x",S=e.modifiersData.popperOffsets,O=e.rects.reference,C=e.rects.popper,L="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,M="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(S){if(c){var j,q="y"===E?s:a,H="y"===E?o:r,V="y"===E?"height":"width",B=S[E],R=B+w[q],z=B-w[H],Y=y?-C[V]/2:0,U=T===u?O[V]:C[V],W=T===u?-C[V]:-O[V],G=e.elements.arrow,Q=y&&G?$(G):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=X[q],nt=X[H],it=K(0,O[V],Q[V]),st=x?O[V]/2-Y-it-et-M.mainAxis:U-it-et-M.mainAxis,ot=x?-O[V]/2+Y+it+nt+M.mainAxis:W+it+nt+M.mainAxis,rt=e.elements.arrow&&Z(e.elements.arrow),at=rt?"y"===E?rt.clientTop||0:rt.clientLeft||0:0,lt=null!=(j=null==I?void 0:I[E])?j:0,ct=B+ot-lt,ut=K(y?F(R,B+st-lt-at):R,B,y?P(z,ct):z);S[E]=ut,A[E]=ut-B}if(h){var dt,ht="x"===E?s:a,pt="x"===E?o:r,mt=S[D],ft="y"===D?"height":"width",gt=mt+w[ht],vt=mt-w[pt],yt=-1!==[s,a].indexOf(k),_t=null!=(dt=null==I?void 0:I[D])?dt:0,wt=yt?gt:mt-O[ft]-C[ft]-_t+M.altAxis,kt=yt?mt+O[ft]+C[ft]-_t-M.altAxis:vt,Tt=y&&yt?function(t,e,n){var i=K(t,e,n);return i>n?n:i}(wt,mt,kt):K(y?wt:gt,mt,y?kt:vt);S[D]=Tt,A[D]=Tt-mt}e.modifiersData[i]=A}},requiresIfExists:["offset"]};function St(t,e,n){void 0===n&&(n=!1);var i,s,o=M(e),r=M(e)&&function(t){var e=t.getBoundingClientRect(),n=j(e.width)/t.offsetWidth||1,i=j(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=Y(e),l=V(t,r,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==O(e)||ht(a))&&(c=(i=e)!==C(i)&&M(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:ut(i)),M(e)?((u=V(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=dt(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Ot(t){var e=new Map,n=new Set,i=[];function s(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&s(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||s(t)})),i}var Ct={placement:"bottom",modifiers:[],strategy:"absolute"};function Lt(){for(var t=arguments.length,e=new Array(t),n=0;n{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&"#"!==n?n.trim():null}return e},jt=t=>{const e=Ft(t);return e&&document.querySelector(e)?e:null},qt=t=>{const e=Ft(t);return e?document.querySelector(e):null},Ht=t=>{t.dispatchEvent(new Event(Pt))},Vt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),$t=t=>Vt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Bt=t=>{if(!Vt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},Rt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),zt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?zt(t.parentNode):null},Yt=()=>{},Ut=t=>{t.offsetHeight},Wt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Zt=[],Jt=()=>"rtl"===document.documentElement.dir,Kt=t=>{var e;e=()=>{const e=Wt();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}},"loading"===document.readyState?(Zt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Zt)t()})),Zt.push(e)):e()},Gt=t=>{"function"==typeof t&&t()},Qt=(t,e,n=!0)=>{if(!n)return void Gt(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e),s=Number.parseFloat(n);return i||s?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0})(e)+5;let s=!1;const o=({target:n})=>{n===e&&(s=!0,e.removeEventListener(Pt,o),Gt(t))};e.addEventListener(Pt,o),setTimeout((()=>{s||Ht(e)}),i)},Xt=(t,e,n,i)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[s-1]:t[0]:(o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},te=/[^.]*(?=\..*)\.|.*/,ee=/\..*/,ne=/::\d+$/,ie={};let se=1;const oe={mouseenter:"mouseover",mouseleave:"mouseout"},re=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 ae(t,e){return e&&`${e}::${se++}`||t.uidEvent||se++}function le(t){const e=ae(t);return t.uidEvent=e,ie[e]=ie[e]||{},ie[e]}function ce(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function ue(t,e,n){const i="string"==typeof e,s=i?n:e||n;let o=me(t);return re.has(o)||(o=t),[i,s,o]}function de(t,e,n,i,s){if("string"!=typeof e||!t)return;let[o,r,a]=ue(e,n,i);if(e in oe){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=le(t),c=l[a]||(l[a]={}),u=ce(c,r,o?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=ae(r,e.replace(te,"")),h=o?function(t,e,n){return function i(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return ge(s,{delegateTarget:r}),i.oneOff&&fe.off(t,s.type,e,n),n.apply(r,[s])}}(t,n,r):function(t,e){return function n(i){return ge(i,{delegateTarget:t}),n.oneOff&&fe.off(t,i.type,e),e.apply(t,[i])}}(t,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=d,c[d]=h,t.addEventListener(a,h,o)}function he(t,e,n,i,s){const o=ce(e[n],i,s);o&&(t.removeEventListener(n,o,Boolean(s)),delete e[n][o.uidEvent])}function pe(t,e,n,i){const s=e[n]||{};for(const o of Object.keys(s))if(o.includes(i)){const i=s[o];he(t,e,n,i.callable,i.delegationSelector)}}function me(t){return t=t.replace(ee,""),oe[t]||t}const fe={on(t,e,n,i){de(t,e,n,i,!1)},one(t,e,n,i){de(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[s,o,r]=ue(e,n,i),a=r!==e,l=le(t),c=l[r]||{},u=e.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))pe(t,l,n,e.slice(1));for(const n of Object.keys(c)){const i=n.replace(ne,"");if(!a||e.includes(i)){const e=c[n];he(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;he(t,l,r,o,s?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=Wt();let s=null,o=!0,r=!0,a=!1;e!==me(e)&&i&&(s=i.Event(e,n),i(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=ge(l,n),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function ge(t,e){for(const[n,i]of Object.entries(e||{}))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}const ve=new Map,ye={set(t,e,n){ve.has(t)||ve.set(t,new Map);const i=ve.get(t);i.has(e)||0===i.size?i.set(e,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>ve.has(t)&&ve.get(t).get(e)||null,remove(t,e){if(!ve.has(t))return;const n=ve.get(t);n.delete(e),0===n.size&&ve.delete(t)}};function be(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function _e(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const we={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${_e(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${_e(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=be(t.dataset[i])}return e},getDataAttribute:(t,e)=>be(t.getAttribute(`data-bs-${_e(e)}`))};class ke{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(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const n=Vt(e)?we.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...Vt(e)?we.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const i of Object.keys(e)){const s=e[i],o=t[i],r=Vt(o)?"element":null==(n=o)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}var n}}class Te extends ke{constructor(t,e){super(),(t=$t(t))&&(this._element=t,this._config=this._getConfig(e),ye.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ye.remove(this._element,this.constructor.DATA_KEY),fe.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){Qt(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return ye.get($t(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.2"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const xe=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;fe.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Rt(this))return;const s=qt(this)||this.closest(`.${i}`);t.getOrCreateInstance(s)[e]()}))};class Ee extends Te{static get NAME(){return"alert"}close(){if(fe.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),fe.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Ee.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}xe(Ee,"close"),Kt(Ee);const De='[data-bs-toggle="button"]';class Se extends Te{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Se.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}fe.on(document,"click.bs.button.data-api",De,(t=>{t.preventDefault();const e=t.target.closest(De);Se.getOrCreateInstance(e).toggle()})),Kt(Se);const Oe={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Rt(t)&&Bt(t)))}},Ce=".bs.swipe",Le={endCallback:null,leftCallback:null,rightCallback:null},Me={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ie extends ke{constructor(t,e){super(),this._element=t,t&&Ie.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Le}static get DefaultType(){return Me}static get NAME(){return"swipe"}dispose(){fe.off(this._element,Ce)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Gt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Gt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(fe.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),fe.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(fe.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),fe.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),fe.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Ae="next",Ne="prev",Pe="left",Fe="right",je="slid.bs.carousel",qe="carousel",He="active",Ve=".active",$e=".carousel-item",Be={ArrowLeft:Fe,ArrowRight:Pe},Re={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ze={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ye extends Te{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Oe.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===qe&&this.cycle()}static get Default(){return Re}static get DefaultType(){return ze}static get NAME(){return"carousel"}next(){this._slide(Ae)}nextWhenVisible(){!document.hidden&&Bt(this._element)&&this.next()}prev(){this._slide(Ne)}pause(){this._isSliding&&Ht(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?fe.one(this._element,je,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void fe.one(this._element,je,(()=>this.to(t)));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?Ae:Ne;this._slide(i,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&fe.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(fe.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),fe.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&Ie.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Oe.find(".carousel-item img",this._element))fe.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Pe)),rightCallback:()=>this._slide(this._directionToOrder(Fe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Ie(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Be[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Oe.findOne(Ve,this._indicatorsElement);e.classList.remove(He),e.removeAttribute("aria-current");const n=Oe.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(He),n.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const n=this._getActive(),i=t===Ae,s=e||Xt(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=e=>fe.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Ut(s),n.classList.add(l),s.classList.add(l);this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(He),n.classList.remove(He,c,l),this._isSliding=!1,r(je)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Oe.findOne(".active.carousel-item",this._element)}_getItems(){return Oe.find($e,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Jt()?t===Pe?Ne:Ae:t===Pe?Ae:Ne}_orderToDirection(t){return Jt()?t===Ne?Pe:Fe:t===Ne?Fe:Pe}static jQueryInterface(t){return this.each((function(){const e=Ye.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}fe.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=qt(this);if(!e||!e.classList.contains(qe))return;t.preventDefault();const n=Ye.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===we.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),fe.on(window,"load.bs.carousel.data-api",(()=>{const t=Oe.find('[data-bs-ride="carousel"]');for(const e of t)Ye.getOrCreateInstance(e)})),Kt(Ye);const Ue="show",We="collapse",Ze="collapsing",Je='[data-bs-toggle="collapse"]',Ke={parent:null,toggle:!0},Ge={parent:"(null|element)",toggle:"boolean"};class Qe extends Te{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Oe.find(Je);for(const t of n){const e=jt(t),n=Oe.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ke}static get DefaultType(){return Ge}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Qe.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(fe.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(We),this._element.classList.add(Ze),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ze),this._element.classList.add(We,Ue),this._element.style[e]="",fe.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(fe.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Ut(this._element),this._element.classList.add(Ze),this._element.classList.remove(We,Ue);for(const t of this._triggerArray){const e=qt(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ze),this._element.classList.add(We),fe.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ue)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=$t(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Je);for(const e of t){const t=qt(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Oe.find(":scope .collapse .collapse",this._config.parent);return Oe.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const n of t)n.classList.toggle("collapsed",!e),n.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const n=Qe.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}}))}}fe.on(document,"click.bs.collapse.data-api",Je,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=jt(this),n=Oe.find(e);for(const t of n)Qe.getOrCreateInstance(t,{toggle:!1}).toggle()})),Kt(Qe);const Xe="dropdown",tn="ArrowUp",en="ArrowDown",nn="click.bs.dropdown.data-api",sn="keydown.bs.dropdown.data-api",on="show",rn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',an=`${rn}.show`,ln=".dropdown-menu",cn=Jt()?"top-end":"top-start",un=Jt()?"top-start":"top-end",dn=Jt()?"bottom-end":"bottom-start",hn=Jt()?"bottom-start":"bottom-end",pn=Jt()?"left-start":"right-start",mn=Jt()?"right-start":"left-start",fn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},gn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class vn extends Te{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Oe.next(this._element,ln)[0]||Oe.prev(this._element,ln)[0]||Oe.findOne(ln,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return fn}static get DefaultType(){return gn}static get NAME(){return Xe}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Rt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!fe.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))fe.on(t,"mouseover",Yt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(on),this._element.classList.add(on),fe.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(Rt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!fe.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.off(t,"mouseover",Yt);this._popper&&this._popper.destroy(),this._menu.classList.remove(on),this._element.classList.remove(on),this._element.setAttribute("aria-expanded","false"),we.removeDataAttribute(this._menu,"popper"),fe.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Vt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Xe.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:Vt(this._config.reference)?t=$t(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=At(t,this._menu,e)}_isShown(){return this._menu.classList.contains(on)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return pn;if(t.classList.contains("dropstart"))return mn;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?un:cn:e?hn:dn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(we.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const n=Oe.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Bt(t)));n.length&&Xt(n,e,t===en,!n.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=vn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Oe.find(an);for(const n of e){const e=vn.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),s=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),n="Escape"===t.key,i=[tn,en].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const s=this.matches(rn)?this:Oe.prev(this,rn)[0]||Oe.next(this,rn)[0]||Oe.findOne(rn,t.delegateTarget.parentNode),o=vn.getOrCreateInstance(s);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}fe.on(document,sn,rn,vn.dataApiKeydownHandler),fe.on(document,sn,ln,vn.dataApiKeydownHandler),fe.on(document,nn,vn.clearMenus),fe.on(document,"keyup.bs.dropdown.data-api",vn.clearMenus),fe.on(document,nn,rn,(function(t){t.preventDefault(),vn.getOrCreateInstance(this).toggle()})),Kt(vn);const yn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",bn=".sticky-top",_n="padding-right",wn="margin-right";class kn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,_n,(e=>e+t)),this._setElementAttributes(yn,_n,(e=>e+t)),this._setElementAttributes(bn,wn,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,_n),this._resetElementAttributes(yn,_n),this._resetElementAttributes(bn,wn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&we.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const n=we.getDataAttribute(t,e);null!==n?(we.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(Vt(t))e(t);else for(const n of Oe.find(t,this._element))e(n)}}const Tn="backdrop",xn="show",En="mousedown.bs.backdrop",Dn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Sn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class On extends ke{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Dn}static get DefaultType(){return Sn}static get NAME(){return Tn}show(t){if(!this._config.isVisible)return void Gt(t);this._append();const e=this._getElement();this._config.isAnimated&&Ut(e),e.classList.add(xn),this._emulateAnimation((()=>{Gt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(xn),this._emulateAnimation((()=>{this.dispose(),Gt(t)}))):Gt(t)}dispose(){this._isAppended&&(fe.off(this._element,En),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=$t(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),fe.on(t,En,(()=>{Gt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){Qt(t,this._getElement(),this._config.isAnimated)}}const Cn=".bs.focustrap",Ln="backward",Mn={autofocus:!0,trapElement:null},In={autofocus:"boolean",trapElement:"element"};class An extends ke{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Mn}static get DefaultType(){return In}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),fe.off(document,Cn),fe.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),fe.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,fe.off(document,Cn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=Oe.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===Ln?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ln:"forward")}}const Nn=".bs.modal",Pn="hidden.bs.modal",Fn="show.bs.modal",jn="modal-open",qn="show",Hn="modal-static",Vn={backdrop:!0,focus:!0,keyboard:!0},$n={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Bn extends Te{constructor(t,e){super(t,e),this._dialog=Oe.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new kn,this._addEventListeners()}static get Default(){return Vn}static get DefaultType(){return $n}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;fe.trigger(this._element,Fn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(jn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;fe.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(qn),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){for(const t of[window,this._dialog])fe.off(t,Nn);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new On({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new An({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Oe.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Ut(this._element),this._element.classList.add(qn);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,fe.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){fe.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),fe.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),fe.on(this._element,"mousedown.dismiss.bs.modal",(t=>{fe.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(jn),this._resetAdjustments(),this._scrollBar.reset(),fe.trigger(this._element,Pn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(fe.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Hn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Hn),this._queueCallback((()=>{this._element.classList.remove(Hn),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=Jt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=Jt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=Bn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}fe.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=qt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),fe.one(e,Fn,(t=>{t.defaultPrevented||fe.one(e,Pn,(()=>{Bt(this)&&this.focus()}))}));const n=Oe.findOne(".modal.show");n&&Bn.getInstance(n).hide();Bn.getOrCreateInstance(e).toggle(this)})),xe(Bn),Kt(Bn);const Rn="show",zn="showing",Yn="hiding",Un=".offcanvas.show",Wn="hidePrevented.bs.offcanvas",Zn="hidden.bs.offcanvas",Jn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Gn extends Te{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Jn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(fe.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new kn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(zn);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Rn),this._element.classList.remove(zn),fe.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(fe.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Yn),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(Rn,Yn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new kn).reset(),fe.trigger(this._element,Zn)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new On({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():fe.trigger(this._element,Wn)}:null})}_initializeFocusTrap(){return new An({trapElement:this._element})}_addEventListeners(){fe.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():fe.trigger(this._element,Wn))}))}static jQueryInterface(t){return this.each((function(){const e=Gn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}fe.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=qt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Rt(this))return;fe.one(e,Zn,(()=>{Bt(this)&&this.focus()}));const n=Oe.findOne(Un);n&&n!==e&&Gn.getInstance(n).hide();Gn.getOrCreateInstance(e).toggle(this)})),fe.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of Oe.find(Un))Gn.getOrCreateInstance(t).show()})),fe.on(window,"resize.bs.offcanvas",(()=>{for(const t of Oe.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Gn.getOrCreateInstance(t).hide()})),xe(Gn),Kt(Gn);const Qn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Xn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ti=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,ei=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!Qn.has(n)||Boolean(Xn.test(t.nodeValue)||ti.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(n)))},ni={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],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:[]};const ii={allowList:ni,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:""},si={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},oi={entry:"(string|element|function|null)",selector:"(string|element)"};class ri extends ke{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ii}static get DefaultType(){return si}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,n]of Object.entries(this._config.content))this._setContent(t,n,e);const e=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&e.classList.add(...n.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,n]of Object.entries(t))super._typeCheckConfig({selector:e,entry:n},oi)}_setContent(t,e,n){const i=Oe.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?Vt(e)?this._putElementInTemplate($t(e),i):this._config.html?i.innerHTML=this._maybeSanitize(e):i.textContent=e:i.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,n){if(!t.length)return t;if(n&&"function"==typeof n)return n(t);const i=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const t of s){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[n]||[]);for(const e of i)ei(e,s)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ai=new Set(["sanitize","allowList","sanitizeFn"]),li="fade",ci="show",ui=".modal",di="hide.bs.modal",hi="hover",pi="focus",mi={AUTO:"auto",TOP:"top",RIGHT:Jt()?"left":"right",BOTTOM:"bottom",LEFT:Jt()?"right":"left"},fi={allowList:ni,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'
',title:"",trigger:"hover focus"},gi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class vi extends Te{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return fi}static get DefaultType(){return gi}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),fe.off(this._element.closest(ui),di,this._hideModalHandler),this.tip&&this.tip.remove(),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=fe.trigger(this._element,this.constructor.eventName("show")),e=(zt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),fe.trigger(this._element,this.constructor.eventName("inserted"))),this._popper?this._popper.update():this._popper=this._createPopper(n),n.classList.add(ci),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.on(t,"mouseover",Yt);this._queueCallback((()=>{fe.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(fe.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;const t=this._getTipElement();if(t.classList.remove(ci),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.off(t,"mouseover",Yt);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||t.remove(),this._element.removeAttribute("aria-describedby"),fe.trigger(this._element,this.constructor.eventName("hidden")),this._disposePopper())}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(li,ci),e.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",n),this._isAnimated()&&e.classList.add(li),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ri({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(li)}_isShown(){return this.tip&&this.tip.classList.contains(ci)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,n=mi[e.toUpperCase()];return At(this._element,t,this._getPopperConfig(n))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)fe.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===hi?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===hi?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");fe.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?pi:hi]=!0,e._enter()})),fe.on(this._element,n,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?pi:hi]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},fe.on(this._element.closest(ui),di,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=we.getDataAttributes(this._element);for(const t of Object.keys(e))ai.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:$t(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=vi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Kt(vi);const yi={...vi.Default,content:"",offset:[0,8],placement:"right",template:'
',trigger:"click"},bi={...vi.DefaultType,content:"(null|string|element|function)"};class _i extends vi{static get Default(){return yi}static get DefaultType(){return bi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=_i.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Kt(_i);const wi="click.bs.scrollspy",ki="active",Ti="[href]",xi={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ei={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Di extends Te{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return xi}static get DefaultType(){return Ei}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=$t(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(fe.off(this._config.target,wi),fe.on(this._config.target,wi,Ti,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const n=this._rootElement||window,i=e.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),n=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(n(o),!i)return}else s||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Oe.find(Ti,this._config.target);for(const e of t){if(!e.hash||Rt(e))continue;const t=Oe.findOne(e.hash,this._element);Bt(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(ki),this._activateParents(t),fe.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Oe.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(ki);else for(const e of Oe.parents(t,".nav, .list-group"))for(const t of Oe.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(ki)}_clearActiveClass(t){t.classList.remove(ki);const e=Oe.find("[href].active",t);for(const t of e)t.classList.remove(ki)}static jQueryInterface(t){return this.each((function(){const e=Di.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}fe.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of Oe.find('[data-bs-spy="scroll"]'))Di.getOrCreateInstance(t)})),Kt(Di);const Si="ArrowLeft",Oi="ArrowRight",Ci="ArrowUp",Li="ArrowDown",Mi="active",Ii="fade",Ai="show",Ni='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Pi=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Ni}`;class Fi extends Te{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),fe.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),n=e?fe.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;fe.trigger(t,"show.bs.tab",{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Mi),this._activate(qt(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),fe.trigger(t,"shown.bs.tab",{relatedTarget:e})):t.classList.add(Ai)}),t,t.classList.contains(Ii))}_deactivate(t,e){if(!t)return;t.classList.remove(Mi),t.blur(),this._deactivate(qt(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),fe.trigger(t,"hidden.bs.tab",{relatedTarget:e})):t.classList.remove(Ai)}),t,t.classList.contains(Ii))}_keydown(t){if(![Si,Oi,Ci,Li].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Oi,Li].includes(t.key),n=Xt(this._getChildren().filter((t=>!Rt(t))),t.target,e,!0);n&&(n.focus({preventScroll:!0}),Fi.getOrCreateInstance(n).show())}_getChildren(){return Oe.find(Pi,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),n=this._getOuterElement(t);t.setAttribute("aria-selected",e),n!==t&&this._setAttributeIfNotExists(n,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=qt(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const n=this._getOuterElement(t);if(!n.classList.contains("dropdown"))return;const i=(t,i)=>{const s=Oe.findOne(t,n);s&&s.classList.toggle(i,e)};i(".dropdown-toggle",Mi),i(".dropdown-menu",Ai),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(Mi)}_getInnerElement(t){return t.matches(Pi)?t:Oe.findOne(Pi,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Fi.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}fe.on(document,"click.bs.tab",Ni,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Rt(this)||Fi.getOrCreateInstance(this).show()})),fe.on(window,"load.bs.tab",(()=>{for(const t of Oe.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Fi.getOrCreateInstance(t)})),Kt(Fi);const ji="hide",qi="show",Hi="showing",Vi={animation:"boolean",autohide:"boolean",delay:"number"},$i={animation:!0,autohide:!0,delay:5e3};class Bi extends Te{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return $i}static get DefaultType(){return Vi}static get NAME(){return"toast"}show(){if(fe.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(ji),Ut(this._element),this._element.classList.add(qi,Hi),this._queueCallback((()=>{this._element.classList.remove(Hi),fe.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(fe.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.add(Hi),this._queueCallback((()=>{this._element.classList.add(ji),this._element.classList.remove(Hi,qi),fe.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(qi),super.dispose()}isShown(){return this._element.classList.contains(qi)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const n=t.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){fe.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),fe.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),fe.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),fe.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Bi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}xe(Bi),Kt(Bi)},7466:function(t){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e,n,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i="en-US"),this.dateInstance="object"==typeof n&&null!==n?n.parse(e instanceof t?e.clone().toJSDate():e):"string"==typeof n?t.parseDateTime(e,n,i):e?t.parseDateTime(e):t.parseDateTime(new Date),this.lang=i}return t.parseDateTime=function(e,n,i){if(void 0===n&&(n="YYYY-MM-DD"),void 0===i&&(i="en-US"),!e)return new Date(NaN);if(e instanceof Date)return new Date(e);if(e instanceof t)return e.clone().toJSDate();if(/^-?\d{10,}$/.test(e))return t.getDateZeroTime(new Date(Number(e)));if("string"==typeof e){for(var s=[],o=null;null!=(o=t.regex.exec(n));)"\\"!==o[1]&&s.push(o);if(s.length){var r={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};s[0].index>0&&(r.value+=".*?");for(var a=0,l=Object.entries(s);at.getTime()&&this.timestamp()=t.getTime()&&this.timestamp()t.getTime()&&this.timestamp()<=e.getTime();case"[]":return this.timestamp()>=t.getTime()&&this.timestamp()<=e.getTime()}},t.prototype.isBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return t.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")},t.prototype.isSameOrBefore=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return t.getTime()>=this.getTime();case"day":case"days":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(t.getFullYear(),t.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")},t.prototype.isAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(t.getFullYear(),t.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>t.getFullYear()}throw new Error("isAfter: Invalid unit!")},t.prototype.isSameOrAfter=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()>=t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")},t.prototype.isSame=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":return this.getTime()===t.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(t.getFullYear(),t.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")},t.prototype.add=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()+t);break;case"day":case"days":this.setDate(this.getDate()+t);break;case"month":case"months":this.setMonth(this.getMonth()+t)}return this},t.prototype.subtract=function(t,e){switch(void 0===e&&(e="seconds"),e){case"second":case"seconds":this.setSeconds(this.getSeconds()-t);break;case"day":case"days":this.setDate(this.getDate()-t);break;case"month":case"months":this.setMonth(this.getMonth()-t)}return this},t.prototype.diff=function(t,e){switch(void 0===e&&(e="seconds"),e){default:case"second":case"seconds":return this.getTime()-t.getTime();case"day":case"days":return Math.round((this.timestamp()-t.getTime())/864e5);case"month":case"months":}},t.prototype.format=function(e,n){if(void 0===n&&(n="en-US"),"object"==typeof e)return e.output(this.clone().toJSDate());for(var i="",s=[],o=null;null!=(o=t.regex.exec(e));)"\\"!==o[1]&&s.push(o);if(s.length){s[0].index>0&&(i+=e.substring(0,s[0].index));for(var r=0,a=Object.entries(s);r1&&n.isAfter(e)&&n.setMonth(n.getMonth()-(this.options.numberOfMonths-1)),this.calendars[0]=n.clone()):(e.setDate(1),this.calendars[0]=e.clone())}},e.prototype.bindEvents=function(){document.addEventListener("click",this.onClick.bind(this),!0),this.ui=document.createElement("div"),this.ui.className=l.litepicker,this.ui.style.display="none",this.ui.addEventListener("mouseenter",this.onMouseEnter.bind(this),!0),this.ui.addEventListener("mouseleave",this.onMouseLeave.bind(this),!1),this.options.autoRefresh?(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("keyup",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("keyup",this.onInput.bind(this),!0)):(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("change",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("change",this.onInput.bind(this),!0)),this.options.parentEl?this.options.parentEl instanceof HTMLElement?this.options.parentEl.appendChild(this.ui):document.querySelector(this.options.parentEl).appendChild(this.ui):this.options.inlineMode?this.options.element instanceof HTMLInputElement?this.options.element.parentNode.appendChild(this.ui):this.options.element.appendChild(this.ui):document.body.appendChild(this.ui),this.updateInput(),this.init(),"function"==typeof this.options.setup&&this.options.setup.call(this,this),this.render(),this.options.inlineMode&&this.show()},e.prototype.updateInput=function(){if(this.options.element instanceof HTMLInputElement){var t=this.options.startDate,e=this.options.endDate;if(this.options.singleMode&&t)this.options.element.value=t.format(this.options.format,this.options.lang);else if(!this.options.singleMode&&t&&e){var n=t.format(this.options.format,this.options.lang),i=e.format(this.options.format,this.options.lang);this.options.elementEnd instanceof HTMLInputElement?(this.options.element.value=n,this.options.elementEnd.value=i):this.options.element.value=""+n+this.options.delimiter+i}t||e||(this.options.element.value="",this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.value=""))}},e.prototype.isSamePicker=function(t){return t.closest("."+l.litepicker)===this.ui},e.prototype.shouldShown=function(t){return!t.disabled&&(t===this.options.element||this.options.elementEnd&&t===this.options.elementEnd)},e.prototype.shouldResetDatePicked=function(){return this.options.singleMode||2===this.datePicked.length},e.prototype.shouldSwapDatePicked=function(){return 2===this.datePicked.length&&this.datePicked[0].getTime()>this.datePicked[1].getTime()},e.prototype.shouldCheckLockDays=function(){return this.options.disallowLockDaysInRange&&2===this.datePicked.length},e.prototype.onClick=function(t){var e=t.target;if(t.target.shadowRoot&&(e=t.composedPath()[0]),e&&this.ui)if(this.shouldShown(e))this.show(e);else if(e.closest("."+l.litepicker)||!this.isShowning()){if(this.isSamePicker(e))if(this.emit("before:click",e),this.preventClick)this.preventClick=!1;else{if(e.classList.contains(l.dayItem)){if(t.preventDefault(),e.classList.contains(l.isLocked))return;if(this.shouldResetDatePicked()&&(this.datePicked.length=0),this.datePicked[this.datePicked.length]=new a.DateTime(e.dataset.time),this.shouldSwapDatePicked()){var n=this.datePicked[1].clone();this.datePicked[1]=this.datePicked[0].clone(),this.datePicked[0]=n.clone()}return this.shouldCheckLockDays()&&c.rangeIsLocked(this.datePicked,this.options)&&(this.emit("error:range",this.datePicked),this.datePicked.length=0),this.render(),this.emit.apply(this,o(["preselect"],o(this.datePicked).map((function(t){return t.clone()})))),void(this.options.autoApply&&(this.options.singleMode&&this.datePicked.length?(this.setDate(this.datePicked[0]),this.hide()):this.options.singleMode||2!==this.datePicked.length||(this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide())))}if(e.classList.contains(l.buttonPreviousMonth)){t.preventDefault();var i=0,s=this.options.switchingMonths||this.options.numberOfMonths;if(this.options.splitView){var r=e.closest("."+l.monthItem);i=c.findNestedMonthItem(r),s=1}return this.calendars[i].setMonth(this.calendars[i].getMonth()-s),this.gotoDate(this.calendars[i],i),void this.emit("change:month",this.calendars[i],i)}if(e.classList.contains(l.buttonNextMonth))return t.preventDefault(),i=0,s=this.options.switchingMonths||this.options.numberOfMonths,this.options.splitView&&(r=e.closest("."+l.monthItem),i=c.findNestedMonthItem(r),s=1),this.calendars[i].setMonth(this.calendars[i].getMonth()+s),this.gotoDate(this.calendars[i],i),void this.emit("change:month",this.calendars[i],i);e.classList.contains(l.buttonCancel)&&(t.preventDefault(),this.hide(),this.emit("button:cancel")),e.classList.contains(l.buttonApply)&&(t.preventDefault(),this.options.singleMode&&this.datePicked.length?this.setDate(this.datePicked[0]):this.options.singleMode||2!==this.datePicked.length||this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide(),this.emit("button:apply",this.options.startDate,this.options.endDate))}}else this.hide()},e.prototype.showTooltip=function(t,e){var n=this.ui.querySelector("."+l.containerTooltip);n.style.visibility="visible",n.innerHTML=e;var i=this.ui.getBoundingClientRect(),s=n.getBoundingClientRect(),o=t.getBoundingClientRect(),r=o.top,a=o.left;if(this.options.inlineMode&&this.options.parentEl){var c=this.ui.parentNode.getBoundingClientRect();r-=c.top,a-=c.left}else r-=i.top,a-=i.left;r-=s.height,a-=s.width/2,a+=o.width/2,n.style.top=r+"px",n.style.left=a+"px",this.emit("tooltip",n,t)},e.prototype.hideTooltip=function(){this.ui.querySelector("."+l.containerTooltip).style.visibility="hidden"},e.prototype.shouldAllowMouseEnter=function(t){return!this.options.singleMode&&!t.classList.contains(l.isLocked)},e.prototype.shouldAllowRepick=function(){return this.options.elementEnd&&this.options.allowRepick&&this.options.startDate&&this.options.endDate},e.prototype.isDayItem=function(t){return t.classList.contains(l.dayItem)},e.prototype.onMouseEnter=function(t){var e=this,n=t.target;if(this.isDayItem(n)&&this.shouldAllowMouseEnter(n)){if(this.shouldAllowRepick()&&(this.triggerElement===this.options.element?this.datePicked[0]=this.options.endDate.clone():this.triggerElement===this.options.elementEnd&&(this.datePicked[0]=this.options.startDate.clone())),1!==this.datePicked.length)return;var i=this.ui.querySelector("."+l.dayItem+'[data-time="'+this.datePicked[0].getTime()+'"]'),s=this.datePicked[0].clone(),o=new a.DateTime(n.dataset.time),r=!1;if(s.getTime()>o.getTime()){var c=s.clone();s=o.clone(),o=c.clone(),r=!0}if(Array.prototype.slice.call(this.ui.querySelectorAll("."+l.dayItem)).forEach((function(t){var n=new a.DateTime(t.dataset.time),i=e.renderDay(n);n.isBetween(s,o)&&i.classList.add(l.isInRange),t.className=i.className})),n.classList.add(l.isEndDate),r?(i&&i.classList.add(l.isFlipped),n.classList.add(l.isFlipped)):(i&&i.classList.remove(l.isFlipped),n.classList.remove(l.isFlipped)),this.options.showTooltip){var u=o.diff(s,"day")+1;if("function"==typeof this.options.tooltipNumber&&(u=this.options.tooltipNumber.call(this,u)),u>0){var d=this.pluralSelector(u),h=u+" "+(this.options.tooltipText[d]?this.options.tooltipText[d]:"["+d+"]");this.showTooltip(n,h);var p=window.navigator.userAgent,m=/(iphone|ipad)/i.test(p),f=/OS 1([0-2])/i.test(p);m&&f&&n.dispatchEvent(new Event("click"))}else this.hideTooltip()}}},e.prototype.onMouseLeave=function(t){t.target,this.options.allowRepick&&(!this.options.allowRepick||this.options.startDate||this.options.endDate)&&(this.datePicked.length=0,this.render())},e.prototype.onInput=function(t){var e=this.parseInput(),n=e[0],i=e[1],s=this.options.format;if(this.options.elementEnd?n instanceof a.DateTime&&i instanceof a.DateTime&&n.format(s)===this.options.element.value&&i.format(s)===this.options.elementEnd.value:this.options.singleMode?n instanceof a.DateTime&&n.format(s)===this.options.element.value:n instanceof a.DateTime&&i instanceof a.DateTime&&""+n.format(s)+this.options.delimiter+i.format(s)===this.options.element.value){if(i&&n.getTime()>i.getTime()){var o=n.clone();n=i.clone(),i=o.clone()}this.options.startDate=new a.DateTime(n,this.options.format,this.options.lang),i&&(this.options.endDate=new a.DateTime(i,this.options.format,this.options.lang)),this.updateInput(),this.render();var r=n.clone(),l=0;(this.options.elementEnd?n.format(s)===t.target.value:t.target.value.startsWith(n.format(s)))||(r=i.clone(),l=this.options.numberOfMonths-1),this.emit("selected",this.getStartDate(),this.getEndDate()),this.gotoDate(r,l)}},e}(r.Calendar);e.Litepicker=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findNestedMonthItem=function(t){for(var e=t.parentNode.childNodes,n=0;ny&&((p=document.createElement("option")).value=String(t.getFullYear()),p.text=String(t.getFullYear()),p.selected=!0,p.disabled=!0,g.appendChild(p)),h=y;h>=v;h-=1){p=document.createElement("option");var b=new r.DateTime(new Date(h,0,1,0,0,0));p.value=String(h),p.text=String(h),p.disabled=this.options.minDate&&b.isBefore(new r.DateTime(this.options.minDate),"year")||this.options.maxDate&&b.isAfter(new r.DateTime(this.options.maxDate),"year"),p.selected=t.getFullYear()===h,g.appendChild(p)}if(t.getFullYear()W