avo 4.0.22 → 4.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -657,7 +657,7 @@ function print() { __p += __j.call(arguments, '') }
657
657
  <span class='flatpickr-weekday'>
658
658
  `+X.join("</span><span class='flatpickr-weekday'>")+`
659
659
  </span>
660
- `}}function ge(){t.calendarContainer.classList.add("hasWeeks");var G=Jo("div","flatpickr-weekwrapper");G.appendChild(Jo("span","flatpickr-weekday",t.l10n.weekAbbreviation));var X=Jo("div","flatpickr-weeks");return G.appendChild(X),{weekWrapper:G,weekNumbers:X}}function se(G,X){X===void 0&&(X=!0);var oe=X?G:G-t.currentMonth;oe<0&&t._hidePrevMonthArrow===!0||oe>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=oe,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ft("onYearChange"),j()),U(),Ft("onMonthChange"),Dn())}function Ke(G,X){if(G===void 0&&(G=!0),X===void 0&&(X=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,X===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var oe=aq(t.config),ye=oe.hours,Oe=oe.minutes,je=oe.seconds;C(ye,Oe,je)}t.redraw(),G&&Ft("onChange")}function xt(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ft("onClose")}function it(){t.config!==void 0&&Ft("onDestroy");for(var G=t._handlers.length;G--;)t._handlers[G].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var X=t.calendarContainer.parentNode;if(X.lastChild&&X.removeChild(X.lastChild),X.parentNode){for(;X.firstChild;)X.parentNode.insertBefore(X.firstChild,X);X.parentNode.removeChild(X)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(oe){try{delete t[oe]}catch{}})}function _t(G){return t.calendarContainer.contains(G)}function ct(G){if(t.isOpen&&!t.config.inline){var X=kf(G),oe=_t(X),ye=X===t.input||X===t.altInput||t.element.contains(X)||G.path&&G.path.indexOf&&(~G.path.indexOf(t.input)||~G.path.indexOf(t.altInput)),Oe=!ye&&!oe&&!_t(G.relatedTarget),je=!t.config.ignoredFocusElements.some(function(et){return et.contains(X)});Oe&&je&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&u(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function Mt(G){if(!(!G||t.config.minDate&&G<t.config.minDate.getFullYear()||t.config.maxDate&&G>t.config.maxDate.getFullYear())){var X=G,oe=t.currentYear!==X;t.currentYear=X||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),oe&&(t.redraw(),Ft("onYearChange"),j())}}function Ht(G,X){var oe;X===void 0&&(X=!0);var ye=t.parseDate(G,void 0,X);if(t.config.minDate&&ye&&Ef(ye,t.config.minDate,X!==void 0?X:!t.minDateHasTime)<0||t.config.maxDate&&ye&&Ef(ye,t.config.maxDate,X!==void 0?X:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(ye===void 0)return!1;for(var Oe=!!t.config.enable,je=(oe=t.config.enable)!==null&&oe!==void 0?oe:t.config.disable,et=0,ke=void 0;et<je.length;et++){if(ke=je[et],typeof ke=="function"&&ke(ye))return Oe;if(ke instanceof Date&&ye!==void 0&&ke.getTime()===ye.getTime())return Oe;if(typeof ke=="string"){var Ue=t.parseDate(ke,void 0,!0);return Ue&&Ue.getTime()===ye.getTime()?Oe:!Oe}else if(typeof ke=="object"&&ye!==void 0&&ke.from&&ke.to&&ye.getTime()>=ke.from.getTime()&&ye.getTime()<=ke.to.getTime())return Oe}return!Oe}function Nt(G){return t.daysContainer!==void 0?G.className.indexOf("hidden")===-1&&G.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(G):!1}function fr(G){var X=G.target===t._input,oe=t._input.value.trimEnd()!==On();X&&oe&&!(G.relatedTarget&&_t(G.relatedTarget))&&t.setDate(t._input.value,!0,G.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Gt(G){var X=kf(G),oe=t.config.wrap?r.contains(X):X===t._input,ye=t.config.allowInput,Oe=t.isOpen&&(!ye||!oe),je=t.config.inline&&oe&&!ye;if(G.keyCode===13&&oe){if(ye)return t.setDate(t._input.value,!0,X===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),X.blur();t.open()}else if(_t(X)||Oe||je){var et=!!t.timeContainer&&t.timeContainer.contains(X);switch(G.keyCode){case 13:et?(G.preventDefault(),u(),zr()):or(G);break;case 27:G.preventDefault(),zr();break;case 8:case 46:oe&&!t.config.allowInput&&(G.preventDefault(),t.clear());break;case 37:case 39:if(!et&&!oe){G.preventDefault();var ke=o();if(t.daysContainer!==void 0&&(ye===!1||ke&&Nt(ke))){var Ue=G.keyCode===39?1:-1;G.ctrlKey?(G.stopPropagation(),se(Ue),qe(ve(1),0)):qe(void 0,Ue)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:G.preventDefault();var ot=G.keyCode===40?1:-1;t.daysContainer&&X.$i!==void 0||X===t.input||X===t.altInput?G.ctrlKey?(G.stopPropagation(),Mt(t.currentYear-ot),qe(ve(1),0)):et||qe(void 0,ot*7):X===t.currentYearElement?Mt(t.currentYear-ot):t.config.enableTime&&(!et&&t.hourElement&&t.hourElement.focus(),u(G),t._debouncedChange());break;case 9:if(et){var Ct=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Kt){return Kt}),jt=Ct.indexOf(X);if(jt!==-1){var Dt=Ct[jt+(G.shiftKey?-1:1)];G.preventDefault(),(Dt||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(X)&&G.shiftKey&&(G.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&X===t.amPM)switch(G.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],x(),$n();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],x(),$n();break}(oe||_t(X))&&Ft("onKeyDown",G)}function Zt(G,X){if(X===void 0&&(X="flatpickr-day"),!(t.selectedDates.length!==1||G&&(!G.classList.contains(X)||G.classList.contains("flatpickr-disabled")))){for(var oe=G?G.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),ye=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Oe=Math.min(oe,t.selectedDates[0].getTime()),je=Math.max(oe,t.selectedDates[0].getTime()),et=!1,ke=0,Ue=0,ot=Oe;ot<je;ot+=kDe.DAY)Ht(new Date(ot),!0)||(et=et||ot>Oe&&ot<je,ot<ye&&(!ke||ot>ke)?ke=ot:ot>ye&&(!Ue||ot<Ue)&&(Ue=ot));var Ct=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+X));Ct.forEach(function(jt){var Dt=jt.dateObj,Kt=Dt.getTime(),Ar=ke>0&&Kt<ke||Ue>0&&Kt>Ue;if(Ar){jt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ur){jt.classList.remove(ur)});return}else if(et&&!Ar)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ur){jt.classList.remove(ur)}),G!==void 0&&(G.classList.add(oe<=t.selectedDates[0].getTime()?"startRange":"endRange"),ye<oe&&Kt===ye?jt.classList.add("startRange"):ye>oe&&Kt===ye&&jt.classList.add("endRange"),Kt>=ke&&(Ue===0||Kt<=Ue)&&SDe(Kt,ye,oe)&&jt.classList.add("inRange"))})}}function vt(){t.isOpen&&!t.config.static&&!t.config.inline&&dr()}function yt(G,X){if(X===void 0&&(X=t._positionElement),t.isMobile===!0){if(G){G.preventDefault();var oe=kf(G);oe&&oe.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ft("onOpen");return}else if(t._input.disabled||t.config.inline)return;var ye=t.isOpen;t.isOpen=!0,ye||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ft("onOpen"),dr(X)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(G===void 0||!t.timeContainer.contains(G.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ye(G){return function(X){var oe=t.config["_"+G+"Date"]=t.parseDate(X,t.config.dateFormat),ye=t.config["_"+(G==="min"?"max":"min")+"Date"];oe!==void 0&&(t[G==="min"?"minDateHasTime":"maxDateHasTime"]=oe.getHours()>0||oe.getMinutes()>0||oe.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Oe){return Ht(Oe)}),!t.selectedDates.length&&G==="min"&&T(oe),$n()),t.daysContainer&&(kt(),oe!==void 0?t.currentYearElement[G]=oe.getFullYear().toString():t.currentYearElement.removeAttribute(G),t.currentYearElement.disabled=!!ye&&oe!==void 0&&ye.getFullYear()===oe.getFullYear())}}function me(){var G=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],X=jc(jc({},JSON.parse(JSON.stringify(r.dataset||{}))),e),oe={};t.config.parseDate=X.parseDate,t.config.formatDate=X.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Ct){t.config._enable=Yt(Ct)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Ct){t.config._disable=Yt(Ct)}});var ye=X.mode==="time";if(!X.dateFormat&&(X.enableTime||ye)){var Oe=jl.defaultConfig.dateFormat||Mb.dateFormat;oe.dateFormat=X.noCalendar||ye?"H:i"+(X.enableSeconds?":S":""):Oe+" H:i"+(X.enableSeconds?":S":"")}if(X.altInput&&(X.enableTime||ye)&&!X.altFormat){var je=jl.defaultConfig.altFormat||Mb.altFormat;oe.altFormat=X.noCalendar||ye?"h:i"+(X.enableSeconds?":S K":" K"):je+(" h:i"+(X.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ye("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ye("max")});var et=function(Ct){return function(jt){t.config[Ct==="min"?"_minTime":"_maxTime"]=t.parseDate(jt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:et("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:et("max")}),X.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,oe,X);for(var ke=0;ke<G.length;ke++)t.config[G[ke]]=t.config[G[ke]]===!0||t.config[G[ke]]==="true";eq.filter(function(Ct){return t.config[Ct]!==void 0}).forEach(function(Ct){t.config[Ct]=nq(t.config[Ct]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ke=0;ke<t.config.plugins.length;ke++){var Ue=t.config.plugins[ke](t)||{};for(var ot in Ue)eq.indexOf(ot)>-1?t.config[ot]=nq(Ue[ot]).map(a).concat(t.config[ot]):typeof X[ot]>"u"&&(t.config[ot]=Ue[ot])}X.altInputClass||(t.config.altInputClass=De().className+" "+t.config.altInputClass),Ft("onParseConfig")}function De(){return t.config.wrap?r.querySelector("[data-input]"):r}function ze(){typeof t.config.locale!="object"&&typeof jl.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=jc(jc({},jl.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?jl.l10ns[t.config.locale]:void 0),Mv.D="("+t.l10n.weekdays.shorthand.join("|")+")",Mv.l="("+t.l10n.weekdays.longhand.join("|")+")",Mv.M="("+t.l10n.months.shorthand.join("|")+")",Mv.F="("+t.l10n.months.longhand.join("|")+")",Mv.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var G=jc(jc({},e),JSON.parse(JSON.stringify(r.dataset||{})));G.time_24hr===void 0&&jl.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=n7(t),t.parseDate=iq({config:t.config,l10n:t.l10n})}function dr(G){if(typeof t.config.position=="function")return void t.config.position(t,G);if(t.calendarContainer!==void 0){Ft("onPreCalendarPosition");var X=G||t._positionElement,oe=Array.prototype.reduce.call(t.calendarContainer.children,(function(er,Fr){return er+Fr.offsetHeight}),0),ye=t.calendarContainer.offsetWidth,Oe=t.config.position.split(" "),je=Oe[0],et=Oe.length>1?Oe[1]:null,ke=X.getBoundingClientRect(),Ue=window.innerHeight-ke.bottom,ot=je==="above"||je!=="below"&&Ue<oe&&ke.top>oe,Ct=window.pageYOffset+ke.top+(ot?-oe-2:X.offsetHeight+2);if(Uc(t.calendarContainer,"arrowTop",!ot),Uc(t.calendarContainer,"arrowBottom",ot),!t.config.inline){var jt=window.pageXOffset+ke.left,Dt=!1,Kt=!1;et==="center"?(jt-=(ye-ke.width)/2,Dt=!0):et==="right"&&(jt-=ye-ke.width,Kt=!0),Uc(t.calendarContainer,"arrowLeft",!Dt&&!Kt),Uc(t.calendarContainer,"arrowCenter",Dt),Uc(t.calendarContainer,"arrowRight",Kt);var Ar=window.document.body.offsetWidth-(window.pageXOffset+ke.right),ur=jt+ye>window.document.body.offsetWidth,It=Ar+ye>window.document.body.offsetWidth;if(Uc(t.calendarContainer,"rightMost",ur),!t.config.static)if(t.calendarContainer.style.top=Ct+"px",!ur)t.calendarContainer.style.left=jt+"px",t.calendarContainer.style.right="auto";else if(!It)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Ar+"px";else{var _r=lt();if(_r===void 0)return;var lr=window.document.body.offsetWidth,hr=Math.max(0,lr/2-ye/2),Tn=".flatpickr-calendar.centerMost:before",Tr=".flatpickr-calendar.centerMost:after",Ve=_r.cssRules.length,ar="{left:"+ke.left+"px;right:auto;}";Uc(t.calendarContainer,"rightMost",!1),Uc(t.calendarContainer,"centerMost",!0),_r.insertRule(Tn+","+Tr+ar,Ve),t.calendarContainer.style.left=hr+"px",t.calendarContainer.style.right="auto"}}}}function lt(){for(var G=null,X=0;X<document.styleSheets.length;X++){var oe=document.styleSheets[X];if(oe.cssRules){try{oe.cssRules}catch{continue}G=oe;break}}return G??Ut()}function Ut(){var G=document.createElement("style");return document.head.appendChild(G),G.sheet}function kt(){t.config.noCalendar||t.isMobile||(j(),Dn(),U())}function zr(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function or(G){G.preventDefault(),G.stopPropagation();var X=function(Ct){return Ct.classList&&Ct.classList.contains("flatpickr-day")&&!Ct.classList.contains("flatpickr-disabled")&&!Ct.classList.contains("notAllowed")},oe=t7(kf(G),X);if(oe!==void 0){var ye=oe,Oe=t.latestSelectedDateObj=new Date(ye.dateObj.getTime()),je=(Oe.getMonth()<t.currentMonth||Oe.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=ye,t.config.mode==="single")t.selectedDates=[Oe];else if(t.config.mode==="multiple"){var et=xr(Oe);et?t.selectedDates.splice(parseInt(et),1):t.selectedDates.push(Oe)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Oe,t.selectedDates.push(Oe),Ef(Oe,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Ct,jt){return Ct.getTime()-jt.getTime()}));if(x(),je){var ke=t.currentYear!==Oe.getFullYear();t.currentYear=Oe.getFullYear(),t.currentMonth=Oe.getMonth(),ke&&(Ft("onYearChange"),j()),Ft("onMonthChange")}if(Dn(),U(),$n(),!je&&t.config.mode!=="range"&&t.config.showMonths===1?re(ye):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ue=t.config.mode==="single"&&!t.config.enableTime,ot=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ue||ot)&&zr()}R()}}var kr={locale:[ze,Me],showMonths:[Ie,l,ce],minDate:[$],maxDate:[$],positionElement:[vi],clickOpens:[function(){t.config.clickOpens===!0?(L(t._input,"focus",t.open),L(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Sr(G,X){if(G!==null&&typeof G=="object"){Object.assign(t.config,G);for(var oe in G)kr[oe]!==void 0&&kr[oe].forEach(function(ye){return ye()})}else t.config[G]=X,kr[G]!==void 0?kr[G].forEach(function(ye){return ye()}):eq.indexOf(G)>-1&&(t.config[G]=nq(X));t.redraw(),$n(!0)}function at(G,X){var oe=[];if(G instanceof Array)oe=G.map(function(ye){return t.parseDate(ye,X)});else if(G instanceof Date||typeof G=="number")oe=[t.parseDate(G,X)];else if(typeof G=="string")switch(t.config.mode){case"single":case"time":oe=[t.parseDate(G,X)];break;case"multiple":oe=G.split(t.config.conjunction).map(function(ye){return t.parseDate(ye,X)});break;case"range":oe=G.split(t.l10n.rangeSeparator).map(function(ye){return t.parseDate(ye,X)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(G)));t.selectedDates=t.config.allowInvalidPreload?oe:oe.filter(function(ye){return ye instanceof Date&&Ht(ye,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(ye,Oe){return ye.getTime()-Oe.getTime()})}function rt(G,X,oe){if(X===void 0&&(X=!1),oe===void 0&&(oe=t.config.dateFormat),G!==0&&!G||G instanceof Array&&G.length===0)return t.clear(X);at(G,oe),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,X),T(),t.selectedDates.length===0&&t.clear(!1),$n(X),X&&Ft("onChange")}function Yt(G){return G.slice().map(function(X){return typeof X=="string"||typeof X=="number"||X instanceof Date?t.parseDate(X,void 0,!0):X&&typeof X=="object"&&X.from&&X.to?{from:t.parseDate(X.from,void 0),to:t.parseDate(X.to,void 0)}:X}).filter(function(X){return X})}function Yr(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var G=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);G&&at(G,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function hi(){if(t.input=De(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Jo(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),vi()}function vi(){t._positionElement=t.config.positionElement||t._input}function Fi(){var G=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Jo("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=G,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=G==="datetime-local"?"Y-m-d\\TH:i:S":G==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}L(t.mobileInput,"change",function(X){t.setDate(kf(X).value,!1,t.mobileFormatStr),Ft("onChange"),Ft("onClose")})}function Wt(G){if(t.isOpen===!0)return t.close();t.open(G)}function Ft(G,X){if(t.config!==void 0){var oe=t.config[G];if(oe!==void 0&&oe.length>0)for(var ye=0;oe[ye]&&ye<oe.length;ye++)oe[ye](t.selectedDates,t.input.value,t,X);G==="onChange"&&(t.input.dispatchEvent(Pr("change")),t.input.dispatchEvent(Pr("input")))}}function Pr(G){var X=document.createEvent("Event");return X.initEvent(G,!0,!0),X}function xr(G){for(var X=0;X<t.selectedDates.length;X++){var oe=t.selectedDates[X];if(oe instanceof Date&&Ef(oe,G)===0)return""+X}return!1}function wn(G){return t.config.mode!=="range"||t.selectedDates.length<2?!1:Ef(G,t.selectedDates[0])>=0&&Ef(G,t.selectedDates[1])<=0}function Dn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(G,X){var oe=new Date(t.currentYear,t.currentMonth,1);oe.setMonth(t.currentMonth+X),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[X].textContent=lC(oe.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=oe.getMonth().toString(),G.value=oe.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function On(G){var X=G||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(oe){return t.formatDate(oe,X)}).filter(function(oe,ye,Oe){return t.config.mode!=="range"||t.config.enableTime||Oe.indexOf(oe)===ye}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function $n(G){G===void 0&&(G=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=On(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=On(t.config.altFormat)),G!==!1&&Ft("onValueUpdate")}function co(G){var X=kf(G),oe=t.prevMonthNav.contains(X),ye=t.nextMonthNav.contains(X);oe||ye?se(oe?-1:1):t.yearElements.indexOf(X)>=0?X.select():X.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):X.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Yn(G){G.preventDefault();var X=G.type==="keydown",oe=kf(G),ye=oe;t.amPM!==void 0&&oe===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]);var Oe=parseFloat(ye.getAttribute("min")),je=parseFloat(ye.getAttribute("max")),et=parseFloat(ye.getAttribute("step")),ke=parseInt(ye.value,10),Ue=G.delta||(X?G.which===38?1:-1:0),ot=ke+et*Ue;if(typeof ye.value<"u"&&ye.value.length===2){var Ct=ye===t.hourElement,jt=ye===t.minuteElement;ot<Oe?(ot=je+ot+Tf(!Ct)+(Tf(Ct)&&Tf(!t.amPM)),jt&&K(void 0,-1,t.hourElement)):ot>je&&(ot=ye===t.hourElement?ot-je-Tf(!t.amPM):Oe,jt&&K(void 0,1,t.hourElement)),t.amPM&&Ct&&(et===1?ot+ke===23:Math.abs(ot-ke)>et)&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]),ye.value=zc(ot)}}return i(),t}function fS(r,e){for(var t=Array.prototype.slice.call(r).filter(function(a){return a instanceof HTMLElement}),n=[],i=0;i<t.length;i++){var o=t[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=tNt(o,e||{}),n.push(o._flatpickr)}catch(a){console.error(a)}}return n.length===1?n[0]:n}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(r){return fS(this,r)},HTMLElement.prototype.flatpickr=function(r){return fS([this],r)});var jl=function(r,e){return typeof r=="string"?fS(window.document.querySelectorAll(r),e):r instanceof Node?fS([r],e):fS(r,e)};jl.defaultConfig={};jl.l10ns={en:jc({},rq),default:jc({},rq)};jl.localize=function(r){jl.l10ns.default=jc(jc({},jl.l10ns.default),r)};jl.setDefaults=function(r){jl.defaultConfig=jc(jc({},jl.defaultConfig),r)};jl.parseDate=iq({});jl.formatDate=n7({});jl.compareDates=Ef;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(r){return fS(this,r)});Date.prototype.fp_incr=function(r){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof r=="string"?parseInt(r,10):r))};typeof window<"u"&&(window.flatpickr=jl);var dS=jl;function rNt(r,e,t){let n=mm(t.element);n&&n.appendChild(t.calendarContainer)}function nNt(r,e,t){mm(t.element)&&requestAnimationFrame(()=>{let{calendarContainer:n}=t;n.style.top&&n.style.top!=="auto"&&(n.style.top=`${parseFloat(n.style.top)-window.pageYOffset}px`),n.style.left&&n.style.left!=="auto"&&(n.style.left=`${parseFloat(n.style.left)-window.pageXOffset}px`)})}dS.setDefaults({onReady:[rNt],onOpen:[nNt]});var Pv=class extends Error{},d7=class extends Pv{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},p7=class extends Pv{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},m7=class extends Pv{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Rb=class extends Pv{},pq=class extends Pv{constructor(e){super(`Invalid unit ${e}`)}},Mu=class extends Pv{},xg=class extends Pv{constructor(){super("Zone is an abstract class")}},bn="numeric",ym="short",fd="long",mq={year:bn,month:bn,day:bn},nIe={year:bn,month:ym,day:bn},iNt={year:bn,month:ym,day:bn,weekday:ym},iIe={year:bn,month:fd,day:bn},oIe={year:bn,month:fd,day:bn,weekday:fd},aIe={hour:bn,minute:bn},sIe={hour:bn,minute:bn,second:bn},lIe={hour:bn,minute:bn,second:bn,timeZoneName:ym},uIe={hour:bn,minute:bn,second:bn,timeZoneName:fd},cIe={hour:bn,minute:bn,hourCycle:"h23"},hIe={hour:bn,minute:bn,second:bn,hourCycle:"h23"},fIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:ym},dIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:fd},pIe={year:bn,month:bn,day:bn,hour:bn,minute:bn},mIe={year:bn,month:bn,day:bn,hour:bn,minute:bn,second:bn},gIe={year:bn,month:ym,day:bn,hour:bn,minute:bn},vIe={year:bn,month:ym,day:bn,hour:bn,minute:bn,second:bn},oNt={year:bn,month:ym,day:bn,weekday:ym,hour:bn,minute:bn},yIe={year:bn,month:fd,day:bn,hour:bn,minute:bn,timeZoneName:ym},bIe={year:bn,month:fd,day:bn,hour:bn,minute:bn,second:bn,timeZoneName:ym},xIe={year:bn,month:fd,day:bn,weekday:fd,hour:bn,minute:bn,timeZoneName:fd},_Ie={year:bn,month:fd,day:bn,weekday:fd,hour:bn,minute:bn,second:bn,timeZoneName:fd},Jx=class{get type(){throw new xg}get name(){throw new xg}get ianaName(){return this.name}get isUniversal(){throw new xg}offsetName(e,t){throw new xg}formatOffset(e,t){throw new xg}offset(e){throw new xg}equals(e){throw new xg}get isValid(){throw new xg}},i7=null,gq=class r extends Jx{static get instance(){return i7===null&&(i7=new r),i7}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return MIe(e,t,n)}formatOffset(e,t){return dC(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},g7=new Map;function aNt(r){let e=g7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),g7.set(r,e)),e}var sNt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function lNt(r,e){let t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,o,a,l,u,f,p]=n;return[a,i,o,l,u,f,p]}function uNt(r,e){let t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){let{type:o,value:a}=t[i],l=sNt[o];o==="era"?n[l]=a:Ti(l)||(n[l]=parseInt(a,10))}return n}var o7=new Map,Fb=class r extends Jx{static create(e){let t=o7.get(e);return t===void 0&&o7.set(e,t=new r(e)),t}static resetCache(){o7.clear(),g7.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{return!1}}constructor(e){super(),this.zoneName=e,this.valid=r.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return MIe(e,t,n,this.name)}formatOffset(e,t){return dC(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=aNt(this.name),[i,o,a,l,u,f,p]=n.formatToParts?uNt(n,t):lNt(n,t);l==="BC"&&(i=-Math.abs(i)+1);let T=wq({year:i,month:o,day:a,hour:u===24?0:u,minute:f,second:p,millisecond:0}),C=+t,M=C%1e3;return C-=M>=0?M:1e3+M,(T-C)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},ADe={};function cNt(r,e={}){let t=JSON.stringify([r,e]),n=ADe[t];return n||(n=new Intl.ListFormat(r,e),ADe[t]=n),n}var v7=new Map;function y7(r,e={}){let t=JSON.stringify([r,e]),n=v7.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),v7.set(t,n)),n}var b7=new Map;function hNt(r,e={}){let t=JSON.stringify([r,e]),n=b7.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),b7.set(t,n)),n}var x7=new Map;function fNt(r,e={}){let{base:t,...n}=e,i=JSON.stringify([r,n]),o=x7.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(r,e),x7.set(i,o)),o}var cC=null;function dNt(){return cC||(cC=new Intl.DateTimeFormat().resolvedOptions().locale,cC)}var _7=new Map;function wIe(r){let e=_7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),_7.set(r,e)),e}var w7=new Map;function pNt(r){let e=w7.get(r);if(!e){let t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...SIe,...e}),w7.set(r,e)}return e}function mNt(r){let e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));let t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=y7(r).resolvedOptions(),i=r}catch{let u=r.substring(0,t);n=y7(u).resolvedOptions(),i=u}let{numberingSystem:o,calendar:a}=n;return[i,o,a]}}function gNt(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function vNt(r){let e=[];for(let t=1;t<=12;t++){let n=wa.utc(2009,t,1);e.push(r(n))}return e}function yNt(r){let e=[];for(let t=1;t<=7;t++){let n=wa.utc(2016,11,13+t);e.push(r(n))}return e}function sq(r,e,t,n){let i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function bNt(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||wIe(r.locale).numberingSystem==="latn"}var S7=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...a}=n;if(!t||Object.keys(a).length>0){let l={useGrouping:!1,...n};n.padTo>0&&(l.minimumIntegerDigits=n.padTo),this.inf=hNt(e,l)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):R7(e,3);return Vl(t,this.padTo)}}},T7=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let a=-1*(e.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Fb.create(l).valid?(i=l,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=y7(t,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},k7=class{constructor(e,t,n){this.opts={style:"long",...n},!t&&IIe()&&(this.rtf=fNt(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):zNt(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},SIe={firstDay:1,minimalDays:4,weekend:[6,7]},Na=class r{static fromOpts(e){return r.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,o=!1){let a=e||Ts.defaultLocale,l=a||(o?"en-US":dNt()),u=t||Ts.defaultNumberingSystem,f=n||Ts.defaultOutputCalendar,p=C7(i)||Ts.defaultWeekSettings;return new r(l,u,f,p,a)}static resetCache(){cC=null,v7.clear(),b7.clear(),x7.clear(),_7.clear(),w7.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return r.create(e,t,n,i)}constructor(e,t,n,i,o){let[a,l,u]=mNt(e);this.locale=a,this.numberingSystem=t||l||null,this.outputCalendar=n||u||null,this.weekSettings=i,this.intl=gNt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=bNt(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:r.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,C7(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return sq(this,e,RIe,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");t&=!n;let i=t?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){let a=n?l=>this.dtFormatter(l,i).format():l=>this.extract(l,i,"month");this.monthsCache[o][e]=vNt(a)}return this.monthsCache[o][e]})}weekdays(e,t=!1){return sq(this,e,NIe,()=>{let 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]=yNt(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return sq(this,void 0,()=>BIe,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[wa.utc(2016,11,13,9),wa.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return sq(this,e,zIe,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[wa.utc(-40,1,1),wa.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){let i=this.dtFormatter(e,t),o=i.formatToParts(),a=o.find(l=>l.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new S7(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new T7(e,this.intl,t)}relFormatter(e={}){return new k7(this.intl,this.isEnglish(),e)}listFormatter(e={}){return cNt(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||wIe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:OIe()?pNt(this.locale):SIe}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})`}},a7=null,fp=class r extends Jx{static get utcInstance(){return a7===null&&(a7=new r(0)),a7}static instance(e){return e===0?r.utcInstance:new r(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(Sq(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${dC(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${dC(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return dC(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},E7=class extends Jx{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 Pb(r,e){if(Ti(r)||r===null)return e;if(r instanceof Jx)return r;if(kNt(r)){let t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?gq.instance:t==="utc"||t==="gmt"?fp.utcInstance:fp.parseSpecifier(t)||Fb.create(r)}else return qb(r)?fp.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new E7(r)}var O7={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},CDe={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]},xNt=O7.hanidec.replace(/[\[|\]]/g,"").split("");function _Nt(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if(r[t].search(O7.hanidec)!==-1)e+=xNt.indexOf(r[t]);else for(let i in CDe){let[o,a]=CDe[i];n>=o&&n<=a&&(e+=n-o)}}return parseInt(e,10)}else return e}var A7=new Map;function wNt(){A7.clear()}function gm({numberingSystem:r},e=""){let t=r||"latn",n=A7.get(t);n===void 0&&(n=new Map,A7.set(t,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${O7[t]}${e}`),n.set(e,i)),i}var DDe=()=>Date.now(),IDe="system",ODe=null,MDe=null,LDe=null,PDe=60,RDe,qDe=null,Ts=class{static get now(){return DDe}static set now(e){DDe=e}static set defaultZone(e){IDe=e}static get defaultZone(){return Pb(IDe,gq.instance)}static get defaultLocale(){return ODe}static set defaultLocale(e){ODe=e}static get defaultNumberingSystem(){return MDe}static set defaultNumberingSystem(e){MDe=e}static get defaultOutputCalendar(){return LDe}static set defaultOutputCalendar(e){LDe=e}static get defaultWeekSettings(){return qDe}static set defaultWeekSettings(e){qDe=C7(e)}static get twoDigitCutoffYear(){return PDe}static set twoDigitCutoffYear(e){PDe=e%100}static get throwOnInvalid(){return RDe}static set throwOnInvalid(e){RDe=e}static resetCaches(){Na.resetCache(),Fb.resetCache(),wa.resetCache(),wNt()}},hd=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},TIe=[0,31,59,90,120,151,181,212,243,273,304,334],kIe=[0,31,60,91,121,152,182,213,244,274,305,335];function cp(r,e){return new hd("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function M7(r,e,t){let n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function EIe(r,e,t){return t+(mC(r)?kIe:TIe)[e-1]}function AIe(r,e){let t=mC(r)?kIe:TIe,n=t.findIndex(o=>o<e),i=e-t[n];return{month:n+1,day:i}}function L7(r,e){return(r-e+7)%7+1}function vq(r,e=4,t=1){let{year:n,month:i,day:o}=r,a=EIe(n,i,o),l=L7(M7(n,i,o),t),u=Math.floor((a-l+14-e)/7),f;return u<1?(f=n-1,u=pC(f,e,t)):u>pC(n,e,t)?(f=n+1,u=1):f=n,{weekYear:f,weekNumber:u,weekday:l,...Tq(r)}}function FDe(r,e=4,t=1){let{weekYear:n,weekNumber:i,weekday:o}=r,a=L7(M7(n,1,e),t),l=yS(n),u=i*7+o-a-7+e,f;u<1?(f=n-1,u+=yS(f)):u>l?(f=n+1,u-=yS(n)):f=n;let{month:p,day:x}=AIe(f,u);return{year:f,month:p,day:x,...Tq(r)}}function s7(r){let{year:e,month:t,day:n}=r,i=EIe(e,t,n);return{year:e,ordinal:i,...Tq(r)}}function NDe(r){let{year:e,ordinal:t}=r,{month:n,day:i}=AIe(e,t);return{year:e,month:n,day:i,...Tq(r)}}function BDe(r,e){if(!Ti(r.localWeekday)||!Ti(r.localWeekNumber)||!Ti(r.localWeekYear)){if(!Ti(r.weekday)||!Ti(r.weekNumber)||!Ti(r.weekYear))throw new Rb("Cannot mix locale-based week fields with ISO-based week fields");return Ti(r.localWeekday)||(r.weekday=r.localWeekday),Ti(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),Ti(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function SNt(r,e=4,t=1){let n=_q(r.weekYear),i=hp(r.weekNumber,1,pC(r.weekYear,e,t)),o=hp(r.weekday,1,7);return n?i?o?!1:cp("weekday",r.weekday):cp("week",r.weekNumber):cp("weekYear",r.weekYear)}function TNt(r){let e=_q(r.year),t=hp(r.ordinal,1,yS(r.year));return e?t?!1:cp("ordinal",r.ordinal):cp("year",r.year)}function CIe(r){let e=_q(r.year),t=hp(r.month,1,12),n=hp(r.day,1,yq(r.year,r.month));return e?t?n?!1:cp("day",r.day):cp("month",r.month):cp("year",r.year)}function DIe(r){let{hour:e,minute:t,second:n,millisecond:i}=r,o=hp(e,0,23)||e===24&&t===0&&n===0&&i===0,a=hp(t,0,59),l=hp(n,0,59),u=hp(i,0,999);return o?a?l?u?!1:cp("millisecond",i):cp("second",n):cp("minute",t):cp("hour",e)}function Ti(r){return typeof r>"u"}function qb(r){return typeof r=="number"}function _q(r){return typeof r=="number"&&r%1===0}function kNt(r){return typeof r=="string"}function ENt(r){return Object.prototype.toString.call(r)==="[object Date]"}function IIe(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function OIe(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ANt(r){return Array.isArray(r)?r:[r]}function zDe(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{let o=[e(i),i];return n&&t(n[0],o[0])===n[0]?n:o},null)[1]}function CNt(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function _S(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function C7(r){if(r==null)return null;if(typeof r!="object")throw new Mu("Week settings must be an object");if(!hp(r.firstDay,1,7)||!hp(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!hp(e,1,7)))throw new Mu("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function hp(r,e,t){return _q(r)&&r>=e&&r<=t}function DNt(r,e){return r-e*Math.floor(r/e)}function Vl(r,e=2){let t=r<0,n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function Lb(r){if(!(Ti(r)||r===null||r===""))return parseInt(r,10)}function Yx(r){if(!(Ti(r)||r===null||r===""))return parseFloat(r)}function P7(r){if(!(Ti(r)||r===null||r==="")){let e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function R7(r,e,t="round"){let n=10**e;switch(t){case"expand":return r>0?Math.ceil(r*n)/n:Math.floor(r*n)/n;case"trunc":return Math.trunc(r*n)/n;case"round":return Math.round(r*n)/n;case"floor":return Math.floor(r*n)/n;case"ceil":return Math.ceil(r*n)/n;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function mC(r){return r%4===0&&(r%100!==0||r%400===0)}function yS(r){return mC(r)?366:365}function yq(r,e){let t=DNt(e-1,12)+1,n=r+(e-t)/12;return t===2?mC(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function wq(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function UDe(r,e,t){return-L7(M7(r,1,e),t)+e-1}function pC(r,e=4,t=1){let n=UDe(r,e,t),i=UDe(r+1,e,t);return(yS(r)-n+i)/7}function D7(r){return r>99?r:r>Ts.twoDigitCutoffYear?1900+r:2e3+r}function MIe(r,e,t,n=null){let i=new Date(r),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let a={timeZoneName:e,...o},l=new Intl.DateTimeFormat(t,a).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function Sq(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);let n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function LIe(r){let e=Number(r);if(typeof r=="boolean"||r===""||!Number.isFinite(e))throw new Mu(`Invalid unit value ${r}`);return e}function bq(r,e){let t={};for(let n in r)if(_S(r,n)){let i=r[n];if(i==null)continue;t[e(n)]=LIe(i)}return t}function dC(r,e){let t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${Vl(t,2)}:${Vl(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${Vl(t,2)}${Vl(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Tq(r){return CNt(r,["hour","minute","second","millisecond"])}var INt=["January","February","March","April","May","June","July","August","September","October","November","December"],PIe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ONt=["J","F","M","A","M","J","J","A","S","O","N","D"];function RIe(r){switch(r){case"narrow":return[...ONt];case"short":return[...PIe];case"long":return[...INt];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}}var qIe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],FIe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],MNt=["M","T","W","T","F","S","S"];function NIe(r){switch(r){case"narrow":return[...MNt];case"short":return[...FIe];case"long":return[...qIe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var BIe=["AM","PM"],LNt=["Before Christ","Anno Domini"],PNt=["BC","AD"],RNt=["B","A"];function zIe(r){switch(r){case"narrow":return[...RNt];case"short":return[...PNt];case"long":return[...LNt];default:return null}}function qNt(r){return BIe[r.hour<12?0:1]}function FNt(r,e){return NIe(e)[r.weekday-1]}function NNt(r,e){return RIe(e)[r.month-1]}function BNt(r,e){return zIe(e)[r.year<0?0:1]}function zNt(r,e,t="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&o){let x=r==="days";switch(e){case 1:return x?"tomorrow":`next ${i[r][0]}`;case-1:return x?"yesterday":`last ${i[r][0]}`;case 0:return x?"today":`this ${i[r][0]}`}}let a=Object.is(e,-0)||e<0,l=Math.abs(e),u=l===1,f=i[r],p=n?u?f[1]:f[2]||f[1]:u?i[r][0]:r;return a?`${l} ${p} ago`:`in ${l} ${p}`}function jDe(r,e){let t="";for(let n of r)n.literal?t+=n.val:t+=e(n.val);return t}var UNt={D:mq,DD:nIe,DDD:iIe,DDDD:oIe,t:aIe,tt:sIe,ttt:lIe,tttt:uIe,T:cIe,TT:hIe,TTT:fIe,TTTT:dIe,f:pIe,ff:gIe,fff:yIe,ffff:xIe,F:mIe,FF:vIe,FFF:bIe,FFFF:_Ie},cd=class r{static create(e,t={}){return new r(e,t)}static parseFormat(e){let t=null,n="",i=!1,o=[];for(let a=0;a<e.length;a++){let l=e.charAt(a);l==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),t=null,n="",i=!i):i||l===t?n+=l:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=l,t=l)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return UNt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),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 Vl(e,t);let i={...this.opts};return t>0&&(i.padTo=t),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(C,M)=>this.loc.extract(e,C,M),a=C=>e.isOffsetFixed&&e.offset===0&&C.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,C.format):"",l=()=>n?qNt(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(C,M)=>n?NNt(e,C):o(M?{month:C}:{month:C,day:"numeric"},"month"),f=(C,M)=>n?FNt(e,C):o(M?{weekday:C}:{weekday:C,month:"long",day:"numeric"},"weekday"),p=C=>{let M=r.macroTokenToFormatOpts(C);return M?this.formatWithSystemDefault(e,M):C},x=C=>n?BNt(e,C):o({era:C},"era"),T=C=>{switch(C){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 a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({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 l();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return x("short");case"GG":return x("long");case"GGGGG":return x("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 p(C)}};return jDe(r.parseFormat(t),T)}formatDurationFromString(e,t){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=p=>{switch(p[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}},o=(p,x)=>T=>{let C=i(T);if(C){let M=x.isNegativeDuration&&C!==x.largestUnit?n:1,L;return this.opts.signMode==="negativeLargestOnly"&&C!==x.largestUnit?L="never":this.opts.signMode==="all"?L="always":L="auto",this.num(p.get(C)*M,T.length,L)}else return T},a=r.parseFormat(t),l=a.reduce((p,{literal:x,val:T})=>x?p:p.concat(T),[]),u=e.shiftTo(...l.map(i).filter(p=>p)),f={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return jDe(a,o(u,f))}},UIe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function wS(...r){let e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function SS(...r){return e=>r.reduce(([t,n,i],o)=>{let[a,l,u]=o(e,i);return[{...t,...a},l||n,u]},[{},null,1]).slice(0,2)}function TS(r,...e){if(r==null)return[null,null];for(let[t,n]of e){let i=t.exec(r);if(i)return n(i)}return[null,null]}function jIe(...r){return(e,t)=>{let n={},i;for(i=0;i<r.length;i++)n[r[i]]=Lb(e[t+i]);return[n,null,t+i]}}var VIe=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,jNt=`(?:${VIe.source}?(?:\\[(${UIe.source})\\])?)?`,q7=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,HIe=RegExp(`${q7.source}${jNt}`),F7=RegExp(`(?:[Tt]${HIe.source})?`),VNt=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,HNt=/(\d{4})-?W(\d\d)(?:-?(\d))?/,WNt=/(\d{4})-?(\d{3})/,$Nt=jIe("weekYear","weekNumber","weekDay"),KNt=jIe("year","ordinal"),GNt=/(\d{4})-(\d\d)-(\d\d)/,WIe=RegExp(`${q7.source} ?(?:${VIe.source}|(${UIe.source}))?`),YNt=RegExp(`(?: ${WIe.source})?`);function bS(r,e,t){let n=r[e];return Ti(n)?t:Lb(n)}function XNt(r,e){return[{year:bS(r,e),month:bS(r,e+1,1),day:bS(r,e+2,1)},null,e+3]}function kS(r,e){return[{hours:bS(r,e,0),minutes:bS(r,e+1,0),seconds:bS(r,e+2,0),milliseconds:P7(r[e+3])},null,e+4]}function gC(r,e){let t=!r[e]&&!r[e+1],n=Sq(r[e+1],r[e+2]),i=t?null:fp.instance(n);return[{},i,e+3]}function vC(r,e){let t=r[e]?Fb.create(r[e]):null;return[{},t,e+1]}var ZNt=RegExp(`^T?${q7.source}$`),JNt=/^-?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 QNt(r){let[e,t,n,i,o,a,l,u,f]=r,p=e[0]==="-",x=u&&u[0]==="-",T=(C,M=!1)=>C!==void 0&&(M||C&&p)?-C:C;return[{years:T(Yx(t)),months:T(Yx(n)),weeks:T(Yx(i)),days:T(Yx(o)),hours:T(Yx(a)),minutes:T(Yx(l)),seconds:T(Yx(u),u==="-0"),milliseconds:T(P7(f),x)}]}var eBt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function N7(r,e,t,n,i,o,a){let l={year:e.length===2?D7(Lb(e)):Lb(e),month:PIe.indexOf(t)+1,day:Lb(n),hour:Lb(i),minute:Lb(o)};return a&&(l.second=Lb(a)),r&&(l.weekday=r.length>3?qIe.indexOf(r)+1:FIe.indexOf(r)+1),l}var tBt=/^(?:(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 rBt(r){let[,e,t,n,i,o,a,l,u,f,p,x]=r,T=N7(e,i,n,t,o,a,l),C;return u?C=eBt[u]:f?C=0:C=Sq(p,x),[T,new fp(C)]}function nBt(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var iBt=/^(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$/,oBt=/^(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$/,aBt=/^(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 VDe(r){let[,e,t,n,i,o,a,l]=r;return[N7(e,i,n,t,o,a,l),fp.utcInstance]}function sBt(r){let[,e,t,n,i,o,a,l]=r;return[N7(e,l,t,n,i,o,a),fp.utcInstance]}var lBt=wS(VNt,F7),uBt=wS(HNt,F7),cBt=wS(WNt,F7),hBt=wS(HIe),$Ie=SS(XNt,kS,gC,vC),fBt=SS($Nt,kS,gC,vC),dBt=SS(KNt,kS,gC,vC),pBt=SS(kS,gC,vC);function mBt(r){return TS(r,[lBt,$Ie],[uBt,fBt],[cBt,dBt],[hBt,pBt])}function gBt(r){return TS(nBt(r),[tBt,rBt])}function vBt(r){return TS(r,[iBt,VDe],[oBt,VDe],[aBt,sBt])}function yBt(r){return TS(r,[JNt,QNt])}var bBt=SS(kS);function xBt(r){return TS(r,[ZNt,bBt])}var _Bt=wS(GNt,YNt),wBt=wS(WIe),SBt=SS(kS,gC,vC);function TBt(r){return TS(r,[_Bt,$Ie],[wBt,SBt])}var HDe="Invalid Duration",KIe={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},kBt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...KIe},up=146097/400,pS=146097/4800,EBt={years:{quarters:4,months:12,weeks:up/7,days:up,hours:up*24,minutes:up*24*60,seconds:up*24*60*60,milliseconds:up*24*60*60*1e3},quarters:{months:3,weeks:up/28,days:up/4,hours:up*24/4,minutes:up*24*60/4,seconds:up*24*60*60/4,milliseconds:up*24*60*60*1e3/4},months:{weeks:pS/7,days:pS,hours:pS*24,minutes:pS*24*60,seconds:pS*24*60*60,milliseconds:pS*24*60*60*1e3},...KIe},Zx=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ABt=Zx.slice(0).reverse();function Lv(r,e,t=!1){let n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new Lu(n)}function GIe(r,e){let t=e.milliseconds??0;for(let n of ABt.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function WDe(r,e){let t=GIe(r,e)<0?-1:1;Zx.reduceRight((n,i)=>{if(Ti(e[i]))return n;if(n){let o=e[n]*t,a=r[i][n],l=Math.floor(o/a);e[i]+=l*t,e[n]-=l*a*t}return i},null),Zx.reduce((n,i)=>{if(Ti(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*r[n][i]}return i},null)}function $De(r){let e={};for(let[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}var Lu=class r{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,n=t?EBt:kBt;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Na.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return r.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Mu(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new r({values:bq(e,r.normalizeUnit),loc:Na.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(qb(e))return r.fromMillis(e);if(r.isDuration(e))return e;if(typeof e=="object")return r.fromObject(e);throw new Mu(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[n]=yBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[n]=xBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Mu("need to specify a reason the Duration is invalid");let n=e instanceof hd?e:new hd(e,t);if(Ts.throwOnInvalid)throw new m7(n);return new r({invalid:n})}static normalizeUnit(e){let 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()];if(!t)throw new pq(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={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?cd.create(this.loc,n).formatDurationFromString(this,e):HDe}toHuman(e={}){if(!this.isValid)return HDe;let t=e.showZeros!==!1,n=Zx.map(i=>{let o=this.values[i];return Ti(o)||o===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);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 this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=R7(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},wa.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?GIe(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e),n={};for(let i of Zx)(_S(t.values,i)||_S(this.values,i))&&(n[i]=t.get(i)+this.get(i));return Lv(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=LIe(e(this.values[n],n));return Lv(this,{values:t},!0)}get(e){return this[r.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...bq(e,r.normalizeUnit)};return Lv(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){let a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return Lv(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return WDe(this.matrix,e),Lv(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=$De(this.normalize().shiftToAll().toObject());return Lv(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>r.normalizeUnit(a));let t={},n={},i=this.toObject(),o;for(let a of Zx)if(e.indexOf(a)>=0){o=a;let l=0;for(let f in n)l+=this.matrix[f][a]*n[f],n[f]=0;qb(i[a])&&(l+=i[a]);let u=Math.trunc(l);t[a]=u,n[a]=(l*1e3-u*1e3)/1e3}else qb(i[a])&&(n[a]=i[a]);for(let a in n)n[a]!==0&&(t[o]+=a===o?n[a]:n[a]/this.matrix[o][a]);return WDe(this.matrix,t),Lv(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;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Lv(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=$De(this.values);return Lv(this,{values:e},!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 this.invalid===null}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||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of Zx)if(!t(this.values[n],e.values[n]))return!1;return!0}},mS="Invalid Interval";function CBt(r,e){return!r||!r.isValid?xS.invalid("missing or invalid start"):!e||!e.isValid?xS.invalid("missing or invalid end"):e<r?xS.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}var xS=class r{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 Mu("need to specify a reason the Interval is invalid");let n=e instanceof hd?e:new hd(e,t);if(Ts.throwOnInvalid)throw new p7(n);return new r({invalid:n})}static fromDateTimes(e,t){let n=uC(e),i=uC(t),o=CBt(n,i);return o??new r({start:n,end:i})}static after(e,t){let n=Lu.fromDurationLike(t),i=uC(e);return r.fromDateTimes(i,i.plus(n))}static before(e,t){let n=Lu.fromDurationLike(t),i=uC(e);return r.fromDateTimes(i.minus(n),i)}static fromISO(e,t){let[n,i]=(e||"").split("/",2);if(n&&i){let o,a;try{o=wa.fromISO(n,t),a=o.isValid}catch{a=!1}let l,u;try{l=wa.fromISO(i,t),u=l.isValid}catch{u=!1}if(a&&u)return r.fromDateTimes(o,l);if(a){let f=Lu.fromISO(i,t);if(f.isValid)return r.after(o,f)}else if(u){let f=Lu.fromISO(n,t);if(f.isValid)return r.before(l,f)}}return r.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 this.invalidReason===null}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;let n=this.start.startOf(e,t),i;return t?.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=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):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?r.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(uC).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let a=t[o]||this.e,l=+a>+this.e?this.e:a;n.push(r.fromDateTimes(i,l)),i=l,o+=1}return n}splitBy(e){let t=Lu.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,a=[];for(;n<this.e;){let l=this.start.plus(t.mapUnits(u=>u*i));o=+l>+this.e?this.e:l,a.push(r.fromDateTimes(n,o)),n=o,i+=1}return a}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:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:r.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return r.fromDateTimes(t,n)}static merge(e){let[t,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[i,o.union(a)]:[i.concat([o]),a]:[i,a],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0,i=[],o=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...o),l=a.sort((u,f)=>u.time-f.time);for(let u of l)n+=u.type==="s"?1:-1,n===1?t=u.time:(t&&+t!=+u.time&&i.push(r.fromDateTimes(t,u.time)),t=null);return r.merge(i)}difference(...e){return r.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:mS}[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=mq,t={}){return this.isValid?cd.create(this.s.loc.clone(t),e).formatInterval(this):mS}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mS}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mS}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mS}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:mS}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Lu.invalid(this.invalidReason)}mapEndpoints(e){return r.fromDateTimes(e(this.s),e(this.e))}},vS=class{static hasDST(e=Ts.defaultZone){let t=wa.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Fb.isValidZone(e)}static normalizeZone(e){return Pb(e,Ts.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Na.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Na.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Na.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Na.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Na.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Na.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Na.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Na.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Na.create(t,null,"gregory").eras(e)}static features(){return{relative:IIe(),localeWeek:OIe()}}};function KDe(r,e){let t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(Lu.fromMillis(n).as("days"))}function DBt(r,e,t){let n=[["years",(u,f)=>f.year-u.year],["quarters",(u,f)=>f.quarter-u.quarter+(f.year-u.year)*4],["months",(u,f)=>f.month-u.month+(f.year-u.year)*12],["weeks",(u,f)=>{let p=KDe(u,f);return(p-p%7)/7}],["days",KDe]],i={},o=r,a,l;for(let[u,f]of n)t.indexOf(u)>=0&&(a=u,i[u]=f(r,e),l=o.plus(i),l>e?(i[u]--,r=o.plus(i),r>e&&(l=r,i[u]--,r=o.plus(i))):r=l);return[r,i,l,a]}function IBt(r,e,t,n){let[i,o,a,l]=DBt(r,e,t),u=e-i,f=t.filter(x=>["hours","minutes","seconds","milliseconds"].indexOf(x)>=0);f.length===0&&(a<e&&(a=i.plus({[l]:1})),a!==i&&(o[l]=(o[l]||0)+u/(a-i)));let p=Lu.fromObject(o,n);return f.length>0?Lu.fromMillis(u,n).shiftTo(...f).plus(p):p}var OBt="missing Intl.DateTimeFormat.formatToParts support";function aa(r,e=t=>t){return{regex:r,deser:([t])=>e(_Nt(t))}}var MBt="\xA0",YIe=`[ ${MBt}]`,XIe=new RegExp(YIe,"g");function LBt(r){return r.replace(/\./g,"\\.?").replace(XIe,YIe)}function GDe(r){return r.replace(/\./g,"").replace(XIe," ").toLowerCase()}function vm(r,e){return r===null?null:{regex:RegExp(r.map(LBt).join("|")),deser:([t])=>r.findIndex(n=>GDe(t)===GDe(n))+e}}function YDe(r,e){return{regex:r,deser:([,t,n])=>Sq(t,n),groups:e}}function lq(r){return{regex:r,deser:([e])=>e}}function PBt(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function RBt(r,e){let t=gm(e),n=gm(e,"{2}"),i=gm(e,"{3}"),o=gm(e,"{4}"),a=gm(e,"{6}"),l=gm(e,"{1,2}"),u=gm(e,"{1,3}"),f=gm(e,"{1,6}"),p=gm(e,"{1,9}"),x=gm(e,"{2,4}"),T=gm(e,"{4,6}"),C=R=>({regex:RegExp(PBt(R.val)),deser:([H])=>H,literal:!0}),L=(R=>{if(r.literal)return C(R);switch(R.val){case"G":return vm(e.eras("short"),0);case"GG":return vm(e.eras("long"),0);case"y":return aa(f);case"yy":return aa(x,D7);case"yyyy":return aa(o);case"yyyyy":return aa(T);case"yyyyyy":return aa(a);case"M":return aa(l);case"MM":return aa(n);case"MMM":return vm(e.months("short",!0),1);case"MMMM":return vm(e.months("long",!0),1);case"L":return aa(l);case"LL":return aa(n);case"LLL":return vm(e.months("short",!1),1);case"LLLL":return vm(e.months("long",!1),1);case"d":return aa(l);case"dd":return aa(n);case"o":return aa(u);case"ooo":return aa(i);case"HH":return aa(n);case"H":return aa(l);case"hh":return aa(n);case"h":return aa(l);case"mm":return aa(n);case"m":return aa(l);case"q":return aa(l);case"qq":return aa(n);case"s":return aa(l);case"ss":return aa(n);case"S":return aa(u);case"SSS":return aa(i);case"u":return lq(p);case"uu":return lq(l);case"uuu":return aa(t);case"a":return vm(e.meridiems(),0);case"kkkk":return aa(o);case"kk":return aa(x,D7);case"W":return aa(l);case"WW":return aa(n);case"E":case"c":return aa(t);case"EEE":return vm(e.weekdays("short",!1),1);case"EEEE":return vm(e.weekdays("long",!1),1);case"ccc":return vm(e.weekdays("short",!0),1);case"cccc":return vm(e.weekdays("long",!0),1);case"Z":case"ZZ":return YDe(new RegExp(`([+-]${l.source})(?::(${n.source}))?`),2);case"ZZZ":return YDe(new RegExp(`([+-]${l.source})(${n.source})?`),2);case"z":return lq(/[a-z_+-/]{1,256}?/i);case" ":return lq(/[^\S\n\r]/);default:return C(R)}})(r)||{invalidReason:OBt};return L.token=r,L}var qBt={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"}};function FBt(r,e,t){let{type:n,value:i}=r;if(n==="literal"){let u=/^\s+$/.test(i);return{literal:!u,val:u?" ":i}}let o=e[n],a=n;n==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let l=qBt[a];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function NBt(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function BBt(r,e,t){let n=r.match(e);if(n){let i={},o=1;for(let a in t)if(_S(t,a)){let l=t[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(n.slice(o,o+u))),o+=u}return[n,i]}else return[n,{}]}function zBt(r){let e=o=>{switch(o){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}},t=null,n;return Ti(r.z)||(t=Fb.create(r.z)),Ti(r.Z)||(t||(t=new fp(r.Z)),n=r.Z),Ti(r.q)||(r.M=(r.q-1)*3+1),Ti(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),Ti(r.u)||(r.S=P7(r.u)),[Object.keys(r).reduce((o,a)=>{let l=e(a);return l&&(o[l]=r[a]),o},{}),t,n]}var l7=null;function UBt(){return l7||(l7=wa.fromMillis(1555555555555)),l7}function jBt(r,e){if(r.literal)return r;let t=cd.macroTokenToFormatOpts(r.val),n=QIe(t,e);return n==null||n.includes(void 0)?r:n}function ZIe(r,e){return Array.prototype.concat(...r.map(t=>jBt(t,e)))}var xq=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=ZIe(cd.parseFormat(t),e),this.units=this.tokens.map(n=>RBt(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=NBt(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[t,n]=BBt(e,this.regex,this.handlers),[i,o,a]=n?zBt(n):[null,null,void 0];if(_S(n,"a")&&_S(n,"H"))throw new Rb("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:o,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function JIe(r,e,t){return new xq(r,t).explainFromTokens(e)}function VBt(r,e,t){let{result:n,zone:i,specificOffset:o,invalidReason:a}=JIe(r,e,t);return[n,i,o,a]}function QIe(r,e){if(!r)return null;let n=cd.create(e,r).dtFormatter(UBt()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(a=>FBt(a,r,o))}var u7="Invalid DateTime",XDe=864e13;function hC(r){return new hd("unsupported zone",`the zone "${r.name}" is not supported`)}function c7(r){return r.weekData===null&&(r.weekData=vq(r.c)),r.weekData}function h7(r){return r.localWeekData===null&&(r.localWeekData=vq(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function Xx(r,e){let t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new wa({...t,...e,old:t})}function eOe(r,e,t){let n=r-e*60*1e3,i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=t.offset(n);return i===o?[n,i]:[r-Math.min(i,o)*60*1e3,Math.max(i,o)]}function uq(r,e){r+=e*60*1e3;let t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function hq(r,e,t){return eOe(wq(r),e,t)}function ZDe(r,e){let t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...r.c,year:n,month:i,day:Math.min(r.c.day,yq(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=Lu.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=wq(o),[u,f]=eOe(l,t,r.zone);return a!==0&&(u+=a,f=r.zone.offset(u)),{ts:u,o:f}}function gS(r,e,t,n,i,o){let{setZone:a,zone:l}=t;if(r&&Object.keys(r).length!==0||e){let u=e||l,f=wa.fromObject(r,{...t,zone:u,specificOffset:o});return a?f:f.setZone(l)}else return wa.invalid(new hd("unparsable",`the input "${i}" can't be parsed as ${n}`))}function cq(r,e,t=!0){return r.isValid?cd.create(Na.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function f7(r,e,t){let n=r.c.year>9999||r.c.year<0,i="";if(n&&r.c.year>=0&&(i+="+"),i+=Vl(r.c.year,n?6:4),t==="year")return i;if(e){if(i+="-",i+=Vl(r.c.month),t==="month")return i;i+="-"}else if(i+=Vl(r.c.month),t==="month")return i;return i+=Vl(r.c.day),i}function JDe(r,e,t,n,i,o,a){let l=!t||r.c.millisecond!==0||r.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=Vl(r.c.hour),a==="hour")break;if(e){if(u+=":",u+=Vl(r.c.minute),a==="minute")break;l&&(u+=":",u+=Vl(r.c.second))}else{if(u+=Vl(r.c.minute),a==="minute")break;l&&(u+=Vl(r.c.second))}if(a==="second")break;l&&(!n||r.c.millisecond!==0)&&(u+=".",u+=Vl(r.c.millisecond,3))}return i&&(r.isOffsetFixed&&r.offset===0&&!o?u+="Z":r.o<0?(u+="-",u+=Vl(Math.trunc(-r.o/60)),u+=":",u+=Vl(Math.trunc(-r.o%60))):(u+="+",u+=Vl(Math.trunc(r.o/60)),u+=":",u+=Vl(Math.trunc(r.o%60)))),o&&(u+="["+r.zone.ianaName+"]"),u}var tOe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},HBt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},WBt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fq=["year","month","day","hour","minute","second","millisecond"],$Bt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],KBt=["year","ordinal","hour","minute","second","millisecond"];function dq(r){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[r.toLowerCase()];if(!e)throw new pq(r);return e}function QDe(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return dq(r)}}function GBt(r){if(fC===void 0&&(fC=Ts.now()),r.type!=="iana")return r.offset(fC);let e=r.name,t=I7.get(e);return t===void 0&&(t=r.offset(fC),I7.set(e,t)),t}function eIe(r,e){let t=Pb(e.zone,Ts.defaultZone);if(!t.isValid)return wa.invalid(hC(t));let n=Na.fromObject(e),i,o;if(Ti(r.year))i=Ts.now();else{for(let u of fq)Ti(r[u])&&(r[u]=tOe[u]);let a=CIe(r)||DIe(r);if(a)return wa.invalid(a);let l=GBt(t);[i,o]=hq(r,l,t)}return new wa({ts:i,zone:t,loc:n,o})}function tIe(r,e,t){let n=Ti(t.round)?!0:t.round,i=Ti(t.rounding)?"trunc":t.rounding,o=(l,u)=>(l=R7(l,n||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(l,u)),a=l=>t.calendary?e.hasSame(r,l)?0:e.startOf(l).diff(r.startOf(l),l).get(l):e.diff(r,l).get(l);if(t.unit)return o(a(t.unit),t.unit);for(let l of t.units){let u=a(l);if(Math.abs(u)>=1)return o(u,l)}return o(r>e?-0:0,t.units[t.units.length-1])}function rIe(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}var fC,I7=new Map,wa=class r{constructor(e){let t=e.zone||Ts.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new hd("invalid input"):null)||(t.isValid?null:hC(t));this.ts=Ti(e.ts)?Ts.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,o]=[e.old.c,e.old.o];else{let l=qb(e.o)&&!e.old?e.o:t.offset(this.ts);i=uq(this.ts,l),n=Number.isNaN(i.year)?new hd("invalid input"):null,i=n?null:i,o=n?null:l}this._zone=t,this.loc=e.loc||Na.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new r({})}static local(){let[e,t]=rIe(arguments),[n,i,o,a,l,u,f]=t;return eIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static utc(){let[e,t]=rIe(arguments),[n,i,o,a,l,u,f]=t;return e.zone=fp.utcInstance,eIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static fromJSDate(e,t={}){let n=ENt(e)?e.valueOf():NaN;if(Number.isNaN(n))return r.invalid("invalid input");let i=Pb(t.zone,Ts.defaultZone);return i.isValid?new r({ts:n,zone:i,loc:Na.fromObject(t)}):r.invalid(hC(i))}static fromMillis(e,t={}){if(qb(e))return e<-XDe||e>XDe?r.invalid("Timestamp out of range"):new r({ts:e,zone:Pb(t.zone,Ts.defaultZone),loc:Na.fromObject(t)});throw new Mu(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(qb(e))return new r({ts:e*1e3,zone:Pb(t.zone,Ts.defaultZone),loc:Na.fromObject(t)});throw new Mu("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let n=Pb(t.zone,Ts.defaultZone);if(!n.isValid)return r.invalid(hC(n));let i=Na.fromObject(t),o=bq(e,QDe),{minDaysInFirstWeek:a,startOfWeek:l}=BDe(o,i),u=Ts.now(),f=Ti(t.specificOffset)?n.offset(u):t.specificOffset,p=!Ti(o.ordinal),x=!Ti(o.year),T=!Ti(o.month)||!Ti(o.day),C=x||T,M=o.weekYear||o.weekNumber;if((C||p)&&M)throw new Rb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&p)throw new Rb("Can't mix ordinal dates with month/day");let L=M||o.weekday&&!C,R,H,$=uq(u,f);L?(R=$Bt,H=HBt,$=vq($,a,l)):p?(R=KBt,H=WBt,$=s7($)):(R=fq,H=tOe);let Q=!1;for(let qe of R){let Ee=o[qe];Ti(Ee)?Q?o[qe]=H[qe]:o[qe]=$[qe]:Q=!0}let K=L?SNt(o,a,l):p?TNt(o):CIe(o),te=K||DIe(o);if(te)return r.invalid(te);let fe=L?FDe(o,a,l):p?NDe(o):o,[re,ve]=hq(fe,f,n),_e=new r({ts:re,zone:n,o:ve,loc:i});return o.weekday&&C&&e.weekday!==_e.weekday?r.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${_e.toISO()}`):_e.isValid?_e:r.invalid(_e.invalid)}static fromISO(e,t={}){let[n,i]=mBt(e);return gS(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[n,i]=gBt(e);return gS(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[n,i]=vBt(e);return gS(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Ti(e)||Ti(t))throw new Mu("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,a=Na.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[l,u,f,p]=VBt(a,e,t);return p?r.invalid(p):gS(l,u,n,`format ${t}`,e,f)}static fromString(e,t,n={}){return r.fromFormat(e,t,n)}static fromSQL(e,t={}){let[n,i]=TBt(e);return gS(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Mu("need to specify a reason the DateTime is invalid");let n=e instanceof hd?e:new hd(e,t);if(Ts.throwOnInvalid)throw new d7(n);return new r({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=QIe(e,Na.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return ZIe(cd.parseFormat(e),Na.fromObject(t)).map(i=>i.val).join("")}static resetCache(){fC=void 0,I7.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}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?c7(this).weekYear:NaN}get weekNumber(){return this.isValid?c7(this).weekNumber:NaN}get weekday(){return this.isValid?c7(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?h7(this).weekday:NaN}get localWeekNumber(){return this.isValid?h7(this).weekNumber:NaN}get localWeekYear(){return this.isValid?h7(this).weekYear:NaN}get ordinal(){return this.isValid?s7(this.c).ordinal:NaN}get monthShort(){return this.isValid?vS.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?vS.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?vS.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?vS.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?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=wq(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),a=this.zone.offset(n-i*t),l=this.zone.offset(n-o*t);if(a===l)return[this];let u=n-a*t,f=n-l*t,p=uq(u,a),x=uq(f,l);return p.hour===x.hour&&p.minute===x.minute&&p.second===x.second&&p.millisecond===x.millisecond?[Xx(this,{ts:u}),Xx(this,{ts:f})]:[this]}get isInLeapYear(){return mC(this.year)}get daysInMonth(){return yq(this.year,this.month)}get daysInYear(){return this.isValid?yS(this.year):NaN}get weeksInWeekYear(){return this.isValid?pC(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?pC(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:i}=cd.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(fp.instance(e),t)}toLocal(){return this.setZone(Ts.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=Pb(e,Ts.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){let o=e.offset(this.ts),a=this.toObject();[i]=hq(a,o,e)}return Xx(this,{ts:i,zone:e})}else return r.invalid(hC(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Xx(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=bq(e,QDe),{minDaysInFirstWeek:n,startOfWeek:i}=BDe(t,this.loc),o=!Ti(t.weekYear)||!Ti(t.weekNumber)||!Ti(t.weekday),a=!Ti(t.ordinal),l=!Ti(t.year),u=!Ti(t.month)||!Ti(t.day),f=l||u,p=t.weekYear||t.weekNumber;if((f||a)&&p)throw new Rb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Rb("Can't mix ordinal dates with month/day");let x;o?x=FDe({...vq(this.c,n,i),...t},n,i):Ti(t.ordinal)?(x={...this.toObject(),...t},Ti(t.day)&&(x.day=Math.min(yq(x.year,x.month),x.day))):x=NDe({...s7(this.c),...t});let[T,C]=hq(x,this.o,this.zone);return Xx(this,{ts:T,o:C})}plus(e){if(!this.isValid)return this;let t=Lu.fromDurationLike(e);return Xx(this,ZDe(this,t))}minus(e){if(!this.isValid)return this;let t=Lu.fromDurationLike(e).negate();return Xx(this,ZDe(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},i=Lu.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;break}if(i==="weeks")if(t){let o=this.loc.getStartOfWeek(),{weekday:a}=this;a<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+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?cd.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):u7}toLocaleString(e=mq,t={}){return this.isValid?cd.create(this.loc.clone(t),e).formatDateTime(this):u7}toLocaleParts(e={}){return this.isValid?cd.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=dq(a);let l=e==="extended",u=f7(this,l,a);return fq.indexOf(a)>=3&&(u+="T"),u+=JDe(this,l,t,n,i,o,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?f7(this,e==="extended",dq(t)):null}toISOWeekDate(){return cq(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:a="extended",precision:l="milliseconds"}={}){return this.isValid?(l=dq(l),(i&&fq.indexOf(l)>=3?"T":"")+JDe(this,a==="extended",t,e,n,o,l)):null}toRFC2822(){return cq(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return cq(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?f7(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")),cq(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():u7}[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{};let 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 Lu.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=ANt(t).map(Lu.normalizeUnit),a=e.valueOf()>this.valueOf(),l=a?this:e,u=a?e:this,f=IBt(l,u,o,i);return a?f.negate():f}diffNow(e="milliseconds",t={}){return this.diff(r.now(),e,t)}until(e){return this.isValid?xS.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=i&&i<=o.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;let t=e.base||r.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),tIe(t,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?tIe(e.base||r.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(r.isDateTime))throw new Mu("min requires all arguments be DateTimes");return zDe(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(r.isDateTime))throw new Mu("max requires all arguments be DateTimes");return zDe(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:i=null,numberingSystem:o=null}=n,a=Na.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return JIe(a,e,t)}static fromStringExplain(e,t,n={}){return r.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:i=null}=t,o=Na.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new xq(o,e)}static fromFormatParser(e,t,n={}){if(Ti(e)||Ti(t))throw new Mu("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,a=Na.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!a.equals(t.locale))throw new Mu(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);let{result:l,zone:u,specificOffset:f,invalidReason:p}=t.explainFromTokens(e);return p?r.invalid(p):gS(l,u,n,`format ${t.format}`,e,f)}static get DATE_SHORT(){return mq}static get DATE_MED(){return nIe}static get DATE_MED_WITH_WEEKDAY(){return iNt}static get DATE_FULL(){return iIe}static get DATE_HUGE(){return oIe}static get TIME_SIMPLE(){return aIe}static get TIME_WITH_SECONDS(){return sIe}static get TIME_WITH_SHORT_OFFSET(){return lIe}static get TIME_WITH_LONG_OFFSET(){return uIe}static get TIME_24_SIMPLE(){return cIe}static get TIME_24_WITH_SECONDS(){return hIe}static get TIME_24_WITH_SHORT_OFFSET(){return fIe}static get TIME_24_WITH_LONG_OFFSET(){return dIe}static get DATETIME_SHORT(){return pIe}static get DATETIME_SHORT_WITH_SECONDS(){return mIe}static get DATETIME_MED(){return gIe}static get DATETIME_MED_WITH_SECONDS(){return vIe}static get DATETIME_MED_WITH_WEEKDAY(){return oNt}static get DATETIME_FULL(){return yIe}static get DATETIME_FULL_WITH_SECONDS(){return bIe}static get DATETIME_HUGE(){return xIe}static get DATETIME_HUGE_WITH_SECONDS(){return _Ie}};function uC(r){if(wa.isDateTime(r))return r;if(r&&r.valueOf&&qb(r.valueOf()))return wa.fromJSDate(r);if(r&&typeof r=="object")return wa.fromObject(r);throw new Mu(`Unknown datetime argument: ${r}, of type ${typeof r}`)}function YBt(r){return new Date(new Date(r).getTime()+new Date(r).getTimezoneOffset()*60*1e3)}var XBt="y/LL/dd",yC="TT",kq=class extends Xt{static targets=["input","fakeInput"];static values={view:String,timezone:String,format:String,enableTime:Boolean,pickerFormat:String,firstDayOfWeek:Number,time24Hr:Boolean,disableMobile:Boolean,noCalendar:Boolean,relative:Boolean,fieldType:{type:String,default:"dateTime"},pickerOptions:{type:Object,default:{}}};flatpickrInstance;cachedInitialValue;get browserZone(){return wa.local().zoneName}get initialValue(){return this.isOnShow||this.isOnIndex?this.context.element.innerText:this.isOnEdit?this.inputTarget.value:null}get isOnIndex(){return this.viewValue==="index"}get isOnEdit(){return this.viewValue==="edit"}get isOnShow(){return this.viewValue==="show"}get fieldIsDate(){return this.fieldTypeValue==="date"}get fieldIsDateTime(){return this.fieldTypeValue==="dateTime"}get fieldIsTime(){return this.fieldTypeValue==="time"}get fieldHasTime(){return this.fieldIsTime||this.fieldIsDateTime}get parsedValue(){return wa.fromISO(this.initialValue.trim(),{zone:"UTC"})}get displayTimezone(){return this.timezoneValue||this.browserZone}get locale(){return document.documentElement.lang||"en"}connect(){this.cacheInitialValue(),this.isOnShow||this.isOnIndex?this.initShow():this.isOnEdit&&this.initEdit()}disconnect(){this.isOnShow||this.isOnIndex?this.context.element.innerText=this.cachedInitialValue:this.isOnEdit&&this.flatpickrInstance&&this.flatpickrInstance.destroy()}cacheInitialValue(){this.cachedInitialValue=this.initialValue}initShow(){let r=this.parsedValue;if(this.fieldHasTime&&this.relativeValue)if(this.fieldIsTime){let e=r.toFormat(yC);r=wa.fromFormat(e,yC,{zone:"UTC"}).setZone(this.displayTimezone)}else r=r.setZone(this.displayTimezone);this.context.element.innerText=r.toFormat(this.formatValue,{locale:this.locale})}initEdit(){let r={enableTime:!1,enableSeconds:!1,time_24hr:this.time24HrValue,locale:{firstDayOfWeek:0},altInput:!0,onChange:this.onChange.bind(this),onClose:this.onClose.bind(this),noCalendar:!1,...this.pickerOptionsValue};if(r.altFormat=this.pickerFormatValue,r.disableMobile=this.disableMobileValue,r.locale.firstDayOfWeek=this.firstDayOfWeekValue,r.enableTime=this.enableTimeValue,r.enableSeconds=this.enableTimeValue,r.noCalendar=this.noCalendarValue,this.fieldHasTime&&(r.dateFormat="Y-m-d H:i:S"),this.initialValue)switch(this.fieldTypeValue){case"date":r.defaultDate=YBt(this.initialValue);break;case"time":{let e=this.parsedValue.toFormat(yC);r.defaultDate=wa.fromFormat(e,yC,{zone:"UTC"}).setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO()}break;case"dateTime":r.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break;default:break}this.flatpickrInstance=dS(this.fakeInputTarget,r),this.initialValue&&this.inputTarget.dispatchEvent(new Event("change",{bubbles:!0}))}onChange(r){if(r.length===0){this.updateRealInput("");return}let e=wa.fromISO(r[0].toISOString()).setZone(this.displayTimezone,{keepLocalTime:!0}).setZone("UTC",{keepLocalTime:!this.relativeValue}),t;switch(this.fieldTypeValue){case"time":t=e.toFormat(yC);break;case"date":t=e.toFormat(XBt);break;case"dateTime":t=e.toISO();break;default:break}this.updateRealInput(t)}onClose(r,e,t){if(t.config.allowInput&&t.altInput.value){let{value:n}=t.altInput;n?t.setDate(n,!0,t.config.altFormat):this.updateRealInput("")}}updateRealInput(r){this.inputTarget.value=r}clear(){this.fakeInputTarget._flatpickr.clear()}};var Eq=class extends Sf{static targets=["input"];static values={class:String,pickerOptions:Object};getFilterValue(){return this.inputTarget.value}getFilterClass(){return this.classValue}connect(){this.initFlatpickr()}initFlatpickr(){this.pickerInstance=dS(this.inputTarget,this.pickerOptionsValue)}clear(){this.inputTarget._flatpickr.clear()}};var Aq=class extends Xt{static values={chartId:String};toggleSlice({params:r,currentTarget:e}){let t=this.chart();t&&(t.toggleDataVisibility(r.index),t.update(),e.classList.toggle("distribution-chart__row--inactive",!t.getDataVisibility(r.index)))}highlightSlice({params:r}){let e=this.chart();if(!e||!e.getDataVisibility(r.index))return;let t=e.data.datasets[0],n=new Array(t.data.length).fill(0);n[r.index]=32,t.offset=n,e.update()}clearHighlight(){let r=this.chart();r&&(r.data.datasets[0].offset=0,r.update())}chart(){return window.Chartkick?.charts?.[this.chartIdValue]?.getChartObject?.()??null}};var B7=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function z7(r,e,t,n){r.addEventListener?r.addEventListener(e,t,n):r.attachEvent&&r.attachEvent("on".concat(e),t)}function bC(r,e,t,n){r.removeEventListener?r.removeEventListener(e,t,n):r.detachEvent&&r.detachEvent("on".concat(e),t)}function iOe(r,e){let t=e.slice(0,e.length-1);for(let n=0;n<t.length;n++)t[n]=r[t[n].toLowerCase()];return t}function oOe(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");let e=r.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function ZBt(r,e){let t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0;for(let o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}var wC={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":B7?173:189,"=":B7?61:187,";":B7?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},bm={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},xC={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},hc={16:!1,18:!1,17:!1,91:!1},Us={};for(let r=1;r<20;r++)wC["f".concat(r)]=111+r;var ks=[],_C=null,aOe="all",Rv=new Map,ES=r=>wC[r.toLowerCase()]||bm[r.toLowerCase()]||r.toUpperCase().charCodeAt(0),JBt=r=>Object.keys(wC).find(e=>wC[e]===r),QBt=r=>Object.keys(bm).find(e=>bm[e]===r);function sOe(r){aOe=r||"all"}function SC(){return aOe||"all"}function ezt(){return ks.slice(0)}function tzt(){return ks.map(r=>JBt(r)||QBt(r)||String.fromCharCode(r))}function rzt(){let r=[];return Object.keys(Us).forEach(e=>{Us[e].forEach(t=>{let{key:n,scope:i,mods:o,shortcut:a}=t;r.push({scope:i,shortcut:a,mods:o,keys:n.split("+").map(l=>ES(l))})})}),r}function nzt(r){let e=r.target||r.srcElement,{tagName:t}=e,n=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n}function izt(r){return typeof r=="string"&&(r=ES(r)),ks.indexOf(r)!==-1}function ozt(r,e){let t,n;r||(r=SC());for(let i in Us)if(Object.prototype.hasOwnProperty.call(Us,i))for(t=Us[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1).forEach(a=>{let{element:l}=a;return j7(l)}):n++;SC()===r&&sOe(e||"all")}function azt(r){let e=r.keyCode||r.which||r.charCode;r.key&&r.key.toLowerCase()==="capslock"&&(e=ES(r.key));let t=ks.indexOf(e);if(t>=0&&ks.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&ks.splice(0,ks.length),(e===93||e===224)&&(e=91),e in hc){hc[e]=!1;for(let n in bm)bm[n]===e&&(qv[n]=!1)}}function lOe(r){if(typeof r>"u")Object.keys(Us).forEach(i=>{Array.isArray(Us[i])&&Us[i].forEach(o=>Cq(o)),delete Us[i]}),j7(null);else if(Array.isArray(r))r.forEach(i=>{i.key&&Cq(i)});else if(typeof r=="object")r.key&&Cq(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];let[i,o]=t;typeof i=="function"&&(o=i,i=""),Cq({key:r,scope:i,method:o,splitKey:"+"})}}var Cq=r=>{let{key:e,scope:t,method:n,splitKey:i="+"}=r;oOe(e).forEach(a=>{let l=a.split(i),u=l.length,f=l[u-1],p=f==="*"?"*":ES(f);if(!Us[p])return;t||(t=SC());let x=u>1?iOe(bm,l):[],T=[];Us[p]=Us[p].filter(C=>{let L=(n?C.method===n:!0)&&C.scope===t&&ZBt(C.mods,x);return L&&T.push(C.element),!L}),T.forEach(C=>j7(C))})};function rOe(r,e,t,n){if(e.element!==n)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in hc)Object.prototype.hasOwnProperty.call(hc,o)&&(!hc[o]&&e.mods.indexOf(+o)>-1||hc[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!hc[16]&&!hc[18]&&!hc[17]&&!hc[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(ks),e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0)))}}function nOe(r,e){let t=Us["*"],n=r.keyCode||r.which||r.charCode;if(r.key&&r.key.toLowerCase()==="capslock"||!qv.filter.call(this,r))return;if((n===93||n===224)&&(n=91),ks.indexOf(n)===-1&&n!==229&&ks.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(l=>{let u=xC[l];r[l]&&ks.indexOf(u)===-1?ks.push(u):!r[l]&&ks.indexOf(u)>-1?ks.splice(ks.indexOf(u),1):l==="metaKey"&&r[l]&&(ks=ks.filter(f=>f in xC||f===n))}),n in hc){hc[n]=!0;for(let l in bm)if(Object.prototype.hasOwnProperty.call(bm,l)){let u=xC[bm[l]];qv[l]=r[u]}if(!t)return}for(let l in hc)Object.prototype.hasOwnProperty.call(hc,l)&&(hc[l]=r[xC[l]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(ks.indexOf(17)===-1&&ks.push(17),ks.indexOf(18)===-1&&ks.push(18),hc[17]=!0,hc[18]=!0);let i=SC();if(t)for(let l=0;l<t.length;l++)t[l].scope===i&&(r.type==="keydown"&&t[l].keydown||r.type==="keyup"&&t[l].keyup)&&rOe(r,t[l],i,e);if(!(n in Us))return;let o=Us[n],a=o.length;for(let l=0;l<a;l++)if((r.type==="keydown"&&o[l].keydown||r.type==="keyup"&&o[l].keyup)&&o[l].key){let u=o[l],{splitKey:f}=u,p=u.key.split(f),x=[];for(let T=0;T<p.length;T++)x.push(ES(p[T]));x.sort().join("")===ks.sort().join("")&&rOe(r,u,i,e)}}function qv(r,e,t){ks=[];let n=oOe(r),i=[],o="all",a=document,l=0,u=!1,f=!0,p="+",x=!1,T=!1;for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(f=e.keydown),e.capture!==void 0&&(x=e.capture),typeof e.splitKey=="string"&&(p=e.splitKey),e.single===!0&&(T=!0)),typeof e=="string"&&(o=e),T&&lOe(r,o);l<n.length;l++)r=n[l].split(p),i=[],r.length>1&&(i=iOe(bm,r)),r=r[r.length-1],r=r==="*"?"*":ES(r),r in Us||(Us[r]=[]),Us[r].push({keyup:u,keydown:f,scope:o,mods:i,shortcut:n[l],method:t,key:n[l],splitKey:p,element:a});if(typeof a<"u"&&window){if(!Rv.has(a)){let C=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return nOe(L,a)},M=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;nOe(L,a),azt(L)};Rv.set(a,{keydownListener:C,keyupListenr:M,capture:x}),z7(a,"keydown",C,x),z7(a,"keyup",M,x)}if(!_C){let C=()=>{ks=[]};_C={listener:C,capture:x},z7(window,"focus",C,x)}}}function szt(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Us).forEach(t=>{Us[t].filter(i=>i.scope===e&&i.shortcut===r).forEach(i=>{i&&i.method&&i.method()})})}function j7(r){let e=Object.values(Us).flat();if(e.findIndex(n=>{let{element:i}=n;return i===r})<0){let{keydownListener:n,keyupListenr:i,capture:o}=Rv.get(r)||{};n&&i&&(bC(r,"keyup",i,o),bC(r,"keydown",n,o),Rv.delete(r))}if((e.length<=0||Rv.size<=0)&&(Object.keys(Rv).forEach(i=>{let{keydownListener:o,keyupListenr:a,capture:l}=Rv.get(i)||{};o&&a&&(bC(i,"keyup",a,l),bC(i,"keydown",o,l),Rv.delete(i))}),Rv.clear(),Object.keys(Us).forEach(i=>delete Us[i]),_C)){let{listener:i,capture:o}=_C;bC(window,"focus",i,o),_C=null}}var U7={getPressedKeyString:tzt,setScope:sOe,getScope:SC,deleteScope:ozt,getPressedKeyCodes:ezt,getAllKeyCodes:rzt,isPressed:izt,filter:nzt,trigger:szt,unbind:lOe,keyMap:wC,modifier:bm,modifierMap:xC};for(let r in U7)Object.prototype.hasOwnProperty.call(U7,r)&&(qv[r]=U7[r]);if(typeof window<"u"){let r=window.hotkeys;qv.noConflict=e=>(e&&window.hotkeys===qv&&(window.hotkeys=r),qv),window.hotkeys=qv}var lzt=(r,e,t)=>{let n=r;return t===!0?n=`${e.identifier}:${r}`:typeof t=="string"&&(n=`${t}:${r}`),n},uzt=(r,e,t)=>{let{bubbles:n,cancelable:i,composed:o}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(t,{originalEvent:e}),new CustomEvent(r,{bubbles:n,cancelable:i,composed:o,detail:t})};function czt(r){let e=r.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=t&&e.top+e.height>=0,o=e.left<=n&&e.left+e.width>=0;return i&&o}var hzt={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},Dq=(r,e={})=>{let{onlyVisible:t,dispatchEvent:n,events:i,eventPrefix:o}=Object.assign({},hzt,e),a=p=>{let x=e?.element||r.element;if(!(x.contains(p.target)||!czt(x)&&t)&&(r.clickOutside&&r.clickOutside(p),n)){let T=lzt("click:outside",r,o),C=uzt(T,p,{controller:r});x.dispatchEvent(C)}},l=()=>{i?.forEach(p=>{window.addEventListener(p,a,!1)})},u=()=>{i?.forEach(p=>{window.removeEventListener(p,a,!1)})},f=r.disconnect.bind(r);return Object.assign(r,{disconnect(){u(),f()}}),l(),[l,u]};var V7=class extends Xt{};V7.debounces=[];var H7=class extends Xt{};H7.throttles=[];var Iq=class extends Xt{static targets=["menu"];static values={exemptionContainers:Array,logger:Boolean,flip:Boolean};get exemptionContainerTargets(){return this.exemptionContainersValue.map(r=>document.querySelector(r)).filter(Boolean)}get isOpen(){return this.menuTarget.hasAttribute("open")}get focusableItems(){return[...this.menuTarget.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}clickOutside(r){this.hasMenuTarget&&!(this.hasExemptionContainersValue&&this.exemptionContainerTargets.some(t=>t.contains(r.target)))&&this.isOpen&&this.close()}connect(){Dq(this),this.boundHandleKeydown=this.handleKeydown.bind(this)}disconnect(){this.element.removeEventListener("keydown",this.boundHandleKeydown)}toggle(){this.isOpen?this.close():this.open()}open(){this.menuTarget.show(),this.maybeFlip(),this.element.addEventListener("keydown",this.boundHandleKeydown),document.body.classList.add("dropdown-open"),this.dispatch("open",{bubbles:!0}),requestAnimationFrame(()=>{let r=this.focusableItems;if(r.length===0)return;(r.find(t=>[...t.classList].some(n=>n.endsWith("--active"))||t.getAttribute("aria-selected")==="true")||r[0]).focus()})}close(){this.menuTarget.close(),this.element.removeEventListener("keydown",this.boundHandleKeydown),document.body.classList.remove("dropdown-open")}maybeFlip(){!this.flipValue||!this.hasMenuTarget||(this.menuTarget.classList.remove("start-auto","end-0"),this.menuTarget.classList.add("start-0","end-auto"),this.menuTarget.getBoundingClientRect().right>document.documentElement.clientWidth&&(this.menuTarget.classList.remove("start-0","end-auto"),this.menuTarget.classList.add("start-auto","end-0")))}handleKeydown(r){let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),this.close();break;default:}}};var Oq=class extends Xt{get focusableItems(){return[...this.element.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}connect(){this.boundHandleKeydown=this.handleKeydown.bind(this),this.boundOnToggle=this.onToggle.bind(this),this.element.addEventListener("toggle",this.boundOnToggle),this.element.addEventListener("keydown",this.boundHandleKeydown)}disconnect(){this.element.removeEventListener("toggle",this.boundOnToggle),this.element.removeEventListener("keydown",this.boundHandleKeydown)}onToggle(r){r.newState==="open"&&requestAnimationFrame(()=>{let e=this.focusableItems;if(e.length===0)return;(e.find(n=>n.classList.contains("dropdown-menu__item--active"))||e[0]).focus()})}handleKeydown(r){if(!this.element.matches(":popover-open"))return;let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),r.stopPropagation(),this.element.hidePopover();break;default:}}};var sMe=Yo(aMe()),sF=class extends Xt{static targets=["element"];get view(){return this.elementTarget.dataset.view}get componentOptions(){try{return JSON.parse(this.elementTarget.dataset.componentOptions)}catch{return{}}}get isDark(){return document.documentElement.classList.contains("dark")}get resolvedTheme(){return this.isDark?"monokai":"default"}connect(){let r={element:this.elementTarget,spellChecker:this.componentOptions.spell_checker,autoRefresh:{delay:500},theme:this.resolvedTheme};this.view==="show"&&(r.toolbar=!1,r.status=!1),this.easyMde=new sMe.default(r),this.view==="show"&&(this.easyMde.codemirror.options.readOnly=!0),this.easyMde.codemirror.on("keydown",(t,n)=>{n.key==="Escape"&&this.easyMde.codemirror.getInputField().blur()});let e=this;this.observer=new MutationObserver(()=>{e.easyMde.codemirror.setOption("theme",e.resolvedTheme)}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}disconnect(){this.observer&&this.observer.disconnect(),this.easyMde&&(this.easyMde.toTextArea(),this.easyMde=null)}};var lF=class extends Xt{submit(r){r.key&&this.element.requestSubmit()}};var uF=class extends Xt{static targets=["icon"];mousemove(r){let n=r.clientX,i=r.clientY;this.iconTargets.forEach(o=>{let a=o.getBoundingClientRect(),l=a.left+a.width/2,u=a.top+a.height/2,f=l-n,p=u-i,x=Math.sqrt(f*f+p*p);if(x<90&&x>0){let T=parseFloat(o.dataset.repulsionScale??1),C=(1-x/90)*30*T;o.style.setProperty("--tx",`${f/x*C}px`),o.style.setProperty("--ty",`${p/x*C}px`),o.classList.add("grid-card__icon--repelling")}else o.style.setProperty("--tx","0px"),o.style.setProperty("--ty","0px"),o.classList.remove("grid-card__icon--repelling")})}mouseleave(){this.iconTargets.forEach(r=>{r.style.setProperty("--tx","0px"),r.style.setProperty("--ty","0px"),r.classList.remove("grid-card__icon--repelling")})}};var n3t=32,cF=class extends Xt{static targets=["row","trigger"];connect(){this.items=Array.from(this.rowTarget.children),this.bindAriaExpanded(),this.popoverItems=this.collectPopoverItems(),this.scheduleUpdate=this.scheduleUpdate.bind(this),this.resizeObserver=new ResizeObserver(this.scheduleUpdate),this.resizeObserver.observe(this.element),this.update()}collectPopoverItems(){if(!this.popoverElement)return[];let r=this.popoverElement.querySelector(".dropdown-menu__list");return r?Array.from(r.children):[]}disconnect(){this.resizeObserver?.disconnect(),this.rafId&&cancelAnimationFrame(this.rafId),this.popoverElement&&this.handlePopoverToggle&&this.popoverElement.removeEventListener("toggle",this.handlePopoverToggle)}bindAriaExpanded(){if(!this.hasTriggerTarget)return;let r=this.triggerTarget.getAttribute("popovertarget");this.popoverElement=r?document.getElementById(r):null,this.popoverElement&&(this.handlePopoverToggle=e=>{this.triggerTarget.setAttribute("aria-expanded",e.newState==="open"?"true":"false")},this.popoverElement.addEventListener("toggle",this.handlePopoverToggle))}scheduleUpdate(){this.rafId||(this.rafId=requestAnimationFrame(()=>{this.rafId=null,this.update()}))}update(){if(this.items.length===0){this.element.classList.remove("header-menu--has-overflow"),this.element.classList.remove("header-menu--row-empty"),this.element.classList.add("header-menu--empty");return}this.element.classList.remove("header-menu--empty"),this.items.forEach(T=>{T.style.display=""}),this.truncatedItem&&(this.truncatedItem.classList.remove("header-menu__item--truncated"),this.truncatedItem.style.maxWidth="",this.truncatedItem=null);let r=this.hasTriggerTarget?this.triggerTarget.offsetWidth:0,e=this.element.clientWidth,t=window.getComputedStyle(this.rowTarget),n=parseFloat(t.columnGap)||parseFloat(t.gap)||0,i=this.items.length,o=0;for(let T=0;T<this.items.length;T+=1){let C=o+(T===0?0:n)+this.items[T].offsetWidth,L=T<this.items.length-1?e-r-n:e;if(C>L){i=T;break}o=C}let a=-1;if(i<this.items.length){let T=o+(i>0?n:0),C=e-r-n-T;C>=n3t&&(a=i,this.truncatedItem=this.items[a],this.truncatedItem.classList.add("header-menu__item--truncated"),this.truncatedItem.style.maxWidth=`${Math.floor(C)}px`)}let l=i+(a>=0?1:0);for(let T=l;T<this.items.length;T+=1)this.items[T].style.display="none";let f=this.rowTarget.clientWidth>0?l:0;this.popoverItems.forEach((T,C)=>{T.style.display=C<f?"none":""});let p=i<this.items.length;this.element.classList.toggle("header-menu--has-overflow",p);let x=i>0||a>=0;this.element.classList.toggle("header-menu--row-empty",!x)}};var hF=class extends Xt{static targets=["content"];showContent(r){this.contentTarget.classList.toggle("hidden"),r.target.classList.add("hidden")}};var i3t="input, textarea, select, [contenteditable]",fF=class extends Xt{static targets=["table"];initialize(){this.handleKeydown=this.handleKeydown.bind(this),this.handleDropdownOpen=this.handleDropdownOpen.bind(this),this.handleAdvanceRequest=this.handleAdvanceRequest.bind(this),this.handleTableBlur=this.handleTableBlur.bind(this)}connect(){this.currentIndex=-1,this.hotkeysEnabled=window.Avo?.configuration?.hotkeys?.enabled!==!1,document.addEventListener("keydown",this.handleKeydown),document.addEventListener("dropdown-menu:open",this.handleDropdownOpen),document.addEventListener("avo:advance-resource-table",this.handleAdvanceRequest),this.hotkeysEnabled&&this.element.querySelectorAll("tr[data-visit-path] [data-hotkey]").forEach(e=>{let t=e.getAttribute("data-hotkey");e.setAttribute("data-hotkey-original",t),e.removeAttribute("data-hotkey")})}disconnect(){document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("dropdown-menu:open",this.handleDropdownOpen),document.removeEventListener("avo:advance-resource-table",this.handleAdvanceRequest)}tableTargetConnected(r){r.addEventListener("blur",this.handleTableBlur),this.currentIndex=-1}tableTargetDisconnected(r){r.removeEventListener("blur",this.handleTableBlur)}handleDropdownOpen(){let r=this.rows();r.length&&this.clearFocus(r)}handleAdvanceRequest(r){if(!this.hasTableTarget)return;let e=r.detail?.direction==="previous"?"previous":"next",t=this.rows();t.length&&(this.tableTarget.focus({preventScroll:!0}),this.moveFocus(t,e))}handleTableBlur(){let r=this.rows();r.length&&this.clearFocus(r)}handleKeydown(r){if(r.defaultPrevented||document.body.classList.contains("modal-open")||document.body.classList.contains("dropdown-open")||r.target.closest(i3t)||r.repeat&&(r.key==="Enter"||r.key==="Escape"||r.key===" "))return;let e=this.rows();if(e.length&&this.tableHasFocus()&&!(this.hotkeysEnabled&&this.currentIndex!==-1&&this.handleRowHotkey(r,e))&&["ArrowDown","ArrowUp","Enter","Escape"," "].includes(r.key)){if(this.currentIndex=this.normalizeCurrentIndex(e.length),r.key==="Escape"){if(this.currentIndex!==-1){r.preventDefault(),this.clearFocus(e);return}let t=this.application.getControllerForElementAndIdentifier(this.element.querySelector('[data-controller~="item-select-all"]'),"item-select-all");if(t&&JSON.parse(t.element.dataset.selectedResources||"[]").length>0){r.preventDefault(),t.deselectAll();return}r.preventDefault(),this.tableTarget.blur();return}if(r.key==="Enter"){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex];t?.dataset.visitPath&&window.Turbo.visit(t.dataset.visitPath);return}if(r.key===" "){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex].querySelector('[data-item-select-all-target="itemCheckbox"]');t&&t.click();return}r.preventDefault(),this.moveFocus(e,r.key==="ArrowDown"?"next":"previous")}}moveFocus(r,e){e==="next"?this.currentIndex=this.currentIndex<r.length-1?this.currentIndex+1:0:this.currentIndex=this.currentIndex>0?this.currentIndex-1:r.length-1,r.forEach((t,n)=>t.classList.toggle("is-keyboard-focused",n===this.currentIndex)),r[this.currentIndex].scrollIntoView({block:"nearest"}),this.syncActiveDescendant(r[this.currentIndex]),this.hotkeysEnabled&&this.syncRowHotkeys(r)}rows(){return Array.from(this.element.querySelectorAll("tr[data-visit-path]"))}tableHasFocus(){return this.hasTableTarget?this.tableTarget===document.activeElement||this.tableTarget.contains(document.activeElement):!1}syncActiveDescendant(r){this.hasTableTarget&&(r?.id?this.tableTarget.setAttribute("aria-activedescendant",r.id):this.tableTarget.removeAttribute("aria-activedescendant"))}normalizeCurrentIndex(r){return this.currentIndex<-1?-1:this.currentIndex>=r?r-1:this.currentIndex}syncRowHotkeys(r){r.forEach((e,t)=>{e.querySelectorAll("[data-hotkey-original]").forEach(i=>{if(t===this.currentIndex){let o=i.getAttribute("data-hotkey-original");i.setAttribute("data-hotkey",o)}else i.removeAttribute("data-hotkey")})})}handleRowHotkey(r,e){let t=e[this.currentIndex];if(!t)return!1;let n=t.querySelector(`[data-hotkey="${r.key}"]`);return n?(r.preventDefault(),r.stopImmediatePropagation(),n.click(),!0):!1}clearFocus(r){r.forEach(e=>e.classList.remove("is-keyboard-focused")),this.currentIndex=-1,this.hasTableTarget&&this.tableTarget.removeAttribute("aria-activedescendant"),r.forEach(e=>{e.querySelectorAll("[data-hotkey-original]").forEach(t=>{t.removeAttribute("data-hotkey")})})}};var dF=class extends Xt{static targets=["element"];focus({params:r}){let e=this.context.element.querySelector(r.selector);this.element&&e.focus()}};var pF=class extends Xt{static targets=["itemCheckbox","checkbox","selectAllOverlay","unselectedMessage","selectedMessage"];static values={pageCount:Number,selectedAll:Boolean,selectedAllQuery:String};connect(){this.resourceName=this.element.dataset.resourceName,this.selectedResourcesObserver=new nS(this.element,"data-selected-resources",this),this.selectedResourcesObserver.start()}elementAttributeValueChanged(r){let e=JSON.parse(r.dataset.selectedResources),t=this.element.querySelectorAll("tbody tr").length;this.checkboxTarget.indeterminate=!1,this.checkboxTarget.checked=!1,e.length===t?this.checkboxTarget.checked=!0:e.length===0?this.checkboxTarget.checked=!1:e.length>0&&e.length<t&&(this.checkboxTarget.indeterminate=!0)}disconnect(){this.selectedResourcesObserver.stop()}deselectAll(){this.itemCheckboxTargets.forEach(r=>r.checked&&r.click()),this.checkboxTarget.checked=!1,this.selectAllEnabled()&&(this.selectAllOverlay(!1),this.resetUnselected())}toggle(r){let e=!!r.target.checked;this.itemCheckboxTargets.forEach(t=>t.checked!==e&&t.click()),this.selectAllEnabled()&&(this.selectAllOverlay(e),e||this.resetUnselected())}selectRow(){let r=!0;this.itemCheckboxTargets.forEach(e=>r=r&&e.checked),this.checkboxTarget.checked=r,this.selectAllEnabled()&&(this.selectAllOverlay(r),this.resetUnselected()),this.updateLinks("resourceIds")}selectAll(r){r.preventDefault(),this.selectedAllValue=!this.selectedAllValue,this.unselectedMessageTarget.classList.toggle("hidden"),this.selectedMessageTarget.classList.toggle("hidden"),this.selectedAllValue?this.updateLinks("selectedQuery"):this.updateLinks("resourceIds")}updateLinks(r){document.querySelectorAll(`a[data-actions-picker-target][data-resource-name="${this.resourceName}"]`).forEach(t=>{try{let n=new URL(t.href);if(Array.from(n.searchParams.keys()).filter(i=>i.startsWith("fields[")).forEach(i=>n.searchParams.delete(i)),r==="resourceIds"){let i=JSON.parse(this.element.dataset.selectedResources).join(",");n.searchParams.set("fields[avo_resource_ids]",i),n.searchParams.set("fields[avo_selected_all]","false")}else if(r==="selectedQuery"){let i=this.element.dataset.itemSelectAllSelectedAllQueryValue;n.searchParams.set("fields[avo_index_query]",i),n.searchParams.set("fields[avo_selected_all]","true")}t.href=n.toString()}catch(n){console.error("Error updating link:",t,n)}})}resetUnselected(){this.selectedAllValue=!1,this.unselectedMessageTarget.classList.remove("hidden"),this.selectedMessageTarget.classList.add("hidden")}selectAllOverlay(r){r?this.selectAllOverlayTarget.classList.remove("hidden"):this.selectAllOverlayTarget.classList.add("hidden")}selectAllEnabled(){return this.pageCountValue>1&&this.selectedAllQueryValue!=="select_all_disabled"}};var mF=class extends Xt{static targets=["panel"];checkbox={};get actionLinks(){return document.querySelectorAll('a[data-actions-picker-target="resourceAction"]')}get currentIds(){try{return JSON.parse(this.stateHolderElement.dataset.selectedResources)}catch{return[]}}set currentIds(r){this.stateHolderElement.dataset.selectedResources=JSON.stringify(r),this.actionLinks.length>0&&(r.length>0?this.enableResourceActions():this.disableResourceActions())}connect(){this.resourceName=this.element.dataset.resourceName,this.resourceId=this.element.dataset.resourceId,this.stateHolderElement=document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`)}addToSelected(){let r=this.currentIds;r.push(this.resourceId),this.element.closest("tr")&&this.element.closest("tr").classList.add("selected-row"),this.currentIds=r}removeFromSelected(){this.element.closest("tr")&&this.element.closest("tr").classList.remove("selected-row"),this.currentIds=this.currentIds.filter(r=>r.toString()!==this.resourceId)}toggle(r){this.checkbox=r.target,this.checkbox.checked?this.addToSelected():this.removeFromSelected()}enableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.remove(r.dataset.disabledClasses),r.setAttribute("data-href",r.getAttribute("href")),r.dataset.disabled=!1,r.removeAttribute("tabindex"),r.setAttribute("aria-disabled","false"))})}disableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.add(r.dataset.disabledClasses),r.setAttribute("href",r.getAttribute("data-href")),r.dataset.disabled=!0,r.setAttribute("tabindex","-1"),r.setAttribute("aria-disabled","true"))})}};var gF=class extends Xt{static targets=["input","section","row","empty"];connect(){this.modal=this.element.closest(".modal"),this.modal&&(this.handleToggle=this.onModalToggle.bind(this),this.modal.addEventListener("toggle",this.handleToggle))}disconnect(){this.modal&&this.modal.removeEventListener("toggle",this.handleToggle)}onModalToggle(r){r.newState==="open"?(this.reset(),requestAnimationFrame(()=>this.inputTarget.focus())):this.reset()}filter(){let r=this.inputTarget.value.trim().toLowerCase(),e=!1;this.sectionTargets.forEach(t=>{let n=!1;this.rowsFor(t).forEach(i=>{let o=r===""||this.searchText(i).includes(r);i.hidden=!o,o&&(n=!0)}),t.hidden=!n,n&&(e=!0)}),this.hasEmptyTarget&&(this.emptyTarget.hidden=e||r==="")}clearOnEscape(r){this.inputTarget.value!==""&&(r.stopPropagation(),this.reset(),this.inputTarget.focus())}reset(){this.inputTarget.value="",this.filter()}rowsFor(r){return this.rowTargets.filter(e=>r.contains(e))}searchText(r){return r.dataset.searchText||(r.dataset.searchText=r.textContent.replace(/\s+/g," ").trim().toLowerCase()),r.dataset.searchText}};function lMe(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function o3t(r){if(Array.isArray(r))return r}function a3t(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,o,a,l=[],u=!0,f=!1;try{if(o=(t=t.call(r)).next,e!==0)for(;!(u=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(p){f=!0,i=p}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}function s3t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
660
+ `}}function ge(){t.calendarContainer.classList.add("hasWeeks");var G=Jo("div","flatpickr-weekwrapper");G.appendChild(Jo("span","flatpickr-weekday",t.l10n.weekAbbreviation));var X=Jo("div","flatpickr-weeks");return G.appendChild(X),{weekWrapper:G,weekNumbers:X}}function se(G,X){X===void 0&&(X=!0);var oe=X?G:G-t.currentMonth;oe<0&&t._hidePrevMonthArrow===!0||oe>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=oe,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ft("onYearChange"),j()),U(),Ft("onMonthChange"),Dn())}function Ke(G,X){if(G===void 0&&(G=!0),X===void 0&&(X=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,X===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var oe=aq(t.config),ye=oe.hours,Oe=oe.minutes,je=oe.seconds;C(ye,Oe,je)}t.redraw(),G&&Ft("onChange")}function xt(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ft("onClose")}function it(){t.config!==void 0&&Ft("onDestroy");for(var G=t._handlers.length;G--;)t._handlers[G].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var X=t.calendarContainer.parentNode;if(X.lastChild&&X.removeChild(X.lastChild),X.parentNode){for(;X.firstChild;)X.parentNode.insertBefore(X.firstChild,X);X.parentNode.removeChild(X)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(oe){try{delete t[oe]}catch{}})}function _t(G){return t.calendarContainer.contains(G)}function ct(G){if(t.isOpen&&!t.config.inline){var X=kf(G),oe=_t(X),ye=X===t.input||X===t.altInput||t.element.contains(X)||G.path&&G.path.indexOf&&(~G.path.indexOf(t.input)||~G.path.indexOf(t.altInput)),Oe=!ye&&!oe&&!_t(G.relatedTarget),je=!t.config.ignoredFocusElements.some(function(et){return et.contains(X)});Oe&&je&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&u(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function Mt(G){if(!(!G||t.config.minDate&&G<t.config.minDate.getFullYear()||t.config.maxDate&&G>t.config.maxDate.getFullYear())){var X=G,oe=t.currentYear!==X;t.currentYear=X||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),oe&&(t.redraw(),Ft("onYearChange"),j())}}function Ht(G,X){var oe;X===void 0&&(X=!0);var ye=t.parseDate(G,void 0,X);if(t.config.minDate&&ye&&Ef(ye,t.config.minDate,X!==void 0?X:!t.minDateHasTime)<0||t.config.maxDate&&ye&&Ef(ye,t.config.maxDate,X!==void 0?X:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(ye===void 0)return!1;for(var Oe=!!t.config.enable,je=(oe=t.config.enable)!==null&&oe!==void 0?oe:t.config.disable,et=0,ke=void 0;et<je.length;et++){if(ke=je[et],typeof ke=="function"&&ke(ye))return Oe;if(ke instanceof Date&&ye!==void 0&&ke.getTime()===ye.getTime())return Oe;if(typeof ke=="string"){var Ue=t.parseDate(ke,void 0,!0);return Ue&&Ue.getTime()===ye.getTime()?Oe:!Oe}else if(typeof ke=="object"&&ye!==void 0&&ke.from&&ke.to&&ye.getTime()>=ke.from.getTime()&&ye.getTime()<=ke.to.getTime())return Oe}return!Oe}function Nt(G){return t.daysContainer!==void 0?G.className.indexOf("hidden")===-1&&G.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(G):!1}function fr(G){var X=G.target===t._input,oe=t._input.value.trimEnd()!==On();X&&oe&&!(G.relatedTarget&&_t(G.relatedTarget))&&t.setDate(t._input.value,!0,G.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Gt(G){var X=kf(G),oe=t.config.wrap?r.contains(X):X===t._input,ye=t.config.allowInput,Oe=t.isOpen&&(!ye||!oe),je=t.config.inline&&oe&&!ye;if(G.keyCode===13&&oe){if(ye)return t.setDate(t._input.value,!0,X===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),X.blur();t.open()}else if(_t(X)||Oe||je){var et=!!t.timeContainer&&t.timeContainer.contains(X);switch(G.keyCode){case 13:et?(G.preventDefault(),u(),zr()):or(G);break;case 27:G.preventDefault(),zr();break;case 8:case 46:oe&&!t.config.allowInput&&(G.preventDefault(),t.clear());break;case 37:case 39:if(!et&&!oe){G.preventDefault();var ke=o();if(t.daysContainer!==void 0&&(ye===!1||ke&&Nt(ke))){var Ue=G.keyCode===39?1:-1;G.ctrlKey?(G.stopPropagation(),se(Ue),qe(ve(1),0)):qe(void 0,Ue)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:G.preventDefault();var ot=G.keyCode===40?1:-1;t.daysContainer&&X.$i!==void 0||X===t.input||X===t.altInput?G.ctrlKey?(G.stopPropagation(),Mt(t.currentYear-ot),qe(ve(1),0)):et||qe(void 0,ot*7):X===t.currentYearElement?Mt(t.currentYear-ot):t.config.enableTime&&(!et&&t.hourElement&&t.hourElement.focus(),u(G),t._debouncedChange());break;case 9:if(et){var Ct=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Kt){return Kt}),jt=Ct.indexOf(X);if(jt!==-1){var Dt=Ct[jt+(G.shiftKey?-1:1)];G.preventDefault(),(Dt||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(X)&&G.shiftKey&&(G.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&X===t.amPM)switch(G.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],x(),$n();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],x(),$n();break}(oe||_t(X))&&Ft("onKeyDown",G)}function Zt(G,X){if(X===void 0&&(X="flatpickr-day"),!(t.selectedDates.length!==1||G&&(!G.classList.contains(X)||G.classList.contains("flatpickr-disabled")))){for(var oe=G?G.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),ye=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Oe=Math.min(oe,t.selectedDates[0].getTime()),je=Math.max(oe,t.selectedDates[0].getTime()),et=!1,ke=0,Ue=0,ot=Oe;ot<je;ot+=kDe.DAY)Ht(new Date(ot),!0)||(et=et||ot>Oe&&ot<je,ot<ye&&(!ke||ot>ke)?ke=ot:ot>ye&&(!Ue||ot<Ue)&&(Ue=ot));var Ct=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+X));Ct.forEach(function(jt){var Dt=jt.dateObj,Kt=Dt.getTime(),Ar=ke>0&&Kt<ke||Ue>0&&Kt>Ue;if(Ar){jt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ur){jt.classList.remove(ur)});return}else if(et&&!Ar)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ur){jt.classList.remove(ur)}),G!==void 0&&(G.classList.add(oe<=t.selectedDates[0].getTime()?"startRange":"endRange"),ye<oe&&Kt===ye?jt.classList.add("startRange"):ye>oe&&Kt===ye&&jt.classList.add("endRange"),Kt>=ke&&(Ue===0||Kt<=Ue)&&SDe(Kt,ye,oe)&&jt.classList.add("inRange"))})}}function vt(){t.isOpen&&!t.config.static&&!t.config.inline&&dr()}function yt(G,X){if(X===void 0&&(X=t._positionElement),t.isMobile===!0){if(G){G.preventDefault();var oe=kf(G);oe&&oe.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ft("onOpen");return}else if(t._input.disabled||t.config.inline)return;var ye=t.isOpen;t.isOpen=!0,ye||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ft("onOpen"),dr(X)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(G===void 0||!t.timeContainer.contains(G.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ye(G){return function(X){var oe=t.config["_"+G+"Date"]=t.parseDate(X,t.config.dateFormat),ye=t.config["_"+(G==="min"?"max":"min")+"Date"];oe!==void 0&&(t[G==="min"?"minDateHasTime":"maxDateHasTime"]=oe.getHours()>0||oe.getMinutes()>0||oe.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Oe){return Ht(Oe)}),!t.selectedDates.length&&G==="min"&&T(oe),$n()),t.daysContainer&&(kt(),oe!==void 0?t.currentYearElement[G]=oe.getFullYear().toString():t.currentYearElement.removeAttribute(G),t.currentYearElement.disabled=!!ye&&oe!==void 0&&ye.getFullYear()===oe.getFullYear())}}function me(){var G=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],X=jc(jc({},JSON.parse(JSON.stringify(r.dataset||{}))),e),oe={};t.config.parseDate=X.parseDate,t.config.formatDate=X.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Ct){t.config._enable=Yt(Ct)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Ct){t.config._disable=Yt(Ct)}});var ye=X.mode==="time";if(!X.dateFormat&&(X.enableTime||ye)){var Oe=jl.defaultConfig.dateFormat||Mb.dateFormat;oe.dateFormat=X.noCalendar||ye?"H:i"+(X.enableSeconds?":S":""):Oe+" H:i"+(X.enableSeconds?":S":"")}if(X.altInput&&(X.enableTime||ye)&&!X.altFormat){var je=jl.defaultConfig.altFormat||Mb.altFormat;oe.altFormat=X.noCalendar||ye?"h:i"+(X.enableSeconds?":S K":" K"):je+(" h:i"+(X.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ye("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ye("max")});var et=function(Ct){return function(jt){t.config[Ct==="min"?"_minTime":"_maxTime"]=t.parseDate(jt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:et("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:et("max")}),X.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,oe,X);for(var ke=0;ke<G.length;ke++)t.config[G[ke]]=t.config[G[ke]]===!0||t.config[G[ke]]==="true";eq.filter(function(Ct){return t.config[Ct]!==void 0}).forEach(function(Ct){t.config[Ct]=nq(t.config[Ct]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ke=0;ke<t.config.plugins.length;ke++){var Ue=t.config.plugins[ke](t)||{};for(var ot in Ue)eq.indexOf(ot)>-1?t.config[ot]=nq(Ue[ot]).map(a).concat(t.config[ot]):typeof X[ot]>"u"&&(t.config[ot]=Ue[ot])}X.altInputClass||(t.config.altInputClass=De().className+" "+t.config.altInputClass),Ft("onParseConfig")}function De(){return t.config.wrap?r.querySelector("[data-input]"):r}function ze(){typeof t.config.locale!="object"&&typeof jl.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=jc(jc({},jl.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?jl.l10ns[t.config.locale]:void 0),Mv.D="("+t.l10n.weekdays.shorthand.join("|")+")",Mv.l="("+t.l10n.weekdays.longhand.join("|")+")",Mv.M="("+t.l10n.months.shorthand.join("|")+")",Mv.F="("+t.l10n.months.longhand.join("|")+")",Mv.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var G=jc(jc({},e),JSON.parse(JSON.stringify(r.dataset||{})));G.time_24hr===void 0&&jl.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=n7(t),t.parseDate=iq({config:t.config,l10n:t.l10n})}function dr(G){if(typeof t.config.position=="function")return void t.config.position(t,G);if(t.calendarContainer!==void 0){Ft("onPreCalendarPosition");var X=G||t._positionElement,oe=Array.prototype.reduce.call(t.calendarContainer.children,(function(er,Fr){return er+Fr.offsetHeight}),0),ye=t.calendarContainer.offsetWidth,Oe=t.config.position.split(" "),je=Oe[0],et=Oe.length>1?Oe[1]:null,ke=X.getBoundingClientRect(),Ue=window.innerHeight-ke.bottom,ot=je==="above"||je!=="below"&&Ue<oe&&ke.top>oe,Ct=window.pageYOffset+ke.top+(ot?-oe-2:X.offsetHeight+2);if(Uc(t.calendarContainer,"arrowTop",!ot),Uc(t.calendarContainer,"arrowBottom",ot),!t.config.inline){var jt=window.pageXOffset+ke.left,Dt=!1,Kt=!1;et==="center"?(jt-=(ye-ke.width)/2,Dt=!0):et==="right"&&(jt-=ye-ke.width,Kt=!0),Uc(t.calendarContainer,"arrowLeft",!Dt&&!Kt),Uc(t.calendarContainer,"arrowCenter",Dt),Uc(t.calendarContainer,"arrowRight",Kt);var Ar=window.document.body.offsetWidth-(window.pageXOffset+ke.right),ur=jt+ye>window.document.body.offsetWidth,It=Ar+ye>window.document.body.offsetWidth;if(Uc(t.calendarContainer,"rightMost",ur),!t.config.static)if(t.calendarContainer.style.top=Ct+"px",!ur)t.calendarContainer.style.left=jt+"px",t.calendarContainer.style.right="auto";else if(!It)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Ar+"px";else{var _r=lt();if(_r===void 0)return;var lr=window.document.body.offsetWidth,hr=Math.max(0,lr/2-ye/2),Tn=".flatpickr-calendar.centerMost:before",Tr=".flatpickr-calendar.centerMost:after",Ve=_r.cssRules.length,ar="{left:"+ke.left+"px;right:auto;}";Uc(t.calendarContainer,"rightMost",!1),Uc(t.calendarContainer,"centerMost",!0),_r.insertRule(Tn+","+Tr+ar,Ve),t.calendarContainer.style.left=hr+"px",t.calendarContainer.style.right="auto"}}}}function lt(){for(var G=null,X=0;X<document.styleSheets.length;X++){var oe=document.styleSheets[X];if(oe.cssRules){try{oe.cssRules}catch{continue}G=oe;break}}return G??Ut()}function Ut(){var G=document.createElement("style");return document.head.appendChild(G),G.sheet}function kt(){t.config.noCalendar||t.isMobile||(j(),Dn(),U())}function zr(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function or(G){G.preventDefault(),G.stopPropagation();var X=function(Ct){return Ct.classList&&Ct.classList.contains("flatpickr-day")&&!Ct.classList.contains("flatpickr-disabled")&&!Ct.classList.contains("notAllowed")},oe=t7(kf(G),X);if(oe!==void 0){var ye=oe,Oe=t.latestSelectedDateObj=new Date(ye.dateObj.getTime()),je=(Oe.getMonth()<t.currentMonth||Oe.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=ye,t.config.mode==="single")t.selectedDates=[Oe];else if(t.config.mode==="multiple"){var et=xr(Oe);et?t.selectedDates.splice(parseInt(et),1):t.selectedDates.push(Oe)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Oe,t.selectedDates.push(Oe),Ef(Oe,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Ct,jt){return Ct.getTime()-jt.getTime()}));if(x(),je){var ke=t.currentYear!==Oe.getFullYear();t.currentYear=Oe.getFullYear(),t.currentMonth=Oe.getMonth(),ke&&(Ft("onYearChange"),j()),Ft("onMonthChange")}if(Dn(),U(),$n(),!je&&t.config.mode!=="range"&&t.config.showMonths===1?re(ye):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ue=t.config.mode==="single"&&!t.config.enableTime,ot=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ue||ot)&&zr()}R()}}var kr={locale:[ze,Me],showMonths:[Ie,l,ce],minDate:[$],maxDate:[$],positionElement:[vi],clickOpens:[function(){t.config.clickOpens===!0?(L(t._input,"focus",t.open),L(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Sr(G,X){if(G!==null&&typeof G=="object"){Object.assign(t.config,G);for(var oe in G)kr[oe]!==void 0&&kr[oe].forEach(function(ye){return ye()})}else t.config[G]=X,kr[G]!==void 0?kr[G].forEach(function(ye){return ye()}):eq.indexOf(G)>-1&&(t.config[G]=nq(X));t.redraw(),$n(!0)}function at(G,X){var oe=[];if(G instanceof Array)oe=G.map(function(ye){return t.parseDate(ye,X)});else if(G instanceof Date||typeof G=="number")oe=[t.parseDate(G,X)];else if(typeof G=="string")switch(t.config.mode){case"single":case"time":oe=[t.parseDate(G,X)];break;case"multiple":oe=G.split(t.config.conjunction).map(function(ye){return t.parseDate(ye,X)});break;case"range":oe=G.split(t.l10n.rangeSeparator).map(function(ye){return t.parseDate(ye,X)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(G)));t.selectedDates=t.config.allowInvalidPreload?oe:oe.filter(function(ye){return ye instanceof Date&&Ht(ye,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(ye,Oe){return ye.getTime()-Oe.getTime()})}function rt(G,X,oe){if(X===void 0&&(X=!1),oe===void 0&&(oe=t.config.dateFormat),G!==0&&!G||G instanceof Array&&G.length===0)return t.clear(X);at(G,oe),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,X),T(),t.selectedDates.length===0&&t.clear(!1),$n(X),X&&Ft("onChange")}function Yt(G){return G.slice().map(function(X){return typeof X=="string"||typeof X=="number"||X instanceof Date?t.parseDate(X,void 0,!0):X&&typeof X=="object"&&X.from&&X.to?{from:t.parseDate(X.from,void 0),to:t.parseDate(X.to,void 0)}:X}).filter(function(X){return X})}function Yr(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var G=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);G&&at(G,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function hi(){if(t.input=De(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Jo(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),vi()}function vi(){t._positionElement=t.config.positionElement||t._input}function Fi(){var G=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Jo("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=G,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=G==="datetime-local"?"Y-m-d\\TH:i:S":G==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}L(t.mobileInput,"change",function(X){t.setDate(kf(X).value,!1,t.mobileFormatStr),Ft("onChange"),Ft("onClose")})}function Wt(G){if(t.isOpen===!0)return t.close();t.open(G)}function Ft(G,X){if(t.config!==void 0){var oe=t.config[G];if(oe!==void 0&&oe.length>0)for(var ye=0;oe[ye]&&ye<oe.length;ye++)oe[ye](t.selectedDates,t.input.value,t,X);G==="onChange"&&(t.input.dispatchEvent(Pr("change")),t.input.dispatchEvent(Pr("input")))}}function Pr(G){var X=document.createEvent("Event");return X.initEvent(G,!0,!0),X}function xr(G){for(var X=0;X<t.selectedDates.length;X++){var oe=t.selectedDates[X];if(oe instanceof Date&&Ef(oe,G)===0)return""+X}return!1}function wn(G){return t.config.mode!=="range"||t.selectedDates.length<2?!1:Ef(G,t.selectedDates[0])>=0&&Ef(G,t.selectedDates[1])<=0}function Dn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(G,X){var oe=new Date(t.currentYear,t.currentMonth,1);oe.setMonth(t.currentMonth+X),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[X].textContent=lC(oe.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=oe.getMonth().toString(),G.value=oe.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function On(G){var X=G||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(oe){return t.formatDate(oe,X)}).filter(function(oe,ye,Oe){return t.config.mode!=="range"||t.config.enableTime||Oe.indexOf(oe)===ye}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function $n(G){G===void 0&&(G=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=On(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=On(t.config.altFormat)),G!==!1&&Ft("onValueUpdate")}function co(G){var X=kf(G),oe=t.prevMonthNav.contains(X),ye=t.nextMonthNav.contains(X);oe||ye?se(oe?-1:1):t.yearElements.indexOf(X)>=0?X.select():X.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):X.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Yn(G){G.preventDefault();var X=G.type==="keydown",oe=kf(G),ye=oe;t.amPM!==void 0&&oe===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]);var Oe=parseFloat(ye.getAttribute("min")),je=parseFloat(ye.getAttribute("max")),et=parseFloat(ye.getAttribute("step")),ke=parseInt(ye.value,10),Ue=G.delta||(X?G.which===38?1:-1:0),ot=ke+et*Ue;if(typeof ye.value<"u"&&ye.value.length===2){var Ct=ye===t.hourElement,jt=ye===t.minuteElement;ot<Oe?(ot=je+ot+Tf(!Ct)+(Tf(Ct)&&Tf(!t.amPM)),jt&&K(void 0,-1,t.hourElement)):ot>je&&(ot=ye===t.hourElement?ot-je-Tf(!t.amPM):Oe,jt&&K(void 0,1,t.hourElement)),t.amPM&&Ct&&(et===1?ot+ke===23:Math.abs(ot-ke)>et)&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]),ye.value=zc(ot)}}return i(),t}function fS(r,e){for(var t=Array.prototype.slice.call(r).filter(function(a){return a instanceof HTMLElement}),n=[],i=0;i<t.length;i++){var o=t[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=tNt(o,e||{}),n.push(o._flatpickr)}catch(a){console.error(a)}}return n.length===1?n[0]:n}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(r){return fS(this,r)},HTMLElement.prototype.flatpickr=function(r){return fS([this],r)});var jl=function(r,e){return typeof r=="string"?fS(window.document.querySelectorAll(r),e):r instanceof Node?fS([r],e):fS(r,e)};jl.defaultConfig={};jl.l10ns={en:jc({},rq),default:jc({},rq)};jl.localize=function(r){jl.l10ns.default=jc(jc({},jl.l10ns.default),r)};jl.setDefaults=function(r){jl.defaultConfig=jc(jc({},jl.defaultConfig),r)};jl.parseDate=iq({});jl.formatDate=n7({});jl.compareDates=Ef;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(r){return fS(this,r)});Date.prototype.fp_incr=function(r){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof r=="string"?parseInt(r,10):r))};typeof window<"u"&&(window.flatpickr=jl);var dS=jl;function rNt(r,e,t){let n=mm(t.element);n&&n.appendChild(t.calendarContainer)}function nNt(r,e,t){mm(t.element)&&requestAnimationFrame(()=>{let{calendarContainer:n}=t;n.style.top&&n.style.top!=="auto"&&(n.style.top=`${parseFloat(n.style.top)-window.pageYOffset}px`),n.style.left&&n.style.left!=="auto"&&(n.style.left=`${parseFloat(n.style.left)-window.pageXOffset}px`)})}dS.setDefaults({onReady:[rNt],onOpen:[nNt]});var Pv=class extends Error{},d7=class extends Pv{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},p7=class extends Pv{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},m7=class extends Pv{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Rb=class extends Pv{},pq=class extends Pv{constructor(e){super(`Invalid unit ${e}`)}},Mu=class extends Pv{},xg=class extends Pv{constructor(){super("Zone is an abstract class")}},bn="numeric",ym="short",fd="long",mq={year:bn,month:bn,day:bn},nIe={year:bn,month:ym,day:bn},iNt={year:bn,month:ym,day:bn,weekday:ym},iIe={year:bn,month:fd,day:bn},oIe={year:bn,month:fd,day:bn,weekday:fd},aIe={hour:bn,minute:bn},sIe={hour:bn,minute:bn,second:bn},lIe={hour:bn,minute:bn,second:bn,timeZoneName:ym},uIe={hour:bn,minute:bn,second:bn,timeZoneName:fd},cIe={hour:bn,minute:bn,hourCycle:"h23"},hIe={hour:bn,minute:bn,second:bn,hourCycle:"h23"},fIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:ym},dIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:fd},pIe={year:bn,month:bn,day:bn,hour:bn,minute:bn},mIe={year:bn,month:bn,day:bn,hour:bn,minute:bn,second:bn},gIe={year:bn,month:ym,day:bn,hour:bn,minute:bn},vIe={year:bn,month:ym,day:bn,hour:bn,minute:bn,second:bn},oNt={year:bn,month:ym,day:bn,weekday:ym,hour:bn,minute:bn},yIe={year:bn,month:fd,day:bn,hour:bn,minute:bn,timeZoneName:ym},bIe={year:bn,month:fd,day:bn,hour:bn,minute:bn,second:bn,timeZoneName:ym},xIe={year:bn,month:fd,day:bn,weekday:fd,hour:bn,minute:bn,timeZoneName:fd},_Ie={year:bn,month:fd,day:bn,weekday:fd,hour:bn,minute:bn,second:bn,timeZoneName:fd},Jx=class{get type(){throw new xg}get name(){throw new xg}get ianaName(){return this.name}get isUniversal(){throw new xg}offsetName(e,t){throw new xg}formatOffset(e,t){throw new xg}offset(e){throw new xg}equals(e){throw new xg}get isValid(){throw new xg}},i7=null,gq=class r extends Jx{static get instance(){return i7===null&&(i7=new r),i7}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return MIe(e,t,n)}formatOffset(e,t){return dC(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},g7=new Map;function aNt(r){let e=g7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),g7.set(r,e)),e}var sNt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function lNt(r,e){let t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,o,a,l,u,f,p]=n;return[a,i,o,l,u,f,p]}function uNt(r,e){let t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){let{type:o,value:a}=t[i],l=sNt[o];o==="era"?n[l]=a:Ti(l)||(n[l]=parseInt(a,10))}return n}var o7=new Map,Fb=class r extends Jx{static create(e){let t=o7.get(e);return t===void 0&&o7.set(e,t=new r(e)),t}static resetCache(){o7.clear(),g7.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{return!1}}constructor(e){super(),this.zoneName=e,this.valid=r.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return MIe(e,t,n,this.name)}formatOffset(e,t){return dC(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=aNt(this.name),[i,o,a,l,u,f,p]=n.formatToParts?uNt(n,t):lNt(n,t);l==="BC"&&(i=-Math.abs(i)+1);let T=wq({year:i,month:o,day:a,hour:u===24?0:u,minute:f,second:p,millisecond:0}),C=+t,M=C%1e3;return C-=M>=0?M:1e3+M,(T-C)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},ADe={};function cNt(r,e={}){let t=JSON.stringify([r,e]),n=ADe[t];return n||(n=new Intl.ListFormat(r,e),ADe[t]=n),n}var v7=new Map;function y7(r,e={}){let t=JSON.stringify([r,e]),n=v7.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),v7.set(t,n)),n}var b7=new Map;function hNt(r,e={}){let t=JSON.stringify([r,e]),n=b7.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),b7.set(t,n)),n}var x7=new Map;function fNt(r,e={}){let{base:t,...n}=e,i=JSON.stringify([r,n]),o=x7.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(r,e),x7.set(i,o)),o}var cC=null;function dNt(){return cC||(cC=new Intl.DateTimeFormat().resolvedOptions().locale,cC)}var _7=new Map;function wIe(r){let e=_7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),_7.set(r,e)),e}var w7=new Map;function pNt(r){let e=w7.get(r);if(!e){let t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...SIe,...e}),w7.set(r,e)}return e}function mNt(r){let e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));let t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=y7(r).resolvedOptions(),i=r}catch{let u=r.substring(0,t);n=y7(u).resolvedOptions(),i=u}let{numberingSystem:o,calendar:a}=n;return[i,o,a]}}function gNt(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function vNt(r){let e=[];for(let t=1;t<=12;t++){let n=wa.utc(2009,t,1);e.push(r(n))}return e}function yNt(r){let e=[];for(let t=1;t<=7;t++){let n=wa.utc(2016,11,13+t);e.push(r(n))}return e}function sq(r,e,t,n){let i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function bNt(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||wIe(r.locale).numberingSystem==="latn"}var S7=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...a}=n;if(!t||Object.keys(a).length>0){let l={useGrouping:!1,...n};n.padTo>0&&(l.minimumIntegerDigits=n.padTo),this.inf=hNt(e,l)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):R7(e,3);return Vl(t,this.padTo)}}},T7=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let a=-1*(e.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Fb.create(l).valid?(i=l,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=y7(t,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},k7=class{constructor(e,t,n){this.opts={style:"long",...n},!t&&IIe()&&(this.rtf=fNt(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):zNt(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},SIe={firstDay:1,minimalDays:4,weekend:[6,7]},Na=class r{static fromOpts(e){return r.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,o=!1){let a=e||Ts.defaultLocale,l=a||(o?"en-US":dNt()),u=t||Ts.defaultNumberingSystem,f=n||Ts.defaultOutputCalendar,p=C7(i)||Ts.defaultWeekSettings;return new r(l,u,f,p,a)}static resetCache(){cC=null,v7.clear(),b7.clear(),x7.clear(),_7.clear(),w7.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return r.create(e,t,n,i)}constructor(e,t,n,i,o){let[a,l,u]=mNt(e);this.locale=a,this.numberingSystem=t||l||null,this.outputCalendar=n||u||null,this.weekSettings=i,this.intl=gNt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=bNt(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:r.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,C7(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return sq(this,e,RIe,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");t&=!n;let i=t?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){let a=n?l=>this.dtFormatter(l,i).format():l=>this.extract(l,i,"month");this.monthsCache[o][e]=vNt(a)}return this.monthsCache[o][e]})}weekdays(e,t=!1){return sq(this,e,NIe,()=>{let 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]=yNt(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return sq(this,void 0,()=>BIe,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[wa.utc(2016,11,13,9),wa.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return sq(this,e,zIe,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[wa.utc(-40,1,1),wa.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){let i=this.dtFormatter(e,t),o=i.formatToParts(),a=o.find(l=>l.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new S7(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new T7(e,this.intl,t)}relFormatter(e={}){return new k7(this.intl,this.isEnglish(),e)}listFormatter(e={}){return cNt(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||wIe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:OIe()?pNt(this.locale):SIe}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})`}},a7=null,fp=class r extends Jx{static get utcInstance(){return a7===null&&(a7=new r(0)),a7}static instance(e){return e===0?r.utcInstance:new r(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(Sq(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${dC(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${dC(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return dC(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},E7=class extends Jx{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 Pb(r,e){if(Ti(r)||r===null)return e;if(r instanceof Jx)return r;if(kNt(r)){let t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?gq.instance:t==="utc"||t==="gmt"?fp.utcInstance:fp.parseSpecifier(t)||Fb.create(r)}else return qb(r)?fp.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new E7(r)}var O7={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},CDe={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]},xNt=O7.hanidec.replace(/[\[|\]]/g,"").split("");function _Nt(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if(r[t].search(O7.hanidec)!==-1)e+=xNt.indexOf(r[t]);else for(let i in CDe){let[o,a]=CDe[i];n>=o&&n<=a&&(e+=n-o)}}return parseInt(e,10)}else return e}var A7=new Map;function wNt(){A7.clear()}function gm({numberingSystem:r},e=""){let t=r||"latn",n=A7.get(t);n===void 0&&(n=new Map,A7.set(t,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${O7[t]}${e}`),n.set(e,i)),i}var DDe=()=>Date.now(),IDe="system",ODe=null,MDe=null,LDe=null,PDe=60,RDe,qDe=null,Ts=class{static get now(){return DDe}static set now(e){DDe=e}static set defaultZone(e){IDe=e}static get defaultZone(){return Pb(IDe,gq.instance)}static get defaultLocale(){return ODe}static set defaultLocale(e){ODe=e}static get defaultNumberingSystem(){return MDe}static set defaultNumberingSystem(e){MDe=e}static get defaultOutputCalendar(){return LDe}static set defaultOutputCalendar(e){LDe=e}static get defaultWeekSettings(){return qDe}static set defaultWeekSettings(e){qDe=C7(e)}static get twoDigitCutoffYear(){return PDe}static set twoDigitCutoffYear(e){PDe=e%100}static get throwOnInvalid(){return RDe}static set throwOnInvalid(e){RDe=e}static resetCaches(){Na.resetCache(),Fb.resetCache(),wa.resetCache(),wNt()}},hd=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},TIe=[0,31,59,90,120,151,181,212,243,273,304,334],kIe=[0,31,60,91,121,152,182,213,244,274,305,335];function cp(r,e){return new hd("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function M7(r,e,t){let n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function EIe(r,e,t){return t+(mC(r)?kIe:TIe)[e-1]}function AIe(r,e){let t=mC(r)?kIe:TIe,n=t.findIndex(o=>o<e),i=e-t[n];return{month:n+1,day:i}}function L7(r,e){return(r-e+7)%7+1}function vq(r,e=4,t=1){let{year:n,month:i,day:o}=r,a=EIe(n,i,o),l=L7(M7(n,i,o),t),u=Math.floor((a-l+14-e)/7),f;return u<1?(f=n-1,u=pC(f,e,t)):u>pC(n,e,t)?(f=n+1,u=1):f=n,{weekYear:f,weekNumber:u,weekday:l,...Tq(r)}}function FDe(r,e=4,t=1){let{weekYear:n,weekNumber:i,weekday:o}=r,a=L7(M7(n,1,e),t),l=yS(n),u=i*7+o-a-7+e,f;u<1?(f=n-1,u+=yS(f)):u>l?(f=n+1,u-=yS(n)):f=n;let{month:p,day:x}=AIe(f,u);return{year:f,month:p,day:x,...Tq(r)}}function s7(r){let{year:e,month:t,day:n}=r,i=EIe(e,t,n);return{year:e,ordinal:i,...Tq(r)}}function NDe(r){let{year:e,ordinal:t}=r,{month:n,day:i}=AIe(e,t);return{year:e,month:n,day:i,...Tq(r)}}function BDe(r,e){if(!Ti(r.localWeekday)||!Ti(r.localWeekNumber)||!Ti(r.localWeekYear)){if(!Ti(r.weekday)||!Ti(r.weekNumber)||!Ti(r.weekYear))throw new Rb("Cannot mix locale-based week fields with ISO-based week fields");return Ti(r.localWeekday)||(r.weekday=r.localWeekday),Ti(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),Ti(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function SNt(r,e=4,t=1){let n=_q(r.weekYear),i=hp(r.weekNumber,1,pC(r.weekYear,e,t)),o=hp(r.weekday,1,7);return n?i?o?!1:cp("weekday",r.weekday):cp("week",r.weekNumber):cp("weekYear",r.weekYear)}function TNt(r){let e=_q(r.year),t=hp(r.ordinal,1,yS(r.year));return e?t?!1:cp("ordinal",r.ordinal):cp("year",r.year)}function CIe(r){let e=_q(r.year),t=hp(r.month,1,12),n=hp(r.day,1,yq(r.year,r.month));return e?t?n?!1:cp("day",r.day):cp("month",r.month):cp("year",r.year)}function DIe(r){let{hour:e,minute:t,second:n,millisecond:i}=r,o=hp(e,0,23)||e===24&&t===0&&n===0&&i===0,a=hp(t,0,59),l=hp(n,0,59),u=hp(i,0,999);return o?a?l?u?!1:cp("millisecond",i):cp("second",n):cp("minute",t):cp("hour",e)}function Ti(r){return typeof r>"u"}function qb(r){return typeof r=="number"}function _q(r){return typeof r=="number"&&r%1===0}function kNt(r){return typeof r=="string"}function ENt(r){return Object.prototype.toString.call(r)==="[object Date]"}function IIe(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function OIe(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ANt(r){return Array.isArray(r)?r:[r]}function zDe(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{let o=[e(i),i];return n&&t(n[0],o[0])===n[0]?n:o},null)[1]}function CNt(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function _S(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function C7(r){if(r==null)return null;if(typeof r!="object")throw new Mu("Week settings must be an object");if(!hp(r.firstDay,1,7)||!hp(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!hp(e,1,7)))throw new Mu("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function hp(r,e,t){return _q(r)&&r>=e&&r<=t}function DNt(r,e){return r-e*Math.floor(r/e)}function Vl(r,e=2){let t=r<0,n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function Lb(r){if(!(Ti(r)||r===null||r===""))return parseInt(r,10)}function Yx(r){if(!(Ti(r)||r===null||r===""))return parseFloat(r)}function P7(r){if(!(Ti(r)||r===null||r==="")){let e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function R7(r,e,t="round"){let n=10**e;switch(t){case"expand":return r>0?Math.ceil(r*n)/n:Math.floor(r*n)/n;case"trunc":return Math.trunc(r*n)/n;case"round":return Math.round(r*n)/n;case"floor":return Math.floor(r*n)/n;case"ceil":return Math.ceil(r*n)/n;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function mC(r){return r%4===0&&(r%100!==0||r%400===0)}function yS(r){return mC(r)?366:365}function yq(r,e){let t=DNt(e-1,12)+1,n=r+(e-t)/12;return t===2?mC(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function wq(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function UDe(r,e,t){return-L7(M7(r,1,e),t)+e-1}function pC(r,e=4,t=1){let n=UDe(r,e,t),i=UDe(r+1,e,t);return(yS(r)-n+i)/7}function D7(r){return r>99?r:r>Ts.twoDigitCutoffYear?1900+r:2e3+r}function MIe(r,e,t,n=null){let i=new Date(r),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let a={timeZoneName:e,...o},l=new Intl.DateTimeFormat(t,a).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function Sq(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);let n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function LIe(r){let e=Number(r);if(typeof r=="boolean"||r===""||!Number.isFinite(e))throw new Mu(`Invalid unit value ${r}`);return e}function bq(r,e){let t={};for(let n in r)if(_S(r,n)){let i=r[n];if(i==null)continue;t[e(n)]=LIe(i)}return t}function dC(r,e){let t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${Vl(t,2)}:${Vl(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${Vl(t,2)}${Vl(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Tq(r){return CNt(r,["hour","minute","second","millisecond"])}var INt=["January","February","March","April","May","June","July","August","September","October","November","December"],PIe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ONt=["J","F","M","A","M","J","J","A","S","O","N","D"];function RIe(r){switch(r){case"narrow":return[...ONt];case"short":return[...PIe];case"long":return[...INt];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}}var qIe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],FIe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],MNt=["M","T","W","T","F","S","S"];function NIe(r){switch(r){case"narrow":return[...MNt];case"short":return[...FIe];case"long":return[...qIe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var BIe=["AM","PM"],LNt=["Before Christ","Anno Domini"],PNt=["BC","AD"],RNt=["B","A"];function zIe(r){switch(r){case"narrow":return[...RNt];case"short":return[...PNt];case"long":return[...LNt];default:return null}}function qNt(r){return BIe[r.hour<12?0:1]}function FNt(r,e){return NIe(e)[r.weekday-1]}function NNt(r,e){return RIe(e)[r.month-1]}function BNt(r,e){return zIe(e)[r.year<0?0:1]}function zNt(r,e,t="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&o){let x=r==="days";switch(e){case 1:return x?"tomorrow":`next ${i[r][0]}`;case-1:return x?"yesterday":`last ${i[r][0]}`;case 0:return x?"today":`this ${i[r][0]}`}}let a=Object.is(e,-0)||e<0,l=Math.abs(e),u=l===1,f=i[r],p=n?u?f[1]:f[2]||f[1]:u?i[r][0]:r;return a?`${l} ${p} ago`:`in ${l} ${p}`}function jDe(r,e){let t="";for(let n of r)n.literal?t+=n.val:t+=e(n.val);return t}var UNt={D:mq,DD:nIe,DDD:iIe,DDDD:oIe,t:aIe,tt:sIe,ttt:lIe,tttt:uIe,T:cIe,TT:hIe,TTT:fIe,TTTT:dIe,f:pIe,ff:gIe,fff:yIe,ffff:xIe,F:mIe,FF:vIe,FFF:bIe,FFFF:_Ie},cd=class r{static create(e,t={}){return new r(e,t)}static parseFormat(e){let t=null,n="",i=!1,o=[];for(let a=0;a<e.length;a++){let l=e.charAt(a);l==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),t=null,n="",i=!i):i||l===t?n+=l:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=l,t=l)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return UNt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),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 Vl(e,t);let i={...this.opts};return t>0&&(i.padTo=t),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(C,M)=>this.loc.extract(e,C,M),a=C=>e.isOffsetFixed&&e.offset===0&&C.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,C.format):"",l=()=>n?qNt(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(C,M)=>n?NNt(e,C):o(M?{month:C}:{month:C,day:"numeric"},"month"),f=(C,M)=>n?FNt(e,C):o(M?{weekday:C}:{weekday:C,month:"long",day:"numeric"},"weekday"),p=C=>{let M=r.macroTokenToFormatOpts(C);return M?this.formatWithSystemDefault(e,M):C},x=C=>n?BNt(e,C):o({era:C},"era"),T=C=>{switch(C){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 a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({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 l();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return x("short");case"GG":return x("long");case"GGGGG":return x("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 p(C)}};return jDe(r.parseFormat(t),T)}formatDurationFromString(e,t){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=p=>{switch(p[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}},o=(p,x)=>T=>{let C=i(T);if(C){let M=x.isNegativeDuration&&C!==x.largestUnit?n:1,L;return this.opts.signMode==="negativeLargestOnly"&&C!==x.largestUnit?L="never":this.opts.signMode==="all"?L="always":L="auto",this.num(p.get(C)*M,T.length,L)}else return T},a=r.parseFormat(t),l=a.reduce((p,{literal:x,val:T})=>x?p:p.concat(T),[]),u=e.shiftTo(...l.map(i).filter(p=>p)),f={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return jDe(a,o(u,f))}},UIe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function wS(...r){let e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function SS(...r){return e=>r.reduce(([t,n,i],o)=>{let[a,l,u]=o(e,i);return[{...t,...a},l||n,u]},[{},null,1]).slice(0,2)}function TS(r,...e){if(r==null)return[null,null];for(let[t,n]of e){let i=t.exec(r);if(i)return n(i)}return[null,null]}function jIe(...r){return(e,t)=>{let n={},i;for(i=0;i<r.length;i++)n[r[i]]=Lb(e[t+i]);return[n,null,t+i]}}var VIe=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,jNt=`(?:${VIe.source}?(?:\\[(${UIe.source})\\])?)?`,q7=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,HIe=RegExp(`${q7.source}${jNt}`),F7=RegExp(`(?:[Tt]${HIe.source})?`),VNt=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,HNt=/(\d{4})-?W(\d\d)(?:-?(\d))?/,WNt=/(\d{4})-?(\d{3})/,$Nt=jIe("weekYear","weekNumber","weekDay"),KNt=jIe("year","ordinal"),GNt=/(\d{4})-(\d\d)-(\d\d)/,WIe=RegExp(`${q7.source} ?(?:${VIe.source}|(${UIe.source}))?`),YNt=RegExp(`(?: ${WIe.source})?`);function bS(r,e,t){let n=r[e];return Ti(n)?t:Lb(n)}function XNt(r,e){return[{year:bS(r,e),month:bS(r,e+1,1),day:bS(r,e+2,1)},null,e+3]}function kS(r,e){return[{hours:bS(r,e,0),minutes:bS(r,e+1,0),seconds:bS(r,e+2,0),milliseconds:P7(r[e+3])},null,e+4]}function gC(r,e){let t=!r[e]&&!r[e+1],n=Sq(r[e+1],r[e+2]),i=t?null:fp.instance(n);return[{},i,e+3]}function vC(r,e){let t=r[e]?Fb.create(r[e]):null;return[{},t,e+1]}var ZNt=RegExp(`^T?${q7.source}$`),JNt=/^-?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 QNt(r){let[e,t,n,i,o,a,l,u,f]=r,p=e[0]==="-",x=u&&u[0]==="-",T=(C,M=!1)=>C!==void 0&&(M||C&&p)?-C:C;return[{years:T(Yx(t)),months:T(Yx(n)),weeks:T(Yx(i)),days:T(Yx(o)),hours:T(Yx(a)),minutes:T(Yx(l)),seconds:T(Yx(u),u==="-0"),milliseconds:T(P7(f),x)}]}var eBt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function N7(r,e,t,n,i,o,a){let l={year:e.length===2?D7(Lb(e)):Lb(e),month:PIe.indexOf(t)+1,day:Lb(n),hour:Lb(i),minute:Lb(o)};return a&&(l.second=Lb(a)),r&&(l.weekday=r.length>3?qIe.indexOf(r)+1:FIe.indexOf(r)+1),l}var tBt=/^(?:(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 rBt(r){let[,e,t,n,i,o,a,l,u,f,p,x]=r,T=N7(e,i,n,t,o,a,l),C;return u?C=eBt[u]:f?C=0:C=Sq(p,x),[T,new fp(C)]}function nBt(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var iBt=/^(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$/,oBt=/^(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$/,aBt=/^(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 VDe(r){let[,e,t,n,i,o,a,l]=r;return[N7(e,i,n,t,o,a,l),fp.utcInstance]}function sBt(r){let[,e,t,n,i,o,a,l]=r;return[N7(e,l,t,n,i,o,a),fp.utcInstance]}var lBt=wS(VNt,F7),uBt=wS(HNt,F7),cBt=wS(WNt,F7),hBt=wS(HIe),$Ie=SS(XNt,kS,gC,vC),fBt=SS($Nt,kS,gC,vC),dBt=SS(KNt,kS,gC,vC),pBt=SS(kS,gC,vC);function mBt(r){return TS(r,[lBt,$Ie],[uBt,fBt],[cBt,dBt],[hBt,pBt])}function gBt(r){return TS(nBt(r),[tBt,rBt])}function vBt(r){return TS(r,[iBt,VDe],[oBt,VDe],[aBt,sBt])}function yBt(r){return TS(r,[JNt,QNt])}var bBt=SS(kS);function xBt(r){return TS(r,[ZNt,bBt])}var _Bt=wS(GNt,YNt),wBt=wS(WIe),SBt=SS(kS,gC,vC);function TBt(r){return TS(r,[_Bt,$Ie],[wBt,SBt])}var HDe="Invalid Duration",KIe={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},kBt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...KIe},up=146097/400,pS=146097/4800,EBt={years:{quarters:4,months:12,weeks:up/7,days:up,hours:up*24,minutes:up*24*60,seconds:up*24*60*60,milliseconds:up*24*60*60*1e3},quarters:{months:3,weeks:up/28,days:up/4,hours:up*24/4,minutes:up*24*60/4,seconds:up*24*60*60/4,milliseconds:up*24*60*60*1e3/4},months:{weeks:pS/7,days:pS,hours:pS*24,minutes:pS*24*60,seconds:pS*24*60*60,milliseconds:pS*24*60*60*1e3},...KIe},Zx=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ABt=Zx.slice(0).reverse();function Lv(r,e,t=!1){let n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new Lu(n)}function GIe(r,e){let t=e.milliseconds??0;for(let n of ABt.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function WDe(r,e){let t=GIe(r,e)<0?-1:1;Zx.reduceRight((n,i)=>{if(Ti(e[i]))return n;if(n){let o=e[n]*t,a=r[i][n],l=Math.floor(o/a);e[i]+=l*t,e[n]-=l*a*t}return i},null),Zx.reduce((n,i)=>{if(Ti(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*r[n][i]}return i},null)}function $De(r){let e={};for(let[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}var Lu=class r{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,n=t?EBt:kBt;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Na.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return r.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Mu(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new r({values:bq(e,r.normalizeUnit),loc:Na.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(qb(e))return r.fromMillis(e);if(r.isDuration(e))return e;if(typeof e=="object")return r.fromObject(e);throw new Mu(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[n]=yBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[n]=xBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Mu("need to specify a reason the Duration is invalid");let n=e instanceof hd?e:new hd(e,t);if(Ts.throwOnInvalid)throw new m7(n);return new r({invalid:n})}static normalizeUnit(e){let 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()];if(!t)throw new pq(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={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?cd.create(this.loc,n).formatDurationFromString(this,e):HDe}toHuman(e={}){if(!this.isValid)return HDe;let t=e.showZeros!==!1,n=Zx.map(i=>{let o=this.values[i];return Ti(o)||o===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);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 this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=R7(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},wa.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?GIe(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e),n={};for(let i of Zx)(_S(t.values,i)||_S(this.values,i))&&(n[i]=t.get(i)+this.get(i));return Lv(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=LIe(e(this.values[n],n));return Lv(this,{values:t},!0)}get(e){return this[r.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...bq(e,r.normalizeUnit)};return Lv(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){let a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return Lv(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return WDe(this.matrix,e),Lv(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=$De(this.normalize().shiftToAll().toObject());return Lv(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>r.normalizeUnit(a));let t={},n={},i=this.toObject(),o;for(let a of Zx)if(e.indexOf(a)>=0){o=a;let l=0;for(let f in n)l+=this.matrix[f][a]*n[f],n[f]=0;qb(i[a])&&(l+=i[a]);let u=Math.trunc(l);t[a]=u,n[a]=(l*1e3-u*1e3)/1e3}else qb(i[a])&&(n[a]=i[a]);for(let a in n)n[a]!==0&&(t[o]+=a===o?n[a]:n[a]/this.matrix[o][a]);return WDe(this.matrix,t),Lv(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;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Lv(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=$De(this.values);return Lv(this,{values:e},!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 this.invalid===null}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||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of Zx)if(!t(this.values[n],e.values[n]))return!1;return!0}},mS="Invalid Interval";function CBt(r,e){return!r||!r.isValid?xS.invalid("missing or invalid start"):!e||!e.isValid?xS.invalid("missing or invalid end"):e<r?xS.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}var xS=class r{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 Mu("need to specify a reason the Interval is invalid");let n=e instanceof hd?e:new hd(e,t);if(Ts.throwOnInvalid)throw new p7(n);return new r({invalid:n})}static fromDateTimes(e,t){let n=uC(e),i=uC(t),o=CBt(n,i);return o??new r({start:n,end:i})}static after(e,t){let n=Lu.fromDurationLike(t),i=uC(e);return r.fromDateTimes(i,i.plus(n))}static before(e,t){let n=Lu.fromDurationLike(t),i=uC(e);return r.fromDateTimes(i.minus(n),i)}static fromISO(e,t){let[n,i]=(e||"").split("/",2);if(n&&i){let o,a;try{o=wa.fromISO(n,t),a=o.isValid}catch{a=!1}let l,u;try{l=wa.fromISO(i,t),u=l.isValid}catch{u=!1}if(a&&u)return r.fromDateTimes(o,l);if(a){let f=Lu.fromISO(i,t);if(f.isValid)return r.after(o,f)}else if(u){let f=Lu.fromISO(n,t);if(f.isValid)return r.before(l,f)}}return r.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 this.invalidReason===null}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;let n=this.start.startOf(e,t),i;return t?.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=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):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?r.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(uC).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let a=t[o]||this.e,l=+a>+this.e?this.e:a;n.push(r.fromDateTimes(i,l)),i=l,o+=1}return n}splitBy(e){let t=Lu.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,a=[];for(;n<this.e;){let l=this.start.plus(t.mapUnits(u=>u*i));o=+l>+this.e?this.e:l,a.push(r.fromDateTimes(n,o)),n=o,i+=1}return a}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:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:r.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return r.fromDateTimes(t,n)}static merge(e){let[t,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[i,o.union(a)]:[i.concat([o]),a]:[i,a],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0,i=[],o=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...o),l=a.sort((u,f)=>u.time-f.time);for(let u of l)n+=u.type==="s"?1:-1,n===1?t=u.time:(t&&+t!=+u.time&&i.push(r.fromDateTimes(t,u.time)),t=null);return r.merge(i)}difference(...e){return r.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:mS}[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=mq,t={}){return this.isValid?cd.create(this.s.loc.clone(t),e).formatInterval(this):mS}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mS}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mS}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mS}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:mS}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Lu.invalid(this.invalidReason)}mapEndpoints(e){return r.fromDateTimes(e(this.s),e(this.e))}},vS=class{static hasDST(e=Ts.defaultZone){let t=wa.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Fb.isValidZone(e)}static normalizeZone(e){return Pb(e,Ts.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Na.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Na.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Na.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Na.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Na.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Na.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Na.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Na.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Na.create(t,null,"gregory").eras(e)}static features(){return{relative:IIe(),localeWeek:OIe()}}};function KDe(r,e){let t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(Lu.fromMillis(n).as("days"))}function DBt(r,e,t){let n=[["years",(u,f)=>f.year-u.year],["quarters",(u,f)=>f.quarter-u.quarter+(f.year-u.year)*4],["months",(u,f)=>f.month-u.month+(f.year-u.year)*12],["weeks",(u,f)=>{let p=KDe(u,f);return(p-p%7)/7}],["days",KDe]],i={},o=r,a,l;for(let[u,f]of n)t.indexOf(u)>=0&&(a=u,i[u]=f(r,e),l=o.plus(i),l>e?(i[u]--,r=o.plus(i),r>e&&(l=r,i[u]--,r=o.plus(i))):r=l);return[r,i,l,a]}function IBt(r,e,t,n){let[i,o,a,l]=DBt(r,e,t),u=e-i,f=t.filter(x=>["hours","minutes","seconds","milliseconds"].indexOf(x)>=0);f.length===0&&(a<e&&(a=i.plus({[l]:1})),a!==i&&(o[l]=(o[l]||0)+u/(a-i)));let p=Lu.fromObject(o,n);return f.length>0?Lu.fromMillis(u,n).shiftTo(...f).plus(p):p}var OBt="missing Intl.DateTimeFormat.formatToParts support";function aa(r,e=t=>t){return{regex:r,deser:([t])=>e(_Nt(t))}}var MBt="\xA0",YIe=`[ ${MBt}]`,XIe=new RegExp(YIe,"g");function LBt(r){return r.replace(/\./g,"\\.?").replace(XIe,YIe)}function GDe(r){return r.replace(/\./g,"").replace(XIe," ").toLowerCase()}function vm(r,e){return r===null?null:{regex:RegExp(r.map(LBt).join("|")),deser:([t])=>r.findIndex(n=>GDe(t)===GDe(n))+e}}function YDe(r,e){return{regex:r,deser:([,t,n])=>Sq(t,n),groups:e}}function lq(r){return{regex:r,deser:([e])=>e}}function PBt(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function RBt(r,e){let t=gm(e),n=gm(e,"{2}"),i=gm(e,"{3}"),o=gm(e,"{4}"),a=gm(e,"{6}"),l=gm(e,"{1,2}"),u=gm(e,"{1,3}"),f=gm(e,"{1,6}"),p=gm(e,"{1,9}"),x=gm(e,"{2,4}"),T=gm(e,"{4,6}"),C=R=>({regex:RegExp(PBt(R.val)),deser:([H])=>H,literal:!0}),L=(R=>{if(r.literal)return C(R);switch(R.val){case"G":return vm(e.eras("short"),0);case"GG":return vm(e.eras("long"),0);case"y":return aa(f);case"yy":return aa(x,D7);case"yyyy":return aa(o);case"yyyyy":return aa(T);case"yyyyyy":return aa(a);case"M":return aa(l);case"MM":return aa(n);case"MMM":return vm(e.months("short",!0),1);case"MMMM":return vm(e.months("long",!0),1);case"L":return aa(l);case"LL":return aa(n);case"LLL":return vm(e.months("short",!1),1);case"LLLL":return vm(e.months("long",!1),1);case"d":return aa(l);case"dd":return aa(n);case"o":return aa(u);case"ooo":return aa(i);case"HH":return aa(n);case"H":return aa(l);case"hh":return aa(n);case"h":return aa(l);case"mm":return aa(n);case"m":return aa(l);case"q":return aa(l);case"qq":return aa(n);case"s":return aa(l);case"ss":return aa(n);case"S":return aa(u);case"SSS":return aa(i);case"u":return lq(p);case"uu":return lq(l);case"uuu":return aa(t);case"a":return vm(e.meridiems(),0);case"kkkk":return aa(o);case"kk":return aa(x,D7);case"W":return aa(l);case"WW":return aa(n);case"E":case"c":return aa(t);case"EEE":return vm(e.weekdays("short",!1),1);case"EEEE":return vm(e.weekdays("long",!1),1);case"ccc":return vm(e.weekdays("short",!0),1);case"cccc":return vm(e.weekdays("long",!0),1);case"Z":case"ZZ":return YDe(new RegExp(`([+-]${l.source})(?::(${n.source}))?`),2);case"ZZZ":return YDe(new RegExp(`([+-]${l.source})(${n.source})?`),2);case"z":return lq(/[a-z_+-/]{1,256}?/i);case" ":return lq(/[^\S\n\r]/);default:return C(R)}})(r)||{invalidReason:OBt};return L.token=r,L}var qBt={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"}};function FBt(r,e,t){let{type:n,value:i}=r;if(n==="literal"){let u=/^\s+$/.test(i);return{literal:!u,val:u?" ":i}}let o=e[n],a=n;n==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let l=qBt[a];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function NBt(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function BBt(r,e,t){let n=r.match(e);if(n){let i={},o=1;for(let a in t)if(_S(t,a)){let l=t[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(n.slice(o,o+u))),o+=u}return[n,i]}else return[n,{}]}function zBt(r){let e=o=>{switch(o){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}},t=null,n;return Ti(r.z)||(t=Fb.create(r.z)),Ti(r.Z)||(t||(t=new fp(r.Z)),n=r.Z),Ti(r.q)||(r.M=(r.q-1)*3+1),Ti(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),Ti(r.u)||(r.S=P7(r.u)),[Object.keys(r).reduce((o,a)=>{let l=e(a);return l&&(o[l]=r[a]),o},{}),t,n]}var l7=null;function UBt(){return l7||(l7=wa.fromMillis(1555555555555)),l7}function jBt(r,e){if(r.literal)return r;let t=cd.macroTokenToFormatOpts(r.val),n=QIe(t,e);return n==null||n.includes(void 0)?r:n}function ZIe(r,e){return Array.prototype.concat(...r.map(t=>jBt(t,e)))}var xq=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=ZIe(cd.parseFormat(t),e),this.units=this.tokens.map(n=>RBt(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=NBt(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[t,n]=BBt(e,this.regex,this.handlers),[i,o,a]=n?zBt(n):[null,null,void 0];if(_S(n,"a")&&_S(n,"H"))throw new Rb("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:o,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function JIe(r,e,t){return new xq(r,t).explainFromTokens(e)}function VBt(r,e,t){let{result:n,zone:i,specificOffset:o,invalidReason:a}=JIe(r,e,t);return[n,i,o,a]}function QIe(r,e){if(!r)return null;let n=cd.create(e,r).dtFormatter(UBt()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(a=>FBt(a,r,o))}var u7="Invalid DateTime",XDe=864e13;function hC(r){return new hd("unsupported zone",`the zone "${r.name}" is not supported`)}function c7(r){return r.weekData===null&&(r.weekData=vq(r.c)),r.weekData}function h7(r){return r.localWeekData===null&&(r.localWeekData=vq(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function Xx(r,e){let t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new wa({...t,...e,old:t})}function eOe(r,e,t){let n=r-e*60*1e3,i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=t.offset(n);return i===o?[n,i]:[r-Math.min(i,o)*60*1e3,Math.max(i,o)]}function uq(r,e){r+=e*60*1e3;let t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function hq(r,e,t){return eOe(wq(r),e,t)}function ZDe(r,e){let t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...r.c,year:n,month:i,day:Math.min(r.c.day,yq(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=Lu.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=wq(o),[u,f]=eOe(l,t,r.zone);return a!==0&&(u+=a,f=r.zone.offset(u)),{ts:u,o:f}}function gS(r,e,t,n,i,o){let{setZone:a,zone:l}=t;if(r&&Object.keys(r).length!==0||e){let u=e||l,f=wa.fromObject(r,{...t,zone:u,specificOffset:o});return a?f:f.setZone(l)}else return wa.invalid(new hd("unparsable",`the input "${i}" can't be parsed as ${n}`))}function cq(r,e,t=!0){return r.isValid?cd.create(Na.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function f7(r,e,t){let n=r.c.year>9999||r.c.year<0,i="";if(n&&r.c.year>=0&&(i+="+"),i+=Vl(r.c.year,n?6:4),t==="year")return i;if(e){if(i+="-",i+=Vl(r.c.month),t==="month")return i;i+="-"}else if(i+=Vl(r.c.month),t==="month")return i;return i+=Vl(r.c.day),i}function JDe(r,e,t,n,i,o,a){let l=!t||r.c.millisecond!==0||r.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=Vl(r.c.hour),a==="hour")break;if(e){if(u+=":",u+=Vl(r.c.minute),a==="minute")break;l&&(u+=":",u+=Vl(r.c.second))}else{if(u+=Vl(r.c.minute),a==="minute")break;l&&(u+=Vl(r.c.second))}if(a==="second")break;l&&(!n||r.c.millisecond!==0)&&(u+=".",u+=Vl(r.c.millisecond,3))}return i&&(r.isOffsetFixed&&r.offset===0&&!o?u+="Z":r.o<0?(u+="-",u+=Vl(Math.trunc(-r.o/60)),u+=":",u+=Vl(Math.trunc(-r.o%60))):(u+="+",u+=Vl(Math.trunc(r.o/60)),u+=":",u+=Vl(Math.trunc(r.o%60)))),o&&(u+="["+r.zone.ianaName+"]"),u}var tOe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},HBt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},WBt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fq=["year","month","day","hour","minute","second","millisecond"],$Bt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],KBt=["year","ordinal","hour","minute","second","millisecond"];function dq(r){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[r.toLowerCase()];if(!e)throw new pq(r);return e}function QDe(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return dq(r)}}function GBt(r){if(fC===void 0&&(fC=Ts.now()),r.type!=="iana")return r.offset(fC);let e=r.name,t=I7.get(e);return t===void 0&&(t=r.offset(fC),I7.set(e,t)),t}function eIe(r,e){let t=Pb(e.zone,Ts.defaultZone);if(!t.isValid)return wa.invalid(hC(t));let n=Na.fromObject(e),i,o;if(Ti(r.year))i=Ts.now();else{for(let u of fq)Ti(r[u])&&(r[u]=tOe[u]);let a=CIe(r)||DIe(r);if(a)return wa.invalid(a);let l=GBt(t);[i,o]=hq(r,l,t)}return new wa({ts:i,zone:t,loc:n,o})}function tIe(r,e,t){let n=Ti(t.round)?!0:t.round,i=Ti(t.rounding)?"trunc":t.rounding,o=(l,u)=>(l=R7(l,n||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(l,u)),a=l=>t.calendary?e.hasSame(r,l)?0:e.startOf(l).diff(r.startOf(l),l).get(l):e.diff(r,l).get(l);if(t.unit)return o(a(t.unit),t.unit);for(let l of t.units){let u=a(l);if(Math.abs(u)>=1)return o(u,l)}return o(r>e?-0:0,t.units[t.units.length-1])}function rIe(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}var fC,I7=new Map,wa=class r{constructor(e){let t=e.zone||Ts.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new hd("invalid input"):null)||(t.isValid?null:hC(t));this.ts=Ti(e.ts)?Ts.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,o]=[e.old.c,e.old.o];else{let l=qb(e.o)&&!e.old?e.o:t.offset(this.ts);i=uq(this.ts,l),n=Number.isNaN(i.year)?new hd("invalid input"):null,i=n?null:i,o=n?null:l}this._zone=t,this.loc=e.loc||Na.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new r({})}static local(){let[e,t]=rIe(arguments),[n,i,o,a,l,u,f]=t;return eIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static utc(){let[e,t]=rIe(arguments),[n,i,o,a,l,u,f]=t;return e.zone=fp.utcInstance,eIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static fromJSDate(e,t={}){let n=ENt(e)?e.valueOf():NaN;if(Number.isNaN(n))return r.invalid("invalid input");let i=Pb(t.zone,Ts.defaultZone);return i.isValid?new r({ts:n,zone:i,loc:Na.fromObject(t)}):r.invalid(hC(i))}static fromMillis(e,t={}){if(qb(e))return e<-XDe||e>XDe?r.invalid("Timestamp out of range"):new r({ts:e,zone:Pb(t.zone,Ts.defaultZone),loc:Na.fromObject(t)});throw new Mu(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(qb(e))return new r({ts:e*1e3,zone:Pb(t.zone,Ts.defaultZone),loc:Na.fromObject(t)});throw new Mu("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let n=Pb(t.zone,Ts.defaultZone);if(!n.isValid)return r.invalid(hC(n));let i=Na.fromObject(t),o=bq(e,QDe),{minDaysInFirstWeek:a,startOfWeek:l}=BDe(o,i),u=Ts.now(),f=Ti(t.specificOffset)?n.offset(u):t.specificOffset,p=!Ti(o.ordinal),x=!Ti(o.year),T=!Ti(o.month)||!Ti(o.day),C=x||T,M=o.weekYear||o.weekNumber;if((C||p)&&M)throw new Rb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&p)throw new Rb("Can't mix ordinal dates with month/day");let L=M||o.weekday&&!C,R,H,$=uq(u,f);L?(R=$Bt,H=HBt,$=vq($,a,l)):p?(R=KBt,H=WBt,$=s7($)):(R=fq,H=tOe);let Q=!1;for(let qe of R){let Ee=o[qe];Ti(Ee)?Q?o[qe]=H[qe]:o[qe]=$[qe]:Q=!0}let K=L?SNt(o,a,l):p?TNt(o):CIe(o),te=K||DIe(o);if(te)return r.invalid(te);let fe=L?FDe(o,a,l):p?NDe(o):o,[re,ve]=hq(fe,f,n),_e=new r({ts:re,zone:n,o:ve,loc:i});return o.weekday&&C&&e.weekday!==_e.weekday?r.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${_e.toISO()}`):_e.isValid?_e:r.invalid(_e.invalid)}static fromISO(e,t={}){let[n,i]=mBt(e);return gS(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[n,i]=gBt(e);return gS(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[n,i]=vBt(e);return gS(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Ti(e)||Ti(t))throw new Mu("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,a=Na.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[l,u,f,p]=VBt(a,e,t);return p?r.invalid(p):gS(l,u,n,`format ${t}`,e,f)}static fromString(e,t,n={}){return r.fromFormat(e,t,n)}static fromSQL(e,t={}){let[n,i]=TBt(e);return gS(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Mu("need to specify a reason the DateTime is invalid");let n=e instanceof hd?e:new hd(e,t);if(Ts.throwOnInvalid)throw new d7(n);return new r({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=QIe(e,Na.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return ZIe(cd.parseFormat(e),Na.fromObject(t)).map(i=>i.val).join("")}static resetCache(){fC=void 0,I7.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}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?c7(this).weekYear:NaN}get weekNumber(){return this.isValid?c7(this).weekNumber:NaN}get weekday(){return this.isValid?c7(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?h7(this).weekday:NaN}get localWeekNumber(){return this.isValid?h7(this).weekNumber:NaN}get localWeekYear(){return this.isValid?h7(this).weekYear:NaN}get ordinal(){return this.isValid?s7(this.c).ordinal:NaN}get monthShort(){return this.isValid?vS.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?vS.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?vS.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?vS.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?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=wq(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),a=this.zone.offset(n-i*t),l=this.zone.offset(n-o*t);if(a===l)return[this];let u=n-a*t,f=n-l*t,p=uq(u,a),x=uq(f,l);return p.hour===x.hour&&p.minute===x.minute&&p.second===x.second&&p.millisecond===x.millisecond?[Xx(this,{ts:u}),Xx(this,{ts:f})]:[this]}get isInLeapYear(){return mC(this.year)}get daysInMonth(){return yq(this.year,this.month)}get daysInYear(){return this.isValid?yS(this.year):NaN}get weeksInWeekYear(){return this.isValid?pC(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?pC(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:i}=cd.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(fp.instance(e),t)}toLocal(){return this.setZone(Ts.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=Pb(e,Ts.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){let o=e.offset(this.ts),a=this.toObject();[i]=hq(a,o,e)}return Xx(this,{ts:i,zone:e})}else return r.invalid(hC(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Xx(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=bq(e,QDe),{minDaysInFirstWeek:n,startOfWeek:i}=BDe(t,this.loc),o=!Ti(t.weekYear)||!Ti(t.weekNumber)||!Ti(t.weekday),a=!Ti(t.ordinal),l=!Ti(t.year),u=!Ti(t.month)||!Ti(t.day),f=l||u,p=t.weekYear||t.weekNumber;if((f||a)&&p)throw new Rb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new Rb("Can't mix ordinal dates with month/day");let x;o?x=FDe({...vq(this.c,n,i),...t},n,i):Ti(t.ordinal)?(x={...this.toObject(),...t},Ti(t.day)&&(x.day=Math.min(yq(x.year,x.month),x.day))):x=NDe({...s7(this.c),...t});let[T,C]=hq(x,this.o,this.zone);return Xx(this,{ts:T,o:C})}plus(e){if(!this.isValid)return this;let t=Lu.fromDurationLike(e);return Xx(this,ZDe(this,t))}minus(e){if(!this.isValid)return this;let t=Lu.fromDurationLike(e).negate();return Xx(this,ZDe(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},i=Lu.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;break}if(i==="weeks")if(t){let o=this.loc.getStartOfWeek(),{weekday:a}=this;a<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+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?cd.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):u7}toLocaleString(e=mq,t={}){return this.isValid?cd.create(this.loc.clone(t),e).formatDateTime(this):u7}toLocaleParts(e={}){return this.isValid?cd.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=dq(a);let l=e==="extended",u=f7(this,l,a);return fq.indexOf(a)>=3&&(u+="T"),u+=JDe(this,l,t,n,i,o,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?f7(this,e==="extended",dq(t)):null}toISOWeekDate(){return cq(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:a="extended",precision:l="milliseconds"}={}){return this.isValid?(l=dq(l),(i&&fq.indexOf(l)>=3?"T":"")+JDe(this,a==="extended",t,e,n,o,l)):null}toRFC2822(){return cq(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return cq(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?f7(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")),cq(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():u7}[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{};let 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 Lu.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=ANt(t).map(Lu.normalizeUnit),a=e.valueOf()>this.valueOf(),l=a?this:e,u=a?e:this,f=IBt(l,u,o,i);return a?f.negate():f}diffNow(e="milliseconds",t={}){return this.diff(r.now(),e,t)}until(e){return this.isValid?xS.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=i&&i<=o.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;let t=e.base||r.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),tIe(t,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?tIe(e.base||r.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(r.isDateTime))throw new Mu("min requires all arguments be DateTimes");return zDe(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(r.isDateTime))throw new Mu("max requires all arguments be DateTimes");return zDe(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:i=null,numberingSystem:o=null}=n,a=Na.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return JIe(a,e,t)}static fromStringExplain(e,t,n={}){return r.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:i=null}=t,o=Na.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new xq(o,e)}static fromFormatParser(e,t,n={}){if(Ti(e)||Ti(t))throw new Mu("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,a=Na.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!a.equals(t.locale))throw new Mu(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);let{result:l,zone:u,specificOffset:f,invalidReason:p}=t.explainFromTokens(e);return p?r.invalid(p):gS(l,u,n,`format ${t.format}`,e,f)}static get DATE_SHORT(){return mq}static get DATE_MED(){return nIe}static get DATE_MED_WITH_WEEKDAY(){return iNt}static get DATE_FULL(){return iIe}static get DATE_HUGE(){return oIe}static get TIME_SIMPLE(){return aIe}static get TIME_WITH_SECONDS(){return sIe}static get TIME_WITH_SHORT_OFFSET(){return lIe}static get TIME_WITH_LONG_OFFSET(){return uIe}static get TIME_24_SIMPLE(){return cIe}static get TIME_24_WITH_SECONDS(){return hIe}static get TIME_24_WITH_SHORT_OFFSET(){return fIe}static get TIME_24_WITH_LONG_OFFSET(){return dIe}static get DATETIME_SHORT(){return pIe}static get DATETIME_SHORT_WITH_SECONDS(){return mIe}static get DATETIME_MED(){return gIe}static get DATETIME_MED_WITH_SECONDS(){return vIe}static get DATETIME_MED_WITH_WEEKDAY(){return oNt}static get DATETIME_FULL(){return yIe}static get DATETIME_FULL_WITH_SECONDS(){return bIe}static get DATETIME_HUGE(){return xIe}static get DATETIME_HUGE_WITH_SECONDS(){return _Ie}};function uC(r){if(wa.isDateTime(r))return r;if(r&&r.valueOf&&qb(r.valueOf()))return wa.fromJSDate(r);if(r&&typeof r=="object")return wa.fromObject(r);throw new Mu(`Unknown datetime argument: ${r}, of type ${typeof r}`)}function YBt(r){return new Date(new Date(r).getTime()+new Date(r).getTimezoneOffset()*60*1e3)}var XBt="y/LL/dd",yC="TT",kq=class extends Xt{static targets=["input","fakeInput"];static values={view:String,timezone:String,format:String,enableTime:Boolean,pickerFormat:String,firstDayOfWeek:Number,time24Hr:Boolean,disableMobile:Boolean,noCalendar:Boolean,relative:Boolean,fieldType:{type:String,default:"dateTime"},pickerOptions:{type:Object,default:{}}};flatpickrInstance;cachedInitialValue;get browserZone(){return wa.local().zoneName}get initialValue(){return this.isOnShow||this.isOnIndex?this.context.element.innerText:this.isOnEdit?this.inputTarget.value:null}get isOnIndex(){return this.viewValue==="index"}get isOnEdit(){return this.viewValue==="edit"}get isOnShow(){return this.viewValue==="show"}get fieldIsDate(){return this.fieldTypeValue==="date"}get fieldIsDateTime(){return this.fieldTypeValue==="dateTime"}get fieldIsTime(){return this.fieldTypeValue==="time"}get fieldHasTime(){return this.fieldIsTime||this.fieldIsDateTime}get parsedValue(){return wa.fromISO(this.initialValue.trim(),{zone:"UTC"})}get displayTimezone(){return this.timezoneValue||this.browserZone}get locale(){return document.documentElement.lang||"en"}connect(){this.cacheInitialValue(),this.isOnShow||this.isOnIndex?this.initShow():this.isOnEdit&&this.initEdit()}disconnect(){this.isOnShow||this.isOnIndex?this.context.element.innerText=this.cachedInitialValue:this.isOnEdit&&this.flatpickrInstance&&this.flatpickrInstance.destroy()}cacheInitialValue(){this.cachedInitialValue=this.initialValue}initShow(){let r=this.parsedValue;if(this.fieldHasTime&&this.relativeValue)if(this.fieldIsTime){let e=r.toFormat(yC);r=wa.fromFormat(e,yC,{zone:"UTC"}).setZone(this.displayTimezone)}else r=r.setZone(this.displayTimezone);this.context.element.innerText=r.toFormat(this.formatValue,{locale:this.locale})}initEdit(){let r={enableTime:!1,enableSeconds:!1,time_24hr:this.time24HrValue,locale:{firstDayOfWeek:0},altInput:!0,onChange:this.onChange.bind(this),onClose:this.onClose.bind(this),noCalendar:!1,...this.pickerOptionsValue};if(r.altFormat=this.pickerFormatValue,r.disableMobile=this.disableMobileValue,r.locale.firstDayOfWeek=this.firstDayOfWeekValue,r.enableTime=this.enableTimeValue,r.enableSeconds=this.enableTimeValue,r.noCalendar=this.noCalendarValue,this.fieldHasTime&&(r.dateFormat="Y-m-d H:i:S"),this.initialValue)switch(this.fieldTypeValue){case"date":r.defaultDate=YBt(this.initialValue);break;case"time":{let e=this.parsedValue.toFormat(yC);r.defaultDate=wa.fromFormat(e,yC,{zone:"UTC"}).setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO()}break;case"dateTime":r.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break;default:break}this.flatpickrInstance=dS(this.fakeInputTarget,r),this.initialValue&&this.inputTarget.dispatchEvent(new Event("change",{bubbles:!0}))}onChange(r){if(r.length===0){this.updateRealInput("");return}let e=wa.fromISO(r[0].toISOString()).setZone(this.displayTimezone,{keepLocalTime:!0}).setZone("UTC",{keepLocalTime:!this.relativeValue}),t;switch(this.fieldTypeValue){case"time":t=e.toFormat(yC);break;case"date":t=e.toFormat(XBt);break;case"dateTime":t=e.toISO();break;default:break}this.updateRealInput(t)}onClose(r,e,t){if(t.config.allowInput&&t.altInput.value){let{value:n}=t.altInput;n?t.setDate(n,!0,t.config.altFormat):this.updateRealInput("")}}updateRealInput(r){this.inputTarget.value=r}clear(){this.fakeInputTarget._flatpickr.clear()}};var Eq=class extends Sf{static targets=["input"];static values={class:String,pickerOptions:Object};getFilterValue(){return this.inputTarget.value}getFilterClass(){return this.classValue}connect(){this.initFlatpickr()}initFlatpickr(){this.pickerInstance=dS(this.inputTarget,this.pickerOptionsValue)}clear(){this.inputTarget._flatpickr.clear()}};var Aq=class extends Xt{static values={chartId:String};toggleSlice({params:r,currentTarget:e}){let t=this.chart();t&&(t.toggleDataVisibility(r.index),t.update(),e.classList.toggle("distribution-chart__row--inactive",!t.getDataVisibility(r.index)))}highlightSlice({params:r}){let e=this.chart();if(!e||!e.getDataVisibility(r.index))return;let t=e.data.datasets[0],n=new Array(t.data.length).fill(0);n[r.index]=32,t.offset=n,e.update()}clearHighlight(){let r=this.chart();r&&(r.data.datasets[0].offset=0,r.update())}chart(){return window.Chartkick?.charts?.[this.chartIdValue]?.getChartObject?.()??null}};var B7=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function z7(r,e,t,n){r.addEventListener?r.addEventListener(e,t,n):r.attachEvent&&r.attachEvent("on".concat(e),t)}function bC(r,e,t,n){r.removeEventListener?r.removeEventListener(e,t,n):r.detachEvent&&r.detachEvent("on".concat(e),t)}function iOe(r,e){let t=e.slice(0,e.length-1);for(let n=0;n<t.length;n++)t[n]=r[t[n].toLowerCase()];return t}function oOe(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");let e=r.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function ZBt(r,e){let t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0;for(let o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}var wC={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":B7?173:189,"=":B7?61:187,";":B7?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},bm={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},xC={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},hc={16:!1,18:!1,17:!1,91:!1},Us={};for(let r=1;r<20;r++)wC["f".concat(r)]=111+r;var ks=[],_C=null,aOe="all",Rv=new Map,ES=r=>wC[r.toLowerCase()]||bm[r.toLowerCase()]||r.toUpperCase().charCodeAt(0),JBt=r=>Object.keys(wC).find(e=>wC[e]===r),QBt=r=>Object.keys(bm).find(e=>bm[e]===r);function sOe(r){aOe=r||"all"}function SC(){return aOe||"all"}function ezt(){return ks.slice(0)}function tzt(){return ks.map(r=>JBt(r)||QBt(r)||String.fromCharCode(r))}function rzt(){let r=[];return Object.keys(Us).forEach(e=>{Us[e].forEach(t=>{let{key:n,scope:i,mods:o,shortcut:a}=t;r.push({scope:i,shortcut:a,mods:o,keys:n.split("+").map(l=>ES(l))})})}),r}function nzt(r){let e=r.target||r.srcElement,{tagName:t}=e,n=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n}function izt(r){return typeof r=="string"&&(r=ES(r)),ks.indexOf(r)!==-1}function ozt(r,e){let t,n;r||(r=SC());for(let i in Us)if(Object.prototype.hasOwnProperty.call(Us,i))for(t=Us[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1).forEach(a=>{let{element:l}=a;return j7(l)}):n++;SC()===r&&sOe(e||"all")}function azt(r){let e=r.keyCode||r.which||r.charCode;r.key&&r.key.toLowerCase()==="capslock"&&(e=ES(r.key));let t=ks.indexOf(e);if(t>=0&&ks.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&ks.splice(0,ks.length),(e===93||e===224)&&(e=91),e in hc){hc[e]=!1;for(let n in bm)bm[n]===e&&(qv[n]=!1)}}function lOe(r){if(typeof r>"u")Object.keys(Us).forEach(i=>{Array.isArray(Us[i])&&Us[i].forEach(o=>Cq(o)),delete Us[i]}),j7(null);else if(Array.isArray(r))r.forEach(i=>{i.key&&Cq(i)});else if(typeof r=="object")r.key&&Cq(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];let[i,o]=t;typeof i=="function"&&(o=i,i=""),Cq({key:r,scope:i,method:o,splitKey:"+"})}}var Cq=r=>{let{key:e,scope:t,method:n,splitKey:i="+"}=r;oOe(e).forEach(a=>{let l=a.split(i),u=l.length,f=l[u-1],p=f==="*"?"*":ES(f);if(!Us[p])return;t||(t=SC());let x=u>1?iOe(bm,l):[],T=[];Us[p]=Us[p].filter(C=>{let L=(n?C.method===n:!0)&&C.scope===t&&ZBt(C.mods,x);return L&&T.push(C.element),!L}),T.forEach(C=>j7(C))})};function rOe(r,e,t,n){if(e.element!==n)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in hc)Object.prototype.hasOwnProperty.call(hc,o)&&(!hc[o]&&e.mods.indexOf(+o)>-1||hc[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!hc[16]&&!hc[18]&&!hc[17]&&!hc[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(ks),e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0)))}}function nOe(r,e){let t=Us["*"],n=r.keyCode||r.which||r.charCode;if(r.key&&r.key.toLowerCase()==="capslock"||!qv.filter.call(this,r))return;if((n===93||n===224)&&(n=91),ks.indexOf(n)===-1&&n!==229&&ks.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(l=>{let u=xC[l];r[l]&&ks.indexOf(u)===-1?ks.push(u):!r[l]&&ks.indexOf(u)>-1?ks.splice(ks.indexOf(u),1):l==="metaKey"&&r[l]&&(ks=ks.filter(f=>f in xC||f===n))}),n in hc){hc[n]=!0;for(let l in bm)if(Object.prototype.hasOwnProperty.call(bm,l)){let u=xC[bm[l]];qv[l]=r[u]}if(!t)return}for(let l in hc)Object.prototype.hasOwnProperty.call(hc,l)&&(hc[l]=r[xC[l]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(ks.indexOf(17)===-1&&ks.push(17),ks.indexOf(18)===-1&&ks.push(18),hc[17]=!0,hc[18]=!0);let i=SC();if(t)for(let l=0;l<t.length;l++)t[l].scope===i&&(r.type==="keydown"&&t[l].keydown||r.type==="keyup"&&t[l].keyup)&&rOe(r,t[l],i,e);if(!(n in Us))return;let o=Us[n],a=o.length;for(let l=0;l<a;l++)if((r.type==="keydown"&&o[l].keydown||r.type==="keyup"&&o[l].keyup)&&o[l].key){let u=o[l],{splitKey:f}=u,p=u.key.split(f),x=[];for(let T=0;T<p.length;T++)x.push(ES(p[T]));x.sort().join("")===ks.sort().join("")&&rOe(r,u,i,e)}}function qv(r,e,t){ks=[];let n=oOe(r),i=[],o="all",a=document,l=0,u=!1,f=!0,p="+",x=!1,T=!1;for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(f=e.keydown),e.capture!==void 0&&(x=e.capture),typeof e.splitKey=="string"&&(p=e.splitKey),e.single===!0&&(T=!0)),typeof e=="string"&&(o=e),T&&lOe(r,o);l<n.length;l++)r=n[l].split(p),i=[],r.length>1&&(i=iOe(bm,r)),r=r[r.length-1],r=r==="*"?"*":ES(r),r in Us||(Us[r]=[]),Us[r].push({keyup:u,keydown:f,scope:o,mods:i,shortcut:n[l],method:t,key:n[l],splitKey:p,element:a});if(typeof a<"u"&&window){if(!Rv.has(a)){let C=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return nOe(L,a)},M=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;nOe(L,a),azt(L)};Rv.set(a,{keydownListener:C,keyupListenr:M,capture:x}),z7(a,"keydown",C,x),z7(a,"keyup",M,x)}if(!_C){let C=()=>{ks=[]};_C={listener:C,capture:x},z7(window,"focus",C,x)}}}function szt(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Us).forEach(t=>{Us[t].filter(i=>i.scope===e&&i.shortcut===r).forEach(i=>{i&&i.method&&i.method()})})}function j7(r){let e=Object.values(Us).flat();if(e.findIndex(n=>{let{element:i}=n;return i===r})<0){let{keydownListener:n,keyupListenr:i,capture:o}=Rv.get(r)||{};n&&i&&(bC(r,"keyup",i,o),bC(r,"keydown",n,o),Rv.delete(r))}if((e.length<=0||Rv.size<=0)&&(Object.keys(Rv).forEach(i=>{let{keydownListener:o,keyupListenr:a,capture:l}=Rv.get(i)||{};o&&a&&(bC(i,"keyup",a,l),bC(i,"keydown",o,l),Rv.delete(i))}),Rv.clear(),Object.keys(Us).forEach(i=>delete Us[i]),_C)){let{listener:i,capture:o}=_C;bC(window,"focus",i,o),_C=null}}var U7={getPressedKeyString:tzt,setScope:sOe,getScope:SC,deleteScope:ozt,getPressedKeyCodes:ezt,getAllKeyCodes:rzt,isPressed:izt,filter:nzt,trigger:szt,unbind:lOe,keyMap:wC,modifier:bm,modifierMap:xC};for(let r in U7)Object.prototype.hasOwnProperty.call(U7,r)&&(qv[r]=U7[r]);if(typeof window<"u"){let r=window.hotkeys;qv.noConflict=e=>(e&&window.hotkeys===qv&&(window.hotkeys=r),qv),window.hotkeys=qv}var lzt=(r,e,t)=>{let n=r;return t===!0?n=`${e.identifier}:${r}`:typeof t=="string"&&(n=`${t}:${r}`),n},uzt=(r,e,t)=>{let{bubbles:n,cancelable:i,composed:o}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(t,{originalEvent:e}),new CustomEvent(r,{bubbles:n,cancelable:i,composed:o,detail:t})};function czt(r){let e=r.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=t&&e.top+e.height>=0,o=e.left<=n&&e.left+e.width>=0;return i&&o}var hzt={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},Dq=(r,e={})=>{let{onlyVisible:t,dispatchEvent:n,events:i,eventPrefix:o}=Object.assign({},hzt,e),a=p=>{let x=e?.element||r.element;if(!(x.contains(p.target)||!czt(x)&&t)&&(r.clickOutside&&r.clickOutside(p),n)){let T=lzt("click:outside",r,o),C=uzt(T,p,{controller:r});x.dispatchEvent(C)}},l=()=>{i?.forEach(p=>{window.addEventListener(p,a,!1)})},u=()=>{i?.forEach(p=>{window.removeEventListener(p,a,!1)})},f=r.disconnect.bind(r);return Object.assign(r,{disconnect(){u(),f()}}),l(),[l,u]};var V7=class extends Xt{};V7.debounces=[];var H7=class extends Xt{};H7.throttles=[];var Iq=class extends Xt{static targets=["menu"];static values={exemptionContainers:Array,logger:Boolean,flip:Boolean};get exemptionContainerTargets(){return this.exemptionContainersValue.map(r=>document.querySelector(r)).filter(Boolean)}get isOpen(){return this.menuTarget.hasAttribute("open")}get focusableItems(){return[...this.menuTarget.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}clickOutside(r){this.hasMenuTarget&&!(this.hasExemptionContainersValue&&this.exemptionContainerTargets.some(t=>t.contains(r.target)))&&this.isOpen&&this.close()}connect(){Dq(this),this.boundHandleKeydown=this.handleKeydown.bind(this)}disconnect(){this.element.removeEventListener("keydown",this.boundHandleKeydown)}toggle(){this.isOpen?this.close():this.open()}open(){this.menuTarget.show(),this.maybeFlip(),this.element.addEventListener("keydown",this.boundHandleKeydown),document.body.classList.add("dropdown-open"),this.dispatch("open",{bubbles:!0}),requestAnimationFrame(()=>{let r=this.focusableItems;if(r.length===0)return;(r.find(t=>[...t.classList].some(n=>n.endsWith("--active"))||t.getAttribute("aria-selected")==="true")||r[0]).focus()})}close(){this.menuTarget.close(),this.element.removeEventListener("keydown",this.boundHandleKeydown),document.body.classList.remove("dropdown-open")}maybeFlip(){!this.flipValue||!this.hasMenuTarget||(this.menuTarget.classList.remove("start-auto","end-0"),this.menuTarget.classList.add("start-0","end-auto"),this.menuTarget.getBoundingClientRect().right>document.documentElement.clientWidth&&(this.menuTarget.classList.remove("start-0","end-auto"),this.menuTarget.classList.add("start-auto","end-0")))}handleKeydown(r){let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),this.close();break;default:}}};var Oq=class extends Xt{static targets=["searchInput","empty"];get focusableItems(){return[...this.element.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}connect(){this.boundHandleKeydown=this.handleKeydown.bind(this),this.boundOnToggle=this.onToggle.bind(this),this.element.addEventListener("toggle",this.boundOnToggle),this.element.addEventListener("keydown",this.boundHandleKeydown)}disconnect(){this.element.removeEventListener("toggle",this.boundOnToggle),this.element.removeEventListener("keydown",this.boundHandleKeydown)}onToggle(r){r.newState==="open"&&(this.hasSearchInputTarget&&this.resetFilter(),requestAnimationFrame(()=>{if(this.hasSearchInputTarget){this.searchInputTarget.focus();return}let e=this.focusableItems;if(e.length===0)return;(e.find(n=>n.classList.contains("dropdown-menu__item--active"))||e[0]).focus()}))}filter(){let r=this.searchInputTarget.value.trim().toLowerCase(),e=!1;this.element.querySelectorAll(".dropdown-menu__list a, .dropdown-menu__list button").forEach(t=>{let n=t.dataset.filterText??t.textContent,i=r===""||n.replace(/\s+/g," ").trim().toLowerCase().includes(r);t.hidden=!i,i&&(e=!0)}),this.hasEmptyTarget&&(this.emptyTarget.hidden=e||r==="")}resetFilter(){this.searchInputTarget.value="",this.filter()}handleKeydown(r){if(this.element.matches(":popover-open"))switch(r.key){case"ArrowDown":case"ArrowUp":{let e=this.focusableItems;if(e.length===0)return;r.preventDefault();let t=e.indexOf(document.activeElement);r.key==="ArrowDown"?e[t<e.length-1?t+1:0].focus():e[t>0?t-1:e.length-1].focus();break}case"Escape":r.preventDefault(),r.stopPropagation(),this.hasSearchInputTarget&&this.searchInputTarget.value!==""?(this.resetFilter(),this.searchInputTarget.focus()):this.element.hidePopover();break;default:}}};var sMe=Yo(aMe()),sF=class extends Xt{static targets=["element"];get view(){return this.elementTarget.dataset.view}get componentOptions(){try{return JSON.parse(this.elementTarget.dataset.componentOptions)}catch{return{}}}get isDark(){return document.documentElement.classList.contains("dark")}get resolvedTheme(){return this.isDark?"monokai":"default"}connect(){let r={element:this.elementTarget,spellChecker:this.componentOptions.spell_checker,autoRefresh:{delay:500},theme:this.resolvedTheme};this.view==="show"&&(r.toolbar=!1,r.status=!1),this.easyMde=new sMe.default(r),this.view==="show"&&(this.easyMde.codemirror.options.readOnly=!0),this.easyMde.codemirror.on("keydown",(t,n)=>{n.key==="Escape"&&this.easyMde.codemirror.getInputField().blur()});let e=this;this.observer=new MutationObserver(()=>{e.easyMde.codemirror.setOption("theme",e.resolvedTheme)}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}disconnect(){this.observer&&this.observer.disconnect(),this.easyMde&&(this.easyMde.toTextArea(),this.easyMde=null)}};var lF=class extends Xt{submit(r){r.key&&this.element.requestSubmit()}};var uF=class extends Xt{static targets=["icon"];mousemove(r){let n=r.clientX,i=r.clientY;this.iconTargets.forEach(o=>{let a=o.getBoundingClientRect(),l=a.left+a.width/2,u=a.top+a.height/2,f=l-n,p=u-i,x=Math.sqrt(f*f+p*p);if(x<90&&x>0){let T=parseFloat(o.dataset.repulsionScale??1),C=(1-x/90)*30*T;o.style.setProperty("--tx",`${f/x*C}px`),o.style.setProperty("--ty",`${p/x*C}px`),o.classList.add("grid-card__icon--repelling")}else o.style.setProperty("--tx","0px"),o.style.setProperty("--ty","0px"),o.classList.remove("grid-card__icon--repelling")})}mouseleave(){this.iconTargets.forEach(r=>{r.style.setProperty("--tx","0px"),r.style.setProperty("--ty","0px"),r.classList.remove("grid-card__icon--repelling")})}};var n3t=32,cF=class extends Xt{static targets=["row","trigger"];connect(){this.items=Array.from(this.rowTarget.children),this.bindAriaExpanded(),this.popoverItems=this.collectPopoverItems(),this.scheduleUpdate=this.scheduleUpdate.bind(this),this.resizeObserver=new ResizeObserver(this.scheduleUpdate),this.resizeObserver.observe(this.element),this.update()}collectPopoverItems(){if(!this.popoverElement)return[];let r=this.popoverElement.querySelector(".dropdown-menu__list");return r?Array.from(r.children):[]}disconnect(){this.resizeObserver?.disconnect(),this.rafId&&cancelAnimationFrame(this.rafId),this.popoverElement&&this.handlePopoverToggle&&this.popoverElement.removeEventListener("toggle",this.handlePopoverToggle)}bindAriaExpanded(){if(!this.hasTriggerTarget)return;let r=this.triggerTarget.getAttribute("popovertarget");this.popoverElement=r?document.getElementById(r):null,this.popoverElement&&(this.handlePopoverToggle=e=>{this.triggerTarget.setAttribute("aria-expanded",e.newState==="open"?"true":"false")},this.popoverElement.addEventListener("toggle",this.handlePopoverToggle))}scheduleUpdate(){this.rafId||(this.rafId=requestAnimationFrame(()=>{this.rafId=null,this.update()}))}update(){if(this.items.length===0){this.element.classList.remove("header-menu--has-overflow"),this.element.classList.remove("header-menu--row-empty"),this.element.classList.add("header-menu--empty");return}this.element.classList.remove("header-menu--empty"),this.items.forEach(T=>{T.style.display=""}),this.truncatedItem&&(this.truncatedItem.classList.remove("header-menu__item--truncated"),this.truncatedItem.style.maxWidth="",this.truncatedItem=null);let r=this.hasTriggerTarget?this.triggerTarget.offsetWidth:0,e=this.element.clientWidth,t=window.getComputedStyle(this.rowTarget),n=parseFloat(t.columnGap)||parseFloat(t.gap)||0,i=this.items.length,o=0;for(let T=0;T<this.items.length;T+=1){let C=o+(T===0?0:n)+this.items[T].offsetWidth,L=T<this.items.length-1?e-r-n:e;if(C>L){i=T;break}o=C}let a=-1;if(i<this.items.length){let T=o+(i>0?n:0),C=e-r-n-T;C>=n3t&&(a=i,this.truncatedItem=this.items[a],this.truncatedItem.classList.add("header-menu__item--truncated"),this.truncatedItem.style.maxWidth=`${Math.floor(C)}px`)}let l=i+(a>=0?1:0);for(let T=l;T<this.items.length;T+=1)this.items[T].style.display="none";let f=this.rowTarget.clientWidth>0?l:0;this.popoverItems.forEach((T,C)=>{T.style.display=C<f?"none":""});let p=i<this.items.length;this.element.classList.toggle("header-menu--has-overflow",p);let x=i>0||a>=0;this.element.classList.toggle("header-menu--row-empty",!x)}};var hF=class extends Xt{static targets=["content"];showContent(r){this.contentTarget.classList.toggle("hidden"),r.target.classList.add("hidden")}};var i3t="input, textarea, select, [contenteditable]",fF=class extends Xt{static targets=["table"];initialize(){this.handleKeydown=this.handleKeydown.bind(this),this.handleDropdownOpen=this.handleDropdownOpen.bind(this),this.handleAdvanceRequest=this.handleAdvanceRequest.bind(this),this.handleTableBlur=this.handleTableBlur.bind(this)}connect(){this.currentIndex=-1,this.hotkeysEnabled=window.Avo?.configuration?.hotkeys?.enabled!==!1,document.addEventListener("keydown",this.handleKeydown),document.addEventListener("dropdown-menu:open",this.handleDropdownOpen),document.addEventListener("avo:advance-resource-table",this.handleAdvanceRequest),this.hotkeysEnabled&&this.element.querySelectorAll("tr[data-visit-path] [data-hotkey]").forEach(e=>{let t=e.getAttribute("data-hotkey");e.setAttribute("data-hotkey-original",t),e.removeAttribute("data-hotkey")})}disconnect(){document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("dropdown-menu:open",this.handleDropdownOpen),document.removeEventListener("avo:advance-resource-table",this.handleAdvanceRequest)}tableTargetConnected(r){r.addEventListener("blur",this.handleTableBlur),this.currentIndex=-1}tableTargetDisconnected(r){r.removeEventListener("blur",this.handleTableBlur)}handleDropdownOpen(){let r=this.rows();r.length&&this.clearFocus(r)}handleAdvanceRequest(r){if(!this.hasTableTarget)return;let e=r.detail?.direction==="previous"?"previous":"next",t=this.rows();t.length&&(this.tableTarget.focus({preventScroll:!0}),this.moveFocus(t,e))}handleTableBlur(){let r=this.rows();r.length&&this.clearFocus(r)}handleKeydown(r){if(r.defaultPrevented||document.body.classList.contains("modal-open")||document.body.classList.contains("dropdown-open")||r.target.closest(i3t)||r.repeat&&(r.key==="Enter"||r.key==="Escape"||r.key===" "))return;let e=this.rows();if(e.length&&this.tableHasFocus()&&!(this.hotkeysEnabled&&this.currentIndex!==-1&&this.handleRowHotkey(r,e))&&["ArrowDown","ArrowUp","Enter","Escape"," "].includes(r.key)){if(this.currentIndex=this.normalizeCurrentIndex(e.length),r.key==="Escape"){if(this.currentIndex!==-1){r.preventDefault(),this.clearFocus(e);return}let t=this.application.getControllerForElementAndIdentifier(this.element.querySelector('[data-controller~="item-select-all"]'),"item-select-all");if(t&&JSON.parse(t.element.dataset.selectedResources||"[]").length>0){r.preventDefault(),t.deselectAll();return}r.preventDefault(),this.tableTarget.blur();return}if(r.key==="Enter"){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex];t?.dataset.visitPath&&window.Turbo.visit(t.dataset.visitPath);return}if(r.key===" "){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex].querySelector('[data-item-select-all-target="itemCheckbox"]');t&&t.click();return}r.preventDefault(),this.moveFocus(e,r.key==="ArrowDown"?"next":"previous")}}moveFocus(r,e){e==="next"?this.currentIndex=this.currentIndex<r.length-1?this.currentIndex+1:0:this.currentIndex=this.currentIndex>0?this.currentIndex-1:r.length-1,r.forEach((t,n)=>t.classList.toggle("is-keyboard-focused",n===this.currentIndex)),r[this.currentIndex].scrollIntoView({block:"nearest"}),this.syncActiveDescendant(r[this.currentIndex]),this.hotkeysEnabled&&this.syncRowHotkeys(r)}rows(){return Array.from(this.element.querySelectorAll("tr[data-visit-path]"))}tableHasFocus(){return this.hasTableTarget?this.tableTarget===document.activeElement||this.tableTarget.contains(document.activeElement):!1}syncActiveDescendant(r){this.hasTableTarget&&(r?.id?this.tableTarget.setAttribute("aria-activedescendant",r.id):this.tableTarget.removeAttribute("aria-activedescendant"))}normalizeCurrentIndex(r){return this.currentIndex<-1?-1:this.currentIndex>=r?r-1:this.currentIndex}syncRowHotkeys(r){r.forEach((e,t)=>{e.querySelectorAll("[data-hotkey-original]").forEach(i=>{if(t===this.currentIndex){let o=i.getAttribute("data-hotkey-original");i.setAttribute("data-hotkey",o)}else i.removeAttribute("data-hotkey")})})}handleRowHotkey(r,e){let t=e[this.currentIndex];if(!t)return!1;let n=t.querySelector(`[data-hotkey="${r.key}"]`);return n?(r.preventDefault(),r.stopImmediatePropagation(),n.click(),!0):!1}clearFocus(r){r.forEach(e=>e.classList.remove("is-keyboard-focused")),this.currentIndex=-1,this.hasTableTarget&&this.tableTarget.removeAttribute("aria-activedescendant"),r.forEach(e=>{e.querySelectorAll("[data-hotkey-original]").forEach(t=>{t.removeAttribute("data-hotkey")})})}};var dF=class extends Xt{static targets=["element"];focus({params:r}){let e=this.context.element.querySelector(r.selector);this.element&&e.focus()}};var pF=class extends Xt{static targets=["itemCheckbox","checkbox","selectAllOverlay","unselectedMessage","selectedMessage"];static values={pageCount:Number,selectedAll:Boolean,selectedAllQuery:String};connect(){this.resourceName=this.element.dataset.resourceName,this.selectedResourcesObserver=new nS(this.element,"data-selected-resources",this),this.selectedResourcesObserver.start()}elementAttributeValueChanged(r){let e=JSON.parse(r.dataset.selectedResources),t=this.element.querySelectorAll("tbody tr").length;this.checkboxTarget.indeterminate=!1,this.checkboxTarget.checked=!1,e.length===t?this.checkboxTarget.checked=!0:e.length===0?this.checkboxTarget.checked=!1:e.length>0&&e.length<t&&(this.checkboxTarget.indeterminate=!0)}disconnect(){this.selectedResourcesObserver.stop()}deselectAll(){this.itemCheckboxTargets.forEach(r=>r.checked&&r.click()),this.checkboxTarget.checked=!1,this.selectAllEnabled()&&(this.selectAllOverlay(!1),this.resetUnselected())}toggle(r){let e=!!r.target.checked;this.itemCheckboxTargets.forEach(t=>t.checked!==e&&t.click()),this.selectAllEnabled()&&(this.selectAllOverlay(e),e||this.resetUnselected())}selectRow(){let r=!0;this.itemCheckboxTargets.forEach(e=>r=r&&e.checked),this.checkboxTarget.checked=r,this.selectAllEnabled()&&(this.selectAllOverlay(r),this.resetUnselected()),this.updateLinks("resourceIds")}selectAll(r){r.preventDefault(),this.selectedAllValue=!this.selectedAllValue,this.unselectedMessageTarget.classList.toggle("hidden"),this.selectedMessageTarget.classList.toggle("hidden"),this.selectedAllValue?this.updateLinks("selectedQuery"):this.updateLinks("resourceIds")}updateLinks(r){document.querySelectorAll(`a[data-actions-picker-target][data-resource-name="${this.resourceName}"]`).forEach(t=>{try{let n=new URL(t.href);if(Array.from(n.searchParams.keys()).filter(i=>i.startsWith("fields[")).forEach(i=>n.searchParams.delete(i)),r==="resourceIds"){let i=JSON.parse(this.element.dataset.selectedResources).join(",");n.searchParams.set("fields[avo_resource_ids]",i),n.searchParams.set("fields[avo_selected_all]","false")}else if(r==="selectedQuery"){let i=this.element.dataset.itemSelectAllSelectedAllQueryValue;n.searchParams.set("fields[avo_index_query]",i),n.searchParams.set("fields[avo_selected_all]","true")}t.href=n.toString()}catch(n){console.error("Error updating link:",t,n)}})}resetUnselected(){this.selectedAllValue=!1,this.unselectedMessageTarget.classList.remove("hidden"),this.selectedMessageTarget.classList.add("hidden")}selectAllOverlay(r){r?this.selectAllOverlayTarget.classList.remove("hidden"):this.selectAllOverlayTarget.classList.add("hidden")}selectAllEnabled(){return this.pageCountValue>1&&this.selectedAllQueryValue!=="select_all_disabled"}};var mF=class extends Xt{static targets=["panel"];checkbox={};get actionLinks(){return document.querySelectorAll('a[data-actions-picker-target="resourceAction"]')}get currentIds(){try{return JSON.parse(this.stateHolderElement.dataset.selectedResources)}catch{return[]}}set currentIds(r){this.stateHolderElement.dataset.selectedResources=JSON.stringify(r),this.actionLinks.length>0&&(r.length>0?this.enableResourceActions():this.disableResourceActions())}connect(){this.resourceName=this.element.dataset.resourceName,this.resourceId=this.element.dataset.resourceId,this.stateHolderElement=document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`)}addToSelected(){let r=this.currentIds;r.push(this.resourceId),this.element.closest("tr")&&this.element.closest("tr").classList.add("selected-row"),this.currentIds=r}removeFromSelected(){this.element.closest("tr")&&this.element.closest("tr").classList.remove("selected-row"),this.currentIds=this.currentIds.filter(r=>r.toString()!==this.resourceId)}toggle(r){this.checkbox=r.target,this.checkbox.checked?this.addToSelected():this.removeFromSelected()}enableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.remove(r.dataset.disabledClasses),r.setAttribute("data-href",r.getAttribute("href")),r.dataset.disabled=!1,r.removeAttribute("tabindex"),r.setAttribute("aria-disabled","false"))})}disableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.add(r.dataset.disabledClasses),r.setAttribute("href",r.getAttribute("data-href")),r.dataset.disabled=!0,r.setAttribute("tabindex","-1"),r.setAttribute("aria-disabled","true"))})}};var gF=class extends Xt{static targets=["input","section","row","empty"];connect(){this.modal=this.element.closest(".modal"),this.modal&&(this.handleToggle=this.onModalToggle.bind(this),this.modal.addEventListener("toggle",this.handleToggle))}disconnect(){this.modal&&this.modal.removeEventListener("toggle",this.handleToggle)}onModalToggle(r){r.newState==="open"?(this.reset(),requestAnimationFrame(()=>this.inputTarget.focus())):this.reset()}filter(){let r=this.inputTarget.value.trim().toLowerCase(),e=!1;this.sectionTargets.forEach(t=>{let n=!1;this.rowsFor(t).forEach(i=>{let o=r===""||this.searchText(i).includes(r);i.hidden=!o,o&&(n=!0)}),t.hidden=!n,n&&(e=!0)}),this.hasEmptyTarget&&(this.emptyTarget.hidden=e||r==="")}clearOnEscape(r){this.inputTarget.value!==""&&(r.stopPropagation(),this.reset(),this.inputTarget.focus())}reset(){this.inputTarget.value="",this.filter()}rowsFor(r){return this.rowTargets.filter(e=>r.contains(e))}searchText(r){return r.dataset.searchText||(r.dataset.searchText=r.textContent.replace(/\s+/g," ").trim().toLowerCase()),r.dataset.searchText}};function lMe(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function o3t(r){if(Array.isArray(r))return r}function a3t(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,o,a,l=[],u=!0,f=!1;try{if(o=(t=t.call(r)).next,e!==0)for(;!(u=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(p){f=!0,i=p}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}function s3t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
661
661
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l3t(r,e){return o3t(r)||a3t(r,e)||u3t(r,e)||s3t()}function u3t(r,e){if(r){if(typeof r=="string")return lMe(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lMe(r,e):void 0}}var SMe=Object.entries,uMe=Object.setPrototypeOf,c3t=Object.isFrozen,h3t=Object.getPrototypeOf,f3t=Object.getOwnPropertyDescriptor,fc=Object.freeze,dc=Object.seal,LS=Object.create,TMe=typeof Reflect<"u"&&Reflect,lK=TMe.apply,uK=TMe.construct;fc||(fc=function(e){return e});dc||(dc=function(e){return e});lK||(lK=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return e.apply(t,i)});uK||(uK=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)});var OS=Hl(Array.prototype.forEach),d3t=Hl(Array.prototype.lastIndexOf),cMe=Hl(Array.prototype.pop),MS=Hl(Array.prototype.push),p3t=Hl(Array.prototype.splice),Ub=Array.isArray,DC=Hl(String.prototype.toLowerCase),nK=Hl(String.prototype.toString),hMe=Hl(String.prototype.match),AC=Hl(String.prototype.replace),fMe=Hl(String.prototype.indexOf),m3t=Hl(String.prototype.trim),g3t=Hl(Number.prototype.toString),v3t=Hl(Boolean.prototype.toString),dMe=typeof BigInt>"u"?null:Hl(BigInt.prototype.toString),pMe=typeof Symbol>"u"?null:Hl(Symbol.prototype.toString),Ru=Hl(Object.prototype.hasOwnProperty),CC=Hl(Object.prototype.toString),Pu=Hl(RegExp.prototype.test),r_=y3t(TypeError);function Hl(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return lK(r,e,n)}}function y3t(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return uK(r,t)}}function Ro(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:DC;if(uMe&&uMe(r,null),!Ub(e))return r;let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let o=t(i);o!==i&&(c3t(e)||(e[n]=o),i=o)}r[i]=!0}return r}function b3t(r){for(let e=0;e<r.length;e++)Ru(r,e)||(r[e]=null);return r}function kh(r){let e=LS(null);for(let n of SMe(r)){var t=l3t(n,2);let i=t[0],o=t[1];Ru(r,i)&&(Ub(o)?e[i]=b3t(o):o&&typeof o=="object"&&o.constructor===Object?e[i]=kh(o):e[i]=o)}return e}function x3t(r){switch(typeof r){case"string":return r;case"number":return g3t(r);case"boolean":return v3t(r);case"bigint":return dMe?dMe(r):"0";case"symbol":return pMe?pMe(r):"Symbol()";case"undefined":return CC(r);case"function":case"object":{if(r===null)return CC(r);let e=r,t=_g(e,"toString");if(typeof t=="function"){let n=t(e);return typeof n=="string"?n:CC(n)}return CC(r)}default:return CC(r)}}function _g(r,e){for(;r!==null;){let n=f3t(r,e);if(n){if(n.get)return Hl(n.get);if(typeof n.value=="function")return Hl(n.value)}r=h3t(r)}function t(){return null}return t}function _3t(r){try{return Pu(r,""),!0}catch{return!1}}var mMe=fc(["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"]),iK=fc(["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"]),oK=fc(["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"]),w3t=fc(["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"]),aK=fc(["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"]),S3t=fc(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gMe=fc(["#text"]),vMe=fc(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),sK=fc(["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","dominant-baseline","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-orientation","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"]),yMe=fc(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vF=fc(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),T3t=dc(/{{[\w\W]*|^[\w\W]*}}/g),k3t=dc(/<%[\w\W]*|^[\w\W]*%>/g),E3t=dc(/\${[\w\W]*/g),A3t=dc(/^data-[\-\w.\u00B7-\uFFFF]+$/),C3t=dc(/^aria-[\-\w]+$/),bMe=dc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),D3t=dc(/^(?:\w+script|data):/i),I3t=dc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),O3t=dc(/^html$/i),M3t=dc(/^[a-z][.\w]*(-[.\w]+)+$/i),xMe=dc(/<[/\w!]/g),_Me=dc(/<[/\w]/g),L3t=dc(/<\/no(script|embed|frames)/i),P3t=dc(/\/>/i),pd={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},R3t=function(){return typeof window>"u"?null:window},q3t=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},wMe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},zb=function(e,t,n,i){return Ru(e,t)&&Ub(e[t])?Ro(i.base?kh(i.base):{},e[t],i.transform):n};function kMe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:R3t(),e=cr=>kMe(cr);if(e.version="3.4.12",e.removed=[],!r||!r.document||r.document.nodeType!==pd.document||!r.Element)return e.isSupported=!1,e;let t=r.document,n=t,i=n.currentScript;r.DocumentFragment;let o=r.HTMLTemplateElement,a=r.Node,l=r.Element,u=r.NodeFilter,f=r.NamedNodeMap;f===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let p=r.DOMParser,x=r.trustedTypes,T=l.prototype,C=_g(T,"cloneNode"),M=_g(T,"remove"),L=_g(T,"nextSibling"),R=_g(T,"childNodes"),H=_g(T,"parentNode"),$=_g(T,"shadowRoot"),Q=_g(T,"attributes"),K=a&&a.prototype?_g(a.prototype,"nodeType"):null,te=a&&a.prototype?_g(a.prototype,"nodeName"):null;if(typeof o=="function"){let cr=t.createElement("template");cr.content&&cr.content.ownerDocument&&(t=cr.content.ownerDocument)}let fe,re="",ve,_e=!1,qe=0,Ee=function(){if(qe>0)throw r_('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},U=function(We){Ee(),qe++;try{return fe.createHTML(We)}finally{qe--}},j=function(We){Ee(),qe++;try{return fe.createScriptURL(We)}finally{qe--}},xe=function(){return _e||(ve=q3t(x,i),_e=!0),ve},Ie=t,he=Ie.implementation,ie=Ie.createNodeIterator,ce=Ie.createDocumentFragment,Me=Ie.getElementsByTagName,ge=n.importNode,se=wMe();e.isSupported=typeof SMe=="function"&&typeof H=="function"&&he&&he.createHTMLDocument!==void 0;let Ke=T3t,xt=k3t,it=E3t,_t=A3t,ct=C3t,Mt=D3t,Ht=I3t,Nt=M3t,fr=bMe,Gt=null,Zt=Ro({},[...mMe,...iK,...oK,...aK,...gMe]),vt=null,yt=Ro({},[...vMe,...sK,...yMe,...vF]),Ye=Object.seal(LS(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}})),me=null,De=null,ze=Object.seal(LS(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),dr=!0,lt=!0,Ut=!1,kt=!0,zr=!1,or=!0,kr=!1,Sr=!1,at=null,rt=null,Yt=!1,Yr=!1,hi=!1,vi=!1,Fi=!0,Wt=!1,Ft="user-content-",Pr=!0,xr=!1,wn={},Dn=null,On=Ro({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),$n=null,co=Ro({},["audio","video","img","source","image","track"]),Yn=null,G=Ro({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),X="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml",Oe=ye,je=!1,et=null,ke=Ro({},[X,oe,ye],nK),Ue=fc(["mi","mo","mn","ms","mtext"]),ot=Ro({},Ue),Ct=fc(["annotation-xml"]),jt=Ro({},Ct),Dt=Ro({},["title","style","font","a","script"]),Kt=null,Ar=["application/xhtml+xml","text/html"],ur="text/html",It=null,_r=null,lr=t.createElement("form"),hr=function(We){return We instanceof RegExp||We instanceof Function},Tn=function(){let We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_r&&_r===We)return;(!We||typeof We!="object")&&(We={}),We=kh(We),Kt=Ar.indexOf(We.PARSER_MEDIA_TYPE)===-1?ur:We.PARSER_MEDIA_TYPE,It=Kt==="application/xhtml+xml"?nK:DC,Gt=zb(We,"ALLOWED_TAGS",Zt,{transform:It}),vt=zb(We,"ALLOWED_ATTR",yt,{transform:It}),et=zb(We,"ALLOWED_NAMESPACES",ke,{transform:nK}),Yn=zb(We,"ADD_URI_SAFE_ATTR",G,{transform:It,base:G}),$n=zb(We,"ADD_DATA_URI_TAGS",co,{transform:It,base:co}),Dn=zb(We,"FORBID_CONTENTS",On,{transform:It}),me=zb(We,"FORBID_TAGS",kh({}),{transform:It}),De=zb(We,"FORBID_ATTR",kh({}),{transform:It}),wn=Ru(We,"USE_PROFILES")?We.USE_PROFILES&&typeof We.USE_PROFILES=="object"?kh(We.USE_PROFILES):We.USE_PROFILES:!1,dr=We.ALLOW_ARIA_ATTR!==!1,lt=We.ALLOW_DATA_ATTR!==!1,Ut=We.ALLOW_UNKNOWN_PROTOCOLS||!1,kt=We.ALLOW_SELF_CLOSE_IN_ATTR!==!1,zr=We.SAFE_FOR_TEMPLATES||!1,or=We.SAFE_FOR_XML!==!1,kr=We.WHOLE_DOCUMENT||!1,Yr=We.RETURN_DOM||!1,hi=We.RETURN_DOM_FRAGMENT||!1,vi=We.RETURN_TRUSTED_TYPE||!1,Yt=We.FORCE_BODY||!1,Fi=We.SANITIZE_DOM!==!1,Wt=We.SANITIZE_NAMED_PROPS||!1,Pr=We.KEEP_CONTENT!==!1,xr=We.IN_PLACE||!1,fr=_3t(We.ALLOWED_URI_REGEXP)?We.ALLOWED_URI_REGEXP:bMe,Oe=typeof We.NAMESPACE=="string"?We.NAMESPACE:ye,ot=Ru(We,"MATHML_TEXT_INTEGRATION_POINTS")&&We.MATHML_TEXT_INTEGRATION_POINTS&&typeof We.MATHML_TEXT_INTEGRATION_POINTS=="object"?kh(We.MATHML_TEXT_INTEGRATION_POINTS):Ro({},Ue),jt=Ru(We,"HTML_INTEGRATION_POINTS")&&We.HTML_INTEGRATION_POINTS&&typeof We.HTML_INTEGRATION_POINTS=="object"?kh(We.HTML_INTEGRATION_POINTS):Ro({},Ct);let Rt=Ru(We,"CUSTOM_ELEMENT_HANDLING")&&We.CUSTOM_ELEMENT_HANDLING&&typeof We.CUSTOM_ELEMENT_HANDLING=="object"?kh(We.CUSTOM_ELEMENT_HANDLING):LS(null);if(Ye=LS(null),Ru(Rt,"tagNameCheck")&&hr(Rt.tagNameCheck)&&(Ye.tagNameCheck=Rt.tagNameCheck),Ru(Rt,"attributeNameCheck")&&hr(Rt.attributeNameCheck)&&(Ye.attributeNameCheck=Rt.attributeNameCheck),Ru(Rt,"allowCustomizedBuiltInElements")&&typeof Rt.allowCustomizedBuiltInElements=="boolean"&&(Ye.allowCustomizedBuiltInElements=Rt.allowCustomizedBuiltInElements),dc(Ye),zr&&(lt=!1),hi&&(Yr=!0),wn&&(Gt=Ro({},gMe),vt=LS(null),wn.html===!0&&(Ro(Gt,mMe),Ro(vt,vMe)),wn.svg===!0&&(Ro(Gt,iK),Ro(vt,sK),Ro(vt,vF)),wn.svgFilters===!0&&(Ro(Gt,oK),Ro(vt,sK),Ro(vt,vF)),wn.mathMl===!0&&(Ro(Gt,aK),Ro(vt,yMe),Ro(vt,vF))),ze.tagCheck=null,ze.attributeCheck=null,Ru(We,"ADD_TAGS")&&(typeof We.ADD_TAGS=="function"?ze.tagCheck=We.ADD_TAGS:Ub(We.ADD_TAGS)&&(Gt===Zt&&(Gt=kh(Gt)),Ro(Gt,We.ADD_TAGS,It))),Ru(We,"ADD_ATTR")&&(typeof We.ADD_ATTR=="function"?ze.attributeCheck=We.ADD_ATTR:Ub(We.ADD_ATTR)&&(vt===yt&&(vt=kh(vt)),Ro(vt,We.ADD_ATTR,It))),Ru(We,"ADD_URI_SAFE_ATTR")&&Ub(We.ADD_URI_SAFE_ATTR)&&Ro(Yn,We.ADD_URI_SAFE_ATTR,It),Ru(We,"FORBID_CONTENTS")&&Ub(We.FORBID_CONTENTS)&&(Dn===On&&(Dn=kh(Dn)),Ro(Dn,We.FORBID_CONTENTS,It)),Ru(We,"ADD_FORBID_CONTENTS")&&Ub(We.ADD_FORBID_CONTENTS)&&(Dn===On&&(Dn=kh(Dn)),Ro(Dn,We.ADD_FORBID_CONTENTS,It)),Pr&&(Gt["#text"]=!0),kr&&Ro(Gt,["html","head","body"]),Gt.table&&(Ro(Gt,["tbody"]),delete me.tbody),We.TRUSTED_TYPES_POLICY){if(typeof We.TRUSTED_TYPES_POLICY.createHTML!="function")throw r_('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof We.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw r_('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let pr=fe;fe=We.TRUSTED_TYPES_POLICY;try{re=U("")}catch(pn){throw fe=pr,pn}}else We.TRUSTED_TYPES_POLICY===null?(fe=void 0,re=""):(fe===void 0&&(fe=xe()),fe&&typeof re=="string"&&(re=U("")));fc&&fc(We),_r=We},Tr=Ro({},[...iK,...oK,...w3t]),Ve=Ro({},[...aK,...S3t]),ar=function(We,Rt,pr){return Rt.namespaceURI===ye?We==="svg":Rt.namespaceURI===X?We==="svg"&&(pr==="annotation-xml"||ot[pr]):!!Tr[We]},er=function(We,Rt,pr){return Rt.namespaceURI===ye?We==="math":Rt.namespaceURI===oe?We==="math"&&jt[pr]:!!Ve[We]},Fr=function(We,Rt,pr){return Rt.namespaceURI===oe&&!jt[pr]||Rt.namespaceURI===X&&!ot[pr]?!1:!Ve[We]&&(Dt[We]||!Tr[We])},$r=function(We){let Rt=H(We);(!Rt||!Rt.tagName)&&(Rt={namespaceURI:Oe,tagName:"template"});let pr=DC(We.tagName),pn=DC(Rt.tagName);return et[We.namespaceURI]?We.namespaceURI===oe?ar(pr,Rt,pn):We.namespaceURI===X?er(pr,Rt,pn):We.namespaceURI===ye?Fr(pr,Rt,pn):!!(Kt==="application/xhtml+xml"&&et[We.namespaceURI]):!1},un=function(We){MS(e.removed,{element:We});try{H(We).removeChild(We)}catch{if(M(We),!H(We))throw r_("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Zr=function(We){Sn(We);let Rt=R(We);if(Rt){let pn=[];OS(Rt,Ln=>{MS(pn,Ln)}),OS(pn,Ln=>{try{M(Ln)}catch{}})}let pr=Q(We);if(pr)for(let pn=pr.length-1;pn>=0;--pn){let Ln=pr[pn],Gn=Ln&&Ln.name;if(typeof Gn=="string")try{We.removeAttribute(Gn)}catch{}}},mr=function(We,Rt){try{MS(e.removed,{attribute:Rt.getAttributeNode(We),from:Rt})}catch{MS(e.removed,{attribute:null,from:Rt})}if(Rt.removeAttribute(We),We==="is")if(Yr||hi)try{un(Rt)}catch{}else try{Rt.setAttribute(We,"")}catch{}},cn=function(We){let Rt=Q(We);if(Rt)for(let pr=Rt.length-1;pr>=0;--pr){let pn=Rt[pr],Ln=pn&&pn.name;if(!(typeof Ln!="string"||vt[It(Ln)]))try{We.removeAttribute(Ln)}catch{}}},Sn=function(We){let Rt=[We];for(;Rt.length>0;){let pr=Rt.pop();(K?K(pr):pr.nodeType)===pd.element&&cn(pr);let Ln=R(pr);if(Ln)for(let Gn=Ln.length-1;Gn>=0;--Gn)Rt.push(Ln[Gn])}},Mr=function(We){if(!or)return;let Rt=[We];for(;Rt.length>0;){let pr=Rt.pop(),pn=K?K(pr):pr.nodeType;if(pn===pd.processingInstruction||pn===pd.comment&&Pu(_Me,pr.data)){try{M(pr)}catch{}continue}if(pn===pd.element){let Gn=pr,Li=It(te?te(pr):pr.nodeName);try{Gn.hasAttribute&&Gn.hasAttribute("patchsrc")&&Gn.removeAttribute("patchsrc"),Gn.hasAttribute&&Gn.hasAttribute("for")&&Li!=="label"&&Li!=="output"&&Gn.removeAttribute("for")}catch{}}let Ln=R(pr);if(Ln)for(let Gn=Ln.length-1;Gn>=0;--Gn)Rt.push(Ln[Gn])}},V=function(We){let Rt=null,pr=null;if(Yt)We="<remove></remove>"+We;else{let Gn=hMe(We,/^[\r\n\t ]+/);pr=Gn&&Gn[0]}Kt==="application/xhtml+xml"&&Oe===ye&&(We='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+We+"</body></html>");let pn=fe?U(We):We;if(Oe===ye)try{Rt=new p().parseFromString(pn,Kt)}catch{}if(!Rt||!Rt.documentElement){Rt=he.createDocument(Oe,"template",null);try{Rt.documentElement.innerHTML=je?re:pn}catch{}}let Ln=Rt.body||Rt.documentElement;return We&&pr&&Ln.insertBefore(t.createTextNode(pr),Ln.childNodes[0]||null),Oe===ye?Me.call(Rt,kr?"html":"body")[0]:kr?Rt.documentElement:Ln},W=function(We){return ie.call(We.ownerDocument||We,We,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Se=function(We){return We=AC(We,Ke," "),We=AC(We,xt," "),We=AC(We,it," "),We},Be=function(We){var Rt;We.normalize();let pr=ie.call(We.ownerDocument||We,We,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),pn=pr.nextNode();for(;pn;)pn.data=Se(pn.data),pn=pr.nextNode();let Ln=(Rt=We.querySelectorAll)===null||Rt===void 0?void 0:Rt.call(We,"template");Ln&&OS(Ln,Gn=>{bt(Gn.content)&&Be(Gn.content)})},$e=function(We){let Rt=te?te(We):null;return typeof Rt!="string"||It(Rt)!=="form"?!1:typeof We.nodeName!="string"||typeof We.textContent!="string"||typeof We.removeChild!="function"||We.attributes!==Q(We)||typeof We.removeAttribute!="function"||typeof We.setAttribute!="function"||typeof We.namespaceURI!="string"||typeof We.insertBefore!="function"||typeof We.hasChildNodes!="function"||We.nodeType!==K(We)||We.childNodes!==R(We)},bt=function(We){if(!K||typeof We!="object"||We===null)return!1;try{return K(We)===pd.documentFragment}catch{return!1}},rr=function(We){if(!K||typeof We!="object"||We===null)return!1;try{return typeof K(We)=="number"}catch{return!1}};function Rr(cr,We,Rt){cr.length!==0&&OS(cr,pr=>{pr.call(e,We,Rt,_r)})}let Xr=function(We,Rt){return!!(or&&We.hasChildNodes()&&!rr(We.firstElementChild)&&Pu(xMe,We.textContent)&&Pu(xMe,We.innerHTML)||or&&We.namespaceURI===ye&&Rt==="style"&&rr(We.firstElementChild)||We.nodeType===pd.processingInstruction||or&&We.nodeType===pd.comment&&Pu(_Me,We.data))},dn=function(We,Rt){if(!me[Rt]&&Xn(Rt)&&(Ye.tagNameCheck instanceof RegExp&&Pu(Ye.tagNameCheck,Rt)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(Rt)))return!1;if(Pr&&!Dn[Rt]){let pr=H(We),pn=R(We);if(pn&&pr){let Ln=pn.length;for(let Gn=Ln-1;Gn>=0;--Gn){let Li=xr?pn[Gn]:C(pn[Gn],!0);pr.insertBefore(Li,L(We))}}}return un(We),!0},jn=function(We,Rt){if(Rr(se.beforeSanitizeElements,We,null),We!==Rt&&H(We)===null)return!0;if($e(We))return un(We),!0;let pr=It(te?te(We):We.nodeName);if(Rr(se.uponSanitizeElement,We,{tagName:pr,allowedTags:Gt}),We!==Rt&&H(We)===null)return!0;if(Xr(We,pr))return un(We),!0;if(me[pr]||!(ze.tagCheck instanceof Function&&ze.tagCheck(pr))&&!Gt[pr]){let Ln=dn(We,pr);return Ln===!1&&Rr(se.afterSanitizeElements,We,null),Ln}if((K?K(We):We.nodeType)===pd.element&&!$r(We)||(pr==="noscript"||pr==="noembed"||pr==="noframes")&&Pu(L3t,We.innerHTML))return un(We),!0;if(zr&&We.nodeType===pd.text){let Ln=Se(We.textContent);We.textContent!==Ln&&(MS(e.removed,{element:We.cloneNode()}),We.textContent=Ln)}return Rr(se.afterSanitizeElements,We,null),!1},Er=function(We,Rt,pr){if(De[Rt]||or&&Rt==="patchsrc"||or&&Rt==="for"&&We!=="label"&&We!=="output"||Fi&&(Rt==="id"||Rt==="name")&&(pr in t||pr in lr))return!1;let pn=vt[Rt]||ze.attributeCheck instanceof Function&&ze.attributeCheck(Rt,We);if(!(lt&&Pu(_t,Rt))){if(!(dr&&Pu(ct,Rt))){if(pn){if(!Yn[Rt]){if(!Pu(fr,AC(pr,Ht,""))){if(!((Rt==="src"||Rt==="xlink:href"||Rt==="href")&&We!=="script"&&fMe(pr,"data:")===0&&$n[We])){if(!(Ut&&!Pu(Mt,AC(pr,Ht,"")))){if(pr)return!1}}}}}else if(!(Xn(We)&&(Ye.tagNameCheck instanceof RegExp&&Pu(Ye.tagNameCheck,We)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(We))&&(Ye.attributeNameCheck instanceof RegExp&&Pu(Ye.attributeNameCheck,Rt)||Ye.attributeNameCheck instanceof Function&&Ye.attributeNameCheck(Rt,We))||Rt==="is"&&Ye.allowCustomizedBuiltInElements&&(Ye.tagNameCheck instanceof RegExp&&Pu(Ye.tagNameCheck,pr)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(pr))))return!1}}return!0},Mn=Ro({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xn=function(We){return!Mn[DC(We)]&&Pu(Nt,We)},ns=function(We,Rt,pr,pn){if(fe&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!pr)switch(x.getAttributeType(We,Rt)){case"TrustedHTML":return U(pn);case"TrustedScriptURL":return j(pn)}return pn},wo=function(We,Rt,pr,pn){try{pr?We.setAttributeNS(pr,Rt,pn):We.setAttribute(Rt,pn),$e(We)?un(We):cMe(e.removed)}catch{mr(Rt,We)}},Jc=function(We){Rr(se.beforeSanitizeAttributes,We,null);let Rt=We.attributes;if(!Rt||$e(We))return;let pr={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt,forceKeepAttr:void 0},pn=Rt.length,Ln=It(We.nodeName);for(;pn--;){let Gn=Rt[pn],Li=Gn.name,sa=Gn.namespaceURI,is=Gn.value,ho=It(Li),Ca=is,Fo=Li==="value"?Ca:m3t(Ca);if(pr.attrName=ho,pr.attrValue=Fo,pr.keepAttr=!0,pr.forceKeepAttr=void 0,Rr(se.uponSanitizeAttribute,We,pr),Fo=pr.attrValue,Wt&&(ho==="id"||ho==="name")&&fMe(Fo,Ft)!==0&&(mr(Li,We),Fo=Ft+Fo),or&&Pu(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Fo)){mr(Li,We);continue}if(ho==="attributename"&&hMe(Fo,"href")){mr(Li,We);continue}if(!pr.forceKeepAttr){if(!pr.keepAttr){mr(Li,We);continue}if(!kt&&Pu(P3t,Fo)){mr(Li,We);continue}if(zr&&(Fo=Se(Fo)),!Er(Ln,ho,Fo)){mr(Li,We);continue}Fo=ns(Ln,ho,sa,Fo),Fo!==Ca&&wo(We,Li,sa,Fo)}}Rr(se.afterSanitizeAttributes,We,null)},Aa=function(We){let Rt=null,pr=W(We);for(Rr(se.beforeSanitizeShadowDOM,We,null);Rt=pr.nextNode();)if(Rr(se.uponSanitizeShadowNode,Rt,null),jn(Rt,We),Jc(Rt),bt(Rt.content)&&Aa(Rt.content),(K?K(Rt):Rt.nodeType)===pd.element){let Ln=$(Rt);bt(Ln)&&(ni(Ln),Aa(Ln))}Rr(se.afterSanitizeShadowDOM,We,null)},ni=function(We){let Rt=[{node:We,shadow:null}];for(;Rt.length>0;){let pr=Rt.pop();if(pr.shadow){Aa(pr.shadow);continue}let pn=pr.node,Gn=(K?K(pn):pn.nodeType)===pd.element,Li=R(pn);if(Li)for(let sa=Li.length-1;sa>=0;--sa)Rt.push({node:Li[sa],shadow:null});if(Gn){let sa=te?te(pn):null;if(typeof sa=="string"&&It(sa)==="template"){let is=pn.content;bt(is)&&Rt.push({node:is,shadow:null})}}if(Gn){let sa=$(pn);bt(sa)&&Rt.push({node:null,shadow:sa},{node:sa,shadow:null})}}};return e.sanitize=function(cr){let We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rt=null,pr=null,pn=null,Ln=null;if(je=!cr,je&&(cr="<!-->"),typeof cr!="string"&&!rr(cr)&&(cr=x3t(cr),typeof cr!="string"))throw r_("dirty is not a string, aborting");if(!e.isSupported)return cr;Sr?(Gt=at,vt=rt):Tn(We),(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&(Gt=kh(Gt)),se.uponSanitizeAttribute.length>0&&(vt=kh(vt)),e.removed=[];let Gn=xr&&typeof cr!="string"&&rr(cr);if(Gn){Mr(cr);let ho=te?te(cr):cr.nodeName;if(typeof ho=="string"){let Ca=It(ho);if(!Gt[Ca]||me[Ca])throw Zr(cr),r_("root node is forbidden and cannot be sanitized in-place")}if($e(cr))throw Zr(cr),r_("root node is clobbered and cannot be sanitized in-place");try{ni(cr)}catch(Ca){throw Zr(cr),Ca}}else if(rr(cr))Rt=V("<!---->"),pr=Rt.ownerDocument.importNode(cr,!0),pr.nodeType===pd.element&&pr.nodeName==="BODY"||pr.nodeName==="HTML"?Rt=pr:Rt.appendChild(pr),ni(pr);else{if(!Yr&&!zr&&!kr&&cr.indexOf("<")===-1)return fe&&vi?U(cr):cr;if(Rt=V(cr),!Rt)return Yr?null:vi?re:""}Rt&&Yt&&un(Rt.firstChild);let Li=Gn?cr:Rt,sa=W(Li);try{for(;pn=sa.nextNode();)jn(pn,Li),Jc(pn),bt(pn.content)&&Aa(pn.content)}catch(ho){throw Gn&&(Zr(cr),OS(e.removed,Ca=>{Ca.element&&Sn(Ca.element)})),ho}if(Gn)return OS(e.removed,ho=>{ho.element&&Sn(ho.element)}),zr&&Be(cr),cr;if(Yr){if(zr&&Be(Rt),hi)for(Ln=ce.call(Rt.ownerDocument);Rt.firstChild;)Ln.appendChild(Rt.firstChild);else Ln=Rt;return(vt.shadowroot||vt.shadowrootmode)&&(Ln=ge.call(n,Ln,!0)),Ln}let is=kr?Rt.outerHTML:Rt.innerHTML;return kr&&Gt["!doctype"]&&Rt.ownerDocument&&Rt.ownerDocument.doctype&&Rt.ownerDocument.doctype.name&&Pu(O3t,Rt.ownerDocument.doctype.name)&&(is="<!DOCTYPE "+Rt.ownerDocument.doctype.name+`>
662
662
  `+is),zr&&(is=Se(is)),fe&&vi?U(is):is},e.setConfig=function(){let cr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tn(cr),Sr=!0,at=Gt,rt=vt},e.clearConfig=function(){_r=null,Sr=!1,at=null,rt=null,fe=ve,re=""},e.isValidAttribute=function(cr,We,Rt){_r||Tn({});let pr=It(cr),pn=It(We);return Er(pr,pn,Rt)},e.addHook=function(cr,We){typeof We=="function"&&Ru(se,cr)&&MS(se[cr],We)},e.removeHook=function(cr,We){if(Ru(se,cr)){if(We!==void 0){let Rt=d3t(se[cr],We);return Rt===-1?void 0:p3t(se[cr],Rt,1)[0]}return cMe(se[cr])}},e.removeHooks=function(cr){Ru(se,cr)&&(se[cr]=[])},e.removeAllHooks=function(){se=wMe()},e}var cK=kMe();function F3t(r,e,t){return(e=U3t(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Bv(){return Bv=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Bv.apply(null,arguments)}function EMe(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Sg(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?EMe(Object(t),!0).forEach(function(n){F3t(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):EMe(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function N3t(r,e){if(r==null)return{};var t,n,i=B3t(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)t=o[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function B3t(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function z3t(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function U3t(r){var e=z3t(r,"string");return typeof e=="symbol"?e:e+""}function xK(r){"@babel/helpers - typeof";return xK=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xK(r)}var j3t="1.15.7";function Nv(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var zv=Nv(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),NC=Nv(/Edge/i),AMe=Nv(/firefox/i),LC=Nv(/safari/i)&&!Nv(/chrome/i)&&!Nv(/android/i),kK=Nv(/iP(ad|od|hone)/i),RMe=Nv(/chrome/i)&&Nv(/android/i),qMe={capture:!1,passive:!1};function Co(r,e,t){r.addEventListener(e,t,!zv&&qMe)}function xo(r,e,t){r.removeEventListener(e,t,!zv&&qMe)}function EF(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function FMe(r){return r.host&&r!==document&&r.host.nodeType&&r.host!==r?r.host:r.parentNode}function _m(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&EF(r,e):EF(r,e))||n&&r===t)return r;if(r===t)break}while(r=FMe(r))}return null}var CMe=/\s+/g;function md(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(CMe," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(CMe," ")}}function bi(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function NS(r,e){var t="";if(typeof r=="string")t=r;else do{var n=bi(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function NMe(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,o=n.length;if(t)for(;i<o;i++)t(n[i],i);return n}return[]}function wg(){var r=document.scrollingElement;return r||document.documentElement}function $l(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var o,a,l,u,f,p,x;if(r!==window&&r.parentNode&&r!==wg()?(o=r.getBoundingClientRect(),a=o.top,l=o.left,u=o.bottom,f=o.right,p=o.height,x=o.width):(a=0,l=0,u=window.innerHeight,f=window.innerWidth,p=window.innerHeight,x=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!zv))do if(i&&i.getBoundingClientRect&&(bi(i,"transform")!=="none"||t&&bi(i,"position")!=="static")){var T=i.getBoundingClientRect();a-=T.top+parseInt(bi(i,"border-top-width")),l-=T.left+parseInt(bi(i,"border-left-width")),u=a+o.height,f=l+o.width;break}while(i=i.parentNode);if(n&&r!==window){var C=NS(i||r),M=C&&C.a,L=C&&C.d;C&&(a/=L,l/=M,x/=M,p/=L,u=a+p,f=l+x)}return{top:a,left:l,bottom:u,right:f,width:x,height:p}}}function DMe(r,e,t){for(var n=Hb(r,!0),i=$l(r)[e];n;){var o=$l(n)[t],a=void 0;if(t==="top"||t==="left"?a=i>=o:a=i<=o,!a)return n;if(n===wg())break;n=Hb(n,!1)}return!1}function BS(r,e,t,n){for(var i=0,o=0,a=r.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==xi.ghost&&(n||a[o]!==xi.dragged)&&_m(a[o],t.draggable,r,!1)){if(i===e)return a[o];i++}o++}return null}function EK(r,e){for(var t=r.lastElementChild;t&&(t===xi.ghost||bi(t,"display")==="none"||e&&!EF(t,e));)t=t.previousElementSibling;return t||null}function dp(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==xi.clone&&(!e||EF(r,e))&&t++;return t}function IMe(r){var e=0,t=0,n=wg();if(r)do{var i=NS(r),o=i.a,a=i.d;e+=r.scrollLeft*o,t+=r.scrollTop*a}while(r!==n&&(r=r.parentNode));return[e,t]}function V3t(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Hb(r,e){if(!r||!r.getBoundingClientRect)return wg();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=bi(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return wg();if(n||e)return t;n=!0}}while(t=t.parentNode);return wg()}function H3t(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function hK(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var PC;function BMe(r,e){return function(){if(!PC){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),PC=setTimeout(function(){PC=void 0},e)}}}function W3t(){clearTimeout(PC),PC=void 0}function zMe(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function UMe(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}function jMe(r,e,t){var n={};return Array.from(r.children).forEach(function(i){var o,a,l,u;if(!(!_m(i,e.draggable,r,!1)||i.animated||i===t)){var f=$l(i);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,f.left),n.top=Math.min((a=n.top)!==null&&a!==void 0?a:1/0,f.top),n.right=Math.max((l=n.right)!==null&&l!==void 0?l:-1/0,f.right),n.bottom=Math.max((u=n.bottom)!==null&&u!==void 0?u:-1/0,f.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Cf="Sortable"+new Date().getTime();function $3t(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(bi(i,"display")==="none"||i===xi.ghost)){r.push({target:i,rect:$l(i)});var o=Sg({},r[r.length-1].rect);if(i.thisAnimationDuration){var a=NS(i,!0);a&&(o.top-=a.f,o.left-=a.e)}i.fromRect=o}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(V3t(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var o=!1,a=0;r.forEach(function(l){var u=0,f=l.target,p=f.fromRect,x=$l(f),T=f.prevFromRect,C=f.prevToRect,M=l.rect,L=NS(f,!0);L&&(x.top-=L.f,x.left-=L.e),f.toRect=x,f.thisAnimationDuration&&hK(T,x)&&!hK(p,x)&&(M.top-x.top)/(M.left-x.left)===(p.top-x.top)/(p.left-x.left)&&(u=G3t(M,T,C,i.options)),hK(x,p)||(f.prevFromRect=p,f.prevToRect=x,u||(u=i.options.animation),i.animate(f,M,x,u)),u&&(o=!0,a=Math.max(a,u),clearTimeout(f.animationResetTimer),f.animationResetTimer=setTimeout(function(){f.animationTime=0,f.prevFromRect=null,f.fromRect=null,f.prevToRect=null,f.thisAnimationDuration=null},u),f.thisAnimationDuration=u)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),r=[]},animate:function(n,i,o,a){if(a){bi(n,"transition",""),bi(n,"transform","");var l=NS(this.el),u=l&&l.a,f=l&&l.d,p=(i.left-o.left)/(u||1),x=(i.top-o.top)/(f||1);n.animatingX=!!p,n.animatingY=!!x,bi(n,"transform","translate3d("+p+"px,"+x+"px,0)"),this.forRepaintDummy=K3t(n),bi(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),bi(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){bi(n,"transition",""),bi(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function K3t(r){return r.offsetWidth}function G3t(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var PS=[],fK={initializeByDefault:!0},BC={mount:function(e){for(var t in fK)fK.hasOwnProperty(t)&&!(t in e)&&(e[t]=fK[t]);PS.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),PS.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";PS.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][o]&&t[a.pluginName][o](Sg({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](Sg({sortable:t},n)))})},initializePlugins:function(e,t,n,i){PS.forEach(function(l){var u=l.pluginName;if(!(!e.options[u]&&!l.initializeByDefault)){var f=new l(e,t,e.options);f.sortable=e,f.options=e.options,e[u]=f,Bv(n,f.defaults)}});for(var o in e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);typeof a<"u"&&(e.options[o]=a)}},getEventProperties:function(e,t){var n={};return PS.forEach(function(i){typeof i.eventProperties=="function"&&Bv(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return PS.forEach(function(o){e[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[t]=="function"&&(i=o.optionListeners[t].call(e[o.pluginName],n))}),i}};function Y3t(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,o=r.cloneEl,a=r.toEl,l=r.fromEl,u=r.oldIndex,f=r.newIndex,p=r.oldDraggableIndex,x=r.newDraggableIndex,T=r.originalEvent,C=r.putSortable,M=r.extraEventProperties;if(e=e||t&&t[Cf],!!e){var L,R=e.options,H="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!zv&&!NC?L=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(L=document.createEvent("Event"),L.initEvent(n,!0,!0)),L.to=a||t,L.from=l||t,L.item=i||t,L.clone=o,L.oldIndex=u,L.newIndex=f,L.oldDraggableIndex=p,L.newDraggableIndex=x,L.originalEvent=T,L.pullMode=C?C.lastPutMode:void 0;var $=Sg(Sg({},M),BC.getEventProperties(n,e));for(var Q in $)L[Q]=$[Q];t&&t.dispatchEvent(L),R[H]&&R[H].call(e,L)}}var X3t=["evt"],Af=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=N3t(n,X3t);BC.pluginEvent.bind(xi)(e,t,Sg({dragEl:an,parentEl:Js,ghostEl:Mi,rootEl:Es,nextEl:o_,lastDownEl:wF,cloneEl:js,cloneHidden:Vb,dragStarted:IC,putSortable:pc,activeSortable:xi.active,originalEvent:i,oldIndex:FS,oldDraggableIndex:RC,newIndex:gd,newDraggableIndex:jb,hideGhostForTarget:$Me,unhideGhostForTarget:KMe,cloneNowHidden:function(){Vb=!0},cloneNowShown:function(){Vb=!1},dispatchSortableEvent:function(l){Eh({sortable:t,name:l,originalEvent:i})}},o))};function Eh(r){Y3t(Sg({putSortable:pc,cloneEl:js,targetEl:an,rootEl:Es,oldIndex:FS,oldDraggableIndex:RC,newIndex:gd,newDraggableIndex:jb},r))}var an,Js,Mi,Es,o_,wF,js,Vb,FS,gd,RC,jb,yF,pc,qS=!1,AF=!1,CF=[],n_,xm,dK,pK,OMe,MMe,IC,RS,qC,FC=!1,bF=!1,SF,Hc,mK=[],_K=!1,DF=[],OF=typeof document<"u",xF=kK,LMe=NC||zv?"cssFloat":"float",Z3t=OF&&!RMe&&!kK&&"draggable"in document.createElement("div"),VMe=(function(){if(OF){if(zv)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}})(),HMe=function(e,t){var n=bi(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=BS(e,0,t),a=BS(e,1,t),l=o&&bi(o),u=a&&bi(a),f=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+$l(o).width,p=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+$l(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var x=l.float==="left"?"left":"right";return a&&(u.clear==="both"||u.clear===x)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||f>=i&&n[LMe]==="none"||a&&n[LMe]==="none"&&f+p>i)?"vertical":"horizontal"},J3t=function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,u=n?t.right:t.bottom,f=n?t.width:t.height;return i===l||o===u||i+a/2===l+f/2},Q3t=function(e,t){var n;return CF.some(function(i){var o=i[Cf].options.emptyInsertThreshold;if(!(!o||EK(i))){var a=$l(i),l=e>=a.left-o&&e<=a.right+o,u=t>=a.top-o&&t<=a.bottom+o;if(l&&u)return n=i}}),n},WMe=function(e){function t(o,a){return function(l,u,f,p){var x=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(o==null&&(a||x))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return t(o(l,u,f,p),a)(l,u,f,p);var T=(a?l:u).options.group.name;return o===!0||typeof o=="string"&&o===T||o.join&&o.indexOf(T)>-1}}var n={},i=e.group;(!i||xK(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},$Me=function(){!VMe&&Mi&&bi(Mi,"display","none")},KMe=function(){!VMe&&Mi&&bi(Mi,"display","")};OF&&!RMe&&document.addEventListener("click",function(r){if(AF)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),AF=!1,!1},!0);var i_=function(e){if(an){e=e.touches?e.touches[0]:e;var t=Q3t(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Cf]._onDragOver(n)}}},e5t=function(e){an&&an.parentNode[Cf]._isOutsideThisEl(e.target)};function xi(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Bv({},e),r[Cf]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return HMe(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:xi.supportPointer!==!1&&"PointerEvent"in window&&(!LC||kK),emptyInsertThreshold:5};BC.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);WMe(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Z3t,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Co(r,"pointerdown",this._onTapStart):(Co(r,"mousedown",this._onTapStart),Co(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Co(r,"dragover",this),Co(r,"dragenter",this)),CF.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Bv(this,$3t())}xi.prototype={constructor:xi,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(RS=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,an):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,f=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,p=i.filter;if(l5t(n),!an&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&LC&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=_m(u,i.draggable,n,!1),!(u&&u.animated)&&wF!==u)){if(FS=dp(u),RC=dp(u,i.draggable),typeof p=="function"){if(p.call(this,e,u,this)){Eh({sortable:t,rootEl:f,name:"filter",targetEl:u,toEl:n,fromEl:n}),Af("filter",t,{evt:e}),o&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(x){if(x=_m(f,x.trim(),n,!1),x)return Eh({sortable:t,rootEl:x,name:"filter",targetEl:u,fromEl:n,toEl:n}),Af("filter",t,{evt:e}),!0}),p)){o&&e.preventDefault();return}i.handle&&!_m(f,i.handle,n,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,t,n){var i=this,o=i.el,a=i.options,l=o.ownerDocument,u;if(n&&!an&&n.parentNode===o){var f=$l(n);if(Es=o,an=n,Js=an.parentNode,o_=an.nextSibling,wF=n,yF=a.group,xi.dragged=an,n_={target:an,clientX:(t||e).clientX,clientY:(t||e).clientY},OMe=n_.clientX-f.left,MMe=n_.clientY-f.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,an.style["will-change"]="all",u=function(){if(Af("delayEnded",i,{evt:e}),xi.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!AMe&&i.nativeDraggable&&(an.draggable=!0),i._triggerDragStart(e,t),Eh({sortable:i,name:"choose",originalEvent:e}),md(an,a.chosenClass,!0)},a.ignore.split(",").forEach(function(p){NMe(an,p.trim(),gK)}),Co(l,"dragover",i_),Co(l,"mousemove",i_),Co(l,"touchmove",i_),a.supportPointer?(Co(l,"pointerup",i._onDrop),!this.nativeDraggable&&Co(l,"pointercancel",i._onDrop)):(Co(l,"mouseup",i._onDrop),Co(l,"touchend",i._onDrop),Co(l,"touchcancel",i._onDrop)),AMe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,an.draggable=!0),Af("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(NC||zv))){if(xi.eventCanceled){this._onDrop();return}a.supportPointer?(Co(l,"pointerup",i._disableDelayedDrag),Co(l,"pointercancel",i._disableDelayedDrag)):(Co(l,"mouseup",i._disableDelayedDrag),Co(l,"touchend",i._disableDelayedDrag),Co(l,"touchcancel",i._disableDelayedDrag)),Co(l,"mousemove",i._delayedDragTouchMoveHandler),Co(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Co(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,a.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){an&&gK(an),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;xo(e,"mouseup",this._disableDelayedDrag),xo(e,"touchend",this._disableDelayedDrag),xo(e,"touchcancel",this._disableDelayedDrag),xo(e,"pointerup",this._disableDelayedDrag),xo(e,"pointercancel",this._disableDelayedDrag),xo(e,"mousemove",this._delayedDragTouchMoveHandler),xo(e,"touchmove",this._delayedDragTouchMoveHandler),xo(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Co(document,"pointermove",this._onTouchMove):t?Co(document,"touchmove",this._onTouchMove):Co(document,"mousemove",this._onTouchMove):(Co(an,"dragend",this),Co(Es,"dragstart",this._onDragStart));try{document.selection?TF(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(qS=!1,Es&&an){Af("dragStarted",this,{evt:t}),this.nativeDraggable&&Co(document,"dragover",e5t);var n=this.options;!e&&md(an,n.dragClass,!1),md(an,n.ghostClass,!0),xi.active=this,e&&this._appendGhost(),Eh({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(xm){this._lastX=xm.clientX,this._lastY=xm.clientY,$Me();for(var e=document.elementFromPoint(xm.clientX,xm.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(xm.clientX,xm.clientY),e!==t);)t=e;if(an.parentNode[Cf]._isOutsideThisEl(e),t)do{if(t[Cf]){var n=void 0;if(n=t[Cf]._onDragOver({clientX:xm.clientX,clientY:xm.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=FMe(t));KMe()}},_onTouchMove:function(e){if(n_){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=Mi&&NS(Mi,!0),l=Mi&&a&&a.a,u=Mi&&a&&a.d,f=xF&&Hc&&IMe(Hc),p=(o.clientX-n_.clientX+i.x)/(l||1)+(f?f[0]-mK[0]:0)/(l||1),x=(o.clientY-n_.clientY+i.y)/(u||1)+(f?f[1]-mK[1]:0)/(u||1);if(!xi.active&&!qS){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Mi){a?(a.e+=p-(dK||0),a.f+=x-(pK||0)):a={a:1,b:0,c:0,d:1,e:p,f:x};var T="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");bi(Mi,"webkitTransform",T),bi(Mi,"mozTransform",T),bi(Mi,"msTransform",T),bi(Mi,"transform",T),dK=p,pK=x,xm=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Mi){var e=this.options.fallbackOnBody?document.body:Es,t=$l(an,!0,xF,!0,e),n=this.options;if(xF){for(Hc=e;bi(Hc,"position")==="static"&&bi(Hc,"transform")==="none"&&Hc!==document;)Hc=Hc.parentNode;Hc!==document.body&&Hc!==document.documentElement?(Hc===document&&(Hc=wg()),t.top+=Hc.scrollTop,t.left+=Hc.scrollLeft):Hc=wg(),mK=IMe(Hc)}Mi=an.cloneNode(!0),md(Mi,n.ghostClass,!1),md(Mi,n.fallbackClass,!0),md(Mi,n.dragClass,!0),bi(Mi,"transition",""),bi(Mi,"transform",""),bi(Mi,"box-sizing","border-box"),bi(Mi,"margin",0),bi(Mi,"top",t.top),bi(Mi,"left",t.left),bi(Mi,"width",t.width),bi(Mi,"height",t.height),bi(Mi,"opacity","0.8"),bi(Mi,"position",xF?"absolute":"fixed"),bi(Mi,"zIndex","100000"),bi(Mi,"pointerEvents","none"),xi.ghost=Mi,e.appendChild(Mi),bi(Mi,"transform-origin",OMe/parseInt(Mi.style.width)*100+"% "+MMe/parseInt(Mi.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;if(Af("dragStart",this,{evt:e}),xi.eventCanceled){this._onDrop();return}Af("setupClone",this),xi.eventCanceled||(js=UMe(an),js.removeAttribute("id"),js.draggable=!1,js.style["will-change"]="",this._hideClone(),md(js,this.options.chosenClass,!1),xi.clone=js),n.cloneId=TF(function(){Af("clone",n),!xi.eventCanceled&&(n.options.removeCloneOnHide||Es.insertBefore(js,an),n._hideClone(),Eh({sortable:n,name:"clone"}))}),!t&&md(an,o.dragClass,!0),t?(AF=!0,n._loopId=setInterval(n._emulateDragOver,50)):(xo(document,"mouseup",n._onDrop),xo(document,"touchend",n._onDrop),xo(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,an)),Co(document,"drop",n),bi(an,"transform","translateZ(0)")),qS=!0,n._dragStartId=TF(n._dragStarted.bind(n,t,e)),Co(document,"selectstart",n),IC=!0,window.getSelection().removeAllRanges(),LC&&bi(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,o,a,l=this.options,u=l.group,f=xi.active,p=yF===u,x=l.sort,T=pc||f,C,M=this,L=!1;if(_K)return;function R(ce,Me){Af(ce,M,Sg({evt:e,isOwner:p,axis:C?"vertical":"horizontal",revert:a,dragRect:i,targetRect:o,canSort:x,fromSortable:T,target:n,completed:$,onMove:function(se,Ke){return _F(Es,t,an,i,se,$l(se),e,Ke)},changed:Q},Me))}function H(){R("dragOverAnimationCapture"),M.captureAnimationState(),M!==T&&T.captureAnimationState()}function $(ce){return R("dragOverCompleted",{insertion:ce}),ce&&(p?f._hideClone():f._showClone(M),M!==T&&(md(an,pc?pc.options.ghostClass:f.options.ghostClass,!1),md(an,l.ghostClass,!0)),pc!==M&&M!==xi.active?pc=M:M===xi.active&&pc&&(pc=null),T===M&&(M._ignoreWhileAnimating=n),M.animateAll(function(){R("dragOverAnimationComplete"),M._ignoreWhileAnimating=null}),M!==T&&(T.animateAll(),T._ignoreWhileAnimating=null)),(n===an&&!an.animated||n===t&&!n.animated)&&(RS=null),!l.dragoverBubble&&!e.rootEl&&n!==document&&(an.parentNode[Cf]._isOutsideThisEl(e.target),!ce&&i_(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),L=!0}function Q(){gd=dp(an),jb=dp(an,l.draggable),Eh({sortable:M,name:"change",toEl:t,newIndex:gd,newDraggableIndex:jb,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=_m(n,l.draggable,t,!0),R("dragOver"),xi.eventCanceled)return L;if(an.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||M._ignoreWhileAnimating===n)return $(!1);if(AF=!1,f&&!l.disabled&&(p?x||(a=Js!==Es):pc===this||(this.lastPutMode=yF.checkPull(this,f,an,e))&&u.checkPut(this,f,an,e))){if(C=this._getDirection(e,n)==="vertical",i=$l(an),R("dragOverValid"),xi.eventCanceled)return L;if(a)return Js=Es,H(),this._hideClone(),R("revert"),xi.eventCanceled||(o_?Es.insertBefore(an,o_):Es.appendChild(an)),$(!0);var K=EK(t,l.draggable);if(!K||i5t(e,C,this)&&!K.animated){if(K===an)return $(!1);if(K&&t===e.target&&(n=K),n&&(o=$l(n)),_F(Es,t,an,i,n,o,e,!!n)!==!1)return H(),K&&K.nextSibling?t.insertBefore(an,K.nextSibling):t.appendChild(an),Js=t,Q(),$(!0)}else if(K&&n5t(e,C,this)){var te=BS(t,0,l,!0);if(te===an)return $(!1);if(n=te,o=$l(n),_F(Es,t,an,i,n,o,e,!1)!==!1)return H(),t.insertBefore(an,te),Js=t,Q(),$(!0)}else if(n.parentNode===t){o=$l(n);var fe=0,re,ve=an.parentNode!==t,_e=!J3t(an.animated&&an.toRect||i,n.animated&&n.toRect||o,C),qe=C?"top":"left",Ee=DMe(n,"top","top")||DMe(an,"top","top"),U=Ee?Ee.scrollTop:void 0;RS!==n&&(re=o[qe],FC=!1,bF=!_e&&l.invertSwap||ve),fe=o5t(e,n,o,C,_e?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,bF,RS===n);var j;if(fe!==0){var xe=dp(an);do xe-=fe,j=Js.children[xe];while(j&&(bi(j,"display")==="none"||j===Mi))}if(fe===0||j===n)return $(!1);RS=n,qC=fe;var Ie=n.nextElementSibling,he=!1;he=fe===1;var ie=_F(Es,t,an,i,n,o,e,he);if(ie!==!1)return(ie===1||ie===-1)&&(he=ie===1),_K=!0,setTimeout(r5t,30),H(),he&&!Ie?t.appendChild(an):n.parentNode.insertBefore(an,he?Ie:n),Ee&&zMe(Ee,0,U-Ee.scrollTop),Js=an.parentNode,re!==void 0&&!bF&&(SF=Math.abs(re-$l(n)[qe])),Q(),$(!0)}if(t.contains(an))return $(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){xo(document,"mousemove",this._onTouchMove),xo(document,"touchmove",this._onTouchMove),xo(document,"pointermove",this._onTouchMove),xo(document,"dragover",i_),xo(document,"mousemove",i_),xo(document,"touchmove",i_)},_offUpEvents:function(){var e=this.el.ownerDocument;xo(e,"mouseup",this._onDrop),xo(e,"touchend",this._onDrop),xo(e,"pointerup",this._onDrop),xo(e,"pointercancel",this._onDrop),xo(e,"touchcancel",this._onDrop),xo(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(gd=dp(an),jb=dp(an,n.draggable),Af("drop",this,{evt:e}),Js=an&&an.parentNode,gd=dp(an),jb=dp(an,n.draggable),xi.eventCanceled){this._nulling();return}qS=!1,bF=!1,FC=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),wK(this.cloneId),wK(this._dragStartId),this.nativeDraggable&&(xo(document,"drop",this),xo(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),LC&&bi(document.body,"user-select",""),bi(an,"transform",""),e&&(IC&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Mi&&Mi.parentNode&&Mi.parentNode.removeChild(Mi),(Es===Js||pc&&pc.lastPutMode!=="clone")&&js&&js.parentNode&&js.parentNode.removeChild(js),an&&(this.nativeDraggable&&xo(an,"dragend",this),gK(an),an.style["will-change"]="",IC&&!qS&&md(an,pc?pc.options.ghostClass:this.options.ghostClass,!1),md(an,this.options.chosenClass,!1),Eh({sortable:this,name:"unchoose",toEl:Js,newIndex:null,newDraggableIndex:null,originalEvent:e}),Es!==Js?(gd>=0&&(Eh({rootEl:Js,name:"add",toEl:Js,fromEl:Es,originalEvent:e}),Eh({sortable:this,name:"remove",toEl:Js,originalEvent:e}),Eh({rootEl:Js,name:"sort",toEl:Js,fromEl:Es,originalEvent:e}),Eh({sortable:this,name:"sort",toEl:Js,originalEvent:e})),pc&&pc.save()):gd!==FS&&gd>=0&&(Eh({sortable:this,name:"update",toEl:Js,originalEvent:e}),Eh({sortable:this,name:"sort",toEl:Js,originalEvent:e})),xi.active&&((gd==null||gd===-1)&&(gd=FS,jb=RC),Eh({sortable:this,name:"end",toEl:Js,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Af("nulling",this),Es=an=Js=Mi=o_=js=wF=Vb=n_=xm=IC=gd=jb=FS=RC=RS=qC=pc=yF=xi.dragged=xi.ghost=xi.clone=xi.active=null;var e=this.el;DF.forEach(function(t){e.contains(t)&&(t.checked=!0)}),DF.length=dK=pK=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":an&&(this._onDragOver(e),t5t(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,o=n.length,a=this.options;i<o;i++)t=n[i],_m(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||s5t(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(o,a){var l=i.children[a];_m(l,this.options.draggable,i,!1)&&(n[o]=l)},this),t&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(i.removeChild(n[o]),i.appendChild(n[o]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return _m(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=BC.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&WMe(n)},destroy:function(){Af("destroy",this);var e=this.el;e[Cf]=null,xo(e,"mousedown",this._onTapStart),xo(e,"touchstart",this._onTapStart),xo(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(xo(e,"dragover",this),xo(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),CF.splice(CF.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vb){if(Af("hideClone",this),xi.eventCanceled)return;bi(js,"display","none"),this.options.removeCloneOnHide&&js.parentNode&&js.parentNode.removeChild(js),Vb=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vb){if(Af("showClone",this),xi.eventCanceled)return;an.parentNode==Es&&!this.options.group.revertClone?Es.insertBefore(js,an):o_?Es.insertBefore(js,o_):Es.appendChild(js),this.options.group.revertClone&&this.animate(an,js),bi(js,"display",""),Vb=!1}}};function t5t(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function _F(r,e,t,n,i,o,a,l){var u,f=r[Cf],p=f.options.onMove,x;return window.CustomEvent&&!zv&&!NC?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=r,u.dragged=t,u.draggedRect=n,u.related=i||e,u.relatedRect=o||$l(e),u.willInsertAfter=l,u.originalEvent=a,r.dispatchEvent(u),p&&(x=p.call(f,u,a)),x}function gK(r){r.draggable=!1}function r5t(){_K=!1}function n5t(r,e,t){var n=$l(BS(t.el,0,t.options,!0)),i=jMe(t.el,t.options,Mi),o=10;return e?r.clientX<i.left-o||r.clientY<n.top&&r.clientX<n.right:r.clientY<i.top-o||r.clientY<n.bottom&&r.clientX<n.left}function i5t(r,e,t){var n=$l(EK(t.el,t.options.draggable)),i=jMe(t.el,t.options,Mi),o=10;return e?r.clientX>i.right+o||r.clientY>n.bottom&&r.clientX>n.left:r.clientY>i.bottom+o||r.clientX>n.right&&r.clientY>n.top}function o5t(r,e,t,n,i,o,a,l){var u=n?r.clientY:r.clientX,f=n?t.height:t.width,p=n?t.top:t.left,x=n?t.bottom:t.right,T=!1;if(!a){if(l&&SF<f*i){if(!FC&&(qC===1?u>p+f*o/2:u<x-f*o/2)&&(FC=!0),FC)T=!0;else if(qC===1?u<p+SF:u>x-SF)return-qC}else if(u>p+f*(1-i)/2&&u<x-f*(1-i)/2)return a5t(e)}return T=T||a,T&&(u<p+f*o/2||u>x-f*o/2)?u>p+f/2?1:-1:0}function a5t(r){return dp(an)<dp(r)?1:-1}function s5t(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function l5t(r){DF.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&DF.push(n)}}function TF(r){return setTimeout(r,0)}function wK(r){return clearTimeout(r)}OF&&Co(document,"touchmove",function(r){(xi.active||qS)&&r.cancelable&&r.preventDefault()});xi.utils={on:Co,off:xo,css:bi,find:NMe,is:function(e,t){return!!_m(e,t,e,!1)},extend:H3t,throttle:BMe,closest:_m,toggleClass:md,clone:UMe,index:dp,nextTick:TF,cancelNextTick:wK,detectDirection:HMe,getChild:BS,expando:Cf};xi.get=function(r){return r[Cf]};xi.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(xi.utils=Sg(Sg({},xi.utils),n.utils)),BC.mount(n)})};xi.create=function(r,e){return new xi(r,e)};xi.version=j3t;var Wl=[],OC,SK,TK=!1,vK,yK,IF,MC;function u5t(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Co(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Co(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Co(document,"touchmove",this._handleFallbackAutoScroll):Co(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?xo(document,"dragover",this._handleAutoScroll):(xo(document,"pointermove",this._handleFallbackAutoScroll),xo(document,"touchmove",this._handleFallbackAutoScroll),xo(document,"mousemove",this._handleFallbackAutoScroll)),PMe(),kF(),W3t()},nulling:function(){IF=SK=OC=TK=MC=vK=yK=null,Wl.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(o,a);if(IF=t,n||this.options.forceAutoScrollFallback||NC||zv||LC){bK(t,this.options,l,n);var u=Hb(l,!0);TK&&(!MC||o!==vK||a!==yK)&&(MC&&PMe(),MC=setInterval(function(){var f=Hb(document.elementFromPoint(o,a),!0);f!==u&&(u=f,kF()),bK(t,i.options,f,n)},10),vK=o,yK=a)}else{if(!this.options.bubbleScroll||Hb(l,!0)===wg()){kF();return}bK(t,this.options,Hb(l,!1),!1)}}},Bv(r,{pluginName:"scroll",initializeByDefault:!0})}function kF(){Wl.forEach(function(r){clearInterval(r.pid)}),Wl=[]}function PMe(){clearInterval(MC)}var bK=BMe(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,o=(r.touches?r.touches[0]:r).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,u=wg(),f=!1,p;SK!==t&&(SK=t,kF(),OC=e.scroll,p=e.scrollFn,OC===!0&&(OC=Hb(t,!0)));var x=0,T=OC;do{var C=T,M=$l(C),L=M.top,R=M.bottom,H=M.left,$=M.right,Q=M.width,K=M.height,te=void 0,fe=void 0,re=C.scrollWidth,ve=C.scrollHeight,_e=bi(C),qe=C.scrollLeft,Ee=C.scrollTop;C===u?(te=Q<re&&(_e.overflowX==="auto"||_e.overflowX==="scroll"||_e.overflowX==="visible"),fe=K<ve&&(_e.overflowY==="auto"||_e.overflowY==="scroll"||_e.overflowY==="visible")):(te=Q<re&&(_e.overflowX==="auto"||_e.overflowX==="scroll"),fe=K<ve&&(_e.overflowY==="auto"||_e.overflowY==="scroll"));var U=te&&(Math.abs($-i)<=a&&qe+Q<re)-(Math.abs(H-i)<=a&&!!qe),j=fe&&(Math.abs(R-o)<=a&&Ee+K<ve)-(Math.abs(L-o)<=a&&!!Ee);if(!Wl[x])for(var xe=0;xe<=x;xe++)Wl[xe]||(Wl[xe]={});(Wl[x].vx!=U||Wl[x].vy!=j||Wl[x].el!==C)&&(Wl[x].el=C,Wl[x].vx=U,Wl[x].vy=j,clearInterval(Wl[x].pid),(U!=0||j!=0)&&(f=!0,Wl[x].pid=setInterval(function(){n&&this.layer===0&&xi.active._onTouchMove(IF);var Ie=Wl[this.layer].vy?Wl[this.layer].vy*l:0,he=Wl[this.layer].vx?Wl[this.layer].vx*l:0;typeof p=="function"&&p.call(xi.dragged.parentNode[Cf],he,Ie,r,IF,Wl[this.layer].el)!=="continue"||zMe(Wl[this.layer].el,he,Ie)}.bind({layer:x}),24))),x++}while(e.bubbleScroll&&T!==u&&(T=Hb(T,!1)));TK=f}},30),GMe=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(t){var f=n||o;l();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,x=document.elementFromPoint(p.clientX,p.clientY);u(),f&&!f.el.contains(x)&&(a("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function AK(){}AK.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=BS(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:GMe};Bv(AK,{pluginName:"revertOnSpill"});function CK(){}CK.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:GMe};Bv(CK,{pluginName:"removeOnSpill"});xi.mount(new u5t);xi.mount(CK,AK);var YMe=xi;var MF=class extends Xt{static targets=["input","controller","rows"];fieldValue=[];options={};get keyInputDisabled(){return!this.options.editable||this.options.disable_editing_keys}get valueInputDisabled(){return!this.options.editable||this.options.disable_editing_values}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}connect(){this.setOptions();try{let r=JSON.parse(this.inputTarget.value,(e,t)=>typeof t=="number"||typeof t=="boolean"?String(t):t);Object.keys(r).forEach(e=>this.fieldValue.push([e,r[e]]))}catch{this.fieldValue=[]}this.updateKeyValueComponent()}addRow(){this.options.disable_adding_rows||!this.options.editable||(this.fieldValue.push(["",""]),this.updateKeyValueComponent(),this.focusLastRow(),this.animateLastRow())}deleteRow(r){if(this.options.disable_deleting_rows||!this.options.editable)return;let{index:e}=r.params,t=this.rowsTarget.querySelectorAll(".key-value__row")[e];if(this.fieldValue.splice(e,1),this.updateTextareaInput(),!t||this.prefersReducedMotion){this.updateKeyValueComponent();return}t.classList.add("key-value__row--leaving"),t.addEventListener("animationend",()=>this.updateKeyValueComponent(),{once:!0})}moveKey(r,e){this.options.editable&&(this.fieldValue=this.moveElement(this.fieldValue,r,e),this.updateTextareaInput(),this.updateKeyValueComponent())}moveElement(r,e,t){let n=r[e];return r.splice(e,1),r.splice(t,0,n),r}get lastRow(){return this.rowsTarget.querySelector(".key-value__row:last-child")}focusLastRow(){this.lastRow?.querySelector(".key-value-input-key")?.focus()}animateLastRow(){let r=this.lastRow;!r||this.prefersReducedMotion||(r.classList.add("key-value__row--entering"),r.addEventListener("animationend",()=>r.classList.remove("key-value__row--entering"),{once:!0}))}valueFieldUpdated(r){let{value:e}=r.target,{index:t}=r.target.dataset;this.fieldValue[t][1]=e,this.updateTextareaInput()}keyFieldUpdated(r){let{value:e}=r.target,{index:t}=r.target.dataset;this.fieldValue[t][0]=e,this.updateTextareaInput()}updateTextareaInput(){if(!this.hasInputTarget)return;let r={};this.fieldValue&&this.fieldValue.length>0&&(r=Object.assign(...this.fieldValue.map(([e,t])=>({[e]:t})))),this.inputTarget.innerText=JSON.stringify(r),this.inputTarget.dispatchEvent(new Event("input"))}updateKeyValueComponent(){let r="",e=0;this.fieldValue.forEach(t=>{let[n,i]=t;r+=this.interpolatedRow(cK.sanitize(n),cK.sanitize(i),e),e++}),this.rowsTarget.innerHTML=r,this.#e(),window.initTippy()}#e(){let r=this;new YMe(this.rowsTarget,{animation:150,handle:'[data-control="dnd-handle"]',onUpdate(e){r.moveKey(e.oldIndex,e.newIndex)}})}interpolatedRow(r,e,t){let n='<div class="key-value__row" role="row">';return n+=`
663
663
  ${this.inputCell("key",t,r,e)}