@stacksjs/scheduler 0.66.0 → 0.68.0
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.
- package/dist/cron.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -5
- package/dist/schedule.d.ts +126 -27
- package/dist/types.d.ts +3 -4
- package/package.json +3 -5
- package/dist/index.js.map +0 -18
- package/src/cron.ts +0 -11
- package/src/index.ts +0 -7
- package/src/schedule.ts +0 -151
- package/src/types.ts +0 -3
package/dist/cron.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export { CronJob, CronTime } from
|
|
1
|
+
export type {;
|
|
2
|
+
export { CronJob, CronTime } from 'cron'
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './cron'
|
|
2
|
+
export * from './schedule'
|
|
3
|
+
export * from './types'
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var DX=Object.create;var{getPrototypeOf:xX,defineProperty:E1,getOwnPropertyNames:TX}=Object;var vX=Object.prototype.hasOwnProperty;var yX=(X,Q,K)=>{K=X!=null?DX(xX(X)):{};const $=Q||!X||!X.__esModule?E1(K,"default",{value:X,enumerable:!0}):K;for(let q of TX(X))if(!vX.call($,q))E1($,q,{get:()=>X[q],enumerable:!0});return $};var s=(X,Q)=>()=>(Q||X((Q={exports:{}}).exports,Q),Q.exports);var QX=s((XX)=>{function bX(X){if(!D0[X])D0[X]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:X,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"});return D0[X]}function gX(X,Q){const K=X.format(Q).replace(/\u200E/g,""),$=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(K),[,q,G,B,V,J,C,U]=$;return[B,q,G,V,J,C,U]}function fX(X,Q){const K=X.formatToParts(Q),$=[];for(let q=0;q<K.length;q++){const{type:G,value:B}=K[q],V=hX[G];if(G==="era")$[V]=B;else if(!R(V))$[V]=parseInt(B,10)}return $}function pX(X,Q={}){const K=JSON.stringify([X,Q]);let $=M1[K];if(!$)$=new Intl.ListFormat(X,Q),M1[K]=$;return $}function t0(X,Q={}){const K=JSON.stringify([X,Q]);let $=e0[K];if(!$)$=new Intl.DateTimeFormat(X,Q),e0[K]=$;return $}function cX(X,Q={}){const K=JSON.stringify([X,Q]);let $=X1[K];if(!$)$=new Intl.NumberFormat(X,Q),X1[K]=$;return $}function mX(X,Q={}){const{base:K,...$}=Q,q=JSON.stringify([X,$]);let G=Q1[q];if(!G)G=new Intl.RelativeTimeFormat(X,Q),Q1[q]=G;return G}function uX(){if(A0)return A0;else return A0=new Intl.DateTimeFormat().resolvedOptions().locale,A0}function lX(X){let Q=L1[X];if(!Q){const K=new Intl.Locale(X);Q="getWeekInfo"in K?K.getWeekInfo():K.weekInfo,L1[X]=Q}return Q}function dX(X){const Q=X.indexOf("-x-");if(Q!==-1)X=X.substring(0,Q);const K=X.indexOf("-u-");if(K===-1)return[X];else{let $,q;try{$=t0(X).resolvedOptions(),q=X}catch(V){const J=X.substring(0,K);$=t0(J).resolvedOptions(),q=J}const{numberingSystem:G,calendar:B}=$;return[q,G,B]}}function iX(X,Q,K){if(K||Q){if(!X.includes("-u-"))X+="-u";if(K)X+=`-ca-${K}`;if(Q)X+=`-nu-${Q}`;return X}else return X}function sX(X){const Q=[];for(let K=1;K<=12;K++){const $=N.utc(2009,K,1);Q.push(X($))}return Q}function rX(X){const Q=[];for(let K=1;K<=7;K++){const $=N.utc(2016,11,13+K);Q.push(X($))}return Q}function z0(X,Q,K,$){const q=X.listingMode();if(q==="error")return null;else if(q==="en")return K(Q);else return $(Q)}function nX(X){if(X.numberingSystem&&X.numberingSystem!=="latn")return!1;else return X.numberingSystem==="latn"||!X.locale||X.locale.startsWith("en")||new Intl.DateTimeFormat(X.intl).resolvedOptions().numberingSystem==="latn"}function d(X,Q){if(R(X)||X===null)return Q;else if(X instanceof t)return X;else if(tX(X)){const K=X.toLowerCase();if(K==="default")return Q;else if(K==="local"||K==="system")return W0.instance;else if(K==="utc"||K==="gmt")return j.utcInstance;else return j.parseSpecifier(K)||p.create(X)}else if(e(X))return j.instance(X);else if(typeof X==="object"&&"offset"in X&&typeof X.offset==="function")return X;else return new G1(X)}function k(X,Q){return new y("unit out of range",`you specified ${Q} (of type ${typeof Q}) as a ${X}, which is invalid`)}function B1(X,Q,K){const $=new Date(Date.UTC(X,Q-1,K));if(X<100&&X>=0)$.setUTCFullYear($.getUTCFullYear()-1900);const q=$.getUTCDay();return q===0?7:q}function F7(X,Q,K){return K+(E0(X)?Z7:L7)[Q-1]}function z7(X,Q){const K=E0(X)?Z7:L7,$=K.findIndex((G)=>G<Q),q=Q-K[$];return{month:$+1,day:q}}function V1(X,Q){return(X-Q+7)%7+1}function v0(X,Q=4,K=1){const{year:$,month:q,day:G}=X,B=F7($,q,G),V=V1(B1($,q,G),K);let J=Math.floor((B-V+14-Q)/7),C;if(J<1)C=$-1,J=_0(C,Q,K);else if(J>_0($,Q,K))C=$+1,J=1;else C=$;return{weekYear:C,weekNumber:J,weekday:V,...g0(X)}}function x1(X,Q=4,K=1){const{weekYear:$,weekNumber:q,weekday:G}=X,B=V1(B1($,1,Q),K),V=G0($);let J=q*7+G-B-7+Q,C;if(J<1)C=$-1,J+=G0(C);else if(J>V)C=$+1,J-=G0($);else C=$;const{month:U,day:_}=z7(C,J);return{year:C,month:U,day:_,...g0(X)}}function i0(X){const{year:Q,month:K,day:$}=X,q=F7(Q,K,$);return{year:Q,ordinal:q,...g0(X)}}function T1(X){const{year:Q,ordinal:K}=X,{month:$,day:q}=z7(Q,K);return{year:Q,month:$,day:q,...g0(X)}}function v1(X,Q){if(!R(X.localWeekday)||!R(X.localWeekNumber)||!R(X.localWeekYear)){if(!R(X.weekday)||!R(X.weekNumber)||!R(X.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");if(!R(X.localWeekday))X.weekday=X.localWeekday;if(!R(X.localWeekNumber))X.weekNumber=X.localWeekNumber;if(!R(X.localWeekYear))X.weekYear=X.localWeekYear;return delete X.localWeekday,delete X.localWeekNumber,delete X.localWeekYear,{minDaysInFirstWeek:Q.getMinDaysInFirstWeek(),startOfWeek:Q.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function oX(X,Q=4,K=1){const $=S0(X.weekYear),q=S(X.weekNumber,1,_0(X.weekYear,Q,K)),G=S(X.weekday,1,7);if(!$)return k("weekYear",X.weekYear);else if(!q)return k("week",X.weekNumber);else if(!G)return k("weekday",X.weekday);else return!1}function eX(X){const Q=S0(X.year),K=S(X.ordinal,1,G0(X.year));if(!Q)return k("year",X.year);else if(!K)return k("ordinal",X.ordinal);else return!1}function w7(X){const Q=S0(X.year),K=S(X.month,1,12),$=S(X.day,1,y0(X.year,X.month));if(!Q)return k("year",X.year);else if(!K)return k("month",X.month);else if(!$)return k("day",X.day);else return!1}function j7(X){const{hour:Q,minute:K,second:$,millisecond:q}=X,G=S(Q,0,23)||Q===24&&K===0&&$===0&&q===0,B=S(K,0,59),V=S($,0,59),J=S(q,0,999);if(!G)return k("hour",Q);else if(!B)return k("minute",K);else if(!V)return k("second",$);else if(!J)return k("millisecond",q);else return!1}function R(X){return typeof X==="undefined"}function e(X){return typeof X==="number"}function S0(X){return typeof X==="number"&&X%1===0}function tX(X){return typeof X==="string"}function X6(X){return Object.prototype.toString.call(X)==="[object Date]"}function I7(){try{return typeof Intl!=="undefined"&&!!Intl.RelativeTimeFormat}catch(X){return!1}}function O7(){try{return typeof Intl!=="undefined"&&!!Intl.Locale&&(("weekInfo"in Intl.Locale.prototype)||("getWeekInfo"in Intl.Locale.prototype))}catch(X){return!1}}function Q6(X){return Array.isArray(X)?X:[X]}function y1(X,Q,K){if(X.length===0)return;return X.reduce(($,q)=>{const G=[Q(q),q];if(!$)return G;else if(K($[0],G[0])===$[0])return $;else return G},null)[1]}function K6(X,Q){return Q.reduce((K,$)=>{return K[$]=X[$],K},{})}function V0(X,Q){return Object.prototype.hasOwnProperty.call(X,Q)}function K1(X){if(X==null)return null;else if(typeof X!=="object")throw new O("Week settings must be an object");else{if(!S(X.firstDay,1,7)||!S(X.minimalDays,1,7)||!Array.isArray(X.weekend)||X.weekend.some((Q)=>!S(Q,1,7)))throw new O("Invalid week settings");return{firstDay:X.firstDay,minimalDays:X.minimalDays,weekend:Array.from(X.weekend)}}}function S(X,Q,K){return S0(X)&&X>=Q&&X<=K}function $6(X,Q){return X-Q*Math.floor(X/Q)}function Z(X,Q=2){const K=X<0;let $;if(K)$="-"+(""+-X).padStart(Q,"0");else $=(""+X).padStart(Q,"0");return $}function l(X){if(R(X)||X===null||X==="")return;else return parseInt(X,10)}function r(X){if(R(X)||X===null||X==="")return;else return parseFloat(X)}function J1(X){if(R(X)||X===null||X==="")return;else{const Q=parseFloat("0."+X)*1000;return Math.floor(Q)}}function C1(X,Q,K=!1){const $=10**Q;return(K?Math.trunc:Math.round)(X*$)/$}function E0(X){return X%4===0&&(X%100!==0||X%400===0)}function G0(X){return E0(X)?366:365}function y0(X,Q){const K=$6(Q-1,12)+1,$=X+(Q-K)/12;if(K===2)return E0($)?29:28;else return[31,null,31,30,31,30,31,31,30,31,30,31][K-1]}function b0(X){let Q=Date.UTC(X.year,X.month-1,X.day,X.hour,X.minute,X.second,X.millisecond);if(X.year<100&&X.year>=0)Q=new Date(Q),Q.setUTCFullYear(X.year,X.month-1,X.day);return+Q}function k1(X,Q,K){return-V1(B1(X,1,Q),K)+Q-1}function _0(X,Q=4,K=1){const $=k1(X,Q,K),q=k1(X+1,Q,K);return(G0(X)-$+q)/7}function $1(X){if(X>99)return X;else return X>L.twoDigitCutoffYear?1900+X:2000+X}function D7(X,Q,K,$=null){const q=new Date(X),G={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};if($)G.timeZone=$;const B={timeZoneName:Q,...G},V=new Intl.DateTimeFormat(K,B).formatToParts(q).find((J)=>J.type.toLowerCase()==="timezonename");return V?V.value:null}function h0(X,Q){let K=parseInt(X,10);if(Number.isNaN(K))K=0;const $=parseInt(Q,10)||0,q=K<0||Object.is(K,-0)?-$:$;return K*60+q}function x7(X){const Q=Number(X);if(typeof X==="boolean"||X===""||Number.isNaN(Q))throw new O(`Invalid unit value ${X}`);return Q}function k0(X,Q){const K={};for(let $ in X)if(V0(X,$)){const q=X[$];if(q===void 0||q===null)continue;K[Q($)]=x7(q)}return K}function H0(X,Q){const K=Math.trunc(Math.abs(X/60)),$=Math.trunc(Math.abs(X%60)),q=X>=0?"+":"-";switch(Q){case"short":return`${q}${Z(K,2)}:${Z($,2)}`;case"narrow":return`${q}${K}${$>0?`:${$}`:""}`;case"techie":return`${q}${Z(K,2)}${Z($,2)}`;default:throw new RangeError(`Value format ${Q} is out of range for property format`)}}function g0(X){return K6(X,["hour","minute","second","millisecond"])}function v7(X){switch(X){case"narrow":return[...G6];case"short":return[...T7];case"long":return[...q6];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}}function S7(X){switch(X){case"narrow":return[...B6];case"short":return[...k7];case"long":return[...y7];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}function h7(X){switch(X){case"narrow":return[...C6];case"short":return[...J6];case"long":return[...V6];default:return null}}function Y6(X){return b7[X.hour<12?0:1]}function U6(X,Q){return S7(Q)[X.weekday-1]}function P6(X,Q){return v7(Q)[X.month-1]}function R6(X,Q){return h7(Q)[X.year<0?0:1]}function N6(X,Q,K="always",$=!1){const q={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."]},G=["hours","minutes","seconds"].indexOf(X)===-1;if(K==="auto"&&G){const _=X==="days";switch(Q){case 1:return _?"tomorrow":`next ${q[X][0]}`;case-1:return _?"yesterday":`last ${q[X][0]}`;case 0:return _?"today":`this ${q[X][0]}`}}const B=Object.is(Q,-0)||Q<0,V=Math.abs(Q),J=V===1,C=q[X],U=$?J?C[1]:C[2]||C[1]:J?q[X][0]:X;return B?`${V} ${U} ago`:`in ${V} ${U}`}function S1(X,Q){let K="";for(let $ of X)if($.literal)K+=$.val;else K+=Q($.val);return K}function J0(...X){const Q=X.reduce((K,$)=>K+$.source,"");return RegExp(`^${Q}\$`)}function C0(...X){return(Q)=>X.reduce(([K,$,q],G)=>{const[B,V,J]=G(Q,q);return[{...K,...B},V||$,J]},[{},null,1]).slice(0,2)}function Y0(X,...Q){if(X==null)return[null,null];for(let[K,$]of Q){const q=K.exec(X);if(q)return $(q)}return[null,null]}function f7(...X){return(Q,K)=>{const $={};let q;for(q=0;q<X.length;q++)$[X[q]]=l(Q[K+q]);return[$,null,K+q]}}function B0(X,Q,K){const $=X[Q];return R($)?K:l($)}function z6(X,Q){return[{year:B0(X,Q),month:B0(X,Q+1,1),day:B0(X,Q+2,1)},null,Q+3]}function U0(X,Q){return[{hours:B0(X,Q,0),minutes:B0(X,Q+1,0),seconds:B0(X,Q+2,0),milliseconds:J1(X[Q+3])},null,Q+4]}function M0(X,Q){const K=!X[Q]&&!X[Q+1],$=h0(X[Q+1],X[Q+2]),q=K?null:j.instance($);return[{},q,Q+3]}function L0(X,Q){const K=X[Q]?p.create(X[Q]):null;return[{},K,Q+1]}function I6(X){const[Q,K,$,q,G,B,V,J,C]=X,U=Q[0]==="-",_=J&&J[0]==="-",P=(A,D=!1)=>A!==void 0&&(D||A&&U)?-A:A;return[{years:P(r(K)),months:P(r($)),weeks:P(r(q)),days:P(r(G)),hours:P(r(B)),minutes:P(r(V)),seconds:P(r(J),J==="-0"),milliseconds:P(J1(C),_)}]}function P1(X,Q,K,$,q,G,B){const V={year:Q.length===2?$1(l(Q)):l(Q),month:T7.indexOf(K)+1,day:l($),hour:l(q),minute:l(G)};if(B)V.second=l(B);if(X)V.weekday=X.length>3?y7.indexOf(X)+1:k7.indexOf(X)+1;return V}function x6(X){const[,Q,K,$,q,G,B,V,J,C,U,_]=X,P=P1(Q,q,$,K,G,B,V);let A;if(J)A=O6[J];else if(C)A=0;else A=h0(U,_);return[P,new j(A)]}function T6(X){return X.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function b1(X){const[,Q,K,$,q,G,B,V]=X;return[P1(Q,q,$,K,G,B,V),j.utcInstance]}function S6(X){const[,Q,K,$,q,G,B,V]=X;return[P1(Q,V,K,$,q,G,B),j.utcInstance]}function u6(X){return Y0(X,[b6,u7],[h6,p6],[g6,c6],[f6,m6])}function l6(X){return Y0(T6(X),[D6,x6])}function d6(X){return Y0(X,[v6,b1],[y6,b1],[k6,S6])}function i6(X){return Y0(X,[j6,I6])}function r6(X){return Y0(X,[w6,s6])}function e6(X){return Y0(X,[n6,u7],[a6,o6])}function u(X,Q,K=!1){const $={values:K?Q.values:{...X.values,...Q.values||{}},loc:X.loc.clone(Q.loc),conversionAccuracy:Q.conversionAccuracy||X.conversionAccuracy,matrix:Q.matrix||X.matrix};return new H($)}function d7(X,Q){var K;let $=(K=Q.milliseconds)!=null?K:0;for(let q of Q8.slice(1))if(Q[q])$+=Q[q]*X[q].milliseconds;return $}function g1(X,Q){const K=d7(X,Q)<0?-1:1;o.reduceRight(($,q)=>{if(!R(Q[q])){if($){const G=Q[$]*K,B=X[q][$],V=Math.floor(G/B);Q[q]+=V*K,Q[$]-=V*B*K}return q}else return $},null),o.reduce(($,q)=>{if(!R(Q[q])){if($){const G=Q[$]%1;Q[$]-=G,Q[q]+=G*X[$][q]}return q}else return $},null)}function K8(X){const Q={};for(let[K,$]of Object.entries(X))if($!==0)Q[K]=$;return Q}function $8(X,Q){if(!X||!X.isValid)return M.invalid("missing or invalid start");else if(!Q||!Q.isValid)return M.invalid("missing or invalid end");else if(Q<X)return M.invalid("end before start",`The end of an interval must be after its start, but you had start=${X.toISO()} and end=${Q.toISO()}`);else return null}function f1(X,Q){const K=(q)=>q.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),$=K(Q)-K(X);return Math.floor(H.fromMillis($).as("days"))}function q8(X,Q,K){const $=[["years",(J,C)=>C.year-J.year],["quarters",(J,C)=>C.quarter-J.quarter+(C.year-J.year)*4],["months",(J,C)=>C.month-J.month+(C.year-J.year)*12],["weeks",(J,C)=>{const U=f1(J,C);return(U-U%7)/7}],["days",f1]],q={},G=X;let B,V;for(let[J,C]of $)if(K.indexOf(J)>=0)if(B=J,q[J]=C(X,Q),V=G.plus(q),V>Q){if(q[J]--,X=G.plus(q),X>Q)V=X,q[J]--,X=G.plus(q)}else X=V;return[X,q,V,B]}function G8(X,Q,K,$){let[q,G,B,V]=q8(X,Q,K);const J=Q-q,C=K.filter((_)=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);if(C.length===0){if(B<Q)B=q.plus({[V]:1});if(B!==q)G[V]=(G[V]||0)+J/(B-q)}const U=H.fromObject(G,$);if(C.length>0)return H.fromMillis(J,$).shiftTo(...C).plus(U);else return U}function V8(X){let Q=parseInt(X,10);if(isNaN(Q)){Q="";for(let K=0;K<X.length;K++){const $=X.charCodeAt(K);if(X[K].search(R1.hanidec)!==-1)Q+=B8.indexOf(X[K]);else for(let q in p1){const[G,B]=p1[q];if($>=G&&$<=B)Q+=$-G}}return parseInt(Q,10)}else return Q}function b({numberingSystem:X},Q=""){return new RegExp(`${R1[X||"latn"]}${Q}`)}function W(X,Q=(K)=>K){return{regex:X,deser:([K])=>Q(V8(K))}}function Y8(X){return X.replace(/\./g,"\\.?").replace(s7,i7)}function c1(X){return X.replace(/\./g,"").replace(s7," ").toLowerCase()}function h(X,Q){if(X===null)return null;else return{regex:RegExp(X.map(Y8).join("|")),deser:([K])=>X.findIndex(($)=>c1(K)===c1($))+Q}}function m1(X,Q){return{regex:X,deser:([,K,$])=>h0(K,$),groups:Q}}function w0(X){return{regex:X,deser:([Q])=>Q}}function U8(X){return X.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function P8(X,Q){const K=b(Q),$=b(Q,"{2}"),q=b(Q,"{3}"),G=b(Q,"{4}"),B=b(Q,"{6}"),V=b(Q,"{1,2}"),J=b(Q,"{1,3}"),C=b(Q,"{1,6}"),U=b(Q,"{1,9}"),_=b(Q,"{2,4}"),P=b(Q,"{4,6}"),A=(T)=>({regex:RegExp(U8(T.val)),deser:([f])=>f,literal:!0}),F=((T)=>{if(X.literal)return A(T);switch(T.val){case"G":return h(Q.eras("short"),0);case"GG":return h(Q.eras("long"),0);case"y":return W(C);case"yy":return W(_,$1);case"yyyy":return W(G);case"yyyyy":return W(P);case"yyyyyy":return W(B);case"M":return W(V);case"MM":return W($);case"MMM":return h(Q.months("short",!0),1);case"MMMM":return h(Q.months("long",!0),1);case"L":return W(V);case"LL":return W($);case"LLL":return h(Q.months("short",!1),1);case"LLLL":return h(Q.months("long",!1),1);case"d":return W(V);case"dd":return W($);case"o":return W(J);case"ooo":return W(q);case"HH":return W($);case"H":return W(V);case"hh":return W($);case"h":return W(V);case"mm":return W($);case"m":return W(V);case"q":return W(V);case"qq":return W($);case"s":return W(V);case"ss":return W($);case"S":return W(J);case"SSS":return W(q);case"u":return w0(U);case"uu":return w0(V);case"uuu":return W(K);case"a":return h(Q.meridiems(),0);case"kkkk":return W(G);case"kk":return W(_,$1);case"W":return W(V);case"WW":return W($);case"E":case"c":return W(K);case"EEE":return h(Q.weekdays("short",!1),1);case"EEEE":return h(Q.weekdays("long",!1),1);case"ccc":return h(Q.weekdays("short",!0),1);case"cccc":return h(Q.weekdays("long",!0),1);case"Z":case"ZZ":return m1(new RegExp(`([+-]${V.source})(?::(${$.source}))?`),2);case"ZZZ":return m1(new RegExp(`([+-]${V.source})(${$.source})?`),2);case"z":return w0(/[a-z_+-/]{1,256}?/i);case" ":return w0(/[^\S\n\r]/);default:return A(T)}})(X)||{invalidReason:J8};return F.token=X,F}function N8(X,Q,K){const{type:$,value:q}=X;if($==="literal"){const J=/^\s+$/.test(q);return{literal:!J,val:J?" ":q}}const G=Q[$];let B=$;if($==="hour")if(Q.hour12!=null)B=Q.hour12?"hour12":"hour24";else if(Q.hourCycle!=null)if(Q.hourCycle==="h11"||Q.hourCycle==="h12")B="hour12";else B="hour24";else B=K.hour12?"hour12":"hour24";let V=R8[B];if(typeof V==="object")V=V[G];if(V)return{literal:!1,val:V};return}function A8(X){return[`^${X.map((K)=>K.regex).reduce((K,$)=>`${K}(${$.source})`,"")}\$`,X]}function H8(X,Q,K){const $=X.match(Q);if($){const q={};let G=1;for(let B in K)if(V0(K,B)){const V=K[B],J=V.groups?V.groups+1:1;if(!V.literal&&V.token)q[V.token.val[0]]=V.deser($.slice(G,G+J));G+=J}return[$,q]}else return[$,{}]}function _8(X){const Q=(G)=>{switch(G){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}};let K=null,$;if(!R(X.z))K=p.create(X.z);if(!R(X.Z)){if(!K)K=new j(X.Z);$=X.Z}if(!R(X.q))X.M=(X.q-1)*3+1;if(!R(X.h)){if(X.h<12&&X.a===1)X.h+=12;else if(X.h===12&&X.a===0)X.h=0}if(X.G===0&&X.y)X.y=-X.y;if(!R(X.u))X.S=J1(X.u);return[Object.keys(X).reduce((G,B)=>{const V=Q(B);if(V)G[V]=X[B];return G},{}),K,$]}function W8(){if(!s0)s0=N.fromMillis(1555555555555);return s0}function E8(X,Q){if(X.literal)return X;const K=w.macroTokenToFormatOpts(X.val),$=a7(K,Q);if($==null||$.includes(void 0))return X;return $}function r7(X,Q){return Array.prototype.concat(...X.map((K)=>E8(K,Q)))}function n7(X,Q,K){const $=r7(w.parseFormat(K),X),q=$.map((B)=>P8(B,X)),G=q.find((B)=>B.invalidReason);if(G)return{input:Q,tokens:$,invalidReason:G.invalidReason};else{const[B,V]=A8(q),J=RegExp(B,"i"),[C,U]=H8(Q,J,V),[_,P,A]=U?_8(U):[null,null,void 0];if(V0(U,"a")&&V0(U,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:Q,tokens:$,regex:J,rawMatches:C,matches:U,result:_,zone:P,specificOffset:A}}}function M8(X,Q,K){const{result:$,zone:q,specificOffset:G,invalidReason:B}=n7(X,Q,K);return[$,q,G,B]}function a7(X,Q){if(!X)return null;const $=w.create(Q,X).dtFormatter(W8()),q=$.formatToParts(),G=$.resolvedOptions();return q.map((B)=>N8(B,X,G))}function j0(X){return new y("unsupported zone",`the zone "${X.name}" is not supported`)}function n0(X){if(X.weekData===null)X.weekData=v0(X.c);return X.weekData}function a0(X){if(X.localWeekData===null)X.localWeekData=v0(X.c,X.loc.getMinDaysInFirstWeek(),X.loc.getStartOfWeek());return X.localWeekData}function n(X,Q){const K={ts:X.ts,zone:X.zone,c:X.c,o:X.o,loc:X.loc,invalid:X.invalid};return new N({...K,...Q,old:K})}function o7(X,Q,K){let $=X-Q*60*1000;const q=K.offset($);if(Q===q)return[$,Q];$-=(q-Q)*60*1000;const G=K.offset($);if(q===G)return[$,q];return[X-Math.min(q,G)*60*1000,Math.max(q,G)]}function I0(X,Q){X+=Q*60*1000;const K=new Date(X);return{year:K.getUTCFullYear(),month:K.getUTCMonth()+1,day:K.getUTCDate(),hour:K.getUTCHours(),minute:K.getUTCMinutes(),second:K.getUTCSeconds(),millisecond:K.getUTCMilliseconds()}}function x0(X,Q,K){return o7(b0(X),Q,K)}function l1(X,Q){const K=X.o,$=X.c.year+Math.trunc(Q.years),q=X.c.month+Math.trunc(Q.months)+Math.trunc(Q.quarters)*3,G={...X.c,year:$,month:q,day:Math.min(X.c.day,y0($,q))+Math.trunc(Q.days)+Math.trunc(Q.weeks)*7},B=H.fromObject({years:Q.years-Math.trunc(Q.years),quarters:Q.quarters-Math.trunc(Q.quarters),months:Q.months-Math.trunc(Q.months),weeks:Q.weeks-Math.trunc(Q.weeks),days:Q.days-Math.trunc(Q.days),hours:Q.hours,minutes:Q.minutes,seconds:Q.seconds,milliseconds:Q.milliseconds}).as("milliseconds"),V=b0(G);let[J,C]=o7(V,K,X.zone);if(B!==0)J+=B,C=X.zone.offset(J);return{ts:J,o:C}}function R0(X,Q,K,$,q,G){const{setZone:B,zone:V}=K;if(X&&Object.keys(X).length!==0||Q){const J=Q||V,C=N.fromObject(X,{...K,zone:J,specificOffset:G});return B?C:C.setZone(V)}else return N.invalid(new y("unparsable",`the input "${q}" can't be parsed as ${$}`))}function O0(X,Q,K=!0){return X.isValid?w.create(E.create("en-US"),{allowZ:K,forceSimple:!0}).formatDateTimeFromString(X,Q):null}function o0(X,Q){const K=X.c.year>9999||X.c.year<0;let $="";if(K&&X.c.year>=0)$+="+";if($+=Z(X.c.year,K?6:4),Q)$+="-",$+=Z(X.c.month),$+="-",$+=Z(X.c.day);else $+=Z(X.c.month),$+=Z(X.c.day);return $}function d1(X,Q,K,$,q,G){let B=Z(X.c.hour);if(Q){if(B+=":",B+=Z(X.c.minute),X.c.millisecond!==0||X.c.second!==0||!K)B+=":"}else B+=Z(X.c.minute);if(X.c.millisecond!==0||X.c.second!==0||!K){if(B+=Z(X.c.second),X.c.millisecond!==0||!$)B+=".",B+=Z(X.c.millisecond,3)}if(q)if(X.isOffsetFixed&&X.offset===0&&!G)B+="Z";else if(X.o<0)B+="-",B+=Z(Math.trunc(-X.o/60)),B+=":",B+=Z(Math.trunc(-X.o%60));else B+="+",B+=Z(Math.trunc(X.o/60)),B+=":",B+=Z(Math.trunc(X.o%60));if(G)B+="["+X.zone.ianaName+"]";return B}function w8(X){const Q={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"}[X.toLowerCase()];if(!Q)throw new q1(X);return Q}function i1(X){switch(X.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return w8(X)}}function s1(X,Q){const K=d(Q.zone,L.defaultZone),$=E.fromObject(Q),q=L.now();let G,B;if(!R(X.year)){for(let C of t7)if(R(X[C]))X[C]=e7[C];const V=w7(X)||j7(X);if(V)return N.invalid(V);const J=K.offset(q);[G,B]=x0(X,J,K)}else G=q;return new N({ts:G,zone:K,loc:$,o:B})}function r1(X,Q,K){const $=R(K.round)?!0:K.round,q=(B,V)=>{return B=C1(B,$||K.calendary?0:2,!0),Q.loc.clone(K).relFormatter(K).format(B,V)},G=(B)=>{if(K.calendary)if(!Q.hasSame(X,B))return Q.startOf(B).diff(X.startOf(B),B).get(B);else return 0;else return Q.diff(X,B).get(B)};if(K.unit)return q(G(K.unit),K.unit);for(let B of K.units){const V=G(B);if(Math.abs(V)>=1)return q(V,B)}return q(X>Q?-0:0,K.units[K.units.length-1])}function n1(X){let Q={},K;if(X.length>0&&typeof X[X.length-1]==="object")Q=X[X.length-1],K=Array.from(X).slice(0,X.length-1);else K=Array.from(X);return[Q,K]}function N0(X){if(N.isDateTime(X))return X;else if(X&&X.valueOf&&e(X.valueOf()))return N.fromJSDate(X);else if(X&&typeof X==="object")return N.fromObject(X);else throw new O(`Unknown datetime argument: ${X}, of type ${typeof X}`)}Object.defineProperty(XX,"__esModule",{value:!0});class i extends Error{}class a1 extends i{constructor(X){super(`Invalid DateTime: ${X.toMessage()}`)}}class o1 extends i{constructor(X){super(`Invalid Interval: ${X.toMessage()}`)}}class e1 extends i{constructor(X){super(`Invalid Duration: ${X.toMessage()}`)}}class a extends i{}class q1 extends i{constructor(X){super(`Invalid unit ${X}`)}}class O extends i{}class m extends i{constructor(){super("Zone is an abstract class")}}var Y="numeric",g="short",x="long",T0={year:Y,month:Y,day:Y},t1={year:Y,month:g,day:Y},kX={year:Y,month:g,day:Y,weekday:g},X7={year:Y,month:x,day:Y},Q7={year:Y,month:x,day:Y,weekday:x},K7={hour:Y,minute:Y},$7={hour:Y,minute:Y,second:Y},q7={hour:Y,minute:Y,second:Y,timeZoneName:g},G7={hour:Y,minute:Y,second:Y,timeZoneName:x},B7={hour:Y,minute:Y,hourCycle:"h23"},V7={hour:Y,minute:Y,second:Y,hourCycle:"h23"},J7={hour:Y,minute:Y,second:Y,hourCycle:"h23",timeZoneName:g},C7={hour:Y,minute:Y,second:Y,hourCycle:"h23",timeZoneName:x},Y7={year:Y,month:Y,day:Y,hour:Y,minute:Y},U7={year:Y,month:Y,day:Y,hour:Y,minute:Y,second:Y},P7={year:Y,month:g,day:Y,hour:Y,minute:Y},R7={year:Y,month:g,day:Y,hour:Y,minute:Y,second:Y},SX={year:Y,month:g,day:Y,weekday:g,hour:Y,minute:Y},N7={year:Y,month:x,day:Y,hour:Y,minute:Y,timeZoneName:g},A7={year:Y,month:x,day:Y,hour:Y,minute:Y,second:Y,timeZoneName:g},H7={year:Y,month:x,day:Y,weekday:x,hour:Y,minute:Y,timeZoneName:x},_7={year:Y,month:x,day:Y,weekday:x,hour:Y,minute:Y,second:Y,timeZoneName:x};class t{get type(){throw new m}get name(){throw new m}get ianaName(){return this.name}get isUniversal(){throw new m}offsetName(X,Q){throw new m}formatOffset(X,Q){throw new m}offset(X){throw new m}equals(X){throw new m}get isValid(){throw new m}}var l0=null;class W0 extends t{static get instance(){if(l0===null)l0=new W0;return l0}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(X,{format:Q,locale:K}){return D7(X,Q,K)}formatOffset(X,Q){return H0(this.offset(X),Q)}offset(X){return-new Date(X).getTimezoneOffset()}equals(X){return X.type==="system"}get isValid(){return!0}}var D0={},hX={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},F0={};class p extends t{static create(X){if(!F0[X])F0[X]=new p(X);return F0[X]}static resetCache(){F0={},D0={}}static isValidSpecifier(X){return this.isValidZone(X)}static isValidZone(X){if(!X)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:X}).format(),!0}catch(Q){return!1}}constructor(X){super();this.zoneName=X,this.valid=p.isValidZone(X)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(X,{format:Q,locale:K}){return D7(X,Q,K,this.name)}formatOffset(X,Q){return H0(this.offset(X),Q)}offset(X){const Q=new Date(X);if(isNaN(Q))return NaN;const K=bX(this.name);let[$,q,G,B,V,J,C]=K.formatToParts?fX(K,Q):gX(K,Q);if(B==="BC")$=-Math.abs($)+1;const _=b0({year:$,month:q,day:G,hour:V===24?0:V,minute:J,second:C,millisecond:0});let P=+Q;const A=P%1000;return P-=A>=0?A:1000+A,(_-P)/60000}equals(X){return X.type==="iana"&&X.name===this.name}get isValid(){return this.valid}}var M1={},e0={},X1={},Q1={},A0=null,L1={};class W7{constructor(X,Q,K){this.padTo=K.padTo||0,this.floor=K.floor||!1;const{padTo:$,floor:q,...G}=K;if(!Q||Object.keys(G).length>0){const B={useGrouping:!1,...K};if(K.padTo>0)B.minimumIntegerDigits=K.padTo;this.inf=cX(X,B)}}format(X){if(this.inf){const Q=this.floor?Math.floor(X):X;return this.inf.format(Q)}else{const Q=this.floor?Math.floor(X):C1(X,3);return Z(Q,this.padTo)}}}class E7{constructor(X,Q,K){this.opts=K,this.originalZone=void 0;let $=void 0;if(this.opts.timeZone)this.dt=X;else if(X.zone.type==="fixed"){const G=-1*(X.offset/60),B=G>=0?`Etc/GMT+${G}`:`Etc/GMT${G}`;if(X.offset!==0&&p.create(B).valid)$=B,this.dt=X;else $="UTC",this.dt=X.offset===0?X:X.setZone("UTC").plus({minutes:X.offset}),this.originalZone=X.zone}else if(X.zone.type==="system")this.dt=X;else if(X.zone.type==="iana")this.dt=X,$=X.zone.name;else $="UTC",this.dt=X.setZone("UTC").plus({minutes:X.offset}),this.originalZone=X.zone;const q={...this.opts};q.timeZone=q.timeZone||$,this.dtf=t0(Q,q)}format(){if(this.originalZone)return this.formatToParts().map(({value:X})=>X).join("");return this.dtf.format(this.dt.toJSDate())}formatToParts(){const X=this.dtf.formatToParts(this.dt.toJSDate());if(this.originalZone)return X.map((Q)=>{if(Q.type==="timeZoneName"){const K=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...Q,value:K}}else return Q});return X}resolvedOptions(){return this.dtf.resolvedOptions()}}class M7{constructor(X,Q,K){if(this.opts={style:"long",...K},!Q&&I7())this.rtf=mX(X,K)}format(X,Q){if(this.rtf)return this.rtf.format(X,Q);else return N6(Q,X,this.opts.numeric,this.opts.style!=="long")}formatToParts(X,Q){if(this.rtf)return this.rtf.formatToParts(X,Q);else return[]}}var aX={firstDay:1,minimalDays:4,weekend:[6,7]};class E{static fromOpts(X){return E.create(X.locale,X.numberingSystem,X.outputCalendar,X.weekSettings,X.defaultToEN)}static create(X,Q,K,$,q=!1){const G=X||L.defaultLocale,B=G||(q?"en-US":uX()),V=Q||L.defaultNumberingSystem,J=K||L.defaultOutputCalendar,C=K1($)||L.defaultWeekSettings;return new E(B,V,J,C,G)}static resetCache(){A0=null,e0={},X1={},Q1={}}static fromObject({locale:X,numberingSystem:Q,outputCalendar:K,weekSettings:$}={}){return E.create(X,Q,K,$)}constructor(X,Q,K,$,q){const[G,B,V]=dX(X);this.locale=G,this.numberingSystem=Q||B||null,this.outputCalendar=K||V||null,this.weekSettings=$,this.intl=iX(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=q,this.fastNumbersCached=null}get fastNumbers(){if(this.fastNumbersCached==null)this.fastNumbersCached=nX(this);return this.fastNumbersCached}listingMode(){const X=this.isEnglish(),Q=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return X&&Q?"en":"intl"}clone(X){if(!X||Object.getOwnPropertyNames(X).length===0)return this;else return E.create(X.locale||this.specifiedLocale,X.numberingSystem||this.numberingSystem,X.outputCalendar||this.outputCalendar,K1(X.weekSettings)||this.weekSettings,X.defaultToEN||!1)}redefaultToEN(X={}){return this.clone({...X,defaultToEN:!0})}redefaultToSystem(X={}){return this.clone({...X,defaultToEN:!1})}months(X,Q=!1){return z0(this,X,v7,()=>{const K=Q?{month:X,day:"numeric"}:{month:X},$=Q?"format":"standalone";if(!this.monthsCache[$][X])this.monthsCache[$][X]=sX((q)=>this.extract(q,K,"month"));return this.monthsCache[$][X]})}weekdays(X,Q=!1){return z0(this,X,S7,()=>{const K=Q?{weekday:X,year:"numeric",month:"long",day:"numeric"}:{weekday:X},$=Q?"format":"standalone";if(!this.weekdaysCache[$][X])this.weekdaysCache[$][X]=rX((q)=>this.extract(q,K,"weekday"));return this.weekdaysCache[$][X]})}meridiems(){return z0(this,void 0,()=>b7,()=>{if(!this.meridiemCache){const X={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[N.utc(2016,11,13,9),N.utc(2016,11,13,19)].map((Q)=>this.extract(Q,X,"dayperiod"))}return this.meridiemCache})}eras(X){return z0(this,X,h7,()=>{const Q={era:X};if(!this.eraCache[X])this.eraCache[X]=[N.utc(-40,1,1),N.utc(2017,1,1)].map((K)=>this.extract(K,Q,"era"));return this.eraCache[X]})}extract(X,Q,K){const $=this.dtFormatter(X,Q),q=$.formatToParts(),G=q.find((B)=>B.type.toLowerCase()===K);return G?G.value:null}numberFormatter(X={}){return new W7(this.intl,X.forceSimple||this.fastNumbers,X)}dtFormatter(X,Q={}){return new E7(X,this.intl,Q)}relFormatter(X={}){return new M7(this.intl,this.isEnglish(),X)}listFormatter(X={}){return pX(this.intl,X)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){if(this.weekSettings)return this.weekSettings;else if(!O7())return aX;else return lX(this.locale)}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(X){return this.locale===X.locale&&this.numberingSystem===X.numberingSystem&&this.outputCalendar===X.outputCalendar}}var d0=null;class j extends t{static get utcInstance(){if(d0===null)d0=new j(0);return d0}static instance(X){return X===0?j.utcInstance:new j(X)}static parseSpecifier(X){if(X){const Q=X.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(Q)return new j(h0(Q[1],Q[2]))}return null}constructor(X){super();this.fixed=X}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${H0(this.fixed,"narrow")}`}get ianaName(){if(this.fixed===0)return"Etc/UTC";else return`Etc/GMT${H0(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(X,Q){return H0(this.fixed,Q)}get isUniversal(){return!0}offset(){return this.fixed}equals(X){return X.type==="fixed"&&X.fixed===this.fixed}get isValid(){return!0}}class G1 extends t{constructor(X){super();this.zoneName=X}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}}var Z1=()=>Date.now(),F1="system",z1=null,w1=null,j1=null,I1=60,O1,D1=null;class L{static get now(){return Z1}static set now(X){Z1=X}static set defaultZone(X){F1=X}static get defaultZone(){return d(F1,W0.instance)}static get defaultLocale(){return z1}static set defaultLocale(X){z1=X}static get defaultNumberingSystem(){return w1}static set defaultNumberingSystem(X){w1=X}static get defaultOutputCalendar(){return j1}static set defaultOutputCalendar(X){j1=X}static get defaultWeekSettings(){return D1}static set defaultWeekSettings(X){D1=K1(X)}static get twoDigitCutoffYear(){return I1}static set twoDigitCutoffYear(X){I1=X%100}static get throwOnInvalid(){return O1}static set throwOnInvalid(X){O1=X}static resetCaches(){E.resetCache(),p.resetCache()}}class y{constructor(X,Q){this.reason=X,this.explanation=Q}toMessage(){if(this.explanation)return`${this.reason}: ${this.explanation}`;else return this.reason}}var L7=[0,31,59,90,120,151,181,212,243,273,304,334],Z7=[0,31,60,91,121,152,182,213,244,274,305,335],q6=["January","February","March","April","May","June","July","August","September","October","November","December"],T7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],G6=["J","F","M","A","M","J","J","A","S","O","N","D"],y7=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],k7=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],B6=["M","T","W","T","F","S","S"],b7=["AM","PM"],V6=["Before Christ","Anno Domini"],J6=["BC","AD"],C6=["B","A"],A6={D:T0,DD:t1,DDD:X7,DDDD:Q7,t:K7,tt:$7,ttt:q7,tttt:G7,T:B7,TT:V7,TTT:J7,TTTT:C7,f:Y7,ff:P7,fff:N7,ffff:H7,F:U7,FF:R7,FFF:A7,FFFF:_7};class w{static create(X,Q={}){return new w(X,Q)}static parseFormat(X){let Q=null,K="",$=!1;const q=[];for(let G=0;G<X.length;G++){const B=X.charAt(G);if(B==="'"){if(K.length>0)q.push({literal:$||/^\s+$/.test(K),val:K});Q=null,K="",$=!$}else if($)K+=B;else if(B===Q)K+=B;else{if(K.length>0)q.push({literal:/^\s+$/.test(K),val:K});K=B,Q=B}}if(K.length>0)q.push({literal:$||/^\s+$/.test(K),val:K});return q}static macroTokenToFormatOpts(X){return A6[X]}constructor(X,Q){this.opts=Q,this.loc=X,this.systemLoc=null}formatWithSystemDefault(X,Q){if(this.systemLoc===null)this.systemLoc=this.loc.redefaultToSystem();return this.systemLoc.dtFormatter(X,{...this.opts,...Q}).format()}dtFormatter(X,Q={}){return this.loc.dtFormatter(X,{...this.opts,...Q})}formatDateTime(X,Q){return this.dtFormatter(X,Q).format()}formatDateTimeParts(X,Q){return this.dtFormatter(X,Q).formatToParts()}formatInterval(X,Q){return this.dtFormatter(X.start,Q).dtf.formatRange(X.start.toJSDate(),X.end.toJSDate())}resolvedOptions(X,Q){return this.dtFormatter(X,Q).resolvedOptions()}num(X,Q=0){if(this.opts.forceSimple)return Z(X,Q);const K={...this.opts};if(Q>0)K.padTo=Q;return this.loc.numberFormatter(K).format(X)}formatDateTimeFromString(X,Q){const K=this.loc.listingMode()==="en",$=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",q=(P,A)=>this.loc.extract(X,P,A),G=(P)=>{if(X.isOffsetFixed&&X.offset===0&&P.allowZ)return"Z";return X.isValid?X.zone.formatOffset(X.ts,P.format):""},B=()=>K?Y6(X):q({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(P,A)=>K?P6(X,P):q(A?{month:P}:{month:P,day:"numeric"},"month"),J=(P,A)=>K?U6(X,P):q(A?{weekday:P}:{weekday:P,month:"long",day:"numeric"},"weekday"),C=(P)=>{const A=w.macroTokenToFormatOpts(P);if(A)return this.formatWithSystemDefault(X,A);else return P},U=(P)=>K?R6(X,P):q({era:P},"era"),_=(P)=>{switch(P){case"S":return this.num(X.millisecond);case"u":case"SSS":return this.num(X.millisecond,3);case"s":return this.num(X.second);case"ss":return this.num(X.second,2);case"uu":return this.num(Math.floor(X.millisecond/10),2);case"uuu":return this.num(Math.floor(X.millisecond/100));case"m":return this.num(X.minute);case"mm":return this.num(X.minute,2);case"h":return this.num(X.hour%12===0?12:X.hour%12);case"hh":return this.num(X.hour%12===0?12:X.hour%12,2);case"H":return this.num(X.hour);case"HH":return this.num(X.hour,2);case"Z":return G({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return G({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return G({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return X.zone.offsetName(X.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return X.zone.offsetName(X.ts,{format:"long",locale:this.loc.locale});case"z":return X.zoneName;case"a":return B();case"d":return $?q({day:"numeric"},"day"):this.num(X.day);case"dd":return $?q({day:"2-digit"},"day"):this.num(X.day,2);case"c":return this.num(X.weekday);case"ccc":return J("short",!0);case"cccc":return J("long",!0);case"ccccc":return J("narrow",!0);case"E":return this.num(X.weekday);case"EEE":return J("short",!1);case"EEEE":return J("long",!1);case"EEEEE":return J("narrow",!1);case"L":return $?q({month:"numeric",day:"numeric"},"month"):this.num(X.month);case"LL":return $?q({month:"2-digit",day:"numeric"},"month"):this.num(X.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return $?q({month:"numeric"},"month"):this.num(X.month);case"MM":return $?q({month:"2-digit"},"month"):this.num(X.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return $?q({year:"numeric"},"year"):this.num(X.year);case"yy":return $?q({year:"2-digit"},"year"):this.num(X.year.toString().slice(-2),2);case"yyyy":return $?q({year:"numeric"},"year"):this.num(X.year,4);case"yyyyyy":return $?q({year:"numeric"},"year"):this.num(X.year,6);case"G":return U("short");case"GG":return U("long");case"GGGGG":return U("narrow");case"kk":return this.num(X.weekYear.toString().slice(-2),2);case"kkkk":return this.num(X.weekYear,4);case"W":return this.num(X.weekNumber);case"WW":return this.num(X.weekNumber,2);case"n":return this.num(X.localWeekNumber);case"nn":return this.num(X.localWeekNumber,2);case"ii":return this.num(X.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(X.localWeekYear,4);case"o":return this.num(X.ordinal);case"ooo":return this.num(X.ordinal,3);case"q":return this.num(X.quarter);case"qq":return this.num(X.quarter,2);case"X":return this.num(Math.floor(X.ts/1000));case"x":return this.num(X.ts);default:return C(P)}};return S1(w.parseFormat(Q),_)}formatDurationFromString(X,Q){const K=(V)=>{switch(V[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},$=(V)=>(J)=>{const C=K(J);if(C)return this.num(V.get(C),J.length);else return J},q=w.parseFormat(Q),G=q.reduce((V,{literal:J,val:C})=>J?V:V.concat(C),[]),B=X.shiftTo(...G.map(K).filter((V)=>V));return S1(q,$(B))}}var g7=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,p7=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,H6=`(?:${p7.source}?(?:\\[(${g7.source})\\])?)?`,Y1=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,c7=RegExp(`${Y1.source}${H6}`),U1=RegExp(`(?:T${c7.source})?`),_6=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,W6=/(\d{4})-?W(\d\d)(?:-?(\d))?/,E6=/(\d{4})-?(\d{3})/,M6=f7("weekYear","weekNumber","weekDay"),L6=f7("year","ordinal"),Z6=/(\d{4})-(\d\d)-(\d\d)/,m7=RegExp(`${Y1.source} ?(?:${p7.source}|(${g7.source}))?`),F6=RegExp(`(?: ${m7.source})?`),w6=RegExp(`^T?${Y1.source}\$`),j6=/^-?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)?)?)$/,O6={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},D6=/^(?:(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)))$/,v6=/^(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$/,y6=/^(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$/,k6=/^(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})$/,b6=J0(_6,U1),h6=J0(W6,U1),g6=J0(E6,U1),f6=J0(c7),u7=C0(z6,U0,M0,L0),p6=C0(M6,U0,M0,L0),c6=C0(L6,U0,M0,L0),m6=C0(U0,M0,L0),s6=C0(U0),n6=J0(Z6,F6),a6=J0(m7),o6=C0(U0,M0,L0),h1="Invalid Duration",l7={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:604800000},days:{hours:24,minutes:1440,seconds:86400,milliseconds:86400000},hours:{minutes:60,seconds:3600,milliseconds:3600000},minutes:{seconds:60,milliseconds:60000},seconds:{milliseconds:1000}},t6={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536000,milliseconds:31536000000},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:7862400000},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592000,milliseconds:2592000000},...l7},v=365.2425,K0=30.436875,X8={years:{quarters:4,months:12,weeks:v/7,days:v,hours:v*24,minutes:v*24*60,seconds:v*24*60*60,milliseconds:v*24*60*60*1000},quarters:{months:3,weeks:v/28,days:v/4,hours:v*24/4,minutes:v*24*60/4,seconds:v*24*60*60/4,milliseconds:v*24*60*60*1000/4},months:{weeks:K0/7,days:K0,hours:K0*24,minutes:K0*24*60,seconds:K0*24*60*60,milliseconds:K0*24*60*60*1000},...l7},o=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Q8=o.slice(0).reverse();class H{constructor(X){const Q=X.conversionAccuracy==="longterm"||!1;let K=Q?X8:t6;if(X.matrix)K=X.matrix;this.values=X.values,this.loc=X.loc||E.create(),this.conversionAccuracy=Q?"longterm":"casual",this.invalid=X.invalid||null,this.matrix=K,this.isLuxonDuration=!0}static fromMillis(X,Q){return H.fromObject({milliseconds:X},Q)}static fromObject(X,Q={}){if(X==null||typeof X!=="object")throw new O(`Duration.fromObject: argument expected to be an object, got ${X===null?"null":typeof X}`);return new H({values:k0(X,H.normalizeUnit),loc:E.fromObject(Q),conversionAccuracy:Q.conversionAccuracy,matrix:Q.matrix})}static fromDurationLike(X){if(e(X))return H.fromMillis(X);else if(H.isDuration(X))return X;else if(typeof X==="object")return H.fromObject(X);else throw new O(`Unknown duration argument ${X} of type ${typeof X}`)}static fromISO(X,Q){const[K]=i6(X);if(K)return H.fromObject(K,Q);else return H.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static fromISOTime(X,Q){const[K]=r6(X);if(K)return H.fromObject(K,Q);else return H.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the Duration is invalid");const K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new e1(K);else return new H({invalid:K})}static normalizeUnit(X){const Q={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"}[X?X.toLowerCase():X];if(!Q)throw new q1(X);return Q}static isDuration(X){return X&&X.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(X,Q={}){const K={...Q,floor:Q.round!==!1&&Q.floor!==!1};return this.isValid?w.create(this.loc,K).formatDurationFromString(this,X):h1}toHuman(X={}){if(!this.isValid)return h1;const Q=o.map((K)=>{const $=this.values[K];if(R($))return null;return this.loc.numberFormatter({style:"unit",unitDisplay:"long",...X,unit:K.slice(0,-1)}).format($)}).filter((K)=>K);return this.loc.listFormatter({type:"conjunction",style:X.listStyle||"narrow",...X}).format(Q)}toObject(){if(!this.isValid)return{};return{...this.values}}toISO(){if(!this.isValid)return null;let X="P";if(this.years!==0)X+=this.years+"Y";if(this.months!==0||this.quarters!==0)X+=this.months+this.quarters*3+"M";if(this.weeks!==0)X+=this.weeks+"W";if(this.days!==0)X+=this.days+"D";if(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)X+="T";if(this.hours!==0)X+=this.hours+"H";if(this.minutes!==0)X+=this.minutes+"M";if(this.seconds!==0||this.milliseconds!==0)X+=C1(this.seconds+this.milliseconds/1000,3)+"S";if(X==="P")X+="T0S";return X}toISOTime(X={}){if(!this.isValid)return null;const Q=this.toMillis();if(Q<0||Q>=86400000)return null;return X={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...X,includeOffset:!1},N.fromMillis(Q,{zone:"UTC"}).toISOTime(X)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Duration { values: ${JSON.stringify(this.values)} }`;else return`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){if(!this.isValid)return NaN;return d7(this.matrix,this.values)}valueOf(){return this.toMillis()}plus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X),K={};for(let $ of o)if(V0(Q.values,$)||V0(this.values,$))K[$]=Q.get($)+this.get($);return u(this,{values:K},!0)}minus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X);return this.plus(Q.negate())}mapUnits(X){if(!this.isValid)return this;const Q={};for(let K of Object.keys(this.values))Q[K]=x7(X(this.values[K],K));return u(this,{values:Q},!0)}get(X){return this[H.normalizeUnit(X)]}set(X){if(!this.isValid)return this;const Q={...this.values,...k0(X,H.normalizeUnit)};return u(this,{values:Q})}reconfigure({locale:X,numberingSystem:Q,conversionAccuracy:K,matrix:$}={}){const G={loc:this.loc.clone({locale:X,numberingSystem:Q}),matrix:$,conversionAccuracy:K};return u(this,G)}as(X){return this.isValid?this.shiftTo(X).get(X):NaN}normalize(){if(!this.isValid)return this;const X=this.toObject();return g1(this.matrix,X),u(this,{values:X},!0)}rescale(){if(!this.isValid)return this;const X=K8(this.normalize().shiftToAll().toObject());return u(this,{values:X},!0)}shiftTo(...X){if(!this.isValid)return this;if(X.length===0)return this;X=X.map((G)=>H.normalizeUnit(G));const Q={},K={},$=this.toObject();let q;for(let G of o)if(X.indexOf(G)>=0){q=G;let B=0;for(let J in K)B+=this.matrix[J][G]*K[J],K[J]=0;if(e($[G]))B+=$[G];const V=Math.trunc(B);Q[G]=V,K[G]=(B*1000-V*1000)/1000}else if(e($[G]))K[G]=$[G];for(let G in K)if(K[G]!==0)Q[q]+=G===q?K[G]:K[G]/this.matrix[q][G];return g1(this.matrix,Q),u(this,{values:Q},!0)}shiftToAll(){if(!this.isValid)return this;return this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds")}negate(){if(!this.isValid)return this;const X={};for(let Q of Object.keys(this.values))X[Q]=this.values[Q]===0?0:-this.values[Q];return u(this,{values:X},!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(X){if(!this.isValid||!X.isValid)return!1;if(!this.loc.equals(X.loc))return!1;function Q(K,$){if(K===void 0||K===0)return $===void 0||$===0;return K===$}for(let K of o)if(!Q(this.values[K],X.values[K]))return!1;return!0}}var $0="Invalid Interval";class M{constructor(X){this.s=X.start,this.e=X.end,this.invalid=X.invalid||null,this.isLuxonInterval=!0}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the Interval is invalid");const K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new o1(K);else return new M({invalid:K})}static fromDateTimes(X,Q){const K=N0(X),$=N0(Q),q=$8(K,$);if(q==null)return new M({start:K,end:$});else return q}static after(X,Q){const K=H.fromDurationLike(Q),$=N0(X);return M.fromDateTimes($,$.plus(K))}static before(X,Q){const K=H.fromDurationLike(Q),$=N0(X);return M.fromDateTimes($.minus(K),$)}static fromISO(X,Q){const[K,$]=(X||"").split("/",2);if(K&&$){let q,G;try{q=N.fromISO(K,Q),G=q.isValid}catch(J){G=!1}let B,V;try{B=N.fromISO($,Q),V=B.isValid}catch(J){V=!1}if(G&&V)return M.fromDateTimes(q,B);if(G){const J=H.fromISO($,Q);if(J.isValid)return M.after(q,J)}else if(V){const J=H.fromISO(K,Q);if(J.isValid)return M.before(B,J)}}return M.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static isInterval(X){return X&&X.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(X="milliseconds"){return this.isValid?this.toDuration(...[X]).get(X):NaN}count(X="milliseconds",Q){if(!this.isValid)return NaN;const K=this.start.startOf(X,Q);let $;if(Q!=null&&Q.useLocaleWeeks)$=this.end.reconfigure({locale:K.locale});else $=this.end;return $=$.startOf(X,Q),Math.floor($.diff(K,X).get(X))+($.valueOf()!==this.end.valueOf())}hasSame(X){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,X):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(X){if(!this.isValid)return!1;return this.s>X}isBefore(X){if(!this.isValid)return!1;return this.e<=X}contains(X){if(!this.isValid)return!1;return this.s<=X&&this.e>X}set({start:X,end:Q}={}){if(!this.isValid)return this;return M.fromDateTimes(X||this.s,Q||this.e)}splitAt(...X){if(!this.isValid)return[];const Q=X.map(N0).filter((G)=>this.contains(G)).sort((G,B)=>G.toMillis()-B.toMillis()),K=[];let{s:$}=this,q=0;while($<this.e){const G=Q[q]||this.e,B=+G>+this.e?this.e:G;K.push(M.fromDateTimes($,B)),$=B,q+=1}return K}splitBy(X){const Q=H.fromDurationLike(X);if(!this.isValid||!Q.isValid||Q.as("milliseconds")===0)return[];let{s:K}=this,$=1,q;const G=[];while(K<this.e){const B=this.start.plus(Q.mapUnits((V)=>V*$));q=+B>+this.e?this.e:B,G.push(M.fromDateTimes(K,q)),K=q,$+=1}return G}divideEqually(X){if(!this.isValid)return[];return this.splitBy(this.length()/X).slice(0,X)}overlaps(X){return this.e>X.s&&this.s<X.e}abutsStart(X){if(!this.isValid)return!1;return+this.e===+X.s}abutsEnd(X){if(!this.isValid)return!1;return+X.e===+this.s}engulfs(X){if(!this.isValid)return!1;return this.s<=X.s&&this.e>=X.e}equals(X){if(!this.isValid||!X.isValid)return!1;return this.s.equals(X.s)&&this.e.equals(X.e)}intersection(X){if(!this.isValid)return this;const Q=this.s>X.s?this.s:X.s,K=this.e<X.e?this.e:X.e;if(Q>=K)return null;else return M.fromDateTimes(Q,K)}union(X){if(!this.isValid)return this;const Q=this.s<X.s?this.s:X.s,K=this.e>X.e?this.e:X.e;return M.fromDateTimes(Q,K)}static merge(X){const[Q,K]=X.sort(($,q)=>$.s-q.s).reduce(([$,q],G)=>{if(!q)return[$,G];else if(q.overlaps(G)||q.abutsStart(G))return[$,q.union(G)];else return[$.concat([q]),G]},[[],null]);if(K)Q.push(K);return Q}static xor(X){let Q=null,K=0;const $=[],q=X.map((V)=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),G=Array.prototype.concat(...q),B=G.sort((V,J)=>V.time-J.time);for(let V of B)if(K+=V.type==="s"?1:-1,K===1)Q=V.time;else{if(Q&&+Q!==+V.time)$.push(M.fromDateTimes(Q,V.time));Q=null}return M.merge($)}difference(...X){return M.xor([this].concat(X)).map((Q)=>this.intersection(Q)).filter((Q)=>Q&&!Q.isEmpty())}toString(){if(!this.isValid)return $0;return`[${this.s.toISO()} \u2013 ${this.e.toISO()})`}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;else return`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(X=T0,Q={}){return this.isValid?w.create(this.s.loc.clone(Q),X).formatInterval(this):$0}toISO(X){if(!this.isValid)return $0;return`${this.s.toISO(X)}/${this.e.toISO(X)}`}toISODate(){if(!this.isValid)return $0;return`${this.s.toISODate()}/${this.e.toISODate()}`}toISOTime(X){if(!this.isValid)return $0;return`${this.s.toISOTime(X)}/${this.e.toISOTime(X)}`}toFormat(X,{separator:Q=" \u2013 "}={}){if(!this.isValid)return $0;return`${this.s.toFormat(X)}${Q}${this.e.toFormat(X)}`}toDuration(X,Q){if(!this.isValid)return H.invalid(this.invalidReason);return this.e.diff(this.s,X,Q)}mapEndpoints(X){return M.fromDateTimes(X(this.s),X(this.e))}}class q0{static hasDST(X=L.defaultZone){const Q=N.now().setZone(X).set({month:12});return!X.isUniversal&&Q.offset!==Q.set({month:6}).offset}static isValidIANAZone(X){return p.isValidZone(X)}static normalizeZone(X){return d(X,L.defaultZone)}static getStartOfWeek({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getWeekendDays().slice()}static months(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null,outputCalendar:q="gregory"}={}){return($||E.create(Q,K,q)).months(X)}static monthsFormat(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null,outputCalendar:q="gregory"}={}){return($||E.create(Q,K,q)).months(X,!0)}static weekdays(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null}={}){return($||E.create(Q,K,null)).weekdays(X)}static weekdaysFormat(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null}={}){return($||E.create(Q,K,null)).weekdays(X,!0)}static meridiems({locale:X=null}={}){return E.create(X).meridiems()}static eras(X="short",{locale:Q=null}={}){return E.create(Q,null,"gregory").eras(X)}static features(){return{relative:I7(),localeWeek:O7()}}}var R1={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"},p1={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]},B8=R1.hanidec.replace(/[\[|\]]/g,"").split(""),J8="missing Intl.DateTimeFormat.formatToParts support",C8=String.fromCharCode(160),i7=`[ ${C8}]`,s7=new RegExp(i7,"g"),R8={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"}},s0=null,r0="Invalid DateTime",u1=8640000000000000,e7={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},L8={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Z8={ordinal:1,hour:0,minute:0,second:0,millisecond:0},t7=["year","month","day","hour","minute","second","millisecond"],F8=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],z8=["year","ordinal","hour","minute","second","millisecond"];class N{constructor(X){const Q=X.zone||L.defaultZone;let K=X.invalid||(Number.isNaN(X.ts)?new y("invalid input"):null)||(!Q.isValid?j0(Q):null);this.ts=R(X.ts)?L.now():X.ts;let $=null,q=null;if(!K)if(X.old&&X.old.ts===this.ts&&X.old.zone.equals(Q))[$,q]=[X.old.c,X.old.o];else{const B=Q.offset(this.ts);$=I0(this.ts,B),K=Number.isNaN($.year)?new y("invalid input"):null,$=K?null:$,q=K?null:B}this._zone=Q,this.loc=X.loc||E.create(),this.invalid=K,this.weekData=null,this.localWeekData=null,this.c=$,this.o=q,this.isLuxonDateTime=!0}static now(){return new N({})}static local(){const[X,Q]=n1(arguments),[K,$,q,G,B,V,J]=Q;return s1({year:K,month:$,day:q,hour:G,minute:B,second:V,millisecond:J},X)}static utc(){const[X,Q]=n1(arguments),[K,$,q,G,B,V,J]=Q;return X.zone=j.utcInstance,s1({year:K,month:$,day:q,hour:G,minute:B,second:V,millisecond:J},X)}static fromJSDate(X,Q={}){const K=X6(X)?X.valueOf():NaN;if(Number.isNaN(K))return N.invalid("invalid input");const $=d(Q.zone,L.defaultZone);if(!$.isValid)return N.invalid(j0($));return new N({ts:K,zone:$,loc:E.fromObject(Q)})}static fromMillis(X,Q={}){if(!e(X))throw new O(`fromMillis requires a numerical input, but received a ${typeof X} with value ${X}`);else if(X<-u1||X>u1)return N.invalid("Timestamp out of range");else return new N({ts:X,zone:d(Q.zone,L.defaultZone),loc:E.fromObject(Q)})}static fromSeconds(X,Q={}){if(!e(X))throw new O("fromSeconds requires a numerical input");else return new N({ts:X*1000,zone:d(Q.zone,L.defaultZone),loc:E.fromObject(Q)})}static fromObject(X,Q={}){X=X||{};const K=d(Q.zone,L.defaultZone);if(!K.isValid)return N.invalid(j0(K));const $=E.fromObject(Q),q=k0(X,i1),{minDaysInFirstWeek:G,startOfWeek:B}=v1(q,$),V=L.now(),J=!R(Q.specificOffset)?Q.specificOffset:K.offset(V),C=!R(q.ordinal),U=!R(q.year),_=!R(q.month)||!R(q.day),P=U||_,A=q.weekYear||q.weekNumber;if((P||C)&&A)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&C)throw new a("Can't mix ordinal dates with month/day");const D=A||q.weekday&&!P;let F,T,f=I0(V,J);if(D)F=F8,T=L8,f=v0(f,G,B);else if(C)F=z8,T=Z8,f=i0(f);else F=t7,T=e7;let m0=!1;for(let P0 of F){const OX=q[P0];if(!R(OX))m0=!0;else if(m0)q[P0]=T[P0];else q[P0]=f[P0]}const zX=D?oX(q,G,B):C?eX(q):w7(q),W1=zX||j7(q);if(W1)return N.invalid(W1);const wX=D?x1(q,G,B):C?T1(q):q,[jX,IX]=x0(wX,J,K),u0=new N({ts:jX,zone:K,o:IX,loc:$});if(q.weekday&&P&&X.weekday!==u0.weekday)return N.invalid("mismatched weekday",`you can't specify both a weekday of ${q.weekday} and a date of ${u0.toISO()}`);return u0}static fromISO(X,Q={}){const[K,$]=u6(X);return R0(K,$,Q,"ISO 8601",X)}static fromRFC2822(X,Q={}){const[K,$]=l6(X);return R0(K,$,Q,"RFC 2822",X)}static fromHTTP(X,Q={}){const[K,$]=d6(X);return R0(K,$,Q,"HTTP",Q)}static fromFormat(X,Q,K={}){if(R(X)||R(Q))throw new O("fromFormat requires an input string and a format");const{locale:$=null,numberingSystem:q=null}=K,G=E.fromOpts({locale:$,numberingSystem:q,defaultToEN:!0}),[B,V,J,C]=M8(G,X,Q);if(C)return N.invalid(C);else return R0(B,V,K,`format ${Q}`,X,J)}static fromString(X,Q,K={}){return N.fromFormat(X,Q,K)}static fromSQL(X,Q={}){const[K,$]=e6(X);return R0(K,$,Q,"SQL",X)}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the DateTime is invalid");const K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new a1(K);else return new N({invalid:K})}static isDateTime(X){return X&&X.isLuxonDateTime||!1}static parseFormatForOpts(X,Q={}){const K=a7(X,E.fromObject(Q));return!K?null:K.map(($)=>$?$.val:null).join("")}static expandFormat(X,Q={}){return r7(w.parseFormat(X),E.fromObject(Q)).map(($)=>$.val).join("")}get(X){return this[X]}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?n0(this).weekYear:NaN}get weekNumber(){return this.isValid?n0(this).weekNumber:NaN}get weekday(){return this.isValid?n0(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?a0(this).weekday:NaN}get localWeekNumber(){return this.isValid?a0(this).weekNumber:NaN}get localWeekYear(){return this.isValid?a0(this).weekYear:NaN}get ordinal(){return this.isValid?i0(this.c).ordinal:NaN}get monthShort(){return this.isValid?q0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?q0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?q0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?q0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"short",locale:this.locale});else return null}get offsetNameLong(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"long",locale:this.locale});else return null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){if(this.isOffsetFixed)return!1;else return 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 X=86400000,Q=60000,K=b0(this.c),$=this.zone.offset(K-X),q=this.zone.offset(K+X),G=this.zone.offset(K-$*Q),B=this.zone.offset(K-q*Q);if(G===B)return[this];const V=K-G*Q,J=K-B*Q,C=I0(V,G),U=I0(J,B);if(C.hour===U.hour&&C.minute===U.minute&&C.second===U.second&&C.millisecond===U.millisecond)return[n(this,{ts:V}),n(this,{ts:J})];return[this]}get isInLeapYear(){return E0(this.year)}get daysInMonth(){return y0(this.year,this.month)}get daysInYear(){return this.isValid?G0(this.year):NaN}get weeksInWeekYear(){return this.isValid?_0(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?_0(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(X={}){const{locale:Q,numberingSystem:K,calendar:$}=w.create(this.loc.clone(X),X).resolvedOptions(this);return{locale:Q,numberingSystem:K,outputCalendar:$}}toUTC(X=0,Q={}){return this.setZone(j.instance(X),Q)}toLocal(){return this.setZone(L.defaultZone)}setZone(X,{keepLocalTime:Q=!1,keepCalendarTime:K=!1}={}){if(X=d(X,L.defaultZone),X.equals(this.zone))return this;else if(!X.isValid)return N.invalid(j0(X));else{let $=this.ts;if(Q||K){const q=X.offset(this.ts),G=this.toObject();[$]=x0(G,q,X)}return n(this,{ts:$,zone:X})}}reconfigure({locale:X,numberingSystem:Q,outputCalendar:K}={}){const $=this.loc.clone({locale:X,numberingSystem:Q,outputCalendar:K});return n(this,{loc:$})}setLocale(X){return this.reconfigure({locale:X})}set(X){if(!this.isValid)return this;const Q=k0(X,i1),{minDaysInFirstWeek:K,startOfWeek:$}=v1(Q,this.loc),q=!R(Q.weekYear)||!R(Q.weekNumber)||!R(Q.weekday),G=!R(Q.ordinal),B=!R(Q.year),V=!R(Q.month)||!R(Q.day),J=B||V,C=Q.weekYear||Q.weekNumber;if((J||G)&&C)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&G)throw new a("Can't mix ordinal dates with month/day");let U;if(q)U=x1({...v0(this.c,K,$),...Q},K,$);else if(!R(Q.ordinal))U=T1({...i0(this.c),...Q});else if(U={...this.toObject(),...Q},R(Q.day))U.day=Math.min(y0(U.year,U.month),U.day);const[_,P]=x0(U,this.o,this.zone);return n(this,{ts:_,o:P})}plus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X);return n(this,l1(this,Q))}minus(X){if(!this.isValid)return this;const Q=H.fromDurationLike(X).negate();return n(this,l1(this,Q))}startOf(X,{useLocaleWeeks:Q=!1}={}){if(!this.isValid)return this;const K={},$=H.normalizeUnit(X);switch($){case"years":K.month=1;case"quarters":case"months":K.day=1;case"weeks":case"days":K.hour=0;case"hours":K.minute=0;case"minutes":K.second=0;case"seconds":K.millisecond=0;break}if($==="weeks")if(Q){const q=this.loc.getStartOfWeek(),{weekday:G}=this;if(G<q)K.weekNumber=this.weekNumber-1;K.weekday=q}else K.weekday=1;if($==="quarters"){const q=Math.ceil(this.month/3);K.month=(q-1)*3+1}return this.set(K)}endOf(X,Q){return this.isValid?this.plus({[X]:1}).startOf(X,Q).minus(1):this}toFormat(X,Q={}){return this.isValid?w.create(this.loc.redefaultToEN(Q)).formatDateTimeFromString(this,X):r0}toLocaleString(X=T0,Q={}){return this.isValid?w.create(this.loc.clone(Q),X).formatDateTime(this):r0}toLocaleParts(X={}){return this.isValid?w.create(this.loc.clone(X),X).formatDateTimeParts(this):[]}toISO({format:X="extended",suppressSeconds:Q=!1,suppressMilliseconds:K=!1,includeOffset:$=!0,extendedZone:q=!1}={}){if(!this.isValid)return null;const G=X==="extended";let B=o0(this,G);return B+="T",B+=d1(this,G,Q,K,$,q),B}toISODate({format:X="extended"}={}){if(!this.isValid)return null;return o0(this,X==="extended")}toISOWeekDate(){return O0(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:X=!1,suppressSeconds:Q=!1,includeOffset:K=!0,includePrefix:$=!1,extendedZone:q=!1,format:G="extended"}={}){if(!this.isValid)return null;return($?"T":"")+d1(this,G==="extended",Q,X,K,q)}toRFC2822(){return O0(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return O0(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){if(!this.isValid)return null;return o0(this,!0)}toSQLTime({includeOffset:X=!0,includeZone:Q=!1,includeOffsetSpace:K=!0}={}){let $="HH:mm:ss.SSS";if(Q||X){if(K)$+=" ";if(Q)$+="z";else if(X)$+="ZZ"}return O0(this,$,!0)}toSQL(X={}){if(!this.isValid)return null;return`${this.toSQLDate()} ${this.toSQLTime(X)}`}toString(){return this.isValid?this.toISO():r0}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;else return`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1000:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1000):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(X={}){if(!this.isValid)return{};const Q={...this.c};if(X.includeConfig)Q.outputCalendar=this.outputCalendar,Q.numberingSystem=this.loc.numberingSystem,Q.locale=this.loc.locale;return Q}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(X,Q="milliseconds",K={}){if(!this.isValid||!X.isValid)return H.invalid("created by diffing an invalid DateTime");const $={locale:this.locale,numberingSystem:this.numberingSystem,...K},q=Q6(Q).map(H.normalizeUnit),G=X.valueOf()>this.valueOf(),B=G?this:X,V=G?X:this,J=G8(B,V,q,$);return G?J.negate():J}diffNow(X="milliseconds",Q={}){return this.diff(N.now(),X,Q)}until(X){return this.isValid?M.fromDateTimes(this,X):this}hasSame(X,Q,K){if(!this.isValid)return!1;const $=X.valueOf(),q=this.setZone(X.zone,{keepLocalTime:!0});return q.startOf(Q,K)<=$&&$<=q.endOf(Q,K)}equals(X){return this.isValid&&X.isValid&&this.valueOf()===X.valueOf()&&this.zone.equals(X.zone)&&this.loc.equals(X.loc)}toRelative(X={}){if(!this.isValid)return null;const Q=X.base||N.fromObject({},{zone:this.zone}),K=X.padding?this<Q?-X.padding:X.padding:0;let $=["years","months","days","hours","minutes","seconds"],q=X.unit;if(Array.isArray(X.unit))$=X.unit,q=void 0;return r1(Q,this.plus(K),{...X,numeric:"always",units:$,unit:q})}toRelativeCalendar(X={}){if(!this.isValid)return null;return r1(X.base||N.fromObject({},{zone:this.zone}),this,{...X,numeric:"auto",units:["years","months","days"],calendary:!0})}static min(...X){if(!X.every(N.isDateTime))throw new O("min requires all arguments be DateTimes");return y1(X,(Q)=>Q.valueOf(),Math.min)}static max(...X){if(!X.every(N.isDateTime))throw new O("max requires all arguments be DateTimes");return y1(X,(Q)=>Q.valueOf(),Math.max)}static fromFormatExplain(X,Q,K={}){const{locale:$=null,numberingSystem:q=null}=K,G=E.fromOpts({locale:$,numberingSystem:q,defaultToEN:!0});return n7(G,X,Q)}static fromStringExplain(X,Q,K={}){return N.fromFormatExplain(X,Q,K)}static get DATE_SHORT(){return T0}static get DATE_MED(){return t1}static get DATE_MED_WITH_WEEKDAY(){return kX}static get DATE_FULL(){return X7}static get DATE_HUGE(){return Q7}static get TIME_SIMPLE(){return K7}static get TIME_WITH_SECONDS(){return $7}static get TIME_WITH_SHORT_OFFSET(){return q7}static get TIME_WITH_LONG_OFFSET(){return G7}static get TIME_24_SIMPLE(){return B7}static get TIME_24_WITH_SECONDS(){return V7}static get TIME_24_WITH_SHORT_OFFSET(){return J7}static get TIME_24_WITH_LONG_OFFSET(){return C7}static get DATETIME_SHORT(){return Y7}static get DATETIME_SHORT_WITH_SECONDS(){return U7}static get DATETIME_MED(){return P7}static get DATETIME_MED_WITH_SECONDS(){return R7}static get DATETIME_MED_WITH_WEEKDAY(){return SX}static get DATETIME_FULL(){return N7}static get DATETIME_FULL_WITH_SECONDS(){return A7}static get DATETIME_HUGE(){return H7}static get DATETIME_HUGE_WITH_SECONDS(){return _7}}var j8="3.4.4";XX.DateTime=N;XX.Duration=H;XX.FixedOffsetZone=j;XX.IANAZone=p;XX.Info=q0;XX.Interval=M;XX.InvalidZone=G1;XX.Settings=L;XX.SystemZone=W0;XX.VERSION=j8;XX.Zone=t});var BX=s((KX)=>{Object.defineProperty(KX,"__esModule",{value:!0});KX.RE_RANGE=KX.RE_WILDCARDS=KX.PRESETS=KX.TIME_UNITS_LEN=KX.TIME_UNITS=KX.TIME_UNITS_MAP=KX.ALIASES=KX.PARSE_DEFAULTS=KX.MONTH_CONSTRAINTS=KX.CONSTRAINTS=void 0;KX.CONSTRAINTS=Object.freeze({second:[0,59],minute:[0,59],hour:[0,23],dayOfMonth:[1,31],month:[1,12],dayOfWeek:[0,7]});KX.MONTH_CONSTRAINTS=Object.freeze({1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31});KX.PARSE_DEFAULTS=Object.freeze({second:"0",minute:"*",hour:"*",dayOfMonth:"*",month:"*",dayOfWeek:"*"});KX.ALIASES=Object.freeze({jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6});KX.TIME_UNITS_MAP=Object.freeze({SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY_OF_MONTH:"dayOfMonth",MONTH:"month",DAY_OF_WEEK:"dayOfWeek"});KX.TIME_UNITS=Object.freeze(Object.values(KX.TIME_UNITS_MAP));KX.TIME_UNITS_LEN=KX.TIME_UNITS.length;KX.PRESETS=Object.freeze({"@yearly":"0 0 0 1 1 *","@monthly":"0 0 0 1 * *","@weekly":"0 0 0 * * 0","@daily":"0 0 0 * * *","@hourly":"0 0 * * * *","@minutely":"0 * * * * *","@secondly":"* * * * * *","@weekdays":"0 0 0 * * 1-5","@weekends":"0 0 0 * * 0,6"});KX.RE_WILDCARDS=/\*/g;KX.RE_RANGE=/^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g});var A1=s((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.ExclusiveParametersError=JX.CronError=void 0;class N1 extends Error{}JX.CronError=N1;class VX extends N1{constructor(X,Q){super(`You can't specify both ${X} and ${Q}`)}}JX.ExclusiveParametersError=VX});var PX=s((YX)=>{Object.defineProperty(YX,"__esModule",{value:!0});YX.getRecordKeys=void 0;var i8=(X)=>{return Object.keys(X)};YX.getRecordKeys=i8});var f0=s((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CronTime=void 0;var c=QX(),z=BX(),I=A1(),RX=PX();class NX{constructor(X,Q,K){if(this.realDate=!1,this.second={},this.minute={},this.hour={},this.dayOfMonth={},this.month={},this.dayOfWeek={},Q!=null&&K!=null)throw new I.ExclusiveParametersError("timeZone","utcOffset");if(Q){if(!c.DateTime.fromObject({},{zone:Q}).isValid)throw new I.CronError("Invalid timezone.");this.timeZone=Q}if(K!=null)this.utcOffset=K;if(X instanceof Date||X instanceof c.DateTime)this.source=X instanceof Date?c.DateTime.fromJSDate(X):X,this.realDate=!0;else this.source=X,this._parse(this.source),this._verifyParse()}_getWeekDay(X){return X.weekday===7?0:X.weekday}_verifyParse(){const X=RX.getRecordKeys(this.month),Q=RX.getRecordKeys(this.dayOfMonth);let K=!1,$=null;for(let q of X){const G=z.MONTH_CONSTRAINTS[q];for(let B of Q)if(B<=G)K=!0;if(!K)$=q,console.warn(`Month '${q}' is limited to '${G}' days.`)}if(!K&&$!==null){const q=z.MONTH_CONSTRAINTS[$];for(let G of Q)if(G>q){delete this.dayOfMonth[G];const B=G%q;this.dayOfMonth[B]=!0}}}sendAt(X){let Q=this.realDate&&this.source instanceof c.DateTime?this.source:c.DateTime.local();if(this.timeZone)Q=Q.setZone(this.timeZone);if(this.utcOffset!==void 0){const K=this.utcOffset<0?"-":"+",$=Math.trunc(this.utcOffset/60),q=String(Math.abs($)).padStart(2,"0"),G=Math.abs(this.utcOffset-$*60),B=String(G).padStart(2,"0"),V=`UTC${K}${q}:${B}`;if(Q=Q.setZone(V),!Q.isValid)throw new I.CronError("ERROR: You specified an invalid UTC offset.")}if(this.realDate){if(c.DateTime.local()>Q)throw new I.CronError("WARNING: Date in past. Will never be fired.");return Q}if(X===void 0||isNaN(X)||X<0)return this.getNextDateFrom(Q);else{const K=[];for(;X>0;X--)Q=this.getNextDateFrom(Q),K.push(Q);return K}}getTimeout(){return Math.max(-1,this.sendAt().toMillis()-c.DateTime.local().toMillis())}toString(){return this.toJSON().join(" ")}toJSON(){return z.TIME_UNITS.map((X)=>{return this._wcOrAll(X)})}getNextDateFrom(X,Q){var K;if(X instanceof Date)X=c.DateTime.fromJSDate(X);let $=X;const q=X.toMillis();if(Q)$=$.setZone(Q);if(!this.realDate){if($.millisecond>0)$=$.set({millisecond:0,second:$.second+1})}if(!$.isValid)throw new I.CronError("ERROR: You specified an invalid date.");const G=c.DateTime.now().plus({years:8});while(!0){const B=$.toMillis()-X.toMillis();if($>G)throw new I.CronError(`Something went wrong. No execution date was found in the next 8 years.
|
|
2
|
+
var DX=Object.create;var{getPrototypeOf:xX,defineProperty:E1,getOwnPropertyNames:TX}=Object;var vX=Object.prototype.hasOwnProperty;var yX=(X,Q,K)=>{K=X!=null?DX(xX(X)):{};let $=Q||!X||!X.__esModule?E1(K,"default",{value:X,enumerable:!0}):K;for(let q of TX(X))if(!vX.call($,q))E1($,q,{get:()=>X[q],enumerable:!0});return $};var s=(X,Q)=>()=>(Q||X((Q={exports:{}}).exports,Q),Q.exports);var QX=s((XX)=>{Object.defineProperty(XX,"__esModule",{value:!0});class i extends Error{}class a1 extends i{constructor(X){super(`Invalid DateTime: ${X.toMessage()}`)}}class o1 extends i{constructor(X){super(`Invalid Interval: ${X.toMessage()}`)}}class e1 extends i{constructor(X){super(`Invalid Duration: ${X.toMessage()}`)}}class a extends i{}class q1 extends i{constructor(X){super(`Invalid unit ${X}`)}}class O extends i{}class m extends i{constructor(){super("Zone is an abstract class")}}var Y="numeric",g="short",x="long",T0={year:Y,month:Y,day:Y},t1={year:Y,month:g,day:Y},kX={year:Y,month:g,day:Y,weekday:g},X7={year:Y,month:x,day:Y},Q7={year:Y,month:x,day:Y,weekday:x},K7={hour:Y,minute:Y},$7={hour:Y,minute:Y,second:Y},q7={hour:Y,minute:Y,second:Y,timeZoneName:g},G7={hour:Y,minute:Y,second:Y,timeZoneName:x},B7={hour:Y,minute:Y,hourCycle:"h23"},V7={hour:Y,minute:Y,second:Y,hourCycle:"h23"},J7={hour:Y,minute:Y,second:Y,hourCycle:"h23",timeZoneName:g},C7={hour:Y,minute:Y,second:Y,hourCycle:"h23",timeZoneName:x},Y7={year:Y,month:Y,day:Y,hour:Y,minute:Y},U7={year:Y,month:Y,day:Y,hour:Y,minute:Y,second:Y},P7={year:Y,month:g,day:Y,hour:Y,minute:Y},R7={year:Y,month:g,day:Y,hour:Y,minute:Y,second:Y},SX={year:Y,month:g,day:Y,weekday:g,hour:Y,minute:Y},N7={year:Y,month:x,day:Y,hour:Y,minute:Y,timeZoneName:g},A7={year:Y,month:x,day:Y,hour:Y,minute:Y,second:Y,timeZoneName:g},H7={year:Y,month:x,day:Y,weekday:x,hour:Y,minute:Y,timeZoneName:x},_7={year:Y,month:x,day:Y,weekday:x,hour:Y,minute:Y,second:Y,timeZoneName:x};class t{get type(){throw new m}get name(){throw new m}get ianaName(){return this.name}get isUniversal(){throw new m}offsetName(X,Q){throw new m}formatOffset(X,Q){throw new m}offset(X){throw new m}equals(X){throw new m}get isValid(){throw new m}}var l0=null;class W0 extends t{static get instance(){if(l0===null)l0=new W0;return l0}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(X,{format:Q,locale:K}){return D7(X,Q,K)}formatOffset(X,Q){return H0(this.offset(X),Q)}offset(X){return-new Date(X).getTimezoneOffset()}equals(X){return X.type==="system"}get isValid(){return!0}}var D0={};function bX(X){if(!D0[X])D0[X]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:X,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"});return D0[X]}var hX={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function gX(X,Q){let K=X.format(Q).replace(/\u200E/g,""),$=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(K),[,q,G,B,V,J,C,U]=$;return[B,q,G,V,J,C,U]}function fX(X,Q){let K=X.formatToParts(Q),$=[];for(let q=0;q<K.length;q++){let{type:G,value:B}=K[q],V=hX[G];if(G==="era")$[V]=B;else if(!R(V))$[V]=parseInt(B,10)}return $}var F0={};class p extends t{static create(X){if(!F0[X])F0[X]=new p(X);return F0[X]}static resetCache(){F0={},D0={}}static isValidSpecifier(X){return this.isValidZone(X)}static isValidZone(X){if(!X)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:X}).format(),!0}catch(Q){return!1}}constructor(X){super();this.zoneName=X,this.valid=p.isValidZone(X)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(X,{format:Q,locale:K}){return D7(X,Q,K,this.name)}formatOffset(X,Q){return H0(this.offset(X),Q)}offset(X){let Q=new Date(X);if(isNaN(Q))return NaN;let K=bX(this.name),[$,q,G,B,V,J,C]=K.formatToParts?fX(K,Q):gX(K,Q);if(B==="BC")$=-Math.abs($)+1;let _=b0({year:$,month:q,day:G,hour:V===24?0:V,minute:J,second:C,millisecond:0}),P=+Q,A=P%1000;return P-=A>=0?A:1000+A,(_-P)/60000}equals(X){return X.type==="iana"&&X.name===this.name}get isValid(){return this.valid}}var M1={};function pX(X,Q={}){let K=JSON.stringify([X,Q]),$=M1[K];if(!$)$=new Intl.ListFormat(X,Q),M1[K]=$;return $}var e0={};function t0(X,Q={}){let K=JSON.stringify([X,Q]),$=e0[K];if(!$)$=new Intl.DateTimeFormat(X,Q),e0[K]=$;return $}var X1={};function cX(X,Q={}){let K=JSON.stringify([X,Q]),$=X1[K];if(!$)$=new Intl.NumberFormat(X,Q),X1[K]=$;return $}var Q1={};function mX(X,Q={}){let{base:K,...$}=Q,q=JSON.stringify([X,$]),G=Q1[q];if(!G)G=new Intl.RelativeTimeFormat(X,Q),Q1[q]=G;return G}var A0=null;function uX(){if(A0)return A0;else return A0=new Intl.DateTimeFormat().resolvedOptions().locale,A0}var L1={};function lX(X){let Q=L1[X];if(!Q){let K=new Intl.Locale(X);Q="getWeekInfo"in K?K.getWeekInfo():K.weekInfo,L1[X]=Q}return Q}function dX(X){let Q=X.indexOf("-x-");if(Q!==-1)X=X.substring(0,Q);let K=X.indexOf("-u-");if(K===-1)return[X];else{let $,q;try{$=t0(X).resolvedOptions(),q=X}catch(V){let J=X.substring(0,K);$=t0(J).resolvedOptions(),q=J}let{numberingSystem:G,calendar:B}=$;return[q,G,B]}}function iX(X,Q,K){if(K||Q){if(!X.includes("-u-"))X+="-u";if(K)X+=`-ca-${K}`;if(Q)X+=`-nu-${Q}`;return X}else return X}function sX(X){let Q=[];for(let K=1;K<=12;K++){let $=N.utc(2009,K,1);Q.push(X($))}return Q}function rX(X){let Q=[];for(let K=1;K<=7;K++){let $=N.utc(2016,11,13+K);Q.push(X($))}return Q}function z0(X,Q,K,$){let q=X.listingMode();if(q==="error")return null;else if(q==="en")return K(Q);else return $(Q)}function nX(X){if(X.numberingSystem&&X.numberingSystem!=="latn")return!1;else return X.numberingSystem==="latn"||!X.locale||X.locale.startsWith("en")||new Intl.DateTimeFormat(X.intl).resolvedOptions().numberingSystem==="latn"}class W7{constructor(X,Q,K){this.padTo=K.padTo||0,this.floor=K.floor||!1;let{padTo:$,floor:q,...G}=K;if(!Q||Object.keys(G).length>0){let B={useGrouping:!1,...K};if(K.padTo>0)B.minimumIntegerDigits=K.padTo;this.inf=cX(X,B)}}format(X){if(this.inf){let Q=this.floor?Math.floor(X):X;return this.inf.format(Q)}else{let Q=this.floor?Math.floor(X):C1(X,3);return Z(Q,this.padTo)}}}class E7{constructor(X,Q,K){this.opts=K,this.originalZone=void 0;let $=void 0;if(this.opts.timeZone)this.dt=X;else if(X.zone.type==="fixed"){let G=-1*(X.offset/60),B=G>=0?`Etc/GMT+${G}`:`Etc/GMT${G}`;if(X.offset!==0&&p.create(B).valid)$=B,this.dt=X;else $="UTC",this.dt=X.offset===0?X:X.setZone("UTC").plus({minutes:X.offset}),this.originalZone=X.zone}else if(X.zone.type==="system")this.dt=X;else if(X.zone.type==="iana")this.dt=X,$=X.zone.name;else $="UTC",this.dt=X.setZone("UTC").plus({minutes:X.offset}),this.originalZone=X.zone;let q={...this.opts};q.timeZone=q.timeZone||$,this.dtf=t0(Q,q)}format(){if(this.originalZone)return this.formatToParts().map(({value:X})=>X).join("");return this.dtf.format(this.dt.toJSDate())}formatToParts(){let X=this.dtf.formatToParts(this.dt.toJSDate());if(this.originalZone)return X.map((Q)=>{if(Q.type==="timeZoneName"){let K=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...Q,value:K}}else return Q});return X}resolvedOptions(){return this.dtf.resolvedOptions()}}class M7{constructor(X,Q,K){if(this.opts={style:"long",...K},!Q&&I7())this.rtf=mX(X,K)}format(X,Q){if(this.rtf)return this.rtf.format(X,Q);else return N6(Q,X,this.opts.numeric,this.opts.style!=="long")}formatToParts(X,Q){if(this.rtf)return this.rtf.formatToParts(X,Q);else return[]}}var aX={firstDay:1,minimalDays:4,weekend:[6,7]};class E{static fromOpts(X){return E.create(X.locale,X.numberingSystem,X.outputCalendar,X.weekSettings,X.defaultToEN)}static create(X,Q,K,$,q=!1){let G=X||L.defaultLocale,B=G||(q?"en-US":uX()),V=Q||L.defaultNumberingSystem,J=K||L.defaultOutputCalendar,C=K1($)||L.defaultWeekSettings;return new E(B,V,J,C,G)}static resetCache(){A0=null,e0={},X1={},Q1={}}static fromObject({locale:X,numberingSystem:Q,outputCalendar:K,weekSettings:$}={}){return E.create(X,Q,K,$)}constructor(X,Q,K,$,q){let[G,B,V]=dX(X);this.locale=G,this.numberingSystem=Q||B||null,this.outputCalendar=K||V||null,this.weekSettings=$,this.intl=iX(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=q,this.fastNumbersCached=null}get fastNumbers(){if(this.fastNumbersCached==null)this.fastNumbersCached=nX(this);return this.fastNumbersCached}listingMode(){let X=this.isEnglish(),Q=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return X&&Q?"en":"intl"}clone(X){if(!X||Object.getOwnPropertyNames(X).length===0)return this;else return E.create(X.locale||this.specifiedLocale,X.numberingSystem||this.numberingSystem,X.outputCalendar||this.outputCalendar,K1(X.weekSettings)||this.weekSettings,X.defaultToEN||!1)}redefaultToEN(X={}){return this.clone({...X,defaultToEN:!0})}redefaultToSystem(X={}){return this.clone({...X,defaultToEN:!1})}months(X,Q=!1){return z0(this,X,v7,()=>{let K=Q?{month:X,day:"numeric"}:{month:X},$=Q?"format":"standalone";if(!this.monthsCache[$][X])this.monthsCache[$][X]=sX((q)=>this.extract(q,K,"month"));return this.monthsCache[$][X]})}weekdays(X,Q=!1){return z0(this,X,S7,()=>{let K=Q?{weekday:X,year:"numeric",month:"long",day:"numeric"}:{weekday:X},$=Q?"format":"standalone";if(!this.weekdaysCache[$][X])this.weekdaysCache[$][X]=rX((q)=>this.extract(q,K,"weekday"));return this.weekdaysCache[$][X]})}meridiems(){return z0(this,void 0,()=>b7,()=>{if(!this.meridiemCache){let X={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[N.utc(2016,11,13,9),N.utc(2016,11,13,19)].map((Q)=>this.extract(Q,X,"dayperiod"))}return this.meridiemCache})}eras(X){return z0(this,X,h7,()=>{let Q={era:X};if(!this.eraCache[X])this.eraCache[X]=[N.utc(-40,1,1),N.utc(2017,1,1)].map((K)=>this.extract(K,Q,"era"));return this.eraCache[X]})}extract(X,Q,K){let $=this.dtFormatter(X,Q),q=$.formatToParts(),G=q.find((B)=>B.type.toLowerCase()===K);return G?G.value:null}numberFormatter(X={}){return new W7(this.intl,X.forceSimple||this.fastNumbers,X)}dtFormatter(X,Q={}){return new E7(X,this.intl,Q)}relFormatter(X={}){return new M7(this.intl,this.isEnglish(),X)}listFormatter(X={}){return pX(this.intl,X)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){if(this.weekSettings)return this.weekSettings;else if(!O7())return aX;else return lX(this.locale)}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(X){return this.locale===X.locale&&this.numberingSystem===X.numberingSystem&&this.outputCalendar===X.outputCalendar}}var d0=null;class j extends t{static get utcInstance(){if(d0===null)d0=new j(0);return d0}static instance(X){return X===0?j.utcInstance:new j(X)}static parseSpecifier(X){if(X){let Q=X.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(Q)return new j(h0(Q[1],Q[2]))}return null}constructor(X){super();this.fixed=X}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${H0(this.fixed,"narrow")}`}get ianaName(){if(this.fixed===0)return"Etc/UTC";else return`Etc/GMT${H0(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(X,Q){return H0(this.fixed,Q)}get isUniversal(){return!0}offset(){return this.fixed}equals(X){return X.type==="fixed"&&X.fixed===this.fixed}get isValid(){return!0}}class G1 extends t{constructor(X){super();this.zoneName=X}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 d(X,Q){if(R(X)||X===null)return Q;else if(X instanceof t)return X;else if(tX(X)){let K=X.toLowerCase();if(K==="default")return Q;else if(K==="local"||K==="system")return W0.instance;else if(K==="utc"||K==="gmt")return j.utcInstance;else return j.parseSpecifier(K)||p.create(X)}else if(e(X))return j.instance(X);else if(typeof X==="object"&&"offset"in X&&typeof X.offset==="function")return X;else return new G1(X)}var Z1=()=>Date.now(),F1="system",z1=null,w1=null,j1=null,I1=60,O1,D1=null;class L{static get now(){return Z1}static set now(X){Z1=X}static set defaultZone(X){F1=X}static get defaultZone(){return d(F1,W0.instance)}static get defaultLocale(){return z1}static set defaultLocale(X){z1=X}static get defaultNumberingSystem(){return w1}static set defaultNumberingSystem(X){w1=X}static get defaultOutputCalendar(){return j1}static set defaultOutputCalendar(X){j1=X}static get defaultWeekSettings(){return D1}static set defaultWeekSettings(X){D1=K1(X)}static get twoDigitCutoffYear(){return I1}static set twoDigitCutoffYear(X){I1=X%100}static get throwOnInvalid(){return O1}static set throwOnInvalid(X){O1=X}static resetCaches(){E.resetCache(),p.resetCache()}}class y{constructor(X,Q){this.reason=X,this.explanation=Q}toMessage(){if(this.explanation)return`${this.reason}: ${this.explanation}`;else return this.reason}}var L7=[0,31,59,90,120,151,181,212,243,273,304,334],Z7=[0,31,60,91,121,152,182,213,244,274,305,335];function k(X,Q){return new y("unit out of range",`you specified ${Q} (of type ${typeof Q}) as a ${X}, which is invalid`)}function B1(X,Q,K){let $=new Date(Date.UTC(X,Q-1,K));if(X<100&&X>=0)$.setUTCFullYear($.getUTCFullYear()-1900);let q=$.getUTCDay();return q===0?7:q}function F7(X,Q,K){return K+(E0(X)?Z7:L7)[Q-1]}function z7(X,Q){let K=E0(X)?Z7:L7,$=K.findIndex((G)=>G<Q),q=Q-K[$];return{month:$+1,day:q}}function V1(X,Q){return(X-Q+7)%7+1}function v0(X,Q=4,K=1){let{year:$,month:q,day:G}=X,B=F7($,q,G),V=V1(B1($,q,G),K),J=Math.floor((B-V+14-Q)/7),C;if(J<1)C=$-1,J=_0(C,Q,K);else if(J>_0($,Q,K))C=$+1,J=1;else C=$;return{weekYear:C,weekNumber:J,weekday:V,...g0(X)}}function x1(X,Q=4,K=1){let{weekYear:$,weekNumber:q,weekday:G}=X,B=V1(B1($,1,Q),K),V=G0($),J=q*7+G-B-7+Q,C;if(J<1)C=$-1,J+=G0(C);else if(J>V)C=$+1,J-=G0($);else C=$;let{month:U,day:_}=z7(C,J);return{year:C,month:U,day:_,...g0(X)}}function i0(X){let{year:Q,month:K,day:$}=X,q=F7(Q,K,$);return{year:Q,ordinal:q,...g0(X)}}function T1(X){let{year:Q,ordinal:K}=X,{month:$,day:q}=z7(Q,K);return{year:Q,month:$,day:q,...g0(X)}}function v1(X,Q){if(!R(X.localWeekday)||!R(X.localWeekNumber)||!R(X.localWeekYear)){if(!R(X.weekday)||!R(X.weekNumber)||!R(X.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");if(!R(X.localWeekday))X.weekday=X.localWeekday;if(!R(X.localWeekNumber))X.weekNumber=X.localWeekNumber;if(!R(X.localWeekYear))X.weekYear=X.localWeekYear;return delete X.localWeekday,delete X.localWeekNumber,delete X.localWeekYear,{minDaysInFirstWeek:Q.getMinDaysInFirstWeek(),startOfWeek:Q.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function oX(X,Q=4,K=1){let $=S0(X.weekYear),q=S(X.weekNumber,1,_0(X.weekYear,Q,K)),G=S(X.weekday,1,7);if(!$)return k("weekYear",X.weekYear);else if(!q)return k("week",X.weekNumber);else if(!G)return k("weekday",X.weekday);else return!1}function eX(X){let Q=S0(X.year),K=S(X.ordinal,1,G0(X.year));if(!Q)return k("year",X.year);else if(!K)return k("ordinal",X.ordinal);else return!1}function w7(X){let Q=S0(X.year),K=S(X.month,1,12),$=S(X.day,1,y0(X.year,X.month));if(!Q)return k("year",X.year);else if(!K)return k("month",X.month);else if(!$)return k("day",X.day);else return!1}function j7(X){let{hour:Q,minute:K,second:$,millisecond:q}=X,G=S(Q,0,23)||Q===24&&K===0&&$===0&&q===0,B=S(K,0,59),V=S($,0,59),J=S(q,0,999);if(!G)return k("hour",Q);else if(!B)return k("minute",K);else if(!V)return k("second",$);else if(!J)return k("millisecond",q);else return!1}function R(X){return typeof X==="undefined"}function e(X){return typeof X==="number"}function S0(X){return typeof X==="number"&&X%1===0}function tX(X){return typeof X==="string"}function X6(X){return Object.prototype.toString.call(X)==="[object Date]"}function I7(){try{return typeof Intl!=="undefined"&&!!Intl.RelativeTimeFormat}catch(X){return!1}}function O7(){try{return typeof Intl!=="undefined"&&!!Intl.Locale&&(("weekInfo"in Intl.Locale.prototype)||("getWeekInfo"in Intl.Locale.prototype))}catch(X){return!1}}function Q6(X){return Array.isArray(X)?X:[X]}function y1(X,Q,K){if(X.length===0)return;return X.reduce(($,q)=>{let G=[Q(q),q];if(!$)return G;else if(K($[0],G[0])===$[0])return $;else return G},null)[1]}function K6(X,Q){return Q.reduce((K,$)=>{return K[$]=X[$],K},{})}function V0(X,Q){return Object.prototype.hasOwnProperty.call(X,Q)}function K1(X){if(X==null)return null;else if(typeof X!=="object")throw new O("Week settings must be an object");else{if(!S(X.firstDay,1,7)||!S(X.minimalDays,1,7)||!Array.isArray(X.weekend)||X.weekend.some((Q)=>!S(Q,1,7)))throw new O("Invalid week settings");return{firstDay:X.firstDay,minimalDays:X.minimalDays,weekend:Array.from(X.weekend)}}}function S(X,Q,K){return S0(X)&&X>=Q&&X<=K}function $6(X,Q){return X-Q*Math.floor(X/Q)}function Z(X,Q=2){let K=X<0,$;if(K)$="-"+(""+-X).padStart(Q,"0");else $=(""+X).padStart(Q,"0");return $}function l(X){if(R(X)||X===null||X==="")return;else return parseInt(X,10)}function r(X){if(R(X)||X===null||X==="")return;else return parseFloat(X)}function J1(X){if(R(X)||X===null||X==="")return;else{let Q=parseFloat("0."+X)*1000;return Math.floor(Q)}}function C1(X,Q,K=!1){let $=10**Q;return(K?Math.trunc:Math.round)(X*$)/$}function E0(X){return X%4===0&&(X%100!==0||X%400===0)}function G0(X){return E0(X)?366:365}function y0(X,Q){let K=$6(Q-1,12)+1,$=X+(Q-K)/12;if(K===2)return E0($)?29:28;else return[31,null,31,30,31,30,31,31,30,31,30,31][K-1]}function b0(X){let Q=Date.UTC(X.year,X.month-1,X.day,X.hour,X.minute,X.second,X.millisecond);if(X.year<100&&X.year>=0)Q=new Date(Q),Q.setUTCFullYear(X.year,X.month-1,X.day);return+Q}function k1(X,Q,K){return-V1(B1(X,1,Q),K)+Q-1}function _0(X,Q=4,K=1){let $=k1(X,Q,K),q=k1(X+1,Q,K);return(G0(X)-$+q)/7}function $1(X){if(X>99)return X;else return X>L.twoDigitCutoffYear?1900+X:2000+X}function D7(X,Q,K,$=null){let q=new Date(X),G={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};if($)G.timeZone=$;let B={timeZoneName:Q,...G},V=new Intl.DateTimeFormat(K,B).formatToParts(q).find((J)=>J.type.toLowerCase()==="timezonename");return V?V.value:null}function h0(X,Q){let K=parseInt(X,10);if(Number.isNaN(K))K=0;let $=parseInt(Q,10)||0,q=K<0||Object.is(K,-0)?-$:$;return K*60+q}function x7(X){let Q=Number(X);if(typeof X==="boolean"||X===""||Number.isNaN(Q))throw new O(`Invalid unit value ${X}`);return Q}function k0(X,Q){let K={};for(let $ in X)if(V0(X,$)){let q=X[$];if(q===void 0||q===null)continue;K[Q($)]=x7(q)}return K}function H0(X,Q){let K=Math.trunc(Math.abs(X/60)),$=Math.trunc(Math.abs(X%60)),q=X>=0?"+":"-";switch(Q){case"short":return`${q}${Z(K,2)}:${Z($,2)}`;case"narrow":return`${q}${K}${$>0?`:${$}`:""}`;case"techie":return`${q}${Z(K,2)}${Z($,2)}`;default:throw new RangeError(`Value format ${Q} is out of range for property format`)}}function g0(X){return K6(X,["hour","minute","second","millisecond"])}var q6=["January","February","March","April","May","June","July","August","September","October","November","December"],T7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],G6=["J","F","M","A","M","J","J","A","S","O","N","D"];function v7(X){switch(X){case"narrow":return[...G6];case"short":return[...T7];case"long":return[...q6];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 y7=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],k7=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],B6=["M","T","W","T","F","S","S"];function S7(X){switch(X){case"narrow":return[...B6];case"short":return[...k7];case"long":return[...y7];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var b7=["AM","PM"],V6=["Before Christ","Anno Domini"],J6=["BC","AD"],C6=["B","A"];function h7(X){switch(X){case"narrow":return[...C6];case"short":return[...J6];case"long":return[...V6];default:return null}}function Y6(X){return b7[X.hour<12?0:1]}function U6(X,Q){return S7(Q)[X.weekday-1]}function P6(X,Q){return v7(Q)[X.month-1]}function R6(X,Q){return h7(Q)[X.year<0?0:1]}function N6(X,Q,K="always",$=!1){let q={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."]},G=["hours","minutes","seconds"].indexOf(X)===-1;if(K==="auto"&&G){let _=X==="days";switch(Q){case 1:return _?"tomorrow":`next ${q[X][0]}`;case-1:return _?"yesterday":`last ${q[X][0]}`;case 0:return _?"today":`this ${q[X][0]}`}}let B=Object.is(Q,-0)||Q<0,V=Math.abs(Q),J=V===1,C=q[X],U=$?J?C[1]:C[2]||C[1]:J?q[X][0]:X;return B?`${V} ${U} ago`:`in ${V} ${U}`}function S1(X,Q){let K="";for(let $ of X)if($.literal)K+=$.val;else K+=Q($.val);return K}var A6={D:T0,DD:t1,DDD:X7,DDDD:Q7,t:K7,tt:$7,ttt:q7,tttt:G7,T:B7,TT:V7,TTT:J7,TTTT:C7,f:Y7,ff:P7,fff:N7,ffff:H7,F:U7,FF:R7,FFF:A7,FFFF:_7};class w{static create(X,Q={}){return new w(X,Q)}static parseFormat(X){let Q=null,K="",$=!1,q=[];for(let G=0;G<X.length;G++){let B=X.charAt(G);if(B==="'"){if(K.length>0)q.push({literal:$||/^\s+$/.test(K),val:K});Q=null,K="",$=!$}else if($)K+=B;else if(B===Q)K+=B;else{if(K.length>0)q.push({literal:/^\s+$/.test(K),val:K});K=B,Q=B}}if(K.length>0)q.push({literal:$||/^\s+$/.test(K),val:K});return q}static macroTokenToFormatOpts(X){return A6[X]}constructor(X,Q){this.opts=Q,this.loc=X,this.systemLoc=null}formatWithSystemDefault(X,Q){if(this.systemLoc===null)this.systemLoc=this.loc.redefaultToSystem();return this.systemLoc.dtFormatter(X,{...this.opts,...Q}).format()}dtFormatter(X,Q={}){return this.loc.dtFormatter(X,{...this.opts,...Q})}formatDateTime(X,Q){return this.dtFormatter(X,Q).format()}formatDateTimeParts(X,Q){return this.dtFormatter(X,Q).formatToParts()}formatInterval(X,Q){return this.dtFormatter(X.start,Q).dtf.formatRange(X.start.toJSDate(),X.end.toJSDate())}resolvedOptions(X,Q){return this.dtFormatter(X,Q).resolvedOptions()}num(X,Q=0){if(this.opts.forceSimple)return Z(X,Q);let K={...this.opts};if(Q>0)K.padTo=Q;return this.loc.numberFormatter(K).format(X)}formatDateTimeFromString(X,Q){let K=this.loc.listingMode()==="en",$=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",q=(P,A)=>this.loc.extract(X,P,A),G=(P)=>{if(X.isOffsetFixed&&X.offset===0&&P.allowZ)return"Z";return X.isValid?X.zone.formatOffset(X.ts,P.format):""},B=()=>K?Y6(X):q({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(P,A)=>K?P6(X,P):q(A?{month:P}:{month:P,day:"numeric"},"month"),J=(P,A)=>K?U6(X,P):q(A?{weekday:P}:{weekday:P,month:"long",day:"numeric"},"weekday"),C=(P)=>{let A=w.macroTokenToFormatOpts(P);if(A)return this.formatWithSystemDefault(X,A);else return P},U=(P)=>K?R6(X,P):q({era:P},"era"),_=(P)=>{switch(P){case"S":return this.num(X.millisecond);case"u":case"SSS":return this.num(X.millisecond,3);case"s":return this.num(X.second);case"ss":return this.num(X.second,2);case"uu":return this.num(Math.floor(X.millisecond/10),2);case"uuu":return this.num(Math.floor(X.millisecond/100));case"m":return this.num(X.minute);case"mm":return this.num(X.minute,2);case"h":return this.num(X.hour%12===0?12:X.hour%12);case"hh":return this.num(X.hour%12===0?12:X.hour%12,2);case"H":return this.num(X.hour);case"HH":return this.num(X.hour,2);case"Z":return G({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return G({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return G({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return X.zone.offsetName(X.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return X.zone.offsetName(X.ts,{format:"long",locale:this.loc.locale});case"z":return X.zoneName;case"a":return B();case"d":return $?q({day:"numeric"},"day"):this.num(X.day);case"dd":return $?q({day:"2-digit"},"day"):this.num(X.day,2);case"c":return this.num(X.weekday);case"ccc":return J("short",!0);case"cccc":return J("long",!0);case"ccccc":return J("narrow",!0);case"E":return this.num(X.weekday);case"EEE":return J("short",!1);case"EEEE":return J("long",!1);case"EEEEE":return J("narrow",!1);case"L":return $?q({month:"numeric",day:"numeric"},"month"):this.num(X.month);case"LL":return $?q({month:"2-digit",day:"numeric"},"month"):this.num(X.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return $?q({month:"numeric"},"month"):this.num(X.month);case"MM":return $?q({month:"2-digit"},"month"):this.num(X.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return $?q({year:"numeric"},"year"):this.num(X.year);case"yy":return $?q({year:"2-digit"},"year"):this.num(X.year.toString().slice(-2),2);case"yyyy":return $?q({year:"numeric"},"year"):this.num(X.year,4);case"yyyyyy":return $?q({year:"numeric"},"year"):this.num(X.year,6);case"G":return U("short");case"GG":return U("long");case"GGGGG":return U("narrow");case"kk":return this.num(X.weekYear.toString().slice(-2),2);case"kkkk":return this.num(X.weekYear,4);case"W":return this.num(X.weekNumber);case"WW":return this.num(X.weekNumber,2);case"n":return this.num(X.localWeekNumber);case"nn":return this.num(X.localWeekNumber,2);case"ii":return this.num(X.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(X.localWeekYear,4);case"o":return this.num(X.ordinal);case"ooo":return this.num(X.ordinal,3);case"q":return this.num(X.quarter);case"qq":return this.num(X.quarter,2);case"X":return this.num(Math.floor(X.ts/1000));case"x":return this.num(X.ts);default:return C(P)}};return S1(w.parseFormat(Q),_)}formatDurationFromString(X,Q){let K=(V)=>{switch(V[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},$=(V)=>(J)=>{let C=K(J);if(C)return this.num(V.get(C),J.length);else return J},q=w.parseFormat(Q),G=q.reduce((V,{literal:J,val:C})=>J?V:V.concat(C),[]),B=X.shiftTo(...G.map(K).filter((V)=>V));return S1(q,$(B))}}var g7=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function J0(...X){let Q=X.reduce((K,$)=>K+$.source,"");return RegExp(`^${Q}\$`)}function C0(...X){return(Q)=>X.reduce(([K,$,q],G)=>{let[B,V,J]=G(Q,q);return[{...K,...B},V||$,J]},[{},null,1]).slice(0,2)}function Y0(X,...Q){if(X==null)return[null,null];for(let[K,$]of Q){let q=K.exec(X);if(q)return $(q)}return[null,null]}function f7(...X){return(Q,K)=>{let $={},q;for(q=0;q<X.length;q++)$[X[q]]=l(Q[K+q]);return[$,null,K+q]}}var p7=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,H6=`(?:${p7.source}?(?:\\[(${g7.source})\\])?)?`,Y1=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,c7=RegExp(`${Y1.source}${H6}`),U1=RegExp(`(?:T${c7.source})?`),_6=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,W6=/(\d{4})-?W(\d\d)(?:-?(\d))?/,E6=/(\d{4})-?(\d{3})/,M6=f7("weekYear","weekNumber","weekDay"),L6=f7("year","ordinal"),Z6=/(\d{4})-(\d\d)-(\d\d)/,m7=RegExp(`${Y1.source} ?(?:${p7.source}|(${g7.source}))?`),F6=RegExp(`(?: ${m7.source})?`);function B0(X,Q,K){let $=X[Q];return R($)?K:l($)}function z6(X,Q){return[{year:B0(X,Q),month:B0(X,Q+1,1),day:B0(X,Q+2,1)},null,Q+3]}function U0(X,Q){return[{hours:B0(X,Q,0),minutes:B0(X,Q+1,0),seconds:B0(X,Q+2,0),milliseconds:J1(X[Q+3])},null,Q+4]}function M0(X,Q){let K=!X[Q]&&!X[Q+1],$=h0(X[Q+1],X[Q+2]),q=K?null:j.instance($);return[{},q,Q+3]}function L0(X,Q){let K=X[Q]?p.create(X[Q]):null;return[{},K,Q+1]}var w6=RegExp(`^T?${Y1.source}\$`),j6=/^-?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 I6(X){let[Q,K,$,q,G,B,V,J,C]=X,U=Q[0]==="-",_=J&&J[0]==="-",P=(A,D=!1)=>A!==void 0&&(D||A&&U)?-A:A;return[{years:P(r(K)),months:P(r($)),weeks:P(r(q)),days:P(r(G)),hours:P(r(B)),minutes:P(r(V)),seconds:P(r(J),J==="-0"),milliseconds:P(J1(C),_)}]}var O6={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function P1(X,Q,K,$,q,G,B){let V={year:Q.length===2?$1(l(Q)):l(Q),month:T7.indexOf(K)+1,day:l($),hour:l(q),minute:l(G)};if(B)V.second=l(B);if(X)V.weekday=X.length>3?y7.indexOf(X)+1:k7.indexOf(X)+1;return V}var D6=/^(?:(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 x6(X){let[,Q,K,$,q,G,B,V,J,C,U,_]=X,P=P1(Q,q,$,K,G,B,V),A;if(J)A=O6[J];else if(C)A=0;else A=h0(U,_);return[P,new j(A)]}function T6(X){return X.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var v6=/^(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$/,y6=/^(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$/,k6=/^(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 b1(X){let[,Q,K,$,q,G,B,V]=X;return[P1(Q,q,$,K,G,B,V),j.utcInstance]}function S6(X){let[,Q,K,$,q,G,B,V]=X;return[P1(Q,V,K,$,q,G,B),j.utcInstance]}var b6=J0(_6,U1),h6=J0(W6,U1),g6=J0(E6,U1),f6=J0(c7),u7=C0(z6,U0,M0,L0),p6=C0(M6,U0,M0,L0),c6=C0(L6,U0,M0,L0),m6=C0(U0,M0,L0);function u6(X){return Y0(X,[b6,u7],[h6,p6],[g6,c6],[f6,m6])}function l6(X){return Y0(T6(X),[D6,x6])}function d6(X){return Y0(X,[v6,b1],[y6,b1],[k6,S6])}function i6(X){return Y0(X,[j6,I6])}var s6=C0(U0);function r6(X){return Y0(X,[w6,s6])}var n6=J0(Z6,F6),a6=J0(m7),o6=C0(U0,M0,L0);function e6(X){return Y0(X,[n6,u7],[a6,o6])}var h1="Invalid Duration",l7={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:604800000},days:{hours:24,minutes:1440,seconds:86400,milliseconds:86400000},hours:{minutes:60,seconds:3600,milliseconds:3600000},minutes:{seconds:60,milliseconds:60000},seconds:{milliseconds:1000}},t6={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536000,milliseconds:31536000000},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:7862400000},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592000,milliseconds:2592000000},...l7},v=365.2425,K0=30.436875,X8={years:{quarters:4,months:12,weeks:v/7,days:v,hours:v*24,minutes:v*24*60,seconds:v*24*60*60,milliseconds:v*24*60*60*1000},quarters:{months:3,weeks:v/28,days:v/4,hours:v*24/4,minutes:v*24*60/4,seconds:v*24*60*60/4,milliseconds:v*24*60*60*1000/4},months:{weeks:K0/7,days:K0,hours:K0*24,minutes:K0*24*60,seconds:K0*24*60*60,milliseconds:K0*24*60*60*1000},...l7},o=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Q8=o.slice(0).reverse();function u(X,Q,K=!1){let $={values:K?Q.values:{...X.values,...Q.values||{}},loc:X.loc.clone(Q.loc),conversionAccuracy:Q.conversionAccuracy||X.conversionAccuracy,matrix:Q.matrix||X.matrix};return new H($)}function d7(X,Q){var K;let $=(K=Q.milliseconds)!=null?K:0;for(let q of Q8.slice(1))if(Q[q])$+=Q[q]*X[q].milliseconds;return $}function g1(X,Q){let K=d7(X,Q)<0?-1:1;o.reduceRight(($,q)=>{if(!R(Q[q])){if($){let G=Q[$]*K,B=X[q][$],V=Math.floor(G/B);Q[q]+=V*K,Q[$]-=V*B*K}return q}else return $},null),o.reduce(($,q)=>{if(!R(Q[q])){if($){let G=Q[$]%1;Q[$]-=G,Q[q]+=G*X[$][q]}return q}else return $},null)}function K8(X){let Q={};for(let[K,$]of Object.entries(X))if($!==0)Q[K]=$;return Q}class H{constructor(X){let Q=X.conversionAccuracy==="longterm"||!1,K=Q?X8:t6;if(X.matrix)K=X.matrix;this.values=X.values,this.loc=X.loc||E.create(),this.conversionAccuracy=Q?"longterm":"casual",this.invalid=X.invalid||null,this.matrix=K,this.isLuxonDuration=!0}static fromMillis(X,Q){return H.fromObject({milliseconds:X},Q)}static fromObject(X,Q={}){if(X==null||typeof X!=="object")throw new O(`Duration.fromObject: argument expected to be an object, got ${X===null?"null":typeof X}`);return new H({values:k0(X,H.normalizeUnit),loc:E.fromObject(Q),conversionAccuracy:Q.conversionAccuracy,matrix:Q.matrix})}static fromDurationLike(X){if(e(X))return H.fromMillis(X);else if(H.isDuration(X))return X;else if(typeof X==="object")return H.fromObject(X);else throw new O(`Unknown duration argument ${X} of type ${typeof X}`)}static fromISO(X,Q){let[K]=i6(X);if(K)return H.fromObject(K,Q);else return H.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static fromISOTime(X,Q){let[K]=r6(X);if(K)return H.fromObject(K,Q);else return H.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the Duration is invalid");let K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new e1(K);else return new H({invalid:K})}static normalizeUnit(X){let Q={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"}[X?X.toLowerCase():X];if(!Q)throw new q1(X);return Q}static isDuration(X){return X&&X.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(X,Q={}){let K={...Q,floor:Q.round!==!1&&Q.floor!==!1};return this.isValid?w.create(this.loc,K).formatDurationFromString(this,X):h1}toHuman(X={}){if(!this.isValid)return h1;let Q=o.map((K)=>{let $=this.values[K];if(R($))return null;return this.loc.numberFormatter({style:"unit",unitDisplay:"long",...X,unit:K.slice(0,-1)}).format($)}).filter((K)=>K);return this.loc.listFormatter({type:"conjunction",style:X.listStyle||"narrow",...X}).format(Q)}toObject(){if(!this.isValid)return{};return{...this.values}}toISO(){if(!this.isValid)return null;let X="P";if(this.years!==0)X+=this.years+"Y";if(this.months!==0||this.quarters!==0)X+=this.months+this.quarters*3+"M";if(this.weeks!==0)X+=this.weeks+"W";if(this.days!==0)X+=this.days+"D";if(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)X+="T";if(this.hours!==0)X+=this.hours+"H";if(this.minutes!==0)X+=this.minutes+"M";if(this.seconds!==0||this.milliseconds!==0)X+=C1(this.seconds+this.milliseconds/1000,3)+"S";if(X==="P")X+="T0S";return X}toISOTime(X={}){if(!this.isValid)return null;let Q=this.toMillis();if(Q<0||Q>=86400000)return null;return X={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...X,includeOffset:!1},N.fromMillis(Q,{zone:"UTC"}).toISOTime(X)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Duration { values: ${JSON.stringify(this.values)} }`;else return`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){if(!this.isValid)return NaN;return d7(this.matrix,this.values)}valueOf(){return this.toMillis()}plus(X){if(!this.isValid)return this;let Q=H.fromDurationLike(X),K={};for(let $ of o)if(V0(Q.values,$)||V0(this.values,$))K[$]=Q.get($)+this.get($);return u(this,{values:K},!0)}minus(X){if(!this.isValid)return this;let Q=H.fromDurationLike(X);return this.plus(Q.negate())}mapUnits(X){if(!this.isValid)return this;let Q={};for(let K of Object.keys(this.values))Q[K]=x7(X(this.values[K],K));return u(this,{values:Q},!0)}get(X){return this[H.normalizeUnit(X)]}set(X){if(!this.isValid)return this;let Q={...this.values,...k0(X,H.normalizeUnit)};return u(this,{values:Q})}reconfigure({locale:X,numberingSystem:Q,conversionAccuracy:K,matrix:$}={}){let G={loc:this.loc.clone({locale:X,numberingSystem:Q}),matrix:$,conversionAccuracy:K};return u(this,G)}as(X){return this.isValid?this.shiftTo(X).get(X):NaN}normalize(){if(!this.isValid)return this;let X=this.toObject();return g1(this.matrix,X),u(this,{values:X},!0)}rescale(){if(!this.isValid)return this;let X=K8(this.normalize().shiftToAll().toObject());return u(this,{values:X},!0)}shiftTo(...X){if(!this.isValid)return this;if(X.length===0)return this;X=X.map((G)=>H.normalizeUnit(G));let Q={},K={},$=this.toObject(),q;for(let G of o)if(X.indexOf(G)>=0){q=G;let B=0;for(let J in K)B+=this.matrix[J][G]*K[J],K[J]=0;if(e($[G]))B+=$[G];let V=Math.trunc(B);Q[G]=V,K[G]=(B*1000-V*1000)/1000}else if(e($[G]))K[G]=$[G];for(let G in K)if(K[G]!==0)Q[q]+=G===q?K[G]:K[G]/this.matrix[q][G];return g1(this.matrix,Q),u(this,{values:Q},!0)}shiftToAll(){if(!this.isValid)return this;return this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds")}negate(){if(!this.isValid)return this;let X={};for(let Q of Object.keys(this.values))X[Q]=this.values[Q]===0?0:-this.values[Q];return u(this,{values:X},!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(X){if(!this.isValid||!X.isValid)return!1;if(!this.loc.equals(X.loc))return!1;function Q(K,$){if(K===void 0||K===0)return $===void 0||$===0;return K===$}for(let K of o)if(!Q(this.values[K],X.values[K]))return!1;return!0}}var $0="Invalid Interval";function $8(X,Q){if(!X||!X.isValid)return M.invalid("missing or invalid start");else if(!Q||!Q.isValid)return M.invalid("missing or invalid end");else if(Q<X)return M.invalid("end before start",`The end of an interval must be after its start, but you had start=${X.toISO()} and end=${Q.toISO()}`);else return null}class M{constructor(X){this.s=X.start,this.e=X.end,this.invalid=X.invalid||null,this.isLuxonInterval=!0}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the Interval is invalid");let K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new o1(K);else return new M({invalid:K})}static fromDateTimes(X,Q){let K=N0(X),$=N0(Q),q=$8(K,$);if(q==null)return new M({start:K,end:$});else return q}static after(X,Q){let K=H.fromDurationLike(Q),$=N0(X);return M.fromDateTimes($,$.plus(K))}static before(X,Q){let K=H.fromDurationLike(Q),$=N0(X);return M.fromDateTimes($.minus(K),$)}static fromISO(X,Q){let[K,$]=(X||"").split("/",2);if(K&&$){let q,G;try{q=N.fromISO(K,Q),G=q.isValid}catch(J){G=!1}let B,V;try{B=N.fromISO($,Q),V=B.isValid}catch(J){V=!1}if(G&&V)return M.fromDateTimes(q,B);if(G){let J=H.fromISO($,Q);if(J.isValid)return M.after(q,J)}else if(V){let J=H.fromISO(K,Q);if(J.isValid)return M.before(B,J)}}return M.invalid("unparsable",`the input "${X}" can't be parsed as ISO 8601`)}static isInterval(X){return X&&X.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e: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(X="milliseconds"){return this.isValid?this.toDuration(...[X]).get(X):NaN}count(X="milliseconds",Q){if(!this.isValid)return NaN;let K=this.start.startOf(X,Q),$;if(Q!=null&&Q.useLocaleWeeks)$=this.end.reconfigure({locale:K.locale});else $=this.end;return $=$.startOf(X,Q),Math.floor($.diff(K,X).get(X))+($.valueOf()!==this.end.valueOf())}hasSame(X){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,X):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(X){if(!this.isValid)return!1;return this.s>X}isBefore(X){if(!this.isValid)return!1;return this.e<=X}contains(X){if(!this.isValid)return!1;return this.s<=X&&this.e>X}set({start:X,end:Q}={}){if(!this.isValid)return this;return M.fromDateTimes(X||this.s,Q||this.e)}splitAt(...X){if(!this.isValid)return[];let Q=X.map(N0).filter((G)=>this.contains(G)).sort((G,B)=>G.toMillis()-B.toMillis()),K=[],{s:$}=this,q=0;while($<this.e){let G=Q[q]||this.e,B=+G>+this.e?this.e:G;K.push(M.fromDateTimes($,B)),$=B,q+=1}return K}splitBy(X){let Q=H.fromDurationLike(X);if(!this.isValid||!Q.isValid||Q.as("milliseconds")===0)return[];let{s:K}=this,$=1,q,G=[];while(K<this.e){let B=this.start.plus(Q.mapUnits((V)=>V*$));q=+B>+this.e?this.e:B,G.push(M.fromDateTimes(K,q)),K=q,$+=1}return G}divideEqually(X){if(!this.isValid)return[];return this.splitBy(this.length()/X).slice(0,X)}overlaps(X){return this.e>X.s&&this.s<X.e}abutsStart(X){if(!this.isValid)return!1;return+this.e===+X.s}abutsEnd(X){if(!this.isValid)return!1;return+X.e===+this.s}engulfs(X){if(!this.isValid)return!1;return this.s<=X.s&&this.e>=X.e}equals(X){if(!this.isValid||!X.isValid)return!1;return this.s.equals(X.s)&&this.e.equals(X.e)}intersection(X){if(!this.isValid)return this;let Q=this.s>X.s?this.s:X.s,K=this.e<X.e?this.e:X.e;if(Q>=K)return null;else return M.fromDateTimes(Q,K)}union(X){if(!this.isValid)return this;let Q=this.s<X.s?this.s:X.s,K=this.e>X.e?this.e:X.e;return M.fromDateTimes(Q,K)}static merge(X){let[Q,K]=X.sort(($,q)=>$.s-q.s).reduce(([$,q],G)=>{if(!q)return[$,G];else if(q.overlaps(G)||q.abutsStart(G))return[$,q.union(G)];else return[$.concat([q]),G]},[[],null]);if(K)Q.push(K);return Q}static xor(X){let Q=null,K=0,$=[],q=X.map((V)=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),G=Array.prototype.concat(...q),B=G.sort((V,J)=>V.time-J.time);for(let V of B)if(K+=V.type==="s"?1:-1,K===1)Q=V.time;else{if(Q&&+Q!==+V.time)$.push(M.fromDateTimes(Q,V.time));Q=null}return M.merge($)}difference(...X){return M.xor([this].concat(X)).map((Q)=>this.intersection(Q)).filter((Q)=>Q&&!Q.isEmpty())}toString(){if(!this.isValid)return $0;return`[${this.s.toISO()} \u2013 ${this.e.toISO()})`}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;else return`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(X=T0,Q={}){return this.isValid?w.create(this.s.loc.clone(Q),X).formatInterval(this):$0}toISO(X){if(!this.isValid)return $0;return`${this.s.toISO(X)}/${this.e.toISO(X)}`}toISODate(){if(!this.isValid)return $0;return`${this.s.toISODate()}/${this.e.toISODate()}`}toISOTime(X){if(!this.isValid)return $0;return`${this.s.toISOTime(X)}/${this.e.toISOTime(X)}`}toFormat(X,{separator:Q=" \u2013 "}={}){if(!this.isValid)return $0;return`${this.s.toFormat(X)}${Q}${this.e.toFormat(X)}`}toDuration(X,Q){if(!this.isValid)return H.invalid(this.invalidReason);return this.e.diff(this.s,X,Q)}mapEndpoints(X){return M.fromDateTimes(X(this.s),X(this.e))}}class q0{static hasDST(X=L.defaultZone){let Q=N.now().setZone(X).set({month:12});return!X.isUniversal&&Q.offset!==Q.set({month:6}).offset}static isValidIANAZone(X){return p.isValidZone(X)}static normalizeZone(X){return d(X,L.defaultZone)}static getStartOfWeek({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:X=null,locObj:Q=null}={}){return(Q||E.create(X)).getWeekendDays().slice()}static months(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null,outputCalendar:q="gregory"}={}){return($||E.create(Q,K,q)).months(X)}static monthsFormat(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null,outputCalendar:q="gregory"}={}){return($||E.create(Q,K,q)).months(X,!0)}static weekdays(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null}={}){return($||E.create(Q,K,null)).weekdays(X)}static weekdaysFormat(X="long",{locale:Q=null,numberingSystem:K=null,locObj:$=null}={}){return($||E.create(Q,K,null)).weekdays(X,!0)}static meridiems({locale:X=null}={}){return E.create(X).meridiems()}static eras(X="short",{locale:Q=null}={}){return E.create(Q,null,"gregory").eras(X)}static features(){return{relative:I7(),localeWeek:O7()}}}function f1(X,Q){let K=(q)=>q.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),$=K(Q)-K(X);return Math.floor(H.fromMillis($).as("days"))}function q8(X,Q,K){let $=[["years",(J,C)=>C.year-J.year],["quarters",(J,C)=>C.quarter-J.quarter+(C.year-J.year)*4],["months",(J,C)=>C.month-J.month+(C.year-J.year)*12],["weeks",(J,C)=>{let U=f1(J,C);return(U-U%7)/7}],["days",f1]],q={},G=X,B,V;for(let[J,C]of $)if(K.indexOf(J)>=0)if(B=J,q[J]=C(X,Q),V=G.plus(q),V>Q){if(q[J]--,X=G.plus(q),X>Q)V=X,q[J]--,X=G.plus(q)}else X=V;return[X,q,V,B]}function G8(X,Q,K,$){let[q,G,B,V]=q8(X,Q,K),J=Q-q,C=K.filter((_)=>["hours","minutes","seconds","milliseconds"].indexOf(_)>=0);if(C.length===0){if(B<Q)B=q.plus({[V]:1});if(B!==q)G[V]=(G[V]||0)+J/(B-q)}let U=H.fromObject(G,$);if(C.length>0)return H.fromMillis(J,$).shiftTo(...C).plus(U);else return U}var R1={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"},p1={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]},B8=R1.hanidec.replace(/[\[|\]]/g,"").split("");function V8(X){let Q=parseInt(X,10);if(isNaN(Q)){Q="";for(let K=0;K<X.length;K++){let $=X.charCodeAt(K);if(X[K].search(R1.hanidec)!==-1)Q+=B8.indexOf(X[K]);else for(let q in p1){let[G,B]=p1[q];if($>=G&&$<=B)Q+=$-G}}return parseInt(Q,10)}else return Q}function b({numberingSystem:X},Q=""){return new RegExp(`${R1[X||"latn"]}${Q}`)}var J8="missing Intl.DateTimeFormat.formatToParts support";function W(X,Q=(K)=>K){return{regex:X,deser:([K])=>Q(V8(K))}}var C8=String.fromCharCode(160),i7=`[ ${C8}]`,s7=new RegExp(i7,"g");function Y8(X){return X.replace(/\./g,"\\.?").replace(s7,i7)}function c1(X){return X.replace(/\./g,"").replace(s7," ").toLowerCase()}function h(X,Q){if(X===null)return null;else return{regex:RegExp(X.map(Y8).join("|")),deser:([K])=>X.findIndex(($)=>c1(K)===c1($))+Q}}function m1(X,Q){return{regex:X,deser:([,K,$])=>h0(K,$),groups:Q}}function w0(X){return{regex:X,deser:([Q])=>Q}}function U8(X){return X.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function P8(X,Q){let K=b(Q),$=b(Q,"{2}"),q=b(Q,"{3}"),G=b(Q,"{4}"),B=b(Q,"{6}"),V=b(Q,"{1,2}"),J=b(Q,"{1,3}"),C=b(Q,"{1,6}"),U=b(Q,"{1,9}"),_=b(Q,"{2,4}"),P=b(Q,"{4,6}"),A=(T)=>({regex:RegExp(U8(T.val)),deser:([f])=>f,literal:!0}),F=((T)=>{if(X.literal)return A(T);switch(T.val){case"G":return h(Q.eras("short"),0);case"GG":return h(Q.eras("long"),0);case"y":return W(C);case"yy":return W(_,$1);case"yyyy":return W(G);case"yyyyy":return W(P);case"yyyyyy":return W(B);case"M":return W(V);case"MM":return W($);case"MMM":return h(Q.months("short",!0),1);case"MMMM":return h(Q.months("long",!0),1);case"L":return W(V);case"LL":return W($);case"LLL":return h(Q.months("short",!1),1);case"LLLL":return h(Q.months("long",!1),1);case"d":return W(V);case"dd":return W($);case"o":return W(J);case"ooo":return W(q);case"HH":return W($);case"H":return W(V);case"hh":return W($);case"h":return W(V);case"mm":return W($);case"m":return W(V);case"q":return W(V);case"qq":return W($);case"s":return W(V);case"ss":return W($);case"S":return W(J);case"SSS":return W(q);case"u":return w0(U);case"uu":return w0(V);case"uuu":return W(K);case"a":return h(Q.meridiems(),0);case"kkkk":return W(G);case"kk":return W(_,$1);case"W":return W(V);case"WW":return W($);case"E":case"c":return W(K);case"EEE":return h(Q.weekdays("short",!1),1);case"EEEE":return h(Q.weekdays("long",!1),1);case"ccc":return h(Q.weekdays("short",!0),1);case"cccc":return h(Q.weekdays("long",!0),1);case"Z":case"ZZ":return m1(new RegExp(`([+-]${V.source})(?::(${$.source}))?`),2);case"ZZZ":return m1(new RegExp(`([+-]${V.source})(${$.source})?`),2);case"z":return w0(/[a-z_+-/]{1,256}?/i);case" ":return w0(/[^\S\n\r]/);default:return A(T)}})(X)||{invalidReason:J8};return F.token=X,F}var R8={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 N8(X,Q,K){let{type:$,value:q}=X;if($==="literal"){let J=/^\s+$/.test(q);return{literal:!J,val:J?" ":q}}let G=Q[$],B=$;if($==="hour")if(Q.hour12!=null)B=Q.hour12?"hour12":"hour24";else if(Q.hourCycle!=null)if(Q.hourCycle==="h11"||Q.hourCycle==="h12")B="hour12";else B="hour24";else B=K.hour12?"hour12":"hour24";let V=R8[B];if(typeof V==="object")V=V[G];if(V)return{literal:!1,val:V};return}function A8(X){return[`^${X.map((K)=>K.regex).reduce((K,$)=>`${K}(${$.source})`,"")}\$`,X]}function H8(X,Q,K){let $=X.match(Q);if($){let q={},G=1;for(let B in K)if(V0(K,B)){let V=K[B],J=V.groups?V.groups+1:1;if(!V.literal&&V.token)q[V.token.val[0]]=V.deser($.slice(G,G+J));G+=J}return[$,q]}else return[$,{}]}function _8(X){let Q=(G)=>{switch(G){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}},K=null,$;if(!R(X.z))K=p.create(X.z);if(!R(X.Z)){if(!K)K=new j(X.Z);$=X.Z}if(!R(X.q))X.M=(X.q-1)*3+1;if(!R(X.h)){if(X.h<12&&X.a===1)X.h+=12;else if(X.h===12&&X.a===0)X.h=0}if(X.G===0&&X.y)X.y=-X.y;if(!R(X.u))X.S=J1(X.u);return[Object.keys(X).reduce((G,B)=>{let V=Q(B);if(V)G[V]=X[B];return G},{}),K,$]}var s0=null;function W8(){if(!s0)s0=N.fromMillis(1555555555555);return s0}function E8(X,Q){if(X.literal)return X;let K=w.macroTokenToFormatOpts(X.val),$=a7(K,Q);if($==null||$.includes(void 0))return X;return $}function r7(X,Q){return Array.prototype.concat(...X.map((K)=>E8(K,Q)))}function n7(X,Q,K){let $=r7(w.parseFormat(K),X),q=$.map((B)=>P8(B,X)),G=q.find((B)=>B.invalidReason);if(G)return{input:Q,tokens:$,invalidReason:G.invalidReason};else{let[B,V]=A8(q),J=RegExp(B,"i"),[C,U]=H8(Q,J,V),[_,P,A]=U?_8(U):[null,null,void 0];if(V0(U,"a")&&V0(U,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:Q,tokens:$,regex:J,rawMatches:C,matches:U,result:_,zone:P,specificOffset:A}}}function M8(X,Q,K){let{result:$,zone:q,specificOffset:G,invalidReason:B}=n7(X,Q,K);return[$,q,G,B]}function a7(X,Q){if(!X)return null;let $=w.create(Q,X).dtFormatter(W8()),q=$.formatToParts(),G=$.resolvedOptions();return q.map((B)=>N8(B,X,G))}var r0="Invalid DateTime",u1=8640000000000000;function j0(X){return new y("unsupported zone",`the zone "${X.name}" is not supported`)}function n0(X){if(X.weekData===null)X.weekData=v0(X.c);return X.weekData}function a0(X){if(X.localWeekData===null)X.localWeekData=v0(X.c,X.loc.getMinDaysInFirstWeek(),X.loc.getStartOfWeek());return X.localWeekData}function n(X,Q){let K={ts:X.ts,zone:X.zone,c:X.c,o:X.o,loc:X.loc,invalid:X.invalid};return new N({...K,...Q,old:K})}function o7(X,Q,K){let $=X-Q*60*1000,q=K.offset($);if(Q===q)return[$,Q];$-=(q-Q)*60*1000;let G=K.offset($);if(q===G)return[$,q];return[X-Math.min(q,G)*60*1000,Math.max(q,G)]}function I0(X,Q){X+=Q*60*1000;let K=new Date(X);return{year:K.getUTCFullYear(),month:K.getUTCMonth()+1,day:K.getUTCDate(),hour:K.getUTCHours(),minute:K.getUTCMinutes(),second:K.getUTCSeconds(),millisecond:K.getUTCMilliseconds()}}function x0(X,Q,K){return o7(b0(X),Q,K)}function l1(X,Q){let K=X.o,$=X.c.year+Math.trunc(Q.years),q=X.c.month+Math.trunc(Q.months)+Math.trunc(Q.quarters)*3,G={...X.c,year:$,month:q,day:Math.min(X.c.day,y0($,q))+Math.trunc(Q.days)+Math.trunc(Q.weeks)*7},B=H.fromObject({years:Q.years-Math.trunc(Q.years),quarters:Q.quarters-Math.trunc(Q.quarters),months:Q.months-Math.trunc(Q.months),weeks:Q.weeks-Math.trunc(Q.weeks),days:Q.days-Math.trunc(Q.days),hours:Q.hours,minutes:Q.minutes,seconds:Q.seconds,milliseconds:Q.milliseconds}).as("milliseconds"),V=b0(G),[J,C]=o7(V,K,X.zone);if(B!==0)J+=B,C=X.zone.offset(J);return{ts:J,o:C}}function R0(X,Q,K,$,q,G){let{setZone:B,zone:V}=K;if(X&&Object.keys(X).length!==0||Q){let J=Q||V,C=N.fromObject(X,{...K,zone:J,specificOffset:G});return B?C:C.setZone(V)}else return N.invalid(new y("unparsable",`the input "${q}" can't be parsed as ${$}`))}function O0(X,Q,K=!0){return X.isValid?w.create(E.create("en-US"),{allowZ:K,forceSimple:!0}).formatDateTimeFromString(X,Q):null}function o0(X,Q){let K=X.c.year>9999||X.c.year<0,$="";if(K&&X.c.year>=0)$+="+";if($+=Z(X.c.year,K?6:4),Q)$+="-",$+=Z(X.c.month),$+="-",$+=Z(X.c.day);else $+=Z(X.c.month),$+=Z(X.c.day);return $}function d1(X,Q,K,$,q,G){let B=Z(X.c.hour);if(Q){if(B+=":",B+=Z(X.c.minute),X.c.millisecond!==0||X.c.second!==0||!K)B+=":"}else B+=Z(X.c.minute);if(X.c.millisecond!==0||X.c.second!==0||!K){if(B+=Z(X.c.second),X.c.millisecond!==0||!$)B+=".",B+=Z(X.c.millisecond,3)}if(q)if(X.isOffsetFixed&&X.offset===0&&!G)B+="Z";else if(X.o<0)B+="-",B+=Z(Math.trunc(-X.o/60)),B+=":",B+=Z(Math.trunc(-X.o%60));else B+="+",B+=Z(Math.trunc(X.o/60)),B+=":",B+=Z(Math.trunc(X.o%60));if(G)B+="["+X.zone.ianaName+"]";return B}var e7={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},L8={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Z8={ordinal:1,hour:0,minute:0,second:0,millisecond:0},t7=["year","month","day","hour","minute","second","millisecond"],F8=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],z8=["year","ordinal","hour","minute","second","millisecond"];function w8(X){let Q={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"}[X.toLowerCase()];if(!Q)throw new q1(X);return Q}function i1(X){switch(X.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return w8(X)}}function s1(X,Q){let K=d(Q.zone,L.defaultZone),$=E.fromObject(Q),q=L.now(),G,B;if(!R(X.year)){for(let C of t7)if(R(X[C]))X[C]=e7[C];let V=w7(X)||j7(X);if(V)return N.invalid(V);let J=K.offset(q);[G,B]=x0(X,J,K)}else G=q;return new N({ts:G,zone:K,loc:$,o:B})}function r1(X,Q,K){let $=R(K.round)?!0:K.round,q=(B,V)=>{return B=C1(B,$||K.calendary?0:2,!0),Q.loc.clone(K).relFormatter(K).format(B,V)},G=(B)=>{if(K.calendary)if(!Q.hasSame(X,B))return Q.startOf(B).diff(X.startOf(B),B).get(B);else return 0;else return Q.diff(X,B).get(B)};if(K.unit)return q(G(K.unit),K.unit);for(let B of K.units){let V=G(B);if(Math.abs(V)>=1)return q(V,B)}return q(X>Q?-0:0,K.units[K.units.length-1])}function n1(X){let Q={},K;if(X.length>0&&typeof X[X.length-1]==="object")Q=X[X.length-1],K=Array.from(X).slice(0,X.length-1);else K=Array.from(X);return[Q,K]}class N{constructor(X){let Q=X.zone||L.defaultZone,K=X.invalid||(Number.isNaN(X.ts)?new y("invalid input"):null)||(!Q.isValid?j0(Q):null);this.ts=R(X.ts)?L.now():X.ts;let $=null,q=null;if(!K)if(X.old&&X.old.ts===this.ts&&X.old.zone.equals(Q))[$,q]=[X.old.c,X.old.o];else{let B=Q.offset(this.ts);$=I0(this.ts,B),K=Number.isNaN($.year)?new y("invalid input"):null,$=K?null:$,q=K?null:B}this._zone=Q,this.loc=X.loc||E.create(),this.invalid=K,this.weekData=null,this.localWeekData=null,this.c=$,this.o=q,this.isLuxonDateTime=!0}static now(){return new N({})}static local(){let[X,Q]=n1(arguments),[K,$,q,G,B,V,J]=Q;return s1({year:K,month:$,day:q,hour:G,minute:B,second:V,millisecond:J},X)}static utc(){let[X,Q]=n1(arguments),[K,$,q,G,B,V,J]=Q;return X.zone=j.utcInstance,s1({year:K,month:$,day:q,hour:G,minute:B,second:V,millisecond:J},X)}static fromJSDate(X,Q={}){let K=X6(X)?X.valueOf():NaN;if(Number.isNaN(K))return N.invalid("invalid input");let $=d(Q.zone,L.defaultZone);if(!$.isValid)return N.invalid(j0($));return new N({ts:K,zone:$,loc:E.fromObject(Q)})}static fromMillis(X,Q={}){if(!e(X))throw new O(`fromMillis requires a numerical input, but received a ${typeof X} with value ${X}`);else if(X<-u1||X>u1)return N.invalid("Timestamp out of range");else return new N({ts:X,zone:d(Q.zone,L.defaultZone),loc:E.fromObject(Q)})}static fromSeconds(X,Q={}){if(!e(X))throw new O("fromSeconds requires a numerical input");else return new N({ts:X*1000,zone:d(Q.zone,L.defaultZone),loc:E.fromObject(Q)})}static fromObject(X,Q={}){X=X||{};let K=d(Q.zone,L.defaultZone);if(!K.isValid)return N.invalid(j0(K));let $=E.fromObject(Q),q=k0(X,i1),{minDaysInFirstWeek:G,startOfWeek:B}=v1(q,$),V=L.now(),J=!R(Q.specificOffset)?Q.specificOffset:K.offset(V),C=!R(q.ordinal),U=!R(q.year),_=!R(q.month)||!R(q.day),P=U||_,A=q.weekYear||q.weekNumber;if((P||C)&&A)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&C)throw new a("Can't mix ordinal dates with month/day");let D=A||q.weekday&&!P,F,T,f=I0(V,J);if(D)F=F8,T=L8,f=v0(f,G,B);else if(C)F=z8,T=Z8,f=i0(f);else F=t7,T=e7;let m0=!1;for(let P0 of F){let OX=q[P0];if(!R(OX))m0=!0;else if(m0)q[P0]=T[P0];else q[P0]=f[P0]}let zX=D?oX(q,G,B):C?eX(q):w7(q),W1=zX||j7(q);if(W1)return N.invalid(W1);let wX=D?x1(q,G,B):C?T1(q):q,[jX,IX]=x0(wX,J,K),u0=new N({ts:jX,zone:K,o:IX,loc:$});if(q.weekday&&P&&X.weekday!==u0.weekday)return N.invalid("mismatched weekday",`you can't specify both a weekday of ${q.weekday} and a date of ${u0.toISO()}`);return u0}static fromISO(X,Q={}){let[K,$]=u6(X);return R0(K,$,Q,"ISO 8601",X)}static fromRFC2822(X,Q={}){let[K,$]=l6(X);return R0(K,$,Q,"RFC 2822",X)}static fromHTTP(X,Q={}){let[K,$]=d6(X);return R0(K,$,Q,"HTTP",Q)}static fromFormat(X,Q,K={}){if(R(X)||R(Q))throw new O("fromFormat requires an input string and a format");let{locale:$=null,numberingSystem:q=null}=K,G=E.fromOpts({locale:$,numberingSystem:q,defaultToEN:!0}),[B,V,J,C]=M8(G,X,Q);if(C)return N.invalid(C);else return R0(B,V,K,`format ${Q}`,X,J)}static fromString(X,Q,K={}){return N.fromFormat(X,Q,K)}static fromSQL(X,Q={}){let[K,$]=e6(X);return R0(K,$,Q,"SQL",X)}static invalid(X,Q=null){if(!X)throw new O("need to specify a reason the DateTime is invalid");let K=X instanceof y?X:new y(X,Q);if(L.throwOnInvalid)throw new a1(K);else return new N({invalid:K})}static isDateTime(X){return X&&X.isLuxonDateTime||!1}static parseFormatForOpts(X,Q={}){let K=a7(X,E.fromObject(Q));return!K?null:K.map(($)=>$?$.val:null).join("")}static expandFormat(X,Q={}){return r7(w.parseFormat(X),E.fromObject(Q)).map(($)=>$.val).join("")}get(X){return this[X]}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?n0(this).weekYear:NaN}get weekNumber(){return this.isValid?n0(this).weekNumber:NaN}get weekday(){return this.isValid?n0(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?a0(this).weekday:NaN}get localWeekNumber(){return this.isValid?a0(this).weekNumber:NaN}get localWeekYear(){return this.isValid?a0(this).weekYear:NaN}get ordinal(){return this.isValid?i0(this.c).ordinal:NaN}get monthShort(){return this.isValid?q0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?q0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?q0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?q0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"short",locale:this.locale});else return null}get offsetNameLong(){if(this.isValid)return this.zone.offsetName(this.ts,{format:"long",locale:this.locale});else return null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){if(this.isOffsetFixed)return!1;else return 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 X=86400000,Q=60000,K=b0(this.c),$=this.zone.offset(K-X),q=this.zone.offset(K+X),G=this.zone.offset(K-$*Q),B=this.zone.offset(K-q*Q);if(G===B)return[this];let V=K-G*Q,J=K-B*Q,C=I0(V,G),U=I0(J,B);if(C.hour===U.hour&&C.minute===U.minute&&C.second===U.second&&C.millisecond===U.millisecond)return[n(this,{ts:V}),n(this,{ts:J})];return[this]}get isInLeapYear(){return E0(this.year)}get daysInMonth(){return y0(this.year,this.month)}get daysInYear(){return this.isValid?G0(this.year):NaN}get weeksInWeekYear(){return this.isValid?_0(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?_0(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(X={}){let{locale:Q,numberingSystem:K,calendar:$}=w.create(this.loc.clone(X),X).resolvedOptions(this);return{locale:Q,numberingSystem:K,outputCalendar:$}}toUTC(X=0,Q={}){return this.setZone(j.instance(X),Q)}toLocal(){return this.setZone(L.defaultZone)}setZone(X,{keepLocalTime:Q=!1,keepCalendarTime:K=!1}={}){if(X=d(X,L.defaultZone),X.equals(this.zone))return this;else if(!X.isValid)return N.invalid(j0(X));else{let $=this.ts;if(Q||K){let q=X.offset(this.ts),G=this.toObject();[$]=x0(G,q,X)}return n(this,{ts:$,zone:X})}}reconfigure({locale:X,numberingSystem:Q,outputCalendar:K}={}){let $=this.loc.clone({locale:X,numberingSystem:Q,outputCalendar:K});return n(this,{loc:$})}setLocale(X){return this.reconfigure({locale:X})}set(X){if(!this.isValid)return this;let Q=k0(X,i1),{minDaysInFirstWeek:K,startOfWeek:$}=v1(Q,this.loc),q=!R(Q.weekYear)||!R(Q.weekNumber)||!R(Q.weekday),G=!R(Q.ordinal),B=!R(Q.year),V=!R(Q.month)||!R(Q.day),J=B||V,C=Q.weekYear||Q.weekNumber;if((J||G)&&C)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&G)throw new a("Can't mix ordinal dates with month/day");let U;if(q)U=x1({...v0(this.c,K,$),...Q},K,$);else if(!R(Q.ordinal))U=T1({...i0(this.c),...Q});else if(U={...this.toObject(),...Q},R(Q.day))U.day=Math.min(y0(U.year,U.month),U.day);let[_,P]=x0(U,this.o,this.zone);return n(this,{ts:_,o:P})}plus(X){if(!this.isValid)return this;let Q=H.fromDurationLike(X);return n(this,l1(this,Q))}minus(X){if(!this.isValid)return this;let Q=H.fromDurationLike(X).negate();return n(this,l1(this,Q))}startOf(X,{useLocaleWeeks:Q=!1}={}){if(!this.isValid)return this;let K={},$=H.normalizeUnit(X);switch($){case"years":K.month=1;case"quarters":case"months":K.day=1;case"weeks":case"days":K.hour=0;case"hours":K.minute=0;case"minutes":K.second=0;case"seconds":K.millisecond=0;break}if($==="weeks")if(Q){let q=this.loc.getStartOfWeek(),{weekday:G}=this;if(G<q)K.weekNumber=this.weekNumber-1;K.weekday=q}else K.weekday=1;if($==="quarters"){let q=Math.ceil(this.month/3);K.month=(q-1)*3+1}return this.set(K)}endOf(X,Q){return this.isValid?this.plus({[X]:1}).startOf(X,Q).minus(1):this}toFormat(X,Q={}){return this.isValid?w.create(this.loc.redefaultToEN(Q)).formatDateTimeFromString(this,X):r0}toLocaleString(X=T0,Q={}){return this.isValid?w.create(this.loc.clone(Q),X).formatDateTime(this):r0}toLocaleParts(X={}){return this.isValid?w.create(this.loc.clone(X),X).formatDateTimeParts(this):[]}toISO({format:X="extended",suppressSeconds:Q=!1,suppressMilliseconds:K=!1,includeOffset:$=!0,extendedZone:q=!1}={}){if(!this.isValid)return null;let G=X==="extended",B=o0(this,G);return B+="T",B+=d1(this,G,Q,K,$,q),B}toISODate({format:X="extended"}={}){if(!this.isValid)return null;return o0(this,X==="extended")}toISOWeekDate(){return O0(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:X=!1,suppressSeconds:Q=!1,includeOffset:K=!0,includePrefix:$=!1,extendedZone:q=!1,format:G="extended"}={}){if(!this.isValid)return null;return($?"T":"")+d1(this,G==="extended",Q,X,K,q)}toRFC2822(){return O0(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return O0(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){if(!this.isValid)return null;return o0(this,!0)}toSQLTime({includeOffset:X=!0,includeZone:Q=!1,includeOffsetSpace:K=!0}={}){let $="HH:mm:ss.SSS";if(Q||X){if(K)$+=" ";if(Q)$+="z";else if(X)$+="ZZ"}return O0(this,$,!0)}toSQL(X={}){if(!this.isValid)return null;return`${this.toSQLDate()} ${this.toSQLTime(X)}`}toString(){return this.isValid?this.toISO():r0}[Symbol.for("nodejs.util.inspect.custom")](){if(this.isValid)return`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;else return`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1000:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1000):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(X={}){if(!this.isValid)return{};let Q={...this.c};if(X.includeConfig)Q.outputCalendar=this.outputCalendar,Q.numberingSystem=this.loc.numberingSystem,Q.locale=this.loc.locale;return Q}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(X,Q="milliseconds",K={}){if(!this.isValid||!X.isValid)return H.invalid("created by diffing an invalid DateTime");let $={locale:this.locale,numberingSystem:this.numberingSystem,...K},q=Q6(Q).map(H.normalizeUnit),G=X.valueOf()>this.valueOf(),B=G?this:X,V=G?X:this,J=G8(B,V,q,$);return G?J.negate():J}diffNow(X="milliseconds",Q={}){return this.diff(N.now(),X,Q)}until(X){return this.isValid?M.fromDateTimes(this,X):this}hasSame(X,Q,K){if(!this.isValid)return!1;let $=X.valueOf(),q=this.setZone(X.zone,{keepLocalTime:!0});return q.startOf(Q,K)<=$&&$<=q.endOf(Q,K)}equals(X){return this.isValid&&X.isValid&&this.valueOf()===X.valueOf()&&this.zone.equals(X.zone)&&this.loc.equals(X.loc)}toRelative(X={}){if(!this.isValid)return null;let Q=X.base||N.fromObject({},{zone:this.zone}),K=X.padding?this<Q?-X.padding:X.padding:0,$=["years","months","days","hours","minutes","seconds"],q=X.unit;if(Array.isArray(X.unit))$=X.unit,q=void 0;return r1(Q,this.plus(K),{...X,numeric:"always",units:$,unit:q})}toRelativeCalendar(X={}){if(!this.isValid)return null;return r1(X.base||N.fromObject({},{zone:this.zone}),this,{...X,numeric:"auto",units:["years","months","days"],calendary:!0})}static min(...X){if(!X.every(N.isDateTime))throw new O("min requires all arguments be DateTimes");return y1(X,(Q)=>Q.valueOf(),Math.min)}static max(...X){if(!X.every(N.isDateTime))throw new O("max requires all arguments be DateTimes");return y1(X,(Q)=>Q.valueOf(),Math.max)}static fromFormatExplain(X,Q,K={}){let{locale:$=null,numberingSystem:q=null}=K,G=E.fromOpts({locale:$,numberingSystem:q,defaultToEN:!0});return n7(G,X,Q)}static fromStringExplain(X,Q,K={}){return N.fromFormatExplain(X,Q,K)}static get DATE_SHORT(){return T0}static get DATE_MED(){return t1}static get DATE_MED_WITH_WEEKDAY(){return kX}static get DATE_FULL(){return X7}static get DATE_HUGE(){return Q7}static get TIME_SIMPLE(){return K7}static get TIME_WITH_SECONDS(){return $7}static get TIME_WITH_SHORT_OFFSET(){return q7}static get TIME_WITH_LONG_OFFSET(){return G7}static get TIME_24_SIMPLE(){return B7}static get TIME_24_WITH_SECONDS(){return V7}static get TIME_24_WITH_SHORT_OFFSET(){return J7}static get TIME_24_WITH_LONG_OFFSET(){return C7}static get DATETIME_SHORT(){return Y7}static get DATETIME_SHORT_WITH_SECONDS(){return U7}static get DATETIME_MED(){return P7}static get DATETIME_MED_WITH_SECONDS(){return R7}static get DATETIME_MED_WITH_WEEKDAY(){return SX}static get DATETIME_FULL(){return N7}static get DATETIME_FULL_WITH_SECONDS(){return A7}static get DATETIME_HUGE(){return H7}static get DATETIME_HUGE_WITH_SECONDS(){return _7}}function N0(X){if(N.isDateTime(X))return X;else if(X&&X.valueOf&&e(X.valueOf()))return N.fromJSDate(X);else if(X&&typeof X==="object")return N.fromObject(X);else throw new O(`Unknown datetime argument: ${X}, of type ${typeof X}`)}var j8="3.4.4";XX.DateTime=N;XX.Duration=H;XX.FixedOffsetZone=j;XX.IANAZone=p;XX.Info=q0;XX.Interval=M;XX.InvalidZone=G1;XX.Settings=L;XX.SystemZone=W0;XX.VERSION=j8;XX.Zone=t});var BX=s((KX)=>{Object.defineProperty(KX,"__esModule",{value:!0});KX.RE_RANGE=KX.RE_WILDCARDS=KX.PRESETS=KX.TIME_UNITS_LEN=KX.TIME_UNITS=KX.TIME_UNITS_MAP=KX.ALIASES=KX.PARSE_DEFAULTS=KX.MONTH_CONSTRAINTS=KX.CONSTRAINTS=void 0;KX.CONSTRAINTS=Object.freeze({second:[0,59],minute:[0,59],hour:[0,23],dayOfMonth:[1,31],month:[1,12],dayOfWeek:[0,7]});KX.MONTH_CONSTRAINTS=Object.freeze({1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31});KX.PARSE_DEFAULTS=Object.freeze({second:"0",minute:"*",hour:"*",dayOfMonth:"*",month:"*",dayOfWeek:"*"});KX.ALIASES=Object.freeze({jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6});KX.TIME_UNITS_MAP=Object.freeze({SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY_OF_MONTH:"dayOfMonth",MONTH:"month",DAY_OF_WEEK:"dayOfWeek"});KX.TIME_UNITS=Object.freeze(Object.values(KX.TIME_UNITS_MAP));KX.TIME_UNITS_LEN=KX.TIME_UNITS.length;KX.PRESETS=Object.freeze({"@yearly":"0 0 0 1 1 *","@monthly":"0 0 0 1 * *","@weekly":"0 0 0 * * 0","@daily":"0 0 0 * * *","@hourly":"0 0 * * * *","@minutely":"0 * * * * *","@secondly":"* * * * * *","@weekdays":"0 0 0 * * 1-5","@weekends":"0 0 0 * * 0,6"});KX.RE_WILDCARDS=/\*/g;KX.RE_RANGE=/^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g});var A1=s((JX)=>{Object.defineProperty(JX,"__esModule",{value:!0});JX.ExclusiveParametersError=JX.CronError=void 0;class N1 extends Error{}JX.CronError=N1;class VX extends N1{constructor(X,Q){super(`You can't specify both ${X} and ${Q}`)}}JX.ExclusiveParametersError=VX});var PX=s((YX)=>{Object.defineProperty(YX,"__esModule",{value:!0});YX.getRecordKeys=void 0;var i8=(X)=>{return Object.keys(X)};YX.getRecordKeys=i8});var f0=s((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.CronTime=void 0;var c=QX(),z=BX(),I=A1(),RX=PX();class NX{constructor(X,Q,K){if(this.realDate=!1,this.second={},this.minute={},this.hour={},this.dayOfMonth={},this.month={},this.dayOfWeek={},Q!=null&&K!=null)throw new I.ExclusiveParametersError("timeZone","utcOffset");if(Q){if(!c.DateTime.fromObject({},{zone:Q}).isValid)throw new I.CronError("Invalid timezone.");this.timeZone=Q}if(K!=null)this.utcOffset=K;if(X instanceof Date||X instanceof c.DateTime)this.source=X instanceof Date?c.DateTime.fromJSDate(X):X,this.realDate=!0;else this.source=X,this._parse(this.source),this._verifyParse()}_getWeekDay(X){return X.weekday===7?0:X.weekday}_verifyParse(){let X=RX.getRecordKeys(this.month),Q=RX.getRecordKeys(this.dayOfMonth),K=!1,$=null;for(let q of X){let G=z.MONTH_CONSTRAINTS[q];for(let B of Q)if(B<=G)K=!0;if(!K)$=q,console.warn(`Month '${q}' is limited to '${G}' days.`)}if(!K&&$!==null){let q=z.MONTH_CONSTRAINTS[$];for(let G of Q)if(G>q){delete this.dayOfMonth[G];let B=G%q;this.dayOfMonth[B]=!0}}}sendAt(X){let Q=this.realDate&&this.source instanceof c.DateTime?this.source:c.DateTime.local();if(this.timeZone)Q=Q.setZone(this.timeZone);if(this.utcOffset!==void 0){let K=this.utcOffset<0?"-":"+",$=Math.trunc(this.utcOffset/60),q=String(Math.abs($)).padStart(2,"0"),G=Math.abs(this.utcOffset-$*60),B=String(G).padStart(2,"0"),V=`UTC${K}${q}:${B}`;if(Q=Q.setZone(V),!Q.isValid)throw new I.CronError("ERROR: You specified an invalid UTC offset.")}if(this.realDate){if(c.DateTime.local()>Q)throw new I.CronError("WARNING: Date in past. Will never be fired.");return Q}if(X===void 0||isNaN(X)||X<0)return this.getNextDateFrom(Q);else{let K=[];for(;X>0;X--)Q=this.getNextDateFrom(Q),K.push(Q);return K}}getTimeout(){return Math.max(-1,this.sendAt().toMillis()-c.DateTime.local().toMillis())}toString(){return this.toJSON().join(" ")}toJSON(){return z.TIME_UNITS.map((X)=>{return this._wcOrAll(X)})}getNextDateFrom(X,Q){var K;if(X instanceof Date)X=c.DateTime.fromJSDate(X);let $=X,q=X.toMillis();if(Q)$=$.setZone(Q);if(!this.realDate){if($.millisecond>0)$=$.set({millisecond:0,second:$.second+1})}if(!$.isValid)throw new I.CronError("ERROR: You specified an invalid date.");let G=c.DateTime.now().plus({years:8});while(!0){let B=$.toMillis()-X.toMillis();if($>G)throw new I.CronError(`Something went wrong. No execution date was found in the next 8 years.
|
|
3
3
|
Please provide the following string if you would like to help debug:
|
|
4
|
-
Time Zone: ${(K=Q===null||Q===void 0?void 0:Q.toString())!==null&&K!==void 0?K:'""'} - Cron String: ${this.source.toString()} - UTC offset: ${$.offset} - current Date: ${c.DateTime.local().toString()}`);if(!($.month in this.month)&&Object.keys(this.month).length!==12){if($=$.plus({months:1}),$=$.set({day:1,hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){const[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!($.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31&&!((this._getWeekDay($)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7)){if($=$.plus({days:1}),$=$.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){const[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!(this._getWeekDay($)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7&&!(($.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31)){if($=$.plus({days:1}),$=$.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){const[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!($.hour in this.hour)&&Object.keys(this.hour).length!==24){const V=$.hour===23&&B>86400000?0:$.hour+1,J=$.minute;if($=$.set({hour:V}),$=$.set({minute:0,second:0}),this._forwardDSTJump(V,J,$)){const[C,U]=this._findPreviousDSTJump($);if($=U,C)break}continue}if(!($.minute in this.minute)&&Object.keys(this.minute).length!==60){const V=$.minute===59&&B>3600000?0:$.minute+1,J=$.hour+(V===60?1:0);if($=$.set({minute:V}),$=$.set({second:0}),this._forwardDSTJump(J,V,$)){const[C,U]=this._findPreviousDSTJump($);if($=U,C)break}continue}if(!($.second in this.second)&&Object.keys(this.second).length!==60){const V=$.second===59&&B>60000?0:$.second+1,J=$.minute+(V===60?1:0),C=$.hour+(J===60?1:0);if($=$.set({second:V}),this._forwardDSTJump(C,J,$)){const[U,_]=this._findPreviousDSTJump($);if($=_,U)break}continue}if($.toMillis()===q){const V=$.second+1,J=$.minute+(V===60?1:0),C=$.hour+(J===60?1:0);if($=$.set({second:V}),this._forwardDSTJump(C,J,$)){const[U,_]=this._findPreviousDSTJump($);if($=_,U)break}continue}break}return $}_findPreviousDSTJump(X){var Q;let K,$,q,G,B=X;const V=1440;let J=0;do{if(++J>V)throw new I.CronError(`ERROR: This DST checking related function assumes the input DateTime (${(Q=X.toISO())!==null&&Q!==void 0?Q:X.toMillis()}) is within 24 hours of a DST jump.`);if(K=B.minute-1,$=B.hour,K<0)K+=60,$=($+24-1)%24;B=B.minus({minute:1}),q=B.minute,G=B.hour}while(K===q&&$===G);const C=B.plus({minute:1}).set({second:0,millisecond:0}),U=C.minus({second:1});if(X.month+1 in this.month&&X.day in this.dayOfMonth&&this._getWeekDay(X)in this.dayOfWeek)return[this._checkTimeInSkippedRange(U,C),C];return[!1,C]}_checkTimeInSkippedRange(X,Q){const K=(X.minute+1)%60,$=(X.hour+(K===0?1:0))%24,q=Q.hour-$+1,G=K===0&&Q.minute===0;if(q===2&&G)return $ in this.hour;else if(q===1)return $ in this.hour&&this._checkTimeInSkippedRangeSingleHour(K,Q.minute);else return this._checkTimeInSkippedRangeMultiHour($,K,Q.hour,Q.minute)}_checkTimeInSkippedRangeSingleHour(X,Q){for(let K=X;K<Q;++K)if(K in this.minute)return!0;return Q in this.minute&&0 in this.second}_checkTimeInSkippedRangeMultiHour(X,Q,K,$){if(X>=K)throw new I.CronError(`ERROR: This DST checking related function assumes the forward jump starting hour (${X}) is less than the end hour (${K})`);const q=Array.from({length:60-Q},(J,C)=>Q+C),G=Array.from({length:$},(J,C)=>C),B=Array.from({length:60},(J,C)=>C),V=(J)=>{if(J===X)return q;else if(J===K)return G;else return B};for(let J=X;J<=K;++J){if(!(J in this.hour))continue;const C=V(J);for(let U of C)if(U in this.minute)return!0}return K in this.hour&&$ in this.minute&&0 in this.second}_forwardDSTJump(X,Q,K){const{hour:$,minute:q}=K,G=X%24<$,B=Q%60<q;return G||B}_wcOrAll(X){if(this._hasAll(X))return"*";const Q=[];for(let K in this[X])Q.push(K);return Q.join(",")}_hasAll(X){const Q=z.CONSTRAINTS[X],K=Q[0],$=X===z.TIME_UNITS_MAP.DAY_OF_WEEK?Q[1]-1:Q[1];for(let q=K,G=$;q<G;q++)if(!(q in this[X]))return!1;return!0}_parse(X){var Q;if(X=X.toLowerCase(),Object.keys(z.PRESETS).includes(X))X=z.PRESETS[X];X=X.replace(/[a-z]{1,3}/gi,(q)=>{if(Object.keys(z.ALIASES).includes(q))return z.ALIASES[q].toString();throw new I.CronError(`Unknown alias: ${q}`)});const K=X.trim().split(/\s+/);if(K.length<z.TIME_UNITS_LEN-1)throw new I.CronError("Too few fields");if(K.length>z.TIME_UNITS_LEN)throw new I.CronError("Too many fields");const $=K.length;for(let q of z.TIME_UNITS){const G=z.TIME_UNITS.indexOf(q),B=(Q=K[G-(z.TIME_UNITS_LEN-$)])!==null&&Q!==void 0?Q:z.PARSE_DEFAULTS[q];this._parseField(B,q)}}_parseField(X,Q){const K=this[Q];let $;const q=z.CONSTRAINTS[Q],G=q[0],B=q[1];X.split(",").forEach((C)=>{const U=C.indexOf("*");if(U!==-1&&U!==0)throw new I.CronError(`Field (${C}) has an invalid wildcard expression`)}),X=X.replace(z.RE_WILDCARDS,`${G}-${B}`);const J=X.split(",");for(let C of J){const U=[...C.matchAll(z.RE_RANGE)][0];if((U===null||U===void 0?void 0:U[1])!==void 0){const[,_,P,A]=U;let D=parseInt(_,10),F=P!==void 0?parseInt(P,10):void 0;const T=A!==void 0,f=parseInt(A!==null&&A!==void 0?A:"1",10);if(f===0)throw new I.CronError(`Field (${Q}) has a step of zero`);if(F!==void 0&&D>F)throw new I.CronError(`Field (${Q}) has an invalid range`);if(D<G||F!==void 0&&F>B||F===void 0&&D>B)throw new I.CronError(`Field value (${X}) is out of range`);if(D=Math.min(Math.max(G,~~Math.abs(D)),B),F!==void 0)F=Math.min(B,~~Math.abs(F));else F=T?B:D;$=D;do K[$]=!0,$+=f;while($<=F);if(Q==="dayOfWeek"){if(!K[0]&&!!K[7])K[0]=K[7];delete K[7]}}else throw new I.CronError(`Field (${Q}) cannot be parsed`)}}}AX.CronTime=NX});var MX=s((WX)=>{Object.defineProperty(WX,"__esModule",{value:!0});WX.CronJob=void 0;var _X=import.meta.require("child_process"),H1=A1(),p0=f0();class Z0{constructor(X,Q,K,$,q,G,B,V,J){if(this.running=!1,this.unrefTimeout=!1,this.lastExecution=null,this.runOnce=!1,this._callbacks=[],this.context=G!==null&&G!==void 0?G:this,q!=null&&V!=null)throw new H1.ExclusiveParametersError("timeZone","utcOffset");if(q!=null)this.cronTime=new p0.CronTime(X,q,null);else if(V!=null)this.cronTime=new p0.CronTime(X,null,V);else this.cronTime=new p0.CronTime(X,q,V);if(J!=null)this.unrefTimeout=J;if(K!=null)this.onComplete=this._fnWrap(K);if(this.cronTime.realDate)this.runOnce=!0;if(this.addCallback(this._fnWrap(Q)),B)this.lastExecution=new Date,this.fireOnTick();if($)this.start()}static from(X){if(X.timeZone!=null&&X.utcOffset!=null)throw new H1.ExclusiveParametersError("timeZone","utcOffset");if(X.timeZone!=null)return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,X.timeZone,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout);else if(X.utcOffset!=null)return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,null,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout);else return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,X.timeZone,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout)}_fnWrap(X){var Q,K;switch(typeof X){case"function":return X;case"string":{const[$,...q]=X.split(" ");return _X.spawn.bind(void 0,$!==null&&$!==void 0?$:X,q,{})}case"object":return _X.spawn.bind(void 0,X.command,(Q=X.args)!==null&&Q!==void 0?Q:[],(K=X.options)!==null&&K!==void 0?K:{})}}addCallback(X){if(typeof X==="function")this._callbacks.push(X)}setTime(X){if(!(X instanceof p0.CronTime))throw new H1.CronError("time must be an instance of CronTime.");const Q=this.running;if(this.stop(),this.cronTime=X,X.realDate)this.runOnce=!0;if(Q)this.start()}nextDate(){return this.cronTime.sendAt()}fireOnTick(){for(let X of this._callbacks)X.call(this.context,this.onComplete)}nextDates(X){return this.cronTime.sendAt(X!==null&&X!==void 0?X:0)}start(){if(this.running)return;const X=2147483647;let Q=this.cronTime.getTimeout(),K=0,$;const q=(B)=>{if($=Date.now(),this._timeout=setTimeout(G,B),this.unrefTimeout&&typeof this._timeout.unref==="function")this._timeout.unref()},G=()=>{const B=$+Q-Date.now();if(B>0){let V=this.cronTime.getTimeout();if(V>B)V=B;K+=V}if(K){if(K>X)K-=X,Q=X;else Q=K,K=0;q(Q)}else{if(this.lastExecution=new Date,this.running=!1,!this.runOnce)this.start();this.fireOnTick()}};if(Q>=0){if(this.running=!0,Q>X)K=Q-X,Q=X;q(Q)}else this.stop()}lastDate(){return this.lastExecution}stop(){if(this._timeout)clearTimeout(this._timeout);if(this.running=!1,typeof this.onComplete==="function")this.onComplete.call(this.context)}}WX.CronJob=Z0});var FX=s((c0)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.timeout=c0.sendAt=c0.CronTime=c0.CronJob=void 0;var LX=f0(),s8=MX();Object.defineProperty(c0,"CronJob",{enumerable:!0,get:function(){return s8.CronJob}});var r8=f0();Object.defineProperty(c0,"CronTime",{enumerable:!0,get:function(){return r8.CronTime}});var n8=(X)=>new LX.CronTime(X).sendAt();c0.sendAt=n8;var a8=(X)=>new LX.CronTime(X).getTimeout();c0.timeout=a8});var X0=yX(FX(),1);import{log as Q0,runCommand as e8}from"@stacksjs/cli";function R4(X){return new X0.CronTime(X).sendAt()}function N4(X){return new X0.CronTime(X).getTimeout()}class _1{cronPattern="";timezone="America/Los_Angeles";task;constructor(X){this.task=X}everySecond(){return this.cronPattern="* * * * * *",this}everyMinute(){return this.cronPattern="0 * * * * *",this}everyTwoMinutes(){return this.cronPattern="*/2 * * * * *",this}everyFiveMinutes(){return this.cronPattern="*/5 * * * *",this}everyTenMinutes(){return this.cronPattern="*/10 * * * *",this}everyThirtyMinutes(){return this.cronPattern="*/30 * * * *",this}everyHour(){return this.cronPattern="0 0 * * * *",this}everyDay(){return this.cronPattern="0 0 0 * * *",this}hourly(){return this.cronPattern="0 0 * * * *",this}daily(){return this.cronPattern="0 0 0 * * *",this}weekly(){return this.cronPattern="0 0 0 * * 0",this}monthly(){return this.cronPattern="0 0 0 1 * *",this}yearly(){return this.cronPattern="0 0 0 1 1 *",this}onDays(X){const Q=X.join(",");return this.cronPattern=`0 0 0 * * ${Q}`,this}at(X){const[Q,K]=X.split(":").map(Number);return this.cronPattern=`${K} ${Q} * * *`,this}setTimeZone(X){return this.timezone=X,this}start(){new X0.CronJob(this.cronPattern,this.task,null,!0,this.timezone),Q0.info(`Scheduled task with pattern: ${this.cronPattern} in timezone: ${this.timezone}`)}job(X){return Q0.info(`Scheduling job: ${X}`),this}action(X){return Q0.info(`Scheduling action: ${X}`),this}static command(X){return Q0.info(`Executing command: ${X}`),new _1(async()=>{Q0.info(`Executing command: ${X}`);const Q=await e8(X);if(Q.isErr()){Q0.error(Q.error);return}Q0.info(Q.value)})}}class t8 extends _1{}var export_CronTime=X0.CronTime;var export_CronJob=X0.CronJob;export{N4 as timeout,R4 as sendAt,_1 as Schedule,t8 as Job,export_CronTime as CronTime,export_CronJob as CronJob};
|
|
5
|
-
|
|
6
|
-
//# debugId=8DFB5519B839950464756E2164756E21
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
4
|
+
Time Zone: ${(K=Q===null||Q===void 0?void 0:Q.toString())!==null&&K!==void 0?K:'""'} - Cron String: ${this.source.toString()} - UTC offset: ${$.offset} - current Date: ${c.DateTime.local().toString()}`);if(!($.month in this.month)&&Object.keys(this.month).length!==12){if($=$.plus({months:1}),$=$.set({day:1,hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){let[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!($.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31&&!((this._getWeekDay($)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7)){if($=$.plus({days:1}),$=$.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){let[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!(this._getWeekDay($)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7&&!(($.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31)){if($=$.plus({days:1}),$=$.set({hour:0,minute:0,second:0}),this._forwardDSTJump(0,0,$)){let[V,J]=this._findPreviousDSTJump($);if($=J,V)break}continue}if(!($.hour in this.hour)&&Object.keys(this.hour).length!==24){let V=$.hour===23&&B>86400000?0:$.hour+1,J=$.minute;if($=$.set({hour:V}),$=$.set({minute:0,second:0}),this._forwardDSTJump(V,J,$)){let[C,U]=this._findPreviousDSTJump($);if($=U,C)break}continue}if(!($.minute in this.minute)&&Object.keys(this.minute).length!==60){let V=$.minute===59&&B>3600000?0:$.minute+1,J=$.hour+(V===60?1:0);if($=$.set({minute:V}),$=$.set({second:0}),this._forwardDSTJump(J,V,$)){let[C,U]=this._findPreviousDSTJump($);if($=U,C)break}continue}if(!($.second in this.second)&&Object.keys(this.second).length!==60){let V=$.second===59&&B>60000?0:$.second+1,J=$.minute+(V===60?1:0),C=$.hour+(J===60?1:0);if($=$.set({second:V}),this._forwardDSTJump(C,J,$)){let[U,_]=this._findPreviousDSTJump($);if($=_,U)break}continue}if($.toMillis()===q){let V=$.second+1,J=$.minute+(V===60?1:0),C=$.hour+(J===60?1:0);if($=$.set({second:V}),this._forwardDSTJump(C,J,$)){let[U,_]=this._findPreviousDSTJump($);if($=_,U)break}continue}break}return $}_findPreviousDSTJump(X){var Q;let K,$,q,G,B=X,V=1440,J=0;do{if(++J>V)throw new I.CronError(`ERROR: This DST checking related function assumes the input DateTime (${(Q=X.toISO())!==null&&Q!==void 0?Q:X.toMillis()}) is within 24 hours of a DST jump.`);if(K=B.minute-1,$=B.hour,K<0)K+=60,$=($+24-1)%24;B=B.minus({minute:1}),q=B.minute,G=B.hour}while(K===q&&$===G);let C=B.plus({minute:1}).set({second:0,millisecond:0}),U=C.minus({second:1});if(X.month+1 in this.month&&X.day in this.dayOfMonth&&this._getWeekDay(X)in this.dayOfWeek)return[this._checkTimeInSkippedRange(U,C),C];return[!1,C]}_checkTimeInSkippedRange(X,Q){let K=(X.minute+1)%60,$=(X.hour+(K===0?1:0))%24,q=Q.hour-$+1,G=K===0&&Q.minute===0;if(q===2&&G)return $ in this.hour;else if(q===1)return $ in this.hour&&this._checkTimeInSkippedRangeSingleHour(K,Q.minute);else return this._checkTimeInSkippedRangeMultiHour($,K,Q.hour,Q.minute)}_checkTimeInSkippedRangeSingleHour(X,Q){for(let K=X;K<Q;++K)if(K in this.minute)return!0;return Q in this.minute&&0 in this.second}_checkTimeInSkippedRangeMultiHour(X,Q,K,$){if(X>=K)throw new I.CronError(`ERROR: This DST checking related function assumes the forward jump starting hour (${X}) is less than the end hour (${K})`);let q=Array.from({length:60-Q},(J,C)=>Q+C),G=Array.from({length:$},(J,C)=>C),B=Array.from({length:60},(J,C)=>C),V=(J)=>{if(J===X)return q;else if(J===K)return G;else return B};for(let J=X;J<=K;++J){if(!(J in this.hour))continue;let C=V(J);for(let U of C)if(U in this.minute)return!0}return K in this.hour&&$ in this.minute&&0 in this.second}_forwardDSTJump(X,Q,K){let{hour:$,minute:q}=K,G=X%24<$,B=Q%60<q;return G||B}_wcOrAll(X){if(this._hasAll(X))return"*";let Q=[];for(let K in this[X])Q.push(K);return Q.join(",")}_hasAll(X){let Q=z.CONSTRAINTS[X],K=Q[0],$=X===z.TIME_UNITS_MAP.DAY_OF_WEEK?Q[1]-1:Q[1];for(let q=K,G=$;q<G;q++)if(!(q in this[X]))return!1;return!0}_parse(X){var Q;if(X=X.toLowerCase(),Object.keys(z.PRESETS).includes(X))X=z.PRESETS[X];X=X.replace(/[a-z]{1,3}/gi,(q)=>{if(Object.keys(z.ALIASES).includes(q))return z.ALIASES[q].toString();throw new I.CronError(`Unknown alias: ${q}`)});let K=X.trim().split(/\s+/);if(K.length<z.TIME_UNITS_LEN-1)throw new I.CronError("Too few fields");if(K.length>z.TIME_UNITS_LEN)throw new I.CronError("Too many fields");let $=K.length;for(let q of z.TIME_UNITS){let G=z.TIME_UNITS.indexOf(q),B=(Q=K[G-(z.TIME_UNITS_LEN-$)])!==null&&Q!==void 0?Q:z.PARSE_DEFAULTS[q];this._parseField(B,q)}}_parseField(X,Q){let K=this[Q],$,q=z.CONSTRAINTS[Q],G=q[0],B=q[1];X.split(",").forEach((C)=>{let U=C.indexOf("*");if(U!==-1&&U!==0)throw new I.CronError(`Field (${C}) has an invalid wildcard expression`)}),X=X.replace(z.RE_WILDCARDS,`${G}-${B}`);let J=X.split(",");for(let C of J){let U=[...C.matchAll(z.RE_RANGE)][0];if((U===null||U===void 0?void 0:U[1])!==void 0){let[,_,P,A]=U,D=parseInt(_,10),F=P!==void 0?parseInt(P,10):void 0,T=A!==void 0,f=parseInt(A!==null&&A!==void 0?A:"1",10);if(f===0)throw new I.CronError(`Field (${Q}) has a step of zero`);if(F!==void 0&&D>F)throw new I.CronError(`Field (${Q}) has an invalid range`);if(D<G||F!==void 0&&F>B||F===void 0&&D>B)throw new I.CronError(`Field value (${X}) is out of range`);if(D=Math.min(Math.max(G,~~Math.abs(D)),B),F!==void 0)F=Math.min(B,~~Math.abs(F));else F=T?B:D;$=D;do K[$]=!0,$+=f;while($<=F);if(Q==="dayOfWeek"){if(!K[0]&&!!K[7])K[0]=K[7];delete K[7]}}else throw new I.CronError(`Field (${Q}) cannot be parsed`)}}}AX.CronTime=NX});var MX=s((WX)=>{Object.defineProperty(WX,"__esModule",{value:!0});WX.CronJob=void 0;var _X=import.meta.require("child_process"),H1=A1(),p0=f0();class Z0{constructor(X,Q,K,$,q,G,B,V,J){if(this.running=!1,this.unrefTimeout=!1,this.lastExecution=null,this.runOnce=!1,this._callbacks=[],this.context=G!==null&&G!==void 0?G:this,q!=null&&V!=null)throw new H1.ExclusiveParametersError("timeZone","utcOffset");if(q!=null)this.cronTime=new p0.CronTime(X,q,null);else if(V!=null)this.cronTime=new p0.CronTime(X,null,V);else this.cronTime=new p0.CronTime(X,q,V);if(J!=null)this.unrefTimeout=J;if(K!=null)this.onComplete=this._fnWrap(K);if(this.cronTime.realDate)this.runOnce=!0;if(this.addCallback(this._fnWrap(Q)),B)this.lastExecution=new Date,this.fireOnTick();if($)this.start()}static from(X){if(X.timeZone!=null&&X.utcOffset!=null)throw new H1.ExclusiveParametersError("timeZone","utcOffset");if(X.timeZone!=null)return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,X.timeZone,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout);else if(X.utcOffset!=null)return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,null,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout);else return new Z0(X.cronTime,X.onTick,X.onComplete,X.start,X.timeZone,X.context,X.runOnInit,X.utcOffset,X.unrefTimeout)}_fnWrap(X){var Q,K;switch(typeof X){case"function":return X;case"string":{let[$,...q]=X.split(" ");return _X.spawn.bind(void 0,$!==null&&$!==void 0?$:X,q,{})}case"object":return _X.spawn.bind(void 0,X.command,(Q=X.args)!==null&&Q!==void 0?Q:[],(K=X.options)!==null&&K!==void 0?K:{})}}addCallback(X){if(typeof X==="function")this._callbacks.push(X)}setTime(X){if(!(X instanceof p0.CronTime))throw new H1.CronError("time must be an instance of CronTime.");let Q=this.running;if(this.stop(),this.cronTime=X,X.realDate)this.runOnce=!0;if(Q)this.start()}nextDate(){return this.cronTime.sendAt()}fireOnTick(){for(let X of this._callbacks)X.call(this.context,this.onComplete)}nextDates(X){return this.cronTime.sendAt(X!==null&&X!==void 0?X:0)}start(){if(this.running)return;let X=2147483647,Q=this.cronTime.getTimeout(),K=0,$,q=(B)=>{if($=Date.now(),this._timeout=setTimeout(G,B),this.unrefTimeout&&typeof this._timeout.unref==="function")this._timeout.unref()},G=()=>{let B=$+Q-Date.now();if(B>0){let V=this.cronTime.getTimeout();if(V>B)V=B;K+=V}if(K){if(K>X)K-=X,Q=X;else Q=K,K=0;q(Q)}else{if(this.lastExecution=new Date,this.running=!1,!this.runOnce)this.start();this.fireOnTick()}};if(Q>=0){if(this.running=!0,Q>X)K=Q-X,Q=X;q(Q)}else this.stop()}lastDate(){return this.lastExecution}stop(){if(this._timeout)clearTimeout(this._timeout);if(this.running=!1,typeof this.onComplete==="function")this.onComplete.call(this.context)}}WX.CronJob=Z0});var FX=s((c0)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.timeout=c0.sendAt=c0.CronTime=c0.CronJob=void 0;var LX=f0(),s8=MX();Object.defineProperty(c0,"CronJob",{enumerable:!0,get:function(){return s8.CronJob}});var r8=f0();Object.defineProperty(c0,"CronTime",{enumerable:!0,get:function(){return r8.CronTime}});var n8=(X)=>new LX.CronTime(X).sendAt();c0.sendAt=n8;var a8=(X)=>new LX.CronTime(X).getTimeout();c0.timeout=a8});var X0=yX(FX(),1);import{log as Q0,runCommand as e8}from"@stacksjs/cli";class _1{cronPattern="";timezone="America/Los_Angeles";task;constructor(X){this.task=X}everySecond(){return this.cronPattern="* * * * * *",this}everyMinute(){return this.cronPattern="0 * * * * *",this}everyTwoMinutes(){return this.cronPattern="*/2 * * * * *",this}everyFiveMinutes(){return this.cronPattern="*/5 * * * *",this}everyTenMinutes(){return this.cronPattern="*/10 * * * *",this}everyThirtyMinutes(){return this.cronPattern="*/30 * * * *",this}everyHour(){return this.cronPattern="0 0 * * * *",this}everyDay(){return this.cronPattern="0 0 0 * * *",this}hourly(){return this.cronPattern="0 0 * * * *",this}daily(){return this.cronPattern="0 0 0 * * *",this}weekly(){return this.cronPattern="0 0 0 * * 0",this}monthly(){return this.cronPattern="0 0 0 1 * *",this}yearly(){return this.cronPattern="0 0 0 1 1 *",this}onDays(X){let Q=X.join(",");return this.cronPattern=`0 0 0 * * ${Q}`,this}at(X){let[Q,K]=X.split(":").map(Number);return this.cronPattern=`${K} ${Q} * * *`,this}setTimeZone(X){return this.timezone=X,this}start(){new X0.CronJob(this.cronPattern,this.task,null,!0,this.timezone),Q0.info(`Scheduled task with pattern: ${this.cronPattern} in timezone: ${this.timezone}`)}job(X){return Q0.info(`Scheduling job: ${X}`),this}action(X){return Q0.info(`Scheduling action: ${X}`),this}static command(X){return Q0.info(`Executing command: ${X}`),new _1(async()=>{Q0.info(`Executing command: ${X}`);let Q=await e8(X);if(Q.isErr()){Q0.error(Q.error);return}Q0.info(Q.value)})}}class t8 extends _1{}function R4(X){return new X0.CronTime(X).sendAt()}function N4(X){return new X0.CronTime(X).getTimeout()}var export_CronTime=X0.CronTime;var export_CronJob=X0.CronJob;export{N4 as timeout,R4 as sendAt,_1 as Schedule,t8 as Job,export_CronTime as CronTime,export_CronJob as CronJob};
|