2 lines
359 KiB
JavaScript
2 lines
359 KiB
JavaScript
/*! For license information please see app.f0f8091d.js.LICENSE.txt */
|
||
(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[524],{424:function(e){window,e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n,i){void 0===t&&(t=null),void 0===n&&(n=null),void 0===i&&(i="en-US"),this.dateInstance="object"==typeof n&&null!==n?n.parse(t instanceof e?t.clone().toJSDate():t):"string"==typeof n?e.parseDateTime(t,n,i):t?e.parseDateTime(t):e.parseDateTime(new Date),this.lang=i}return e.parseDateTime=function(t,n,i){if(void 0===n&&(n="YYYY-MM-DD"),void 0===i&&(i="en-US"),!t)return new Date(NaN);if(t instanceof Date)return new Date(t);if(t instanceof e)return t.clone().toJSDate();if(/^-?\d{10,}$/.test(t))return e.getDateZeroTime(new Date(Number(t)));if("string"==typeof t){for(var s=[],r=null;null!=(r=e.regex.exec(n));)"\\"!==r[1]&&s.push(r);if(s.length){var o={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};s[0].index>0&&(o.value+=".*?");for(var a=0,l=Object.entries(s);a<l.length;a++){var c=l[a],u=c[0],d=c[1],h=Number(u),p=e.formatPatterns(d[0],i),m=p.group,f=p.pattern;o[m]=h+1,o.value+=f,o.value+=".*?"}var g=new RegExp("^"+o.value+"$");if(g.test(t)){var v=g.exec(t),y=Number(v[o.year]),b=null;o.month?b=Number(v[o.month])-1:o.shortMonth?b=e.shortMonths(i).indexOf(v[o.shortMonth]):o.longMonth&&(b=e.longMonths(i).indexOf(v[o.longMonth]));var _=Number(v[o.day])||1;return new Date(y,b,_,0,0,0,0)}}}return e.getDateZeroTime(new Date(t))},e.convertArray=function(t,n){return t.map(function(t){return t instanceof Array?t.map(function(t){return new e(t,n)}):new e(t,n)})},e.getDateZeroTime=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)},e.shortMonths=function(t){return e.MONTH_JS.map(function(e){return new Date(2019,e).toLocaleString(t,{month:"short"})})},e.longMonths=function(t){return e.MONTH_JS.map(function(e){return new Date(2019,e).toLocaleString(t,{month:"long"})})},e.formatPatterns=function(t,n){switch(t){case"YY":case"YYYY":return{group:"year",pattern:"(\\d{"+t.length+"})"};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:"("+e.shortMonths(n).join("|")+")"};case"MMMM":return{group:"longMonth",pattern:"("+e.longMonths(n).join("|")+")"};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"}}},e.prototype.toJSDate=function(){return this.dateInstance},e.prototype.toLocaleString=function(e,t){return this.dateInstance.toLocaleString(e,t)},e.prototype.toDateString=function(){return this.dateInstance.toDateString()},e.prototype.getSeconds=function(){return this.dateInstance.getSeconds()},e.prototype.getDay=function(){return this.dateInstance.getDay()},e.prototype.getTime=function(){return this.dateInstance.getTime()},e.prototype.getDate=function(){return this.dateInstance.getDate()},e.prototype.getMonth=function(){return this.dateInstance.getMonth()},e.prototype.getFullYear=function(){return this.dateInstance.getFullYear()},e.prototype.setMonth=function(e){return this.dateInstance.setMonth(e)},e.prototype.setHours=function(e,t,n,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),this.dateInstance.setHours(e,t,n,i)},e.prototype.setSeconds=function(e){return this.dateInstance.setSeconds(e)},e.prototype.setDate=function(e){return this.dateInstance.setDate(e)},e.prototype.setFullYear=function(e){return this.dateInstance.setFullYear(e)},e.prototype.getWeek=function(e){var t=new Date(this.timestamp()),n=(this.getDay()+(7-e))%7;t.setDate(t.getDate()-n);var i=t.getTime();return t.setMonth(0,1),t.getDay()!==e&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((i-t.getTime())/6048e5)},e.prototype.clone=function(){return new e(this.toJSDate())},e.prototype.isBetween=function(e,t,n){switch(void 0===n&&(n="()"),n){default:case"()":return this.timestamp()>e.getTime()&&this.timestamp()<t.getTime();case"[)":return this.timestamp()>=e.getTime()&&this.timestamp()<t.getTime();case"(]":return this.timestamp()>e.getTime()&&this.timestamp()<=t.getTime();case"[]":return this.timestamp()>=e.getTime()&&this.timestamp()<=t.getTime()}},e.prototype.isBefore=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return e.getTime()>this.getTime();case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")},e.prototype.isSameOrBefore=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return e.getTime()>=this.getTime();case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")},e.prototype.isAfter=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return this.getTime()>e.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")},e.prototype.isSameOrAfter=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return this.getTime()>=e.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")},e.prototype.isSame=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return this.getTime()===e.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")},e.prototype.add=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":this.setSeconds(this.getSeconds()+e);break;case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this},e.prototype.subtract=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":this.setSeconds(this.getSeconds()-e);break;case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this},e.prototype.diff=function(e,t){switch(void 0===t&&(t="seconds"),t){default:case"second":case"seconds":return this.getTime()-e.getTime();case"day":case"days":return Math.round((this.timestamp()-e.getTime())/864e5);case"month":case"months":}},e.prototype.format=function(t,n){if(void 0===n&&(n="en-US"),"object"==typeof t)return t.output(this.clone().toJSDate());for(var i="",s=[],r=null;null!=(r=e.regex.exec(t));)"\\"!==r[1]&&s.push(r);if(s.length){s[0].index>0&&(i+=t.substring(0,s[0].index));for(var o=0,a=Object.entries(s);o<a.length;o++){var l=a[o],c=l[0],u=l[1],d=Number(c);i+=this.formatTokens(u[0],n),s[d+1]&&(i+=t.substring(u.index+u[0].length,s[d+1].index)),d===s.length-1&&(i+=t.substring(u.index+u[0].length))}}return i.replace(/\\/g,"")},e.prototype.timestamp=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()},e.prototype.formatTokens=function(t,n){switch(t){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 e.shortMonths(n)[this.getMonth()];case"MMMM":return e.longMonths(n)[this.getMonth()];case"D":return String(this.getDate());case"DD":return("0"+this.getDate()).slice(-2);default:return""}},e.regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,e.MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11],e}();t.DateTime=i},function(e,t,n){"use strict";var i,s=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),s=0;for(t=0;t<n;t++)for(var r=arguments[t],o=0,a=r.length;o<a;o++,s++)i[s]=r[o];return i};Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),a=n(0),l=n(3),c=n(2),u=function(e){function t(t){var n=e.call(this,t)||this;return n.preventClick=!1,n.bindEvents(),n}return s(t,e),t.prototype.scrollToDate=function(e){if(this.options.scrollToDate){var t=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||e&&e!==this.options.element?e&&this.options.endDate&&e===this.options.elementEnd&&(n.setDate(1),this.options.numberOfMonths>1&&n.isAfter(t)&&n.setMonth(n.getMonth()-(this.options.numberOfMonths-1)),this.calendars[0]=n.clone()):(t.setDate(1),this.calendars[0]=t.clone())}},t.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()},t.prototype.updateInput=function(){if(this.options.element instanceof HTMLInputElement){var e=this.options.startDate,t=this.options.endDate;if(this.options.singleMode&&e)this.options.element.value=e.format(this.options.format,this.options.lang);else if(!this.options.singleMode&&e&&t){var n=e.format(this.options.format,this.options.lang),i=t.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}e||t||(this.options.element.value="",this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.value=""))}},t.prototype.isSamePicker=function(e){return e.closest("."+l.litepicker)===this.ui},t.prototype.shouldShown=function(e){return!e.disabled&&(e===this.options.element||this.options.elementEnd&&e===this.options.elementEnd)},t.prototype.shouldResetDatePicked=function(){return this.options.singleMode||2===this.datePicked.length},t.prototype.shouldSwapDatePicked=function(){return 2===this.datePicked.length&&this.datePicked[0].getTime()>this.datePicked[1].getTime()},t.prototype.shouldCheckLockDays=function(){return this.options.disallowLockDaysInRange&&2===this.datePicked.length},t.prototype.onClick=function(e){var t=e.target;if(e.target.shadowRoot&&(t=e.composedPath()[0]),t&&this.ui)if(this.shouldShown(t))this.show(t);else if(t.closest("."+l.litepicker)||!this.isShowning()){if(this.isSamePicker(t))if(this.emit("before:click",t),this.preventClick)this.preventClick=!1;else{if(t.classList.contains(l.dayItem)){if(e.preventDefault(),t.classList.contains(l.isLocked))return;if(this.shouldResetDatePicked()&&(this.datePicked.length=0),this.datePicked[this.datePicked.length]=new a.DateTime(t.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,r(["preselect"],r(this.datePicked).map(function(e){return e.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(t.classList.contains(l.buttonPreviousMonth)){e.preventDefault();var i=0,s=this.options.switchingMonths||this.options.numberOfMonths;if(this.options.splitView){var o=t.closest("."+l.monthItem);i=c.findNestedMonthItem(o),s=1}return this.calendars[i].setMonth(this.calendars[i].getMonth()-s),this.gotoDate(this.calendars[i],i),void this.emit("change:month",this.calendars[i],i)}if(t.classList.contains(l.buttonNextMonth))return e.preventDefault(),i=0,s=this.options.switchingMonths||this.options.numberOfMonths,this.options.splitView&&(o=t.closest("."+l.monthItem),i=c.findNestedMonthItem(o),s=1),this.calendars[i].setMonth(this.calendars[i].getMonth()+s),this.gotoDate(this.calendars[i],i),void this.emit("change:month",this.calendars[i],i);t.classList.contains(l.buttonCancel)&&(e.preventDefault(),this.hide(),this.emit("button:cancel")),t.classList.contains(l.buttonApply)&&(e.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()},t.prototype.showTooltip=function(e,t){var n=this.ui.querySelector("."+l.containerTooltip);n.style.visibility="visible",n.innerHTML=t;var i=this.ui.getBoundingClientRect(),s=n.getBoundingClientRect(),r=e.getBoundingClientRect(),o=r.top,a=r.left;if(this.options.inlineMode&&this.options.parentEl){var c=this.ui.parentNode.getBoundingClientRect();o-=c.top,a-=c.left}else o-=i.top,a-=i.left;o-=s.height,a-=s.width/2,a+=r.width/2,n.style.top=o+"px",n.style.left=a+"px",this.emit("tooltip",n,e)},t.prototype.hideTooltip=function(){this.ui.querySelector("."+l.containerTooltip).style.visibility="hidden"},t.prototype.shouldAllowMouseEnter=function(e){return!this.options.singleMode&&!e.classList.contains(l.isLocked)},t.prototype.shouldAllowRepick=function(){return this.options.elementEnd&&this.options.allowRepick&&this.options.startDate&&this.options.endDate},t.prototype.isDayItem=function(e){return e.classList.contains(l.dayItem)},t.prototype.onMouseEnter=function(e){var t=this,n=e.target;if(this.isDayItem(n)&&this.shouldAllowMouseEnter(n)){if(this.shouldAllowRepick()&&(this.triggerElement===this.options.element?this.datePicked[0]=this.options.endDate.clone():this.triggerElement===this.options.elementEnd&&(this.datePicked[0]=this.options.startDate.clone())),1!==this.datePicked.length)return;var i=this.ui.querySelector("."+l.dayItem+'[data-time="'+this.datePicked[0].getTime()+'"]'),s=this.datePicked[0].clone(),r=new a.DateTime(n.dataset.time),o=!1;if(s.getTime()>r.getTime()){var c=s.clone();s=r.clone(),r=c.clone(),o=!0}if(Array.prototype.slice.call(this.ui.querySelectorAll("."+l.dayItem)).forEach(function(e){var n=new a.DateTime(e.dataset.time),i=t.renderDay(n);n.isBetween(s,r)&&i.classList.add(l.isInRange),e.className=i.className}),n.classList.add(l.isEndDate),o?(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=r.diff(s,"day")+1;if("function"==typeof this.options.tooltipNumber&&(u=this.options.tooltipNumber.call(this,u)),u>0){var d=this.pluralSelector(u),h=u+" "+(this.options.tooltipText[d]?this.options.tooltipText[d]:"["+d+"]");this.showTooltip(n,h);var p=window.navigator.userAgent,m=/(iphone|ipad)/i.test(p),f=/OS 1([0-2])/i.test(p);m&&f&&n.dispatchEvent(new Event("click"))}else this.hideTooltip()}}},t.prototype.onMouseLeave=function(e){e.target,this.options.allowRepick&&(!this.options.allowRepick||this.options.startDate||this.options.endDate)&&(this.datePicked.length=0,this.render())},t.prototype.onInput=function(e){var t=this.parseInput(),n=t[0],i=t[1],s=this.options.format;if(this.options.elementEnd?n instanceof a.DateTime&&i instanceof a.DateTime&&n.format(s)===this.options.element.value&&i.format(s)===this.options.elementEnd.value:this.options.singleMode?n instanceof a.DateTime&&n.format(s)===this.options.element.value:n instanceof a.DateTime&&i instanceof a.DateTime&&""+n.format(s)+this.options.delimiter+i.format(s)===this.options.element.value){if(i&&n.getTime()>i.getTime()){var r=n.clone();n=i.clone(),i=r.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 o=n.clone(),l=0;(this.options.elementEnd?n.format(s)===e.target.value:e.target.value.startsWith(n.format(s)))||(o=i.clone(),l=this.options.numberOfMonths-1),this.emit("selected",this.getStartDate(),this.getEndDate()),this.gotoDate(o,l)}},t}(o.Calendar);t.Litepicker=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findNestedMonthItem=function(e){for(var t=e.parentNode.childNodes,n=0;n<t.length;n+=1)if(t.item(n)===e)return n;return 0},t.dateIsLocked=function(e,t,n){var i=!1;return t.lockDays.length&&(i=t.lockDays.filter(function(n){return n instanceof Array?e.isBetween(n[0],n[1],t.lockDaysInclusivity):n.isSame(e,"day")}).length),i||"function"!=typeof t.lockDaysFilter||(i=t.lockDaysFilter.call(this,e.clone(),null,n)),i},t.rangeIsLocked=function(e,t){var n=!1;return t.lockDays.length&&(n=t.lockDays.filter(function(n){if(n instanceof Array){var i=e[0].toDateString()===n[0].toDateString()&&e[1].toDateString()===n[1].toDateString();return n[0].isBetween(e[0],e[1],t.lockDaysInclusivity)||n[1].isBetween(e[0],e[1],t.lockDaysInclusivity)||i}return n.isBetween(e[0],e[1],t.lockDaysInclusivity)}).length),n||"function"!=typeof t.lockDaysFilter||(n=t.lockDaysFilter.call(this,e[0].clone(),e[1].clone(),e)),n}},function(e,t,n){var i=n(8);"string"==typeof i&&(i=[[e.i,i,""]]);var s={insert:function(e){var t=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?t.insertBefore(e,n.nextSibling):t.appendChild(e):t.insertBefore(e,t.firstChild),window._lastElementInsertedByStyleLoader=e)},singleton:!1};n(10)(i,s),i.locals&&(e.exports=i.locals)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.Litepicker=i.Litepicker,n(11),window.Litepicker=i.Litepicker,t.default=i.Litepicker},function(e,t,n){"use strict";var i,s=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(0),a=n(3),l=n(2),c=function(e){function t(t){return e.call(this,t)||this}return s(t,e),t.prototype.render=function(){var e=this;this.emit("before:render",this.ui);var t=document.createElement("div");t.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(),s=i.getMonth(),r=i.getMonth()+this.options.numberOfMonths,o=0,l=s;l<r;l+=1){var c=i.clone();c.setDate(1),c.setHours(0,0,0,0),this.options.splitView?c=this.calendars[o].clone():c.setMonth(l),n.appendChild(this.renderMonth(c,o)),o+=1}if(this.ui.innerHTML="",t.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(t){t.preventDefault(),e.clearSelection()}),t.querySelector("."+a.monthItem+":last-child").querySelector("."+a.monthItemHeader).appendChild(u)}this.ui.appendChild(t),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)},t.prototype.renderMonth=function(e,t){var n=this,i=e.clone(),s=32-new Date(i.getFullYear(),i.getMonth(),32).getDate(),r=document.createElement("div");r.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 o.DateTime(new Date(e.getFullYear(),h,2,0,0,0)),f=new o.DateTime(new Date(e.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 o.DateTime(this.options.minDate),"month")||this.options.maxDate&&f.isAfter(new o.DateTime(this.options.maxDate),"month"),p.selected=f.getMonth()===e.getMonth(),d.appendChild(p)}d.addEventListener("change",function(e){var t=e.target,i=0;if(n.options.splitView){var s=t.closest("."+a.monthItem);i=l.findNestedMonthItem(s)}n.calendars[i].setMonth(Number(t.value)),n.render(),n.emit("change:month",n.calendars[i],i,e)}),u.appendChild(d)}else(m=document.createElement("strong")).className=a.monthItemName,m.innerHTML=e.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(e.getFullYear()>y&&((p=document.createElement("option")).value=String(e.getFullYear()),p.text=String(e.getFullYear()),p.selected=!0,p.disabled=!0,g.appendChild(p)),h=y;h>=v;h-=1){p=document.createElement("option");var b=new o.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 o.DateTime(this.options.minDate),"year")||this.options.maxDate&&b.isAfter(new o.DateTime(this.options.maxDate),"year"),p.selected=e.getFullYear()===h,g.appendChild(p)}if(e.getFullYear()<v&&((p=document.createElement("option")).value=String(e.getFullYear()),p.text=String(e.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(e){e.innerHTML=e.value,g.appendChild(e)})}g.addEventListener("change",function(e){var t=e.target,i=0;if(n.options.splitView){var s=t.closest("."+a.monthItem);i=l.findNestedMonthItem(s)}n.calendars[i].setFullYear(Number(t.value)),n.render(),n.emit("change:year",n.calendars[i],i,e)}),u.appendChild(g)}else{var w=document.createElement("span");w.className=a.monthItemYear,w.innerHTML=String(e.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 o.DateTime(this.options.minDate),"month")&&r.classList.add(a.noPreviousMonth),this.options.maxDate&&i.isSameOrAfter(new o.DateTime(this.options.maxDate),"month")&&r.classList.add(a.noNextMonth);var E=document.createElement("div");E.className=a.monthItemWeekdaysRow,this.options.showWeekNumbers&&(E.innerHTML="<div>W</div>");for(var D=1;D<=7;D+=1){var S=3+this.options.firstDay+D,x=document.createElement("div");x.innerHTML=this.weekdayName(S),x.title=this.weekdayName(S,"long"),E.appendChild(x)}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<=s;C+=1)i.setDate(C),this.options.showWeekNumbers&&i.getDay()===this.options.firstDay&&O.appendChild(this.renderWeekNumber(i)),O.appendChild(this.renderDay(i));return r.appendChild(c),r.appendChild(E),r.appendChild(O),this.emit("render:month",r,e),r},t.prototype.renderDay=function(e){e.setHours();var t=document.createElement("div");if(t.className=a.dayItem,t.innerHTML=String(e.getDate()),t.dataset.time=String(e.getTime()),e.toDateString()===(new Date).toDateString()&&t.classList.add(a.isToday),this.datePicked.length)this.datePicked[0].toDateString()===e.toDateString()&&(t.classList.add(a.isStartDate),this.options.singleMode&&t.classList.add(a.isEndDate)),2===this.datePicked.length&&this.datePicked[1].toDateString()===e.toDateString()&&t.classList.add(a.isEndDate),2===this.datePicked.length&&e.isBetween(this.datePicked[0],this.datePicked[1])&&t.classList.add(a.isInRange);else if(this.options.startDate){var n=this.options.startDate,i=this.options.endDate;n.toDateString()===e.toDateString()&&(t.classList.add(a.isStartDate),this.options.singleMode&&t.classList.add(a.isEndDate)),i&&i.toDateString()===e.toDateString()&&t.classList.add(a.isEndDate),n&&i&&e.isBetween(n,i)&&t.classList.add(a.isInRange)}if(this.options.minDate&&e.isBefore(new o.DateTime(this.options.minDate))&&t.classList.add(a.isLocked),this.options.maxDate&&e.isAfter(new o.DateTime(this.options.maxDate))&&t.classList.add(a.isLocked),this.options.minDays>1&&1===this.datePicked.length){var s=this.options.minDays-1,r=this.datePicked[0].clone().subtract(s,"day"),c=this.datePicked[0].clone().add(s,"day");e.isBetween(r,this.datePicked[0],"(]")&&t.classList.add(a.isLocked),e.isBetween(this.datePicked[0],c,"[)")&&t.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var u=this.options.maxDays;r=this.datePicked[0].clone().subtract(u,"day"),c=this.datePicked[0].clone().add(u,"day"),e.isSameOrBefore(r)&&t.classList.add(a.isLocked),e.isSameOrAfter(c)&&t.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&e.isBefore(this.datePicked[0])&&t.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&e.isAfter(this.datePicked[0])&&t.classList.add(a.isLocked),l.dateIsLocked(e,this.options,this.datePicked)&&t.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter(function(t){return t instanceof Array?e.isBetween(t[0],t[1],"[]"):t.isSame(e,"day")}).length&&t.classList.add(a.isHighlighted),t.tabIndex=t.classList.contains("is-locked")?-1:0,this.emit("render:day",t,e),t},t.prototype.renderFooter=function(){var e=document.createElement("div");if(e.className=a.containerFooter,this.options.footerHTML?e.innerHTML=this.options.footerHTML:e.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 t=this.datePicked[0].format(this.options.format,this.options.lang);e.querySelector("."+a.previewDateRange).innerHTML=t}}else if(1===this.datePicked.length&&e.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){t=this.datePicked[0].format(this.options.format,this.options.lang);var n=this.datePicked[1].format(this.options.format,this.options.lang);e.querySelector("."+a.previewDateRange).innerHTML=""+t+this.options.delimiter+n}return this.emit("render:footer",e),e},t.prototype.renderWeekNumber=function(e){var t=document.createElement("div"),n=e.getWeek(this.options.firstDay);return t.className=a.weekNumber,t.innerHTML=53===n&&0===e.getMonth()?"53 / 1":n,t},t.prototype.renderTooltip=function(){var e=document.createElement("div");return e.className=a.containerTooltip,e},t.prototype.weekdayName=function(e,t){return void 0===t&&(t="short"),new Date(1970,0,e,12,0,0,0).toLocaleString(this.options.lang,{weekday:t})},t.prototype.calcSkipDays=function(e){var t=e.getDay()-this.options.firstDay;return t<0&&(t+=7),t},t}(r.LPCore);t.Calendar=c},function(e,t,n){"use strict";var i,s=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),a=n(0),l=n(1),c=function(e){function t(t){var n=e.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=r(r({},n.options),t.element.dataset),Object.keys(n.options).forEach(function(e){"true"!==n.options[e]&&"false"!==n.options[e]||(n.options[e]="true"===n.options[e])});var i=r(r({},n.options.dropdowns),t.dropdowns),s=r(r({},n.options.buttonText),t.buttonText),o=r(r({},n.options.tooltipText),t.tooltipText);n.options=r(r({},n.options),t),n.options.dropdowns=r({},i),n.options.buttonText=r({},s),n.options.tooltipText=r({},o),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(e){n.pluralSelector=function(e){return 0===Math.abs(e)?"one":"other"}}return n}return s(t,e),t.add=function(e,t){l.Litepicker.prototype[e]=t},t.prototype.DateTime=function(e,t){return e?new a.DateTime(e,t):new a.DateTime},t.prototype.init=function(){var e=this;this.options.plugins&&this.options.plugins.length&&this.options.plugins.forEach(function(t){l.Litepicker.prototype.hasOwnProperty(t)?l.Litepicker.prototype[t].init.call(e,e):console.warn("Litepicker: plugin «"+t+"» not found.")})},t.prototype.parseInput=function(){var e=this.options.delimiter,t=new RegExp(""+e),n=this.options.element instanceof HTMLInputElement?this.options.element.value.split(e):[];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&&t.test(this.options.element.value)&&n.length&&n.length%2==0){var i=n.slice(0,n.length/2).join(e),s=n.slice(n.length/2).join(e);return[new a.DateTime(i,this.options.format),new a.DateTime(s,this.options.format)]}return[]},t.prototype.isShowning=function(){return this.ui&&"none"!==this.ui.style.display},t.prototype.findPosition=function(e){var t=e.getBoundingClientRect(),n=this.ui.getBoundingClientRect(),i=this.options.position.split(" "),s=window.scrollX||window.pageXOffset,r=window.scrollY||window.pageYOffset,o=0,a=0;if("auto"!==i[0]&&/top|bottom/.test(i[0]))o=t[i[0]]+r,"top"===i[0]&&(o-=n.height);else{o=t.bottom+r;var l=t.bottom+n.height>window.innerHeight,c=t.top+r-n.height>=n.height;l&&c&&(o=t.top+r-n.height)}if(/left|right/.test(i[0])||i[1]&&"auto"!==i[1]&&/left|right/.test(i[1]))a=/left|right/.test(i[0])?t[i[0]]+s:t[i[1]]+s,"right"!==i[0]&&"right"!==i[1]||(a-=n.width);else{a=t.left+s,l=t.left+n.width>window.innerWidth;var u=t.right+s-n.width>=0;l&&u&&(a=t.right+s-n.width)}return{left:a,top:o}},t}(o.EventEmitter);t.LPCore=c},function(e,t,n){"use strict";var i,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var s,r,o,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),o=r[t]),void 0===o)o=r[t]=n,++e._eventsCount;else if("function"==typeof o?o=r[t]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return e}function d(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,r(this.listener,this.target,e))}function h(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},s=d.bind(i);return s.listener=n,i.wrapFn=s,s}function p(e,t,n){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(s):f(s,s.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),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(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=f(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,h(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,i,s,r,o;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(s=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){o=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,s),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,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[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var s,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(s=r[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){(t=n(9)(!1)).push([e.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',""]),t.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"},e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n,i,s,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(s," */")),l=o.sources.map(function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")});return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(i)for(var r=0;r<this.length;r++){var o=this[r][0];null!=o&&(s[o]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);i&&s[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";var i,s={},r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}();function a(e,t){for(var n=[],i={},s=0;s<e.length;s++){var r=e[s],o=t.base?r[0]+t.base:r[0],a={css:r[1],media:r[2],sourceMap:r[3]};i[o]?i[o].parts.push(a):n.push(i[o]={id:o,parts:[a]})}return n}function l(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=s[i.id],o=0;if(r){for(r.refs++;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(g(i.parts[o],t))}else{for(var a=[];o<i.parts.length;o++)a.push(g(i.parts[o],t));s[i.id]={id:i.id,refs:1,parts:a}}}}function c(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var i=n.nc;i&&(e.attributes.nonce=i)}if(Object.keys(e.attributes).forEach(function(n){t.setAttribute(n,e.attributes[n])}),"function"==typeof e.insert)e.insert(t);else{var s=o(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,n,i){var s=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=d(t,s);else{var r=document.createTextNode(s),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(r,o[t]):e.appendChild(r)}}function p(e,t,n){var i=n.css,s=n.media,r=n.sourceMap;if(s&&e.setAttribute("media",s),r&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var m=null,f=0;function g(e,t){var n,i,s;if(t.singleton){var r=f++;n=m||(m=c(t)),i=h.bind(null,n,r,!1),s=h.bind(null,n,r,!0)}else n=c(t),i=p.bind(null,n,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=a(e,t);return l(n,t),function(e){for(var i=[],r=0;r<n.length;r++){var o=n[r],c=s[o.id];c&&(c.refs--,i.push(c))}e&&l(a(e,t),t);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 s[d.id]}}}}},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),r=n(1),o=n(2);r.Litepicker.prototype.show=function(e){void 0===e&&(e=null),this.emit("before:show",e);var t=e||this.options.element;if(this.triggerElement=t,!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(e),this.render(),this.ui.style.position="absolute",this.ui.style.display="block",this.ui.style.zIndex=this.options.zIndex;var n=this.findPosition(t);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",e)}},r.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")))},r.Litepicker.prototype.getDate=function(){return this.getStartDate()},r.Litepicker.prototype.getStartDate=function(){return this.options.startDate?this.options.startDate.clone():null},r.Litepicker.prototype.getEndDate=function(){return this.options.endDate?this.options.endDate.clone():null},r.Litepicker.prototype.setDate=function(e,t){void 0===t&&(t=!1);var n=new s.DateTime(e,this.options.format,this.options.lang);o.dateIsLocked(n,this.options,[n])&&!t?this.emit("error:date",n):(this.setStartDate(e),this.options.inlineMode&&this.render(),this.emit("selected",this.getDate()))},r.Litepicker.prototype.setStartDate=function(e){e&&(this.options.startDate=new s.DateTime(e,this.options.format,this.options.lang),this.updateInput())},r.Litepicker.prototype.setEndDate=function(e){e&&(this.options.endDate=new s.DateTime(e,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 s.DateTime(e,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(e,t,n){void 0===n&&(n=!1),this.triggerElement=void 0;var i=new s.DateTime(e,this.options.format,this.options.lang),r=new s.DateTime(t,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([i,r],this.options):o.dateIsLocked(i,this.options,[i,r])||o.dateIsLocked(r,this.options,[i,r]))&&!n?this.emit("error:range",[i,r]):(this.setStartDate(i),this.setEndDate(r),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},r.Litepicker.prototype.gotoDate=function(e,t){void 0===t&&(t=0);var n=new s.DateTime(e);n.setDate(1),this.calendars[t]=n.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(e){this.options.lockDays=s.DateTime.convertArray(e,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(e){this.options.highlightedDays=s.DateTime.convertArray(e,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(e){delete e.element,delete e.elementEnd,delete e.parentEl,e.startDate&&(e.startDate=new s.DateTime(e.startDate,this.options.format,this.options.lang)),e.endDate&&(e.endDate=new s.DateTime(e.endDate,this.options.format,this.options.lang));var t=i(i({},this.options.dropdowns),e.dropdowns),n=i(i({},this.options.buttonText),e.buttonText),r=i(i({},this.options.tooltipText),e.tooltipText);this.options=i(i({},this.options),e),this.options.dropdowns=i({},t),this.options.buttonText=i({},n),this.options.tooltipText=i({},r),!this.options.singleMode||this.options.startDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof s.DateTime&&this.options.endDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;o<this.options.numberOfMonths;o+=1){var a=this.options.startDate?this.options.startDate.clone():new s.DateTime;a.setDate(1),a.setMonth(a.getMonth()+o),this.calendars[o]=a}this.options.lockDays.length&&(this.options.lockDays=s.DateTime.convertArray(this.options.lockDays,this.options.lockDaysFormat)),this.options.highlightedDays.length&&(this.options.highlightedDays=s.DateTime.convertArray(this.options.highlightedDays,this.options.highlightedDaysFormat)),this.render(),this.options.inlineMode&&this.show(),this.updateInput()},r.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")},r.Litepicker.prototype.destroy=function(){this.ui&&this.ui.parentNode&&(this.ui.parentNode.removeChild(this.ui),this.ui=null),this.emit("destroy")}}])},2758:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});class i{constructor(e){this.id=e}getContextMenuElement(){if(null===document.getElementById(this.id)){const e=document.createElement("div");e.id=this.id,e.classList.add("dropdown-menu","d-none"),document.body.appendChild(e)}return document.getElementById(this.id)}createFromApi(e,t){let n="";for(const e of t)if(!0===e.divider&&(n+='<div class="dropdown-divider"></div>'),null!==e.url){if(n+='<a class="dropdown-item '+(null!==e.class?e.class:"")+'" href="'+e.url+'"',void 0!==e.attr)for(const t in e.attr)n+=" "+t+'="'+e.attr[t].replaceAll('"',""")+'"';n+=">"+e.title+"</a>"}this.createFromClickEvent(e,n)}createFromClickEvent(e,t){const n=this.getContextMenuElement();n.classList.contains("action-dropdown")||n.classList.add("action-dropdown"),n.innerHTML=t,n.style.position="fixed",n.style.top=e.clientY+"px",n.style.left=e.clientX+"px";const i=e=>{e.target.classList.contains("dropdown-toggle")||e.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(e){[].slice.call(document.querySelectorAll(e)).map(e=>{null!==e.querySelector("td.actions div.dropdown-menu")&&e.addEventListener("contextmenu",t=>{let n=t.target;for(;null!==n;){const e=n.tagName.toUpperCase();if("TH"===e||"TABLE"===e||"BODY"===e)return;if("TR"===e)break;n=n.parentNode}if(null===n||!n.matches("table.dataTable tbody tr"))return;const s=n.querySelector("td.actions div.dropdown-menu");if(null===s)return;t.preventDefault();new i(e.dataset.contextMenu).createFromClickEvent(t,s.innerHTML)})})}}},4028:function(e,t,n){n(4975),n(5366),n.g.KimaiPaginatedBoxWidget=n(4100).A,n.g.KimaiReloadPageWidget=n(5170).A,n.g.KimaiColor=n(9997).A,n.g.KimaiStorage=n(5247).A},4100:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var i=n(2758);class s{constructor(e){this.selector=e;const t=document.querySelector(this.selector);if(void 0!==t.dataset.reload){this.events=t.dataset.reload.split(" ");const e=()=>{let e=null;e=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(e)};for(const t of this.events)document.addEventListener(t,e)}document.body.addEventListener("click",e=>{let t=e.target;t.matches(this.selector+" a.pagination-link")||(t=t.parentNode),t.matches(this.selector+" a.pagination-link")&&(e.preventDefault(),this.loadPage(t.href))})}static create(e){return new s(e)}loadPage(e){const t=this.selector;document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this.selector}));const n=()=>{document.dispatchEvent(new Event("kimai.reloadedContent"))};window.kimai.getPlugin("fetch").fetch(e).then(e=>{e.text().then(e=>{const s=document.createElement("div");s.innerHTML=e,document.querySelector(t).replaceWith(this._makeScriptExecutable(s.firstElementChild)),i.A.createForDataTable(t+" table.dataTable"),n()})}).catch(()=>{window.kimai.getPlugin("alert").error("Failed loading selected page"),n()})}_makeScriptExecutable(e){if(void 0!==e.tagName&&"SCRIPT"===e.tagName){const t=document.createElement("script");t.text=e.innerHTML,e.parentNode.replaceChild(t,e)}else for(const t of e.childNodes)this._makeScriptExecutable(t);return e}}},4975:function(e,t,n){"use strict";n.r(t)},5170:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});class i{constructor(e,t){const n=()=>{t?document.location.reload():this._loadPage(document.location)};for(const t of e.split(" "))document.addEventListener(t,n)}static create(e,t){return null==t&&(t=!1),new i(e,t)}_showOverlay(){document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:"div.page-wrapper"}))}_hideOverlay(){document.dispatchEvent(new Event("kimai.reloadedContent"))}_loadPage(e){this._showOverlay(),window.kimai.getPlugin("fetch").fetch(e).then(e=>{e.text().then(e=>{const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("section.content");document.querySelector("section.content").replaceWith(n),document.dispatchEvent(new Event("kimai.reloadPage")),this._hideOverlay()})}).catch(()=>{this._hideOverlay(),document.location=e})}}},5247:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});class i{static set(e,t){window.localStorage.setItem(e,JSON.stringify(t))}static get(e){let t=window.localStorage.getItem(e);return null==t?null:JSON.parse(t)}static remove(e){window.localStorage.removeItem(e)}}},5366:function(e,t,n){"use strict";var i=n(8097);class s{constructor(e){this._translations=e}get(e){return this._translations[e]}has(e){return e in this._translations}}class r{constructor(e){this._configurations=e}get(e){return this._configurations[e]}has(e){return e in this._configurations}isRTL(){return"rtl"===this.get("direction")}getLanguage(){return this.get("locale").replace("_","-")}is24Hours(){return!!this.get("twentyFourHours")}getFirstDayOfWeek(e=!0){void 0===e&&(e=!0);let t=this.get("first_dow_iso");return e||(t%=7),t}}class o{init(){}getId(){return null}setContainer(e){if(!(e instanceof a))throw new Error("Plugin was given an invalid KimaiContainer");this._core=e}getContainer(){return this._core}getConfiguration(e){return this.getContainer().getConfiguration().get(e)}getConfigurations(){return this.getContainer().getConfiguration()}getDateUtils(){return this.getPlugin("date")}getPlugin(e){return this.getContainer().getPlugin(e)}getTranslation(){return this.getContainer().getTranslation()}translate(e){return this.getTranslation().get(e)}escape(e){return this.getPlugin("escape").escapeForHtml(e)}trigger(e,t=null){this.getPlugin("event").trigger(e,t)}fetch(e,t={}){return this.getPlugin("fetch").fetch(e,t)}fetchForm(e,t={},n=null){n=n||e.getAttribute("action");const i=e.getAttribute("method").toUpperCase();if("GET"===i){const i=this.getPlugin("form").convertFormDataToQueryString(e,{},!0);n=n+(n.includes("?")?"&":"?")+i,t={method:"GET",...t}}else"POST"===i&&(t={method:"POST",body:new FormData(e),...t});return this.fetch(n,t)}isMobile(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)<576}}class a{constructor(e,t){if(!(e instanceof r))throw new Error("Configuration needs to a KimaiConfiguration instance");if(this._configuration=e,!(t instanceof s))throw new Error("Configuration needs to a KimaiTranslation instance");this._translation=t,this._plugins=[]}registerPlugin(e){if(!(e instanceof o))throw new Error("Invalid plugin given, needs to be a KimaiPlugin instance");return e.setContainer(this),this._plugins.push(e),e}getPlugin(e){for(let t of this._plugins)if(null!==t.getId()&&t.getId()===e)return t;throw new Error("Unknown plugin: "+e)}getPlugins(){return this._plugins}getTranslation(){return this._translation}getConfiguration(){return this._configuration}getUser(){return this.getPlugin("user")}}class l extends o{constructor(e){super(),this.dataAttribute=e}getId(){return"datatable-column-visibility"}init(){let e=document.querySelector("["+this.dataAttribute+"]");if(null!==e){this._id=e.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",e=>{this._resetVisibility(e.currentTarget)}),this._modal.querySelectorAll("input[name=datatable_profile]").forEach(e=>{e.addEventListener("change",()=>{const t=this._modal.getElementsByTagName("form")[0];this.fetchForm(t,{},e.getAttribute("data-href")).then(()=>{localStorage.setItem("kimai_profile",e.getAttribute("value")),document.location.reload()}).catch(()=>{t.setAttribute("action",e.getAttribute("data-href")),t.submit()})})});for(let e of this._modal.querySelectorAll("form input[type=checkbox]"))e.addEventListener("change",()=>{this._changeVisibility(e.getAttribute("name"),e.checked)})}}_evaluateCheckboxes(){const e=this._modal.getElementsByTagName("form")[0],t=document.getElementsByClassName("datatable_"+this._id)[0];for(let n of t.getElementsByTagName("th")){const t=n.getAttribute("data-field");if(null===t)continue;const i=e.querySelector("input[name="+t+"]");null!==i&&(i.checked="none"!==window.getComputedStyle(n).display)}}_saveVisibility(){const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e).then(()=>{document.location.reload()}).catch(()=>{e.submit()})}_resetVisibility(e){const t=this._modal.getElementsByTagName("form")[0];this.fetchForm(t,{},e.getAttribute("formaction")).then(()=>{document.location.reload()}).catch(()=>{t.setAttribute("action",e.getAttribute("formaction")),t.submit()})}_changeVisibility(e,t){for(const n of document.getElementsByClassName("datatable_"+this._id)){let i=null;for(let s of n.getElementsByClassName("col_"+e)){if(null===i){let e="-none",n="d-table-cell";t||(e="-table-cell",n="d-none"),i="",s.classList.forEach(function(t,n,s){-1===t.indexOf(e)&&(i+=" "+t)}),-1===i.indexOf(n)&&(i+=" "+n)}s.className=i}}}}var c=n(9336);class u extends o{init(){[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]')).map(function(e){return new c.m_(e)});[...document.querySelectorAll(".offcanvas")].map(e=>new c.go(e));this.getContainer().getPlugin("form").activateForm("div.page-wrapper form"),this._registerModalAutofocus("#remote_form_modal"),this.overlay=null,document.addEventListener("kimai.reloadContent",e=>{if(null!==this.overlay)return;let t="div.page-wrapper";void 0!==e.detail&&null!==e.detail&&(t=e.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(t).append(this.overlay)}),document.addEventListener("kimai.reloadedContent",()=>{null!==this.overlay&&(this.overlay.remove(),this.overlay=null)})}_registerModalAutofocus(e){if(this.isMobile())return;const t=document.querySelector(e);null!==t&&t.addEventListener("shown.bs.modal",()=>{const e=t.querySelector("form");let n=e.querySelectorAll("[autofocus]");n.length<1&&(n=e.querySelectorAll("input[type=text],input[type=date],textarea,select")),n.length>0&&n[0].focus()})}}var d=n(424);n(8214);class h extends o{supportsForm(e){return!1}activateForm(e){}destroyForm(e){}}class p extends h{constructor(e){super(),this._selector=e}init(){window.disableLitepickerStyles=!0,this._pickers=[]}supportsForm(e){return!0}activateForm(e){const t=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 s=[].slice.call(e.querySelectorAll(this._selector)).map(e=>(void 0===e.dataset.format&&console.log("Trying to bind litepicker to an element without data-format attribute"),void 0!==e.hasAttribute("min")&&(i={...i,minDate:e.getAttribute("min")}),void 0!==e.hasAttribute("max")&&(i={...i,maxDate:e.getAttribute("max")}),i={...i,format:e.dataset.format,showTooltip:!1,element:e,lang:n,autoRefresh:!0,firstDay:t,setup:t=>{t.on("preselect",(e,n)=>{t._wasPreselected=!0}),t.on("selected",(n,i)=>{void 0!==t._wasPreselected&&(e.dispatchEvent(new Event("change",{bubbles:!0})),delete t._wasPreselected)}),void 0!==t.backdrop&&document.body.appendChild(t.backdrop)}},[e,new d.Litepicker(this.prepareOptions(i))]));this._pickers=this._pickers.concat(s)}prepareOptions(e){return{...e,plugins:["mobilefriendly"]}}destroyForm(e){[].slice.call(e.querySelectorAll(this._selector)).map(e=>{for(let t=0;t<this._pickers.length;t++)this._pickers[t][0]===e&&(this._pickers[t][1].destroy(),this._pickers.splice(t,1))})}}class m extends p{prepareOptions(e){return{...e,plugins:["mobilefriendly"],singleMode:!1,autoRefresh:!0}}}var f=n(2758);class g extends o{constructor(e,t){super(),this._contentArea=e,this._selector=t}getId(){return"datatable"}init(){const e=document.querySelector(this._selector);if(null===e)return;this.registerContextMenu(this._selector);const t=e.dataset.reloadEvent;if(void 0===t)return;const n=()=>{this.reloadDatatable()};for(let e of t.split(" "))document.addEventListener(e,n);document.addEventListener("pagination-change",n),document.addEventListener("filter-change",n)}registerContextMenu(e){f.A.createForDataTable(e)}reloadDatatable(){const e=this.getContainer().getPlugin("toolbar").getSelector(),t=document.querySelector(e),n=e=>{const t=document.createElement("div");t.innerHTML=e;const n=t.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!==t?this.fetchForm(t).then(e=>{e.text().then(n)}).catch(()=>{t.submit()}):this.fetch(document.location).then(e=>{e.text().then(n)}).catch(()=>{document.location.reload()})}}class v extends o{constructor(e,t){super(),this._formSelector=e,this._actionClass=t}getId(){return"toolbar"}init(){const e=this.getSelector();this._registerPagination(e),this._registerSortableTables(e),this._registerAlternativeSubmitActions(e,this._actionClass),[].slice.call(document.querySelectorAll(e+" input")).map(t=>{t.addEventListener("change",t=>{switch(t.target.id){case"order":case"orderBy":case"page":break;default:document.querySelector(e+" input#page").value=1}}),this.triggerChange()}),[].slice.call(document.querySelectorAll(e+" select")).map(t=>{t.addEventListener("change",t=>{let n=!0;switch(t.target.id){case"customer":null!==document.querySelector(e+" select#project")&&(n=!1);break;case"project":null!==document.querySelector(e+" select#activity")&&(n=!1)}document.querySelector(e+" input#page").value=1,n&&this.triggerChange()})})}_registerAlternativeSubmitActions(e,t){document.addEventListener("click",function(n){let i=n.target;for(;null!==i&&"function"==typeof i.matches&&!i.matches("body");){if(i.classList.contains(t)){const t=document.querySelector(e);if(null===t)return;const s=t.getAttribute("action"),r=t.getAttribute("method");void 0!==i.dataset.target&&(t.target=i.dataset.target),t.action=i.href,void 0!==i.dataset.method&&(t.method=i.dataset.method),t.submit(),t.target="",t.action=s,t.method=r,n.preventDefault(),n.stopPropagation()}i=i.parentNode}})}_registerSortableTables(e){document.body.addEventListener("click",t=>{if(!t.target.matches("th.sortable"))return;let n="DESC",i=t.target.dataset.order;t.target.classList.contains("sorting_desc")&&(n="ASC"),document.querySelector(e+" #orderBy").value=i,document.querySelector(e+" #order").value=n,document.querySelector(e+" #orderBy").dispatchEvent(new Event("change")),document.querySelector(e+" #order").dispatchEvent(new Event("change")),document.dispatchEvent(new Event("filter-change"))})}_registerPagination(e){document.body.addEventListener("click",t=>{if(!(t.target.matches("ul.pagination li a")||null!==t.target.parentNode&&t.target.parentNode.matches("ul.pagination li a")))return;let n=document.querySelector(e+" input#page");if(null===n)return;let i=t.target;i.matches("a")||(i=i.parentNode),t.preventDefault(),t.stopPropagation();let s=i.href.split("/"),r=s[s.length-1];return/\d/.test(r)||(r=1),n.value=r,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 o{getId(){return"api"}_headers(){const e=new Headers;return e.append("Content-Type","application/json"),e}get(e,t,n,i){if(void 0!==t){const n=new URLSearchParams(t).toString();""!==n&&(e=e+(e.includes("?")?"&":"?")+n)}void 0===i&&(i=e=>{this.handleError("An error occurred",e)}),this.fetch(e,{method:"GET",headers:this._headers()}).then(e=>{e.json().then(e=>{n(e)})}).catch(e=>{i(e)})}post(e,t,n,i){void 0===i&&(i=e=>{this.handleError("action.update.error",e)}),this.fetch(e,{method:"POST",body:this._parseData(t),headers:this._headers()}).then(e=>{e.json().then(e=>{n(e)})}).catch(e=>{i(e)})}patch(e,t,n,i){void 0===i&&(i=e=>{this.handleError("action.update.error",e)}),this.fetch(e,{method:"PATCH",body:this._parseData(t),headers:this._headers()}).then(e=>{204===e.statusCode?n():e.json().then(e=>{n(e)})}).catch(e=>{i(e)})}delete(e,t,n){void 0===n&&(n=e=>{this.handleError("action.delete.error",e)}),this.fetch(e,{method:"DELETE",headers:this._headers()}).then(()=>{t()}).catch(e=>{n(e)})}_parseData(e){return"object"==typeof e?JSON.stringify(e):e}handleError(e,t){if(void 0===t.headers)return;const n=t.headers.get("content-type");n&&-1!==n.indexOf("application/json")?t.json().then(n=>{let i=n.message;if(400===t.status&&n.errors){let e=["<u>"+i+"</u>"];if(n.errors.errors)for(let t of n.errors.errors)e.push(t);if(n.errors.children)for(let t in n.errors.children){let i=n.errors.children[t];if(void 0!==i.errors&&i.errors.length>0)for(let t of i.errors)e.push(t)}e.length>0&&(i=e)}this.getPlugin("alert").error(e,i)}):t.text().then(()=>{const n="["+t.statusCode+"] "+t.statusText;this.getPlugin("alert").error(e,n)})}}class b extends o{addClickHandler(e,t,n){document.body.addEventListener("click",i=>{let s=i.target;for(;null!==s;){const t=s.tagName.toUpperCase();if("BODY"===t)return;if(s.matches(e))break;if("A"===t||"BUTTON"===t||"INPUT"===t||"LABEL"===t)return;for(let e of n)if(s.matches(e))return;s=s.parentNode}if(null===s)return;if(s.isContentEditable||s.parentNode.isContentEditable)return;if(!s.matches(e))return;for(let e of n)if(s.matches(e))return;i.preventDefault(),i.stopPropagation();let r=s.dataset.href;null==r&&(r=s.href),null!=r&&""!==r&&t(r)})}}class _ extends b{constructor(e){super(),this._selector=e}init(){this.addClickHandler(this._selector,function(e){window.location=e},[])}}class w extends b{constructor(e,t){super(),this._selector=e,this._stopSelector=t}getId(){return"modal"}init(){this._isDirty=!1;const e=this._getModalElement();null!==e&&(e.addEventListener("hide.bs.modal",t=>{if(this._isDirty){if(null===e.querySelector(".modal-body .remote_modal_is_dirty_warning")){const t=this.translate("modal.dirty"),n=document.createElement("div");n.innerHTML='<p class="text-danger small remote_modal_is_dirty_warning">'+t+"</p>",e.querySelector(".modal-body").prepend(n.firstElementChild)}t.preventDefault()}else this._isDirty=!1,document.dispatchEvent(new Event("modal-hide"))}),e.addEventListener("hidden.bs.modal",()=>{this.getContainer().getPlugin("form").destroyForm(this._getFormIdentifier()),e.querySelector(".modal-body").replaceWith("")}),e.addEventListener("show.bs.modal",()=>{document.dispatchEvent(new Event("modal-show"))}),this.addClickHandler(this._selector,e=>{this.openUrlInModal(e)},this._stopSelector))}_getModal(){return c.aF.getOrCreateInstance(this._getModalElement())}openUrlInModal(e,t){const n=new Headers;n.append("X-Requested-With","Kimai-Modal"),this.fetch(e,{method:"GET",redirect:"follow",headers:n}).then(t=>{if(t.ok)return t.text().then(e=>{this._openFormInModal(e)});window.location=e}).catch(n=>{null==t?window.location=e:t(n)})}_getFormIdentifier(){return"#remote_form_modal .modal-content form"}_getModalElement(){return document.getElementById("remote_form_modal")}_makeScriptExecutable(e){if(void 0!==e.tagName&&"SCRIPT"===e.tagName){const t=document.createElement("script");t.text=e.innerHTML,e.parentNode.replaceChild(t,e)}else for(const t of e.childNodes)this._makeScriptExecutable(t);return e}_openFormInModal(e){const t=this._getFormIdentifier();let n=this._getModalElement();const i=document.createElement("div");i.innerHTML=e;const s=this._makeScriptExecutable(i.querySelector("#form_modal .modal-content"));if(null!==s){let e=n.querySelector(".modal-dialog"),r=i.querySelector(".modal-dialog").classList.contains("modal-lg");r&&!e.classList.contains("modal-lg")&&e.classList.toggle("modal-lg"),!r&&e.classList.contains("modal-lg")&&e.classList.toggle("modal-lg"),n.querySelector(".modal-content").replaceWith(s),[].slice.call(n.querySelectorAll('[data-bs-dismiss="modal"]')).map(e=>{e.addEventListener("click",()=>{this._isDirty=!1,this._getModal().hide()})}),this.getContainer().getPlugin("form").activateForm(t)}let r=i.querySelector("div.alert");null!==r&&n.querySelector(".modal-body").prepend(r);const o=document.querySelector(t);o.addEventListener("change",()=>{this._isDirty=!0}),o.addEventListener("submit",this._getEventHandler()),this._getModal().show()}_getEventHandler(){return void 0===this.eventHandler&&(this.eventHandler=e=>{const t=e.target;if(void 0!==t.target&&""!==t.target)return!0;const n=document.querySelector(this._getFormIdentifier()+" button[type=submit]");n.textContent=n.textContent+" …",n.disabled=!0;const i=t.dataset.formEvent,s=this.getContainer().getPlugin("event");e.preventDefault(),e.stopPropagation();const r=new Headers;r.append("X-Requested-With","Kimai-Modal");const o={headers:r};this.fetchForm(t,o).then(e=>{e.text().then(e=>{const t=document.createElement("div");t.innerHTML=e;let r=!1,o=!1,a=!1;n.textContent=n.textContent.replace(" …",""),n.disabled=!1;const l=t.querySelector("#form_modal .modal-content");null!==l&&(r=null!==l.querySelector(".is-invalid"),r||(r=null!==l.querySelector(".invalid-feedback")),o=null!==l.querySelector("ul.list-unstyled li.text-danger"),a=null!==t.querySelector("div.alert-danger")),r||o||a?this._openFormInModal(e):(s.trigger(i),this._isDirty=!1,this._getModal().hide())})}).catch(e=>{let i=t.dataset.msgError;null!=i&&""!==i||(i="action.update.error");this.getContainer().getPlugin("alert").error(i,e.message),setTimeout(()=>{n.textContent=n.textContent.replace(" …",""),n.disabled=!1},1500)})}),this.eventHandler}}class k extends o{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 e=()=>{this.reloadActiveRecords()};document.addEventListener("kimai.timesheetUpdate",e),document.addEventListener("kimai.timesheetDelete",e),document.addEventListener("kimai.activityUpdate",e),document.addEventListener("kimai.activityDelete",e),document.addEventListener("kimai.projectUpdate",e),document.addEventListener("kimai.projectDelete",e),document.addEventListener("kimai.customerUpdate",e),document.addEventListener("kimai.customerDelete",e),this._updateBrowserTitle=!!this.getConfiguration("updateBrowserTitle");const t=()=>{this._updateDuration()};this._updatesHandler=setInterval(t,1e4),document.addEventListener("kimai.timesheetUpdate",t),document.addEventListener("kimai.reloadedContent",t)}_updateDuration(){const e=document.querySelectorAll('[data-since]:not([data-since=""])');if(this._updateBrowserTitle&&this._changeFavicon(e.length>0),0===e.length)return void(this._updateBrowserTitle&&(void 0===document.body.dataset.title?this._updateBrowserTitle=!1:document.title=document.body.dataset.title));const t=this.getDateUtils();let n=[];for(const i of e){const e=t.formatDuration(i.dataset.since);void 0!==i.dataset.replacer&&null!==i.dataset.title&&"?"!==e&&n.push(e),i.textContent=e}0!==n.length&&this._updateBrowserTitle&&(document.title=n.shift())}_setEntries(e){const t=e.length>0;for(let e of document.querySelectorAll(this._selectorEmpty))e.style.display=t?"none":"inline-block";for(let n of document.querySelectorAll(this._selector)){if(n.style.display=t?"inline-block":"none",!t)for(let e of n.querySelectorAll("[data-since]"))e.dataset.since="";const i=n.querySelector(".ticktac-stop");t?(i&&(i.accesskey="s"),this._replaceInNode(n,e[0])):i&&(i.accesskey=null)}this._updateDuration()}_replaceInNode(e,t){const n=this.getDateUtils(),i=e.querySelectorAll("[data-replacer]");for(let s of i){const i=s.dataset.replacer;"url"===i?s.dataset.href=e.dataset.href.replace("000",t.id):"activity"===i?s.innerText=t.activity.name:"project"===i?s.innerText=t.project.name:"customer"===i?s.innerText=t.project.customer.name:"duration"===i&&(s.dataset.since=t.begin,s.innerText=n.formatDuration(t.duration))}}reloadActiveRecords(){const e=this.getContainer().getPlugin("api"),t=document.querySelector(this._selector).dataset.api;e.get(t,{},e=>{this._setEntries(e)})}_changeFavicon(e){const t=document.createElement("canvas"),n=document.getElementById("favicon");null===this._favIconUrl&&(this._favIconUrl=n.href);const i=n.cloneNode(!0);if(t.getContext&&i){const s=window.devicePixelRatio,r=document.createElement("img");t.height=t.width=16*s,r.onload=function(){const r=t.getContext("2d");if(r.drawImage(this,0,0,t.width,t.height),e){const e=5.5*s;r.fillStyle="rgb(182,57,57)",r.fillRect(t.width/2-e/2,t.height/2-e/2,e,e)}i.href=t.toDataURL("image/png"),n.remove(),document.head.appendChild(i)},r.src=this._favIconUrl}}}class T extends o{getId(){return"event"}trigger(e,t=null){if(""!==e)for(const n of e.split(" ")){let e=new Event(n);null!==t&&(e=new CustomEvent(n,{detail:t})),document.dispatchEvent(e)}}}class E extends o{constructor(e){super(),this._selector=e}init(){document.addEventListener("click",e=>{let t=e.target;for(;null!==t&&"function"==typeof t.matches&&!t.matches("body");){if(t.classList.contains(this._selector)){const n=t.dataset;let i=n.href;i||(i=t.getAttribute("href")),void 0!==n.question?this.getContainer().getPlugin("alert").question(n.question,e=>{e&&this._callApi(i,n)}):this._callApi(i,n),e.preventDefault(),e.stopPropagation()}t=t.parentNode}})}_callApi(e,t){const n=t.method,i=t.event,s=this.getContainer().getPlugin("api"),r=this.getContainer().getPlugin("event"),o=(this.getContainer().getPlugin("alert"),()=>{r.trigger(i),document.dispatchEvent(new CustomEvent("kimai.reloadedContent"))}),a=e=>{let n="action.update.error";void 0!==t.msgError&&(n=t.msgError),document.dispatchEvent(new CustomEvent("kimai.reloadedContent")),s.handleError(n,e)};let l={};if(void 0!==t.payload&&(l=t.payload),document.dispatchEvent(new CustomEvent("kimai.reloadContent")),"PATCH"===n)s.patch(e,l,o,a);else if("POST"===n){let t={};s.post(e,t,o,a)}else"DELETE"===n?s.delete(e,o,a):"GET"===n&&s.get(e,l,o,a)}}class D extends o{getId(){return"alert"}error(e,t){const n=this.getTranslation();n.has(e)&&(e=n.get(e)),e=e.replace("%reason%",""),void 0===t&&(t=null),null!==t&&(n.has(t)&&(t=n.get(t)),Array.isArray(t)&&(t=t.join("<br>")));const i="alert_global_error",s=document.getElementById(i);null!==s&&c.aF.getOrCreateInstance(s).hide();const r='\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>'+e+"</h2>\n "+(null!==t?'<div class="text-muted">'+t+"</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(r)}warning(e){this._show("warning",e)}success(e){this._toast("success",e)}info(e){this._show("info",e)}_showModal(e){const t=document.body,n=document.createElement("template");n.innerHTML=e.trim();const i=n.content.firstChild;t.appendChild(i);const s=new c.aF(i);i.addEventListener("hidden.bs.modal",function(){t.removeChild(i)}),s.show()}_show(e,t){const n=this.getTranslation();n.has(t)&&(t=n.get(t));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(e)+'"></div>\n <div class="modal-body text-center py-4">\n <i class="fas fa-exclamation-circle fa-3x mb-3 text-'+this._mapClass(e)+'"></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 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(e){return"info"===e||"success"===e||"warning"===e||"danger"===e?e:"error"===e?"danger":"primary"}_toast(e,t){const n=this.getTranslation();n.has(t)&&(t=n.get(t));let i='<i class="fas fa-info me-2"></i>';"success"===e?i='<i class="fas fa-check me-2"></i>':"warning"===e?i='<i class="fas fa-exclamation me-2"></i>':"danger"!==e&&"error"!==e||(i='<i class="fas fa-exclamation-circle me-2"></i>');const s='<div class="toast align-items-center text-white bg-'+this._mapClass(e)+' 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+" "+t+'\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>',r=document.getElementById("toast-container"),o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a);const l=new c.y8(a);a.addEventListener("hidden.bs.toast",function(){r.removeChild(a)}),l.show()}question(e,t){const n=this.getTranslation();n.has(e)&&(e=n.get(e));const i=this._mapClass("info"),s='\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>'+e+'</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 ",r=document.body,o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a),a.querySelector(".question-confirm").addEventListener("click",()=>{t(!0)}),a.querySelector(".question-cancel").addEventListener("click",()=>{t(!1)});const l=new c.aF(a);a.addEventListener("hidden.bs.modal",()=>{r.removeChild(a)}),l.show()}}function S(e,t){e.split(/\s+/).forEach(e=>{t(e)})}class x{constructor(){this._events={}}on(e,t){S(e,e=>{const n=this._events[e]||[];n.push(t),this._events[e]=n})}off(e,t){var n=arguments.length;0!==n?S(e,e=>{if(1===n)return void delete this._events[e];const i=this._events[e];void 0!==i&&(i.splice(i.indexOf(t),1),this._events[e]=i)}):this._events={}}trigger(e,...t){var n=this;S(e,e=>{const i=n._events[e];void 0!==i&&i.forEach(e=>{e.apply(n,t)})})}}const O=e=>(e=e.filter(Boolean)).length<2?e[0]||"":1==I(e)?"["+e.join("")+"]":"(?:"+e.join("|")+")",L=e=>{if(!A(e))return e.join("");let t="",n=0;const i=()=>{n>1&&(t+="{"+n+"}")};return e.forEach((s,r)=>{s!==e[r-1]?(i(),t+=s,n=1):n++}),i(),t},C=e=>{let t=Array.from(e);return O(t)},A=e=>new Set(e).size!==e.length,M=e=>(e+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),I=e=>e.reduce((e,t)=>Math.max(e,N(t)),0),N=e=>Array.from(e).length,P=e=>{if(1===e.length)return[[e]];let t=[];const n=e.substring(1);return P(n).forEach(function(n){let i=n.slice(0);i[0]=e.charAt(0)+i[0],t.push(i),i=n.slice(0),i.unshift(e.charAt(0)),t.push(i)}),t},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 e in H){let t=H[e]||"";for(let n=0;n<t.length;n++){let i=t.substring(n,n+1);$[i]=e}}const q=new RegExp(Object.keys($).join("|")+"|[̀-ͯ·ʾʼ]","gu"),V=(e,t="NFKD")=>e.normalize(t),z=e=>Array.from(e).reduce((e,t)=>e+B(t),""),B=e=>(e=V(e).toLowerCase().replace(q,e=>$[e]||""),V(e,"NFC"));const W=e=>{const t={},n=(e,n)=>{const i=t[e]||new Set,s=new RegExp("^"+C(i)+"$","iu");n.match(s)||(i.add(M(n)),t[e]=i)};for(let t of function*(e){for(const[t,n]of e)for(let e=t;e<=n;e++){let t=String.fromCharCode(e),n=z(t);n!=t.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:t,code_point:e}))}}(e))n(t.folded,t.folded),n(t.folded,t.composed);return t},U=e=>{const t=W(e),n={};let i=[];for(let e in t){let s=t[e];s&&(n[e]=C(s)),e.length>1&&i.push(M(e))}i.sort((e,t)=>t.length-e.length);const s=O(i);return R=new RegExp("^"+s,"u"),n},Y=(e,t=1)=>(t=Math.max(t,e.length-1),O(P(e).map(e=>((e,t=1)=>{let n=0;return e=e.map(e=>(j[e]&&(n+=e.length),j[e]||e)),n>=t?L(e):""})(e,t)))),Z=(e,t=!0)=>{let n=e.length>1?1:0;return O(e.map(e=>{let i=[];const s=t?e.length():e.length()-1;for(let t=0;t<s;t++)i.push(Y(e.substrs[t]||"",n));return L(i)}))},G=(e,t)=>{for(const n of t){if(n.start!=e.start||n.end!=e.end)continue;if(n.substrs.join("")!==e.substrs.join(""))continue;let t=e.parts;const i=e=>{for(const n of t){if(n.start===e.start&&n.substr===e.substr)return!1;if(1!=e.length&&1!=n.length){if(e.start<n.start&&e.end>n.start)return!0;if(n.start<e.start&&n.end>e.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(e){e&&(this.parts.push(e),this.substrs.push(e.substr),this.start=Math.min(e.start,this.start),this.end=Math.max(e.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(e,t){let n=new K,i=JSON.parse(JSON.stringify(this.parts)),s=i.pop();for(const e of i)n.add(e);let r=t.substr.substring(0,e-s.start),o=r.length;return n.add({start:s.start,end:s.start+o,length:o,substr:r}),n}}const J=e=>{var t;void 0===j&&(j=U(t||F)),e=z(e);let n="",i=[new K];for(let t=0;t<e.length;t++){let s=e.substring(t).match(R);const r=e.substring(t,t+1),o=s?s[0]:null;let a=[],l=new Set;for(const e of i){const n=e.last();if(!n||1==n.length||n.end<=t)if(o){const n=o.length;e.add({start:t,end:t+n,length:n,substr:o}),l.add("1")}else e.add({start:t,end:t+1,length:1,substr:r}),l.add("2");else if(o){let i=e.clone(t,n);const s=o.length;i.add({start:t,end:t+s,length:s,substr:o}),a.push(i)}else l.add("3")}if(a.length>0){a=a.sort((e,t)=>e.length()-t.length());for(let e of a)G(e,i)||i.push(e)}else if(t>0&&1==l.size&&!l.has("3")){n+=Z(i,!1);let e=new K;const t=i[0];t&&e.add(t.last()),i=[e]}}return n+=Z(i,!0),n},X=(e,t)=>{if(e)return e[t]},Q=(e,t)=>{if(e){for(var n,i=t.split(".");(n=i.shift())&&(e=e[n]););return e}},ee=(e,t,n)=>{var i,s;return e?(e+="",null==t.regex||-1===(s=e.search(t.regex))?0:(i=t.string.length/e.length,0===s&&(i+=.5),i*n)):0},te=(e,t)=>{var n=e[t];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(e[t]=[n])},ne=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},ie=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=z(e+"").toLowerCase())>(t=z(t+"").toLowerCase())?1:t>e?-1:0;class se{items;settings;constructor(e,t){this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,n){if(!e||!e.length)return[];const i=[],s=e.split(/\s+/);var r;return n&&(r=new RegExp("^("+Object.keys(n).map(M).join("|")+"):(.*)$")),s.forEach(e=>{let n,s=null,o=null;r&&(n=e.match(r))&&(s=n[1],e=n[2]),e.length>0&&(o=this.settings.diacritics?J(e)||null:M(e),o&&t&&(o="\\b"+o)),i.push({string:e,regex:o?new RegExp(o,"iu"):null,field:s})}),i}getScoreFunction(e,t){var n=this.prepareSearch(e,t);return this._getScoreFunction(n)}_getScoreFunction(e){const t=e.tokens,n=t.length;if(!n)return function(){return 0};const i=e.options.fields,s=e.weights,r=i.length,o=e.getAttrFn;if(!r)return function(){return 1};const a=1===r?function(e,t){const n=i[0].field;return ee(o(t,n),e,s[n]||1)}:function(e,t){var n=0;if(e.field){const i=o(t,e.field);!e.regex&&i?n+=1/r:n+=ee(i,e,1)}else ne(s,(i,s)=>{n+=ee(o(t,s),e,i)});return n/r};return 1===n?function(e){return a(t[0],e)}:"and"===e.options.conjunction?function(e){var i,s=0;for(let n of t){if((i=a(n,e))<=0)return 0;s+=i}return s/n}:function(e){var i=0;return ne(t,t=>{i+=a(t,e)}),i/n}}getSortFunction(e,t){var n=this.prepareSearch(e,t);return this._getSortFunction(n)}_getSortFunction(e){var t,n=[];const i=this,s=e.options,r=!e.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof r)return r.bind(this);const o=function(t,n){return"$score"===t?n.score:e.getAttrFn(i.items[n.id],t)};if(r)for(let t of r)(e.query||"$score"!==t.field)&&n.push(t);if(e.query){t=!0;for(let e of n)if("$score"===e.field){t=!1;break}t&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter(e=>"$score"!==e.field);return n.length?function(e,t){var i,s;for(let r of n){if(s=r.field,i=("desc"===r.direction?-1:1)*ie(o(s,e),o(s,t)))return i}return 0}:null}prepareSearch(e,t){const n={};var i=Object.assign({},t);if(te(i,"sort"),te(i,"sort_empty"),i.fields){te(i,"fields");const e=[];i.fields.forEach(t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),n[t.field]="weight"in t?t.weight:1}),i.fields=e}return{options:i,query:e.toLowerCase().trim(),tokens:this.tokenize(e,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?Q:X}}search(e,t){var n,i,s=this;i=this.prepareSearch(e,t),t=i.options,e=i.query;const r=t.score||s._getScoreFunction(i);e.length?ne(s.items,(e,s)=>{n=r(e),(!1===t.filter||n>0)&&i.items.push({score:n,id:s})}):ne(s.items,(e,t)=>{i.items.push({score:1,id:t})});const o=s._getSortFunction(i);return o&&i.items.sort(o),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i}}const re=e=>null==e?null:oe(e),oe=e=>"boolean"==typeof e?e?"1":"0":e+"",ae=e=>(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),le=(e,t)=>{var n;return function(i,s){var r=this;n&&(r.loading=Math.max(r.loading-1,0),clearTimeout(n)),n=setTimeout(function(){n=null,r.loadedSearches[i]=!0,e.call(r,i,s)},t)}},ce=(e,t,n)=>{var i,s=e.trigger,r={};for(i of(e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return s.apply(e,arguments);r[n]=arguments},n.apply(e,[]),e.trigger=s,t))i in r&&s.apply(e,r[i])},ue=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},de=(e,t,n,i)=>{e.addEventListener(t,n,i)},he=(e,t)=>!!t&&(!!t[e]&&1===(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0)),pe=(e,t)=>{const n=e.getAttribute("id");return n||(e.setAttribute("id",t),t)},me=e=>e.replace(/[\\"']/g,"\\$&"),fe=(e,t)=>{t&&e.append(t)},ge=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},ve=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(ye(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},ye=e=>"string"==typeof e&&e.indexOf("<")>-1,be=(e,t)=>{var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!1),e.dispatchEvent(n)},_e=(e,t)=>{Object.assign(e.style,t)},we=(e,...t)=>{var n=Te(t);(e=Ee(e)).map(e=>{n.map(t=>{e.classList.add(t)})})},ke=(e,...t)=>{var n=Te(t);(e=Ee(e)).map(e=>{n.map(t=>{e.classList.remove(t)})})},Te=e=>{var t=[];return ge(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},Ee=e=>(Array.isArray(e)||(e=[e]),e),De=(e,t,n)=>{if(!n||n.contains(e))for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}},Se=(e,t=0)=>t>0?e[e.length-1]:e[0],xe=(e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n},Oe=(e,t)=>{ge(t,(t,n)=>{null==t?e.removeAttribute(n):e.setAttribute(n,""+t)})},Le=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},Ce=(e,t)=>{if(null===t)return;if("string"==typeof t){if(!t.length)return;t=new RegExp(t,"i")}const n=e=>3===e.nodeType?(e=>{var n=e.data.match(t);if(n&&e.data.length>0){var i=document.createElement("span");i.className="highlight";var s=e.splitText(n.index);s.splitText(n[0].length);var r=s.cloneNode(!0);return i.appendChild(r),Le(s,i),1}return 0})(e):((e=>{1!==e.nodeType||!e.childNodes||/(script|style)/i.test(e.tagName)||"highlight"===e.className&&"SPAN"===e.tagName||Array.from(e.childNodes).forEach(e=>{n(e)})})(e),0);n(e)},Ae="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var Me={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,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(e){return e.length>0},render:{}};function Ie(e,t){var n=Object.assign({},Me,t),i=n.dataAttr,s=n.labelField,r=n.valueField,o=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=e.tagName.toLowerCase(),d=e.getAttribute("placeholder")||e.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let t=e.querySelector('option[value=""]');t&&(d=t.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null};return"select"===u?(()=>{var t,u=h.options,d={},p=1;let m=0;var f=e=>{var t=Object.assign({},e.dataset),n=i&&t[i];return"string"==typeof n&&n.length&&(t=Object.assign(t,JSON.parse(n))),t},g=(e,t)=>{var i=re(e.value);if(null!=i&&(i||n.allowEmptyOption)){if(d.hasOwnProperty(i)){if(t){var l=d[i][a];l?Array.isArray(l)?l.push(t):d[i][a]=[l,t]:d[i][a]=t}}else{var c=f(e);c[s]=c[s]||e.textContent,c[r]=c[r]||i,c[o]=c[o]||e.disabled,c[a]=c[a]||t,c.$option=e,c.$order=c.$order||++m,d[i]=c,u.push(c)}e.selected&&h.items.push(i)}};h.maxItems=e.hasAttribute("multiple")?null:1,ge(e.children,e=>{var n,i,s;"optgroup"===(t=e.tagName.toLowerCase())?((s=f(n=e))[l]=s[l]||n.getAttribute("label")||"",s[c]=s[c]||p++,s[o]=s[o]||n.disabled,s.$order=s.$order||++m,h.optgroups.push(s),i=s[c],ge(n.children,e=>{g(e,i)})):"option"===t&&g(e)})})():(()=>{const t=e.getAttribute(i);if(t)h.options=JSON.parse(t),ge(h.options,e=>{h.items.push(e[r])});else{var o=e.value.trim()||"";if(!n.allowEmptyOption&&!o.length)return;const t=o.split(n.delimiter);ge(t,e=>{const t={};t[s]=e,t[r]=e,h.options.push(t)}),h.items=t}})(),Object.assign({},Me,h,t)}var Ne=0;class Pe extends(function(e){return e.plugins={},class extends e{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,n){e.plugins[t]={name:t,fn:n}}initializePlugins(e){var t,n;const i=this,s=[];if(Array.isArray(e))e.forEach(e=>{"string"==typeof e?s.push(e):(i.plugins.settings[e.name]=e.options,s.push(e.name))});else if(e)for(t in e)e.hasOwnProperty(t)&&(i.plugins.settings[t]=e[t],s.push(t));for(;n=s.shift();)i.require(n)}loadPlugin(t){var n=this,i=n.plugins,s=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=s.fn.apply(n,[n.plugins.settings[t]||{}]),i.names.push(t)}require(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]}}}(x)){constructor(e,t){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,Ne++;var i=ve(e);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 s=Ie(i,t);this.settings=s,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=pe(i,"tomselect-"+Ne),this.isRequired=i.required,this.sifter=new se(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var r=s.createFilter;"function"!=typeof r&&("string"==typeof r&&(r=new RegExp(r)),r instanceof RegExp?s.createFilter=e=>r.test(e):s.createFilter=e=>this.settings.duplicates||!this.options[e]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const o=ve("<div>"),a=ve("<div>"),l=this._render("dropdown"),c=ve('<div role="listbox" tabindex="-1">'),u=this.input.getAttribute("class")||"",d=s.mode;var h;if(we(o,s.wrapperClass,u,d),we(a,s.controlClass),fe(o,a),we(l,s.dropdownClass,d),s.copyClassesToDropdown&&we(l,u),we(c,s.dropdownContentClass),fe(l,c),ve(s.dropdownParent||o).appendChild(l),ye(s.controlInput)){h=ve(s.controlInput);ge(["autocorrect","autocapitalize","autocomplete","spellcheck"],e=>{i.getAttribute(e)&&Oe(h,{[e]:i.getAttribute(e)})}),h.tabIndex=-1,a.appendChild(h),this.focus_node=h}else s.controlInput?(h=ve(s.controlInput),this.focus_node=h):(h=ve("<input/>"),this.focus_node=a);this.wrapper=o,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const e=this,t=e.settings,n=e.control_input,i=e.dropdown,s=e.dropdown_content,r=e.wrapper,o=e.control,a=e.input,l=e.focus_node,c={passive:!0},u=e.inputId+"-ts-dropdown";Oe(s,{id:u}),Oe(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=pe(l,e.inputId+"-ts-control"),h="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",p=document.querySelector(h),m=e.focus.bind(e);if(p){de(p,"click",m),Oe(p,{for:d});const t=pe(p,e.inputId+"-ts-label");Oe(l,{"aria-labelledby":t}),Oe(s,{"aria-labelledby":t})}if(r.style.width=a.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-");we([r,i],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&Oe(a,{multiple:"multiple"}),t.placeholder&&Oe(n,{placeholder:t.placeholder}),!t.splitOn&&t.delimiter&&(t.splitOn=new RegExp("\\s*"+M(t.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=le(t.load,t.loadThrottle)),de(i,"mousemove",()=>{e.ignoreHover=!1}),de(i,"mouseenter",t=>{var n=De(t.target,"[data-selectable]",i);n&&e.onOptionHover(t,n)},{capture:!0}),de(i,"click",t=>{const n=De(t.target,"[data-selectable]");n&&(e.onOptionSelect(t,n),ue(t,!0))}),de(o,"click",t=>{var i=De(t.target,"[data-ts-item]",o);i&&e.onItemSelect(t,i)?ue(t,!0):""==n.value&&(e.onClick(),ue(t,!0))}),de(l,"keydown",t=>e.onKeyDown(t)),de(n,"keypress",t=>e.onKeyPress(t)),de(n,"input",t=>e.onInput(t)),de(l,"blur",t=>e.onBlur(t)),de(l,"focus",t=>e.onFocus(t)),de(n,"paste",t=>e.onPaste(t));const f=t=>{const s=t.composedPath()[0];if(!r.contains(s)&&!i.contains(s))return e.isFocused&&e.blur(),void e.inputState();s==n&&e.isOpen?t.stopPropagation():ue(t,!0)},g=()=>{e.isOpen&&e.positionDropdown()};de(document,"mousedown",f),de(window,"scroll",g,c),de(window,"resize",g,c),this._destroy=()=>{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",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,de(a,"invalid",()=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())}),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,a.disabled?e.disable():a.readOnly?e.setReadOnly(!0):e.enable(),e.on("change",this.onChange),we(a,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),ge(t,e=>{this.registerOptionGroup(e)})}setupTemplates(){var e=this,t=e.settings.labelField,n=e.settings.optgroupLabelField,i={optgroup:e=>{let t=document.createElement("div");return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[n])+"</div>",option:(e,n)=>"<div>"+n(e[t])+"</div>",item:(e,n)=>"<div>"+n(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};e.settings.render=Object.assign({},i,e.settings.render)}setupCallbacks(){var e,t,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(e in n)(t=this.settings[n[e]])&&this.on(e,t)}sync(e=!0){const t=this,n=e?Ie(t.input,{delimiter:t.settings.delimiter}):t.settings;t.setupOptions(n.options,n.optgroups),t.setValue(n.items||[],!0),t.lastQuery=null}onClick(){var e=this;if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus();e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){be(this.input,"input"),be(this.input,"change")}onPaste(e){var t=this;t.isInputHidden||t.isLocked?ue(e):t.settings.splitOn&&setTimeout(()=>{var e=t.inputValue();if(e.match(t.settings.splitOn)){var n=e.trim().split(t.settings.splitOn);ge(n,e=>{re(e)&&(this.options[e]?t.addItem(e):t.createItem(e))})}},0)}onKeyPress(e){var t=this;if(!t.isLocked){var n=String.fromCharCode(e.keyCode||e.which);return t.settings.create&&"multi"===t.settings.mode&&n===t.settings.delimiter?(t.createItem(),void ue(e)):void 0}ue(e)}onKeyDown(e){var t=this;if(t.ignoreHover=!0,t.isLocked)9!==e.keyCode&&ue(e);else{switch(e.keyCode){case 65:if(he(Ae,e)&&""==t.control_input.value)return ue(e),void t.selectAll();break;case 27:return t.isOpen&&(ue(e,!0),t.close()),void t.clearActiveItems();case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1);e&&t.setActiveOption(e)}return void ue(e);case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1);e&&t.setActiveOption(e)}return void ue(e);case 13:return void(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),ue(e)):(t.settings.create&&t.createItem()||document.activeElement==t.control_input&&t.isOpen)&&ue(e));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return void(t.settings.selectOnTab&&(t.canSelect(t.activeOption)&&(t.onOptionSelect(e,t.activeOption),ue(e)),t.settings.create&&t.createItem()&&ue(e)));case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!he(Ae,e)&&ue(e)}}onInput(e){if(this.isLocked)return;const t=this.inputValue();this.lastValue!==t&&(this.lastValue=t,""!=t?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((e,t)=>t>0?window.setTimeout(e,t):(e.call(null),null))(()=>{this.refreshTimeout=null,this._onInput()},this.settings.refreshThrottle)):this._onInput())}_onInput(){const e=this.lastValue;this.settings.shouldLoad.call(this,e)&&this.load(e),this.refreshOptions(),this.trigger("type",e)}onOptionHover(e,t){this.ignoreHover||this.setActiveOption(t,!1)}onFocus(e){var t=this,n=t.isFocused;if(t.isDisabled||t.isReadOnly)return t.blur(),void ue(e);t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),n||t.trigger("focus"),t.activeItems.length||(t.inputState(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var n=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,n):n()}}}onOptionSelect(e,t){var n,i=this;t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?i.createItem(null,()=>{i.settings.closeAfterSelect&&i.close()}):void 0!==(n=t.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&e.type&&/click/.test(e.type)&&i.setActiveOption(t)))}canSelect(e){return!!(this.isOpen&&e&&this.dropdown_content.contains(e))}onItemSelect(e,t){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(ue(e),n.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this;if(!t.canLoad(e))return;we(t.wrapper,t.settings.loadingClass),t.loading++;const n=t.loadCallback.bind(t);t.settings.load.call(t,e,n)}loadCallback(e,t){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(e,t),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||ke(n.wrapper,n.settings.loadingClass),n.trigger("load",e,t)}preload(){var e=this.wrapper.classList;e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input;t.value!==e&&(t.value=e,be(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){ce(this,t?[]:["change"],()=>{this.clear(t),this.addItems(e,t)})}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var n,i,s,r,o,a,l=this;if("single"!==l.settings.mode){if(!e)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=t&&t.type.toLowerCase())&&he("shiftKey",t)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(r=Array.prototype.indexOf.call(l.control.children,e))&&(o=s,s=r,r=o),i=s;i<=r;i++)e=l.control.children[i],-1===l.activeItems.indexOf(e)&&l.setActiveItemClass(e);ue(t)}else"click"===n&&he(Ae,t)||"keydown"===n&&he("shiftKey",t)?e.classList.contains("active")?l.removeActiveItem(e):l.setActiveItemClass(e):(l.clearActiveItems(),l.setActiveItemClass(e));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(e){const t=this,n=t.control.querySelector(".last-active");n&&ke(n,"last-active"),we(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e);this.activeItems.splice(t,1),ke(e,"active")}clearActiveItems(){ke(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e,t=!0){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,Oe(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),Oe(e,{"aria-selected":"true"}),we(e,"active"),t&&this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,r=e.offsetHeight,o=e.getBoundingClientRect().top-n.getBoundingClientRect().top+s;o+r>i+s?this.scroll(o-i+r,t):o<s&&this.scroll(o,t)}scroll(e,t){const n=this.dropdown_content;t&&(n.style.scrollBehavior=t),n.scrollTop=e,n.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(ke(this.activeOption,"active"),Oe(this.activeOption,{"aria-selected":null})),this.activeOption=null,Oe(this.focus_node,{"aria-activedescendant":null})}selectAll(){const e=this;if("single"===e.settings.mode)return;const t=e.controlChildren();t.length&&(e.inputState(),e.close(),e.activeItems=t,ge(t,t=>{e.setActiveItemClass(t)}))}inputState(){var e=this;e.control.contains(e.control_input)&&(Oe(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&Oe(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var e=this;e.isDisabled||e.isReadOnly||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout(()=>{e.ignoreFocus=!1,e.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField;return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,e)))throw new Error('Tom Select "score" setting must be a function that returns a function');return e!==i.lastQuery?(i.lastQuery=e,t=i.sifter.search(e,Object.assign(s,{score:n})),i.currentResults=t):t=Object.assign({},i.currentResults),i.settings.hideSelected&&(t.items=t.items.filter(e=>{let t=re(e.id);return!(t&&-1!==i.items.indexOf(t))})),t}refreshOptions(e=!0){var t,n,i,s,r,o,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]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(y=!0);const _=(e,t)=>{let n=d[e];if(void 0!==n){let e=h[n];if(void 0!==e)return[n,e.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:t,optgroup:e}),[n,i]};for(t=0;t<s;t++){let e=g.items[t];if(!e)continue;let s=e.id,a=p.options[s];if(void 0===a)continue;let l=oe(s),u=p.getOption(l,!0);for(p.settings.hideSelected||u.classList.toggle("selected",p.items.includes(l)),r=a[p.settings.optgroupField]||"",n=0,i=(o=Array.isArray(r)?r:[r])&&o.length;n<i;n++){r=o[n];let e=a.$order,t=p.optgroups[r];void 0===t?r="":e=t.$order;const[i,l]=_(r,e);n>0&&(u=u.cloneNode(!0),Oe(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),ke(u,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===r.toString()&&(v=u)),l.appendChild(u),""!=r&&(d[r]=i)}}var w;p.settings.lockOptgroupOrder&&h.sort((e,t)=>e.order-t.order),a=document.createDocumentFragment(),ge(h,e=>{let t=e.fragment,n=e.optgroup;if(!t||!t.children.length)return;let i=p.optgroups[n];if(void 0!==i){let e=document.createDocumentFragment(),n=p.render("optgroup_header",i);fe(e,n),fe(e,t);let s=p.render("optgroup",{group:i,options:e});fe(a,s)}else fe(a,t)}),b.innerHTML="",fe(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,function(e){var t=e.parentNode;t.replaceChild(e.firstChild,e),t.normalize()}),g.query.length&&g.tokens.length&&ge(g.tokens,e=>{Ce(b,e.regex)}));var k=e=>{let t=p.render(e,{input:m});return t&&(y=!0,b.insertBefore(t,b.firstChild)),t};if(p.loading?k("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&k("no_results"):k("not_loading"),(l=p.canCreate(m))&&(u=k("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 e=0;u&&!p.settings.addPrecedence&&(e=1),v=p.selectable()[e]}}else u&&(v=u);e&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),e&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const n=this;if(Array.isArray(e))return n.addOptions(e,t),!1;const i=re(e[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(e.$order=e.$order||++n.order,e.$id=n.inputId+"-opt-"+e.$order,n.options[i]=e,n.lastQuery=null,t&&(n.userOptions[i]=t,n.trigger("option_add",i,e)),i)}addOptions(e,t=!1){ge(e,e=>{this.addOption(e,t)})}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=re(e[this.settings.optgroupValueField]);return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var n;t[this.settings.optgroupValueField]=e,(n=this.registerOptionGroup(t))&&this.trigger("optgroup_add",n,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const n=this;var i,s;const r=re(e),o=re(t[n.settings.valueField]);if(null===r)return;const a=n.options[r];if(null==a)return;if("string"!=typeof o)throw new Error("Value must be set in option data");const l=n.getOption(r),c=n.getItem(r);if(t.$order=t.$order||a.$order,delete n.options[r],n.uncacheValue(o),n.options[o]=t,l){if(n.dropdown_content.contains(l)){const e=n._render("option",t);Le(l,e),n.activeOption===l&&n.setActiveOption(e)}l.remove()}c&&(-1!==(s=n.items.indexOf(r))&&n.items.splice(s,1,o),i=n._render("item",t),c.classList.contains("active")&&we(i,"active"),Le(c,i)),n.lastQuery=null}removeOption(e,t){const n=this;e=oe(e),n.uncacheValue(e),delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)}clearOptions(e){const t=(e||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};ge(this.options,(e,i)=>{t(e,i)&&(n[i]=e)}),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(e,t){return this.items.indexOf(t)>=0}getOption(e,t=!1){const n=re(e);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(t)return this._render("option",i)}return null}getAdjacent(e,t,n="option"){var i;if(!e)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n<i.length;n++)if(i[n]==e)return t>0?i[n+1]:i[n-1];return null}getItem(e){if("object"==typeof e)return e;var t=re(e);return null!==t?this.control.querySelector(`[data-value="${me(t)}"]`):null}addItems(e,t){var n=this,i=Array.isArray(e)?e:[e];const s=(i=i.filter(e=>-1===n.items.indexOf(e)))[i.length-1];i.forEach(e=>{n.isPending=e!==s,n.addItem(e,t)})}addItem(e,t){ce(this,t?[]:["change","dropdown_close"],()=>{var n,i;const s=this,r=s.settings.mode,o=re(e);if((!o||-1===s.items.indexOf(o)||("single"===r&&s.close(),"single"!==r&&s.settings.duplicates))&&null!==o&&s.options.hasOwnProperty(o)&&("single"===r&&s.clear(t),"multi"!==r||!s.isFull())){if(n=s._render("item",s.options[o]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,o),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let e=s.getOption(o),t=s.getAdjacent(e,1);t&&s.setActiveOption(t)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==r),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",o,n),s.isPending||s.updateOriginalInput({silent:t})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}})}removeItem(e=null,t){const n=this;if(!(e=n.getItem(e)))return;var i,s;const r=e.dataset.value;i=xe(e),e.remove(),e.classList.contains("active")&&(s=n.activeItems.indexOf(e),n.activeItems.splice(s,1),ke(e,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(r)&&n.removeOption(r,t),i<n.caretPos&&n.setCaret(n.caretPos-1),n.updateOriginalInput({silent:t}),n.refreshState(),n.positionDropdown(),n.trigger("item_remove",r,e)}createItem(e=null,t=()=>{}){3===arguments.length&&(t=arguments[2]),"function"!=typeof t&&(t=()=>{});var n,i=this,s=i.caretPos;if(e=e||i.inputValue(),!i.canCreate(e))return t(),!1;i.lock();var r=!1,o=e=>{if(i.unlock(),!e||"object"!=typeof e)return t();var n=re(e[i.settings.valueField]);if("string"!=typeof n)return t();i.setTextboxValue(),i.addOption(e,!0),i.setCaret(s),i.addItem(n),t(e),r=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,e,o):{[i.settings.labelField]:e,[i.settings.valueField]:e},r||o(n),!0}refreshItems(){var e=this;e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this;e.refreshValidityState();const t=e.isFull(),n=e.isLocked;e.wrapper.classList.toggle("rtl",e.rtl);const i=e.wrapper.classList;var s;i.toggle("focus",e.isFocused),i.toggle("disabled",e.isDisabled),i.toggle("readonly",e.isReadOnly),i.toggle("required",e.isRequired),i.toggle("invalid",!e.isValid),i.toggle("locked",n),i.toggle("full",t),i.toggle("input-active",e.isFocused&&!e.isInputHidden),i.toggle("dropdown-active",e.isOpen),i.toggle("has-options",(s=e.options,0===Object.keys(s).length)),i.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this;e.input.validity&&(e.isValid=e.input.validity.valid,e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this;var n,i;const s=t.input.querySelector('option[value=""]');if(t.is_select_tag){const r=[],o=t.input.querySelectorAll("option:checked").length;function a(e,n,i){return e||(e=ve('<option value="'+ae(n)+'">'+ae(i)+"</option>")),e!=s&&t.input.append(e),r.push(e),(e!=s||o>0)&&(e.selected=!0),e}t.input.querySelectorAll("option:checked").forEach(e=>{e.selected=!1}),0==t.items.length&&"single"==t.settings.mode?a(s,"",""):t.items.forEach(e=>{if(n=t.options[e],i=n[t.settings.labelField]||"",r.includes(n.$option)){a(t.input.querySelector(`option[value="${me(e)}"]:not(:checked)`),e,i)}else n.$option=a(n.$option,e,i)})}else t.input.value=t.getValue();t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,Oe(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),_e(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),_e(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,n=t.isOpen;e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.inputState()),t.isOpen=!1,Oe(t.focus_node,{"aria-expanded":"false"}),_e(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),n&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),n=e.offsetHeight+t.top+window.scrollY,i=t.left+window.scrollX;_e(this.dropdown,{width:t.width+"px",top:n+"px",left:i+"px"})}}clear(e){var t=this;if(t.items.length){var n=t.controlChildren();ge(n,e=>{t.removeItem(e,!0)}),t.inputState(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,n=t.caretPos,i=t.control;i.insertBefore(e,i.children[n]||null),t.setCaret(n+1)}deleteSelection(e){var t,n,i,s,r,o=this;t=e&&8===e.keyCode?-1:1,n={start:(r=o.control_input).selectionStart||0,length:(r.selectionEnd||0)-(r.selectionStart||0)};const a=[];if(o.activeItems.length)s=Se(o.activeItems,t),i=xe(s),t>0&&i++,ge(o.activeItems,e=>a.push(e));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const e=o.controlChildren();let i;t<0&&0===n.start&&0===n.length?i=e[o.caretPos-1]:t>0&&n.start===o.inputValue().length&&(i=e[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,e))return!1;for(ue(e,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(e,t){const n=e.map(e=>e.dataset.value);return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,t))}advanceSelection(e,t){var n,i,s=this;s.rtl&&(e*=-1),s.inputValue().length||(he(Ae,t)||he("shiftKey",t)?(i=(n=s.getLastActive(e))?n.classList.contains("active")?s.getAdjacent(n,e,"item"):n:e>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active");if(t)return t;var n=this.control.querySelectorAll(".active");return n?Se(n,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(e=this.isReadOnly||this.isDisabled){this.isLocked=e,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(e){this.focus_node.tabIndex=e?-1:this.tabIndex,this.isDisabled=e,this.input.disabled=e,this.control_input.disabled=e,this.setLocked()}setReadOnly(e){this.isReadOnly=e,this.input.readOnly=e,this.control_input.readOnly=e,this.setLocked()}destroy(){var e=this,t=e.revertSettings;e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,ke(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){var n,i;const s=this;if("function"!=typeof this.settings.render[e])return null;if(!(i=s.settings.render[e].call(this,t,ae)))return null;if(i=ve(i),"option"===e||"option_create"===e?t[s.settings.disabledField]?Oe(i,{"aria-disabled":"true"}):Oe(i,{"data-selectable":""}):"optgroup"===e&&(n=t.group[s.settings.optgroupValueField],Oe(i,{"data-group":n}),t.group[s.settings.disabledField]&&Oe(i,{"data-disabled":""})),"option"===e||"item"===e){const n=oe(t[s.settings.valueField]);Oe(i,{"data-value":n}),"item"===e?(we(i,s.settings.itemClass),Oe(i,{"data-ts-item":""})):(we(i,s.settings.optionClass),Oe(i,{role:"option",id:t.$id}),t.$div=i,s.options[n]=t)}return i}_render(e,t){const n=this.render(e,t);if(null==n)throw"HTMLElement expected";return n}clearCache(){ge(this.options,e=>{e.$div&&(e.$div.remove(),delete e.$div)})}uncacheValue(e){const t=this.getOption(e);t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,n){var i=this,s=i[t];i[t]=function(){var t,r;return"after"===e&&(t=s.apply(i,arguments)),r=n.apply(i,arguments),"instead"===e?r:("before"===e&&(t=s.apply(i,arguments)),t)}}}const Fe=e=>"boolean"==typeof e?e?"1":"0":e+"",je=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},Re=e=>"string"==typeof e&&e.indexOf("<")>-1;const $e=e=>"string"==typeof e&&e.indexOf("<")>-1;const He=(e,t,n,i)=>{e.addEventListener(t,n,i)},qe=e=>"string"==typeof e&&e.indexOf("<")>-1,Ve=(e,t)=>{((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)})(t,(t,n)=>{null==t?e.removeAttribute(n):e.setAttribute(n,""+t)})};const ze=e=>"string"==typeof e&&e.indexOf("<")>-1;const Be=e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},We=e=>(Array.isArray(e)||(e=[e]),e);const Ue=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(Ye(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},Ye=e=>"string"==typeof e&&e.indexOf("<")>-1,Ze=e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},Ge=e=>(Array.isArray(e)||(e=[e]),e);const Ke=(e,t,n,i)=>{e.addEventListener(t,n,i)};const Je=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},Xe=(e,t,n,i)=>{e.addEventListener(t,n,i)},Qe=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(et(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},et=e=>"string"==typeof e&&e.indexOf("<")>-1;const tt=e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},nt=e=>(Array.isArray(e)||(e=[e]),e);Pe.define("change_listener",function(){var e,t,n,i;e=this.input,t="change",n=()=>{this.sync()},e.addEventListener(t,n,i)}),Pe.define("checkbox_options",function(e){var t=this,n=t.onOptionSelect;t.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},e);var s=function(e,t){t?(e.checked=!0,i.uncheckedClassNames&&e.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&e.classList.add(...i.checkedClassNames)):(e.checked=!1,i.checkedClassNames&&e.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&e.classList.add(...i.uncheckedClassNames))},r=function(e){setTimeout(()=>{var t=e.querySelector("input."+i.className);t instanceof HTMLInputElement&&s(t,e.classList.contains("selected"))},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(n,r)=>{var o=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(Re(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)})(e.call(t,n,r)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",function(e){je(e)}),a.type="checkbox";const l=null==(c=n[t.settings.valueField])?null:Fe(c);var c;return s(a,!!(l&&t.items.indexOf(l)>-1)),o.prepend(a),o}}),t.on("item_remove",e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),r(n))}),t.on("item_add",e=>{var n=t.getOption(e);n&&r(n)}),t.hook("instead","onOptionSelect",(e,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),t.removeItem(i.dataset.value),t.refreshOptions(),void je(e,!0);n.call(t,e,i),r(i)})}),Pe.define("clear_button",function(e){const t=this,n=Object.assign({className:"clear-button",title:"Clear All",html:e=>`<div class="${e.className}" title="${e.title}">⨯</div>`},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if($e(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)})(n.html(n));e.addEventListener("click",e=>{t.isLocked||(t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation())}),t.control.appendChild(e)})}),Pe.define("drag_drop",function(){var e=this;if("multi"!==e.settings.mode)return;var t=e.lock,n=e.unlock;let i,s=!0;e.hook("after","setupTemplates",()=>{var t=e.settings.render.item;e.settings.render.item=(n,r)=>{const o=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(qe(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)})(t.call(e,n,r));Ve(o,{draggable:"true"});const a=e=>{e.preventDefault(),o.classList.add("ts-drag-over"),l(o,i)},l=(e,t)=>{var n,i,s;void 0!==t&&(((e,t)=>{do{var n;if(e==(t=null==(n=t)?void 0:n.previousElementSibling))return!0}while(t&&t.previousElementSibling);return!1})(t,o)?(i=t,null==(s=(n=e).parentNode)||s.insertBefore(i,n.nextSibling)):((e,t)=>{var n;null==(n=e.parentNode)||n.insertBefore(t,e)})(e,t))};return He(o,"mousedown",e=>{s||((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e),e.stopPropagation()}),He(o,"dragstart",e=>{i=o,setTimeout(()=>{o.classList.add("ts-dragging")},0)}),He(o,"dragenter",a),He(o,"dragover",a),He(o,"dragleave",()=>{o.classList.remove("ts-drag-over")}),He(o,"dragend",()=>{var t;document.querySelectorAll(".ts-drag-over").forEach(e=>e.classList.remove("ts-drag-over")),null==(t=i)||t.classList.remove("ts-dragging"),i=void 0;var n=[];e.control.querySelectorAll("[data-value]").forEach(e=>{if(e.dataset.value){let t=e.dataset.value;t&&n.push(t)}}),e.setValue(n)}),o}}),e.hook("instead","lock",()=>(s=!1,t.call(e))),e.hook("instead","unlock",()=>(s=!0,n.call(e)))}),Pe.define("dropdown_header",function(e){const t=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">×</a></div></div>'},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(ze(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)})(n.html(n)),i=e.querySelector("."+n.closeClass);i&&i.addEventListener("click",e=>{((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e,!0),t.close()}),t.dropdown.insertBefore(e,t.dropdown.firstChild)})}),Pe.define("caret_position",function(){var e=this;e.hook("instead","setCaret",t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach((n,i)=>{i<t?e.control_input.insertAdjacentElement("beforebegin",n):e.control.appendChild(n)}):t=e.items.length,e.caretPos=t}),e.hook("instead","moveCaret",t=>{if(!e.isFocused)return;const n=e.getLastActive(t);if(n){const i=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n})(n);e.setCaret(t>0?i+1:i),e.setActiveItem(),((e,...t)=>{var n=Be(t);(e=We(e)).map(e=>{n.map(t=>{e.classList.remove(t)})})})(n,"last-active")}else e.setCaret(e.caretPos+t)})}),Pe.define("dropdown_input",function(){const e=this;e.settings.shouldOpen=!0,e.hook("before","setup",()=>{e.focus_node=e.control,((e,...t)=>{var n=Ze(t);(e=Ge(e)).map(e=>{n.map(t=>{e.classList.add(t)})})})(e.control_input,"dropdown-input");const t=Ue('<div class="dropdown-input-wrap">');t.append(e.control_input),e.dropdown.insertBefore(t,e.dropdown.firstChild);const n=Ue('<input class="items-placeholder" tabindex="-1" />');n.placeholder=e.settings.placeholder||"",e.control.append(n)}),e.on("initialize",()=>{e.control_input.addEventListener("keydown",t=>{switch(t.keyCode){case 27:return e.isOpen&&(((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(t,!0),e.close()),void e.clearActiveItems();case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)}),e.on("blur",()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex}),e.on("dropdown_open",()=>{e.control_input.focus()});const t=e.onBlur;var n,i,s,r;e.hook("instead","onBlur",n=>{if(!n||n.relatedTarget!=e.control_input)return t.call(e)}),n=e.control_input,i="blur",s=()=>e.onBlur(),n.addEventListener(i,s,r),e.hook("before","close",()=>{e.isOpen&&e.focus_node.focus({preventScroll:!0})})})}),Pe.define("input_autogrow",function(){var e=this;e.on("initialize",()=>{var t=document.createElement("span"),n=e.control_input;t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t);for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=n.style[e];var i=()=>{t.textContent=n.value,n.style.width=t.clientWidth+"px"};i(),e.on("update item_add item_remove",i),Ke(n,"input",i),Ke(n,"keyup",i),Ke(n,"blur",i),Ke(n,"update",i)})}),Pe.define("no_backspace_delete",function(){var e=this,t=e.deleteSelection;this.hook("instead","deleteSelection",n=>!!e.activeItems.length&&t.call(e,n))}),Pe.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),Pe.define("optgroup_columns",function(){var e=this,t=e.onKeyDown;e.hook("instead","onKeyDown",n=>{var i,s,r,o;if(!e.isOpen||37!==n.keyCode&&39!==n.keyCode)return t.call(e,n);e.ignoreHover=!0,o=((e,t)=>{for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}})(e.activeOption,"[data-group]"),i=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n})(e.activeOption,"[data-selectable]"),o&&(o=37===n.keyCode?o.previousSibling:o.nextSibling)&&(s=(r=o.querySelectorAll("[data-selectable]"))[Math.min(r.length-1,i)])&&e.setActiveOption(s)})}),Pe.define("remove_button",function(e){const t=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},e);var n=this;if(t.append){var i='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+((t.title+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")+'">')+t.label+"</a>";n.hook("after","setupTemplates",()=>{var e=n.settings.render.item;n.settings.render.item=(t,s)=>{var r=Qe(e.call(n,t,s)),o=Qe(i);return r.appendChild(o),Xe(o,"mousedown",e=>{Je(e,!0)}),Xe(o,"click",e=>{n.isLocked||(Je(e,!0),n.isLocked||n.shouldDelete([r],e)&&(n.removeItem(r),n.refreshOptions(!1),n.inputState()))}),r}})}}),Pe.define("restore_on_backspace",function(e){const t=this,n=Object.assign({text:e=>e[t.settings.labelField]},e);t.on("item_remove",function(e){if(t.isFocused&&""===t.control_input.value.trim()){var i=t.options[e];i&&t.setTextboxValue(n.text.call(t,i))}})}),Pe.define("virtual_scroll",function(){const e=this,t=e.canLoad,n=e.clearActiveOption,i=e.loadCallback;var s,r,o={},a=!1,l=[];if(e.settings.shouldLoadMore||(e.settings.shouldLoadMore=()=>{if(s.clientHeight/(s.scrollHeight-s.scrollTop)>.9)return!0;if(e.activeOption){var t=e.selectable();if(Array.from(t).indexOf(e.activeOption)>=t.length-2)return!0}return!1}),!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";e.settings.sortField=[{field:"$order"},{field:"$score"}];const c=t=>!("number"==typeof e.settings.maxOptions&&s.children.length>=e.settings.maxOptions)&&!(!(t in o)||!o[t]),u=(t,n)=>e.items.indexOf(n)>=0||l.indexOf(n)>=0;e.setNextUrl=(e,t)=>{o[e]=t},e.getUrl=t=>{if(t in o){const e=o[t];return o[t]=!1,e}return e.clearPagination(),e.settings.firstUrl.call(e,t)},e.clearPagination=()=>{o={}},e.hook("instead","clearActiveOption",()=>{if(!a)return n.call(e)}),e.hook("instead","canLoad",n=>n in o?c(n):t.call(e,n)),e.hook("instead","loadCallback",(t,n)=>{if(a){if(r){const n=t[0];void 0!==n&&(r.dataset.value=n[e.settings.valueField])}}else e.clearOptions(u);i.call(e,t,n),a=!1}),e.hook("after","refreshOptions",()=>{const t=e.lastValue;var n;c(t)?(n=e.render("loading_more",{query:t}))&&(n.setAttribute("data-selectable",""),r=n):t in o&&!s.querySelector(".no-results")&&(n=e.render("no_more_results",{query:t})),n&&(((e,...t)=>{var n=tt(t);(e=nt(e)).map(e=>{n.map(t=>{e.classList.add(t)})})})(n,e.settings.optionClass),s.append(n))}),e.on("initialize",()=>{l=Object.keys(e.options),s=e.dropdown_content,e.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>'},e.settings.render),s.addEventListener("scroll",()=>{e.settings.shouldLoadMore.call(e)&&c(e.lastValue)&&(a||(a=!0,e.load.call(e,e.lastValue)))})})});var it=Pe;class st extends h{getRenderer(e){let t={option_create:(e,t)=>{const n=t(e.input);if(n.length<3)return null;return'<div class="create">'+this.translate("select.search.create").replace("%input%","<strong>"+n+"</strong>")+"</div>"},no_results:(e,t)=>'<div class="no-results">'+this.translate("select.search.notfound").replace("%input%","<strong>"+t(e.input)+"</strong>")+"</div>"};return t="color"===e?{...t,option:function(e,t){let n='<div class="list-group-item border-0 p-1 ps-2 text-nowrap">';return void 0!==e.color&&(n+='<span style="background-color:'+e.color+'" class="color-choice-item me-2"> </span>'),n+=t(e.text)+"</div>",n},item:function(e,t){let n='<div class="text-nowrap">';return void 0!==e.color&&(n+='<span style="background-color:'+e.color+'" class="color-choice-item me-2"> </span>'),n+=t(e.text)+"</div>",n}}:{...t,option:function(e,t){let n=e.text;return n=null===n||""===n.trim()?" ":t(n),"<div>"+n+"</div>"}},t}}class rt extends st{init(){this.selector='[data-form-widget="autocomplete"]'}supportsForm(e){return!0}loadData(e,t,n){this.getContainer().getPlugin("api").get(e,{name:t},e=>{let t=[];for(let n of e)t.push({text:n.name,value:n.name});n(t)},()=>{n()})}activateForm(e){[].slice.call(e.querySelectorAll(this.selector)).map(e=>{const t=e.dataset.autocompleteUrl;let n=3;void 0!==e.dataset.minimumCharacter&&(n=parseInt(e.dataset.minimumCharacter));let i={onItemAdd:function(){this.setTextboxValue("")},maxOptions:500,create:void 0!==e.dataset.create,onOptionAdd:t=>{e.dispatchEvent(new CustomEvent("create",{detail:{value:t}}))},plugins:["remove_button"],shouldLoad:function(e){return e.length>=n},load:(e,n)=>{this.loadData(t,e,n)}};const s=void 0!==e.dataset.renderer?e.dataset.renderer:"default";i.render={not_loading:(e,t)=>{},...this.getRenderer(s)},new it(e,i)})}destroyForm(e){[].slice.call(e.querySelectorAll(this.selector)).map(e=>{e.tomselect&&e.tomselect.destroy()})}}class ot extends st{constructor(e,t){super(),this._selector=e,this._apiSelects=t}getId(){return"form-select"}init(){document.addEventListener("reset",e=>{"FORM"===e.target.tagName.toUpperCase()&&setTimeout(()=>{const t=e.target.querySelectorAll(this._selector);for(let e of t)"SELECT"===e.tagName.toUpperCase()&&e.dispatchEvent(new Event("data-reloaded"))},10)})}activateSelectPickerByElement(e){let t=["change_listener"];const n=void 0!==e.multiple&&!0===e.multiple,i=void 0!==e.required&&!0===e.required;i&&t.push("no_backspace_delete"),n&&t.push("remove_button"),void 0!==e.dataset.order&&"1"===e.dataset.order&&t.push("drag_drop");let s={onItemAdd:function(){this.setTextboxValue("")},lockOptgroupOrder:!0,allowEmptyOption:!i,hidePlaceholder:!1,plugins:t,maxOptions:500,sortField:[{field:"$order"},{field:"$score"}],dropdownParent:"body"},r={onOptionAdd:t=>{e.dispatchEvent(new CustomEvent("create",{detail:{value:t}}))}};const o=void 0!==e.dataset.renderer?e.dataset.renderer:"default";s.render={...r,...this.getRenderer(o)},s=void 0!==e.dataset.create?{...s,persist:!0,create:!0}:{...s,persist:!1,create:!1},void 0!==e.dataset.disableSearch&&(s={...s,controlInput:null});const a=new it(e,s);e.addEventListener("data-reloaded",e=>{a.clear(!0),a.clearOptionGroups(),a.clearOptions(),a.sync(),a.setValue(e.detail),a.refreshItems(),a.refreshOptions(!1)}),void 0!==e.dataset.reload&&e.addEventListener("reload",()=>{a.disable(),e.disabled=!0;this.getContainer().getPlugin("api").get(e.dataset.reload,{},t=>{this._updateSelect(e,t),a.enable(),e.disabled=!1}),e.dispatchEvent(new Event("change"))})}supportsForm(e){return!0}activateForm(e){[].slice.call(e.querySelectorAll(this._selector)).map(e=>{this.activateSelectPickerByElement(e)}),this._activateApiSelects(this._apiSelects)}destroyForm(e){[].slice.call(e.querySelectorAll(this._selector)).map(e=>{e.tomselect&&e.tomselect.destroy()})}_updateOptions(e,t){let n=null,i=null;if(i=e instanceof Element?e:document.querySelector(e),null===i)return void console.log("Missing select: "+e);const s=i.value;for(let e=0;e<i.options.length;e++)""===i.options[e].value&&(n=i.options[e]);i.options.length=0,null!==n&&i.appendChild(this._createOption(n.text,""));let r=[],o=[],a=null;void 0!==i.dataset&&void 0!==i.dataset.optionPattern&&(a=i.dataset.optionPattern),null!==a&&""!==a||(a="{name}");for(const[e,n]of Object.entries(t)){if("__empty__"===e){for(const e of n)r.push(this._createOption(this._getTitleFromPattern(a,e),e.id));continue}let t=this._createOptgroup(e);for(const e of n)t.appendChild(this._createOption(this._getTitleFromPattern(a,e),e.id));o.push(t)}o.forEach(e=>i.appendChild(e));const l=this._createOptgroup("");if(r.forEach(e=>l.appendChild(e)),i.appendChild(l),i.value=s,""===i.value||null===i.value){const e=i.options,t=e.length;let s="";1===t&&void 0===i.dataset.autoselect?s=e[0].value:2===t&&null!==n&&(s=e[1].value),""!==s&&(i.value=s)}i.dispatchEvent(new CustomEvent("data-reloaded",{detail:i.value})),i.dispatchEvent(new Event("change"))}_getTitleFromPattern(e,t){const n=this.getDateUtils(),i=new RegExp("{[^}]*?}","g");let s=e,r=null;for(;null!==(r=i.exec(e));){const e=r[0].slice(1,-1);let i=void 0===t[e]?null:t[e];"start"!==e&&"end"!==e||(i=null===i?"?":n.getFormattedDate(i)),s=s.replace(new RegExp("{"+e+"}","g"),i??"")}s=s.replace(/- \?-\?/,""),s=s.replace(/\r\n|\r|\n/g," "),s=s.substring(0,110);let o=0,a=s.length;for(;o<a&&"- ".indexOf(s[o])>=0;)++o;for(;a>o&&"- ".indexOf(s[a-1])>=0;)--a;let l=o>0||a<s.length?s.substring(o,a):s;return""===l&&void 0!==t.name?t.name:l}addOption(e,t,n,i){const s=this._createOption(t,n);for(const e in i)s.dataset[e]=i[e];e.options.add(s),void 0!==e.tomselect&&e.tomselect.sync()}removeOption(e,t){t.remove(),void 0!==e.tomselect&&(e.tomselect.removeOption(t.value,!0),e.tomselect.clear(!0))}_createOption(e,t){let n=document.createElement("option");return n.innerText=e,n.value=t,n}_createOptgroup(e){let t=document.createElement("optgroup");return t.label=e,t}_activateApiSelects(e){void 0===this._eventHandlerApiSelects&&(this._eventHandlerApiSelects=t=>{if(null===t.target||!t.target.matches(e))return;const n=t.target,i="#"+n.dataset.relatedSelect,s=document.getElementById(n.dataset.relatedSelect);if(null===s||"1"===s.dataset.reloading)return;s.dataset.reloading="1",void 0!==s.tomselect&&s.tomselect.disable(),s.disabled=!0;let r=n.dataset.formPrefix;null==r?r="":r.length>0&&(r+="_");let o=this._buildUrlWithFormFields(n.dataset.apiUrl,r);const a=n.value;if(null==a||""===a||Array.isArray(a)&&0===a.length){if(void 0===n.dataset.emptyUrl)return this._updateSelect(i,{}),void(s.dataset.reloading="0");o=this._buildUrlWithFormFields(n.dataset.emptyUrl,r)}this.getContainer().getPlugin("api").get(o,{},e=>{this._updateSelect(i,e),void 0!==s.tomselect&&s.tomselect.enable(),s.dataset.reloading="0",s.disabled=!1})},document.addEventListener("change",this._eventHandlerApiSelects))}_buildUrlWithFormFields(e,t){let n=e;return e.split("?")[1].split("&").forEach(e=>{const[i,s]=e.split("="),r=decodeURIComponent(s).match(/%(.*)%/);if(null!==r){const i=r[1],o=(t+i).replace(/\[/,"").replace(/]/,""),a=document.getElementById(o);let l="";if(null===a);else if(null!==a.value)if(l=a.value,"SELECT"===a.tagName&&a.multiple)l=[...a.selectedOptions].map(e=>e.value);else if(""!==l)if("date"===a.type){const e=a.id.replace("_date","_time"),t=document.getElementById(e),n=null===t?"12:00:00":t.value,i=this.getDateUtils().fromHtml5Input(l,n);l=this.getDateUtils().formatForAPI(i,!1)}else if("text"===a.type&&a.name.includes("date")){const e=a.id.replace("_date","_time"),t=document.getElementById(e);let n="12:00:00",i="HH:mm";null!==t&&(n=t.value,i=t.dataset.format);const s=this.getDateUtils().fromFormat(l.trim()+" "+n.trim(),a.dataset.format+" "+i);l=this.getDateUtils().formatForAPI(s,!1)}else void 0!==a.dataset.format&&this.getDateUtils().isValidDateTime(l,a.dataset.format)&&(l=this.getDateUtils().format(a.dataset.format,l));if(Array.isArray(l)){let t=[];for(let e of l)null===e&&(e=""),t.push(i+"="+e);n=n.replace(e,t.join("&"))}else null===l&&(l=""),n=n.replace(s,l)}}),n}_updateSelect(e,t){const n={};for(const e of t){let t="__empty__";void 0!==e.parentTitle&&null!==e.parentTitle&&(t=e.parentTitle),void 0===n[t]&&(n[t]=[]),n[t].push(e)}const i={};Object.keys(n).sort().forEach(function(e){i[e]=n[e]}),this._updateOptions(e,i)}}class at extends o{getId(){return"form"}activateForm(e){[].slice.call(document.querySelectorAll(e)).map(e=>{for(const t of this.getContainer().getPlugins())t instanceof h&&t.supportsForm(e)&&t.activateForm(e)})}destroyForm(e){[].slice.call(document.querySelectorAll(e)).map(e=>{for(const t of this.getContainer().getPlugins())t instanceof h&&t.supportsForm(e)&&t.destroyForm(e)})}convertFormDataToQueryString(e,t={},n=!1){let i=[],s=new FormData(e);for(const e in t)s.set(e,t[e]);for(let e of s)n&&""===e[1]||i.push(encodeURIComponent(e[0])+"="+encodeURIComponent(e[1]));return i.join("&")}}class lt extends o{constructor(e){super(),this._selector=e}init(){document.addEventListener("click",e=>{let t=e.target;for(;null!==t&&"function"==typeof t.matches&&!t.matches("body");){if(t.classList.contains(this._selector)){const n=t.dataset;let i=n.href;i||(i=t.getAttribute("href"));let s=null;"submit"===t.type&&void 0!==t.form&&(s=t.form),void 0!==n.question&&this.getContainer().getPlugin("alert").question(n.question,function(e){e&&(null===s?document.location=i:(null!==i&&(s.action=i),s.submit()))}),e.preventDefault(),e.stopPropagation()}t=t.parentNode}})}}class ct extends o{getId(){return"datatable-batch-action"}init(){if(0===document.getElementsByClassName("multi_update_all").length)return;const e=document.querySelector("div.page-body");e.addEventListener("change",e=>{e.target.matches(".multi_update_all")?(this.toggle(e.target.checked,e.target.closest("table")),e.stopPropagation()):e.target.matches(".multi_update_single")&&(this._toggleDatatable(e.target.closest("table")),e.stopPropagation())}),e.addEventListener("click",e=>{if(e.target.matches(".multi_update_table_action")){const t=e.target,n=t.form,i=n.querySelector(".multi_update_ids").value.split(","),s=n.dataset.question.replace(/%action%/,t.textContent).replace(/%count%/,i.length.toString());this.getPlugin("alert").question(s,function(e){e&&(n.action=t.dataset.href,n.submit())})}})}toggle(e,t){for(const n of t.querySelectorAll(".multi_update_single"))n.checked=e;this._toggleDatatable(t)}toggleAll(e){for(const t of document.querySelectorAll(".multi_update_all"))this._toggleAll(e,t)}toggleByName(e,t){for(const n of document.querySelectorAll("#multi_update_all_"+t))this._toggleAll(e,n)}_toggleAll(e,t){t.checked=e,this.toggle(e,t.closest("table"))}_toggleDatatable(e){const t=e.closest("div.card.data_table");let n=[];for(const t of e.querySelectorAll("input.multi_update_single:checked"))n.push(t.value);if(t.querySelector(".multi_update_ids").value=n.join(","),n.length>0){for(const e of t.querySelectorAll(".multi_update_form_hide"))e.style.setProperty("display","none","important");t.querySelector("form.multi_update_form").style.display=null}else{t.querySelector("form.multi_update_form").style.setProperty("display","none","important");for(const e of t.querySelectorAll(".multi_update_form_hide"))e.style.display=null}}}class ut extends o{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(e){return e=(e=(e=(e=(e=(e=(e=e.replace("DD","dd")).replace("D","d")).replace("MM","LL")).replace("M","L")).replace("YYYY","yyyy")).replace("YY","yy")).replace("A","a")}format(e,t){let n=null;return n=null==t?i.c9.now():t instanceof Date?i.c9.fromJSDate(t):i.c9.fromISO(t),n.toFormat(this._parseFormat(e),{locale:"en-us"})}getFormattedDate(e){return this.format(this._parseFormat(this.dateFormat),e)}formatForAPI(e,t=!1){return e instanceof Date&&(e=i.c9.fromJSDate(e)),void 0!==t&&t||(e=e.toUTC()),e.toISO({includeOffset:!1,suppressMilliseconds:!0})}fromFormat(e,t){return i.c9.fromFormat(e,this._parseFormat(t),{locale:"en-us"})}fromHtml5Input(e,t){return t=t??"",""===(e=e??"")&&""===t?i.c9.invalid("Empty date and time given"):(""!==e&&""!==t&&(e=e+"T"+t),i.c9.fromISO(e))}isValidDateTime(e,t){return this.fromFormat(e,t).isValid}addHumanDuration(e,t){let n=null;if(e instanceof Date)n=i.c9.fromJSDate(e);else{if(!(e instanceof i.c9))throw"addHumanDuration() needs a JS Date";n=e}const s=i.c9.fromISO(t),r=i.c9.now().startOf("day"),o=s.diff(r);return n.plus(o).toJSDate()}formatDuration(e){let t=null;return t="string"==typeof e?i.c9.now().diff(i.c9.fromISO(e)):i.dw.fromISO("PT"+(null===e?0:e)+"S"),this.formatLuxonDuration(t)}formatSeconds(e){return this.formatLuxonDuration(i.dw.fromObject({seconds:e}))}formatLuxonDuration(e){return e=e.shiftTo("hours","minutes","seconds"),this.formatAsDuration(e.hours,e.minutes)}formatTime(e,t=!1){let n=i.c9.fromJSDate(e);return void 0!==t&&t||(n=n.toUTC()),n.toFormat(this.timeFormat)}formatAsDuration(e,t){let n=this.durationFormat;return(e<0||t<0)&&(e=Math.abs(e),t=Math.abs(t),n="-"+n),n.replace("%h",e.toString()).replace("%m",("0"+t).slice(-2))}getSecondsFromDurationString(e){const t=this.parseDuration(e);return null!==t&&t.isValid?t.as("seconds"):0}parseDuration(e){if(null==e||""===e)return new i.dw({seconds:0});let t=null;if(-1!==(e=e.trim().toUpperCase()).indexOf(":")){const n=e.match(/(?:(\d+):)?(\d+)(?::(\d+))?/),s=parseInt(n?.[1]||0,10),r=parseInt(n?.[2]||0,10),o=parseInt(n?.[3]||0,10);t=i.dw.fromObject({hours:s,minutes:r,seconds:o})}else if(-1!==e.indexOf(".")||-1!==e.indexOf(","))e=e.replace(/,/,"."),e=(3600*parseFloat(e)).toString(),t=i.dw.fromISO("PT"+e+"S");else if(-1!==e.indexOf("H")||-1!==e.indexOf("M")||-1!==e.indexOf("S"))t=i.dw.fromISO("PT"+e);else{let n=parseInt(e);const s=parseInt(e).toFixed();isNaN(n)||e!==s||(e=(3600*n).toString(),t=i.dw.fromISO("PT"+e+"S"))}return null!==t&&t.isValid?"-"===e[0]&&t.valueOf()>0?t.negate():t:new i.dw({seconds:0})}}const{entries:dt,setPrototypeOf:ht,isFrozen:pt,getPrototypeOf:mt,getOwnPropertyDescriptor:ft}=Object;let{freeze:gt,seal:vt,create:yt}=Object,{apply:bt,construct:_t}="undefined"!=typeof Reflect&&Reflect;gt||(gt=function(e){return e}),vt||(vt=function(e){return e}),bt||(bt=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return e.apply(t,i)}),_t||(_t=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});const wt=Ft(Array.prototype.forEach),kt=Ft(Array.prototype.lastIndexOf),Tt=Ft(Array.prototype.pop),Et=Ft(Array.prototype.push),Dt=Ft(Array.prototype.splice),St=Ft(String.prototype.toLowerCase),xt=Ft(String.prototype.toString),Ot=Ft(String.prototype.match),Lt=Ft(String.prototype.replace),Ct=Ft(String.prototype.indexOf),At=Ft(String.prototype.trim),Mt=Ft(Object.prototype.hasOwnProperty),It=Ft(RegExp.prototype.test),Nt=(Pt=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _t(Pt,t)});var Pt;function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return bt(e,t,i)}}function jt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:St;ht&&ht(e,null);let i=t.length;for(;i--;){let s=t[i];if("string"==typeof s){const e=n(s);e!==s&&(pt(t)||(t[i]=e),s=e)}e[s]=!0}return e}function Rt(e){for(let t=0;t<e.length;t++){Mt(e,t)||(e[t]=null)}return e}function $t(e){const t=yt(null);for(const[n,i]of dt(e)){Mt(e,n)&&(Array.isArray(i)?t[n]=Rt(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=$t(i):t[n]=i)}return t}function Ht(e,t){for(;null!==e;){const n=ft(e,t);if(n){if(n.get)return Ft(n.get);if("function"==typeof n.value)return Ft(n.value)}e=mt(e)}return function(){return null}}const qt=gt(["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"]),Vt=gt(["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"]),zt=gt(["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"]),Bt=gt(["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"]),Wt=gt(["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"]),Ut=gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yt=gt(["#text"]),Zt=gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),Gt=gt(["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"]),Kt=gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),Jt=gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xt=vt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qt=vt(/<%[\w\W]*|[\w\W]*%>/gm),en=vt(/\$\{[\w\W]*/gm),tn=vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),nn=vt(/^aria-[\-\w]+$/),sn=vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rn=vt(/^(?:\w+script|data):/i),on=vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),an=vt(/^html$/i),ln=vt(/^[a-z][.\w]*(-[.\w]+)+$/i);var cn=Object.freeze({__proto__:null,ARIA_ATTR:nn,ATTR_WHITESPACE:on,CUSTOM_ELEMENT:ln,DATA_ATTR:tn,DOCTYPE_NAME:an,ERB_EXPR:Qt,IS_ALLOWED_URI:sn,IS_SCRIPT_OR_DATA:rn,MUSTACHE_EXPR:Xt,TMPLIT_EXPR:en});const un=1,dn=3,hn=7,pn=8,mn=9,fn=function(){return"undefined"==typeof window?null:window};var gn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fn();const n=t=>e(t);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==mn||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const s=i,r=s.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,f=c.prototype,g=Ht(f,"cloneNode"),v=Ht(f,"remove"),y=Ht(f,"nextSibling"),b=Ht(f,"childNodes"),_=Ht(f,"parentNode");if("function"==typeof a){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let w,k="";const{implementation:T,createNodeIterator:E,createDocumentFragment:D,getElementsByTagName:S}=i,{importNode:x}=s;let O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof dt&&"function"==typeof _&&T&&void 0!==T.createHTMLDocument;const{MUSTACHE_EXPR:L,ERB_EXPR:C,TMPLIT_EXPR:A,DATA_ATTR:M,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:F}=cn;let{IS_ALLOWED_URI:j}=cn,R=null;const $=jt({},[...qt,...Vt,...zt,...Wt,...Yt]);let H=null;const q=jt({},[...Zt,...Gt,...Kt,...Jt]);let V=Object.seal(yt(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}})),z=null,B=null;const W=Object.seal(yt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let U=!0,Y=!0,Z=!1,G=!0,K=!1,J=!0,X=!1,Q=!1,ee=!1,te=!1,ne=!1,ie=!1,se=!0,re=!1,oe=!0,ae=!1,le={},ce=null;const ue=jt({},["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 de=null;const he=jt({},["audio","video","img","source","image","track"]);let pe=null;const me=jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";let ye=ve,be=!1,_e=null;const we=jt({},[fe,ge,ve],xt);let ke=jt({},["mi","mo","mn","ms","mtext"]),Te=jt({},["annotation-xml"]);const Ee=jt({},["title","style","font","a","script"]);let De=null;const Se=["application/xhtml+xml","text/html"];let xe=null,Oe=null;const Le=i.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Ae=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Oe||Oe!==e){if(e&&"object"==typeof e||(e={}),e=$t(e),De=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===De?xt:St,R=Mt(e,"ALLOWED_TAGS")?jt({},e.ALLOWED_TAGS,xe):$,H=Mt(e,"ALLOWED_ATTR")?jt({},e.ALLOWED_ATTR,xe):q,_e=Mt(e,"ALLOWED_NAMESPACES")?jt({},e.ALLOWED_NAMESPACES,xt):we,pe=Mt(e,"ADD_URI_SAFE_ATTR")?jt($t(me),e.ADD_URI_SAFE_ATTR,xe):me,de=Mt(e,"ADD_DATA_URI_TAGS")?jt($t(he),e.ADD_DATA_URI_TAGS,xe):he,ce=Mt(e,"FORBID_CONTENTS")?jt({},e.FORBID_CONTENTS,xe):ue,z=Mt(e,"FORBID_TAGS")?jt({},e.FORBID_TAGS,xe):$t({}),B=Mt(e,"FORBID_ATTR")?jt({},e.FORBID_ATTR,xe):$t({}),le=!!Mt(e,"USE_PROFILES")&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,Z=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,K=e.SAFE_FOR_TEMPLATES||!1,J=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,ie=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,se=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,j=e.ALLOWED_URI_REGEXP||sn,ye=e.NAMESPACE||ve,ke=e.MATHML_TEXT_INTEGRATION_POINTS||ke,Te=e.HTML_INTEGRATION_POINTS||Te,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(Y=!1),ne&&(te=!0),le&&(R=jt({},Yt),H=yt(null),!0===le.html&&(jt(R,qt),jt(H,Zt)),!0===le.svg&&(jt(R,Vt),jt(H,Gt),jt(H,Jt)),!0===le.svgFilters&&(jt(R,zt),jt(H,Gt),jt(H,Jt)),!0===le.mathMl&&(jt(R,Wt),jt(H,Kt),jt(H,Jt))),Mt(e,"ADD_TAGS")||(W.tagCheck=null),Mt(e,"ADD_ATTR")||(W.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?W.tagCheck=e.ADD_TAGS:(R===$&&(R=$t(R)),jt(R,e.ADD_TAGS,xe))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?W.attributeCheck=e.ADD_ATTR:(H===q&&(H=$t(H)),jt(H,e.ADD_ATTR,xe))),e.ADD_URI_SAFE_ATTR&&jt(pe,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(ce===ue&&(ce=$t(ce)),jt(ce,e.FORBID_CONTENTS,xe)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=$t(ce)),jt(ce,e.ADD_FORBID_CONTENTS,xe)),oe&&(R["#text"]=!0),X&&jt(R,["html","head","body"]),R.table&&(jt(R,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(m,r)),null!==w&&"string"==typeof k&&(k=w.createHTML(""));gt&>(e),Oe=e}},Me=jt({},[...Vt,...zt,...Bt]),Ie=jt({},[...Wt,...Ut]),Ne=function(e){Et(n.removed,{element:e});try{_(e).removeChild(e)}catch(t){v(e)}},Pe=function(e,t){try{Et(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Et(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Ne(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Fe=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=Ot(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===De&&ye===ve&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const s=w?w.createHTML(e):e;if(ye===ve)try{t=(new p).parseFromString(s,De)}catch(e){}if(!t||!t.documentElement){t=T.createDocument(ye,"template",null);try{t.documentElement.innerHTML=be?k:s}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(i.createTextNode(n),r.childNodes[0]||null),ye===ve?S.call(t,X?"html":"body")[0]:X?t.documentElement:r},je=function(e){return E.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},$e=function(e){return"function"==typeof l&&e instanceof l};function He(e,t,i){wt(e,e=>{e.call(n,t,i,Oe)})}const qe=function(e){let t=null;if(He(O.beforeSanitizeElements,e,null),Re(e))return Ne(e),!0;const i=xe(e.nodeName);if(He(O.uponSanitizeElement,e,{tagName:i,allowedTags:R}),J&&e.hasChildNodes()&&!$e(e.firstElementChild)&&It(/<[/\w!]/g,e.innerHTML)&&It(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===hn)return Ne(e),!0;if(J&&e.nodeType===pn&&It(/<[/\w]/g,e.data))return Ne(e),!0;if(!(W.tagCheck instanceof Function&&W.tagCheck(i))&&(!R[i]||z[i])){if(!z[i]&&ze(i)){if(V.tagNameCheck instanceof RegExp&&It(V.tagNameCheck,i))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(i))return!1}if(oe&&!ce[i]){const t=_(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const s=g(n[i],!0);s.__removalCount=(e.__removalCount||0)+1,t.insertBefore(s,y(e))}}}return Ne(e),!0}return e instanceof c&&!function(e){let t=_(e);t&&t.tagName||(t={namespaceURI:ye,tagName:"template"});const n=St(e.tagName),i=St(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===ve?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||ke[i]):Boolean(Me[n]):e.namespaceURI===fe?t.namespaceURI===ve?"math"===n:t.namespaceURI===ge?"math"===n&&Te[i]:Boolean(Ie[n]):e.namespaceURI===ve?!(t.namespaceURI===ge&&!Te[i])&&!(t.namespaceURI===fe&&!ke[i])&&!Ie[n]&&(Ee[n]||!Me[n]):!("application/xhtml+xml"!==De||!_e[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!It(/<\/no(script|embed|frames)/i,e.innerHTML)?(K&&e.nodeType===dn&&(t=e.textContent,wt([L,C,A],e=>{t=Lt(t,e," ")}),e.textContent!==t&&(Et(n.removed,{element:e.cloneNode()}),e.textContent=t)),He(O.afterSanitizeElements,e,null),!1):(Ne(e),!0)},Ve=function(e,t,n){if(B[t])return!1;if(se&&("id"===t||"name"===t)&&(n in i||n in Le))return!1;if(Y&&!B[t]&&It(M,t));else if(U&&It(I,t));else if(W.attributeCheck instanceof Function&&W.attributeCheck(t,e));else if(!H[t]||B[t]){if(!(ze(e)&&(V.tagNameCheck instanceof RegExp&&It(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&It(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t,e))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&It(V.tagNameCheck,n)||V.tagNameCheck instanceof Function&&V.tagNameCheck(n))))return!1}else if(pe[t]);else if(It(j,Lt(n,P,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ct(n,"data:")||!de[e]){if(Z&&!It(N,Lt(n,P,"")));else if(n)return!1}else;return!0},ze=function(e){return"annotation-xml"!==e&&Ot(e,F)},Be=function(e){He(O.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let s=t.length;for(;s--;){const r=t[s],{name:o,namespaceURI:a,value:l}=r,c=xe(o),u=l;let d="value"===o?u:At(u);if(i.attrName=c,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,He(O.uponSanitizeAttribute,e,i),d=i.attrValue,!re||"id"!==c&&"name"!==c||(Pe(o,e),d="user-content-"+d),J&&It(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Pe(o,e);continue}if("attributename"===c&&Ot(d,"href")){Pe(o,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Pe(o,e);continue}if(!G&&It(/\/>/i,d)){Pe(o,e);continue}K&&wt([L,C,A],e=>{d=Lt(d,e," ")});const h=xe(e.nodeName);if(Ve(h,c,d)){if(w&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(a);else switch(m.getAttributeType(h,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,o,d):e.setAttribute(o,d),Re(e)?Ne(e):Tt(n.removed)}catch(t){Pe(o,e)}}else Pe(o,e)}He(O.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const i=je(t);for(He(O.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)He(O.uponSanitizeShadowNode,n,null),qe(n),Be(n),n.content instanceof o&&e(n.content);He(O.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,r=null,a=null,c=null;if(be=!e,be&&(e="\x3c!--\x3e"),"string"!=typeof e&&!$e(e)){if("function"!=typeof e.toString)throw Nt("toString is not a function");if("string"!=typeof(e=e.toString()))throw Nt("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Ae(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=xe(e.nodeName);if(!R[t]||z[t])throw Nt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=Fe("\x3c!----\x3e"),r=i.ownerDocument.importNode(e,!0),r.nodeType===un&&"BODY"===r.nodeName||"HTML"===r.nodeName?i=r:i.appendChild(r);else{if(!te&&!K&&!X&&-1===e.indexOf("<"))return w&&ie?w.createHTML(e):e;if(i=Fe(e),!i)return te?null:ie?k:""}i&&ee&&Ne(i.firstChild);const u=je(ae?e:i);for(;a=u.nextNode();)qe(a),Be(a),a.content instanceof o&&We(a.content);if(ae)return e;if(te){if(ne)for(c=D.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(H.shadowroot||H.shadowrootmode)&&(c=x.call(s,c,!0)),c}let d=X?i.outerHTML:i.innerHTML;return X&&R["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&It(an,i.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+d),K&&wt([L,C,A],e=>{d=Lt(d,e," ")}),w&&ie?w.createHTML(d):d},n.setConfig=function(){Ae(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Oe=null,Q=!1},n.isValidAttribute=function(e,t,n){Oe||Ae({});const i=xe(e),s=xe(t);return Ve(i,s,n)},n.addHook=function(e,t){"function"==typeof t&&Et(O[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=kt(O[e],t);return-1===n?void 0:Dt(O[e],n,1)[0]}return Tt(O[e])},n.removeHooks=function(e){O[e]=[]},n.removeAllHooks=function(){O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();class vn extends o{getId(){return"escape"}escapeForHtml(e){if(null==e)return"";const t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]||e})}sanitize(e){return gn.sanitize(e)}}class yn extends o{getId(){return"fetch"}fetch(e,t={}){return void 0===t.headers&&(t.headers=new Headers),t.headers.append("X-Requested-With","Kimai"),t={redirect:"follow",...t},new Promise((n,i)=>{fetch(e,t).then(e=>{if(e.ok)return 201===e.status&&e.headers.has("x-modal-redirect")?void(window.location=e.headers.get("x-modal-redirect")):void n(e);let t=!1;if(403===e.status){if(e.headers.has("login-required")){const e=this.getConfiguration("login").toString();this.getContainer().getPlugin("alert").question(this.translate("login.required"),t=>{!0===t&&window.location.replace(e)}),t=!0}}else console.log("Some error occurred");t||i(e)}).catch(e=>{console.log("Error occurred while talking to Kimai backend",e),i(e)})})}}class bn extends h{supportsForm(e){return"timesheet_edit_form"===e.name||"timesheet_admin_edit_form"===e.name||"timesheet_multi_user_edit_form"===e.name}destroyForm(e){this.supportsForm(e)&&(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(e){if(!this.supportsForm(e))return;const t=e.name;this._activity=document.getElementById(t+"_activity"),this._project=document.getElementById(t+"_project"),this._activityListener=e=>{const t=this._project.value;this.getContainer().getPlugin("api").post(this._activity.dataset.create,{name:e.detail.value,project:""===t?null:t,visible:!0},()=>{this._project.dispatchEvent(new Event("change"))})},this._activity.addEventListener("create",this._activityListener),this._beginDate=document.getElementById(t+"_begin_date"),this._beginTime=document.getElementById(t+"_begin_time"),this._endTime=document.getElementById(t+"_end_time"),this._duration=document.getElementById(t+"_duration"),this._durationToggle=document.getElementById(t+"_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=e=>this._changeDurationOnKeypress(e),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 e=this._formatTimeForParsing(this._beginTime.value,this._beginTime.dataset.format);e!==this._beginTime.value&&(this._beginTime.value=e,this._changedBegin())}_parseEndTime(){if(""===this._endTime.value)return;let e=this._formatTimeForParsing(this._endTime.value,this._endTime.dataset.format);e!==this._endTime.value&&(this._endTime.value=e,this._changedEnd())}_parseDuration(){""!==this._duration.value&&this._setDurationAsString(this._getParsedDuration())}_formatTimeForParsing(e,t){let n=e.trim();n=n.replace(/\.|;|,/g,":"),n=n.replace(/am/i,"AM"),n=n.replace(/pm/i,"PM");let i="",s=0,r=0,o=n;const a=n.match(/\s*(AM|PM)$/i);if(a&&(i=a[1].toUpperCase(),o=n.replace(/\s*(AM|PM)$/i,"").trim()),-1!==o.indexOf(":")){const e=o.match(/(?:(\d+):)?(\d+)/);s=parseInt(e?.[1]||0,10),r=parseInt(e?.[2]||0,10)}else o=o.replace(/:/,""),/^\d{1,2}$/.test(o)&&(s=o),/^\d{3}$/.test(o)&&(s=o.slice(0,1),r=o.slice(1)),/^\d{4}$/.test(o)&&(s=o.slice(0,2),r=o.slice(2));return s=parseInt(s),r=parseInt(r),s%=24,r%=60,-1!==t.toUpperCase().indexOf("A")?(s>12&&s<24&&(s-=12,i="PM"),""===i&&(0===s?(s=12,i="AM"):i=12===s?"PM":"AM"),"PM"===i&&0===s&&(s=12)):("AM"===i&&12===s?s=0:"PM"===i&&12!==s&&(s=(s+12)%24),i=""),n=s+":"+r.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 e=this._parseBegin(this._beginTime.dataset.format);return e.invalid&&(e=this._parseBegin(this._fixTimeFormat(this._beginTime.dataset.format)),e.invalid)?null:e}_parseBegin(e){return this.getDateUtils().fromFormat(this._beginDate.value+" "+this._beginTime.value,this._beginDate.dataset.format+" "+e)}_parseEnd(e,t){let n=this.getDateUtils().fromFormat(e.toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+t);return n.invalid&&(n=this.getDateUtils().fromFormat(e.toFormat("yyyy-LL-dd")+" "+this._endTime.value,"yyyy-LL-dd "+this._fixTimeFormat(t))),n}_fixTimeFormat(e){return e.replace("HH","H").replace("hh","h")}_getEnd(){if(""===this._endTime.value)return null;let e=this._parseEnd(i.c9.now(),this._endTime.dataset.format);const t=this._getBegin();return null!==t&&(e=this._parseEnd(t,this._endTime.dataset.format),e<t&&(e=e.plus({days:1}))),e.invalid?null:e}_changedBegin(){const e=this._getBegin();if(null===e)return;const t=this._getParsedDuration(),n=t.as("seconds")>0;null===this._getEnd()&&n?this._applyDateToField(e.plus(t),null,this._endTime):this._updateDuration()}_changedEnd(){const e=this._getEnd();if(null===e)return;const t=this._getParsedDuration(),n=t.as("seconds")>0;null===this._getBegin()&&n?this._applyDateToField(e.minus(t),this._beginDate,this._beginTime):this._updateDuration()}_updateDuration(){const e=this._getBegin(),t=this._getEnd();let n=null;null!==e&&null!==t&&(n=t.diff(e)),this._setDurationAsString(n)}_changedDuration(){if(!this._isDurationConnected()||""===this._duration.value)return;const e=this._getParsedDuration();if(!e.isValid)return void this._setDurationAsString(null);const t=this._getBegin();let n=this._getEnd();const s=e.as("seconds");if(s<0&&(n=null),null===t&&null===n){const e=i.c9.now();this._applyDateToField(e,this._beginDate,this._beginTime),this._addSecondsToEndDate(e,s)}else null===t&&null!==n?this._applyDateToField(n.minus({seconds:s}),this._beginDate,this._beginTime):null!==t&&s>=0&&this._addSecondsToEndDate(t,s)}_setDurationAsString(e){if(!this._isDurationConnected())return;if(null===e)return void(this._duration.value="");if(!e.isValid)return;const t=e.as("seconds");if(t<0)return void(this._duration.value="");const n=Math.floor(t/3600);let i=Math.floor((t-3600*n)/60);i<10&&(i="0"+i),this._duration.value=n+":"+i}_getParsedDuration(){return this.getDateUtils().parseDuration(this._duration.value)}_addSecondsToEndDate(e,t){t<86400?this._applyDateToField(e.plus({seconds:t}),null,this._endTime):this._endTime.value=""}_applyDateToField(e,t,n){if(null===e||e.invalid)return t.value="",void(n.value="");null!==t&&(t.value=this.getDateUtils().format(t.dataset.format,e)),n.value=this.getDateUtils().format(n.dataset.format,e)}_changeDurationOnKeypress(e){switch(e.key){case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":case"Home":case"End":this._setDurationAsString(this._getParsedDuration());break;default:return}this._changeTimeOnKeypress(e,this._duration,99999,this._durationListener)}_changeTimeOnKeypress(e,t,n,i){let s=t.value||"00:00",[r,o]=s.split(":").map(Number);isNaN(r)&&(r=0),isNaN(o)&&(o=0);const a=t.selectionStart||0,l=s.indexOf(":"),c=a<=l,u=(e,t)=>{let i=60*e+t;return i<0&&(i=0),i>n&&(i=n),[e=Math.floor(i/60),t=i%60]};switch(e.key){case"ArrowUp":[r,o]=c?u(r+1,o):u(r,o+5);break;case"ArrowDown":[r,o]=c?u(r-1,o):u(r,o-5);break;case"PageUp":[r,o]=u(r+1,o),e.preventDefault();break;case"PageDown":[r,o]=u(r-1,o),e.preventDefault();break;case"Home":r=8,o=0,e.preventDefault();break;case"End":r=0,o=0,e.preventDefault();break;default:return}t.value=`${r}:${o.toString().padStart(2,"0")}`,i(t),setTimeout(()=>{t.setSelectionRange(a,a)},0)}}var _n,wn,kn=n(9997);class Tn extends h{init(){this.usersId="team_edit_form_users"}supportsForm(e){return"team_edit_form"===e.name}_getPrototype(){return document.getElementById("team_edit_form_members")}activateForm(e){this.supportsForm(e)&&(e.addEventListener("click",e=>this._removeMember(e)),document.getElementById(this.usersId).addEventListener("change",e=>{const t=e.target,n=t.options[t.selectedIndex],i=this._createMember(n);this._getPrototype().append(i),this.getPlugin("form-select").removeOption(t,n)}))}_createMember(e){const t=this.getPlugin("escape"),n=this._getPrototype();let i=n.dataset.widgetCounter||n.childNodes.length,s=n.dataset.prototype;s=s.replace(/__name__/g,i),s=s.replace(/#000000/g,kn.A.calculateContrastColor(e.dataset.color)),s=s.replace(/__DISPLAY__/g,t.escapeForHtml(e.dataset.display)),s=s.replace(/__COLOR__/g,e.dataset.color),s=s.replace(/__INITIALS__/g,t.escapeForHtml(e.dataset.initials)),s=s.replace(/__TITLE__/g,t.escapeForHtml(e.dataset.title)),s=s.replace(/__USERNAME__/g,t.escapeForHtml(e.text)),n.dataset.widgetCounter=(++i).toString();const r=document.createElement("div");r.innerHTML=t.sanitize(s),r.querySelector("input[type=hidden]").value=e.value;const o=r.firstElementChild;for(const t in e.dataset)o.dataset[t]=e.dataset[t];return o}_removeMember(e){let t=e.target;if(t.parentNode.matches(".remove-member")&&(t=t.parentNode),t.matches(".remove-member")){t.parentNode.parentNode.parentNode.parentNode.parentNode.remove(),e.stopPropagation(),e.preventDefault()}}destroyForm(e){this.supportsForm(e)&&e.removeEventListener("click",this._removeMember)}}class En extends h{supportsForm(e){return!0}activateForm(e){void 0===this._eventHandler&&(this._eventHandler=e=>{let t=e.target;if(t.matches('a[data-form-widget="copy-data"]')||(t=t.parentNode),!t.matches('a[data-form-widget="copy-data"]')||void 0===t.dataset.target)return;const n=document.querySelector(t.dataset.target);if(null!==n){if(n.value=t.dataset.value,void 0!==t.dataset.event)for(const e of t.dataset.event.split(" ")){n.dispatchEvent(new Event(e));const t=n.closest("form");null!==t&&t.dispatchEvent(new Event(e))}e.preventDefault()}}),e.addEventListener("click",this._eventHandler)}destroyForm(e){e.removeEventListener("click",this._eventHandler)}}class Dn extends h{init(){this.selector='a[data-form-widget="date-now"]'}supportsForm(e){return!0}activateForm(e){[].slice.call(e.querySelectorAll(this.selector)).map(e=>{void 0!==e.dataset.format&&void 0!==e.dataset.target&&(void 0===this._eventHandler&&(this._eventHandler=e=>{const t=e.currentTarget,n=document.getElementById(t.dataset.target);n.disabled||(n.value=this.getDateUtils().format(t.dataset.format,null),n.dispatchEvent(new Event("change",{bubbles:!0})),n.dispatchEvent(new Event("keyup",{bubbles:!0}))),e.preventDefault()}),e.addEventListener("click",this._eventHandler))})}destroyForm(e){[].slice.call(e.querySelectorAll(this.selector)).map(e=>{void 0!==e.dataset.format&&void 0!==e.dataset.target&&e.removeEventListener("click",this._eventHandler)})}}class Sn extends o{getId(){return"notification"}isSupported(){return!!window.Notification&&("denied"!==Notification.permission&&"granted"===Notification.permission)}request(e){try{Notification.requestPermission().then(t=>{e("granted"===t||"default"===t&&null)})}catch(t){Notification.requestPermission(t=>{e("granted"===t||"default"===t&&null)})}}notify(e,t,n,i){this.request(s=>{if(!0!==s){this.getPlugin("alert").info(t)}let r={body:t,dir:this.getConfigurations().isRTL()?"rtl":"ltr"};null!=n&&(r.icon=n);let o="Kimai";null!==e&&(o=o+": "+e),null!=i&&(r={...r,...i});const a=new window.Notification(o,r);a.onclick=function(){window.focus(),a.close()}})}}class xn extends o{getId(){return"hotkeys"}init(){window.addEventListener("keyup",e=>{if(e.ctrlKey&&"Enter"===e.key){const t=[...document.querySelectorAll('[data-hotkey="ctrl+Enter"]')].filter(e=>this.isVisible(e));t.length>1&&console.warn("KimaiHotkeys: More than one visible element matches ${selector}. No action triggered."),1===t.length&&(e.stopPropagation(),e.preventDefault(),t[0].click())}})}isVisible(e){return!(!e||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility")}}class On extends o{constructor(){super(),this._selector="a.remote-modal-load"}getId(){return"remote-modal"}init(){this.handle=e=>{this._showModal(e.currentTarget),e.stopPropagation(),e.preventDefault()};for(let e of document.querySelectorAll(this._selector))e.addEventListener("click",this.handle)}_showModal(e){this.fetch(e.href,{method:"GET"}).then(t=>{if(!t.ok)return;let n="remote_modal";void 0!==e.dataset.modalId&&(n=e.dataset.modalId);const i=document.getElementById(n);return null===i&&console.log("Could not find modal with ID: "+n),t.text().then(t=>{const n=document.createElement("div");n.classList.add("modal-body"),void 0!==e.dataset.modalClass&&n.classList.add(e.dataset.modalClass),n.innerHTML=t;for(let e of n.querySelectorAll("a.remote-modal-reload"))e.addEventListener("click",this.handle);i.querySelector(".modal-body").replaceWith(n),void 0!==e.dataset.modalTitle&&(i.querySelector(".modal-title").textContent=e.dataset.modalTitle),c.aF.getOrCreateInstance(i).show()})}).catch(e=>{console.log("Failed to load remote modal",e)})}}class Ln extends o{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 Cn extends rt{init(){this.selector='[data-form-widget="tags"]'}loadData(e,t,n){this.getContainer().getPlugin("api").get(e,{name:t},e=>{let t=[];for(let n of e)t.push({text:n.name,value:n.name,color:n["color-safe"]});n(t)},()=>{n()})}}class An{constructor(e,t){i.wB.defaultLocale=e.locale.replace("_","-").toLowerCase(),i.wB.defaultZone=e.timezone;const n=new a(new r(e),new s(t));n.registerPlugin(new Ln),n.registerPlugin(new vn),n.registerPlugin(new T),n.registerPlugin(new y),n.registerPlugin(new D),n.registerPlugin(new yn),n.registerPlugin(new ut),n.registerPlugin(new Sn),n.registerPlugin(new ot(".selectpicker","select[data-related-select]")),n.registerPlugin(new m('input[data-daterangepicker="on"]')),n.registerPlugin(new p('input[data-datepicker="on"]')),n.registerPlugin(new rt),n.registerPlugin(new Cn),n.registerPlugin(new bn),n.registerPlugin(new Tn),n.registerPlugin(new En),n.registerPlugin(new Dn),n.registerPlugin(new at),n.registerPlugin(new xn),n.registerPlugin(new lt("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 On),n.registerPlugin(new k),n.registerPlugin(new E("api-link")),n.registerPlugin(new ct),n.registerPlugin(new u),document.dispatchEvent(new CustomEvent("kimai.pluginRegister",{detail:{kimai:n}})),n.getPlugins().map(e=>{e.init()}),document.dispatchEvent(new CustomEvent("kimai.initialized",{detail:{kimai:n}})),this.kimai=n}getKimai(){return this.kimai}}e=n.hmd(e),_n="undefined"!=typeof self?self:void 0,wn=function(){return class extends An{}},"function"==typeof define&&n.amdO?define([],function(){return _n.KimaiWebLoader=wn()}):e.exports?e.exports=wn():_n.KimaiWebLoader=wn()},8097:function(e,t,n){"use strict";n.d(t,{c9:function(){return bi},dw:function(){return Sn},wB:function(){return we}});class i extends Error{}class s extends i{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class r extends i{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class o extends i{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class a extends i{}class l extends i{constructor(e){super(`Invalid unit ${e}`)}}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"},D={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},S={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},x={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(e,t){throw new u}formatOffset(e,t){throw new u}offset(e){throw new u}equals(e){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(e,{format:t,locale:n}){return st(e,t,n)}formatOffset(e,t){return lt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.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(e){let t=q.get(e);return void 0===t&&q.set(e,t=new V(e)),t}static resetCache(){q.clear(),$.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=V.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return st(e,t,n,this.name)}formatOffset(e,t){return lt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=$.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),$.set(e,t)),t}(this.name);let[i,s,r,o,a,l,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),i=[];for(let e=0;e<n.length;e++){const{type:t,value:s}=n[e],r=H[t];"era"===t?i[r]=s:je(r)||(i[r]=parseInt(s,10))}return i}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,r,o,a,l,c,u]=i;return[o,s,r,a,l,c,u]}(n,t);"BC"===o&&(i=1-Math.abs(i));let u=+t;const d=u%1e3;return u-=d>=0?d:1e3+d,(et({year:i,month:s,day:r,hour:24===a?0:a,minute:l,second:c,millisecond:0})-u)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let z={};const B=new Map;function W(e,t={}){const n=JSON.stringify([e,t]);let i=B.get(n);return void 0===i&&(i=new Intl.DateTimeFormat(e,t),B.set(n,i)),i}const U=new Map;const Y=new Map;let Z=null;const G=new Map;function K(e){let t=G.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),G.set(e,t)),t}const J=new Map;function X(e,t,n,i){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):i(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:s,...r}=n;if(!t||Object.keys(r).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let i=U.get(n);return void 0===i&&(i=new Intl.NumberFormat(e,t),U.set(n,i)),i}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Ue(this.floor?Math.floor(e):Ke(e,3),this.padTo)}}class ee{constructor(e,t,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&V.create(n).valid?(i=n,this.dt=e):(i="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=W(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class te{constructor(e,t,n){this.opts={style:"long",...n},!t&&He()&&(this.rtf=function(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let r=Y.get(s);return void 0===r&&(r=new Intl.RelativeTimeFormat(e,t),Y.set(s,r)),r}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",i=!1){const s={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."]},r=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&r){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,c=s[e],u=i?l?c[1]:c[2]||c[1]:l?s[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ne={firstDay:1,minimalDays:4,weekend:[6,7]};class ie{static fromOpts(e){return ie.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,s=!1){const r=e||we.defaultLocale,o=r||(s?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=t||we.defaultNumberingSystem,l=n||we.defaultOutputCalendar,c=Be(i)||we.defaultWeekSettings;return new ie(o,a,l,c,r)}static resetCache(){Z=null,B.clear(),U.clear(),Y.clear(),G.clear(),J.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return ie.create(e,t,n,i)}constructor(e,t,n,i,s){const[r,o,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,i;try{t=W(e).resolvedOptions(),i=e}catch(s){const r=e.substring(0,n);t=W(r).resolvedOptions(),i=r}const{numberingSystem:s,calendar:r}=t;return[i,s,r]}}(e);this.locale=r,this.numberingSystem=t||o||null,this.outputCalendar=n||a||null,this.weekSettings=i,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===K(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ie.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Be(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return X(this,e,pt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),i=(t&=!n)?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const t=n?e=>this.dtFormatter(e,i).format():e=>this.extract(e,i,"month");this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const i=bi.utc(2009,n,1);t.push(e(i))}return t}(t)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return X(this,e,vt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=function(e){const t=[];for(let n=1;n<=7;n++){const i=bi.utc(2016,11,13+n);t.push(e(i))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return X(this,void 0,()=>yt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[bi.utc(2016,11,13,9),bi.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return X(this,e,kt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[bi.utc(-40,1,1),bi.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const i=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return i?i.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ee(e,this.intl,t)}relFormatter(e={}){return new te(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let i=z[n];return i||(i=new Intl.ListFormat(e,t),z[n]=i),i}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||K(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qe()?function(e){let t=J.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ne,...t}),J.set(e,t)}return t}(this.locale):ne}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let se=null;class re extends F{static get utcInstance(){return null===se&&(se=new re(0)),se}static instance(e){return 0===e?re.utcInstance:new re(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new re(rt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${lt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${lt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class oe extends F{constructor(e){super(),this.zoneName=e}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 ae(e,t){if(je(e)||null===e)return t;if(e instanceof F)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?R.instance:"utc"===n||"gmt"===n?re.utcInstance:re.parseSpecifier(n)||V.create(e)}return Re(e)?re.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new oe(e)}const le={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ce={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]},ue=le.hanidec.replace(/[\[|\]]/g,"").split("");const de=new Map;function he({numberingSystem:e},t=""){const n=e||"latn";let i=de.get(n);void 0===i&&(i=new Map,de.set(n,i));let s=i.get(t);return void 0===s&&(s=new RegExp(`${le[n]}${t}`),i.set(t,s)),s}let pe,me=()=>Date.now(),fe="system",ge=null,ve=null,ye=null,be=60,_e=null;class we{static get now(){return me}static set now(e){me=e}static set defaultZone(e){fe=e}static get defaultZone(){return ae(fe,R.instance)}static get defaultLocale(){return ge}static set defaultLocale(e){ge=e}static get defaultNumberingSystem(){return ve}static set defaultNumberingSystem(e){ve=e}static get defaultOutputCalendar(){return ye}static set defaultOutputCalendar(e){ye=e}static get defaultWeekSettings(){return _e}static set defaultWeekSettings(e){_e=Be(e)}static get twoDigitCutoffYear(){return be}static set twoDigitCutoffYear(e){be=e%100}static get throwOnInvalid(){return pe}static set throwOnInvalid(e){pe=e}static resetCaches(){ie.resetCache(),V.resetCache(),bi.resetCache(),de.clear()}}class ke{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Te=[0,31,59,90,120,151,181,212,243,273,304,334],Ee=[0,31,60,91,121,152,182,213,244,274,305,335];function De(e,t){return new ke("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Se(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return 0===s?7:s}function xe(e,t,n){return n+(Je(e)?Ee:Te)[t-1]}function Oe(e,t){const n=Je(e)?Ee:Te,i=n.findIndex(e=>e<t);return{month:i+1,day:t-n[i]}}function Le(e,t){return(e-t+7)%7+1}function Ce(e,t=4,n=1){const{year:i,month:s,day:r}=e,o=xe(i,s,r),a=Le(Se(i,s,r),n);let l,c=Math.floor((o-a+14-t)/7);return c<1?(l=i-1,c=nt(l,t,n)):c>nt(i,t,n)?(l=i+1,c=1):l=i,{weekYear:l,weekNumber:c,weekday:a,...ct(e)}}function Ae(e,t=4,n=1){const{weekYear:i,weekNumber:s,weekday:r}=e,o=Le(Se(i,1,t),n),a=Xe(i);let l,c=7*s+r-o-7+t;c<1?(l=i-1,c+=Xe(l)):c>a?(l=i+1,c-=Xe(i)):l=i;const{month:u,day:d}=Oe(l,c);return{year:l,month:u,day:d,...ct(e)}}function Me(e){const{year:t,month:n,day:i}=e;return{year:t,ordinal:xe(t,n,i),...ct(e)}}function Ie(e){const{year:t,ordinal:n}=e,{month:i,day:s}=Oe(t,n);return{year:t,month:i,day:s,...ct(e)}}function Ne(e,t){if(!je(e.localWeekday)||!je(e.localWeekNumber)||!je(e.localWeekYear)){if(!je(e.weekday)||!je(e.weekNumber)||!je(e.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return je(e.localWeekday)||(e.weekday=e.localWeekday),je(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),je(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Pe(e){const t=$e(e.year),n=We(e.month,1,12),i=We(e.day,1,Qe(e.year,e.month));return t?n?!i&&De("day",e.day):De("month",e.month):De("year",e.year)}function Fe(e){const{hour:t,minute:n,second:i,millisecond:s}=e,r=We(t,0,23)||24===t&&0===n&&0===i&&0===s,o=We(n,0,59),a=We(i,0,59),l=We(s,0,999);return r?o?a?!l&&De("millisecond",s):De("second",i):De("minute",n):De("hour",t)}function je(e){return void 0===e}function Re(e){return"number"==typeof e}function $e(e){return"number"==typeof e&&e%1==0}function He(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function qe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ve(e,t,n){if(0!==e.length)return e.reduce((e,i)=>{const s=[t(i),i];return e&&n(e[0],s[0])===e[0]?e:s},null)[1]}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Be(e){if(null==e)return null;if("object"!=typeof e)throw new c("Week settings must be an object");if(!We(e.firstDay,1,7)||!We(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!We(e,1,7)))throw new c("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function We(e,t,n){return $e(e)&&e>=t&&e<=n}function Ue(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ye(e){return je(e)||null===e||""===e?void 0:parseInt(e,10)}function Ze(e){return je(e)||null===e||""===e?void 0:parseFloat(e)}function Ge(e){if(!je(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ke(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Je(e){return e%4==0&&(e%100!=0||e%400==0)}function Xe(e){return Je(e)?366:365}function Qe(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?Je(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function et(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function tt(e,t,n){return-Le(Se(e,1,t),n)+t-1}function nt(e,t=4,n=1){const i=tt(e,t,n),s=tt(e+1,t,n);return(Xe(e)-i+s)/7}function it(e){return e>99?e:e>we.twoDigitCutoffYear?1900+e:2e3+e}function st(e,t,n,i=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function rt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function ot(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new c(`Invalid unit value ${e}`);return t}function at(e,t){const n={};for(const i in e)if(ze(e,i)){const s=e[i];if(null==s)continue;n[t(i)]=ot(s)}return n}function lt(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Ue(n,2)}:${Ue(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ue(n,2)}${Ue(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ct(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const ut=["January","February","March","April","May","June","July","August","September","October","November","December"],dt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht=["J","F","M","A","M","J","J","A","S","O","N","D"];function pt(e){switch(e){case"narrow":return[...ht];case"short":return[...dt];case"long":return[...ut];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 mt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ft=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gt=["M","T","W","T","F","S","S"];function vt(e){switch(e){case"narrow":return[...gt];case"short":return[...ft];case"long":return[...mt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const yt=["AM","PM"],bt=["Before Christ","Anno Domini"],_t=["BC","AD"],wt=["B","A"];function kt(e){switch(e){case"narrow":return[...wt];case"short":return[..._t];case"long":return[...bt];default:return null}}function Tt(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const Et={D:m,DD:f,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:k,T:T,TT:E,TTT:D,TTTT:S,f:x,ff:L,fff:M,ffff:N,F:O,FF:C,FFF:I,FFFF:P};class Dt{static create(e,t={}){return new Dt(e,t)}static parseFormat(e){let t=null,n="",i=!1;const s=[];for(let r=0;r<e.length;r++){const o=e.charAt(r);"'"===o?((n.length>0||i)&&s.push({literal:i||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",i=!i):i||o===t?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&s.push({literal:i||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Et[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Ue(e,t);const i={...this.opts};return t>0&&(i.padTo=t),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),r=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=()=>n?function(e){return yt[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(t,i)=>n?function(e,t){return pt(t)[e.month-1]}(e,t):s(i?{month:t}:{month:t,day:"numeric"},"month"),l=(t,i)=>n?function(e,t){return vt(t)[e.weekday-1]}(e,t):s(i?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),c=t=>{const n=Dt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return kt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return Tt(Dt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.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?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,i=e=>{switch(e[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}},s=Dt.parseFormat(t),r=s.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),o=e.shiftTo(...r.map(i).filter(e=>e));return Tt(s,((e,t)=>s=>{const r=i(s);if(r){const i=t.isNegativeDuration&&r!==t.largestUnit?n:1;let o;return o="negativeLargestOnly"===this.opts.signMode&&r!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(r)*i,s.length,o)}return s})(o,{isNegativeDuration:o<0,largestUnit:Object.keys(o.values)[0]}))}}const St=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function xt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ot(...e){return t=>e.reduce(([e,n,i],s)=>{const[r,o,a]=s(t,i);return[{...e,...r},o||n,a]},[{},null,1]).slice(0,2)}function Lt(e,...t){if(null==e)return[null,null];for(const[n,i]of t){const t=n.exec(e);if(t)return i(t)}return[null,null]}function Ct(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=Ye(t[n+s]);return[i,null,n+s]}}const At=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Mt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,It=RegExp(`${Mt.source}${`(?:${At.source}?(?:\\[(${St.source})\\])?)?`}`),Nt=RegExp(`(?:[Tt]${It.source})?`),Pt=Ct("weekYear","weekNumber","weekDay"),Ft=Ct("year","ordinal"),jt=RegExp(`${Mt.source} ?(?:${At.source}|(${St.source}))?`),Rt=RegExp(`(?: ${jt.source})?`);function $t(e,t,n){const i=e[t];return je(i)?n:Ye(i)}function Ht(e,t){return[{hours:$t(e,t,0),minutes:$t(e,t+1,0),seconds:$t(e,t+2,0),milliseconds:Ge(e[t+3])},null,t+4]}function qt(e,t){const n=!e[t]&&!e[t+1],i=rt(e[t+1],e[t+2]);return[{},n?null:re.instance(i),t+3]}function Vt(e,t){return[{},e[t]?V.create(e[t]):null,t+1]}const zt=RegExp(`^T?${Mt.source}$`),Bt=/^-?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 Wt(e){const[t,n,i,s,r,o,a,l,c]=e,u="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&u)?-e:e;return[{years:h(Ze(n)),months:h(Ze(i)),weeks:h(Ze(s)),days:h(Ze(r)),hours:h(Ze(o)),minutes:h(Ze(a)),seconds:h(Ze(l),"-0"===l),milliseconds:h(Ge(c),d)}]}const Ut={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e,t,n,i,s,r,o){const a={year:2===t.length?it(Ye(t)):Ye(t),month:dt.indexOf(n)+1,day:Ye(i),hour:Ye(s),minute:Ye(r)};return o&&(a.second=Ye(o)),e&&(a.weekday=e.length>3?mt.indexOf(e)+1:ft.indexOf(e)+1),a}const Zt=/^(?:(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 Gt(e){const[,t,n,i,s,r,o,a,l,c,u,d]=e,h=Yt(t,s,i,n,r,o,a);let p;return p=l?Ut[l]:c?0:rt(u,d),[h,new re(p)]}const Kt=/^(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$/,Jt=/^(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$/,Xt=/^(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 Qt(e){const[,t,n,i,s,r,o,a]=e;return[Yt(t,s,i,n,r,o,a),re.utcInstance]}function en(e){const[,t,n,i,s,r,o,a]=e;return[Yt(t,a,n,i,s,r,o),re.utcInstance]}const tn=xt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Nt),nn=xt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nt),sn=xt(/(\d{4})-?(\d{3})/,Nt),rn=xt(It),on=Ot(function(e,t){return[{year:$t(e,t),month:$t(e,t+1,1),day:$t(e,t+2,1)},null,t+3]},Ht,qt,Vt),an=Ot(Pt,Ht,qt,Vt),ln=Ot(Ft,Ht,qt,Vt),cn=Ot(Ht,qt,Vt);const un=Ot(Ht);const dn=xt(/(\d{4})-(\d\d)-(\d\d)/,Rt),hn=xt(jt),pn=Ot(Ht,qt,Vt);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(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Sn(i)}function Tn(e,t){let n=t.milliseconds??0;for(const i of wn.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function En(e,t){const n=Tn(e,t)<0?-1:1;_n.reduceRight((i,s)=>{if(je(t[s]))return i;if(i){const r=t[i]*n,o=e[s][i],a=Math.floor(r/o);t[s]+=a*n,t[i]-=a*o*n}return s},null),_n.reduce((n,i)=>{if(je(t[i]))return n;if(n){const s=t[n]%1;t[n]-=s,t[i]+=s*e[n][i]}return i},null)}function Dn(e){const t={};for(const[n,i]of Object.entries(e))0!==i&&(t[n]=i);return t}class Sn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?bn:gn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ie.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Sn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Sn({values:at(e,Sn.normalizeUnit),loc:ie.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Re(e))return Sn.fromMillis(e);if(Sn.isDuration(e))return e;if("object"==typeof e)return Sn.fromObject(e);throw new c(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Lt(e,[Bt,Wt])}(e);return n?Sn.fromObject(n,t):Sn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Lt(e,[zt,un])}(e);return n?Sn.fromObject(n,t):Sn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the Duration is invalid");const n=e instanceof ke?e:new ke(e,t);if(we.throwOnInvalid)throw new o(n);return new Sn({invalid:n})}static normalizeUnit(e){const t={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"}[e?e.toLowerCase():e];if(!t)throw new l(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Dt.create(this.loc,n).formatDurationFromString(this,e):mn}toHuman(e={}){if(!this.isValid)return mn;const t=!1!==e.showZeros,n=_n.map(n=>{const i=this.values[n];return je(i)||0===i&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ke(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return bi.fromMillis(t,{zone:"UTC"}).toISOTime(e)}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(e){if(!this.isValid)return this;const t=Sn.fromDurationLike(e),n={};for(const e of _n)(ze(t.values,e)||ze(this.values,e))&&(n[e]=t.get(e)+this.get(e));return kn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Sn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ot(e(this.values[n],n));return kn(this,{values:t},!0)}get(e){return this[Sn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return kn(this,{values:{...this.values,...at(e,Sn.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){return kn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return En(this.matrix,e),kn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return kn(this,{values:Dn(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Sn.normalizeUnit(e));const t={},n={},i=this.toObject();let s;for(const r of _n)if(e.indexOf(r)>=0){s=r;let e=0;for(const t in n)e+=this.matrix[t][r]*n[t],n[t]=0;Re(i[r])&&(e+=i[r]);const o=Math.trunc(e);t[r]=o,n[r]=(1e3*e-1e3*o)/1e3}else Re(i[r])&&(n[r]=i[r]);for(const e in n)0!==n[e]&&(t[s]+=e===s?n[e]:n[e]/this.matrix[s][e]);return En(this.matrix,t),kn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return kn(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return kn(this,{values:Dn(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(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of _n)if(!t(this.values[n],e.values[n]))return!1;return!0}}const xn="Invalid Interval";class On{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the Interval is invalid");const n=e instanceof ke?e:new ke(e,t);if(we.throwOnInvalid)throw new r(n);return new On({invalid:n})}static fromDateTimes(e,t){const n=_i(e),i=_i(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?On.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:On.invalid("missing or invalid end"):On.invalid("missing or invalid start")}(n,i);return null==s?new On({start:n,end:i}):s}static after(e,t){const n=Sn.fromDurationLike(t),i=_i(e);return On.fromDateTimes(i,i.plus(n))}static before(e,t){const n=Sn.fromDurationLike(t),i=_i(e);return On.fromDateTimes(i.minus(n),i)}static fromISO(e,t){const[n,i]=(e||"").split("/",2);if(n&&i){let e,s,r,o;try{e=bi.fromISO(n,t),s=e.isValid}catch(i){s=!1}try{r=bi.fromISO(i,t),o=r.isValid}catch(i){o=!1}if(s&&o)return On.fromDateTimes(e,r);if(s){const n=Sn.fromISO(i,t);if(n.isValid)return On.after(e,n)}else if(o){const e=Sn.fromISO(n,t);if(e.isValid)return On.before(r,e)}}return On.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.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(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let i;return i=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,i=i.startOf(e,t),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?On.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:i}=this,s=0;for(;i<this.e;){const e=t[s]||this.e,r=+e>+this.e?this.e:e;n.push(On.fromDateTimes(i,r)),i=r,s+=1}return n}splitBy(e){const t=Sn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:i}=this,s=1;const r=[];for(;i<this.e;){const e=this.start.plus(t.mapUnits(e=>e*s));n=+e>+this.e?this.e:e,r.push(On.fromDateTimes(i,n)),i=n,s+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:On.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return On.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const i=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),r=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const e of r)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&i.push(On.fromDateTimes(t,e.time)),t=null);return On.merge(i)}difference(...e){return On.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:xn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=m,t={}){return this.isValid?Dt.create(this.s.loc.clone(t),e).formatInterval(this):xn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:xn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:xn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:xn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:xn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Sn.invalid(this.invalidReason)}mapEndpoints(e){return On.fromDateTimes(e(this.s),e(this.e))}}class Ln{static hasDST(e=we.defaultZone){const t=bi.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return V.isValidZone(e)}static normalizeZone(e){return ae(e,we.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ie.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ie.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ie.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||ie.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||ie.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||ie.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||ie.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ie.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ie.create(t,null,"gregory").eras(e)}static features(){return{relative:He(),localeWeek:qe()}}}function Cn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Sn.fromMillis(i).as("days"))}function An(e,t,n,i){let[s,r,o,a]=function(e,t,n){const i=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Cn(e,t);return(n-n%7)/7}],["days",Cn]],s={},r=e;let o,a;for(const[l,c]of i)n.indexOf(l)>=0&&(o=l,s[l]=c(e,t),a=r.plus(s),a>t?(s[l]--,(e=r.plus(s))>t&&(a=e,s[l]--,e=r.plus(s))):e=a);return[e,s,a,o]}(e,t,n);const l=t-s,c=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(o<t&&(o=s.plus({[a]:1})),o!==s&&(r[a]=(r[a]||0)+l/(o-s)));const u=Sn.fromObject(r,i);return c.length>0?Sn.fromMillis(l,i).shiftTo(...c).plus(u):u}function Mn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(-1!==e[n].search(le.hanidec))t+=ue.indexOf(e[n]);else for(const e in ce){const[n,s]=ce[e];i>=n&&i<=s&&(t+=i-n)}}return parseInt(t,10)}return t}(e))}}const In=`[ ${String.fromCharCode(160)}]`,Nn=new RegExp(In,"g");function Pn(e){return e.replace(/\./g,"\\.?").replace(Nn,In)}function Fn(e){return e.replace(/\./g,"").replace(Nn," ").toLowerCase()}function jn(e,t){return null===e?null:{regex:RegExp(e.map(Pn).join("|")),deser:([n])=>e.findIndex(e=>Fn(n)===Fn(e))+t}}function Rn(e,t){return{regex:e,deser:([,e,t])=>rt(e,t),groups:t}}function $n(e){return{regex:e,deser:([e])=>e}}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(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Wn(Dt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class zn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Vn(Dt.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=he(t),i=he(t,"{2}"),s=he(t,"{3}"),r=he(t,"{4}"),o=he(t,"{6}"),a=he(t,"{1,2}"),l=he(t,"{1,3}"),c=he(t,"{1,6}"),u=he(t,"{1,9}"),d=he(t,"{2,4}"),h=he(t,"{4,6}"),p=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},m=(m=>{if(e.literal)return p(m);switch(m.val){case"G":return jn(t.eras("short"),0);case"GG":return jn(t.eras("long"),0);case"y":return Mn(c);case"yy":case"kk":return Mn(d,it);case"yyyy":case"kkkk":return Mn(r);case"yyyyy":return Mn(h);case"yyyyyy":return Mn(o);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(t.months("short",!0),1);case"MMMM":return jn(t.months("long",!0),1);case"LLL":return jn(t.months("short",!1),1);case"LLLL":return jn(t.months("long",!1),1);case"o":case"S":return Mn(l);case"ooo":case"SSS":return Mn(s);case"u":return $n(u);case"uu":return $n(a);case"uuu":case"E":case"c":return Mn(n);case"a":return jn(t.meridiems(),0);case"EEE":return jn(t.weekdays("short",!1),1);case"EEEE":return jn(t.weekdays("long",!1),1);case"ccc":return jn(t.weekdays("short",!0),1);case"cccc":return jn(t.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)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=e,m}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const i=e.match(t);if(i){const e={};let t=1;for(const s in n)if(ze(n,s)){const r=n[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(e[r.token.val[0]]=r.deser(i.slice(t,t+o))),t+=o}return[i,e]}return[i,{}]}(e,this.regex,this.handlers),[i,s,r]=n?function(e){let t,n=null;return je(e.z)||(n=V.create(e.z)),je(e.Z)||(n||(n=new re(e.Z)),t=e.Z),je(e.q)||(e.M=3*(e.q-1)+1),je(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),je(e.u)||(e.S=Ge(e.u)),[Object.keys(e).reduce((t,n)=>{const i=(e=>{switch(e){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&&(t[i]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(ze(n,"a")&&ze(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:s,specificOffset:r}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Bn(e,t,n){return new zn(e,n).explainFromTokens(t)}function Wn(e,t){if(!e)return null;const n=Dt.create(t,e).dtFormatter((qn||(qn=bi.fromMillis(1555555555555)),qn)),i=n.formatToParts(),s=n.resolvedOptions();return i.map(t=>function(e,t,n){const{type:i,value:s}=e;if("literal"===i){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const r=t[i];let o=i;"hour"===i&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Hn[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(t,e,s))}const Un="Invalid DateTime",Yn=864e13;function Zn(e){return new ke("unsupported zone",`the zone "${e.name}" is not supported`)}function Gn(e){return null===e.weekData&&(e.weekData=Ce(e.c)),e.weekData}function Kn(e){return null===e.localWeekData&&(e.localWeekData=Ce(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Jn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new bi({...n,...t,old:n})}function Xn(e,t,n){let i=e-60*t*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=60*(s-t)*1e3;const r=n.offset(i);return s===r?[i,s]:[e-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Qn(e,t){const n=new Date(e+=60*t*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 ei(e,t,n){return Xn(et(e),t,n)}function ti(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r={...e.c,year:i,month:s,day:Math.min(e.c.day,Qe(i,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=Sn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=et(r);let[l,c]=Xn(a,n,e.zone);return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function ni(e,t,n,i,s,r){const{setZone:o,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const i=t||a,s=bi.fromObject(e,{...n,zone:i,specificOffset:r});return o?s:s.setZone(a)}return bi.invalid(new ke("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ii(e,t,n=!0){return e.isValid?Dt.create(ie.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function si(e,t,n){const i=e.c.year>9999||e.c.year<0;let s="";if(i&&e.c.year>=0&&(s+="+"),s+=Ue(e.c.year,i?6:4),"year"===n)return s;if(t){if(s+="-",s+=Ue(e.c.month),"month"===n)return s;s+="-"}else if(s+=Ue(e.c.month),"month"===n)return s;return s+=Ue(e.c.day),s}function ri(e,t,n,i,s,r,o){let a=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(o){case"day":case"month":case"year":break;default:if(l+=Ue(e.c.hour),"hour"===o)break;if(t){if(l+=":",l+=Ue(e.c.minute),"minute"===o)break;a&&(l+=":",l+=Ue(e.c.second))}else{if(l+=Ue(e.c.minute),"minute"===o)break;a&&(l+=Ue(e.c.second))}if("second"===o)break;!a||i&&0===e.c.millisecond||(l+=".",l+=Ue(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&0===e.offset&&!r?l+="Z":e.o<0?(l+="-",l+=Ue(Math.trunc(-e.o/60)),l+=":",l+=Ue(Math.trunc(-e.o%60))):(l+="+",l+=Ue(Math.trunc(e.o/60)),l+=":",l+=Ue(Math.trunc(e.o%60)))),r&&(l+="["+e.zone.ianaName+"]"),l}const oi={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(e){const t={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"}[e.toLowerCase()];if(!t)throw new l(e);return t}function pi(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hi(e)}}function mi(e,t){const n=ae(t.zone,we.defaultZone);if(!n.isValid)return bi.invalid(Zn(n));const i=ie.fromObject(t);let s,r;if(je(e.year))s=we.now();else{for(const t of ci)je(e[t])&&(e[t]=oi[t]);const t=Pe(e)||Fe(e);if(t)return bi.invalid(t);const i=function(e){if(void 0===vi&&(vi=we.now()),"iana"!==e.type)return e.offset(vi);const t=e.name;let n=yi.get(t);return void 0===n&&(n=e.offset(vi),yi.set(t,n)),n}(n);[s,r]=ei(e,i,n)}return new bi({ts:s,zone:n,loc:i,o:r})}function fi(e,t,n){const i=!!je(n.round)||n.round,s=je(n.rounding)?"trunc":n.rounding,r=(e,r)=>{e=Ke(e,i||n.calendary?0:2,n.calendary?"round":s);return t.loc.clone(n).relFormatter(n).format(e,r)},o=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return r(o(n.unit),n.unit);for(const e of n.units){const t=o(e);if(Math.abs(t)>=1)return r(t,e)}return r(e>t?-0:0,n.units[n.units.length-1])}function gi(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let vi;const yi=new Map;class bi{constructor(e){const t=e.zone||we.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new ke("invalid input"):null)||(t.isValid?null:Zn(t));this.ts=je(e.ts)?we.now():e.ts;let i=null,s=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,s]=[e.old.c,e.old.o];else{const r=Re(e.o)&&!e.old?e.o:t.offset(this.ts);i=Qn(this.ts,r),n=Number.isNaN(i.year)?new ke("invalid input"):null,i=n?null:i,s=n?null:r}}this._zone=t,this.loc=e.loc||ie.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new bi({})}static local(){const[e,t]=gi(arguments),[n,i,s,r,o,a,l]=t;return mi({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},e)}static utc(){const[e,t]=gi(arguments),[n,i,s,r,o,a,l]=t;return e.zone=re.utcInstance,mi({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const n=(i=e,"[object Date]"===Object.prototype.toString.call(i)?e.valueOf():NaN);var i;if(Number.isNaN(n))return bi.invalid("invalid input");const s=ae(t.zone,we.defaultZone);return s.isValid?new bi({ts:n,zone:s,loc:ie.fromObject(t)}):bi.invalid(Zn(s))}static fromMillis(e,t={}){if(Re(e))return e<-Yn||e>Yn?bi.invalid("Timestamp out of range"):new bi({ts:e,zone:ae(t.zone,we.defaultZone),loc:ie.fromObject(t)});throw new c(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Re(e))return new bi({ts:1e3*e,zone:ae(t.zone,we.defaultZone),loc:ie.fromObject(t)});throw new c("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=ae(t.zone,we.defaultZone);if(!n.isValid)return bi.invalid(Zn(n));const i=ie.fromObject(t),s=at(e,pi),{minDaysInFirstWeek:r,startOfWeek:o}=Ne(s,i),l=we.now(),c=je(t.specificOffset)?n.offset(l):t.specificOffset,u=!je(s.ordinal),d=!je(s.year),h=!je(s.month)||!je(s.day),p=d||h,m=s.weekYear||s.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||s.weekday&&!p;let g,v,y=Qn(l,c);f?(g=ui,v=ai,y=Ce(y,r,o)):u?(g=di,v=li,y=Me(y)):(g=ci,v=oi);let b=!1;for(const e of g){je(s[e])?s[e]=b?v[e]:y[e]:b=!0}const _=f?function(e,t=4,n=1){const i=$e(e.weekYear),s=We(e.weekNumber,1,nt(e.weekYear,t,n)),r=We(e.weekday,1,7);return i?s?!r&&De("weekday",e.weekday):De("week",e.weekNumber):De("weekYear",e.weekYear)}(s,r,o):u?function(e){const t=$e(e.year),n=We(e.ordinal,1,Xe(e.year));return t?!n&&De("ordinal",e.ordinal):De("year",e.year)}(s):Pe(s),w=_||Fe(s);if(w)return bi.invalid(w);const k=f?Ae(s,r,o):u?Ie(s):s,[T,E]=ei(k,c,n),D=new bi({ts:T,zone:n,o:E,loc:i});return s.weekday&&p&&e.weekday!==D.weekday?bi.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${D.toISO()}`):D.isValid?D:bi.invalid(D.invalid)}static fromISO(e,t={}){const[n,i]=function(e){return Lt(e,[tn,on],[nn,an],[sn,ln],[rn,cn])}(e);return ni(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,i]=function(e){return Lt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Zt,Gt])}(e);return ni(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,i]=function(e){return Lt(e,[Kt,Qt],[Jt,Qt],[Xt,en])}(e);return ni(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(je(e)||je(t))throw new c("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=n,r=ie.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,a,l,u]=function(e,t,n){const{result:i,zone:s,specificOffset:r,invalidReason:o}=Bn(e,t,n);return[i,s,r,o]}(r,e,t);return u?bi.invalid(u):ni(o,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return bi.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,i]=function(e){return Lt(e,[dn,on],[hn,pn])}(e);return ni(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the DateTime is invalid");const n=e instanceof ke?e:new ke(e,t);if(we.throwOnInvalid)throw new s(n);return new bi({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Wn(e,ie.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Vn(Dt.parseFormat(e),ie.fromObject(t)).map(e=>e.val).join("")}static resetCache(){vi=void 0,yi.clear()}get(e){return this[e]}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?Me(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 e=864e5,t=6e4,n=et(this.c),i=this.zone.offset(n-e),s=this.zone.offset(n+e),r=this.zone.offset(n-i*t),o=this.zone.offset(n-s*t);if(r===o)return[this];const a=n-r*t,l=n-o*t,c=Qn(a,r),u=Qn(l,o);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 Je(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Xe(this.year):NaN}get weeksInWeekYear(){return this.isValid?nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:i}=Dt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(re.instance(e),t)}toLocal(){return this.setZone(we.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=ae(e,we.defaultZone)).equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[i]=ei(n,t,e)}return Jn(this,{ts:i,zone:e})}return bi.invalid(Zn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Jn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=at(e,pi),{minDaysInFirstWeek:n,startOfWeek:i}=Ne(t,this.loc),s=!je(t.weekYear)||!je(t.weekNumber)||!je(t.weekday),r=!je(t.ordinal),o=!je(t.year),l=!je(t.month)||!je(t.day),c=o||l,u=t.weekYear||t.weekNumber;if((c||r)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new a("Can't mix ordinal dates with month/day");let d;s?d=Ae({...Ce(this.c,n,i),...t},n,i):je(t.ordinal)?(d={...this.toObject(),...t},je(t.day)&&(d.day=Math.min(Qe(d.year,d.month),d.day))):d=Ie({...Me(this.c),...t});const[h,p]=ei(d,this.o,this.zone);return Jn(this,{ts:h,o:p})}plus(e){if(!this.isValid)return this;return Jn(this,ti(this,Sn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Jn(this,ti(this,Sn.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},i=Sn.normalizeUnit(e);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(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===i){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Dt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Un}toLocaleString(e=m,t={}){return this.isValid?Dt.create(this.loc.clone(t),e).formatDateTime(this):Un}toLocaleParts(e={}){return this.isValid?Dt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:s=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;const o="extended"===e;let a=si(this,o,r=hi(r));return ci.indexOf(r)>=3&&(a+="T"),a+=ri(this,o,t,n,i,s,r),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?si(this,"extended"===e,hi(t)):null}toISOWeekDate(){return ii(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:s=!1,format:r="extended",precision:o="milliseconds"}={}){if(!this.isValid)return null;return o=hi(o),(i&&ci.indexOf(o)>=3?"T":"")+ri(this,"extended"===r,t,e,n,s,o)}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?si(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),ii(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`: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(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Sn.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(a=t,Array.isArray(a)?a:[a]).map(Sn.normalizeUnit),r=e.valueOf()>this.valueOf(),o=An(r?this:e,r?e:this,s,i);var a;return r?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(bi.now(),e,t)}until(e){return this.isValid?On.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=i&&i<=s.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||bi.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),fi(t,this.plus(n),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?fi(e.base||bi.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(bi.isDateTime))throw new c("min requires all arguments be DateTimes");return Ve(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(bi.isDateTime))throw new c("max requires all arguments be DateTimes");return Ve(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:i=null,numberingSystem:s=null}=n;return Bn(ie.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return bi.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:i=null}=t,s=ie.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new zn(s,e)}static fromFormatParser(e,t,n={}){if(je(e)||je(t))throw new c("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=n,r=ie.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!r.equals(t.locale))throw new c(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${t.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:u}=t.explainFromTokens(e);return u?bi.invalid(u):ni(o,a,n,`format ${t.format}`,e,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 D}static get TIME_24_WITH_LONG_OFFSET(){return S}static get DATETIME_SHORT(){return x}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(e){if(bi.isDateTime(e))return e;if(e&&e.valueOf&&Re(e.valueOf()))return bi.fromJSDate(e);if(e&&"object"==typeof e)return bi.fromObject(e);throw new c(`Unknown datetime argument: ${e}, of type ${typeof e}`)}},8214:function(){!function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n,i,s,r=e[1]||"",o=e[3];if(!o)return r;if(t&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(s," */")),l=o.sources.map(function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")});return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(i)for(var r=0;r<this.length;r++){var o=this[r][0];null!=o&&(s[o]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);i&&s[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";var i,s={},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}();function o(e,t){for(var n=[],i={},s=0;s<e.length;s++){var r=e[s],o=t.base?r[0]+t.base:r[0],a={css:r[1],media:r[2],sourceMap:r[3]};i[o]?i[o].parts.push(a):n.push(i[o]={id:o,parts:[a]})}return n}function a(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=s[i.id],o=0;if(r){for(r.refs++;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(f(i.parts[o],t))}else{for(var a=[];o<i.parts.length;o++)a.push(f(i.parts[o],t));s[i.id]={id:i.id,refs:1,parts:a}}}}function l(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var i=n.nc;i&&(e.attributes.nonce=i)}if(Object.keys(e.attributes).forEach(function(n){t.setAttribute(n,e.attributes[n])}),"function"==typeof e.insert)e.insert(t);else{var s=r(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,i){var s=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=u(t,s);else{var r=document.createTextNode(s),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(r,o[t]):e.appendChild(r)}}function h(e,t,n){var i=n.css,s=n.media,r=n.sourceMap;if(s&&e.setAttribute("media",s),r&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var p=null,m=0;function f(e,t){var n,i,s;if(t.singleton){var r=m++;n=p||(p=l(t)),i=d.bind(null,n,r,!1),s=d.bind(null,n,r,!0)}else n=l(t),i=h.bind(null,n,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=o(e,t);return a(n,t),function(e){for(var i=[],r=0;r<n.length;r++){var l=n[r],c=s[l.id];c&&(c.refs--,i.push(c))}e&&a(o(e,t),t);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 s[d.id]}}}}},,,,function(e,t,n){"use strict";function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n(6),Litepicker.add("mobilefriendly",{init:function(e){var t=e.options;e.options.mobilefriendly=s(s({},{breakpoint:480}),t.mobilefriendly),Object.defineProperties(e,{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(e){}function r(){var t="portrait"===o();return window.matchMedia("(max-device-".concat(t?"width":"height",": ").concat(e.options.mobilefriendly.breakpoint,"px)")).matches}function o(){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"===o()?(e.options.numberOfMonths=1,e.options.numberOfColumns=1):(e.options.numberOfMonths=2,e.options.numberOfColumns=2)}e.backdrop=document.createElement("div"),e.backdrop.className="litepicker-backdrop",e.backdrop.addEventListener("click",e.hide()),t.element&&t.element.parentNode&&t.element.parentNode.appendChild(e.backdrop),window.addEventListener("orientationchange",function(n){window.addEventListener("resize",function n(){if(r()&&e.isShowning()){var i=o();if("landscape"===i)t.numberOfMonths=2,t.numberOfColumns=2;else t.numberOfMonths=1,t.numberOfColumns=1;e.ui.classList.toggle("mobilefriendly-portrait","portrait"===i),e.ui.classList.toggle("mobilefriendly-landscape","landscape"===i),e.render()}window.removeEventListener("resize",n)})}),t.inlineMode&&r()&&(window.dispatchEvent(new Event("orientationchange")),window.dispatchEvent(new Event("resize"))),e.on("before:show",function(t){if(e.triggerElement=t,!e.options.inlineMode&&r()){e.emit("mobilefriendly.before:show",t),e.ui.style.position="fixed",e.ui.style.display="block",a(),e.scrollToDate(t),e.render();var n=o();e.ui.classList.add("mobilefriendly"),e.ui.classList.toggle("mobilefriendly-portrait","portrait"===n),e.ui.classList.toggle("mobilefriendly-landscape","landscape"===n),e.ui.style.top="50%",e.ui.style.left="50%",e.ui.style.right=null,e.ui.style.bottom=null,e.ui.style.zIndex=e.options.zIndex,e.backdrop.style.display="block",e.backdrop.style.zIndex=e.options.zIndex-1,document.body.classList.add("litepicker-open"),(t||e.options.element).blur(),e.emit("mobilefriendly.show",t)}else r()&&(a(),e.render())}),e.on("render",function(t){e.touchTargetMonth&&Array.from(e.ui.querySelectorAll(".month-item")).map(function(t){return t.classList.add("touch-target-".concat(e.touchTargetMonth))}),e.touchTargetMonth=null}),e.on("hide",function(){document.body.classList.remove("litepicker-open"),e.backdrop.style.display="none",e.ui.classList.remove("mobilefriendly","mobilefriendly-portrait","mobilefriendly-landscape")}),e.on("destroy",function(){e.backdrop&&e.backdrop.parentNode&&e.backdrop.parentNode.removeChild(e.backdrop)}),e.ui.addEventListener("touchstart",function(t){var n=t.touches[0];e.xTouchDown=n.clientX,e.yTouchDown=n.clientY},!!n&&{passive:!0}),e.ui.addEventListener("touchmove",function(t){if(e.xTouchDown&&e.yTouchDown){var n=t.touches[0].clientX,i=t.touches[0].clientY,s=e.xTouchDown-n,r=e.yTouchDown-i,o=Math.abs(s)>Math.abs(r),a=e.options.numberOfMonths,l=null,c=!1,u="",d=Array.from(e.ui.querySelectorAll(".month-item"));if(o){var h=e.DateTime(e.ui.querySelector(".day-item").dataset.time),p=Number("".concat(1-Math.abs(s)/100)),m=0;if(s>0){m=-Math.abs(s),l=h.clone().add(a,"month");var f=e.options.maxDate;c=!f||l.isSameOrBefore(e.DateTime(f),"month"),u="next"}else{m=Math.abs(s),l=h.clone().subtract(a,"month");var g=e.options.minDate;c=!g||l.isSameOrAfter(e.DateTime(g),"month"),u="prev"}c&&d.map(function(e){e.style.opacity=p,e.style.transform="translateX(".concat(m,"px)")})}Math.abs(s)+Math.abs(r)>100&&o&&l&&c&&(e.touchTargetMonth=u,e.gotoDate(l))}},!!n&&{passive:!0}),e.ui.addEventListener("touchend",function(t){e.touchTargetMonth||Array.from(e.ui.querySelectorAll(".month-item")).map(function(e){e.style.transform="translateX(0px)",e.style.opacity=1}),e.xTouchDown=null,e.yTouchDown=null},!!n&&{passive:!0})}})},function(e,t,n){var i=n(7);"string"==typeof i&&(i=[[e.i,i,""]]);var s={insert:function(e){var t=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?t.insertBefore(e,n.nextSibling):t.appendChild(e):t.insertBefore(e,t.firstChild),window._lastElementInsertedByStyleLoader=e)},singleton:!1};n(1)(i,s),i.locals&&(e.exports=i.locals)},function(e,t,n){(t=n(0)(!1)).push([e.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}',""]),e.exports=t}])},9336:function(e,t,n){"use strict";n.d(t,{aF:function(){return Mi},go:function(){return Ki},AM:function(){return ks},y8:function(){return vr},m_:function(){return vs}});var i={};n.r(i),n.d(i,{afterMain:function(){return T},afterRead:function(){return _},afterWrite:function(){return S},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 r},clippingParents:function(){return h},computeStyles:function(){return ie},createPopper:function(){return Ie},createPopperBase:function(){return Me},createPopperLite:function(){return Ne},detectOverflow:function(){return be},end:function(){return d},eventListeners:function(){return re},flip:function(){return _e},hide:function(){return Te},left:function(){return a},main:function(){return k},modifierPhases:function(){return x},offset:function(){return Ee},placements:function(){return v},popper:function(){return m},popperGenerator:function(){return Ae},popperOffsets:function(){return De},preventOverflow:function(){return Se},read:function(){return b},reference:function(){return f},right:function(){return o},start:function(){return u},top:function(){return s},variationPlacements:function(){return g},viewport:function(){return p},write:function(){return D}});var s="top",r="bottom",o="right",a="left",l="auto",c=[s,r,o,a],u="start",d="end",h="clippingParents",p="viewport",m="popper",f="reference",g=c.reduce(function(e,t){return e.concat([t+"-"+u,t+"-"+d])},[]),v=[].concat(c,[l]).reduce(function(e,t){return e.concat([t,t+"-"+u,t+"-"+d])},[]),y="beforeRead",b="read",_="afterRead",w="beforeMain",k="main",T="afterMain",E="beforeWrite",D="write",S="afterWrite",x=[y,b,_,w,k,T,E,D,S];function O(e){return e?(e.nodeName||"").toLowerCase():null}function L(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function C(e){return e instanceof L(e).Element||e instanceof Element}function A(e){return e instanceof L(e).HTMLElement||e instanceof HTMLElement}function M(e){return"undefined"!=typeof ShadowRoot&&(e instanceof L(e).ShadowRoot||e instanceof ShadowRoot)}var I={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},s=t.elements[e];A(s)&&O(s)&&(Object.assign(s.style,n),Object.keys(i).forEach(function(e){var t=i[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],s=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});A(i)&&O(i)&&(Object.assign(i.style,r),Object.keys(s).forEach(function(e){i.removeAttribute(e)}))})}},requires:["computeStyles"]};function N(e){return e.split("-")[0]}var P=Math.max,F=Math.min,j=Math.round;function R(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function $(){return!/^((?!chrome|android).)*safari/i.test(R())}function H(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),s=1,r=1;t&&A(e)&&(s=e.offsetWidth>0&&j(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&j(i.height)/e.offsetHeight||1);var o=(C(e)?L(e):window).visualViewport,a=!$()&&n,l=(i.left+(a&&o?o.offsetLeft:0))/s,c=(i.top+(a&&o?o.offsetTop:0))/r,u=i.width/s,d=i.height/r;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function q(e){var t=H(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function V(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&M(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function z(e){return L(e).getComputedStyle(e)}function B(e){return["table","td","th"].indexOf(O(e))>=0}function W(e){return((C(e)?e.ownerDocument:e.document)||window.document).documentElement}function U(e){return"html"===O(e)?e:e.assignedSlot||e.parentNode||(M(e)?e.host:null)||W(e)}function Y(e){return A(e)&&"fixed"!==z(e).position?e.offsetParent:null}function Z(e){for(var t=L(e),n=Y(e);n&&B(n)&&"static"===z(n).position;)n=Y(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===z(n).position)?t:n||function(e){var t=/firefox/i.test(R());if(/Trident/i.test(R())&&A(e)&&"fixed"===z(e).position)return null;var n=U(e);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)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function G(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e,t,n){return P(e,F(t,n))}function J(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function X(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Q={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,l=e.options,u=n.elements.arrow,d=n.modifiersData.popperOffsets,h=N(n.placement),p=G(h),m=[a,o].indexOf(h)>=0?"height":"width";if(u&&d){var f=function(e,t){return J("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:X(e,c))}(l.padding,n),g=q(u),v="y"===p?s:a,y="y"===p?r:o,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],D=k-g[m]-f[y],S=k/2-g[m]/2+T,x=K(E,S,D),O=p;n.modifiersData[i]=((t={})[O]=x,t.centerOffset=x-S,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&V(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ee(e){return e.split("-")[1]}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,i=e.popperRect,l=e.placement,c=e.variation,u=e.offsets,h=e.position,p=e.gpuAcceleration,m=e.adaptive,f=e.roundOffsets,g=e.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,D=s,S=window;if(m){var x=Z(n),O="clientHeight",C="clientWidth";if(x===L(n)&&"static"!==z(x=W(n)).position&&"absolute"===h&&(O="scrollHeight",C="scrollWidth"),l===s||(l===a||l===o)&&c===d)D=r,_-=(g&&x===S&&S.visualViewport?S.visualViewport.height:x[O])-i.height,_*=p?1:-1;if(l===a||(l===s||l===r)&&c===d)E=o,y-=(g&&x===S&&S.visualViewport?S.visualViewport.width:x[C])-i.width,y*=p?1:-1}var A,M=Object.assign({position:h},m&&te),I=!0===f?function(e,t){var n=e.x,i=e.y,s=t.devicePixelRatio||1;return{x:j(n*s)/s||0,y:j(i*s)/s||0}}({x:y,y:_},L(n)):{x:y,y:_};return y=I.x,_=I.y,p?Object.assign({},M,((A={})[D]=T?"0":"",A[E]=k?"0":"",A.transform=(S.devicePixelRatio||1)<=1?"translate("+y+"px, "+_+"px)":"translate3d("+y+"px, "+_+"px, 0)",A)):Object.assign({},M,((t={})[D]=T?_+"px":"",t[E]=k?y+"px":"",t.transform="",t))}var ie={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=void 0===i||i,r=n.adaptive,o=void 0===r||r,a=n.roundOffsets,l=void 0===a||a,c={placement:N(t.placement),variation:ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},se={passive:!0};var re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,r=void 0===s||s,o=i.resize,a=void 0===o||o,l=L(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach(function(e){e.addEventListener("scroll",n.update,se)}),a&&l.addEventListener("resize",n.update,se),function(){r&&c.forEach(function(e){e.removeEventListener("scroll",n.update,se)}),a&&l.removeEventListener("resize",n.update,se)}},data:{}},oe={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,function(e){return oe[e]})}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,function(e){return le[e]})}function ue(e){var t=L(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return H(W(e)).left+ue(e).scrollLeft}function he(e){var t=z(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function pe(e){return["html","body","#document"].indexOf(O(e))>=0?e.ownerDocument.body:A(e)&&he(e)?e:pe(U(e))}function me(e,t){var n;void 0===t&&(t=[]);var i=pe(e),s=i===(null==(n=e.ownerDocument)?void 0:n.body),r=L(i),o=s?[r].concat(r.visualViewport||[],he(i)?i:[]):i,a=t.concat(o);return s?a:a.concat(me(U(o)))}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ge(e,t,n){return t===p?fe(function(e,t){var n=L(e),i=W(e),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=$();(c||!c&&"fixed"===t)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+de(e),y:l}}(e,n)):C(t)?function(e,t){var n=H(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):fe(function(e){var t,n=W(e),i=ue(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=P(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=P(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+de(e),l=-i.scrollTop;return"rtl"===z(s||n).direction&&(a+=P(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}(W(e)))}function ve(e,t,n,i){var s="clippingParents"===t?function(e){var t=me(U(e)),n=["absolute","fixed"].indexOf(z(e).position)>=0&&A(e)?Z(e):e;return C(n)?t.filter(function(e){return C(e)&&V(e,n)&&"body"!==O(e)}):[]}(e):[].concat(t),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(t,n){var s=ge(e,n,i);return t.top=P(s.top,t.top),t.right=F(s.right,t.right),t.bottom=F(s.bottom,t.bottom),t.left=P(s.left,t.left),t},ge(e,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ye(e){var t,n=e.reference,i=e.element,l=e.placement,c=l?N(l):null,h=l?ee(l):null,p=n.x+n.width/2-i.width/2,m=n.y+n.height/2-i.height/2;switch(c){case s:t={x:p,y:n.y-i.height};break;case r:t={x:p,y:n.y+n.height};break;case o:t={x:n.x+n.width,y:m};break;case a:t={x:n.x-i.width,y:m};break;default:t={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:t[f]=t[f]-(n[g]/2-i[g]/2);break;case d:t[f]=t[f]+(n[g]/2-i[g]/2)}}return t}function be(e,t){void 0===t&&(t={});var n=t,i=n.placement,a=void 0===i?e.placement:i,l=n.strategy,u=void 0===l?e.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,D=J("number"!=typeof E?E:X(E,c)),S=_===m?f:m,x=e.rects.popper,O=e.elements[k?S:_],L=ve(C(O)?O:O.contextElement||W(e.elements.popper),g,y,u),A=H(e.elements.reference),M=ye({reference:A,element:x,strategy:"absolute",placement:a}),I=fe(Object.assign({},x,M)),N=_===m?I:A,P={top:L.top-N.top+D.top,bottom:N.bottom-L.bottom+D.bottom,left:L.left-N.left+D.left,right:N.right-L.right+D.right},F=e.modifiersData.offset;if(_===m&&F){var j=F[a];Object.keys(P).forEach(function(e){var t=[o,r].indexOf(e)>=0?1:-1,n=[s,r].indexOf(e)>=0?"y":"x";P[e]+=j[n]*t})}return P}var _e={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.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,D=t.options.placement,S=N(D),x=f||(S===D||!T?[ae(D)]:function(e){if(N(e)===l)return[];var t=ae(e);return[ce(e),t,ce(t)]}(D)),O=[D].concat(x).reduce(function(e,n){return e.concat(N(n)===l?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?v:l,d=ee(i),h=d?a?g:g.filter(function(e){return ee(e)===d}):c,p=h.filter(function(e){return u.indexOf(e)>=0});0===p.length&&(p=h);var m=p.reduce(function(t,n){return t[n]=be(e,{placement:n,boundary:s,rootBoundary:r,padding:o})[N(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}(t,{placement:n,boundary:b,rootBoundary:_,padding:y,flipVariations:T,allowedAutoPlacements:E}):n)},[]),L=t.rects.reference,C=t.rects.popper,A=new Map,M=!0,I=O[0],P=0;P<O.length;P++){var F=O[P],j=N(F),R=ee(F)===u,$=[s,r].indexOf(j)>=0,H=$?"width":"height",q=be(t,{placement:F,boundary:b,rootBoundary:_,altBoundary:w,padding:y}),V=$?R?o:a:R?r:s;L[H]>C[H]&&(V=ae(V));var z=ae(V),B=[];if(h&&B.push(q[j]<=0),m&&B.push(q[V]<=0,q[z]<=0),B.every(function(e){return e})){I=F,M=!1;break}A.set(F,B)}if(M)for(var W=function(e){var t=O.find(function(t){var n=A.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return I=t,"break"},U=T?3:1;U>0;U--){if("break"===W(U))break}t.placement!==I&&(t.modifiersData[i]._skip=!0,t.placement=I,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function we(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ke(e){return[s,o,r,a].some(function(t){return e[t]>=0})}var Te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=be(t,{elementContext:"reference"}),a=be(t,{altBoundary:!0}),l=we(o,i),c=we(a,s,r),u=ke(l),d=ke(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var Ee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,l=void 0===r?[0,0]:r,c=v.reduce(function(e,n){return e[n]=function(e,t,n){var i=N(e),r=[a,s].indexOf(i)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=l[0],u=l[1];return c=c||0,u=(u||0)*r,[a,o].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}(n,t.rects,l),e},{}),u=c[t.placement],d=u.x,h=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=h),t.modifiersData[i]=c}};var De={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Se={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.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=be(t,{boundary:p,rootBoundary:m,padding:g,altBoundary:f}),k=N(t.placement),T=ee(t.placement),E=!T,D=G(k),S="x"===D?"y":"x",x=t.modifiersData.popperOffsets,O=t.rects.reference,L=t.rects.popper,C="function"==typeof _?_(Object.assign({},t.rects,{placement:t.placement})):_,A="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(x){if(c){var j,R="y"===D?s:a,$="y"===D?r:o,H="y"===D?"height":"width",V=x[D],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=t.elements.arrow,X=y&&J?q(J):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=Q[R],ne=Q[$],ie=K(0,O[H],X[H]),se=E?O[H]/2-W-ie-te-A.mainAxis:U-ie-te-A.mainAxis,re=E?-O[H]/2+W+ie+ne+A.mainAxis:Y+ie+ne+A.mainAxis,oe=t.elements.arrow&&Z(t.elements.arrow),ae=oe?"y"===D?oe.clientTop||0:oe.clientLeft||0:0,le=null!=(j=null==M?void 0:M[D])?j:0,ce=V+re-le,ue=K(y?F(z,V+se-le-ae):z,V,y?P(B,ce):B);x[D]=ue,I[D]=ue-V}if(h){var de,he="x"===D?s:a,pe="x"===D?r:o,me=x[S],fe="y"===S?"height":"width",ge=me+w[he],ve=me-w[pe],ye=-1!==[s,a].indexOf(k),_e=null!=(de=null==M?void 0:M[S])?de:0,we=ye?ge:me-O[fe]-L[fe]-_e+A.altAxis,ke=ye?me+O[fe]+L[fe]-_e-A.altAxis:ve,Te=y&&ye?function(e,t,n){var i=K(e,t,n);return i>n?n:i}(we,me,ke):K(y?we:ge,me,y?ke:ve);x[S]=Te,I[S]=Te-me}t.modifiersData[i]=I}},requiresIfExists:["offset"]};function xe(e,t,n){void 0===n&&(n=!1);var i,s,r=A(t),o=A(t)&&function(e){var t=e.getBoundingClientRect(),n=j(t.width)/e.offsetWidth||1,i=j(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),a=W(t),l=H(e,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==O(t)||he(a))&&(c=(i=t)!==L(i)&&A(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:ue(i)),A(t)?((u=H(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=de(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Oe(e){var t=new Map,n=new Set,i=[];function s(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var i=t.get(e);i&&s(i)}}),i.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||s(e)}),i}var Le={placement:"bottom",modifiers:[],strategy:"absolute"};function Ce(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Ae(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,s=t.defaultOptions,r=void 0===s?Le:s;return function(e,t,n){void 0===n&&(n=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Le,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var s="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:C(e)?me(e):e.contextElement?me(e.contextElement):[],popper:me(t)};var o,c,h=function(e){var t=Oe(e);return x.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((o=[].concat(i,a.options.modifiers),c=o.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return a.orderedModifiers=h.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,s=e.effect;if("function"==typeof s){var r=s({state:a,name:t,instance:u,options:i}),o=function(){};l.push(r||o)}}),u.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(Ce(t,n)){a.rects={reference:xe(t,Z(n),"fixed"===a.options.strategy),popper:q(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var s=a.orderedModifiers[i],r=s.fn,o=s.options,l=void 0===o?{}:o,d=s.name;"function"==typeof r&&(a=r({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(e){u.forceUpdate(),e(a)})},function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(s())})})),o}),destroy:function(){d(),c=!0}};if(!Ce(e,t))return u;function d(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var Me=Ae(),Ie=Ae({defaultModifiers:[re,De,ie,I,Ee,_e,Se,Q,Te]}),Ne=Ae({defaultModifiers:[re,De,ie,I]});const Pe=new Map,Fe={set(e,t,n){Pe.has(e)||Pe.set(e,new Map);const i=Pe.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get(e,t){return Pe.has(e)&&Pe.get(e).get(t)||null},remove(e,t){if(!Pe.has(e))return;const n=Pe.get(e);n.delete(t),0===n.size&&Pe.delete(e)}},je="transitionend",Re=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),$e=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),He=e=>{e.dispatchEvent(new Event(je))},qe=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ve=e=>qe(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Re(e)):null,ze=e=>{if(!qe(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},Be=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),We=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?We(e.parentNode):null},Ue=()=>{},Ye=e=>{e.offsetHeight},Ze=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ge=[],Ke=()=>"rtl"===document.documentElement.dir,Je=e=>{var t;t=()=>{const t=Ze();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(Ge.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Ge)e()}),Ge.push(t)):t()},Xe=(e,t=[],n=e)=>"function"==typeof e?e.call(...t):n,Qe=(e,t,n=!0)=>{if(!n)return void Xe(e);const i=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),s=Number.parseFloat(n);return i||s?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let s=!1;const r=({target:n})=>{n===t&&(s=!0,t.removeEventListener(je,r),Xe(e))};t.addEventListener(je,r),setTimeout(()=>{s||He(t)},i)},et=(e,t,n,i)=>{const s=e.length;let r=e.indexOf(t);return-1===r?!n&&i?e[s-1]:e[0]:(r+=n?1:-1,i&&(r=(r+s)%s),e[Math.max(0,Math.min(r,s-1))])},tt=/[^.]*(?=\..*)\.|.*/,nt=/\..*/,it=/::\d+$/,st={};let rt=1;const ot={mouseenter:"mouseover",mouseleave:"mouseout"},at=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 lt(e,t){return t&&`${t}::${rt++}`||e.uidEvent||rt++}function ct(e){const t=lt(e);return e.uidEvent=t,st[t]=st[t]||{},st[t]}function ut(e,t,n=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===n)}function dt(e,t,n){const i="string"==typeof t,s=i?n:t||n;let r=ft(e);return at.has(r)||(r=e),[i,s,r]}function ht(e,t,n,i,s){if("string"!=typeof t||!e)return;let[r,o,a]=dt(t,n,i);if(t in ot){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};o=e(o)}const l=ct(e),c=l[a]||(l[a]={}),u=ut(c,o,r?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=lt(o,t.replace(tt,"")),h=r?function(e,t,n){return function i(s){const r=e.querySelectorAll(t);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return vt(s,{delegateTarget:o}),i.oneOff&>.off(e,s.type,t,n),n.apply(o,[s])}}(e,n,o):function(e,t){return function n(i){return vt(i,{delegateTarget:e}),n.oneOff&>.off(e,i.type,t),t.apply(e,[i])}}(e,o);h.delegationSelector=r?n:null,h.callable=o,h.oneOff=s,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,r)}function pt(e,t,n,i,s){const r=ut(t[n],i,s);r&&(e.removeEventListener(n,r,Boolean(s)),delete t[n][r.uidEvent])}function mt(e,t,n,i){const s=t[n]||{};for(const[r,o]of Object.entries(s))r.includes(i)&&pt(e,t,n,o.callable,o.delegationSelector)}function ft(e){return e=e.replace(nt,""),ot[e]||e}const gt={on(e,t,n,i){ht(e,t,n,i,!1)},one(e,t,n,i){ht(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[s,r,o]=dt(t,n,i),a=o!==t,l=ct(e),c=l[o]||{},u=t.startsWith(".");if(void 0===r){if(u)for(const n of Object.keys(l))mt(e,l,n,t.slice(1));for(const[n,i]of Object.entries(c)){const s=n.replace(it,"");a&&!t.includes(s)||pt(e,l,o,i.callable,i.delegationSelector)}}else{if(!Object.keys(c).length)return;pt(e,l,o,r,s?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=Ze();let s=null,r=!0,o=!0,a=!1;t!==ft(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),r=!s.isPropagationStopped(),o=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=vt(new Event(t,{bubbles:r,cancelable:!0}),n);return a&&l.preventDefault(),o&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function vt(e,t={}){for(const[n,i]of Object.entries(t))try{e[n]=i}catch(t){Object.defineProperty(e,n,{configurable:!0,get(){return i}})}return e}function yt(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function bt(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const _t={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${bt(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${bt(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=yt(e.dataset[i])}return t},getDataAttribute(e,t){return yt(e.getAttribute(`data-bs-${bt(t)}`))}};class wt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=qe(t)?_t.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...qe(t)?_t.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[n,i]of Object.entries(t)){const t=e[n],s=qe(t)?"element":$e(t);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${s}" but expected type "${i}".`)}}}class kt extends wt{constructor(e,t){super(),(e=Ve(e))&&(this._element=e,this._config=this._getConfig(t),Fe.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Fe.remove(this._element,this.constructor.DATA_KEY),gt.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Qe(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Fe.get(Ve(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Tt=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map(e=>Re(e)).join(","):null},Et={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(e=>e.matches(t))},parents(e,t){const n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(e=>!Be(e)&&ze(e))},getSelectorFromElement(e){const t=Tt(e);return t&&Et.findOne(t)?t:null},getElementFromSelector(e){const t=Tt(e);return t?Et.findOne(t):null},getMultipleElementsFromSelector(e){const t=Tt(e);return t?Et.find(t):[]}},Dt=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;gt.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Be(this))return;const s=Et.getElementFromSelector(this)||this.closest(`.${i}`);e.getOrCreateInstance(s)[t]()})},St=".bs.alert",xt=`close${St}`,Ot=`closed${St}`;class Lt extends kt{static get NAME(){return"alert"}close(){if(gt.trigger(this._element,xt).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),gt.trigger(this._element,Ot),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Lt.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Dt(Lt,"close"),Je(Lt);const Ct='[data-bs-toggle="button"]';class At extends kt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each(function(){const t=At.getOrCreateInstance(this);"toggle"===e&&t[e]()})}}gt.on(document,"click.bs.button.data-api",Ct,e=>{e.preventDefault();const t=e.target.closest(Ct);At.getOrCreateInstance(t).toggle()}),Je(At);const Mt=".bs.swipe",It=`touchstart${Mt}`,Nt=`touchmove${Mt}`,Pt=`touchend${Mt}`,Ft=`pointerdown${Mt}`,jt=`pointerup${Mt}`,Rt={endCallback:null,leftCallback:null,rightCallback:null},$t={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ht extends wt{constructor(e,t){super(),this._element=e,e&&Ht.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Rt}static get DefaultType(){return $t}static get NAME(){return"swipe"}dispose(){gt.off(this._element,Mt)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Xe(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&Xe(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(gt.on(this._element,Ft,e=>this._start(e)),gt.on(this._element,jt,e=>this._end(e)),this._element.classList.add("pointer-event")):(gt.on(this._element,It,e=>this._start(e)),gt.on(this._element,Nt,e=>this._move(e)),gt.on(this._element,Pt,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qt=".bs.carousel",Vt=".data-api",zt="ArrowLeft",Bt="ArrowRight",Wt="next",Ut="prev",Yt="left",Zt="right",Gt=`slide${qt}`,Kt=`slid${qt}`,Jt=`keydown${qt}`,Xt=`mouseenter${qt}`,Qt=`mouseleave${qt}`,en=`dragstart${qt}`,tn=`load${qt}${Vt}`,nn=`click${qt}${Vt}`,sn="carousel",rn="active",on=".active",an=".carousel-item",ln=on+an,cn={[zt]:Zt,[Bt]:Yt},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 kt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Et.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===sn&&this.cycle()}static get Default(){return un}static get DefaultType(){return dn}static get NAME(){return"carousel"}next(){this._slide(Wt)}nextWhenVisible(){!document.hidden&&ze(this._element)&&this.next()}prev(){this._slide(Ut)}pause(){this._isSliding&&He(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?gt.one(this._element,Kt,()=>this.cycle()):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void gt.one(this._element,Kt,()=>this.to(e));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?Wt:Ut;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&>.on(this._element,Jt,e=>this._keydown(e)),"hover"===this._config.pause&&(gt.on(this._element,Xt,()=>this.pause()),gt.on(this._element,Qt,()=>this._maybeEnableCycle())),this._config.touch&&Ht.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Et.find(".carousel-item img",this._element))gt.on(e,en,e=>e.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(Yt)),rightCallback:()=>this._slide(this._directionToOrder(Zt)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Ht(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=cn[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Et.findOne(on,this._indicatorsElement);t.classList.remove(rn),t.removeAttribute("aria-current");const n=Et.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(rn),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===Wt,s=t||et(this._getItems(),n,i,this._config.wrap);if(s===n)return;const r=this._getItemIndex(s),o=t=>gt.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:r});if(o(Gt).defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Ye(s),n.classList.add(l),s.classList.add(l);this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(rn),n.classList.remove(rn,c,l),this._isSliding=!1,o(Kt)},n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Et.findOne(ln,this._element)}_getItems(){return Et.find(an,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Ke()?e===Yt?Ut:Wt:e===Yt?Wt:Ut}_orderToDirection(e){return Ke()?e===Ut?Yt:Zt:e===Ut?Zt:Yt}static jQueryInterface(e){return this.each(function(){const t=hn.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)})}}gt.on(document,nn,"[data-bs-slide], [data-bs-slide-to]",function(e){const t=Et.getElementFromSelector(this);if(!t||!t.classList.contains(sn))return;e.preventDefault();const n=hn.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===_t.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())}),gt.on(window,tn,()=>{const e=Et.find('[data-bs-ride="carousel"]');for(const t of e)hn.getOrCreateInstance(t)}),Je(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},Dn={parent:"(null|element)",toggle:"boolean"};class Sn extends kt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=Et.find(Tn);for(const e of n){const t=Et.getSelectorFromElement(e),n=Et.find(t).filter(e=>e===this._element);null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return En}static get DefaultType(){return Dn}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(e=>e!==this._element).map(e=>Sn.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(gt.trigger(this._element,mn).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(_n),this._element.classList.add(wn),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(wn),this._element.classList.add(_n,bn),this._element.style[t]="",gt.trigger(this._element,fn)},this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(gt.trigger(this._element,gn).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Ye(this._element),this._element.classList.add(wn),this._element.classList.remove(_n,bn);for(const e of this._triggerArray){const t=Et.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(wn),this._element.classList.add(_n),gt.trigger(this._element,vn)},this._element,!0)}_isShown(e=this._element){return e.classList.contains(bn)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Ve(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Tn);for(const t of e){const e=Et.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=Et.find(kn,this._config.parent);return Et.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const n=Sn.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}})}}gt.on(document,yn,Tn,function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of Et.getMultipleElementsFromSelector(this))Sn.getOrCreateInstance(e,{toggle:!1}).toggle()}),Je(Sn);const xn="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=Ke()?"top-end":"top-start",Bn=Ke()?"top-start":"top-end",Wn=Ke()?"bottom-end":"bottom-start",Un=Ke()?"bottom-start":"bottom-end",Yn=Ke()?"left-start":"right-start",Zn=Ke()?"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 kt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Et.next(this._element,Vn)[0]||Et.prev(this._element,Vn)[0]||Et.findOne(Vn,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Gn}static get DefaultType(){return Kn}static get NAME(){return xn}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Be(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!gt.trigger(this._element,Nn,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))gt.on(e,"mouseover",Ue);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add($n),this._element.classList.add($n),gt.trigger(this._element,Pn,e)}}hide(){if(Be(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!gt.trigger(this._element,Mn,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))gt.off(e,"mouseover",Ue);this._popper&&this._popper.destroy(),this._menu.classList.remove($n),this._element.classList.remove($n),this._element.setAttribute("aria-expanded","false"),_t.removeDataAttribute(this._menu,"popper"),gt.trigger(this._element,In,e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!qe(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${xn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){let e=this._element;"parent"===this._config.reference?e=this._parent:qe(this._config.reference)?e=Ve(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Ie(e,this._menu,t)}_isShown(){return this._menu.classList.contains($n)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Yn;if(e.classList.contains("dropstart"))return Zn;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?Bn:zn:t?Un:Wn}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(_t.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Xe(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){const n=Et.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(e=>ze(e));n.length&&et(n,t,e===An,!n.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Jn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=Et.find(qn);for(const n of t){const t=Jn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const i=e.composedPath(),s=i.includes(t._menu);if(i.includes(t._element)||"inside"===t._config.autoClose&&!s||"outside"===t._config.autoClose&&s)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const r={relatedTarget:t._element};"click"===e.type&&(r.clickEvent=e),t._completeHide(r)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,i=[Cn,An].includes(e.key);if(!i&&!n)return;if(t&&!n)return;e.preventDefault();const s=this.matches(Hn)?this:Et.prev(this,Hn)[0]||Et.next(this,Hn)[0]||Et.findOne(Hn,e.delegateTarget.parentNode),r=Jn.getOrCreateInstance(s);if(i)return e.stopPropagation(),r.show(),void r._selectMenuItem(e);r._isShown()&&(e.stopPropagation(),r.hide(),s.focus())}}gt.on(document,jn,Hn,Jn.dataApiKeydownHandler),gt.on(document,jn,Vn,Jn.dataApiKeydownHandler),gt.on(document,Fn,Jn.clearMenus),gt.on(document,Rn,Jn.clearMenus),gt.on(document,Fn,Hn,function(e){e.preventDefault(),Jn.getOrCreateInstance(this).toggle()}),Je(Jn);const Xn="backdrop",Qn="show",ei=`mousedown.bs.${Xn}`,ti={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 wt{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return ti}static get DefaultType(){return ni}static get NAME(){return Xn}show(e){if(!this._config.isVisible)return void Xe(e);this._append();const t=this._getElement();this._config.isAnimated&&Ye(t),t.classList.add(Qn),this._emulateAnimation(()=>{Xe(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(Qn),this._emulateAnimation(()=>{this.dispose(),Xe(e)})):Xe(e)}dispose(){this._isAppended&&(gt.off(this._element,ei),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ve(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),gt.on(e,ei,()=>{Xe(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Qe(e,this._getElement(),this._config.isAnimated)}}const si=".bs.focustrap",ri=`focusin${si}`,oi=`keydown.tab${si}`,ai="backward",li={autofocus:!0,trapElement:null},ci={autofocus:"boolean",trapElement:"element"};class ui extends wt{constructor(e){super(),this._config=this._getConfig(e),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(),gt.off(document,si),gt.on(document,ri,e=>this._handleFocusin(e)),gt.on(document,oi,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,gt.off(document,si))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=Et.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===ai?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.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 e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,pi,t=>t+e),this._setElementAttributes(di,pi,t=>t+e),this._setElementAttributes(hi,mi,t=>t-e)}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(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(s))}px`)})}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&_t.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,e=>{const n=_t.getDataAttribute(e,t);null!==n?(_t.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)})}_applyManipulationCallback(e,t){if(qe(e))t(e);else for(const n of Et.find(e,this._element))t(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}`,Di=`keydown.dismiss${gi}`,Si=`click${gi}.data-api`,xi="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 kt{constructor(e,t){super(e,t),this._dialog=Et.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(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||this._isTransitioning)return;gt.trigger(this._element,_i,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(xi),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){if(!this._isShown||this._isTransitioning)return;gt.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(){gt.off(window,gi),gt.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(e){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 t=Et.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),Ye(this._element),this._element.classList.add(Oi);this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,gt.trigger(this._element,wi,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){gt.on(this._element,Di,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),gt.on(window,ki,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),gt.on(this._element,Ei,e=>{gt.one(this._element,Ti,t=>{this._element===e.target&&this._element===t.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(xi),this._resetAdjustments(),this._scrollBar.reset(),gt.trigger(this._element,bi)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(gt.trigger(this._element,yi).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(Li)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(Li),this._queueCallback(()=>{this._element.classList.remove(Li),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=Ke()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=Ke()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const n=Mi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}})}}gt.on(document,Si,'[data-bs-toggle="modal"]',function(e){const t=Et.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),gt.one(t,_i,e=>{e.defaultPrevented||gt.one(t,bi,()=>{ze(this)&&this.focus()})});const n=Et.findOne(".modal.show");n&&Mi.getInstance(n).hide();Mi.getOrCreateInstance(t).toggle(this)}),Dt(Mi),Je(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 kt{constructor(e,t){super(e,t),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(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(gt.trigger(this._element,Hi,{relatedTarget:e}).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),gt.trigger(this._element,qi,{relatedTarget:e})},this._element,!0)}hide(){if(!this._isShown)return;if(gt.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(),gt.trigger(this._element,Bi)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new ii({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():gt.trigger(this._element,zi)}:null})}_initializeFocusTrap(){return new ui({trapElement:this._element})}_addEventListeners(){gt.on(this._element,Yi,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():gt.trigger(this._element,zi))})}static jQueryInterface(e){return this.each(function(){const t=Ki.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}})}}gt.on(document,Ui,'[data-bs-toggle="offcanvas"]',function(e){const t=Et.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),Be(this))return;gt.one(t,Bi,()=>{ze(this)&&this.focus()});const n=Et.findOne($i);n&&n!==t&&Ki.getInstance(n).hide();Ki.getOrCreateInstance(t).toggle(this)}),gt.on(window,Pi,()=>{for(const e of Et.find($i))Ki.getOrCreateInstance(e).show()}),gt.on(window,Wi,()=>{for(const e of Et.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Ki.getOrCreateInstance(e).hide()}),Dt(Ki),Je(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,es=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Xi.has(n)||Boolean(Qi.test(e.nodeValue)):t.filter(e=>e instanceof RegExp).some(e=>e.test(n))};const ts={allowList:Ji,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},ns={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},is={entry:"(string|element|function|null)",selector:"(string|element)"};class ss extends wt{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return ts}static get DefaultType(){return ns}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},is)}_setContent(e,t,n){const i=Et.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?qe(t)?this._putElementInTemplate(Ve(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const i=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const e of s){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[].concat(...e.attributes),s=[].concat(t["*"]||[],t[n]||[]);for(const t of i)es(t,s)||e.removeAttribute(t.nodeName)}return i.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Xe(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const rs=new Set(["sanitize","allowList","sanitizeFn"]),os="fade",as="show",ls=".tooltip-inner",cs=".modal",us="hide.bs.modal",ds="hover",hs="focus",ps="click",ms={AUTO:"auto",TOP:"top",RIGHT:Ke()?"left":"right",BOTTOM:"bottom",LEFT:Ke()?"right":"left"},fs={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"},gs={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 vs extends kt{constructor(e,t){super(e,t),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 fs}static get DefaultType(){return gs}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),gt.off(this._element.closest(cs),us,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 e=gt.trigger(this._element,this.constructor.eventName("show")),t=(We(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)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),gt.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(as),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))gt.on(e,"mouseover",Ue);this._queueCallback(()=>{gt.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(gt.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(as),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))gt.off(e,"mouseover",Ue);this._activeTrigger[ps]=!1,this._activeTrigger[hs]=!1,this._activeTrigger[ds]=!1,this._isHovered=null;this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),gt.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(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(os,as),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(os),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ss({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ls]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(os)}_isShown(){return this.tip&&this.tip.classList.contains(as)}_createPopper(e){const t=Xe(this._config.placement,[this,e,this._element]),n=ms[t.toUpperCase()];return Ie(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Xe(e,[this._element,this._element])}_getPopperConfig(e){const t={placement:e,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:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...Xe(this._config.popperConfig,[void 0,t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)gt.on(this._element,this.constructor.eventName("click"),this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger[ps]=!(t._isShown()&&t._activeTrigger[ps]),t.toggle()});else if("manual"!==t){const e=t===ds?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===ds?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");gt.on(this._element,e,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?hs:ds]=!0,t._enter()}),gt.on(this._element,n,this._config.selector,e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?hs:ds]=t._element.contains(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},gt.on(this._element.closest(cs),us,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),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(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=_t.getDataAttributes(this._element);for(const e of Object.keys(t))rs.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Ve(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=vs.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}Je(vs);const ys=".popover-header",bs=".popover-body",_s={...vs.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"},ws={...vs.DefaultType,content:"(null|string|element|function)"};class ks extends vs{static get Default(){return _s}static get DefaultType(){return ws}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ys]:this._getTitle(),[bs]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=ks.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}})}}Je(ks);const Ts=".bs.scrollspy",Es=`activate${Ts}`,Ds=`click${Ts}`,Ss=`load${Ts}.data-api`,xs="active",Os="[href]",Ls=".nav-link",Cs=`${Ls}, .nav-item > ${Ls}, .list-group-item`,As={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ms={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Is extends kt{constructor(e,t){super(e,t),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 As}static get DefaultType(){return Ms}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ve(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map(e=>Number.parseFloat(e))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(gt.off(this._config.target,Ds),gt.on(this._config.target,Ds,Os,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const r of e){if(!r.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(r));continue}const e=r.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&e){if(n(r),!i)return}else s||e||n(r)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Et.find(Os,this._config.target);for(const t of e){if(!t.hash||Be(t))continue;const e=Et.findOne(decodeURI(t.hash),this._element);ze(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(xs),this._activateParents(e),gt.trigger(this._element,Es,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))Et.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(xs);else for(const t of Et.parents(e,".nav, .list-group"))for(const e of Et.prev(t,Cs))e.classList.add(xs)}_clearActiveClass(e){e.classList.remove(xs);const t=Et.find(`${Os}.${xs}`,e);for(const e of t)e.classList.remove(xs)}static jQueryInterface(e){return this.each(function(){const t=Is.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}gt.on(window,Ss,()=>{for(const e of Et.find('[data-bs-spy="scroll"]'))Is.getOrCreateInstance(e)}),Je(Is);const Ns=".bs.tab",Ps=`hide${Ns}`,Fs=`hidden${Ns}`,js=`show${Ns}`,Rs=`shown${Ns}`,$s=`click${Ns}`,Hs=`keydown${Ns}`,qs=`load${Ns}`,Vs="ArrowLeft",zs="ArrowRight",Bs="ArrowUp",Ws="ArrowDown",Us="Home",Ys="End",Zs="active",Gs="fade",Ks="show",Js=".dropdown-toggle",Xs=`:not(${Js})`,Qs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',er=`${`.nav-link${Xs}, .list-group-item${Xs}, [role="tab"]${Xs}`}, ${Qs}`,tr=`.${Zs}[data-bs-toggle="tab"], .${Zs}[data-bs-toggle="pill"], .${Zs}[data-bs-toggle="list"]`;class nr extends kt{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),gt.on(this._element,Hs,e=>this._keydown(e)))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?gt.trigger(t,Ps,{relatedTarget:e}):null;gt.trigger(e,js,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Zs),this._activate(Et.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),gt.trigger(e,Rs,{relatedTarget:t})):e.classList.add(Ks)},e,e.classList.contains(Gs))}_deactivate(e,t){if(!e)return;e.classList.remove(Zs),e.blur(),this._deactivate(Et.getElementFromSelector(e));this._queueCallback(()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),gt.trigger(e,Fs,{relatedTarget:t})):e.classList.remove(Ks)},e,e.classList.contains(Gs))}_keydown(e){if(![Vs,zs,Bs,Ws,Us,Ys].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter(e=>!Be(e));let n;if([Us,Ys].includes(e.key))n=t[e.key===Us?0:t.length-1];else{const i=[zs,Ws].includes(e.key);n=et(t,e.target,i,!0)}n&&(n.focus({preventScroll:!0}),nr.getOrCreateInstance(n).show())}_getChildren(){return Et.find(er,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Et.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const i=(e,i)=>{const s=Et.findOne(e,n);s&&s.classList.toggle(i,t)};i(Js,Zs),i(".dropdown-menu",Ks),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Zs)}_getInnerElement(e){return e.matches(er)?e:Et.findOne(er,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each(function(){const t=nr.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}})}}gt.on(document,$s,Qs,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),Be(this)||nr.getOrCreateInstance(this).show()}),gt.on(window,qs,()=>{for(const e of Et.find(tr))nr.getOrCreateInstance(e)}),Je(nr);const ir=".bs.toast",sr=`mouseover${ir}`,rr=`mouseout${ir}`,or=`focusin${ir}`,ar=`focusout${ir}`,lr=`hide${ir}`,cr=`hidden${ir}`,ur=`show${ir}`,dr=`shown${ir}`,hr="hide",pr="show",mr="showing",fr={animation:"boolean",autohide:"boolean",delay:"number"},gr={animation:!0,autohide:!0,delay:5e3};class vr extends kt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return gr}static get DefaultType(){return fr}static get NAME(){return"toast"}show(){if(gt.trigger(this._element,ur).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(hr),Ye(this._element),this._element.classList.add(pr,mr),this._queueCallback(()=>{this._element.classList.remove(mr),gt.trigger(this._element,dr),this._maybeScheduleHide()},this._element,this._config.animation)}hide(){if(!this.isShown())return;if(gt.trigger(this._element,lr).defaultPrevented)return;this._element.classList.add(mr),this._queueCallback(()=>{this._element.classList.add(hr),this._element.classList.remove(mr,pr),gt.trigger(this._element,cr)},this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(pr),super.dispose()}isShown(){return this._element.classList.contains(pr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){gt.on(this._element,sr,e=>this._onInteraction(e,!0)),gt.on(this._element,rr,e=>this._onInteraction(e,!1)),gt.on(this._element,or,e=>this._onInteraction(e,!0)),gt.on(this._element,ar,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=vr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Dt(vr),Je(vr)},9997:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});class i{static calculateContrastColor(e){"#"===e.slice(0,1)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map(function(e){return e+e}).join(""));return(299*parseInt(e.substring(0,2),16)+587*parseInt(e.substring(2,4),16)+114*parseInt(e.substring(4,6),16))/1e3>=128?"#000000":"#ffffff"}}}},function(e){var t;t=4028,e(e.s=t)}]); |