@tachybase/module-auth 0.23.8
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/.turbo/turbo-build.log +14 -0
- package/README.md +117 -0
- package/client.d.ts +2 -0
- package/client.js +65 -0
- package/dist/client/AuthProvider.d.ts +2 -0
- package/dist/client/authenticator.d.ts +12 -0
- package/dist/client/basic/Options.d.ts +2 -0
- package/dist/client/basic/SignInForm.d.ts +9 -0
- package/dist/client/basic/SignUpForm.d.ts +13 -0
- package/dist/client/basic/index.d.ts +3 -0
- package/dist/client/bind/AuthenticatorBind.d.ts +2 -0
- package/dist/client/bind/BindForm.d.ts +5 -0
- package/dist/client/bind/schemas/authenticators.d.ts +2 -0
- package/dist/client/index.d.ts +30 -0
- package/dist/client/index.js +22 -0
- package/dist/client/locale/index.d.ts +2 -0
- package/dist/client/pages/AuthLayout.d.ts +2 -0
- package/dist/client/pages/SignInPage.d.ts +13 -0
- package/dist/client/pages/SignUpPage.d.ts +20 -0
- package/dist/client/pages/index.d.ts +3 -0
- package/dist/client/settings/Authenticator.d.ts +2 -0
- package/dist/client/settings/Options.d.ts +4 -0
- package/dist/client/settings/authType.d.ts +15 -0
- package/dist/client/settings/schemas/authenticators.d.ts +3 -0
- package/dist/externalVersion.js +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +40 -0
- package/dist/locale/en-US.json +31 -0
- package/dist/locale/ko_KR.json +26 -0
- package/dist/locale/zh-CN.json +31 -0
- package/dist/node_modules/cron/LICENSE +8 -0
- package/dist/node_modules/cron/dist/constants.d.ts +74 -0
- package/dist/node_modules/cron/dist/constants.js +78 -0
- package/dist/node_modules/cron/dist/errors.d.ts +5 -0
- package/dist/node_modules/cron/dist/errors.js +13 -0
- package/dist/node_modules/cron/dist/index.d.ts +6 -0
- package/dist/node_modules/cron/dist/index.js +1 -0
- package/dist/node_modules/cron/dist/job.d.ts +30 -0
- package/dist/node_modules/cron/dist/job.js +222 -0
- package/dist/node_modules/cron/dist/time.d.ts +33 -0
- package/dist/node_modules/cron/dist/time.js +444 -0
- package/dist/node_modules/cron/dist/types/cron.types.d.ts +50 -0
- package/dist/node_modules/cron/dist/types/cron.types.js +3 -0
- package/dist/node_modules/cron/dist/types/utils.d.ts +3 -0
- package/dist/node_modules/cron/dist/types/utils.js +3 -0
- package/dist/node_modules/cron/dist/utils.d.ts +2 -0
- package/dist/node_modules/cron/dist/utils.js +8 -0
- package/dist/node_modules/cron/package.json +1 -0
- package/dist/preset.d.ts +3 -0
- package/dist/preset.js +34 -0
- package/dist/server/actions/auth.d.ts +8 -0
- package/dist/server/actions/auth.js +40 -0
- package/dist/server/actions/authenticators.d.ts +10 -0
- package/dist/server/actions/authenticators.js +153 -0
- package/dist/server/basic-auth.d.ts +10 -0
- package/dist/server/basic-auth.js +176 -0
- package/dist/server/collections/authenticators.d.ts +5 -0
- package/dist/server/collections/authenticators.js +117 -0
- package/dist/server/collections/token-blacklist.d.ts +2 -0
- package/dist/server/collections/token-blacklist.js +42 -0
- package/dist/server/collections/users-authenticators.d.ts +6 -0
- package/dist/server/collections/users-authenticators.js +85 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +42 -0
- package/dist/server/locale/en-US.d.ts +9 -0
- package/dist/server/locale/en-US.js +30 -0
- package/dist/server/locale/fr-FR.d.ts +9 -0
- package/dist/server/locale/fr-FR.js +30 -0
- package/dist/server/locale/index.d.ts +3 -0
- package/dist/server/locale/index.js +43 -0
- package/dist/server/locale/ja-JP.d.ts +5 -0
- package/dist/server/locale/ja-JP.js +26 -0
- package/dist/server/locale/pt-BR.d.ts +9 -0
- package/dist/server/locale/pt-BR.js +30 -0
- package/dist/server/locale/zh-CN.d.ts +11 -0
- package/dist/server/locale/zh-CN.js +32 -0
- package/dist/server/migrations/20230506152253-basic-authenticator.d.ts +6 -0
- package/dist/server/migrations/20230506152253-basic-authenticator.js +44 -0
- package/dist/server/migrations/20230607174500-update-basic.d.ts +6 -0
- package/dist/server/migrations/20230607174500-update-basic.js +47 -0
- package/dist/server/migrations/20231218132032-fix-allow-signup.d.ts +6 -0
- package/dist/server/migrations/20231218132032-fix-allow-signup.js +55 -0
- package/dist/server/model/authenticator.d.ts +10 -0
- package/dist/server/model/authenticator.js +81 -0
- package/dist/server/plugin.d.ts +11 -0
- package/dist/server/plugin.js +132 -0
- package/dist/server/storer.d.ts +16 -0
- package/dist/server/storer.js +69 -0
- package/dist/server/token-blacklist.d.ts +17 -0
- package/dist/server/token-blacklist.js +86 -0
- package/dist/swagger/index.d.ts +754 -0
- package/dist/swagger/index.js +787 -0
- package/package.json +34 -0
- package/server.d.ts +2 -0
- package/server.js +65 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const CONSTRAINTS: Readonly<{
|
|
2
|
+
readonly second: readonly [0, 59];
|
|
3
|
+
readonly minute: readonly [0, 59];
|
|
4
|
+
readonly hour: readonly [0, 23];
|
|
5
|
+
readonly dayOfMonth: readonly [1, 31];
|
|
6
|
+
readonly month: readonly [1, 12];
|
|
7
|
+
readonly dayOfWeek: readonly [0, 7];
|
|
8
|
+
}>;
|
|
9
|
+
export declare const MONTH_CONSTRAINTS: Readonly<{
|
|
10
|
+
readonly 1: 31;
|
|
11
|
+
readonly 2: 29;
|
|
12
|
+
readonly 3: 31;
|
|
13
|
+
readonly 4: 30;
|
|
14
|
+
readonly 5: 31;
|
|
15
|
+
readonly 6: 30;
|
|
16
|
+
readonly 7: 31;
|
|
17
|
+
readonly 8: 31;
|
|
18
|
+
readonly 9: 30;
|
|
19
|
+
readonly 10: 31;
|
|
20
|
+
readonly 11: 30;
|
|
21
|
+
readonly 12: 31;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const PARSE_DEFAULTS: Readonly<{
|
|
24
|
+
readonly second: "0";
|
|
25
|
+
readonly minute: "*";
|
|
26
|
+
readonly hour: "*";
|
|
27
|
+
readonly dayOfMonth: "*";
|
|
28
|
+
readonly month: "*";
|
|
29
|
+
readonly dayOfWeek: "*";
|
|
30
|
+
}>;
|
|
31
|
+
export declare const ALIASES: Readonly<{
|
|
32
|
+
readonly jan: 1;
|
|
33
|
+
readonly feb: 2;
|
|
34
|
+
readonly mar: 3;
|
|
35
|
+
readonly apr: 4;
|
|
36
|
+
readonly may: 5;
|
|
37
|
+
readonly jun: 6;
|
|
38
|
+
readonly jul: 7;
|
|
39
|
+
readonly aug: 8;
|
|
40
|
+
readonly sep: 9;
|
|
41
|
+
readonly oct: 10;
|
|
42
|
+
readonly nov: 11;
|
|
43
|
+
readonly dec: 12;
|
|
44
|
+
readonly sun: 0;
|
|
45
|
+
readonly mon: 1;
|
|
46
|
+
readonly tue: 2;
|
|
47
|
+
readonly wed: 3;
|
|
48
|
+
readonly thu: 4;
|
|
49
|
+
readonly fri: 5;
|
|
50
|
+
readonly sat: 6;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const TIME_UNITS_MAP: Readonly<{
|
|
53
|
+
readonly SECOND: "second";
|
|
54
|
+
readonly MINUTE: "minute";
|
|
55
|
+
readonly HOUR: "hour";
|
|
56
|
+
readonly DAY_OF_MONTH: "dayOfMonth";
|
|
57
|
+
readonly MONTH: "month";
|
|
58
|
+
readonly DAY_OF_WEEK: "dayOfWeek";
|
|
59
|
+
}>;
|
|
60
|
+
export declare const TIME_UNITS: ["second", "minute", "hour", "dayOfMonth", "month", "dayOfWeek"];
|
|
61
|
+
export declare const TIME_UNITS_LEN: number;
|
|
62
|
+
export declare const PRESETS: Readonly<{
|
|
63
|
+
readonly '@yearly': "0 0 0 1 1 *";
|
|
64
|
+
readonly '@monthly': "0 0 0 1 * *";
|
|
65
|
+
readonly '@weekly': "0 0 0 * * 0";
|
|
66
|
+
readonly '@daily': "0 0 0 * * *";
|
|
67
|
+
readonly '@hourly': "0 0 * * * *";
|
|
68
|
+
readonly '@minutely': "0 * * * * *";
|
|
69
|
+
readonly '@secondly': "* * * * * *";
|
|
70
|
+
readonly '@weekdays': "0 0 0 * * 1-5";
|
|
71
|
+
readonly '@weekends': "0 0 0 * * 0,6";
|
|
72
|
+
}>;
|
|
73
|
+
export declare const RE_WILDCARDS: RegExp;
|
|
74
|
+
export declare const RE_RANGE: RegExp;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RE_RANGE = exports.RE_WILDCARDS = exports.PRESETS = exports.TIME_UNITS_LEN = exports.TIME_UNITS = exports.TIME_UNITS_MAP = exports.ALIASES = exports.PARSE_DEFAULTS = exports.MONTH_CONSTRAINTS = exports.CONSTRAINTS = void 0;
|
|
4
|
+
exports.CONSTRAINTS = Object.freeze({
|
|
5
|
+
second: [0, 59],
|
|
6
|
+
minute: [0, 59],
|
|
7
|
+
hour: [0, 23],
|
|
8
|
+
dayOfMonth: [1, 31],
|
|
9
|
+
month: [1, 12],
|
|
10
|
+
dayOfWeek: [0, 7]
|
|
11
|
+
});
|
|
12
|
+
exports.MONTH_CONSTRAINTS = Object.freeze({
|
|
13
|
+
1: 31,
|
|
14
|
+
2: 29,
|
|
15
|
+
3: 31,
|
|
16
|
+
4: 30,
|
|
17
|
+
5: 31,
|
|
18
|
+
6: 30,
|
|
19
|
+
7: 31,
|
|
20
|
+
8: 31,
|
|
21
|
+
9: 30,
|
|
22
|
+
10: 31,
|
|
23
|
+
11: 30,
|
|
24
|
+
12: 31
|
|
25
|
+
});
|
|
26
|
+
exports.PARSE_DEFAULTS = Object.freeze({
|
|
27
|
+
second: '0',
|
|
28
|
+
minute: '*',
|
|
29
|
+
hour: '*',
|
|
30
|
+
dayOfMonth: '*',
|
|
31
|
+
month: '*',
|
|
32
|
+
dayOfWeek: '*'
|
|
33
|
+
});
|
|
34
|
+
exports.ALIASES = Object.freeze({
|
|
35
|
+
jan: 1,
|
|
36
|
+
feb: 2,
|
|
37
|
+
mar: 3,
|
|
38
|
+
apr: 4,
|
|
39
|
+
may: 5,
|
|
40
|
+
jun: 6,
|
|
41
|
+
jul: 7,
|
|
42
|
+
aug: 8,
|
|
43
|
+
sep: 9,
|
|
44
|
+
oct: 10,
|
|
45
|
+
nov: 11,
|
|
46
|
+
dec: 12,
|
|
47
|
+
sun: 0,
|
|
48
|
+
mon: 1,
|
|
49
|
+
tue: 2,
|
|
50
|
+
wed: 3,
|
|
51
|
+
thu: 4,
|
|
52
|
+
fri: 5,
|
|
53
|
+
sat: 6
|
|
54
|
+
});
|
|
55
|
+
exports.TIME_UNITS_MAP = Object.freeze({
|
|
56
|
+
SECOND: 'second',
|
|
57
|
+
MINUTE: 'minute',
|
|
58
|
+
HOUR: 'hour',
|
|
59
|
+
DAY_OF_MONTH: 'dayOfMonth',
|
|
60
|
+
MONTH: 'month',
|
|
61
|
+
DAY_OF_WEEK: 'dayOfWeek'
|
|
62
|
+
});
|
|
63
|
+
exports.TIME_UNITS = Object.freeze(Object.values(exports.TIME_UNITS_MAP));
|
|
64
|
+
exports.TIME_UNITS_LEN = exports.TIME_UNITS.length;
|
|
65
|
+
exports.PRESETS = Object.freeze({
|
|
66
|
+
'@yearly': '0 0 0 1 1 *',
|
|
67
|
+
'@monthly': '0 0 0 1 * *',
|
|
68
|
+
'@weekly': '0 0 0 * * 0',
|
|
69
|
+
'@daily': '0 0 0 * * *',
|
|
70
|
+
'@hourly': '0 0 * * * *',
|
|
71
|
+
'@minutely': '0 * * * * *',
|
|
72
|
+
'@secondly': '* * * * * *',
|
|
73
|
+
'@weekdays': '0 0 0 * * 1-5',
|
|
74
|
+
'@weekends': '0 0 0 * * 0,6'
|
|
75
|
+
});
|
|
76
|
+
exports.RE_WILDCARDS = /\*/g;
|
|
77
|
+
exports.RE_RANGE = /^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g;
|
|
78
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExclusiveParametersError = exports.CronError = void 0;
|
|
4
|
+
class CronError extends Error {
|
|
5
|
+
}
|
|
6
|
+
exports.CronError = CronError;
|
|
7
|
+
class ExclusiveParametersError extends CronError {
|
|
8
|
+
constructor(param1, param2) {
|
|
9
|
+
super(`You can't specify both ${param1} and ${param2}`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ExclusiveParametersError = ExclusiveParametersError;
|
|
13
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
export { CronJob } from './job';
|
|
3
|
+
export { CronTime } from './time';
|
|
4
|
+
export { CronCallback, CronCommand, CronContext, CronJobParams, CronOnCompleteCallback, CronOnCompleteCommand, Ranges, TimeUnit } from './types/cron.types';
|
|
5
|
+
export declare const sendAt: (cronTime: string | Date | DateTime) => DateTime;
|
|
6
|
+
export declare const timeout: (cronTime: string | Date | DateTime) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){"use strict";var e={951:function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.RE_RANGE=t.RE_WILDCARDS=t.PRESETS=t.TIME_UNITS_LEN=t.TIME_UNITS=t.TIME_UNITS_MAP=t.ALIASES=t.PARSE_DEFAULTS=t.MONTH_CONSTRAINTS=t.CONSTRAINTS=void 0;t.CONSTRAINTS=Object.freeze({second:[0,59],minute:[0,59],hour:[0,23],dayOfMonth:[1,31],month:[1,12],dayOfWeek:[0,7]});t.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});t.PARSE_DEFAULTS=Object.freeze({second:"0",minute:"*",hour:"*",dayOfMonth:"*",month:"*",dayOfWeek:"*"});t.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});t.TIME_UNITS_MAP=Object.freeze({SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY_OF_MONTH:"dayOfMonth",MONTH:"month",DAY_OF_WEEK:"dayOfWeek"});t.TIME_UNITS=Object.freeze(Object.values(t.TIME_UNITS_MAP));t.TIME_UNITS_LEN=t.TIME_UNITS.length;t.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"});t.RE_WILDCARDS=/\*/g;t.RE_RANGE=/^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g},187:function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.ExclusiveParametersError=t.CronError=void 0;class CronError extends Error{}t.CronError=CronError;class ExclusiveParametersError extends CronError{constructor(e,t){super(`You can't specify both ${e} and ${t}`)}}t.ExclusiveParametersError=ExclusiveParametersError},57:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(r.next(e))}catch(e){i(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.CronJob=void 0;const i=n(317);const s=n(187);const o=n(497);class CronJob{get isCallbackRunning(){return this._isCallbackRunning}constructor(e,t,n,r,i,a,u,l,c,f){this.running=false;this.unrefTimeout=false;this.lastExecution=null;this.runOnce=false;this.waitForCompletion=false;this._isCallbackRunning=false;this._callbacks=[];this.context=a!==null&&a!==void 0?a:this;this.waitForCompletion=Boolean(f);if(i!=null&&l!=null){throw new s.ExclusiveParametersError("timeZone","utcOffset")}if(i!=null){this.cronTime=new o.CronTime(e,i,null)}else if(l!=null){this.cronTime=new o.CronTime(e,null,l)}else{this.cronTime=new o.CronTime(e,i,l)}if(c!=null){this.unrefTimeout=c}if(n!=null){this.onComplete=this._fnWrap(n)}if(this.cronTime.realDate){this.runOnce=true}this.addCallback(this._fnWrap(t));if(u){this.lastExecution=new Date;void this.fireOnTick()}if(r)this.start()}static from(e){if(e.timeZone!=null&&e.utcOffset!=null){throw new s.ExclusiveParametersError("timeZone","utcOffset")}if(e.timeZone!=null){return new CronJob(e.cronTime,e.onTick,e.onComplete,e.start,e.timeZone,e.context,e.runOnInit,e.utcOffset,e.unrefTimeout,e.waitForCompletion)}else if(e.utcOffset!=null){return new CronJob(e.cronTime,e.onTick,e.onComplete,e.start,null,e.context,e.runOnInit,e.utcOffset,e.unrefTimeout,e.waitForCompletion)}else{return new CronJob(e.cronTime,e.onTick,e.onComplete,e.start,e.timeZone,e.context,e.runOnInit,e.utcOffset,e.unrefTimeout,e.waitForCompletion)}}_fnWrap(e){var t,n;switch(typeof e){case"function":{return e}case"string":{const[t,...n]=e.split(" ");return i.spawn.bind(undefined,t!==null&&t!==void 0?t:e,n,{})}case"object":{return i.spawn.bind(undefined,e.command,(t=e.args)!==null&&t!==void 0?t:[],(n=e.options)!==null&&n!==void 0?n:{})}}}addCallback(e){if(typeof e==="function"){this._callbacks.push(e)}}setTime(e){if(!(e instanceof o.CronTime)){throw new s.CronError("time must be an instance of CronTime.")}const t=this.running;this.stop();this.cronTime=e;if(e.realDate)this.runOnce=true;if(t)this.start()}nextDate(){return this.cronTime.sendAt()}fireOnTick(){return r(this,void 0,void 0,(function*(){if(this.waitForCompletion&&this._isCallbackRunning)return;this._isCallbackRunning=true;try{for(const e of this._callbacks){const t=e.call(this.context,this.onComplete);if(this.waitForCompletion)yield t}}catch(e){console.error("[Cron] error in callback",e)}finally{this._isCallbackRunning=false}}))}nextDates(e){return this.cronTime.sendAt(e!==null&&e!==void 0?e:0)}start(){if(this.running)return;const e=2147483647;let t=this.cronTime.getTimeout();let n=0;let r;const setCronTimeout=e=>{r=Date.now();this._timeout=setTimeout(callbackWrapper,e);if(this.unrefTimeout&&typeof this._timeout.unref==="function"){this._timeout.unref()}};const callbackWrapper=()=>{const i=r+t-Date.now();if(i>0){let e=this.cronTime.getTimeout();if(e>i){e=i}n+=e}if(n){if(n>e){n-=e;t=e}else{t=n;n=0}setCronTimeout(t)}else{this.lastExecution=new Date;this.running=false;if(!this.runOnce)this.start();void this.fireOnTick()}};if(t>=0){this.running=true;if(t>e){n=t-e;t=e}setCronTimeout(t)}else{this.stop()}}lastDate(){return this.lastExecution}_executeOnComplete(){return r(this,void 0,void 0,(function*(){if(typeof this.onComplete!=="function")return;try{yield this.onComplete.call(this.context)}catch(e){console.error("[Cron] error in onComplete callback:",e)}}))}_waitForJobCompletion(){return r(this,void 0,void 0,(function*(){while(this._isCallbackRunning){yield new Promise((e=>setTimeout(e,100)))}}))}stop(){if(this._timeout)clearTimeout(this._timeout);this.running=false;if(!this.waitForCompletion){void this._executeOnComplete();return}void Promise.resolve().then((()=>r(this,void 0,void 0,(function*(){yield this._waitForJobCompletion();yield this._executeOnComplete()}))))}}t.CronJob=CronJob},497:function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.CronTime=void 0;const r=n(588);const i=n(951);const s=n(187);const o=n(727);class CronTime{constructor(e,t,n){this.realDate=false;this.second={};this.minute={};this.hour={};this.dayOfMonth={};this.month={};this.dayOfWeek={};if(t!=null&&n!=null){throw new s.ExclusiveParametersError("timeZone","utcOffset")}if(t){const e=r.DateTime.fromObject({},{zone:t});if(!e.isValid){throw new s.CronError("Invalid timezone.")}this.timeZone=t}if(n!=null){this.utcOffset=n}if(e instanceof Date||e instanceof r.DateTime){this.source=e instanceof Date?r.DateTime.fromJSDate(e):e;this.realDate=true}else{this.source=e;this._parse(this.source);this._verifyParse()}}_getWeekDay(e){return e.weekday===7?0:e.weekday}_verifyParse(){const e=(0,o.getRecordKeys)(this.month);const t=(0,o.getRecordKeys)(this.dayOfMonth);let n=false;let r=null;for(const s of e){const e=i.MONTH_CONSTRAINTS[s];for(const r of t){if(r<=e){n=true}}if(!n){r=s;console.warn(`Month '${s}' is limited to '${e}' days.`)}}if(!n&&r!==null){const e=i.MONTH_CONSTRAINTS[r];for(const n of t){if(n>e){delete this.dayOfMonth[n];const t=n%e;this.dayOfMonth[t]=true}}}}sendAt(e){let t=this.realDate&&this.source instanceof r.DateTime?this.source:r.DateTime.local();if(this.timeZone){t=t.setZone(this.timeZone)}if(this.utcOffset!==undefined){const e=this.utcOffset<0?"-":"+";const n=Math.trunc(this.utcOffset/60);const r=String(Math.abs(n)).padStart(2,"0");const i=Math.abs(this.utcOffset-n*60);const o=String(i).padStart(2,"0");const a=`UTC${e}${r}:${o}`;t=t.setZone(a);if(!t.isValid){throw new s.CronError("ERROR: You specified an invalid UTC offset.")}}if(this.realDate){if(r.DateTime.local()>t){throw new s.CronError("WARNING: Date in past. Will never be fired.")}return t}if(e===undefined||isNaN(e)||e<0){return this.getNextDateFrom(t)}else{const n=[];for(;e>0;e--){t=this.getNextDateFrom(t);n.push(t)}return n}}getTimeout(){return Math.max(-1,this.sendAt().toMillis()-r.DateTime.local().toMillis())}toString(){return this.toJSON().join(" ")}toJSON(){return i.TIME_UNITS.map((e=>this._wcOrAll(e)))}getNextDateFrom(e,t){var n;if(e instanceof Date){e=r.DateTime.fromJSDate(e)}let i=e;const o=e.toMillis();if(t){i=i.setZone(t)}if(!this.realDate){if(i.millisecond>0){i=i.set({millisecond:0,second:i.second+1})}}if(!i.isValid){throw new s.CronError("ERROR: You specified an invalid date.")}const a=r.DateTime.now().plus({years:8});while(true){const u=i.toMillis()-e.toMillis();if(i>a){throw new s.CronError(`Something went wrong. No execution date was found in the next 8 years.\n\t\t\t\t\t\t\tPlease provide the following string if you would like to help debug:\n\t\t\t\t\t\t\tTime Zone: ${(n=t===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:'""'} - Cron String: ${this.source.toString()} - UTC offset: ${i.offset} - current Date: ${r.DateTime.local().toString()}`)}if(!(i.month in this.month)&&Object.keys(this.month).length!==12){i=i.plus({months:1});i=i.set({day:1,hour:0,minute:0,second:0});if(this._forwardDSTJump(0,0,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}if(!(i.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31&&!(this._getWeekDay(i)in this.dayOfWeek&&Object.keys(this.dayOfWeek).length!==7)){i=i.plus({days:1});i=i.set({hour:0,minute:0,second:0});if(this._forwardDSTJump(0,0,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}if(!(this._getWeekDay(i)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7&&!(i.day in this.dayOfMonth&&Object.keys(this.dayOfMonth).length!==31)){i=i.plus({days:1});i=i.set({hour:0,minute:0,second:0});if(this._forwardDSTJump(0,0,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}if(!(i.hour in this.hour)&&Object.keys(this.hour).length!==24){const e=i.hour===23&&u>864e5?0:i.hour+1;const t=i.minute;i=i.set({hour:e});i=i.set({minute:0,second:0});if(this._forwardDSTJump(e,t,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}if(!(i.minute in this.minute)&&Object.keys(this.minute).length!==60){const e=i.minute===59&&u>36e5?0:i.minute+1;const t=i.hour+(e===60?1:0);i=i.set({minute:e});i=i.set({second:0});if(this._forwardDSTJump(t,e,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}if(!(i.second in this.second)&&Object.keys(this.second).length!==60){const e=i.second===59&&u>6e4?0:i.second+1;const t=i.minute+(e===60?1:0);const n=i.hour+(t===60?1:0);i=i.set({second:e});if(this._forwardDSTJump(n,t,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}if(i.toMillis()===o){const e=i.second+1;const t=i.minute+(e===60?1:0);const n=i.hour+(t===60?1:0);i=i.set({second:e});if(this._forwardDSTJump(n,t,i)){const[e,t]=this._findPreviousDSTJump(i);i=t;if(e)break}continue}break}return i}_findPreviousDSTJump(e){var t;let n,r,i,o;let a=e;const u=60*24;let l=0;do{if(++l>u){throw new s.CronError(`ERROR: This DST checking related function assumes the input DateTime (${(t=e.toISO())!==null&&t!==void 0?t:e.toMillis()}) is within 24 hours of a DST jump.`)}n=a.minute-1;r=a.hour;if(n<0){n+=60;r=(r+24-1)%24}a=a.minus({minute:1});i=a.minute;o=a.hour}while(n===i&&r===o);const c=a.plus({minute:1}).set({second:0,millisecond:0});const f=c.minus({second:1});if(e.month+1 in this.month&&e.day in this.dayOfMonth&&this._getWeekDay(e)in this.dayOfWeek){return[this._checkTimeInSkippedRange(f,c),c]}return[false,c]}_checkTimeInSkippedRange(e,t){const n=(e.minute+1)%60;const r=(e.hour+(n===0?1:0))%24;const i=t.hour-r+1;const s=n===0&&t.minute===0;if(i===2&&s){return r in this.hour}else if(i===1){return r in this.hour&&this._checkTimeInSkippedRangeSingleHour(n,t.minute)}else{return this._checkTimeInSkippedRangeMultiHour(r,n,t.hour,t.minute)}}_checkTimeInSkippedRangeSingleHour(e,t){for(let n=e;n<t;++n){if(n in this.minute)return true}return t in this.minute&&0 in this.second}_checkTimeInSkippedRangeMultiHour(e,t,n,r){if(e>=n){throw new s.CronError(`ERROR: This DST checking related function assumes the forward jump starting hour (${e}) is less than the end hour (${n})`)}const i=Array.from({length:60-t},((e,n)=>t+n));const o=Array.from({length:r},((e,t)=>t));const a=Array.from({length:60},((e,t)=>t));const selectRange=t=>{if(t===e){return i}else if(t===n){return o}else{return a}};for(let t=e;t<=n;++t){if(!(t in this.hour))continue;const e=selectRange(t);for(const t of e){if(t in this.minute)return true}}return n in this.hour&&r in this.minute&&0 in this.second}_forwardDSTJump(e,t,n){const r=n.hour;const i=n.minute;const s=e%24<r;const o=t%60<i;return s||o}_wcOrAll(e){if(this._hasAll(e)){return"*"}const t=[];for(const n in this[e]){t.push(n)}return t.join(",")}_hasAll(e){const t=i.CONSTRAINTS[e];const n=t[0];const r=e===i.TIME_UNITS_MAP.DAY_OF_WEEK?t[1]-1:t[1];for(let t=n,i=r;t<i;t++){if(!(t in this[e])){return false}}return true}_parse(e){var t;e=e.toLowerCase();if(Object.keys(i.PRESETS).includes(e)){e=i.PRESETS[e]}e=e.replace(/[a-z]{1,3}/gi,(e=>{if(Object.keys(i.ALIASES).includes(e)){return i.ALIASES[e].toString()}throw new s.CronError(`Unknown alias: ${e}`)}));const n=e.trim().split(/\s+/);if(n.length<i.TIME_UNITS_LEN-1){throw new s.CronError("Too few fields")}if(n.length>i.TIME_UNITS_LEN){throw new s.CronError("Too many fields")}const r=n.length;for(const e of i.TIME_UNITS){const s=i.TIME_UNITS.indexOf(e);const o=(t=n[s-(i.TIME_UNITS_LEN-r)])!==null&&t!==void 0?t:i.PARSE_DEFAULTS[e];this._parseField(o,e)}}_parseField(e,t){const n=this[t];let r;const o=i.CONSTRAINTS[t];const a=o[0];const u=o[1];const l=e.split(",");l.forEach((e=>{const t=e.indexOf("*");if(t!==-1&&t!==0){throw new s.CronError(`Field (${e}) has an invalid wildcard expression`)}}));e=e.replace(i.RE_WILDCARDS,`${a}-${u}`);const c=e.split(",");for(const o of c){const l=[...o.matchAll(i.RE_RANGE)][0];if((l===null||l===void 0?void 0:l[1])!==undefined){const[,i,o,c]=l;let f=parseInt(i,10);let d=o!==undefined?parseInt(o,10):undefined;const h=c!==undefined;const m=parseInt(c!==null&&c!==void 0?c:"1",10);if(m===0){throw new s.CronError(`Field (${t}) has a step of zero`)}if(d!==undefined&&f>d){throw new s.CronError(`Field (${t}) has an invalid range`)}const y=f<a||d!==undefined&&d>u||d===undefined&&f>u;if(y){throw new s.CronError(`Field value (${e}) is out of range`)}f=Math.min(Math.max(a,~~Math.abs(f)),u);if(d!==undefined){d=Math.min(u,~~Math.abs(d))}else{d=h?u:f}r=f;do{n[r]=true;r+=m}while(r<=d);if(t==="dayOfWeek"){if(!n[0]&&!!n[7])n[0]=n[7];delete n[7]}}else{throw new s.CronError(`Field (${t}) cannot be parsed`)}}}}t.CronTime=CronTime},727:function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getRecordKeys=void 0;const getRecordKeys=e=>Object.keys(e);t.getRecordKeys=getRecordKeys},588:function(e,t){Object.defineProperty(t,"__esModule",{value:true});class LuxonError extends Error{}class InvalidDateTimeError extends LuxonError{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class InvalidIntervalError extends LuxonError{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class InvalidDurationError extends LuxonError{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class ConflictingSpecificationError extends LuxonError{}class InvalidUnitError extends LuxonError{constructor(e){super(`Invalid unit ${e}`)}}class InvalidArgumentError extends LuxonError{}class ZoneIsAbstractError extends LuxonError{constructor(){super("Zone is an abstract class")}}const n="numeric",r="short",i="long";const s={year:n,month:n,day:n};const o={year:n,month:r,day:n};const a={year:n,month:r,day:n,weekday:r};const u={year:n,month:i,day:n};const l={year:n,month:i,day:n,weekday:i};const c={hour:n,minute:n};const f={hour:n,minute:n,second:n};const d={hour:n,minute:n,second:n,timeZoneName:r};const h={hour:n,minute:n,second:n,timeZoneName:i};const m={hour:n,minute:n,hourCycle:"h23"};const y={hour:n,minute:n,second:n,hourCycle:"h23"};const g={hour:n,minute:n,second:n,hourCycle:"h23",timeZoneName:r};const p={hour:n,minute:n,second:n,hourCycle:"h23",timeZoneName:i};const T={year:n,month:n,day:n,hour:n,minute:n};const w={year:n,month:n,day:n,hour:n,minute:n,second:n};const O={year:n,month:r,day:n,hour:n,minute:n};const k={year:n,month:r,day:n,hour:n,minute:n,second:n};const S={year:n,month:r,day:n,weekday:r,hour:n,minute:n};const D={year:n,month:i,day:n,hour:n,minute:n,timeZoneName:r};const v={year:n,month:i,day:n,hour:n,minute:n,second:n,timeZoneName:r};const I={year:n,month:i,day:n,weekday:i,hour:n,minute:n,timeZoneName:i};const b={year:n,month:i,day:n,weekday:i,hour:n,minute:n,second:n,timeZoneName:i};class Zone{get type(){throw new ZoneIsAbstractError}get name(){throw new ZoneIsAbstractError}get ianaName(){return this.name}get isUniversal(){throw new ZoneIsAbstractError}offsetName(e,t){throw new ZoneIsAbstractError}formatOffset(e,t){throw new ZoneIsAbstractError}offset(e){throw new ZoneIsAbstractError}equals(e){throw new ZoneIsAbstractError}get isValid(){throw new ZoneIsAbstractError}}let N=null;class SystemZone extends Zone{static get instance(){if(N===null){N=new SystemZone}return N}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return false}offsetName(e,{format:t,locale:n}){return parseZoneInfo(e,t,n)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return true}}let E={};function makeDTF(e){if(!E[e]){E[e]=new Intl.DateTimeFormat("en-US",{hour12:false,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})}return E[e]}const x={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hackyOffset(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,o,a,u,l,c]=r;return[o,i,s,a,u,l,c]}function partsOffset(e,t){const n=e.formatToParts(t);const r=[];for(let e=0;e<n.length;e++){const{type:t,value:i}=n[e];const s=x[t];if(t==="era"){r[s]=i}else if(!isUndefined(s)){r[s]=parseInt(i,10)}}return r}let M={};class IANAZone extends Zone{static create(e){if(!M[e]){M[e]=new IANAZone(e)}return M[e]}static resetCache(){M={};E={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e){return false}try{new Intl.DateTimeFormat("en-US",{timeZone:e}).format();return true}catch(e){return false}}constructor(e){super();this.zoneName=e;this.valid=IANAZone.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return false}offsetName(e,{format:t,locale:n}){return parseZoneInfo(e,t,n,this.name)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=makeDTF(this.name);let[r,i,s,o,a,u,l]=n.formatToParts?partsOffset(n,t):hackyOffset(n,t);if(o==="BC"){r=-Math.abs(r)+1}const c=a===24?0:a;const f=objToLocalTS({year:r,month:i,day:s,hour:c,minute:u,second:l,millisecond:0});let d=+t;const h=d%1e3;d-=h>=0?h:1e3+h;return(f-d)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let C={};function getCachedLF(e,t={}){const n=JSON.stringify([e,t]);let r=C[n];if(!r){r=new Intl.ListFormat(e,t);C[n]=r}return r}let F={};function getCachedDTF(e,t={}){const n=JSON.stringify([e,t]);let r=F[n];if(!r){r=new Intl.DateTimeFormat(e,t);F[n]=r}return r}let _={};function getCachedINF(e,t={}){const n=JSON.stringify([e,t]);let r=_[n];if(!r){r=new Intl.NumberFormat(e,t);_[n]=r}return r}let Z={};function getCachedRTF(e,t={}){const{base:n,...r}=t;const i=JSON.stringify([e,r]);let s=Z[i];if(!s){s=new Intl.RelativeTimeFormat(e,t);Z[i]=s}return s}let L=null;function systemLocale(){if(L){return L}else{L=(new Intl.DateTimeFormat).resolvedOptions().locale;return L}}let W={};function getCachedWeekInfo(e){let t=W[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo;W[e]=t}return t}function parseLocaleString(e){const t=e.indexOf("-x-");if(t!==-1){e=e.substring(0,t)}const n=e.indexOf("-u-");if(n===-1){return[e]}else{let t;let r;try{t=getCachedDTF(e).resolvedOptions();r=e}catch(i){const s=e.substring(0,n);t=getCachedDTF(s).resolvedOptions();r=s}const{numberingSystem:i,calendar:s}=t;return[r,i,s]}}function intlConfigString(e,t,n){if(n||t){if(!e.includes("-u-")){e+="-u"}if(n){e+=`-ca-${n}`}if(t){e+=`-nu-${t}`}return e}else{return e}}function mapMonths(e){const t=[];for(let n=1;n<=12;n++){const r=DateTime.utc(2009,n,1);t.push(e(r))}return t}function mapWeekdays(e){const t=[];for(let n=1;n<=7;n++){const r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r){const i=e.listingMode();if(i==="error"){return null}else if(i==="en"){return n(t)}else{return r(t)}}function supportsFastNumbers(e){if(e.numberingSystem&&e.numberingSystem!=="latn"){return false}else{return e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}}class PolyNumberFormatter{constructor(e,t,n){this.padTo=n.padTo||0;this.floor=n.floor||false;const{padTo:r,floor:i,...s}=n;if(!t||Object.keys(s).length>0){const t={useGrouping:false,...n};if(n.padTo>0)t.minimumIntegerDigits=n.padTo;this.inf=getCachedINF(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):roundTo(e,3);return padStart(t,this.padTo)}}}class PolyDateFormatter{constructor(e,t,n){this.opts=n;this.originalZone=undefined;let r=undefined;if(this.opts.timeZone){this.dt=e}else if(e.zone.type==="fixed"){const t=-1*(e.offset/60);const n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;if(e.offset!==0&&IANAZone.create(n).valid){r=n;this.dt=e}else{r="UTC";this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset});this.originalZone=e.zone}}else if(e.zone.type==="system"){this.dt=e}else if(e.zone.type==="iana"){this.dt=e;r=e.zone.name}else{r="UTC";this.dt=e.setZone("UTC").plus({minutes:e.offset});this.originalZone=e.zone}const i={...this.opts};i.timeZone=i.timeZone||r;this.dtf=getCachedDTF(t,i)}format(){if(this.originalZone){return this.formatToParts().map((({value:e})=>e)).join("")}return this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());if(this.originalZone){return e.map((e=>{if(e.type==="timeZoneName"){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}else{return e}}))}return e}resolvedOptions(){return this.dtf.resolvedOptions()}}class PolyRelFormatter{constructor(e,t,n){this.opts={style:"long",...n};if(!t&&hasRelative()){this.rtf=getCachedRTF(e,n)}}format(e,t){if(this.rtf){return this.rtf.format(e,t)}else{return formatRelativeTime(t,e,this.opts.numeric,this.opts.style!=="long")}}formatToParts(e,t){if(this.rtf){return this.rtf.formatToParts(e,t)}else{return[]}}}const A={firstDay:1,minimalDays:4,weekend:[6,7]};class Locale{static fromOpts(e){return Locale.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=false){const s=e||Settings.defaultLocale;const o=s||(i?"en-US":systemLocale());const a=t||Settings.defaultNumberingSystem;const u=n||Settings.defaultOutputCalendar;const l=validateWeekSettings(r)||Settings.defaultWeekSettings;return new Locale(o,a,u,l,s)}static resetCache(){L=null;F={};_={};Z={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return Locale.create(e,t,n,r)}constructor(e,t,n,r,i){const[s,o,a]=parseLocaleString(e);this.locale=s;this.numberingSystem=t||o||null;this.outputCalendar=n||a||null;this.weekSettings=r;this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar);this.weekdaysCache={format:{},standalone:{}};this.monthsCache={format:{},standalone:{}};this.meridiemCache=null;this.eraCache={};this.specifiedLocale=i;this.fastNumbersCached=null}get fastNumbers(){if(this.fastNumbersCached==null){this.fastNumbersCached=supportsFastNumbers(this)}return this.fastNumbersCached}listingMode(){const e=this.isEnglish();const t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){if(!e||Object.getOwnPropertyNames(e).length===0){return this}else{return Locale.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,validateWeekSettings(e.weekSettings)||this.weekSettings,e.defaultToEN||false)}}redefaultToEN(e={}){return this.clone({...e,defaultToEN:true})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:false})}months(e,t=false){return listStuff(this,e,months,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";if(!this.monthsCache[r][e]){this.monthsCache[r][e]=mapMonths((e=>this.extract(e,n,"month")))}return this.monthsCache[r][e]}))}weekdays(e,t=false){return listStuff(this,e,weekdays,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";if(!this.weekdaysCache[r][e]){this.weekdaysCache[r][e]=mapWeekdays((e=>this.extract(e,n,"weekday")))}return this.weekdaysCache[r][e]}))}meridiems(){return listStuff(this,undefined,(()=>ie),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return listStuff(this,e,eras,(()=>{const t={era:e};if(!this.eraCache[e]){this.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))}return this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t),i=r.formatToParts(),s=i.find((e=>e.type.toLowerCase()===n));return s?s.value:null}numberFormatter(e={}){return new PolyNumberFormatter(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new PolyDateFormatter(e,this.intl,t)}relFormatter(e={}){return new PolyRelFormatter(this.intl,this.isEnglish(),e)}listFormatter(e={}){return getCachedLF(this.intl,e)}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(!hasLocaleWeekInfo()){return A}else{return getCachedWeekInfo(this.locale)}}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let U=null;class FixedOffsetZone extends Zone{static get utcInstance(){if(U===null){U=new FixedOffsetZone(0)}return U}static instance(e){return e===0?FixedOffsetZone.utcInstance:new FixedOffsetZone(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t){return new FixedOffsetZone(signedOffset(t[1],t[2]))}}return null}constructor(e){super();this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${formatOffset(this.fixed,"narrow")}`}get ianaName(){if(this.fixed===0){return"Etc/UTC"}else{return`Etc/GMT${formatOffset(-this.fixed,"narrow")}`}}offsetName(){return this.name}formatOffset(e,t){return formatOffset(this.fixed,t)}get isUniversal(){return true}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return true}}class InvalidZone extends Zone{constructor(e){super();this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return false}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return false}get isValid(){return false}}function normalizeZone(e,t){if(isUndefined(e)||e===null){return t}else if(e instanceof Zone){return e}else if(isString(e)){const n=e.toLowerCase();if(n==="default")return t;else if(n==="local"||n==="system")return SystemZone.instance;else if(n==="utc"||n==="gmt")return FixedOffsetZone.utcInstance;else return FixedOffsetZone.parseSpecifier(n)||IANAZone.create(e)}else if(isNumber(e)){return FixedOffsetZone.instance(e)}else if(typeof e==="object"&&"offset"in e&&typeof e.offset==="function"){return e}else{return new InvalidZone(e)}}const R={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"};const V={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]};const $=R.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(R.hanidec)!==-1){t+=$.indexOf(e[n])}else{for(const e in V){const[n,i]=V[e];if(r>=n&&r<=i){t+=r-n}}}}return parseInt(t,10)}else{return t}}let j={};function resetDigitRegexCache(){j={}}function digitRegex({numberingSystem:e},t=""){const n=e||"latn";if(!j[n]){j[n]={}}if(!j[n][t]){j[n][t]=new RegExp(`${R[n]}${t}`)}return j[n][t]}let now=()=>Date.now(),z="system",P=null,q=null,Y=null,J=60,H,G=null;class Settings{static get now(){return now}static set now(e){now=e}static set defaultZone(e){z=e}static get defaultZone(){return normalizeZone(z,SystemZone.instance)}static get defaultLocale(){return P}static set defaultLocale(e){P=e}static get defaultNumberingSystem(){return q}static set defaultNumberingSystem(e){q=e}static get defaultOutputCalendar(){return Y}static set defaultOutputCalendar(e){Y=e}static get defaultWeekSettings(){return G}static set defaultWeekSettings(e){G=validateWeekSettings(e)}static get twoDigitCutoffYear(){return J}static set twoDigitCutoffYear(e){J=e%100}static get throwOnInvalid(){return H}static set throwOnInvalid(e){H=e}static resetCaches(){Locale.resetCache();IANAZone.resetCache();DateTime.resetCache();resetDigitRegexCache()}}class Invalid{constructor(e,t){this.reason=e;this.explanation=t}toMessage(){if(this.explanation){return`${this.reason}: ${this.explanation}`}else{return this.reason}}}const B=[0,31,59,90,120,151,181,212,243,273,304,334],Q=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function dayOfWeek(e,t,n){const r=new Date(Date.UTC(e,t-1,n));if(e<100&&e>=0){r.setUTCFullYear(r.getUTCFullYear()-1900)}const i=r.getUTCDay();return i===0?7:i}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?Q:B)[t-1]}function uncomputeOrdinal(e,t){const n=isLeapYear(e)?Q:B,r=n.findIndex((e=>e<t)),i=t-n[r];return{month:r+1,day:i}}function isoWeekdayToLocal(e,t){return(e-t+7)%7+1}function gregorianToWeek(e,t=4,n=1){const{year:r,month:i,day:s}=e,o=computeOrdinal(r,i,s),a=isoWeekdayToLocal(dayOfWeek(r,i,s),n);let u=Math.floor((o-a+14-t)/7),l;if(u<1){l=r-1;u=weeksInWeekYear(l,t,n)}else if(u>weeksInWeekYear(r,t,n)){l=r+1;u=1}else{l=r}return{weekYear:l,weekNumber:u,weekday:a,...timeObject(e)}}function weekToGregorian(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:s}=e,o=isoWeekdayToLocal(dayOfWeek(r,1,t),n),a=daysInYear(r);let u=i*7+s-o-7+t,l;if(u<1){l=r-1;u+=daysInYear(l)}else if(u>a){l=r+1;u-=daysInYear(r)}else{l=r}const{month:c,day:f}=uncomputeOrdinal(l,u);return{year:l,month:c,day:f,...timeObject(e)}}function gregorianToOrdinal(e){const{year:t,month:n,day:r}=e;const i=computeOrdinal(t,n,r);return{year:t,ordinal:i,...timeObject(e)}}function ordinalToGregorian(e){const{year:t,ordinal:n}=e;const{month:r,day:i}=uncomputeOrdinal(t,n);return{year:t,month:r,day:i,...timeObject(e)}}function usesLocalWeekValues(e,t){const n=!isUndefined(e.localWeekday)||!isUndefined(e.localWeekNumber)||!isUndefined(e.localWeekYear);if(n){const n=!isUndefined(e.weekday)||!isUndefined(e.weekNumber)||!isUndefined(e.weekYear);if(n){throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields")}if(!isUndefined(e.localWeekday))e.weekday=e.localWeekday;if(!isUndefined(e.localWeekNumber))e.weekNumber=e.localWeekNumber;if(!isUndefined(e.localWeekYear))e.weekYear=e.localWeekYear;delete e.localWeekday;delete e.localWeekNumber;delete e.localWeekYear;return{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else{return{minDaysInFirstWeek:4,startOfWeek:1}}}function hasInvalidWeekData(e,t=4,n=1){const r=isInteger(e.weekYear),i=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear,t,n)),s=integerBetween(e.weekday,1,7);if(!r){return unitOutOfRange("weekYear",e.weekYear)}else if(!i){return unitOutOfRange("week",e.weekNumber)}else if(!s){return unitOutOfRange("weekday",e.weekday)}else return false}function hasInvalidOrdinalData(e){const t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));if(!t){return unitOutOfRange("year",e.year)}else if(!n){return unitOutOfRange("ordinal",e.ordinal)}else return false}function hasInvalidGregorianData(e){const t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));if(!t){return unitOutOfRange("year",e.year)}else if(!n){return unitOutOfRange("month",e.month)}else if(!r){return unitOutOfRange("day",e.day)}else return false}function hasInvalidTimeData(e){const{hour:t,minute:n,second:r,millisecond:i}=e;const s=integerBetween(t,0,23)||t===24&&n===0&&r===0&&i===0,o=integerBetween(n,0,59),a=integerBetween(r,0,59),u=integerBetween(i,0,999);if(!s){return unitOutOfRange("hour",t)}else if(!o){return unitOutOfRange("minute",n)}else if(!a){return unitOutOfRange("second",r)}else if(!u){return unitOutOfRange("millisecond",i)}else return false}function isUndefined(e){return typeof e==="undefined"}function isNumber(e){return typeof e==="number"}function isInteger(e){return typeof e==="number"&&e%1===0}function isString(e){return typeof e==="string"}function isDate(e){return Object.prototype.toString.call(e)==="[object Date]"}function hasRelative(){try{return typeof Intl!=="undefined"&&!!Intl.RelativeTimeFormat}catch(e){return false}}function hasLocaleWeekInfo(){try{return typeof Intl!=="undefined"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return false}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,t,n){if(e.length===0){return undefined}return e.reduce(((e,r)=>{const i=[t(r),r];if(!e){return i}else if(n(e[0],i[0])===e[0]){return e}else{return i}}),null)[1]}function pick(e,t){return t.reduce(((t,n)=>{t[n]=e[n];return t}),{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function validateWeekSettings(e){if(e==null){return null}else if(typeof e!=="object"){throw new InvalidArgumentError("Week settings must be an object")}else{if(!integerBetween(e.firstDay,1,7)||!integerBetween(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!integerBetween(e,1,7)))){throw new InvalidArgumentError("Invalid week settings")}return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}}function integerBetween(e,t,n){return isInteger(e)&&e>=t&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t=2){const n=e<0;let r;if(n){r="-"+(""+-e).padStart(t,"0")}else{r=(""+e).padStart(t,"0")}return r}function parseInteger(e){if(isUndefined(e)||e===null||e===""){return undefined}else{return parseInt(e,10)}}function parseFloating(e){if(isUndefined(e)||e===null||e===""){return undefined}else{return parseFloat(e)}}function parseMillis(e){if(isUndefined(e)||e===null||e===""){return undefined}else{const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function roundTo(e,t,n=false){const r=10**t,i=n?Math.trunc:Math.round;return i(e*r)/r}function isLeapYear(e){return e%4===0&&(e%100!==0||e%400===0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){const n=floorMod(t-1,12)+1,r=e+(t-n)/12;if(n===2){return isLeapYear(r)?29:28}else{return[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}}function objToLocalTS(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);if(e.year<100&&e.year>=0){t=new Date(t);t.setUTCFullYear(e.year,e.month-1,e.day)}return+t}function firstWeekOffset(e,t,n){const r=isoWeekdayToLocal(dayOfWeek(e,1,t),n);return-r+t-1}function weeksInWeekYear(e,t=4,n=1){const r=firstWeekOffset(e,t,n);const i=firstWeekOffset(e+1,t,n);return(daysInYear(e)-r+i)/7}function untruncateYear(e){if(e>99){return e}else return e>Settings.twoDigitCutoffYear?1900+e:2e3+e}function parseZoneInfo(e,t,n,r=null){const i=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};if(r){s.timeZone=r}const o={timeZoneName:t,...s};const a=new Intl.DateTimeFormat(n,o).formatToParts(i).find((e=>e.type.toLowerCase()==="timezonename"));return a?a.value:null}function signedOffset(e,t){let n=parseInt(e,10);if(Number.isNaN(n)){n=0}const r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function asNumber(e){const t=Number(e);if(typeof e==="boolean"||e===""||Number.isNaN(t))throw new InvalidArgumentError(`Invalid unit value ${e}`);return t}function normalizeObject(e,t){const n={};for(const r in e){if(hasOwnProperty(e,r)){const i=e[r];if(i===undefined||i===null)continue;n[t(r)]=asNumber(i)}}return n}function formatOffset(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${padStart(n,2)}:${padStart(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${padStart(n,2)}${padStart(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}const K=["January","February","March","April","May","June","July","August","September","October","November","December"];const X=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const ee=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[...ee];case"short":return[...X];case"long":return[...K];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const te=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];const ne=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];const re=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[...re];case"short":return[...ne];case"long":return[...te];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ie=["AM","PM"];const se=["Before Christ","Anno Domini"];const oe=["BC","AD"];const ae=["B","A"];function eras(e){switch(e){case"narrow":return[...ae];case"short":return[...oe];case"long":return[...se];default:return null}}function meridiemForDateTime(e){return ie[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n="always",r=false){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]};const s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const n=e==="days";switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),u=a===1,l=i[e],c=r?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return o?`${a} ${c} ago`:`in ${a} ${c}`}function stringifyTokens(e,t){let n="";for(const r of e){if(r.literal){n+=r.val}else{n+=t(r.val)}}return n}const ue={D:s,DD:o,DDD:u,DDDD:l,t:c,tt:f,ttt:d,tttt:h,T:m,TT:y,TTT:g,TTTT:p,f:T,ff:O,fff:D,ffff:I,F:w,FF:k,FFF:v,FFFF:b};class Formatter{static create(e,t={}){return new Formatter(e,t)}static parseFormat(e){let t=null,n="",r=false;const i=[];for(let s=0;s<e.length;s++){const o=e.charAt(s);if(o==="'"){if(n.length>0){i.push({literal:r||/^\s+$/.test(n),val:n})}t=null;n="";r=!r}else if(r){n+=o}else if(o===t){n+=o}else{if(n.length>0){i.push({literal:/^\s+$/.test(n),val:n})}n=o;t=o}}if(n.length>0){i.push({literal:r||/^\s+$/.test(n),val:n})}return i}static macroTokenToFormatOpts(e){return ue[e]}constructor(e,t){this.opts=t;this.loc=e;this.systemLoc=null}formatWithSystemDefault(e,t){if(this.systemLoc===null){this.systemLoc=this.loc.redefaultToSystem()}const n=this.systemLoc.dtFormatter(e,{...this.opts,...t});return n.format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){const n=this.dtFormatter(e.start,t);return n.dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple){return padStart(e,t)}const n={...this.opts};if(t>0){n.padTo=t}return this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",string=(t,n)=>this.loc.extract(e,t,n),formatOffset=t=>{if(e.isOffsetFixed&&e.offset===0&&t.allowZ){return"Z"}return e.isValid?e.zone.formatOffset(e.ts,t.format):""},meridiem=()=>n?meridiemForDateTime(e):string({hour:"numeric",hourCycle:"h12"},"dayperiod"),month=(t,r)=>n?monthForDateTime(e,t):string(r?{month:t}:{month:t,day:"numeric"},"month"),weekday=(t,r)=>n?weekdayForDateTime(e,t):string(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),maybeMacro=t=>{const n=Formatter.macroTokenToFormatOpts(t);if(n){return this.formatWithSystemDefault(e,n)}else{return t}},era=t=>n?eraForDateTime(e,t):string({era:t},"era"),tokenToString=t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return formatOffset({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return formatOffset({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return formatOffset({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return meridiem();case"d":return r?string({day:"numeric"},"day"):this.num(e.day);case"dd":return r?string({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return weekday("short",true);case"cccc":return weekday("long",true);case"ccccc":return weekday("narrow",true);case"E":return this.num(e.weekday);case"EEE":return weekday("short",false);case"EEEE":return weekday("long",false);case"EEEEE":return weekday("narrow",false);case"L":return r?string({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?string({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return month("short",true);case"LLLL":return month("long",true);case"LLLLL":return month("narrow",true);case"M":return r?string({month:"numeric"},"month"):this.num(e.month);case"MM":return r?string({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return month("short",false);case"MMMM":return month("long",false);case"MMMMM":return month("narrow",false);case"y":return r?string({year:"numeric"},"year"):this.num(e.year);case"yy":return r?string({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?string({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?string({year:"numeric"},"year"):this.num(e.year,6);case"G":return era("short");case"GG":return era("long");case"GGGGG":return era("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return maybeMacro(t)}};return stringifyTokens(Formatter.parseFormat(t),tokenToString)}formatDurationFromString(e,t){const tokenToField=e=>{switch(e[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}},tokenToString=e=>t=>{const n=tokenToField(t);if(n){return this.num(e.get(n),t.length)}else{return t}},n=Formatter.parseFormat(t),r=n.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]),i=e.shiftTo(...r.map(tokenToField).filter((e=>e)));return stringifyTokens(n,tokenToString(i))}}const le=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function combineRegexes(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function combineExtractors(...e){return t=>e.reduce((([e,n,r],i)=>{const[s,o,a]=i(t,r);return[{...e,...s},o||n,a]}),[{},null,1]).slice(0,2)}function parse(e,...t){if(e==null){return[null,null]}for(const[n,r]of t){const t=n.exec(e);if(t){return r(t)}}return[null,null]}function simpleParse(...e){return(t,n)=>{const r={};let i;for(i=0;i<e.length;i++){r[e[i]]=parseInteger(t[n+i])}return[r,null,n+i]}}const ce=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/;const fe=`(?:${ce.source}?(?:\\[(${le.source})\\])?)?`;const de=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;const he=RegExp(`${de.source}${fe}`);const me=RegExp(`(?:T${he.source})?`);const ye=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;const ge=/(\d{4})-?W(\d\d)(?:-?(\d))?/;const pe=/(\d{4})-?(\d{3})/;const Te=simpleParse("weekYear","weekNumber","weekDay");const we=simpleParse("year","ordinal");const Oe=/(\d{4})-(\d\d)-(\d\d)/;const ke=RegExp(`${de.source} ?(?:${ce.source}|(${le.source}))?`);const Se=RegExp(`(?: ${ke.source})?`);function int(e,t,n){const r=e[t];return isUndefined(r)?n:parseInteger(r)}function extractISOYmd(e,t){const n={year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)};return[n,null,t+3]}function extractISOTime(e,t){const n={hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])};return[n,null,t+4]}function extractISOOffset(e,t){const n=!e[t]&&!e[t+1],r=signedOffset(e[t+1],e[t+2]),i=n?null:FixedOffsetZone.instance(r);return[{},i,t+3]}function extractIANAZone(e,t){const n=e[t]?IANAZone.create(e[t]):null;return[{},n,t+1]}const De=RegExp(`^T?${de.source}$`);const ve=/^-?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 extractISODuration(e){const[t,n,r,i,s,o,a,u,l]=e;const c=t[0]==="-";const f=u&&u[0]==="-";const maybeNegate=(e,t=false)=>e!==undefined&&(t||e&&c)?-e:e;return[{years:maybeNegate(parseFloating(n)),months:maybeNegate(parseFloating(r)),weeks:maybeNegate(parseFloating(i)),days:maybeNegate(parseFloating(s)),hours:maybeNegate(parseFloating(o)),minutes:maybeNegate(parseFloating(a)),seconds:maybeNegate(parseFloating(u),u==="-0"),milliseconds:maybeNegate(parseMillis(l),f)}]}const Ie={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fromStrings(e,t,n,r,i,s,o){const a={year:t.length===2?untruncateYear(parseInteger(t)):parseInteger(t),month:X.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(s)};if(o)a.second=parseInteger(o);if(e){a.weekday=e.length>3?te.indexOf(e)+1:ne.indexOf(e)+1}return a}const be=/^(?:(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 extractRFC2822(e){const[,t,n,r,i,s,o,a,u,l,c,f]=e,d=fromStrings(t,i,r,n,s,o,a);let h;if(u){h=Ie[u]}else if(l){h=0}else{h=signedOffset(c,f)}return[d,new FixedOffsetZone(h)]}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ne=/^(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$/,Ee=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){const[,t,n,r,i,s,o,a]=e,u=fromStrings(t,i,r,n,s,o,a);return[u,FixedOffsetZone.utcInstance]}function extractASCII(e){const[,t,n,r,i,s,o,a]=e,u=fromStrings(t,a,n,r,i,s,o);return[u,FixedOffsetZone.utcInstance]}const Me=combineRegexes(ye,me);const Ce=combineRegexes(ge,me);const Fe=combineRegexes(pe,me);const _e=combineRegexes(he);const Ze=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone);const Le=combineExtractors(Te,extractISOTime,extractISOOffset,extractIANAZone);const We=combineExtractors(we,extractISOTime,extractISOOffset,extractIANAZone);const Ae=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseISODate(e){return parse(e,[Me,Ze],[Ce,Le],[Fe,We],[_e,Ae])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[be,extractRFC2822])}function parseHTTPDate(e){return parse(e,[Ne,extractRFC1123Or850],[Ee,extractRFC1123Or850],[xe,extractASCII])}function parseISODuration(e){return parse(e,[ve,extractISODuration])}const Ue=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[De,Ue])}const Re=combineRegexes(Oe,Se);const Ve=combineRegexes(ke);const $e=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[Re,Ze],[Ve,$e])}const je="Invalid Duration";const ze={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Pe={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...ze},qe=146097/400,Ye=146097/4800,Je={years:{quarters:4,months:12,weeks:qe/7,days:qe,hours:qe*24,minutes:qe*24*60,seconds:qe*24*60*60,milliseconds:qe*24*60*60*1e3},quarters:{months:3,weeks:qe/28,days:qe/4,hours:qe*24/4,minutes:qe*24*60/4,seconds:qe*24*60*60/4,milliseconds:qe*24*60*60*1e3/4},months:{weeks:Ye/7,days:Ye,hours:Ye*24,minutes:Ye*24*60,seconds:Ye*24*60*60,milliseconds:Ye*24*60*60*1e3},...ze};const He=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"];const Ge=He.slice(0).reverse();function clone$1(e,t,n=false){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Duration(r)}function durationToMillis(e,t){var n;let r=(n=t.milliseconds)!=null?n:0;for(const n of Ge.slice(1)){if(t[n]){r+=t[n]*e[n]["milliseconds"]}}return r}function normalizeValues(e,t){const n=durationToMillis(e,t)<0?-1:1;He.reduceRight(((r,i)=>{if(!isUndefined(t[i])){if(r){const s=t[r]*n;const o=e[i][r];const a=Math.floor(s/o);t[i]+=a*n;t[r]-=a*o*n}return i}else{return r}}),null);He.reduce(((n,r)=>{if(!isUndefined(t[r])){if(n){const i=t[n]%1;t[n]-=i;t[r]+=i*e[n][r]}return r}else{return n}}),null)}function removeZeroes(e){const t={};for(const[n,r]of Object.entries(e)){if(r!==0){t[n]=r}}return t}class Duration{constructor(e){const t=e.conversionAccuracy==="longterm"||false;let n=t?Je:Pe;if(e.matrix){n=e.matrix}this.values=e.values;this.loc=e.loc||Locale.create();this.conversionAccuracy=t?"longterm":"casual";this.invalid=e.invalid||null;this.matrix=n;this.isLuxonDuration=true}static fromMillis(e,t){return Duration.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!=="object"){throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`)}return new Duration({values:normalizeObject(e,Duration.normalizeUnit),loc:Locale.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(isNumber(e)){return Duration.fromMillis(e)}else if(Duration.isDuration(e)){return e}else if(typeof e==="object"){return Duration.fromObject(e)}else{throw new InvalidArgumentError(`Unknown duration argument ${e} of type ${typeof e}`)}}static fromISO(e,t){const[n]=parseISODuration(e);if(n){return Duration.fromObject(n,t)}else{return Duration.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}}static fromISOTime(e,t){const[n]=parseISOTimeOnly(e);if(n){return Duration.fromObject(n,t)}else{return Duration.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}}static invalid(e,t=null){if(!e){throw new InvalidArgumentError("need to specify a reason the Duration is invalid")}const n=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid){throw new InvalidDurationError(n)}else{return new Duration({invalid:n})}}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new InvalidUnitError(e);return t}static isDuration(e){return e&&e.isLuxonDuration||false}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:t.round!==false&&t.floor!==false};return this.isValid?Formatter.create(this.loc,n).formatDurationFromString(this,e):je}toHuman(e={}){if(!this.isValid)return je;const t=He.map((t=>{const n=this.values[t];if(isUndefined(n)){return null}return this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){if(!this.isValid)return{};return{...this.values}}toISO(){if(!this.isValid)return null;let e="P";if(this.years!==0)e+=this.years+"Y";if(this.months!==0||this.quarters!==0)e+=this.months+this.quarters*3+"M";if(this.weeks!==0)e+=this.weeks+"W";if(this.days!==0)e+=this.days+"D";if(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)e+="T";if(this.hours!==0)e+=this.hours+"H";if(this.minutes!==0)e+=this.minutes+"M";if(this.seconds!==0||this.milliseconds!==0)e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S";if(e==="P")e+="T0S";return e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:false,suppressSeconds:false,includePrefix:false,format:"extended",...e,includeOffset:false};const n=DateTime.fromMillis(t,{zone:"UTC"});return n.toISOTime(e)}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 durationToMillis(this.matrix,this.values)}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e),n={};for(const e of He){if(hasOwnProperty(t.values,e)||hasOwnProperty(this.values,e)){n[e]=t.get(e)+this.get(e)}}return clone$1(this,{values:n},true)}minus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values)){t[n]=asNumber(e(this.values[n],n))}return clone$1(this,{values:t},true)}get(e){return this[Duration.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...normalizeObject(e,Duration.normalizeUnit)};return clone$1(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){const i=this.loc.clone({locale:e,numberingSystem:t});const s={loc:i,matrix:r,conversionAccuracy:n};return clone$1(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();normalizeValues(this.matrix,e);return clone$1(this,{values:e},true)}rescale(){if(!this.isValid)return this;const e=removeZeroes(this.normalize().shiftToAll().toObject());return clone$1(this,{values:e},true)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0){return this}e=e.map((e=>Duration.normalizeUnit(e)));const t={},n={},r=this.toObject();let i;for(const s of He){if(e.indexOf(s)>=0){i=s;let e=0;for(const t in n){e+=this.matrix[t][s]*n[t];n[t]=0}if(isNumber(r[s])){e+=r[s]}const o=Math.trunc(e);t[s]=o;n[s]=(e*1e3-o*1e3)/1e3}else if(isNumber(r[s])){n[s]=r[s]}}for(const e in n){if(n[e]!==0){t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]}}normalizeValues(this.matrix,t);return clone$1(this,{values:t},true)}shiftToAll(){if(!this.isValid)return this;return this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds")}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values)){e[t]=this.values[t]===0?0:-this.values[t]}return clone$1(this,{values:e},true)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid){return false}if(!this.loc.equals(e.loc)){return false}function eq(e,t){if(e===undefined||e===0)return t===undefined||t===0;return e===t}for(const t of He){if(!eq(this.values[t],e.values[t])){return false}}return true}}const Be="Invalid Interval";function validateStartEnd(e,t){if(!e||!e.isValid){return Interval.invalid("missing or invalid start")}else if(!t||!t.isValid){return Interval.invalid("missing or invalid end")}else if(t<e){return Interval.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`)}else{return null}}class Interval{constructor(e){this.s=e.start;this.e=e.end;this.invalid=e.invalid||null;this.isLuxonInterval=true}static invalid(e,t=null){if(!e){throw new InvalidArgumentError("need to specify a reason the Interval is invalid")}const n=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid){throw new InvalidIntervalError(n)}else{return new Interval({invalid:n})}}static fromDateTimes(e,t){const n=friendlyDateTime(e),r=friendlyDateTime(t);const i=validateStartEnd(n,r);if(i==null){return new Interval({start:n,end:r})}else{return i}}static after(e,t){const n=Duration.fromDurationLike(t),r=friendlyDateTime(e);return Interval.fromDateTimes(r,r.plus(n))}static before(e,t){const n=Duration.fromDurationLike(t),r=friendlyDateTime(e);return Interval.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,i;try{e=DateTime.fromISO(n,t);i=e.isValid}catch(r){i=false}let s,o;try{s=DateTime.fromISO(r,t);o=s.isValid}catch(r){o=false}if(i&&o){return Interval.fromDateTimes(e,s)}if(i){const n=Duration.fromISO(r,t);if(n.isValid){return Interval.after(e,n)}}else if(o){const e=Duration.fromISO(n,t);if(e.isValid){return Interval.before(s,e)}}}return Interval.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||false}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(e="milliseconds"){return this.isValid?this.toDuration(...[e]).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;if(t!=null&&t.useLocaleWeeks){r=this.end.reconfigure({locale:n.locale})}else{r=this.end}r=r.startOf(e,t);return Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):false}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){if(!this.isValid)return false;return this.s>e}isBefore(e){if(!this.isValid)return false;return this.e<=e}contains(e){if(!this.isValid)return false;return this.s<=e&&this.e>e}set({start:e,end:t}={}){if(!this.isValid)return this;return Interval.fromDateTimes(e||this.s,t||this.e)}splitAt(...e){if(!this.isValid)return[];const t=e.map(friendlyDateTime).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:r}=this,i=0;while(r<this.e){const e=t[i]||this.e,s=+e>+this.e?this.e:e;n.push(Interval.fromDateTimes(r,s));r=s;i+=1}return n}splitBy(e){const t=Duration.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0){return[]}let{s:n}=this,r=1,i;const s=[];while(n<this.e){const e=this.start.plus(t.mapUnits((e=>e*r)));i=+e>+this.e?this.e:e;s.push(Interval.fromDateTimes(n,i));n=i;r+=1}return s}divideEqually(e){if(!this.isValid)return[];return this.splitBy(this.length()/e).slice(0,e)}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){if(!this.isValid)return false;return+this.e===+e.s}abutsEnd(e){if(!this.isValid)return false;return+e.e===+this.s}engulfs(e){if(!this.isValid)return false;return this.s<=e.s&&this.e>=e.e}equals(e){if(!this.isValid||!e.isValid){return false}return this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;if(t>=n){return null}else{return Interval.fromDateTimes(t,n)}}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Interval.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>{if(!t){return[e,n]}else if(t.overlaps(n)||t.abutsStart(n)){return[e,t.union(n)]}else{return[e.concat([t]),n]}}),[[],null]);if(n){t.push(n)}return t}static xor(e){let t=null,n=0;const r=[],i=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),s=Array.prototype.concat(...i),o=s.sort(((e,t)=>e.time-t.time));for(const e of o){n+=e.type==="s"?1:-1;if(n===1){t=e.time}else{if(t&&+t!==+e.time){r.push(Interval.fromDateTimes(t,e.time))}t=null}}return Interval.merge(r)}difference(...e){return Interval.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){if(!this.isValid)return Be;return`[${this.s.toISO()} – ${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(e=s,t={}){return this.isValid?Formatter.create(this.s.loc.clone(t),e).formatInterval(this):Be}toISO(e){if(!this.isValid)return Be;return`${this.s.toISO(e)}/${this.e.toISO(e)}`}toISODate(){if(!this.isValid)return Be;return`${this.s.toISODate()}/${this.e.toISODate()}`}toISOTime(e){if(!this.isValid)return Be;return`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`}toFormat(e,{separator:t=" – "}={}){if(!this.isValid)return Be;return`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`}toDuration(e,t){if(!this.isValid){return Duration.invalid(this.invalidReason)}return this.e.diff(this.s,e,t)}mapEndpoints(e){return Interval.fromDateTimes(e(this.s),e(this.e))}}class Info{static hasDST(e=Settings.defaultZone){const t=DateTime.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return IANAZone.isValidZone(e)}static normalizeZone(e){return normalizeZone(e,Settings.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Locale.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Locale.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Locale.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||Locale.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||Locale.create(t,n,i)).months(e,true)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Locale.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Locale.create(t,n,null)).weekdays(e,true)}static meridiems({locale:e=null}={}){return Locale.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Locale.create(t,null,"gregory").eras(e)}static features(){return{relative:hasRelative(),localeWeek:hasLocaleWeekInfo()}}}function dayDiff(e,t){const utcDayStart=e=>e.toUTC(0,{keepLocalTime:true}).startOf("day").valueOf(),n=utcDayStart(t)-utcDayStart(e);return Math.floor(Duration.fromMillis(n).as("days"))}function highOrderDiffs(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],["months",(e,t)=>t.month-e.month+(t.year-e.year)*12],["weeks",(e,t)=>{const n=dayDiff(e,t);return(n-n%7)/7}],["days",dayDiff]];const i={};const s=e;let o,a;for(const[u,l]of r){if(n.indexOf(u)>=0){o=u;i[u]=l(e,t);a=s.plus(i);if(a>t){i[u]--;e=s.plus(i);if(e>t){a=e;i[u]--;e=s.plus(i)}}else{e=a}}}return[e,i,a,o]}function diff(e,t,n,r){let[i,s,o,a]=highOrderDiffs(e,t,n);const u=t-i;const l=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));if(l.length===0){if(o<t){o=i.plus({[a]:1})}if(o!==i){s[a]=(s[a]||0)+u/(o-i)}}const c=Duration.fromObject(s,r);if(l.length>0){return Duration.fromMillis(u,r).shiftTo(...l).plus(c)}else{return c}}const Qe="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t=e=>e){return{regex:e,deser:([e])=>t(parseDigits(e))}}const Ke=String.fromCharCode(160);const Xe=`[ ${Ke}]`;const et=new RegExp(Xe,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(et,Xe)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(et," ").toLowerCase()}function oneOf(e,t){if(e===null){return null}else{return{regex:RegExp(e.map(fixListRegex).join("|")),deser:([n])=>e.findIndex((e=>stripInsensitivities(n)===stripInsensitivities(e)))+t}}}function offset(e,t){return{regex:e,deser:([,e,t])=>signedOffset(e,t),groups:t}}function simple(e){return{regex:e,deser:([e])=>e}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(e,t){const n=digitRegex(t),r=digitRegex(t,"{2}"),i=digitRegex(t,"{3}"),s=digitRegex(t,"{4}"),o=digitRegex(t,"{6}"),a=digitRegex(t,"{1,2}"),u=digitRegex(t,"{1,3}"),l=digitRegex(t,"{1,6}"),c=digitRegex(t,"{1,9}"),f=digitRegex(t,"{2,4}"),d=digitRegex(t,"{4,6}"),literal=e=>({regex:RegExp(escapeToken(e.val)),deser:([e])=>e,literal:true}),unitate=h=>{if(e.literal){return literal(h)}switch(h.val){case"G":return oneOf(t.eras("short"),0);case"GG":return oneOf(t.eras("long"),0);case"y":return intUnit(l);case"yy":return intUnit(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(d);case"yyyyyy":return intUnit(o);case"M":return intUnit(a);case"MM":return intUnit(r);case"MMM":return oneOf(t.months("short",true),1);case"MMMM":return oneOf(t.months("long",true),1);case"L":return intUnit(a);case"LL":return intUnit(r);case"LLL":return oneOf(t.months("short",false),1);case"LLLL":return oneOf(t.months("long",false),1);case"d":return intUnit(a);case"dd":return intUnit(r);case"o":return intUnit(u);case"ooo":return intUnit(i);case"HH":return intUnit(r);case"H":return intUnit(a);case"hh":return intUnit(r);case"h":return intUnit(a);case"mm":return intUnit(r);case"m":return intUnit(a);case"q":return intUnit(a);case"qq":return intUnit(r);case"s":return intUnit(a);case"ss":return intUnit(r);case"S":return intUnit(u);case"SSS":return intUnit(i);case"u":return simple(c);case"uu":return simple(a);case"uuu":return intUnit(n);case"a":return oneOf(t.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(a);case"WW":return intUnit(r);case"E":case"c":return intUnit(n);case"EEE":return oneOf(t.weekdays("short",false),1);case"EEEE":return oneOf(t.weekdays("long",false),1);case"ccc":return oneOf(t.weekdays("short",true),1);case"cccc":return oneOf(t.weekdays("long",true),1);case"Z":case"ZZ":return offset(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return offset(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);case" ":return simple(/[^\S\n\r]/);default:return literal(h)}};const h=unitate(e)||{invalidReason:Qe};h.token=e;return h}const tt={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 tokenForPart(e,t,n){const{type:r,value:i}=e;if(r==="literal"){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const s=t[r];let o=r;if(r==="hour"){if(t.hour12!=null){o=t.hour12?"hour12":"hour24"}else if(t.hourCycle!=null){if(t.hourCycle==="h11"||t.hourCycle==="h12"){o="hour12"}else{o="hour24"}}else{o=n.hour12?"hour12":"hour24"}}let a=tt[o];if(typeof a==="object"){a=a[s]}if(a){return{literal:false,val:a}}return undefined}function buildRegex(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"");return[`^${t}$`,e]}function match(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const i in n){if(hasOwnProperty(n,i)){const s=n[i],o=s.groups?s.groups+1:1;if(!s.literal&&s.token){e[s.token.val[0]]=s.deser(r.slice(t,t+o))}t+=o}}return[r,e]}else{return[r,{}]}}function dateTimeFromMatches(e){const toField=e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null;let n;if(!isUndefined(e.z)){t=IANAZone.create(e.z)}if(!isUndefined(e.Z)){if(!t){t=new FixedOffsetZone(e.Z)}n=e.Z}if(!isUndefined(e.q)){e.M=(e.q-1)*3+1}if(!isUndefined(e.h)){if(e.h<12&&e.a===1){e.h+=12}else if(e.h===12&&e.a===0){e.h=0}}if(e.G===0&&e.y){e.y=-e.y}if(!isUndefined(e.u)){e.S=parseMillis(e.u)}const r=Object.keys(e).reduce(((t,n)=>{const r=toField(n);if(r){t[r]=e[n]}return t}),{});return[r,t,n]}let nt=null;function getDummyDateTime(){if(!nt){nt=DateTime.fromMillis(1555555555555)}return nt}function maybeExpandMacroToken(e,t){if(e.literal){return e}const n=Formatter.macroTokenToFormatOpts(e.val);const r=formatOptsToTokens(n,t);if(r==null||r.includes(undefined)){return e}return r}function expandMacroTokens(e,t){return Array.prototype.concat(...e.map((e=>maybeExpandMacroToken(e,t))))}class TokenParser{constructor(e,t){this.locale=e;this.format=t;this.tokens=expandMacroTokens(Formatter.parseFormat(t),e);this.units=this.tokens.map((t=>unitForToken(t,e)));this.disqualifyingUnit=this.units.find((e=>e.invalidReason));if(!this.disqualifyingUnit){const[e,t]=buildRegex(this.units);this.regex=RegExp(e,"i");this.handlers=t}}explainFromTokens(e){if(!this.isValid){return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}else{const[t,n]=match(e,this.regex,this.handlers),[r,i,s]=n?dateTimeFromMatches(n):[null,null,undefined];if(hasOwnProperty(n,"a")&&hasOwnProperty(n,"H")){throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format")}return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:s}}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function explainFromTokens(e,t,n){const r=new TokenParser(e,n);return r.explainFromTokens(t)}function parseFromTokens(e,t,n){const{result:r,zone:i,specificOffset:s,invalidReason:o}=explainFromTokens(e,t,n);return[r,i,s,o]}function formatOptsToTokens(e,t){if(!e){return null}const n=Formatter.create(t,e);const r=n.dtFormatter(getDummyDateTime());const i=r.formatToParts();const s=r.resolvedOptions();return i.map((t=>tokenForPart(t,e,s)))}const rt="Invalid DateTime";const it=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",`the zone "${e.name}" is not supported`)}function possiblyCachedWeekData(e){if(e.weekData===null){e.weekData=gregorianToWeek(e.c)}return e.weekData}function possiblyCachedLocalWeekData(e){if(e.localWeekData===null){e.localWeekData=gregorianToWeek(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())}return e.localWeekData}function clone(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime({...n,...t,old:n})}function fixOffset(e,t,n){let r=e-t*60*1e3;const i=n.offset(r);if(t===i){return[r,t]}r-=(i-t)*60*1e3;const s=n.offset(r);if(i===s){return[r,i]}return[e-Math.min(i,s)*60*1e3,Math.max(i,s)]}function tsToObj(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=objToLocalTS(s);let[u,l]=fixOffset(a,n,e.zone);if(o!==0){u+=o;l=e.zone.offset(u)}return{ts:u,o:l}}function parseDataToDateTime(e,t,n,r,i,s){const{setZone:o,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const r=t||a,i=DateTime.fromObject(e,{...n,zone:r,specificOffset:s});return o?i:i.setZone(a)}else{return DateTime.invalid(new Invalid("unparsable",`the input "${i}" can't be parsed as ${r}`))}}function toTechFormat(e,t,n=true){return e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:true}).formatDateTimeFromString(e,t):null}function toISODate(e,t){const n=e.c.year>9999||e.c.year<0;let r="";if(n&&e.c.year>=0)r+="+";r+=padStart(e.c.year,n?6:4);if(t){r+="-";r+=padStart(e.c.month);r+="-";r+=padStart(e.c.day)}else{r+=padStart(e.c.month);r+=padStart(e.c.day)}return r}function toISOTime(e,t,n,r,i,s){let o=padStart(e.c.hour);if(t){o+=":";o+=padStart(e.c.minute);if(e.c.millisecond!==0||e.c.second!==0||!n){o+=":"}}else{o+=padStart(e.c.minute)}if(e.c.millisecond!==0||e.c.second!==0||!n){o+=padStart(e.c.second);if(e.c.millisecond!==0||!r){o+=".";o+=padStart(e.c.millisecond,3)}}if(i){if(e.isOffsetFixed&&e.offset===0&&!s){o+="Z"}else if(e.o<0){o+="-";o+=padStart(Math.trunc(-e.o/60));o+=":";o+=padStart(Math.trunc(-e.o%60))}else{o+="+";o+=padStart(Math.trunc(e.o/60));o+=":";o+=padStart(Math.trunc(e.o%60))}}if(s){o+="["+e.zone.ianaName+"]"}return o}const st={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ot={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},at={ordinal:1,hour:0,minute:0,second:0,millisecond:0};const ut=["year","month","day","hour","minute","second","millisecond"],lt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ct=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new InvalidUnitError(e);return t}function normalizeUnitWithLocalWeeks(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return normalizeUnit(e)}}function guessOffsetForZone(e){if(!dt[e]){if(ft===undefined){ft=Settings.now()}dt[e]=e.offset(ft)}return dt[e]}function quickDT(e,t){const n=normalizeZone(t.zone,Settings.defaultZone);if(!n.isValid){return DateTime.invalid(unsupportedZone(n))}const r=Locale.fromObject(t);let i,s;if(!isUndefined(e.year)){for(const t of ut){if(isUndefined(e[t])){e[t]=st[t]}}const t=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(t){return DateTime.invalid(t)}const r=guessOffsetForZone(n);[i,s]=objToTS(e,r,n)}else{i=Settings.now()}return new DateTime({ts:i,zone:n,loc:r,o:s})}function diffRelative(e,t,n){const r=isUndefined(n.round)?true:n.round,format=(e,i)=>{e=roundTo(e,r||n.calendary?0:2,true);const s=t.loc.clone(n).relFormatter(n);return s.format(e,i)},differ=r=>{if(n.calendary){if(!t.hasSame(e,r)){return t.startOf(r).diff(e.startOf(r),r).get(r)}else return 0}else{return t.diff(e,r).get(r)}};if(n.unit){return format(differ(n.unit),n.unit)}for(const e of n.units){const t=differ(e);if(Math.abs(t)>=1){return format(t,e)}}return format(e>t?-0:0,n.units[n.units.length-1])}function lastOpts(e){let t={},n;if(e.length>0&&typeof e[e.length-1]==="object"){t=e[e.length-1];n=Array.from(e).slice(0,e.length-1)}else{n=Array.from(e)}return[t,n]}let ft;let dt={};class DateTime{constructor(e){const t=e.zone||Settings.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(!t.isValid?unsupportedZone(t):null);this.ts=isUndefined(e.ts)?Settings.now():e.ts;let r=null,i=null;if(!n){const s=e.old&&e.old.ts===this.ts&&e.old.zone.equals(t);if(s){[r,i]=[e.old.c,e.old.o]}else{const s=isNumber(e.o)&&!e.old?e.o:t.offset(this.ts);r=tsToObj(this.ts,s);n=Number.isNaN(r.year)?new Invalid("invalid input"):null;r=n?null:r;i=n?null:s}}this._zone=t;this.loc=e.loc||Locale.create();this.invalid=n;this.weekData=null;this.localWeekData=null;this.c=r;this.o=i;this.isLuxonDateTime=true}static now(){return new DateTime({})}static local(){const[e,t]=lastOpts(arguments),[n,r,i,s,o,a,u]=t;return quickDT({year:n,month:r,day:i,hour:s,minute:o,second:a,millisecond:u},e)}static utc(){const[e,t]=lastOpts(arguments),[n,r,i,s,o,a,u]=t;e.zone=FixedOffsetZone.utcInstance;return quickDT({year:n,month:r,day:i,hour:s,minute:o,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const n=isDate(e)?e.valueOf():NaN;if(Number.isNaN(n)){return DateTime.invalid("invalid input")}const r=normalizeZone(t.zone,Settings.defaultZone);if(!r.isValid){return DateTime.invalid(unsupportedZone(r))}return new DateTime({ts:n,zone:r,loc:Locale.fromObject(t)})}static fromMillis(e,t={}){if(!isNumber(e)){throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}else if(e<-it||e>it){return DateTime.invalid("Timestamp out of range")}else{return new DateTime({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)})}}static fromSeconds(e,t={}){if(!isNumber(e)){throw new InvalidArgumentError("fromSeconds requires a numerical input")}else{return new DateTime({ts:e*1e3,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)})}}static fromObject(e,t={}){e=e||{};const n=normalizeZone(t.zone,Settings.defaultZone);if(!n.isValid){return DateTime.invalid(unsupportedZone(n))}const r=Locale.fromObject(t);const i=normalizeObject(e,normalizeUnitWithLocalWeeks);const{minDaysInFirstWeek:s,startOfWeek:o}=usesLocalWeekValues(i,r);const a=Settings.now(),u=!isUndefined(t.specificOffset)?t.specificOffset:n.offset(a),l=!isUndefined(i.ordinal),c=!isUndefined(i.year),f=!isUndefined(i.month)||!isUndefined(i.day),d=c||f,h=i.weekYear||i.weekNumber;if((d||l)&&h){throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals")}if(f&&l){throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day")}const m=h||i.weekday&&!d;let y,g,p=tsToObj(a,u);if(m){y=lt;g=ot;p=gregorianToWeek(p,s,o)}else if(l){y=ct;g=at;p=gregorianToOrdinal(p)}else{y=ut;g=st}let T=false;for(const e of y){const t=i[e];if(!isUndefined(t)){T=true}else if(T){i[e]=g[e]}else{i[e]=p[e]}}const w=m?hasInvalidWeekData(i,s,o):l?hasInvalidOrdinalData(i):hasInvalidGregorianData(i),O=w||hasInvalidTimeData(i);if(O){return DateTime.invalid(O)}const k=m?weekToGregorian(i,s,o):l?ordinalToGregorian(i):i,[S,D]=objToTS(k,u,n),v=new DateTime({ts:S,zone:n,o:D,loc:r});if(i.weekday&&d&&e.weekday!==v.weekday){return DateTime.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${v.toISO()}`)}if(!v.isValid){return DateTime.invalid(v.invalid)}return v}static fromISO(e,t={}){const[n,r]=parseISODate(e);return parseDataToDateTime(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=parseRFC2822Date(e);return parseDataToDateTime(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=parseHTTPDate(e);return parseDataToDateTime(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(isUndefined(e)||isUndefined(t)){throw new InvalidArgumentError("fromFormat requires an input string and a format")}const{locale:r=null,numberingSystem:i=null}=n,s=Locale.fromOpts({locale:r,numberingSystem:i,defaultToEN:true}),[o,a,u,l]=parseFromTokens(s,e,t);if(l){return DateTime.invalid(l)}else{return parseDataToDateTime(o,a,n,`format ${t}`,e,u)}}static fromString(e,t,n={}){return DateTime.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=parseSQL(e);return parseDataToDateTime(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e){throw new InvalidArgumentError("need to specify a reason the DateTime is invalid")}const n=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid){throw new InvalidDateTimeError(n)}else{return new DateTime({invalid:n})}}static isDateTime(e){return e&&e.isLuxonDateTime||false}static parseFormatForOpts(e,t={}){const n=formatOptsToTokens(e,Locale.fromObject(t));return!n?null:n.map((e=>e?e.val:null)).join("")}static expandFormat(e,t={}){const n=expandMacroTokens(Formatter.parseFormat(e),Locale.fromObject(t));return n.map((e=>e.val)).join("")}static resetCache(){ft=undefined;dt={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}get weekNumber(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}get weekday(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?possiblyCachedLocalWeekData(this).weekday:NaN}get localWeekNumber(){return this.isValid?possiblyCachedLocalWeekData(this).weekNumber:NaN}get localWeekYear(){return this.isValid?possiblyCachedLocalWeekData(this).weekYear:NaN}get ordinal(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}get monthShort(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Info.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 false}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 e=864e5;const t=6e4;const n=objToLocalTS(this.c);const r=this.zone.offset(n-e);const i=this.zone.offset(n+e);const s=this.zone.offset(n-r*t);const o=this.zone.offset(n-i*t);if(s===o){return[this]}const a=n-s*t;const u=n-o*t;const l=tsToObj(a,s);const c=tsToObj(u,o);if(l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond){return[clone(this,{ts:a}),clone(this,{ts:u})]}return[this]}get isInLeapYear(){return isLeapYear(this.year)}get daysInMonth(){return daysInMonth(this.year,this.month)}get daysInYear(){return this.isValid?daysInYear(this.year):NaN}get weeksInWeekYear(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?weeksInWeekYear(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Formatter.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(FixedOffsetZone.instance(e),t)}toLocal(){return this.setZone(Settings.defaultZone)}setZone(e,{keepLocalTime:t=false,keepCalendarTime:n=false}={}){e=normalizeZone(e,Settings.defaultZone);if(e.equals(this.zone)){return this}else if(!e.isValid){return DateTime.invalid(unsupportedZone(e))}else{let r=this.ts;if(t||n){const t=e.offset(this.ts);const n=this.toObject();[r]=objToTS(n,t,e)}return clone(this,{ts:r,zone:e})}}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){const r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return clone(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=normalizeObject(e,normalizeUnitWithLocalWeeks);const{minDaysInFirstWeek:n,startOfWeek:r}=usesLocalWeekValues(t,this.loc);const i=!isUndefined(t.weekYear)||!isUndefined(t.weekNumber)||!isUndefined(t.weekday),s=!isUndefined(t.ordinal),o=!isUndefined(t.year),a=!isUndefined(t.month)||!isUndefined(t.day),u=o||a,l=t.weekYear||t.weekNumber;if((u||s)&&l){throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals")}if(a&&s){throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day")}let c;if(i){c=weekToGregorian({...gregorianToWeek(this.c,n,r),...t},n,r)}else if(!isUndefined(t.ordinal)){c=ordinalToGregorian({...gregorianToOrdinal(this.c),...t})}else{c={...this.toObject(),...t};if(isUndefined(t.day)){c.day=Math.min(daysInMonth(c.year,c.month),c.day)}}const[f,d]=objToTS(c,this.o,this.zone);return clone(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e);return clone(this,adjustTime(this,t))}minus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e).negate();return clone(this,adjustTime(this,t))}startOf(e,{useLocaleWeeks:t=false}={}){if(!this.isValid)return this;const n={},r=Duration.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"){if(t){const e=this.loc.getStartOfWeek();const{weekday:t}=this;if(t<e){n.weekNumber=this.weekNumber-1}n.weekday=e}else{n.weekday=1}}if(r==="quarters"){const e=Math.ceil(this.month/3);n.month=(e-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):rt}toLocaleString(e=s,t={}){return this.isValid?Formatter.create(this.loc.clone(t),e).formatDateTime(this):rt}toLocaleParts(e={}){return this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=false,suppressMilliseconds:n=false,includeOffset:r=true,extendedZone:i=false}={}){if(!this.isValid){return null}const s=e==="extended";let o=toISODate(this,s);o+="T";o+=toISOTime(this,s,t,n,r,i);return o}toISODate({format:e="extended"}={}){if(!this.isValid){return null}return toISODate(this,e==="extended")}toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=false,suppressSeconds:t=false,includeOffset:n=true,includePrefix:r=false,extendedZone:i=false,format:s="extended"}={}){if(!this.isValid){return null}let o=r?"T":"";return o+toISOTime(this,s==="extended",t,e,n,i)}toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",false)}toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){if(!this.isValid){return null}return toISODate(this,true)}toSQLTime({includeOffset:e=true,includeZone:t=false,includeOffsetSpace:n=true}={}){let r="HH:mm:ss.SSS";if(t||e){if(n){r+=" "}if(t){r+="z"}else if(e){r+="ZZ"}}return toTechFormat(this,r,true)}toSQL(e={}){if(!this.isValid){return null}return`${this.toSQLDate()} ${this.toSQLTime(e)}`}toString(){return this.isValid?this.toISO():rt}[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/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};if(e.includeConfig){t.outputCalendar=this.outputCalendar;t.numberingSystem=this.loc.numberingSystem;t.locale=this.loc.locale}return t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid){return Duration.invalid("created by diffing an invalid DateTime")}const r={locale:this.locale,numberingSystem:this.numberingSystem,...n};const i=maybeArray(t).map(Duration.normalizeUnit),s=e.valueOf()>this.valueOf(),o=s?this:e,a=s?e:this,u=diff(o,a,i,r);return s?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(DateTime.now(),e,t)}until(e){return this.isValid?Interval.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return false;const r=e.valueOf();const i=this.setZone(e.zone,{keepLocalTime:true});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||DateTime.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"];let i=e.unit;if(Array.isArray(e.unit)){r=e.unit;i=undefined}return diffRelative(t,this.plus(n),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){if(!this.isValid)return null;return diffRelative(e.base||DateTime.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:true})}static min(...e){if(!e.every(DateTime.isDateTime)){throw new InvalidArgumentError("min requires all arguments be DateTimes")}return bestBy(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(DateTime.isDateTime)){throw new InvalidArgumentError("max requires all arguments be DateTimes")}return bestBy(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n,s=Locale.fromOpts({locale:r,numberingSystem:i,defaultToEN:true});return explainFromTokens(s,e,t)}static fromStringExplain(e,t,n={}){return DateTime.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=Locale.fromOpts({locale:n,numberingSystem:r,defaultToEN:true});return new TokenParser(i,e)}static fromFormatParser(e,t,n={}){if(isUndefined(e)||isUndefined(t)){throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser")}const{locale:r=null,numberingSystem:i=null}=n,s=Locale.fromOpts({locale:r,numberingSystem:i,defaultToEN:true});if(!s.equals(t.locale)){throw new InvalidArgumentError(`fromFormatParser called with a locale of ${s}, `+`but the format parser was created for ${t.locale}`)}const{result:o,zone:a,specificOffset:u,invalidReason:l}=t.explainFromTokens(e);if(l){return DateTime.invalid(l)}else{return parseDataToDateTime(o,a,n,`format ${t.format}`,e,u)}}static get DATE_SHORT(){return s}static get DATE_MED(){return o}static get DATE_MED_WITH_WEEKDAY(){return a}static get DATE_FULL(){return u}static get DATE_HUGE(){return l}static get TIME_SIMPLE(){return c}static get TIME_WITH_SECONDS(){return f}static get TIME_WITH_SHORT_OFFSET(){return d}static get TIME_WITH_LONG_OFFSET(){return h}static get TIME_24_SIMPLE(){return m}static get TIME_24_WITH_SECONDS(){return y}static get TIME_24_WITH_SHORT_OFFSET(){return g}static get TIME_24_WITH_LONG_OFFSET(){return p}static get DATETIME_SHORT(){return T}static get DATETIME_SHORT_WITH_SECONDS(){return w}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return k}static get DATETIME_MED_WITH_WEEKDAY(){return S}static get DATETIME_FULL(){return D}static get DATETIME_FULL_WITH_SECONDS(){return v}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return b}}function friendlyDateTime(e){if(DateTime.isDateTime(e)){return e}else if(e&&e.valueOf&&isNumber(e.valueOf())){return DateTime.fromJSDate(e)}else if(e&&typeof e==="object"){return DateTime.fromObject(e)}else{throw new InvalidArgumentError(`Unknown datetime argument: ${e}, of type ${typeof e}`)}}const ht="3.5.0";t.DateTime=DateTime;t.Duration=Duration;t.FixedOffsetZone=FixedOffsetZone;t.IANAZone=IANAZone;t.Info=Info;t.Interval=Interval;t.InvalidZone=InvalidZone;t.Settings=Settings;t.SystemZone=SystemZone;t.VERSION=ht;t.Zone=Zone},317:function(e){e.exports=require("child_process")}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};!function(){var e=n;Object.defineProperty(e,"__esModule",{value:true});e.timeout=e.sendAt=e.CronTime=e.CronJob=void 0;const t=__nccwpck_require__(497);var r=__nccwpck_require__(57);Object.defineProperty(e,"CronJob",{enumerable:true,get:function(){return r.CronJob}});var i=__nccwpck_require__(497);Object.defineProperty(e,"CronTime",{enumerable:true,get:function(){return i.CronTime}});const sendAt=e=>new t.CronTime(e).sendAt();e.sendAt=sendAt;const timeout=e=>new t.CronTime(e).getTimeout();e.timeout=timeout}();module.exports=n})();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CronTime } from './time';
|
|
2
|
+
import { CronCallback, CronContext, CronJobParams, CronOnCompleteCallback, CronOnCompleteCommand, WithOnComplete } from './types/cron.types';
|
|
3
|
+
export declare class CronJob<OC extends CronOnCompleteCommand | null = null, C = null> {
|
|
4
|
+
cronTime: CronTime;
|
|
5
|
+
running: boolean;
|
|
6
|
+
unrefTimeout: boolean;
|
|
7
|
+
lastExecution: Date | null;
|
|
8
|
+
runOnce: boolean;
|
|
9
|
+
context: CronContext<C>;
|
|
10
|
+
onComplete?: WithOnComplete<OC> extends true ? CronOnCompleteCallback : undefined;
|
|
11
|
+
waitForCompletion: boolean;
|
|
12
|
+
private _isCallbackRunning;
|
|
13
|
+
private _timeout?;
|
|
14
|
+
private _callbacks;
|
|
15
|
+
get isCallbackRunning(): boolean;
|
|
16
|
+
constructor(cronTime: CronJobParams<OC, C>['cronTime'], onTick: CronJobParams<OC, C>['onTick'], onComplete?: CronJobParams<OC, C>['onComplete'], start?: CronJobParams<OC, C>['start'], timeZone?: CronJobParams<OC, C>['timeZone'], context?: CronJobParams<OC, C>['context'], runOnInit?: CronJobParams<OC, C>['runOnInit'], utcOffset?: null, unrefTimeout?: CronJobParams<OC, C>['unrefTimeout'], waitForCompletion?: CronJobParams<OC, C>['waitForCompletion']);
|
|
17
|
+
constructor(cronTime: CronJobParams<OC, C>['cronTime'], onTick: CronJobParams<OC, C>['onTick'], onComplete?: CronJobParams<OC, C>['onComplete'], start?: CronJobParams<OC, C>['start'], timeZone?: null, context?: CronJobParams<OC, C>['context'], runOnInit?: CronJobParams<OC, C>['runOnInit'], utcOffset?: CronJobParams<OC, C>['utcOffset'], unrefTimeout?: CronJobParams<OC, C>['unrefTimeout'], waitForCompletion?: CronJobParams<OC, C>['waitForCompletion']);
|
|
18
|
+
static from<OC extends CronOnCompleteCommand | null = null, C = null>(params: CronJobParams<OC, C>): CronJob<OC, C>;
|
|
19
|
+
private _fnWrap;
|
|
20
|
+
addCallback(callback: CronCallback<C, WithOnComplete<OC>>): void;
|
|
21
|
+
setTime(time: CronTime): void;
|
|
22
|
+
nextDate(): import("luxon").DateTime<boolean>;
|
|
23
|
+
fireOnTick(): Promise<void>;
|
|
24
|
+
nextDates(i?: number): import("luxon").DateTime<boolean>[];
|
|
25
|
+
start(): void;
|
|
26
|
+
lastDate(): Date | null;
|
|
27
|
+
private _executeOnComplete;
|
|
28
|
+
private _waitForJobCompletion;
|
|
29
|
+
stop(): void;
|
|
30
|
+
}
|