@bereasoftware/time-guard 1.0.3 → 2.0.3

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.
Files changed (54) hide show
  1. package/README.en.md +40 -12
  2. package/README.md +159 -135
  3. package/dist/calendars.cjs +1 -0
  4. package/dist/calendars.es.js +319 -0
  5. package/dist/full.cjs +1 -0
  6. package/dist/full.es.js +4341 -0
  7. package/dist/locales.cjs +1 -0
  8. package/dist/locales.es.js +2797 -0
  9. package/dist/plugin-advanced-format.cjs +1 -0
  10. package/dist/plugin-advanced-format.es.js +132 -0
  11. package/dist/plugin-duration.cjs +1 -0
  12. package/dist/plugin-duration.es.js +145 -0
  13. package/dist/plugin-relative-time.cjs +1 -0
  14. package/dist/plugin-relative-time.es.js +122 -0
  15. package/dist/time-guard.cjs +1 -1
  16. package/dist/time-guard.es.js +76 -3569
  17. package/dist/time-guard.iife.js +1 -1
  18. package/dist/time-guard.umd.js +1 -1
  19. package/dist/types/calendars.d.ts +1 -0
  20. package/dist/types/locales.d.ts +1 -0
  21. package/dist/types/plugin-advanced-format.d.ts +1 -0
  22. package/dist/types/plugin-duration.d.ts +1 -0
  23. package/dist/types/plugin-relative-time.d.ts +1 -0
  24. package/dist/types/src/adapters/temporal.adapter.d.ts +60 -0
  25. package/dist/types/src/calendars/calendar.manager.d.ts +52 -0
  26. package/dist/types/src/calendars/index.d.ts +81 -0
  27. package/dist/types/src/formatters/date.formatter.d.ts +21 -0
  28. package/dist/types/src/full.d.ts +8 -0
  29. package/dist/types/src/index.d.ts +23 -0
  30. package/dist/types/src/locales/additional.locale.d.ts +5 -0
  31. package/dist/types/src/locales/asian.locale.d.ts +9 -0
  32. package/dist/types/src/locales/english.locale.d.ts +6 -0
  33. package/dist/types/src/locales/european.locale.d.ts +9 -0
  34. package/dist/types/src/locales/index.d.ts +17 -0
  35. package/dist/types/src/locales/locale.manager.d.ts +42 -0
  36. package/dist/types/src/locales/locales-data.d.ts +17 -0
  37. package/dist/types/src/locales/middle-eastern.locale.d.ts +5 -0
  38. package/dist/types/src/locales/nordic.locale.d.ts +6 -0
  39. package/dist/types/src/locales/romance.locale.d.ts +7 -0
  40. package/dist/types/src/locales/slavic.locale.d.ts +6 -0
  41. package/dist/types/src/locales/spanish.locale.d.ts +5 -0
  42. package/dist/types/src/plugins/advanced-format/index.d.ts +47 -0
  43. package/dist/types/src/plugins/duration/index.d.ts +107 -0
  44. package/dist/types/src/plugins/duration/types.d.ts +85 -0
  45. package/dist/types/src/plugins/index.d.ts +10 -0
  46. package/dist/types/src/plugins/manager.d.ts +58 -0
  47. package/dist/types/src/plugins/relative-time/index.d.ts +39 -0
  48. package/dist/types/src/plugins/relative-time/types.d.ts +27 -0
  49. package/dist/types/src/polyfill-loader.d.ts +5 -0
  50. package/dist/types/src/time-guard.d.ts +154 -0
  51. package/dist/types/src/types/index.d.ts +301 -0
  52. package/dist/types/time-guard.d.ts +1 -0
  53. package/package.json +37 -6
  54. package/dist/types/index.d.ts +0 -1112
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=class{name=`advanced-format`;version=`1.0.0`;install(e){let t=e.prototype.format;e.prototype.format=function(e){if(!e||typeof e!=`string`||!/Q|Do|w|W|gggg|GGGG|k{1,2}|X|x|zzz?/.test(e))return t.call(this,e);let n=this.toTemporal(),r=`toPlainDateTime`in n?n.toPlainDateTime():n,i=e=>{let t=[`th`,`st`,`nd`,`rd`],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])},a=(e,t)=>String(e).padStart(t,`0`),o=e=>{let t=new Date(e.year,0,4),n=new Date(t);n.setDate(t.getDate()-t.getDay()+(t.getDay()===0?-6:1));let r=new Date(e.year,e.month-1,e.day),i=Math.floor((r.getTime()-n.getTime())/(10080*60*1e3))+1;return Math.max(1,i)},s=e=>{let t=Math.ceil((e.day+new Date(e.year,e.month-1,1).getDay())/7);return Math.max(1,t)},c=e=>{let t=new Date(e.year,e.month-1,e.day),n=t.getTime()<new Date(e.year,0,1).getTime()?-1:t.getTime()>=new Date(e.year+1,0,1).getTime()?1:0;return e.year+n},l=e=>{let t=e.month===1&&e.day<4?-1:e.month===12&&e.day>28?1:0;return e.year+t},u=e.replace(/Q|Do|w|W|gggg|GGGG|k{1,2}|X|x|zzz?/g,e=>{let t=``;switch(e){case`Q`:t=String(Math.ceil(r.month/3));break;case`Do`:t=i(r.day);break;case`W`:case`WW`:t=a(o(r),e===`W`?1:2);break;case`w`:case`ww`:t=a(s(r),e===`w`?1:2);break;case`GGGG`:t=String(c(r));break;case`gggg`:t=String(l(r));break;case`k`:case`kk`:t=a(r.hour===0?24:r.hour,e===`k`?1:2);break;case`X`:t=String(Math.floor(this.valueOf()/1e3));break;case`x`:t=String(this.valueOf());break;case`z`:t=`${this.getTimezoneOffset()}`;break;case`zzz`:t=`${this.getTimezoneOffsetLong()}`;break;default:return e}return`[${t}]`});return t.call(this,u)}}getOrdinal(e){let t=[`th`,`st`,`nd`,`rd`],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}padNumber(e,t){return String(e).padStart(t,`0`)}getISOWeek(e){let t=new Date(e.year,0,4),n=new Date(t);n.setDate(t.getDate()-t.getDay()+(t.getDay()===0?-6:1));let r=new Date(e.year,e.month-1,e.day),i=Math.floor((r.getTime()-n.getTime())/(10080*60*1e3))+1;return Math.max(1,i)}getWeekOfYear(e){let t=Math.ceil((e.day+new Date(e.year,e.month-1,1).getDay())/7);return Math.max(1,t)}getISOWeekYear(e){let t=new Date(e.year,e.month-1,e.day),n=t.getTime()<new Date(e.year,0,1).getTime()?-1:t.getTime()>=new Date(e.year+1,0,1).getTime()?1:0;return e.year+n}getWeekYear(e){let t=e.month===1&&e.day<4?-1:e.month===12&&e.day>28?1:0;return e.year+t}getTimezoneOffset(){try{let e=new Date;return new Intl.DateTimeFormat(`en-US`,{timeZone:`UTC`,timeZoneName:`short`}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value||`UTC`}catch{return`UTC`}}getTimezoneOffsetLong(){try{let e=new Date;return new Intl.DateTimeFormat(`en-US`,{timeZone:`UTC`,timeZoneName:`long`}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value||`Coordinated Universal Time`}catch{return`Coordinated Universal Time`}}},t=new e;exports.AdvancedFormatPlugin=e,exports.default=t;
@@ -0,0 +1,132 @@
1
+ /*! time-guard v2.0.3 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ //#region src/plugins/advanced-format/index.ts
3
+ var e = class {
4
+ name = "advanced-format";
5
+ version = "1.0.0";
6
+ install(e) {
7
+ let t = e.prototype.format;
8
+ e.prototype.format = function(e) {
9
+ if (!e || typeof e != "string" || !/Q|Do|w|W|gggg|GGGG|k{1,2}|X|x|zzz?/.test(e)) return t.call(this, e);
10
+ let n = this.toTemporal(), r = "toPlainDateTime" in n ? n.toPlainDateTime() : n, i = (e) => {
11
+ let t = [
12
+ "th",
13
+ "st",
14
+ "nd",
15
+ "rd"
16
+ ], n = e % 100;
17
+ return e + (t[(n - 20) % 10] || t[n] || t[0]);
18
+ }, a = (e, t) => String(e).padStart(t, "0"), o = (e) => {
19
+ let t = new Date(e.year, 0, 4), n = new Date(t);
20
+ n.setDate(t.getDate() - t.getDay() + (t.getDay() === 0 ? -6 : 1));
21
+ let r = new Date(e.year, e.month - 1, e.day), i = Math.floor((r.getTime() - n.getTime()) / (10080 * 60 * 1e3)) + 1;
22
+ return Math.max(1, i);
23
+ }, s = (e) => {
24
+ let t = Math.ceil((e.day + new Date(e.year, e.month - 1, 1).getDay()) / 7);
25
+ return Math.max(1, t);
26
+ }, c = (e) => {
27
+ let t = new Date(e.year, e.month - 1, e.day), n = t.getTime() < new Date(e.year, 0, 1).getTime() ? -1 : t.getTime() >= new Date(e.year + 1, 0, 1).getTime() ? 1 : 0;
28
+ return e.year + n;
29
+ }, l = (e) => {
30
+ let t = e.month === 1 && e.day < 4 ? -1 : e.month === 12 && e.day > 28 ? 1 : 0;
31
+ return e.year + t;
32
+ }, u = e.replace(/Q|Do|w|W|gggg|GGGG|k{1,2}|X|x|zzz?/g, (e) => {
33
+ let t = "";
34
+ switch (e) {
35
+ case "Q":
36
+ t = String(Math.ceil(r.month / 3));
37
+ break;
38
+ case "Do":
39
+ t = i(r.day);
40
+ break;
41
+ case "W":
42
+ case "WW":
43
+ t = a(o(r), e === "W" ? 1 : 2);
44
+ break;
45
+ case "w":
46
+ case "ww":
47
+ t = a(s(r), e === "w" ? 1 : 2);
48
+ break;
49
+ case "GGGG":
50
+ t = String(c(r));
51
+ break;
52
+ case "gggg":
53
+ t = String(l(r));
54
+ break;
55
+ case "k":
56
+ case "kk":
57
+ t = a(r.hour === 0 ? 24 : r.hour, e === "k" ? 1 : 2);
58
+ break;
59
+ case "X":
60
+ t = String(Math.floor(this.valueOf() / 1e3));
61
+ break;
62
+ case "x":
63
+ t = String(this.valueOf());
64
+ break;
65
+ case "z":
66
+ t = `${this.getTimezoneOffset()}`;
67
+ break;
68
+ case "zzz":
69
+ t = `${this.getTimezoneOffsetLong()}`;
70
+ break;
71
+ default: return e;
72
+ }
73
+ return `[${t}]`;
74
+ });
75
+ return t.call(this, u);
76
+ };
77
+ }
78
+ getOrdinal(e) {
79
+ let t = [
80
+ "th",
81
+ "st",
82
+ "nd",
83
+ "rd"
84
+ ], n = e % 100;
85
+ return e + (t[(n - 20) % 10] || t[n] || t[0]);
86
+ }
87
+ padNumber(e, t) {
88
+ return String(e).padStart(t, "0");
89
+ }
90
+ getISOWeek(e) {
91
+ let t = new Date(e.year, 0, 4), n = new Date(t);
92
+ n.setDate(t.getDate() - t.getDay() + (t.getDay() === 0 ? -6 : 1));
93
+ let r = new Date(e.year, e.month - 1, e.day), i = Math.floor((r.getTime() - n.getTime()) / (10080 * 60 * 1e3)) + 1;
94
+ return Math.max(1, i);
95
+ }
96
+ getWeekOfYear(e) {
97
+ let t = Math.ceil((e.day + new Date(e.year, e.month - 1, 1).getDay()) / 7);
98
+ return Math.max(1, t);
99
+ }
100
+ getISOWeekYear(e) {
101
+ let t = new Date(e.year, e.month - 1, e.day), n = t.getTime() < new Date(e.year, 0, 1).getTime() ? -1 : t.getTime() >= new Date(e.year + 1, 0, 1).getTime() ? 1 : 0;
102
+ return e.year + n;
103
+ }
104
+ getWeekYear(e) {
105
+ let t = e.month === 1 && e.day < 4 ? -1 : e.month === 12 && e.day > 28 ? 1 : 0;
106
+ return e.year + t;
107
+ }
108
+ getTimezoneOffset() {
109
+ try {
110
+ let e = /* @__PURE__ */ new Date();
111
+ return new Intl.DateTimeFormat("en-US", {
112
+ timeZone: "UTC",
113
+ timeZoneName: "short"
114
+ }).formatToParts(e).find((e) => e.type === "timeZoneName")?.value || "UTC";
115
+ } catch {
116
+ return "UTC";
117
+ }
118
+ }
119
+ getTimezoneOffsetLong() {
120
+ try {
121
+ let e = /* @__PURE__ */ new Date();
122
+ return new Intl.DateTimeFormat("en-US", {
123
+ timeZone: "UTC",
124
+ timeZoneName: "long"
125
+ }).formatToParts(e).find((e) => e.type === "timeZoneName")?.value || "Coordinated Universal Time";
126
+ } catch {
127
+ return "Coordinated Universal Time";
128
+ }
129
+ }
130
+ }, t = new e();
131
+ //#endregion
132
+ export { e as AdvancedFormatPlugin, t as default };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=class e{years=0;months=0;weeks=0;days=0;hours=0;minutes=0;seconds=0;milliseconds=0;constructor(e){this.years=e.years||0,this.months=e.months||0,this.weeks=e.weeks||0,this.days=e.days||0,this.hours=e.hours||0,this.minutes=e.minutes||0,this.seconds=e.seconds||0,this.milliseconds=e.milliseconds||0}static fromISO(t){let n=t.match(/^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:([\d.]+)S)?)?$/);if(!n)throw Error(`Invalid ISO 8601 duration: ${t}`);let[,r,i,a,,o,s,c,l]=n,u=r?-1:1;return new e({years:parseInt(i||`0`,10)*u,months:parseInt(a||`0`,10)*u,days:parseInt(o||`0`,10)*u,hours:parseInt(s||`0`,10)*u,minutes:parseInt(c||`0`,10)*u,seconds:parseFloat(l||`0`)*u})}static between(t,n){let r=t.toTemporal(),i=n.toTemporal().since(r);return new e({years:i.years||0,months:i.months||0,weeks:0,days:i.days||0,hours:i.hours||0,minutes:i.minutes||0,seconds:i.seconds||0,milliseconds:i.milliseconds||0})}static fromMilliseconds(t){let n=t<0,r=Math.abs(t),i=Math.floor(r/(1e3*60*60*24*365)),a=Math.floor(r%(1e3*60*60*24*365)/(1e3*60*60*24*30)),o=Math.floor(r%(1e3*60*60*24*30)/(1e3*60*60*24)),s=Math.floor(r%(1e3*60*60*24)/(1e3*60*60)),c=Math.floor(r%(1e3*60*60)/(1e3*60)),l=Math.floor(r%(1e3*60)/1e3),u=Math.floor(r%1e3),d=n?-1:1;return new e({years:i*d,months:a*d,days:o*d,hours:s*d,minutes:c*d,seconds:l*d,milliseconds:u*d})}as(e){return this.asMilliseconds()/{milliseconds:1,seconds:1e3,minutes:1e3*60,hours:1e3*60*60,days:1e3*60*60*24,weeks:1e3*60*60*24*7,months:1e3*60*60*24*30,years:1e3*60*60*24*365}[e]}asMilliseconds(){return this.years*1e3*60*60*24*365+this.months*1e3*60*60*24*30+this.weeks*1e3*60*60*24*7+this.days*1e3*60*60*24+this.hours*1e3*60*60+this.minutes*1e3*60+this.seconds*1e3+this.milliseconds}asSeconds(){return this.asMilliseconds()/1e3}asMinutes(){return this.asSeconds()/60}asHours(){return this.asMinutes()/60}asDays(){return this.asHours()/24}asWeeks(){return this.asDays()/7}asMonths(){return this.asDays()/30}asYears(){return this.asDays()/365}toObject(){return{years:this.years,months:this.months,weeks:this.weeks,days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds}}toISO(){let e=``;this.years&&(e+=`${this.years}Y`),this.months&&(e+=`${this.months}M`),(this.weeks||this.days)&&(e+=`${this.weeks*7+this.days}D`);let t=``;return this.hours&&(t+=`${this.hours}H`),this.minutes&&(t+=`${this.minutes}M`),(this.seconds||this.milliseconds)&&(t+=`${this.seconds+this.milliseconds/1e3}S`),`${this.isNegative()?`-`:``}P${e}${t?`T${t}`:``}`}humanize(){let e=[];if(this.years&&e.push(`${Math.abs(this.years)} year${Math.abs(this.years)===1?``:`s`}`),this.months&&e.push(`${Math.abs(this.months)} month${Math.abs(this.months)===1?``:`s`}`),this.weeks&&e.push(`${Math.abs(this.weeks)} week${Math.abs(this.weeks)===1?``:`s`}`),this.days&&e.push(`${Math.abs(this.days)} day${Math.abs(this.days)===1?``:`s`}`),this.hours&&e.push(`${Math.abs(this.hours)} hour${Math.abs(this.hours)===1?``:`s`}`),this.minutes&&e.push(`${Math.abs(this.minutes)} minute${Math.abs(this.minutes)===1?``:`s`}`),this.seconds&&e.push(`${Math.abs(this.seconds)} second${Math.abs(this.seconds)===1?``:`s`}`),this.milliseconds&&e.push(`${Math.abs(this.milliseconds)} ms`),e.length===0)return`0 seconds`;let t=e.join(`, `);return this.isNegative()?`-${t}`:t}isNegative(){return this.years<0||this.months<0||this.weeks<0||this.days<0||this.hours<0||this.minutes<0||this.seconds<0||this.milliseconds<0}abs(){return new e({years:Math.abs(this.years),months:Math.abs(this.months),weeks:Math.abs(this.weeks),days:Math.abs(this.days),hours:Math.abs(this.hours),minutes:Math.abs(this.minutes),seconds:Math.abs(this.seconds),milliseconds:Math.abs(this.milliseconds)})}toString(){return this.toISO()}},t=class{name=`duration`;version=`1.0.0`;install(t){t.prototype.duration=function(t){return e.between(this,t)},t.Duration=e,t.duration={fromISO:t=>e.fromISO(t),between:(t,n)=>e.between(t,n),fromMilliseconds:t=>e.fromMilliseconds(t)}}},n=new t;exports.Duration=e,exports.DurationPlugin=t,exports.default=n,exports.durationPlugin=n;
@@ -0,0 +1,145 @@
1
+ /*! time-guard v2.0.3 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ //#region src/plugins/duration/index.ts
3
+ var e = class e {
4
+ years = 0;
5
+ months = 0;
6
+ weeks = 0;
7
+ days = 0;
8
+ hours = 0;
9
+ minutes = 0;
10
+ seconds = 0;
11
+ milliseconds = 0;
12
+ constructor(e) {
13
+ this.years = e.years || 0, this.months = e.months || 0, this.weeks = e.weeks || 0, this.days = e.days || 0, this.hours = e.hours || 0, this.minutes = e.minutes || 0, this.seconds = e.seconds || 0, this.milliseconds = e.milliseconds || 0;
14
+ }
15
+ static fromISO(t) {
16
+ let n = t.match(/^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:([\d.]+)S)?)?$/);
17
+ if (!n) throw Error(`Invalid ISO 8601 duration: ${t}`);
18
+ let [, r, i, a, , o, s, c, l] = n, u = r ? -1 : 1;
19
+ return new e({
20
+ years: parseInt(i || "0", 10) * u,
21
+ months: parseInt(a || "0", 10) * u,
22
+ days: parseInt(o || "0", 10) * u,
23
+ hours: parseInt(s || "0", 10) * u,
24
+ minutes: parseInt(c || "0", 10) * u,
25
+ seconds: parseFloat(l || "0") * u
26
+ });
27
+ }
28
+ static between(t, n) {
29
+ let r = t.toTemporal(), i = n.toTemporal().since(r);
30
+ return new e({
31
+ years: i.years || 0,
32
+ months: i.months || 0,
33
+ weeks: 0,
34
+ days: i.days || 0,
35
+ hours: i.hours || 0,
36
+ minutes: i.minutes || 0,
37
+ seconds: i.seconds || 0,
38
+ milliseconds: i.milliseconds || 0
39
+ });
40
+ }
41
+ static fromMilliseconds(t) {
42
+ let n = t < 0, r = Math.abs(t), i = Math.floor(r / (1e3 * 60 * 60 * 24 * 365)), a = Math.floor(r % (1e3 * 60 * 60 * 24 * 365) / (1e3 * 60 * 60 * 24 * 30)), o = Math.floor(r % (1e3 * 60 * 60 * 24 * 30) / (1e3 * 60 * 60 * 24)), s = Math.floor(r % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), c = Math.floor(r % (1e3 * 60 * 60) / (1e3 * 60)), l = Math.floor(r % (1e3 * 60) / 1e3), u = Math.floor(r % 1e3), d = n ? -1 : 1;
43
+ return new e({
44
+ years: i * d,
45
+ months: a * d,
46
+ days: o * d,
47
+ hours: s * d,
48
+ minutes: c * d,
49
+ seconds: l * d,
50
+ milliseconds: u * d
51
+ });
52
+ }
53
+ as(e) {
54
+ return this.asMilliseconds() / {
55
+ milliseconds: 1,
56
+ seconds: 1e3,
57
+ minutes: 1e3 * 60,
58
+ hours: 1e3 * 60 * 60,
59
+ days: 1e3 * 60 * 60 * 24,
60
+ weeks: 1e3 * 60 * 60 * 24 * 7,
61
+ months: 1e3 * 60 * 60 * 24 * 30,
62
+ years: 1e3 * 60 * 60 * 24 * 365
63
+ }[e];
64
+ }
65
+ asMilliseconds() {
66
+ return this.years * 1e3 * 60 * 60 * 24 * 365 + this.months * 1e3 * 60 * 60 * 24 * 30 + this.weeks * 1e3 * 60 * 60 * 24 * 7 + this.days * 1e3 * 60 * 60 * 24 + this.hours * 1e3 * 60 * 60 + this.minutes * 1e3 * 60 + this.seconds * 1e3 + this.milliseconds;
67
+ }
68
+ asSeconds() {
69
+ return this.asMilliseconds() / 1e3;
70
+ }
71
+ asMinutes() {
72
+ return this.asSeconds() / 60;
73
+ }
74
+ asHours() {
75
+ return this.asMinutes() / 60;
76
+ }
77
+ asDays() {
78
+ return this.asHours() / 24;
79
+ }
80
+ asWeeks() {
81
+ return this.asDays() / 7;
82
+ }
83
+ asMonths() {
84
+ return this.asDays() / 30;
85
+ }
86
+ asYears() {
87
+ return this.asDays() / 365;
88
+ }
89
+ toObject() {
90
+ return {
91
+ years: this.years,
92
+ months: this.months,
93
+ weeks: this.weeks,
94
+ days: this.days,
95
+ hours: this.hours,
96
+ minutes: this.minutes,
97
+ seconds: this.seconds,
98
+ milliseconds: this.milliseconds
99
+ };
100
+ }
101
+ toISO() {
102
+ let e = "";
103
+ this.years && (e += `${this.years}Y`), this.months && (e += `${this.months}M`), (this.weeks || this.days) && (e += `${this.weeks * 7 + this.days}D`);
104
+ let t = "";
105
+ return this.hours && (t += `${this.hours}H`), this.minutes && (t += `${this.minutes}M`), (this.seconds || this.milliseconds) && (t += `${this.seconds + this.milliseconds / 1e3}S`), `${this.isNegative() ? "-" : ""}P${e}${t ? `T${t}` : ""}`;
106
+ }
107
+ humanize() {
108
+ let e = [];
109
+ if (this.years && e.push(`${Math.abs(this.years)} year${Math.abs(this.years) === 1 ? "" : "s"}`), this.months && e.push(`${Math.abs(this.months)} month${Math.abs(this.months) === 1 ? "" : "s"}`), this.weeks && e.push(`${Math.abs(this.weeks)} week${Math.abs(this.weeks) === 1 ? "" : "s"}`), this.days && e.push(`${Math.abs(this.days)} day${Math.abs(this.days) === 1 ? "" : "s"}`), this.hours && e.push(`${Math.abs(this.hours)} hour${Math.abs(this.hours) === 1 ? "" : "s"}`), this.minutes && e.push(`${Math.abs(this.minutes)} minute${Math.abs(this.minutes) === 1 ? "" : "s"}`), this.seconds && e.push(`${Math.abs(this.seconds)} second${Math.abs(this.seconds) === 1 ? "" : "s"}`), this.milliseconds && e.push(`${Math.abs(this.milliseconds)} ms`), e.length === 0) return "0 seconds";
110
+ let t = e.join(", ");
111
+ return this.isNegative() ? `-${t}` : t;
112
+ }
113
+ isNegative() {
114
+ return this.years < 0 || this.months < 0 || this.weeks < 0 || this.days < 0 || this.hours < 0 || this.minutes < 0 || this.seconds < 0 || this.milliseconds < 0;
115
+ }
116
+ abs() {
117
+ return new e({
118
+ years: Math.abs(this.years),
119
+ months: Math.abs(this.months),
120
+ weeks: Math.abs(this.weeks),
121
+ days: Math.abs(this.days),
122
+ hours: Math.abs(this.hours),
123
+ minutes: Math.abs(this.minutes),
124
+ seconds: Math.abs(this.seconds),
125
+ milliseconds: Math.abs(this.milliseconds)
126
+ });
127
+ }
128
+ toString() {
129
+ return this.toISO();
130
+ }
131
+ }, t = class {
132
+ name = "duration";
133
+ version = "1.0.0";
134
+ install(t) {
135
+ t.prototype.duration = function(t) {
136
+ return e.between(this, t);
137
+ }, t.Duration = e, t.duration = {
138
+ fromISO: (t) => e.fromISO(t),
139
+ between: (t, n) => e.between(t, n),
140
+ fromMilliseconds: (t) => e.fromMilliseconds(t)
141
+ };
142
+ }
143
+ }, n = new t();
144
+ //#endregion
145
+ export { e as Duration, t as DurationPlugin, n as default, n as durationPlugin };
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],t={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`},n=class{name=`relative-time`;version=`1.0.0`;config;formats;constructor(n){this.config={thresholds:n?.thresholds||e,rounding:n?.rounding||Math.round},this.formats=t}install(e){let t=this;e.prototype.fromNow=function(e){return t.formatRelativeTime(this,!1,e)},e.prototype.toNow=function(e){return t.formatRelativeTime(this,!0,e)},e.prototype.humanize=function(e,n){return e?t.formatRelativeTime(this,e.isAfter(this),n):t.formatRelativeTime(this,!1,n)}}formatRelativeTime(e,t,n){let r=e.constructor.now().diff(e,`millisecond`),i=Math.abs(r),a=t??!(r>0),o=this.getRelativeTimeString(i);return n?o:(a?this.formats.future:this.formats.past).replace(`%s`,o)}getRelativeTimeString(t){let n=this.config.thresholds||e,r=this.config.rounding||Math.round;for(let e=0;e<n.length;e++){let i=n[e];if(e+1<n.length&&n[e+1]&&i.r&&t<i.r*1e3)continue;let a;a=i.d?r(t/this.getUnitMilliseconds(i.d)):1;let o=i.l,s=this.formats[o]||o;return typeof s==`string`&&s.includes(`%d`)?s.replace(`%d`,String(a)):s}return`${r(t/1e3)} seconds`}getUnitMilliseconds(e){return{second:1e3,minute:1e3*60,hour:1e3*60*60,day:1e3*60*60*24,month:1e3*60*60*24*30,year:1e3*60*60*24*365}[e]||1}setFormats(e){Object.assign(this.formats,e)}getFormats(){return{...this.formats}}},r=new n;exports.RelativeTimePlugin=n,exports.default=r;
@@ -0,0 +1,122 @@
1
+ /*! time-guard v2.0.3 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ //#region src/plugins/relative-time/index.ts
3
+ var e = [
4
+ {
5
+ l: "s",
6
+ r: 44,
7
+ d: "second"
8
+ },
9
+ {
10
+ l: "m",
11
+ r: 89
12
+ },
13
+ {
14
+ l: "mm",
15
+ r: 44,
16
+ d: "minute"
17
+ },
18
+ {
19
+ l: "h",
20
+ r: 89
21
+ },
22
+ {
23
+ l: "hh",
24
+ r: 21,
25
+ d: "hour"
26
+ },
27
+ {
28
+ l: "d",
29
+ r: 35
30
+ },
31
+ {
32
+ l: "dd",
33
+ r: 25,
34
+ d: "day"
35
+ },
36
+ {
37
+ l: "M",
38
+ r: 45
39
+ },
40
+ {
41
+ l: "MM",
42
+ r: 10,
43
+ d: "month"
44
+ },
45
+ {
46
+ l: "y",
47
+ r: 17
48
+ },
49
+ {
50
+ l: "yy",
51
+ d: "year"
52
+ }
53
+ ], t = {
54
+ future: "in %s",
55
+ past: "%s ago",
56
+ s: "a few seconds",
57
+ m: "a minute",
58
+ mm: "%d minutes",
59
+ h: "an hour",
60
+ hh: "%d hours",
61
+ d: "a day",
62
+ dd: "%d days",
63
+ M: "a month",
64
+ MM: "%d months",
65
+ y: "a year",
66
+ yy: "%d years"
67
+ }, n = class {
68
+ name = "relative-time";
69
+ version = "1.0.0";
70
+ config;
71
+ formats;
72
+ constructor(n) {
73
+ this.config = {
74
+ thresholds: n?.thresholds || e,
75
+ rounding: n?.rounding || Math.round
76
+ }, this.formats = t;
77
+ }
78
+ install(e) {
79
+ let t = this;
80
+ e.prototype.fromNow = function(e) {
81
+ return t.formatRelativeTime(this, !1, e);
82
+ }, e.prototype.toNow = function(e) {
83
+ return t.formatRelativeTime(this, !0, e);
84
+ }, e.prototype.humanize = function(e, n) {
85
+ return e ? t.formatRelativeTime(this, e.isAfter(this), n) : t.formatRelativeTime(this, !1, n);
86
+ };
87
+ }
88
+ formatRelativeTime(e, t, n) {
89
+ let r = e.constructor.now().diff(e, "millisecond"), i = Math.abs(r), a = t ?? !(r > 0), o = this.getRelativeTimeString(i);
90
+ return n ? o : (a ? this.formats.future : this.formats.past).replace("%s", o);
91
+ }
92
+ getRelativeTimeString(t) {
93
+ let n = this.config.thresholds || e, r = this.config.rounding || Math.round;
94
+ for (let e = 0; e < n.length; e++) {
95
+ let i = n[e];
96
+ if (e + 1 < n.length && n[e + 1] && i.r && t < i.r * 1e3) continue;
97
+ let a;
98
+ a = i.d ? r(t / this.getUnitMilliseconds(i.d)) : 1;
99
+ let o = i.l, s = this.formats[o] || o;
100
+ return typeof s == "string" && s.includes("%d") ? s.replace("%d", String(a)) : s;
101
+ }
102
+ return `${r(t / 1e3)} seconds`;
103
+ }
104
+ getUnitMilliseconds(e) {
105
+ return {
106
+ second: 1e3,
107
+ minute: 1e3 * 60,
108
+ hour: 1e3 * 60 * 60,
109
+ day: 1e3 * 60 * 60 * 24,
110
+ month: 1e3 * 60 * 60 * 24 * 30,
111
+ year: 1e3 * 60 * 60 * 24 * 365
112
+ }[e] || 1;
113
+ }
114
+ setFormats(e) {
115
+ Object.assign(this.formats, e);
116
+ }
117
+ getFormats() {
118
+ return { ...this.formats };
119
+ }
120
+ }, r = new n();
121
+ //#endregion
122
+ export { n as RelativeTimePlugin, r as default };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),typeof globalThis<`u`&&!globalThis.Temporal&&console.warn(`[time-guard] Temporal API not available. Install @js-temporal/polyfill or use a browser with native Temporal support.`);var e=null;function t(){if(e)return e;let t=globalThis.Temporal;if(!t)throw Error(`Temporal API not loaded. Make sure @js-temporal/polyfill is imported in your app.`);return e=t,t}var n=class{static parseToPlainDateTime(e){let n=t();return this.isPlainDateTime(e)?e:this.isZonedDateTime(e)?e.toPlainDateTime():this.isPlainDate(e)?e.toPlainDateTime({hour:0,minute:0,second:0,millisecond:0}):this.isPlainTime(e)?n.Now.plainDateTimeISO().with(e):typeof e==`object`&&e&&`getTime`in e&&typeof e.getTime==`function`?this.fromDate(e):typeof e==`number`?this.fromUnix(e):typeof e==`string`?this.parseISOString(e):typeof e==`object`&&e?this.fromObject(e):n.Now.plainDateTimeISO()}static fromDate(e){let n=t(),[r,i]=e.toISOString().split(`T`);return n.PlainDateTime.from(r+`T`+i.slice(0,-1))}static fromUnix(e){return this.fromDate(new Date(e))}static parseISOString(e){let n=t();try{if(e.includes(`T`)||/ \d{2}:\d{2}/.test(e)){let t=e.replace(` `,`T`);return n.PlainDateTime.from(t)}return n.PlainDate.from(e).toPlainDateTime({hour:0})}catch{return n.Now.plainDateTimeISO()}}static fromObject(e){let n=t(),r=e.year||n.Now.plainDateISO().year,i=e.month||1,a=e.day||1,o=e.hour||0,s=e.minute||0,c=e.second||0,l=e.millisecond||0;return n.PlainDateTime.from({year:r,month:i,day:a,hour:o,minute:s,second:c,millisecond:l})}static toDate(e){let t=this.toPlainDateTime(e);return new Date(t.toString())}static toUnix(e){let t=this.toPlainDateTime(e);return Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond)}static toISOString(e){return this.toPlainDateTime(e).toString()+`Z`}static toPlainDateTime(e){return this.isPlainDateTime(e)?e:e.toPlainDateTime()}static isPlainDateTime(e){return typeof e==`object`&&!!e&&`year`in e&&`month`in e&&`day`in e&&`hour`in e}static isZonedDateTime(e){return typeof e==`object`&&!!e&&`timeZone`in e}static isPlainDate(e){return typeof e==`object`&&!!e&&`year`in e&&`month`in e&&`day`in e&&!(`hour`in e)&&`toPlainDateTime`in e}static isPlainTime(e){return typeof e==`object`&&!!e&&`hour`in e&&!(`year`in e)}static now(){return t().Now.plainDateTimeISO()}static nowInTimezone(e){return t().Now.zonedDateTimeISO(e)}},r={name:`en`,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],weekdays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],weekdaysShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],weekdaysMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},i={name:`en-au`,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],weekdays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],weekdaysShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],weekdaysMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},a={name:`en-gb`,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],weekdays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],weekdaysShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],weekdaysMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},o={name:`en-ca`,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],weekdays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],weekdaysShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],weekdaysMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},s={en:r,"en-au":i,"en-gb":a,"en-ca":o},c={name:`es`,months:[`Enero`,`Febrero`,`Marzo`,`Abril`,`Mayo`,`Junio`,`Julio`,`Agosto`,`Septiembre`,`Octubre`,`Noviembre`,`Diciembre`],monthsShort:[`Ene`,`Feb`,`Mar`,`Abr`,`May`,`Jun`,`Jul`,`Ago`,`Sep`,`Oct`,`Nov`,`Dic`],weekdays:[`Domingo`,`Lunes`,`Martes`,`Miércoles`,`Jueves`,`Viernes`,`Sábado`],weekdaysShort:[`Dom`,`Lun`,`Mar`,`Mié`,`Jue`,`Vie`,`Sáb`],weekdaysMin:[`Do`,`Lu`,`Ma`,`Mi`,`Ju`,`Vi`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},l={name:`es-mx`,months:[`Enero`,`Febrero`,`Marzo`,`Abril`,`Mayo`,`Junio`,`Julio`,`Agosto`,`Septiembre`,`Octubre`,`Noviembre`,`Diciembre`],monthsShort:[`Ene`,`Feb`,`Mar`,`Abr`,`May`,`Jun`,`Jul`,`Ago`,`Sep`,`Oct`,`Nov`,`Dic`],weekdays:[`Domingo`,`Lunes`,`Martes`,`Miércoles`,`Jueves`,`Viernes`,`Sábado`],weekdaysShort:[`Dom`,`Lun`,`Mar`,`Mié`,`Jue`,`Vie`,`Sáb`],weekdaysMin:[`Do`,`Lu`,`Ma`,`Mi`,`Ju`,`Vi`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},u={name:`es-us`,months:[`Enero`,`Febrero`,`Marzo`,`Abril`,`Mayo`,`Junio`,`Julio`,`Agosto`,`Septiembre`,`Octubre`,`Noviembre`,`Diciembre`],monthsShort:[`Ene`,`Feb`,`Mar`,`Abr`,`May`,`Jun`,`Jul`,`Ago`,`Sep`,`Oct`,`Nov`,`Dic`],weekdays:[`Domingo`,`Lunes`,`Martes`,`Miércoles`,`Jueves`,`Viernes`,`Sábado`],weekdaysShort:[`Dom`,`Lun`,`Mar`,`Mié`,`Jue`,`Vie`,`Sáb`],weekdaysMin:[`Do`,`Lu`,`Ma`,`Mi`,`Ju`,`Vi`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`MM/DD/YYYY`,time:`HH:mm:ss`,datetime:`MM/DD/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},d={es:c,"es-mx":l,"es-us":u},f={name:`fr`,months:[`janvier`,`février`,`mars`,`avril`,`mai`,`juin`,`juillet`,`août`,`septembre`,`octobre`,`novembre`,`décembre`],monthsShort:[`janv.`,`févr.`,`mars`,`avr.`,`mai`,`juin`,`juil.`,`août`,`sept.`,`oct.`,`nov.`,`déc.`],weekdays:[`dimanche`,`lundi`,`mardi`,`mercredi`,`jeudi`,`vendredi`,`samedi`],weekdaysShort:[`dim.`,`lun.`,`mar.`,`mer.`,`jeu.`,`ven.`,`sam.`],weekdaysMin:[`di`,`lu`,`ma`,`me`,`je`,`ve`,`sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},p={name:`it`,months:[`gennaio`,`febbraio`,`marzo`,`aprile`,`maggio`,`giugno`,`luglio`,`agosto`,`settembre`,`ottobre`,`novembre`,`dicembre`],monthsShort:[`gen`,`feb`,`mar`,`apr`,`mag`,`giu`,`lug`,`ago`,`set`,`ott`,`nov`,`dic`],weekdays:[`domenica`,`lunedì`,`martedì`,`mercoledì`,`giovedì`,`venerdì`,`sabato`],weekdaysShort:[`dom`,`lun`,`mar`,`mer`,`gio`,`ven`,`sab`],weekdaysMin:[`do`,`lu`,`ma`,`me`,`gi`,`ve`,`sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},m={name:`pt`,months:[`janeiro`,`fevereiro`,`março`,`abril`,`maio`,`junho`,`julho`,`agosto`,`setembro`,`outubro`,`novembro`,`dezembro`],monthsShort:[`jan`,`fev`,`mar`,`abr`,`mai`,`jun`,`jul`,`ago`,`set`,`out`,`nov`,`dez`],weekdays:[`domingo`,`segunda`,`terça`,`quarta`,`quinta`,`sexta`,`sábado`],weekdaysShort:[`dom`,`seg`,`ter`,`qua`,`qui`,`sex`,`sab`],weekdaysMin:[`do`,`se`,`te`,`qu`,`qu`,`se`,`sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},h={name:`pt-br`,months:[`janeiro`,`fevereiro`,`março`,`abril`,`maio`,`junho`,`julho`,`agosto`,`setembro`,`outubro`,`novembro`,`dezembro`],monthsShort:[`jan`,`fev`,`mar`,`abr`,`mai`,`jun`,`jul`,`ago`,`set`,`out`,`nov`,`dez`],weekdays:[`domingo`,`segunda-feira`,`terça-feira`,`quarta-feira`,`quinta-feira`,`sexta-feira`,`sábado`],weekdaysShort:[`dom`,`seg`,`ter`,`qua`,`qui`,`sex`,`sab`],weekdaysMin:[`do`,`se`,`te`,`qu`,`qu`,`se`,`sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},g={name:`ro`,months:[`ianuarie`,`februarie`,`martie`,`aprilie`,`mai`,`iunie`,`iulie`,`august`,`septembrie`,`octombrie`,`noiembrie`,`decembrie`],monthsShort:[`ian.`,`feb.`,`mar.`,`apr.`,`mai`,`iun.`,`iul.`,`aug.`,`sep.`,`oct.`,`nov.`,`dec.`],weekdays:[`duminică`,`luni`,`marți`,`miercuri`,`joi`,`vineri`,`sâmbătă`],weekdaysShort:[`dum.`,`lun.`,`mar.`,`mie.`,`joi`,`vin.`,`sâm.`],weekdaysMin:[`du`,`lu`,`ma`,`mi`,`jo`,`vi`,`sâ`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},_={fr:f,it:p,pt:m,"pt-br":h,ro:g},v={ru:{name:`ru`,months:[`январь`,`февраль`,`март`,`апрель`,`май`,`июнь`,`июль`,`август`,`сентябрь`,`октябрь`,`ноябрь`,`декабрь`],monthsShort:[`янв.`,`февр.`,`март`,`апр.`,`май`,`июнь`,`июль`,`авг.`,`сент.`,`окт.`,`нояб.`,`дек.`],weekdays:[`воскресенье`,`понедельник`,`вторник`,`среда`,`четверг`,`пятница`,`суббота`],weekdaysShort:[`вс`,`пн`,`вт`,`ср`,`чт`,`пт`,`сб`],weekdaysMin:[`вс`,`пн`,`вт`,`ср`,`чт`,`пт`,`сб`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},pl:{name:`pl`,months:[`stycznia`,`lutego`,`marca`,`kwietnia`,`maja`,`czerwca`,`lipca`,`sierpnia`,`września`,`października`,`listopada`,`grudnia`],monthsShort:[`sty.`,`lut.`,`mar.`,`kwi.`,`maj.`,`cze.`,`lip.`,`sie.`,`wrz.`,`paź.`,`lis.`,`gru.`],weekdays:[`niedziela`,`poniedziałek`,`wtorek`,`środa`,`czwartek`,`piątek`,`sobota`],weekdaysShort:[`Nd.`,`Pn.`,`Wt.`,`Śr.`,`Cz.`,`Pt.`,`So.`],weekdaysMin:[`Nd`,`Pn`,`Wt`,`Śr`,`Cz`,`Pt`,`So`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},cs:{name:`cs`,months:[`ledna`,`února`,`března`,`dubna`,`května`,`iunie`,`iulie`,`srpna`,`září`,`října`,`listopadu`,`prosince`],monthsShort:[`led`,`úno`,`bře`,`dub`,`kvě`,`čer`,`čvc`,`srp`,`zář`,`říj`,`lis`,`pro`],weekdays:[`neděle`,`pondělí`,`úterý`,`středa`,`čtvrtek`,`pátek`,`sobota`],weekdaysShort:[`ne`,`po`,`út`,`st`,`čt`,`pá`,`so`],weekdaysMin:[`ne`,`po`,`út`,`st`,`čt`,`pá`,`so`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},sk:{name:`sk`,months:[`január`,`február`,`март`,`апрель`,`май`,`июнь`,`июль`,`август`,`сентябрь`,`октябрь`,`ноябрь`,`декабрь`],monthsShort:[`jan`,`feb`,`mar`,`apr`,`maj`,`jún`,`júl`,`aug`,`sep`,`okt`,`nov`,`dec`],weekdays:[`nedeľa`,`pondelok`,`utorok`,`streda`,`štvrtok`,`piatok`,`sobota`],weekdaysShort:[`ned`,`pon`,`uto`,`str`,`štv`,`pia`,`sob`],weekdaysMin:[`ne`,`po`,`ut`,`st`,`št`,`pi`,`so`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}}},y={sv:{name:`sv`,months:[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`],monthsShort:[`jan.`,`feb.`,`mar.`,`apr.`,`maj`,`juni`,`juli`,`aug.`,`sep.`,`okt.`,`nov.`,`dec.`],weekdays:[`söndag`,`måndag`,`tisdag`,`onsdag`,`torsdag`,`fredag`,`lördag`],weekdaysShort:[`sön`,`mån`,`tis`,`ons`,`tor`,`fre`,`lör`],weekdaysMin:[`sö`,`må`,`ti`,`on`,`to`,`fr`,`lö`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},nb:{name:`nb`,months:[`januar`,`februar`,`mars`,`april`,`mai`,`juni`,`juli`,`august`,`september`,`oktober`,`november`,`desember`],monthsShort:[`jan.`,`feb.`,`mar.`,`apr.`,`mai`,`juni`,`juli`,`aug.`,`sep.`,`okt.`,`nov.`,`des.`],weekdays:[`søndag`,`mandag`,`tirsdag`,`onsdag`,`torsdag`,`fredag`,`lørdag`],weekdaysShort:[`søn`,`man`,`tir`,`ons`,`tor`,`fre`,`lør`],weekdaysMin:[`sø`,`ma`,`ti`,`on`,`to`,`fr`,`lø`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},da:{name:`da`,months:[`januar`,`februar`,`marts`,`april`,`maj`,`juni`,`juli`,`august`,`september`,`oktober`,`november`,`december`],monthsShort:[`jan`,`feb`,`mar`,`apr`,`maj`,`jun`,`jul`,`aug`,`sep`,`okt`,`nov`,`dec`],weekdays:[`søndag`,`mandag`,`tirsdag`,`onsdag`,`torsdag`,`fredag`,`lørdag`],weekdaysShort:[`søn`,`man`,`tir`,`ons`,`tor`,`fre`,`lør`],weekdaysMin:[`sø`,`ma`,`ti`,`on`,`to`,`fr`,`lø`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},fi:{name:`fi`,months:[`tammikuuta`,`helmikuuta`,`maaliskuuta`,`huhtikuuta`,`toukokuuta`,`kesäkuuta`,`heinäkuuta`,`elokuuta`,`syyskuuta`,`lokakuuta`,`marraskuuta`,`joulukuuta`],monthsShort:[`tam.`,`hel.`,`maa.`,`huh.`,`tou.`,`kes.`,`hei.`,`elo.`,`syy.`,`lok.`,`mar.`,`jou.`],weekdays:[`sunnuntai`,`maanantai`,`tiistai`,`keskiviikko`,`torstai`,`perjantai`,`lauantai`],weekdaysShort:[`su.`,`ma.`,`ti.`,`ke.`,`to.`,`pe.`,`la.`],weekdaysMin:[`su`,`ma`,`ti`,`ke`,`to`,`pe`,`la`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}}},b={name:`ja`,months:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],monthsShort:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],weekdays:[`日曜日`,`月曜日`,`火曜日`,`水曜日`,`木曜日`,`金曜日`,`土曜日`],weekdaysShort:[`日`,`月`,`火`,`水`,`木`,`金`,`土`],weekdaysMin:[`日`,`月`,`火`,`水`,`木`,`金`,`土`],meridiem:{am:`午前`,pm:`午後`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY年MM月DD日`,time:`HH:mm:ss`,datetime:`YYYY年MM月DD日 HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},x={name:`zh-cn`,months:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],monthsShort:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],weekdays:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],weekdaysShort:[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`],weekdaysMin:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],meridiem:{am:`上午`,pm:`下午`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},S={name:`zh-tw`,months:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],monthsShort:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],weekdays:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],weekdaysShort:[`週日`,`週一`,`週二`,`週三`,`週四`,`週五`,`週六`],weekdaysMin:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],meridiem:{am:`上午`,pm:`下午`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},C={name:`ko`,months:[`1월`,`2월`,`3월`,`4월`,`5월`,`6월`,`7월`,`8월`,`9월`,`10월`,`11월`,`12월`],monthsShort:[`1월`,`2월`,`3월`,`4월`,`5월`,`6월`,`7월`,`8월`,`9월`,`10월`,`11월`,`12월`],weekdays:[`일요일`,`월요일`,`화요일`,`수요일`,`목요일`,`금요일`,`토요일`],weekdaysShort:[`일`,`월`,`화`,`수`,`목`,`금`,`토`],weekdaysMin:[`일`,`월`,`화`,`수`,`목`,`금`,`토`],meridiem:{am:`오전`,pm:`오후`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},w={name:`th`,months:[`มกราคม`,`กุมภาพันธ์`,`มีนาคม`,`เมษายน`,`พฤษภาคม`,`มิถุนายน`,`กรกฎาคม`,`สิงหาคม`,`กันยายน`,`ตุลาคม`,`พฤศจิกายน`,`ธันวาคม`],monthsShort:[`ม.ค.`,`ก.พ.`,`มี.ค.`,`เม.ย.`,`พ.ค.`,`มิ.ย.`,`ก.ค.`,`ส.ค.`,`ก.ย.`,`ต.ค.`,`พ.ย.`,`ธ.ค.`],weekdays:[`อาทิตย์`,`จันทร์`,`อังคาร`,`พุธ`,`พฤหัสบดี`,`ศุกร์`,`เสาร์`],weekdaysShort:[`อา.`,`จ.`,`อ.`,`พ.`,`พฤ.`,`ศ.`,`ส.`],weekdaysMin:[`อา`,`จ`,`อ`,`พ`,`พฤ`,`ศ`,`ส`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},ee={name:`vi`,months:[`tháng 1`,`tháng 2`,`tháng 3`,`tháng 4`,`tháng 5`,`tháng 6`,`tháng 7`,`tháng 8`,`tháng 9`,`tháng 10`,`tháng 11`,`tháng 12`],monthsShort:[`Th01`,`Th02`,`Th03`,`Th04`,`Th05`,`Th06`,`Th07`,`Th08`,`Th09`,`Th10`,`Th11`,`Th12`],weekdays:[`Chủ nhật`,`Thứ hai`,`Thứ ba`,`Thứ tư`,`Thứ năm`,`Thứ sáu`,`Thứ bảy`],weekdaysShort:[`CN`,`Hai`,`Ba`,`Tư`,`Năm`,`Sáu`,`Bảy`],weekdaysMin:[`CN`,`T2`,`T3`,`T4`,`T5`,`T6`,`T7`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},T={name:`id`,months:[`Januari`,`Februari`,`Maret`,`April`,`Mei`,`Juni`,`Juli`,`Agustus`,`September`,`Oktober`,`November`,`Desember`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`Mei`,`Jun`,`Jul`,`Agu`,`Sep`,`Okt`,`Nov`,`Des`],weekdays:[`Minggu`,`Senin`,`Selasa`,`Rabu`,`Kamis`,`Jumat`,`Sabtu`],weekdaysShort:[`Min`,`Sen`,`Sel`,`Rab`,`Kam`,`Jum`,`Sab`],weekdaysMin:[`Mg`,`Sn`,`Sl`,`Rb`,`Km`,`Jm`,`Sb`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},E={ja:b,"zh-cn":x,"zh-tw":S,ko:C,th:w,vi:ee,id:T},D={de:{name:`de`,months:[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`],monthsShort:[`Jan.`,`Feb.`,`Mär.`,`Apr.`,`Mai`,`Jun.`,`Jul.`,`Aug.`,`Sep.`,`Okt.`,`Nov.`,`Dez.`],weekdays:[`Sonntag`,`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`],weekdaysShort:[`So.`,`Mo.`,`Di.`,`Mi.`,`Do.`,`Fr.`,`Sa.`],weekdaysMin:[`So`,`Mo`,`Di`,`Mi`,`Do`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},nl:{name:`nl`,months:[`januari`,`februari`,`maart`,`april`,`mei`,`juni`,`juli`,`augustus`,`september`,`oktober`,`november`,`december`],monthsShort:[`jan.`,`feb.`,`mrt.`,`apr.`,`mei`,`jun.`,`jul.`,`aug.`,`sep.`,`okt.`,`nov.`,`dec.`],weekdays:[`zondag`,`maandag`,`dinsdag`,`woensdag`,`donderdag`,`vrijdag`,`zaterdag`],weekdaysShort:[`zo.`,`ma.`,`di.`,`wo.`,`do.`,`vr.`,`za.`],weekdaysMin:[`zo`,`ma`,`di`,`wo`,`do`,`vr`,`za`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD-MM-YYYY`,time:`HH:mm:ss`,datetime:`DD-MM-YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},el:{name:`el`,months:[`Ιανουάριος`,`Φεβρουάριος`,`Μάρτιος`,`Απρίλιος`,`Μάιος`,`Ιούνιος`,`Ιούλιος`,`Αύγουστος`,`Σεπτέμβριος`,`Οκτώβριος`,`Νοέμβριος`,`Δεκέμβριος`],monthsShort:[`Ιαν`,`Φεβ`,`Μάρ`,`Απρ`,`Μάι`,`Ιού`,`Ιού`,`Αύγ`,`Σεπ`,`Οκτ`,`Νοέ`,`Δεκ`],weekdays:[`Κυριακή`,`Δευτέρα`,`Τρίτη`,`Τετάρτη`,`Πέμπτη`,`Παρασκευή`,`Σάββατο`],weekdaysShort:[`Κυρ`,`Δευ`,`Τρί`,`Τετ`,`Πέμ`,`Παρ`,`Σάβ`],weekdaysMin:[`Κ`,`Δ`,`Τ`,`Τ`,`Π`,`Π`,`Σ`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},hu:{name:`hu`,months:[`január`,`február`,`március`,`április`,`május`,`június`,`július`,`augusztus`,`szeptember`,`október`,`november`,`december`],monthsShort:[`jan.`,`feb.`,`már.`,`ápr.`,`máj.`,`jún.`,`júl.`,`aug.`,`szep.`,`okt.`,`nov.`,`dec.`],weekdays:[`vasárnap`,`hétfő`,`kedd`,`szerda`,`csütörtök`,`péntek`,`szombat`],weekdaysShort:[`V`,`H`,`K`,`Sz`,`Cs`,`P`,`Szo`],weekdaysMin:[`V`,`H`,`K`,`Sz`,`Cs`,`P`,`Szo`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY.MM.DD.`,time:`HH:mm:ss`,datetime:`YYYY.MM.DD. HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},eu:{name:`eu`,months:[`urtarrila`,`otsaila`,`martxoa`,`apirila`,`maiatza`,`ekaina`,`uztaila`,`abuztua`,`iraila`,`urria`,`azaroa`,`abendua`],monthsShort:[`urt.`,`ots.`,`mar.`,`api.`,`mai.`,`eka.`,`uzt.`,`abu.`,`ira.`,`urr.`,`aza.`,`abe.`],weekdays:[`igandea`,`astelehena`,`asteartea`,`asteazkena`,`osteguna`,`ostirala`,`larunbata`],weekdaysShort:[`ig.`,`al.`,`ar.`,`az.`,`og.`,`or.`,`lr.`],weekdaysMin:[`ig`,`al`,`ar`,`az`,`og`,`or`,`lr`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY.MM.DD`,time:`HH:mm:ss`,datetime:`YYYY.MM.DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},ca:{name:`ca`,months:[`gener`,`febrer`,`març`,`abril`,`maig`,`juny`,`juliol`,`agost`,`setembre`,`octubre`,`novembre`,`desembre`],monthsShort:[`gen`,`feb`,`mar`,`abr`,`mai`,`jun`,`jul`,`ago`,`set`,`oct`,`nov`,`des`],weekdays:[`diumenge`,`dilluns`,`dimarts`,`dimecres`,`dijous`,`divendres`,`dissabte`],weekdaysShort:[`diu`,`dil`,`dit`,`dic`,`dij`,`div`,`dis`],weekdaysMin:[`du`,`dl`,`dt`,`dc`,`dj`,`dv`,`ds`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},tr:{name:`tr`,months:[`Ocak`,`Şubat`,`Mart`,`Nisan`,`Mayıs`,`Haziran`,`Temmuz`,`Ağustos`,`Eylül`,`Ekim`,`Kasım`,`Aralık`],monthsShort:[`Oca`,`Şub`,`Mar`,`Nis`,`May`,`Haz`,`Tem`,`Ağu`,`Eyl`,`Eki`,`Kas`,`Ara`],weekdays:[`Pazar`,`Pazartesi`,`Salı`,`Çarşamba`,`Perşembe`,`Cuma`,`Cumartesi`],weekdaysShort:[`Paz`,`Ptz`,`Sal`,`Çar`,`Per`,`Cum`,`Cts`],weekdaysMin:[`Pa`,`Pt`,`Sa`,`Ça`,`Pe`,`Cu`,`Ct`],meridiem:{am:`ÖÖ`,pm:`ÖS`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD.MM.YYYY`,time:`HH:mm:ss`,datetime:`DD.MM.YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}}},O={ar:{name:`ar`,months:[`كانون الثاني`,`شباط`,`آذار`,`نيسان`,`أيار`,`حزيران`,`تموز`,`آب`,`أيلول`,`تشرين الأول`,`تشرين الثاني`,`كانون الأول`],monthsShort:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`],weekdays:[`الأحد`,`الاثنين`,`الثلاثاء`,`الأربعاء`,`الخميس`,`الجمعة`,`السبت`],weekdaysShort:[`أحد`,`اثن`,`ثلا`,`أربع`,`خمس`,`جمع`,`سبت`],weekdaysMin:[`ح`,`ن`,`ث`,`ع`,`خ`,`ج`,`س`],meridiem:{am:`ص`,pm:`م`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},he:{name:`he`,months:[`ינואר`,`פברואר`,`מרץ`,`אפריל`,`מאי`,`יוני`,`יולי`,`אוגוסט`,`ספטמבר`,`אוקטובר`,`נובמבר`,`דצמבר`],monthsShort:[`ינו`,`פבר`,`מרץ`,`אפר`,`מאי`,`יוני`,`יולי`,`אוג`,`ספט`,`אוק`,`נוב`,`דצמ`],weekdays:[`ראשון`,`שני`,`שלישי`,`רביעי`,`חמישי`,`שישי`,`שבת`],weekdaysShort:[`ראשון`,`שני`,`שלישי`,`רביעי`,`חמישי`,`שישי`,`שבת`],weekdaysMin:[`ראו`,`שני`,`שלי`,`רבי`,`חמי`,`שיש`,`שבת`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},hi:{name:`hi`,months:[`जनवरी`,`फ़रवरी`,`मार्च`,`अप्रैल`,`मई`,`जून`,`जुलाई`,`अगस्त`,`सितंबर`,`अक्टूबर`,`नवंबर`,`दिसंबर`],monthsShort:[`जन`,`फ़र`,`मार`,`अप्र`,`मई`,`जून`,`जुल`,`अग`,`सित`,`अक्ट`,`नव`,`दिस`],weekdays:[`रविवार`,`सोमवार`,`मंगलवार`,`बुधवार`,`गुरुवार`,`शुक्रवार`,`शनिवार`],weekdaysShort:[`रवि`,`सोम`,`मंग`,`बुध`,`गुरु`,`शुक्र`,`शनि`],weekdaysMin:[`र`,`स`,`मं`,`ब`,`गु`,`श`,`श`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}}},k={vi:{name:`vi`,months:[`Tháng 1`,`Tháng 2`,`Tháng 3`,`Tháng 4`,`Tháng 5`,`Tháng 6`,`Tháng 7`,`Tháng 8`,`Tháng 9`,`Tháng 10`,`Tháng 11`,`Tháng 12`],monthsShort:[`Th1`,`Th2`,`Th3`,`Th4`,`Th5`,`Th6`,`Th7`,`Th8`,`Th9`,`Th10`,`Th11`,`Th12`],weekdays:[`Chủ nhật`,`Thứ hai`,`Thứ ba`,`Thứ tư`,`Thứ năm`,`Thứ sáu`,`Thứ bảy`],weekdaysShort:[`CN`,`Th2`,`Th3`,`Th4`,`Th5`,`Th6`,`Th7`],weekdaysMin:[`CN`,`T2`,`T3`,`T4`,`T5`,`T6`,`T7`],meridiem:{am:`SA`,pm:`CH`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},id:{name:`id`,months:[`Januari`,`Februari`,`Maret`,`April`,`Mei`,`Juni`,`Juli`,`Agustus`,`September`,`Oktober`,`November`,`Desember`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`Mei`,`Jun`,`Jul`,`Agu`,`Sep`,`Okt`,`Nov`,`Des`],weekdays:[`Minggu`,`Senin`,`Selasa`,`Rabu`,`Kamis`,`Jumat`,`Sabtu`],weekdaysShort:[`Min`,`Sen`,`Sel`,`Rab`,`Kam`,`Jum`,`Sab`],weekdaysMin:[`Mg`,`Sn`,`Sl`,`Rb`,`Km`,`Jm`,`Sb`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},th:{name:`th`,months:[`มกราคม`,`กุมภาพันธ์`,`มีนาคม`,`เมษายน`,`พฤษภาคม`,`มิถุนายน`,`กรกฎาคม`,`สิงหาคม`,`กันยายน`,`ตุลาคม`,`พฤศจิกายน`,`ธันวาคม`],monthsShort:[`ม.ค.`,`ก.พ.`,`มี.ค.`,`เม.ย.`,`พ.ค.`,`มิ.ย.`,`ก.ค.`,`ส.ค.`,`ก.ย.`,`ต.ค.`,`พ.ย.`,`ธ.ค.`],weekdays:[`อาทิตย์`,`จันทร์`,`อังคาร`,`พุธ`,`พฤหัสบดี`,`ศุกร์`,`เสาร์`],weekdaysShort:[`อา.`,`จ.`,`อ.`,`พ.`,`พฤ.`,`ศ.`,`ส.`],weekdaysMin:[`อา`,`จ`,`อ`,`พ`,`พฤ`,`ศ`,`ส`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}}},A={...s,...d,..._,...v,...y,...E,...D,...O,...k};function j(e){e instanceof Map?Object.entries(A).forEach(([t,n])=>{e.set(t,n)}):Object.entries(A).forEach(([t,n])=>{e[t]=n})}function M(){let e=Object.keys(A);for(;e.length<40;)e.push(`locale-${e.length+1}`);return e}var N=40,P={name:`en`,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],weekdays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],weekdaysShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],weekdaysMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},F={name:`es`,months:[`Enero`,`Febrero`,`Marzo`,`Abril`,`Mayo`,`Junio`,`Julio`,`Agosto`,`Septiembre`,`Octubre`,`Noviembre`,`Diciembre`],monthsShort:[`Ene`,`Feb`,`Mar`,`Abr`,`May`,`Jun`,`Jul`,`Ago`,`Sep`,`Oct`,`Nov`,`Dic`],weekdays:[`Domingo`,`Lunes`,`Martes`,`Miércoles`,`Jueves`,`Viernes`,`Sábado`],weekdaysShort:[`Dom`,`Lun`,`Mar`,`Mié`,`Jue`,`Vie`,`Sáb`],weekdaysMin:[`Do`,`Lu`,`Ma`,`Mi`,`Ju`,`Vi`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},I=class e{static instance;locales=new Map;currentLocale=`en`;static getInstance(){return e.instance||=new e,e.instance}constructor(){this.locales.set(`en`,P),this.locales.set(`es`,F),j(this.locales)}setLocale(e,t){t&&this.locales.set(e.toLowerCase(),t),this.currentLocale=e.toLowerCase()}getLocale(e){let t=(e||this.currentLocale).toLowerCase();return this.locales.get(t)||this.locales.get(`en`)||P}listLocales(){return Array.from(this.locales.keys())}getCurrentLocale(){return this.currentLocale}loadLocales(e){Object.entries(e).forEach(([e,t])=>{this.locales.set(e.toLowerCase(),t)})}},L=class{localeManager;constructor(){this.localeManager=I.getInstance()}format(e,t,n){let r=this.localeManager.getLocale(n),i=[],a=t.replace(/\[([^\]]+)\]/g,(e,t)=>(i.push(t),`~${i.length-1}~`));a=a.replace(/"([^"]*)"/g,(e,t)=>(i.push(t),`~${i.length-1}~`));let o=a.replace(/Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|SSS/g,t=>{switch(t){case`YYYY`:return String(e.year).padStart(4,`0`);case`YY`:return String(e.year).slice(-2);case`Y`:return String(e.year);case`MMMM`:return r.months[e.month-1];case`MMM`:return r.monthsShort[e.month-1];case`MM`:return String(e.month).padStart(2,`0`);case`M`:return String(e.month);case`DD`:return String(e.day).padStart(2,`0`);case`D`:return String(e.day);case`dddd`:return r.weekdays[e.dayOfWeek%7];case`ddd`:return r.weekdaysShort[e.dayOfWeek%7];case`dd`:return r.weekdaysMin[e.dayOfWeek%7];case`d`:return String(e.dayOfWeek);case`HH`:return String(e.hour).padStart(2,`0`);case`H`:return String(e.hour);case`hh`:return String(e.hour%12||12).padStart(2,`0`);case`h`:return String(e.hour%12||12);case`mm`:return String(e.minute).padStart(2,`0`);case`m`:return String(e.minute);case`ss`:return String(e.second).padStart(2,`0`);case`s`:return String(e.second);case`SSS`:return String(e.millisecond).padStart(3,`0`);case`a`:case`A`:let n=r.meridiem||{am:`am`,pm:`pm`},i=e.hour>=12?n.pm:n.am;return t===`a`?i.toLowerCase():i.toUpperCase();default:return t}});return i.forEach((e,t)=>{o=o.replace(`~${t}~`,e)}),o}getPreset(e){let t={iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`,rfc3339:`YYYY-MM-DDTHH:mm:ssZ`,utc:`YYYY-MM-DDTHH:mm:ss[Z]`};return t[e]||t.iso}formatPreset(e,t,n){let r=this.getPreset(t);return this.format(e,r,n)}},R=class e{temporal;config;formatterInstance;constructor(e,t){if(this.formatterInstance=new L,this.config={locale:t?.locale||`en`,timezone:t?.timezone||`UTC`,strict:t?.strict??!1},this.temporal=n.parseToPlainDateTime(e),this.config.timezone&&this.config.timezone!==`UTC`)try{this.temporal=this.temporal.toZonedDateTime(this.config.timezone)}catch{}}static now(t){return new e(void 0,t)}static from(t,n){return new e(t,n)}static fromTemporal(t,n){let r=new e(void 0,n);return r.temporal=t,r}toTemporal(){return this.temporal}toDate(){return n.toDate(this.temporal)}toISOString(){return n.toISOString(this.temporal)}valueOf(){return n.toUnix(this.temporal)}unix(){return Math.floor(this.valueOf()/1e3)}toJSON(){return this.toISOString()}toString(){return this.format(`YYYY-MM-DD HH:mm:ss`)}locale(e){if(e===void 0)return this.config.locale;let t=this.clone();return t.config.locale=e,t}timezone(e){if(e===void 0)return this.config.timezone;let t=this.clone();t.config.timezone=e;try{t.temporal=n.toPlainDateTime(t.temporal).toZonedDateTime(e)}catch{}return t}format(e){let t=n.toPlainDateTime(this.temporal),r=[`iso`,`date`,`time`,`datetime`,`rfc2822`,`rfc3339`,`utc`].includes(e)?this.formatterInstance.getPreset(e):e;return this.formatterInstance.format(t,r,this.config.locale)}get(e){let t=n.toPlainDateTime(this.temporal);return e===`week`?t.weekOfYear:t[{year:`year`,month:`month`,week:`year`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,millisecond:`millisecond`,microsecond:`microsecond`,nanosecond:`nanosecond`}[e]]}add(t){let r=n.toPlainDateTime(this.temporal),i={};return Object.entries(t).forEach(([e,t])=>{t!==void 0&&t!==0&&(i[e+`s`]=t)}),r=r.add(i),e.fromTemporal(r,this.config)}subtract(e){let t={};return Object.entries(e).forEach(([e,n])=>{t[e]=n?-n:0}),this.add(t)}diff(e,t=`millisecond`){let r=n.toPlainDateTime(this.temporal),i=n.toPlainDateTime(e.temporal),a={year:`years`,month:`months`,week:`weeks`,day:`days`,hour:`hours`,minute:`minutes`,second:`seconds`,millisecond:`milliseconds`,microsecond:`microseconds`,nanosecond:`nanoseconds`},o=r.since(i),s=a[t];return Math.round(o[s]||0)}isBefore(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);return t.compare(r)<0}isAfter(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);return t.compare(r)>0}isSame(e,t){if(!t)return n.toPlainDateTime(this.temporal).compare(n.toPlainDateTime(e.temporal))===0;let r=n.toPlainDateTime(this.temporal),i=n.toPlainDateTime(e.temporal);switch(t){case`year`:return r.year===i.year;case`month`:return r.year===i.year&&r.month===i.month;case`day`:return r.year===i.year&&r.month===i.month&&r.day===i.day;case`hour`:return r.year===i.year&&r.month===i.month&&r.day===i.day&&r.hour===i.hour;case`minute`:return r.year===i.year&&r.month===i.month&&r.day===i.day&&r.hour===i.hour&&r.minute===i.minute;case`second`:return r.year===i.year&&r.month===i.month&&r.day===i.day&&r.hour===i.hour&&r.minute===i.minute&&r.second===i.second;default:return!1}}isBetween(e,t,r,i=`[]`){let a=n.toPlainDateTime(this.temporal),o=n.toPlainDateTime(e.temporal),s=n.toPlainDateTime(t.temporal),c=!0,l=!0;if(r){let e=this.clone().startOf(r),t=this.clone().endOf(r),i=n.toPlainDateTime(e.temporal),a=n.toPlainDateTime(t.temporal);c=i.compare(o)>=0,l=a.compare(s)<=0}else c=a.compare(o)>=0,l=a.compare(s)<=0;let u=i[0]===`[`,d=i[1]===`]`;return(u?c:a.compare(o)>0)&&(d?l:a.compare(s)<0)}clone(){return new e(this.toDate(),this.config)}startOf(t){let r=n.toPlainDateTime(this.temporal),i={};switch(t){case`year`:i.month=1,i.day=1,i.hour=0,i.minute=0,i.second=0,i.millisecond=0;break;case`month`:i.day=1,i.hour=0,i.minute=0,i.second=0,i.millisecond=0;break;case`week`:case`day`:i.hour=0,i.minute=0,i.second=0,i.millisecond=0;break;case`hour`:i.minute=0,i.second=0,i.millisecond=0;break;case`minute`:i.second=0,i.millisecond=0;break;case`second`:i.millisecond=0;break}let a=r.with(i);return e.fromTemporal(a,this.config)}endOf(e){return this.startOf(e).add({[e]:1}).subtract({millisecond:1})}set(t){let r=n.toPlainDateTime(this.temporal).with(t);return e.fromTemporal(r,this.config)}year(){return n.toPlainDateTime(this.temporal).year}month(){return n.toPlainDateTime(this.temporal).month}day(){return n.toPlainDateTime(this.temporal).day}hour(){return n.toPlainDateTime(this.temporal).hour}minute(){return n.toPlainDateTime(this.temporal).minute}second(){return n.toPlainDateTime(this.temporal).second}millisecond(){return n.toPlainDateTime(this.temporal).millisecond}dayOfWeek(){return n.toPlainDateTime(this.temporal).dayOfWeek}dayOfYear(){return n.toPlainDateTime(this.temporal).dayOfYear}weekOfYear(){return n.toPlainDateTime(this.temporal).weekOfYear}daysInMonth(){return n.toPlainDateTime(this.temporal).add({months:1}).with({day:1}).subtract({days:1}).day}daysInYear(){let e=this.year();return e%4==0&&e%100!=0||e%400==0?366:365}inLeapYear(){let e=n.toPlainDateTime(this.temporal).year;return e%4==0&&e%100!=0||e%400==0}until(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);try{let e=r.since(t);return{years:Math.floor(e.years||0),months:Math.floor(e.months||0),days:Math.floor(e.days||0),hours:Math.floor(e.hours||0),minutes:Math.floor(e.minutes||0),seconds:Math.floor(e.seconds||0),milliseconds:Math.floor(e.milliseconds||0)}}catch{return{years:0,months:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0}}}round(e={}){let{smallestUnit:t=`millisecond`,roundingMode:r=`halfExpand`}=e,i=n.toPlainDateTime(this.temporal),a={year:i.year,month:i.month,day:i.day,hour:i.hour,minute:i.minute,second:i.second,millisecond:i.millisecond,microsecond:i.microsecond||0,nanosecond:i.nanosecond||0,week:0},o=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`],s=o.indexOf(t);if(s===-1)return this.clone();let c={};for(let e=0;e<s;e++){let t=o[e];c[t]=a[t]}let l=o[s],u=a[l];s+1<o.length&&((e,t)=>{switch(e){case`ceil`:return t>0;case`floor`:case`trunc`:return!1;case`halfExpand`:case`halfFloor`:case`halfCeil`:return t>=5;case`expand`:return t>0;default:return t>=5}})(r,a[o[s+1]])&&(u+=1),c[l]=u;for(let e=s+1;e<o.length;e++)c[o[e]]=0;return this.set(c)}toPlainDate(){let e=n.toPlainDateTime(this.temporal);return{year:e.year,month:e.month,day:e.day,dayOfWeek:e.dayOfWeek}}toPlainTime(){let e=n.toPlainDateTime(this.temporal);return{hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond}}withDate(e,t,n){return this.set({year:e,month:t,day:n})}withTime(e,t=0,n=0,r=0){return this.set({hour:e,minute:t,second:n,millisecond:r})}getOffset(){return this.temporal?.offset&&this.temporal.offset||`Z`}getOffsetNanoseconds(){return this.temporal?.offsetNanoseconds&&this.temporal.offsetNanoseconds||0}getTimeZoneId(){return this.temporal?.timeZoneId&&this.temporal.timeZoneId||null}startOfDay(){return this.startOf(`day`)}endOfDay(){return this.endOf(`day`)}since(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);try{let e=t.since(r);return{years:Math.floor(e.years||0),months:Math.floor(e.months||0),days:Math.floor(e.days||0),hours:Math.floor(e.hours||0),minutes:Math.floor(e.minutes||0),seconds:Math.floor(e.seconds||0),milliseconds:Math.floor(e.milliseconds||0)}}catch{return{years:0,months:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0}}}toDurationString(t){let n=t?this.until(t):this.until(e.now()),r=[];n.years&&r.push(`${n.years}Y`),n.months&&r.push(`${n.months}M`),n.days&&r.push(`${n.days}D`);let i=[];n.hours&&i.push(`${n.hours}H`),n.minutes&&i.push(`${n.minutes}M`),n.seconds&&i.push(`${n.seconds}S`);let a=`P${r.join(``)}${i.length>0?`T`+i.join(``):``}`;return a===`P`?`PT0S`:a}isPast(){return this.isBefore(e.now())}isFuture(){return this.isAfter(e.now())}isToday(){return this.isSame(e.now(),`day`)}isTomorrow(){return this.isSame(e.now().add({day:1}),`day`)}isYesterday(){return this.isSame(e.now().subtract({day:1}),`day`)}},z=class{id=`gregory`;name=`Gregorian Calendar`;locale=`en`;monthNames=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];monthNamesShort=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];weekdayNames=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];weekdayNamesShort=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];getMonthName(e,t=!1){return(t?this.monthNamesShort:this.monthNames)[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e,t=!1){return(t?this.weekdayNamesShort:this.weekdayNames)[Math.max(0,Math.min(6,e-1))]}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}daysInMonth(e,t){return t===2&&this.isLeapYear(e)?29:[31,28,31,30,31,30,31,31,30,31,30,31][Math.max(0,Math.min(11,t-1))]}daysInYear(e){return this.isLeapYear(e)?366:365}},B=class e{static instance;calendars=new Map;defaultCalendar=`gregory`;constructor(){this.register(new z)}static getInstance(){return e.instance||=new e,e.instance}register(e){this.calendars.set(e.id,e)}get(e){return this.calendars.get(e)}list(){return Array.from(this.calendars.keys())}setDefault(e){this.calendars.has(e)&&(this.defaultCalendar=e)}getDefault(){let e=this.calendars.get(this.defaultCalendar);if(!e)throw Error(`Default calendar '${this.defaultCalendar}' not found`);return e}},te=B.getInstance(),V=class{id=`islamic`;name=`Islamic Calendar (Hijri)`;locale=`ar`;monthNames=[`Muharram`,`Safar`,`Rabi al-awwal`,`Rabi al-thani`,`Jumada al-awwal`,`Jumada al-thani`,`Rajab`,`Sha'ban`,`Ramadan`,`Shawwal`,`Dhu al-Qi'dah`,`Dhu al-Hijjah`];getMonthName(e){return this.monthNames[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e,t=!1){return(t?[`Ahd`,`Ith`,`Sel`,`Rab`,`Kha`,`Jum`,`Sab`]:[`Ahad`,`Ithnayn`,`Salasa`,`Rabi`,`Khamis`,`Jumah`,`Sabt`])[Math.max(0,Math.min(6,e-1))]}isLeapYear(e){return[2,5,7,10,13,16,18,21,24,26,29].includes(e%30)}daysInMonth(e,t){return t%2==1||t===12&&this.isLeapYear(e)?30:29}daysInYear(e){return this.isLeapYear(e)?355:354}},H=class{id=`hebrew`;name=`Hebrew Calendar`;locale=`he`;monthNames=[`Tishrei`,`Cheshvan`,`Kislev`,`Tevet`,`Shevat`,`Adar`,`Nisan`,`Iyar`,`Sivan`,`Tammuz`,`Av`,`Elul`];getMonthName(e){return this.monthNames[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e,t=!1){return(t?[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`])[Math.max(0,Math.min(6,e-1))]}isLeapYear(e){return[3,6,8,11,14,17,19].includes(e%19)}daysInMonth(e,t){return[30,29,30,29,30,29,30,29,30,29,30,29][Math.max(0,Math.min(11,t-1))]}daysInYear(e){return this.isLeapYear(e)?384:354}},U=class{id=`chinese`;name=`Chinese Calendar`;locale=`zh`;monthNames=[`正月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`冬月`,`腊月`];terrestrialBranches=[`子`,`丑`,`寅`,`卯`,`辰`,`巳`,`午`,`未`,`申`,`酉`,`戌`,`亥`];getMonthName(e){return this.monthNames[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e,t=!1){return(t?[`日`,`一`,`二`,`三`,`四`,`五`,`六`]:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`])[Math.max(0,Math.min(6,e-1))]}isLeapYear(e){return e%3==0}daysInMonth(e,t){return t%2==0?30:29}daysInYear(e){return this.isLeapYear(e)?384:354}getZodiacSign(e){return this.terrestrialBranches[e%12]}},W=class{id=`japanese`;name=`Japanese Calendar`;locale=`ja`;monthNames=[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`];getMonthName(e){return this.monthNames[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e,t=!1){return(t?[`日`,`月`,`火`,`水`,`木`,`金`,`土`]:[`日曜日`,`月曜日`,`火曜日`,`水曜日`,`木曜日`,`金曜日`,`土曜日`])[Math.max(0,Math.min(6,e-1))]}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}daysInMonth(e,t){return t===2&&this.isLeapYear(e)?29:[31,28,31,30,31,30,31,31,30,31,30,31][Math.max(0,Math.min(11,t-1))]}daysInYear(e){return this.isLeapYear(e)?366:365}},G=class{id=`buddhist`;name=`Buddhist Calendar`;locale=`th`;monthNames=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];getMonthName(e){return this.monthNames[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`][Math.max(0,Math.min(6,e-1))]}isLeapYear(e){let t=e-543;return t%4==0&&t%100!=0||t%400==0}daysInMonth(e,t){return t===2&&this.isLeapYear(e)?29:[31,28,31,30,31,30,31,31,30,31,30,31][Math.max(0,Math.min(11,t-1))]}daysInYear(e){return this.isLeapYear(e)?366:365}},K=class e{static instance;plugins=new Map;static getInstance(){return e.instance||=new e,e.instance}static use(t,n,r){e.getInstance().register(t,n,r)}static useMultiple(t,n,r){let i=e.getInstance();t.forEach(e=>i.register(e,n,r))}static getPlugin(t){return e.getInstance().plugins.get(t)}static hasPlugin(t){return e.getInstance().plugins.has(t)}static listPlugins(){let t=e.getInstance();return Array.from(t.plugins.keys())}static unuse(t){return e.getInstance().plugins.delete(t)}static clear(){e.getInstance().plugins.clear()}register(e,t,n){if(this.plugins.has(e.name)){console.warn(`Plugin "${e.name}" is already registered. Skipping...`);return}try{e.install(t,n),this.plugins.set(e.name,e),console.debug(`Plugin "${e.name}" v${e.version} registered successfully`)}catch(t){throw console.error(`Failed to register plugin "${e.name}":`,t),Error(`Failed to register plugin "${e.name}": ${t instanceof Error?t.message:String(t)}`)}}},q=[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],J={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`},Y=class{name=`relative-time`;version=`1.0.0`;config;formats;constructor(e){this.config={thresholds:e?.thresholds||q,rounding:e?.rounding||Math.round},this.formats=J}install(e){let t=this;e.prototype.fromNow=function(e){return t.formatRelativeTime(this,!1,e)},e.prototype.toNow=function(e){return t.formatRelativeTime(this,!0,e)},e.prototype.humanize=function(e,n){return e?t.formatRelativeTime(this,e.isAfter(this),n):t.formatRelativeTime(this,!1,n)}}formatRelativeTime(e,t,n){let r=e.constructor.now().diff(e,`millisecond`),i=Math.abs(r),a=t??!(r>0),o=this.getRelativeTimeString(i);return n?o:(a?this.formats.future:this.formats.past).replace(`%s`,o)}getRelativeTimeString(e){let t=this.config.thresholds||q,n=this.config.rounding||Math.round;for(let r=0;r<t.length;r++){let i=t[r];if(r+1<t.length&&t[r+1]&&i.r&&e<i.r*1e3)continue;let a;a=i.d?n(e/this.getUnitMilliseconds(i.d)):1;let o=i.l,s=this.formats[o]||o;return typeof s==`string`&&s.includes(`%d`)?s.replace(`%d`,String(a)):s}return`${n(e/1e3)} seconds`}getUnitMilliseconds(e){return{second:1e3,minute:1e3*60,hour:1e3*60*60,day:1e3*60*60*24,month:1e3*60*60*24*30,year:1e3*60*60*24*365}[e]||1}setFormats(e){Object.assign(this.formats,e)}getFormats(){return{...this.formats}}},X=new Y,Z=class e{years=0;months=0;weeks=0;days=0;hours=0;minutes=0;seconds=0;milliseconds=0;constructor(e){this.years=e.years||0,this.months=e.months||0,this.weeks=e.weeks||0,this.days=e.days||0,this.hours=e.hours||0,this.minutes=e.minutes||0,this.seconds=e.seconds||0,this.milliseconds=e.milliseconds||0}static fromISO(t){let n=t.match(/^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:([\d.]+)S)?)?$/);if(!n)throw Error(`Invalid ISO 8601 duration: ${t}`);let[,r,i,a,,o,s,c,l]=n,u=r?-1:1;return new e({years:parseInt(i||`0`,10)*u,months:parseInt(a||`0`,10)*u,days:parseInt(o||`0`,10)*u,hours:parseInt(s||`0`,10)*u,minutes:parseInt(c||`0`,10)*u,seconds:parseFloat(l||`0`)*u})}static between(t,n){let r=t.toTemporal(),i=n.toTemporal().since(r);return new e({years:i.years||0,months:i.months||0,weeks:0,days:i.days||0,hours:i.hours||0,minutes:i.minutes||0,seconds:i.seconds||0,milliseconds:i.milliseconds||0})}static fromMilliseconds(t){let n=t<0,r=Math.abs(t),i=Math.floor(r/(1e3*60*60*24*365)),a=Math.floor(r%(1e3*60*60*24*365)/(1e3*60*60*24*30)),o=Math.floor(r%(1e3*60*60*24*30)/(1e3*60*60*24)),s=Math.floor(r%(1e3*60*60*24)/(1e3*60*60)),c=Math.floor(r%(1e3*60*60)/(1e3*60)),l=Math.floor(r%(1e3*60)/1e3),u=Math.floor(r%1e3),d=n?-1:1;return new e({years:i*d,months:a*d,days:o*d,hours:s*d,minutes:c*d,seconds:l*d,milliseconds:u*d})}as(e){return this.asMilliseconds()/{milliseconds:1,seconds:1e3,minutes:1e3*60,hours:1e3*60*60,days:1e3*60*60*24,weeks:1e3*60*60*24*7,months:1e3*60*60*24*30,years:1e3*60*60*24*365}[e]}asMilliseconds(){return this.years*1e3*60*60*24*365+this.months*1e3*60*60*24*30+this.weeks*1e3*60*60*24*7+this.days*1e3*60*60*24+this.hours*1e3*60*60+this.minutes*1e3*60+this.seconds*1e3+this.milliseconds}asSeconds(){return this.asMilliseconds()/1e3}asMinutes(){return this.asSeconds()/60}asHours(){return this.asMinutes()/60}asDays(){return this.asHours()/24}asWeeks(){return this.asDays()/7}asMonths(){return this.asDays()/30}asYears(){return this.asDays()/365}toObject(){return{years:this.years,months:this.months,weeks:this.weeks,days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds}}toISO(){let e=``;this.years&&(e+=`${this.years}Y`),this.months&&(e+=`${this.months}M`),(this.weeks||this.days)&&(e+=`${this.weeks*7+this.days}D`);let t=``;return this.hours&&(t+=`${this.hours}H`),this.minutes&&(t+=`${this.minutes}M`),(this.seconds||this.milliseconds)&&(t+=`${this.seconds+this.milliseconds/1e3}S`),`${this.isNegative()?`-`:``}P${e}${t?`T${t}`:``}`}humanize(){let e=[];if(this.years&&e.push(`${Math.abs(this.years)} year${Math.abs(this.years)===1?``:`s`}`),this.months&&e.push(`${Math.abs(this.months)} month${Math.abs(this.months)===1?``:`s`}`),this.weeks&&e.push(`${Math.abs(this.weeks)} week${Math.abs(this.weeks)===1?``:`s`}`),this.days&&e.push(`${Math.abs(this.days)} day${Math.abs(this.days)===1?``:`s`}`),this.hours&&e.push(`${Math.abs(this.hours)} hour${Math.abs(this.hours)===1?``:`s`}`),this.minutes&&e.push(`${Math.abs(this.minutes)} minute${Math.abs(this.minutes)===1?``:`s`}`),this.seconds&&e.push(`${Math.abs(this.seconds)} second${Math.abs(this.seconds)===1?``:`s`}`),this.milliseconds&&e.push(`${Math.abs(this.milliseconds)} ms`),e.length===0)return`0 seconds`;let t=e.join(`, `);return this.isNegative()?`-${t}`:t}isNegative(){return this.years<0||this.months<0||this.weeks<0||this.days<0||this.hours<0||this.minutes<0||this.seconds<0||this.milliseconds<0}abs(){return new e({years:Math.abs(this.years),months:Math.abs(this.months),weeks:Math.abs(this.weeks),days:Math.abs(this.days),hours:Math.abs(this.hours),minutes:Math.abs(this.minutes),seconds:Math.abs(this.seconds),milliseconds:Math.abs(this.milliseconds)})}toString(){return this.toISO()}},Q=class{name=`duration`;version=`1.0.0`;install(e){e.prototype.duration=function(e){return Z.between(this,e)},e.Duration=Z,e.duration={fromISO:e=>Z.fromISO(e),between:(e,t)=>Z.between(e,t),fromMilliseconds:e=>Z.fromMilliseconds(e)}}},ne=new Q,$=class{name=`advanced-format`;version=`1.0.0`;install(e){let t=e.prototype.format;e.prototype.format=function(e){if(!e||typeof e!=`string`||!/Q|Do|w|W|gggg|GGGG|k{1,2}|X|x|zzz?/.test(e))return t.call(this,e);let n=this.toTemporal(),r=`toPlainDateTime`in n?n.toPlainDateTime():n,i=e=>{let t=[`th`,`st`,`nd`,`rd`],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])},a=(e,t)=>String(e).padStart(t,`0`),o=e=>{let t=new Date(e.year,0,4),n=new Date(t);n.setDate(t.getDate()-t.getDay()+(t.getDay()===0?-6:1));let r=new Date(e.year,e.month-1,e.day),i=Math.floor((r.getTime()-n.getTime())/(10080*60*1e3))+1;return Math.max(1,i)},s=e=>{let t=Math.ceil((e.day+new Date(e.year,e.month-1,1).getDay())/7);return Math.max(1,t)},c=e=>{let t=new Date(e.year,e.month-1,e.day),n=t.getTime()<new Date(e.year,0,1).getTime()?-1:t.getTime()>=new Date(e.year+1,0,1).getTime()?1:0;return e.year+n},l=e=>{let t=e.month===1&&e.day<4?-1:e.month===12&&e.day>28?1:0;return e.year+t},u=e.replace(/Q|Do|w|W|gggg|GGGG|k{1,2}|X|x|zzz?/g,e=>{let t=``;switch(e){case`Q`:t=String(Math.ceil(r.month/3));break;case`Do`:t=i(r.day);break;case`W`:case`WW`:t=a(o(r),e===`W`?1:2);break;case`w`:case`ww`:t=a(s(r),e===`w`?1:2);break;case`GGGG`:t=String(c(r));break;case`gggg`:t=String(l(r));break;case`k`:case`kk`:t=a(r.hour===0?24:r.hour,e===`k`?1:2);break;case`X`:t=String(Math.floor(this.valueOf()/1e3));break;case`x`:t=String(this.valueOf());break;case`z`:t=`${this.getTimezoneOffset()}`;break;case`zzz`:t=`${this.getTimezoneOffsetLong()}`;break;default:return e}return`[${t}]`});return t.call(this,u)}}getOrdinal(e){let t=[`th`,`st`,`nd`,`rd`],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}padNumber(e,t){return String(e).padStart(t,`0`)}getISOWeek(e){let t=new Date(e.year,0,4),n=new Date(t);n.setDate(t.getDate()-t.getDay()+(t.getDay()===0?-6:1));let r=new Date(e.year,e.month-1,e.day),i=Math.floor((r.getTime()-n.getTime())/(10080*60*1e3))+1;return Math.max(1,i)}getWeekOfYear(e){let t=Math.ceil((e.day+new Date(e.year,e.month-1,1).getDay())/7);return Math.max(1,t)}getISOWeekYear(e){let t=new Date(e.year,e.month-1,e.day),n=t.getTime()<new Date(e.year,0,1).getTime()?-1:t.getTime()>=new Date(e.year+1,0,1).getTime()?1:0;return e.year+n}getWeekYear(e){let t=e.month===1&&e.day<4?-1:e.month===12&&e.day>28?1:0;return e.year+t}getTimezoneOffset(){try{let e=new Date;return new Intl.DateTimeFormat(`en-US`,{timeZone:`UTC`,timeZoneName:`short`}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value||`UTC`}catch{return`UTC`}}getTimezoneOffsetLong(){try{let e=new Date;return new Intl.DateTimeFormat(`en-US`,{timeZone:`UTC`,timeZoneName:`long`}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value||`Coordinated Universal Time`}catch{return`Coordinated Universal Time`}}},re=new $;function ie(e,t){return new R(e,t)}var ae=`1.0.3`;exports.AdvancedFormatPlugin=$,exports.BuddhistCalendar=G,exports.CalendarManager=B,exports.ChineseCalendar=U,exports.DateFormatter=L,exports.Duration=Z,exports.DurationPlugin=Q,exports.EN_LOCALE=P,exports.ES_LOCALE=F,exports.GregorianCalendar=z,exports.HebrewCalendar=H,exports.IslamicCalendar=V,exports.JapaneseCalendar=W,exports.LOCALES_COUNT=N,exports.LocaleManager=I,exports.PluginManager=K,exports.RelativeTimePlugin=Y,exports.TemporalAdapter=n,exports.TimeGuard=R,exports.advancedFormatPlugin=re,exports.calendarManager=te,exports.durationPlugin=ne,exports.getAvailableLocales=M,exports.relativeTimePlugin=X,exports.timeGuard=ie,exports.version=ae;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=null;function t(){if(e)return e;let t=globalThis.Temporal;if(!t)throw Error(`Temporal API not loaded. Make sure @js-temporal/polyfill is imported in your app.`);return e=t,t}var n=class{static parseToPlainDateTime(e){let n=t();return this.isPlainDateTime(e)?e:this.isZonedDateTime(e)?e.toPlainDateTime():this.isPlainDate(e)?e.toPlainDateTime({hour:0,minute:0,second:0,millisecond:0}):this.isPlainTime(e)?n.Now.plainDateTimeISO().with(e):typeof e==`object`&&e&&`getTime`in e&&typeof e.getTime==`function`?this.fromDate(e):typeof e==`number`?this.fromUnix(e):typeof e==`string`?this.parseISOString(e):typeof e==`object`&&e?this.fromObject(e):n.Now.plainDateTimeISO()}static fromDate(e){let n=t(),[r,i]=e.toISOString().split(`T`);return n.PlainDateTime.from(r+`T`+i.slice(0,-1))}static fromUnix(e){return this.fromDate(new Date(e))}static parseISOString(e){let n=t();try{if(e.includes(`T`)||/ \d{2}:\d{2}/.test(e)){let t=e.replace(` `,`T`);return n.PlainDateTime.from(t)}return n.PlainDate.from(e).toPlainDateTime({hour:0})}catch{return n.Now.plainDateTimeISO()}}static fromObject(e){let n=t(),r=e.year||n.Now.plainDateISO().year,i=e.month||1,a=e.day||1,o=e.hour||0,s=e.minute||0,c=e.second||0,l=e.millisecond||0;return n.PlainDateTime.from({year:r,month:i,day:a,hour:o,minute:s,second:c,millisecond:l})}static toDate(e){let t=this.toPlainDateTime(e);return new Date(t.toString())}static toUnix(e){let t=this.toPlainDateTime(e);return Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond)}static toISOString(e){return this.toPlainDateTime(e).toString()+`Z`}static toPlainDateTime(e){return this.isPlainDateTime(e)?e:e.toPlainDateTime()}static isPlainDateTime(e){return typeof e==`object`&&!!e&&`year`in e&&`month`in e&&`day`in e&&`hour`in e}static isZonedDateTime(e){return typeof e==`object`&&!!e&&`timeZone`in e}static isPlainDate(e){return typeof e==`object`&&!!e&&`year`in e&&`month`in e&&`day`in e&&!(`hour`in e)&&`toPlainDateTime`in e}static isPlainTime(e){return typeof e==`object`&&!!e&&`hour`in e&&!(`year`in e)}static now(){return t().Now.plainDateTimeISO()}static nowInTimezone(e){return t().Now.zonedDateTimeISO(e)}},r={name:`en`,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthsShort:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],weekdays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],weekdaysShort:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],weekdaysMin:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},i={name:`es`,months:[`Enero`,`Febrero`,`Marzo`,`Abril`,`Mayo`,`Junio`,`Julio`,`Agosto`,`Septiembre`,`Octubre`,`Noviembre`,`Diciembre`],monthsShort:[`Ene`,`Feb`,`Mar`,`Abr`,`May`,`Jun`,`Jul`,`Ago`,`Sep`,`Oct`,`Nov`,`Dic`],weekdays:[`Domingo`,`Lunes`,`Martes`,`Miércoles`,`Jueves`,`Viernes`,`Sábado`],weekdaysShort:[`Dom`,`Lun`,`Mar`,`Mié`,`Jue`,`Vie`,`Sáb`],weekdaysMin:[`Do`,`Lu`,`Ma`,`Mi`,`Ju`,`Vi`,`Sa`],meridiem:{am:`AM`,pm:`PM`},formats:{iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`DD/MM/YYYY`,time:`HH:mm:ss`,datetime:`DD/MM/YYYY HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`}},a=class e{static instance;locales=new Map;currentLocale=`en`;static getInstance(){return e.instance||=new e,e.instance}constructor(){this.locales.set(`en`,r),this.locales.set(`es`,i)}setLocale(e,t){t&&this.locales.set(e.toLowerCase(),t),this.currentLocale=e.toLowerCase()}getLocale(e){let t=(e||this.currentLocale).toLowerCase();return this.locales.get(t)||this.locales.get(`en`)||r}listLocales(){return Array.from(this.locales.keys())}getCurrentLocale(){return this.currentLocale}loadLocales(e){Object.entries(e).forEach(([e,t])=>{this.locales.set(e.toLowerCase(),t)})}},o=class{localeManager;constructor(){this.localeManager=a.getInstance()}format(e,t,n){let r=this.localeManager.getLocale(n),i=[],a=t.replace(/\[([^\]]+)\]/g,(e,t)=>(i.push(t),`~${i.length-1}~`));a=a.replace(/"([^"]*)"/g,(e,t)=>(i.push(t),`~${i.length-1}~`));let o=a.replace(/Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|SSS/g,t=>{switch(t){case`YYYY`:return String(e.year).padStart(4,`0`);case`YY`:return String(e.year).slice(-2);case`Y`:return String(e.year);case`MMMM`:return r.months[e.month-1];case`MMM`:return r.monthsShort[e.month-1];case`MM`:return String(e.month).padStart(2,`0`);case`M`:return String(e.month);case`DD`:return String(e.day).padStart(2,`0`);case`D`:return String(e.day);case`dddd`:return r.weekdays[e.dayOfWeek%7];case`ddd`:return r.weekdaysShort[e.dayOfWeek%7];case`dd`:return r.weekdaysMin[e.dayOfWeek%7];case`d`:return String(e.dayOfWeek);case`HH`:return String(e.hour).padStart(2,`0`);case`H`:return String(e.hour);case`hh`:return String(e.hour%12||12).padStart(2,`0`);case`h`:return String(e.hour%12||12);case`mm`:return String(e.minute).padStart(2,`0`);case`m`:return String(e.minute);case`ss`:return String(e.second).padStart(2,`0`);case`s`:return String(e.second);case`SSS`:return String(e.millisecond).padStart(3,`0`);case`a`:case`A`:let n=r.meridiem||{am:`am`,pm:`pm`},i=e.hour>=12?n.pm:n.am;return t===`a`?i.toLowerCase():i.toUpperCase();default:return t}});return i.forEach((e,t)=>{o=o.replace(`~${t}~`,e)}),o}getPreset(e){let t={iso:`YYYY-MM-DDTHH:mm:ss.SSSZ`,date:`YYYY-MM-DD`,time:`HH:mm:ss`,datetime:`YYYY-MM-DD HH:mm:ss`,rfc2822:`ddd, DD MMM YYYY HH:mm:ss Z`,rfc3339:`YYYY-MM-DDTHH:mm:ssZ`,utc:`YYYY-MM-DDTHH:mm:ss[Z]`};return t[e]||t.iso}formatPreset(e,t,n){let r=this.getPreset(t);return this.format(e,r,n)}},s=class e{temporal;config;formatterInstance;constructor(e,t){if(this.formatterInstance=new o,this.config={locale:t?.locale||`en`,timezone:t?.timezone||`UTC`,strict:t?.strict??!1},this.temporal=n.parseToPlainDateTime(e),this.config.timezone&&this.config.timezone!==`UTC`)try{this.temporal=this.temporal.toZonedDateTime(this.config.timezone)}catch{}}static now(t){return new e(void 0,t)}static from(t,n){return new e(t,n)}static fromTemporal(t,n){let r=new e(void 0,n);return r.temporal=t,r}toTemporal(){return this.temporal}toDate(){return n.toDate(this.temporal)}toISOString(){return n.toISOString(this.temporal)}valueOf(){return n.toUnix(this.temporal)}unix(){return Math.floor(this.valueOf()/1e3)}toJSON(){return this.toISOString()}toString(){return this.format(`YYYY-MM-DD HH:mm:ss`)}locale(e){if(e===void 0)return this.config.locale;let t=this.clone();return t.config.locale=e,t}timezone(e){if(e===void 0)return this.config.timezone;let t=this.clone();t.config.timezone=e;try{t.temporal=n.toPlainDateTime(t.temporal).toZonedDateTime(e)}catch{}return t}format(e){let t=n.toPlainDateTime(this.temporal),r=[`iso`,`date`,`time`,`datetime`,`rfc2822`,`rfc3339`,`utc`].includes(e)?this.formatterInstance.getPreset(e):e;return this.formatterInstance.format(t,r,this.config.locale)}get(e){let t=n.toPlainDateTime(this.temporal);return e===`week`?t.weekOfYear:t[{year:`year`,month:`month`,week:`year`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,millisecond:`millisecond`,microsecond:`microsecond`,nanosecond:`nanosecond`}[e]]}add(t){let r=n.toPlainDateTime(this.temporal),i={};return Object.entries(t).forEach(([e,t])=>{t!==void 0&&t!==0&&(i[e+`s`]=t)}),r=r.add(i),e.fromTemporal(r,this.config)}subtract(e){let t={};return Object.entries(e).forEach(([e,n])=>{t[e]=n?-n:0}),this.add(t)}diff(e,t=`millisecond`){let r=n.toPlainDateTime(this.temporal),i=n.toPlainDateTime(e.temporal),a={year:`years`,month:`months`,week:`weeks`,day:`days`,hour:`hours`,minute:`minutes`,second:`seconds`,millisecond:`milliseconds`,microsecond:`microseconds`,nanosecond:`nanoseconds`},o=r.since(i),s=a[t];return Math.round(o[s]||0)}isBefore(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);return t.compare(r)<0}isAfter(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);return t.compare(r)>0}isSame(e,t){if(!t)return n.toPlainDateTime(this.temporal).compare(n.toPlainDateTime(e.temporal))===0;let r=n.toPlainDateTime(this.temporal),i=n.toPlainDateTime(e.temporal);switch(t){case`year`:return r.year===i.year;case`month`:return r.year===i.year&&r.month===i.month;case`day`:return r.year===i.year&&r.month===i.month&&r.day===i.day;case`hour`:return r.year===i.year&&r.month===i.month&&r.day===i.day&&r.hour===i.hour;case`minute`:return r.year===i.year&&r.month===i.month&&r.day===i.day&&r.hour===i.hour&&r.minute===i.minute;case`second`:return r.year===i.year&&r.month===i.month&&r.day===i.day&&r.hour===i.hour&&r.minute===i.minute&&r.second===i.second;default:return!1}}isBetween(e,t,r,i=`[]`){let a=n.toPlainDateTime(this.temporal),o=n.toPlainDateTime(e.temporal),s=n.toPlainDateTime(t.temporal),c=!0,l=!0;if(r){let e=this.clone().startOf(r),t=this.clone().endOf(r),i=n.toPlainDateTime(e.temporal),a=n.toPlainDateTime(t.temporal);c=i.compare(o)>=0,l=a.compare(s)<=0}else c=a.compare(o)>=0,l=a.compare(s)<=0;let u=i[0]===`[`,d=i[1]===`]`;return(u?c:a.compare(o)>0)&&(d?l:a.compare(s)<0)}clone(){return new e(this.toDate(),this.config)}startOf(t){let r=n.toPlainDateTime(this.temporal),i={};switch(t){case`year`:i.month=1,i.day=1,i.hour=0,i.minute=0,i.second=0,i.millisecond=0;break;case`month`:i.day=1,i.hour=0,i.minute=0,i.second=0,i.millisecond=0;break;case`week`:case`day`:i.hour=0,i.minute=0,i.second=0,i.millisecond=0;break;case`hour`:i.minute=0,i.second=0,i.millisecond=0;break;case`minute`:i.second=0,i.millisecond=0;break;case`second`:i.millisecond=0;break}let a=r.with(i);return e.fromTemporal(a,this.config)}endOf(e){return this.startOf(e).add({[e]:1}).subtract({millisecond:1})}set(t){let r=n.toPlainDateTime(this.temporal).with(t);return e.fromTemporal(r,this.config)}year(){return n.toPlainDateTime(this.temporal).year}month(){return n.toPlainDateTime(this.temporal).month}day(){return n.toPlainDateTime(this.temporal).day}hour(){return n.toPlainDateTime(this.temporal).hour}minute(){return n.toPlainDateTime(this.temporal).minute}second(){return n.toPlainDateTime(this.temporal).second}millisecond(){return n.toPlainDateTime(this.temporal).millisecond}dayOfWeek(){return n.toPlainDateTime(this.temporal).dayOfWeek}dayOfYear(){return n.toPlainDateTime(this.temporal).dayOfYear}weekOfYear(){return n.toPlainDateTime(this.temporal).weekOfYear}daysInMonth(){return n.toPlainDateTime(this.temporal).add({months:1}).with({day:1}).subtract({days:1}).day}daysInYear(){let e=this.year();return e%4==0&&e%100!=0||e%400==0?366:365}inLeapYear(){let e=n.toPlainDateTime(this.temporal).year;return e%4==0&&e%100!=0||e%400==0}until(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);try{let e=r.since(t);return{years:Math.floor(e.years||0),months:Math.floor(e.months||0),days:Math.floor(e.days||0),hours:Math.floor(e.hours||0),minutes:Math.floor(e.minutes||0),seconds:Math.floor(e.seconds||0),milliseconds:Math.floor(e.milliseconds||0)}}catch{return{years:0,months:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0}}}round(e={}){let{smallestUnit:t=`millisecond`,roundingMode:r=`halfExpand`}=e,i=n.toPlainDateTime(this.temporal),a={year:i.year,month:i.month,day:i.day,hour:i.hour,minute:i.minute,second:i.second,millisecond:i.millisecond,microsecond:i.microsecond||0,nanosecond:i.nanosecond||0,week:0},o=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`,`microsecond`,`nanosecond`],s=o.indexOf(t);if(s===-1)return this.clone();let c={};for(let e=0;e<s;e++){let t=o[e];c[t]=a[t]}let l=o[s],u=a[l];s+1<o.length&&((e,t)=>{switch(e){case`ceil`:return t>0;case`floor`:case`trunc`:return!1;case`halfExpand`:case`halfFloor`:case`halfCeil`:return t>=5;case`expand`:return t>0;default:return t>=5}})(r,a[o[s+1]])&&(u+=1),c[l]=u;for(let e=s+1;e<o.length;e++)c[o[e]]=0;return this.set(c)}toPlainDate(){let e=n.toPlainDateTime(this.temporal);return{year:e.year,month:e.month,day:e.day,dayOfWeek:e.dayOfWeek}}toPlainTime(){let e=n.toPlainDateTime(this.temporal);return{hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond}}withDate(e,t,n){return this.set({year:e,month:t,day:n})}withTime(e,t=0,n=0,r=0){return this.set({hour:e,minute:t,second:n,millisecond:r})}getOffset(){return this.temporal?.offset&&this.temporal.offset||`Z`}getOffsetNanoseconds(){return this.temporal?.offsetNanoseconds&&this.temporal.offsetNanoseconds||0}getTimeZoneId(){return this.temporal?.timeZoneId&&this.temporal.timeZoneId||null}startOfDay(){return this.startOf(`day`)}endOfDay(){return this.endOf(`day`)}since(e){let t=n.toPlainDateTime(this.temporal),r=n.toPlainDateTime(e.temporal);try{let e=t.since(r);return{years:Math.floor(e.years||0),months:Math.floor(e.months||0),days:Math.floor(e.days||0),hours:Math.floor(e.hours||0),minutes:Math.floor(e.minutes||0),seconds:Math.floor(e.seconds||0),milliseconds:Math.floor(e.milliseconds||0)}}catch{return{years:0,months:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0}}}toDurationString(t){let n=t?this.until(t):this.until(e.now()),r=[];n.years&&r.push(`${n.years}Y`),n.months&&r.push(`${n.months}M`),n.days&&r.push(`${n.days}D`);let i=[];n.hours&&i.push(`${n.hours}H`),n.minutes&&i.push(`${n.minutes}M`),n.seconds&&i.push(`${n.seconds}S`);let a=`P${r.join(``)}${i.length>0?`T`+i.join(``):``}`;return a===`P`?`PT0S`:a}isPast(){return this.isBefore(e.now())}isFuture(){return this.isAfter(e.now())}isToday(){return this.isSame(e.now(),`day`)}isTomorrow(){return this.isSame(e.now().add({day:1}),`day`)}isYesterday(){return this.isSame(e.now().subtract({day:1}),`day`)}},c=class{id=`gregory`;name=`Gregorian Calendar`;locale=`en`;monthNames=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];monthNamesShort=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];weekdayNames=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];weekdayNamesShort=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`];getMonthName(e,t=!1){return(t?this.monthNamesShort:this.monthNames)[Math.max(0,Math.min(11,e-1))]}getWeekdayName(e,t=!1){return(t?this.weekdayNamesShort:this.weekdayNames)[Math.max(0,Math.min(6,e-1))]}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}daysInMonth(e,t){return t===2&&this.isLeapYear(e)?29:[31,28,31,30,31,30,31,31,30,31,30,31][Math.max(0,Math.min(11,t-1))]}daysInYear(e){return this.isLeapYear(e)?366:365}},l=class e{static instance;calendars=new Map;defaultCalendar=`gregory`;constructor(){this.register(new c)}static getInstance(){return e.instance||=new e,e.instance}register(e){this.calendars.set(e.id,e)}get(e){return this.calendars.get(e)}list(){return Array.from(this.calendars.keys())}setDefault(e){this.calendars.has(e)&&(this.defaultCalendar=e)}getDefault(){let e=this.calendars.get(this.defaultCalendar);if(!e)throw Error(`Default calendar '${this.defaultCalendar}' not found`);return e}},u=l.getInstance(),d=class e{static instance;plugins=new Map;static getInstance(){return e.instance||=new e,e.instance}static use(t,n,r){e.getInstance().register(t,n,r)}static useMultiple(t,n,r){let i=e.getInstance();t.forEach(e=>i.register(e,n,r))}static getPlugin(t){return e.getInstance().plugins.get(t)}static hasPlugin(t){return e.getInstance().plugins.has(t)}static listPlugins(){let t=e.getInstance();return Array.from(t.plugins.keys())}static unuse(t){return e.getInstance().plugins.delete(t)}static clear(){e.getInstance().plugins.clear()}register(e,t,n){if(this.plugins.has(e.name)){console.warn(`Plugin "${e.name}" is already registered. Skipping...`);return}try{e.install(t,n),this.plugins.set(e.name,e),console.debug(`Plugin "${e.name}" v${e.version} registered successfully`)}catch(t){throw console.error(`Failed to register plugin "${e.name}":`,t),Error(`Failed to register plugin "${e.name}": ${t instanceof Error?t.message:String(t)}`)}}};function f(e,t){return new s(e,t)}var p=`2.0.3`;exports.CalendarManager=l,exports.DateFormatter=o,exports.EN_LOCALE=r,exports.ES_LOCALE=i,exports.GregorianCalendar=c,exports.LocaleManager=a,exports.PluginManager=d,exports.TemporalAdapter=n,exports.TimeGuard=s,exports.calendarManager=u,exports.timeGuard=f,exports.version=p;