iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 73.6 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[73361],{56520:function(e,t,n){n.a(e,async function(e,s){try{n.d(t,{default:function(){return u}});n(16280),n(27495);var r=n(3398),i=n(98400),a=n(22711),o=e([a,i,r]);function c(e,t,n){return i.c9.fromObject({year:e[0],month:e[1]+1,day:e[2],hour:e[3],minute:e[4],second:e[5],millisecond:e[6]},{locale:n,zone:t})}[a,i,r]=o.then?(await o)():o;class h extends a.bw{offsetForArray(e){return c(e,this.timeZoneName).offset}timestampToArray(e){return[(t=i.c9.fromMillis(e,{zone:this.timeZoneName})).year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond];var t}}function d(e,t){let n=m(e);if(t.end){let e=c(t.start.array,t.timeZone,t.localeCodes[0]),s=c(t.end.array,t.timeZone,t.localeCodes[0]);return f(n,e.toFormat.bind(e),s.toFormat.bind(s),t.defaultSeparator)}return c(t.date.array,t.timeZone,t.localeCodes[0]).toFormat(n.whole)}function m(e){let t=e.match(/^(.*?)\{(.*)\}(.*)$/);if(t){let e=m(t[2]);return{head:t[1],middle:e,tail:t[3],whole:t[1]+e.whole+t[3]}}return{head:null,middle:null,tail:null,whole:e}}function f(e,t,n,s){if(e.middle){let r=t(e.head),i=f(e.middle,t,n,s),a=t(e.tail),o=n(e.head),u=f(e.middle,t,n,s),l=n(e.tail);if(r===o&&a===l)return r+(i===u?i:i+s+u)+a}let r=t(e.whole),i=n(e.whole);return r===i?r:r+s+i}var u=(0,r.i1)({name:"@fullcalendar/luxon3",cmdFormatter:d,namedTimeZonedImpl:h});s()}catch(l){s(l)}})},98400:function(e,t,n){n.a(e,async function(e,s){try{n.d(t,{c9:function(){return gr}});var r=n(86518),i=n(74487),a=(n(16280),n(74423),n(44114),n(72712),n(18863),n(94490),n(26910),n(18111),n(81148),n(22489),n(20116),n(61701),n(18237),n(13579),n(33110),n(45367),n(92731),n(84864),n(57465),n(27495),n(25440),n(42762),n(62953),e([i]));i=(a.then?(await a)():a)[0];const u=["base"],l=["padTo","floor"];class c extends Error{}class h extends c{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class d extends c{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class m extends c{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class f extends c{}class y extends c{constructor(e){super(`Invalid unit ${e}`)}}class g extends c{}class w extends c{constructor(){super("Zone is an abstract class")}}const p="numeric",k="short",b="long",O={year:p,month:p,day:p},v={year:p,month:k,day:p},S={year:p,month:k,day:p,weekday:k},T={year:p,month:b,day:p},N={year:p,month:b,day:p,weekday:b},M={hour:p,minute:p},D={hour:p,minute:p,second:p},I={hour:p,minute:p,second:p,timeZoneName:k},V={hour:p,minute:p,second:p,timeZoneName:b},x={hour:p,minute:p,hourCycle:"h23"},E={hour:p,minute:p,second:p,hourCycle:"h23"},j={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:k},C={hour:p,minute:p,second:p,hourCycle:"h23",timeZoneName:b},F={year:p,month:p,day:p,hour:p,minute:p},$={year:p,month:p,day:p,hour:p,minute:p,second:p},Z={year:p,month:k,day:p,hour:p,minute:p},W={year:p,month:k,day:p,hour:p,minute:p,second:p},L={year:p,month:k,day:p,weekday:k,hour:p,minute:p},z={year:p,month:b,day:p,hour:p,minute:p,timeZoneName:k},q={year:p,month:b,day:p,hour:p,minute:p,second:p,timeZoneName:k},A={year:p,month:b,day:p,weekday:b,hour:p,minute:p,timeZoneName:b},U={year:p,month:b,day:p,weekday:b,hour:p,minute:p,second:p,timeZoneName:b};class _{get type(){throw new w}get name(){throw new w}get ianaName(){return this.name}get isUniversal(){throw new w}offsetName(e,t){throw new w}formatOffset(e,t){throw new w}offset(e){throw new w}equals(e){throw new w}get isValid(){throw new w}}let Y=null;class R extends _{static get instance(){return null===Y&&(Y=new R),Y}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Dt(e,t,n)}formatOffset(e,t){return Et(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const H=new Map;function P(e){let t=H.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),H.set(e,t)),t}const J={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function G(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,a,o,u,l,c]=s;return[a,r,i,o,u,l,c]}function B(e,t){const n=e.formatToParts(t),s=[];for(let r=0;r<n.length;r++){const{type:e,value:t}=n[r],i=J[e];"era"===e?s[i]=t:rt(i)||(s[i]=parseInt(t,10))}return s}const Q=new Map;class K extends _{static create(e){let t=Q.get(e);return void 0===t&&Q.set(e,t=new K(e)),t}static resetCache(){Q.clear(),H.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(t){return!1}}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Dt(e,t,n,this.name)}formatOffset(e,t){return Et(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=P(this.name);let[s,r,i,a,o,u,l]=n.formatToParts?B(n,t):G(n,t);"BC"===a&&(s=1-Math.abs(s));let c=+t;const h=c%1e3;return c-=h>=0?h:1e3+h,(St({year:s,month:r,day:i,hour:24===o?0:o,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}constructor(e){super(),this.zoneName=e,this.valid=K.isValidZone(e)}}let X={};function ee(e,t={}){const n=JSON.stringify([e,t]);let s=X[n];return s||(s=new Intl.ListFormat(e,t),X[n]=s),s}const te=new Map;function ne(e,t={}){const n=JSON.stringify([e,t]);let s=te.get(n);return void 0===s&&(s=new Intl.DateTimeFormat(e,t),te.set(n,s)),s}const se=new Map;function re(e,t={}){const n=JSON.stringify([e,t]);let s=se.get(n);return void 0===s&&(s=new Intl.NumberFormat(e,t),se.set(n,s)),s}const ie=new Map;function ae(e,t={}){const{base:n}=t,s=(0,r.A)(t,u),i=JSON.stringify([e,s]);let a=ie.get(i);return void 0===a&&(a=new Intl.RelativeTimeFormat(e,t),ie.set(i,a)),a}let oe=null;const ue=new Map;function le(e){let t=ue.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),ue.set(e,t)),t}const ce=new Map;function he(e){let t=ce.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t=Object.assign(Object.assign({},be),t)),ce.set(e,t)}return t}function de(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=ne(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=ne(i).resolvedOptions(),r=i}const{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function me(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function fe(e){const t=[];for(let n=1;n<=12;n++){const s=gr.utc(2009,n,1);t.push(e(s))}return t}function ye(e){const t=[];for(let n=1;n<=7;n++){const s=gr.utc(2016,11,13+n);t.push(e(s))}return t}function ge(e,t,n,s){const r=e.listingMode();return"error"===r?null:"en"===r?n(t):s(t)}class we{format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return yt(this.floor?Math.floor(e):kt(e,3),this.padTo)}constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:i}=n,a=(0,r.A)(n,l);if(!t||Object.keys(a).length>0){const t=Object.assign({useGrouping:!1},n);n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=re(e,t)}}}class pe{format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return Object.assign(Object.assign({},e),{},{value:t})}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}constructor(e,t,n){let s;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&K.create(n).valid?(s=n,this.dt=e):(s="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r=Object.assign({},this.opts);r.timeZone=r.timeZone||s,this.dtf=ne(t,r)}}class ke{format(e,t){return this.rtf?this.rtf.format(e,t):Bt(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}constructor(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&ot()&&(this.rtf=ae(e,n))}}const be={firstDay:1,minimalDays:4,weekend:[6,7]};class Oe{static fromOpts(e){return Oe.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,s,r=!1){const i=e||qe.defaultLocale,a=i||(r?"en-US":oe||(oe=(new Intl.DateTimeFormat).resolvedOptions().locale,oe)),o=t||qe.defaultNumberingSystem,u=n||qe.defaultOutputCalendar,l=dt(s)||qe.defaultWeekSettings;return new Oe(a,o,u,l,i)}static resetCache(){oe=null,te.clear(),se.clear(),ie.clear(),ue.clear(),ce.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:s}={}){return Oe.create(e,t,n,s)}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===le(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Oe.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,dt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone(Object.assign(Object.assign({},e),{},{defaultToEN:!0}))}redefaultToSystem(e={}){return this.clone(Object.assign(Object.assign({},e),{},{defaultToEN:!1}))}months(e,t=!1){return ge(this,e,Zt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),s=(t&=!n)?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";if(!this.monthsCache[r][e]){const t=n?e=>this.dtFormatter(e,s).format():e=>this.extract(e,s,"month");this.monthsCache[r][e]=fe(t)}return this.monthsCache[r][e]})}weekdays(e,t=!1){return ge(this,e,qt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=ye(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return ge(this,void 0,()=>At,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[gr.utc(2016,11,13,9),gr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ge(this,e,Rt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[gr.utc(-40,1,1),gr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const s=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return s?s.value:null}numberFormatter(e={}){return new we(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new pe(e,this.intl,t)}relFormatter(e={}){return new ke(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ee(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||le(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ut()?he(this.locale):be}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})`}constructor(e,t,n,s,r){const[i,a,o]=de(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=s,this.intl=me(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}}let ve=null;class Se extends _{static get utcInstance(){return null===ve&&(ve=new Se(0)),ve}static instance(e){return 0===e?Se.utcInstance:new Se(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Se(It(t[1],t[2]))}return null}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Et(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Et(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Et(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}constructor(e){super(),this.fixed=e}}class Te extends _{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}constructor(e){super(),this.zoneName=e}}function Ne(e,t){if(rt(e)||null===e)return t;if(e instanceof _)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?R.instance:"utc"===n||"gmt"===n?Se.utcInstance:Se.parseSpecifier(n)||K.create(e)}return it(e)?Se.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new Te(e)}const Me={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},De={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]},Ie=Me.hanidec.replace(/[\[|\]]/g,"").split("");function Ve(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);if(-1!==e[n].search(Me.hanidec))t+=Ie.indexOf(e[n]);else for(const e in De){const[n,r]=De[e];s>=n&&s<=r&&(t+=s-n)}}return parseInt(t,10)}return t}const xe=new Map;function Ee({numberingSystem:e},t=""){const n=e||"latn";let s=xe.get(n);void 0===s&&(s=new Map,xe.set(n,s));let r=s.get(t);return void 0===r&&(r=new RegExp(`${Me[n]}${t}`),s.set(t,r)),r}let je,Ce=()=>Date.now(),Fe="system",$e=null,Ze=null,We=null,Le=60,ze=null;class qe{static get now(){return Ce}static set now(e){Ce=e}static set defaultZone(e){Fe=e}static get defaultZone(){return Ne(Fe,R.instance)}static get defaultLocale(){return $e}static set defaultLocale(e){$e=e}static get defaultNumberingSystem(){return Ze}static set defaultNumberingSystem(e){Ze=e}static get defaultOutputCalendar(){return We}static set defaultOutputCalendar(e){We=e}static get defaultWeekSettings(){return ze}static set defaultWeekSettings(e){ze=dt(e)}static get twoDigitCutoffYear(){return Le}static set twoDigitCutoffYear(e){Le=e%100}static get throwOnInvalid(){return je}static set throwOnInvalid(e){je=e}static resetCaches(){Oe.resetCache(),K.resetCache(),gr.resetCache(),xe.clear()}}class Ae{toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}constructor(e,t){this.reason=e,this.explanation=t}}const Ue=[0,31,59,90,120,151,181,212,243,273,304,334],_e=[0,31,60,91,121,152,182,213,244,274,305,335];function Ye(e,t){return new Ae("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Re(e,t,n){const s=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return 0===r?7:r}function He(e,t,n){return n+(bt(e)?_e:Ue)[t-1]}function Pe(e,t){const n=bt(e)?_e:Ue,s=n.findIndex(e=>e<t);return{month:s+1,day:t-n[s]}}function Je(e,t){return(e-t+7)%7+1}function Ge(e,t=4,n=1){const{year:s,month:r,day:i}=e,a=He(s,r,i),o=Je(Re(s,r,i),n);let u,l=Math.floor((a-o+14-t)/7);return l<1?(u=s-1,l=Nt(u,t,n)):l>Nt(s,t,n)?(u=s+1,l=1):u=s,Object.assign({weekYear:u,weekNumber:l,weekday:o},jt(e))}function Be(e,t=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=e,a=Je(Re(s,1,t),n),o=Ot(s);let u,l=7*r+i-a-7+t;l<1?(u=s-1,l+=Ot(u)):l>o?(u=s+1,l-=Ot(s)):u=s;const{month:c,day:h}=Pe(u,l);return Object.assign({year:u,month:c,day:h},jt(e))}function Qe(e){const{year:t,month:n,day:s}=e,r=He(t,n,s);return Object.assign({year:t,ordinal:r},jt(e))}function Ke(e){const{year:t,ordinal:n}=e,{month:s,day:r}=Pe(t,n);return Object.assign({year:t,month:s,day:r},jt(e))}function Xe(e,t){if(!rt(e.localWeekday)||!rt(e.localWeekNumber)||!rt(e.localWeekYear)){if(!rt(e.weekday)||!rt(e.weekNumber)||!rt(e.weekYear))throw new f("Cannot mix locale-based week fields with ISO-based week fields");return rt(e.localWeekday)||(e.weekday=e.localWeekday),rt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),rt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function et(e,t=4,n=1){const s=at(e.weekYear),r=mt(e.weekNumber,1,Nt(e.weekYear,t,n)),i=mt(e.weekday,1,7);return s?r?!i&&Ye("weekday",e.weekday):Ye("week",e.weekNumber):Ye("weekYear",e.weekYear)}function tt(e){const t=at(e.year),n=mt(e.ordinal,1,Ot(e.year));return t?!n&&Ye("ordinal",e.ordinal):Ye("year",e.year)}function nt(e){const t=at(e.year),n=mt(e.month,1,12),s=mt(e.day,1,vt(e.year,e.month));return t?n?!s&&Ye("day",e.day):Ye("month",e.month):Ye("year",e.year)}function st(e){const{hour:t,minute:n,second:s,millisecond:r}=e,i=mt(t,0,23)||24===t&&0===n&&0===s&&0===r,a=mt(n,0,59),o=mt(s,0,59),u=mt(r,0,999);return i?a?o?!u&&Ye("millisecond",r):Ye("second",s):Ye("minute",n):Ye("hour",t)}function rt(e){return void 0===e}function it(e){return"number"==typeof e}function at(e){return"number"==typeof e&&e%1==0}function ot(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function ut(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function lt(e,t,n){if(0!==e.length)return e.reduce((e,s)=>{const r=[t(s),s];return e&&n(e[0],r[0])===e[0]?e:r},null)[1]}function ct(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function ht(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dt(e){if(null==e)return null;if("object"!=typeof e)throw new g("Week settings must be an object");if(!mt(e.firstDay,1,7)||!mt(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!mt(e,1,7)))throw new g("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function mt(e,t,n){return at(e)&&e>=t&&e<=n}function ft(e,t){return e-t*Math.floor(e/t)}function yt(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function gt(e){return rt(e)||null===e||""===e?void 0:parseInt(e,10)}function wt(e){return rt(e)||null===e||""===e?void 0:parseFloat(e)}function pt(e){if(!rt(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function kt(e,t,n="round"){const s=10**t;switch(n){case"expand":return e>0?Math.ceil(e*s)/s:Math.floor(e*s)/s;case"trunc":return Math.trunc(e*s)/s;case"round":return Math.round(e*s)/s;case"floor":return Math.floor(e*s)/s;case"ceil":return Math.ceil(e*s)/s;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function bt(e){return e%4==0&&(e%100!=0||e%400==0)}function Ot(e){return bt(e)?366:365}function vt(e,t){const n=ft(t-1,12)+1;return 2===n?bt(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function St(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Tt(e,t,n){return-Je(Re(e,1,t),n)+t-1}function Nt(e,t=4,n=1){const s=Tt(e,t,n),r=Tt(e+1,t,n);return(Ot(e)-s+r)/7}function Mt(e){return e>99?e:e>qe.twoDigitCutoffYear?1900+e:2e3+e}function Dt(e,t,n,s=null){const r=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const a=Object.assign({timeZoneName:t},i),o=new Intl.DateTimeFormat(n,a).formatToParts(r).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function It(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-s:s)}function Vt(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new g(`Invalid unit value ${e}`);return t}function xt(e,t){const n={};for(const s in e)if(ht(e,s)){const r=e[s];if(null==r)continue;n[t(s)]=Vt(r)}return n}function Et(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${yt(n,2)}:${yt(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${yt(n,2)}${yt(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function jt(e){return ct(e,["hour","minute","second","millisecond"])}const Ct=["January","February","March","April","May","June","July","August","September","October","November","December"],Ft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$t=["J","F","M","A","M","J","J","A","S","O","N","D"];function Zt(e){switch(e){case"narrow":return[...$t];case"short":return[...Ft];case"long":return[...Ct];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Wt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zt=["M","T","W","T","F","S","S"];function qt(e){switch(e){case"narrow":return[...zt];case"short":return[...Lt];case"long":return[...Wt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const At=["AM","PM"],Ut=["Before Christ","Anno Domini"],_t=["BC","AD"],Yt=["B","A"];function Rt(e){switch(e){case"narrow":return[...Yt];case"short":return[..._t];case"long":return[...Ut];default:return null}}function Ht(e){return At[e.hour<12?0:1]}function Pt(e,t){return qt(t)[e.weekday-1]}function Jt(e,t){return Zt(t)[e.month-1]}function Gt(e,t){return Rt(t)[e.year<0?0:1]}function Bt(e,t,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${r[e][0]}`;case-1:return n?"yesterday":`last ${r[e][0]}`;case 0:return n?"today":`this ${r[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),u=1===o,l=r[e],c=s?u?l[1]:l[2]||l[1]:u?r[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}function Qt(e,t){let n="";for(const s of e)s.literal?n+=s.val:n+=t(s.val);return n}const Kt={D:O,DD:v,DDD:T,DDDD:N,t:M,tt:D,ttt:I,tttt:V,T:x,TT:E,TTT:j,TTTT:C,f:F,ff:Z,fff:z,ffff:A,F:$,FF:W,FFF:q,FFFF:U};class Xt{static create(e,t={}){return new Xt(e,t)}static parseFormat(e){let t=null,n="",s=!1;const r=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?((n.length>0||s)&&r.push({literal:s||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",s=!s):s||a===t?n+=a:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&r.push({literal:s||/^\s+$/.test(n),val:n}),r}static macroTokenToFormatOpts(e){return Kt[e]}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,Object.assign(Object.assign({},this.opts),t)).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,Object.assign(Object.assign({},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 yt(e,t);const s=Object.assign({},this.opts);return t>0&&(s.padTo=t),n&&(s.signDisplay=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),s=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=(t,s)=>n?Jt(e,t):r(s?{month:t}:{month:t,day:"numeric"},"month"),o=(t,s)=>n?Pt(e,t):r(s?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=Xt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?Gt(e,t):r({era:t},"era");return Qt(Xt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({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 n?Ht(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return s?r({day:"numeric"},"day"):this.num(e.day);case"dd":return s?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return s?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?r({month:"numeric"},"month"):this.num(e.month);case"MM":return s?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?r({year:"numeric"},"year"):this.num(e.year);case"yy":return s?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("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 u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,s=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},r=Xt.parseFormat(t),i=r.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...i.map(s).filter(e=>e));return Qt(r,((e,t)=>r=>{const i=s(r);if(i){const s=t.isNegativeDuration&&i!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*s,r.length,a)}return r})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}}const en=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function tn(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function nn(...e){return t=>e.reduce(([e,n,s],r)=>{const[i,a,o]=r(t,s);return[Object.assign(Object.assign({},e),i),a||n,o]},[{},null,1]).slice(0,2)}function sn(e,...t){if(null==e)return[null,null];for(const[n,s]of t){const t=n.exec(e);if(t)return s(t)}return[null,null]}function rn(...e){return(t,n)=>{const s={};let r;for(r=0;r<e.length;r++)s[e[r]]=gt(t[n+r]);return[s,null,n+r]}}const an=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,on=`(?:${an.source}?(?:\\[(${en.source})\\])?)?`,un=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ln=RegExp(`${un.source}${on}`),cn=RegExp(`(?:[Tt]${ln.source})?`),hn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,dn=/(\d{4})-?W(\d\d)(?:-?(\d))?/,mn=/(\d{4})-?(\d{3})/,fn=rn("weekYear","weekNumber","weekDay"),yn=rn("year","ordinal"),gn=/(\d{4})-(\d\d)-(\d\d)/,wn=RegExp(`${un.source} ?(?:${an.source}|(${en.source}))?`),pn=RegExp(`(?: ${wn.source})?`);function kn(e,t,n){const s=e[t];return rt(s)?n:gt(s)}function bn(e,t){return[{year:kn(e,t),month:kn(e,t+1,1),day:kn(e,t+2,1)},null,t+3]}function On(e,t){return[{hours:kn(e,t,0),minutes:kn(e,t+1,0),seconds:kn(e,t+2,0),milliseconds:pt(e[t+3])},null,t+4]}function vn(e,t){const n=!e[t]&&!e[t+1],s=It(e[t+1],e[t+2]);return[{},n?null:Se.instance(s),t+3]}function Sn(e,t){return[{},e[t]?K.create(e[t]):null,t+1]}const Tn=RegExp(`^T?${un.source}$`),Nn=/^-?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 Mn(e){const[t,n,s,r,i,a,o,u,l]=e,c="-"===t[0],h=u&&"-"===u[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(wt(n)),months:d(wt(s)),weeks:d(wt(r)),days:d(wt(i)),hours:d(wt(a)),minutes:d(wt(o)),seconds:d(wt(u),"-0"===u),milliseconds:d(pt(l),h)}]}const Dn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function In(e,t,n,s,r,i,a){const o={year:2===t.length?Mt(gt(t)):gt(t),month:Ft.indexOf(n)+1,day:gt(s),hour:gt(r),minute:gt(i)};return a&&(o.second=gt(a)),e&&(o.weekday=e.length>3?Wt.indexOf(e)+1:Lt.indexOf(e)+1),o}const Vn=/^(?:(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 xn(e){const[,t,n,s,r,i,a,o,u,l,c,h]=e,d=In(t,r,s,n,i,a,o);let m;return m=u?Dn[u]:l?0:It(c,h),[d,new Se(m)]}function En(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const jn=/^(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$/,Cn=/^(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$/,Fn=/^(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 $n(e){const[,t,n,s,r,i,a,o]=e;return[In(t,r,s,n,i,a,o),Se.utcInstance]}function Zn(e){const[,t,n,s,r,i,a,o]=e;return[In(t,o,n,s,r,i,a),Se.utcInstance]}const Wn=tn(hn,cn),Ln=tn(dn,cn),zn=tn(mn,cn),qn=tn(ln),An=nn(bn,On,vn,Sn),Un=nn(fn,On,vn,Sn),_n=nn(yn,On,vn,Sn),Yn=nn(On,vn,Sn);function Rn(e){return sn(e,[Wn,An],[Ln,Un],[zn,_n],[qn,Yn])}function Hn(e){return sn(En(e),[Vn,xn])}function Pn(e){return sn(e,[jn,$n],[Cn,$n],[Fn,Zn])}function Jn(e){return sn(e,[Nn,Mn])}const Gn=nn(On);function Bn(e){return sn(e,[Tn,Gn])}const Qn=tn(gn,pn),Kn=tn(wn),Xn=nn(On,vn,Sn);function es(e){return sn(e,[Qn,An],[Kn,Xn])}const ts="Invalid Duration",ns={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},ss=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},ns),rs=365.2425,is=30.436875,as=Object.assign({years:{quarters:4,months:12,weeks:rs/7,days:rs,hours:24*rs,minutes:24*rs*60,seconds:24*rs*60*60,milliseconds:24*rs*60*60*1e3},quarters:{months:3,weeks:rs/28,days:rs/4,hours:24*rs/4,minutes:24*rs*60/4,seconds:24*rs*60*60/4,milliseconds:24*rs*60*60*1e3/4},months:{weeks:is/7,days:is,hours:24*is,minutes:24*is*60,seconds:24*is*60*60,milliseconds:24*is*60*60*1e3}},ns),os=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],us=os.slice(0).reverse();function ls(e,t,n=!1){const s={values:n?t.values:Object.assign(Object.assign({},e.values),t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new ms(s)}function cs(e,t){var n;let s=null!==(n=t.milliseconds)&&void 0!==n?n:0;for(const r of us.slice(1))t[r]&&(s+=t[r]*e[r].milliseconds);return s}function hs(e,t){const n=cs(e,t)<0?-1:1;os.reduceRight((s,r)=>{if(rt(t[r]))return s;if(s){const i=t[s]*n,a=e[r][s],o=Math.floor(i/a);t[r]+=o*n,t[s]-=o*a*n}return r},null),os.reduce((n,s)=>{if(rt(t[s]))return n;if(n){const r=t[n]%1;t[n]-=r,t[s]+=r*e[n][s]}return s},null)}function ds(e){const t={};for(const[n,s]of Object.entries(e))0!==s&&(t[n]=s);return t}class ms{static fromMillis(e,t){return ms.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new g("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new ms({values:xt(e,ms.normalizeUnit),loc:Oe.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(it(e))return ms.fromMillis(e);if(ms.isDuration(e))return e;if("object"==typeof e)return ms.fromObject(e);throw new g(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=Jn(e);return n?ms.fromObject(n,t):ms.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=Bn(e);return n?ms.fromObject(n,t):ms.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new g("need to specify a reason the Duration is invalid");const n=e instanceof Ae?e:new Ae(e,t);if(qe.throwOnInvalid)throw new m(n);return new ms({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new y(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n=Object.assign(Object.assign({},t),{},{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Xt.create(this.loc,n).formatDurationFromString(this,e):ts}toHuman(e={}){if(!this.isValid)return ts;const t=!1!==e.showZeros,n=os.map(n=>{const s=this.values[n];return rt(s)||0===s&&!t?null:this.loc.numberFormatter(Object.assign(Object.assign({style:"unit",unitDisplay:"long"},e),{},{unit:n.slice(0,-1)})).format(s)}).filter(e=>e);return this.loc.listFormatter(Object.assign({type:"conjunction",style:e.listStyle||"narrow"},e)).format(n)}toObject(){return this.isValid?Object.assign({},this.values):{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=kt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign(Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e),{},{includeOffset:!1});return gr.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?cs(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ms.fromDurationLike(e),n={};for(const s of os)(ht(t.values,s)||ht(this.values,s))&&(n[s]=t.get(s)+this.get(s));return ls(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=ms.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=Vt(e(this.values[n],n));return ls(this,{values:t},!0)}get(e){return this[ms.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return ls(this,{values:Object.assign(Object.assign({},this.values),xt(e,ms.normalizeUnit))})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:s}={}){return ls(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return hs(this.matrix,e),ls(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return ls(this,{values:ds(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>ms.normalizeUnit(e));const t={},n={},s=this.toObject();let r;for(const i of os)if(e.indexOf(i)>=0){r=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;it(s[i])&&(e+=s[i]);const a=Math.trunc(e);t[i]=a,n[i]=(1e3*e-1e3*a)/1e3}else it(s[i])&&(n[i]=s[i]);for(const i in n)0!==n[i]&&(t[r]+=i===r?n[i]:n[i]/this.matrix[r][i]);return hs(this.matrix,t),ls(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return ls(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return ls(this,{values:ds(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of os)if(!t(this.values[n],e.values[n]))return!1;return!0}constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?as:ss;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Oe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}}const fs="Invalid Interval";function ys(e,t){return e&&e.isValid?t&&t.isValid?t<e?gs.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:gs.invalid("missing or invalid end"):gs.invalid("missing or invalid start")}class gs{static invalid(e,t=null){if(!e)throw new g("need to specify a reason the Interval is invalid");const n=e instanceof Ae?e:new Ae(e,t);if(qe.throwOnInvalid)throw new d(n);return new gs({invalid:n})}static fromDateTimes(e,t){const n=wr(e),s=wr(t),r=ys(n,s);return null==r?new gs({start:n,end:s}):r}static after(e,t){const n=ms.fromDurationLike(t),s=wr(e);return gs.fromDateTimes(s,s.plus(n))}static before(e,t){const n=ms.fromDurationLike(t),s=wr(e);return gs.fromDateTimes(s.minus(n),s)}static fromISO(e,t){const[n,s]=(e||"").split("/",2);if(n&&s){let e,r,i,a;try{e=gr.fromISO(n,t),r=e.isValid}catch(s){r=!1}try{i=gr.fromISO(s,t),a=i.isValid}catch(s){a=!1}if(r&&a)return gs.fromDateTimes(e,i);if(r){const n=ms.fromISO(s,t);if(n.isValid)return gs.after(e,n)}else if(a){const e=ms.fromISO(n,t);if(e.isValid)return gs.before(i,e)}}return gs.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let s;return s=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,s=s.startOf(e,t),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?gs.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(wr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:s}=this,r=0;for(;s<this.e;){const e=t[r]||this.e,i=+e>+this.e?this.e:e;n.push(gs.fromDateTimes(s,i)),s=i,r+=1}return n}splitBy(e){const t=ms.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:s}=this,r=1;const i=[];for(;s<this.e;){const e=this.start.plus(t.mapUnits(e=>e*r));n=+e>+this.e?this.e:e,i.push(gs.fromDateTimes(s,n)),s=n,r+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:gs.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return gs.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const s=[],r=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...r).sort((e,t)=>e.time-t.time);for(const a of i)n+="s"===a.type?1:-1,1===n?t=a.time:(t&&+t!==+a.time&&s.push(gs.fromDateTimes(t,a.time)),t=null);return gs.merge(s)}difference(...e){return gs.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:fs}[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=O,t={}){return this.isValid?Xt.create(this.s.loc.clone(t),e).formatInterval(this):fs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:fs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:fs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:fs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:fs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ms.invalid(this.invalidReason)}mapEndpoints(e){return gs.fromDateTimes(e(this.s),e(this.e))}constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}}class ws{static hasDST(e=qe.defaultZone){const t=gr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return K.isValidZone(e)}static normalizeZone(e){return Ne(e,qe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Oe.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Oe.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Oe.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||Oe.create(t,n,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||Oe.create(t,n,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||Oe.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||Oe.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Oe.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Oe.create(t,null,"gregory").eras(e)}static features(){return{relative:ot(),localeWeek:ut()}}}function ps(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(t)-n(e);return Math.floor(ms.fromMillis(s).as("days"))}function ks(e,t,n){const s=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=ps(e,t);return(n-n%7)/7}],["days",ps]],r={},i=e;let a,o;for(const[u,l]of s)n.indexOf(u)>=0&&(a=u,r[u]=l(e,t),o=i.plus(r),o>t?(r[u]--,(e=i.plus(r))>t&&(o=e,r[u]--,e=i.plus(r))):e=o);return[e,r,o,a]}function bs(e,t,n,s){let[r,i,a,o]=ks(e,t,n);const u=t-r,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(a<t&&(a=r.plus({[o]:1})),a!==r&&(i[o]=(i[o]||0)+u/(a-r)));const c=ms.fromObject(i,s);return l.length>0?ms.fromMillis(u,s).shiftTo(...l).plus(c):c}const Os="missing Intl.DateTimeFormat.formatToParts support";function vs(e,t=e=>e){return{regex:e,deser:([e])=>t(Ve(e))}}const Ss=`[ ${String.fromCharCode(160)}]`,Ts=new RegExp(Ss,"g");function Ns(e){return e.replace(/\./g,"\\.?").replace(Ts,Ss)}function Ms(e){return e.replace(/\./g,"").replace(Ts," ").toLowerCase()}function Ds(e,t){return null===e?null:{regex:RegExp(e.map(Ns).join("|")),deser:([n])=>e.findIndex(e=>Ms(n)===Ms(e))+t}}function Is(e,t){return{regex:e,deser:([,e,t])=>It(e,t),groups:t}}function Vs(e){return{regex:e,deser:([e])=>e}}function xs(e,t){const n=Ee(t),s=Ee(t,"{2}"),r=Ee(t,"{3}"),i=Ee(t,"{4}"),a=Ee(t,"{6}"),o=Ee(t,"{1,2}"),u=Ee(t,"{1,3}"),l=Ee(t,"{1,6}"),c=Ee(t,"{1,9}"),h=Ee(t,"{2,4}"),d=Ee(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return Ds(t.eras("short"),0);case"GG":return Ds(t.eras("long"),0);case"y":return vs(l);case"yy":case"kk":return vs(h,Mt);case"yyyy":case"kkkk":return vs(i);case"yyyyy":return vs(d);case"yyyyyy":return vs(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return vs(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return vs(s);case"MMM":return Ds(t.months("short",!0),1);case"MMMM":return Ds(t.months("long",!0),1);case"LLL":return Ds(t.months("short",!1),1);case"LLLL":return Ds(t.months("long",!1),1);case"o":case"S":return vs(u);case"ooo":case"SSS":return vs(r);case"u":return Vs(c);case"uu":return Vs(o);case"uuu":case"E":case"c":return vs(n);case"a":return Ds(t.meridiems(),0);case"EEE":return Ds(t.weekdays("short",!1),1);case"EEEE":return Ds(t.weekdays("long",!1),1);case"ccc":return Ds(t.weekdays("short",!0),1);case"cccc":return Ds(t.weekdays("long",!0),1);case"Z":case"ZZ":return Is(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return Is(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return Vs(/[a-z_+-/]{1,256}?/i);case" ":return Vs(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:Os};return f.token=e,f}const Es={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 js(e,t,n){const{type:s,value:r}=e;if("literal"===s){const e=/^\s+$/.test(r);return{literal:!e,val:e?" ":r}}const i=t[s];let a=s;"hour"===s&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Es[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}function Cs(e,t,n){const s=e.match(t);if(s){const e={};let t=1;for(const r in n)if(ht(n,r)){const i=n[r],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(s.slice(t,t+a))),t+=a}return[s,e]}return[s,{}]}function Fs(e){let t,n=null;rt(e.z)||(n=K.create(e.z)),rt(e.Z)||(n||(n=new Se(e.Z)),t=e.Z),rt(e.q)||(e.M=3*(e.q-1)+1),rt(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),rt(e.u)||(e.S=pt(e.u));return[Object.keys(e).reduce((t,n)=>{const s=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return s&&(t[s]=e[n]),t},{}),n,t]}let $s=null;function Zs(e,t){if(e.literal)return e;const n=As(Xt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}function Ws(e,t){return Array.prototype.concat(...e.map(e=>Zs(e,t)))}class Ls{explainFromTokens(e){if(this.isValid){const[t,n]=Cs(e,this.regex,this.handlers),[s,r,i]=n?Fs(n):[null,null,void 0];if(ht(n,"a")&&ht(n,"H"))throw new f("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:s,zone:r,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Ws(Xt.parseFormat(t),e),this.units=this.tokens.map(t=>xs(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}}function zs(e,t,n){return new Ls(e,n).explainFromTokens(t)}function qs(e,t,n){const{result:s,zone:r,specificOffset:i,invalidReason:a}=zs(e,t,n);return[s,r,i,a]}function As(e,t){if(!e)return null;const n=Xt.create(t,e).dtFormatter(($s||($s=gr.fromMillis(1555555555555)),$s)),s=n.formatToParts(),r=n.resolvedOptions();return s.map(t=>js(t,e,r))}const Us="Invalid DateTime",_s=864e13;function Ys(e){return new Ae("unsupported zone",`the zone "${e.name}" is not supported`)}function Rs(e){return null===e.weekData&&(e.weekData=Ge(e.c)),e.weekData}function Hs(e){return null===e.localWeekData&&(e.localWeekData=Ge(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Ps(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new gr(Object.assign(Object.assign(Object.assign({},n),t),{},{old:n}))}function Js(e,t,n){let s=e-60*t*1e3;const r=n.offset(s);if(t===r)return[s,t];s-=60*(r-t)*1e3;const i=n.offset(s);return r===i?[s,r]:[e-60*Math.min(r,i)*1e3,Math.max(r,i)]}function Gs(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Bs(e,t,n){return Js(St(e),t,n)}function Qs(e,t){const n=e.o,s=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i=Object.assign(Object.assign({},e.c),{},{year:s,month:r,day:Math.min(e.c.day,vt(s,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),a=ms.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=St(i);let[u,l]=Js(o,n,e.zone);return 0!==a&&(u+=a,l=e.zone.offset(u)),{ts:u,o:l}}function Ks(e,t,n,s,r,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const s=t||o,r=gr.fromObject(e,Object.assign(Object.assign({},n),{},{zone:s,specificOffset:i}));return a?r:r.setZone(o)}return gr.invalid(new Ae("unparsable",`the input "${r}" can't be parsed as ${s}`))}function Xs(e,t,n=!0){return e.isValid?Xt.create(Oe.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t,n){const s=e.c.year>9999||e.c.year<0;let r="";if(s&&e.c.year>=0&&(r+="+"),r+=yt(e.c.year,s?6:4),"year"===n)return r;if(t){if(r+="-",r+=yt(e.c.month),"month"===n)return r;r+="-"}else if(r+=yt(e.c.month),"month"===n)return r;return r+=yt(e.c.day),r}function tr(e,t,n,s,r,i,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=yt(e.c.hour),"hour"===a)break;if(t){if(u+=":",u+=yt(e.c.minute),"minute"===a)break;o&&(u+=":",u+=yt(e.c.second))}else{if(u+=yt(e.c.minute),"minute"===a)break;o&&(u+=yt(e.c.second))}if("second"===a)break;!o||s&&0===e.c.millisecond||(u+=".",u+=yt(e.c.millisecond,3))}return r&&(e.isOffsetFixed&&0===e.offset&&!i?u+="Z":e.o<0?(u+="-",u+=yt(Math.trunc(-e.o/60)),u+=":",u+=yt(Math.trunc(-e.o%60))):(u+="+",u+=yt(Math.trunc(e.o/60)),u+=":",u+=yt(Math.trunc(e.o%60)))),i&&(u+="["+e.zone.ianaName+"]"),u}const nr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},sr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ir=["year","month","day","hour","minute","second","millisecond"],ar=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],or=["year","ordinal","hour","minute","second","millisecond"];function ur(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new y(e);return t}function lr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return ur(e)}}function cr(e){if(void 0===fr&&(fr=qe.now()),"iana"!==e.type)return e.offset(fr);const t=e.name;let n=yr.get(t);return void 0===n&&(n=e.offset(fr),yr.set(t,n)),n}function hr(e,t){const n=Ne(t.zone,qe.defaultZone);if(!n.isValid)return gr.invalid(Ys(n));const s=Oe.fromObject(t);let r,i;if(rt(e.year))r=qe.now();else{for(const n of ir)rt(e[n])&&(e[n]=nr[n]);const t=nt(e)||st(e);if(t)return gr.invalid(t);const s=cr(n);[r,i]=Bs(e,s,n)}return new gr({ts:r,zone:n,loc:s,o:i})}function dr(e,t,n){const s=!!rt(n.round)||n.round,r=rt(n.rounding)?"trunc":n.rounding,i=(e,i)=>{e=kt(e,s||n.calendary?0:2,n.calendary?"round":r);return t.loc.clone(n).relFormatter(n).format(e,i)},a=s=>n.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const e=a(o);if(Math.abs(e)>=1)return i(e,o)}return i(e>t?-0:0,n.units[n.units.length-1])}function mr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let fr;const yr=new Map;class gr{static now(){return new gr({})}static local(){const[e,t]=mr(arguments),[n,s,r,i,a,o,u]=t;return hr({year:n,month:s,day:r,hour:i,minute:a,second:o,millisecond:u},e)}static utc(){const[e,t]=mr(arguments),[n,s,r,i,a,o,u]=t;return e.zone=Se.utcInstance,hr({year:n,month:s,day:r,hour:i,minute:a,second:o,millisecond:u},e)}static fromJSDate(e,t={}){const n=(s=e,"[object Date]"===Object.prototype.toString.call(s)?e.valueOf():NaN);var s;if(Number.isNaN(n))return gr.invalid("invalid input");const r=Ne(t.zone,qe.defaultZone);return r.isValid?new gr({ts:n,zone:r,loc:Oe.fromObject(t)}):gr.invalid(Ys(r))}static fromMillis(e,t={}){if(it(e))return e<-_s||e>_s?gr.invalid("Timestamp out of range"):new gr({ts:e,zone:Ne(t.zone,qe.defaultZone),loc:Oe.fromObject(t)});throw new g(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(it(e))return new gr({ts:1e3*e,zone:Ne(t.zone,qe.defaultZone),loc:Oe.fromObject(t)});throw new g("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=Ne(t.zone,qe.defaultZone);if(!n.isValid)return gr.invalid(Ys(n));const s=Oe.fromObject(t),r=xt(e,lr),{minDaysInFirstWeek:i,startOfWeek:a}=Xe(r,s),o=qe.now(),u=rt(t.specificOffset)?n.offset(o):t.specificOffset,l=!rt(r.ordinal),c=!rt(r.year),h=!rt(r.month)||!rt(r.day),d=c||h,m=r.weekYear||r.weekNumber;if((d||l)&&m)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&l)throw new f("Can't mix ordinal dates with month/day");const y=m||r.weekday&&!d;let g,w,p=Gs(o,u);y?(g=ar,w=sr,p=Ge(p,i,a)):l?(g=or,w=rr,p=Qe(p)):(g=ir,w=nr);let k=!1;for(const f of g){rt(r[f])?r[f]=k?w[f]:p[f]:k=!0}const b=(y?et(r,i,a):l?tt(r):nt(r))||st(r);if(b)return gr.invalid(b);const O=y?Be(r,i,a):l?Ke(r):r,[v,S]=Bs(O,u,n),T=new gr({ts:v,zone:n,o:S,loc:s});return r.weekday&&d&&e.weekday!==T.weekday?gr.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${T.toISO()}`):T.isValid?T:gr.invalid(T.invalid)}static fromISO(e,t={}){const[n,s]=Rn(e);return Ks(n,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,s]=Hn(e);return Ks(n,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,s]=Pn(e);return Ks(n,s,t,"HTTP",t)}static fromFormat(e,t,n={}){if(rt(e)||rt(t))throw new g("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:r=null}=n,i=Oe.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),[a,o,u,l]=qs(i,e,t);return l?gr.invalid(l):Ks(a,o,n,`format ${t}`,e,u)}static fromString(e,t,n={}){return gr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,s]=es(e);return Ks(n,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new g("need to specify a reason the DateTime is invalid");const n=e instanceof Ae?e:new Ae(e,t);if(qe.throwOnInvalid)throw new h(n);return new gr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=As(e,Oe.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Ws(Xt.parseFormat(e),Oe.fromObject(t)).map(e=>e.val).join("")}static resetCache(){fr=void 0,yr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Rs(this).weekYear:NaN}get weekNumber(){return this.isValid?Rs(this).weekNumber:NaN}get weekday(){return this.isValid?Rs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Hs(this).weekday:NaN}get localWeekNumber(){return this.isValid?Hs(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Hs(this).weekYear:NaN}get ordinal(){return this.isValid?Qe(this.c).ordinal:NaN}get monthShort(){return this.isValid?ws.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ws.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ws.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ws.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=St(this.c),s=this.zone.offset(n-e),r=this.zone.offset(n+e),i=this.zone.offset(n-s*t),a=this.zone.offset(n-r*t);if(i===a)return[this];const o=n-i*t,u=n-a*t,l=Gs(o,i),c=Gs(u,a);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[Ps(this,{ts:o}),Ps(this,{ts:u})]:[this]}get isInLeapYear(){return bt(this.year)}get daysInMonth(){return vt(this.year,this.month)}get daysInYear(){return this.isValid?Ot(this.year):NaN}get weeksInWeekYear(){return this.isValid?Nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:s}=Xt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Se.instance(e),t)}toLocal(){return this.setZone(qe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=Ne(e,qe.defaultZone)).equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[s]=Bs(n,t,e)}return Ps(this,{ts:s,zone:e})}return gr.invalid(Ys(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Ps(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=xt(e,lr),{minDaysInFirstWeek:n,startOfWeek:s}=Xe(t,this.loc),r=!rt(t.weekYear)||!rt(t.weekNumber)||!rt(t.weekday),i=!rt(t.ordinal),a=!rt(t.year),o=!rt(t.month)||!rt(t.day),u=a||o,l=t.weekYear||t.weekNumber;if((u||i)&&l)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new f("Can't mix ordinal dates with month/day");let c;r?c=Be(Object.assign(Object.assign({},Ge(this.c,n,s)),t),n,s):rt(t.ordinal)?(c=Object.assign(Object.assign({},this.toObject()),t),rt(t.day)&&(c.day=Math.min(vt(c.year,c.month),c.day))):c=Ke(Object.assign(Object.assign({},Qe(this.c)),t));const[h,d]=Bs(c,this.o,this.zone);return Ps(this,{ts:h,o:d})}plus(e){if(!this.isValid)return this;return Ps(this,Qs(this,ms.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Ps(this,Qs(this,ms.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},s=ms.normalizeUnit(e);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===s)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===s){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Xt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Us}toLocaleString(e=O,t={}){return this.isValid?Xt.create(this.loc.clone(t),e).formatDateTime(this):Us}toLocaleParts(e={}){return this.isValid?Xt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:s=!0,extendedZone:r=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=er(this,a,i=ur(i));return ir.indexOf(i)>=3&&(o+="T"),o+=tr(this,a,t,n,s,r,i),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?er(this,"extended"===e,ur(t)):null}toISOWeekDate(){return Xs(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:s=!1,extendedZone:r=!1,format:i="extended",precision:a="milliseconds"}={}){if(!this.isValid)return null;return a=ur(a),(s&&ir.indexOf(a)>=3?"T":"")+tr(this,"extended"===i,t,e,n,r,a)}toRFC2822(){return Xs(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Xs(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?er(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(n&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Xs(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Us}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t=Object.assign({},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 ms.invalid("created by diffing an invalid DateTime");const s=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),r=(o=t,Array.isArray(o)?o:[o]).map(ms.normalizeUnit),i=e.valueOf()>this.valueOf(),a=bs(i?this:e,i?e:this,r,s);var o;return i?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(gr.now(),e,t)}until(e){return this.isValid?gs.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const s=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,n)<=s&&s<=r.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||gr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(s=e.unit,r=void 0),dr(t,this.plus(n),Object.assign(Object.assign({},e),{},{numeric:"always",units:s,unit:r}))}toRelativeCalendar(e={}){return this.isValid?dr(e.base||gr.fromObject({},{zone:this.zone}),this,Object.assign(Object.assign({},e),{},{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(...e){if(!e.every(gr.isDateTime))throw new g("min requires all arguments be DateTimes");return lt(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(gr.isDateTime))throw new g("max requires all arguments be DateTimes");return lt(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:s=null,numberingSystem:r=null}=n;return zs(Oe.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return gr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:s=null}=t,r=Oe.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0});return new Ls(r,e)}static fromFormatParser(e,t,n={}){if(rt(e)||rt(t))throw new g("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:r=null}=n,i=Oe.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});if(!i.equals(t.locale))throw new g(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:u,invalidReason:l}=t.explainFromTokens(e);return l?gr.invalid(l):Ks(a,o,n,`format ${t.format}`,e,u)}static get DATE_SHORT(){return O}static get DATE_MED(){return v}static get DATE_MED_WITH_WEEKDAY(){return S}static get DATE_FULL(){return T}static get DATE_HUGE(){return N}static get TIME_SIMPLE(){return M}static get TIME_WITH_SECONDS(){return D}static get TIME_WITH_SHORT_OFFSET(){return I}static get TIME_WITH_LONG_OFFSET(){return V}static get TIME_24_SIMPLE(){return x}static get TIME_24_WITH_SECONDS(){return E}static get TIME_24_WITH_SHORT_OFFSET(){return j}static get TIME_24_WITH_LONG_OFFSET(){return C}static get DATETIME_SHORT(){return F}static get DATETIME_SHORT_WITH_SECONDS(){return $}static get DATETIME_MED(){return Z}static get DATETIME_MED_WITH_SECONDS(){return W}static get DATETIME_MED_WITH_WEEKDAY(){return L}static get DATETIME_FULL(){return z}static get DATETIME_FULL_WITH_SECONDS(){return q}static get DATETIME_HUGE(){return A}static get DATETIME_HUGE_WITH_SECONDS(){return U}constructor(e){const t=e.zone||qe.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Ae("invalid input"):null)||(t.isValid?null:Ys(t));this.ts=rt(e.ts)?qe.now():e.ts;let s=null,r=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,r]=[e.old.c,e.old.o];else{const i=it(e.o)&&!e.old?e.o:t.offset(this.ts);s=Gs(this.ts,i),n=Number.isNaN(s.year)?new Ae("invalid input"):null,s=n?null:s,r=n?null:i}}this._zone=t,this.loc=e.loc||Oe.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=s,this.o=r,this.isLuxonDateTime=!0}}function wr(e){if(gr.isDateTime(e))return e;if(e&&e.valueOf&&it(e.valueOf()))return gr.fromJSDate(e);if(e&&"object"==typeof e)return gr.fromObject(e);throw new g(`Unknown datetime argument: ${e}, of type ${typeof e}`)}s()}catch(o){s(o)}})}}]);