Files
kimai2/public/build/app.77b6dec9.js
2026-05-23 14:14:06 +02:00

2 lines
377 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see app.77b6dec9.js.LICENSE.txt */
(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[524],{7368:function(t,e,n){n(3829),n(6833),n.g.KimaiPaginatedBoxWidget=n(7648).A,n.g.KimaiReloadPageWidget=n(1630).A,n.g.KimaiColor=n(9790).A,n.g.KimaiStorage=n(4667).A},6833:function(t,e,n){"use strict";var i=n(2647);class r{constructor(t){this._translations=t}get(t){return this._translations[t]}has(t){return t in this._translations}}class o{constructor(t){this._configurations=t}get(t){return this._configurations[t]}has(t){return t in this._configurations}isRTL(){return"rtl"===this.get("direction")}getLanguage(){return this.get("locale").replace("_","-")}is24Hours(){return!!this.get("twentyFourHours")}getFirstDayOfWeek(t=!0){void 0===t&&(t=!0);let e=this.get("first_dow_iso");return t||(e%=7),e}}n(9690);class s{init(){}getId(){return null}setContainer(t){if(!(t instanceof a))throw new Error("Plugin was given an invalid KimaiContainer");this._core=t}getContainer(){return this._core}getConfiguration(t){return this.getContainer().getConfiguration().get(t)}getConfigurations(){return this.getContainer().getConfiguration()}getDateUtils(){return this.getPlugin("date")}getPlugin(t){return this.getContainer().getPlugin(t)}getTranslation(){return this.getContainer().getTranslation()}translate(t){return this.getTranslation().get(t)}escape(t){return this.getPlugin("escape").escapeForHtml(t)}trigger(t,e=null){this.getPlugin("event").trigger(t,e)}fetch(t,e={}){return this.getPlugin("fetch").fetch(t,e)}fetchForm(t,e={},n=null){n=n||t.getAttribute("action");const i=t.getAttribute("method").toUpperCase();if("GET"===i){const i=this.getPlugin("form").convertFormDataToQueryString(t,{},!0);n=n+(n.includes("?")?"&":"?")+i,e={method:"GET",...e}}else"POST"===i&&(e={method:"POST",body:new FormData(t),...e});return this.fetch(n,e)}isMobile(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)<576}}class a{constructor(t,e){if(!(t instanceof o))throw new Error("Configuration needs to a KimaiConfiguration instance");if(this._configuration=t,!(e instanceof r))throw new Error("Configuration needs to a KimaiTranslation instance");this._translation=e,this._plugins=[]}registerPlugin(t){if(!(t instanceof s))throw new Error("Invalid plugin given, needs to be a KimaiPlugin instance");return t.setContainer(this),this._plugins.push(t),t}getPlugin(t){for(let e of this._plugins)if(null!==e.getId()&&e.getId()===t)return e;throw new Error("Unknown plugin: "+t)}getPlugins(){return this._plugins}getTranslation(){return this._translation}getConfiguration(){return this._configuration}getUser(){return this.getPlugin("user")}}class l extends s{constructor(t){super(),this.dataAttribute=t}getId(){return"datatable-column-visibility"}init(){let t=document.querySelector("["+this.dataAttribute+"]");if(null!==t){this._id=t.getAttribute(this.dataAttribute),this._modal=document.getElementById("modal_"+this._id),this._modal.addEventListener("show.bs.modal",()=>{this._evaluateCheckboxes()}),this._modal.querySelector("button[data-type=save]").addEventListener("click",()=>{this._saveVisibility()}),this._modal.querySelector("button[data-type=reset]").addEventListener("click",t=>{this._resetVisibility(t.currentTarget)}),this._modal.querySelectorAll("input[name=datatable_profile]").forEach(t=>{t.addEventListener("change",()=>{const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("data-href")).then(()=>{localStorage.setItem("kimai_profile",t.getAttribute("value")),document.location.reload()}).catch(()=>{e.setAttribute("action",t.getAttribute("data-href")),e.submit()})})});for(let t of this._modal.querySelectorAll("form input[type=checkbox]"))t.addEventListener("change",()=>{this._changeVisibility(t.getAttribute("name"),t.checked)})}}_evaluateCheckboxes(){const t=this._modal.getElementsByTagName("form")[0],e=document.getElementsByClassName("datatable_"+this._id)[0];for(let n of e.getElementsByTagName("th")){const e=n.getAttribute("data-field");if(null===e)continue;const i=t.querySelector("input[name="+e+"]");null!==i&&(i.checked="none"!==window.getComputedStyle(n).display)}}_saveVisibility(){const t=this._modal.getElementsByTagName("form")[0];this.fetchForm(t).then(()=>{document.location.reload()}).catch(()=>{t.submit()})}_resetVisibility(t){const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("formaction")).then(()=>{document.location.reload()}).catch(()=>{e.setAttribute("action",t.getAttribute("formaction")),e.submit()})}_changeVisibility(t,e){for(const n of document.getElementsByClassName("datatable_"+this._id)){let i=null;for(let r of n.getElementsByClassName("col_"+t)){if(null===i){let t="-none",n="d-table-cell";e||(t="-table-cell",n="d-none"),i="",r.classList.forEach(function(e,n,r){-1===e.indexOf(t)&&(i+=" "+e)}),-1===i.indexOf(n)&&(i+=" "+n)}r.className=i}}}}var c=n(6318);class u extends s{init(){[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]')).map(function(t){return new c.m_(t)});[...document.querySelectorAll(".offcanvas")].map(t=>new c.go(t));this.getContainer().getPlugin("form").activateForm("div.page-wrapper form"),this._registerModalAutofocus("#remote_form_modal"),this.overlay=null,document.addEventListener("kimai.reloadContent",t=>{if(null!==this.overlay)return;let e="div.page-wrapper";void 0!==t.detail&&null!==t.detail&&(e=t.detail);const n=document.createElement("div");n.innerHTML='<div class="overlay"><div class="progress progress-sm"><div class="progress-bar progress-bar-indeterminate"></div></div></div>',this.overlay=n.firstElementChild,document.querySelector(e).append(this.overlay)}),document.addEventListener("kimai.reloadedContent",()=>{null!==this.overlay&&(this.overlay.remove(),this.overlay=null)})}_registerModalAutofocus(t){if(this.isMobile())return;const e=document.querySelector(t);null!==e&&e.addEventListener("shown.bs.modal",()=>{const t=e.querySelector("form");let n=t.querySelectorAll("[autofocus]");n.length<1&&(n=t.querySelectorAll("input[type=text],input[type=date],textarea,select")),n.length>0&&n[0].focus()})}}var d=n(837);n(6311);class h extends s{supportsForm(t){return!1}activateForm(t){}destroyForm(t){}}class p extends h{constructor(t){super(),this._selector=t}init(){window.disableLitepickerStyles=!0,this._pickers=[]}supportsForm(t){return!0}activateForm(t){const e=this.getConfigurations().getFirstDayOfWeek(!1),n=this.getConfigurations().getLanguage();let i={buttonText:{previousMonth:'<i class="fas fa-chevron-left"></i>',nextMonth:'<i class="fas fa-chevron-right"></i>',apply:this.translate("confirm"),cancel:this.translate("cancel")}};const r=[].slice.call(t.querySelectorAll(this._selector)).map(t=>(void 0===t.dataset.format&&console.log("Trying to bind litepicker to an element without data-format attribute"),void 0!==t.hasAttribute("min")&&(i={...i,minDate:t.getAttribute("min")}),void 0!==t.hasAttribute("max")&&(i={...i,maxDate:t.getAttribute("max")}),i={...i,format:t.dataset.format,showTooltip:!1,element:t,lang:n,autoRefresh:!0,firstDay:e,setup:e=>{e.on("preselect",(t,n)=>{e._wasPreselected=!0}),e.on("selected",(n,i)=>{void 0!==e._wasPreselected&&(t.dispatchEvent(new Event("change",{bubbles:!0})),delete e._wasPreselected)}),void 0!==e.backdrop&&document.body.appendChild(e.backdrop)}},[t,new d.Litepicker(this.prepareOptions(i))]));this._pickers=this._pickers.concat(r)}prepareOptions(t){return{...t,plugins:["mobilefriendly"]}}destroyForm(t){[].slice.call(t.querySelectorAll(this._selector)).map(t=>{for(let e=0;e<this._pickers.length;e++)this._pickers[e][0]===t&&(this._pickers[e][1].destroy(),this._pickers.splice(e,1))})}}class m extends p{prepareOptions(t){return{...t,plugins:["mobilefriendly"],singleMode:!1,autoRefresh:!0}}}var f=n(5898);class g extends s{constructor(t,e){super(),this._contentArea=t,this._selector=e}getId(){return"datatable"}init(){const t=document.querySelector(this._selector);if(null===t)return;this.registerContextMenu(this._selector);const e=t.dataset.reloadEvent;if(void 0===e)return;const n=()=>{this.reloadDatatable()};for(let t of e.split(" "))document.addEventListener(t,n);document.addEventListener("pagination-change",n),document.addEventListener("filter-change",n)}registerContextMenu(t){f.A.createForDataTable(t)}reloadDatatable(){const t=this.getContainer().getPlugin("toolbar").getSelector(),e=document.querySelector(t),n=t=>{const e=document.createElement("div");e.innerHTML=t;const n=e.querySelector(this._contentArea);document.querySelector(this._contentArea).replaceWith(n),this.registerContextMenu(this._selector),document.dispatchEvent(new Event("kimai.reloadedContent"))};document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this._contentArea})),null!==e?this.fetchForm(e).then(t=>{t.text().then(n)}).catch(()=>{e.submit()}):this.fetch(document.location).then(t=>{t.text().then(n)}).catch(()=>{document.location.reload()})}}class v extends s{constructor(t,e){super(),this._formSelector=t,this._actionClass=e}getId(){return"toolbar"}init(){const t=this.getSelector();this._registerPagination(t),this._registerSortableTables(t),this._registerAlternativeSubmitActions(t,this._actionClass),[].slice.call(document.querySelectorAll(t+" input")).map(e=>{e.addEventListener("change",e=>{switch(e.target.id){case"order":case"orderBy":case"page":break;default:document.querySelector(t+" input#page").value=1}}),this.triggerChange()}),[].slice.call(document.querySelectorAll(t+" select")).map(e=>{e.addEventListener("change",e=>{let n=!0;switch(e.target.id){case"customer":null!==document.querySelector(t+" select#project")&&(n=!1);break;case"project":null!==document.querySelector(t+" select#activity")&&(n=!1)}document.querySelector(t+" input#page").value=1,n&&this.triggerChange()})})}_registerAlternativeSubmitActions(t,e){document.addEventListener("click",function(n){let i=n.target;for(;null!==i&&"function"==typeof i.matches&&!i.matches("body");){if(i.classList.contains(e)){const e=document.querySelector(t);if(null===e)return;const r=e.getAttribute("action"),o=e.getAttribute("method");void 0!==i.dataset.target&&(e.target=i.dataset.target),e.action=i.href,void 0!==i.dataset.method&&(e.method=i.dataset.method),e.submit(),e.target="",e.action=r,e.method=o,n.preventDefault(),n.stopPropagation()}i=i.parentNode}})}_registerSortableTables(t){document.body.addEventListener("click",e=>{if(!e.target.matches("th.sortable"))return;let n="DESC",i=e.target.dataset.order;e.target.classList.contains("sorting_desc")&&(n="ASC"),document.querySelector(t+" #orderBy").value=i,document.querySelector(t+" #order").value=n,document.querySelector(t+" #orderBy").dispatchEvent(new Event("change")),document.querySelector(t+" #order").dispatchEvent(new Event("change")),document.dispatchEvent(new Event("filter-change"))})}_registerPagination(t){document.body.addEventListener("click",e=>{if(!(e.target.matches("ul.pagination li a")||null!==e.target.parentNode&&e.target.parentNode.matches("ul.pagination li a")))return;let n=document.querySelector(t+" input#page");if(null===n)return;let i=e.target;i.matches("a")||(i=i.parentNode),e.preventDefault(),e.stopPropagation();let r=i.href.split("/"),o=r[r.length-1];return/\d/.test(o)||(o=1),n.value=o,n.dispatchEvent(new Event("change")),document.dispatchEvent(new Event("pagination-change")),!1})}triggerChange(){document.dispatchEvent(new Event("toolbar-change"))}getSelector(){return this._formSelector}}class y extends s{getId(){return"api"}_headers(){const t=new Headers;return t.append("Content-Type","application/json"),t}get(t,e,n,i){if(void 0!==e){const n=new URLSearchParams(e).toString();""!==n&&(t=t+(t.includes("?")?"&":"?")+n)}void 0===i&&(i=t=>{this.handleError("An error occurred",t)}),this.fetch(t,{method:"GET",headers:this._headers()}).then(t=>{t.json().then(t=>{n(t)})}).catch(t=>{i(t)})}post(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"POST",body:this._parseData(e),headers:this._headers()}).then(t=>{t.json().then(t=>{n(t)})}).catch(t=>{i(t)})}patch(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"PATCH",body:this._parseData(e),headers:this._headers()}).then(t=>{204===t.statusCode?n():t.json().then(t=>{n(t)})}).catch(t=>{i(t)})}delete(t,e,n){void 0===n&&(n=t=>{this.handleError("action.delete.error",t)}),this.fetch(t,{method:"DELETE",headers:this._headers()}).then(()=>{e()}).catch(t=>{n(t)})}_parseData(t){return"object"==typeof t?JSON.stringify(t):t}handleError(t,e){if(void 0===e.headers)return;const n=e.headers.get("content-type");n&&-1!==n.indexOf("application/json")?e.json().then(n=>{let i=n.message;if(400===e.status&&n.errors){let t=["<u>"+i+"</u>"];if(n.errors.errors)for(let e of n.errors.errors)t.push(e);if(n.errors.children)for(let e in n.errors.children){let i=n.errors.children[e];if(void 0!==i.errors&&i.errors.length>0)for(let e of i.errors)t.push(e)}t.length>0&&(i=t)}this.getPlugin("alert").error(t,i)}):e.text().then(()=>{const n="["+e.statusCode+"] "+e.statusText;this.getPlugin("alert").error(t,n)})}}class b extends s{addClickHandler(t,e,n){document.body.addEventListener("click",i=>{let r=i.target;for(;null!==r;){const e=r.tagName.toUpperCase();if("BODY"===e)return;if(r.matches(t))break;if("A"===e||"BUTTON"===e||"INPUT"===e||"LABEL"===e)return;for(let t of n)if(r.matches(t))return;r=r.parentNode}if(null===r)return;if(r.isContentEditable||r.parentNode.isContentEditable)return;if(!r.matches(t))return;for(let t of n)if(r.matches(t))return;i.preventDefault(),i.stopPropagation();let o=r.dataset.href;null==o&&(o=r.href),null!=o&&""!==o&&e(o)})}}class _ extends b{constructor(t){super(),this._selector=t}init(){this.addClickHandler(this._selector,function(t){window.location=t},[])}}class w extends b{constructor(t,e){super(),this._selector=t,this._stopSelector=e}getId(){return"modal"}init(){this._isDirty=!1;const t=this._getModalElement();null!==t&&(t.addEventListener("hide.bs.modal",e=>{if(this._isDirty){if(null===t.querySelector(".modal-body .remote_modal_is_dirty_warning")){const e=this.translate("modal.dirty"),n=document.createElement("div");n.innerHTML='<p class="text-danger small remote_modal_is_dirty_warning">'+e+"</p>",t.querySelector(".modal-body").prepend(n.firstElementChild)}e.preventDefault()}else this._isDirty=!1,document.dispatchEvent(new Event("modal-hide"))}),t.addEventListener("hidden.bs.modal",()=>{this.getContainer().getPlugin("form").destroyForm(this._getFormIdentifier()),t.querySelector(".modal-body").replaceWith("")}),t.addEventListener("show.bs.modal",()=>{document.dispatchEvent(new Event("modal-show"))}),this.addClickHandler(this._selector,t=>{this.openUrlInModal(t)},this._stopSelector))}_getModal(){return c.aF.getOrCreateInstance(this._getModalElement())}openUrlInModal(t,e){const n=new Headers;n.append("X-Requested-With","Kimai-Modal"),this.fetch(t,{method:"GET",redirect:"follow",headers:n}).then(e=>{if(e.ok)return e.text().then(t=>{this._openFormInModal(t)});window.location=t}).catch(n=>{null==e?window.location=t:e(n)})}_getFormIdentifier(){return"#remote_form_modal .modal-content form"}_getModalElement(){return document.getElementById("remote_form_modal")}_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}_openFormInModal(t){const e=this._getFormIdentifier();let n=this._getModalElement();const i=document.createElement("div");i.innerHTML=t;const r=this._makeScriptExecutable(i.querySelector("#form_modal .modal-content"));if(null!==r){let t=n.querySelector(".modal-dialog"),o=i.querySelector(".modal-dialog").classList.contains("modal-lg");o&&!t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),!o&&t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),n.querySelector(".modal-content").replaceWith(r),[].slice.call(n.querySelectorAll('[data-bs-dismiss="modal"]')).map(t=>{t.addEventListener("click",()=>{this._isDirty=!1,this._getModal().hide()})}),this.getContainer().getPlugin("form").activateForm(e)}let o=i.querySelector("div.alert");null!==o&&n.querySelector(".modal-body").prepend(o);const s=document.querySelector(e);s.addEventListener("change",()=>{this._isDirty=!0}),s.addEventListener("submit",this._getEventHandler()),this._getModal().show()}_getEventHandler(){return void 0===this.eventHandler&&(this.eventHandler=t=>{const e=t.target;if(void 0!==e.target&&""!==e.target)return!0;const n=document.querySelector(this._getFormIdentifier()+" button[type=submit]");n.textContent=n.textContent+" …",n.disabled=!0;const i=e.dataset.formEvent,r=this.getContainer().getPlugin("event");t.preventDefault(),t.stopPropagation();const o=new Headers;o.append("X-Requested-With","Kimai-Modal");const s={headers:o};this.fetchForm(e,s).then(t=>{t.text().then(t=>{const e=document.createElement("div");e.innerHTML=t;let o=!1,s=!1,a=!1;n.textContent=n.textContent.replace(" …",""),n.disabled=!1;const l=e.querySelector("#form_modal .modal-content");null!==l&&(o=null!==l.querySelector(".is-invalid"),o||(o=null!==l.querySelector(".invalid-feedback")),s=null!==l.querySelector("ul.list-unstyled li.text-danger"),a=null!==e.querySelector("div.alert-danger")),o||s||a?this._openFormInModal(t):(r.trigger(i),this._isDirty=!1,this._getModal().hide())})}).catch(t=>{let i=e.dataset.msgError;null!=i&&""!==i||(i="action.update.error");this.getContainer().getPlugin("alert").error(i,t.message),setTimeout(()=>{n.textContent=n.textContent.replace(" …",""),n.disabled=!1},1500)})}),this.eventHandler}}class k extends s{constructor(){super(),this._selector=".ticktac-menu",this._selectorEmpty=".ticktac-menu-empty",this._favIconUrl=null}getId(){return"active-records"}init(){if(null===document.querySelector(this._selector))return;const t=()=>{this.reloadActiveRecords()};document.addEventListener("kimai.timesheetUpdate",t),document.addEventListener("kimai.timesheetDelete",t),document.addEventListener("kimai.activityUpdate",t),document.addEventListener("kimai.activityDelete",t),document.addEventListener("kimai.projectUpdate",t),document.addEventListener("kimai.projectDelete",t),document.addEventListener("kimai.customerUpdate",t),document.addEventListener("kimai.customerDelete",t),this._updateBrowserTitle=!!this.getConfiguration("updateBrowserTitle");const e=()=>{this._updateDuration()};this._updatesHandler=setInterval(e,1e4),document.addEventListener("kimai.timesheetUpdate",e),document.addEventListener("kimai.reloadedContent",e)}_updateDuration(){const t=document.querySelectorAll('[data-since]:not([data-since=""])');if(this._updateBrowserTitle&&this._changeFavicon(t.length>0),0===t.length)return void(this._updateBrowserTitle&&(void 0===document.body.dataset.title?this._updateBrowserTitle=!1:document.title=document.body.dataset.title));const e=this.getDateUtils();let n=[];for(const i of t){const t=e.formatDuration(i.dataset.since);void 0!==i.dataset.replacer&&null!==i.dataset.title&&"?"!==t&&n.push(t),i.textContent=t}0!==n.length&&this._updateBrowserTitle&&(document.title=n.shift())}_setEntries(t){const e=t.length>0;for(let t of document.querySelectorAll(this._selectorEmpty))t.style.display=e?"none":"inline-block";for(let n of document.querySelectorAll(this._selector)){if(n.style.display=e?"inline-block":"none",!e)for(let t of n.querySelectorAll("[data-since]"))t.dataset.since="";const i=n.querySelector(".ticktac-stop");e?(i&&(i.accesskey="s"),this._replaceInNode(n,t[0])):i&&(i.accesskey=null)}this._updateDuration()}_replaceInNode(t,e){const n=this.getDateUtils(),i=t.querySelectorAll("[data-replacer]");for(let r of i){const i=r.dataset.replacer;"url"===i?r.dataset.href=t.dataset.href.replace("000",e.id):"activity"===i?r.innerText=e.activity.name:"project"===i?r.innerText=e.project.name:"customer"===i?r.innerText=e.project.customer.name:"duration"===i&&(r.dataset.since=e.begin,r.innerText=n.formatDuration(e.duration))}}reloadActiveRecords(){const t=this.getContainer().getPlugin("api"),e=document.querySelector(this._selector).dataset.api;t.get(e,{},t=>{this._setEntries(t)})}_changeFavicon(t){const e=document.createElement("canvas"),n=document.getElementById("favicon");null===this._favIconUrl&&(this._favIconUrl=n.href);const i=n.cloneNode(!0);if(e.getContext&&i){const r=window.devicePixelRatio,o=document.createElement("img");e.height=e.width=16*r,o.onload=function(){const o=e.getContext("2d");if(o.drawImage(this,0,0,e.width,e.height),t){const t=5.5*r;o.fillStyle="rgb(182,57,57)",o.fillRect(e.width/2-t/2,e.height/2-t/2,t,t)}i.href=e.toDataURL("image/png"),n.remove(),document.head.appendChild(i)},o.src=this._favIconUrl}}}class T extends s{getId(){return"event"}trigger(t,e=null){if(""!==t)for(const n of t.split(" ")){let t=new Event(n);null!==e&&(t=new CustomEvent(n,{detail:e})),document.dispatchEvent(t)}}}class E extends s{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")),void 0!==n.question?this.getContainer().getPlugin("alert").question(n.question,t=>{t&&this._callApi(i,n)}):this._callApi(i,n),t.preventDefault(),t.stopPropagation()}e=e.parentNode}})}_callApi(t,e){const n=e.method,i=e.event,r=this.getContainer().getPlugin("api"),o=this.getContainer().getPlugin("event"),s=(this.getContainer().getPlugin("alert"),()=>{o.trigger(i),document.dispatchEvent(new CustomEvent("kimai.reloadedContent"))}),a=t=>{let n="action.update.error";void 0!==e.msgError&&(n=e.msgError),document.dispatchEvent(new CustomEvent("kimai.reloadedContent")),r.handleError(n,t)};let l={};if(void 0!==e.payload&&(l=e.payload),document.dispatchEvent(new CustomEvent("kimai.reloadContent")),"PATCH"===n)r.patch(t,l,s,a);else if("POST"===n){let e={};r.post(t,e,s,a)}else"DELETE"===n?r.delete(t,s,a):"GET"===n&&r.get(t,l,s,a)}}class S extends s{getId(){return"alert"}error(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t)),t=t.replace("%reason%",""),void 0===e&&(e=null),null!==e&&(n.has(e)&&(e=n.get(e)),Array.isArray(e)&&(e=e.join("<br>")));const i="alert_global_error",r=document.getElementById(i);null!==r&&c.aF.getOrCreateInstance(r).hide();const o='\n <div class="modal" id="'+i+'" tabindex="-1" role="dialog">\n <div class="modal-dialog modal-sm modal-dialog-centered" role="document">\n <div class="modal-content">\n <div class="modal-status bg-'+this._mapClass("danger")+'"></div>\n <div class="modal-body text-center py-4">\n <i class="fas fa-exclamation-circle fa-3x mb-3 text-danger"></i>\n <h2>'+t+"</h2>\n "+(null!==e?'<div class="text-muted">'+e+"</div>":"")+'\n </div>\n <div class="modal-footer">\n <div class="w-100">\n <div class="row">\n <div class="col text-center"><a href="#" class="btn btn-primary" data-bs-dismiss="modal">'+n.get("close")+"</a></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ";this._showModal(o)}warning(t){this._show("warning",t)}success(t){this._toast("success",t)}info(t){this._show("info",t)}_showModal(t){const e=document.body,n=document.createElement("template");n.innerHTML=t.trim();const i=n.content.firstChild;e.appendChild(i);const r=new c.aF(i);i.addEventListener("hidden.bs.modal",function(){e.removeChild(i)}),r.show()}_show(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));const i='\n <div class="modal fade" tabindex="-1" role="dialog">\n <div class="modal-dialog modal-sm modal-dialog-centered" role="document">\n <div class="modal-content">\n <div class="modal-status bg-'+this._mapClass(t)+'"></div>\n <div class="modal-body text-center py-4">\n <i class="fas fa-exclamation-circle fa-3x mb-3 text-'+this._mapClass(t)+'"></i>\n <h2>'+e+'</h2>\n </div>\n <div class="modal-footer">\n <div class="w-100">\n <div class="row">\n <div class="col text-center"><a href="#" class="btn btn-primary" data-bs-dismiss="modal">'+n.get("close")+"</a></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ";this._showModal(i)}_mapClass(t){return"info"===t||"success"===t||"warning"===t||"danger"===t?t:"error"===t?"danger":"primary"}_toast(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));let i='<i class="fas fa-info me-2"></i>';"success"===t?i='<i class="fas fa-check me-2"></i>':"warning"===t?i='<i class="fas fa-exclamation me-2"></i>':"danger"!==t&&"error"!==t||(i='<i class="fas fa-exclamation-circle me-2"></i>');const r='<div class="toast align-items-center text-white bg-'+this._mapClass(t)+' border-0" data-bs-delay="2000" role="alert" aria-live="assertive" aria-atomic="true">\n <div class="d-flex">\n <div class="toast-body">\n '+i+" "+e+'\n </div>\n <button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="'+n.get("close")+'"></button>\n </div>\n </div>',o=document.getElementById("toast-container"),s=document.createElement("template");s.innerHTML=r.trim();const a=s.content.firstChild;o.appendChild(a);const l=new c.y8(a);a.addEventListener("hidden.bs.toast",function(){o.removeChild(a)}),l.show()}question(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t));const i=this._mapClass("info"),r='\n <div class="modal fade" tabindex="-1" role="dialog" data-bs-backdrop="static">\n <div class="modal-dialog modal-sm modal-dialog-centered" role="document">\n <div class="modal-content">\n <div class="modal-status bg-'+i+'"></div>\n <div class="modal-body text-center py-4">\n <i class="fas fa-question fa-3x mb-3 text-'+i+'"></i>\n <h2>'+t+'</h2>\n </div>\n <div class="modal-footer">\n <div class="w-100">\n <div class="row">\n <div class="col"><a href="#" class="question-confirm btn btn-primary w-100" data-bs-dismiss="modal">'+n.get("confirm")+'</a></div>\n <div class="col"><a href="#" class="question-cancel btn w-100" data-bs-dismiss="modal">'+n.get("cancel")+"</a></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ",o=document.body,s=document.createElement("template");s.innerHTML=r.trim();const a=s.content.firstChild;o.appendChild(a),a.querySelector(".question-confirm").addEventListener("click",()=>{e(!0)}),a.querySelector(".question-cancel").addEventListener("click",()=>{e(!1)});const l=new c.aF(a);a.addEventListener("hidden.bs.modal",()=>{o.removeChild(a)}),l.show()}}function x(t,e){t.split(/\s+/).forEach(t=>{e(t)})}class D{constructor(){this._events={}}on(t,e){x(t,t=>{const n=this._events[t]||[];n.push(e),this._events[t]=n})}off(t,e){var n=arguments.length;0!==n?x(t,t=>{if(1===n)return void delete this._events[t];const i=this._events[t];void 0!==i&&(i.splice(i.indexOf(e),1),this._events[t]=i)}):this._events={}}trigger(t,...e){var n=this;x(t,t=>{const i=n._events[t];void 0!==i&&i.forEach(t=>{t.apply(n,e)})})}}const O=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==I(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",L=t=>{if(!A(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach((r,o)=>{r!==t[o-1]?(i(),e+=r,n=1):n++}),i(),e},C=t=>{let e=Array.from(t);return O(e)},A=t=>new Set(t).size!==t.length,M=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),I=t=>t.reduce((t,e)=>Math.max(t,N(e)),0),N=t=>Array.from(t).length,P=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return P(n).forEach(function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)}),e},F=[[0,65535]];let j,R;const $={},H={"/":"",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in H){let e=H[t]||"";for(let n=0;n<e.length;n++){let i=e.substring(n,n+1);$[i]=t}}const q=new RegExp(Object.keys($).join("|")+"|[̀-ͯ·ʾʼ]","gu"),V=(t,e="NFKD")=>t.normalize(e),z=t=>Array.from(t).reduce((t,e)=>t+B(e),""),B=t=>(t=V(t).toLowerCase().replace(q,t=>$[t]||""),V(t,"NFC"));const W=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,r=new RegExp("^"+C(i)+"$","iu");n.match(r)||(i.add(M(n)),e[t]=i)};for(let e of function*(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=z(e);n!=e.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},U=t=>{const e=W(t),n={};let i=[];for(let t in e){let r=e[t];r&&(n[t]=C(r)),t.length>1&&i.push(M(t))}i.sort((t,e)=>e.length-t.length);const r=O(i);return R=new RegExp("^"+r,"u"),n},Y=(t,e=1)=>(e=Math.max(e,t.length-1),O(P(t).map(t=>((t,e=1)=>{let n=0;return t=t.map(t=>(j[t]&&(n+=t.length),j[t]||t)),n>=e?L(t):""})(t,e)))),Z=(t,e=!0)=>{let n=t.length>1?1:0;return O(t.map(t=>{let i=[];const r=e?t.length():t.length()-1;for(let e=0;e<r;e++)i.push(Y(t.substrs[e]||"",n));return L(i)}))},G=(t,e)=>{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.start<n.start&&t.end>n.start)return!0;if(n.start<t.start&&n.end>t.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class K{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new K,i=JSON.parse(JSON.stringify(this.parts)),r=i.pop();for(const t of i)n.add(t);let o=e.substr.substring(0,t-r.start),s=o.length;return n.add({start:r.start,end:r.start+s,length:s,substr:o}),n}}const J=t=>{var e;void 0===j&&(j=U(e||F)),t=z(t);let n="",i=[new K];for(let e=0;e<t.length;e++){let r=t.substring(e).match(R);const o=t.substring(e,e+1),s=r?r[0]:null;let a=[],l=new Set;for(const t of i){const n=t.last();if(!n||1==n.length||n.end<=e)if(s){const n=s.length;t.add({start:e,end:e+n,length:n,substr:s}),l.add("1")}else t.add({start:e,end:e+1,length:1,substr:o}),l.add("2");else if(s){let i=t.clone(e,n);const r=s.length;i.add({start:e,end:e+r,length:r,substr:s}),a.push(i)}else l.add("3")}if(a.length>0){a=a.sort((t,e)=>t.length()-e.length());for(let t of a)G(t,i)||i.push(t)}else if(e>0&&1==l.size&&!l.has("3")){n+=Z(i,!1);let t=new K;const e=i[0];e&&t.add(e.last()),i=[t]}}return n+=Z(i,!0),n},X=(t,e)=>{if(t)return t[e]},Q=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},tt=(t,e,n)=>{var i,r;return t?(t+="",null==e.regex||-1===(r=t.search(e.regex))?0:(i=e.string.length/t.length,0===r&&(i+=.5),i*n)):0},et=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},nt=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},it=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=z(t+"").toLowerCase())>(e=z(e+"").toLowerCase())?1:e>t?-1:0;class rt{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],r=t.split(/\s+/);var o;return n&&(o=new RegExp("^("+Object.keys(n).map(M).join("|")+"):(.*)$")),r.forEach(t=>{let n,r=null,s=null;o&&(n=t.match(o))&&(r=n[1],t=n[2]),t.length>0&&(s=this.settings.diacritics?J(t)||null:M(t),s&&e&&(s="\\b"+s)),i.push({string:t,regex:s?new RegExp(s,"iu"):null,field:r})}),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,r=t.weights,o=i.length,s=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const n=i[0].field;return tt(s(e,n),t,r[n]||1)}:function(t,e){var n=0;if(t.field){const i=s(e,t.field);!t.regex&&i?n+=1/o:n+=tt(i,t,1)}else nt(r,(i,r)=>{n+=tt(s(e,r),t,i)});return n/o};return 1===n?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var i,r=0;for(let n of e){if((i=a(n,t))<=0)return 0;r+=i}return r/n}:function(t){var i=0;return nt(e,e=>{i+=a(e,t)}),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,r=t.options,o=!t.query&&r.sort_empty?r.sort_empty:r.sort;if("function"==typeof o)return o.bind(this);const s=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter(t=>"$score"!==t.field);return n.length?function(t,e){var i,r;for(let o of n){if(r=o.field,i=("desc"===o.direction?-1:1)*it(s(r,t),s(r,e)))return i}return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(et(i,"sort"),et(i,"sort_empty"),i.fields){et(i,"fields");const t=[];i.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1}),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?Q:X}}search(t,e){var n,i,r=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const o=e.score||r._getScoreFunction(i);t.length?nt(r.items,(t,r)=>{n=o(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:r})}):nt(r.items,(t,e)=>{i.items.push({score:1,id:e})});const s=r._getSortFunction(i);return s&&i.items.sort(s),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const ot=t=>null==t?null:st(t),st=t=>"boolean"==typeof t?t?"1":"0":t+"",at=t=>(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),lt=(t,e)=>{var n;return function(i,r){var o=this;n&&(o.loading=Math.max(o.loading-1,0),clearTimeout(n)),n=setTimeout(function(){n=null,o.loadedSearches[i]=!0,t.call(o,i,r)},e)}},ct=(t,e,n)=>{var i,r=t.trigger,o={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return r.apply(t,arguments);o[n]=arguments},n.apply(t,[]),t.trigger=r,e))i in o&&r.apply(t,o[i])},ut=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},dt=(t,e,n,i)=>{t.addEventListener(e,n,i)},ht=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),pt=(t,e)=>{const n=t.getAttribute("id");return n||(t.setAttribute("id",e),e)},mt=t=>t.replace(/[\\"']/g,"\\$&"),ft=(t,e)=>{e&&t.append(e)},gt=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},vt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(yt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},yt=t=>"string"==typeof t&&t.indexOf("<")>-1,bt=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},_t=(t,e)=>{Object.assign(t.style,e)},wt=(t,...e)=>{var n=Tt(e);(t=Et(t)).map(t=>{n.map(e=>{t.classList.add(e)})})},kt=(t,...e)=>{var n=Tt(e);(t=Et(t)).map(t=>{n.map(e=>{t.classList.remove(e)})})},Tt=t=>{var e=[];return gt(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},Et=t=>(Array.isArray(t)||(t=[t]),t),St=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},xt=(t,e=0)=>e>0?t[t.length-1]:t[0],Dt=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},Ot=(t,e)=>{gt(e,(e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)})},Lt=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},Ct=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>3===t.nodeType?(t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var r=t.splitText(n.index);r.splitText(n[0].length);var o=r.cloneNode(!0);return i.appendChild(o),Lt(r,i),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach(t=>{n(t)})})(t),0);n(t)},At="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var Mt={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,clearAfterSelect:!1,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function It(t,e){var n=Object.assign({},Mt,e),i=n.dataAttr,r=n.labelField,o=n.valueField,s=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null};return"select"===u?(()=>{var e,u=h.options,d={},p=1;let m=0;var f=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},g=(t,e)=>{var i=ot(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(d.hasOwnProperty(i)){if(e){var l=d[i][a];l?Array.isArray(l)?l.push(e):d[i][a]=[l,e]:d[i][a]=e}}else{var c=f(t);c[r]=c[r]||t.textContent,c[o]=c[o]||i,c[s]=c[s]||t.disabled,c[a]=c[a]||e,c.$option=t,c.$order=c.$order||++m,d[i]=c,u.push(c)}t.selected&&h.items.push(i)}};h.maxItems=t.hasAttribute("multiple")?null:1,gt(t.children,t=>{var n,i,r;"optgroup"===(e=t.tagName.toLowerCase())?((r=f(n=t))[l]=r[l]||n.getAttribute("label")||"",r[c]=r[c]||p++,r[s]=r[s]||n.disabled,r.$order=r.$order||++m,h.optgroups.push(r),i=r[c],gt(n.children,t=>{g(t,i)})):"option"===e&&g(t)})})():(()=>{const e=t.getAttribute(i);if(e)h.options=JSON.parse(e),gt(h.options,t=>{h.items.push(t[o])});else{var s=t.value.trim()||"";if(!n.allowEmptyOption&&!s.length)return;const e=s.split(n.delimiter);gt(e,t=>{const e={};e[r]=t,e[o]=t,h.options.push(e)}),h.items=e}})(),Object.assign({},Mt,h,e)}var Nt=0;class Pt extends(function(t){return t.plugins={},class extends t{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,r=[];if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?r.push(t):(i.plugins.settings[t.name]=t.options,r.push(t.name))});else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],r.push(e));for(;n=r.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,r=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=r.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}(D)){constructor(t,e){var n;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Nt++;var i=vt(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const r=It(i,e);this.settings=r,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=pt(i,"tomselect-"+Nt),this.isRequired=i.required,this.sifter=new rt(this.options,{diacritics:r.diacritics}),r.mode=r.mode||(1===r.maxItems?"single":"multi"),"boolean"!=typeof r.hideSelected&&(r.hideSelected="multi"===r.mode),"boolean"!=typeof r.hidePlaceholder&&(r.hidePlaceholder="multi"!==r.mode);var o=r.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?r.createFilter=t=>o.test(t):r.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(r.plugins),this.setupCallbacks(),this.setupTemplates();const s=vt("<div>"),a=vt("<div>"),l=this._render("dropdown"),c=vt('<div role="listbox" tabindex="-1">'),u=this.input.getAttribute("class")||"",d=r.mode;var h;if(wt(s,r.wrapperClass,u,d),wt(a,r.controlClass),ft(s,a),wt(l,r.dropdownClass,d),r.copyClassesToDropdown&&wt(l,u),wt(c,r.dropdownContentClass),ft(l,c),vt(r.dropdownParent||s).appendChild(l),yt(r.controlInput)){h=vt(r.controlInput);gt(["autocorrect","autocapitalize","autocomplete","spellcheck","aria-label"],t=>{i.getAttribute(t)&&Ot(h,{[t]:i.getAttribute(t)})}),h.tabIndex=-1,a.appendChild(h),this.focus_node=h}else r.controlInput?(h=vt(r.controlInput),this.focus_node=h):(h=vt("<input/>"),this.focus_node=a);this.wrapper=s,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,r=t.dropdown_content,o=t.wrapper,s=t.control,a=t.input,l=t.focus_node,c={passive:!0},u=t.inputId+"-ts-dropdown";Ot(r,{id:u}),Ot(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=pt(l,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",p=document.querySelector(h),m=t.focus.bind(t);if(p){dt(p,"click",m),Ot(p,{for:d});const e=pt(p,t.inputId+"-ts-label");Ot(l,{"aria-labelledby":e}),Ot(r,{"aria-labelledby":e})}if(o.style.width=a.style.width,o.style.minWidth=a.style.minWidth,o.style.maxWidth=a.style.maxWidth,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");wt([o,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&Ot(a,{multiple:"multiple"}),e.placeholder&&Ot(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+M(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=lt(e.load,e.loadThrottle)),dt(i,"mousemove",()=>{t.ignoreHover=!1}),dt(i,"mouseenter",e=>{var n=St(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)},{capture:!0}),dt(i,"click",e=>{const n=St(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),ut(e,!0))}),dt(s,"click",e=>{var i=St(e.target,"[data-ts-item]",s);i&&t.onItemSelect(e,i)?ut(e,!0):""==n.value&&(t.onClick(),ut(e,!0))}),dt(l,"keydown",e=>t.onKeyDown(e)),dt(n,"keypress",e=>t.onKeyPress(e)),dt(n,"input",e=>t.onInput(e)),dt(l,"blur",e=>t.onBlur(e)),dt(l,"focus",e=>t.onFocus(e)),dt(n,"paste",e=>t.onPaste(e));const f=e=>{const r=e.composedPath()[0];if(!o.contains(r)&&!i.contains(r))return t.isFocused&&t.blur(),void t.inputState();r==n&&t.isOpen?e.stopPropagation():ut(e,!0)},g=()=>{t.isOpen&&t.positionDropdown()},v=()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())};dt(a,"invalid",v),dt(document,"mousedown",f),dt(window,"scroll",g,c),dt(window,"resize",g,c),this._destroy=()=>{a.removeEventListener("invalid",v),document.removeEventListener("mousedown",f),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),wt(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),gt(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'<div class="optgroup-header">'+e(t[n])+"</div>",option:(t,n)=>"<div>"+n(t[e])+"</div>",item:(t,n)=>"<div>"+n(t[e])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?It(e.input,{delimiter:e.settings.delimiter,allowEmptyOption:e.settings.allowEmptyOption}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){bt(this.input,"input"),bt(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?ut(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);gt(n,t=>{ot(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void ut(t)):void 0}ut(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&ut(t);else{switch(t.keyCode){case 65:if(ht(At,t)&&""==e.control_input.value)return ut(t),void e.selectAll();break;case 27:return e.isOpen&&(ut(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void ut(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void ut(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),ut(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&ut(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),ut(t)):e.settings.create&&e.createItem()&&ut(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ht(At,t)&&ut(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))(()=>{this.refreshTimeout=null,this._onInput()},this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void ut(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,()=>{i.settings.closeAfterSelect?i.close():i.settings.clearAfterSelect&&i.setTextboxValue()}):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect?i.close():i.settings.clearAfterSelect&&i.setTextboxValue(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(ut(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;wt(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||kt(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,bt(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){ct(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,r,o,s,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&ht("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(r=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(s=r,r=o,o=s),i=r;i<=o;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);ut(e)}else"click"===n&&ht(At,e)||"keydown"===n&&ht("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&kt(n,"last-active"),wt(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),kt(t,"active")}clearActiveItems(){kt(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,Ot(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),Ot(t,{"aria-selected":"true"}),wt(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,r=n.scrollTop||0,o=t.offsetHeight,s=t.getBoundingClientRect().top-n.getBoundingClientRect().top+r;s+o>i+r?this.scroll(s-i+o,e):s<r&&this.scroll(s,e)}scroll(t,e){const n=this.dropdown_content;e&&(n.style.scrollBehavior=e),n.scrollTop=t,n.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(kt(this.activeOption,"active"),Ot(this.activeOption,{"aria-selected":null})),this.activeOption=null,Ot(this.focus_node,{"aria-activedescendant":null})}selectAll(){const t=this;if("single"===t.settings.mode)return;const e=t.controlChildren();e.length&&(t.inputState(),t.close(),t.activeItems=e,gt(e,e=>{t.setActiveItemClass(e)}))}inputState(){var t=this;t.control.contains(t.control_input)&&(Ot(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&Ot(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,r=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,/(.)\1{15,}/.test(t)&&(t=""),e=i.sifter.search(t,Object.assign(r,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=ot(t.id);return!(null!==e&&-1!==i.items.indexOf(e))})),e}refreshOptions(t=!0){var e,n,i,r,o,s,a,l,c,u;const d={},h=[];var p=this,m=p.inputValue();const f=m===p.lastQuery||""==m&&null==p.lastQuery;var g=p.search(m),v=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;f&&(v=p.activeOption)&&(c=v.closest("[data-group]")),r=g.items.length,"number"==typeof p.settings.maxOptions&&(r=Math.min(r,p.settings.maxOptions)),r>0&&(y=!0);const _=(t,e)=>{let n=d[t];if(void 0!==n){let t=h[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e<r;e++){let t=g.items[e];if(!t)continue;let r=t.id,a=p.options[r];if(void 0===a)continue;let l=st(r),u=p.getOption(l,!0);for(p.settings.hideSelected||u.classList.toggle("selected",p.items.includes(l)),o=a[p.settings.optgroupField]||"",n=0,i=(s=Array.isArray(o)?o:[o])&&s.length;n<i;n++){o=s[n];let t=a.$order,e=p.optgroups[o];var w;if(void 0===e&&"function"==typeof p.settings.optionGroupRegister)(w=p.settings.optionGroupRegister.apply(p,[o]))&&p.registerOptionGroup(w);e=p.optgroups[o],void 0===e?o="":t=e.$order;const[i,l]=_(o,t);n>0&&(u=u.cloneNode(!0),Ot(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),kt(u,"active"),p.activeOption&&p.activeOption.dataset.value==r&&c&&c.dataset.group===o.toString()&&(v=u)),l.appendChild(u),""!=o&&(d[o]=i)}}var k;p.settings.lockOptgroupOrder&&h.sort((t,e)=>t.order-e.order),a=document.createDocumentFragment(),gt(h,t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=p.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);ft(t,n),ft(t,e);let r=p.render("optgroup",{group:i,options:t});ft(a,r)}else ft(a,e)}),b.innerHTML="",ft(b,a),p.settings.highlight&&(k=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(k,function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}),g.query.length&&g.tokens.length&&gt(g.tokens,t=>{Ct(b,t.regex)}));var T=t=>{let e=p.render(t,{input:m});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?T("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&T("no_results"):T("not_loading"),(l=p.canCreate(m))&&(u=T("option_create")),p.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;u&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else u&&(v=u);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=ot(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){gt(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=ot(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,r;const o=ot(t),s=ot(e[n.settings.valueField]);if(null===o)return;const a=n.options[o];if(null==a)return;if("string"!=typeof s)throw new Error("Value must be set in option data");const l=n.getOption(o),c=n.getItem(o);if(e.$order=e.$order||a.$order,delete n.options[o],n.uncacheValue(s),n.options[s]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);Lt(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}c&&(-1!==(r=n.items.indexOf(o))&&n.items.splice(r,1,s),i=n._render("item",e),c.classList.contains("active")&&wt(i,"active"),Lt(c,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=st(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};gt(this.options,(t,i)=>{e(t,i)&&(n[i]=t)}),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=ot(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i;if(!t)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n<i.length;n++)if(i[n]==t)return e>0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=ot(t);return null!==e?this.control.querySelector(`[data-value="${mt(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const r=(i=i.filter(t=>-1===n.items.indexOf(t)))[i.length-1];i.forEach(t=>{n.isPending=t!==r,n.addItem(t,e)})}addItem(t,e){ct(this,e?[]:["change","dropdown_close"],()=>{var n,i;const r=this,o=r.settings.mode,s=ot(t);if((!s||-1===r.items.indexOf(s)||("single"===o&&r.close(),"single"!==o&&r.settings.duplicates))&&null!==s&&r.options.hasOwnProperty(s)&&("single"===o&&r.clear(e),"multi"!==o||!r.isFull())){if(n=r._render("item",r.options[s]),r.control.contains(n)&&(n=n.cloneNode(!0)),i=r.isFull(),r.items.splice(r.caretPos,0,s),r.insertAtCaret(n),r.isSetup){if(!r.isPending&&r.settings.hideSelected){let t=r.getOption(s),e=r.getAdjacent(t,1);e&&r.setActiveOption(e)}r.settings.clearAfterSelect&&r.setTextboxValue(),r.isPending||r.settings.closeAfterSelect||r.refreshOptions(r.isFocused&&"single"!==o),0!=r.settings.closeAfterSelect&&r.isFull()?r.close():r.isPending||r.positionDropdown(),r.trigger("item_add",s,n),r.isPending||r.updateOriginalInput({silent:e})}(!r.isPending||!i&&r.isFull())&&(r.inputState(),r.refreshState())}})}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,r;const o=t.dataset.value;i=Dt(t),t.remove(),t.classList.contains("active")&&(r=n.activeItems.indexOf(t),n.activeItems.splice(r,1),kt(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(o)&&n.removeOption(o,e),i<n.caretPos&&n.setCaret(n.caretPos-1),n.updateOriginalInput({silent:e}),n.refreshState(),n.positionDropdown(),n.trigger("item_remove",o,t)}createItem(t=null,e=()=>{}){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,r=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t)){return ot(t)&&this.options[t]&&i.addItem(t),e(),!1}i.lock();var o=!1,s=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=ot(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(r),i.addItem(n),e(t),o=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,s):{[i.settings.labelField]:t,[i.settings.valueField]:t},o||s(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;var r;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(r=t.options,0===Object.keys(r).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const r=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],s=e.input.querySelectorAll("option:checked").length;function a(t,n,i){return t||(t=vt('<option value="'+at(n)+'">'+at(i)+"</option>")),t!=r&&e.input.append(t),o.push(t),(t!=r||s>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==e.items.length&&"single"==e.settings.mode?a(r,"",""):e.items.forEach(t=>{if(n=e.options[t],i=n[e.settings.labelField]||"",o.includes(n.$option)){a(e.input.querySelector(`option[value="${mt(t)}"]:not(:checked)`),t,i)}else n.$option=a(n.$option,t,i)})}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,Ot(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),_t(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),_t(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,Ot(e.focus_node,{"aria-expanded":"false"}),_t(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;_t(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();gt(n,t=>{e.removeItem(t,!0)}),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,r,o,s=this;e=t&&8===t.keyCode?-1:1,n={start:(o=s.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(s.activeItems.length)r=xt(s.activeItems,e),i=Dt(r),e>0&&i++,gt(s.activeItems,t=>a.push(t));else if((s.isFocused||"single"===s.settings.mode)&&s.items.length){const t=s.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[s.caretPos-1]:e>0&&n.start===s.inputValue().length&&(i=t[s.caretPos]),void 0!==i&&a.push(i)}if(!s.shouldDelete(a,t))return!1;for(ut(t,!0),void 0!==i&&s.setCaret(i);a.length;)s.removeItem(a.pop());return s.inputState(),s.positionDropdown(),s.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map(t=>t.dataset.value);return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.call(this,n,e))}advanceSelection(t,e){var n,i,r=this;r.rtl&&(t*=-1),r.inputValue().length||(ht(At,e)||ht("shiftKey",e)?(i=(n=r.getLastActive(t))?n.classList.contains("active")?r.getAdjacent(n,t,"item"):n:t>0?r.control_input.nextElementSibling:r.control_input.previousElementSibling)&&(i.classList.contains("active")&&r.removeActiveItem(n),r.setActiveItemClass(i)):r.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?xt(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,kt(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const r=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=r.settings.render[t].call(this,e,at)))return null;if(i=vt(i),"option"===t||"option_create"===t?e[r.settings.disabledField]?Ot(i,{"aria-disabled":"true"}):Ot(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[r.settings.optgroupValueField],Ot(i,{"data-group":n}),e.group[r.settings.disabledField]&&Ot(i,{"data-disabled":""})),"option"===t||"item"===t){const n=st(e[r.settings.valueField]);Ot(i,{"data-value":n}),"item"===t?(wt(i,r.settings.itemClass),Ot(i,{"data-ts-item":""})):(wt(i,r.settings.optionClass),Ot(i,{role:"option",id:e.$id}),e.$div=i,r.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){gt(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,r=i[e];i[e]=function(){var e,o;return"after"===t&&(e=r.apply(i,arguments)),o=n.apply(i,arguments),"instead"===t?o:("before"===t&&(e=r.apply(i,arguments)),e)}}}const Ft=t=>"boolean"==typeof t?t?"1":"0":t+"",jt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Rt=t=>"string"==typeof t&&t.indexOf("<")>-1;const $t=t=>"string"==typeof t&&t.indexOf("<")>-1;const Ht=(t,e,n,i)=>{t.addEventListener(e,n,i)},qt=t=>"string"==typeof t&&t.indexOf("<")>-1,Vt=(t,e)=>{((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(e,(e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)})};const zt=t=>"string"==typeof t&&t.indexOf("<")>-1;const Bt=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},Wt=t=>(Array.isArray(t)||(t=[t]),t);const Ut=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Yt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},Yt=t=>"string"==typeof t&&t.indexOf("<")>-1,Zt=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},Gt=t=>(Array.isArray(t)||(t=[t]),t);const Kt=(t,e,n,i)=>{t.addEventListener(e,n,i)};const Jt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Xt=(t,e,n,i)=>{t.addEventListener(e,n,i)},Qt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(te(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},te=t=>"string"==typeof t&&t.indexOf("<")>-1;const ee=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},ne=t=>(Array.isArray(t)||(t=[t]),t);Pt.define("change_listener",function(){var t,e,n,i;t=this.input,e="change",n=()=>{this.sync()},t.addEventListener(e,n,i)}),Pt.define("checkbox_options",function(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var r=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},o=function(t){setTimeout(()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&r(e,t.classList.contains("selected"))},1)};e.hook("after","setupTemplates",()=>{var t=e.settings.render.option;e.settings.render.option=(n,o)=>{var s=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Rt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(t.call(e,n,o)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",function(t){jt(t)}),a.type="checkbox";const l=null==(c=n[e.settings.valueField])?null:Ft(c);var c;return r(a,!!(l&&e.items.indexOf(l)>-1)),s.prepend(a),s}}),e.on("item_remove",t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),o(n))}),e.on("item_add",t=>{var n=e.getOption(t);n&&o(n)}),e.hook("instead","onOptionSelect",(t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void jt(t,!0);n.call(e,t,i),o(i)})}),Pt.define("clear_button",function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",role:"button",tabindex:0,html:t=>`<div class="${t.className}" title="${t.title}" role="${t.role}" tabindex="${t.tabindex}">&times;</div>`},t);e.on("initialize",()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if($t(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n));t.addEventListener("click",t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),e.refreshOptions(!1),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}),Pt.define("drag_drop",function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,r=!0;t.hook("after","setupTemplates",()=>{var e=t.settings.render.item;t.settings.render.item=(n,o)=>{const s=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(qt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(e.call(t,n,o));Vt(s,{draggable:"true"});const a=t=>{t.preventDefault(),s.classList.add("ts-drag-over"),l(s,i)},l=(t,e)=>{var n,i,r;void 0!==e&&(((t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,s)?(i=e,null==(r=(n=t).parentNode)||r.insertBefore(i,n.nextSibling)):((t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)})(t,e))};return Ht(s,"mousedown",t=>{r||((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t),t.stopPropagation()}),Ht(s,"dragstart",t=>{i=s,setTimeout(()=>{s.classList.add("ts-dragging")},0)}),Ht(s,"dragenter",a),Ht(s,"dragover",a),Ht(s,"dragleave",()=>{s.classList.remove("ts-drag-over")}),Ht(s,"dragend",()=>{var e;document.querySelectorAll(".ts-drag-over").forEach(t=>t.classList.remove("ts-drag-over")),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach(t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}}),t.setValue(n)}),s}}),t.hook("instead","lock",()=>(r=!1,e.call(t))),t.hook("instead","unlock",()=>(r=!0,n.call(t)))}),Pt.define("dropdown_header",function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">&times;</a></div></div>'},t);e.on("initialize",()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(zt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",t=>{((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}),Pt.define("caret_position",function(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach((n,i)=>{i<e?t.control_input.insertAdjacentElement("beforebegin",n):t.control.appendChild(n)}):e=t.items.length,t.caretPos=e}),t.hook("instead","moveCaret",e=>{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n})(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),((t,...e)=>{var n=Bt(e);(t=Wt(t)).map(t=>{n.map(e=>{t.classList.remove(e)})})})(n,"last-active")}else t.setCaret(t.caretPos+e)})}),Pt.define("dropdown_input",function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{var e;t.focus_node=t.control,((t,...e)=>{var n=Zt(e);(t=Gt(t)).map(t=>{n.map(e=>{t.classList.add(e)})})})(t.control_input,"dropdown-input");const n=Ut('<div class="dropdown-input-wrap">');n.append(t.control_input),t.dropdown.insertBefore(n,t.dropdown.firstChild);const i=Ut('<input class="items-placeholder" tabindex="-1" />');i.placeholder=t.settings.placeholder||"",t.control.append(i);const r=null==(e=t.input)?void 0:e.getAttribute("aria-label");r&&i.setAttribute("aria-label",r)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case 27:return t.isOpen&&(((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(e,!0),t.close()),void t.clearActiveItems();case 9:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});const e=t.onBlur;var n,i,r,o;t.hook("instead","onBlur",n=>{if(!n||n.relatedTarget!=t.control_input)return e.call(t)}),n=t.control_input,i="blur",r=()=>t.onBlur(),n.addEventListener(i,r,o),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}),Pt.define("input_autogrow",function(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),n=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);for(const t of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])e.style[t]=n.style[t];var i=()=>{e.textContent=n.value,n.style.width=e.clientWidth+"px"};i(),t.on("update item_add item_remove",i),Kt(n,"input",i),Kt(n,"keyup",i),Kt(n,"blur",i),Kt(n,"update",i)})}),Pt.define("no_backspace_delete",function(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",n=>!!t.activeItems.length&&e.call(t,n))}),Pt.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),Pt.define("optgroup_columns",function(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",n=>{var i,r,o,s;if(!t.isOpen||37!==n.keyCode&&39!==n.keyCode)return e.call(t,n);t.ignoreHover=!0,s=((t,e)=>{for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}})(t.activeOption,"[data-group]"),i=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n})(t.activeOption,"[data-selectable]"),s&&(s=37===n.keyCode?s.previousSibling:s.nextSibling)&&(r=(o=s.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,i)])&&t.setActiveOption(r)})}),Pt.define("remove_button",function(t){const e=Object.assign({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=this;if(e.append){var i='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+((e.title+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")+'">')+e.label+"</a>";n.hook("after","setupTemplates",()=>{var t=n.settings.render.item;n.settings.render.item=(e,r)=>{var o=Qt(t.call(n,e,r)),s=Qt(i);return o.appendChild(s),Xt(s,"mousedown",t=>{Jt(t,!0)}),Xt(s,"click",t=>{n.isLocked||(Jt(t,!0),n.isLocked||n.shouldDelete([o],t)&&(n.removeItem(o),n.refreshOptions(!1),n.inputState()))}),o}})}}),Pt.define("restore_on_backspace",function(t){const e=this,n=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",function(t){if(e.isFocused&&""===e.control_input.value.trim()){var i=e.options[t];i&&e.setTextboxValue(n.text.call(e,i))}})}),Pt.define("virtual_scroll",function(){const t=this,e=t.canLoad,n=t.clearActiveOption,i=t.loadCallback;var r,o,s={},a=!1,l=[];if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(r.clientHeight/(r.scrollHeight-r.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const c=e=>!("number"==typeof t.settings.maxOptions&&r.children.length>=t.settings.maxOptions)&&!(!(e in s)||!s[e]),u=(e,n)=>t.items.indexOf(n)>=0||l.indexOf(n)>=0;t.setNextUrl=(t,e)=>{s[t]=e},t.getUrl=e=>{if(e in s){const t=s[e];return s[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{s={}},t.hook("instead","clearActiveOption",()=>{if(!a)return n.call(t)}),t.hook("instead","canLoad",n=>n in s?c(n):e.call(t,n)),t.hook("instead","loadCallback",(e,n)=>{if(a){if(o){const n=e[0];void 0!==n&&(o.dataset.value=n[t.settings.valueField])}}else t.clearOptions(u);i.call(t,e,n),a=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var n;c(e)?(n=t.render("loading_more",{query:e}))&&(n.setAttribute("data-selectable",""),o=n):e in s&&!r.querySelector(".no-results")&&(n=t.render("no_more_results",{query:e})),n&&(((t,...e)=>{var n=ee(e);(t=ne(t)).map(t=>{n.map(e=>{t.classList.add(e)})})})(n,t.settings.optionClass),r.append(n))}),t.on("initialize",()=>{l=Object.keys(t.options),r=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},t.settings.render),r.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&c(t.lastValue)&&(a||(a=!0,t.load.call(t,t.lastValue)))})})});var ie=Pt;class re extends h{getRenderer(t){let e={option_create:(t,e)=>{const n=e(t.input);if(n.length<3)return null;return'<div class="create">'+this.translate("select.search.create").replace("%input%","<strong>"+n+"</strong>")+"</div>"},no_results:(t,e)=>'<div class="no-results">'+this.translate("select.search.notfound").replace("%input%","<strong>"+e(t.input)+"</strong>")+"</div>"};return e="color"===t?{...e,option:function(t,e){let n='<div class="list-group-item border-0 p-1 ps-2 text-nowrap">';return void 0!==t.color&&(n+='<span style="background-color:'+t.color+'" class="color-choice-item me-2">&nbsp;</span>'),n+=e(t.text)+"</div>",n},item:function(t,e){let n='<div class="text-nowrap">';return void 0!==t.color&&(n+='<span style="background-color:'+t.color+'" class="color-choice-item me-2">&nbsp;</span>'),n+=e(t.text)+"</div>",n}}:{...e,option:function(t,e){let n=t.text;return n=null===n||""===n.trim()?"&nbsp;":e(n),"<div>"+n+"</div>"}},e}}class oe extends re{init(){this.selector='[data-form-widget="autocomplete"]'}supportsForm(t){return!0}loadData(t,e,n){this.getContainer().getPlugin("api").get(t,{name:e},t=>{let e=[];for(let n of t)e.push({text:n.name,value:n.name});n(e)},()=>{n()})}activateForm(t){[].slice.call(t.querySelectorAll(this.selector)).map(t=>{const e=t.dataset.autocompleteUrl;let n=3;void 0!==t.dataset.minimumCharacter&&(n=parseInt(t.dataset.minimumCharacter));let i={onItemAdd:function(){this.setTextboxValue("")},maxOptions:500,create:void 0!==t.dataset.create,onOptionAdd:e=>{t.dispatchEvent(new CustomEvent("create",{detail:{value:e}}))},plugins:["remove_button"],shouldLoad:function(t){return t.length>=n},load:(t,n)=>{this.loadData(e,t,n)}};const r=void 0!==t.dataset.renderer?t.dataset.renderer:"default";i.render={not_loading:(t,e)=>{},...this.getRenderer(r)},new ie(t,i)})}destroyForm(t){[].slice.call(t.querySelectorAll(this.selector)).map(t=>{t.tomselect&&t.tomselect.destroy()})}}class se extends re{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"];const n=void 0!==t.multiple&&!0===t.multiple,i=void 0!==t.required&&!0===t.required;i&&e.push("no_backspace_delete"),n&&e.push("remove_button"),void 0!==t.dataset.order&&"1"===t.dataset.order&&e.push("drag_drop");let r={onItemAdd:function(){this.setTextboxValue("")},lockOptgroupOrder:!0,allowEmptyOption:!i,hidePlaceholder:!1,plugins:e,maxOptions:500,sortField:[{field:"$order"},{field:"$score"}],dropdownParent:"body",onOptionAdd:e=>{t.dispatchEvent(new CustomEvent("create",{detail:{value:e}}))}};const o=void 0!==t.dataset.renderer?t.dataset.renderer:"default";r.render={...this.getRenderer(o)},r=void 0!==t.dataset.create?{...r,persist:!0,create:!0}:{...r,persist:!1,create:!1},void 0!==t.dataset.disableSearch&&(r={...r,controlInput:null});const s=new ie(t,r);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 r=i.value;for(let t=0;t<i.options.length;t++)""===i.options[t].value&&(n=i.options[t]);i.options.length=0,null!==n&&i.appendChild(this._createOption(n.text,""));let o=[],s=[],a=null;void 0!==i.dataset&&void 0!==i.dataset.optionPattern&&(a=i.dataset.optionPattern),null!==a&&""!==a||(a="{name}");for(const[t,n]of Object.entries(e)){if("__empty__"===t){for(const t of n)o.push(this._createOption(this._getTitleFromPattern(a,t),t.id));continue}let e=this._createOptgroup(t);for(const t of n)e.appendChild(this._createOption(this._getTitleFromPattern(a,t),t.id));s.push(e)}s.forEach(t=>i.appendChild(t));const l=this._createOptgroup("");if(o.forEach(t=>l.appendChild(t)),i.appendChild(l),i.value=r,""===i.value||null===i.value){const t=i.options,e=t.length;let r="";1===e&&void 0===i.dataset.autoselect?r=t[0].value:2===e&&null!==n&&(r=t[1].value),""!==r&&(i.value=r)}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 r=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)),r=r.replace(new RegExp("{"+t+"}","g"),i??"")}r=r.replace(/- \?-\?/,""),r=r.replace(/\r\n|\r|\n/g," "),r=r.substring(0,110);let s=0,a=r.length;for(;s<a&&"- ".indexOf(r[s])>=0;)++s;for(;a>s&&"- ".indexOf(r[a-1])>=0;)--a;let l=s>0||a<r.length?r.substring(s,a):r;return""===l&&void 0!==e.name?e.name:l}addOption(t,e,n,i){const r=this._createOption(e,n);for(const t in i)r.dataset[t]=i[t];t.options.add(r),void 0!==t.tomselect&&t.tomselect.sync()}removeOption(t,e){e.remove(),void 0!==t.tomselect&&(t.tomselect.removeOption(e.value,!0),t.tomselect.clear(!0))}_createOption(t,e){let n=document.createElement("option");return n.innerText=t,n.value=e,n}_createOptgroup(t){let e=document.createElement("optgroup");return e.label=t,e}_activateApiSelects(t){void 0===this._eventHandlerApiSelects&&(this._eventHandlerApiSelects=e=>{if(null===e.target||!e.target.matches(t))return;const n=e.target,i="#"+n.dataset.relatedSelect,r=document.getElementById(n.dataset.relatedSelect);if(null===r||"1"===r.dataset.reloading)return;r.dataset.reloading="1",void 0!==r.tomselect&&r.tomselect.disable(),r.disabled=!0;let o=n.dataset.formPrefix;null==o?o="":o.length>0&&(o+="_");let s=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(r.dataset.reloading="0");s=this._buildUrlWithFormFields(n.dataset.emptyUrl,o)}this.getContainer().getPlugin("api").get(s,{},t=>{this._updateSelect(i,t),void 0!==r.tomselect&&r.tomselect.enable(),r.dataset.reloading="0",r.disabled=!1})},document.addEventListener("change",this._eventHandlerApiSelects))}_buildUrlWithFormFields(t,e){let n=t;return t.split("?")[1].split("&").forEach(t=>{const[i,r]=t.split("="),o=decodeURIComponent(r).match(/%(.*)%/);if(null!==o){const i=o[1],s=(e+i).replace(/\[/,"").replace(/]/,""),a=document.getElementById(s);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 r=this.getDateUtils().fromFormat(l.trim()+" "+n.trim(),a.dataset.format+" "+i);l=this.getDateUtils().formatForAPI(r,!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(r,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 ae extends s{getId(){return"form"}activateForm(t){[].slice.call(document.querySelectorAll(t)).map(t=>{for(const e of this.getContainer().getPlugins())e instanceof h&&e.supportsForm(t)&&e.activateForm(t)})}destroyForm(t){[].slice.call(document.querySelectorAll(t)).map(t=>{for(const e of this.getContainer().getPlugins())e instanceof h&&e.supportsForm(t)&&e.destroyForm(t)})}convertFormDataToQueryString(t,e={},n=!1){let i=[],r=new FormData(t);for(const t in e)r.set(t,e[t]);for(let t of r)n&&""===t[1]||i.push(encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]));return i.join("&")}}class le extends s{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 r=null;"submit"===e.type&&void 0!==e.form&&(r=e.form),void 0!==n.question&&this.getContainer().getPlugin("alert").question(n.question,function(t){t&&(null===r?document.location=i:(null!==i&&(r.action=i),r.submit()))}),t.preventDefault(),t.stopPropagation()}e=e.parentNode}})}}class ce extends s{getId(){return"datatable-batch-action"}init(){if(0===document.getElementsByClassName("multi_update_all").length)return;const t=document.querySelector("div.page-body");t.addEventListener("change",t=>{t.target.matches(".multi_update_all")?(this.toggle(t.target.checked,t.target.closest("table")),t.stopPropagation()):t.target.matches(".multi_update_single")&&(this._toggleDatatable(t.target.closest("table")),t.stopPropagation())}),t.addEventListener("click",t=>{if(t.target.matches(".multi_update_table_action")){const e=t.target,n=e.form,i=n.querySelector(".multi_update_ids").value.split(","),r=n.dataset.question.replace(/%action%/,e.textContent).replace(/%count%/,i.length.toString());this.getPlugin("alert").question(r,function(t){t&&(n.action=e.dataset.href,n.submit())})}})}toggle(t,e){for(const n of e.querySelectorAll(".multi_update_single"))n.checked=t;this._toggleDatatable(e)}toggleAll(t){for(const e of document.querySelectorAll(".multi_update_all"))this._toggleAll(t,e)}toggleByName(t,e){for(const n of document.querySelectorAll("#multi_update_all_"+e))this._toggleAll(t,n)}_toggleAll(t,e){e.checked=t,this.toggle(t,e.closest("table"))}_toggleDatatable(t){const e=t.closest("div.card.data_table");let n=[];for(const e of t.querySelectorAll("input.multi_update_single:checked"))n.push(e.value);if(e.querySelector(".multi_update_ids").value=n.join(","),n.length>0){for(const t of e.querySelectorAll(".multi_update_form_hide"))t.style.setProperty("display","none","important");e.querySelector("form.multi_update_form").style.display=null}else{e.querySelector("form.multi_update_form").style.setProperty("display","none","important");for(const t of e.querySelectorAll(".multi_update_form_hide"))t.style.display=null}}}class ue extends s{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?i.c9.now():e instanceof Date?i.c9.fromJSDate(e):i.c9.fromISO(e),n.toFormat(this._parseFormat(t),{locale:"en-us"})}getFormattedDate(t){return this.format(this._parseFormat(this.dateFormat),t)}formatForAPI(t,e=!1){return t instanceof Date&&(t=i.c9.fromJSDate(t)),void 0!==e&&e||(t=t.toUTC()),t.toISO({includeOffset:!1,suppressMilliseconds:!0})}fromFormat(t,e){return i.c9.fromFormat(t,this._parseFormat(e),{locale:"en-us"})}fromHtml5Input(t,e){return e=e??"",""===(t=t??"")&&""===e?i.c9.invalid("Empty date and time given"):(""!==t&&""!==e&&(t=t+"T"+e),i.c9.fromISO(t))}isValidDateTime(t,e){return this.fromFormat(t,e).isValid}addHumanDuration(t,e){let n=null;if(t instanceof Date)n=i.c9.fromJSDate(t);else{if(!(t instanceof i.c9))throw"addHumanDuration() needs a JS Date";n=t}const r=i.c9.fromISO(e),o=i.c9.now().startOf("day"),s=r.diff(o);return n.plus(s).toJSDate()}formatDuration(t){let e=null;return e="string"==typeof t?i.c9.now().diff(i.c9.fromISO(t)):i.dw.fromISO("PT"+(null===t?0:t)+"S"),this.formatLuxonDuration(e)}formatSeconds(t){return this.formatLuxonDuration(i.dw.fromObject({seconds:t}))}formatLuxonDuration(t){return t=t.shiftTo("hours","minutes","seconds"),this.formatAsDuration(t.hours,t.minutes)}formatTime(t,e=!1){let n=i.c9.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 i.dw({seconds:0});let e=null;if(-1!==(t=t.trim().toUpperCase()).indexOf(":")){const n=t.match(/(?:(\d+):)?(\d+)(?::(\d+))?/),r=parseInt(n?.[1]||0,10),o=parseInt(n?.[2]||0,10),s=parseInt(n?.[3]||0,10);e=i.dw.fromObject({hours:r,minutes:o,seconds:s})}else if(-1!==t.indexOf(".")||-1!==t.indexOf(","))t=t.replace(/,/,"."),t=(3600*parseFloat(t)).toString(),e=i.dw.fromISO("PT"+t+"S");else if(-1!==t.indexOf("H")||-1!==t.indexOf("M")||-1!==t.indexOf("S"))e=i.dw.fromISO("PT"+t);else{let n=parseInt(t);const r=parseInt(t).toFixed();isNaN(n)||t!==r||(t=(3600*n).toString(),e=i.dw.fromISO("PT"+t+"S"))}return null!==e&&e.isValid?"-"===t[0]&&e.valueOf()>0?e.negate():e:new i.dw({seconds:0})}}function de(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function he(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return de(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const pe=Object.entries,me=Object.setPrototypeOf,fe=Object.isFrozen,ge=Object.getPrototypeOf,ve=Object.getOwnPropertyDescriptor;let ye=Object.freeze,be=Object.seal,_e=Object.create,we="undefined"!=typeof Reflect&&Reflect,ke=we.apply,Te=we.construct;ye||(ye=function(t){return t}),be||(be=function(t){return t}),ke||(ke=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return t.apply(e,i)}),Te||(Te=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new t(...n)});const Ee=We(Array.prototype.forEach),Se=We(Array.prototype.lastIndexOf),xe=We(Array.prototype.pop),De=We(Array.prototype.push),Oe=We(Array.prototype.splice),Le=Array.isArray,Ce=We(String.prototype.toLowerCase),Ae=We(String.prototype.toString),Me=We(String.prototype.match),Ie=We(String.prototype.replace),Ne=We(String.prototype.indexOf),Pe=We(String.prototype.trim),Fe=We(Number.prototype.toString),je=We(Boolean.prototype.toString),Re="undefined"==typeof BigInt?null:We(BigInt.prototype.toString),$e="undefined"==typeof Symbol?null:We(Symbol.prototype.toString),He=We(Object.prototype.hasOwnProperty),qe=We(Object.prototype.toString),Ve=We(RegExp.prototype.test),ze=(Be=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Te(Be,e)});var Be;function We(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return ke(t,e,i)}}function Ue(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ce;if(me&&me(t,null),!Le(e))return t;let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){const t=n(r);t!==r&&(fe(e)||(e[i]=t),r=t)}t[r]=!0}return t}function Ye(t){for(let e=0;e<t.length;e++){He(t,e)||(t[e]=null)}return t}function Ze(t){const e=_e(null);for(const i of pe(t)){var n=he(i,2);const r=n[0],o=n[1];He(t,r)&&(Le(o)?e[r]=Ye(o):o&&"object"==typeof o&&o.constructor===Object?e[r]=Ze(o):e[r]=o)}return e}function Ge(t,e){for(;null!==t;){const n=ve(t,e);if(n){if(n.get)return We(n.get);if("function"==typeof n.value)return We(n.value)}t=ge(t)}return function(){return null}}const Ke=ye(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Je=ye(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Xe=ye(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qe=ye(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),tn=ye(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),en=ye(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nn=ye(["#text"]),rn=ye(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),on=ye(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sn=ye(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),an=ye(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ln=be(/{{[\w\W]*|^[\w\W]*}}/g),cn=be(/<%[\w\W]*|^[\w\W]*%>/g),un=be(/\${[\w\W]*/g),dn=be(/^data-[\-\w.\u00B7-\uFFFF]+$/),hn=be(/^aria-[\-\w]+$/),pn=be(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=be(/^(?:\w+script|data):/i),fn=be(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gn=be(/^html$/i),vn=be(/^[a-z][.\w]*(-[.\w]+)+$/i),yn=1,bn=3,_n=7,wn=8,kn=9,Tn=function(){return"undefined"==typeof window?null:window};var En=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tn();const n=e=>t(e);if(n.version="3.4.5",n.removed=[],!e||!e.document||e.document.nodeType!==kn||!e.Element)return n.isSupported=!1,n;let i=e.document;const r=i,o=r.currentScript,s=e.DocumentFragment,a=e.HTMLTemplateElement,l=e.Node,c=e.Element,u=e.NodeFilter,d=e.NamedNodeMap,h=void 0===d?e.NamedNodeMap||e.MozNamedAttrMap:d,p=e.HTMLFormElement,m=e.DOMParser,f=e.trustedTypes,g=c.prototype,v=Ge(g,"cloneNode"),y=Ge(g,"remove"),b=Ge(g,"nextSibling"),_=Ge(g,"childNodes"),w=Ge(g,"parentNode"),k=l&&l.prototype?Ge(l.prototype,"nodeType"):null;if("function"==typeof a){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let T,E="";const S=i,x=S.implementation,D=S.createNodeIterator,O=S.createDocumentFragment,L=S.getElementsByTagName,C=r.importNode;let A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof pe&&"function"==typeof w&&x&&void 0!==x.createHTMLDocument;const M=ln,I=cn,N=un,P=dn,F=hn,j=mn,R=fn,$=vn;let H=pn,q=null;const V=Ue({},[...Ke,...Je,...Xe,...tn,...nn]);let z=null;const B=Ue({},[...rn,...on,...sn,...an]);let W=Object.seal(_e(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,Y=null;const Z=Object.seal(_e(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let G=!0,K=!0,J=!1,X=!0,Q=!1,tt=!0,et=!1,nt=!1,it=!1,rt=!1,ot=!1,st=!1,at=!0,lt=!1;const ct="user-content-";let ut=!0,dt=!1,ht={},pt=null;const mt=Ue({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ft=null;const gt=Ue({},["audio","video","img","source","image","track"]);let vt=null;const yt=Ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",_t="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml";let kt=wt,Tt=!1,Et=null;const St=Ue({},[bt,_t,wt],Ae);let xt=Ue({},["mi","mo","mn","ms","mtext"]),Dt=Ue({},["annotation-xml"]);const Ot=Ue({},["title","style","font","a","script"]);let Lt=null;const Ct=["application/xhtml+xml","text/html"];let At=null,Mt=null;const It=i.createElement("form"),Nt=function(t){return t instanceof RegExp||t instanceof Function},Pt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Mt&&Mt===t)return;t&&"object"==typeof t||(t={}),t=Ze(t),Lt=-1===Ct.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,At="application/xhtml+xml"===Lt?Ae:Ce,q=He(t,"ALLOWED_TAGS")&&Le(t.ALLOWED_TAGS)?Ue({},t.ALLOWED_TAGS,At):V,z=He(t,"ALLOWED_ATTR")&&Le(t.ALLOWED_ATTR)?Ue({},t.ALLOWED_ATTR,At):B,Et=He(t,"ALLOWED_NAMESPACES")&&Le(t.ALLOWED_NAMESPACES)?Ue({},t.ALLOWED_NAMESPACES,Ae):St,vt=He(t,"ADD_URI_SAFE_ATTR")&&Le(t.ADD_URI_SAFE_ATTR)?Ue(Ze(yt),t.ADD_URI_SAFE_ATTR,At):yt,ft=He(t,"ADD_DATA_URI_TAGS")&&Le(t.ADD_DATA_URI_TAGS)?Ue(Ze(gt),t.ADD_DATA_URI_TAGS,At):gt,pt=He(t,"FORBID_CONTENTS")&&Le(t.FORBID_CONTENTS)?Ue({},t.FORBID_CONTENTS,At):mt,U=He(t,"FORBID_TAGS")&&Le(t.FORBID_TAGS)?Ue({},t.FORBID_TAGS,At):Ze({}),Y=He(t,"FORBID_ATTR")&&Le(t.FORBID_ATTR)?Ue({},t.FORBID_ATTR,At):Ze({}),ht=!!He(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?Ze(t.USE_PROFILES):t.USE_PROFILES),G=!1!==t.ALLOW_ARIA_ATTR,K=!1!==t.ALLOW_DATA_ATTR,J=t.ALLOW_UNKNOWN_PROTOCOLS||!1,X=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Q=t.SAFE_FOR_TEMPLATES||!1,tt=!1!==t.SAFE_FOR_XML,et=t.WHOLE_DOCUMENT||!1,rt=t.RETURN_DOM||!1,ot=t.RETURN_DOM_FRAGMENT||!1,st=t.RETURN_TRUSTED_TYPE||!1,it=t.FORCE_BODY||!1,at=!1!==t.SANITIZE_DOM,lt=t.SANITIZE_NAMED_PROPS||!1,ut=!1!==t.KEEP_CONTENT,dt=t.IN_PLACE||!1,H=function(t){try{return Ve(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:pn,kt="string"==typeof t.NAMESPACE?t.NAMESPACE:wt,xt=He(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?Ze(t.MATHML_TEXT_INTEGRATION_POINTS):Ue({},["mi","mo","mn","ms","mtext"]),Dt=He(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?Ze(t.HTML_INTEGRATION_POINTS):Ue({},["annotation-xml"]);const e=He(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?Ze(t.CUSTOM_ELEMENT_HANDLING):_e(null);if(W=_e(null),He(e,"tagNameCheck")&&Nt(e.tagNameCheck)&&(W.tagNameCheck=e.tagNameCheck),He(e,"attributeNameCheck")&&Nt(e.attributeNameCheck)&&(W.attributeNameCheck=e.attributeNameCheck),He(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(W.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),Q&&(K=!1),ot&&(rt=!0),ht&&(q=Ue({},nn),z=_e(null),!0===ht.html&&(Ue(q,Ke),Ue(z,rn)),!0===ht.svg&&(Ue(q,Je),Ue(z,on),Ue(z,an)),!0===ht.svgFilters&&(Ue(q,Xe),Ue(z,on),Ue(z,an)),!0===ht.mathMl&&(Ue(q,tn),Ue(z,sn),Ue(z,an))),Z.tagCheck=null,Z.attributeCheck=null,He(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?Z.tagCheck=t.ADD_TAGS:Le(t.ADD_TAGS)&&(q===V&&(q=Ze(q)),Ue(q,t.ADD_TAGS,At))),He(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?Z.attributeCheck=t.ADD_ATTR:Le(t.ADD_ATTR)&&(z===B&&(z=Ze(z)),Ue(z,t.ADD_ATTR,At))),He(t,"ADD_URI_SAFE_ATTR")&&Le(t.ADD_URI_SAFE_ATTR)&&Ue(vt,t.ADD_URI_SAFE_ATTR,At),He(t,"FORBID_CONTENTS")&&Le(t.FORBID_CONTENTS)&&(pt===mt&&(pt=Ze(pt)),Ue(pt,t.FORBID_CONTENTS,At)),He(t,"ADD_FORBID_CONTENTS")&&Le(t.ADD_FORBID_CONTENTS)&&(pt===mt&&(pt=Ze(pt)),Ue(pt,t.ADD_FORBID_CONTENTS,At)),ut&&(q["#text"]=!0),et&&Ue(q,["html","head","body"]),q.table&&(Ue(q,["tbody"]),delete U.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw ze('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw ze('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=t.TRUSTED_TYPES_POLICY,E=T.createHTML("")}else void 0===T&&(T=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(t){return t},createScriptURL(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(f,o)),null!==T&&"string"==typeof E&&(E=T.createHTML(""));ye&&ye(t),Mt=t},Ft=Ue({},[...Je,...Xe,...Qe]),jt=Ue({},[...tn,...en]),Rt=function(t){De(n.removed,{element:t});try{w(t).removeChild(t)}catch(e){y(t)}},$t=function(t,e){try{De(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){De(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(rt||ot)try{Rt(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Ht=function(t){let e=null,n=null;if(it)t="<remove></remove>"+t;else{const e=Me(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Lt&&kt===wt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=T?T.createHTML(t):t;if(kt===wt)try{e=(new m).parseFromString(r,Lt)}catch(t){}if(!e||!e.documentElement){e=x.createDocument(kt,"template",null);try{e.documentElement.innerHTML=Tt?E:r}catch(t){}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),kt===wt?L.call(e,et?"html":"body")[0]:et?e.documentElement:o},qt=function(t){return D.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Vt=function(t){t.normalize();const e=D.call(t.ownerDocument||t,t,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let n=e.nextNode();for(;n;){let t=n.data;Ee([M,I,N],e=>{t=Ie(t,e," ")}),n.data=t,n=e.nextNode()}},zt=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Bt=function(t){if(!k||"object"!=typeof t||null===t)return!1;try{return"number"==typeof k(t)}catch(t){return!1}};function Wt(t,e,i){Ee(t,t=>{t.call(n,e,i,Mt)})}const Ut=function(t){let e=null;if(Wt(A.beforeSanitizeElements,t,null),zt(t))return Rt(t),!0;const i=At(t.nodeName);if(Wt(A.uponSanitizeElement,t,{tagName:i,allowedTags:q}),tt&&t.hasChildNodes()&&!Bt(t.firstElementChild)&&Ve(/<[/\w!]/g,t.innerHTML)&&Ve(/<[/\w!]/g,t.textContent))return Rt(t),!0;if(tt&&t.namespaceURI===wt&&"style"===i&&Bt(t.firstElementChild))return Rt(t),!0;if(t.nodeType===_n)return Rt(t),!0;if(tt&&t.nodeType===wn&&Ve(/<[/\w]/g,t.data))return Rt(t),!0;if(U[i]||!(Z.tagCheck instanceof Function&&Z.tagCheck(i))&&!q[i]){if(!U[i]&&Gt(i)){if(W.tagNameCheck instanceof RegExp&&Ve(W.tagNameCheck,i))return!1;if(W.tagNameCheck instanceof Function&&W.tagNameCheck(i))return!1}if(ut&&!pt[i]){const e=w(t)||t.parentNode,n=_(t)||t.childNodes;if(n&&e){for(let i=n.length-1;i>=0;--i){const r=v(n[i],!0);e.insertBefore(r,b(t))}}}return Rt(t),!0}return t instanceof c&&!function(t){let e=w(t);e&&e.tagName||(e={namespaceURI:kt,tagName:"template"});const n=Ce(t.tagName),i=Ce(e.tagName);return!!Et[t.namespaceURI]&&(t.namespaceURI===_t?e.namespaceURI===wt?"svg"===n:e.namespaceURI===bt?"svg"===n&&("annotation-xml"===i||xt[i]):Boolean(Ft[n]):t.namespaceURI===bt?e.namespaceURI===wt?"math"===n:e.namespaceURI===_t?"math"===n&&Dt[i]:Boolean(jt[n]):t.namespaceURI===wt?!(e.namespaceURI===_t&&!Dt[i])&&!(e.namespaceURI===bt&&!xt[i])&&!jt[n]&&(Ot[n]||!Ft[n]):!("application/xhtml+xml"!==Lt||!Et[t.namespaceURI]))}(t)?(Rt(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!Ve(/<\/no(script|embed|frames)/i,t.innerHTML)?(Q&&t.nodeType===bn&&(e=t.textContent,Ee([M,I,N],t=>{e=Ie(e,t," ")}),t.textContent!==e&&(De(n.removed,{element:t.cloneNode()}),t.textContent=e)),Wt(A.afterSanitizeElements,t,null),!1):(Rt(t),!0)},Yt=function(t,e,n){if(Y[e])return!1;if(at&&("id"===e||"name"===e)&&(n in i||n in It))return!1;const r=z[e]||Z.attributeCheck instanceof Function&&Z.attributeCheck(e,t);if(K&&!Y[e]&&Ve(P,e));else if(G&&Ve(F,e));else if(!r||Y[e]){if(!(Gt(t)&&(W.tagNameCheck instanceof RegExp&&Ve(W.tagNameCheck,t)||W.tagNameCheck instanceof Function&&W.tagNameCheck(t))&&(W.attributeNameCheck instanceof RegExp&&Ve(W.attributeNameCheck,e)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(e,t))||"is"===e&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Ve(W.tagNameCheck,n)||W.tagNameCheck instanceof Function&&W.tagNameCheck(n))))return!1}else if(vt[e]);else if(Ve(H,Ie(n,R,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==Ne(n,"data:")||!ft[t]){if(J&&!Ve(j,Ie(n,R,"")));else if(n)return!1}else;return!0},Zt=Ue({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Gt=function(t){return!Zt[Ce(t)]&&Ve($,t)},Kt=function(t){Wt(A.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||zt(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let r=e.length;for(;r--;){const o=e[r],s=o.name,a=o.namespaceURI,l=o.value,c=At(s),u=l;let d="value"===s?u:Pe(u);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,Wt(A.uponSanitizeAttribute,t,i),d=i.attrValue,!lt||"id"!==c&&"name"!==c||0===Ne(d,ct)||($t(s,t),d=ct+d),tt&&Ve(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){$t(s,t);continue}if("attributename"===c&&Me(d,"href")){$t(s,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){$t(s,t);continue}if(!X&&Ve(/\/>/i,d)){$t(s,t);continue}Q&&Ee([M,I,N],t=>{d=Ie(d,t," ")});const h=At(t.nodeName);if(Yt(h,c,d)){if(T&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(a);else switch(f.getAttributeType(h,c)){case"TrustedHTML":d=T.createHTML(d);break;case"TrustedScriptURL":d=T.createScriptURL(d)}if(d!==u)try{a?t.setAttributeNS(a,s,d):t.setAttribute(s,d),zt(t)?Rt(t):xe(n.removed)}catch(e){$t(s,t)}}else $t(s,t)}Wt(A.afterSanitizeAttributes,t,null)},Jt=function(t){let e=null;const n=qt(t);for(Wt(A.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)Wt(A.uponSanitizeShadowNode,e,null),Ut(e),Kt(e),e.content instanceof s&&Jt(e.content);Wt(A.afterSanitizeShadowDOM,t,null)},Xt=function(t){if(t.nodeType===yn&&t.shadowRoot instanceof s){const e=t.shadowRoot;Xt(e),Jt(e)}const e=t.childNodes;if(!e)return;const n=[];Ee(e,t=>{De(n,t)});for(const t of n)Xt(t)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,l=null;if(Tt=!t,Tt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Bt(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return Fe(t);case"boolean":return je(t);case"bigint":return Re?Re(t):"0";case"symbol":return $e?$e(t):"Symbol()";case"undefined":default:return qe(t);case"function":case"object":{if(null===t)return qe(t);const e=t,n=Ge(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:qe(t)}return qe(t)}}}(t)))throw ze("dirty is not a string, aborting");if(!n.isSupported)return t;if(nt||Pt(e),n.removed=[],"string"==typeof t&&(dt=!1),dt){const e=t.nodeName;if("string"==typeof e){const t=At(e);if(!q[t]||U[t])throw ze("root node is forbidden and cannot be sanitized in-place")}Xt(t)}else if(Bt(t))i=Ht("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),o.nodeType===yn&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o),Xt(o);else{if(!rt&&!Q&&!et&&-1===t.indexOf("<"))return T&&st?T.createHTML(t):t;if(i=Ht(t),!i)return rt?null:st?E:""}i&&it&&Rt(i.firstChild);const c=qt(dt?t:i);for(;a=c.nextNode();)Ut(a),Kt(a),a.content instanceof s&&Jt(a.content);if(dt)return Q&&Vt(t),t;if(rt){if(Q&&Vt(i),ot)for(l=O.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(z.shadowroot||z.shadowrootmode)&&(l=C.call(r,l,!0)),l}let u=et?i.outerHTML:i.innerHTML;return et&&q["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ve(gn,i.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+u),Q&&Ee([M,I,N],t=>{u=Ie(u,t," ")}),T&&st?T.createHTML(u):u},n.setConfig=function(){Pt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),nt=!0},n.clearConfig=function(){Mt=null,nt=!1},n.isValidAttribute=function(t,e,n){Mt||Pt({});const i=At(t),r=At(e);return Yt(i,r,n)},n.addHook=function(t,e){"function"==typeof e&&De(A[t],e)},n.removeHook=function(t,e){if(void 0!==e){const n=Se(A[t],e);return-1===n?void 0:Oe(A[t],n,1)[0]}return xe(A[t])},n.removeHooks=function(t){A[t]=[]},n.removeAllHooks=function(){A={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();class Sn extends s{getId(){return"escape"}escapeForHtml(t){if(null==t)return"";const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return t.replace(/[&<>"]/g,function(t){return e[t]||t})}sanitize(t){return En.sanitize(t)}}class xn extends s{getId(){return"fetch"}fetch(t,e={}){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 Dn extends h{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._beginListener,this._beginTime.removeEventListener("blur",this._beginBlurListener),delete this._beginBlurListener,delete this._beginTime),void 0!==this._endTime&&(this._endTime.removeEventListener("change",this._endListener),delete this._endListener,this._endTime.removeEventListener("blur",this._endBlurListener),delete this._endBlurListener,delete this._endTime),void 0!==this._duration&&(this._duration.removeEventListener("change",this._durationListener),delete this._durationListener,this._duration.removeEventListener("keydown",this._durationKeyListener),delete this._durationKeyListener,this._duration.removeEventListener("blur",this._durationBlurListener),delete this._durationBlurListener,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._beginBlurListener=()=>this._parseBeginTime(),this._endListener=()=>this._changedEnd(),this._endBlurListener=()=>this._parseEndTime(),this._durationListener=()=>this._changedDuration(),this._durationKeyListener=t=>this._changeDurationOnKeypress(t),this._durationBlurListener=()=>this._parseDuration(),this._beginDate.addEventListener("change",this._beginListener),this._beginTime.addEventListener("change",this._beginListener),this._beginTime.addEventListener("blur",this._beginBlurListener),this._endTime.addEventListener("change",this._endListener),this._endTime.addEventListener("blur",this._endBlurListener),this._duration.addEventListener("change",this._durationListener),this._duration.addEventListener("keydown",this._durationKeyListener),this._duration.addEventListener("blur",this._durationBlurListener),null!==this._duration&&null!==this._durationToggle&&(this._durationToggleListener=()=>{this._durationToggle.classList.toggle("text-success")},this._durationToggle.addEventListener("click",this._durationToggleListener)))}_parseBeginTime(){if(""===this._beginTime.value)return;let t=this._formatTimeForParsing(this._beginTime.value,this._beginTime.dataset.format);t!==this._beginTime.value&&(this._beginTime.value=t,this._changedBegin())}_parseEndTime(){if(""===this._endTime.value)return;let t=this._formatTimeForParsing(this._endTime.value,this._endTime.dataset.format);t!==this._endTime.value&&(this._endTime.value=t,this._changedEnd())}_parseDuration(){""!==this._duration.value&&this._setDurationAsString(this._getParsedDuration())}_formatTimeForParsing(t,e){let n=t.trim();n=n.replace(/\.|;|,/g,":"),n=n.replace(/am/i,"AM"),n=n.replace(/pm/i,"PM");let i="",r=0,o=0,s=n;const a=n.match(/\s*(AM|PM)$/i);if(a&&(i=a[1].toUpperCase(),s=n.replace(/\s*(AM|PM)$/i,"").trim()),-1!==s.indexOf(":")){const t=s.match(/(?:(\d+):)?(\d+)/);r=parseInt(t?.[1]||0,10),o=parseInt(t?.[2]||0,10)}else s=s.replace(/:/,""),/^\d{1,2}$/.test(s)&&(r=s),/^\d{3}$/.test(s)&&(r=s.slice(0,1),o=s.slice(1)),/^\d{4}$/.test(s)&&(r=s.slice(0,2),o=s.slice(2));return r=parseInt(r),o=parseInt(o),r%=24,o%=60,-1!==e.toUpperCase().indexOf("A")?(r>12&&r<24&&(r-=12,i="PM"),""===i&&(0===r?(r=12,i="AM"):i=12===r?"PM":"AM"),"PM"===i&&0===r&&(r=12)):("AM"===i&&12===r?r=0:"PM"===i&&12!==r&&(r=(r+12)%24),i=""),n=r+":"+o.toString().padStart(2,"0"),""!==i&&(n=n+" "+i.trim()),n}_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;let t=this._parseBegin(this._beginTime.dataset.format);return t.invalid&&(t=this._parseBegin(this._fixTimeFormat(this._beginTime.dataset.format)),t.invalid)?null:t}_parseBegin(t){return this.getDateUtils().fromFormat(this._beginDate.value+" "+this._beginTime.value,this._beginDate.dataset.format+" "+t)}_parseEnd(t,e){let n=this.getDateUtils().fromFormat(t.toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+e);return n.invalid&&(n=this.getDateUtils().fromFormat(t.toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+this._fixTimeFormat(e))),n}_fixTimeFormat(t){return t.replace("HH","H").replace("hh","h")}_getEnd(){if(""===this._endTime.value)return null;let t=this._parseEnd(i.c9.now(),this._endTime.dataset.format);const e=this._getBegin();return null!==e&&(t=this._parseEnd(e,this._endTime.dataset.format),t<e&&(t=t.plus({days:1}))),t.invalid?null:t}_changedBegin(){const t=this._getBegin();if(null===t)return;const e=this._getParsedDuration(),n=e.as("seconds")>0;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()||""===this._duration.value)return;const t=this._getParsedDuration();if(!t.isValid)return void this._setDurationAsString(null);const e=this._getBegin();let n=this._getEnd();const r=t.as("seconds");if(r<0&&(n=null),null===e&&null===n){const t=i.c9.now();this._applyDateToField(t,this._beginDate,this._beginTime),this._addSecondsToEndDate(t,r)}else null===e&&null!==n?this._applyDateToField(n.minus({seconds:r}),this._beginDate,this._beginTime):null!==e&&r>=0&&this._addSecondsToEndDate(e,r)}_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)}_addSecondsToEndDate(t,e){e<86400?this._applyDateToField(t.plus({seconds:e}),null,this._endTime):this._endTime.value=""}_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)}_changeDurationOnKeypress(t){switch(t.key){case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":case"Home":case"End":this._setDurationAsString(this._getParsedDuration());break;default:return}this._changeTimeOnKeypress(t,this._duration,99999,this._durationListener)}_changeTimeOnKeypress(t,e,n,i){let r=e.value||"00:00",[o,s]=r.split(":").map(Number);isNaN(o)&&(o=0),isNaN(s)&&(s=0);const a=e.selectionStart||0,l=r.indexOf(":"),c=a<=l,u=(t,e)=>{let i=60*t+e;return i<0&&(i=0),i>n&&(i=n),[t=Math.floor(i/60),e=i%60]};switch(t.key){case"ArrowUp":[o,s]=c?u(o+1,s):u(o,s+5);break;case"ArrowDown":[o,s]=c?u(o-1,s):u(o,s-5);break;case"PageUp":[o,s]=u(o+1,s),t.preventDefault();break;case"PageDown":[o,s]=u(o-1,s),t.preventDefault();break;case"Home":o=8,s=0,t.preventDefault();break;case"End":o=0,s=0,t.preventDefault();break;default:return}e.value=`${o}:${s.toString().padStart(2,"0")}`,i(e),setTimeout(()=>{e.setSelectionRange(a,a)},0)}}var On,Ln,Cn=n(9790);class An extends h{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,r=n.dataset.prototype;r=r.replace(/__name__/g,i),r=r.replace(/#000000/g,Cn.A.calculateContrastColor(t.dataset.color)),r=r.replace(/__DISPLAY__/g,e.escapeForHtml(t.dataset.display)),r=r.replace(/__COLOR__/g,t.dataset.color),r=r.replace(/__INITIALS__/g,e.escapeForHtml(t.dataset.initials)),r=r.replace(/__TITLE__/g,e.escapeForHtml(t.dataset.title)),r=r.replace(/__USERNAME__/g,e.escapeForHtml(t.text)),n.dataset.widgetCounter=(++i).toString();const o=document.createElement("div");o.innerHTML=e.sanitize(r),o.querySelector("input[type=hidden]").value=t.value;const s=o.firstElementChild;for(const e in t.dataset)s.dataset[e]=t.dataset[e];return s}_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 Mn extends h{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));const e=n.closest("form");null!==e&&e.dispatchEvent(new Event(t))}t.preventDefault()}}),t.addEventListener("click",this._eventHandler)}destroyForm(t){t.removeEventListener("click",this._eventHandler)}}class In extends h{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})),n.dispatchEvent(new Event("keyup",{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 Nn extends s{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(r=>{if(!0!==r){this.getPlugin("alert").info(e)}let o={body:e,dir:this.getConfigurations().isRTL()?"rtl":"ltr"};null!=n&&(o.icon=n);let s="Kimai";null!==t&&(s=s+": "+t),null!=i&&(o={...o,...i});const a=new window.Notification(s,o);a.onclick=function(){window.focus(),a.close()}})}}class Pn extends s{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 Fn extends s{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)}_showModal(t){this.fetch(t.href,{method:"GET"}).then(e=>{if(!e.ok)return;let n="remote_modal";void 0!==t.dataset.modalId&&(n=t.dataset.modalId);const i=document.getElementById(n);return null===i&&console.log("Could not find modal with ID: "+n),e.text().then(e=>{const n=document.createElement("div");n.classList.add("modal-body"),void 0!==t.dataset.modalClass&&n.classList.add(t.dataset.modalClass),n.innerHTML=e;for(let t of n.querySelectorAll("a.remote-modal-reload"))t.addEventListener("click",this.handle);i.querySelector(".modal-body").replaceWith(n),void 0!==t.dataset.modalTitle&&(i.querySelector(".modal-title").textContent=t.dataset.modalTitle),c.aF.getOrCreateInstance(i).show()})}).catch(t=>{console.log("Failed to load remote modal",t)})}}class jn extends s{getId(){return"user"}init(){this.user=this.getConfigurations().get("user")}getUserId(){return this.user.id}getName(){return this.user.name}isAdmin(){return this.user.admin}isSuperAdmin(){return this.user.superAdmin}getRoles(){return this.user.roles}}class Rn extends oe{init(){this.selector='[data-form-widget="tags"]'}loadData(t,e,n){this.getContainer().getPlugin("api").get(t,{name:e},t=>{let e=[];for(let n of t)e.push({text:n.name,value:n.name,color:n["color-safe"]});n(e)},()=>{n()})}}class $n{constructor(t,e){i.wB.defaultLocale=t.locale.replace("_","-").toLowerCase(),i.wB.defaultZone=t.timezone;const n=new a(new o(t),new r(e));n.registerPlugin(new jn),n.registerPlugin(new Sn),n.registerPlugin(new T),n.registerPlugin(new y),n.registerPlugin(new S),n.registerPlugin(new xn),n.registerPlugin(new ue),n.registerPlugin(new Nn),n.registerPlugin(new se(".selectpicker","select[data-related-select]")),n.registerPlugin(new m('input[data-daterangepicker="on"]')),n.registerPlugin(new p('input[data-datepicker="on"]')),n.registerPlugin(new oe),n.registerPlugin(new Rn),n.registerPlugin(new Dn),n.registerPlugin(new An),n.registerPlugin(new Mn),n.registerPlugin(new In),n.registerPlugin(new ae),n.registerPlugin(new Pn),n.registerPlugin(new le("confirmation-link")),n.registerPlugin(new l("data-column-visibility")),n.registerPlugin(new g("section.content","table.dataTable")),n.registerPlugin(new v("form.searchform","toolbar-action")),n.registerPlugin(new _(".alternative-link")),n.registerPlugin(new w(".modal-ajax-form",["td.multiCheckbox","td.actions"])),n.registerPlugin(new Fn),n.registerPlugin(new k),n.registerPlugin(new E("api-link")),n.registerPlugin(new ce),n.registerPlugin(new u),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}}t=n.hmd(t),On="undefined"!=typeof self?self:void 0,Ln=function(){return class extends $n{}},"function"==typeof define&&n.amdO?define([],function(){return On.KimaiWebLoader=Ln()}):t.exports?t.exports=Ln():On.KimaiWebLoader=Ln()},9790:function(t,e,n){"use strict";n.d(e,{A: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"}}},5898:function(t,e,n){"use strict";n.d(e,{A: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+='<div class="dropdown-divider"></div>'),null!==t.url){if(n+='<a class="dropdown-item '+(null!==t.class?t.class:"")+'" href="'+t.url+'"',void 0!==t.attr)for(const e in t.attr)n+=" "+e+'="'+t.attr[e].replaceAll('"',"&quot;")+'"';n+=">"+t.title+"</a>"}this.createFromClickEvent(t,n)}createFromClickEvent(t,e){const n=this.getContextMenuElement();n.classList.contains("action-dropdown")||n.classList.add("action-dropdown"),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 r=n.querySelector("td.actions div.dropdown-menu");if(null===r)return;e.preventDefault();new i(t.dataset.contextMenu).createFromClickEvent(e,r.innerHTML)})})}}},7648:function(t,e,n){"use strict";n.d(e,{A:function(){return r}});var i=n(5898);class r{constructor(t){this.selector=t;const e=document.querySelector(this.selector);if(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 r(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 r=document.createElement("div");r.innerHTML=t,document.querySelector(e).replaceWith(this._makeScriptExecutable(r.firstElementChild)),i.A.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}}},1630:function(t,e,n){"use strict";n.d(e,{A: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})}}},4667:function(t,e,n){"use strict";n.d(e,{A: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)}}},6318:function(t,e,n){"use strict";n.d(e,{aF:function(){return Mi},go:function(){return Ki},AM:function(){return kr},y8:function(){return yo},m_:function(){return vr}});var i={};n.r(i),n.d(i,{afterMain:function(){return T},afterRead:function(){return _},afterWrite:function(){return x},applyStyles:function(){return I},arrow:function(){return Q},auto:function(){return l},basePlacements:function(){return c},beforeMain:function(){return w},beforeRead:function(){return y},beforeWrite:function(){return E},bottom:function(){return o},clippingParents:function(){return h},computeStyles:function(){return it},createPopper:function(){return It},createPopperBase:function(){return Mt},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 D},offset:function(){return Et},placements:function(){return v},popper:function(){return m},popperGenerator:function(){return At},popperOffsets:function(){return St},preventOverflow:function(){return xt},read:function(){return b},reference:function(){return f},right:function(){return s},start:function(){return u},top:function(){return r},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return S}});var r="top",o="bottom",s="right",a="left",l="auto",c=[r,o,s,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",E="beforeWrite",S="write",x="afterWrite",D=[y,b,_,w,k,T,E,S,x];function O(t){return t?(t.nodeName||"").toLowerCase():null}function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function C(t){return t instanceof L(t).Element||t instanceof Element}function A(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function M(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}var I={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]||{},r=e.elements[t];A(r)&&O(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?r.removeAttribute(t):r.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],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});A(i)&&O(i)&&(Object.assign(i.style,o),Object.keys(r).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 R(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function $(){return!/^((?!chrome|android).)*safari/i.test(R())}function H(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&A(t)&&(r=t.offsetWidth>0&&j(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&j(i.height)/t.offsetHeight||1);var s=(C(t)?L(t):window).visualViewport,a=!$()&&n,l=(i.left+(a&&s?s.offsetLeft:0))/r,c=(i.top+(a&&s?s.offsetTop:0))/o,u=i.width/r,d=i.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function q(t){var e=H(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 V(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&M(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function z(t){return L(t).getComputedStyle(t)}function B(t){return["table","td","th"].indexOf(O(t))>=0}function W(t){return((C(t)?t.ownerDocument:t.document)||window.document).documentElement}function U(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(M(t)?t.host:null)||W(t)}function Y(t){return A(t)&&"fixed"!==z(t).position?t.offsetParent:null}function Z(t){for(var e=L(t),n=Y(t);n&&B(n)&&"static"===z(n).position;)n=Y(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===z(n).position)?e:n||function(t){var e=/firefox/i.test(R());if(/Trident/i.test(R())&&A(t)&&"fixed"===z(t).position)return null;var n=U(t);for(M(n)&&(n=n.host);A(n)&&["html","body"].indexOf(O(n))<0;){var i=z(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 G(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function K(t,e,n){return P(t,F(e,n))}function J(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function X(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}var Q={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=G(h),m=[a,s].indexOf(h)>=0?"height":"width";if(u&&d){var f=function(t,e){return J("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:X(t,c))}(l.padding,n),g=q(u),v="y"===p?r:a,y="y"===p?o:s,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,E=f[v],S=k-g[m]-f[y],x=k/2-g[m]/2+T,D=K(E,x,S),O=p;n.modifiersData[i]=((e={})[O]=D,e.centerOffset=D-x,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)))&&V(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"),E=a,S=r,x=window;if(m){var D=Z(n),O="clientHeight",C="clientWidth";if(D===L(n)&&"static"!==z(D=W(n)).position&&"absolute"===h&&(O="scrollHeight",C="scrollWidth"),l===r||(l===a||l===s)&&c===d)S=o,_-=(g&&D===x&&x.visualViewport?x.visualViewport.height:D[O])-i.height,_*=p?1:-1;if(l===a||(l===r||l===o)&&c===d)E=s,y-=(g&&D===x&&x.visualViewport?x.visualViewport.width:D[C])-i.width,y*=p?1:-1}var A,M=Object.assign({position:h},m&&et),I=!0===f?function(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:j(n*r)/r||0,y:j(i*r)/r||0}}({x:y,y:_},L(n)):{x:y,y:_};return y=I.x,_=I.y,p?Object.assign({},M,((A={})[S]=T?"0":"",A[E]=k?"0":"",A.transform=(x.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",A)):Object.assign({},M,((e={})[S]=T?_+"px":"",e[E]=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,r=void 0===i||i,o=n.adaptive,s=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:r,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:s,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:{}},rt={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,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,l=L(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",n.update,rt)}),a&&l.addEventListener("resize",n.update,rt),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",n.update,rt)}),a&&l.removeEventListener("resize",n.update,rt)}},data:{}},st={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,function(t){return st[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=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(t){return H(W(t)).left+ut(t).scrollLeft}function ht(t){var e=z(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function pt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:A(t)&&ht(t)?t:pt(U(t))}function mt(t,e){var n;void 0===e&&(e=[]);var i=pt(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=L(i),s=r?[o].concat(o.visualViewport||[],ht(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(mt(U(s)))}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=L(t),i=W(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=$();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+dt(t),y:l}}(t,n)):C(e)?function(t,e){var n=H(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=W(t),i=ut(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=P(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=P(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+dt(t),l=-i.scrollTop;return"rtl"===z(r||n).direction&&(a+=P(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(W(t)))}function vt(t,e,n,i){var r="clippingParents"===e?function(t){var e=mt(U(t)),n=["absolute","fixed"].indexOf(z(t).position)>=0&&A(t)?Z(t):t;return C(n)?e.filter(function(t){return C(t)&&V(t,n)&&"body"!==O(t)}):[]}(t):[].concat(e),o=[].concat(r,[n]),s=o[0],a=o.reduce(function(e,n){var r=gt(t,n,i);return e.top=P(r.top,e.top),e.right=F(r.right,e.right),e.bottom=F(r.bottom,e.bottom),e.left=P(r.left,e.left),e},gt(t,s,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 r:e={x:p,y:n.y-i.height};break;case o:e={x:p,y:n.y+n.height};break;case s: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?G(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,E=void 0===T?0:T,S=J("number"!=typeof E?E:X(E,c)),x=_===m?f:m,D=t.rects.popper,O=t.elements[k?x:_],L=vt(C(O)?O:O.contextElement||W(t.elements.popper),g,y,u),A=H(t.elements.reference),M=yt({reference:A,element:D,strategy:"absolute",placement:a}),I=ft(Object.assign({},D,M)),N=_===m?I:A,P={top:L.top-N.top+S.top,bottom:N.bottom-L.bottom+S.bottom,left:L.left-N.left+S.left,right:N.right-L.right+S.right},F=t.modifiersData.offset;if(_===m&&F){var j=F[a];Object.keys(P).forEach(function(t){var e=[s,o].indexOf(t)>=0?1:-1,n=[r,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,E=n.allowedAutoPlacements,S=e.options.placement,x=N(S),D=f||(x===S||!T?[at(S)]:function(t){if(N(t)===l)return[];var e=at(t);return[ct(t),e,ct(e)]}(S)),O=[S].concat(D).reduce(function(t,n){return t.concat(N(n)===l?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,r=n.boundary,o=n.rootBoundary,s=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:r,rootBoundary:o,padding:s})[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:E}):n)},[]),L=e.rects.reference,C=e.rects.popper,A=new Map,M=!0,I=O[0],P=0;P<O.length;P++){var F=O[P],j=N(F),R=tt(F)===u,$=[r,o].indexOf(j)>=0,H=$?"width":"height",q=bt(e,{placement:F,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),V=$?R?s:a:R?o:r;L[H]>C[H]&&(V=at(V));var z=at(V),B=[];if(h&&B.push(q[j]<=0),m&&B.push(q[V]<=0,q[z]<=0),B.every(function(t){return t})){I=F,M=!1;break}A.set(F,B)}if(M)for(var W=function(t){var e=O.find(function(e){var n=A.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return I=e,"break"},U=T?3:1;U>0;U--){if("break"===W(U))break}e.placement!==I&&(e.modifiersData[i]._skip=!0,e.placement=I,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[r,s,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,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=bt(e,{elementContext:"reference"}),a=bt(e,{altBoundary:!0}),l=wt(s,i),c=wt(a,r,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 Et={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,r].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,s].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 St={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 xt={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),E=!T,S=G(k),x="x"===S?"y":"x",D=e.modifiersData.popperOffsets,O=e.rects.reference,L=e.rects.popper,C="function"==typeof _?_(Object.assign({},e.rects,{placement:e.placement})):_,A="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),M=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,I={x:0,y:0};if(D){if(c){var j,R="y"===S?r:a,$="y"===S?o:s,H="y"===S?"height":"width",V=D[S],z=V+w[R],B=V-w[$],W=y?-L[H]/2:0,U=T===u?O[H]:L[H],Y=T===u?-L[H]:-O[H],J=e.elements.arrow,X=y&&J?q(J):{width:0,height:0},Q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=Q[R],nt=Q[$],it=K(0,O[H],X[H]),rt=E?O[H]/2-W-it-et-A.mainAxis:U-it-et-A.mainAxis,ot=E?-O[H]/2+W+it+nt+A.mainAxis:Y+it+nt+A.mainAxis,st=e.elements.arrow&&Z(e.elements.arrow),at=st?"y"===S?st.clientTop||0:st.clientLeft||0:0,lt=null!=(j=null==M?void 0:M[S])?j:0,ct=V+ot-lt,ut=K(y?F(z,V+rt-lt-at):z,V,y?P(B,ct):B);D[S]=ut,I[S]=ut-V}if(h){var dt,ht="x"===S?r:a,pt="x"===S?o:s,mt=D[x],ft="y"===x?"height":"width",gt=mt+w[ht],vt=mt-w[pt],yt=-1!==[r,a].indexOf(k),_t=null!=(dt=null==M?void 0:M[x])?dt:0,wt=yt?gt:mt-O[ft]-L[ft]-_t+A.altAxis,kt=yt?mt+O[ft]+L[ft]-_t-A.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);D[x]=Tt,I[x]=Tt-mt}e.modifiersData[i]=I}},requiresIfExists:["offset"]};function Dt(t,e,n){void 0===n&&(n=!1);var i,r,o=A(e),s=A(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=W(e),l=H(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==O(e)||ht(a))&&(c=(i=e)!==L(i)&&A(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:ut(i)),A(e)?((u=H(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 r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||r(t)}),i}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ct(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function At(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,r=e.defaultOptions,o=void 0===r?Lt:r;return function(t,e,n){void 0===n&&(n=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var r="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:C(t)?mt(t):t.contextElement?mt(t.contextElement):[],popper:mt(e)};var s,c,h=function(t){var e=Ot(t);return D.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((s=[].concat(i,a.options.modifiers),c=s.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=h.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,r=t.effect;if("function"==typeof r){var o=r({state:a,name:e,instance:u,options:i}),s=function(){};l.push(o||s)}}),u.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(Ct(e,n)){a.rects={reference:Dt(e,Z(n),"fixed"===a.options.strategy),popper:q(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options,l=void 0===s?{}:s,d=r.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,i=-1}}},update:(r=function(){return new Promise(function(t){u.forceUpdate(),t(a)})},function(){return s||(s=new Promise(function(t){Promise.resolve().then(function(){s=void 0,t(r())})})),s}),destroy:function(){d(),c=!0}};if(!Ct(t,e))return u;function d(){l.forEach(function(t){return t()}),l=[]}return u.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),u}}var Mt=At(),It=At({defaultModifiers:[ot,St,it,I,Et,_t,xt,Q,Tt]}),Nt=At({defaultModifiers:[ot,St,it,I]});const Pt=new Map,Ft={set(t,e,n){Pt.has(t)||Pt.set(t,new Map);const i=Pt.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){return Pt.has(t)&&Pt.get(t).get(e)||null},remove(t,e){if(!Pt.has(t))return;const n=Pt.get(t);n.delete(e),0===n.size&&Pt.delete(t)}},jt="transitionend",Rt=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),$t=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),Ht=t=>{t.dispatchEvent(new Event(jt))},qt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Vt=t=>qt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(Rt(t)):null,zt=t=>{if(!qt(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},Bt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),Wt=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?Wt(t.parentNode):null},Ut=()=>{},Yt=t=>{t.offsetHeight},Zt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Gt=[],Kt=()=>"rtl"===document.documentElement.dir,Jt=t=>{var e;e=()=>{const e=Zt();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?(Gt.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of Gt)t()}),Gt.push(e)):e()},Xt=(t,e=[],n=t)=>"function"==typeof t?t.call(...e):n,Qt=(t,e,n=!0)=>{if(!n)return void Xt(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e),r=Number.parseFloat(n);return i||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0})(e)+5;let r=!1;const o=({target:n})=>{n===e&&(r=!0,e.removeEventListener(jt,o),Xt(t))};e.addEventListener(jt,o),setTimeout(()=>{r||Ht(e)},i)},te=(t,e,n,i)=>{const r=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[r-1]:t[0]:(o+=n?1:-1,i&&(o=(o+r)%r),t[Math.max(0,Math.min(o,r-1))])},ee=/[^.]*(?=\..*)\.|.*/,ne=/\..*/,ie=/::\d+$/,re={};let oe=1;const se={mouseenter:"mouseover",mouseleave:"mouseout"},ae=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 le(t,e){return e&&`${e}::${oe++}`||t.uidEvent||oe++}function ce(t){const e=le(t);return t.uidEvent=e,re[e]=re[e]||{},re[e]}function ue(t,e,n=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===n)}function de(t,e,n){const i="string"==typeof e,r=i?n:e||n;let o=fe(t);return ae.has(o)||(o=t),[i,r,o]}function he(t,e,n,i,r){if("string"!=typeof e||!t)return;let[o,s,a]=de(e,n,i);if(e in se){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};s=t(s)}const l=ce(t),c=l[a]||(l[a]={}),u=ue(c,s,o?n:null);if(u)return void(u.oneOff=u.oneOff&&r);const d=le(s,e.replace(ee,"")),h=o?function(t,e,n){return function i(r){const o=t.querySelectorAll(e);for(let{target:s}=r;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return ve(r,{delegateTarget:s}),i.oneOff&&ge.off(t,r.type,e,n),n.apply(s,[r])}}(t,n,s):function(t,e){return function n(i){return ve(i,{delegateTarget:t}),n.oneOff&&ge.off(t,i.type,e),e.apply(t,[i])}}(t,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=r,h.uidEvent=d,c[d]=h,t.addEventListener(a,h,o)}function pe(t,e,n,i,r){const o=ue(e[n],i,r);o&&(t.removeEventListener(n,o,Boolean(r)),delete e[n][o.uidEvent])}function me(t,e,n,i){const r=e[n]||{};for(const[o,s]of Object.entries(r))o.includes(i)&&pe(t,e,n,s.callable,s.delegationSelector)}function fe(t){return t=t.replace(ne,""),se[t]||t}const ge={on(t,e,n,i){he(t,e,n,i,!1)},one(t,e,n,i){he(t,e,n,i,!0)},off(t,e,n,i){if("string"!=typeof e||!t)return;const[r,o,s]=de(e,n,i),a=s!==e,l=ce(t),c=l[s]||{},u=e.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))me(t,l,n,e.slice(1));for(const[n,i]of Object.entries(c)){const r=n.replace(ie,"");a&&!e.includes(r)||pe(t,l,s,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;pe(t,l,s,o,r?n:null)}},trigger(t,e,n){if("string"!=typeof e||!t)return null;const i=Zt();let r=null,o=!0,s=!0,a=!1;e!==fe(e)&&i&&(r=i.Event(e,n),i(t).trigger(r),o=!r.isPropagationStopped(),s=!r.isImmediatePropagationStopped(),a=r.isDefaultPrevented());const l=ve(new Event(e,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&t.dispatchEvent(l),l.defaultPrevented&&r&&r.preventDefault(),l}};function ve(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get(){return i}})}return t}function ye(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 be(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const _e={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${be(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${be(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),e[n]=ye(t.dataset[i])}return e},getDataAttribute(t,e){return ye(t.getAttribute(`data-bs-${be(e)}`))}};class we{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=qt(e)?_e.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...qt(e)?_e.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,i]of Object.entries(e)){const e=t[n],r=qt(e)?"element":$t(e);if(!new RegExp(i).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${i}".`)}}}class ke extends we{constructor(t,e){super(),(t=Vt(t))&&(this._element=t,this._config=this._getConfig(e),Ft.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Ft.remove(this._element,this.constructor.DATA_KEY),ge.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 Ft.get(Vt(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.3.8"}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 Te=t=>{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?e.split(",").map(t=>Rt(t)).join(","):null},Ee={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].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=>!Bt(t)&&zt(t))},getSelectorFromElement(t){const e=Te(t);return e&&Ee.findOne(e)?e:null},getElementFromSelector(t){const e=Te(t);return e?Ee.findOne(e):null},getMultipleElementsFromSelector(t){const e=Te(t);return e?Ee.find(e):[]}},Se=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,i=t.NAME;ge.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Bt(this))return;const r=Ee.getElementFromSelector(this)||this.closest(`.${i}`);t.getOrCreateInstance(r)[e]()})},xe=".bs.alert",De=`close${xe}`,Oe=`closed${xe}`;class Le extends ke{static get NAME(){return"alert"}close(){if(ge.trigger(this._element,De).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(),ge.trigger(this._element,Oe),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Le.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)}})}}Se(Le,"close"),Jt(Le);const Ce='[data-bs-toggle="button"]';class Ae extends ke{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=Ae.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}ge.on(document,"click.bs.button.data-api",Ce,t=>{t.preventDefault();const e=t.target.closest(Ce);Ae.getOrCreateInstance(e).toggle()}),Jt(Ae);const Me=".bs.swipe",Ie=`touchstart${Me}`,Ne=`touchmove${Me}`,Pe=`touchend${Me}`,Fe=`pointerdown${Me}`,je=`pointerup${Me}`,Re={endCallback:null,leftCallback:null,rightCallback:null},$e={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class He extends we{constructor(t,e){super(),this._element=t,t&&He.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Re}static get DefaultType(){return $e}static get NAME(){return"swipe"}dispose(){ge.off(this._element,Me)}_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(),Xt(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&&Xt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ge.on(this._element,Fe,t=>this._start(t)),ge.on(this._element,je,t=>this._end(t)),this._element.classList.add("pointer-event")):(ge.on(this._element,Ie,t=>this._start(t)),ge.on(this._element,Ne,t=>this._move(t)),ge.on(this._element,Pe,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 qe=".bs.carousel",Ve=".data-api",ze="ArrowLeft",Be="ArrowRight",We="next",Ue="prev",Ye="left",Ze="right",Ge=`slide${qe}`,Ke=`slid${qe}`,Je=`keydown${qe}`,Xe=`mouseenter${qe}`,Qe=`mouseleave${qe}`,tn=`dragstart${qe}`,en=`load${qe}${Ve}`,nn=`click${qe}${Ve}`,rn="carousel",on="active",sn=".active",an=".carousel-item",ln=sn+an,cn={[ze]:Ze,[Be]:Ye},un={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},dn={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class hn extends ke{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ee.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===rn&&this.cycle()}static get Default(){return un}static get DefaultType(){return dn}static get NAME(){return"carousel"}next(){this._slide(We)}nextWhenVisible(){!document.hidden&&zt(this._element)&&this.next()}prev(){this._slide(Ue)}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?ge.one(this._element,Ke,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ge.one(this._element,Ke,()=>this.to(t));const n=this._getItemIndex(this._getActive());if(n===t)return;const i=t>n?We:Ue;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&&ge.on(this._element,Je,t=>this._keydown(t)),"hover"===this._config.pause&&(ge.on(this._element,Xe,()=>this.pause()),ge.on(this._element,Qe,()=>this._maybeEnableCycle())),this._config.touch&&He.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Ee.find(".carousel-item img",this._element))ge.on(t,tn,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(Ye)),rightCallback:()=>this._slide(this._directionToOrder(Ze)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new He(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=cn[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=Ee.findOne(sn,this._indicatorsElement);e.classList.remove(on),e.removeAttribute("aria-current");const n=Ee.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);n&&(n.classList.add(on),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===We,r=e||te(this._getItems(),n,i,this._config.wrap);if(r===n)return;const o=this._getItemIndex(r),s=e=>ge.trigger(this._element,e,{relatedTarget:r,direction:this._orderToDirection(t),from:this._getItemIndex(n),to:o});if(s(Ge).defaultPrevented)return;if(!n||!r)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";r.classList.add(c),Yt(r),n.classList.add(l),r.classList.add(l);this._queueCallback(()=>{r.classList.remove(l,c),r.classList.add(on),n.classList.remove(on,c,l),this._isSliding=!1,s(Ke)},n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Ee.findOne(ln,this._element)}_getItems(){return Ee.find(an,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Kt()?t===Ye?Ue:We:t===Ye?We:Ue}_orderToDirection(t){return Kt()?t===Ue?Ye:Ze:t===Ue?Ze:Ye}static jQueryInterface(t){return this.each(function(){const e=hn.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)})}}ge.on(document,nn,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=Ee.getElementFromSelector(this);if(!e||!e.classList.contains(rn))return;t.preventDefault();const n=hn.getOrCreateInstance(e),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===_e.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),ge.on(window,en,()=>{const t=Ee.find('[data-bs-ride="carousel"]');for(const e of t)hn.getOrCreateInstance(e)}),Jt(hn);const pn=".bs.collapse",mn=`show${pn}`,fn=`shown${pn}`,gn=`hide${pn}`,vn=`hidden${pn}`,yn=`click${pn}.data-api`,bn="show",_n="collapse",wn="collapsing",kn=`:scope .${_n} .${_n}`,Tn='[data-bs-toggle="collapse"]',En={parent:null,toggle:!0},Sn={parent:"(null|element)",toggle:"boolean"};class xn extends ke{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Ee.find(Tn);for(const t of n){const e=Ee.getSelectorFromElement(t),n=Ee.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 En}static get DefaultType(){return Sn}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=>xn.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(ge.trigger(this._element,mn).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(_n),this._element.classList.add(wn),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(wn),this._element.classList.add(_n,bn),this._element.style[e]="",ge.trigger(this._element,fn)},this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ge.trigger(this._element,gn).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Yt(this._element),this._element.classList.add(wn),this._element.classList.remove(_n,bn);for(const t of this._triggerArray){const e=Ee.getElementFromSelector(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(wn),this._element.classList.add(_n),ge.trigger(this._element,vn)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(bn)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Vt(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Tn);for(const e of t){const t=Ee.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Ee.find(kn,this._config.parent);return Ee.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=xn.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t]()}})}}ge.on(document,yn,Tn,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of Ee.getMultipleElementsFromSelector(this))xn.getOrCreateInstance(t,{toggle:!1}).toggle()}),Jt(xn);const Dn="dropdown",On=".bs.dropdown",Ln=".data-api",Cn="ArrowUp",An="ArrowDown",Mn=`hide${On}`,In=`hidden${On}`,Nn=`show${On}`,Pn=`shown${On}`,Fn=`click${On}${Ln}`,jn=`keydown${On}${Ln}`,Rn=`keyup${On}${Ln}`,$n="show",Hn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',qn=`${Hn}.${$n}`,Vn=".dropdown-menu",zn=Kt()?"top-end":"top-start",Bn=Kt()?"top-start":"top-end",Wn=Kt()?"bottom-end":"bottom-start",Un=Kt()?"bottom-start":"bottom-end",Yn=Kt()?"left-start":"right-start",Zn=Kt()?"right-start":"left-start",Gn={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Kn={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Jn extends ke{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Ee.next(this._element,Vn)[0]||Ee.prev(this._element,Vn)[0]||Ee.findOne(Vn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Gn}static get DefaultType(){return Kn}static get NAME(){return Dn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ge.trigger(this._element,Nn,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ge.on(t,"mouseover",Ut);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add($n),this._element.classList.add($n),ge.trigger(this._element,Pn,t)}}hide(){if(Bt(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(!ge.trigger(this._element,Mn,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.off(t,"mouseover",Ut);this._popper&&this._popper.destroy(),this._menu.classList.remove($n),this._element.classList.remove($n),this._element.setAttribute("aria-expanded","false"),_e.removeDataAttribute(this._menu,"popper"),ge.trigger(this._element,In,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!qt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Dn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){let t=this._element;"parent"===this._config.reference?t=this._parent:qt(this._config.reference)?t=Vt(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=It(t,this._menu,e)}_isShown(){return this._menu.classList.contains($n)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Yn;if(t.classList.contains("dropstart"))return Zn;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?Bn:zn:e?Un:Wn}_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)&&(_e.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Xt(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const n=Ee.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>zt(t));n.length&&te(n,e,t===An,!n.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Jn.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=Ee.find(qn);for(const n of e){const e=Jn.getInstance(n);if(!e||!1===e._config.autoClose)continue;const i=t.composedPath(),r=i.includes(e._menu);if(i.includes(e._element)||"inside"===e._config.autoClose&&!r||"outside"===e._config.autoClose&&r)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=[Cn,An].includes(t.key);if(!i&&!n)return;if(e&&!n)return;t.preventDefault();const r=this.matches(Hn)?this:Ee.prev(this,Hn)[0]||Ee.next(this,Hn)[0]||Ee.findOne(Hn,t.delegateTarget.parentNode),o=Jn.getOrCreateInstance(r);if(i)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}}ge.on(document,jn,Hn,Jn.dataApiKeydownHandler),ge.on(document,jn,Vn,Jn.dataApiKeydownHandler),ge.on(document,Fn,Jn.clearMenus),ge.on(document,Rn,Jn.clearMenus),ge.on(document,Fn,Hn,function(t){t.preventDefault(),Jn.getOrCreateInstance(this).toggle()}),Jt(Jn);const Xn="backdrop",Qn="show",ti=`mousedown.bs.${Xn}`,ei={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ni={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ii extends we{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ei}static get DefaultType(){return ni}static get NAME(){return Xn}show(t){if(!this._config.isVisible)return void Xt(t);this._append();const e=this._getElement();this._config.isAnimated&&Yt(e),e.classList.add(Qn),this._emulateAnimation(()=>{Xt(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Qn),this._emulateAnimation(()=>{this.dispose(),Xt(t)})):Xt(t)}dispose(){this._isAppended&&(ge.off(this._element,ti),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=Vt(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ge.on(t,ti,()=>{Xt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Qt(t,this._getElement(),this._config.isAnimated)}}const ri=".bs.focustrap",oi=`focusin${ri}`,si=`keydown.tab${ri}`,ai="backward",li={autofocus:!0,trapElement:null},ci={autofocus:"boolean",trapElement:"element"};class ui extends we{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return li}static get DefaultType(){return ci}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ge.off(document,ri),ge.on(document,oi,t=>this._handleFocusin(t)),ge.on(document,si,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ge.off(document,ri))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const n=Ee.focusableChildren(e);0===n.length?e.focus():this._lastTabNavDirection===ai?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?ai:"forward")}}const di=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",hi=".sticky-top",pi="padding-right",mi="margin-right";class fi{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,pi,e=>e+t),this._setElementAttributes(di,pi,e=>e+t),this._setElementAttributes(hi,mi,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,pi),this._resetElementAttributes(di,pi),this._resetElementAttributes(hi,mi)}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 r=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(r))}px`)})}_saveInitialAttribute(t,e){const n=t.style.getPropertyValue(e);n&&_e.setDataAttribute(t,e,n)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const n=_e.getDataAttribute(t,e);null!==n?(_e.removeDataAttribute(t,e),t.style.setProperty(e,n)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(qt(t))e(t);else for(const n of Ee.find(t,this._element))e(n)}}const gi=".bs.modal",vi=`hide${gi}`,yi=`hidePrevented${gi}`,bi=`hidden${gi}`,_i=`show${gi}`,wi=`shown${gi}`,ki=`resize${gi}`,Ti=`click.dismiss${gi}`,Ei=`mousedown.dismiss${gi}`,Si=`keydown.dismiss${gi}`,xi=`click${gi}.data-api`,Di="modal-open",Oi="show",Li="modal-static",Ci={backdrop:!0,focus:!0,keyboard:!0},Ai={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Mi extends ke{constructor(t,e){super(t,e),this._dialog=Ee.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new fi,this._addEventListeners()}static get Default(){return Ci}static get DefaultType(){return Ai}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;ge.trigger(this._element,_i,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Di),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;ge.trigger(this._element,vi).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Oi),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ge.off(window,gi),ge.off(this._dialog,gi),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ii({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ui({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=Ee.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Yt(this._element),this._element.classList.add(Oi);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ge.trigger(this._element,wi,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){ge.on(this._element,Si,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),ge.on(window,ki,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ge.on(this._element,Ei,t=>{ge.one(this._element,Ti,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(Di),this._resetAdjustments(),this._scrollBar.reset(),ge.trigger(this._element,bi)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ge.trigger(this._element,yi).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Li)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Li),this._queueCallback(()=>{this._element.classList.remove(Li),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=Kt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=Kt()?"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=Mi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}})}}ge.on(document,xi,'[data-bs-toggle="modal"]',function(t){const e=Ee.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ge.one(e,_i,t=>{t.defaultPrevented||ge.one(e,bi,()=>{zt(this)&&this.focus()})});const n=Ee.findOne(".modal.show");n&&Mi.getInstance(n).hide();Mi.getOrCreateInstance(e).toggle(this)}),Se(Mi),Jt(Mi);const Ii=".bs.offcanvas",Ni=".data-api",Pi=`load${Ii}${Ni}`,Fi="show",ji="showing",Ri="hiding",$i=".offcanvas.show",Hi=`show${Ii}`,qi=`shown${Ii}`,Vi=`hide${Ii}`,zi=`hidePrevented${Ii}`,Bi=`hidden${Ii}`,Wi=`resize${Ii}`,Ui=`click${Ii}${Ni}`,Yi=`keydown.dismiss${Ii}`,Zi={backdrop:!0,keyboard:!0,scroll:!1},Gi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ki extends ke{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Zi}static get DefaultType(){return Gi}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(ge.trigger(this._element,Hi,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new fi).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ji);this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Fi),this._element.classList.remove(ji),ge.trigger(this._element,qi,{relatedTarget:t})},this._element,!0)}hide(){if(!this._isShown)return;if(ge.trigger(this._element,Vi).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ri),this._backdrop.hide();this._queueCallback(()=>{this._element.classList.remove(Fi,Ri),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new fi).reset(),ge.trigger(this._element,Bi)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new ii({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ge.trigger(this._element,zi)}:null})}_initializeFocusTrap(){return new ui({trapElement:this._element})}_addEventListeners(){ge.on(this._element,Yi,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ge.trigger(this._element,zi))})}static jQueryInterface(t){return this.each(function(){const e=Ki.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)}})}}ge.on(document,Ui,'[data-bs-toggle="offcanvas"]',function(t){const e=Ee.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;ge.one(e,Bi,()=>{zt(this)&&this.focus()});const n=Ee.findOne($i);n&&n!==e&&Ki.getInstance(n).hide();Ki.getOrCreateInstance(e).toggle(this)}),ge.on(window,Pi,()=>{for(const t of Ee.find($i))Ki.getOrCreateInstance(t).show()}),ge.on(window,Wi,()=>{for(const t of Ee.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Ki.getOrCreateInstance(t).hide()}),Se(Ki),Jt(Ki);const Ji={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,tr=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?!Xi.has(n)||Boolean(Qi.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(n))};const er={allowList:Ji,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},nr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ir={entry:"(string|element|function|null)",selector:"(string|element)"};class rr extends we{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return er}static get DefaultType(){return nr}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},ir)}_setContent(t,e,n){const i=Ee.findOne(n,t);i&&((e=this._resolvePossibleFunction(e))?qt(e)?this._putElementInTemplate(Vt(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"),r=[].concat(...i.body.querySelectorAll("*"));for(const t of r){const n=t.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){t.remove();continue}const i=[].concat(...t.attributes),r=[].concat(e["*"]||[],e[n]||[]);for(const e of i)tr(e,r)||t.removeAttribute(e.nodeName)}return i.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Xt(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const or=new Set(["sanitize","allowList","sanitizeFn"]),sr="fade",ar="show",lr=".tooltip-inner",cr=".modal",ur="hide.bs.modal",dr="hover",hr="focus",pr="click",mr={AUTO:"auto",TOP:"top",RIGHT:Kt()?"left":"right",BOTTOM:"bottom",LEFT:Kt()?"right":"left"},fr={allowList:Ji,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},gr={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 vr extends ke{constructor(t,e){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 fr}static get DefaultType(){return gr}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ge.off(this._element.closest(cr),ur,this._hideModalHandler),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=ge.trigger(this._element,this.constructor.eventName("show")),e=(Wt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();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),ge.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ar),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.on(t,"mouseover",Ut);this._queueCallback(()=>{ge.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(ge.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(ar),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.off(t,"mouseover",Ut);this._activeTrigger[pr]=!1,this._activeTrigger[hr]=!1,this._activeTrigger[dr]=!1,this._isHovered=null;this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ge.trigger(this._element,this.constructor.eventName("hidden")))},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(sr,ar),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(sr),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new rr({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[lr]: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(sr)}_isShown(){return this.tip&&this.tip.classList.contains(ar)}_createPopper(t){const e=Xt(this._config.placement,[this,t,this._element]),n=mr[e.toUpperCase()];return It(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 Xt(t,[this._element,this._element])}_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,...Xt(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ge.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[pr]=!(e._isShown()&&e._activeTrigger[pr]),e.toggle()});else if("manual"!==e){const t=e===dr?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=e===dr?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ge.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?hr:dr]=!0,e._enter()}),ge.on(this._element,n,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?hr:dr]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ge.on(this._element.closest(cr),ur,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=_e.getDataAttributes(this._element);for(const t of Object.keys(e))or.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:Vt(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,n]of Object.entries(this._config))this.constructor.Default[e]!==n&&(t[e]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=vr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Jt(vr);const yr=".popover-header",br=".popover-body",_r={...vr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},wr={...vr.DefaultType,content:"(null|string|element|function)"};class kr extends vr{static get Default(){return _r}static get DefaultType(){return wr}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[yr]:this._getTitle(),[br]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=kr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Jt(kr);const Tr=".bs.scrollspy",Er=`activate${Tr}`,Sr=`click${Tr}`,xr=`load${Tr}.data-api`,Dr="active",Or="[href]",Lr=".nav-link",Cr=`${Lr}, .nav-item > ${Lr}, .list-group-item`,Ar={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Mr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ir extends ke{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 Ar}static get DefaultType(){return Mr}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=Vt(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&&(ge.off(this._config.target,Sr),ge.on(this._config.target,Sr,Or,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,r=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(r&&t){if(n(o),!i)return}else r||t||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Ee.find(Or,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=Ee.findOne(decodeURI(e.hash),this._element);zt(t)&&(this._targetLinks.set(decodeURI(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(Dr),this._activateParents(t),ge.trigger(this._element,Er,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Ee.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Dr);else for(const e of Ee.parents(t,".nav, .list-group"))for(const t of Ee.prev(e,Cr))t.classList.add(Dr)}_clearActiveClass(t){t.classList.remove(Dr);const e=Ee.find(`${Or}.${Dr}`,t);for(const t of e)t.classList.remove(Dr)}static jQueryInterface(t){return this.each(function(){const e=Ir.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]()}})}}ge.on(window,xr,()=>{for(const t of Ee.find('[data-bs-spy="scroll"]'))Ir.getOrCreateInstance(t)}),Jt(Ir);const Nr=".bs.tab",Pr=`hide${Nr}`,Fr=`hidden${Nr}`,jr=`show${Nr}`,Rr=`shown${Nr}`,$r=`click${Nr}`,Hr=`keydown${Nr}`,qr=`load${Nr}`,Vr="ArrowLeft",zr="ArrowRight",Br="ArrowUp",Wr="ArrowDown",Ur="Home",Yr="End",Zr="active",Gr="fade",Kr="show",Jr=".dropdown-toggle",Xr=`:not(${Jr})`,Qr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',to=`${`.nav-link${Xr}, .list-group-item${Xr}, [role="tab"]${Xr}`}, ${Qr}`,eo=`.${Zr}[data-bs-toggle="tab"], .${Zr}[data-bs-toggle="pill"], .${Zr}[data-bs-toggle="list"]`;class no extends ke{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ge.on(this._element,Hr,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?ge.trigger(e,Pr,{relatedTarget:t}):null;ge.trigger(t,jr,{relatedTarget:e}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Zr),this._activate(Ee.getElementFromSelector(t));this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ge.trigger(t,Rr,{relatedTarget:e})):t.classList.add(Kr)},t,t.classList.contains(Gr))}_deactivate(t,e){if(!t)return;t.classList.remove(Zr),t.blur(),this._deactivate(Ee.getElementFromSelector(t));this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ge.trigger(t,Fr,{relatedTarget:e})):t.classList.remove(Kr)},t,t.classList.contains(Gr))}_keydown(t){if(![Vr,zr,Br,Wr,Ur,Yr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!Bt(t));let n;if([Ur,Yr].includes(t.key))n=e[t.key===Ur?0:e.length-1];else{const i=[zr,Wr].includes(t.key);n=te(e,t.target,i,!0)}n&&(n.focus({preventScroll:!0}),no.getOrCreateInstance(n).show())}_getChildren(){return Ee.find(to,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=Ee.getElementFromSelector(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 r=Ee.findOne(t,n);r&&r.classList.toggle(i,e)};i(Jr,Zr),i(".dropdown-menu",Kr),n.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,n){t.hasAttribute(e)||t.setAttribute(e,n)}_elemIsActive(t){return t.classList.contains(Zr)}_getInnerElement(t){return t.matches(to)?t:Ee.findOne(to,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=no.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}ge.on(document,$r,Qr,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||no.getOrCreateInstance(this).show()}),ge.on(window,qr,()=>{for(const t of Ee.find(eo))no.getOrCreateInstance(t)}),Jt(no);const io=".bs.toast",ro=`mouseover${io}`,oo=`mouseout${io}`,so=`focusin${io}`,ao=`focusout${io}`,lo=`hide${io}`,co=`hidden${io}`,uo=`show${io}`,ho=`shown${io}`,po="hide",mo="show",fo="showing",go={animation:"boolean",autohide:"boolean",delay:"number"},vo={animation:!0,autohide:!0,delay:5e3};class yo extends ke{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return vo}static get DefaultType(){return go}static get NAME(){return"toast"}show(){if(ge.trigger(this._element,uo).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(po),Yt(this._element),this._element.classList.add(mo,fo),this._queueCallback(()=>{this._element.classList.remove(fo),ge.trigger(this._element,ho),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(ge.trigger(this._element,lo).defaultPrevented)return;this._element.classList.add(fo),this._queueCallback(()=>{this._element.classList.add(po),this._element.classList.remove(fo,mo),ge.trigger(this._element,co)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(mo),super.dispose()}isShown(){return this._element.classList.contains(mo)}_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(){ge.on(this._element,ro,t=>this._onInteraction(t,!0)),ge.on(this._element,oo,t=>this._onInteraction(t,!1)),ge.on(this._element,so,t=>this._onInteraction(t,!0)),ge.on(this._element,ao,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=yo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}Se(yo),Jt(yo)},837:function(t){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));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 r=[],o=null;null!=(o=t.regex.exec(n));)"\\"!==o[1]&&r.push(o);if(r.length){var s={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};r[0].index>0&&(s.value+=".*?");for(var a=0,l=Object.entries(r);a<l.length;a++){var c=l[a],u=c[0],d=c[1],h=Number(u),p=t.formatPatterns(d[0],i),m=p.group,f=p.pattern;s[m]=h+1,s.value+=f,s.value+=".*?"}var g=new RegExp("^"+s.value+"$");if(g.test(e)){var v=g.exec(e),y=Number(v[s.year]),b=null;s.month?b=Number(v[s.month])-1:s.shortMonth?b=t.shortMonths(i).indexOf(v[s.shortMonth]):s.longMonth&&(b=t.longMonths(i).indexOf(v[s.longMonth]));var _=Number(v[s.day])||1;return new Date(y,b,_,0,0,0,0)}}}return t.getDateZeroTime(new Date(e))},t.convertArray=function(e,n){return e.map(function(e){return e instanceof Array?e.map(function(e){return new t(e,n)}):new t(e,n)})},t.getDateZeroTime=function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)},t.shortMonths=function(e){return t.MONTH_JS.map(function(t){return new Date(2019,t).toLocaleString(e,{month:"short"})})},t.longMonths=function(e){return t.MONTH_JS.map(function(t){return new Date(2019,t).toLocaleString(e,{month:"long"})})},t.formatPatterns=function(e,n){switch(e){case"YY":case"YYYY":return{group:"year",pattern:"(\\d{"+e.length+"})"};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:"("+t.shortMonths(n).join("|")+")"};case"MMMM":return{group:"longMonth",pattern:"("+t.longMonths(n).join("|")+")"};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"}}},t.prototype.toJSDate=function(){return this.dateInstance},t.prototype.toLocaleString=function(t,e){return this.dateInstance.toLocaleString(t,e)},t.prototype.toDateString=function(){return this.dateInstance.toDateString()},t.prototype.getSeconds=function(){return this.dateInstance.getSeconds()},t.prototype.getDay=function(){return this.dateInstance.getDay()},t.prototype.getTime=function(){return this.dateInstance.getTime()},t.prototype.getDate=function(){return this.dateInstance.getDate()},t.prototype.getMonth=function(){return this.dateInstance.getMonth()},t.prototype.getFullYear=function(){return this.dateInstance.getFullYear()},t.prototype.setMonth=function(t){return this.dateInstance.setMonth(t)},t.prototype.setHours=function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.dateInstance.setHours(t,e,n,i)},t.prototype.setSeconds=function(t){return this.dateInstance.setSeconds(t)},t.prototype.setDate=function(t){return this.dateInstance.setDate(t)},t.prototype.setFullYear=function(t){return this.dateInstance.setFullYear(t)},t.prototype.getWeek=function(t){var e=new Date(this.timestamp()),n=(this.getDay()+(7-t))%7;e.setDate(e.getDate()-n);var i=e.getTime();return e.setMonth(0,1),e.getDay()!==t&&e.setMonth(0,1+(4-e.getDay()+7)%7),1+Math.ceil((i-e.getTime())/6048e5)},t.prototype.clone=function(){return new t(this.toJSDate())},t.prototype.isBetween=function(t,e,n){switch(void 0===n&&(n="()"),n){default:case"()":return this.timestamp()>t.getTime()&&this.timestamp()<e.getTime();case"[)":return this.timestamp()>=t.getTime()&&this.timestamp()<e.getTime();case"(]":return 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="",r=[],o=null;null!=(o=t.regex.exec(e));)"\\"!==o[1]&&r.push(o);if(r.length){r[0].index>0&&(i+=e.substring(0,r[0].index));for(var s=0,a=Object.entries(r);s<a.length;s++){var l=a[s],c=l[0],u=l[1],d=Number(c);i+=this.formatTokens(u[0],n),r[d+1]&&(i+=e.substring(u.index+u[0].length,r[d+1].index)),d===r.length-1&&(i+=e.substring(u.index+u[0].length))}}return i.replace(/\\/g,"")},t.prototype.timestamp=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()},t.prototype.formatTokens=function(e,n){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return("0"+(this.getMonth()+1)).slice(-2);case"MMM":return t.shortMonths(n)[this.getMonth()];case"MMMM":return t.longMonths(n)[this.getMonth()];case"D":return String(this.getDate());case"DD":return("0"+this.getDate()).slice(-2);default:return""}},t.regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,t.MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11],t}();e.DateTime=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5),a=n(0),l=n(3),c=n(2),u=function(t){function e(e){var n=t.call(this,e)||this;return n.preventClick=!1,n.bindEvents(),n}return r(e,t),e.prototype.scrollToDate=function(t){if(this.options.scrollToDate){var e=this.options.startDate instanceof a.DateTime?this.options.startDate.clone():null,n=this.options.endDate instanceof a.DateTime?this.options.endDate.clone():null;!this.options.startDate||t&&t!==this.options.element?t&&this.options.endDate&&t===this.options.elementEnd&&(n.setDate(1),this.options.numberOfMonths>1&&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,r=this.options.switchingMonths||this.options.numberOfMonths;if(this.options.splitView){var s=e.closest("."+l.monthItem);i=c.findNestedMonthItem(s),r=1}return this.calendars[i].setMonth(this.calendars[i].getMonth()-r),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,r=this.options.switchingMonths||this.options.numberOfMonths,this.options.splitView&&(s=e.closest("."+l.monthItem),i=c.findNestedMonthItem(s),r=1),this.calendars[i].setMonth(this.calendars[i].getMonth()+r),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(),r=n.getBoundingClientRect(),o=t.getBoundingClientRect(),s=o.top,a=o.left;if(this.options.inlineMode&&this.options.parentEl){var c=this.ui.parentNode.getBoundingClientRect();s-=c.top,a-=c.left}else s-=i.top,a-=i.left;s-=r.height,a-=r.width/2,a+=o.width/2,n.style.top=s+"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()+'"]'),r=this.datePicked[0].clone(),o=new a.DateTime(n.dataset.time),s=!1;if(r.getTime()>o.getTime()){var c=r.clone();r=o.clone(),o=c.clone(),s=!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(r,o)&&i.classList.add(l.isInRange),t.className=i.className}),n.classList.add(l.isEndDate),s?(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(r,"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],r=this.options.format;if(this.options.elementEnd?n instanceof a.DateTime&&i instanceof a.DateTime&&n.format(r)===this.options.element.value&&i.format(r)===this.options.elementEnd.value:this.options.singleMode?n instanceof a.DateTime&&n.format(r)===this.options.element.value:n instanceof a.DateTime&&i instanceof a.DateTime&&""+n.format(r)+this.options.delimiter+i.format(r)===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 s=n.clone(),l=0;(this.options.elementEnd?n.format(r)===t.target.value:t.target.value.startsWith(n.format(r)))||(s=i.clone(),l=this.options.numberOfMonths-1),this.emit("selected",this.getStartDate(),this.getEndDate()),this.gotoDate(s,l)}},e}(s.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;n<e.length;n+=1)if(e.item(n)===t)return n;return 0},e.dateIsLocked=function(t,e,n){var i=!1;return e.lockDays.length&&(i=e.lockDays.filter(function(n){return n instanceof Array?t.isBetween(n[0],n[1],e.lockDaysInclusivity):n.isSame(t,"day")}).length),i||"function"!=typeof e.lockDaysFilter||(i=e.lockDaysFilter.call(this,t.clone(),null,n)),i},e.rangeIsLocked=function(t,e){var n=!1;return e.lockDays.length&&(n=e.lockDays.filter(function(n){if(n instanceof Array){var i=t[0].toDateString()===n[0].toDateString()&&t[1].toDateString()===n[1].toDateString();return n[0].isBetween(t[0],t[1],e.lockDaysInclusivity)||n[1].isBetween(t[0],t[1],e.lockDaysInclusivity)||i}return n.isBetween(t[0],t[1],e.lockDaysInclusivity)}).length),n||"function"!=typeof e.lockDaysFilter||(n=e.lockDaysFilter.call(this,t[0].clone(),t[1].clone(),t)),n}},function(t,e,n){var i=n(8);"string"==typeof i&&(i=[[t.i,i,""]]);var r={insert:function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};n(10)(i,r),i.locals&&(t.exports=i.locals)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);e.Litepicker=i.Litepicker,n(11),window.Litepicker=i.Litepicker,e.default=i.Litepicker},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),s=n(0),a=n(3),l=n(2),c=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.render=function(){var t=this;this.emit("before:render",this.ui);var e=document.createElement("div");e.className=a.containerMain;var n=document.createElement("div");n.className=a.containerMonths,a["columns"+this.options.numberOfColumns]&&(n.classList.remove(a.columns2,a.columns3,a.columns4),n.classList.add(a["columns"+this.options.numberOfColumns])),this.options.splitView&&n.classList.add(a.splitView),this.options.showWeekNumbers&&n.classList.add(a.showWeekNumbers);for(var i=this.calendars[0].clone(),r=i.getMonth(),o=i.getMonth()+this.options.numberOfMonths,s=0,l=r;l<o;l+=1){var c=i.clone();c.setDate(1),c.setHours(0,0,0,0),this.options.splitView?c=this.calendars[s].clone():c.setMonth(l),n.appendChild(this.renderMonth(c,s)),s+=1}if(this.ui.innerHTML="",e.appendChild(n),this.options.resetButton){var u=void 0;"function"==typeof this.options.resetButton?u=this.options.resetButton.call(this):((u=document.createElement("button")).type="button",u.className=a.resetButton,u.innerHTML=this.options.buttonText.reset),u.addEventListener("click",function(e){e.preventDefault(),t.clearSelection()}),e.querySelector("."+a.monthItem+":last-child").querySelector("."+a.monthItemHeader).appendChild(u)}this.ui.appendChild(e),this.options.autoApply&&!this.options.footerHTML||this.ui.appendChild(this.renderFooter()),this.options.showTooltip&&this.ui.appendChild(this.renderTooltip()),this.ui.dataset.plugins=(this.options.plugins||[]).join("|"),this.emit("render",this.ui)},e.prototype.renderMonth=function(t,e){var n=this,i=t.clone(),r=32-new Date(i.getFullYear(),i.getMonth(),32).getDate(),o=document.createElement("div");o.className=a.monthItem;var c=document.createElement("div");c.className=a.monthItemHeader;var u=document.createElement("div");if(this.options.dropdowns.months){var d=document.createElement("select");d.className=a.monthItemName;for(var h=0;h<12;h+=1){var p=document.createElement("option"),m=new s.DateTime(new Date(t.getFullYear(),h,2,0,0,0)),f=new s.DateTime(new Date(t.getFullYear(),h,1,0,0,0));p.value=String(h),p.text=m.toLocaleString(this.options.lang,{month:"long"}),p.disabled=this.options.minDate&&f.isBefore(new s.DateTime(this.options.minDate),"month")||this.options.maxDate&&f.isAfter(new s.DateTime(this.options.maxDate),"month"),p.selected=f.getMonth()===t.getMonth(),d.appendChild(p)}d.addEventListener("change",function(t){var e=t.target,i=0;if(n.options.splitView){var r=e.closest("."+a.monthItem);i=l.findNestedMonthItem(r)}n.calendars[i].setMonth(Number(e.value)),n.render(),n.emit("change:month",n.calendars[i],i,t)}),u.appendChild(d)}else(m=document.createElement("strong")).className=a.monthItemName,m.innerHTML=t.toLocaleString(this.options.lang,{month:"long"}),u.appendChild(m);if(this.options.dropdowns.years){var g=document.createElement("select");g.className=a.monthItemYear;var v=this.options.dropdowns.minYear,y=this.options.dropdowns.maxYear?this.options.dropdowns.maxYear:(new Date).getFullYear();for(t.getFullYear()>y&&((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 s.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 s.DateTime(this.options.minDate),"year")||this.options.maxDate&&b.isAfter(new s.DateTime(this.options.maxDate),"year"),p.selected=t.getFullYear()===h,g.appendChild(p)}if(t.getFullYear()<v&&((p=document.createElement("option")).value=String(t.getFullYear()),p.text=String(t.getFullYear()),p.selected=!0,p.disabled=!0,g.appendChild(p)),"asc"===this.options.dropdowns.years){var _=Array.prototype.slice.call(g.childNodes).reverse();g.innerHTML="",_.forEach(function(t){t.innerHTML=t.value,g.appendChild(t)})}g.addEventListener("change",function(t){var e=t.target,i=0;if(n.options.splitView){var r=e.closest("."+a.monthItem);i=l.findNestedMonthItem(r)}n.calendars[i].setFullYear(Number(e.value)),n.render(),n.emit("change:year",n.calendars[i],i,t)}),u.appendChild(g)}else{var w=document.createElement("span");w.className=a.monthItemYear,w.innerHTML=String(t.getFullYear()),u.appendChild(w)}var k=document.createElement("button");k.type="button",k.className=a.buttonPreviousMonth,k.innerHTML=this.options.buttonText.previousMonth;var T=document.createElement("button");T.type="button",T.className=a.buttonNextMonth,T.innerHTML=this.options.buttonText.nextMonth,c.appendChild(k),c.appendChild(u),c.appendChild(T),this.options.minDate&&i.isSameOrBefore(new s.DateTime(this.options.minDate),"month")&&o.classList.add(a.noPreviousMonth),this.options.maxDate&&i.isSameOrAfter(new s.DateTime(this.options.maxDate),"month")&&o.classList.add(a.noNextMonth);var E=document.createElement("div");E.className=a.monthItemWeekdaysRow,this.options.showWeekNumbers&&(E.innerHTML="<div>W</div>");for(var S=1;S<=7;S+=1){var x=3+this.options.firstDay+S,D=document.createElement("div");D.innerHTML=this.weekdayName(x),D.title=this.weekdayName(x,"long"),E.appendChild(D)}var O=document.createElement("div");O.className=a.containerDays;var L=this.calcSkipDays(i);this.options.showWeekNumbers&&L&&O.appendChild(this.renderWeekNumber(i));for(var C=0;C<L;C+=1){var A=document.createElement("div");O.appendChild(A)}for(C=1;C<=r;C+=1)i.setDate(C),this.options.showWeekNumbers&&i.getDay()===this.options.firstDay&&O.appendChild(this.renderWeekNumber(i)),O.appendChild(this.renderDay(i));return o.appendChild(c),o.appendChild(E),o.appendChild(O),this.emit("render:month",o,t),o},e.prototype.renderDay=function(t){t.setHours();var e=document.createElement("div");if(e.className=a.dayItem,e.innerHTML=String(t.getDate()),e.dataset.time=String(t.getTime()),t.toDateString()===(new Date).toDateString()&&e.classList.add(a.isToday),this.datePicked.length)this.datePicked[0].toDateString()===t.toDateString()&&(e.classList.add(a.isStartDate),this.options.singleMode&&e.classList.add(a.isEndDate)),2===this.datePicked.length&&this.datePicked[1].toDateString()===t.toDateString()&&e.classList.add(a.isEndDate),2===this.datePicked.length&&t.isBetween(this.datePicked[0],this.datePicked[1])&&e.classList.add(a.isInRange);else if(this.options.startDate){var n=this.options.startDate,i=this.options.endDate;n.toDateString()===t.toDateString()&&(e.classList.add(a.isStartDate),this.options.singleMode&&e.classList.add(a.isEndDate)),i&&i.toDateString()===t.toDateString()&&e.classList.add(a.isEndDate),n&&i&&t.isBetween(n,i)&&e.classList.add(a.isInRange)}if(this.options.minDate&&t.isBefore(new s.DateTime(this.options.minDate))&&e.classList.add(a.isLocked),this.options.maxDate&&t.isAfter(new s.DateTime(this.options.maxDate))&&e.classList.add(a.isLocked),this.options.minDays>1&&1===this.datePicked.length){var r=this.options.minDays-1,o=this.datePicked[0].clone().subtract(r,"day"),c=this.datePicked[0].clone().add(r,"day");t.isBetween(o,this.datePicked[0],"(]")&&e.classList.add(a.isLocked),t.isBetween(this.datePicked[0],c,"[)")&&e.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var u=this.options.maxDays;o=this.datePicked[0].clone().subtract(u,"day"),c=this.datePicked[0].clone().add(u,"day"),t.isSameOrBefore(o)&&e.classList.add(a.isLocked),t.isSameOrAfter(c)&&e.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(a.isLocked),l.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter(function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")}).length&&e.classList.add(a.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=a.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n <span class="'+a.previewDateRange+'"></span>\n <button type="button" class="'+a.buttonCancel+'">'+this.options.buttonText.cancel+'</button>\n <button type="button" class="'+a.buttonApply+'">'+this.options.buttonText.apply+"</button>\n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var n=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=""+e+this.options.delimiter+n}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),n=t.getWeek(this.options.firstDay);return e.className=a.weekNumber,e.innerHTML=53===n&&0===t.getMonth()?"53 / 1":n,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=a.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(o.LPCore);e.Calendar=c},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7),a=n(0),l=n(1),c=function(t){function e(e){var n=t.call(this)||this;n.datePicked=[],n.calendars=[],n.options={element:null,elementEnd:null,parentEl:null,firstDay:1,format:"YYYY-MM-DD",lang:"en-US",delimiter:" - ",numberOfMonths:1,numberOfColumns:1,startDate:null,endDate:null,zIndex:9999,position:"auto",selectForward:!1,selectBackward:!1,splitView:!1,inlineMode:!1,singleMode:!0,autoApply:!0,allowRepick:!1,showWeekNumbers:!1,showTooltip:!0,scrollToDate:!0,mobileFriendly:!0,resetButton:!1,autoRefresh:!1,lockDaysFormat:"YYYY-MM-DD",lockDays:[],disallowLockDaysInRange:!1,lockDaysInclusivity:"[]",highlightedDaysFormat:"YYYY-MM-DD",highlightedDays:[],dropdowns:{minYear:1990,maxYear:null,months:!1,years:!1},buttonText:{apply:"Apply",cancel:"Cancel",previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>\n </svg>'},tooltipText:{one:"day",other:"days"}},n.options=o(o({},n.options),e.element.dataset),Object.keys(n.options).forEach(function(t){"true"!==n.options[t]&&"false"!==n.options[t]||(n.options[t]="true"===n.options[t])});var i=o(o({},n.options.dropdowns),e.dropdowns),r=o(o({},n.options.buttonText),e.buttonText),s=o(o({},n.options.tooltipText),e.tooltipText);n.options=o(o({},n.options),e),n.options.dropdowns=o({},i),n.options.buttonText=o({},r),n.options.tooltipText=o({},s),n.options.elementEnd||(n.options.allowRepick=!1),n.options.lockDays.length&&(n.options.lockDays=a.DateTime.convertArray(n.options.lockDays,n.options.lockDaysFormat)),n.options.highlightedDays.length&&(n.options.highlightedDays=a.DateTime.convertArray(n.options.highlightedDays,n.options.highlightedDaysFormat));var l=n.parseInput(),c=l[0],u=l[1];n.options.startDate&&(n.options.singleMode||n.options.endDate)&&(c=new a.DateTime(n.options.startDate,n.options.format,n.options.lang)),c&&n.options.endDate&&(u=new a.DateTime(n.options.endDate,n.options.format,n.options.lang)),c instanceof a.DateTime&&!isNaN(c.getTime())&&(n.options.startDate=c),n.options.startDate&&u instanceof a.DateTime&&!isNaN(u.getTime())&&(n.options.endDate=u),!n.options.singleMode||n.options.startDate instanceof a.DateTime||(n.options.startDate=null),n.options.singleMode||n.options.startDate instanceof a.DateTime&&n.options.endDate instanceof a.DateTime||(n.options.startDate=null,n.options.endDate=null);for(var d=0;d<n.options.numberOfMonths;d+=1){var h=n.options.startDate instanceof a.DateTime?n.options.startDate.clone():new a.DateTime;if(!n.options.startDate&&(0===d||n.options.splitView)){var p=n.options.maxDate?new a.DateTime(n.options.maxDate):null,m=n.options.minDate?new a.DateTime(n.options.minDate):null,f=n.options.numberOfMonths-1;m&&p&&h.isAfter(p)?(h=m.clone()).setDate(1):!m&&p&&h.isAfter(p)&&((h=p.clone()).setDate(1),h.setMonth(h.getMonth()-f))}h.setDate(1),h.setMonth(h.getMonth()+d),n.calendars[d]=h}if(n.options.showTooltip)if(n.options.tooltipPluralSelector)n.pluralSelector=n.options.tooltipPluralSelector;else try{var g=new Intl.PluralRules(n.options.lang);n.pluralSelector=g.select.bind(g)}catch(t){n.pluralSelector=function(t){return 0===Math.abs(t)?"one":"other"}}return n}return r(e,t),e.add=function(t,e){l.Litepicker.prototype[t]=e},e.prototype.DateTime=function(t,e){return t?new a.DateTime(t,e):new a.DateTime},e.prototype.init=function(){var t=this;this.options.plugins&&this.options.plugins.length&&this.options.plugins.forEach(function(e){l.Litepicker.prototype.hasOwnProperty(e)?l.Litepicker.prototype[e].init.call(t,t):console.warn("Litepicker: plugin «"+e+"» not found.")})},e.prototype.parseInput=function(){var t=this.options.delimiter,e=new RegExp(""+t),n=this.options.element instanceof HTMLInputElement?this.options.element.value.split(t):[];if(this.options.elementEnd){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length)return[new a.DateTime(this.options.element.value,this.options.format),new a.DateTime(this.options.elementEnd.value,this.options.format)]}else if(this.options.singleMode){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length)return[new a.DateTime(this.options.element.value,this.options.format)]}else if(this.options.element instanceof HTMLInputElement&&e.test(this.options.element.value)&&n.length&&n.length%2==0){var i=n.slice(0,n.length/2).join(t),r=n.slice(n.length/2).join(t);return[new a.DateTime(i,this.options.format),new a.DateTime(r,this.options.format)]}return[]},e.prototype.isShowning=function(){return this.ui&&"none"!==this.ui.style.display},e.prototype.findPosition=function(t){var e=t.getBoundingClientRect(),n=this.ui.getBoundingClientRect(),i=this.options.position.split(" "),r=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset,s=0,a=0;if("auto"!==i[0]&&/top|bottom/.test(i[0]))s=e[i[0]]+o,"top"===i[0]&&(s-=n.height);else{s=e.bottom+o;var l=e.bottom+n.height>window.innerHeight,c=e.top+o-n.height>=n.height;l&&c&&(s=e.top+o-n.height)}if(/left|right/.test(i[0])||i[1]&&"auto"!==i[1]&&/left|right/.test(i[1]))a=/left|right/.test(i[0])?e[i[0]]+r:e[i[1]]+r,"right"!==i[0]&&"right"!==i[1]||(a-=n.width);else{a=e.left+r,l=e.left+n.width>window.innerWidth;var u=e.right+r-n.width>=0;l&&u&&(a=e.right+r-n.width)}return{left:a,top:s}},e}(s.EventEmitter);e.LPCore=c},function(t,e,n){"use strict";var i,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,n,i){var r,o,s,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(t))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function d(){for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,t))}function h(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},r=d.bind(i);return r.listener=n,i.wrapFn=r,r}function p(t,e,n){var i=t._events;if(void 0===i)return[];var r=i[e];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(r):f(r,r.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");l=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,r=this._events;if(void 0!==r)i=i&&void 0===r.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=r[t];if(void 0===l)return!1;if("function"==typeof l)o(l,this,e);else{var c=l.length,u=f(l,c);for(n=0;n<c;++n)o(u[n],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.on(t,h(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.prependListener(t,h(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,i,r,o,s;if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);if(void 0===(i=this._events))return this;if(void 0===(n=i[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,r),1===n.length&&(i[t]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){(e=n(9)(!1)).push([t.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n,i,r,o=t[1]||"",s=t[3];if(!s)return o;if(e&&"function"==typeof btoa){var a=(n=s,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),l=s.sources.map(function(t){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(t," */")});return[o].concat(l).concat([a]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n}).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";var i,r={},o=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},s=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}();function a(t,e){for(var n=[],i={},r=0;r<t.length;r++){var o=t[r],s=e.base?o[0]+e.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};i[s]?i[s].parts.push(a):n.push(i[s]={id:s,parts:[a]})}return n}function l(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=r[i.id],s=0;if(o){for(o.refs++;s<o.parts.length;s++)o.parts[s](i.parts[s]);for(;s<i.parts.length;s++)o.parts.push(g(i.parts[s],e))}else{for(var a=[];s<i.parts.length;s++)a.push(g(i.parts[s],e));r[i.id]={id:i.id,refs:1,parts:a}}}}function c(t){var e=document.createElement("style");if(void 0===t.attributes.nonce){var i=n.nc;i&&(t.attributes.nonce=i)}if(Object.keys(t.attributes).forEach(function(n){e.setAttribute(n,t.attributes[n])}),"function"==typeof t.insert)t.insert(e);else{var r=s(t.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(e)}return e}var u,d=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function h(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=d(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function p(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r&&t.setAttribute("media",r),o&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var m=null,f=0;function g(t,e){var n,i,r;if(e.singleton){var o=f++;n=m||(m=c(e)),i=h.bind(null,n,o,!1),r=h.bind(null,n,o,!0)}else n=c(e),i=p.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).attributes="object"==typeof e.attributes?e.attributes:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o());var n=a(t,e);return l(n,e),function(t){for(var i=[],o=0;o<n.length;o++){var s=n[o],c=r[s.id];c&&(c.refs--,i.push(c))}t&&l(a(t,e),e);for(var u=0;u<i.length;u++){var d=i[u];if(0===d.refs){for(var h=0;h<d.parts.length;h++)d.parts[h]();delete r[d.id]}}}}},function(t,e,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),s=n(2);o.Litepicker.prototype.show=function(t){void 0===t&&(t=null),this.emit("before:show",t);var e=t||this.options.element;if(this.triggerElement=e,!this.isShowning()){if(this.options.inlineMode)return this.ui.style.position="relative",this.ui.style.display="inline-block",this.ui.style.top=null,this.ui.style.left=null,this.ui.style.bottom=null,void(this.ui.style.right=null);this.scrollToDate(t),this.render(),this.ui.style.position="absolute",this.ui.style.display="block",this.ui.style.zIndex=this.options.zIndex;var n=this.findPosition(e);this.ui.style.top=n.top+"px",this.ui.style.left=n.left+"px",this.ui.style.right=null,this.ui.style.bottom=null,this.emit("show",t)}},o.Litepicker.prototype.hide=function(){this.isShowning()&&(this.datePicked.length=0,this.updateInput(),this.options.inlineMode?this.render():(this.ui.style.display="none",this.emit("hide")))},o.Litepicker.prototype.getDate=function(){return this.getStartDate()},o.Litepicker.prototype.getStartDate=function(){return this.options.startDate?this.options.startDate.clone():null},o.Litepicker.prototype.getEndDate=function(){return this.options.endDate?this.options.endDate.clone():null},o.Litepicker.prototype.setDate=function(t,e){void 0===e&&(e=!1);var n=new r.DateTime(t,this.options.format,this.options.lang);s.dateIsLocked(n,this.options,[n])&&!e?this.emit("error:date",n):(this.setStartDate(t),this.options.inlineMode&&this.render(),this.emit("selected",this.getDate()))},o.Litepicker.prototype.setStartDate=function(t){t&&(this.options.startDate=new r.DateTime(t,this.options.format,this.options.lang),this.updateInput())},o.Litepicker.prototype.setEndDate=function(t){t&&(this.options.endDate=new r.DateTime(t,this.options.format,this.options.lang),this.options.startDate.getTime()>this.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new r.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},o.Litepicker.prototype.setDateRange=function(t,e,n){void 0===n&&(n=!1),this.triggerElement=void 0;var i=new r.DateTime(t,this.options.format,this.options.lang),o=new r.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?s.rangeIsLocked([i,o],this.options):s.dateIsLocked(i,this.options,[i,o])||s.dateIsLocked(o,this.options,[i,o]))&&!n?this.emit("error:range",[i,o]):(this.setStartDate(i),this.setEndDate(o),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},o.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var n=new r.DateTime(t);n.setDate(1),this.calendars[e]=n.clone(),this.render()},o.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=r.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},o.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=r.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},o.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new r.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new r.DateTime(t.endDate,this.options.format,this.options.lang));var e=i(i({},this.options.dropdowns),t.dropdowns),n=i(i({},this.options.buttonText),t.buttonText),o=i(i({},this.options.tooltipText),t.tooltipText);this.options=i(i({},this.options),t),this.options.dropdowns=i({},e),this.options.buttonText=i({},n),this.options.tooltipText=i({},o),!this.options.singleMode||this.options.startDate instanceof r.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof r.DateTime&&this.options.endDate instanceof r.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var s=0;s<this.options.numberOfMonths;s+=1){var a=this.options.startDate?this.options.startDate.clone():new r.DateTime;a.setDate(1),a.setMonth(a.getMonth()+s),this.calendars[s]=a}this.options.lockDays.length&&(this.options.lockDays=r.DateTime.convertArray(this.options.lockDays,this.options.lockDaysFormat)),this.options.highlightedDays.length&&(this.options.highlightedDays=r.DateTime.convertArray(this.options.highlightedDays,this.options.highlightedDaysFormat)),this.render(),this.options.inlineMode&&this.show(),this.updateInput()},o.Litepicker.prototype.clearSelection=function(){this.options.startDate=null,this.options.endDate=null,this.datePicked.length=0,this.updateInput(),this.isShowning()&&this.render(),this.emit("clear:selection")},o.Litepicker.prototype.destroy=function(){this.ui&&this.ui.parentNode&&(this.ui.parentNode.removeChild(this.ui),this.ui=null),this.emit("destroy")}}])},6311:function(){!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}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 r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));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=5)}([function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n,i,r,o=t[1]||"",s=t[3];if(!s)return o;if(e&&"function"==typeof btoa){var a=(n=s,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),l=s.sources.map(function(t){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(t," */")});return[o].concat(l).concat([a]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n}).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(r[s]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";var i,r={},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}();function s(t,e){for(var n=[],i={},r=0;r<t.length;r++){var o=t[r],s=e.base?o[0]+e.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};i[s]?i[s].parts.push(a):n.push(i[s]={id:s,parts:[a]})}return n}function a(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=r[i.id],s=0;if(o){for(o.refs++;s<o.parts.length;s++)o.parts[s](i.parts[s]);for(;s<i.parts.length;s++)o.parts.push(f(i.parts[s],e))}else{for(var a=[];s<i.parts.length;s++)a.push(f(i.parts[s],e));r[i.id]={id:i.id,refs:1,parts:a}}}}function l(t){var e=document.createElement("style");if(void 0===t.attributes.nonce){var i=n.nc;i&&(t.attributes.nonce=i)}if(Object.keys(t.attributes).forEach(function(n){e.setAttribute(n,t.attributes[n])}),"function"==typeof t.insert)t.insert(e);else{var r=o(t.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(e)}return e}var c,u=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function d(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=u(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function h(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r&&t.setAttribute("media",r),o&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var p=null,m=0;function f(t,e){var n,i,r;if(e.singleton){var o=m++;n=p||(p=l(e)),i=d.bind(null,n,o,!1),r=d.bind(null,n,o,!0)}else n=l(e),i=h.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).attributes="object"==typeof e.attributes?e.attributes:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=s(t,e);return a(n,e),function(t){for(var i=[],o=0;o<n.length;o++){var l=n[o],c=r[l.id];c&&(c.refs--,i.push(c))}t&&a(s(t,e),e);for(var u=0;u<i.length;u++){var d=i[u];if(0===d.refs){for(var h=0;h<d.parts.length;h++)d.parts[h]();delete r[d.id]}}}}},,,,function(t,e,n){"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(e),n(6),Litepicker.add("mobilefriendly",{init:function(t){var e=t.options;t.options.mobilefriendly=r(r({},{breakpoint:480}),e.mobilefriendly),Object.defineProperties(t,{xTouchDown:{value:null,writable:!0},yTouchDown:{value:null,writable:!0},touchTargetMonth:{value:null,writable:!0}});var n=!1;try{var i=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(t){}function o(){var e="portrait"===s();return window.matchMedia("(max-device-".concat(e?"width":"height",": ").concat(t.options.mobilefriendly.breakpoint,"px)")).matches}function s(){return"orientation"in window.screen&&"type"in window.screen.orientation?window.screen.orientation.type.replace(/\-\w+$/,""):window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape"}function a(){"portrait"===s()?(t.options.numberOfMonths=1,t.options.numberOfColumns=1):(t.options.numberOfMonths=2,t.options.numberOfColumns=2)}t.backdrop=document.createElement("div"),t.backdrop.className="litepicker-backdrop",t.backdrop.addEventListener("click",t.hide()),e.element&&e.element.parentNode&&e.element.parentNode.appendChild(t.backdrop),window.addEventListener("orientationchange",function(n){window.addEventListener("resize",function n(){if(o()&&t.isShowning()){var i=s();if("landscape"===i)e.numberOfMonths=2,e.numberOfColumns=2;else e.numberOfMonths=1,e.numberOfColumns=1;t.ui.classList.toggle("mobilefriendly-portrait","portrait"===i),t.ui.classList.toggle("mobilefriendly-landscape","landscape"===i),t.render()}window.removeEventListener("resize",n)})}),e.inlineMode&&o()&&(window.dispatchEvent(new Event("orientationchange")),window.dispatchEvent(new Event("resize"))),t.on("before:show",function(e){if(t.triggerElement=e,!t.options.inlineMode&&o()){t.emit("mobilefriendly.before:show",e),t.ui.style.position="fixed",t.ui.style.display="block",a(),t.scrollToDate(e),t.render();var n=s();t.ui.classList.add("mobilefriendly"),t.ui.classList.toggle("mobilefriendly-portrait","portrait"===n),t.ui.classList.toggle("mobilefriendly-landscape","landscape"===n),t.ui.style.top="50%",t.ui.style.left="50%",t.ui.style.right=null,t.ui.style.bottom=null,t.ui.style.zIndex=t.options.zIndex,t.backdrop.style.display="block",t.backdrop.style.zIndex=t.options.zIndex-1,document.body.classList.add("litepicker-open"),(e||t.options.element).blur(),t.emit("mobilefriendly.show",e)}else o()&&(a(),t.render())}),t.on("render",function(e){t.touchTargetMonth&&Array.from(t.ui.querySelectorAll(".month-item")).map(function(e){return e.classList.add("touch-target-".concat(t.touchTargetMonth))}),t.touchTargetMonth=null}),t.on("hide",function(){document.body.classList.remove("litepicker-open"),t.backdrop.style.display="none",t.ui.classList.remove("mobilefriendly","mobilefriendly-portrait","mobilefriendly-landscape")}),t.on("destroy",function(){t.backdrop&&t.backdrop.parentNode&&t.backdrop.parentNode.removeChild(t.backdrop)}),t.ui.addEventListener("touchstart",function(e){var n=e.touches[0];t.xTouchDown=n.clientX,t.yTouchDown=n.clientY},!!n&&{passive:!0}),t.ui.addEventListener("touchmove",function(e){if(t.xTouchDown&&t.yTouchDown){var n=e.touches[0].clientX,i=e.touches[0].clientY,r=t.xTouchDown-n,o=t.yTouchDown-i,s=Math.abs(r)>Math.abs(o),a=t.options.numberOfMonths,l=null,c=!1,u="",d=Array.from(t.ui.querySelectorAll(".month-item"));if(s){var h=t.DateTime(t.ui.querySelector(".day-item").dataset.time),p=Number("".concat(1-Math.abs(r)/100)),m=0;if(r>0){m=-Math.abs(r),l=h.clone().add(a,"month");var f=t.options.maxDate;c=!f||l.isSameOrBefore(t.DateTime(f),"month"),u="next"}else{m=Math.abs(r),l=h.clone().subtract(a,"month");var g=t.options.minDate;c=!g||l.isSameOrAfter(t.DateTime(g),"month"),u="prev"}c&&d.map(function(t){t.style.opacity=p,t.style.transform="translateX(".concat(m,"px)")})}Math.abs(r)+Math.abs(o)>100&&s&&l&&c&&(t.touchTargetMonth=u,t.gotoDate(l))}},!!n&&{passive:!0}),t.ui.addEventListener("touchend",function(e){t.touchTargetMonth||Array.from(t.ui.querySelectorAll(".month-item")).map(function(t){t.style.transform="translateX(0px)",t.style.opacity=1}),t.xTouchDown=null,t.yTouchDown=null},!!n&&{passive:!0})}})},function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]);var r={insert:function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};n(1)(i,r),i.locals&&(t.exports=i.locals)},function(t,e,n){(e=n(0)(!1)).push([t.i,':root {\n --litepicker-mobilefriendly-backdrop-color-bg: #000;\n}\n\n.litepicker-backdrop {\n display: none;\n background-color: var(--litepicker-mobilefriendly-backdrop-color-bg);\n opacity: 0.3;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.litepicker-open {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] {\n transform: translate(-50%, -50%);\n font-size: 1.1rem;\n --litepicker-container-months-box-shadow-color: #616161;\n}\n.litepicker.mobilefriendly-portrait {\n --litepicker-day-width: 13.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n.litepicker.mobilefriendly-landscape {\n --litepicker-day-width: 5.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__months .month-item-header {\n height: var(--litepicker-day-width);\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__days > div {\n height: var(--litepicker-day-width);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item {\n transform-origin: center;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-next {\n animation-name: lp-bounce-target-next;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-prev {\n animation-name: lp-bounce-target-prev;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n@keyframes lp-bounce-target-next {\n from {\n transform: translateX(100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}\n\n@keyframes lp-bounce-target-prev {\n from {\n transform: translateX(-100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}',""]),t.exports=e}])},3829:function(t,e,n){"use strict";n.r(e)},2481:function(t,e,n){"use strict";var i=n(8252),r=n(1958),o=TypeError;t.exports=function(t){if(i(t))return t;throw new o(r(t)+" is not a function")}},7938:function(t,e,n){"use strict";var i=n(2666),r=n(3369),o=n(1250).f,s=i("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},3162:function(t,e,n){"use strict";var i=n(8271),r=String,o=TypeError;t.exports=function(t){if(i(t))return t;throw new o(r(t)+" is not an object")}},8658:function(t,e,n){"use strict";var i=n(2364),r=n(9283),o=n(6013),s=function(t){return function(e,n,s){var a=i(e),l=o(a);if(0===l)return!t&&-1;var c,u=r(s,l);if(t&&n!=n){for(;l>u;)if((c=a[u++])!=c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7409:function(t,e,n){"use strict";var i=n(2289),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},4993:function(t,e,n){"use strict";var i=n(9522),r=n(5456),o=n(6056),s=n(1250);t.exports=function(t,e,n){for(var a=r(e),l=s.f,c=o.f,u=0;u<a.length;u++){var d=a[u];i(t,d)||n&&i(n,d)||l(t,d,c(e,d))}}},232:function(t,e,n){"use strict";var i=n(7101),r=n(1250),o=n(9299);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9299:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3589:function(t,e,n){"use strict";var i=n(8252),r=n(1250),o=n(4034),s=n(7214);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(i(n)&&o(n,c,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},7214:function(t,e,n){"use strict";var i=n(3405),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},7101:function(t,e,n){"use strict";var i=n(8930);t.exports=!i(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},2998:function(t,e,n){"use strict";var i=n(3405),r=n(8271),o=i.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},7658:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6332:function(t,e,n){"use strict";var i=n(3405).navigator,r=i&&i.userAgent;t.exports=r?String(r):""},5168:function(t,e,n){"use strict";var i,r,o=n(3405),s=n(6332),a=o.process,l=o.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(r=(i=u.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},7725:function(t,e,n){"use strict";var i=n(3405),r=n(6056).f,o=n(232),s=n(3589),a=n(7214),l=n(4993),c=n(5129);t.exports=function(t,e){var n,u,d,h,p,m=t.target,f=t.global,g=t.stat;if(n=f?i:g?i[m]||a(m,{}):i[m]&&i[m].prototype)for(u in e){if(h=e[u],d=t.dontCallGetSet?(p=r(n,u))&&p.value:n[u],!c(f?u:m+(g?".":"#")+u,t.forced)&&void 0!==d){if(typeof h==typeof d)continue;l(h,d)}(t.sham||d&&d.sham)&&o(h,"sham",!0),s(n,u,h,t)}}},8930:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},5647:function(t,e,n){"use strict";var i=n(8930);t.exports=!i(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},3176:function(t,e,n){"use strict";var i=n(5647),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},3743:function(t,e,n){"use strict";var i=n(7101),r=n(9522),o=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=r(o,"name"),l=a&&"something"===function(){}.name,c=a&&(!i||i&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},2289:function(t,e,n){"use strict";var i=n(5647),r=Function.prototype,o=r.call,s=i&&r.bind.bind(o,o);t.exports=i?s:function(t){return function(){return o.apply(t,arguments)}}},3220:function(t,e,n){"use strict";var i=n(3405),r=n(8252);t.exports=function(t,e){return arguments.length<2?(n=i[t],r(n)?n:void 0):i[t]&&i[t][e];var n}},3377:function(t,e,n){"use strict";var i=n(2481),r=n(3022);t.exports=function(t,e){var n=t[e];return r(n)?void 0:i(n)}},3405:function(t,e,n){"use strict";var i=function(t){return t&&t.Math===Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9522:function(t,e,n){"use strict";var i=n(2289),r=n(1724),o=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(r(t),e)}},4036:function(t){"use strict";t.exports={}},9810:function(t,e,n){"use strict";var i=n(3220);t.exports=i("document","documentElement")},1782:function(t,e,n){"use strict";var i=n(7101),r=n(8930),o=n(2998);t.exports=!i&&!r(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},1792:function(t,e,n){"use strict";var i=n(2289),r=n(8930),o=n(7409),s=Object,a=i("".split);t.exports=r(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?a(t,""):s(t)}:s},4117:function(t,e,n){"use strict";var i=n(2289),r=n(8252),o=n(8486),s=i(Function.toString);r(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},4206:function(t,e,n){"use strict";var i,r,o,s=n(3337),a=n(3405),l=n(8271),c=n(232),u=n(9522),d=n(8486),h=n(4040),p=n(4036),m="Object already initialized",f=a.TypeError,g=a.WeakMap;if(s||d.state){var v=d.state||(d.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,i=function(t,e){if(v.has(t))throw new f(m);return e.facade=t,v.set(t,e),e},r=function(t){return v.get(t)||{}},o=function(t){return v.has(t)}}else{var y=h("state");p[y]=!0,i=function(t,e){if(u(t,y))throw new f(m);return e.facade=t,c(t,y,e),e},r=function(t){return u(t,y)?t[y]:{}},o=function(t){return u(t,y)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=r(e)).type!==t)throw new f("Incompatible receiver, "+t+" required");return n}}}},8252:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},5129:function(t,e,n){"use strict";var i=n(8930),r=n(8252),o=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n===u||n!==c&&(r(e)?i(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},3022:function(t){"use strict";t.exports=function(t){return null==t}},8271:function(t,e,n){"use strict";var i=n(8252);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},4214:function(t){"use strict";t.exports=!1},8944:function(t,e,n){"use strict";var i=n(3220),r=n(8252),o=n(8130),s=n(5537),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&o(e.prototype,a(t))}},6013:function(t,e,n){"use strict";var i=n(5531);t.exports=function(t){return i(t.length)}},4034:function(t,e,n){"use strict";var i=n(2289),r=n(8930),o=n(8252),s=n(9522),a=n(7101),l=n(3743).CONFIGURABLE,c=n(4117),u=n(4206),d=u.enforce,h=u.get,p=String,m=Object.defineProperty,f=i("".slice),g=i("".replace),v=i([].join),y=a&&!r(function(){return 8!==m(function(){},"length",{value:8}).length}),b=String(String).split("String"),_=t.exports=function(t,e,n){"Symbol("===f(p(e),0,7)&&(e="["+g(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(a?m(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&s(n,"arity")&&t.length!==n.arity&&m(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=d(t);return s(i,"source")||(i.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=_(function(){return o(this)&&h(this).source||c(this)},"toString")},7966:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},3369:function(t,e,n){"use strict";var i,r=n(3162),o=n(5422),s=n(7658),a=n(4036),l=n(9810),c=n(2998),u=n(4040),d="prototype",h="script",p=u("IE_PROTO"),m=function(){},f=function(t){return"<"+h+">"+t+"</"+h+">"},g=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;v="undefined"!=typeof document?document.domain&&i?g(i):(e=c("iframe"),n="java"+h+":",e.style.display="none",l.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):g(i);for(var r=s.length;r--;)delete v[d][s[r]];return v()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(m[d]=r(t),n=new m,m[d]=null,n[p]=t):n=v(),void 0===e?n:o.f(n,e)}},5422:function(t,e,n){"use strict";var i=n(7101),r=n(3667),o=n(1250),s=n(3162),a=n(2364),l=n(7185);e.f=i&&!r?Object.defineProperties:function(t,e){s(t);for(var n,i=a(e),r=l(e),c=r.length,u=0;c>u;)o.f(t,n=r[u++],i[n]);return t}},1250:function(t,e,n){"use strict";var i=n(7101),r=n(1782),o=n(3667),s=n(3162),a=n(3704),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",p="writable";e.f=i?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var i=u(t,e);i&&i[p]&&(t[e]=n.value,n={configurable:h in n?n[h]:i[h],enumerable:d in n?n[d]:i[d],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},6056:function(t,e,n){"use strict";var i=n(7101),r=n(3176),o=n(6640),s=n(9299),a=n(2364),l=n(3704),c=n(9522),u=n(1782),d=Object.getOwnPropertyDescriptor;e.f=i?d:function(t,e){if(t=a(t),e=l(e),u)try{return d(t,e)}catch(t){}if(c(t,e))return s(!r(o.f,t,e),t[e])}},7469:function(t,e,n){"use strict";var i=n(6067),r=n(7658).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},4540:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},8130:function(t,e,n){"use strict";var i=n(2289);t.exports=i({}.isPrototypeOf)},6067:function(t,e,n){"use strict";var i=n(2289),r=n(9522),o=n(2364),s=n(8658).indexOf,a=n(4036),l=i([].push);t.exports=function(t,e){var n,i=o(t),c=0,u=[];for(n in i)!r(a,n)&&r(i,n)&&l(u,n);for(;e.length>c;)r(i,n=e[c++])&&(~s(u,n)||l(u,n));return u}},7185:function(t,e,n){"use strict";var i=n(6067),r=n(7658);t.exports=Object.keys||function(t){return i(t,r)}},6640:function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},5519:function(t,e,n){"use strict";var i=n(3176),r=n(8252),o=n(8271),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&r(n=t.toString)&&!o(a=i(n,t)))return a;if(r(n=t.valueOf)&&!o(a=i(n,t)))return a;if("string"!==e&&r(n=t.toString)&&!o(a=i(n,t)))return a;throw new s("Can't convert object to primitive value")}},5456:function(t,e,n){"use strict";var i=n(3220),r=n(2289),o=n(7469),s=n(4540),a=n(3162),l=r([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?l(e,n(t)):e}},2341:function(t,e,n){"use strict";var i=n(3022),r=TypeError;t.exports=function(t){if(i(t))throw new r("Can't call method on "+t);return t}},4040:function(t,e,n){"use strict";var i=n(8762),r=n(2161),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},8486:function(t,e,n){"use strict";var i=n(4214),r=n(3405),o=n(7214),s="__core-js_shared__",a=t.exports=r[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.49.0",mode:i?"pure":"global",copyright:"© 20132025 Denis Pushkarev (zloirock.ru), 20252026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},8762:function(t,e,n){"use strict";var i=n(8486);t.exports=function(t,e){return i[t]||(i[t]=e||{})}},1520:function(t,e,n){"use strict";var i=n(5168),r=n(8930),o=n(3405).String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41})},9283:function(t,e,n){"use strict";var i=n(136),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},2364:function(t,e,n){"use strict";var i=n(1792),r=n(2341);t.exports=function(t){return i(r(t))}},136:function(t,e,n){"use strict";var i=n(7966);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},5531:function(t,e,n){"use strict";var i=n(136),r=Math.min;t.exports=function(t){var e=i(t);return e>0?r(e,9007199254740991):0}},1724:function(t,e,n){"use strict";var i=n(2341),r=Object;t.exports=function(t){return r(i(t))}},4610:function(t,e,n){"use strict";var i=n(3176),r=n(8271),o=n(8944),s=n(3377),a=n(5519),l=n(2666),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=i(l,t,e),!r(n)||o(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},3704:function(t,e,n){"use strict";var i=n(4610),r=n(8944);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},1958:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},2161:function(t,e,n){"use strict";var i=n(2289),r=0,o=Math.random(),s=i(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++r+o,36)}},5537:function(t,e,n){"use strict";var i=n(1520);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3667:function(t,e,n){"use strict";var i=n(7101),r=n(8930);t.exports=i&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3337:function(t,e,n){"use strict";var i=n(3405),r=n(8252),o=i.WeakMap;t.exports=r(o)&&/native code/.test(String(o))},2666:function(t,e,n){"use strict";var i=n(3405),r=n(8762),o=n(9522),s=n(2161),a=n(1520),l=n(5537),c=i.Symbol,u=r("wks"),d=l?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return o(u,t)||(u[t]=a&&o(c,t)?c[t]:d("Symbol."+t)),u[t]}},9690:function(t,e,n){"use strict";var i=n(7725),r=n(8658).includes,o=n(8930),s=n(7938),a=o(function(){return!Array(1).includes()}),l=o(function(){return[,1].includes(void 0,1)});i({target:"Array",proto:!0,forced:a||l},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},2647:function(t,e,n){"use strict";n.d(e,{c9:function(){return bi},dw:function(){return xn},wB:function(){return wt}});class i extends Error{}class r extends i{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class o extends i{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class s extends i{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class a extends i{}class l extends i{constructor(t){super(`Invalid unit ${t}`)}}class c extends i{}class u extends i{constructor(){super("Zone is an abstract class")}}const d="numeric",h="short",p="long",m={year:d,month:d,day:d},f={year:d,month:h,day:d},g={year:d,month:h,day:d,weekday:h},v={year:d,month:p,day:d},y={year:d,month:p,day:d,weekday:p},b={hour:d,minute:d},_={hour:d,minute:d,second:d},w={hour:d,minute:d,second:d,timeZoneName:h},k={hour:d,minute:d,second:d,timeZoneName:p},T={hour:d,minute:d,hourCycle:"h23"},E={hour:d,minute:d,second:d,hourCycle:"h23"},S={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},x={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},D={year:d,month:d,day:d,hour:d,minute:d},O={year:d,month:d,day:d,hour:d,minute:d,second:d},L={year:d,month:h,day:d,hour:d,minute:d},C={year:d,month:h,day:d,hour:d,minute:d,second:d},A={year:d,month:h,day:d,weekday:h,hour:d,minute:d},M={year:d,month:p,day:d,hour:d,minute:d,timeZoneName:h},I={year:d,month:p,day:d,hour:d,minute:d,second:d,timeZoneName:h},N={year:d,month:p,day:d,weekday:p,hour:d,minute:d,timeZoneName:p},P={year:d,month:p,day:d,weekday:p,hour:d,minute:d,second:d,timeZoneName:p};class F{get type(){throw new u}get name(){throw new u}get ianaName(){return this.name}get isUniversal(){throw new u}offsetName(t,e){throw new u}formatOffset(t,e){throw new u}offset(t){throw new u}equals(t){throw new u}get isValid(){throw new u}}let j=null;class R extends F{static get instance(){return null===j&&(j=new R),j}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return re(t,e,n)}formatOffset(t,e){return le(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}const $=new Map;const H={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const q=new Map;class V extends F{static create(t){let e=q.get(t);return void 0===e&&q.set(t,e=new V(t)),e}static resetCache(){q.clear(),$.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=V.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return re(t,e,n,this.name)}formatOffset(t,e){return le(this.offset(t),e)}offset(t){if(!this.valid)return NaN;const e=new Date(t);if(isNaN(e))return NaN;const n=function(t){let e=$.get(t);return void 0===e&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),$.set(t,e)),e}(this.name);let[i,r,o,s,a,l,c]=n.formatToParts?function(t,e){const n=t.formatToParts(e),i=[];for(let t=0;t<n.length;t++){const{type:e,value:r}=n[t],o=H[e];"era"===e?i[o]=r:jt(o)||(i[o]=parseInt(r,10))}return i}(n,e):function(t,e){const n=t.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,o,s,a,l,c,u]=i;return[s,r,o,a,l,c,u]}(n,e);"BC"===s&&(i=1-Math.abs(i));let u=+e;const d=u%1e3;return u-=d>=0?d:1e3+d,(te({year:i,month:r,day:o,hour:24===a?0:a,minute:l,second:c,millisecond:0})-u)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let z={};const B=new Map;function W(t,e={}){const n=JSON.stringify([t,e]);let i=B.get(n);return void 0===i&&(i=new Intl.DateTimeFormat(t,e),B.set(n,i)),i}const U=new Map;const Y=new Map;let Z=null;const G=new Map;function K(t){let e=G.get(t);return void 0===e&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),G.set(t,e)),e}const J=new Map;function X(t,e,n,i){const r=t.listingMode();return"error"===r?null:"en"===r?n(e):i(e)}class Q{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:r,...o}=n;if(!e||Object.keys(o).length>0){const e={useGrouping:!1,...n};n.padTo>0&&(e.minimumIntegerDigits=n.padTo),this.inf=function(t,e={}){const n=JSON.stringify([t,e]);let i=U.get(n);return void 0===i&&(i=new Intl.NumberFormat(t,e),U.set(n,i)),i}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return Ut(this.floor?Math.floor(t):Kt(t,3),this.padTo)}}class tt{constructor(t,e,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=t;else if("fixed"===t.zone.type){const e=t.offset/60*-1,n=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&V.create(n).valid?(i=n,this.dt=t):(i="UTC",this.dt=0===t.offset?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else"system"===t.zone.type?this.dt=t:"iana"===t.zone.type?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const r={...this.opts};r.timeZone=r.timeZone||i,this.dtf=W(e,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(t=>{if("timeZoneName"===t.type){const e=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:e}}return t}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class et{constructor(t,e,n){this.opts={style:"long",...n},!e&&Ht()&&(this.rtf=function(t,e={}){const{base:n,...i}=e,r=JSON.stringify([t,i]);let o=Y.get(r);return void 0===o&&(o=new Intl.RelativeTimeFormat(t,e),Y.set(r,o)),o}(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n="always",i=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&o){const n="days"===t;switch(e){case 1:return n?"tomorrow":`next ${r[t][0]}`;case-1:return n?"yesterday":`last ${r[t][0]}`;case 0:return n?"today":`this ${r[t][0]}`}}const s=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,c=r[t],u=i?l?c[1]:c[2]||c[1]:l?r[t][0]:t;return s?`${a} ${u} ago`:`in ${a} ${u}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const nt={firstDay:1,minimalDays:4,weekend:[6,7]};class it{static fromOpts(t){return it.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,i,r=!1){const o=t||wt.defaultLocale,s=o||(r?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=e||wt.defaultNumberingSystem,l=n||wt.defaultOutputCalendar,c=Bt(i)||wt.defaultWeekSettings;return new it(s,a,l,c,o)}static resetCache(){Z=null,B.clear(),U.clear(),Y.clear(),G.clear(),J.clear()}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:i}={}){return it.create(t,e,n,i)}constructor(t,e,n,i,r){const[o,s,a]=function(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(-1===n)return[t];{let e,i;try{e=W(t).resolvedOptions(),i=t}catch(r){const o=t.substring(0,n);e=W(o).resolvedOptions(),i=o}const{numberingSystem:r,calendar:o}=e;return[i,r,o]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=n||a||null,this.weekSettings=i,this.intl=function(t,e,n){return n||e?(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===K(t.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?it.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Bt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return X(this,t,pe,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),i=(e&=!n)?{month:t,day:"numeric"}:{month:t},r=e?"format":"standalone";if(!this.monthsCache[r][t]){const e=n?t=>this.dtFormatter(t,i).format():t=>this.extract(t,i,"month");this.monthsCache[r][t]=function(t){const e=[];for(let n=1;n<=12;n++){const i=bi.utc(2009,n,1);e.push(t(i))}return e}(e)}return this.monthsCache[r][t]})}weekdays(t,e=!1){return X(this,t,ve,()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=e?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=function(t){const e=[];for(let n=1;n<=7;n++){const i=bi.utc(2016,11,13+n);e.push(t(i))}return e}(t=>this.extract(t,n,"weekday"))),this.weekdaysCache[i][t]})}meridiems(){return X(this,void 0,()=>ye,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[bi.utc(2016,11,13,9),bi.utc(2016,11,13,19)].map(e=>this.extract(e,t,"dayperiod"))}return this.meridiemCache})}eras(t){return X(this,t,ke,()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[bi.utc(-40,1,1),bi.utc(2017,1,1)].map(t=>this.extract(t,e,"era"))),this.eraCache[t]})}extract(t,e,n){const i=this.dtFormatter(t,e).formatToParts().find(t=>t.type.toLowerCase()===n);return i?i.value:null}numberFormatter(t={}){return new Q(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new tt(t,this.intl,e)}relFormatter(t={}){return new et(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const n=JSON.stringify([t,e]);let i=z[n];return i||(i=new Intl.ListFormat(t,e),z[n]=i),i}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||K(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qt()?function(t){let e=J.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...nt,...e}),J.set(t,e)}return e}(this.locale):nt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let rt=null;class ot extends F{static get utcInstance(){return null===rt&&(rt=new ot(0)),rt}static instance(t){return 0===t?ot.utcInstance:new ot(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new ot(oe(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${le(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${le(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return le(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class st extends F{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function at(t,e){if(jt(t)||null===t)return e;if(t instanceof F)return t;if("string"==typeof t){const n=t.toLowerCase();return"default"===n?e:"local"===n||"system"===n?R.instance:"utc"===n||"gmt"===n?ot.utcInstance:ot.parseSpecifier(n)||V.create(t)}return Rt(t)?ot.instance(t):"object"==typeof t&&"offset"in t&&"function"==typeof t.offset?t:new st(t)}const lt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},ct={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ut=lt.hanidec.replace(/[\[|\]]/g,"").split("");const dt=new Map;function ht({numberingSystem:t},e=""){const n=t||"latn";let i=dt.get(n);void 0===i&&(i=new Map,dt.set(n,i));let r=i.get(e);return void 0===r&&(r=new RegExp(`${lt[n]}${e}`),i.set(e,r)),r}let pt,mt=()=>Date.now(),ft="system",gt=null,vt=null,yt=null,bt=60,_t=null;class wt{static get now(){return mt}static set now(t){mt=t}static set defaultZone(t){ft=t}static get defaultZone(){return at(ft,R.instance)}static get defaultLocale(){return gt}static set defaultLocale(t){gt=t}static get defaultNumberingSystem(){return vt}static set defaultNumberingSystem(t){vt=t}static get defaultOutputCalendar(){return yt}static set defaultOutputCalendar(t){yt=t}static get defaultWeekSettings(){return _t}static set defaultWeekSettings(t){_t=Bt(t)}static get twoDigitCutoffYear(){return bt}static set twoDigitCutoffYear(t){bt=t%100}static get throwOnInvalid(){return pt}static set throwOnInvalid(t){pt=t}static resetCaches(){it.resetCache(),V.resetCache(),bi.resetCache(),dt.clear()}}class kt{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Tt=[0,31,59,90,120,151,181,212,243,273,304,334],Et=[0,31,60,91,121,152,182,213,244,274,305,335];function St(t,e){return new kt("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function xt(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const r=i.getUTCDay();return 0===r?7:r}function Dt(t,e,n){return n+(Jt(t)?Et:Tt)[e-1]}function Ot(t,e){const n=Jt(t)?Et:Tt,i=n.findIndex(t=>t<e);return{month:i+1,day:e-n[i]}}function Lt(t,e){return(t-e+7)%7+1}function Ct(t,e=4,n=1){const{year:i,month:r,day:o}=t,s=Dt(i,r,o),a=Lt(xt(i,r,o),n);let l,c=Math.floor((s-a+14-e)/7);return c<1?(l=i-1,c=ne(l,e,n)):c>ne(i,e,n)?(l=i+1,c=1):l=i,{weekYear:l,weekNumber:c,weekday:a,...ce(t)}}function At(t,e=4,n=1){const{weekYear:i,weekNumber:r,weekday:o}=t,s=Lt(xt(i,1,e),n),a=Xt(i);let l,c=7*r+o-s-7+e;c<1?(l=i-1,c+=Xt(l)):c>a?(l=i+1,c-=Xt(i)):l=i;const{month:u,day:d}=Ot(l,c);return{year:l,month:u,day:d,...ce(t)}}function Mt(t){const{year:e,month:n,day:i}=t;return{year:e,ordinal:Dt(e,n,i),...ce(t)}}function It(t){const{year:e,ordinal:n}=t,{month:i,day:r}=Ot(e,n);return{year:e,month:i,day:r,...ce(t)}}function Nt(t,e){if(!jt(t.localWeekday)||!jt(t.localWeekNumber)||!jt(t.localWeekYear)){if(!jt(t.weekday)||!jt(t.weekNumber)||!jt(t.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return jt(t.localWeekday)||(t.weekday=t.localWeekday),jt(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),jt(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Pt(t){const e=$t(t.year),n=Wt(t.month,1,12),i=Wt(t.day,1,Qt(t.year,t.month));return e?n?!i&&St("day",t.day):St("month",t.month):St("year",t.year)}function Ft(t){const{hour:e,minute:n,second:i,millisecond:r}=t,o=Wt(e,0,23)||24===e&&0===n&&0===i&&0===r,s=Wt(n,0,59),a=Wt(i,0,59),l=Wt(r,0,999);return o?s?a?!l&&St("millisecond",r):St("second",i):St("minute",n):St("hour",e)}function jt(t){return void 0===t}function Rt(t){return"number"==typeof t}function $t(t){return"number"==typeof t&&t%1==0}function Ht(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function qt(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function Vt(t,e,n){if(0!==t.length)return t.reduce((t,i)=>{const r=[e(i),i];return t&&n(t[0],r[0])===t[0]?t:r},null)[1]}function zt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Bt(t){if(null==t)return null;if("object"!=typeof t)throw new c("Week settings must be an object");if(!Wt(t.firstDay,1,7)||!Wt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(t=>!Wt(t,1,7)))throw new c("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Wt(t,e,n){return $t(t)&&t>=e&&t<=n}function Ut(t,e=2){let n;return n=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function Yt(t){return jt(t)||null===t||""===t?void 0:parseInt(t,10)}function Zt(t){return jt(t)||null===t||""===t?void 0:parseFloat(t)}function Gt(t){if(!jt(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function Kt(t,e,n="round"){const i=10**e;switch(n){case"expand":return t>0?Math.ceil(t*i)/i:Math.floor(t*i)/i;case"trunc":return Math.trunc(t*i)/i;case"round":return Math.round(t*i)/i;case"floor":return Math.floor(t*i)/i;case"ceil":return Math.ceil(t*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Jt(t){return t%4==0&&(t%100!=0||t%400==0)}function Xt(t){return Jt(t)?366:365}function Qt(t,e){const n=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===n?Jt(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function te(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function ee(t,e,n){return-Lt(xt(t,1,e),n)+e-1}function ne(t,e=4,n=1){const i=ee(t,e,n),r=ee(t+1,e,n);return(Xt(t)-i+r)/7}function ie(t){return t>99?t:t>wt.twoDigitCutoffYear?1900+t:2e3+t}function re(t,e,n,i=null){const r=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const s={timeZoneName:e,...o},a=new Intl.DateTimeFormat(n,s).formatToParts(r).find(t=>"timezonename"===t.type.toLowerCase());return a?a.value:null}function oe(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function se(t){const e=Number(t);if("boolean"==typeof t||""===t||!Number.isFinite(e))throw new c(`Invalid unit value ${t}`);return e}function ae(t,e){const n={};for(const i in t)if(zt(t,i)){const r=t[i];if(null==r)continue;n[e(i)]=se(r)}return n}function le(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${Ut(n,2)}:${Ut(i,2)}`;case"narrow":return`${r}${n}${i>0?`:${i}`:""}`;case"techie":return`${r}${Ut(n,2)}${Ut(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ce(t){return function(t,e){return e.reduce((e,n)=>(e[n]=t[n],e),{})}(t,["hour","minute","second","millisecond"])}const ue=["January","February","March","April","May","June","July","August","September","October","November","December"],de=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],he=["J","F","M","A","M","J","J","A","S","O","N","D"];function pe(t){switch(t){case"narrow":return[...he];case"short":return[...de];case"long":return[...ue];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const me=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],fe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ge=["M","T","W","T","F","S","S"];function ve(t){switch(t){case"narrow":return[...ge];case"short":return[...fe];case"long":return[...me];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ye=["AM","PM"],be=["Before Christ","Anno Domini"],_e=["BC","AD"],we=["B","A"];function ke(t){switch(t){case"narrow":return[...we];case"short":return[..._e];case"long":return[...be];default:return null}}function Te(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const Ee={D:m,DD:f,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:k,T:T,TT:E,TTT:S,TTTT:x,f:D,ff:L,fff:M,ffff:N,F:O,FF:C,FFF:I,FFFF:P};class Se{static create(t,e={}){return new Se(t,e)}static parseFormat(t){let e=null,n="",i=!1;const r=[];for(let o=0;o<t.length;o++){const s=t.charAt(o);"'"===s?((n.length>0||i)&&r.push({literal:i||/^\s+$/.test(n),val:""===n?"'":n}),e=null,n="",i=!i):i||s===e?n+=s:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=s,e=s)}return n.length>0&&r.push({literal:i||/^\s+$/.test(n),val:n}),r}static macroTokenToFormatOpts(t){return Ee[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0,n=void 0){if(this.opts.forceSimple)return Ut(t,e);const i={...this.opts};return e>0&&(i.padTo=e),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",s=()=>n?function(t){return ye[t.hour<12?0:1]}(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,i)=>n?function(t,e){return pe(e)[t.month-1]}(t,e):r(i?{month:e}:{month:e,day:"numeric"},"month"),l=(e,i)=>n?function(t,e){return ve(e)[t.weekday-1]}(t,e):r(i?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),c=e=>{const n=Se.macroTokenToFormatOpts(e);return n?this.formatWithSystemDefault(t,n):e},u=e=>n?function(t,e){return ke(e)[t.year<0?0:1]}(t,e):r({era:e},"era");return Te(Se.parseFormat(e),e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return i?r({day:"numeric"},"day"):this.num(t.day);case"dd":return i?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?r({month:"numeric"},"month"):this.num(t.month);case"MM":return i?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?r({year:"numeric"},"year"):this.num(t.year);case"yy":return i?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(e)}})}formatDurationFromString(t,e){const n="negativeLargestOnly"===this.opts.signMode?-1:1,i=t=>{switch(t[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},r=Se.parseFormat(e),o=r.reduce((t,{literal:e,val:n})=>e?t:t.concat(n),[]),s=t.shiftTo(...o.map(i).filter(t=>t));return Te(r,((t,e)=>r=>{const o=i(r);if(o){const i=e.isNegativeDuration&&o!==e.largestUnit?n:1;let s;return s="negativeLargestOnly"===this.opts.signMode&&o!==e.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(t.get(o)*i,r.length,s)}return r})(s,{isNegativeDuration:s<0,largestUnit:Object.keys(s.values)[0]}))}}const xe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function De(...t){const e=t.reduce((t,e)=>t+e.source,"");return RegExp(`^${e}$`)}function Oe(...t){return e=>t.reduce(([t,n,i],r)=>{const[o,s,a]=r(e,i);return[{...t,...o},s||n,a]},[{},null,1]).slice(0,2)}function Le(t,...e){if(null==t)return[null,null];for(const[n,i]of e){const e=n.exec(t);if(e)return i(e)}return[null,null]}function Ce(...t){return(e,n)=>{const i={};let r;for(r=0;r<t.length;r++)i[t[r]]=Yt(e[n+r]);return[i,null,n+r]}}const Ae=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Me=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ie=RegExp(`${Me.source}${`(?:${Ae.source}?(?:\\[(${xe.source})\\])?)?`}`),Ne=RegExp(`(?:[Tt]${Ie.source})?`),Pe=Ce("weekYear","weekNumber","weekDay"),Fe=Ce("year","ordinal"),je=RegExp(`${Me.source} ?(?:${Ae.source}|(${xe.source}))?`),Re=RegExp(`(?: ${je.source})?`);function $e(t,e,n){const i=t[e];return jt(i)?n:Yt(i)}function He(t,e){return[{hours:$e(t,e,0),minutes:$e(t,e+1,0),seconds:$e(t,e+2,0),milliseconds:Gt(t[e+3])},null,e+4]}function qe(t,e){const n=!t[e]&&!t[e+1],i=oe(t[e+1],t[e+2]);return[{},n?null:ot.instance(i),e+3]}function Ve(t,e){return[{},t[e]?V.create(t[e]):null,e+1]}const ze=RegExp(`^T?${Me.source}$`),Be=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function We(t){const[e,n,i,r,o,s,a,l,c]=t,u="-"===e[0],d=l&&"-"===l[0],h=(t,e=!1)=>void 0!==t&&(e||t&&u)?-t:t;return[{years:h(Zt(n)),months:h(Zt(i)),weeks:h(Zt(r)),days:h(Zt(o)),hours:h(Zt(s)),minutes:h(Zt(a)),seconds:h(Zt(l),"-0"===l),milliseconds:h(Gt(c),d)}]}const Ue={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ye(t,e,n,i,r,o,s){const a={year:2===e.length?ie(Yt(e)):Yt(e),month:de.indexOf(n)+1,day:Yt(i),hour:Yt(r),minute:Yt(o)};return s&&(a.second=Yt(s)),t&&(a.weekday=t.length>3?me.indexOf(t)+1:fe.indexOf(t)+1),a}const Ze=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ge(t){const[,e,n,i,r,o,s,a,l,c,u,d]=t,h=Ye(e,r,i,n,o,s,a);let p;return p=l?Ue[l]:c?0:oe(u,d),[h,new ot(p)]}const Ke=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Je=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Xe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qe(t){const[,e,n,i,r,o,s,a]=t;return[Ye(e,r,i,n,o,s,a),ot.utcInstance]}function tn(t){const[,e,n,i,r,o,s,a]=t;return[Ye(e,a,n,i,r,o,s),ot.utcInstance]}const en=De(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ne),nn=De(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ne),rn=De(/(\d{4})-?(\d{3})/,Ne),on=De(Ie),sn=Oe(function(t,e){return[{year:$e(t,e),month:$e(t,e+1,1),day:$e(t,e+2,1)},null,e+3]},He,qe,Ve),an=Oe(Pe,He,qe,Ve),ln=Oe(Fe,He,qe,Ve),cn=Oe(He,qe,Ve);const un=Oe(He);const dn=De(/(\d{4})-(\d\d)-(\d\d)/,Re),hn=De(je),pn=Oe(He,qe,Ve);const mn="Invalid Duration",fn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},gn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...fn},vn=365.2425,yn=30.436875,bn={years:{quarters:4,months:12,weeks:52.1775,days:vn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:yn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...fn},_n=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],wn=_n.slice(0).reverse();function kn(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new xn(i)}function Tn(t,e){let n=e.milliseconds??0;for(const i of wn.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function En(t,e){const n=Tn(t,e)<0?-1:1;_n.reduceRight((i,r)=>{if(jt(e[r]))return i;if(i){const o=e[i]*n,s=t[r][i],a=Math.floor(o/s);e[r]+=a*n,e[i]-=a*s*n}return r},null),_n.reduce((n,i)=>{if(jt(e[i]))return n;if(n){const r=e[n]%1;e[n]-=r,e[i]+=r*t[n][i]}return i},null)}function Sn(t){const e={};for(const[n,i]of Object.entries(t))0!==i&&(e[n]=i);return e}class xn{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let n=e?bn:gn;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||it.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return xn.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xn({values:ae(t,xn.normalizeUnit),loc:it.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Rt(t))return xn.fromMillis(t);if(xn.isDuration(t))return t;if("object"==typeof t)return xn.fromObject(t);throw new c(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=function(t){return Le(t,[Be,We])}(t);return n?xn.fromObject(n,e):xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=function(t){return Le(t,[ze,un])}(t);return n?xn.fromObject(n,e):xn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Duration is invalid");const n=t instanceof kt?t:new kt(t,e);if(wt.throwOnInvalid)throw new s(n);return new xn({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new l(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Se.create(this.loc,n).formatDurationFromString(this,t):mn}toHuman(t={}){if(!this.isValid)return mn;const e=!1!==t.showZeros,n=_n.map(n=>{const i=this.values[n];return jt(i)||0===i&&!e?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:n.slice(0,-1)}).format(i)}).filter(t=>t);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=Kt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1};return bi.fromMillis(e,{zone:"UTC"}).toISOTime(t)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Tn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xn.fromDurationLike(t),n={};for(const t of _n)(zt(e.values,t)||zt(this.values,t))&&(n[t]=e.get(t)+this.get(t));return kn(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=xn.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=se(t(this.values[n],n));return kn(this,{values:e},!0)}get(t){return this[xn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return kn(this,{values:{...this.values,...ae(t,xn.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:i}={}){return kn(this,{loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:i,conversionAccuracy:n})}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return En(this.matrix,t),kn(this,{values:t},!0)}rescale(){if(!this.isValid)return this;return kn(this,{values:Sn(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map(t=>xn.normalizeUnit(t));const e={},n={},i=this.toObject();let r;for(const o of _n)if(t.indexOf(o)>=0){r=o;let t=0;for(const e in n)t+=this.matrix[e][o]*n[e],n[e]=0;Rt(i[o])&&(t+=i[o]);const s=Math.trunc(t);e[o]=s,n[o]=(1e3*t-1e3*s)/1e3}else Rt(i[o])&&(n[o]=i[o]);for(const t in n)0!==n[t]&&(e[r]+=t===r?n[t]:n[t]/this.matrix[r][t]);return En(this.matrix,e),kn(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return kn(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;return kn(this,{values:Sn(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;function e(t,e){return void 0===t||0===t?void 0===e||0===e:t===e}for(const n of _n)if(!e(this.values[n],t.values[n]))return!1;return!0}}const Dn="Invalid Interval";class On{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Interval is invalid");const n=t instanceof kt?t:new kt(t,e);if(wt.throwOnInvalid)throw new o(n);return new On({invalid:n})}static fromDateTimes(t,e){const n=_i(t),i=_i(e),r=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?On.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:On.invalid("missing or invalid end"):On.invalid("missing or invalid start")}(n,i);return null==r?new On({start:n,end:i}):r}static after(t,e){const n=xn.fromDurationLike(e),i=_i(t);return On.fromDateTimes(i,i.plus(n))}static before(t,e){const n=xn.fromDurationLike(e),i=_i(t);return On.fromDateTimes(i.minus(n),i)}static fromISO(t,e){const[n,i]=(t||"").split("/",2);if(n&&i){let t,r,o,s;try{t=bi.fromISO(n,e),r=t.isValid}catch(i){r=!1}try{o=bi.fromISO(i,e),s=o.isValid}catch(i){s=!1}if(r&&s)return On.fromDateTimes(t,o);if(r){const n=xn.fromISO(i,e);if(n.isValid)return On.after(t,n)}else if(s){const t=xn.fromISO(n,e);if(t.isValid)return On.before(o,t)}}return On.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",e){if(!this.isValid)return NaN;const n=this.start.startOf(t,e);let i;return i=e?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,i=i.startOf(t,e),Math.floor(i.diff(n,t).get(t))+(i.valueOf()!==this.end.valueOf())}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?On.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(_i).filter(t=>this.contains(t)).sort((t,e)=>t.toMillis()-e.toMillis()),n=[];let{s:i}=this,r=0;for(;i<this.e;){const t=e[r]||this.e,o=+t>+this.e?this.e:t;n.push(On.fromDateTimes(i,o)),i=o,r+=1}return n}splitBy(t){const e=xn.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let n,{s:i}=this,r=1;const o=[];for(;i<this.e;){const t=this.start.plus(e.mapUnits(t=>t*r));n=+t>+this.e?this.e:t,o.push(On.fromDateTimes(i,n)),i=n,r+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e===+t.s}abutsEnd(t){return!!this.isValid&&+t.e===+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e<t.e?this.e:t.e;return e>=n?null:On.fromDateTimes(e,n)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,n=this.e>t.e?this.e:t.e;return On.fromDateTimes(e,n)}static merge(t){const[e,n]=t.sort((t,e)=>t.s-e.s).reduce(([t,e],n)=>e?e.overlaps(n)||e.abutsStart(n)?[t,e.union(n)]:[t.concat([e]),n]:[t,n],[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const i=[],r=t.map(t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}]),o=Array.prototype.concat(...r).sort((t,e)=>t.time-e.time);for(const t of o)n+="s"===t.type?1:-1,1===n?e=t.time:(e&&+e!==+t.time&&i.push(On.fromDateTimes(e,t.time)),e=null);return On.merge(i)}difference(...t){return On.xor([this].concat(t)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} ${this.e.toISO()})`:Dn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=m,e={}){return this.isValid?Se.create(this.s.loc.clone(e),t).formatInterval(this):Dn}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Dn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Dn}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Dn}toFormat(t,{separator:e=" "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:Dn}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xn.invalid(this.invalidReason)}mapEndpoints(t){return On.fromDateTimes(t(this.s),t(this.e))}}class Ln{static hasDST(t=wt.defaultZone){const e=bi.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return V.isValidZone(t)}static normalizeZone(t){return at(t,wt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||it.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||it.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||it.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||it.create(e,n,r)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||it.create(e,n,r)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||it.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||it.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return it.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return it.create(e,null,"gregory").eras(t)}static features(){return{relative:Ht(),localeWeek:qt()}}}function Cn(t,e){const n=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(xn.fromMillis(i).as("days"))}function An(t,e,n,i){let[r,o,s,a]=function(t,e,n){const i=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const n=Cn(t,e);return(n-n%7)/7}],["days",Cn]],r={},o=t;let s,a;for(const[l,c]of i)n.indexOf(l)>=0&&(s=l,r[l]=c(t,e),a=o.plus(r),a>e?(r[l]--,(t=o.plus(r))>e&&(a=t,r[l]--,t=o.plus(r))):t=a);return[t,r,a,s]}(t,e,n);const l=e-r,c=n.filter(t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0);0===c.length&&(s<e&&(s=r.plus({[a]:1})),s!==r&&(o[a]=(o[a]||0)+l/(s-r)));const u=xn.fromObject(o,i);return c.length>0?xn.fromMillis(l,i).shiftTo(...c).plus(u):u}function Mn(t,e=t=>t){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(-1!==t[n].search(lt.hanidec))e+=ut.indexOf(t[n]);else for(const t in ct){const[n,r]=ct[t];i>=n&&i<=r&&(e+=i-n)}}return parseInt(e,10)}return e}(t))}}const In=`[ ${String.fromCharCode(160)}]`,Nn=new RegExp(In,"g");function Pn(t){return t.replace(/\./g,"\\.?").replace(Nn,In)}function Fn(t){return t.replace(/\./g,"").replace(Nn," ").toLowerCase()}function jn(t,e){return null===t?null:{regex:RegExp(t.map(Pn).join("|")),deser:([n])=>t.findIndex(t=>Fn(n)===Fn(t))+e}}function Rn(t,e){return{regex:t,deser:([,t,e])=>oe(t,e),groups:e}}function $n(t){return{regex:t,deser:([t])=>t}}const Hn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let qn=null;function Vn(t,e){return Array.prototype.concat(...t.map(t=>function(t,e){if(t.literal)return t;const n=Wn(Se.macroTokenToFormatOpts(t.val),e);return null==n||n.includes(void 0)?t:n}(t,e)))}class zn{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=Vn(Se.parseFormat(e),t),this.units=this.tokens.map(e=>function(t,e){const n=ht(e),i=ht(e,"{2}"),r=ht(e,"{3}"),o=ht(e,"{4}"),s=ht(e,"{6}"),a=ht(e,"{1,2}"),l=ht(e,"{1,3}"),c=ht(e,"{1,6}"),u=ht(e,"{1,9}"),d=ht(e,"{2,4}"),h=ht(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return jn(e.eras("short"),0);case"GG":return jn(e.eras("long"),0);case"y":return Mn(c);case"yy":case"kk":return Mn(d,ie);case"yyyy":case"kkkk":return Mn(o);case"yyyyy":return Mn(h);case"yyyyyy":return Mn(s);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mn(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mn(i);case"MMM":return jn(e.months("short",!0),1);case"MMMM":return jn(e.months("long",!0),1);case"LLL":return jn(e.months("short",!1),1);case"LLLL":return jn(e.months("long",!1),1);case"o":case"S":return Mn(l);case"ooo":case"SSS":return Mn(r);case"u":return $n(u);case"uu":return $n(a);case"uuu":case"E":case"c":return Mn(n);case"a":return jn(e.meridiems(),0);case"EEE":return jn(e.weekdays("short",!1),1);case"EEEE":return jn(e.weekdays("long",!1),1);case"ccc":return jn(e.weekdays("short",!0),1);case"cccc":return jn(e.weekdays("long",!0),1);case"Z":case"ZZ":return Rn(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return Rn(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return $n(/[a-z_+-/]{1,256}?/i);case" ":return $n(/[^\S\n\r]/);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t)),this.disqualifyingUnit=this.units.find(t=>t.invalidReason),!this.disqualifyingUnit){const[t,e]=[`^${(n=this.units).map(t=>t.regex).reduce((t,e)=>`${t}(${e.source})`,"")}$`,n];this.regex=RegExp(t,"i"),this.handlers=e}var n}explainFromTokens(t){if(this.isValid){const[e,n]=function(t,e,n){const i=t.match(e);if(i){const t={};let e=1;for(const r in n)if(zt(n,r)){const o=n[r],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(t[o.token.val[0]]=o.deser(i.slice(e,e+s))),e+=s}return[i,t]}return[i,{}]}(t,this.regex,this.handlers),[i,r,o]=n?function(t){let e,n=null;return jt(t.z)||(n=V.create(t.z)),jt(t.Z)||(n||(n=new ot(t.Z)),e=t.Z),jt(t.q)||(t.M=3*(t.q-1)+1),jt(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),jt(t.u)||(t.S=Gt(t.u)),[Object.keys(t).reduce((e,n)=>{const i=(t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(e[i]=t[n]),e},{}),n,e]}(n):[null,null,void 0];if(zt(n,"a")&&zt(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:i,zone:r,specificOffset:o}}return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Bn(t,e,n){return new zn(t,n).explainFromTokens(e)}function Wn(t,e){if(!t)return null;const n=Se.create(e,t).dtFormatter((qn||(qn=bi.fromMillis(1555555555555)),qn)),i=n.formatToParts(),r=n.resolvedOptions();return i.map(e=>function(t,e,n){const{type:i,value:r}=t;if("literal"===i){const t=/^\s+$/.test(r);return{literal:!t,val:t?" ":r}}const o=e[i];let s=i;"hour"===i&&(s=null!=e.hour12?e.hour12?"hour12":"hour24":null!=e.hourCycle?"h11"===e.hourCycle||"h12"===e.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Hn[s];if("object"==typeof a&&(a=a[o]),a)return{literal:!1,val:a}}(e,t,r))}const Un="Invalid DateTime",Yn=864e13;function Zn(t){return new kt("unsupported zone",`the zone "${t.name}" is not supported`)}function Gn(t){return null===t.weekData&&(t.weekData=Ct(t.c)),t.weekData}function Kn(t){return null===t.localWeekData&&(t.localWeekData=Ct(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Jn(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new bi({...n,...e,old:n})}function Xn(t,e,n){let i=t-60*e*1e3;const r=n.offset(i);if(e===r)return[i,e];i-=60*(r-e)*1e3;const o=n.offset(i);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}function Qn(t,e){const n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ti(t,e,n){return Xn(te(t),e,n)}function ei(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),o={...t.c,year:i,month:r,day:Math.min(t.c.day,Qt(i,r))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},s=xn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=te(o);let[l,c]=Xn(a,n,t.zone);return 0!==s&&(l+=s,c=t.zone.offset(l)),{ts:l,o:c}}function ni(t,e,n,i,r,o){const{setZone:s,zone:a}=n;if(t&&0!==Object.keys(t).length||e){const i=e||a,r=bi.fromObject(t,{...n,zone:i,specificOffset:o});return s?r:r.setZone(a)}return bi.invalid(new kt("unparsable",`the input "${r}" can't be parsed as ${i}`))}function ii(t,e,n=!0){return t.isValid?Se.create(it.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ri(t,e,n){const i=t.c.year>9999||t.c.year<0;let r="";if(i&&t.c.year>=0&&(r+="+"),r+=Ut(t.c.year,i?6:4),"year"===n)return r;if(e){if(r+="-",r+=Ut(t.c.month),"month"===n)return r;r+="-"}else if(r+=Ut(t.c.month),"month"===n)return r;return r+=Ut(t.c.day),r}function oi(t,e,n,i,r,o,s){let a=!n||0!==t.c.millisecond||0!==t.c.second,l="";switch(s){case"day":case"month":case"year":break;default:if(l+=Ut(t.c.hour),"hour"===s)break;if(e){if(l+=":",l+=Ut(t.c.minute),"minute"===s)break;a&&(l+=":",l+=Ut(t.c.second))}else{if(l+=Ut(t.c.minute),"minute"===s)break;a&&(l+=Ut(t.c.second))}if("second"===s)break;!a||i&&0===t.c.millisecond||(l+=".",l+=Ut(t.c.millisecond,3))}return r&&(t.isOffsetFixed&&0===t.offset&&!o?l+="Z":t.o<0?(l+="-",l+=Ut(Math.trunc(-t.o/60)),l+=":",l+=Ut(Math.trunc(-t.o%60))):(l+="+",l+=Ut(Math.trunc(t.o/60)),l+=":",l+=Ut(Math.trunc(t.o%60)))),o&&(l+="["+t.zone.ianaName+"]"),l}const si={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ai={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},li={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ci=["year","month","day","hour","minute","second","millisecond"],ui=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],di=["year","ordinal","hour","minute","second","millisecond"];function hi(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l(t);return e}function pi(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hi(t)}}function mi(t,e){const n=at(e.zone,wt.defaultZone);if(!n.isValid)return bi.invalid(Zn(n));const i=it.fromObject(e);let r,o;if(jt(t.year))r=wt.now();else{for(const e of ci)jt(t[e])&&(t[e]=si[e]);const e=Pt(t)||Ft(t);if(e)return bi.invalid(e);const i=function(t){if(void 0===vi&&(vi=wt.now()),"iana"!==t.type)return t.offset(vi);const e=t.name;let n=yi.get(e);return void 0===n&&(n=t.offset(vi),yi.set(e,n)),n}(n);[r,o]=ti(t,i,n)}return new bi({ts:r,zone:n,loc:i,o:o})}function fi(t,e,n){const i=!!jt(n.round)||n.round,r=jt(n.rounding)?"trunc":n.rounding,o=(t,o)=>{t=Kt(t,i||n.calendary?0:2,n.calendary?"round":r);return e.loc.clone(n).relFormatter(n).format(t,o)},s=i=>n.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i);if(n.unit)return o(s(n.unit),n.unit);for(const t of n.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,n.units[n.units.length-1])}function gi(t){let e,n={};return t.length>0&&"object"==typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}let vi;const yi=new Map;class bi{constructor(t){const e=t.zone||wt.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new kt("invalid input"):null)||(e.isValid?null:Zn(e));this.ts=jt(t.ts)?wt.now():t.ts;let i=null,r=null;if(!n){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[i,r]=[t.old.c,t.old.o];else{const o=Rt(t.o)&&!t.old?t.o:e.offset(this.ts);i=Qn(this.ts,o),n=Number.isNaN(i.year)?new kt("invalid input"):null,i=n?null:i,r=n?null:o}}this._zone=e,this.loc=t.loc||it.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}static now(){return new bi({})}static local(){const[t,e]=gi(arguments),[n,i,r,o,s,a,l]=e;return mi({year:n,month:i,day:r,hour:o,minute:s,second:a,millisecond:l},t)}static utc(){const[t,e]=gi(arguments),[n,i,r,o,s,a,l]=e;return t.zone=ot.utcInstance,mi({year:n,month:i,day:r,hour:o,minute:s,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const n=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);var i;if(Number.isNaN(n))return bi.invalid("invalid input");const r=at(e.zone,wt.defaultZone);return r.isValid?new bi({ts:n,zone:r,loc:it.fromObject(e)}):bi.invalid(Zn(r))}static fromMillis(t,e={}){if(Rt(t))return t<-Yn||t>Yn?bi.invalid("Timestamp out of range"):new bi({ts:t,zone:at(e.zone,wt.defaultZone),loc:it.fromObject(e)});throw new c(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Rt(t))return new bi({ts:1e3*t,zone:at(e.zone,wt.defaultZone),loc:it.fromObject(e)});throw new c("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=at(e.zone,wt.defaultZone);if(!n.isValid)return bi.invalid(Zn(n));const i=it.fromObject(e),r=ae(t,pi),{minDaysInFirstWeek:o,startOfWeek:s}=Nt(r,i),l=wt.now(),c=jt(e.specificOffset)?n.offset(l):e.specificOffset,u=!jt(r.ordinal),d=!jt(r.year),h=!jt(r.month)||!jt(r.day),p=d||h,m=r.weekYear||r.weekNumber;if((p||u)&&m)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new a("Can't mix ordinal dates with month/day");const f=m||r.weekday&&!p;let g,v,y=Qn(l,c);f?(g=ui,v=ai,y=Ct(y,o,s)):u?(g=di,v=li,y=Mt(y)):(g=ci,v=si);let b=!1;for(const t of g){jt(r[t])?r[t]=b?v[t]:y[t]:b=!0}const _=f?function(t,e=4,n=1){const i=$t(t.weekYear),r=Wt(t.weekNumber,1,ne(t.weekYear,e,n)),o=Wt(t.weekday,1,7);return i?r?!o&&St("weekday",t.weekday):St("week",t.weekNumber):St("weekYear",t.weekYear)}(r,o,s):u?function(t){const e=$t(t.year),n=Wt(t.ordinal,1,Xt(t.year));return e?!n&&St("ordinal",t.ordinal):St("year",t.year)}(r):Pt(r),w=_||Ft(r);if(w)return bi.invalid(w);const k=f?At(r,o,s):u?It(r):r,[T,E]=ti(k,c,n),S=new bi({ts:T,zone:n,o:E,loc:i});return r.weekday&&p&&t.weekday!==S.weekday?bi.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${S.toISO()}`):S.isValid?S:bi.invalid(S.invalid)}static fromISO(t,e={}){const[n,i]=function(t){return Le(t,[en,sn],[nn,an],[rn,ln],[on,cn])}(t);return ni(n,i,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,i]=function(t){return Le(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Ze,Ge])}(t);return ni(n,i,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,i]=function(t){return Le(t,[Ke,Qe],[Je,Qe],[Xe,tn])}(t);return ni(n,i,e,"HTTP",e)}static fromFormat(t,e,n={}){if(jt(t)||jt(e))throw new c("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:r=null}=n,o=it.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),[s,a,l,u]=function(t,e,n){const{result:i,zone:r,specificOffset:o,invalidReason:s}=Bn(t,e,n);return[i,r,o,s]}(o,t,e);return u?bi.invalid(u):ni(s,a,n,`format ${e}`,t,l)}static fromString(t,e,n={}){return bi.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,i]=function(t){return Le(t,[dn,sn],[hn,pn])}(t);return ni(n,i,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the DateTime is invalid");const n=t instanceof kt?t:new kt(t,e);if(wt.throwOnInvalid)throw new r(n);return new bi({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=Wn(t,it.fromObject(e));return n?n.map(t=>t?t.val:null).join(""):null}static expandFormat(t,e={}){return Vn(Se.parseFormat(t),it.fromObject(e)).map(t=>t.val).join("")}static resetCache(){vi=void 0,yi.clear()}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Gn(this).weekYear:NaN}get weekNumber(){return this.isValid?Gn(this).weekNumber:NaN}get weekday(){return this.isValid?Gn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Kn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Kn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Kn(this).weekYear:NaN}get ordinal(){return this.isValid?Mt(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ln.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ln.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ln.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ln.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=te(this.c),i=this.zone.offset(n-t),r=this.zone.offset(n+t),o=this.zone.offset(n-i*e),s=this.zone.offset(n-r*e);if(o===s)return[this];const a=n-o*e,l=n-s*e,c=Qn(a,o),u=Qn(l,s);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Jn(this,{ts:a}),Jn(this,{ts:l})]:[this]}get isInLeapYear(){return Jt(this.year)}get daysInMonth(){return Qt(this.year,this.month)}get daysInYear(){return this.isValid?Xt(this.year):NaN}get weeksInWeekYear(){return this.isValid?ne(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ne(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:i}=Se.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:i}}toUTC(t=0,e={}){return this.setZone(ot.instance(t),e)}toLocal(){return this.setZone(wt.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if((t=at(t,wt.defaultZone)).equals(this.zone))return this;if(t.isValid){let i=this.ts;if(e||n){const e=t.offset(this.ts),n=this.toObject();[i]=ti(n,e,t)}return Jn(this,{ts:i,zone:t})}return bi.invalid(Zn(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){return Jn(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=ae(t,pi),{minDaysInFirstWeek:n,startOfWeek:i}=Nt(e,this.loc),r=!jt(e.weekYear)||!jt(e.weekNumber)||!jt(e.weekday),o=!jt(e.ordinal),s=!jt(e.year),l=!jt(e.month)||!jt(e.day),c=s||l,u=e.weekYear||e.weekNumber;if((c||o)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new a("Can't mix ordinal dates with month/day");let d;r?d=At({...Ct(this.c,n,i),...e},n,i):jt(e.ordinal)?(d={...this.toObject(),...e},jt(e.day)&&(d.day=Math.min(Qt(d.year,d.month),d.day))):d=It({...Mt(this.c),...e});const[h,p]=ti(d,this.o,this.zone);return Jn(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;return Jn(this,ei(this,xn.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return Jn(this,ei(this,xn.fromDurationLike(t).negate()))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},i=xn.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===i)if(e){const t=this.loc.getStartOfWeek(),{weekday:e}=this;e<t&&(n.weekNumber=this.weekNumber-1),n.weekday=t}else n.weekday=1;if("quarters"===i){const t=Math.ceil(this.month/3);n.month=3*(t-1)+1}return this.set(n)}endOf(t,e){return this.isValid?this.plus({[t]:1}).startOf(t,e).minus(1):this}toFormat(t,e={}){return this.isValid?Se.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):Un}toLocaleString(t=m,e={}){return this.isValid?Se.create(this.loc.clone(e),t).formatDateTime(this):Un}toLocaleParts(t={}){return this.isValid?Se.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:r=!1,precision:o="milliseconds"}={}){if(!this.isValid)return null;const s="extended"===t;let a=ri(this,s,o=hi(o));return ci.indexOf(o)>=3&&(a+="T"),a+=oi(this,s,e,n,i,r,o),a}toISODate({format:t="extended",precision:e="day"}={}){return this.isValid?ri(this,"extended"===t,hi(e)):null}toISOWeekDate(){return ii(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:r=!1,format:o="extended",precision:s="milliseconds"}={}){if(!this.isValid)return null;return s=hi(s),(i&&ci.indexOf(s)>=3?"T":"")+oi(this,"extended"===o,e,t,n,r,s)}toRFC2822(){return ii(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ii(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ri(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(e||t)&&(n&&(i+=" "),e?i+="z":t&&(i+="ZZ")),ii(this,i,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Un}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",n={}){if(!this.isValid||!t.isValid)return xn.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},r=(a=e,Array.isArray(a)?a:[a]).map(xn.normalizeUnit),o=t.valueOf()>this.valueOf(),s=An(o?this:t,o?t:this,r,i);var a;return o?s.negate():s}diffNow(t="milliseconds",e={}){return this.diff(bi.now(),t,e)}until(t){return this.isValid?On.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const i=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(e,n)<=i&&i<=r.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||bi.fromObject({},{zone:this.zone}),n=t.padding?this<e?-t.padding:t.padding:0;let i=["years","months","days","hours","minutes","seconds"],r=t.unit;return Array.isArray(t.unit)&&(i=t.unit,r=void 0),fi(e,this.plus(n),{...t,numeric:"always",units:i,unit:r})}toRelativeCalendar(t={}){return this.isValid?fi(t.base||bi.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(bi.isDateTime))throw new c("min requires all arguments be DateTimes");return Vt(t,t=>t.valueOf(),Math.min)}static max(...t){if(!t.every(bi.isDateTime))throw new c("max requires all arguments be DateTimes");return Vt(t,t=>t.valueOf(),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:i=null,numberingSystem:r=null}=n;return Bn(it.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,n={}){return bi.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:i=null}=e,r=it.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new zn(r,t)}static fromFormatParser(t,e,n={}){if(jt(t)||jt(e))throw new c("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:r=null}=n,o=it.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0});if(!o.equals(e.locale))throw new c(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${e.locale}`);const{result:s,zone:a,specificOffset:l,invalidReason:u}=e.explainFromTokens(t);return u?bi.invalid(u):ni(s,a,n,`format ${e.format}`,t,l)}static get DATE_SHORT(){return m}static get DATE_MED(){return f}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return k}static get TIME_24_SIMPLE(){return T}static get TIME_24_WITH_SECONDS(){return E}static get TIME_24_WITH_SHORT_OFFSET(){return S}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return D}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return L}static get DATETIME_MED_WITH_SECONDS(){return C}static get DATETIME_MED_WITH_WEEKDAY(){return A}static get DATETIME_FULL(){return M}static get DATETIME_FULL_WITH_SECONDS(){return I}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function _i(t){if(bi.isDateTime(t))return t;if(t&&t.valueOf&&Rt(t.valueOf()))return bi.fromJSDate(t);if(t&&"object"==typeof t)return bi.fromObject(t);throw new c(`Unknown datetime argument: ${t}, of type ${typeof t}`)}}},function(t){var e;e=7368,t(t.s=e)}]);